@thecb/components 8.4.11-beta.8 → 8.4.11-beta.9

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": name
22155
22155
  }), /*#__PURE__*/React__default.createElement(StyledCheckbox, {
22156
22156
  error: error,
22157
22157
  disabled: disabled,
@@ -23985,14 +23985,13 @@ var Dropdown = function Dropdown(_ref8) {
23985
23985
  }, /*#__PURE__*/React__default.createElement(Box, {
23986
23986
  as: "input",
23987
23987
  "aria-multiline": "false",
23988
- "aria-autocomplete": "list",
23989
- "aria-controls": "".concat(ariaLabelledby, "_listbox"),
23990
- "aria-activedescendant": "focused_option",
23991
- "aria-owns": "".concat(ariaLabelledby, "_listbox"),
23988
+ "aria-autocomplete": "list" // aria-activedescendant="focused_option"
23989
+ // aria-owns={`${ariaLabelledby}_listbox`}
23990
+ // aria-controls={`${ariaLabelledby}_listbox`}
23991
+ ,
23992
23992
  "aria-haspopup": "listbox",
23993
23993
  "aria-labelledby": ariaLabelledby,
23994
23994
  "aria-describedby": ariaDescribedby,
23995
- "aria-expanded": isOpen,
23996
23995
  autoComplete: autocompleteValue,
23997
23996
  background: isOpen ? themeValues.hoverColor : WHITE,
23998
23997
  borderRadius: "2px",
@@ -24003,7 +24002,8 @@ var Dropdown = function Dropdown(_ref8) {
24003
24002
  isOpen: isOpen,
24004
24003
  minHeight: "48px",
24005
24004
  minWidth: "100%",
24006
- name: autocompleteValue,
24005
+ name: autocompleteValue // aria-expanded={isOpen}
24006
+ ,
24007
24007
  onChange: function onChange(e) {
24008
24008
  // support autofill and copy/paste
24009
24009
  if (e.target.value !== inputValue) {
@@ -24210,7 +24210,7 @@ var FormSelect = function FormSelect(_ref) {
24210
24210
  id: createIdFromString(labelTextWhenNoError)
24211
24211
  }, labelTextWhenNoError))), /*#__PURE__*/React__default.createElement(Dropdown$1, {
24212
24212
  ariaLabelledby: createIdFromString(labelTextWhenNoError),
24213
- ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
24213
+ ariaDescribedby: createIdFromString(labelTextWhenNoError),
24214
24214
  maxHeight: dropdownMaxHeight,
24215
24215
  hasTitles: hasTitles,
24216
24216
  placeholder: options[0] ? options[0].text : "",
@@ -24234,7 +24234,7 @@ var FormSelect = function FormSelect(_ref) {
24234
24234
  }), /*#__PURE__*/React__default.createElement(Stack, {
24235
24235
  direction: "row",
24236
24236
  justify: "space-between",
24237
- "aria-role": "alert"
24237
+ role: "alert"
24238
24238
  }, /*#__PURE__*/React__default.createElement(Text$1, {
24239
24239
  color: ERROR_COLOR,
24240
24240
  variant: "pXS",
@@ -26006,7 +26006,7 @@ var FormInput = function FormInput(_ref15) {
26006
26006
  "aria-live": "assertive"
26007
26007
  }, formatter ? /*#__PURE__*/React__default.createElement(FormattedInputField, _extends({
26008
26008
  "aria-labelledby": createIdFromString(labelTextWhenNoError),
26009
- "aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
26009
+ "aria-describedby": createIdFromString(labelTextWhenNoError),
26010
26010
  "aria-invalid": field.dirty && field.hasErrors || field.hasErrors && showErrors,
26011
26011
  onChange: function onChange(value) {
26012
26012
  return setValue(value);
@@ -26022,10 +26022,10 @@ var FormInput = function FormInput(_ref15) {
26022
26022
  themeValues: themeValues,
26023
26023
  $customHeight: customHeight,
26024
26024
  $extraStyles: extraStyles,
26025
- autoComplete: autocomplete
26025
+ autocomplete: autocomplete
26026
26026
  }, props)) : /*#__PURE__*/React__default.createElement(InputField, _extends({
26027
26027
  "aria-labelledby": createIdFromString(labelTextWhenNoError),
26028
- "aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
26028
+ "aria-describedby": createIdFromString(labelTextWhenNoError),
26029
26029
  "aria-invalid": field.dirty && field.hasErrors || field.hasErrors && showErrors,
26030
26030
  onChange: function onChange(e) {
26031
26031
  return setValue(e.target.value);
@@ -26041,11 +26041,11 @@ var FormInput = function FormInput(_ref15) {
26041
26041
  background: background,
26042
26042
  $customHeight: customHeight,
26043
26043
  $extraStyles: extraStyles,
26044
- autoComplete: autocomplete
26044
+ autocomplete: autocomplete
26045
26045
  }, props))), /*#__PURE__*/React__default.createElement(Stack, {
26046
26046
  direction: "row",
26047
26047
  justify: "space-between",
26048
- "aria-role": "alert"
26048
+ role: "alert"
26049
26049
  }, field.hasErrors && field.dirty || field.hasErrors && showErrors ? /*#__PURE__*/React__default.createElement(Text$1, {
26050
26050
  color: ERROR_COLOR,
26051
26051
  variant: "pXS",
@@ -40389,7 +40389,7 @@ var AddressForm = function AddressForm(_ref) {
40389
40389
  return e.key === "Enter" && handleSubmit(e);
40390
40390
  },
40391
40391
  autocomplete: "address-line1",
40392
- "aria-label": "address line 1"
40392
+ "aria-label": "Address Line 1"
40393
40393
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
40394
40394
  labelTextWhenNoError: "Apt, Suite, Unit, Floor, etc. (Optional)",
40395
40395
  field: fields.street2,
@@ -40399,7 +40399,7 @@ var AddressForm = function AddressForm(_ref) {
40399
40399
  return e.key === "Enter" && handleSubmit(e);
40400
40400
  },
40401
40401
  autocomplete: "address-line2",
40402
- "aria-label": "Apt, Suite, Unit, Floor, etc. (Optional)"
40402
+ "aria-label": "Address Line 2"
40403
40403
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
40404
40404
  labelTextWhenNoError: "City",
40405
40405
  required: true,
@@ -40411,7 +40411,7 @@ var AddressForm = function AddressForm(_ref) {
40411
40411
  return e.key === "Enter" && handleSubmit(e);
40412
40412
  },
40413
40413
  autocomplete: "city",
40414
- "aria-label": "city"
40414
+ "aria-label": "City"
40415
40415
  }), /*#__PURE__*/React__default.createElement(FormStateDropdown, {
40416
40416
  labelTextWhenNoError: isUS ? "State" : "State or Province",
40417
40417
  errorMessages: stateProvinceErrorMessages,
@@ -40422,8 +40422,7 @@ var AddressForm = function AddressForm(_ref) {
40422
40422
  onKeyDown: function onKeyDown(e) {
40423
40423
  return e.key === "Enter" && handleSubmit(e);
40424
40424
  },
40425
- autoComplete: "administrative-area",
40426
- "aria-label": isUS ? "state" : "state or province",
40425
+ "aria-label": isUS ? "State" : "State or Province",
40427
40426
  required: true
40428
40427
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
40429
40428
  isNum: isUS,
@@ -40437,7 +40436,8 @@ var AddressForm = function AddressForm(_ref) {
40437
40436
  return e.key === "Enter" && handleSubmit(e);
40438
40437
  },
40439
40438
  "aria-label": "zip code",
40440
- autocomplete: "postal-code"
40439
+ autocomplete: "postal-code",
40440
+ required: true
40441
40441
  }), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
40442
40442
  name: "address checkbox",
40443
40443
  title: "Save address to Wallet",