@thecb/components 10.9.0-beta.2 → 10.9.0-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
@@ -6548,7 +6548,7 @@ var BoxWrapper = styled__default(function (_ref) {
6548
6548
  });
6549
6549
  /* eslint-enable no-unused-vars */
6550
6550
 
6551
- var _excluded$3 = ["autocompleteValue", "padding", "borderSize", "borderColor", "borderRadius", "boxShadow", "background", "color", "minHeight", "width", "minWidth", "maxWidth", "borderWidthOverride", "border", "textAlign", "hoverStyles", "activeStyles", "disabledStyles", "focusStyles", "variant", "as", "onClick", "onKeyDown", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "onTouchEnd", "theme", "hiddenStyles", "extraStyles", "srOnly", "dataQa", "id", "children"];
6551
+ var _excluded$3 = ["autocompleteValue", "padding", "borderSize", "borderColor", "borderRadius", "boxShadow", "background", "color", "minHeight", "width", "minWidth", "maxWidth", "borderWidthOverride", "border", "textAlign", "hoverStyles", "activeStyles", "disabledStyles", "focusStyles", "variant", "as", "onClick", "onKeyDown", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "onTouchEnd", "theme", "hiddenStyles", "extraStyles", "srOnly", "dataQa", "children"];
6552
6552
 
6553
6553
  /*
6554
6554
  Box component to create generic boxes
@@ -6597,7 +6597,6 @@ var Box = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
6597
6597
  _ref$srOnly = _ref.srOnly,
6598
6598
  srOnly = _ref$srOnly === void 0 ? false : _ref$srOnly,
6599
6599
  dataQa = _ref.dataQa,
6600
- id = _ref.id,
6601
6600
  children = _ref.children,
6602
6601
  rest = _objectWithoutProperties(_ref, _excluded$3);
6603
6602
  return /*#__PURE__*/React__default.createElement(BoxWrapper, _extends({
@@ -6633,8 +6632,7 @@ var Box = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
6633
6632
  onFocus: onFocus,
6634
6633
  onBlur: onBlur,
6635
6634
  onTouchEnd: onTouchEnd,
6636
- ref: ref,
6637
- id: id
6635
+ ref: ref
6638
6636
  }, rest), children && safeChildren(children, /*#__PURE__*/React__default.createElement(React.Fragment, null)));
6639
6637
  });
6640
6638
 
