@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.cjs.js CHANGED
@@ -13683,9 +13683,7 @@ var AccountNumberImage = function AccountNumberImage() {
13683
13683
  xmlns: "http://www.w3.org/2000/svg",
13684
13684
  width: "371",
13685
13685
  height: "164",
13686
- viewBox: "0 0 371 164",
13687
- role: "img",
13688
- "aria-label": "A check with the account number highlighted in the bottom center"
13686
+ viewBox: "0 0 371 164"
13689
13687
  }, /*#__PURE__*/React__default.createElement("g", {
13690
13688
  fill: "none",
13691
13689
  fillRule: "evenodd",
@@ -13766,9 +13764,7 @@ var RoutingNumberImage = function RoutingNumberImage() {
13766
13764
  xmlns: "http://www.w3.org/2000/svg",
13767
13765
  width: "371",
13768
13766
  height: "164",
13769
- viewBox: "0 0 371 164",
13770
- role: "img",
13771
- "aria-label": "A check with the routing number highlighted in the lower left hand corner"
13767
+ viewBox: "0 0 371 164"
13772
13768
  }, /*#__PURE__*/React__default.createElement("g", {
13773
13769
  fill: "none",
13774
13770
  fillRule: "evenodd",
@@ -13851,9 +13847,7 @@ var CheckmarkIcon = function CheckmarkIcon() {
13851
13847
  viewBox: "0 0 98 98",
13852
13848
  version: "1.1",
13853
13849
  xmlns: "http://www.w3.org/2000/svg",
13854
- xmlnsXlink: "http://www.w3.org/1999/xlink",
13855
- role: "img",
13856
- "aria-label": "Successful payment, green checkmark"
13850
+ xmlnsXlink: "http://www.w3.org/1999/xlink"
13857
13851
  }, /*#__PURE__*/React__default.createElement("g", {
13858
13852
  id: "Cityville-Checkout---Desktop---Logged-In",
13859
13853
  stroke: "none",
@@ -13898,9 +13892,7 @@ var BankIcon = function BankIcon() {
13898
13892
  height: "18",
13899
13893
  viewBox: "0 0 28 18",
13900
13894
  fill: "none",
13901
- xmlns: "http://www.w3.org/2000/svg",
13902
- role: "img",
13903
- "aria-label": "Check Payment"
13895
+ xmlns: "http://www.w3.org/2000/svg"
13904
13896
  }, /*#__PURE__*/React__default.createElement("path", {
13905
13897
  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",
13906
13898
  fill: "#E4F4FD"
@@ -13947,9 +13939,7 @@ var GenericCard = function GenericCard() {
13947
13939
  height: "18",
13948
13940
  viewBox: "0 0 28 18",
13949
13941
  fill: "none",
13950
- xmlns: "http://www.w3.org/2000/svg",
13951
- role: "img",
13952
- "aria-label": "Card Payment"
13942
+ xmlns: "http://www.w3.org/2000/svg"
13953
13943
  }, /*#__PURE__*/React__default.createElement("rect", {
13954
13944
  width: "28",
13955
13945
  height: "18",
@@ -15208,9 +15198,7 @@ var GenericCardLarge = function GenericCardLarge() {
15208
15198
  height: "24",
15209
15199
  viewBox: "0 0 36 24",
15210
15200
  fill: "none",
15211
- xmlns: "http://www.w3.org/2000/svg",
15212
- role: "img",
15213
- "aria-label": "Card Payment"
15201
+ xmlns: "http://www.w3.org/2000/svg"
15214
15202
  }, /*#__PURE__*/React__default.createElement("rect", {
15215
15203
  width: "36",
15216
15204
  height: "24",
@@ -45765,7 +45753,11 @@ var Modal$1 = function Modal(_ref) {
45765
45753
  buttonExtraStyles = _ref.buttonExtraStyles,
45766
45754
  children = _ref.children,
45767
45755
  _ref$dataQa = _ref.dataQa,
45768
- dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
45756
+ dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
45757
+ _ref$initialFocusSele = _ref.initialFocusSelector,
45758
+ initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele,
45759
+ _ref$modalName = _ref.modalName,
45760
+ modalName = _ref$modalName === void 0 ? "" : _ref$modalName;
45769
45761
 
45770
45762
  var _useContext = React.useContext(styled.ThemeContext),
45771
45763
  isMobile = _useContext.isMobile;
@@ -45792,7 +45784,10 @@ var Modal$1 = function Modal(_ref) {
45792
45784
  width: customWidth || "615px",
45793
45785
  overflow: "auto"
45794
45786
  },
45795
- underlayClickExits: underlayClickExits
45787
+ underlayClickExits: underlayClickExits,
45788
+ "aria-modal": true,
45789
+ "aria-name": !!modalName.length ? modalName : modalHeaderText,
45790
+ initialFocus: initialFocusSelector
45796
45791
  }, /*#__PURE__*/React__default.createElement(Box, {
45797
45792
  padding: "0",
45798
45793
  borderRadius: "2px",
@@ -45839,7 +45834,9 @@ var Modal$1 = function Modal(_ref) {
45839
45834
  text: cancelButtonText,
45840
45835
  dataQa: cancelButtonText,
45841
45836
  extraStyles: buttonExtraStyles,
45842
- className: "modal-cancel-button"
45837
+ className: "modal-cancel-button",
45838
+ role: "button",
45839
+ name: cancelButtonText
45843
45840
  })), /*#__PURE__*/React__default.createElement(Box, {
45844
45841
  width: "100%",
45845
45842
  padding: "0"
@@ -45851,7 +45848,9 @@ var Modal$1 = function Modal(_ref) {
45851
45848
  isLoading: isLoading,
45852
45849
  disabled: isContinueActionDisabled,
45853
45850
  extraStyles: buttonExtraStyles,
45854
- className: "modal-continue-button"
45851
+ className: "modal-continue-button",
45852
+ role: "button",
45853
+ name: continueButtonText
45855
45854
  }))) : /*#__PURE__*/React__default.createElement(Stack, {
45856
45855
  childGap: "1rem",
45857
45856
  direction: "row",
@@ -45862,7 +45861,9 @@ var Modal$1 = function Modal(_ref) {
45862
45861
  text: cancelButtonText,
45863
45862
  dataQa: cancelButtonText,
45864
45863
  extraStyles: buttonExtraStyles,
45865
- className: "modal-cancel-button"
45864
+ className: "modal-cancel-button",
45865
+ role: "button",
45866
+ name: cancelButtonText
45866
45867
  }), /*#__PURE__*/React__default.createElement(ButtonWithAction, {
45867
45868
  variant: useDangerButton ? "danger" : "primary",
45868
45869
  action: continueAction,
@@ -45871,7 +45872,9 @@ var Modal$1 = function Modal(_ref) {
45871
45872
  isLoading: isLoading,
45872
45873
  disabled: isContinueActionDisabled,
45873
45874
  extraStyles: buttonExtraStyles,
45874
- className: "modal-continue-button"
45875
+ className: "modal-continue-button",
45876
+ role: "button",
45877
+ name: continueButtonText
45875
45878
  }))) : /*#__PURE__*/React__default.createElement(Box, {
45876
45879
  padding: "0.5rem"
45877
45880
  }, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
@@ -45880,7 +45883,9 @@ var Modal$1 = function Modal(_ref) {
45880
45883
  text: closeButtonText,
45881
45884
  dataQa: closeButtonText,
45882
45885
  extraStyles: buttonExtraStyles,
45883
- className: "modal-close-button"
45886
+ className: "modal-close-button",
45887
+ role: "button",
45888
+ name: closeButtonText
45884
45889
  }))))))))), children);
45885
45890
  };
45886
45891
 
@@ -47725,7 +47730,9 @@ var AccountAndRoutingModal = function AccountAndRoutingModal(_ref) {
47725
47730
  color: themeValues.linkColor,
47726
47731
  weight: themeValues.fontWeight,
47727
47732
  hoverStyles: themeValues.modalLinkHoverFocus,
47728
- extraStyles: "cursor: pointer;"
47733
+ extraStyles: "cursor: pointer;",
47734
+ role: "button",
47735
+ className: "modal-trigger"
47729
47736
  }, link));
