@dynamic-framework/ui-react 1.32.0 → 1.32.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.
- package/dist/css/dynamic-ui-non-root.css +3 -1
- package/dist/css/dynamic-ui-non-root.min.css +2 -2
- package/dist/css/dynamic-ui-root.css +15 -15
- package/dist/css/dynamic-ui-root.min.css +2 -2
- package/dist/css/dynamic-ui.css +17 -15
- package/dist/css/dynamic-ui.min.css +2 -2
- package/dist/index.esm.js +12 -19
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +12 -19
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/style/abstracts/variables/_colors.scss +14 -14
- package/src/style/components/_d-input-pin.scss +1 -0
- package/src/style/root/_root.scss +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -808,27 +808,20 @@ function useInputCurrency(currencyOptions, value, onFocus, onChange, onBlur, ref
|
|
|
808
808
|
color: `var(--${PREFIX_BS}input-currency-symbol-color)`,
|
|
809
809
|
}), []);
|
|
810
810
|
const handleOnChange = useCallback((newValue) => {
|
|
811
|
-
const newNumber = (newValue === undefined || newValue === '')
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(innerNumber);
|
|
819
|
-
}, [onChange, innerNumber]);
|
|
811
|
+
const newNumber = (newValue === undefined || newValue === '') ? undefined : Number(newValue);
|
|
812
|
+
if (newNumber !== innerNumber) {
|
|
813
|
+
setInnerNumber(newNumber);
|
|
814
|
+
setInnerString(formatValue(newNumber, currencyOptions));
|
|
815
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newNumber);
|
|
816
|
+
}
|
|
817
|
+
}, [currencyOptions, onChange, innerNumber]);
|
|
820
818
|
useEffect(() => {
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
if (value === undefined || value.toString() === '') {
|
|
825
|
-
return '';
|
|
819
|
+
if (value !== innerNumber) {
|
|
820
|
+
setInnerNumber(value);
|
|
821
|
+
setInnerString(formatValue(value, currencyOptions));
|
|
826
822
|
}
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
: innerString;
|
|
830
|
-
return valueToUse !== null && valueToUse !== void 0 ? valueToUse : '';
|
|
831
|
-
}, [value, innerType, innerNumber, innerString]);
|
|
823
|
+
}, [value, currencyOptions, innerNumber]);
|
|
824
|
+
const innerValue = useMemo(() => { var _a; return (innerType === 'number' ? (_a = innerNumber === null || innerNumber === void 0 ? void 0 : innerNumber.toString()) !== null && _a !== void 0 ? _a : '' : innerString !== null && innerString !== void 0 ? innerString : ''); }, [innerType, innerNumber, innerString]);
|
|
832
825
|
return {
|
|
833
826
|
inputRef,
|
|
834
827
|
innerValue,
|