The Supreme Court ruled that President Donald Trump violated federal law by unilaterally imposing sweeping emergency tariffs on imports.