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