@thecb/components 10.9.0-beta.3 → 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.d.ts CHANGED
@@ -629,8 +629,6 @@ interface FormSelectProps {
629
629
  smoothScroll?: boolean;
630
630
  dataQa?: string | null;
631
631
  widthFitOptions?: boolean;
632
- htmlFor?: string;
633
- inputId?: string;
634
632
  }
635
633
 
636
634
  declare const FormSelect: React.FC<Expand<FormSelectProps> &
@@ -823,7 +821,6 @@ interface BoxProps {
823
821
  extraStyles?: string;
824
822
  srOnly?: boolean;
825
823
  dataQa?: string;
826
- id?: string;
827
824
  }
828
825
 
829
826
  declare const Box: React.FC<Expand<BoxProps> &
@@ -1106,8 +1103,6 @@ interface TextProps {
1106
1103
  as?: string;
1107
1104
  dataQa?: string;
1108
1105
  variant?: string;
1109
- htmlFor?: string;
1110
- inputId?: string;
1111
1106
  }
1112
1107
 
1113
1108
  declare const Text: React.FC<Expand<TextProps> &
package/dist/index.esm.js CHANGED
@@ -6540,7 +6540,7 @@ var BoxWrapper = styled(function (_ref) {
6540
6540
  });
6541
6541
  /* eslint-enable no-unused-vars */
6542
6542
 
6543
- 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"];
6543
+ 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"];
6544
6544
 
6545
6545
  /*
6546
6546
  Box component to create generic boxes
@@ -6589,7 +6589,6 @@ var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
6589
6589
  _ref$srOnly = _ref.srOnly,
6590
6590
  srOnly = _ref$srOnly === void 0 ? false : _ref$srOnly,
6591
6591
  dataQa = _ref.dataQa,
6592
- id = _ref.id,
6593
6592
  children = _ref.children,
6594
6593
  rest = _objectWithoutProperties(_ref, _excluded$3);
6595
6594
  return /*#__PURE__*/React.createElement(BoxWrapper, _extends({
@@ -6625,8 +6624,7 @@ var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
6625
6624
  onFocus: onFocus,
6626
6625
  onBlur: onBlur,
6627
6626
  onTouchEnd: onTouchEnd,
6628
- ref: ref,
6629
- id: id
6627
+ ref: ref
6630
6628
  }, rest), children && safeChildren(children, /*#__PURE__*/React.createElement(Fragment$1, null)));
6631
6629
  });
6632
6630
 
