@jobber/components 6.105.4 → 6.106.0
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.
|
@@ -2744,7 +2744,7 @@ const InputNumberRebuilt = React.forwardRef((props, ref) => {
|
|
|
2744
2744
|
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"]);
|
|
2745
2745
|
const dataAttrs = filterDataAttributes.filterDataAttributes(props);
|
|
2746
2746
|
const stringDescription = typeof description === "string";
|
|
2747
|
-
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); }, onClick: props.onClick, onMouseDown: props.onMouseDown, onMouseUp: props.onMouseUp, onPointerDown: props.onPointerDown, onPointerUp: props.onPointerUp, onChange: handleChange }),
|
|
2747
|
+
return (React.createElement($b91743d66a0ed188$export$63c5fa0b2fdccd2e, Object.assign({}, ariaNumberFieldProps, { className: classnames(styles.container, inline && styles.inline), formatOptions: mergedFormatOptions, isWheelDisabled: true, 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); }, onClick: props.onClick, onMouseDown: props.onMouseDown, onMouseUp: props.onMouseUp, onPointerDown: props.onPointerDown, onPointerUp: props.onPointerUp, onChange: handleChange }),
|
|
2748
2748
|
React.createElement($a049562f99e7db0e$export$eb2fcfdbd7ba97d4, { className: classnames(styles.wrapper, align && styles[align], invalid && styles.invalid, disabled && styles.disabled) },
|
|
2749
2749
|
React.createElement("div", { className: styles.horizontalWrapper },
|
|
2750
2750
|
React.createElement("div", { className: classnames(styles.inputWrapper, disabled && styles.disabled, !showMiniLabel && styles.hideLabel, size && styles[size]) },
|
|
@@ -2742,7 +2742,7 @@ const InputNumberRebuilt = forwardRef((props, ref) => {
|
|
|
2742
2742
|
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"]);
|
|
2743
2743
|
const dataAttrs = filterDataAttributes(props);
|
|
2744
2744
|
const stringDescription = typeof description === "string";
|
|
2745
|
-
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); }, onClick: props.onClick, onMouseDown: props.onMouseDown, onMouseUp: props.onMouseUp, onPointerDown: props.onPointerDown, onPointerUp: props.onPointerUp, onChange: handleChange }),
|
|
2745
|
+
return (React__default.createElement($b91743d66a0ed188$export$63c5fa0b2fdccd2e, Object.assign({}, ariaNumberFieldProps, { className: classnames(styles.container, inline && styles.inline), formatOptions: mergedFormatOptions, isWheelDisabled: true, 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); }, onClick: props.onClick, onMouseDown: props.onMouseDown, onMouseUp: props.onMouseUp, onPointerDown: props.onPointerDown, onPointerUp: props.onPointerUp, onChange: handleChange }),
|
|
2746
2746
|
React__default.createElement($a049562f99e7db0e$export$eb2fcfdbd7ba97d4, { className: classnames(styles.wrapper, align && styles[align], invalid && styles.invalid, disabled && styles.disabled) },
|
|
2747
2747
|
React__default.createElement("div", { className: styles.horizontalWrapper },
|
|
2748
2748
|
React__default.createElement("div", { className: classnames(styles.inputWrapper, disabled && styles.disabled, !showMiniLabel && styles.hideLabel, size && styles[size]) },
|
|
@@ -19,6 +19,16 @@ interface ProgressBarProps {
|
|
|
19
19
|
* @default progress
|
|
20
20
|
*/
|
|
21
21
|
readonly variation?: "progress" | "stepped";
|
|
22
|
+
/** **Use at your own risk:** Custom class names for specific elements. This should only be used as a
|
|
23
|
+
* **last resort**. Using this may result in unexpected side effects.
|
|
24
|
+
* More information in the [Customizing components Guide](https://atlantis.getjobber.com/guides/customizing-components).
|
|
25
|
+
*/
|
|
26
|
+
readonly UNSAFE_className?: string;
|
|
27
|
+
/** **Use at your own risk:** Custom style for specific elements. This should only be used as a
|
|
28
|
+
* **last resort**. Using this may result in unexpected side effects.
|
|
29
|
+
* More information in the [Customizing components Guide](https://atlantis.getjobber.com/guides/customizing-components).
|
|
30
|
+
*/
|
|
31
|
+
readonly UNSAFE_style?: React.CSSProperties;
|
|
22
32
|
}
|
|
23
|
-
export declare function ProgressBar({ currentStep, totalSteps, size, variation, }: ProgressBarProps): React.JSX.Element;
|
|
33
|
+
export declare function ProgressBar({ currentStep, totalSteps, size, variation, UNSAFE_className, UNSAFE_style, }: ProgressBarProps): React.JSX.Element;
|
|
24
34
|
export {};
|
|
@@ -5,6 +5,8 @@ interface ProgressBarSteppedProps {
|
|
|
5
5
|
readonly totalSteps: number;
|
|
6
6
|
readonly percentage: number;
|
|
7
7
|
readonly size?: keyof typeof sizes;
|
|
8
|
+
readonly UNSAFE_className?: string;
|
|
9
|
+
readonly UNSAFE_style?: React.CSSProperties;
|
|
8
10
|
}
|
|
9
|
-
export declare function ProgressBarStepped({ currentStep, totalSteps, percentage, size, }: ProgressBarSteppedProps): React.JSX.Element;
|
|
11
|
+
export declare function ProgressBarStepped({ currentStep, totalSteps, percentage, size, UNSAFE_className, UNSAFE_style, }: ProgressBarSteppedProps): React.JSX.Element;
|
|
10
12
|
export {};
|
package/dist/ProgressBar-cjs.js
CHANGED
|
@@ -7,10 +7,10 @@ var styles = {"ProgressBar":"p9AgTzIbTwY-","SteppedProgressBar":"w8NAw4ZMB6g-","
|
|
|
7
7
|
|
|
8
8
|
var sizes = {"smaller":"dylWWgubHwM-","small":"z92YJQrscvI-","base":"DKfNM1to61A-","spinning":"GHfs7cB4nQQ-"};
|
|
9
9
|
|
|
10
|
-
function ProgressBarStepped({ currentStep, totalSteps, percentage, size = "base", }) {
|
|
10
|
+
function ProgressBarStepped({ currentStep, totalSteps, percentage, size = "base", UNSAFE_className, UNSAFE_style, }) {
|
|
11
11
|
const steppedProgressBarClassName = classnames(styles.ProgressBar, styles.SteppedProgressBar, sizes[size]);
|
|
12
12
|
const ariaLabel = `progress, ${currentStep} out of ${totalSteps}`;
|
|
13
|
-
return (React.createElement("div", { role: "progressbar", className: styles.wrapper, "aria-valuenow": percentage, "aria-valuetext": ariaLabel }, Array.from({ length: totalSteps }).map((_, index) => {
|
|
13
|
+
return (React.createElement("div", { role: "progressbar", className: classnames(styles.wrapper, UNSAFE_className), "data-testid": "progressbar-wrapper", style: UNSAFE_style, "aria-valuenow": percentage, "aria-valuetext": ariaLabel }, Array.from({ length: totalSteps }).map((_, index) => {
|
|
14
14
|
const step = index + 1;
|
|
15
15
|
const value = step <= currentStep ? 100 : 0;
|
|
16
16
|
return (React.createElement("progress", { key: step, className: steppedProgressBarClassName, value: value, "data-testid": "progress-step" },
|
|
@@ -19,13 +19,13 @@ function ProgressBarStepped({ currentStep, totalSteps, percentage, size = "base"
|
|
|
19
19
|
})));
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
function ProgressBar({ currentStep, totalSteps, size = "base", variation = "progress", }) {
|
|
22
|
+
function ProgressBar({ currentStep, totalSteps, size = "base", variation = "progress", UNSAFE_className, UNSAFE_style, }) {
|
|
23
23
|
const percentage = (currentStep / totalSteps) * 100;
|
|
24
24
|
const progressBarClassName = classnames(styles.ProgressBar, sizes[size]);
|
|
25
25
|
if (variation === "stepped") {
|
|
26
|
-
return (React.createElement(ProgressBarStepped, { currentStep: currentStep, totalSteps: totalSteps, percentage: percentage, size: size }));
|
|
26
|
+
return (React.createElement(ProgressBarStepped, { currentStep: currentStep, totalSteps: totalSteps, percentage: percentage, size: size, UNSAFE_className: UNSAFE_className, UNSAFE_style: UNSAFE_style }));
|
|
27
27
|
}
|
|
28
|
-
return (React.createElement("progress", { className: progressBarClassName, max: totalSteps, value: currentStep },
|
|
28
|
+
return (React.createElement("progress", { className: classnames(progressBarClassName, UNSAFE_className), style: UNSAFE_style, max: totalSteps, value: currentStep },
|
|
29
29
|
percentage,
|
|
30
30
|
"%"));
|
|
31
31
|
}
|
package/dist/ProgressBar-es.js
CHANGED
|
@@ -5,10 +5,10 @@ var styles = {"ProgressBar":"p9AgTzIbTwY-","SteppedProgressBar":"w8NAw4ZMB6g-","
|
|
|
5
5
|
|
|
6
6
|
var sizes = {"smaller":"dylWWgubHwM-","small":"z92YJQrscvI-","base":"DKfNM1to61A-","spinning":"GHfs7cB4nQQ-"};
|
|
7
7
|
|
|
8
|
-
function ProgressBarStepped({ currentStep, totalSteps, percentage, size = "base", }) {
|
|
8
|
+
function ProgressBarStepped({ currentStep, totalSteps, percentage, size = "base", UNSAFE_className, UNSAFE_style, }) {
|
|
9
9
|
const steppedProgressBarClassName = classnames(styles.ProgressBar, styles.SteppedProgressBar, sizes[size]);
|
|
10
10
|
const ariaLabel = `progress, ${currentStep} out of ${totalSteps}`;
|
|
11
|
-
return (React__default.createElement("div", { role: "progressbar", className: styles.wrapper, "aria-valuenow": percentage, "aria-valuetext": ariaLabel }, Array.from({ length: totalSteps }).map((_, index) => {
|
|
11
|
+
return (React__default.createElement("div", { role: "progressbar", className: classnames(styles.wrapper, UNSAFE_className), "data-testid": "progressbar-wrapper", style: UNSAFE_style, "aria-valuenow": percentage, "aria-valuetext": ariaLabel }, Array.from({ length: totalSteps }).map((_, index) => {
|
|
12
12
|
const step = index + 1;
|
|
13
13
|
const value = step <= currentStep ? 100 : 0;
|
|
14
14
|
return (React__default.createElement("progress", { key: step, className: steppedProgressBarClassName, value: value, "data-testid": "progress-step" },
|
|
@@ -17,13 +17,13 @@ function ProgressBarStepped({ currentStep, totalSteps, percentage, size = "base"
|
|
|
17
17
|
})));
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
function ProgressBar({ currentStep, totalSteps, size = "base", variation = "progress", }) {
|
|
20
|
+
function ProgressBar({ currentStep, totalSteps, size = "base", variation = "progress", UNSAFE_className, UNSAFE_style, }) {
|
|
21
21
|
const percentage = (currentStep / totalSteps) * 100;
|
|
22
22
|
const progressBarClassName = classnames(styles.ProgressBar, sizes[size]);
|
|
23
23
|
if (variation === "stepped") {
|
|
24
|
-
return (React__default.createElement(ProgressBarStepped, { currentStep: currentStep, totalSteps: totalSteps, percentage: percentage, size: size }));
|
|
24
|
+
return (React__default.createElement(ProgressBarStepped, { currentStep: currentStep, totalSteps: totalSteps, percentage: percentage, size: size, UNSAFE_className: UNSAFE_className, UNSAFE_style: UNSAFE_style }));
|
|
25
25
|
}
|
|
26
|
-
return (React__default.createElement("progress", { className: progressBarClassName, max: totalSteps, value: currentStep },
|
|
26
|
+
return (React__default.createElement("progress", { className: classnames(progressBarClassName, UNSAFE_className), style: UNSAFE_style, max: totalSteps, value: currentStep },
|
|
27
27
|
percentage,
|
|
28
28
|
"%"));
|
|
29
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.106.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -538,5 +538,5 @@
|
|
|
538
538
|
"> 1%",
|
|
539
539
|
"IE 10"
|
|
540
540
|
],
|
|
541
|
-
"gitHead": "
|
|
541
|
+
"gitHead": "ea9cbb709f05442a469763a4f12a332a59cb6350"
|
|
542
542
|
}
|