@esic-lab/data-core-ui 0.0.71 → 0.0.72
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/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -10
- package/dist/index.mjs +3 -10
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -259,6 +259,7 @@ declare function InputField({ value, onChange, placeholder, label, required, dis
|
|
|
259
259
|
interface InputFieldNumberProps {
|
|
260
260
|
value: number | string | null;
|
|
261
261
|
onChange: (value: number | string | null) => void;
|
|
262
|
+
onBlur?: (e: HTMLInputElement) => void;
|
|
262
263
|
placeholder?: string;
|
|
263
264
|
label?: string;
|
|
264
265
|
required?: boolean;
|
|
@@ -282,7 +283,7 @@ interface InputFieldNumberProps {
|
|
|
282
283
|
decimalScale?: number;
|
|
283
284
|
format?: "number" | "currency";
|
|
284
285
|
}
|
|
285
|
-
declare function InputFieldNumber({ value, onChange, placeholder, label, required, disabled, error, addonBefore, addonAfter, defaultValue, className, max, min, controls, size, changeOnWheel, formatter, parser, decimal, decimalScale, format, }: InputFieldNumberProps): react_jsx_runtime.JSX.Element;
|
|
286
|
+
declare function InputFieldNumber({ value, onChange, onBlur, placeholder, label, required, disabled, error, addonBefore, addonAfter, defaultValue, className, max, min, controls, size, changeOnWheel, formatter, parser, decimal, decimalScale, format, }: InputFieldNumberProps): react_jsx_runtime.JSX.Element;
|
|
286
287
|
|
|
287
288
|
interface DatePickerBasicProps {
|
|
288
289
|
value: Date | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -259,6 +259,7 @@ declare function InputField({ value, onChange, placeholder, label, required, dis
|
|
|
259
259
|
interface InputFieldNumberProps {
|
|
260
260
|
value: number | string | null;
|
|
261
261
|
onChange: (value: number | string | null) => void;
|
|
262
|
+
onBlur?: (e: HTMLInputElement) => void;
|
|
262
263
|
placeholder?: string;
|
|
263
264
|
label?: string;
|
|
264
265
|
required?: boolean;
|
|
@@ -282,7 +283,7 @@ interface InputFieldNumberProps {
|
|
|
282
283
|
decimalScale?: number;
|
|
283
284
|
format?: "number" | "currency";
|
|
284
285
|
}
|
|
285
|
-
declare function InputFieldNumber({ value, onChange, placeholder, label, required, disabled, error, addonBefore, addonAfter, defaultValue, className, max, min, controls, size, changeOnWheel, formatter, parser, decimal, decimalScale, format, }: InputFieldNumberProps): react_jsx_runtime.JSX.Element;
|
|
286
|
+
declare function InputFieldNumber({ value, onChange, onBlur, placeholder, label, required, disabled, error, addonBefore, addonAfter, defaultValue, className, max, min, controls, size, changeOnWheel, formatter, parser, decimal, decimalScale, format, }: InputFieldNumberProps): react_jsx_runtime.JSX.Element;
|
|
286
287
|
|
|
287
288
|
interface DatePickerBasicProps {
|
|
288
289
|
value: Date | null;
|
package/dist/index.js
CHANGED
|
@@ -1360,6 +1360,7 @@ var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
|
1360
1360
|
function InputFieldNumber({
|
|
1361
1361
|
value,
|
|
1362
1362
|
onChange,
|
|
1363
|
+
onBlur,
|
|
1363
1364
|
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1364
1365
|
label,
|
|
1365
1366
|
required,
|
|
@@ -1418,6 +1419,7 @@ function InputFieldNumber({
|
|
|
1418
1419
|
{
|
|
1419
1420
|
value: value ?? void 0,
|
|
1420
1421
|
onChange: (val) => onChange(val),
|
|
1422
|
+
onBlur: (e) => onBlur?.(e.target),
|
|
1421
1423
|
placeholder,
|
|
1422
1424
|
disabled,
|
|
1423
1425
|
className: `body-1 !w-full ${className ?? ""}`,
|
|
@@ -1434,16 +1436,7 @@ function InputFieldNumber({
|
|
|
1434
1436
|
precision: decimal ? safeScale : 0,
|
|
1435
1437
|
inputMode: decimal ? "decimal" : "numeric",
|
|
1436
1438
|
onKeyDown: (e) => {
|
|
1437
|
-
const allowed = [
|
|
1438
|
-
"Backspace",
|
|
1439
|
-
"Delete",
|
|
1440
|
-
"ArrowLeft",
|
|
1441
|
-
"ArrowRight",
|
|
1442
|
-
"Tab",
|
|
1443
|
-
"Enter",
|
|
1444
|
-
"Home",
|
|
1445
|
-
"End"
|
|
1446
|
-
];
|
|
1439
|
+
const allowed = ["Backspace", "Delete", "ArrowLeft", "ArrowRight", "Tab", "Enter", "Home", "End"];
|
|
1447
1440
|
if (allowed.includes(e.key)) return;
|
|
1448
1441
|
if (e.ctrlKey || e.metaKey) return;
|
|
1449
1442
|
if (!decimal) {
|
package/dist/index.mjs
CHANGED
|
@@ -1294,6 +1294,7 @@ import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
|
1294
1294
|
function InputFieldNumber({
|
|
1295
1295
|
value,
|
|
1296
1296
|
onChange,
|
|
1297
|
+
onBlur,
|
|
1297
1298
|
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1298
1299
|
label,
|
|
1299
1300
|
required,
|
|
@@ -1352,6 +1353,7 @@ function InputFieldNumber({
|
|
|
1352
1353
|
{
|
|
1353
1354
|
value: value ?? void 0,
|
|
1354
1355
|
onChange: (val) => onChange(val),
|
|
1356
|
+
onBlur: (e) => onBlur?.(e.target),
|
|
1355
1357
|
placeholder,
|
|
1356
1358
|
disabled,
|
|
1357
1359
|
className: `body-1 !w-full ${className ?? ""}`,
|
|
@@ -1368,16 +1370,7 @@ function InputFieldNumber({
|
|
|
1368
1370
|
precision: decimal ? safeScale : 0,
|
|
1369
1371
|
inputMode: decimal ? "decimal" : "numeric",
|
|
1370
1372
|
onKeyDown: (e) => {
|
|
1371
|
-
const allowed = [
|
|
1372
|
-
"Backspace",
|
|
1373
|
-
"Delete",
|
|
1374
|
-
"ArrowLeft",
|
|
1375
|
-
"ArrowRight",
|
|
1376
|
-
"Tab",
|
|
1377
|
-
"Enter",
|
|
1378
|
-
"Home",
|
|
1379
|
-
"End"
|
|
1380
|
-
];
|
|
1373
|
+
const allowed = ["Backspace", "Delete", "ArrowLeft", "ArrowRight", "Tab", "Enter", "Home", "End"];
|
|
1381
1374
|
if (allowed.includes(e.key)) return;
|
|
1382
1375
|
if (e.ctrlKey || e.metaKey) return;
|
|
1383
1376
|
if (!decimal) {
|