The bill cleared the GOP-controlled Legislature after a final vote in the Senate over the objections of Democrats. Texas is now poised to join at least 17 other states that have enacted similar bans.