@thecb/components 11.1.15-beta.2 → 11.1.15-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.esm.js CHANGED
@@ -26850,7 +26850,7 @@ var fallbackValues$n = {
26850
26850
  };
26851
26851
 
26852
26852
  var _excluded$y = ["showErrors", "themeValues"],
26853
- _excluded2 = ["type", "labelDisplayOverride", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired", "errorFieldExtraStyles", "showFieldErrorRow", "labelTextVariant", "errorTextVariant"];
26853
+ _excluded2 = ["ariaLabelledBy", "type", "labelDisplayOverride", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired", "errorFieldExtraStyles", "showFieldErrorRow", "labelTextVariant", "errorTextVariant"];
26854
26854
  var InputField = styled.input.withConfig({
26855
26855
  displayName: "FormInput__InputField",
26856
26856
  componentId: "sc-l094r1-0"
@@ -26911,7 +26911,9 @@ var FormattedInputField = styled(function (_ref8) {
26911
26911
  return css(["", ""], extraStyles);
26912
26912
  });
26913
26913
  var FormInput = function FormInput(_ref15) {
26914
- var _ref15$type = _ref15.type,
26914
+ var _ref15$ariaLabelledBy = _ref15.ariaLabelledBy,
26915
+ ariaLabelledBy = _ref15$ariaLabelledBy === void 0 ? undefined : _ref15$ariaLabelledBy,
26916
+ _ref15$type = _ref15.type,
26915
26917
  type = _ref15$type === void 0 ? "text" : _ref15$type,
26916
26918
  _ref15$labelDisplayOv = _ref15.labelDisplayOverride,
26917
26919
  labelDisplayOverride = _ref15$labelDisplayOv === void 0 ? null : _ref15$labelDisplayOv,
@@ -27018,7 +27020,7 @@ var FormInput = function FormInput(_ref15) {
27018
27020
  }, decorator)))), /*#__PURE__*/React.createElement(Box, {
27019
27021
  padding: "0"
27020
27022
  }, formatter ? /*#__PURE__*/React.createElement(FormattedInputField, _extends({
27021
- "aria-labelledby": createIdFromString(labelTextWhenNoError),
27023
+ "aria-labelledby": ariaLabelledBy === undefined ? createIdFromString(labelTextWhenNoError) : ariaLabelledBy,
27022
27024
  "aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
27023
27025
  "aria-invalid": field.dirty && field.hasErrors || field.hasErrors && showErrors,
27024
27026
  onChange: function onChange(value) {
@@ -27050,7 +27052,7 @@ var FormInput = function FormInput(_ref15) {
27050
27052
  }
27051
27053
  }
27052
27054
  }, props)) : /*#__PURE__*/React.createElement(InputField, _extends({
27053
- "aria-labelledby": createIdFromString(labelTextWhenNoError),
27055
+ "aria-labelledby": ariaLabelledBy === undefined ? createIdFromString(labelTextWhenNoError) : ariaLabelledBy,
27054
27056
  "aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
27055
27057
  "aria-invalid": field.dirty && field.hasErrors || field.hasErrors && showErrors,
27056
27058
  onChange: function onChange(e) {
@@ -47585,22 +47587,28 @@ var PartialAmountField = function PartialAmountField(_ref) {
47585
47587
  moneyFormat = _ref.moneyFormat,
47586
47588
  fieldActions = _ref.fieldActions,
47587
47589
  themeValues = _ref.themeValues;
47590
+ var id = createIdFromString("".concat(lineItem.description, "-").concat(lineItem.subDescription));
47588
47591
  return /*#__PURE__*/React.createElement(FormInput$1, {
47589
- labelTextWhenNoError: createIdFromString("".concat(lineItem.description, "-").concat(lineItem.subDescription)),
47592
+ ariaLabelledBy: null,
47593
+ id: id,
47594
+ labelTextWhenNoError: id,
47590
47595
  labelDisplayOverride: /*#__PURE__*/React.createElement(Stack, {
47591
47596
  childGap: "0px"
47592
- }, /*#__PURE__*/React.createElement(Detail$1, {
47597
+ }, /*#__PURE__*/React.createElement(Box, {
47593
47598
  as: "label",
47594
- "for": createIdFromString("".concat(lineItem.description, "-").concat(lineItem.subDescription)),
47599
+ "for": id,
47600
+ padding: "0"
47601
+ }, /*#__PURE__*/React.createElement(Detail$1, {
47602
+ as: "span",
47603
+ extraStyles: "display: block;",
47595
47604
  variant: themeValues.detailVariant,
47596
47605
  weight: themeValues.weightTitle
47597
- }, /*#__PURE__*/React.createElement(Detail$1, {
47606
+ }, lineItem.description), /*#__PURE__*/React.createElement(Detail$1, {
47598
47607
  as: "span",
47608
+ extraStyles: "display: block;",
47599
47609
  variant: themeValues.detailVariant,
47600
47610
  weight: "400"
47601
- }, lineItem.subDescription), /*#__PURE__*/React.createElement(Box, {
47602
- padding: "0"
47603
- }, lineItem.description))),
47611
+ }, lineItem.subDescription))),
47604
47612
  key: lineItem.id,
47605
47613
  field: field,
47606
47614
  fieldActions: fieldActions,