47730
47737
  };
47731
47738
 
@@ -47782,7 +47789,9 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
47782
47789
  variant = _ref.variant,
47783
47790
  _ref$linkVariant = _ref.linkVariant,
47784
47791
  linkVariant = _ref$linkVariant === void 0 ? "p" : _ref$linkVariant,
47785
- themeValues = _ref.themeValues;
47792
+ themeValues = _ref.themeValues,
47793
+ _ref$initialFocusSele = _ref.initialFocusSelector,
47794
+ initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele;
47786
47795
  return /*#__PURE__*/React__default.createElement(Modal$1, {
47787
47796
  modalOpen: isOpen,
47788
47797
  hideModal: function hideModal() {
@@ -47808,7 +47817,8 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
47808
47817
  continueAction: function continueAction() {
47809
47818
  toggleAccepted(true);
47810
47819
  toggleOpen(false);
47811
- }
47820
+ },
47821
+ initialFocusSelector: initialFocusSelector
47812
47822
  }, /*#__PURE__*/React__default.createElement(Text$1, {
47813
47823
  variant: linkVariant,
47814
47824
  onClick: function onClick() {
@@ -47821,7 +47831,10 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
47821
47831
  color: themeValues.linkColor,
47822
47832
  weight: themeValues.fontWeight,
47823
47833
  hoverStyles: themeValues.modalLinkHoverFocus,
47824
- extraStyles: "display: inline-block; width: fit-content; cursor: pointer"
47834
+ extraStyles: "display: inline-block; width: fit-content; cursor: pointer",
47835
+ role: "button" // This should always be a "button" since it opens a modal
47836
+ ,
47837
+ className: "modal-trigger"
47825
47838
  }, link));
47826
47839
  };