@@ -24898,9 +24896,7 @@ var Dropdown = function Dropdown(_ref13) {
24898
24896
  _ref13$ariaInvalid = _ref13.ariaInvalid,
24899
24897
  ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid,
24900
24898
  _ref13$isRequired = _ref13.isRequired,
24901
- isRequired = _ref13$isRequired === void 0 ? false : _ref13$isRequired,
24902
- _ref13$inputId = _ref13.inputId,
24903
- inputId = _ref13$inputId === void 0 ? false : _ref13$inputId;
24899
+ isRequired = _ref13$isRequired === void 0 ? false : _ref13$isRequired;
24904
24900
  var _useState = React.useState(""),
24905
24901
  _useState2 = _slicedToArray(_useState, 2),
24906
24902
  inputValue = _useState2[0],
@@ -25109,7 +25105,6 @@ var Dropdown = function Dropdown(_ref13) {
25109
25105
  width: "100%",
25110
25106
  dataQa: "".concat(ariaLabelledby, "-dropdown")
25111
25107
  }, /*#__PURE__*/React__default.createElement(Box, {
25112
- id: inputId,
25113
25108
  as: "input",
25114
25109
  autoComplete: autocompleteValue,
25115
25110
  "aria-controls": "".concat(ariaLabelledby, "_listbox"),
@@ -25312,11 +25307,7 @@ var FormSelect = function FormSelect(_ref) {
25312
25307
  _ref$widthFitOptions = _ref.widthFitOptions,
25313
25308
  widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions,
25314
25309
  _ref$isRequired = _ref.isRequired,
25315
- isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
25316
- _ref$htmlFor = _ref.htmlFor,
25317
- htmlFor = _ref$htmlFor === void 0 ? null : _ref$htmlFor,
25318
- _ref$inputId = _ref.inputId,
25319
- inputId = _ref$inputId === void 0 ? null : _ref$inputId;
25310
+ isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
25320
25311
  var _useState = React.useState(false),
25321
25312
  _useState2 = _slicedToArray(_useState, 2),
25322
25313
  open = _useState2[0],
@@ -25350,10 +25341,8 @@ var FormSelect = function FormSelect(_ref) {
25350
25341
  color: themeValues.labelColor,
25351
25342
  weight: themeValues.fontWeight,
25352
25343
  extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
25353
- id: createIdFromString(labelTextWhenNoError),
25354
- htmlFor: htmlFor
25344
+ id: createIdFromString(labelTextWhenNoError)
25355
25345
  }, labelTextWhenNoError))), /*#__PURE__*/React__default.createElement(Dropdown$1, {
25356
- inputId: inputId,
25357
25346
  ariaLabelledby: createIdFromString(labelTextWhenNoError),
25358
25347
  ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
25359
25348
  maxHeight: dropdownMaxHeight,
@@ -26150,11 +26139,7 @@ var CountryDropdown = function CountryDropdown(_ref) {
26150
26139
  _ref$isRequired = _ref.isRequired,
26151
26140
  isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
26152
26141
  _ref$dataQa = _ref.dataQa,
26153
- dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
26154
- _ref$htmlFor = _ref.htmlFor,
26155
- htmlFor = _ref$htmlFor === void 0 ? null : _ref$htmlFor,
26156
- _ref$inputId = _ref.inputId,
26157
- inputId = _ref$inputId === void 0 ? null : _ref$inputId;
26142
+ dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
26158
26143
  return /*#__PURE__*/React__default.createElement(FormSelect$1, {
26159
26144
  options: options,
26160
26145
  field: field,
@@ -26165,8 +26150,6 @@ var CountryDropdown = function CountryDropdown(_ref) {
26165
26150
  showErrors: showErrors,
26166
26151
  onChange: onChange,
26167
26152
  autocompleteValue: "country-name",
26168
- htmlFor: htmlFor,
26169
- inputId: inputId,
26170
26153
  isRequired: isRequired
26171
26154
  });
26172
26155
  };
@@ -26994,7 +26977,7 @@ var fallbackValues$k = {
26994
26977
  };
26995
26978
 
26996
26979
  var _excluded$s = ["showErrors", "themeValues"],
26997
- _excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired", "htmlFor", "inputId"];
26980
+ _excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired"];
26998
26981
  var InputField = styled__default.input.withConfig({
26999
26982
  displayName: "FormInput__InputField",
27000
26983
  componentId: "sc-l094r1-0"
@@ -27082,10 +27065,6 @@ var FormInput = function FormInput(_ref15) {
27082
27065
  dataQa = _ref15$dataQa === void 0 ? null : _ref15$dataQa,
27083
27066
  _ref15$isRequired = _ref15.isRequired,
27084
27067
  isRequired = _ref15$isRequired === void 0 ? false : _ref15$isRequired,
27085
- _ref15$htmlFor = _ref15.htmlFor,
27086
- htmlFor = _ref15$htmlFor === void 0 ? null : _ref15$htmlFor,
27087
- _ref15$inputId = _ref15.inputId,
27088
- inputId = _ref15$inputId === void 0 ? null : _ref15$inputId,
27089
27068
  props = _objectWithoutProperties(_ref15, _excluded2);
27090
27069
  var _useState = React.useState(false),
27091
27070
  _useState2 = _slicedToArray(_useState, 2),
@@ -27123,8 +27102,7 @@ var FormInput = function FormInput(_ref15) {
27123
27102
  variant: "pS",
27124
27103
  weight: themeValues.fontWeight,
27125
27104
  extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
27126
- id: createIdFromString(labelTextWhenNoError),
27127
- htmlFor: htmlFor
27105
+ id: createIdFromString(labelTextWhenNoError)
27128
27106
  }, labelTextWhenNoError), helperModal()) : /*#__PURE__*/React__default.createElement(Box, {
27129
27107
  padding: "0",
27130
27108
  minWidth: "100%"
@@ -27137,8 +27115,7 @@ var FormInput = function FormInput(_ref15) {
27137
27115
  variant: "pS",
27138
27116
  fontWeight: themeValues.fontWeight,
27139
27117
  extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
27140
- id: createIdFromString(labelTextWhenNoError),
27141
- htmlFor: htmlFor
27118
+ id: createIdFromString(labelTextWhenNoError)
27142
27119
  }, labelTextWhenNoError), type === "password" && /*#__PURE__*/React__default.createElement(Text$1, {
27143
27120
  variant: "pS",
27144
27121
  color: themeValues.linkColor,
@@ -27159,7 +27136,6 @@ var FormInput = function FormInput(_ref15) {
27159
27136
  }, decorator)))), /*#__PURE__*/React__default.createElement(Box, {
27160
27137
  padding: "0"
27161
27138
  }, formatter ? /*#__PURE__*/React__default.createElement(FormattedInputField, _extends({
27162
- id: inputId || (props === null || props === void 0 ? void 0 : props.id),
27163
27139
  "aria-labelledby": createIdFromString(labelTextWhenNoError),
27164
27140
  "aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
27165
27141
  "aria-invalid": field.dirty && field.hasErrors || field.hasErrors && showErrors,
@@ -27192,7 +27168,6 @@ var FormInput = function FormInput(_ref15) {
27192
27168
  }
27193
27169
  }
27194
27170
  }, props)) : /*#__PURE__*/React__default.createElement(InputField, _extends({
27195
- id: inputId || (props === null || props === void 0 ? void 0 : props.id),
27196
27171
  "aria-labelledby": createIdFromString(labelTextWhenNoError),
27197
27172
  "aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
27198
27173
  "aria-invalid": field.dirty && field.hasErrors || field.hasErrors && showErrors,
@@ -39332,11 +39307,7 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
39332
39307
  showErrors = _ref.showErrors,
39333
39308
  countryCode = _ref.countryCode,
39334
39309
  _ref$isRequired = _ref.isRequired,
39335
- isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
39336
- _ref$htmlFor = _ref.htmlFor,
39337
- htmlFor = _ref$htmlFor === void 0 ? null : _ref$htmlFor,
39338
- _ref$inputId = _ref.inputId,
39339
- inputId = _ref$inputId === void 0 ? null : _ref$inputId;
39310
+ isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
39340
39311
  var placeholder = countryCode === "US" ? placeHolderOptionUS : placeHolderOption;
39341
39312
  var options = [placeholder].concat(_toConsumableArray(getOptions(countryCode)));
39342
39313
  return /*#__PURE__*/React__default.createElement(FormSelect$1, {
@@ -39347,8 +39318,6 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
39347
39318
  errorMessages: errorMessages,
39348
39319
  showErrors: showErrors,
39349
39320
  autocompleteValue: "address-level1",
39350
- htmlFor: htmlFor,
39351
- inputId: inputId,
39352
39321
  isRequired: isRequired
39353
39322
  });
39354
39323
  };
@@ -40862,8 +40831,6 @@ var AddressForm = function AddressForm(_ref) {
40862
40831
  }
40863
40832
  },
40864
40833
  showErrors: showErrors,
40865
- htmlFor: "country-name",
40866
- inputId: "country-name",
40867
40834
  dataQa: "Country",
40868
40835
  isRequired: true
40869
40836
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
@@ -40876,8 +40843,6 @@ var AddressForm = function AddressForm(_ref) {
40876
40843
  return e.key === "Enter" && handleSubmit(e);
40877
40844
  },
40878
40845
  autocompleteValue: "address-line1",
40879
- htmlFor: "address-line1",
40880
- inputId: "address-line1",
40881
40846
  dataQa: "Address",
40882
40847
  isRequired: true
40883
40848
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
@@ -40889,8 +40854,6 @@ var AddressForm = function AddressForm(_ref) {
40889
40854
  return e.key === "Enter" && handleSubmit(e);
40890
40855
  },
40891
40856
  autocompleteValue: "address-line2",
40892
- htmlFor: "address-line2",
40893
- inputId: "address-line2",
40894
40857
  dataQa: "Address Line 2"
40895
40858
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
40896
40859
  labelTextWhenNoError: "City",
@@ -40902,8 +40865,6 @@ var AddressForm = function AddressForm(_ref) {
40902
40865
  return e.key === "Enter" && handleSubmit(e);
40903
40866
  },
40904
40867
  autocompleteValue: "address-level2",
40905
- htmlFor: "city",
40906
- inputId: "city",
40907
40868
  dataQa: "City",
40908
40869
  isRequired: true
40909
40870
  }), /*#__PURE__*/React__default.createElement(FormStateDropdown, {
@@ -40916,9 +40877,6 @@ var AddressForm = function AddressForm(_ref) {
40916
40877
  onKeyDown: function onKeyDown(e) {
40917
40878
  return e.key === "Enter" && handleSubmit(e);
40918
40879
  },
40919
- autocompleteValue: "address-level1",
40920
- htmlFor: "stateOrProvince",
40921
- inputId: "stateOrProvince",
40922
40880
  dataQa: "State or Province",
40923
40881
  isRequired: true
40924
40882
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
@@ -40934,8 +40892,6 @@ var AddressForm = function AddressForm(_ref) {
40934
40892
  return e.key === "Enter" && handleSubmit(e);
40935
40893
  },
40936
40894
  autocompleteValue: "postal-code",
40937
- htmlFor: "postal-code",
40938
- inputId: "postal-code",
40939
40895
  dataQa: "Zip code",
40940
40896
  isRequired: true
40941
40897
  }), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
@@ -49069,8 +49025,9 @@ var PhoneForm = function PhoneForm(_ref) {
49069
49025
  errorMessages: phoneErrorMessage,
49070
49026
  field: fields.phone,
49071
49027
  fieldActions: actions.fields.phone,
49072
- showErrors: showErrors,
49073
- formatter: createFormat(phoneFormats, formatDelimiter),
49028
+ showErrors: showErrors
49029
+ // formatter={createFormat(phoneFormats, formatDelimiter)}
49030
+ ,
49074
49031
  onKeyUp: function onKeyUp(e) {
49075
49032
  return e.key === "Enter" && handleSubmit(e);
49076
49033
  },