@thecb/components 8.4.11-beta.3 → 8.4.11-beta.5

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
@@ -22143,7 +22143,7 @@ var Checkbox = function Checkbox(_ref4) {
22143
22143
  onChange: onChange,
22144
22144
  tabIndex: "-1",
22145
22145
  "aria-invalid": error,
22146
- "aria-describedBy": error ? "".concat(name, "-error-message") : ""
22146
+ "aria-describedby": error ? "".concat(name, "-error-message") : ""
22147
22147
  }), /*#__PURE__*/React.createElement(StyledCheckbox, {
22148
22148
  error: error,
22149
22149
  disabled: disabled,
@@ -23986,8 +23986,6 @@ var Dropdown = function Dropdown(_ref8) {
23986
23986
  "aria-describedby": ariaDescribedby,
23987
23987
  "aria-expanded": isOpen,
23988
23988
  "aria-live": "assertive",
23989
- role: "combobox",
23990
- disabled: disabled,
23991
23989
  autoComplete: autocompleteValue,
23992
23990
  background: isOpen ? themeValues.hoverColor : WHITE,
23993
23991
  borderRadius: "2px",
@@ -24038,7 +24036,7 @@ var Dropdown = function Dropdown(_ref8) {
24038
24036
  id: focusedRef === optionRefs.current[i] ? "focused_option" : choice.value,
24039
24037
  key: choice.value,
24040
24038
  ref: optionRefs.current[i],
24041
- tabIndex: 0,
24039
+ tabIndex: -1,
24042
24040
  onClick: function onClick(e) {
24043
24041
  return handleItemSelection(e, choice, i);
24044
24042
  },
@@ -24150,8 +24148,6 @@ var fallbackValues$g = {
24150
24148
  hoverFocusStyles: hoverFocusStyles
24151
24149
  };
24152
24150
 
24153
- var _excluded$o = ["fieldActions", "labelTextWhenNoError", "errorMessages", "options", "field", "showErrors", "onChange", "dropdownMaxHeight", "disabledValues", "disabled", "themeValues", "hasTitles", "autocompleteValue", "smoothScroll"];
24154
-
24155
24151
  var FormSelect = function FormSelect(_ref) {
24156
24152
  var fieldActions = _ref.fieldActions,
24157
24153
  labelTextWhenNoError = _ref.labelTextWhenNoError,
@@ -24168,8 +24164,7 @@ var FormSelect = function FormSelect(_ref) {
24168
24164
  hasTitles = _ref$hasTitles === void 0 ? false : _ref$hasTitles,
24169
24165
  autocompleteValue = _ref.autocompleteValue,
24170
24166
  _ref$smoothScroll = _ref.smoothScroll,
24171
- smoothScroll = _ref$smoothScroll === void 0 ? true : _ref$smoothScroll,
24172
- rest = _objectWithoutProperties(_ref, _excluded$o);
24167
+ smoothScroll = _ref$smoothScroll === void 0 ? true : _ref$smoothScroll;
24173
24168
 
24174
24169
  var _useState = useState(false),
24175
24170
  _useState2 = _slicedToArray(_useState, 2),
@@ -24190,10 +24185,10 @@ var FormSelect = function FormSelect(_ref) {
24190
24185
  document.removeEventListener("mousedown", handleClickAway);
24191
24186
  };
24192
24187
  });
24193
- return /*#__PURE__*/React.createElement(SelectContainer, _extends({
24188
+ return /*#__PURE__*/React.createElement(SelectContainer, {
24194
24189
  ref: dropdownRef,
24195
24190
  disabled: disabled
24196
- }, rest), /*#__PURE__*/React.createElement(Box, {
24191
+ }, /*#__PURE__*/React.createElement(Box, {
24197
24192
  padding: "0",
24198
24193
  minWidth: "100%"
24199
24194
  }, /*#__PURE__*/React.createElement(Cluster, {
@@ -24207,8 +24202,8 @@ var FormSelect = function FormSelect(_ref) {
24207
24202
  extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
24208
24203
  id: createIdFromString(labelTextWhenNoError)
24209
24204
  }, labelTextWhenNoError))), /*#__PURE__*/React.createElement(Dropdown$1, {
24210
- "aria-labelledBy": createIdFromString(labelTextWhenNoError),
24211
- "aria-describedBy": createIdFromString(labelTextWhenNoError, "error message"),
24205
+ ariaLabelledby: createIdFromString(labelTextWhenNoError),
24206
+ ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
24212
24207
  maxHeight: dropdownMaxHeight,
24213
24208
  hasTitles: hasTitles,
24214
24209
  placeholder: options[0] ? options[0].text : "",
@@ -24225,14 +24220,13 @@ var FormSelect = function FormSelect(_ref) {
24225
24220
  onClick: function onClick() {
24226
24221
  return setOpen(!open);
24227
24222
  },
24228
- "aria-disabled": disabled,
24223
+ disabled: disabled,
24229
24224
  autocompleteValue: autocompleteValue,
24230
24225
  smoothScroll: smoothScroll,
24231
24226
  required: options.required
24232
24227
  }), /*#__PURE__*/React.createElement(Stack, {
24233
24228
  direction: "row",
24234
- justify: "space-between",
24235
- "aria-live": "assertive"
24229
+ justify: "space-between"
24236
24230
  }, /*#__PURE__*/React.createElement(Text$1, {
24237
24231
  color: ERROR_COLOR,
24238
24232
  variant: "pXS",
@@ -24988,7 +24982,7 @@ var options = [{
24988
24982
  value: "ZW"
24989
24983
  }];
24990
24984
 
24991
- var _excluded$p = ["labelTextWhenNoError", "errorMessages", "field", "fieldActions", "showErrors", "onChange"];
24985
+ var _excluded$o = ["labelTextWhenNoError", "errorMessages", "field", "fieldActions", "showErrors", "onChange"];
24992
24986
 
24993
24987
  var CountryDropdown = function CountryDropdown(_ref) {
24994
24988
  var labelTextWhenNoError = _ref.labelTextWhenNoError,
@@ -24997,7 +24991,7 @@ var CountryDropdown = function CountryDropdown(_ref) {
24997
24991
  fieldActions = _ref.fieldActions,
24998
24992
  showErrors = _ref.showErrors,
24999
24993
  onChange = _ref.onChange,
25000
- rest = _objectWithoutProperties(_ref, _excluded$p);
24994
+ rest = _objectWithoutProperties(_ref, _excluded$o);
25001
24995
 
25002
24996
  return /*#__PURE__*/React.createElement(FormSelect$1, _extends({
25003
24997
  options: options,
@@ -25007,8 +25001,7 @@ var CountryDropdown = function CountryDropdown(_ref) {
25007
25001
  errorMessages: errorMessages,
25008
25002
  showErrors: showErrors,
25009
25003
  onChange: onChange,
25010
- autocompleteValue: "country-name",
25011
- autoComplete: "country-name"
25004
+ autocompleteValue: "country-name"
25012
25005
  }, rest));
25013
25006
  };
25014
25007
 
@@ -25075,7 +25068,7 @@ var mobileFallbackValues$1 = {
25075
25068
  };
25076
25069
  var MOBILE_BREAKPOINT$1 = 768;
25077
25070
 
25078
- var _excluded$q = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
25071
+ var _excluded$p = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
25079
25072
  /*
25080
25073
  New responsive text component for Detail elements
25081
25074
  (Block level text elements which are smaller than "Title" elements)
@@ -25125,7 +25118,7 @@ var Detail = function Detail(_ref) {
25125
25118
  as = _ref$as === void 0 ? "p" : _ref$as,
25126
25119
  dataQa = _ref.dataQa,
25127
25120
  children = _ref.children,
25128
- rest = _objectWithoutProperties(_ref, _excluded$q);
25121
+ rest = _objectWithoutProperties(_ref, _excluded$p);
25129
25122
 
25130
25123
  return /*#__PURE__*/React.createElement(DetailText, _extends({
25131
25124
  variant: variant,
@@ -25849,7 +25842,7 @@ var fallbackValues$k = {
25849
25842
  formFooterPanel: formFooterPanel
25850
25843
  };
25851
25844
 
25852
- var _excluded$r = ["showErrors", "themeValues"],
25845
+ var _excluded$q = ["showErrors", "themeValues"],
25853
25846
  _excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocomplete", "extraStyles", "removeFromValue"];
25854
25847
  var InputField = styled.input.withConfig({
25855
25848
  displayName: "FormInput__InputField",
@@ -25883,7 +25876,7 @@ var InputField = styled.input.withConfig({
25883
25876
  var FormattedInputField = styled(function (_ref8) {
25884
25877
  var showErrors = _ref8.showErrors,
25885
25878
  themeValues = _ref8.themeValues,
25886
- props = _objectWithoutProperties(_ref8, _excluded$r);
25879
+ props = _objectWithoutProperties(_ref8, _excluded$q);
25887
25880
 
25888
25881
  return /*#__PURE__*/React.createElement(FormattedInput, props);
25889
25882
  }).withConfig({
@@ -26043,7 +26036,7 @@ var FormInput = function FormInput(_ref15) {
26043
26036
  }, props))), /*#__PURE__*/React.createElement(Stack, {
26044
26037
  direction: "row",
26045
26038
  justify: "space-between",
26046
- role: "alert"
26039
+ "aria-live": "assertive"
26047
26040
  }, field.hasErrors && field.dirty || field.hasErrors && showErrors ? /*#__PURE__*/React.createElement(Text$1, {
26048
26041
  color: ERROR_COLOR,
26049
26042
  variant: "pXS",
@@ -26059,7 +26052,7 @@ var FormInput = function FormInput(_ref15) {
26059
26052
 
26060
26053
  var FormInput$1 = themeComponent(FormInput, "FormInput", fallbackValues$k, "default");
26061
26054
 
26062
- var _excluded$s = ["breakpoint", "childGap", "largeChild", "largeChildSize", "children"];
26055
+ var _excluded$r = ["breakpoint", "childGap", "largeChild", "largeChildSize", "children"];
26063
26056
 
26064
26057
  var FormInputRow = function FormInputRow(_ref) {
26065
26058
  var _ref$breakpoint = _ref.breakpoint,
@@ -26069,7 +26062,7 @@ var FormInputRow = function FormInputRow(_ref) {
26069
26062
  largeChild = _ref.largeChild,
26070
26063
  largeChildSize = _ref.largeChildSize,
26071
26064
  children = _ref.children,
26072
- rest = _objectWithoutProperties(_ref, _excluded$s);
26065
+ rest = _objectWithoutProperties(_ref, _excluded$r);
26073
26066
 
26074
26067
  return /*#__PURE__*/React.createElement(Box, _extends({
26075
26068
  padding: "0"
@@ -26081,14 +26074,14 @@ var FormInputRow = function FormInputRow(_ref) {
26081
26074
  }, children));
26082
26075
  };
26083
26076
 
26084
- var _excluded$t = ["childGap", "bottomItem", "children"];
26077
+ var _excluded$s = ["childGap", "bottomItem", "children"];
26085
26078
 
26086
26079
  var FormInputColumn = function FormInputColumn(_ref) {
26087
26080
  var _ref$childGap = _ref.childGap,
26088
26081
  childGap = _ref$childGap === void 0 ? "0.5rem" : _ref$childGap,
26089
26082
  bottomItem = _ref.bottomItem,
26090
26083
  children = _ref.children,
26091
- rest = _objectWithoutProperties(_ref, _excluded$t);
26084
+ rest = _objectWithoutProperties(_ref, _excluded$s);
26092
26085
 
26093
26086
  return /*#__PURE__*/React.createElement(Stack, _extends({
26094
26087
  childGap: childGap,
@@ -26096,12 +26089,12 @@ var FormInputColumn = function FormInputColumn(_ref) {
26096
26089
  }, rest), children);
26097
26090
  };
26098
26091
 
26099
- var _excluded$u = ["themeValues", "children"];
26092
+ var _excluded$t = ["themeValues", "children"];
26100
26093
 
26101
26094
  var FormContainer = function FormContainer(_ref) {
26102
26095
  var themeValues = _ref.themeValues,
26103
26096
  children = _ref.children,
26104
- rest = _objectWithoutProperties(_ref, _excluded$u);
26097
+ rest = _objectWithoutProperties(_ref, _excluded$t);
26105
26098
 
26106
26099
  var _useContext = useContext(ThemeContext),
26107
26100
  isMobile = _useContext.isMobile;
@@ -26366,7 +26359,7 @@ var fallbackValues$o = {
26366
26359
  fontSize: fontSize$8
26367
26360
  };
26368
26361
 
26369
- var _excluded$v = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
26362
+ var _excluded$u = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
26370
26363
 
26371
26364
  var Heading = function Heading(_ref) {
26372
26365
  var themeValues = _ref.themeValues,
@@ -26386,7 +26379,7 @@ var Heading = function Heading(_ref) {
26386
26379
  as = _ref$as === void 0 ? variant : _ref$as,
26387
26380
  dataQa = _ref.dataQa,
26388
26381
  children = _ref.children,
26389
- rest = _objectWithoutProperties(_ref, _excluded$v);
26382
+ rest = _objectWithoutProperties(_ref, _excluded$u);
26390
26383
 
26391
26384
  return /*#__PURE__*/React.createElement(HeadingText, _extends({
26392
26385
  variant: variant,
@@ -26677,7 +26670,7 @@ var Loading = function Loading() {
26677
26670
  })))));
26678
26671
  };
26679
26672
 
26680
- var _excluded$w = ["leftContent", "rightContent", "footerMinHeight", "backgroundColor", "largeSide", "largeSideSize", "footerPadding", "isMobile", "footerWidth"];
26673
+ var _excluded$v = ["leftContent", "rightContent", "footerMinHeight", "backgroundColor", "largeSide", "largeSideSize", "footerPadding", "isMobile", "footerWidth"];
26681
26674
 
26682
26675
  var NavFooter = function NavFooter(_ref) {
26683
26676
  var leftContent = _ref.leftContent,
@@ -26693,7 +26686,7 @@ var NavFooter = function NavFooter(_ref) {
26693
26686
  footerPadding = _ref$footerPadding === void 0 ? "1.5rem 1rem" : _ref$footerPadding,
26694
26687
  isMobile = _ref.isMobile,
26695
26688
  footerWidth = _ref.footerWidth,
26696
- rest = _objectWithoutProperties(_ref, _excluded$w);
26689
+ rest = _objectWithoutProperties(_ref, _excluded$v);
26697
26690
 
26698
26691
  return /*#__PURE__*/React.createElement(Box, _extends({
26699
26692
  padding: footerPadding,
@@ -26725,7 +26718,7 @@ var NavFooter = function NavFooter(_ref) {
26725
26718
  }, rightContent)))))));
26726
26719
  };
26727
26720
 
26728
- var _excluded$x = ["leftContent", "rightContent", "headerHeight", "isMobile", "backgroundColor", "headerWidth"];
26721
+ var _excluded$w = ["leftContent", "rightContent", "headerHeight", "isMobile", "backgroundColor", "headerWidth"];
26729
26722
 
26730
26723
  var NavHeader = function NavHeader(_ref) {
26731
26724
  var leftContent = _ref.leftContent,
@@ -26735,7 +26728,7 @@ var NavHeader = function NavHeader(_ref) {
26735
26728
  isMobile = _ref.isMobile,
26736
26729
  backgroundColor = _ref.backgroundColor,
26737
26730
  headerWidth = _ref.headerWidth,
26738
- rest = _objectWithoutProperties(_ref, _excluded$x);
26731
+ rest = _objectWithoutProperties(_ref, _excluded$w);
26739
26732
 
26740
26733
  return /*#__PURE__*/React.createElement(Box, _extends({
26741
26734
  padding: "0 16px 4px",
@@ -38510,7 +38503,7 @@ var TableRowWrapper = styled.tr.withConfig({
38510
38503
  return extraStyles;
38511
38504
  });
38512
38505
 
38513
- var _excluded$y = ["children", "extraStyles", "hoverCursor", "hoverEffect", "onClick", "themeValues"];
38506
+ var _excluded$x = ["children", "extraStyles", "hoverCursor", "hoverEffect", "onClick", "themeValues"];
38514
38507
 
38515
38508
  var TableRow = function TableRow(_ref) {
38516
38509
  var children = _ref.children,
@@ -38520,7 +38513,7 @@ var TableRow = function TableRow(_ref) {
38520
38513
  hoverEffect = _ref$hoverEffect === void 0 ? true : _ref$hoverEffect,
38521
38514
  onClick = _ref.onClick,
38522
38515
  themeValues = _ref.themeValues,
38523
- props = _objectWithoutProperties(_ref, _excluded$y);
38516
+ props = _objectWithoutProperties(_ref, _excluded$x);
38524
38517
 
38525
38518
  return /*#__PURE__*/React.createElement(TableRowWrapper, _extends({
38526
38519
  onClick: onClick,
@@ -40375,8 +40368,7 @@ var AddressForm = function AddressForm(_ref) {
40375
40368
  }
40376
40369
  },
40377
40370
  showErrors: showErrors,
40378
- "aria-label": "country",
40379
- "aria-role": "listbox"
40371
+ "aria-label": "Country"
40380
40372
  }), /*#__PURE__*/React.createElement(FormInput$1, {
40381
40373
  labelTextWhenNoError: "Address",
40382
40374
  errorMessages: street1ErrorMessages,
@@ -40398,7 +40390,7 @@ var AddressForm = function AddressForm(_ref) {
40398
40390
  return e.key === "Enter" && handleSubmit(e);
40399
40391
  },
40400
40392
  autocomplete: "address-line2",
40401
- "aria-label": "address line 2"
40393
+ "aria-label": "Apt, Suite, Unit, Floor, etc. (Optional)"
40402
40394
  }), /*#__PURE__*/React.createElement(FormInput$1, {
40403
40395
  labelTextWhenNoError: "City",
40404
40396
  required: true,
@@ -48155,7 +48147,7 @@ var fallbackValues$N = {
48155
48147
  labeledAmountTotal: labeledAmountTotal
48156
48148
  };
48157
48149
 
48158
- var _excluded$z = ["amount"],
48150
+ var _excluded$y = ["amount"],
48159
48151
  _excluded2$1 = ["amount"];
48160
48152
 
48161
48153
  var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
@@ -48365,7 +48357,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
48365
48357
  return fee.amount > 0;
48366
48358
  }).map(function (_ref5) {
48367
48359
  var amount = _ref5.amount,
48368
- rest = _objectWithoutProperties(_ref5, _excluded$z);
48360
+ rest = _objectWithoutProperties(_ref5, _excluded$y);
48369
48361
 
48370
48362
  return _objectSpread2(_objectSpread2({}, rest), {}, {
48371
48363
  amount: displayCurrency(amount)
@@ -48799,12 +48791,12 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
48799
48791
  }, errorMessage)))));
48800
48792
  };
48801
48793
 
48802
- var _excluded$A = ["version"];
48794
+ var _excluded$z = ["version"];
48803
48795
 
48804
48796
  var TermsAndConditions = function TermsAndConditions(_ref) {
48805
48797
  var _ref$version = _ref.version,
48806
48798
  version = _ref$version === void 0 ? "v1" : _ref$version,
48807
- rest = _objectWithoutProperties(_ref, _excluded$A);
48799
+ rest = _objectWithoutProperties(_ref, _excluded$z);
48808
48800
 
48809
48801
  var TermsAndConditionsControl = version === "v1" ? TermsAndConditionsControlV1 : TermsAndConditionsControlV2;
48810
48802
  return /*#__PURE__*/React.createElement(TermsAndConditionsControl, rest);