@thecb/components 9.2.7-beta.9 → 9.2.9-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.
package/dist/index.esm.js CHANGED
@@ -13675,7 +13675,9 @@ 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"
13678
+ viewBox: "0 0 371 164",
13679
+ role: "img",
13680
+ "aria-label": "A check with the account number highlighted in the bottom center"
13679
13681
  }, /*#__PURE__*/React.createElement("g", {
13680
13682
  fill: "none",
13681
13683
  fillRule: "evenodd",
@@ -13756,7 +13758,9 @@ var RoutingNumberImage = function RoutingNumberImage() {
13756
13758
  xmlns: "http://www.w3.org/2000/svg",
13757
13759
  width: "371",
13758
13760
  height: "164",
13759
- viewBox: "0 0 371 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"
13760
13764
  }, /*#__PURE__*/React.createElement("g", {
13761
13765
  fill: "none",
13762
13766
  fillRule: "evenodd",
@@ -13839,7 +13843,9 @@ var CheckmarkIcon = function CheckmarkIcon() {
13839
13843
  viewBox: "0 0 98 98",
13840
13844
  version: "1.1",
13841
13845
  xmlns: "http://www.w3.org/2000/svg",
13842
- xmlnsXlink: "http://www.w3.org/1999/xlink"
13846
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
13847
+ role: "img",
13848
+ "aria-label": "Successful payment, green checkmark"
13843
13849
  }, /*#__PURE__*/React.createElement("g", {
13844
13850
  id: "Cityville-Checkout---Desktop---Logged-In",
13845
13851
  stroke: "none",
@@ -13884,7 +13890,9 @@ var BankIcon = function BankIcon() {
13884
13890
  height: "18",
13885
13891
  viewBox: "0 0 28 18",
13886
13892
  fill: "none",
13887
- xmlns: "http://www.w3.org/2000/svg"
13893
+ xmlns: "http://www.w3.org/2000/svg",
13894
+ role: "img",
13895
+ "aria-label": "Check Payment"
13888
13896
  }, /*#__PURE__*/React.createElement("path", {
13889
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",
13890
13898
  fill: "#E4F4FD"
@@ -13931,7 +13939,9 @@ var GenericCard = function GenericCard() {
13931
13939
  height: "18",
13932
13940
  viewBox: "0 0 28 18",
13933
13941
  fill: "none",
13934
- xmlns: "http://www.w3.org/2000/svg"
13942
+ xmlns: "http://www.w3.org/2000/svg",
13943
+ role: "img",
13944
+ "aria-label": "Card Payment"
13935
13945
  }, /*#__PURE__*/React.createElement("rect", {
13936
13946
  width: "28",
13937
13947
  height: "18",
@@ -23990,7 +24000,9 @@ var Dropdown = function Dropdown(_ref13) {
23990
24000
  }
23991
24001
 
23992
24002
  setFilteredOptions(options.filter(function (option) {
23993
- return option.value.toLowerCase().match(inputValue.toLowerCase()) || option.text.toLowerCase().match(inputValue.toLowerCase());
24003
+ var _option$value, _option$value$toLower, _option$text, _option$text$toLowerC;
24004
+
24005
+ return (option === null || option === void 0 ? void 0 : (_option$value = option.value) === null || _option$value === void 0 ? void 0 : (_option$value$toLower = _option$value.toLowerCase()) === null || _option$value$toLower === void 0 ? void 0 : _option$value$toLower.indexOf(inputValue === null || inputValue === void 0 ? void 0 : inputValue.toLowerCase())) >= 0 || ((_option$text = option.text) === null || _option$text === void 0 ? void 0 : (_option$text$toLowerC = _option$text.toLowerCase()) === null || _option$text$toLowerC === void 0 ? void 0 : _option$text$toLowerC.indexOf(inputValue === null || inputValue === void 0 ? void 0 : inputValue.toLowerCase())) >= 0;
23994
24006
  }));
23995
24007
  }, [inputValue]);
23996
24008
  useEffect$1(function () {
@@ -45743,9 +45755,7 @@ var Modal$1 = function Modal(_ref) {
45743
45755
  buttonExtraStyles = _ref.buttonExtraStyles,
45744
45756
  children = _ref.children,
45745
45757
  _ref$dataQa = _ref.dataQa,
45746
- dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
45747
- _ref$initialFocus = _ref.initialFocus,
45748
- initialFocus = _ref$initialFocus === void 0 ? null : _ref$initialFocus;
45758
+ dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
45749
45759
 
45750
45760
  var _useContext = useContext(ThemeContext),
45751
45761
  isMobile = _useContext.isMobile;
@@ -45755,7 +45765,7 @@ var Modal$1 = function Modal(_ref) {
45755
45765
  ref: modalContainerRef,
45756
45766
  "data-qa": dataQa
45757
45767
  }, modalOpen && /*#__PURE__*/React.createElement(reactAriaModal // fallback to resolve Jest unit test errors when tabbable doesn't exist in jsdom https://github.com/focus-trap/focus-trap-react/issues/91
45758
- , _extends({
45768
+ , {
45759
45769
  focusTrapOptions: {
45760
45770
  fallbackFocus: modalContainerRef === null || modalContainerRef === void 0 ? void 0 : modalContainerRef.current
45761
45771
  },
@@ -45769,14 +45779,11 @@ var Modal$1 = function Modal(_ref) {
45769
45779
  alignItems: "center"
45770
45780
  },
45771
45781
  dialogStyle: {
45772
- width: customWidth || "615px"
45782
+ width: customWidth || "615px",
45783
+ overflow: "auto"
45773
45784
  },
45774
- underlayClickExits: underlayClickExits,
45775
- "aria-modal": true,
45776
- "aria-name": modalHeaderText
45777
- }, initialFocus ? {
45778
- initialFocus: initialFocus
45779
- } : {}), /*#__PURE__*/React.createElement(Box, {
45785
+ underlayClickExits: underlayClickExits
45786
+ }, /*#__PURE__*/React.createElement(Box, {
45780
45787
  padding: "0",
45781
45788
  borderRadius: "2px",
45782
45789
  boxShadow: "inset 0px -2px 0px 0px rgb(0, 80, 149)"
@@ -45822,9 +45829,7 @@ var Modal$1 = function Modal(_ref) {
45822
45829
  text: cancelButtonText,
45823
45830
  dataQa: cancelButtonText,
45824
45831
  extraStyles: buttonExtraStyles,
45825
- className: "modal-cancel-button",
45826
- role: "button",
45827
- name: cancelButtonText
45832
+ className: "modal-cancel-button"
45828
45833
  })), /*#__PURE__*/React.createElement(Box, {
45829
45834
  width: "100%",
45830
45835
  padding: "0"
@@ -45836,9 +45841,7 @@ var Modal$1 = function Modal(_ref) {
45836
45841
  isLoading: isLoading,
45837
45842
  disabled: isContinueActionDisabled,
45838
45843
  extraStyles: buttonExtraStyles,
45839
- className: "modal-continue-button",
45840
- role: "button",
45841
- name: continueButtonText
45844
+ className: "modal-continue-button"
45842
45845
  }))) : /*#__PURE__*/React.createElement(Stack, {
45843
45846
  childGap: "1rem",
45844
45847
  direction: "row",
@@ -45849,9 +45852,7 @@ var Modal$1 = function Modal(_ref) {
45849
45852
  text: cancelButtonText,
45850
45853
  dataQa: cancelButtonText,
45851
45854
  extraStyles: buttonExtraStyles,
45852
- className: "modal-cancel-button",
45853
- role: "button",
45854
- name: cancelButtonText
45855
+ className: "modal-cancel-button"
45855
45856
  }), /*#__PURE__*/React.createElement(ButtonWithAction, {
45856
45857
  variant: useDangerButton ? "danger" : "primary",
45857
45858
  action: continueAction,
@@ -45860,9 +45861,7 @@ var Modal$1 = function Modal(_ref) {
45860
45861
  isLoading: isLoading,
45861
45862
  disabled: isContinueActionDisabled,
45862
45863
  extraStyles: buttonExtraStyles,
45863
- className: "modal-continue-button",
45864
- role: "button",
45865
- name: continueButtonText
45864
+ className: "modal-continue-button"
45866
45865
  }))) : /*#__PURE__*/React.createElement(Box, {
45867
45866
  padding: "0.5rem"
45868
45867
  }, /*#__PURE__*/React.createElement(ButtonWithAction, {
@@ -45871,9 +45870,7 @@ var Modal$1 = function Modal(_ref) {
45871
45870
  text: closeButtonText,
45872
45871
  dataQa: closeButtonText,
45873
45872
  extraStyles: buttonExtraStyles,
45874
- className: "modal-close-button",
45875
- role: "button",
45876
- name: closeButtonText
45873
+ className: "modal-close-button"
45877
45874
  }))))))))), children);
45878
45875
  };
45879
45876
 
@@ -47718,9 +47715,7 @@ var AccountAndRoutingModal = function AccountAndRoutingModal(_ref) {
47718
47715
  color: themeValues.linkColor,
47719
47716
  weight: themeValues.fontWeight,
47720
47717
  hoverStyles: themeValues.modalLinkHoverFocus,
47721
- extraStyles: "cursor: pointer;",
47722
- role: "button",
47723
- className: "modal-trigger"
47718
+ extraStyles: "cursor: pointer;"
47724
47719
  }, link));
47725
47720
  };
47726
47721
 
@@ -47777,10 +47772,8 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
47777
47772
  variant = _ref.variant,
47778
47773
  _ref$linkVariant = _ref.linkVariant,
47779
47774
  linkVariant = _ref$linkVariant === void 0 ? "p" : _ref$linkVariant,
47780
- themeValues = _ref.themeValues,
47781
- _ref$initialFocus = _ref.initialFocus,
47782
- initialFocus = _ref$initialFocus === void 0 ? null : _ref$initialFocus;
47783
- return /*#__PURE__*/React.createElement(Modal$1, _extends({
47775
+ themeValues = _ref.themeValues;
47776
+ return /*#__PURE__*/React.createElement(Modal$1, {
47784
47777
  modalOpen: isOpen,
47785
47778
  hideModal: function hideModal() {
47786
47779
  return toggleOpen(false);
@@ -47806,9 +47799,7 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
47806
47799
  toggleAccepted(true);
47807
47800
  toggleOpen(false);
47808
47801
  }
47809
- }, initialFocus ? {
47810
- initialFocus: initialFocus
47811
- } : {}), /*#__PURE__*/React.createElement(Text$1, {
47802
+ }, /*#__PURE__*/React.createElement(Text$1, {
47812
47803
  variant: linkVariant,
47813
47804
  onClick: function onClick() {
47814
47805
  return toggleOpen(true);
@@ -47820,9 +47811,7 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
47820
47811
  color: themeValues.linkColor,
47821
47812
  weight: themeValues.fontWeight,
47822
47813
  hoverStyles: themeValues.modalLinkHoverFocus,
47823
- extraStyles: "display: inline-block; width: fit-content; cursor: pointer",
47824
- role: "button",
47825
- className: "modal-trigger"
47814
+ extraStyles: "display: inline-block; width: fit-content; cursor: pointer"
47826
47815
  }, link));
47827
47816
  };
47828
47817
 
@@ -47857,8 +47846,7 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
47857
47846
  terms: terms,
47858
47847
  isOpen: showTerms,
47859
47848
  toggleOpen: toggleShowTerms,
47860
- linkVariant: linkVariant,
47861
- initialFocus: "[role=\"button\"]:not(.modal-trigger)"
47849
+ linkVariant: linkVariant
47862
47850
  })))));
47863
47851
  };
47864
47852
 
@@ -47941,8 +47929,7 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
47941
47929
  isOpen: showTerms,
47942
47930
  toggleOpen: toggleTerms,
47943
47931
  linkVariant: modalVariant,
47944
- title: modalTitle,
47945
- initialFocus: ".modal-close-button"
47932
+ title: modalTitle
47946
47933
  })), /*#__PURE__*/React.createElement("div", {
47947
47934
  "aria-live": "polite",
47948
47935
  "aria-atomic": true