@dmsi/wedgekit-react 0.0.922 → 0.0.987
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/{chunk-LFBTRFTS.js → chunk-2UNLVJU5.js} +4 -4
- package/dist/{chunk-PXIW3XJX.js → chunk-34J6RA4C.js} +1 -1
- package/dist/{chunk-NGXKXYB5.js → chunk-6FZNEFN3.js} +1 -1
- package/dist/{chunk-Z7XANQ47.js → chunk-6M2N7DVS.js} +4 -2
- package/dist/{chunk-RAJY6INK.js → chunk-BBU7JOY2.js} +1 -1
- package/dist/{chunk-UUKHQUSF.js → chunk-F6QO73TV.js} +1 -1
- package/dist/{chunk-BRCBTEQ2.js → chunk-FGXTI3WE.js} +1 -1
- package/dist/{chunk-EJVCDJ7U.js → chunk-HDFO56DN.js} +1 -1
- package/dist/{chunk-XWYDWH4W.js → chunk-HTICQWRA.js} +1 -1
- package/dist/{chunk-N36EJLRW.js → chunk-JZZ4LF6B.js} +2 -2
- package/dist/{chunk-27DJTEAB.js → chunk-MB6IRHTN.js} +1 -1
- package/dist/{chunk-ZACRFGND.js → chunk-NBTWFTSF.js} +94 -65
- package/dist/{chunk-FAW3WWOQ.js → chunk-OC5AXLJY.js} +1 -1
- package/dist/{chunk-VABOQRYA.js → chunk-POZD6R3P.js} +1 -1
- package/dist/{chunk-YYRFXTO7.js → chunk-RLJU65SD.js} +21 -29
- package/dist/{chunk-F7F5BKW5.js → chunk-TBZ243DS.js} +1 -1
- package/dist/{chunk-2EAVEFWY.js → chunk-WHWZ5VVQ.js} +3 -2
- package/dist/{chunk-FSXKJXPN.js → chunk-Y7RCYDF6.js} +8 -2
- package/dist/{chunk-BMAZBFUU.js → chunk-ZMTHWJ7F.js} +15 -2
- package/dist/chunk-ZRFXUER3.js +468 -0
- package/dist/components/Alert.cjs +15 -2
- package/dist/components/Alert.js +2 -2
- package/dist/components/Breadcrumbs.cjs +8 -2
- package/dist/components/Breadcrumbs.js +1 -1
- package/dist/components/Button.cjs +15 -2
- package/dist/components/Button.js +1 -1
- package/dist/components/CalendarRange.cjs +385 -106
- package/dist/components/CalendarRange.css +55 -3
- package/dist/components/CalendarRange.js +14 -14
- package/dist/components/CompactImagesPreview.cjs +7 -4
- package/dist/components/CompactImagesPreview.js +2 -2
- package/dist/components/ContentTab.cjs +15 -2
- package/dist/components/ContentTab.js +2 -2
- package/dist/components/ContentTabs.cjs +15 -2
- package/dist/components/ContentTabs.js +2 -2
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +385 -106
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +55 -3
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +14 -14
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +385 -106
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +55 -3
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +14 -14
- package/dist/components/DataGrid/PinnedColumns.cjs +385 -106
- package/dist/components/DataGrid/PinnedColumns.css +55 -3
- package/dist/components/DataGrid/PinnedColumns.js +14 -14
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +385 -106
- package/dist/components/DataGrid/TableBody/LoadingCell.css +55 -3
- package/dist/components/DataGrid/TableBody/LoadingCell.js +14 -14
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +385 -106
- package/dist/components/DataGrid/TableBody/TableBodyRow.css +55 -3
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +14 -14
- package/dist/components/DataGrid/TableBody/index.cjs +385 -106
- package/dist/components/DataGrid/TableBody/index.css +55 -3
- package/dist/components/DataGrid/TableBody/index.js +14 -14
- package/dist/components/DataGrid/index.cjs +385 -106
- package/dist/components/DataGrid/index.css +55 -3
- package/dist/components/DataGrid/index.js +14 -14
- package/dist/components/DataGrid/utils.cjs +385 -106
- package/dist/components/DataGrid/utils.css +55 -3
- package/dist/components/DataGrid/utils.js +14 -14
- package/dist/components/DataGridCell.cjs +7 -4
- package/dist/components/DataGridCell.js +2 -2
- package/dist/components/DateInput.cjs +385 -106
- package/dist/components/DateInput.css +55 -3
- package/dist/components/DateInput.js +14 -14
- package/dist/components/DateRangeInput.cjs +385 -106
- package/dist/components/DateRangeInput.css +55 -3
- package/dist/components/DateRangeInput.js +14 -14
- package/dist/components/EmblaCarousel/index.cjs +94 -65
- package/dist/components/EmblaCarousel/index.js +1 -1
- package/dist/components/FilterGroup.cjs +23 -4
- package/dist/components/FilterGroup.js +3 -3
- package/dist/components/Link.cjs +8 -2
- package/dist/components/Link.js +1 -1
- package/dist/components/Menu.cjs +7 -4
- package/dist/components/Menu.js +2 -2
- package/dist/components/MenuOption.cjs +7 -4
- package/dist/components/MenuOption.js +2 -2
- package/dist/components/MobileDataGrid/ColumnList.css +55 -3
- package/dist/components/MobileDataGrid/ColumnList.js +4 -4
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +385 -106
- package/dist/components/MobileDataGrid/ColumnSelector/index.css +55 -3
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +14 -14
- package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.js +2 -2
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +3 -3
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +385 -106
- package/dist/components/MobileDataGrid/MobileDataGridHeader.css +55 -3
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +14 -14
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +3 -3
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.cjs +24 -7
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +9 -9
- package/dist/components/MobileDataGrid/index.cjs +386 -107
- package/dist/components/MobileDataGrid/index.css +55 -3
- package/dist/components/MobileDataGrid/index.js +14 -14
- package/dist/components/Modal.cjs +23 -6
- package/dist/components/Modal.js +6 -6
- package/dist/components/ModalButtons.cjs +15 -2
- package/dist/components/ModalButtons.js +2 -2
- package/dist/components/ModalHeader.cjs +17 -3
- package/dist/components/ModalHeader.js +2 -2
- package/dist/components/NavigationTab.cjs +15 -2
- package/dist/components/NavigationTab.js +2 -2
- package/dist/components/NavigationTabs.cjs +15 -2
- package/dist/components/NavigationTabs.js +2 -2
- package/dist/components/NestedMenu.cjs +22 -6
- package/dist/components/NestedMenu.js +3 -3
- package/dist/components/Notification.cjs +15 -2
- package/dist/components/Notification.js +1 -1
- package/dist/components/OptionPill.cjs +15 -2
- package/dist/components/OptionPill.js +2 -2
- package/dist/components/PDFViewer/DownloadIcon.cjs +25 -7
- package/dist/components/PDFViewer/DownloadIcon.js +4 -4
- package/dist/components/PDFViewer/PDFNavigation.cjs +15 -2
- package/dist/components/PDFViewer/PDFNavigation.js +2 -2
- package/dist/components/PDFViewer/index.cjs +40 -13
- package/dist/components/PDFViewer/index.js +15 -13
- package/dist/components/Password.cjs +7 -4
- package/dist/components/Password.js +2 -2
- package/dist/components/ProductImagePreview/index.cjs +7 -4
- package/dist/components/ProductImagePreview/index.js +2 -2
- package/dist/components/ProjectBar.cjs +7 -4
- package/dist/components/ProjectBar.js +2 -2
- package/dist/components/Stepper.cjs +61 -15
- package/dist/components/Stepper.js +42 -12
- package/dist/components/Time.js +1 -1
- package/dist/components/Toast.cjs +15 -2
- package/dist/components/Toast.js +1 -1
- package/dist/components/Tooltip.cjs +7 -4
- package/dist/components/Tooltip.js +2 -2
- package/dist/components/Upload.cjs +15 -2
- package/dist/components/Upload.js +1 -1
- package/dist/components/index.cjs +479 -171
- package/dist/components/index.css +55 -3
- package/dist/components/index.js +14 -14
- package/dist/components/useMenuSystem.cjs +7 -4
- package/dist/components/useMenuSystem.js +2 -2
- package/dist/hooks/index.cjs +346 -73
- package/dist/hooks/index.js +2 -2
- package/dist/index.css +55 -3
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-WOWPMA26.js +0 -170
|
@@ -63,6 +63,7 @@ __export(Stepper_exports, {
|
|
|
63
63
|
Stepper: () => Stepper
|
|
64
64
|
});
|
|
65
65
|
module.exports = __toCommonJS(Stepper_exports);
|
|
66
|
+
var import_react8 = require("react");
|
|
66
67
|
|
|
67
68
|
// src/components/Button.tsx
|
|
68
69
|
var import_clsx2 = __toESM(require("clsx"), 1);
|
|
@@ -255,7 +256,8 @@ var Button = (_a) => {
|
|
|
255
256
|
href,
|
|
256
257
|
id,
|
|
257
258
|
testid,
|
|
258
|
-
isLoading
|
|
259
|
+
isLoading,
|
|
260
|
+
fontNormal = false
|
|
259
261
|
} = _b, props = __objRest(_b, [
|
|
260
262
|
"variant",
|
|
261
263
|
"as",
|
|
@@ -271,7 +273,8 @@ var Button = (_a) => {
|
|
|
271
273
|
"href",
|
|
272
274
|
"id",
|
|
273
275
|
"testid",
|
|
274
|
-
"isLoading"
|
|
276
|
+
"isLoading",
|
|
277
|
+
"fontNormal"
|
|
275
278
|
]);
|
|
276
279
|
const primaryVariantStyles = variant === "primary" && (0, import_clsx2.default)(
|
|
277
280
|
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
|
|
@@ -298,6 +301,15 @@ var Button = (_a) => {
|
|
|
298
301
|
"active:bg-background-action-secondary-active active:border-transparent active:text-text-action-primary-active",
|
|
299
302
|
"disabled:bg-transparent disabled:border-transparent disabled:text-text-action-primary-disabled"
|
|
300
303
|
);
|
|
304
|
+
const quarternaryOutlinedVariantStyles = variant === "quarternary-outlined" && (0, import_clsx2.default)(
|
|
305
|
+
"bg-transparent border-transparent",
|
|
306
|
+
iconOnly ? (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-icon-action-primary-normal" : (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-primary-normal",
|
|
307
|
+
"bg-transparent border-transparent",
|
|
308
|
+
"hover:bg-transparent hover:border-border-primary-normal hover:text-text-primary-normal",
|
|
309
|
+
"focus:bg-transparent focus:border-border-primary-normal focus:text-text-primary-normal focus:outline-0",
|
|
310
|
+
"active:bg-transparent active:border-transparent active:text-text-primary-active",
|
|
311
|
+
"disabled:bg-transparent disabled:border-transparent disabled:text-text-action-primary-disabled"
|
|
312
|
+
);
|
|
301
313
|
const primaryCriticalVariantStyles = variant === "primary-critical" && (0, import_clsx2.default)(
|
|
302
314
|
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
|
|
303
315
|
"bg-background-action-critical-primary-normal border-background-action-critical-primary-normal",
|
|
@@ -341,6 +353,7 @@ var Button = (_a) => {
|
|
|
341
353
|
primaryVariantStyles,
|
|
342
354
|
secondaryVariantStyles,
|
|
343
355
|
tertiaryVariantStyles,
|
|
356
|
+
quarternaryOutlinedVariantStyles,
|
|
344
357
|
primaryCriticalVariantStyles,
|
|
345
358
|
secondaryCriticalVariantStyles,
|
|
346
359
|
tertiaryCriticalVariantStyles,
|
|
@@ -351,6 +364,7 @@ var Button = (_a) => {
|
|
|
351
364
|
const labelClasses = (0, import_clsx2.default)(
|
|
352
365
|
"min-h-6 flex items-center justify-center",
|
|
353
366
|
classNameLabel,
|
|
367
|
+
fontNormal && "font-normal!",
|
|
354
368
|
componentPaddingXUsingComponentGap,
|
|
355
369
|
typography.buttonLabel
|
|
356
370
|
);
|
|
@@ -1042,12 +1056,15 @@ var useMatchesMedia = (query) => {
|
|
|
1042
1056
|
};
|
|
1043
1057
|
var useMatchesMobile = () => useMatchesMedia("(width < 48rem)");
|
|
1044
1058
|
|
|
1059
|
+
// src/hooks/useTableLayout/useTableLayout.ts
|
|
1060
|
+
var import_react5 = require("react");
|
|
1061
|
+
|
|
1045
1062
|
// src/utils/index.ts
|
|
1046
|
-
var LocalStoragePrefixVersion = `dmsi-acc-v1.1.
|
|
1063
|
+
var LocalStoragePrefixVersion = `dmsi-acc-v1.1.5`;
|
|
1047
1064
|
|
|
1048
|
-
// src/hooks/useTableLayout.ts
|
|
1049
|
-
var
|
|
1050
|
-
var
|
|
1065
|
+
// src/hooks/useTableLayout/storage.ts
|
|
1066
|
+
var STORAGE_PREFIX = `${LocalStoragePrefixVersion}-tablePrefs`;
|
|
1067
|
+
var LEGACY_STORAGE_PREFIX = `${LocalStoragePrefixVersion}-tableLayout`;
|
|
1051
1068
|
|
|
1052
1069
|
// src/hooks/useEditCell.tsx
|
|
1053
1070
|
var import_react6 = require("react");
|
|
@@ -1183,10 +1200,12 @@ var Stepper = (_a) => {
|
|
|
1183
1200
|
setValue,
|
|
1184
1201
|
onDecrease,
|
|
1185
1202
|
onIncrease,
|
|
1203
|
+
onBlur,
|
|
1186
1204
|
id,
|
|
1187
1205
|
testid,
|
|
1188
1206
|
min,
|
|
1189
|
-
max
|
|
1207
|
+
max,
|
|
1208
|
+
step = 1
|
|
1190
1209
|
} = _b, props = __objRest(_b, [
|
|
1191
1210
|
"error",
|
|
1192
1211
|
"disabled",
|
|
@@ -1195,23 +1214,32 @@ var Stepper = (_a) => {
|
|
|
1195
1214
|
"setValue",
|
|
1196
1215
|
"onDecrease",
|
|
1197
1216
|
"onIncrease",
|
|
1217
|
+
"onBlur",
|
|
1198
1218
|
"id",
|
|
1199
1219
|
"testid",
|
|
1200
1220
|
"min",
|
|
1201
|
-
"max"
|
|
1221
|
+
"max",
|
|
1222
|
+
"step"
|
|
1202
1223
|
]);
|
|
1224
|
+
const [isEditing, setIsEditing] = (0, import_react8.useState)(false);
|
|
1225
|
+
const [displayValue, setDisplayValue] = (0, import_react8.useState)(String(value));
|
|
1226
|
+
(0, import_react8.useEffect)(() => {
|
|
1227
|
+
if (!isEditing) {
|
|
1228
|
+
setDisplayValue(String(value));
|
|
1229
|
+
}
|
|
1230
|
+
}, [value, isEditing]);
|
|
1203
1231
|
function handleIncrease() {
|
|
1204
1232
|
if (max != null && value >= max) {
|
|
1205
1233
|
return;
|
|
1206
1234
|
}
|
|
1207
|
-
setValue((prevVal) => prevVal +
|
|
1235
|
+
setValue((prevVal) => Math.min(prevVal + step, max != null ? max : Infinity));
|
|
1208
1236
|
onIncrease == null ? void 0 : onIncrease();
|
|
1209
1237
|
}
|
|
1210
1238
|
function handleDecrease() {
|
|
1211
1239
|
if (min != null && value <= min) {
|
|
1212
1240
|
return;
|
|
1213
1241
|
}
|
|
1214
|
-
setValue((prevVal) => prevVal -
|
|
1242
|
+
setValue((prevVal) => Math.max(prevVal - step, min != null ? min : -Infinity));
|
|
1215
1243
|
onDecrease == null ? void 0 : onDecrease();
|
|
1216
1244
|
}
|
|
1217
1245
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
@@ -1255,18 +1283,36 @@ var Stepper = (_a) => {
|
|
|
1255
1283
|
__spreadProps(__spreadValues({}, props), {
|
|
1256
1284
|
id: id ? `${id}-input` : void 0,
|
|
1257
1285
|
testid: testid ? `${testid}-input` : void 0,
|
|
1258
|
-
type: "
|
|
1286
|
+
type: "text",
|
|
1287
|
+
inputMode: "numeric",
|
|
1288
|
+
pattern: "[0-9]*",
|
|
1259
1289
|
align: "center",
|
|
1260
|
-
value,
|
|
1290
|
+
value: displayValue,
|
|
1291
|
+
onFocus: () => setIsEditing(true),
|
|
1261
1292
|
onChange: (e) => {
|
|
1262
|
-
const
|
|
1263
|
-
|
|
1293
|
+
const rawValue = e.target.value;
|
|
1294
|
+
if (rawValue === "") {
|
|
1295
|
+
setDisplayValue("");
|
|
1296
|
+
setValue(0);
|
|
1297
|
+
return;
|
|
1298
|
+
}
|
|
1299
|
+
if (!/^\d*$/.test(rawValue)) {
|
|
1300
|
+
return;
|
|
1301
|
+
}
|
|
1302
|
+
const cleanedValue = rawValue.replace(/^0+/, "") || "0";
|
|
1303
|
+
const nextValue = parseInt(cleanedValue, 10);
|
|
1264
1304
|
const greaterThanMaximum = max != null && nextValue > max;
|
|
1265
|
-
if (
|
|
1305
|
+
if (greaterThanMaximum) {
|
|
1266
1306
|
return;
|
|
1267
1307
|
}
|
|
1308
|
+
setDisplayValue(cleanedValue);
|
|
1268
1309
|
setValue(nextValue);
|
|
1269
1310
|
},
|
|
1311
|
+
onBlur: () => {
|
|
1312
|
+
setIsEditing(false);
|
|
1313
|
+
setDisplayValue(String(value));
|
|
1314
|
+
onBlur == null ? void 0 : onBlur();
|
|
1315
|
+
},
|
|
1270
1316
|
error,
|
|
1271
1317
|
disabled,
|
|
1272
1318
|
className: "!w-6 !h-4.5 !px-0 disabled:!text-text-on-action-primary-disabled disabled:!bg-background-action-secondary-disabled disabled:!border-border-primary-normal"
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
InputBase
|
|
7
7
|
} from "../chunk-7T5RGDCN.js";
|
|
8
8
|
import "../chunk-HXGJVYGQ.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-ZRFXUER3.js";
|
|
10
10
|
import "../chunk-WVGXD7HT.js";
|
|
11
11
|
import "../chunk-VXWSAIB5.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-TBZ243DS.js";
|
|
13
13
|
import "../chunk-5UH6QUFB.js";
|
|
14
14
|
import {
|
|
15
15
|
Button
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-ZMTHWJ7F.js";
|
|
17
17
|
import "../chunk-SBRRNFOP.js";
|
|
18
18
|
import "../chunk-WMPWWFUJ.js";
|
|
19
19
|
import {
|
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
} from "../chunk-ORMEWXMH.js";
|
|
30
30
|
|
|
31
31
|
// src/components/Stepper.tsx
|
|
32
|
+
import { useState, useEffect } from "react";
|
|
32
33
|
import clsx from "clsx";
|
|
33
34
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
34
35
|
var Stepper = (_a) => {
|
|
@@ -40,10 +41,12 @@ var Stepper = (_a) => {
|
|
|
40
41
|
setValue,
|
|
41
42
|
onDecrease,
|
|
42
43
|
onIncrease,
|
|
44
|
+
onBlur,
|
|
43
45
|
id,
|
|
44
46
|
testid,
|
|
45
47
|
min,
|
|
46
|
-
max
|
|
48
|
+
max,
|
|
49
|
+
step = 1
|
|
47
50
|
} = _b, props = __objRest(_b, [
|
|
48
51
|
"error",
|
|
49
52
|
"disabled",
|
|
@@ -52,23 +55,32 @@ var Stepper = (_a) => {
|
|
|
52
55
|
"setValue",
|
|
53
56
|
"onDecrease",
|
|
54
57
|
"onIncrease",
|
|
58
|
+
"onBlur",
|
|
55
59
|
"id",
|
|
56
60
|
"testid",
|
|
57
61
|
"min",
|
|
58
|
-
"max"
|
|
62
|
+
"max",
|
|
63
|
+
"step"
|
|
59
64
|
]);
|
|
65
|
+
const [isEditing, setIsEditing] = useState(false);
|
|
66
|
+
const [displayValue, setDisplayValue] = useState(String(value));
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
if (!isEditing) {
|
|
69
|
+
setDisplayValue(String(value));
|
|
70
|
+
}
|
|
71
|
+
}, [value, isEditing]);
|
|
60
72
|
function handleIncrease() {
|
|
61
73
|
if (max != null && value >= max) {
|
|
62
74
|
return;
|
|
63
75
|
}
|
|
64
|
-
setValue((prevVal) => prevVal +
|
|
76
|
+
setValue((prevVal) => Math.min(prevVal + step, max != null ? max : Infinity));
|
|
65
77
|
onIncrease == null ? void 0 : onIncrease();
|
|
66
78
|
}
|
|
67
79
|
function handleDecrease() {
|
|
68
80
|
if (min != null && value <= min) {
|
|
69
81
|
return;
|
|
70
82
|
}
|
|
71
|
-
setValue((prevVal) => prevVal -
|
|
83
|
+
setValue((prevVal) => Math.max(prevVal - step, min != null ? min : -Infinity));
|
|
72
84
|
onDecrease == null ? void 0 : onDecrease();
|
|
73
85
|
}
|
|
74
86
|
return /* @__PURE__ */ jsxs(
|
|
@@ -112,18 +124,36 @@ var Stepper = (_a) => {
|
|
|
112
124
|
__spreadProps(__spreadValues({}, props), {
|
|
113
125
|
id: id ? `${id}-input` : void 0,
|
|
114
126
|
testid: testid ? `${testid}-input` : void 0,
|
|
115
|
-
type: "
|
|
127
|
+
type: "text",
|
|
128
|
+
inputMode: "numeric",
|
|
129
|
+
pattern: "[0-9]*",
|
|
116
130
|
align: "center",
|
|
117
|
-
value,
|
|
131
|
+
value: displayValue,
|
|
132
|
+
onFocus: () => setIsEditing(true),
|
|
118
133
|
onChange: (e) => {
|
|
119
|
-
const
|
|
120
|
-
|
|
134
|
+
const rawValue = e.target.value;
|
|
135
|
+
if (rawValue === "") {
|
|
136
|
+
setDisplayValue("");
|
|
137
|
+
setValue(0);
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
if (!/^\d*$/.test(rawValue)) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const cleanedValue = rawValue.replace(/^0+/, "") || "0";
|
|
144
|
+
const nextValue = parseInt(cleanedValue, 10);
|
|
121
145
|
const greaterThanMaximum = max != null && nextValue > max;
|
|
122
|
-
if (
|
|
146
|
+
if (greaterThanMaximum) {
|
|
123
147
|
return;
|
|
124
148
|
}
|
|
149
|
+
setDisplayValue(cleanedValue);
|
|
125
150
|
setValue(nextValue);
|
|
126
151
|
},
|
|
152
|
+
onBlur: () => {
|
|
153
|
+
setIsEditing(false);
|
|
154
|
+
setDisplayValue(String(value));
|
|
155
|
+
onBlur == null ? void 0 : onBlur();
|
|
156
|
+
},
|
|
127
157
|
error,
|
|
128
158
|
disabled,
|
|
129
159
|
className: "!w-6 !h-4.5 !px-0 disabled:!text-text-on-action-primary-disabled disabled:!bg-background-action-secondary-disabled disabled:!border-border-primary-normal"
|
package/dist/components/Time.js
CHANGED
|
@@ -401,7 +401,8 @@ var Button = (_a) => {
|
|
|
401
401
|
href,
|
|
402
402
|
id,
|
|
403
403
|
testid,
|
|
404
|
-
isLoading
|
|
404
|
+
isLoading,
|
|
405
|
+
fontNormal = false
|
|
405
406
|
} = _b, props = __objRest(_b, [
|
|
406
407
|
"variant",
|
|
407
408
|
"as",
|
|
@@ -417,7 +418,8 @@ var Button = (_a) => {
|
|
|
417
418
|
"href",
|
|
418
419
|
"id",
|
|
419
420
|
"testid",
|
|
420
|
-
"isLoading"
|
|
421
|
+
"isLoading",
|
|
422
|
+
"fontNormal"
|
|
421
423
|
]);
|
|
422
424
|
const primaryVariantStyles = variant === "primary" && (0, import_clsx5.default)(
|
|
423
425
|
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
|
|
@@ -444,6 +446,15 @@ var Button = (_a) => {
|
|
|
444
446
|
"active:bg-background-action-secondary-active active:border-transparent active:text-text-action-primary-active",
|
|
445
447
|
"disabled:bg-transparent disabled:border-transparent disabled:text-text-action-primary-disabled"
|
|
446
448
|
);
|
|
449
|
+
const quarternaryOutlinedVariantStyles = variant === "quarternary-outlined" && (0, import_clsx5.default)(
|
|
450
|
+
"bg-transparent border-transparent",
|
|
451
|
+
iconOnly ? (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-icon-action-primary-normal" : (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-primary-normal",
|
|
452
|
+
"bg-transparent border-transparent",
|
|
453
|
+
"hover:bg-transparent hover:border-border-primary-normal hover:text-text-primary-normal",
|
|
454
|
+
"focus:bg-transparent focus:border-border-primary-normal focus:text-text-primary-normal focus:outline-0",
|
|
455
|
+
"active:bg-transparent active:border-transparent active:text-text-primary-active",
|
|
456
|
+
"disabled:bg-transparent disabled:border-transparent disabled:text-text-action-primary-disabled"
|
|
457
|
+
);
|
|
447
458
|
const primaryCriticalVariantStyles = variant === "primary-critical" && (0, import_clsx5.default)(
|
|
448
459
|
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
|
|
449
460
|
"bg-background-action-critical-primary-normal border-background-action-critical-primary-normal",
|
|
@@ -487,6 +498,7 @@ var Button = (_a) => {
|
|
|
487
498
|
primaryVariantStyles,
|
|
488
499
|
secondaryVariantStyles,
|
|
489
500
|
tertiaryVariantStyles,
|
|
501
|
+
quarternaryOutlinedVariantStyles,
|
|
490
502
|
primaryCriticalVariantStyles,
|
|
491
503
|
secondaryCriticalVariantStyles,
|
|
492
504
|
tertiaryCriticalVariantStyles,
|
|
@@ -497,6 +509,7 @@ var Button = (_a) => {
|
|
|
497
509
|
const labelClasses = (0, import_clsx5.default)(
|
|
498
510
|
"min-h-6 flex items-center justify-center",
|
|
499
511
|
classNameLabel,
|
|
512
|
+
fontNormal && "font-normal!",
|
|
500
513
|
componentPaddingXUsingComponentGap,
|
|
501
514
|
typography.buttonLabel
|
|
502
515
|
);
|
package/dist/components/Toast.js
CHANGED
|
@@ -199,12 +199,15 @@ var useMatchesMedia = (query) => {
|
|
|
199
199
|
};
|
|
200
200
|
var useMatchesMobile = () => useMatchesMedia("(width < 48rem)");
|
|
201
201
|
|
|
202
|
+
// src/hooks/useTableLayout/useTableLayout.ts
|
|
203
|
+
var import_react4 = require("react");
|
|
204
|
+
|
|
202
205
|
// src/utils/index.ts
|
|
203
|
-
var LocalStoragePrefixVersion = `dmsi-acc-v1.1.
|
|
206
|
+
var LocalStoragePrefixVersion = `dmsi-acc-v1.1.5`;
|
|
204
207
|
|
|
205
|
-
// src/hooks/useTableLayout.ts
|
|
206
|
-
var
|
|
207
|
-
var
|
|
208
|
+
// src/hooks/useTableLayout/storage.ts
|
|
209
|
+
var STORAGE_PREFIX = `${LocalStoragePrefixVersion}-tablePrefs`;
|
|
210
|
+
var LEGACY_STORAGE_PREFIX = `${LocalStoragePrefixVersion}-tableLayout`;
|
|
208
211
|
|
|
209
212
|
// src/hooks/useEditCell.tsx
|
|
210
213
|
var import_react5 = require("react");
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Tooltip
|
|
4
4
|
} from "../chunk-HT57FLRW.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-ZRFXUER3.js";
|
|
6
6
|
import "../chunk-WVGXD7HT.js";
|
|
7
7
|
import "../chunk-VXWSAIB5.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-TBZ243DS.js";
|
|
9
9
|
import "../chunk-5UH6QUFB.js";
|
|
10
10
|
import "../chunk-7KWFEH56.js";
|
|
11
11
|
import "../chunk-ORMEWXMH.js";
|
|
@@ -344,7 +344,8 @@ var Button = (_a) => {
|
|
|
344
344
|
href,
|
|
345
345
|
id,
|
|
346
346
|
testid,
|
|
347
|
-
isLoading
|
|
347
|
+
isLoading,
|
|
348
|
+
fontNormal = false
|
|
348
349
|
} = _b, props = __objRest(_b, [
|
|
349
350
|
"variant",
|
|
350
351
|
"as",
|
|
@@ -360,7 +361,8 @@ var Button = (_a) => {
|
|
|
360
361
|
"href",
|
|
361
362
|
"id",
|
|
362
363
|
"testid",
|
|
363
|
-
"isLoading"
|
|
364
|
+
"isLoading",
|
|
365
|
+
"fontNormal"
|
|
364
366
|
]);
|
|
365
367
|
const primaryVariantStyles = variant === "primary" && (0, import_clsx4.default)(
|
|
366
368
|
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
|
|
@@ -387,6 +389,15 @@ var Button = (_a) => {
|
|
|
387
389
|
"active:bg-background-action-secondary-active active:border-transparent active:text-text-action-primary-active",
|
|
388
390
|
"disabled:bg-transparent disabled:border-transparent disabled:text-text-action-primary-disabled"
|
|
389
391
|
);
|
|
392
|
+
const quarternaryOutlinedVariantStyles = variant === "quarternary-outlined" && (0, import_clsx4.default)(
|
|
393
|
+
"bg-transparent border-transparent",
|
|
394
|
+
iconOnly ? (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-icon-action-primary-normal" : (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-primary-normal",
|
|
395
|
+
"bg-transparent border-transparent",
|
|
396
|
+
"hover:bg-transparent hover:border-border-primary-normal hover:text-text-primary-normal",
|
|
397
|
+
"focus:bg-transparent focus:border-border-primary-normal focus:text-text-primary-normal focus:outline-0",
|
|
398
|
+
"active:bg-transparent active:border-transparent active:text-text-primary-active",
|
|
399
|
+
"disabled:bg-transparent disabled:border-transparent disabled:text-text-action-primary-disabled"
|
|
400
|
+
);
|
|
390
401
|
const primaryCriticalVariantStyles = variant === "primary-critical" && (0, import_clsx4.default)(
|
|
391
402
|
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
|
|
392
403
|
"bg-background-action-critical-primary-normal border-background-action-critical-primary-normal",
|
|
@@ -430,6 +441,7 @@ var Button = (_a) => {
|
|
|
430
441
|
primaryVariantStyles,
|
|
431
442
|
secondaryVariantStyles,
|
|
432
443
|
tertiaryVariantStyles,
|
|
444
|
+
quarternaryOutlinedVariantStyles,
|
|
433
445
|
primaryCriticalVariantStyles,
|
|
434
446
|
secondaryCriticalVariantStyles,
|
|
435
447
|
tertiaryCriticalVariantStyles,
|
|
@@ -440,6 +452,7 @@ var Button = (_a) => {
|
|
|
440
452
|
const labelClasses = (0, import_clsx4.default)(
|
|
441
453
|
"min-h-6 flex items-center justify-center",
|
|
442
454
|
classNameLabel,
|
|
455
|
+
fontNormal && "font-normal!",
|
|
443
456
|
componentPaddingXUsingComponentGap,
|
|
444
457
|
typography.buttonLabel
|
|
445
458
|
);
|