@thecb/components 9.0.3 → 9.0.4-beta.2
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 +23 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +23 -12
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/alert/Alert.js +7 -3
- package/src/components/atoms/form-layouts/FormInput.js +27 -25
- package/src/components/molecules/partial-amount-form/PartialAmountForm.js +1 -0
- package/src/components/molecules/partial-amount-form/PartialAmountForm.stories.js +146 -0
package/dist/index.esm.js
CHANGED
|
@@ -18754,7 +18754,13 @@ var Alert = function Alert(_ref) {
|
|
|
18754
18754
|
_ref$iconPadding = _ref.iconPadding,
|
|
18755
18755
|
iconPadding = _ref$iconPadding === void 0 ? "0 0 0 1rem" : _ref$iconPadding,
|
|
18756
18756
|
_ref$contentFullHeigh = _ref.contentFullHeight,
|
|
18757
|
-
contentFullHeight = _ref$contentFullHeigh === void 0 ? false : _ref$contentFullHeigh
|
|
18757
|
+
contentFullHeight = _ref$contentFullHeigh === void 0 ? false : _ref$contentFullHeigh,
|
|
18758
|
+
_ref$ariaRole = _ref.ariaRole,
|
|
18759
|
+
ariaRole = _ref$ariaRole === void 0 ? "group" : _ref$ariaRole,
|
|
18760
|
+
_ref$ariaAtomic = _ref.ariaAtomic,
|
|
18761
|
+
ariaAtomic = _ref$ariaAtomic === void 0 ? true : _ref$ariaAtomic,
|
|
18762
|
+
_ref$ariaLive = _ref.ariaLive,
|
|
18763
|
+
ariaLive = _ref$ariaLive === void 0 ? "polite" : _ref$ariaLive;
|
|
18758
18764
|
var Icon = AlertIcons[variant];
|
|
18759
18765
|
var contentPadding = maxContentWidth ? "".concat(padding, " 1rem") : innerContentPadding;
|
|
18760
18766
|
var content = /*#__PURE__*/React.createElement(Sidebar, {
|
|
@@ -18811,8 +18817,9 @@ var Alert = function Alert(_ref) {
|
|
|
18811
18817
|
borderSize: noBorder ? "0px" : "1px",
|
|
18812
18818
|
boxShadow: enableBoxShadow ? (_generateShadows = generateShadows()) === null || _generateShadows === void 0 ? void 0 : (_generateShadows$inse = _generateShadows.inset) === null || _generateShadows$inse === void 0 ? void 0 : _generateShadows$inse.base : "",
|
|
18813
18819
|
extraStyles: extraStyles,
|
|
18814
|
-
role:
|
|
18815
|
-
"aria-atomic":
|
|
18820
|
+
role: ariaRole,
|
|
18821
|
+
"aria-atomic": ariaAtomic,
|
|
18822
|
+
"aria-live": ariaLive
|
|
18816
18823
|
}, maxContentWidth ? /*#__PURE__*/React.createElement(Center, {
|
|
18817
18824
|
maxWidth: maxContentWidth
|
|
18818
18825
|
}, content) : content);
|
|
@@ -26040,7 +26047,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26040
26047
|
$customHeight: customHeight,
|
|
26041
26048
|
$extraStyles: extraStyles,
|
|
26042
26049
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26043
|
-
autoComplete: autocompleteValue
|
|
26050
|
+
autoComplete: autocompleteValue,
|
|
26051
|
+
"aria-busy": true
|
|
26044
26052
|
}, props)) : /*#__PURE__*/React.createElement(InputField, _extends({
|
|
26045
26053
|
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
26046
26054
|
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
@@ -26059,23 +26067,25 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26059
26067
|
$customHeight: customHeight,
|
|
26060
26068
|
$extraStyles: extraStyles,
|
|
26061
26069
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26062
|
-
autoComplete: autocompleteValue
|
|
26063
|
-
|
|
26064
|
-
|
|
26065
|
-
|
|
26066
|
-
"aria-live": "polite",
|
|
26070
|
+
autoComplete: autocompleteValue,
|
|
26071
|
+
"aria-busy": true
|
|
26072
|
+
}, props))), /*#__PURE__*/React.createElement("div", {
|
|
26073
|
+
role: "status",
|
|
26067
26074
|
"aria-atomic": true
|
|
26075
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
26076
|
+
direction: "row",
|
|
26077
|
+
justify: "space-between"
|
|
26068
26078
|
}, field.hasErrors && field.dirty || field.hasErrors && showErrors ? /*#__PURE__*/React.createElement(Text$1, {
|
|
26069
26079
|
color: ERROR_COLOR,
|
|
26070
26080
|
variant: "pXS",
|
|
26071
26081
|
weight: themeValues.fontWeight,
|
|
26072
|
-
extraStyles: "word-break: break-word;\n
|
|
26082
|
+
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
26073
26083
|
id: createIdFromString(labelTextWhenNoError, "error message")
|
|
26074
26084
|
}, errorMessages[field.errors[0]]) : /*#__PURE__*/React.createElement(Text$1, {
|
|
26075
26085
|
extraStyles: "height: ".concat(themeValues.lineHeight, ";")
|
|
26076
26086
|
}), !isMobile && decorator && /*#__PURE__*/React.createElement(Box, {
|
|
26077
26087
|
padding: "0 0 0 auto"
|
|
26078
|
-
}, decorator)));
|
|
26088
|
+
}, decorator))));
|
|
26079
26089
|
};
|
|
26080
26090
|
|
|
26081
26091
|
var FormInput$1 = themeComponent(FormInput, "FormInput", fallbackValues$k, "default");
|
|
@@ -46746,7 +46756,8 @@ var PartialAmountForm = function PartialAmountForm(_ref) {
|
|
|
46746
46756
|
}, "Amount owed:", " ", /*#__PURE__*/React.createElement(Text$1, {
|
|
46747
46757
|
variant: "p",
|
|
46748
46758
|
weight: "600"
|
|
46749
|
-
}, displayCurrency(li.amount)))
|
|
46759
|
+
}, displayCurrency(li.amount))),
|
|
46760
|
+
"aria-busy": true
|
|
46750
46761
|
});
|
|
46751
46762
|
})));
|
|
46752
46763
|
};
|