A trade court in the US has blocked President Donald Trump from imposing sweeping global tariffs on imports.