47827
47840
 
@@ -47834,7 +47847,9 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
47834
47847
  terms = _ref.terms,
47835
47848
  _ref$error = _ref.error,
47836
47849
  error = _ref$error === void 0 ? false : _ref$error,
47837
- linkVariant = _ref.linkVariant;
47850
+ linkVariant = _ref.linkVariant,
47851
+ _ref$initialFocusSele = _ref.initialFocusSelector,
47852
+ initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele;
47838
47853
 
47839
47854
  var _useState = React.useState(false),
47840
47855
  _useState2 = _slicedToArray(_useState, 2),
@@ -47856,7 +47871,8 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
47856
47871
  terms: terms,
47857
47872
  isOpen: showTerms,
47858
47873
  toggleOpen: toggleShowTerms,
47859
- linkVariant: linkVariant
47874
+ linkVariant: linkVariant,
47875
+ initialFocusSelector: initialFocusSelector
47860
47876
  })))));
47861
47877
  };
47862
47878
 
@@ -47885,7 +47901,9 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
47885
47901
  _ref$checkboxMargin = _ref.checkboxMargin,
47886
47902
  checkboxMargin = _ref$checkboxMargin === void 0 ? "4px 8px 4px 4px" : _ref$checkboxMargin,
47887
47903
  _ref$modalTitle = _ref.modalTitle,
47888
- modalTitle = _ref$modalTitle === void 0 ? "Terms and Conditions" : _ref$modalTitle;
47904
+ modalTitle = _ref$modalTitle === void 0 ? "Terms and Conditions" : _ref$modalTitle,
47905
+ _ref$initialFocusSele = _ref.initialFocusSelector,
47906
+ initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele;
47889
47907
 
47890
47908
  var _useState = React.useState(false),
47891
47909
  _useState2 = _slicedToArray(_useState, 2),
@@ -47939,7 +47957,8 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
47939
47957
  isOpen: showTerms,
47940
47958
  toggleOpen: toggleTerms,
47941
47959
  linkVariant: modalVariant,
47942
- title: modalTitle
47960
+ title: modalTitle,
47961
+ initialFocusSelector: initialFocusSelector
47943
47962
  })), /*#__PURE__*/React__default.createElement("div", {
47944
47963
  "aria-live": "polite",
47945
47964
  "aria-atomic": true
@@ -47958,7 +47977,9 @@ var TermsAndConditions = function TermsAndConditions(_ref) {
47958
47977
  rest = _objectWithoutProperties(_ref, _excluded$y);
47959
47978
 
47960
47979
  var TermsAndConditionsControl = version === "v1" ? TermsAndConditionsControlV1 : TermsAndConditionsControlV2;
47961
- return /*#__PURE__*/React__default.createElement(TermsAndConditionsControl, rest);
47980
+ return /*#__PURE__*/React__default.createElement(TermsAndConditionsControl, _extends({
47981
+ initialFocusSelector: "[role='button']:not(.modal-trigger)"
47982
+ }, rest));
47962
47983
  };
47963
47984
 
47964
47985
  var PaymentFormACH = function PaymentFormACH(_ref) {