@thecb/components 8.4.11-beta.2 → 8.4.11-beta.4

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.cjs.js CHANGED
@@ -18818,7 +18818,8 @@ var Alert = function Alert(_ref) {
18818
18818
  borderColor: themeValues.border,
18819
18819
  borderSize: noBorder ? "0px" : "1px",
18820
18820
  boxShadow: enableBoxShadow ? (_generateShadows = generateShadows()) === null || _generateShadows === void 0 ? void 0 : (_generateShadows$inse = _generateShadows.inset) === null || _generateShadows$inse === void 0 ? void 0 : _generateShadows$inse.base : "",
18821
- extraStyles: extraStyles
18821
+ extraStyles: extraStyles,
18822
+ role: "alert"
18822
18823
  }, maxContentWidth ? /*#__PURE__*/React__default.createElement(Center, {
18823
18824
  maxWidth: maxContentWidth
18824
18825
  }, content) : content);
@@ -22150,7 +22151,7 @@ var Checkbox = function Checkbox(_ref4) {
22150
22151
  onChange: onChange,
22151
22152
  tabIndex: "-1",
22152
22153
  "aria-invalid": error,
22153
- "aria-describedBy": error ? "".concat(name, "-error-message") : ""
22154
+ "aria-describedby": error ? "".concat(name, "-error-message") : ""
22154
22155
  }), /*#__PURE__*/React__default.createElement(StyledCheckbox, {
22155
22156
  error: error,
22156
22157
  disabled: disabled,
@@ -23993,8 +23994,6 @@ var Dropdown = function Dropdown(_ref8) {
23993
23994
  "aria-describedby": ariaDescribedby,
23994
23995
  "aria-expanded": isOpen,
23995
23996
  "aria-live": "assertive",
23996
- role: "combobox",
23997
- disabled: disabled,
23998
23997
  autoComplete: autocompleteValue,
23999
23998
  background: isOpen ? themeValues.hoverColor : WHITE,
24000
23999
  borderRadius: "2px",
@@ -24045,7 +24044,7 @@ var Dropdown = function Dropdown(_ref8) {
24045
24044
  id: focusedRef === optionRefs.current[i] ? "focused_option" : choice.value,
24046
24045
  key: choice.value,
24047
24046
  ref: optionRefs.current[i],
24048
- tabIndex: 0,
24047
+ tabIndex: -1,
24049
24048
  onClick: function onClick(e) {
24050
24049
  return handleItemSelection(e, choice, i);
24051
24050
  },
@@ -24157,8 +24156,6 @@ var fallbackValues$g = {
24157
24156
  hoverFocusStyles: hoverFocusStyles
24158
24157
  };
24159
24158
 
24160
- var _excluded$o = ["fieldActions", "labelTextWhenNoError", "errorMessages", "options", "field", "showErrors", "onChange", "dropdownMaxHeight", "disabledValues", "disabled", "themeValues", "hasTitles", "autocompleteValue", "smoothScroll"];
24161
-
24162
24159
  var FormSelect = function FormSelect(_ref) {
24163
24160
  var fieldActions = _ref.fieldActions,
24164
24161
  labelTextWhenNoError = _ref.labelTextWhenNoError,
@@ -24175,8 +24172,7 @@ var FormSelect = function FormSelect(_ref) {
24175
24172
  hasTitles = _ref$hasTitles === void 0 ? false : _ref$hasTitles,
24176
24173
  autocompleteValue = _ref.autocompleteValue,
24177
24174
  _ref$smoothScroll = _ref.smoothScroll,
24178
- smoothScroll = _ref$smoothScroll === void 0 ? true : _ref$smoothScroll,
24179
- rest = _objectWithoutProperties(_ref, _excluded$o);
24175
+ smoothScroll = _ref$smoothScroll === void 0 ? true : _ref$smoothScroll;
24180
24176
 
24181
24177
  var _useState = React.useState(false),
24182
24178
  _useState2 = _slicedToArray(_useState, 2),
@@ -24197,10 +24193,10 @@ var FormSelect = function FormSelect(_ref) {
24197
24193
  document.removeEventListener("mousedown", handleClickAway);
24198
24194
  };
24199
24195
  });
24200
- return /*#__PURE__*/React__default.createElement(SelectContainer, _extends({
24196
+ return /*#__PURE__*/React__default.createElement(SelectContainer, {
24201
24197
  ref: dropdownRef,
24202
24198
  disabled: disabled
24203
- }, rest), /*#__PURE__*/React__default.createElement(Box, {
24199
+ }, /*#__PURE__*/React__default.createElement(Box, {
24204
24200
  padding: "0",
24205
24201
  minWidth: "100%"
24206
24202
  }, /*#__PURE__*/React__default.createElement(Cluster, {
@@ -24214,8 +24210,8 @@ var FormSelect = function FormSelect(_ref) {
24214
24210
  extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
24215
24211
  id: createIdFromString(labelTextWhenNoError)
24216
24212
  }, labelTextWhenNoError))), /*#__PURE__*/React__default.createElement(Dropdown$1, {
24217
- "aria-labelledBy": createIdFromString(labelTextWhenNoError),
24218
- "aria-describedBy": createIdFromString(labelTextWhenNoError, "error message"),
24213
+ ariaLabelledby: createIdFromString(labelTextWhenNoError),
24214
+ ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
24219
24215
  maxHeight: dropdownMaxHeight,
24220
24216
  hasTitles: hasTitles,
24221
24217
  placeholder: options[0] ? options[0].text : "",
@@ -24232,14 +24228,13 @@ var FormSelect = function FormSelect(_ref) {
24232
24228
  onClick: function onClick() {
24233
24229
  return setOpen(!open);
24234
24230
  },
24235
- "aria-disabled": disabled,
24231
+ disabled: disabled,
24236
24232
  autocompleteValue: autocompleteValue,
24237
24233
  smoothScroll: smoothScroll,
24238
24234
  required: options.required
24239
24235
  }), /*#__PURE__*/React__default.createElement(Stack, {
24240
24236
  direction: "row",
24241
- justify: "space-between",
24242
- "aria-live": "assertive"
24237
+ justify: "space-between"
24243
24238
  }, /*#__PURE__*/React__default.createElement(Text$1, {
24244
24239
  color: ERROR_COLOR,
24245
24240
  variant: "pXS",
@@ -24995,7 +24990,7 @@ var options = [{
24995
24990
  value: "ZW"
24996
24991
  }];
24997
24992
 
24998
- var _excluded$p = ["labelTextWhenNoError", "errorMessages", "field", "fieldActions", "showErrors", "onChange"];
24993
+ var _excluded$o = ["labelTextWhenNoError", "errorMessages", "field", "fieldActions", "showErrors", "onChange"];
24999
24994
 
25000
24995
  var CountryDropdown = function CountryDropdown(_ref) {
25001
24996
  var labelTextWhenNoError = _ref.labelTextWhenNoError,
@@ -25004,7 +24999,7 @@ var CountryDropdown = function CountryDropdown(_ref) {
25004
24999
  fieldActions = _ref.fieldActions,
25005
25000
  showErrors = _ref.showErrors,
25006
25001
  onChange = _ref.onChange,
25007
- rest = _objectWithoutProperties(_ref, _excluded$p);
25002
+ rest = _objectWithoutProperties(_ref, _excluded$o);
25008
25003
 
25009
25004
  return /*#__PURE__*/React__default.createElement(FormSelect$1, _extends({
25010
25005
  options: options,
@@ -25014,8 +25009,7 @@ var CountryDropdown = function CountryDropdown(_ref) {
25014
25009
  errorMessages: errorMessages,
25015
25010
  showErrors: showErrors,
25016
25011
  onChange: onChange,
25017
- autocompleteValue: "country-name",
25018
- autoComplete: "country-name"
25012
+ autocompleteValue: "country-name"
25019
25013
  }, rest));
25020
25014
  };
25021
25015
 
@@ -25082,7 +25076,7 @@ var mobileFallbackValues$1 = {
25082
25076
  };
25083
25077
  var MOBILE_BREAKPOINT$1 = 768;
25084
25078
 
25085
- var _excluded$q = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
25079
+ var _excluded$p = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
25086
25080
  /*
25087
25081
  New responsive text component for Detail elements
25088
25082
  (Block level text elements which are smaller than "Title" elements)
@@ -25132,7 +25126,7 @@ var Detail = function Detail(_ref) {
25132
25126
  as = _ref$as === void 0 ? "p" : _ref$as,
25133
25127
  dataQa = _ref.dataQa,
25134
25128
  children = _ref.children,
25135
- rest = _objectWithoutProperties(_ref, _excluded$q);
25129
+ rest = _objectWithoutProperties(_ref, _excluded$p);
25136
25130
 
25137
25131
  return /*#__PURE__*/React__default.createElement(DetailText, _extends({
25138
25132
  variant: variant,
@@ -25856,7 +25850,7 @@ var fallbackValues$k = {
25856
25850
  formFooterPanel: formFooterPanel
25857
25851
  };
25858
25852
 
25859
- var _excluded$r = ["showErrors", "themeValues"],
25853
+ var _excluded$q = ["showErrors", "themeValues"],
25860
25854
  _excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocomplete", "extraStyles", "removeFromValue"];
25861
25855
  var InputField = styled__default.input.withConfig({
25862
25856
  displayName: "FormInput__InputField",
@@ -25890,7 +25884,7 @@ var InputField = styled__default.input.withConfig({
25890
25884
  var FormattedInputField = styled__default(function (_ref8) {
25891
25885
  var showErrors = _ref8.showErrors,
25892
25886
  themeValues = _ref8.themeValues,
25893
- props = _objectWithoutProperties(_ref8, _excluded$r);
25887
+ props = _objectWithoutProperties(_ref8, _excluded$q);
25894
25888
 
25895
25889
  return /*#__PURE__*/React__default.createElement(FormattedInput, props);
25896
25890
  }).withConfig({
@@ -26066,7 +26060,7 @@ var FormInput = function FormInput(_ref15) {
26066
26060
 
26067
26061
  var FormInput$1 = themeComponent(FormInput, "FormInput", fallbackValues$k, "default");
26068
26062
 
26069
- var _excluded$s = ["breakpoint", "childGap", "largeChild", "largeChildSize", "children"];
26063
+ var _excluded$r = ["breakpoint", "childGap", "largeChild", "largeChildSize", "children"];
26070
26064
 
26071
26065
  var FormInputRow = function FormInputRow(_ref) {
26072
26066
  var _ref$breakpoint = _ref.breakpoint,
@@ -26076,7 +26070,7 @@ var FormInputRow = function FormInputRow(_ref) {
26076
26070
  largeChild = _ref.largeChild,
26077
26071
  largeChildSize = _ref.largeChildSize,
26078
26072
  children = _ref.children,
26079
- rest = _objectWithoutProperties(_ref, _excluded$s);
26073
+ rest = _objectWithoutProperties(_ref, _excluded$r);
26080
26074
 
26081
26075
  return /*#__PURE__*/React__default.createElement(Box, _extends({
26082
26076
  padding: "0"
@@ -26088,14 +26082,14 @@ var FormInputRow = function FormInputRow(_ref) {
26088
26082
  }, children));
26089
26083
  };
26090
26084
 
26091
- var _excluded$t = ["childGap", "bottomItem", "children"];
26085
+ var _excluded$s = ["childGap", "bottomItem", "children"];
26092
26086
 
26093
26087
  var FormInputColumn = function FormInputColumn(_ref) {
26094
26088
  var _ref$childGap = _ref.childGap,
26095
26089
  childGap = _ref$childGap === void 0 ? "0.5rem" : _ref$childGap,
26096
26090
  bottomItem = _ref.bottomItem,
26097
26091
  children = _ref.children,
26098
- rest = _objectWithoutProperties(_ref, _excluded$t);
26092
+ rest = _objectWithoutProperties(_ref, _excluded$s);
26099
26093
 
26100
26094
  return /*#__PURE__*/React__default.createElement(Stack, _extends({
26101
26095
  childGap: childGap,
@@ -26103,12 +26097,12 @@ var FormInputColumn = function FormInputColumn(_ref) {
26103
26097
  }, rest), children);
26104
26098
  };
26105
26099
 
26106
- var _excluded$u = ["themeValues", "children"];
26100
+ var _excluded$t = ["themeValues", "children"];
26107
26101
 
26108
26102
  var FormContainer = function FormContainer(_ref) {
26109
26103
  var themeValues = _ref.themeValues,
26110
26104
  children = _ref.children,
26111
- rest = _objectWithoutProperties(_ref, _excluded$u);
26105
+ rest = _objectWithoutProperties(_ref, _excluded$t);
26112
26106
 
26113
26107
  var _useContext = React.useContext(styled.ThemeContext),
26114
26108
  isMobile = _useContext.isMobile;
@@ -26373,7 +26367,7 @@ var fallbackValues$o = {
26373
26367
  fontSize: fontSize$8
26374
26368
  };
26375
26369
 
26376
- var _excluded$v = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
26370
+ var _excluded$u = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
26377
26371
 
26378
26372
  var Heading = function Heading(_ref) {
26379
26373
  var themeValues = _ref.themeValues,
@@ -26393,7 +26387,7 @@ var Heading = function Heading(_ref) {
26393
26387
  as = _ref$as === void 0 ? variant : _ref$as,
26394
26388
  dataQa = _ref.dataQa,
26395
26389
  children = _ref.children,
26396
- rest = _objectWithoutProperties(_ref, _excluded$v);
26390
+ rest = _objectWithoutProperties(_ref, _excluded$u);
26397
26391
 
26398
26392
  return /*#__PURE__*/React__default.createElement(HeadingText, _extends({
26399
26393
  variant: variant,
@@ -26684,7 +26678,7 @@ var Loading = function Loading() {
26684
26678
  })))));
26685
26679
  };
26686
26680
 
26687
- var _excluded$w = ["leftContent", "rightContent", "footerMinHeight", "backgroundColor", "largeSide", "largeSideSize", "footerPadding", "isMobile", "footerWidth"];
26681
+ var _excluded$v = ["leftContent", "rightContent", "footerMinHeight", "backgroundColor", "largeSide", "largeSideSize", "footerPadding", "isMobile", "footerWidth"];
26688
26682
 
26689
26683
  var NavFooter = function NavFooter(_ref) {
26690
26684
  var leftContent = _ref.leftContent,
@@ -26700,7 +26694,7 @@ var NavFooter = function NavFooter(_ref) {
26700
26694
  footerPadding = _ref$footerPadding === void 0 ? "1.5rem 1rem" : _ref$footerPadding,
26701
26695
  isMobile = _ref.isMobile,
26702
26696
  footerWidth = _ref.footerWidth,
26703
- rest = _objectWithoutProperties(_ref, _excluded$w);
26697
+ rest = _objectWithoutProperties(_ref, _excluded$v);
26704
26698
 
26705
26699
  return /*#__PURE__*/React__default.createElement(Box, _extends({
26706
26700
  padding: footerPadding,
@@ -26732,7 +26726,7 @@ var NavFooter = function NavFooter(_ref) {
26732
26726
  }, rightContent)))))));
26733
26727
  };
26734
26728
 
26735
- var _excluded$x = ["leftContent", "rightContent", "headerHeight", "isMobile", "backgroundColor", "headerWidth"];
26729
+ var _excluded$w = ["leftContent", "rightContent", "headerHeight", "isMobile", "backgroundColor", "headerWidth"];
26736
26730
 
26737
26731
  var NavHeader = function NavHeader(_ref) {
26738
26732
  var leftContent = _ref.leftContent,
@@ -26742,7 +26736,7 @@ var NavHeader = function NavHeader(_ref) {
26742
26736
  isMobile = _ref.isMobile,
26743
26737
  backgroundColor = _ref.backgroundColor,
26744
26738
  headerWidth = _ref.headerWidth,
26745
- rest = _objectWithoutProperties(_ref, _excluded$x);
26739
+ rest = _objectWithoutProperties(_ref, _excluded$w);
26746
26740
 
26747
26741
  return /*#__PURE__*/React__default.createElement(Box, _extends({
26748
26742
  padding: "0 16px 4px",
@@ -38517,7 +38511,7 @@ var TableRowWrapper = styled__default.tr.withConfig({
38517
38511
  return extraStyles;
38518
38512
  });
38519
38513
 
38520
- var _excluded$y = ["children", "extraStyles", "hoverCursor", "hoverEffect", "onClick", "themeValues"];
38514
+ var _excluded$x = ["children", "extraStyles", "hoverCursor", "hoverEffect", "onClick", "themeValues"];
38521
38515
 
38522
38516
  var TableRow = function TableRow(_ref) {
38523
38517
  var children = _ref.children,
@@ -38527,7 +38521,7 @@ var TableRow = function TableRow(_ref) {
38527
38521
  hoverEffect = _ref$hoverEffect === void 0 ? true : _ref$hoverEffect,
38528
38522
  onClick = _ref.onClick,
38529
38523
  themeValues = _ref.themeValues,
38530
- props = _objectWithoutProperties(_ref, _excluded$y);
38524
+ props = _objectWithoutProperties(_ref, _excluded$x);
38531
38525
 
38532
38526
  return /*#__PURE__*/React__default.createElement(TableRowWrapper, _extends({
38533
38527
  onClick: onClick,
@@ -40382,7 +40376,7 @@ var AddressForm = function AddressForm(_ref) {
40382
40376
  }
40383
40377
  },
40384
40378
  showErrors: showErrors,
40385
- "aria-label": "country"
40379
+ "aria-label": "Country"
40386
40380
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
40387
40381
  labelTextWhenNoError: "Address",
40388
40382
  errorMessages: street1ErrorMessages,
@@ -40393,7 +40387,7 @@ var AddressForm = function AddressForm(_ref) {
40393
40387
  onKeyDown: function onKeyDown(e) {
40394
40388
  return e.key === "Enter" && handleSubmit(e);
40395
40389
  },
40396
- autoComplete: "address-line1",
40390
+ autocomplete: "address-line1",
40397
40391
  "aria-label": "address line 1"
40398
40392
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
40399
40393
  labelTextWhenNoError: "Apt, Suite, Unit, Floor, etc. (Optional)",
@@ -40403,7 +40397,7 @@ var AddressForm = function AddressForm(_ref) {
40403
40397
  onKeyDown: function onKeyDown(e) {
40404
40398
  return e.key === "Enter" && handleSubmit(e);
40405
40399
  },
40406
- autoComplete: "address-line2",
40400
+ autocomplete: "address-line2",
40407
40401
  "aria-label": "address line 2"
40408
40402
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
40409
40403
  labelTextWhenNoError: "City",
@@ -40415,7 +40409,7 @@ var AddressForm = function AddressForm(_ref) {
40415
40409
  onKeyDown: function onKeyDown(e) {
40416
40410
  return e.key === "Enter" && handleSubmit(e);
40417
40411
  },
40418
- autoComplete: "locality",
40412
+ autocomplete: "city",
40419
40413
  "aria-label": "city"
40420
40414
  }), /*#__PURE__*/React__default.createElement(FormStateDropdown, {
40421
40415
  labelTextWhenNoError: isUS ? "State" : "State or Province",
@@ -40442,7 +40436,7 @@ var AddressForm = function AddressForm(_ref) {
40442
40436
  return e.key === "Enter" && handleSubmit(e);
40443
40437
  },
40444
40438
  "aria-label": "zip code",
40445
- autoComplete: "postal-code"
40439
+ autocomplete: "postal-code"
40446
40440
  }), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
40447
40441
  name: "address checkbox",
40448
40442
  title: "Save address to Wallet",
@@ -48161,7 +48155,7 @@ var fallbackValues$N = {
48161
48155
  labeledAmountTotal: labeledAmountTotal
48162
48156
  };
48163
48157
 
48164
- var _excluded$z = ["amount"],
48158
+ var _excluded$y = ["amount"],
48165
48159
  _excluded2$1 = ["amount"];
48166
48160
 
48167
48161
  var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
@@ -48371,7 +48365,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
48371
48365
  return fee.amount > 0;
48372
48366
  }).map(function (_ref5) {
48373
48367
  var amount = _ref5.amount,
48374
- rest = _objectWithoutProperties(_ref5, _excluded$z);
48368
+ rest = _objectWithoutProperties(_ref5, _excluded$y);
48375
48369
 
48376
48370
  return _objectSpread2(_objectSpread2({}, rest), {}, {
48377
48371
  amount: displayCurrency(amount)
@@ -48805,12 +48799,12 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
48805
48799
  }, errorMessage)))));
48806
48800
  };
48807
48801
 
48808
- var _excluded$A = ["version"];
48802
+ var _excluded$z = ["version"];
48809
48803
 
48810
48804
  var TermsAndConditions = function TermsAndConditions(_ref) {
48811
48805
  var _ref$version = _ref.version,
48812
48806
  version = _ref$version === void 0 ? "v1" : _ref$version,
48813
- rest = _objectWithoutProperties(_ref, _excluded$A);
48807
+ rest = _objectWithoutProperties(_ref, _excluded$z);
48814
48808
 
48815
48809
  var TermsAndConditionsControl = version === "v1" ? TermsAndConditionsControlV1 : TermsAndConditionsControlV2;
48816
48810
  return /*#__PURE__*/React__default.createElement(TermsAndConditionsControl, rest);