@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.cjs.js +19 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +19 -11
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/form-layouts/FormInput.js +11 -2
- package/src/components/molecules/partial-amount-form/PartialAmountField.js +53 -43
package/dist/index.cjs.js
CHANGED
|
@@ -26858,7 +26858,7 @@ var fallbackValues$n = {
|
|
|
26858
26858
|
};
|
|
26859
26859
|
|
|
26860
26860
|
var _excluded$y = ["showErrors", "themeValues"],
|
|
26861
|
-
_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"];
|
|
26861
|
+
_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"];
|
|
26862
26862
|
var InputField = styled__default.input.withConfig({
|
|
26863
26863
|
displayName: "FormInput__InputField",
|
|
26864
26864
|
componentId: "sc-l094r1-0"
|
|
@@ -26919,7 +26919,9 @@ var FormattedInputField = styled__default(function (_ref8) {
|
|
|
26919
26919
|
return styled.css(["", ""], extraStyles);
|
|
26920
26920
|
});
|
|
26921
26921
|
var FormInput = function FormInput(_ref15) {
|
|
26922
|
-
var _ref15$
|
|
26922
|
+
var _ref15$ariaLabelledBy = _ref15.ariaLabelledBy,
|
|
26923
|
+
ariaLabelledBy = _ref15$ariaLabelledBy === void 0 ? undefined : _ref15$ariaLabelledBy,
|
|
26924
|
+
_ref15$type = _ref15.type,
|
|
26923
26925
|
type = _ref15$type === void 0 ? "text" : _ref15$type,
|
|
26924
26926
|
_ref15$labelDisplayOv = _ref15.labelDisplayOverride,
|
|
26925
26927
|
labelDisplayOverride = _ref15$labelDisplayOv === void 0 ? null : _ref15$labelDisplayOv,
|
|
@@ -27026,7 +27028,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
27026
27028
|
}, decorator)))), /*#__PURE__*/React__default.createElement(Box, {
|
|
27027
27029
|
padding: "0"
|
|
27028
27030
|
}, formatter ? /*#__PURE__*/React__default.createElement(FormattedInputField, _extends({
|
|
27029
|
-
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
27031
|
+
"aria-labelledby": ariaLabelledBy === undefined ? createIdFromString(labelTextWhenNoError) : ariaLabelledBy,
|
|
27030
27032
|
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
27031
27033
|
"aria-invalid": field.dirty && field.hasErrors || field.hasErrors && showErrors,
|
|
27032
27034
|
onChange: function onChange(value) {
|
|
@@ -27058,7 +27060,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
27058
27060
|
}
|
|
27059
27061
|
}
|
|
27060
27062
|
}, props)) : /*#__PURE__*/React__default.createElement(InputField, _extends({
|
|
27061
|
-
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
27063
|
+
"aria-labelledby": ariaLabelledBy === undefined ? createIdFromString(labelTextWhenNoError) : ariaLabelledBy,
|
|
27062
27064
|
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
27063
27065
|
"aria-invalid": field.dirty && field.hasErrors || field.hasErrors && showErrors,
|
|
27064
27066
|
onChange: function onChange(e) {
|
|
@@ -47593,22 +47595,28 @@ var PartialAmountField = function PartialAmountField(_ref) {
|
|
|
47593
47595
|
moneyFormat = _ref.moneyFormat,
|
|
47594
47596
|
fieldActions = _ref.fieldActions,
|
|
47595
47597
|
themeValues = _ref.themeValues;
|
|
47598
|
+
var id = createIdFromString("".concat(lineItem.description, "-").concat(lineItem.subDescription));
|
|
47596
47599
|
return /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
47597
|
-
|
|
47600
|
+
ariaLabelledBy: null,
|
|
47601
|
+
id: id,
|
|
47602
|
+
labelTextWhenNoError: id,
|
|
47598
47603
|
labelDisplayOverride: /*#__PURE__*/React__default.createElement(Stack, {
|
|
47599
47604
|
childGap: "0px"
|
|
47600
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
47605
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
47601
47606
|
as: "label",
|
|
47602
|
-
"for":
|
|
47607
|
+
"for": id,
|
|
47608
|
+
padding: "0"
|
|
47609
|
+
}, /*#__PURE__*/React__default.createElement(Detail$1, {
|
|
47610
|
+
as: "span",
|
|
47611
|
+
extraStyles: "display: block;",
|
|
47603
47612
|
variant: themeValues.detailVariant,
|
|
47604
47613
|
weight: themeValues.weightTitle
|
|
47605
|
-
}, /*#__PURE__*/React__default.createElement(Detail$1, {
|
|
47614
|
+
}, lineItem.description), /*#__PURE__*/React__default.createElement(Detail$1, {
|
|
47606
47615
|
as: "span",
|
|
47616
|
+
extraStyles: "display: block;",
|
|
47607
47617
|
variant: themeValues.detailVariant,
|
|
47608
47618
|
weight: "400"
|
|
47609
|
-
}, lineItem.subDescription),
|
|
47610
|
-
padding: "0"
|
|
47611
|
-
}, lineItem.description))),
|
|
47619
|
+
}, lineItem.subDescription))),
|
|
47612
47620
|
key: lineItem.id,
|
|
47613
47621
|
field: field,
|
|
47614
47622
|
fieldActions: fieldActions,
|