@ethisyscore/plugin-ui 1.63.0 → 1.64.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/components/data-grid/index.cjs +161 -0
- package/dist/components/data-grid/index.cjs.map +1 -0
- package/dist/components/data-grid/index.d.cts +234 -0
- package/dist/components/data-grid/index.d.ts +234 -0
- package/dist/components/data-grid/index.js +145 -0
- package/dist/components/data-grid/index.js.map +1 -0
- package/dist/components/layout/index.cjs +637 -25
- package/dist/components/layout/index.cjs.map +1 -1
- package/dist/components/layout/index.js +593 -3
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/shared/index.cjs +750 -57
- package/dist/components/shared/index.cjs.map +1 -1
- package/dist/components/shared/index.d.cts +21 -1
- package/dist/components/shared/index.d.ts +21 -1
- package/dist/components/shared/index.js +720 -50
- package/dist/components/shared/index.js.map +1 -1
- package/dist/components/ui/index.cjs +619 -0
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.cts +64 -1
- package/dist/components/ui/index.d.ts +64 -1
- package/dist/components/ui/index.js +594 -3
- package/dist/components/ui/index.js.map +1 -1
- package/package.json +21 -1
|
@@ -2,56 +2,124 @@
|
|
|
2
2
|
|
|
3
3
|
var material = require('@mui/material');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
var
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var dayjs2 = require('dayjs');
|
|
7
|
+
var LocalizationProvider = require('@mui/x-date-pickers/LocalizationProvider');
|
|
8
|
+
var AdapterDayjs = require('@mui/x-date-pickers/AdapterDayjs');
|
|
9
|
+
var DatePicker = require('@mui/x-date-pickers/DatePicker');
|
|
10
|
+
var DateTimePicker = require('@mui/x-date-pickers/DateTimePicker');
|
|
6
11
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
12
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
|
|
14
|
+
function _interopNamespace(e) {
|
|
15
|
+
if (e && e.__esModule) return e;
|
|
16
|
+
var n = Object.create(null);
|
|
17
|
+
if (e) {
|
|
18
|
+
Object.keys(e).forEach(function (k) {
|
|
19
|
+
if (k !== 'default') {
|
|
20
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
21
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return e[k]; }
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
n.default = e;
|
|
29
|
+
return Object.freeze(n);
|
|
10
30
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
31
|
+
|
|
32
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
33
|
+
var dayjs2__default = /*#__PURE__*/_interopDefault(dayjs2);
|
|
34
|
+
|
|
35
|
+
// src/components/shared/EmptyState.tsx
|
|
36
|
+
function NiArchive({
|
|
37
|
+
className,
|
|
38
|
+
variant = "outlined",
|
|
39
|
+
size = "medium",
|
|
40
|
+
oneTone = false
|
|
21
41
|
}) {
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
42
|
+
const iconSize = sizeHelper(size);
|
|
43
|
+
const iconStrokeWidth = strokeSizeHelper(iconSize);
|
|
44
|
+
if (variant === "outlined") {
|
|
45
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
46
|
+
"svg",
|
|
47
|
+
{
|
|
48
|
+
width: iconSize,
|
|
49
|
+
height: iconSize,
|
|
50
|
+
className,
|
|
51
|
+
viewBox: "0 0 24 24",
|
|
52
|
+
fill: "none",
|
|
53
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
56
|
+
"path",
|
|
57
|
+
{
|
|
58
|
+
d: "M22 7V5.71496C22 4.17371 20.8321 2.88321 19.2985 2.72985L17.9702 2.59702C14 2.2 10 2.2 6.02978 2.59702L4.70149 2.72985C3.16788 2.88321 2 4.17371 2 5.71496V7C2 8.10457 2.89543 9 4 9H20C21.1046 9 22 8.10457 22 7Z",
|
|
59
|
+
stroke: "currentColor",
|
|
60
|
+
strokeWidth: iconStrokeWidth,
|
|
61
|
+
strokeLinecap: "round",
|
|
62
|
+
strokeLinejoin: "round"
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
66
|
+
"path",
|
|
67
|
+
{
|
|
68
|
+
d: "M4.53333 9.5L4.4768 9.74619C3.83435 12.544 3.8494 15.4543 4.51997 18.2455V18.2455C4.85389 19.6354 5.95655 20.7108 7.35451 21.009V21.009C10.4171 21.6623 13.5829 21.6623 16.6455 21.009V21.009C18.0434 20.7108 19.1461 19.6354 19.48 18.2455V18.2455C20.1506 15.4543 20.1657 12.544 19.5232 9.74618L19.4667 9.5",
|
|
69
|
+
stroke: "currentColor",
|
|
70
|
+
strokeWidth: iconStrokeWidth,
|
|
71
|
+
strokeLinecap: "round"
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
75
|
+
"path",
|
|
76
|
+
{
|
|
77
|
+
opacity: oneTone ? 1 : 0.6,
|
|
78
|
+
d: "M14.0945 13.9189C14.3504 13.9701 14.5682 14.1365 14.6849 14.3698V14.3698C14.8833 14.7665 14.8833 15.2335 14.6849 15.6302V15.6302C14.5682 15.8635 14.3504 16.0299 14.0945 16.0811L13.8853 16.1229C12.6408 16.3718 11.3592 16.3718 10.1147 16.1229L9.90546 16.0811C9.64963 16.0299 9.43176 15.8635 9.31508 15.6302V15.6302C9.11673 15.2335 9.11673 14.7665 9.31508 14.3698V14.3698C9.43176 14.1365 9.64963 13.9701 9.90546 13.9189L10.1147 13.8771C11.3592 13.6282 12.6408 13.6282 13.8853 13.8771L14.0945 13.9189Z",
|
|
79
|
+
stroke: "currentColor",
|
|
80
|
+
strokeWidth: iconStrokeWidth
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
} else {
|
|
87
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
88
|
+
"svg",
|
|
89
|
+
{
|
|
90
|
+
width: iconSize,
|
|
91
|
+
height: iconSize,
|
|
92
|
+
className,
|
|
93
|
+
viewBox: "0 0 24 24",
|
|
94
|
+
fill: "none",
|
|
95
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
98
|
+
"path",
|
|
99
|
+
{
|
|
100
|
+
d: "M5.95508 1.85031C9.9749 1.44833 14.0251 1.44833 18.0449 1.85031L19.373 1.98312C21.2897 2.17479 22.7495 3.78844 22.75 5.71457V6.99972C22.75 7.86931 22.345 8.64326 21.7148 9.14719C21.1107 7.71812 19.7022 6.75088 18.1025 6.7507H5.89746C4.29778 6.75078 2.8884 7.71735 2.28418 9.14621C1.65469 8.64226 1.25 7.86881 1.25 6.99972V5.71457C1.2505 3.78844 2.71028 2.17479 4.62695 1.98312L5.95508 1.85031Z",
|
|
101
|
+
fill: "currentColor"
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
105
|
+
"path",
|
|
106
|
+
{
|
|
107
|
+
d: "M18.1028 8.25C19.2525 8.25003 20.2447 9.05777 20.4778 10.1836C20.9988 12.7045 20.957 15.3105 20.3557 17.8135L20.2092 18.4219C19.8078 20.0924 18.4823 21.3837 16.802 21.7422C13.6364 22.4174 10.3641 22.4174 7.19849 21.7422C5.51812 21.3837 4.19273 20.0925 3.79126 18.4219L3.64478 17.8135C3.04349 15.3105 3.00171 12.7045 3.52271 10.1836C3.75577 9.05776 4.74793 8.25 5.89771 8.25H18.1028ZM14.0334 13.1406C12.6922 12.8724 11.3103 12.8725 9.96899 13.1406L9.75903 13.1826C9.27649 13.2792 8.86496 13.5931 8.64477 14.0332C8.34086 14.641 8.34086 15.357 8.64477 15.9648C8.86494 16.405 9.27646 16.7188 9.75903 16.8154L9.96899 16.8574C11.3103 17.1255 12.6922 17.1257 14.0334 16.8574L14.2424 16.8154C14.7249 16.7187 15.1366 16.4049 15.3567 15.9648C15.6604 15.3571 15.6604 14.6409 15.3567 14.0332C15.1366 13.5931 14.7249 13.2793 14.2424 13.1826L14.0334 13.1406Z",
|
|
108
|
+
fill: "currentColor"
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
112
|
+
"path",
|
|
113
|
+
{
|
|
114
|
+
opacity: oneTone ? 0 : 0.4,
|
|
115
|
+
d: "M9.96866 13.1406C11.3101 12.8724 12.6917 12.8723 14.0331 13.1406L14.2421 13.1826C14.7247 13.2792 15.1362 13.593 15.3563 14.0332C15.6602 14.641 15.6602 15.357 15.3563 15.9648C15.1362 16.405 14.7247 16.7188 14.2421 16.8154L14.0331 16.8574C12.6917 17.1257 11.3101 17.1256 9.96866 16.8574L9.7587 16.8154C9.27607 16.7188 8.86459 16.4051 8.64444 15.9648C8.34052 15.357 8.34052 14.641 8.64444 14.0332C8.86461 13.593 9.27611 13.2792 9.7587 13.1826L9.96866 13.1406Z",
|
|
116
|
+
fill: "currentColor"
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
}
|
|
55
123
|
}
|
|
56
124
|
function NiBinEmpty({ className, variant = "outlined", size = "medium" }) {
|
|
57
125
|
const iconSize = sizeHelper(size);
|
|
@@ -130,6 +198,415 @@ function NiBinEmpty({ className, variant = "outlined", size = "medium" }) {
|
|
|
130
198
|
);
|
|
131
199
|
}
|
|
132
200
|
}
|
|
201
|
+
function NiCalendar({
|
|
202
|
+
className,
|
|
203
|
+
variant = "outlined",
|
|
204
|
+
size = "medium",
|
|
205
|
+
oneTone = false
|
|
206
|
+
}) {
|
|
207
|
+
const iconSize = sizeHelper(size);
|
|
208
|
+
const iconStrokeWidth = strokeSizeHelper(iconSize);
|
|
209
|
+
if (variant === "outlined") {
|
|
210
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
211
|
+
"svg",
|
|
212
|
+
{
|
|
213
|
+
width: iconSize,
|
|
214
|
+
height: iconSize,
|
|
215
|
+
className,
|
|
216
|
+
viewBox: "0 0 24 24",
|
|
217
|
+
fill: "none",
|
|
218
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
219
|
+
children: [
|
|
220
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
221
|
+
"path",
|
|
222
|
+
{
|
|
223
|
+
d: "M15.4356 3.38173C18.6934 3.74372 21.2712 6.30485 21.6542 9.56029V9.56029C21.8839 11.5134 21.8839 13.4866 21.6542 15.4397V15.4397C21.2712 18.6951 18.6934 21.2563 15.4356 21.6183L14.9973 21.667C13.0052 21.8883 10.9948 21.8883 9.0027 21.667L8.56439 21.6183C5.30655 21.2563 2.72884 18.6951 2.34585 15.4397V15.4397C2.11607 13.4866 2.11607 11.5134 2.34585 9.56029V9.56029C2.72884 6.30485 5.30656 3.74371 8.5644 3.38173L9.0027 3.33303C10.9948 3.11169 13.0052 3.11169 14.9973 3.33303L15.4356 3.38173Z",
|
|
224
|
+
stroke: "currentColor",
|
|
225
|
+
strokeWidth: iconStrokeWidth
|
|
226
|
+
}
|
|
227
|
+
),
|
|
228
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
229
|
+
"path",
|
|
230
|
+
{
|
|
231
|
+
opacity: oneTone ? 1 : 0.6,
|
|
232
|
+
d: "M8.5 11L7.5 11",
|
|
233
|
+
stroke: "currentColor",
|
|
234
|
+
strokeWidth: iconStrokeWidth,
|
|
235
|
+
strokeLinecap: "round"
|
|
236
|
+
}
|
|
237
|
+
),
|
|
238
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
239
|
+
"path",
|
|
240
|
+
{
|
|
241
|
+
opacity: oneTone ? 1 : 0.6,
|
|
242
|
+
d: "M8.5 15L7.5 15",
|
|
243
|
+
stroke: "currentColor",
|
|
244
|
+
strokeWidth: iconStrokeWidth,
|
|
245
|
+
strokeLinecap: "round"
|
|
246
|
+
}
|
|
247
|
+
),
|
|
248
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
249
|
+
"path",
|
|
250
|
+
{
|
|
251
|
+
opacity: oneTone ? 1 : 0.6,
|
|
252
|
+
d: "M12.5 11L11.5 11",
|
|
253
|
+
stroke: "currentColor",
|
|
254
|
+
strokeWidth: iconStrokeWidth,
|
|
255
|
+
strokeLinecap: "round"
|
|
256
|
+
}
|
|
257
|
+
),
|
|
258
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
259
|
+
"path",
|
|
260
|
+
{
|
|
261
|
+
opacity: oneTone ? 1 : 0.6,
|
|
262
|
+
d: "M12.5 15L11.5 15",
|
|
263
|
+
stroke: "currentColor",
|
|
264
|
+
strokeWidth: iconStrokeWidth,
|
|
265
|
+
strokeLinecap: "round"
|
|
266
|
+
}
|
|
267
|
+
),
|
|
268
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
269
|
+
"path",
|
|
270
|
+
{
|
|
271
|
+
opacity: oneTone ? 1 : 0.6,
|
|
272
|
+
d: "M16.5 11L15.5 11",
|
|
273
|
+
stroke: "currentColor",
|
|
274
|
+
strokeWidth: iconStrokeWidth,
|
|
275
|
+
strokeLinecap: "round"
|
|
276
|
+
}
|
|
277
|
+
),
|
|
278
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
279
|
+
"path",
|
|
280
|
+
{
|
|
281
|
+
opacity: oneTone ? 1 : 0.6,
|
|
282
|
+
d: "M16.5 15L15.5 15",
|
|
283
|
+
stroke: "currentColor",
|
|
284
|
+
strokeWidth: iconStrokeWidth,
|
|
285
|
+
strokeLinecap: "round"
|
|
286
|
+
}
|
|
287
|
+
),
|
|
288
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 2L8 5", stroke: "currentColor", strokeWidth: iconStrokeWidth, strokeLinecap: "round" }),
|
|
289
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16 2L16 5", stroke: "currentColor", strokeWidth: iconStrokeWidth, strokeLinecap: "round" })
|
|
290
|
+
]
|
|
291
|
+
}
|
|
292
|
+
);
|
|
293
|
+
} else {
|
|
294
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
295
|
+
"svg",
|
|
296
|
+
{
|
|
297
|
+
width: iconSize,
|
|
298
|
+
height: iconSize,
|
|
299
|
+
className,
|
|
300
|
+
viewBox: "0 0 24 24",
|
|
301
|
+
fill: "none",
|
|
302
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
303
|
+
children: [
|
|
304
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
305
|
+
"path",
|
|
306
|
+
{
|
|
307
|
+
fillRule: "evenodd",
|
|
308
|
+
clipRule: "evenodd",
|
|
309
|
+
d: "M16.0002 1.25C16.4142 1.25024 16.7502 1.58594 16.7502 2V2.87598C19.7568 3.71245 22.0243 6.29258 22.3986 9.47266C22.6352 11.4837 22.6352 13.5163 22.3986 15.5273C21.9747 19.1291 19.1222 21.9627 15.5178 22.3633L15.0793 22.4121C13.0325 22.6395 10.9659 22.6395 8.91912 22.4121L8.48065 22.3633C4.87659 21.9623 2.02462 19.1288 1.60076 15.5273C1.3642 13.5163 1.3642 11.4837 1.60076 9.47266C1.97507 6.29232 4.24318 3.71226 7.25018 2.87598V2C7.25018 1.58579 7.58596 1.25 8.00018 1.25C8.41419 1.25024 8.75018 1.58594 8.75018 2V2.60645L8.91912 2.58789C10.9659 2.36048 13.0325 2.36054 15.0793 2.58789L15.2502 2.60645V2C15.2502 1.58579 15.586 1.25 16.0002 1.25ZM7.50018 14.25L7.42303 14.2539C7.04506 14.2925 6.75018 14.6118 6.75018 15C6.75018 15.3882 7.04506 15.7075 7.42303 15.7461L7.50018 15.75H8.50018C8.91425 15.7498 9.25018 15.4141 9.25018 15C9.25018 14.5859 8.91425 14.2502 8.50018 14.25H7.50018ZM11.5002 14.25L11.423 14.2539C11.0451 14.2925 10.7502 14.6118 10.7502 15C10.7502 15.3882 11.0451 15.7075 11.423 15.7461L11.5002 15.75H12.5002C12.9142 15.7498 13.2502 15.4141 13.2502 15C13.2502 14.5859 12.9142 14.2502 12.5002 14.25H11.5002ZM15.5002 14.25L15.423 14.2539C15.0451 14.2925 14.7502 14.6118 14.7502 15C14.7502 15.3882 15.0451 15.7075 15.423 15.7461L15.5002 15.75H16.5002C16.9142 15.7498 17.2502 15.4141 17.2502 15C17.2502 14.5859 16.9142 14.2502 16.5002 14.25H15.5002ZM7.50018 10.25L7.42303 10.2539C7.04506 10.2925 6.75018 10.6118 6.75018 11C6.75018 11.3882 7.04506 11.7075 7.42303 11.7461L7.50018 11.75H8.50018C8.91425 11.7498 9.25018 11.4141 9.25018 11C9.25018 10.5859 8.91425 10.2502 8.50018 10.25H7.50018ZM11.5002 10.25L11.423 10.2539C11.0451 10.2925 10.7502 10.6118 10.7502 11C10.7502 11.3882 11.0451 11.7075 11.423 11.7461L11.5002 11.75H12.5002C12.9142 11.7498 13.2502 11.4141 13.2502 11C13.2502 10.5859 12.9142 10.2502 12.5002 10.25H11.5002ZM15.5002 10.25L15.423 10.2539C15.0451 10.2925 14.7502 10.6118 14.7502 11C14.7502 11.3882 15.0451 11.7075 15.423 11.7461L15.5002 11.75H16.5002C16.9142 11.7498 17.2502 11.4141 17.2502 11C17.2502 10.5859 16.9142 10.2502 16.5002 10.25H15.5002Z",
|
|
310
|
+
fill: "currentColor"
|
|
311
|
+
}
|
|
312
|
+
),
|
|
313
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
314
|
+
"path",
|
|
315
|
+
{
|
|
316
|
+
opacity: oneTone ? 0 : 0.4,
|
|
317
|
+
d: "M8.5 14.25C8.91421 14.25 9.25 14.5858 9.25 15C9.25 15.4142 8.91421 15.75 8.5 15.75H7.5L7.42285 15.7461C7.04488 15.7075 6.75 15.3882 6.75 15C6.75 14.6118 7.04488 14.2925 7.42285 14.2539L7.5 14.25H8.5Z",
|
|
318
|
+
fill: "currentColor"
|
|
319
|
+
}
|
|
320
|
+
),
|
|
321
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
322
|
+
"path",
|
|
323
|
+
{
|
|
324
|
+
opacity: oneTone ? 0 : 0.4,
|
|
325
|
+
d: "M12.5 14.25C12.9142 14.25 13.25 14.5858 13.25 15C13.25 15.4142 12.9142 15.75 12.5 15.75H11.5L11.4229 15.7461C11.0449 15.7075 10.75 15.3882 10.75 15C10.75 14.6118 11.0449 14.2925 11.4229 14.2539L11.5 14.25H12.5Z",
|
|
326
|
+
fill: "currentColor"
|
|
327
|
+
}
|
|
328
|
+
),
|
|
329
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
330
|
+
"path",
|
|
331
|
+
{
|
|
332
|
+
opacity: oneTone ? 0 : 0.4,
|
|
333
|
+
d: "M16.5 14.25C16.9142 14.25 17.25 14.5858 17.25 15C17.25 15.4142 16.9142 15.75 16.5 15.75H15.5L15.4229 15.7461C15.0449 15.7075 14.75 15.3882 14.75 15C14.75 14.6118 15.0449 14.2925 15.4229 14.2539L15.5 14.25H16.5Z",
|
|
334
|
+
fill: "currentColor"
|
|
335
|
+
}
|
|
336
|
+
),
|
|
337
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
338
|
+
"path",
|
|
339
|
+
{
|
|
340
|
+
opacity: oneTone ? 0 : 0.4,
|
|
341
|
+
d: "M8.5 10.25C8.91421 10.25 9.25 10.5858 9.25 11C9.25 11.4142 8.91421 11.75 8.5 11.75H7.5L7.42285 11.7461C7.04488 11.7075 6.75 11.3882 6.75 11C6.75 10.6118 7.04488 10.2925 7.42285 10.2539L7.5 10.25H8.5Z",
|
|
342
|
+
fill: "currentColor"
|
|
343
|
+
}
|
|
344
|
+
),
|
|
345
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
346
|
+
"path",
|
|
347
|
+
{
|
|
348
|
+
opacity: oneTone ? 0 : 0.4,
|
|
349
|
+
d: "M12.5 10.25C12.9142 10.25 13.25 10.5858 13.25 11C13.25 11.4142 12.9142 11.75 12.5 11.75H11.5L11.4229 11.7461C11.0449 11.7075 10.75 11.3882 10.75 11C10.75 10.6118 11.0449 10.2925 11.4229 10.2539L11.5 10.25H12.5Z",
|
|
350
|
+
fill: "currentColor"
|
|
351
|
+
}
|
|
352
|
+
),
|
|
353
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
354
|
+
"path",
|
|
355
|
+
{
|
|
356
|
+
opacity: oneTone ? 0 : 0.4,
|
|
357
|
+
d: "M16.5 10.25C16.9142 10.25 17.25 10.5858 17.25 11C17.25 11.4142 16.9142 11.75 16.5 11.75H15.5L15.4229 11.7461C15.0449 11.7075 14.75 11.3882 14.75 11C14.75 10.6118 15.0449 10.2925 15.4229 10.2539L15.5 10.25H16.5Z",
|
|
358
|
+
fill: "currentColor"
|
|
359
|
+
}
|
|
360
|
+
)
|
|
361
|
+
]
|
|
362
|
+
}
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
function NiChevronDownSmall({ className, variant = "outlined", size = "medium" }) {
|
|
367
|
+
const iconSize = sizeHelper(size);
|
|
368
|
+
const iconStrokeWidth = strokeSizeHelper(iconSize);
|
|
369
|
+
if (variant === "outlined") {
|
|
370
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
371
|
+
"svg",
|
|
372
|
+
{
|
|
373
|
+
width: iconSize,
|
|
374
|
+
height: iconSize,
|
|
375
|
+
className,
|
|
376
|
+
viewBox: "0 0 24 24",
|
|
377
|
+
fill: "none",
|
|
378
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
379
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
380
|
+
"path",
|
|
381
|
+
{
|
|
382
|
+
d: "M8 10L11.1515 13.1515C11.6201 13.6201 12.3799 13.6201 12.8485 13.1515L16 10",
|
|
383
|
+
stroke: "currentColor",
|
|
384
|
+
strokeWidth: iconStrokeWidth,
|
|
385
|
+
strokeLinecap: "round"
|
|
386
|
+
}
|
|
387
|
+
)
|
|
388
|
+
}
|
|
389
|
+
);
|
|
390
|
+
} else {
|
|
391
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
392
|
+
"svg",
|
|
393
|
+
{
|
|
394
|
+
width: iconSize,
|
|
395
|
+
height: iconSize,
|
|
396
|
+
className,
|
|
397
|
+
viewBox: "0 0 24 24",
|
|
398
|
+
fill: "none",
|
|
399
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
400
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
401
|
+
"path",
|
|
402
|
+
{
|
|
403
|
+
d: "M7.46967 9.46967C7.17678 9.76256 7.17678 10.2373 7.46967 10.5302L10.621 13.6816C11.3826 14.4431 12.6173 14.4431 13.3788 13.6816L16.5302 10.5302C16.8231 10.2373 16.8231 9.76256 16.5302 9.46967C16.2373 9.17678 15.7626 9.17678 15.4697 9.46967L12.3183 12.621C12.1426 12.7968 11.8573 12.7968 11.6816 12.621L8.53022 9.46967C8.23732 9.17678 7.76256 9.17678 7.46967 9.46967Z",
|
|
404
|
+
fill: "currentColor"
|
|
405
|
+
}
|
|
406
|
+
)
|
|
407
|
+
}
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
function NiChevronLeftSmall({ className, variant = "outlined", size = "medium" }) {
|
|
412
|
+
const iconSize = sizeHelper(size);
|
|
413
|
+
const iconStrokeWidth = strokeSizeHelper(iconSize);
|
|
414
|
+
if (variant === "outlined") {
|
|
415
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
416
|
+
"svg",
|
|
417
|
+
{
|
|
418
|
+
width: iconSize,
|
|
419
|
+
height: iconSize,
|
|
420
|
+
className,
|
|
421
|
+
viewBox: "0 0 24 24",
|
|
422
|
+
fill: "none",
|
|
423
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
424
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
425
|
+
"path",
|
|
426
|
+
{
|
|
427
|
+
d: "M14 8L10.8485 11.1515C10.3799 11.6201 10.3799 12.3799 10.8485 12.8485L14 16",
|
|
428
|
+
stroke: "currentColor",
|
|
429
|
+
strokeWidth: iconStrokeWidth,
|
|
430
|
+
strokeLinecap: "round"
|
|
431
|
+
}
|
|
432
|
+
)
|
|
433
|
+
}
|
|
434
|
+
);
|
|
435
|
+
} else {
|
|
436
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
437
|
+
"svg",
|
|
438
|
+
{
|
|
439
|
+
width: iconSize,
|
|
440
|
+
height: iconSize,
|
|
441
|
+
className,
|
|
442
|
+
viewBox: "0 0 24 24",
|
|
443
|
+
fill: "none",
|
|
444
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
445
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
446
|
+
"path",
|
|
447
|
+
{
|
|
448
|
+
d: "M14.5303 7.46967C14.2374 7.17678 13.7627 7.17678 13.4698 7.46967L10.3184 10.621C9.55689 11.3826 9.55689 12.6173 10.3184 13.3788L13.4698 16.5302C13.7627 16.8231 14.2374 16.8231 14.5303 16.5302C14.8232 16.2373 14.8232 15.7626 14.5303 15.4697L11.379 12.3183C11.2032 12.1426 11.2032 11.8573 11.379 11.6816L14.5303 8.53022C14.8232 8.23732 14.8232 7.76256 14.5303 7.46967Z",
|
|
449
|
+
fill: "currentColor"
|
|
450
|
+
}
|
|
451
|
+
)
|
|
452
|
+
}
|
|
453
|
+
);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
function NiChevronRightSmall({ className, variant = "outlined", size = "medium" }) {
|
|
457
|
+
const iconSize = sizeHelper(size);
|
|
458
|
+
const iconStrokeWidth = strokeSizeHelper(iconSize);
|
|
459
|
+
if (variant === "outlined") {
|
|
460
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
461
|
+
"svg",
|
|
462
|
+
{
|
|
463
|
+
width: iconSize,
|
|
464
|
+
height: iconSize,
|
|
465
|
+
className,
|
|
466
|
+
viewBox: "0 0 24 24",
|
|
467
|
+
fill: "none",
|
|
468
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
469
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
470
|
+
"path",
|
|
471
|
+
{
|
|
472
|
+
d: "M10 16L13.1515 12.8485C13.6201 12.3799 13.6201 11.6201 13.1515 11.1515L10 8",
|
|
473
|
+
stroke: "currentColor",
|
|
474
|
+
strokeWidth: iconStrokeWidth,
|
|
475
|
+
strokeLinecap: "round"
|
|
476
|
+
}
|
|
477
|
+
)
|
|
478
|
+
}
|
|
479
|
+
);
|
|
480
|
+
} else {
|
|
481
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
482
|
+
"svg",
|
|
483
|
+
{
|
|
484
|
+
width: iconSize,
|
|
485
|
+
height: iconSize,
|
|
486
|
+
className,
|
|
487
|
+
viewBox: "0 0 24 24",
|
|
488
|
+
fill: "none",
|
|
489
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
490
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
491
|
+
"path",
|
|
492
|
+
{
|
|
493
|
+
d: "M9.46967 16.5303C9.76256 16.8232 10.2373 16.8232 10.5302 16.5303L13.6816 13.379C14.4431 12.6174 14.4431 11.3827 13.6816 10.6212L10.5302 7.46978C10.2373 7.17689 9.76256 7.17689 9.46967 7.46978C9.17678 7.76268 9.17678 8.23744 9.46967 8.53033L12.621 11.6817C12.7968 11.8574 12.7968 12.1427 12.621 12.3184L9.46967 15.4698C9.17678 15.7627 9.17678 16.2374 9.46967 16.5303Z",
|
|
494
|
+
fill: "currentColor"
|
|
495
|
+
}
|
|
496
|
+
)
|
|
497
|
+
}
|
|
498
|
+
);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
function NiCross({ className, variant = "outlined", size = "medium" }) {
|
|
502
|
+
const iconSize = sizeHelper(size);
|
|
503
|
+
const iconStrokeWidth = strokeSizeHelper(iconSize);
|
|
504
|
+
if (variant === "outlined") {
|
|
505
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
506
|
+
"svg",
|
|
507
|
+
{
|
|
508
|
+
width: iconSize,
|
|
509
|
+
height: iconSize,
|
|
510
|
+
className,
|
|
511
|
+
viewBox: "0 0 24 24",
|
|
512
|
+
fill: "none",
|
|
513
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
514
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
515
|
+
"path",
|
|
516
|
+
{
|
|
517
|
+
d: "M8.00016 8L12.0001 12M12.0001 12L16 16.0002M12.0001 12L16 8.00015M12.0001 12L8 16.0002",
|
|
518
|
+
stroke: "currentColor",
|
|
519
|
+
strokeWidth: iconStrokeWidth,
|
|
520
|
+
strokeLinecap: "round"
|
|
521
|
+
}
|
|
522
|
+
)
|
|
523
|
+
}
|
|
524
|
+
);
|
|
525
|
+
} else {
|
|
526
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
527
|
+
"svg",
|
|
528
|
+
{
|
|
529
|
+
width: iconSize,
|
|
530
|
+
height: iconSize,
|
|
531
|
+
className,
|
|
532
|
+
viewBox: "0 0 24 24",
|
|
533
|
+
fill: "none",
|
|
534
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
535
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
536
|
+
"path",
|
|
537
|
+
{
|
|
538
|
+
d: "M15.4698 7.46963C15.7626 7.17684 16.2374 7.17684 16.5303 7.46963C16.8232 7.7625 16.8231 8.23728 16.5303 8.53018L13.0606 11.9999L16.5303 15.4696C16.8232 15.7625 16.8231 16.2373 16.5303 16.5302C16.2557 16.8048 15.821 16.8223 15.5264 16.5819L15.4698 16.5302L12 13.0604L8.53032 16.5302C8.23743 16.8231 7.76267 16.8231 7.46977 16.5302C7.17697 16.2373 7.17691 15.7625 7.46977 15.4696L10.9395 11.9999L7.46977 8.53018L7.41801 8.47354C7.1778 8.17898 7.19527 7.74421 7.46977 7.46963C7.76264 7.17676 8.23742 7.17682 8.53032 7.46963L12 10.9394L15.4698 7.46963Z",
|
|
539
|
+
fill: "currentColor"
|
|
540
|
+
}
|
|
541
|
+
)
|
|
542
|
+
}
|
|
543
|
+
);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
function NiSearch({
|
|
547
|
+
className,
|
|
548
|
+
variant = "outlined",
|
|
549
|
+
size = "medium",
|
|
550
|
+
oneTone = false
|
|
551
|
+
}) {
|
|
552
|
+
const iconSize = sizeHelper(size);
|
|
553
|
+
const iconStrokeWidth = strokeSizeHelper(iconSize);
|
|
554
|
+
if (variant === "outlined") {
|
|
555
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
556
|
+
"svg",
|
|
557
|
+
{
|
|
558
|
+
width: iconSize,
|
|
559
|
+
height: iconSize,
|
|
560
|
+
className,
|
|
561
|
+
viewBox: "0 0 24 24",
|
|
562
|
+
fill: "none",
|
|
563
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
564
|
+
children: [
|
|
565
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
566
|
+
"path",
|
|
567
|
+
{
|
|
568
|
+
opacity: oneTone ? 1 : 0.6,
|
|
569
|
+
d: "M22 22L18.5 18.5",
|
|
570
|
+
stroke: "currentColor",
|
|
571
|
+
strokeWidth: iconStrokeWidth,
|
|
572
|
+
strokeLinecap: "round"
|
|
573
|
+
}
|
|
574
|
+
),
|
|
575
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "11.5", cy: "11.5", r: "9.5", stroke: "currentColor", strokeWidth: iconStrokeWidth })
|
|
576
|
+
]
|
|
577
|
+
}
|
|
578
|
+
);
|
|
579
|
+
} else {
|
|
580
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
581
|
+
"svg",
|
|
582
|
+
{
|
|
583
|
+
width: iconSize,
|
|
584
|
+
height: iconSize,
|
|
585
|
+
className,
|
|
586
|
+
viewBox: "0 0 24 24",
|
|
587
|
+
fill: "none",
|
|
588
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
589
|
+
children: [
|
|
590
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
591
|
+
"path",
|
|
592
|
+
{
|
|
593
|
+
opacity: oneTone ? 1 : 0.4,
|
|
594
|
+
d: "M19.0303 17.9697C18.7374 17.6768 18.2627 17.6768 17.9698 17.9697C17.6769 18.2626 17.6769 18.7373 17.9698 19.0302L21.4698 22.5302C21.7627 22.8231 22.2374 22.8231 22.5303 22.5302C22.8232 22.2373 22.8232 21.7626 22.5303 21.4697L19.0303 17.9697Z",
|
|
595
|
+
fill: "currentColor"
|
|
596
|
+
}
|
|
597
|
+
),
|
|
598
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
599
|
+
"path",
|
|
600
|
+
{
|
|
601
|
+
d: "M11.5 1.25C17.1609 1.25 21.75 5.83908 21.75 11.5C21.75 17.1609 17.1609 21.75 11.5 21.75C5.83908 21.75 1.25 17.1609 1.25 11.5C1.25 5.83908 5.83908 1.25 11.5 1.25Z",
|
|
602
|
+
fill: "currentColor"
|
|
603
|
+
}
|
|
604
|
+
)
|
|
605
|
+
]
|
|
606
|
+
}
|
|
607
|
+
);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
133
610
|
var sizeHelper = (size) => {
|
|
134
611
|
if (typeof size === "number") {
|
|
135
612
|
return size;
|
|
@@ -150,6 +627,221 @@ var strokeSizeHelper = (size) => {
|
|
|
150
627
|
return 1.75;
|
|
151
628
|
}
|
|
152
629
|
};
|
|
630
|
+
function EmptyState({
|
|
631
|
+
icon = /* @__PURE__ */ jsxRuntime.jsx(NiArchive, { className: "text-text-disabled", size: "large" }),
|
|
632
|
+
title = "No items yet",
|
|
633
|
+
description = "Create your first item to get started",
|
|
634
|
+
fill = false
|
|
635
|
+
}) {
|
|
636
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { className: `flex flex-col items-center justify-center py-12 text-center ${fill ? "flex-1" : ""}`, children: [
|
|
637
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Box, { className: "mb-3", children: icon }),
|
|
638
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body1", className: "text-text-secondary", children: title }),
|
|
639
|
+
description ? /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", className: "text-text-disabled mt-1", children: description }) : null
|
|
640
|
+
] });
|
|
641
|
+
}
|
|
642
|
+
function Dialog(props) {
|
|
643
|
+
return /* @__PURE__ */ jsxRuntime.jsx(material.Dialog, { disableScrollLock: true, disableRestoreFocus: true, ...props });
|
|
644
|
+
}
|
|
645
|
+
React.memo(function DebouncedSearchInput2({
|
|
646
|
+
value = "",
|
|
647
|
+
onChange,
|
|
648
|
+
label = "Search",
|
|
649
|
+
delay = 400,
|
|
650
|
+
className
|
|
651
|
+
}) {
|
|
652
|
+
const [localValue, setLocalValue] = React.useState(value);
|
|
653
|
+
const inputId = React.useId();
|
|
654
|
+
const onChangeRef = React.useRef(onChange);
|
|
655
|
+
onChangeRef.current = onChange;
|
|
656
|
+
const lastReportedRef = React.useRef(value);
|
|
657
|
+
const isFirstRender = React.useRef(true);
|
|
658
|
+
React.useEffect(() => {
|
|
659
|
+
setLocalValue(value);
|
|
660
|
+
lastReportedRef.current = value;
|
|
661
|
+
}, [value]);
|
|
662
|
+
React.useEffect(() => {
|
|
663
|
+
if (isFirstRender.current) {
|
|
664
|
+
isFirstRender.current = false;
|
|
665
|
+
return;
|
|
666
|
+
}
|
|
667
|
+
if (localValue === lastReportedRef.current) return;
|
|
668
|
+
const timer = setTimeout(() => {
|
|
669
|
+
lastReportedRef.current = localValue;
|
|
670
|
+
onChangeRef.current(localValue);
|
|
671
|
+
}, delay);
|
|
672
|
+
return () => clearTimeout(timer);
|
|
673
|
+
}, [localValue, delay]);
|
|
674
|
+
const handleClear = React.useCallback(() => {
|
|
675
|
+
setLocalValue("");
|
|
676
|
+
lastReportedRef.current = "";
|
|
677
|
+
onChangeRef.current("");
|
|
678
|
+
}, []);
|
|
679
|
+
const classes = (...parts) => parts.filter(Boolean).join(" ");
|
|
680
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(material.FormControl, { variant: "filled", size: "medium", className: classes("surface mb-0 w-full", className), children: [
|
|
681
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.InputLabel, { htmlFor: inputId, children: label }),
|
|
682
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
683
|
+
material.FilledInput,
|
|
684
|
+
{
|
|
685
|
+
id: inputId,
|
|
686
|
+
value: localValue,
|
|
687
|
+
onChange: (e) => setLocalValue(e.target.value),
|
|
688
|
+
endAdornment: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
689
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.InputAdornment, { position: "end", className: classes(localValue === "" && "hidden"), children: /* @__PURE__ */ jsxRuntime.jsx(material.IconButton, { edge: "end", onClick: handleClear, "aria-label": "Clear search", children: /* @__PURE__ */ jsxRuntime.jsx(NiCross, { size: "medium", className: "text-text-disabled" }) }) }),
|
|
690
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.InputAdornment, { position: "end", className: classes(localValue !== "" && "hidden"), "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(material.IconButton, { edge: "end", disabled: true, tabIndex: -1, children: /* @__PURE__ */ jsxRuntime.jsx(NiSearch, { size: "medium", className: "text-text-disabled" }) }) })
|
|
691
|
+
] })
|
|
692
|
+
}
|
|
693
|
+
)
|
|
694
|
+
] });
|
|
695
|
+
});
|
|
696
|
+
var DATE_INPUT_MIN = "1900-01-01";
|
|
697
|
+
var DATE_INPUT_MAX = "2100-12-31";
|
|
698
|
+
function toIsoString(value, type) {
|
|
699
|
+
if (!value?.isValid()) {
|
|
700
|
+
return "";
|
|
701
|
+
}
|
|
702
|
+
return type === "datetime-local" ? value.format("YYYY-MM-DDTHH:mm") : value.format("YYYY-MM-DD");
|
|
703
|
+
}
|
|
704
|
+
function parseIsoValue(value) {
|
|
705
|
+
if (!value) {
|
|
706
|
+
return null;
|
|
707
|
+
}
|
|
708
|
+
const parsed = dayjs2__default.default(value);
|
|
709
|
+
return parsed.isValid() ? parsed : null;
|
|
710
|
+
}
|
|
711
|
+
var popperModifiers = [
|
|
712
|
+
{ name: "preventOverflow", options: { altBoundary: true } },
|
|
713
|
+
{ name: "flip", options: { altBoundary: true } }
|
|
714
|
+
];
|
|
715
|
+
var withSecondaryText = (className) => [typeof className === "string" ? className : void 0, "text-text-secondary"].filter(Boolean).join(" ");
|
|
716
|
+
var pickerSlots = {
|
|
717
|
+
openPickerIcon: (props) => /* @__PURE__ */ jsxRuntime.jsx(NiCalendar, { ...props, className: withSecondaryText(props.className) }),
|
|
718
|
+
switchViewIcon: (props) => /* @__PURE__ */ jsxRuntime.jsx(NiChevronDownSmall, { ...props, className: withSecondaryText(props.className) }),
|
|
719
|
+
leftArrowIcon: (props) => /* @__PURE__ */ jsxRuntime.jsx(NiChevronLeftSmall, { ...props, className: withSecondaryText(props.className) }),
|
|
720
|
+
rightArrowIcon: (props) => /* @__PURE__ */ jsxRuntime.jsx(NiChevronRightSmall, { ...props, className: withSecondaryText(props.className) })
|
|
721
|
+
};
|
|
722
|
+
var DateInput = React__namespace.forwardRef(
|
|
723
|
+
({
|
|
724
|
+
type = "date",
|
|
725
|
+
min,
|
|
726
|
+
max,
|
|
727
|
+
rejectInvalidValue: _rejectInvalidValue,
|
|
728
|
+
value,
|
|
729
|
+
onChange,
|
|
730
|
+
onBlur,
|
|
731
|
+
label,
|
|
732
|
+
helperText,
|
|
733
|
+
error,
|
|
734
|
+
disabled,
|
|
735
|
+
slotProps: callerSlotProps,
|
|
736
|
+
...rest
|
|
737
|
+
}, ref) => {
|
|
738
|
+
const handleChange = React__namespace.useCallback(
|
|
739
|
+
(newValue) => {
|
|
740
|
+
if (!onChange) return;
|
|
741
|
+
const strValue = toIsoString(newValue, type);
|
|
742
|
+
const input = document.createElement("input");
|
|
743
|
+
input.value = strValue;
|
|
744
|
+
onChange({
|
|
745
|
+
target: input,
|
|
746
|
+
currentTarget: input,
|
|
747
|
+
type: "change"
|
|
748
|
+
});
|
|
749
|
+
},
|
|
750
|
+
[onChange, type]
|
|
751
|
+
);
|
|
752
|
+
const parsedValue = parseIsoValue(value);
|
|
753
|
+
const minDate = min ? dayjs2__default.default(min) : dayjs2__default.default(DATE_INPUT_MIN);
|
|
754
|
+
const maxDate = max ? dayjs2__default.default(max) : dayjs2__default.default(DATE_INPUT_MAX).endOf("day");
|
|
755
|
+
const textFieldProps = {
|
|
756
|
+
...rest,
|
|
757
|
+
disabled,
|
|
758
|
+
error: Boolean(error),
|
|
759
|
+
helperText,
|
|
760
|
+
onBlur,
|
|
761
|
+
inputRef: ref,
|
|
762
|
+
slotProps: callerSlotProps
|
|
763
|
+
};
|
|
764
|
+
return /* @__PURE__ */ jsxRuntime.jsx(LocalizationProvider.LocalizationProvider, { dateAdapter: AdapterDayjs.AdapterDayjs, children: type === "datetime-local" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
765
|
+
DateTimePicker.DateTimePicker,
|
|
766
|
+
{
|
|
767
|
+
label,
|
|
768
|
+
value: parsedValue,
|
|
769
|
+
onChange: handleChange,
|
|
770
|
+
minDateTime: minDate,
|
|
771
|
+
maxDateTime: maxDate,
|
|
772
|
+
disabled,
|
|
773
|
+
slots: pickerSlots,
|
|
774
|
+
slotProps: {
|
|
775
|
+
textField: textFieldProps,
|
|
776
|
+
desktopPaper: { className: "outlined" },
|
|
777
|
+
popper: { sx: { zIndex: 1600 }, popperOptions: { modifiers: popperModifiers } }
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
781
|
+
DatePicker.DatePicker,
|
|
782
|
+
{
|
|
783
|
+
label,
|
|
784
|
+
value: parsedValue,
|
|
785
|
+
onChange: handleChange,
|
|
786
|
+
minDate,
|
|
787
|
+
maxDate,
|
|
788
|
+
disabled,
|
|
789
|
+
slots: pickerSlots,
|
|
790
|
+
slotProps: {
|
|
791
|
+
textField: textFieldProps,
|
|
792
|
+
desktopPaper: { className: "outlined" },
|
|
793
|
+
popper: { sx: { zIndex: 1600 }, popperOptions: { modifiers: popperModifiers } }
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
) });
|
|
797
|
+
}
|
|
798
|
+
);
|
|
799
|
+
DateInput.displayName = "DateInput";
|
|
800
|
+
function ConfirmActionDialog({
|
|
801
|
+
open,
|
|
802
|
+
onOpenChange,
|
|
803
|
+
onConfirm,
|
|
804
|
+
isLoading = false,
|
|
805
|
+
labels,
|
|
806
|
+
icon,
|
|
807
|
+
confirmVariant = "default",
|
|
808
|
+
children,
|
|
809
|
+
disableConfirm
|
|
810
|
+
}) {
|
|
811
|
+
const description = labels.description ?? "Are you sure you want to continue?";
|
|
812
|
+
const btnCancel = labels.btnCancel ?? "Cancel";
|
|
813
|
+
const btnConfirm = labels.btnConfirm ?? "Confirm";
|
|
814
|
+
const btnLoading = labels.btnLoading ?? "Processing...";
|
|
815
|
+
const handleClose = () => {
|
|
816
|
+
if (!isLoading) onOpenChange(false);
|
|
817
|
+
};
|
|
818
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Dialog, { open, onClose: handleClose, maxWidth: "xs", fullWidth: true, role: "alertdialog", children: [
|
|
819
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.DialogTitle, { className: "flex items-center gap-2", children: [
|
|
820
|
+
icon,
|
|
821
|
+
labels.title
|
|
822
|
+
] }),
|
|
823
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.DialogContent, { children: [
|
|
824
|
+
typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx(material.DialogContentText, { children: description }) : /* @__PURE__ */ jsxRuntime.jsx(material.DialogContentText, { component: "div", children: description }),
|
|
825
|
+
children
|
|
826
|
+
] }),
|
|
827
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.DialogActions, { children: [
|
|
828
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Button, { onClick: handleClose, disabled: isLoading, children: btnCancel }),
|
|
829
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
830
|
+
material.Button,
|
|
831
|
+
{
|
|
832
|
+
variant: "contained",
|
|
833
|
+
color: confirmVariant === "destructive" ? "error" : "primary",
|
|
834
|
+
onClick: onConfirm,
|
|
835
|
+
disabled: isLoading || disableConfirm,
|
|
836
|
+
children: isLoading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
837
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 16, color: "inherit", className: "mr-2" }),
|
|
838
|
+
btnLoading
|
|
839
|
+
] }) : btnConfirm
|
|
840
|
+
}
|
|
841
|
+
)
|
|
842
|
+
] })
|
|
843
|
+
] });
|
|
844
|
+
}
|
|
153
845
|
function ConfirmDeleteDialog({
|
|
154
846
|
open,
|
|
155
847
|
onOpenChange,
|
|
@@ -181,22 +873,22 @@ function ConfirmDeleteDialog({
|
|
|
181
873
|
] });
|
|
182
874
|
}
|
|
183
875
|
function useConfirmDialog() {
|
|
184
|
-
const [isOpen, setIsOpen] =
|
|
185
|
-
const open =
|
|
186
|
-
const close =
|
|
876
|
+
const [isOpen, setIsOpen] = React.useState(false);
|
|
877
|
+
const open = React.useCallback(() => setIsOpen(true), []);
|
|
878
|
+
const close = React.useCallback(() => setIsOpen(false), []);
|
|
187
879
|
return { isOpen, open, close };
|
|
188
880
|
}
|
|
189
881
|
function useTargetDialog() {
|
|
190
|
-
const [target, setTarget] =
|
|
191
|
-
const open =
|
|
192
|
-
const close =
|
|
882
|
+
const [target, setTarget] = React.useState(null);
|
|
883
|
+
const open = React.useCallback((value) => setTarget(value), []);
|
|
884
|
+
const close = React.useCallback(() => setTarget(null), []);
|
|
193
885
|
return { target, isOpen: target !== null, open, close };
|
|
194
886
|
}
|
|
195
887
|
function useReasonDialog() {
|
|
196
|
-
const [isOpen, setIsOpen] =
|
|
197
|
-
const [reason, setReason] =
|
|
198
|
-
const open =
|
|
199
|
-
const close =
|
|
888
|
+
const [isOpen, setIsOpen] = React.useState(false);
|
|
889
|
+
const [reason, setReason] = React.useState("");
|
|
890
|
+
const open = React.useCallback(() => setIsOpen(true), []);
|
|
891
|
+
const close = React.useCallback(() => {
|
|
200
892
|
setIsOpen(false);
|
|
201
893
|
setReason("");
|
|
202
894
|
}, []);
|
|
@@ -237,6 +929,7 @@ function useToast() {
|
|
|
237
929
|
|
|
238
930
|
exports.ConfirmActionDialog = ConfirmActionDialog;
|
|
239
931
|
exports.ConfirmDeleteDialog = ConfirmDeleteDialog;
|
|
932
|
+
exports.EmptyState = EmptyState;
|
|
240
933
|
exports.showErrorToast = showErrorToast;
|
|
241
934
|
exports.showSuccessToast = showSuccessToast;
|
|
242
935
|
exports.showWarningToast = showWarningToast;
|