@thecb/components 9.2.9 → 9.2.10-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/dist/index.cjs.js +55 -34
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +55 -34
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/src/apps/checkout/pages/payment/sub-pages/payment-amount/PaymentAmount_old.js +49322 -0
  6. package/package.json +1 -1
  7. package/src/.DS_Store +0 -0
  8. package/src/components/.DS_Store +0 -0
  9. package/src/components/atoms/.DS_Store +0 -0
  10. package/src/components/atoms/icons/.DS_Store +0 -0
  11. package/src/components/atoms/icons/AccountNumberImage.js +0 -2
  12. package/src/components/atoms/icons/BankIcon.js +0 -2
  13. package/src/components/atoms/icons/CheckmarkIcon.js +0 -2
  14. package/src/components/atoms/icons/GenericCard.js +0 -2
  15. package/src/components/atoms/icons/GenericCardLarge.js +0 -2
  16. package/src/components/atoms/icons/RoutingNumberImage.js +0 -2
  17. package/src/components/molecules/account-and-routing-modal/AccountAndRoutingModal.js +2 -0
  18. package/src/components/molecules/modal/Modal.js +17 -1
  19. package/src/components/molecules/terms-and-conditions/TermsAndConditions.js +6 -1
  20. package/src/components/molecules/terms-and-conditions/TermsAndConditions.stories.js +10 -2
  21. package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV1.js +3 -1
  22. package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV2.js +3 -1
  23. package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.js +5 -1
  24. package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.stories.js +8 -3
