@northlight/ui 2.30.0 → 2.31.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.
- package/dist/es/northlight.d.ts +46 -5
- package/dist/es/northlight.js +18 -10
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +18 -10
- package/dist/umd/northlight.cjs.map +1 -1
- package/dist/umd/northlight.min.cjs +2 -2
- package/dist/umd/northlight.min.cjs.map +1 -1
- package/package.json +2 -2
package/dist/umd/northlight.cjs
CHANGED
|
@@ -14238,14 +14238,20 @@
|
|
|
14238
14238
|
size,
|
|
14239
14239
|
value,
|
|
14240
14240
|
placeholder,
|
|
14241
|
-
|
|
14241
|
+
precision,
|
|
14242
|
+
formatPreset,
|
|
14243
|
+
isDisabled,
|
|
14244
|
+
isReadOnly
|
|
14242
14245
|
} = _b, rest = __objRest$1(_b, [
|
|
14243
14246
|
"onChange",
|
|
14244
14247
|
"options",
|
|
14245
14248
|
"size",
|
|
14246
14249
|
"value",
|
|
14247
14250
|
"placeholder",
|
|
14248
|
-
"
|
|
14251
|
+
"precision",
|
|
14252
|
+
"formatPreset",
|
|
14253
|
+
"isDisabled",
|
|
14254
|
+
"isReadOnly"
|
|
14249
14255
|
]);
|
|
14250
14256
|
const { isOpen, onToggle, onClose } = react.useDisclosure();
|
|
14251
14257
|
const [inputValue, setInputValue] = React.useState(value ? value.input : 0);
|
|
@@ -14254,9 +14260,9 @@
|
|
|
14254
14260
|
const buttonRef = React.useRef();
|
|
14255
14261
|
const selectRef = React.useRef();
|
|
14256
14262
|
const handleInputChange = (newInputvalue) => {
|
|
14257
|
-
setInputValue(Number(newInputvalue));
|
|
14263
|
+
setInputValue(Number(newInputvalue.floatValue));
|
|
14258
14264
|
onChange == null ? void 0 : onChange({
|
|
14259
|
-
input: Number(newInputvalue),
|
|
14265
|
+
input: Number(newInputvalue.floatValue),
|
|
14260
14266
|
option: selectOption
|
|
14261
14267
|
});
|
|
14262
14268
|
};
|
|
@@ -14288,17 +14294,19 @@
|
|
|
14288
14294
|
selectRef.current.focus();
|
|
14289
14295
|
}
|
|
14290
14296
|
}, [enableSelectInput]);
|
|
14291
|
-
return /* @__PURE__ */ React.createElement(react.InputGroup,
|
|
14292
|
-
|
|
14297
|
+
return /* @__PURE__ */ React.createElement(react.InputGroup, null, /* @__PURE__ */ React.createElement(
|
|
14298
|
+
FormattedNumberInput,
|
|
14293
14299
|
__spreadValues$1({
|
|
14294
14300
|
width: "100%",
|
|
14295
|
-
overflow: "hidden",
|
|
14296
14301
|
onChange: handleInputChange,
|
|
14297
14302
|
defaultValue: inputValue,
|
|
14298
14303
|
placeholder,
|
|
14299
|
-
|
|
14300
|
-
|
|
14301
|
-
|
|
14304
|
+
size,
|
|
14305
|
+
numberOfDecimals: precision,
|
|
14306
|
+
preset: formatPreset,
|
|
14307
|
+
disabled: isDisabled,
|
|
14308
|
+
readOnly: isReadOnly
|
|
14309
|
+
}, rest)
|
|
14302
14310
|
), /* @__PURE__ */ React.createElement(
|
|
14303
14311
|
react.InputRightElement,
|
|
14304
14312
|
{
|