@jobber/components 6.75.0 → 6.75.1
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.
|
@@ -7711,6 +7711,7 @@ const InputNumberRebuilt = React.forwardRef((props, ref) => {
|
|
|
7711
7711
|
},
|
|
7712
7712
|
}));
|
|
7713
7713
|
const { align, description, disabled, error, inline, invalid, placeholder, readonly, showMiniLabel = true, size, minValue, maxValue } = props, ariaNumberFieldProps = tslib_es6.__rest(props, ["align", "description", "disabled", "error", "inline", "invalid", "placeholder", "readonly", "showMiniLabel", "size", "minValue", "maxValue"]);
|
|
7714
|
+
const stringDescription = typeof description === "string";
|
|
7714
7715
|
return (React.createElement($b91743d66a0ed188$export$63c5fa0b2fdccd2e, Object.assign({}, ariaNumberFieldProps, { className: classnames(styles.container, inline && styles.inline), formatOptions: mergedFormatOptions, isDisabled: disabled, isInvalid: invalid, isReadOnly: readonly, minValue: minValue, maxValue: maxValue, onBlur: e => { var _a; return (_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props, e); }, onFocus: e => { var _a; return (_a = props.onFocus) === null || _a === void 0 ? void 0 : _a.call(props, e); }, onChange: handleChange }),
|
|
7715
7716
|
React.createElement($a049562f99e7db0e$export$eb2fcfdbd7ba97d4, { className: classnames(styles.wrapper, align && styles[align], invalid && styles.invalid, disabled && styles.disabled) },
|
|
7716
7717
|
React.createElement("div", { className: styles.horizontalWrapper },
|
|
@@ -7718,8 +7719,7 @@ const InputNumberRebuilt = React.forwardRef((props, ref) => {
|
|
|
7718
7719
|
React.createElement($3985021b0ad6602f$export$f5b8910cec6cf069, { className: styles.input, placeholder: " " // used for CSS minilabel
|
|
7719
7720
|
, ref: inputRef }),
|
|
7720
7721
|
React.createElement($01b77f81d0f07f68$export$b04be29aa201d4f5, { className: styles.label }, placeholder)))),
|
|
7721
|
-
description && (React.createElement($514c0188e459b4c0$export$5f1af8db9871e1d6, { className: styles.description, elementType: "div", slot: "description" },
|
|
7722
|
-
React.createElement(Text.Text, { size: "small", variation: "subdued" }, description))),
|
|
7722
|
+
description && (React.createElement($514c0188e459b4c0$export$5f1af8db9871e1d6, { className: styles.description, elementType: "div", slot: "description" }, stringDescription ? (React.createElement(Text.Text, { size: "small", variation: "subdued" }, description)) : (description))),
|
|
7723
7723
|
error && (React.createElement($ee014567cb39d3f0$export$f551688fc98f2e09, { className: styles.fieldError },
|
|
7724
7724
|
React.createElement(Icon.Icon, { color: "critical", name: "alert", size: "small" }),
|
|
7725
7725
|
React.createElement(Text.Text, { size: "small", variation: "error" }, error)))));
|
|
@@ -7709,6 +7709,7 @@ const InputNumberRebuilt = forwardRef((props, ref) => {
|
|
|
7709
7709
|
},
|
|
7710
7710
|
}));
|
|
7711
7711
|
const { align, description, disabled, error, inline, invalid, placeholder, readonly, showMiniLabel = true, size, minValue, maxValue } = props, ariaNumberFieldProps = __rest(props, ["align", "description", "disabled", "error", "inline", "invalid", "placeholder", "readonly", "showMiniLabel", "size", "minValue", "maxValue"]);
|
|
7712
|
+
const stringDescription = typeof description === "string";
|
|
7712
7713
|
return (React__default.createElement($b91743d66a0ed188$export$63c5fa0b2fdccd2e, Object.assign({}, ariaNumberFieldProps, { className: classnames(styles.container, inline && styles.inline), formatOptions: mergedFormatOptions, isDisabled: disabled, isInvalid: invalid, isReadOnly: readonly, minValue: minValue, maxValue: maxValue, onBlur: e => { var _a; return (_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props, e); }, onFocus: e => { var _a; return (_a = props.onFocus) === null || _a === void 0 ? void 0 : _a.call(props, e); }, onChange: handleChange }),
|
|
7713
7714
|
React__default.createElement($a049562f99e7db0e$export$eb2fcfdbd7ba97d4, { className: classnames(styles.wrapper, align && styles[align], invalid && styles.invalid, disabled && styles.disabled) },
|
|
7714
7715
|
React__default.createElement("div", { className: styles.horizontalWrapper },
|
|
@@ -7716,8 +7717,7 @@ const InputNumberRebuilt = forwardRef((props, ref) => {
|
|
|
7716
7717
|
React__default.createElement($3985021b0ad6602f$export$f5b8910cec6cf069, { className: styles.input, placeholder: " " // used for CSS minilabel
|
|
7717
7718
|
, ref: inputRef }),
|
|
7718
7719
|
React__default.createElement($01b77f81d0f07f68$export$b04be29aa201d4f5, { className: styles.label }, placeholder)))),
|
|
7719
|
-
description && (React__default.createElement($514c0188e459b4c0$export$5f1af8db9871e1d6, { className: styles.description, elementType: "div", slot: "description" },
|
|
7720
|
-
React__default.createElement(Text, { size: "small", variation: "subdued" }, description))),
|
|
7720
|
+
description && (React__default.createElement($514c0188e459b4c0$export$5f1af8db9871e1d6, { className: styles.description, elementType: "div", slot: "description" }, stringDescription ? (React__default.createElement(Text, { size: "small", variation: "subdued" }, description)) : (description))),
|
|
7721
7721
|
error && (React__default.createElement($ee014567cb39d3f0$export$f551688fc98f2e09, { className: styles.fieldError },
|
|
7722
7722
|
React__default.createElement(Icon, { color: "critical", name: "alert", size: "small" }),
|
|
7723
7723
|
React__default.createElement(Text, { size: "small", variation: "error" }, error)))));
|
|
@@ -1075,7 +1075,17 @@ var polyfilled = useResizeObserver$1;
|
|
|
1075
1075
|
width: undefined,
|
|
1076
1076
|
height: undefined,
|
|
1077
1077
|
});
|
|
1078
|
-
const onResize = (0, react_1.useMemo)(() =>
|
|
1078
|
+
const onResize = (0, react_1.useMemo)(() => {
|
|
1079
|
+
return (0, throttle_1.default)(({ width, height }) => {
|
|
1080
|
+
if (!width || width <= 1) {
|
|
1081
|
+
// Ignore invalid values. ResizeObserver is unexpectedly looping between 1 and the actual
|
|
1082
|
+
// width of the element. This is only happening in playwright chromium.
|
|
1083
|
+
// Soon we need to replace this unmaintained package with a more reliable one.
|
|
1084
|
+
return;
|
|
1085
|
+
}
|
|
1086
|
+
setSize({ width, height });
|
|
1087
|
+
}, wait);
|
|
1088
|
+
}, []);
|
|
1079
1089
|
const { ref } = (0, polyfilled_1.default)({
|
|
1080
1090
|
onResize,
|
|
1081
1091
|
});
|
|
@@ -1073,7 +1073,17 @@ var polyfilled = useResizeObserver$1;
|
|
|
1073
1073
|
width: undefined,
|
|
1074
1074
|
height: undefined,
|
|
1075
1075
|
});
|
|
1076
|
-
const onResize = (0, react_1.useMemo)(() =>
|
|
1076
|
+
const onResize = (0, react_1.useMemo)(() => {
|
|
1077
|
+
return (0, throttle_1$1.default)(({ width, height }) => {
|
|
1078
|
+
if (!width || width <= 1) {
|
|
1079
|
+
// Ignore invalid values. ResizeObserver is unexpectedly looping between 1 and the actual
|
|
1080
|
+
// width of the element. This is only happening in playwright chromium.
|
|
1081
|
+
// Soon we need to replace this unmaintained package with a more reliable one.
|
|
1082
|
+
return;
|
|
1083
|
+
}
|
|
1084
|
+
setSize({ width, height });
|
|
1085
|
+
}, wait);
|
|
1086
|
+
}, []);
|
|
1077
1087
|
const { ref } = (0, polyfilled_1.default)({
|
|
1078
1088
|
onResize,
|
|
1079
1089
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "6.75.
|
|
3
|
+
"version": "6.75.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -542,5 +542,5 @@
|
|
|
542
542
|
"> 1%",
|
|
543
543
|
"IE 10"
|
|
544
544
|
],
|
|
545
|
-
"gitHead": "
|
|
545
|
+
"gitHead": "bde310bbb97ae2d73e8590aa56df407087bb62bd"
|
|
546
546
|
}
|