package/dist/index.esm.js CHANGED
@@ -13675,9 +13675,7 @@ var AccountNumberImage = function AccountNumberImage() {
13675
13675
  xmlns: "http://www.w3.org/2000/svg",
13676
13676
  width: "371",
13677
13677
  height: "164",
13678
- viewBox: "0 0 371 164",
13679
- role: "img",
13680
- "aria-label": "A check with the account number highlighted in the bottom center"
13678
+ viewBox: "0 0 371 164"
13681
13679
  }, /*#__PURE__*/React.createElement("g", {
13682
13680
  fill: "none",
13683
13681
  fillRule: "evenodd",
@@ -13758,9 +13756,7 @@ var RoutingNumberImage = function RoutingNumberImage() {
13758
13756
  xmlns: "http://www.w3.org/2000/svg",
13759
13757
  width: "371",
13760
13758
  height: "164",
13761
- viewBox: "0 0 371 164",
13762
- role: "img",
13763
- "aria-label": "A check with the routing number highlighted in the lower left hand corner"
13759
+ viewBox: "0 0 371 164"
13764
13760
  }, /*#__PURE__*/React.createElement("g", {
13765
13761
  fill: "none",
13766
13762
  fillRule: "evenodd",
@@ -13843,9 +13839,7 @@ var CheckmarkIcon = function CheckmarkIcon() {
13843
13839
  viewBox: "0 0 98 98",
13844
13840
  version: "1.1",
13845
13841
  xmlns: "http://www.w3.org/2000/svg",
13846
- xmlnsXlink: "http://www.w3.org/1999/xlink",
13847
- role: "img",
13848
- "aria-label": "Successful payment, green checkmark"
13842
+ xmlnsXlink: "http://www.w3.org/1999/xlink"
13849
13843
  }, /*#__PURE__*/React.createElement("g", {
13850
13844
  id: "Cityville-Checkout---Desktop---Logged-In",
13851
13845
  stroke: "none",
@@ -13890,9 +13884,7 @@ var BankIcon = function BankIcon() {
13890
13884
  height: "18",
13891
13885
  viewBox: "0 0 28 18",
13892
13886
  fill: "none",
13893
- xmlns: "http://www.w3.org/2000/svg",
13894
- role: "img",
13895
- "aria-label": "Check Payment"
13887
+ xmlns: "http://www.w3.org/2000/svg"
13896
13888
  }, /*#__PURE__*/React.createElement("path", {
13897
13889
  d: "M0 2.25C0 1.00736 1.04467 0 2.33333 0H25.6667C26.9553 0 28 1.00736 28 2.25V15.75C28 16.9926 26.9553 18 25.6667 18H2.33333C1.04467 18 0 16.9926 0 15.75V2.25Z",
13898
13890
  fill: "#E4F4FD"
@@ -13939,9 +13931,7 @@ var GenericCard = function GenericCard() {
13939
13931
  height: "18",
13940
13932
  viewBox: "0 0 28 18",
13941
13933
  fill: "none",
13942
- xmlns: "http://www.w3.org/2000/svg",
13943
- role: "img",
13944
- "aria-label": "Card Payment"
13934
+ xmlns: "http://www.w3.org/2000/svg"
13945
13935
  }, /*#__PURE__*/React.createElement("rect", {
13946
13936
  width: "28",
13947
13937
  height: "18",
@@ -15200,9 +15190,7 @@ var GenericCardLarge = function GenericCardLarge() {
15200
15190
  height: "24",
15201
15191
  viewBox: "0 0 36 24",
15202
15192
  fill: "none",
15203
- xmlns: "http://www.w3.org/2000/svg",
15204
- role: "img",
15205
- "aria-label": "Card Payment"
15193
+ xmlns: "http://www.w3.org/2000/svg"
15206
15194
  }, /*#__PURE__*/React.createElement("rect", {
15207
15195
  width: "36",
15208
15196
  height: "24",
@@ -45757,7 +45745,11 @@ var Modal$1 = function Modal(_ref) {
45757
45745
  buttonExtraStyles = _ref.buttonExtraStyles,
45758
45746
  children = _ref.children,
45759
45747
  _ref$dataQa = _ref.dataQa,
45760
- dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
45748
+ dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
45749
+ _ref$initialFocusSele = _ref.initialFocusSelector,
45750
+ initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele,
45751
+ _ref$modalName = _ref.modalName,
45752
+ modalName = _ref$modalName === void 0 ? "" : _ref$modalName;
45761
45753
 
45762
45754
  var _useContext = useContext(ThemeContext),
45763
45755
  isMobile = _useContext.isMobile;
@@ -45784,7 +45776,10 @@ var Modal$1 = function Modal(_ref) {
45784
45776
  width: customWidth || "615px",
45785
45777
  overflow: "auto"
45786
45778
  },
45787
- underlayClickExits: underlayClickExits
45779
+ underlayClickExits: underlayClickExits,
45780
+ "aria-modal": true,
45781
+ "aria-name": !!modalName.length ? modalName : modalHeaderText,
45782
+ initialFocus: initialFocusSelector
45788
45783
  }, /*#__PURE__*/React.createElement(Box, {
45789
45784
  padding: "0",
45790
45785
  borderRadius: "2px",
@@ -45831,7 +45826,9 @@ var Modal$1 = function Modal(_ref) {
45831
45826
  text: cancelButtonText,
45832
45827
  dataQa: cancelButtonText,
45833
45828
  extraStyles: buttonExtraStyles,
45834
- className: "modal-cancel-button"
45829
+ className: "modal-cancel-button",
45830
+ role: "button",
45831
+ name: cancelButtonText
45835
45832
  })), /*#__PURE__*/React.createElement(Box, {
45836
45833
  width: "100%",
45837
45834
  padding: "0"
@@ -45843,7 +45840,9 @@ var Modal$1 = function Modal(_ref) {
45843
45840
  isLoading: isLoading,
45844
45841
  disabled: isContinueActionDisabled,
45845
45842
  extraStyles: buttonExtraStyles,
45846
- className: "modal-continue-button"
45843
+ className: "modal-continue-button",
45844
+ role: "button",
45845
+ name: continueButtonText
45847
45846
  }))) : /*#__PURE__*/React.createElement(Stack, {
45848
45847
  childGap: "1rem",
45849
45848
  direction: "row",
@@ -45854,7 +45853,9 @@ var Modal$1 = function Modal(_ref) {
45854
45853
  text: cancelButtonText,
45855
45854
  dataQa: cancelButtonText,
45856
45855
  extraStyles: buttonExtraStyles,
45857
- className: "modal-cancel-button"
45856
+ className: "modal-cancel-button",
45857
+ role: "button",
45858
+ name: cancelButtonText
45858
45859
  }), /*#__PURE__*/React.createElement(ButtonWithAction, {
45859
45860
  variant: useDangerButton ? "danger" : "primary",
45860
45861
  action: continueAction,
@@ -45863,7 +45864,9 @@ var Modal$1 = function Modal(_ref) {
45863
45864
  isLoading: isLoading,
45864
45865
  disabled: isContinueActionDisabled,
45865
45866
  extraStyles: buttonExtraStyles,
45866
- className: "modal-continue-button"
45867
+ className: "modal-continue-button",
45868
+ role: "button",
45869
+ name: continueButtonText
45867
45870
  }))) : /*#__PURE__*/React.createElement(Box, {
45868
45871
  padding: "0.5rem"
45869
45872
  }, /*#__PURE__*/React.createElement(ButtonWithAction, {
@@ -45872,7 +45875,9 @@ var Modal$1 = function Modal(_ref) {
45872
45875
  text: closeButtonText,
45873
45876
  dataQa: closeButtonText,
45874
45877
  extraStyles: buttonExtraStyles,
45875
- className: "modal-close-button"
45878
+ className: "modal-close-button",
45879
+ role: "button",
45880
+ name: closeButtonText
45876
45881
  }))))))))), children);
45877
45882
  };
45878
45883
 
@@ -47717,7 +47722,9 @@ var AccountAndRoutingModal = function AccountAndRoutingModal(_ref) {
47717
47722
  color: themeValues.linkColor,
47718
47723
  weight: themeValues.fontWeight,
47719
47724
  hoverStyles: themeValues.modalLinkHoverFocus,
47720
- extraStyles: "cursor: pointer;"
47725
+ extraStyles: "cursor: pointer;",
47726
+ role: "button",
47727
+ className: "modal-trigger"
47721
47728
  }, link));
47722
47729
  };
