@foi/design-system 0.0.13 → 0.0.15
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/{RadioGroup-DCJBoZc-.js → RadioGroup-BdWsLUz-.js} +4 -4
- package/dist/{RadioGroup-DCJBoZc-.js.map → RadioGroup-BdWsLUz-.js.map} +1 -1
- package/dist/{RadioGroup.context-QNk2hW_4.js → RadioGroup.context-BBa8PDLt.js} +4 -4
- package/dist/RadioGroup.context-BBa8PDLt.js.map +1 -0
- package/dist/{Switch-JF9P9VJf.js → Switch-BNFdKefE.js} +1394 -886
- package/dist/Switch-BNFdKefE.js.map +1 -0
- package/dist/{ThemeProvider-Q2Hjezbt.js → ThemeProvider-C47pyWG6.js} +2 -2
- package/dist/{ThemeProvider-Q2Hjezbt.js.map → ThemeProvider-C47pyWG6.js.map} +1 -1
- package/dist/atoms.d.ts +4 -2
- package/dist/atoms.mjs +3 -3
- package/dist/components/atoms/NumberField/NumberField.d.ts +5 -0
- package/dist/components/atoms/NumberField/NumberField.interface.d.ts +57 -0
- package/dist/components/atoms/NumberField/index.d.ts +4 -0
- package/dist/components/atoms/TextField/TextField.d.ts +5 -0
- package/dist/components/atoms/TextField/TextField.emotion.d.ts +2 -0
- package/dist/components/atoms/TextField/TextField.interface.d.ts +51 -0
- package/dist/components/atoms/TextField/index.d.ts +4 -0
- package/dist/{emotion-react-jsx-runtime.browser.esm-C4rLUMui.js → emotion-react-jsx-runtime.browser.esm-Ch-DwUYg.js} +2 -2
- package/dist/{emotion-react-jsx-runtime.browser.esm-C4rLUMui.js.map → emotion-react-jsx-runtime.browser.esm-Ch-DwUYg.js.map} +1 -1
- package/dist/hocs/ThemeProvider/components/Input.d.ts +1 -1
- package/dist/hocs/ThemeProvider/components/NumberField.d.ts +38 -0
- package/dist/hocs/ThemeProvider/components/index.d.ts +3 -2
- package/dist/hocs/ThemeProvider/interfaces/Components.interface.d.ts +2 -1
- package/dist/hocs.mjs +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.mjs +198 -194
- package/dist/index.mjs.map +1 -1
- package/dist/molecules.mjs +1 -1
- package/dist/theme/dark/components/Input.d.ts +1 -1
- package/dist/theme/dark/components/NumberField.d.ts +60 -0
- package/dist/theme/dark/components/index.d.ts +58 -1
- package/dist/theme/dark/index.d.ts +58 -1
- package/dist/theme/index.d.ts +58 -1
- package/dist/{theme-Cxg9jdmX.js → theme-D01EcUA9.js} +81 -44
- package/dist/theme-D01EcUA9.js.map +1 -0
- package/dist/theme.mjs +1 -1
- package/package.json +1 -1
- package/dist/RadioGroup.context-QNk2hW_4.js.map +0 -1
- package/dist/Switch-JF9P9VJf.js.map +0 -1
- package/dist/components/atoms/Input/Input.d.ts +0 -10
- package/dist/components/atoms/Input/Input.interface.d.ts +0 -108
- package/dist/components/atoms/Input/index.d.ts +0 -4
- package/dist/theme-Cxg9jdmX.js.map +0 -1
- /package/dist/components/atoms/{Input/Input.emotion.d.ts → NumberField/NumberField.emotion.d.ts} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "./emotion-react-jsx-runtime.browser.esm-
|
|
2
|
-
import { n as i, r as a } from "./theme-
|
|
3
|
-
import { a as o, n as s, o as c } from "./RadioGroup.context-
|
|
4
|
-
import { a as l, c as u, i as d,
|
|
5
|
-
import { n as
|
|
6
|
-
import { t as
|
|
7
|
-
import { useCallback as
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./emotion-react-jsx-runtime.browser.esm-Ch-DwUYg.js";
|
|
2
|
+
import { n as i, r as a } from "./theme-D01EcUA9.js";
|
|
3
|
+
import { a as o, n as s, o as c } from "./RadioGroup.context-BBa8PDLt.js";
|
|
4
|
+
import { a as l, c as u, i as d, l as f, n as p, o as m, r as h, s as g, t as _ } from "./Switch-BNFdKefE.js";
|
|
5
|
+
import { n as v, r as y, t as b } from "./RadioGroup-BdWsLUz-.js";
|
|
6
|
+
import { t as x } from "./ThemeProvider-C47pyWG6.js";
|
|
7
|
+
import { useCallback as S, useEffect as C, useLayoutEffect as ee, useMemo as w, useRef as T, useState as E } from "react";
|
|
8
8
|
import { css as D, keyframes as O } from "@emotion/react";
|
|
9
9
|
import k from "react-dom";
|
|
10
10
|
//#region src/components/atoms/Skeleton/Skeleton.emotion.ts
|
|
11
|
-
var
|
|
11
|
+
var A = D`
|
|
12
12
|
&.--SKELETON {
|
|
13
13
|
display: block;
|
|
14
14
|
background: linear-gradient(
|
|
@@ -31,13 +31,13 @@ var ee = D`
|
|
|
31
31
|
border-radius: 4px;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
`,
|
|
34
|
+
`, j = ({ variant: e = "rectangular", width: n, height: r, className: i }) => /* @__PURE__ */ t("span", {
|
|
35
35
|
className: [
|
|
36
36
|
"--SKELETON",
|
|
37
37
|
`--SKELETON--${e}`,
|
|
38
38
|
i || ""
|
|
39
39
|
].filter(Boolean).join(" "),
|
|
40
|
-
css:
|
|
40
|
+
css: A,
|
|
41
41
|
style: {
|
|
42
42
|
width: n,
|
|
43
43
|
height: r
|
|
@@ -213,7 +213,7 @@ var ee = D`
|
|
|
213
213
|
padding: 12px 16px !important;
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
|
-
`,
|
|
216
|
+
`, M = (e, t) => `
|
|
217
217
|
// BACKGROUNDS
|
|
218
218
|
${a(e, "background-color", `--DATAGRIDMENU-${t}-BACKGROUND-COLOR`)}
|
|
219
219
|
|
|
@@ -222,7 +222,7 @@ var ee = D`
|
|
|
222
222
|
${a(e, "border-width", `--DATAGRIDMENU-${t}-BORDER-WIDTH`)}
|
|
223
223
|
${a(e, "border-style", `--DATAGRIDMENU-${t}-BORDER-STYLE`)}
|
|
224
224
|
${a(e, "border-radius", `--DATAGRIDMENU-${t}-BORDER-RADIUS`)}
|
|
225
|
-
`,
|
|
225
|
+
`, N = (e) => D`
|
|
226
226
|
&.--DATAGRIDMENU {
|
|
227
227
|
position: fixed;
|
|
228
228
|
z-index: 200;
|
|
@@ -230,13 +230,13 @@ var ee = D`
|
|
|
230
230
|
width: calc(240px - 32px);
|
|
231
231
|
display: flex;
|
|
232
232
|
flex-direction: column;
|
|
233
|
-
gap:
|
|
233
|
+
gap: 12px;
|
|
234
234
|
box-shadow:
|
|
235
235
|
rgba(0, 0, 0, 0.2) 0px 5px 5px -3px,
|
|
236
236
|
rgba(0, 0, 0, 0.14) 0px 8px 10px 1px,
|
|
237
237
|
rgba(0, 0, 0, 0.12) 0px 3px 14px 2px;
|
|
238
238
|
|
|
239
|
-
${
|
|
239
|
+
${M(e, "ROOT")}
|
|
240
240
|
|
|
241
241
|
.--DATAGRIDMENU-header {
|
|
242
242
|
display: flex;
|
|
@@ -261,19 +261,23 @@ var ee = D`
|
|
|
261
261
|
|
|
262
262
|
.--DATAGRIDMENU-optionsList {
|
|
263
263
|
max-height: 180px;
|
|
264
|
+
overflow-y: auto;
|
|
265
|
+
// padding + negative margin let the Checkbox ::before shadow render without being clipped
|
|
266
|
+
padding: 4px 8px;
|
|
267
|
+
margin: 0 -8px;
|
|
264
268
|
display: flex;
|
|
265
269
|
flex-direction: column;
|
|
266
270
|
gap: 12px;
|
|
267
271
|
|
|
268
272
|
&::-webkit-scrollbar {
|
|
269
|
-
width:
|
|
270
|
-
|
|
271
|
-
&::-webkit-scrollbar-track {
|
|
272
|
-
background: transparent;
|
|
273
|
+
width: 12px;
|
|
274
|
+
height: 4px;
|
|
273
275
|
}
|
|
274
276
|
&::-webkit-scrollbar-thumb {
|
|
275
|
-
background-color: rgba(
|
|
276
|
-
border-radius:
|
|
277
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
278
|
+
border-radius: 9999px;
|
|
279
|
+
border: 3px solid transparent;
|
|
280
|
+
background-clip: padding-box;
|
|
277
281
|
}
|
|
278
282
|
}
|
|
279
283
|
|
|
@@ -296,9 +300,9 @@ var ee = D`
|
|
|
296
300
|
justify-content: flex-end;
|
|
297
301
|
}
|
|
298
302
|
}
|
|
299
|
-
`,
|
|
300
|
-
className: `${
|
|
301
|
-
children: /* @__PURE__ */ t(
|
|
303
|
+
`, P = "--DATAGRIDMENU", F = ({ columnKey: e, pendingSearch: n, onSearchChange: r, searchLabel: i = "Search" }) => /* @__PURE__ */ t("div", {
|
|
304
|
+
className: `${P}-searchInput`,
|
|
305
|
+
children: /* @__PURE__ */ t(m, {
|
|
302
306
|
name: `search-${e}`,
|
|
303
307
|
label: i,
|
|
304
308
|
value: n,
|
|
@@ -306,33 +310,33 @@ var ee = D`
|
|
|
306
310
|
showErrorText: !1,
|
|
307
311
|
width: "full",
|
|
308
312
|
autoFocus: !0,
|
|
309
|
-
"data-testid": `${
|
|
313
|
+
"data-testid": `${P}-searchInput-${e}`,
|
|
310
314
|
startAdornment: /* @__PURE__ */ t(o, {
|
|
311
315
|
name: "search",
|
|
312
316
|
style: { color: "white" }
|
|
313
317
|
})
|
|
314
318
|
})
|
|
315
|
-
}),
|
|
316
|
-
let
|
|
317
|
-
return /* @__PURE__ */ n(r, { children: [
|
|
318
|
-
className: `${
|
|
319
|
-
children: /* @__PURE__ */ t(
|
|
319
|
+
}), I = "--DATAGRIDMENU", L = ({ filterType: e, columnKey: i, options: a, pendingMulti: o, onMultiChange: c, multiSearch: l, onMultiSearchChange: u }) => {
|
|
320
|
+
let d = e === "multiselect-search", f = a.filter((e) => !l || e.label.toLowerCase().includes(l.toLowerCase()));
|
|
321
|
+
return /* @__PURE__ */ n(r, { children: [d && /* @__PURE__ */ t("div", {
|
|
322
|
+
className: `${I}-searchInput`,
|
|
323
|
+
children: /* @__PURE__ */ t(m, {
|
|
320
324
|
name: `multiSearch-${i}`,
|
|
321
325
|
label: "Search options",
|
|
322
|
-
value:
|
|
323
|
-
onValueChange:
|
|
326
|
+
value: l,
|
|
327
|
+
onValueChange: u,
|
|
324
328
|
showErrorText: !1,
|
|
325
329
|
width: "full",
|
|
326
330
|
autoFocus: !0,
|
|
327
|
-
"data-testid": `${
|
|
331
|
+
"data-testid": `${I}-multiSearch-${i}`
|
|
328
332
|
})
|
|
329
333
|
}), /* @__PURE__ */ t("div", {
|
|
330
|
-
className: `${
|
|
331
|
-
"data-testid": `${
|
|
332
|
-
children:
|
|
333
|
-
className: `${
|
|
334
|
+
className: `${I}-optionsList`,
|
|
335
|
+
"data-testid": `${I}-optionsList-${i}`,
|
|
336
|
+
children: f.map((e) => /* @__PURE__ */ n("div", {
|
|
337
|
+
className: `${I}-optionRow`,
|
|
334
338
|
children: [e.color && /* @__PURE__ */ t("span", {
|
|
335
|
-
className: `${
|
|
339
|
+
className: `${I}-optionDot`,
|
|
336
340
|
style: { backgroundColor: e.color },
|
|
337
341
|
"aria-hidden": "true"
|
|
338
342
|
}), /* @__PURE__ */ t(s, {
|
|
@@ -340,71 +344,71 @@ var ee = D`
|
|
|
340
344
|
onChecked: (t) => c(t ? [...o, e.value] : o.filter((t) => t !== e.value)),
|
|
341
345
|
label: e.label,
|
|
342
346
|
showErrorText: !1,
|
|
343
|
-
"data-testid": `${
|
|
347
|
+
"data-testid": `${I}-option-${i}-${e.value}`
|
|
344
348
|
})]
|
|
345
349
|
}, e.value))
|
|
346
350
|
})] });
|
|
347
|
-
},
|
|
348
|
-
let
|
|
349
|
-
return
|
|
351
|
+
}, R = "--DATAGRIDMENU", z = ({ filterType: e, options: r, columnKey: i, filterTitle: a, searchLabel: s, cancelLabel: c = "Cancel", applyLabel: l = "Apply", pendingSearch: d, onSearchChange: p, pendingMulti: m, onMultiChange: h, multiSearch: g, onMultiSearchChange: _, onCancel: v, onApply: y, onClear: b, anchorEl: x, style: S }) => {
|
|
352
|
+
let C = T(null);
|
|
353
|
+
return ee(() => {
|
|
350
354
|
if (!x) return;
|
|
351
355
|
let e = () => {
|
|
352
|
-
if (!
|
|
353
|
-
let e = x.getBoundingClientRect(), t =
|
|
354
|
-
|
|
356
|
+
if (!C.current) return;
|
|
357
|
+
let e = x.getBoundingClientRect(), t = C.current.offsetWidth, n = e.left + e.width / 2 - t / 2;
|
|
358
|
+
C.current.style.top = `${e.bottom + 8}px`, C.current.style.left = `${Math.max(8, Math.min(n, window.innerWidth - t - 8))}px`;
|
|
355
359
|
};
|
|
356
360
|
return e(), window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
357
361
|
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
358
362
|
};
|
|
359
363
|
}, [x]), k.createPortal(/* @__PURE__ */ n("div", {
|
|
360
|
-
ref:
|
|
361
|
-
className:
|
|
362
|
-
css:
|
|
364
|
+
ref: C,
|
|
365
|
+
className: R,
|
|
366
|
+
css: N(S),
|
|
363
367
|
"data-popover-key": i,
|
|
364
|
-
"data-testid": `${
|
|
368
|
+
"data-testid": `${R}-${i}`,
|
|
365
369
|
children: [
|
|
366
370
|
/* @__PURE__ */ n("div", {
|
|
367
|
-
className: `${
|
|
371
|
+
className: `${R}-header`,
|
|
368
372
|
children: [/* @__PURE__ */ t("span", {
|
|
369
|
-
className: `${
|
|
373
|
+
className: `${R}-headerTitle`,
|
|
370
374
|
children: a
|
|
371
|
-
}), /* @__PURE__ */ t(
|
|
375
|
+
}), /* @__PURE__ */ t(u, {
|
|
372
376
|
icon: /* @__PURE__ */ t(o, {
|
|
373
377
|
name: "delete_outline",
|
|
374
378
|
size: "sm"
|
|
375
379
|
}),
|
|
376
380
|
onClick: b,
|
|
377
381
|
"aria-label": "Clear filter",
|
|
378
|
-
"data-testid": `${
|
|
382
|
+
"data-testid": `${R}-clearBtn-${i}`
|
|
379
383
|
})]
|
|
380
384
|
}),
|
|
381
385
|
/* @__PURE__ */ n("div", {
|
|
382
|
-
className: `${
|
|
383
|
-
children: [e === "search" && /* @__PURE__ */ t(
|
|
386
|
+
className: `${R}-content`,
|
|
387
|
+
children: [e === "search" && /* @__PURE__ */ t(F, {
|
|
384
388
|
columnKey: i,
|
|
385
389
|
pendingSearch: d,
|
|
386
|
-
onSearchChange:
|
|
390
|
+
onSearchChange: p,
|
|
387
391
|
searchLabel: s
|
|
388
|
-
}), (e === "multiselect" || e === "multiselect-search") && /* @__PURE__ */ t(
|
|
392
|
+
}), (e === "multiselect" || e === "multiselect-search") && /* @__PURE__ */ t(L, {
|
|
389
393
|
filterType: e,
|
|
390
394
|
columnKey: i,
|
|
391
395
|
options: r ?? [],
|
|
392
|
-
pendingMulti:
|
|
393
|
-
onMultiChange:
|
|
396
|
+
pendingMulti: m,
|
|
397
|
+
onMultiChange: h,
|
|
394
398
|
multiSearch: g,
|
|
395
399
|
onMultiSearchChange: _
|
|
396
400
|
})]
|
|
397
401
|
}),
|
|
398
402
|
/* @__PURE__ */ n("div", {
|
|
399
|
-
className: `${
|
|
400
|
-
children: [/* @__PURE__ */ t(
|
|
403
|
+
className: `${R}-actions`,
|
|
404
|
+
children: [/* @__PURE__ */ t(f, {
|
|
401
405
|
onClick: v,
|
|
402
|
-
"data-testid": `${
|
|
406
|
+
"data-testid": `${R}-cancelBtn-${i}`,
|
|
403
407
|
variant: "ghost",
|
|
404
408
|
children: c
|
|
405
|
-
}), /* @__PURE__ */ t(
|
|
409
|
+
}), /* @__PURE__ */ t(f, {
|
|
406
410
|
onClick: y,
|
|
407
|
-
"data-testid": `${
|
|
411
|
+
"data-testid": `${R}-applyBtn-${i}`,
|
|
408
412
|
children: l
|
|
409
413
|
})]
|
|
410
414
|
})
|
|
@@ -412,27 +416,27 @@ var ee = D`
|
|
|
412
416
|
}), document.body);
|
|
413
417
|
}, ne = ({ theme: n, variant: r = "default", ...i }) => {
|
|
414
418
|
let { componentStyles: a } = e([c.DATAGRIDMENU], n, r.toUpperCase());
|
|
415
|
-
return /* @__PURE__ */ t(
|
|
419
|
+
return /* @__PURE__ */ t(z, {
|
|
416
420
|
...i,
|
|
417
421
|
style: a
|
|
418
422
|
});
|
|
419
|
-
},
|
|
423
|
+
}, B = "--DATAGRID", re = ({ columns: e, pageSize: n }) => {
|
|
420
424
|
let i = w(() => Array.from({ length: n }, () => e.map((e) => e.type === "options" ? null : `${Math.floor(Math.random() * 51) + 40}%`)), [n, e.length]);
|
|
421
425
|
return /* @__PURE__ */ t(r, { children: Array.from({ length: n }).map((n, r) => /* @__PURE__ */ t("tr", {
|
|
422
|
-
className: `${
|
|
426
|
+
className: `${B}-row`,
|
|
423
427
|
children: e.map((e, n) => /* @__PURE__ */ t("td", {
|
|
424
|
-
className: [`${
|
|
425
|
-
children: e.type === "options" ? /* @__PURE__ */ t(
|
|
428
|
+
className: [`${B}-td`, e.type === "options" ? `${B}-tdOptions` : ""].filter(Boolean).join(" "),
|
|
429
|
+
children: e.type === "options" ? /* @__PURE__ */ t(j, {
|
|
426
430
|
variant: "circular",
|
|
427
431
|
width: 24,
|
|
428
432
|
height: 24
|
|
429
|
-
}) : /* @__PURE__ */ t(
|
|
433
|
+
}) : /* @__PURE__ */ t(j, {
|
|
430
434
|
height: 16,
|
|
431
435
|
width: i[r][n] ?? void 0
|
|
432
436
|
})
|
|
433
437
|
}, e.key))
|
|
434
438
|
}, r)) });
|
|
435
|
-
},
|
|
439
|
+
}, V = (e) => D`
|
|
436
440
|
&.--PAGINATION {
|
|
437
441
|
display: flex;
|
|
438
442
|
align-items: center;
|
|
@@ -469,7 +473,7 @@ var ee = D`
|
|
|
469
473
|
}
|
|
470
474
|
}
|
|
471
475
|
}
|
|
472
|
-
`,
|
|
476
|
+
`, H = (e, t) => `
|
|
473
477
|
// BACKGROUNDS
|
|
474
478
|
${a(e, "background-color", `--PAGINATIONMENU-EVENTS-${t}-BACKGROUND-COLOR`)}
|
|
475
479
|
|
|
@@ -478,11 +482,11 @@ var ee = D`
|
|
|
478
482
|
${a(e, "border-width", `--PAGINATIONMENU-EVENTS-${t}-BORDER-WIDTH`)}
|
|
479
483
|
${a(e, "border-style", `--PAGINATIONMENU-EVENTS-${t}-BORDER-STYLE`)}
|
|
480
484
|
${a(e, "border-radius", `--PAGINATIONMENU-EVENTS-${t}-BORDER-RADIUS`)}
|
|
481
|
-
`,
|
|
485
|
+
`, U = (e, t) => `
|
|
482
486
|
// TYPOGRAPHY
|
|
483
487
|
${a(e, "color", `--PAGINATIONMENU-EVENTS-${t}-COLOR-PRIMARY`)};
|
|
484
488
|
${a(e, "caret-color", `--PAGINATIONMENU-EVENTS-${t}-COLOR-PRIMARY`)};
|
|
485
|
-
`,
|
|
489
|
+
`, W = (e, t) => `
|
|
486
490
|
// BACKGROUNDS
|
|
487
491
|
${a(e, "background-color", `--PAGINATIONMENU-${t}-BACKGROUND-COLOR`)}
|
|
488
492
|
|
|
@@ -491,7 +495,7 @@ var ee = D`
|
|
|
491
495
|
${a(e, "border-width", `--PAGINATIONMENU-${t}-BORDER-WIDTH`)}
|
|
492
496
|
${a(e, "border-style", `--PAGINATIONMENU-${t}-BORDER-STYLE`)}
|
|
493
497
|
${a(e, "border-radius", `--PAGINATIONMENU-${t}-BORDER-RADIUS`)}
|
|
494
|
-
`,
|
|
498
|
+
`, G = (e) => D`
|
|
495
499
|
&.--PAGINATIONMENU {
|
|
496
500
|
position: absolute;
|
|
497
501
|
bottom: calc(100% + ${e["--PAGINATIONMENU-ROOT-BOTTOM"] || ""});
|
|
@@ -506,7 +510,7 @@ var ee = D`
|
|
|
506
510
|
rgba(0, 0, 0, 0.14) 0px 8px 10px 1px,
|
|
507
511
|
rgba(0, 0, 0, 0.12) 0px 3px 14px 2px;
|
|
508
512
|
|
|
509
|
-
${
|
|
513
|
+
${W(e, "ROOT")}
|
|
510
514
|
|
|
511
515
|
.--PAGINATIONMENU-option {
|
|
512
516
|
all: unset;
|
|
@@ -519,111 +523,111 @@ var ee = D`
|
|
|
519
523
|
font-size: 0.8125rem;
|
|
520
524
|
|
|
521
525
|
// ENABLED
|
|
522
|
-
${V(e, "ENABLED")}
|
|
523
526
|
${H(e, "ENABLED")}
|
|
527
|
+
${U(e, "ENABLED")}
|
|
524
528
|
|
|
525
529
|
// VALUE
|
|
526
530
|
&.--PAGINATIONMENU-selected {
|
|
527
|
-
${V(e, "VALUE")}
|
|
528
531
|
${H(e, "VALUE")}
|
|
532
|
+
${U(e, "VALUE")}
|
|
529
533
|
}
|
|
530
534
|
|
|
531
535
|
// HOVER
|
|
532
536
|
&:hover {
|
|
533
|
-
${V(e, "HOVER")}
|
|
534
537
|
${H(e, "HOVER")}
|
|
538
|
+
${U(e, "HOVER")}
|
|
535
539
|
}
|
|
536
540
|
|
|
537
541
|
// - ACTIVE
|
|
538
542
|
&:active,
|
|
539
543
|
&.--PAGINATIONMENU-active {
|
|
540
|
-
${V(e, "ACTIVE")}
|
|
541
544
|
${H(e, "ACTIVE")}
|
|
545
|
+
${U(e, "ACTIVE")}
|
|
542
546
|
}
|
|
543
547
|
|
|
544
548
|
// FOCUS
|
|
545
549
|
&:focus-visible {
|
|
546
550
|
outline-offset: 0px;
|
|
547
551
|
outline: 0;
|
|
548
|
-
${V(e, "FOCUS")}
|
|
549
552
|
${H(e, "FOCUS")}
|
|
553
|
+
${U(e, "FOCUS")}
|
|
550
554
|
}
|
|
551
555
|
}
|
|
552
556
|
}
|
|
553
|
-
`,
|
|
554
|
-
className:
|
|
555
|
-
css:
|
|
557
|
+
`, K = "--PAGINATIONMENU", q = ({ options: e, activeOption: n, onSelect: r, focusedElement: i = -1, style: a }) => /* @__PURE__ */ t("div", {
|
|
558
|
+
className: K,
|
|
559
|
+
css: G(a),
|
|
556
560
|
children: e.map((e, a) => {
|
|
557
|
-
let o = e === n ? `${
|
|
561
|
+
let o = e === n ? `${K}-selected` : "", s = i === a;
|
|
558
562
|
return /* @__PURE__ */ t("button", {
|
|
559
563
|
className: [
|
|
560
|
-
`${
|
|
564
|
+
`${K}-option`,
|
|
561
565
|
o,
|
|
562
|
-
s ? `${
|
|
566
|
+
s ? `${K}-active` : ""
|
|
563
567
|
].filter(Boolean).join(" "),
|
|
564
568
|
onClick: () => r(e),
|
|
565
569
|
children: e
|
|
566
570
|
}, e);
|
|
567
571
|
})
|
|
568
|
-
}),
|
|
572
|
+
}), J = ({ theme: n, variant: r = "default", ...i }) => {
|
|
569
573
|
let { componentStyles: a } = e([c.PAGINATIONMENU], n, r.toUpperCase());
|
|
570
|
-
return /* @__PURE__ */ t(
|
|
574
|
+
return /* @__PURE__ */ t(q, {
|
|
571
575
|
...i,
|
|
572
576
|
style: a
|
|
573
577
|
});
|
|
574
|
-
},
|
|
575
|
-
let [
|
|
576
|
-
|
|
578
|
+
}, Y = "--PAGINATION", X = ({ page: e, total: r, pageSize: i, onPageChange: a, pageSizeOptions: s, onPageSizeChange: c, loading: l, className: d, style: f }) => {
|
|
579
|
+
let [p, m] = E(!1), [h, g] = E(-1), _ = Math.max(1, Math.ceil(r / i)), v = e * i + 1, y = Math.min((e + 1) * i, r), b = e === 0, x = e >= _ - 1, S = () => {
|
|
580
|
+
m(!1), g(-1);
|
|
577
581
|
};
|
|
578
|
-
return
|
|
579
|
-
if (!
|
|
582
|
+
return C(() => {
|
|
583
|
+
if (!p) return;
|
|
580
584
|
let e = (e) => {
|
|
581
|
-
e.target.closest(`.${
|
|
585
|
+
e.target.closest(`.${Y}-rowsControl`) || (m(!1), g(-1));
|
|
582
586
|
};
|
|
583
587
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
584
|
-
}, [
|
|
585
|
-
className: [
|
|
586
|
-
css:
|
|
588
|
+
}, [p]), /* @__PURE__ */ n("div", {
|
|
589
|
+
className: [Y, d || ""].filter(Boolean).join(" "),
|
|
590
|
+
css: V(f ?? {}),
|
|
587
591
|
children: [s && s.length > 0 && /* @__PURE__ */ n("div", {
|
|
588
|
-
className: `${
|
|
592
|
+
className: `${Y}-rowsControl`,
|
|
589
593
|
children: [
|
|
590
|
-
|
|
594
|
+
p && /* @__PURE__ */ t(J, {
|
|
591
595
|
options: s,
|
|
592
596
|
activeOption: i,
|
|
593
597
|
onSelect: (e) => {
|
|
594
|
-
c?.(e),
|
|
598
|
+
c?.(e), S();
|
|
595
599
|
},
|
|
596
|
-
focusedElement:
|
|
600
|
+
focusedElement: h
|
|
597
601
|
}),
|
|
598
602
|
/* @__PURE__ */ t("span", {
|
|
599
|
-
className: `${
|
|
603
|
+
className: `${Y}-rowsSize`,
|
|
600
604
|
children: i
|
|
601
605
|
}),
|
|
602
|
-
/* @__PURE__ */ t(
|
|
606
|
+
/* @__PURE__ */ t(u, {
|
|
603
607
|
icon: /* @__PURE__ */ t(o, {
|
|
604
608
|
name: "arrow_drop_up",
|
|
605
609
|
size: "sm"
|
|
606
610
|
}),
|
|
607
|
-
onClick: () =>
|
|
611
|
+
onClick: () => p ? S() : m(!0),
|
|
608
612
|
onKeyDown: (e) => {
|
|
609
|
-
if (e.key === "Tab" || e.key === "Escape")
|
|
610
|
-
else if (["ArrowDown", "ArrowUp"].includes(e.key) &&
|
|
611
|
-
else if (e.key === "Enter" &&
|
|
613
|
+
if (e.key === "Tab" || e.key === "Escape") m(!1), g(-1);
|
|
614
|
+
else if (["ArrowDown", "ArrowUp"].includes(e.key) && p) e.preventDefault(), e.key === "ArrowDown" ? g((e) => e + 1 >= (s?.length ?? 0) ? 0 : e + 1) : g((e) => e - 1 < 0 ? (s?.length ?? 1) - 1 : e - 1);
|
|
615
|
+
else if (e.key === "Enter" && p && h >= 0 && s) {
|
|
612
616
|
e.preventDefault();
|
|
613
|
-
let t = s[
|
|
614
|
-
t !== void 0 && (c?.(t),
|
|
617
|
+
let t = s[h];
|
|
618
|
+
t !== void 0 && (c?.(t), m(!1), g(-1));
|
|
615
619
|
}
|
|
616
620
|
},
|
|
617
|
-
isFlipped:
|
|
621
|
+
isFlipped: p,
|
|
618
622
|
"aria-label": "Rows per page",
|
|
619
|
-
"data-testid": `${
|
|
623
|
+
"data-testid": `${Y}-rowsBtn`
|
|
620
624
|
})
|
|
621
625
|
]
|
|
622
626
|
}), /* @__PURE__ */ n("div", {
|
|
623
|
-
className: `${
|
|
627
|
+
className: `${Y}-controls`,
|
|
624
628
|
children: [
|
|
625
629
|
/* @__PURE__ */ n("span", {
|
|
626
|
-
className: `${
|
|
630
|
+
className: `${Y}-info`,
|
|
627
631
|
children: [
|
|
628
632
|
v,
|
|
629
633
|
"-",
|
|
@@ -632,7 +636,7 @@ var ee = D`
|
|
|
632
636
|
r
|
|
633
637
|
]
|
|
634
638
|
}),
|
|
635
|
-
/* @__PURE__ */ t(
|
|
639
|
+
/* @__PURE__ */ t(u, {
|
|
636
640
|
icon: /* @__PURE__ */ t(o, {
|
|
637
641
|
name: "first_page",
|
|
638
642
|
size: "sm"
|
|
@@ -640,9 +644,9 @@ var ee = D`
|
|
|
640
644
|
onClick: () => a(0),
|
|
641
645
|
disabled: l || b,
|
|
642
646
|
"aria-label": "First page",
|
|
643
|
-
"data-testid": `${
|
|
647
|
+
"data-testid": `${Y}-first`
|
|
644
648
|
}),
|
|
645
|
-
/* @__PURE__ */ t(
|
|
649
|
+
/* @__PURE__ */ t(u, {
|
|
646
650
|
icon: /* @__PURE__ */ t(o, {
|
|
647
651
|
name: "chevron_left",
|
|
648
652
|
size: "sm"
|
|
@@ -650,9 +654,9 @@ var ee = D`
|
|
|
650
654
|
onClick: () => a(e - 1),
|
|
651
655
|
disabled: l || b,
|
|
652
656
|
"aria-label": "Previous page",
|
|
653
|
-
"data-testid": `${
|
|
657
|
+
"data-testid": `${Y}-prev`
|
|
654
658
|
}),
|
|
655
|
-
/* @__PURE__ */ t(
|
|
659
|
+
/* @__PURE__ */ t(u, {
|
|
656
660
|
icon: /* @__PURE__ */ t(o, {
|
|
657
661
|
name: "chevron_right",
|
|
658
662
|
size: "sm"
|
|
@@ -660,9 +664,9 @@ var ee = D`
|
|
|
660
664
|
onClick: () => a(e + 1),
|
|
661
665
|
disabled: l || x,
|
|
662
666
|
"aria-label": "Next page",
|
|
663
|
-
"data-testid": `${
|
|
667
|
+
"data-testid": `${Y}-next`
|
|
664
668
|
}),
|
|
665
|
-
/* @__PURE__ */ t(
|
|
669
|
+
/* @__PURE__ */ t(u, {
|
|
666
670
|
icon: /* @__PURE__ */ t(o, {
|
|
667
671
|
name: "last_page",
|
|
668
672
|
size: "sm"
|
|
@@ -670,28 +674,28 @@ var ee = D`
|
|
|
670
674
|
onClick: () => a(_ - 1),
|
|
671
675
|
disabled: l || x,
|
|
672
676
|
"aria-label": "Last page",
|
|
673
|
-
"data-testid": `${
|
|
677
|
+
"data-testid": `${Y}-last`
|
|
674
678
|
})
|
|
675
679
|
]
|
|
676
680
|
})]
|
|
677
681
|
});
|
|
678
|
-
},
|
|
682
|
+
}, ie = ({ theme: n, variant: r = "default", ...i }) => {
|
|
679
683
|
let { componentStyles: a } = e([c.PAGINATION], n, r.toUpperCase());
|
|
680
|
-
return /* @__PURE__ */ t(
|
|
684
|
+
return /* @__PURE__ */ t(X, {
|
|
681
685
|
...i,
|
|
682
686
|
style: a
|
|
683
687
|
});
|
|
684
|
-
},
|
|
685
|
-
let [
|
|
686
|
-
|
|
688
|
+
}, Z = "--DATAGRID", ae = 10, Q = ({ columns: e, onFetch: i, paginationType: a = "pagination", pageSize: s = ae, pageSizeOptions: c, emptyContent: l = /* @__PURE__ */ t("span", { children: "No se han encontrado resultados" }), loadingMoreContent: d = /* @__PURE__ */ t("span", { children: "Cargando..." }), className: f, style: p }) => {
|
|
689
|
+
let [m, h] = E([]), [g, _] = E(0), [v, y] = E(0), [b, x] = E(s), [w, D] = E(!0), [O, k] = E(null), [A, j] = E({}), [M, N] = E(null), [P, F] = E(null), [I, L] = E(""), [R, z] = E([]), [B, V] = E(""), [H, U] = E([]), [W, G] = E(0), K = T({}), q = T(null), J = T(null);
|
|
690
|
+
C(() => {
|
|
687
691
|
let e = !1;
|
|
688
692
|
return i({
|
|
689
693
|
page: v,
|
|
690
694
|
pageSize: b,
|
|
691
695
|
filters: A,
|
|
692
|
-
sort:
|
|
696
|
+
sort: O ?? void 0
|
|
693
697
|
}).then((t) => {
|
|
694
|
-
e || (
|
|
698
|
+
e || (h((e) => a === "scroll" && v > 0 ? [...e, ...t.data] : t.data), _(t.total), D(!1));
|
|
695
699
|
}), () => {
|
|
696
700
|
e = !0;
|
|
697
701
|
};
|
|
@@ -699,34 +703,34 @@ var ee = D`
|
|
|
699
703
|
v,
|
|
700
704
|
b,
|
|
701
705
|
A,
|
|
702
|
-
|
|
706
|
+
O,
|
|
703
707
|
a,
|
|
704
708
|
i
|
|
705
|
-
]),
|
|
706
|
-
a !== "scroll" || !
|
|
709
|
+
]), ee(() => {
|
|
710
|
+
a !== "scroll" || !q.current || !J.current || (U(Array.from(q.current.querySelectorAll(`th:not(.${Z}-thScrollbarSpacer)`)).map((e) => e.offsetWidth)), G(J.current.offsetWidth - J.current.clientWidth));
|
|
707
711
|
}, [
|
|
708
712
|
a,
|
|
709
713
|
e.length,
|
|
710
|
-
|
|
711
|
-
]),
|
|
714
|
+
w
|
|
715
|
+
]), C(() => {
|
|
712
716
|
if (!M) return;
|
|
713
717
|
let e = (e) => {
|
|
714
718
|
e.target.closest(`[data-popover-key="${M}"]`) || N(null);
|
|
715
719
|
};
|
|
716
720
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
717
721
|
}, [M]);
|
|
718
|
-
let
|
|
722
|
+
let Y = (e) => {
|
|
719
723
|
if (!e.filter) return;
|
|
720
724
|
if (M === e.key) {
|
|
721
725
|
N(null), F(null);
|
|
722
726
|
return;
|
|
723
727
|
}
|
|
724
728
|
let t = A[e.key];
|
|
725
|
-
e.filter.type === "search" ? L(typeof t == "string" ? t : "") : (z(Array.isArray(t) ? t : []), V("")), F(
|
|
726
|
-
},
|
|
729
|
+
e.filter.type === "search" ? L(typeof t == "string" ? t : "") : (z(Array.isArray(t) ? t : []), V("")), F(K.current[e.key] ?? null), N(e.key);
|
|
730
|
+
}, X = (e) => {
|
|
727
731
|
if (!e.filter) return;
|
|
728
732
|
let t = e.filter.type === "search" ? I : R;
|
|
729
|
-
|
|
733
|
+
D(!0), j((n) => ({
|
|
730
734
|
...n,
|
|
731
735
|
[e.key]: t
|
|
732
736
|
})), y(0), N(null);
|
|
@@ -734,7 +738,7 @@ var ee = D`
|
|
|
734
738
|
let t = A[e];
|
|
735
739
|
return t == null ? !1 : Array.isArray(t) ? t.length > 0 : t !== "";
|
|
736
740
|
}, oe = (e) => {
|
|
737
|
-
|
|
741
|
+
D(!0), k((t) => t?.key === e ? {
|
|
738
742
|
key: e,
|
|
739
743
|
direction: t.direction === "asc" ? "desc" : "asc"
|
|
740
744
|
} : {
|
|
@@ -742,145 +746,145 @@ var ee = D`
|
|
|
742
746
|
direction: "asc"
|
|
743
747
|
}), y(0);
|
|
744
748
|
}, se = (e) => {
|
|
745
|
-
|
|
749
|
+
D(!0), y(e);
|
|
746
750
|
}, ce = (e) => {
|
|
747
|
-
|
|
748
|
-
}, le =
|
|
749
|
-
if (a !== "scroll" ||
|
|
751
|
+
D(!0), x(e), y(0);
|
|
752
|
+
}, le = S((e) => {
|
|
753
|
+
if (a !== "scroll" || w || m.length >= g) return;
|
|
750
754
|
let { scrollTop: t, scrollHeight: n, clientHeight: r } = e.currentTarget;
|
|
751
|
-
n - t - r < 48 && (
|
|
755
|
+
n - t - r < 48 && (D(!0), y((e) => e + 1));
|
|
752
756
|
}, [
|
|
753
757
|
a,
|
|
754
|
-
|
|
755
|
-
|
|
758
|
+
w,
|
|
759
|
+
m.length,
|
|
756
760
|
g
|
|
757
|
-
]), ue = e.length, $ = M ? e.find((e) => e.key === M) : void 0, de = b * 48, fe = !
|
|
758
|
-
className: [`${
|
|
761
|
+
]), ue = e.length, $ = M ? e.find((e) => e.key === M) : void 0, de = b * 48, fe = !w && m.length === 0, pe = e.map((e) => /* @__PURE__ */ t("th", {
|
|
762
|
+
className: [`${Z}-th`, e.type === "options" ? `${Z}-thOptions` : ""].join(" "),
|
|
759
763
|
style: e.width ? { width: e.width } : void 0,
|
|
760
764
|
children: /* @__PURE__ */ n("div", {
|
|
761
|
-
className: `${
|
|
762
|
-
"data-testid": `${
|
|
765
|
+
className: `${Z}-thInner`,
|
|
766
|
+
"data-testid": `${Z}-th-${e.key}`,
|
|
763
767
|
children: [/* @__PURE__ */ t("span", {
|
|
764
|
-
className: `${
|
|
768
|
+
className: `${Z}-thLabel`,
|
|
765
769
|
children: e.label
|
|
766
770
|
}), e.type !== "options" && /* @__PURE__ */ n("div", {
|
|
767
|
-
className: `${
|
|
771
|
+
className: `${Z}-thActions`,
|
|
768
772
|
children: [e.filter && /* @__PURE__ */ t("div", {
|
|
769
|
-
className: `${
|
|
773
|
+
className: `${Z}-filterContainer`,
|
|
770
774
|
"data-popover-key": e.key,
|
|
771
775
|
children: /* @__PURE__ */ t("span", {
|
|
772
776
|
ref: (t) => {
|
|
773
|
-
|
|
777
|
+
K.current[e.key] = t;
|
|
774
778
|
},
|
|
775
|
-
children: /* @__PURE__ */ t(
|
|
779
|
+
children: /* @__PURE__ */ t(u, {
|
|
776
780
|
icon: /* @__PURE__ */ t(o, {
|
|
777
781
|
name: Q(e.key) ? "filter_alt" : "filter_list",
|
|
778
782
|
size: "sm",
|
|
779
783
|
style: { color: Q(e.key) ? "white" : "" }
|
|
780
784
|
}),
|
|
781
|
-
onClick: () =>
|
|
782
|
-
"data-testid": `${
|
|
785
|
+
onClick: () => Y(e),
|
|
786
|
+
"data-testid": `${Z}-filterBtn-${e.key}`,
|
|
783
787
|
"aria-label": `Filter ${e.label}`
|
|
784
788
|
})
|
|
785
789
|
})
|
|
786
|
-
}), e.sortable !== !1 && /* @__PURE__ */ t(
|
|
790
|
+
}), e.sortable !== !1 && /* @__PURE__ */ t(u, {
|
|
787
791
|
icon: /* @__PURE__ */ t(o, {
|
|
788
|
-
name:
|
|
792
|
+
name: O?.key === e.key ? O.direction === "asc" ? "arrow_upward" : "arrow_downward" : "unfold_more",
|
|
789
793
|
size: "sm",
|
|
790
|
-
style: { color:
|
|
794
|
+
style: { color: O?.key === e.key ? "white" : "" }
|
|
791
795
|
}),
|
|
792
796
|
onClick: () => oe(e.key),
|
|
793
|
-
"data-testid": `${
|
|
797
|
+
"data-testid": `${Z}-sortBtn-${e.key}`,
|
|
794
798
|
"aria-label": `Sort ${e.label}`
|
|
795
799
|
})]
|
|
796
800
|
})]
|
|
797
801
|
})
|
|
798
|
-
}, e.key)), me =
|
|
802
|
+
}, e.key)), me = w && (a !== "scroll" || m.length === 0) ? /* @__PURE__ */ t(re, {
|
|
799
803
|
columns: e,
|
|
800
804
|
pageSize: b
|
|
801
805
|
}) : fe ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
802
806
|
colSpan: ue,
|
|
803
|
-
className: `${
|
|
807
|
+
className: `${Z}-emptyCell`,
|
|
804
808
|
style: { height: `${de}px` },
|
|
805
809
|
children: l
|
|
806
|
-
}) }) : /* @__PURE__ */ n(r, { children: [
|
|
807
|
-
className: `${
|
|
808
|
-
"data-testid": `${
|
|
810
|
+
}) }) : /* @__PURE__ */ n(r, { children: [m.map((n, r) => /* @__PURE__ */ t("tr", {
|
|
811
|
+
className: `${Z}-row`,
|
|
812
|
+
"data-testid": `${Z}-row-${r}`,
|
|
809
813
|
children: e.map((e) => {
|
|
810
814
|
let i = n[e.key];
|
|
811
815
|
return /* @__PURE__ */ t("td", {
|
|
812
|
-
className: [`${
|
|
813
|
-
"data-testid": `${
|
|
816
|
+
className: [`${Z}-td`, e.type === "options" ? `${Z}-tdOptions` : ""].filter(Boolean).join(" "),
|
|
817
|
+
"data-testid": `${Z}-cell-${e.key}-${r}`,
|
|
814
818
|
children: e.render ? e.render(i, n) : String(i ?? "")
|
|
815
819
|
}, e.key);
|
|
816
820
|
})
|
|
817
|
-
}, r)), a === "scroll" &&
|
|
821
|
+
}, r)), a === "scroll" && w && /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
818
822
|
colSpan: ue,
|
|
819
|
-
className: `${
|
|
820
|
-
children:
|
|
823
|
+
className: `${Z}-loadingMore`,
|
|
824
|
+
children: d
|
|
821
825
|
}) })] });
|
|
822
826
|
return /* @__PURE__ */ n("div", {
|
|
823
|
-
className: [
|
|
824
|
-
css: te(
|
|
825
|
-
"data-testid":
|
|
827
|
+
className: [Z, f || ""].join(" "),
|
|
828
|
+
css: te(p),
|
|
829
|
+
"data-testid": Z,
|
|
826
830
|
children: [
|
|
827
831
|
/* @__PURE__ */ t("div", {
|
|
828
|
-
className: `${
|
|
832
|
+
className: `${Z}-tableContainer`,
|
|
829
833
|
children: a === "scroll" ? /* @__PURE__ */ n(r, { children: [/* @__PURE__ */ n("table", {
|
|
830
|
-
className: `${
|
|
831
|
-
children: [/* @__PURE__ */ n("colgroup", { children: [e.map((e) => /* @__PURE__ */ t("col", { style: e.width ? { width: e.width } : void 0 }, e.key)), /* @__PURE__ */ t("col", { style: { width:
|
|
832
|
-
ref:
|
|
833
|
-
className: `${
|
|
834
|
+
className: `${Z}-table`,
|
|
835
|
+
children: [/* @__PURE__ */ n("colgroup", { children: [e.map((e) => /* @__PURE__ */ t("col", { style: e.width ? { width: e.width } : void 0 }, e.key)), /* @__PURE__ */ t("col", { style: { width: W || 0 } })] }), /* @__PURE__ */ t("thead", {
|
|
836
|
+
ref: q,
|
|
837
|
+
className: `${Z}-thead`,
|
|
834
838
|
children: /* @__PURE__ */ n("tr", {
|
|
835
|
-
className: `${
|
|
839
|
+
className: `${Z}-headerRow`,
|
|
836
840
|
children: [pe, /* @__PURE__ */ t("th", {
|
|
837
841
|
"aria-hidden": "true",
|
|
838
|
-
className: `${
|
|
842
|
+
className: `${Z}-thScrollbarSpacer`,
|
|
839
843
|
style: { padding: 0 }
|
|
840
844
|
})]
|
|
841
845
|
})
|
|
842
846
|
})]
|
|
843
847
|
}), /* @__PURE__ */ t("div", {
|
|
844
|
-
ref:
|
|
845
|
-
className: `${
|
|
848
|
+
ref: J,
|
|
849
|
+
className: `${Z}-bodyContainer`,
|
|
846
850
|
style: {
|
|
847
851
|
overflowY: "auto",
|
|
848
852
|
maxHeight: `${de}px`
|
|
849
853
|
},
|
|
850
854
|
onScroll: le,
|
|
851
855
|
children: /* @__PURE__ */ n("table", {
|
|
852
|
-
className: `${
|
|
856
|
+
className: `${Z}-table`,
|
|
853
857
|
style: {
|
|
854
858
|
tableLayout: "fixed",
|
|
855
859
|
width: "100%"
|
|
856
860
|
},
|
|
857
861
|
children: [/* @__PURE__ */ t("colgroup", { children: e.map((e, n) => /* @__PURE__ */ t("col", { style: { width: H[n] === void 0 ? e.width ?? "auto" : H[n] } }, e.key)) }), /* @__PURE__ */ t("tbody", {
|
|
858
|
-
className: `${
|
|
862
|
+
className: `${Z}-tbody`,
|
|
859
863
|
children: me
|
|
860
864
|
})]
|
|
861
865
|
})
|
|
862
866
|
})] }) : /* @__PURE__ */ n("table", {
|
|
863
|
-
className: `${
|
|
867
|
+
className: `${Z}-table`,
|
|
864
868
|
children: [/* @__PURE__ */ t("thead", {
|
|
865
|
-
className: `${
|
|
869
|
+
className: `${Z}-thead`,
|
|
866
870
|
children: /* @__PURE__ */ t("tr", {
|
|
867
|
-
className: `${
|
|
871
|
+
className: `${Z}-headerRow`,
|
|
868
872
|
children: pe
|
|
869
873
|
})
|
|
870
874
|
}), /* @__PURE__ */ t("tbody", {
|
|
871
|
-
className: `${
|
|
875
|
+
className: `${Z}-tbody`,
|
|
872
876
|
children: me
|
|
873
877
|
})]
|
|
874
878
|
})
|
|
875
879
|
}),
|
|
876
|
-
a === "pagination" && /* @__PURE__ */ t(
|
|
880
|
+
a === "pagination" && /* @__PURE__ */ t(ie, {
|
|
877
881
|
page: v,
|
|
878
882
|
total: g,
|
|
879
883
|
pageSize: b,
|
|
880
884
|
onPageChange: se,
|
|
881
885
|
pageSizeOptions: c,
|
|
882
886
|
onPageSizeChange: ce,
|
|
883
|
-
loading:
|
|
887
|
+
loading: w
|
|
884
888
|
}),
|
|
885
889
|
$?.filter && /* @__PURE__ */ t(ne, {
|
|
886
890
|
filterType: $.filter.type,
|
|
@@ -897,7 +901,7 @@ var ee = D`
|
|
|
897
901
|
multiSearch: B,
|
|
898
902
|
onMultiSearchChange: V,
|
|
899
903
|
onCancel: () => N(null),
|
|
900
|
-
onApply: () =>
|
|
904
|
+
onApply: () => X($),
|
|
901
905
|
onClear: () => {
|
|
902
906
|
$.filter?.type === "search" ? L("") : (z([]), V(""));
|
|
903
907
|
},
|
|
@@ -905,14 +909,14 @@ var ee = D`
|
|
|
905
909
|
})
|
|
906
910
|
]
|
|
907
911
|
});
|
|
908
|
-
},
|
|
912
|
+
}, oe = ({ theme: n, variant: r = "default", ...i }) => {
|
|
909
913
|
let { componentStyles: a } = e([c.DATAGRID], n, r.toUpperCase());
|
|
910
|
-
return /* @__PURE__ */ t(
|
|
914
|
+
return /* @__PURE__ */ t(Q, {
|
|
911
915
|
...i,
|
|
912
916
|
style: a
|
|
913
917
|
});
|
|
914
918
|
};
|
|
915
919
|
//#endregion
|
|
916
|
-
export {
|
|
920
|
+
export { f as Button, s as Checkbox, y as CheckboxGroup, v as CheckboxTree, oe as DataGrid, g as DatePicker, o as Icon, u as IconButton, l as NumberField, ie as Pagination, d as Radio, b as RadioGroup, h as Select, j as Skeleton, p as Slider, _ as Switch, m as TextField, x as ThemeProvider, i as darkTheme };
|
|
917
921
|
|
|
918
922
|
//# sourceMappingURL=index.mjs.map
|