@jobber/components 6.105.4-CLEANUPnp-26c9858.2 → 6.105.5
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/README.md
CHANGED
|
@@ -2,7 +2,7 @@ import type { PropsWithChildren, ReactNode } from "react";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import type { Clearable } from "@jobber/hooks";
|
|
4
4
|
import type { FormFieldProps } from "./FormFieldTypes";
|
|
5
|
-
export interface FormFieldWrapperProps extends FormFieldProps {
|
|
5
|
+
export interface FormFieldWrapperProps extends Omit<FormFieldProps, "maxLength"> {
|
|
6
6
|
readonly error: string;
|
|
7
7
|
readonly identifier: string;
|
|
8
8
|
readonly descriptionIdentifier: string;
|
|
@@ -10,6 +10,10 @@ export interface FormFieldWrapperProps extends FormFieldProps {
|
|
|
10
10
|
readonly onClear?: () => void;
|
|
11
11
|
readonly showMiniLabel?: boolean;
|
|
12
12
|
readonly readonly?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Avoid using FormFieldWrapper's maxLength implementation. It is flawed and only exists for backwards compatibility on v1 components.
|
|
15
|
+
*/
|
|
16
|
+
readonly maxLength?: number;
|
|
13
17
|
}
|
|
14
18
|
export declare function FormFieldWrapper({ align, description, descriptionIdentifier, placeholder, value, children, invalid, error, size, prefix, suffix, max, maxLength, type, disabled, inline, identifier, clearable, onClear, readonly, toolbar, toolbarVisibility, showMiniLabel, wrapperRef, }: PropsWithChildren<FormFieldWrapperProps>): React.JSX.Element;
|
|
15
19
|
/**
|
|
@@ -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]) },
|
|
@@ -11,9 +11,8 @@ export interface RowRange {
|
|
|
11
11
|
*/
|
|
12
12
|
interface InputLengthConstraint {
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* Future work will separate these concerns.
|
|
14
|
+
* The maximum number of characters supported by the input.
|
|
15
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefmaxlength}
|
|
17
16
|
*/
|
|
18
17
|
readonly maxLength?: number;
|
|
19
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "6.105.
|
|
3
|
+
"version": "6.105.5",
|
|
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": "8e175ccfeb6b342a93804023828d3c0e35737b77"
|
|
542
542
|
}
|