47723
47730
 
@@ -47774,7 +47781,9 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
47774
47781
  variant = _ref.variant,
47775
47782
  _ref$linkVariant = _ref.linkVariant,
47776
47783
  linkVariant = _ref$linkVariant === void 0 ? "p" : _ref$linkVariant,
47777
- themeValues = _ref.themeValues;
47784
+ themeValues = _ref.themeValues,
47785
+ _ref$initialFocusSele = _ref.initialFocusSelector,
47786
+ initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele;
47778
47787
  return /*#__PURE__*/React.createElement(Modal$1, {
47779
47788
  modalOpen: isOpen,
47780
47789
  hideModal: function hideModal() {
@@ -47800,7 +47809,8 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
47800
47809
  continueAction: function continueAction() {
47801
47810
  toggleAccepted(true);
47802
47811
  toggleOpen(false);
47803
- }
47812
+ },
47813
+ initialFocusSelector: initialFocusSelector
47804
47814
  }, /*#__PURE__*/React.createElement(Text$1, {
47805
47815
  variant: linkVariant,
47806
47816
  onClick: function onClick() {
@@ -47813,7 +47823,10 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
47813
47823
  color: themeValues.linkColor,
47814
47824
  weight: themeValues.fontWeight,
47815
47825
  hoverStyles: themeValues.modalLinkHoverFocus,
47816
- extraStyles: "display: inline-block; width: fit-content; cursor: pointer"
47826
+ extraStyles: "display: inline-block; width: fit-content; cursor: pointer",
47827
+ role: "button" // This should always be a "button" since it opens a modal
47828
+ ,
47829
+ className: "modal-trigger"
47817
47830
  }, link));
47818
47831
  };
47819
47832
 
@@ -47826,7 +47839,9 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
47826
47839
  terms = _ref.terms,
47827
47840
  _ref$error = _ref.error,
47828
47841
  error = _ref$error === void 0 ? false : _ref$error,
47829
- linkVariant = _ref.linkVariant;
47842
+ linkVariant = _ref.linkVariant,
47843
+ _ref$initialFocusSele = _ref.initialFocusSelector,
47844
+ initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele;
47830
47845
 
47831
47846
  var _useState = useState(false),
47832
47847
  _useState2 = _slicedToArray(_useState, 2),
@@ -47848,7 +47863,8 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
47848
47863
  terms: terms,
47849
47864
  isOpen: showTerms,
47850
47865
  toggleOpen: toggleShowTerms,
47851
- linkVariant: linkVariant
47866
+ linkVariant: linkVariant,
47867
+ initialFocusSelector: initialFocusSelector
47852
47868
  })))));
47853
47869
  };
47854
47870
 
@@ -47877,7 +47893,9 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
47877
47893
  _ref$checkboxMargin = _ref.checkboxMargin,
47878
47894
  checkboxMargin = _ref$checkboxMargin === void 0 ? "4px 8px 4px 4px" : _ref$checkboxMargin,
47879
47895
  _ref$modalTitle = _ref.modalTitle,
47880
- modalTitle = _ref$modalTitle === void 0 ? "Terms and Conditions" : _ref$modalTitle;
47896
+ modalTitle = _ref$modalTitle === void 0 ? "Terms and Conditions" : _ref$modalTitle,
47897
+ _ref$initialFocusSele = _ref.initialFocusSelector,
47898
+ initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele;
47881
47899
 
47882
47900
  var _useState = useState(false),
47883
47901
  _useState2 = _slicedToArray(_useState, 2),
@@ -47931,7 +47949,8 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
47931
47949
  isOpen: showTerms,
47932
47950
  toggleOpen: toggleTerms,
47933
47951
  linkVariant: modalVariant,
47934
- title: modalTitle
47952
+ title: modalTitle,
47953
+ initialFocusSelector: initialFocusSelector
47935
47954
  })), /*#__PURE__*/React.createElement("div", {
47936
47955
  "aria-live": "polite",
47937
47956
  "aria-atomic": true
@@ -47950,7 +47969,9 @@ var TermsAndConditions = function TermsAndConditions(_ref) {
47950
47969
  rest = _objectWithoutProperties(_ref, _excluded$y);
47951
47970
 
47952
47971
  var TermsAndConditionsControl = version === "v1" ? TermsAndConditionsControlV1 : TermsAndConditionsControlV2;
47953
- return /*#__PURE__*/React.createElement(TermsAndConditionsControl, rest);
47972
+ return /*#__PURE__*/React.createElement(TermsAndConditionsControl, _extends({
47973
+ initialFocusSelector: "[role='button']:not(.modal-trigger)"
47974
+ }, rest));
47954
47975
  };
47955
47976
 
47956
47977
  var PaymentFormACH = function PaymentFormACH(_ref) {