@@ -24890,9 +24888,7 @@ var Dropdown = function Dropdown(_ref13) {
24890
24888
  _ref13$ariaInvalid = _ref13.ariaInvalid,
24891
24889
  ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid,
24892
24890
  _ref13$isRequired = _ref13.isRequired,
24893
- isRequired = _ref13$isRequired === void 0 ? false : _ref13$isRequired,
24894
- _ref13$inputId = _ref13.inputId,
24895
- inputId = _ref13$inputId === void 0 ? false : _ref13$inputId;
24891
+ isRequired = _ref13$isRequired === void 0 ? false : _ref13$isRequired;
24896
24892
  var _useState = useState(""),
24897
24893
  _useState2 = _slicedToArray(_useState, 2),
24898
24894
  inputValue = _useState2[0],
@@ -25101,7 +25097,6 @@ var Dropdown = function Dropdown(_ref13) {
25101
25097
  width: "100%",
25102
25098
  dataQa: "".concat(ariaLabelledby, "-dropdown")
25103
25099
  }, /*#__PURE__*/React.createElement(Box, {
25104
- id: inputId,
25105
25100
  as: "input",
25106
25101
  autoComplete: autocompleteValue,
25107
25102
  "aria-controls": "".concat(ariaLabelledby, "_listbox"),
@@ -25304,11 +25299,7 @@ var FormSelect = function FormSelect(_ref) {
25304
25299
  _ref$widthFitOptions = _ref.widthFitOptions,
25305
25300
  widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions,
25306
25301
  _ref$isRequired = _ref.isRequired,
25307
- isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
25308
- _ref$htmlFor = _ref.htmlFor,
25309
- htmlFor = _ref$htmlFor === void 0 ? null : _ref$htmlFor,
25310
- _ref$inputId = _ref.inputId,
25311
- inputId = _ref$inputId === void 0 ? null : _ref$inputId;
25302
+ isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
25312
25303
  var _useState = useState(false),
25313
25304
  _useState2 = _slicedToArray(_useState, 2),
25314
25305
  open = _useState2[0],
@@ -25342,10 +25333,8 @@ var FormSelect = function FormSelect(_ref) {
25342
25333
  color: themeValues.labelColor,
25343
25334
  weight: themeValues.fontWeight,
25344
25335
  extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
25345
- id: createIdFromString(labelTextWhenNoError),
25346
- htmlFor: htmlFor
25336
+ id: createIdFromString(labelTextWhenNoError)
25347
25337
  }, labelTextWhenNoError))), /*#__PURE__*/React.createElement(Dropdown$1, {
25348
- inputId: inputId,
25349
25338
  ariaLabelledby: createIdFromString(labelTextWhenNoError),
25350
25339
  ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
25351
25340
  maxHeight: dropdownMaxHeight,
@@ -26142,11 +26131,7 @@ var CountryDropdown = function CountryDropdown(_ref) {
26142
26131
  _ref$isRequired = _ref.isRequired,
26143
26132
  isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
26144
26133
  _ref$dataQa = _ref.dataQa,
26145
- dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
26146
- _ref$htmlFor = _ref.htmlFor,
26147
- htmlFor = _ref$htmlFor === void 0 ? null : _ref$htmlFor,
26148
- _ref$inputId = _ref.inputId,
26149
- inputId = _ref$inputId === void 0 ? null : _ref$inputId;
26134
+ dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
26150
26135
  return /*#__PURE__*/React.createElement(FormSelect$1, {
26151
26136
  options: options,
26152
26137
  field: field,
@@ -26157,8 +26142,6 @@ var CountryDropdown = function CountryDropdown(_ref) {
26157
26142
  showErrors: showErrors,
26158
26143
  onChange: onChange,
26159
26144
  autocompleteValue: "country-name",
26160
- htmlFor: htmlFor,
26161
- inputId: inputId,
26162
26145
  isRequired: isRequired
26163
26146
  });
26164
26147
  };
@@ -26986,7 +26969,7 @@ var fallbackValues$k = {
26986
26969
  };
26987
26970
 
26988
26971
  var _excluded$s = ["showErrors", "themeValues"],
26989
- _excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired", "htmlFor", "inputId"];
26972
+ _excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired"];
26990
26973
  var InputField = styled.input.withConfig({
26991
26974
  displayName: "FormInput__InputField",
26992
26975
  componentId: "sc-l094r1-0"
@@ -27074,10 +27057,6 @@ var FormInput = function FormInput(_ref15) {
27074
27057
  dataQa = _ref15$dataQa === void 0 ? null : _ref15$dataQa,
27075
27058
  _ref15$isRequired = _ref15.isRequired,
27076
27059
  isRequired = _ref15$isRequired === void 0 ? false : _ref15$isRequired,
27077
- _ref15$htmlFor = _ref15.htmlFor,
27078
- htmlFor = _ref15$htmlFor === void 0 ? null : _ref15$htmlFor,
27079
- _ref15$inputId = _ref15.inputId,
27080
- inputId = _ref15$inputId === void 0 ? null : _ref15$inputId,
27081
27060
  props = _objectWithoutProperties(_ref15, _excluded2);
27082
27061
  var _useState = useState(false),
27083
27062
  _useState2 = _slicedToArray(_useState, 2),
@@ -27115,8 +27094,7 @@ var FormInput = function FormInput(_ref15) {
27115
27094
  variant: "pS",
27116
27095
  weight: themeValues.fontWeight,
27117
27096
  extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
27118
- id: createIdFromString(labelTextWhenNoError),
27119
- htmlFor: htmlFor
27097
+ id: createIdFromString(labelTextWhenNoError)
27120
27098
  }, labelTextWhenNoError), helperModal()) : /*#__PURE__*/React.createElement(Box, {
27121
27099
  padding: "0",
27122
27100
  minWidth: "100%"
@@ -27129,8 +27107,7 @@ var FormInput = function FormInput(_ref15) {
27129
27107
  variant: "pS",
27130
27108
  fontWeight: themeValues.fontWeight,
27131
27109
  extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
27132
- id: createIdFromString(labelTextWhenNoError),
27133
- htmlFor: htmlFor
27110
+ id: createIdFromString(labelTextWhenNoError)
27134
27111
  }, labelTextWhenNoError), type === "password" && /*#__PURE__*/React.createElement(Text$1, {
27135
27112
  variant: "pS",
27136
27113
  color: themeValues.linkColor,
@@ -27151,7 +27128,6 @@ var FormInput = function FormInput(_ref15) {
27151
27128
  }, decorator)))), /*#__PURE__*/React.createElement(Box, {
27152
27129
  padding: "0"
27153
27130
  }, formatter ? /*#__PURE__*/React.createElement(FormattedInputField, _extends({
27154
- id: inputId || (props === null || props === void 0 ? void 0 : props.id),
27155
27131
  "aria-labelledby": createIdFromString(labelTextWhenNoError),
27156
27132
  "aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
27157
27133
  "aria-invalid": field.dirty && field.hasErrors || field.hasErrors && showErrors,
@@ -27184,7 +27160,6 @@ var FormInput = function FormInput(_ref15) {
27184
27160
  }
27185
27161
  }
27186
27162
  }, props)) : /*#__PURE__*/React.createElement(InputField, _extends({
27187
- id: inputId || (props === null || props === void 0 ? void 0 : props.id),
27188
27163
  "aria-labelledby": createIdFromString(labelTextWhenNoError),
27189
27164
  "aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
27190
27165
  "aria-invalid": field.dirty && field.hasErrors || field.hasErrors && showErrors,
@@ -39324,11 +39299,7 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
39324
39299
  showErrors = _ref.showErrors,
39325
39300
  countryCode = _ref.countryCode,
39326
39301
  _ref$isRequired = _ref.isRequired,
39327
- isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
39328
- _ref$htmlFor = _ref.htmlFor,
39329
- htmlFor = _ref$htmlFor === void 0 ? null : _ref$htmlFor,
39330
- _ref$inputId = _ref.inputId,
39331
- inputId = _ref$inputId === void 0 ? null : _ref$inputId;
39302
+ isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
39332
39303
  var placeholder = countryCode === "US" ? placeHolderOptionUS : placeHolderOption;
39333
39304
  var options = [placeholder].concat(_toConsumableArray(getOptions(countryCode)));
39334
39305
  return /*#__PURE__*/React.createElement(FormSelect$1, {
@@ -39339,8 +39310,6 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
39339
39310
  errorMessages: errorMessages,
39340
39311
  showErrors: showErrors,
39341
39312
  autocompleteValue: "address-level1",
39342
- htmlFor: htmlFor,
39343
- inputId: inputId,
39344
39313
  isRequired: isRequired
39345
39314
  });
39346
39315
  };
@@ -40854,8 +40823,6 @@ var AddressForm = function AddressForm(_ref) {
40854
40823
  }
40855
40824
  },
40856
40825
  showErrors: showErrors,
40857
- htmlFor: "country-name",
40858
- inputId: "country-name",
40859
40826
  dataQa: "Country",
40860
40827
  isRequired: true
40861
40828
  }), /*#__PURE__*/React.createElement(FormInput$1, {
@@ -40868,8 +40835,6 @@ var AddressForm = function AddressForm(_ref) {
40868
40835
  return e.key === "Enter" && handleSubmit(e);
40869
40836
  },
40870
40837
  autocompleteValue: "address-line1",
40871
- htmlFor: "address-line1",
40872
- inputId: "address-line1",
40873
40838
  dataQa: "Address",
40874
40839
  isRequired: true
40875
40840
  }), /*#__PURE__*/React.createElement(FormInput$1, {
@@ -40881,8 +40846,6 @@ var AddressForm = function AddressForm(_ref) {
40881
40846
  return e.key === "Enter" && handleSubmit(e);
40882
40847
  },
40883
40848
  autocompleteValue: "address-line2",
40884
- htmlFor: "address-line2",
40885
- inputId: "address-line2",
40886
40849
  dataQa: "Address Line 2"
40887
40850
  }), /*#__PURE__*/React.createElement(FormInput$1, {
40888
40851
  labelTextWhenNoError: "City",
@@ -40894,8 +40857,6 @@ var AddressForm = function AddressForm(_ref) {
40894
40857
  return e.key === "Enter" && handleSubmit(e);
40895
40858
  },
40896
40859
  autocompleteValue: "address-level2",
40897
- htmlFor: "city",
40898
- inputId: "city",
40899
40860
  dataQa: "City",
40900
40861
  isRequired: true
40901
40862
  }), /*#__PURE__*/React.createElement(FormStateDropdown, {
@@ -40908,9 +40869,6 @@ var AddressForm = function AddressForm(_ref) {
40908
40869
  onKeyDown: function onKeyDown(e) {
40909
40870
  return e.key === "Enter" && handleSubmit(e);
40910
40871
  },
40911
- autocompleteValue: "address-level1",
40912
- htmlFor: "stateOrProvince",
40913
- inputId: "stateOrProvince",
40914
40872
  dataQa: "State or Province",
40915
40873
  isRequired: true
40916
40874
  }), /*#__PURE__*/React.createElement(FormInput$1, {
@@ -40926,8 +40884,6 @@ var AddressForm = function AddressForm(_ref) {
40926
40884
  return e.key === "Enter" && handleSubmit(e);
40927
40885
  },
40928
40886
  autocompleteValue: "postal-code",
40929
- htmlFor: "postal-code",
40930
- inputId: "postal-code",
40931
40887
  dataQa: "Zip code",
40932
40888
  isRequired: true
40933
40889
  }), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {