The shadow chancellor says the prime minister has gone wrong in trying to push her deal for Brexit when she should have sought a cross-party compromise.