x-ui-design 1.0.24 → 1.0.26
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/esm/types/components/Input/Input.d.ts +26 -3
- package/dist/esm/types/index.d.ts +24 -1
- package/dist/esm/types/types/input.d.ts +1 -2
- package/dist/index.d.ts +26 -2
- package/dist/index.esm.js +4 -14
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4 -14
- package/dist/index.js.map +1 -1
- package/lib/components/Input/Input.tsx +6 -16
- package/lib/types/input.ts +1 -2
- package/package.json +1 -1
- package/src/app/page.tsx +1 -6
package/dist/index.js
CHANGED
|
@@ -3870,13 +3870,10 @@ const InputComponent = /*#__PURE__*/React.forwardRef(({
|
|
|
3870
3870
|
mask,
|
|
3871
3871
|
maskChar = MASK_CHAR,
|
|
3872
3872
|
maskRegex = MASK_REGEX,
|
|
3873
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3874
3873
|
// @ts-expect-error
|
|
3875
3874
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3876
3875
|
__injected,
|
|
3877
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3878
3876
|
defaultValue,
|
|
3879
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3880
3877
|
child,
|
|
3881
3878
|
...props
|
|
3882
3879
|
}, ref) => {
|
|
@@ -3887,21 +3884,14 @@ const InputComponent = /*#__PURE__*/React.forwardRef(({
|
|
|
3887
3884
|
const [iconRenderVisible, setIconRenderVisible] = React.useState(false);
|
|
3888
3885
|
const animationRef = React.useRef(null);
|
|
3889
3886
|
React.useImperativeHandle(ref, () => ({
|
|
3890
|
-
focus: () =>
|
|
3891
|
-
|
|
3892
|
-
inputRef.current?.focus();
|
|
3893
|
-
},
|
|
3894
|
-
blur: () => {
|
|
3895
|
-
inputRef.current?.blur();
|
|
3896
|
-
},
|
|
3887
|
+
focus: () => inputRef.current?.focus(),
|
|
3888
|
+
blur: () => inputRef.current?.blur(),
|
|
3897
3889
|
input: inputRef.current,
|
|
3898
3890
|
nativeElement: inputRef.current,
|
|
3899
3891
|
setSelectionRange: (start, end) => {
|
|
3900
|
-
|
|
3901
|
-
inputRef.current.setSelectionRange(start, end);
|
|
3902
|
-
}
|
|
3892
|
+
inputRef.current?.setSelectionRange(start, end);
|
|
3903
3893
|
}
|
|
3904
|
-
})
|
|
3894
|
+
}));
|
|
3905
3895
|
React.useEffect(() => {
|
|
3906
3896
|
setMaskValue(mask ? applyMask(stripMask(`${value ?? ''}`, mask, maskChar), mask, maskChar).masked : value ?? '');
|
|
3907
3897
|
}, [value, mask, maskChar]);
|