The Friday order granted a temporary restraining order requested by 23 Democratic states who said the Trump directive was unconstitutional.