The bill would compel the Department of Homeland Security to detain immigrants accused of crimes like shoplifting and give states more rights to contest certain immigration-related decisions.