The PM says she was "surprised" by the foreign secretary's resignation after the cabinet had backed her Brexit plan.