@pnkx-lib/ui 1.9.478 → 1.9.481
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/es/fields/Input.js +13 -14
- package/es/ui/Tabs.js +2 -2
- package/es/ui/index.js +128 -62
- package/package.json +2 -2
- package/types/components/fields/Input.d.ts +1 -2
package/es/fields/Input.js
CHANGED
|
@@ -1294,8 +1294,9 @@ const Input = (props) => {
|
|
|
1294
1294
|
allowClear,
|
|
1295
1295
|
subLabel,
|
|
1296
1296
|
classNameSubLabel,
|
|
1297
|
-
|
|
1298
|
-
|
|
1297
|
+
toLowerCaseSafe,
|
|
1298
|
+
// maxValue,
|
|
1299
|
+
// minValue,
|
|
1299
1300
|
...restProps
|
|
1300
1301
|
} = props;
|
|
1301
1302
|
const { name, value, onChange, onBlur } = field || {};
|
|
@@ -1311,6 +1312,12 @@ const Input = (props) => {
|
|
|
1311
1312
|
(match) => match.toUpperCase()
|
|
1312
1313
|
);
|
|
1313
1314
|
};
|
|
1315
|
+
const handleToLowerCaseSafe = (value2) => {
|
|
1316
|
+
if (typeof value2 === "string") {
|
|
1317
|
+
return value2.toLowerCase();
|
|
1318
|
+
}
|
|
1319
|
+
return value2 || void 0;
|
|
1320
|
+
};
|
|
1314
1321
|
//! Function
|
|
1315
1322
|
const handleChange = useCallback(
|
|
1316
1323
|
(e) => {
|
|
@@ -1363,8 +1370,6 @@ const Input = (props) => {
|
|
|
1363
1370
|
return /* @__PURE__ */ jsx(
|
|
1364
1371
|
NumericFormatCustom,
|
|
1365
1372
|
{
|
|
1366
|
-
maxValue,
|
|
1367
|
-
minValue,
|
|
1368
1373
|
name,
|
|
1369
1374
|
ref: inputRef,
|
|
1370
1375
|
type,
|
|
@@ -1381,6 +1386,7 @@ const Input = (props) => {
|
|
|
1381
1386
|
const InputComponent = inputPassword ? Input$1.Password : Input$1;
|
|
1382
1387
|
const customValue = toLowerCaseValue ? capitalizeAfterPeriod(value) : value;
|
|
1383
1388
|
const upperValue = toUpperCaseValue ? value?.toUpperCase() : customValue;
|
|
1389
|
+
const toLowerCaseSafeValue = toLowerCaseSafe ? handleToLowerCaseSafe(value) : upperValue;
|
|
1384
1390
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1385
1391
|
/* @__PURE__ */ jsx(
|
|
1386
1392
|
InputComponent,
|
|
@@ -1388,7 +1394,7 @@ const Input = (props) => {
|
|
|
1388
1394
|
ref: inputRef,
|
|
1389
1395
|
onCompositionStart: handleCompositionStart,
|
|
1390
1396
|
onCompositionEnd: handleCompositionEnd,
|
|
1391
|
-
value:
|
|
1397
|
+
value: toLowerCaseSafeValue,
|
|
1392
1398
|
onChange: handleChange,
|
|
1393
1399
|
onBlur,
|
|
1394
1400
|
prefix: iconStartInput,
|
|
@@ -1450,8 +1456,8 @@ const NumericFormatCustom = forwardRef((props, ref) => {
|
|
|
1450
1456
|
type,
|
|
1451
1457
|
prefix,
|
|
1452
1458
|
helperText,
|
|
1453
|
-
minValue,
|
|
1454
|
-
maxValue =
|
|
1459
|
+
// minValue,
|
|
1460
|
+
// maxValue = 999_999_999_999_999,
|
|
1455
1461
|
decimalScale,
|
|
1456
1462
|
thousandSeparator,
|
|
1457
1463
|
decimalSeparator,
|
|
@@ -1489,13 +1495,6 @@ const NumericFormatCustom = forwardRef((props, ref) => {
|
|
|
1489
1495
|
valueIsNumericString: true,
|
|
1490
1496
|
getInputRef: ref,
|
|
1491
1497
|
prefix: isMoney ? "$" : prefix,
|
|
1492
|
-
isAllowed: (values) => {
|
|
1493
|
-
const { floatValue } = values;
|
|
1494
|
-
if (floatValue === void 0) return true;
|
|
1495
|
-
if (minValue !== void 0 && floatValue < minValue) return false;
|
|
1496
|
-
if (maxValue !== void 0 && floatValue > maxValue) return false;
|
|
1497
|
-
return true;
|
|
1498
|
-
},
|
|
1499
1498
|
...restProps
|
|
1500
1499
|
}
|
|
1501
1500
|
),
|
package/es/ui/Tabs.js
CHANGED
|
@@ -23,7 +23,7 @@ const createStoreImpl = (createState) => {
|
|
|
23
23
|
const initialState = state = createState(setState, getState, api);
|
|
24
24
|
return api;
|
|
25
25
|
};
|
|
26
|
-
const createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
|
|
26
|
+
const createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);
|
|
27
27
|
|
|
28
28
|
const identity = (arg) => arg;
|
|
29
29
|
function useStore(api, selector = identity) {
|
|
@@ -41,7 +41,7 @@ const createImpl = (createState) => {
|
|
|
41
41
|
Object.assign(useBoundStore, api);
|
|
42
42
|
return useBoundStore;
|
|
43
43
|
};
|
|
44
|
-
const create = (createState) => createState ? createImpl(createState) : createImpl;
|
|
44
|
+
const create = ((createState) => createState ? createImpl(createState) : createImpl);
|
|
45
45
|
|
|
46
46
|
const useTabStore = create((set) => ({
|
|
47
47
|
activeTabKey: void 0,
|
package/es/ui/index.js
CHANGED
|
@@ -132238,6 +132238,123 @@ function requireLib () {
|
|
|
132238
132238
|
|
|
132239
132239
|
var libExports = /*@__PURE__*/ requireLib();
|
|
132240
132240
|
|
|
132241
|
+
const RefuseApprovalDropListIcon = ({
|
|
132242
|
+
size = 22,
|
|
132243
|
+
color = "currentColor",
|
|
132244
|
+
className,
|
|
132245
|
+
style,
|
|
132246
|
+
onClick,
|
|
132247
|
+
"aria-label": ariaLabel,
|
|
132248
|
+
title,
|
|
132249
|
+
stroke,
|
|
132250
|
+
...props
|
|
132251
|
+
}) => /* @__PURE__ */ jsx(
|
|
132252
|
+
"div",
|
|
132253
|
+
{
|
|
132254
|
+
className,
|
|
132255
|
+
style: {
|
|
132256
|
+
width: size,
|
|
132257
|
+
height: size,
|
|
132258
|
+
cursor: onClick ? "pointer" : "default",
|
|
132259
|
+
...style
|
|
132260
|
+
},
|
|
132261
|
+
onClick,
|
|
132262
|
+
role: onClick ? "button" : void 0,
|
|
132263
|
+
"aria-label": ariaLabel,
|
|
132264
|
+
title,
|
|
132265
|
+
...props,
|
|
132266
|
+
children: /* @__PURE__ */ jsxs(
|
|
132267
|
+
"svg",
|
|
132268
|
+
{
|
|
132269
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
132270
|
+
width: "100%",
|
|
132271
|
+
height: "100%",
|
|
132272
|
+
viewBox: "0 0 22 22",
|
|
132273
|
+
fill: "none",
|
|
132274
|
+
children: [
|
|
132275
|
+
/* @__PURE__ */ jsx(
|
|
132276
|
+
"path",
|
|
132277
|
+
{
|
|
132278
|
+
d: "M11 20.1663C16.06 20.1663 20.1666 16.0597 20.1666 10.9997C20.1666 5.93967 16.06 1.83301 11 1.83301C5.93998 1.83301 1.83331 5.93967 1.83331 10.9997C1.83331 16.0597 5.93998 20.1663 11 20.1663Z",
|
|
132279
|
+
stroke: stroke || "#292D32",
|
|
132280
|
+
strokeWidth: "1.5",
|
|
132281
|
+
"stroke-miterlimit": "10",
|
|
132282
|
+
strokeLinecap: "round",
|
|
132283
|
+
"stroke-linejoin": "round"
|
|
132284
|
+
}
|
|
132285
|
+
),
|
|
132286
|
+
/* @__PURE__ */ jsx(
|
|
132287
|
+
"path",
|
|
132288
|
+
{
|
|
132289
|
+
d: "M17.3249 4.58301L4.49158 17.4163",
|
|
132290
|
+
stroke: stroke || "#292D32",
|
|
132291
|
+
strokeWidth: "1.5",
|
|
132292
|
+
"stroke-miterlimit": "10",
|
|
132293
|
+
strokeLinecap: "round",
|
|
132294
|
+
"stroke-linejoin": "round"
|
|
132295
|
+
}
|
|
132296
|
+
)
|
|
132297
|
+
]
|
|
132298
|
+
}
|
|
132299
|
+
)
|
|
132300
|
+
}
|
|
132301
|
+
);
|
|
132302
|
+
|
|
132303
|
+
const ViewIcon = ({
|
|
132304
|
+
size = 20,
|
|
132305
|
+
color = "currentColor",
|
|
132306
|
+
className,
|
|
132307
|
+
style,
|
|
132308
|
+
onClick,
|
|
132309
|
+
"aria-label": ariaLabel,
|
|
132310
|
+
title,
|
|
132311
|
+
...props
|
|
132312
|
+
}) => /* @__PURE__ */ jsx(
|
|
132313
|
+
"div",
|
|
132314
|
+
{
|
|
132315
|
+
className,
|
|
132316
|
+
style: {
|
|
132317
|
+
width: size,
|
|
132318
|
+
height: size,
|
|
132319
|
+
cursor: onClick ? "pointer" : "default",
|
|
132320
|
+
...style
|
|
132321
|
+
},
|
|
132322
|
+
onClick,
|
|
132323
|
+
role: onClick ? "button" : void 0,
|
|
132324
|
+
"aria-label": ariaLabel,
|
|
132325
|
+
title,
|
|
132326
|
+
...props,
|
|
132327
|
+
children: /* @__PURE__ */ jsxs(
|
|
132328
|
+
"svg",
|
|
132329
|
+
{
|
|
132330
|
+
width: "100%",
|
|
132331
|
+
height: "100%",
|
|
132332
|
+
viewBox: "0 0 20 20",
|
|
132333
|
+
fill: "none",
|
|
132334
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
132335
|
+
children: [
|
|
132336
|
+
/* @__PURE__ */ jsx(
|
|
132337
|
+
"path",
|
|
132338
|
+
{
|
|
132339
|
+
d: "M2.42466 10.9778C2.14002 10.3585 2.14002 9.6441 2.42466 9.02484C3.74225 6.15832 6.6389 4.16797 10.0004 4.16797C13.362 4.16797 16.2586 6.15833 17.5762 9.02484C17.8608 9.6441 17.8608 10.3585 17.5762 10.9778C16.2586 13.8443 13.362 15.8346 10.0004 15.8346C6.6389 15.8346 3.74225 13.8443 2.42466 10.9778Z",
|
|
132340
|
+
stroke: color || "#007BE5",
|
|
132341
|
+
"stroke-width": "1.5"
|
|
132342
|
+
}
|
|
132343
|
+
),
|
|
132344
|
+
/* @__PURE__ */ jsx(
|
|
132345
|
+
"path",
|
|
132346
|
+
{
|
|
132347
|
+
d: "M12.5004 10.0013C12.5004 11.382 11.3811 12.5013 10.0004 12.5013C8.61972 12.5013 7.50043 11.382 7.50043 10.0013C7.50043 8.62059 8.61972 7.5013 10.0004 7.5013C11.3811 7.5013 12.5004 8.62059 12.5004 10.0013Z",
|
|
132348
|
+
stroke: color || "#007BE5",
|
|
132349
|
+
"stroke-width": "1.5"
|
|
132350
|
+
}
|
|
132351
|
+
)
|
|
132352
|
+
]
|
|
132353
|
+
}
|
|
132354
|
+
)
|
|
132355
|
+
}
|
|
132356
|
+
);
|
|
132357
|
+
|
|
132241
132358
|
const ActionRowTable = ({
|
|
132242
132359
|
type,
|
|
132243
132360
|
contentTooltip,
|
|
@@ -132258,6 +132375,17 @@ const ActionRowTable = ({
|
|
|
132258
132375
|
};
|
|
132259
132376
|
const renderAction = () => {
|
|
132260
132377
|
switch (type) {
|
|
132378
|
+
case TypeActionRowTable.VIEW:
|
|
132379
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Tooltip$1, { title: contentTooltip, children: /* @__PURE__ */ jsx(
|
|
132380
|
+
Button$1,
|
|
132381
|
+
{
|
|
132382
|
+
onClick: handleClick,
|
|
132383
|
+
type: "text",
|
|
132384
|
+
className: "cursor-pointer",
|
|
132385
|
+
shape: "circle",
|
|
132386
|
+
icon: /* @__PURE__ */ jsx(ViewIcon, { color: "#007BE5" })
|
|
132387
|
+
}
|
|
132388
|
+
) }) });
|
|
132261
132389
|
case TypeActionRowTable.EDIT:
|
|
132262
132390
|
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Tooltip$1, { title: contentTooltip, children: /* @__PURE__ */ jsx(
|
|
132263
132391
|
Button$1,
|
|
@@ -132430,68 +132558,6 @@ const DropListActions = ({
|
|
|
132430
132558
|
) }) });
|
|
132431
132559
|
};
|
|
132432
132560
|
|
|
132433
|
-
const RefuseApprovalDropListIcon = ({
|
|
132434
|
-
size = 22,
|
|
132435
|
-
color = "currentColor",
|
|
132436
|
-
className,
|
|
132437
|
-
style,
|
|
132438
|
-
onClick,
|
|
132439
|
-
"aria-label": ariaLabel,
|
|
132440
|
-
title,
|
|
132441
|
-
stroke,
|
|
132442
|
-
...props
|
|
132443
|
-
}) => /* @__PURE__ */ jsx(
|
|
132444
|
-
"div",
|
|
132445
|
-
{
|
|
132446
|
-
className,
|
|
132447
|
-
style: {
|
|
132448
|
-
width: size,
|
|
132449
|
-
height: size,
|
|
132450
|
-
cursor: onClick ? "pointer" : "default",
|
|
132451
|
-
...style
|
|
132452
|
-
},
|
|
132453
|
-
onClick,
|
|
132454
|
-
role: onClick ? "button" : void 0,
|
|
132455
|
-
"aria-label": ariaLabel,
|
|
132456
|
-
title,
|
|
132457
|
-
...props,
|
|
132458
|
-
children: /* @__PURE__ */ jsxs(
|
|
132459
|
-
"svg",
|
|
132460
|
-
{
|
|
132461
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
132462
|
-
width: "100%",
|
|
132463
|
-
height: "100%",
|
|
132464
|
-
viewBox: "0 0 22 22",
|
|
132465
|
-
fill: "none",
|
|
132466
|
-
children: [
|
|
132467
|
-
/* @__PURE__ */ jsx(
|
|
132468
|
-
"path",
|
|
132469
|
-
{
|
|
132470
|
-
d: "M11 20.1663C16.06 20.1663 20.1666 16.0597 20.1666 10.9997C20.1666 5.93967 16.06 1.83301 11 1.83301C5.93998 1.83301 1.83331 5.93967 1.83331 10.9997C1.83331 16.0597 5.93998 20.1663 11 20.1663Z",
|
|
132471
|
-
stroke: stroke || "#292D32",
|
|
132472
|
-
strokeWidth: "1.5",
|
|
132473
|
-
"stroke-miterlimit": "10",
|
|
132474
|
-
strokeLinecap: "round",
|
|
132475
|
-
"stroke-linejoin": "round"
|
|
132476
|
-
}
|
|
132477
|
-
),
|
|
132478
|
-
/* @__PURE__ */ jsx(
|
|
132479
|
-
"path",
|
|
132480
|
-
{
|
|
132481
|
-
d: "M17.3249 4.58301L4.49158 17.4163",
|
|
132482
|
-
stroke: stroke || "#292D32",
|
|
132483
|
-
strokeWidth: "1.5",
|
|
132484
|
-
"stroke-miterlimit": "10",
|
|
132485
|
-
strokeLinecap: "round",
|
|
132486
|
-
"stroke-linejoin": "round"
|
|
132487
|
-
}
|
|
132488
|
-
)
|
|
132489
|
-
]
|
|
132490
|
-
}
|
|
132491
|
-
)
|
|
132492
|
-
}
|
|
132493
|
-
);
|
|
132494
|
-
|
|
132495
132561
|
const BulkActions = ({
|
|
132496
132562
|
quantity = 0,
|
|
132497
132563
|
handleDelete,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnkx-lib/ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.481",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./es/index.js",
|
|
7
7
|
"module": "./es/index.js",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"@headlessui/react": "^2.2.2",
|
|
137
137
|
"@heroicons/react": "^2.2.0",
|
|
138
138
|
"@hookform/resolvers": "^5.1.1",
|
|
139
|
-
"@pnkx-lib/icon": "^0.0.
|
|
139
|
+
"@pnkx-lib/icon": "^0.0.77",
|
|
140
140
|
"@react-pdf-viewer/core": "^3.12.0",
|
|
141
141
|
"@react-pdf-viewer/default-layout": "^3.12.0",
|
|
142
142
|
"@tailwindcss/cli": "^4.1.6",
|
|
@@ -23,10 +23,9 @@ export interface InputProps extends InputPropsAntd {
|
|
|
23
23
|
inputPassword?: boolean;
|
|
24
24
|
subLabel?: string;
|
|
25
25
|
classNameSubLabel?: string;
|
|
26
|
-
maxValue?: number;
|
|
27
|
-
minValue?: number;
|
|
28
26
|
thousandSeparator?: string;
|
|
29
27
|
decimalSeparator?: string;
|
|
28
|
+
toLowerCaseSafe?: boolean;
|
|
30
29
|
}
|
|
31
30
|
export declare const Input: (props: InputProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
31
|
export interface PropsNumberFormat extends Omit<InputProps, "onChange" | "afterOnChange" | "value" | "defaultValue" | "iconStartInput" | "iconEndInput"> {
|