The legislation will require immigration officers to detain immigrants who are in the U.S. illegally when they're accused of lower-level crimes like shoplifting.