@vincisys/eyeson 0.10.0 → 0.11.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/ComboBox/Combobox.d.ts.map +1 -1
- package/dist/components/DateTimePicker/AnalogClock.d.ts +20 -0
- package/dist/components/DateTimePicker/AnalogClock.d.ts.map +1 -0
- package/dist/components/DateTimePicker/DateTimePicker.d.ts +9 -1
- package/dist/components/DateTimePicker/DateTimePicker.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +627 -457
- package/dist/styles/eyes-standalone.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ function L(e, t, n) {
|
|
|
28
28
|
}
|
|
29
29
|
//#endregion
|
|
30
30
|
//#region src/components/Button/Button.tsx
|
|
31
|
-
var
|
|
31
|
+
var ie = /* @__PURE__ */ new Set([
|
|
32
32
|
"blue-background",
|
|
33
33
|
"green-background",
|
|
34
34
|
"green-main",
|
|
@@ -40,7 +40,7 @@ var R = /* @__PURE__ */ new Set([
|
|
|
40
40
|
"red-background",
|
|
41
41
|
"red-dark",
|
|
42
42
|
"red-middle"
|
|
43
|
-
]),
|
|
43
|
+
]), R = {
|
|
44
44
|
size: {
|
|
45
45
|
sm: { classes: "h-[calc(1.75rem*1.188*1.1)] gap-1 rounded-[min(var(--radius-eds-xs),12px)] px-[calc(0.625rem*1.188*1.15)] text-[0.8rem] has-data-[icon=inline-end]:pr-[calc(0.375rem*1.188*1.15)] has-data-[icon=inline-start]:pl-[calc(0.375rem*1.188*1.15)] [&_svg:not([class*='size-'])]:size-3.5 [&_.eds-btn-icon-wrap]:size-3.5" },
|
|
46
46
|
md: { classes: "h-[calc(2rem*1.188*1.1)] gap-1.5 px-[calc(0.625rem*1.188*1.15)] has-data-[icon=inline-end]:pr-[calc(0.5rem*1.188*1.15)] has-data-[icon=inline-start]:pl-[calc(0.5rem*1.188*1.15)] [&_.eds-btn-icon-wrap]:size-4" },
|
|
@@ -52,22 +52,22 @@ var R = /* @__PURE__ */ new Set([
|
|
|
52
52
|
ghost: { classes: "border-transparent bg-transparent text-[var(--eds-btn-accent)] hover:bg-[color-mix(in_srgb,var(--eds-btn-accent)_10%,transparent)] hover:text-[color-mix(in_srgb,var(--eds-btn-accent)_88%,black)] data-disabled:not-data-loading:text-eds-neutral-disabled data-loading:data-disabled:text-[var(--eds-btn-accent)]" },
|
|
53
53
|
link: { classes: "h-auto border-transparent bg-transparent px-0 text-[var(--eds-btn-accent)] underline-offset-4 hover:underline data-disabled:not-data-loading:text-eds-neutral-disabled data-loading:data-disabled:text-[var(--eds-btn-accent)]" }
|
|
54
54
|
}
|
|
55
|
-
},
|
|
55
|
+
}, z = {
|
|
56
56
|
size: "md",
|
|
57
57
|
variant: "solid"
|
|
58
|
-
},
|
|
58
|
+
}, ae = {
|
|
59
59
|
sm: 14,
|
|
60
60
|
md: 16,
|
|
61
61
|
lg: 16
|
|
62
62
|
};
|
|
63
|
-
function
|
|
64
|
-
let r = L(
|
|
63
|
+
function B({ variant: e = z.variant, size: t = z.size, fluid: n = !1 }) {
|
|
64
|
+
let r = L(R.size, t, z.size), i = L(R.variant, e, z.variant);
|
|
65
65
|
return I("eds-btn group/button inline-flex shrink-0 items-center justify-center rounded-lg border bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none cursor-pointer box-border m-0", "focus-visible:border-[var(--eds-btn-accent)] focus-visible:ring-3 focus-visible:ring-[color-mix(in_srgb,var(--eds-btn-accent)_50%,transparent)]", "active:not-aria-[haspopup]:translate-y-px", "data-disabled:pointer-events-none data-disabled:not-data-loading:opacity-50 data-loading:data-disabled:cursor-wait data-loading:data-disabled:opacity-100", "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", r.classes, i.classes, n && "w-full");
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
let m =
|
|
67
|
+
function oe({ text: t = "Button", className: n, icon: r, iconPosition: i = "start", variant: a = "solid", color: o = "blue-main", size: s = "md", fluid: c = !1, isLoading: l = !1, disabled: u, style: f, ...p }) {
|
|
68
|
+
let m = ae[s], h = !!(u || l), y = !!(l || r), b = i === "end" ? "inline-end" : "inline-start", x = {
|
|
69
69
|
"--eds-btn-accent": `var(--color-eds-${o})`,
|
|
70
|
-
...
|
|
70
|
+
...ie.has(o) ? { "--eds-btn-solid-fg": "#fff" } : {},
|
|
71
71
|
...f
|
|
72
72
|
}, S = y ? /* @__PURE__ */ _("span", {
|
|
73
73
|
className: "eds-btn-icon-wrap flex shrink-0 items-center justify-center",
|
|
@@ -82,7 +82,7 @@ function ae({ text: t = "Button", className: n, icon: r, iconPosition: i = "star
|
|
|
82
82
|
})
|
|
83
83
|
}) : null;
|
|
84
84
|
return /* @__PURE__ */ _(e, {
|
|
85
|
-
className: I(
|
|
85
|
+
className: I(B({
|
|
86
86
|
variant: a,
|
|
87
87
|
size: s,
|
|
88
88
|
fluid: c
|
|
@@ -98,7 +98,7 @@ function ae({ text: t = "Button", className: n, icon: r, iconPosition: i = "star
|
|
|
98
98
|
}
|
|
99
99
|
//#endregion
|
|
100
100
|
//#region src/constants/colors.ts
|
|
101
|
-
var
|
|
101
|
+
var se = [
|
|
102
102
|
"blue-background",
|
|
103
103
|
"blue-dark",
|
|
104
104
|
"blue-main",
|
|
@@ -119,8 +119,8 @@ var H = [
|
|
|
119
119
|
"red-dark",
|
|
120
120
|
"red-main",
|
|
121
121
|
"red-middle"
|
|
122
|
-
],
|
|
123
|
-
le * 7, le *
|
|
122
|
+
], V = 365.2425, ce = 6048e5, H = 864e5, le = 3600 * 24;
|
|
123
|
+
le * 7, le * V / 12 * 3;
|
|
124
124
|
var ue = Symbol.for("constructDateFrom");
|
|
125
125
|
//#endregion
|
|
126
126
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.js
|
|
@@ -199,7 +199,7 @@ function ve(e, t) {
|
|
|
199
199
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.js
|
|
200
200
|
function ye(e, t, n) {
|
|
201
201
|
let [r, i] = _e(n?.in, e, t), a = ve(r), o = ve(i), s = +a - ge(a), c = +o - ge(o);
|
|
202
|
-
return Math.round((s - c) /
|
|
202
|
+
return Math.round((s - c) / H);
|
|
203
203
|
}
|
|
204
204
|
//#endregion
|
|
205
205
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.js
|
|
@@ -760,7 +760,7 @@ function He(e, t) {
|
|
|
760
760
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.js
|
|
761
761
|
function Ue(e, t) {
|
|
762
762
|
let n = W(e, t?.in), r = K(n) - +be(n);
|
|
763
|
-
return Math.round(r /
|
|
763
|
+
return Math.round(r / ce) + 1;
|
|
764
764
|
}
|
|
765
765
|
//#endregion
|
|
766
766
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.js
|
|
@@ -782,7 +782,7 @@ function Ge(e, t) {
|
|
|
782
782
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.js
|
|
783
783
|
function Ke(e, t) {
|
|
784
784
|
let n = W(e, t?.in), r = G(n, t) - +Ge(n, t);
|
|
785
|
-
return Math.round(r /
|
|
785
|
+
return Math.round(r / ce) + 1;
|
|
786
786
|
}
|
|
787
787
|
//#endregion
|
|
788
788
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.js
|
|
@@ -1822,10 +1822,10 @@ var Tt = {
|
|
|
1822
1822
|
}
|
|
1823
1823
|
};
|
|
1824
1824
|
function jt({ icon: t, label: n, className: r, variant: i = "ghost", color: a = "neutral-main", hoverColor: o, size: s = "md", disabled: c, style: l, tooltip: u, ...d }) {
|
|
1825
|
-
let f = ee(), p = L(At, s,
|
|
1825
|
+
let f = ee(), p = L(At, s, z.size), m = L(R.variant, i, z.variant), h = /* @__PURE__ */ _(e, {
|
|
1826
1826
|
style: {
|
|
1827
1827
|
"--eds-btn-base-accent": `var(--color-eds-${a})`,
|
|
1828
|
-
...
|
|
1828
|
+
...ie.has(a) ? { "--eds-btn-solid-fg": "#fff" } : {},
|
|
1829
1829
|
...o ? { "--eds-btn-hover-accent": `var(--color-eds-${o})` } : {},
|
|
1830
1830
|
...l
|
|
1831
1831
|
},
|
|
@@ -2214,9 +2214,9 @@ var Sn = {
|
|
|
2214
2214
|
invalid: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-red-main)_55%,var(--color-eds-outline-border))]"
|
|
2215
2215
|
}, Cn = "inline-flex shrink-0 cursor-pointer items-center justify-center rounded-md text-eds-neutral-elements hover:not-data-disabled:bg-eds-neutral-elements/8 hover:not-data-disabled:text-eds-neutral-main focus-visible:outline-2 focus-visible:outline-eds-blue-main focus-visible:outline-offset-2 data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50", wn = "inline-flex h-6 max-w-full items-center gap-1 rounded-eds-lil bg-eds-blue-background/45 py-0 pr-1 pl-2 text-xs text-eds-blue-main", Tn = "inline-flex shrink-0 cursor-pointer items-center justify-center rounded p-1 text-eds-blue-main hover:not-data-disabled:bg-eds-blue-main/15 data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50", En = k.Root;
|
|
2216
2216
|
function Dn({ label: e = "Label", labelVariant: t, items: n, placeholder: r = "Selecione uma opção", disabled: i = !1, required: s = !1, fluid: c = !1, state: l = "default", size: u = "md", supportingText: d = "", errorMessage: f = "Selecione uma opção válida", emptyMessage: p = "Nenhum resultado.", readOnly: h = !1, id: g, name: y, multiple: b, value: x, defaultValue: S, onValueChange: C, getItemLabel: w, getItemValue: T, getRemoveItemLabel: E, renderItem: D, renderChip: te, className: ne, inputProps: O }) {
|
|
2217
|
-
let re = ee(), A = g ?? re, j = l === "invalid", M = j || !!d, N = on[u], P = an(t), F = P === "floating", L = (e) => w ? w(e) : e.label ?? "",
|
|
2217
|
+
let re = ee(), A = g ?? re, j = l === "invalid", M = j || !!d, N = on[u], P = an(t), F = P === "floating", L = (e) => w ? w(e) : e.label ?? "", ie = (e) => T ? T(e) : e.value ?? L(e), R = (e) => {
|
|
2218
2218
|
C?.(e);
|
|
2219
|
-
},
|
|
2219
|
+
}, z = w ? (e) => w(e) : void 0, ae = T ? (e) => T(e) : void 0, B = /* @__PURE__ */ v("div", {
|
|
2220
2220
|
className: "inline-flex shrink-0 items-center",
|
|
2221
2221
|
children: [/* @__PURE__ */ _(k.Clear, {
|
|
2222
2222
|
className: I(Cn, N.icon),
|
|
@@ -2237,7 +2237,7 @@ function Dn({ label: e = "Label", labelVariant: t, items: n, placeholder: r = "S
|
|
|
2237
2237
|
"aria-hidden": !0
|
|
2238
2238
|
})
|
|
2239
2239
|
})]
|
|
2240
|
-
}),
|
|
2240
|
+
}), oe = F ? /* @__PURE__ */ v("span", {
|
|
2241
2241
|
className: xn(N.left),
|
|
2242
2242
|
children: [/* @__PURE__ */ _("span", { children: e }), s && /* @__PURE__ */ _("span", {
|
|
2243
2243
|
className: "text-eds-red-main",
|
|
@@ -2268,10 +2268,10 @@ function Dn({ label: e = "Label", labelVariant: t, items: n, placeholder: r = "S
|
|
|
2268
2268
|
multiple: b,
|
|
2269
2269
|
disabled: i,
|
|
2270
2270
|
required: s,
|
|
2271
|
-
onValueChange: C ?
|
|
2271
|
+
onValueChange: C ? R : void 0,
|
|
2272
2272
|
...x === void 0 ? S === void 0 ? {} : { defaultValue: S } : { value: x },
|
|
2273
|
-
itemToStringLabel:
|
|
2274
|
-
itemToStringValue:
|
|
2273
|
+
itemToStringLabel: z,
|
|
2274
|
+
itemToStringValue: ae,
|
|
2275
2275
|
children: [b ? /* @__PURE__ */ v(k.Chips, {
|
|
2276
2276
|
className: I(mn, "h-auto flex-wrap content-start gap-1.5", N.triggerMultiple, Sn[l]),
|
|
2277
2277
|
"data-state": l,
|
|
@@ -2279,7 +2279,7 @@ function Dn({ label: e = "Label", labelVariant: t, items: n, placeholder: r = "S
|
|
|
2279
2279
|
"data-disabled": i || void 0,
|
|
2280
2280
|
"data-floating": F || void 0,
|
|
2281
2281
|
children: [
|
|
2282
|
-
|
|
2282
|
+
oe,
|
|
2283
2283
|
/* @__PURE__ */ _(k.Value, { children: (e) => e.map((e) => /* @__PURE__ */ v(k.Chip, {
|
|
2284
2284
|
className: wn,
|
|
2285
2285
|
children: [/* @__PURE__ */ _("span", {
|
|
@@ -2294,7 +2294,7 @@ function Dn({ label: e = "Label", labelVariant: t, items: n, placeholder: r = "S
|
|
|
2294
2294
|
"aria-hidden": !0
|
|
2295
2295
|
})
|
|
2296
2296
|
})]
|
|
2297
|
-
},
|
|
2297
|
+
}, ie(e))) }),
|
|
2298
2298
|
/* @__PURE__ */ v("div", {
|
|
2299
2299
|
className: "flex min-w-[120px] flex-1 items-center gap-1",
|
|
2300
2300
|
children: [/* @__PURE__ */ _(k.Input, {
|
|
@@ -2307,7 +2307,7 @@ function Dn({ label: e = "Label", labelVariant: t, items: n, placeholder: r = "S
|
|
|
2307
2307
|
required: s,
|
|
2308
2308
|
"aria-invalid": j || void 0,
|
|
2309
2309
|
"aria-describedby": M ? `${A}-desc` : void 0
|
|
2310
|
-
}),
|
|
2310
|
+
}), B]
|
|
2311
2311
|
})
|
|
2312
2312
|
]
|
|
2313
2313
|
}) : /* @__PURE__ */ v(k.InputGroup, {
|
|
@@ -2317,7 +2317,7 @@ function Dn({ label: e = "Label", labelVariant: t, items: n, placeholder: r = "S
|
|
|
2317
2317
|
"data-disabled": i || void 0,
|
|
2318
2318
|
"data-floating": F || void 0,
|
|
2319
2319
|
children: [
|
|
2320
|
-
|
|
2320
|
+
oe,
|
|
2321
2321
|
/* @__PURE__ */ _(k.Input, {
|
|
2322
2322
|
...O,
|
|
2323
2323
|
id: A,
|
|
@@ -2329,7 +2329,7 @@ function Dn({ label: e = "Label", labelVariant: t, items: n, placeholder: r = "S
|
|
|
2329
2329
|
"aria-invalid": j || void 0,
|
|
2330
2330
|
"aria-describedby": M ? `${A}-desc` : void 0
|
|
2331
2331
|
}),
|
|
2332
|
-
|
|
2332
|
+
B
|
|
2333
2333
|
]
|
|
2334
2334
|
}), /* @__PURE__ */ _(k.Portal, { children: /* @__PURE__ */ _(k.Positioner, {
|
|
2335
2335
|
className: yn,
|
|
@@ -2357,7 +2357,7 @@ function Dn({ label: e = "Label", labelVariant: t, items: n, placeholder: r = "S
|
|
|
2357
2357
|
className: "block min-w-0 flex-1 text-left",
|
|
2358
2358
|
children: L(e)
|
|
2359
2359
|
})]
|
|
2360
|
-
},
|
|
2360
|
+
}, ie(e))
|
|
2361
2361
|
})]
|
|
2362
2362
|
})
|
|
2363
2363
|
}) })]
|
|
@@ -2407,11 +2407,11 @@ function Mn(e) {
|
|
|
2407
2407
|
} : e.value === void 0 ? void 0 : {
|
|
2408
2408
|
from: e.value ?? null,
|
|
2409
2409
|
to: null
|
|
2410
|
-
}, j = k !== void 0, [M, N] = E(re), P = j ? k : M, F = jn(e) ? Math.max(1, e.numberOfMonths ?? 1) : 1, L = jn(e) ? e.presets : void 0, [
|
|
2411
|
-
function
|
|
2412
|
-
r || (t &&
|
|
2410
|
+
}, j = k !== void 0, [M, N] = E(re), P = j ? k : M, F = jn(e) ? Math.max(1, e.numberOfMonths ?? 1) : 1, L = jn(e) ? e.presets : void 0, [ie, R] = E(!1), [z, ae] = E(() => P.from ?? e.defaultMonth ?? /* @__PURE__ */ new Date()), B = w(() => [...kn.slice(m), ...kn.slice(0, m)], [m]), oe = w(() => Array.from({ length: F }, (e, t) => fe(z, t)), [z, F]);
|
|
2411
|
+
function se(t) {
|
|
2412
|
+
r || (t && ae(P.from ?? e.defaultMonth ?? /* @__PURE__ */ new Date()), R(t));
|
|
2413
2413
|
}
|
|
2414
|
-
function
|
|
2414
|
+
function V(t) {
|
|
2415
2415
|
if (jn(e)) {
|
|
2416
2416
|
let n = P, r;
|
|
2417
2417
|
r = !n.from || n.to ? {
|
|
@@ -2426,15 +2426,15 @@ function Mn(e) {
|
|
|
2426
2426
|
}, j || N(r), r.from && e.onValueChange?.({
|
|
2427
2427
|
from: r.from,
|
|
2428
2428
|
to: r.to ?? void 0
|
|
2429
|
-
}), r.from && r.to &&
|
|
2429
|
+
}), r.from && r.to && R(!1);
|
|
2430
2430
|
return;
|
|
2431
2431
|
}
|
|
2432
2432
|
j || N({
|
|
2433
2433
|
from: t,
|
|
2434
2434
|
to: null
|
|
2435
|
-
}), e.onValueChange?.(t),
|
|
2435
|
+
}), e.onValueChange?.(t), R(!1);
|
|
2436
2436
|
}
|
|
2437
|
-
function
|
|
2437
|
+
function ce(t) {
|
|
2438
2438
|
let n = {
|
|
2439
2439
|
from: t.from,
|
|
2440
2440
|
to: t.to ?? null
|
|
@@ -2442,9 +2442,9 @@ function Mn(e) {
|
|
|
2442
2442
|
j || N(n), jn(e) && e.onValueChange?.({
|
|
2443
2443
|
from: t.from,
|
|
2444
2444
|
to: t.to ?? void 0
|
|
2445
|
-
}),
|
|
2445
|
+
}), ae(t.from);
|
|
2446
2446
|
}
|
|
2447
|
-
function
|
|
2447
|
+
function H(e) {
|
|
2448
2448
|
return !P.from || !P.to || !e.range.to ? !1 : Se(P.from, e.range.from) && Se(P.to, e.range.to);
|
|
2449
2449
|
}
|
|
2450
2450
|
let le = P.from ? !y || !P.to ? J(P.from, h) : `${J(P.from, h)} - ${J(P.to, h)}` : b;
|
|
@@ -2466,8 +2466,8 @@ function Mn(e) {
|
|
|
2466
2466
|
})
|
|
2467
2467
|
}),
|
|
2468
2468
|
/* @__PURE__ */ v(A.Root, {
|
|
2469
|
-
open:
|
|
2470
|
-
onOpenChange:
|
|
2469
|
+
open: ie,
|
|
2470
|
+
onOpenChange: se,
|
|
2471
2471
|
children: [/* @__PURE__ */ v(A.Trigger, {
|
|
2472
2472
|
id: S,
|
|
2473
2473
|
disabled: r,
|
|
@@ -2507,14 +2507,14 @@ function Mn(e) {
|
|
|
2507
2507
|
className: "flex w-40 shrink-0 flex-col gap-0.5 border-r border-eds-outline-border p-2 text-sm",
|
|
2508
2508
|
children: L.map((e) => /* @__PURE__ */ _("button", {
|
|
2509
2509
|
type: "button",
|
|
2510
|
-
onClick: () =>
|
|
2511
|
-
className: I("rounded-md px-3 py-1.5 text-left whitespace-nowrap",
|
|
2510
|
+
onClick: () => ce(e.range),
|
|
2511
|
+
className: I("rounded-md px-3 py-1.5 text-left whitespace-nowrap", H(e) ? "bg-eds-blue-main text-white" : "text-eds-neutral-main hover:bg-eds-neutral-background"),
|
|
2512
2512
|
children: e.label
|
|
2513
2513
|
}, e.label))
|
|
2514
2514
|
}), /* @__PURE__ */ _("div", {
|
|
2515
2515
|
className: "flex",
|
|
2516
|
-
children:
|
|
2517
|
-
let n = t === 0, r = t ===
|
|
2516
|
+
children: oe.map((e, t) => {
|
|
2517
|
+
let n = t === 0, r = t === oe.length - 1, i = An(e, m);
|
|
2518
2518
|
return /* @__PURE__ */ v("div", {
|
|
2519
2519
|
className: I("w-[284px] shrink-0", !n && "border-l border-eds-outline-border"),
|
|
2520
2520
|
children: [/* @__PURE__ */ v("div", {
|
|
@@ -2524,7 +2524,7 @@ function Mn(e) {
|
|
|
2524
2524
|
icon: s,
|
|
2525
2525
|
label: "Mês anterior",
|
|
2526
2526
|
size: "sm",
|
|
2527
|
-
onClick: () =>
|
|
2527
|
+
onClick: () => ae((e) => wt(e, 1))
|
|
2528
2528
|
}) : /* @__PURE__ */ _("span", {
|
|
2529
2529
|
className: "size-8 shrink-0",
|
|
2530
2530
|
"aria-hidden": !0
|
|
@@ -2537,7 +2537,7 @@ function Mn(e) {
|
|
|
2537
2537
|
icon: c,
|
|
2538
2538
|
label: "Próximo mês",
|
|
2539
2539
|
size: "sm",
|
|
2540
|
-
onClick: () =>
|
|
2540
|
+
onClick: () => ae((e) => fe(e, 1))
|
|
2541
2541
|
}) : /* @__PURE__ */ _("span", {
|
|
2542
2542
|
className: "size-8 shrink-0",
|
|
2543
2543
|
"aria-hidden": !0
|
|
@@ -2545,7 +2545,7 @@ function Mn(e) {
|
|
|
2545
2545
|
]
|
|
2546
2546
|
}), /* @__PURE__ */ v("div", {
|
|
2547
2547
|
className: "grid grid-cols-7 px-4 pb-4",
|
|
2548
|
-
children: [
|
|
2548
|
+
children: [B.map((e, t) => /* @__PURE__ */ _("span", {
|
|
2549
2549
|
className: "pb-2 text-center text-xs font-medium text-eds-neutral-main",
|
|
2550
2550
|
children: e
|
|
2551
2551
|
}, `${e}-${t}`)), i.map((t) => {
|
|
@@ -2554,7 +2554,7 @@ function Mn(e) {
|
|
|
2554
2554
|
className: I("flex items-center justify-center py-0.5", o && (s || i || a) && "bg-eds-blue-main/10", o && i && "rounded-l-full", o && a && "rounded-r-full"),
|
|
2555
2555
|
children: /* @__PURE__ */ _("button", {
|
|
2556
2556
|
type: "button",
|
|
2557
|
-
onClick: () =>
|
|
2557
|
+
onClick: () => V(t),
|
|
2558
2558
|
"data-selected": c || void 0,
|
|
2559
2559
|
"data-today": r || void 0,
|
|
2560
2560
|
className: I("flex size-9 shrink-0 items-center justify-center rounded-full text-sm font-medium", c ? "bg-eds-blue-main text-white" : n ? "text-eds-neutral-main hover:bg-eds-neutral-background" : "text-eds-neutral-elements/50 hover:bg-eds-neutral-background", !c && r && "ring-1 ring-inset ring-eds-blue-main"),
|
|
@@ -2579,12 +2579,150 @@ function Mn(e) {
|
|
|
2579
2579
|
});
|
|
2580
2580
|
}
|
|
2581
2581
|
//#endregion
|
|
2582
|
+
//#region src/components/DateTimePicker/AnalogClock.tsx
|
|
2583
|
+
var Nn = 220, Pn = Nn / 2, Fn = 92, In = 64, Ln = 30;
|
|
2584
|
+
function Rn(e, t) {
|
|
2585
|
+
let n = Math.atan2(t - Pn, e - Pn) + Math.PI / 2;
|
|
2586
|
+
return n < 0 ? n + Math.PI * 2 : n;
|
|
2587
|
+
}
|
|
2588
|
+
function zn(e, t) {
|
|
2589
|
+
let n = Rn(e, t), r = Math.round(n / (Math.PI * 2) * 12) % 12, i = r === 0 ? 12 : r;
|
|
2590
|
+
return Math.hypot(e - Pn, t - Pn) < 156 / 2 ? i === 12 ? 0 : i + 12 : i;
|
|
2591
|
+
}
|
|
2592
|
+
function Bn(e, t, n) {
|
|
2593
|
+
let r = n > 0 ? n : 1, i = Rn(e, t) / (Math.PI * 2) * 60, a = Math.round(i / r) * r;
|
|
2594
|
+
return a >= 60 ? 0 : a;
|
|
2595
|
+
}
|
|
2596
|
+
function Vn(e, t) {
|
|
2597
|
+
let n = e / 12 * Math.PI * 2 - Math.PI / 2;
|
|
2598
|
+
return {
|
|
2599
|
+
x: Math.round(Math.cos(n) * t),
|
|
2600
|
+
y: Math.round(Math.sin(n) * t)
|
|
2601
|
+
};
|
|
2602
|
+
}
|
|
2603
|
+
function Hn(e, t) {
|
|
2604
|
+
return e === "hours" ? t % 12 : t / 5;
|
|
2605
|
+
}
|
|
2606
|
+
function Un(e, t) {
|
|
2607
|
+
let n = e === "hours" && (t === 0 || t > 12);
|
|
2608
|
+
return Vn(Hn(e, t), n ? In : Fn);
|
|
2609
|
+
}
|
|
2610
|
+
function Wn(e, t) {
|
|
2611
|
+
return (e === "hours" ? t % 12 / 12 * Math.PI * 2 - Math.PI / 2 : t / 60 * Math.PI * 2 - Math.PI / 2) - Math.PI / 2;
|
|
2612
|
+
}
|
|
2613
|
+
var Gn = Array.from({ length: 24 }, (e, t) => t), Kn = Array.from({ length: 12 }, (e, t) => t * 5);
|
|
2614
|
+
function qn({ mode: e, value: t, minuteStep: n, onSelect: r }) {
|
|
2615
|
+
let i = T(null), a = T(!1);
|
|
2616
|
+
function o(r, a) {
|
|
2617
|
+
let o = i.current?.getBoundingClientRect();
|
|
2618
|
+
if (!o) return t;
|
|
2619
|
+
let s = r - o.left, c = a - o.top;
|
|
2620
|
+
return e === "hours" ? zn(s, c) : Bn(s, c, n);
|
|
2621
|
+
}
|
|
2622
|
+
function s(e) {
|
|
2623
|
+
e.button > 0 || (a.current = !0, e.currentTarget.setPointerCapture(e.pointerId), r(o(e.clientX, e.clientY), !1));
|
|
2624
|
+
}
|
|
2625
|
+
function c(e) {
|
|
2626
|
+
a.current && r(o(e.clientX, e.clientY), !1);
|
|
2627
|
+
}
|
|
2628
|
+
function l(e) {
|
|
2629
|
+
a.current && (a.current = !1, r(o(e.clientX, e.clientY), !0));
|
|
2630
|
+
}
|
|
2631
|
+
function u() {
|
|
2632
|
+
a.current = !1;
|
|
2633
|
+
}
|
|
2634
|
+
function d(i) {
|
|
2635
|
+
let a = e === "hours" ? 23 : 59, o = e === "hours" ? 1 : n, s = (e) => (e % (a + 1) + (a + 1)) % (a + 1);
|
|
2636
|
+
switch (i.key) {
|
|
2637
|
+
case "ArrowUp":
|
|
2638
|
+
case "ArrowRight":
|
|
2639
|
+
r(s(t + o), !1), i.preventDefault();
|
|
2640
|
+
break;
|
|
2641
|
+
case "ArrowDown":
|
|
2642
|
+
case "ArrowLeft":
|
|
2643
|
+
r(s(t - o), !1), i.preventDefault();
|
|
2644
|
+
break;
|
|
2645
|
+
case "Home":
|
|
2646
|
+
r(0, !1), i.preventDefault();
|
|
2647
|
+
break;
|
|
2648
|
+
case "End":
|
|
2649
|
+
r(a, !1), i.preventDefault();
|
|
2650
|
+
break;
|
|
2651
|
+
case "Enter":
|
|
2652
|
+
case " ":
|
|
2653
|
+
r(t, !0), i.preventDefault();
|
|
2654
|
+
break;
|
|
2655
|
+
default: break;
|
|
2656
|
+
}
|
|
2657
|
+
}
|
|
2658
|
+
let f = e === "hours" ? Gn : Kn;
|
|
2659
|
+
return /* @__PURE__ */ v("div", {
|
|
2660
|
+
className: "relative shrink-0 select-none rounded-full bg-eds-neutral-background",
|
|
2661
|
+
style: {
|
|
2662
|
+
width: Nn,
|
|
2663
|
+
height: Nn
|
|
2664
|
+
},
|
|
2665
|
+
children: [
|
|
2666
|
+
/* @__PURE__ */ _("div", {
|
|
2667
|
+
ref: i,
|
|
2668
|
+
role: "slider",
|
|
2669
|
+
tabIndex: 0,
|
|
2670
|
+
"aria-valuemin": 0,
|
|
2671
|
+
"aria-valuemax": e === "hours" ? 23 : 59,
|
|
2672
|
+
"aria-valuenow": t,
|
|
2673
|
+
"aria-label": e === "hours" ? "Hora" : "Minuto",
|
|
2674
|
+
className: "absolute inset-0 cursor-pointer touch-none rounded-full focus-visible:outline focus-visible:outline-2 focus-visible:outline-eds-blue-main focus-visible:outline-offset-2",
|
|
2675
|
+
onPointerDown: s,
|
|
2676
|
+
onPointerMove: c,
|
|
2677
|
+
onPointerUp: l,
|
|
2678
|
+
onPointerCancel: u,
|
|
2679
|
+
onLostPointerCapture: u,
|
|
2680
|
+
onKeyDown: d
|
|
2681
|
+
}),
|
|
2682
|
+
/* @__PURE__ */ _("div", {
|
|
2683
|
+
className: "pointer-events-none absolute bg-eds-blue-main",
|
|
2684
|
+
style: {
|
|
2685
|
+
width: 2,
|
|
2686
|
+
height: e === "hours" && (t === 0 || t > 12) ? In : Fn,
|
|
2687
|
+
left: Pn,
|
|
2688
|
+
top: Pn,
|
|
2689
|
+
transformOrigin: "top",
|
|
2690
|
+
transform: `rotate(${Wn(e, t)}rad)`
|
|
2691
|
+
}
|
|
2692
|
+
}),
|
|
2693
|
+
/* @__PURE__ */ _("div", {
|
|
2694
|
+
className: "pointer-events-none absolute size-1.5 rounded-full bg-eds-blue-main",
|
|
2695
|
+
style: {
|
|
2696
|
+
left: Pn - 3,
|
|
2697
|
+
top: Pn - 3
|
|
2698
|
+
}
|
|
2699
|
+
}),
|
|
2700
|
+
f.map((n) => {
|
|
2701
|
+
let r = e === "hours" && (n === 0 || n > 12), { x: i, y: a } = Un(e, n), o = t === n, s = e === "hours" ? n === 0 ? "00" : String(n) : String(n).padStart(2, "0");
|
|
2702
|
+
return /* @__PURE__ */ _("button", {
|
|
2703
|
+
type: "button",
|
|
2704
|
+
tabIndex: -1,
|
|
2705
|
+
"aria-hidden": "true",
|
|
2706
|
+
className: I("pointer-events-none absolute flex items-center justify-center rounded-full text-sm tabular-nums", o ? "bg-eds-blue-main text-white" : "text-eds-neutral-main", r && !o && "text-xs text-eds-neutral-elements"),
|
|
2707
|
+
style: {
|
|
2708
|
+
width: Ln,
|
|
2709
|
+
height: Ln,
|
|
2710
|
+
left: Pn + i - Ln / 2,
|
|
2711
|
+
top: Pn + a - Ln / 2
|
|
2712
|
+
},
|
|
2713
|
+
children: s
|
|
2714
|
+
}, n);
|
|
2715
|
+
})
|
|
2716
|
+
]
|
|
2717
|
+
});
|
|
2718
|
+
}
|
|
2719
|
+
//#endregion
|
|
2582
2720
|
//#region src/components/DateTimePicker/DateTimePicker.tsx
|
|
2583
|
-
var
|
|
2721
|
+
var Jn = {
|
|
2584
2722
|
default: "",
|
|
2585
2723
|
valid: "not-focus-visible:border-[color-mix(in_srgb,var(--color-eds-green-main)_55%,var(--color-eds-outline-border))]",
|
|
2586
2724
|
invalid: "not-focus-visible:border-[color-mix(in_srgb,var(--color-eds-red-main)_55%,var(--color-eds-outline-border))]"
|
|
2587
|
-
},
|
|
2725
|
+
}, Yn = [
|
|
2588
2726
|
"D",
|
|
2589
2727
|
"S",
|
|
2590
2728
|
"T",
|
|
@@ -2593,83 +2731,83 @@ var Nn = {
|
|
|
2593
2731
|
"S",
|
|
2594
2732
|
"S"
|
|
2595
2733
|
];
|
|
2596
|
-
function
|
|
2734
|
+
function Xn(e, t) {
|
|
2597
2735
|
let n = G(Ee(e), { weekStartsOn: t }), r = Oe(Te(e), { weekStartsOn: t }), i = [];
|
|
2598
2736
|
for (let e = n; e <= r; e = de(e, 1)) i.push(e);
|
|
2599
2737
|
return i;
|
|
2600
2738
|
}
|
|
2601
|
-
function
|
|
2739
|
+
function Zn(e, t) {
|
|
2602
2740
|
let n = t ? ht(t) : 0, r = t ? gt(t) : 0;
|
|
2603
2741
|
return Ct(St(xt(e, n), r), 0);
|
|
2604
2742
|
}
|
|
2605
|
-
function
|
|
2743
|
+
function Qn(e, t) {
|
|
2606
2744
|
let n = Math.round(e / t) * t;
|
|
2607
2745
|
return Math.min(59, Math.max(0, n >= 60 ? 60 - t : n));
|
|
2608
2746
|
}
|
|
2609
|
-
function
|
|
2747
|
+
function $n(e) {
|
|
2610
2748
|
let t = Math.max(1, Math.min(30, Math.floor(e))), n = [];
|
|
2611
2749
|
for (let e = 0; e < 60; e += t) n.push(e);
|
|
2612
2750
|
return n;
|
|
2613
2751
|
}
|
|
2614
|
-
var
|
|
2615
|
-
function
|
|
2616
|
-
let
|
|
2752
|
+
var er = Array.from({ length: 24 }, (e, t) => t);
|
|
2753
|
+
function tr({ label: e = "Label", labelVariant: t, placeholder: n = "Selecione data e hora", disabled: i = !1, required: a = !1, fluid: o = !1, state: l = "default", size: u = "md", supportingText: d = "", errorMessage: f = "Selecione uma data e hora válidas", id: p, weekStartsOn: m = 0, defaultMonth: h, dateFormat: g = "dd/MM/yyyy HH:mm", minuteStep: y = 5, timeVariant: b = "clock", value: x, defaultValue: S = null, onValueChange: D, className: te }) {
|
|
2754
|
+
let ne = ee(), O = p ?? ne, re = l === "invalid", k = re || d, j = on[u], M = u === "lg" ? "size-5" : "size-4", N = an(t), P = N === "floating", F = x !== void 0, [L, ie] = E(S), R = F ? x ?? null : L, [z, ae] = E(!1), [B, se] = E(() => R ?? h ?? /* @__PURE__ */ new Date()), [V, ce] = E(R), [H, le] = E("hours"), ue = T(null), U = T(null), W = w(() => $n(y), [y]), de = w(() => Math.max(1, Math.min(30, Math.floor(y))), [y]), pe = w(() => [...Yn.slice(m), ...Yn.slice(0, m)], [m]), me = w(() => Xn(B, m), [B, m]), G = V ? ht(V) : 0, K = V ? Qn(gt(V), y) : 0;
|
|
2617
2755
|
C(() => {
|
|
2618
2756
|
if (!z) return;
|
|
2619
2757
|
let e = (e, t, n) => {
|
|
2620
2758
|
(e?.querySelector(`[data-${t}="${n}"]`))?.scrollIntoView({ block: "center" });
|
|
2621
2759
|
};
|
|
2622
2760
|
requestAnimationFrame(() => {
|
|
2623
|
-
e(
|
|
2761
|
+
e(ue.current, "hour", G), e(U.current, "minute", K);
|
|
2624
2762
|
});
|
|
2625
2763
|
}, [
|
|
2626
2764
|
z,
|
|
2627
|
-
|
|
2628
|
-
|
|
2765
|
+
G,
|
|
2766
|
+
K
|
|
2629
2767
|
]);
|
|
2630
|
-
function
|
|
2631
|
-
|
|
2768
|
+
function he(e) {
|
|
2769
|
+
F || ie(e), D?.(e);
|
|
2632
2770
|
}
|
|
2633
|
-
function
|
|
2771
|
+
function ge(e) {
|
|
2634
2772
|
if (!i) {
|
|
2635
2773
|
if (e) {
|
|
2636
|
-
let e = R ?? h ?? /* @__PURE__ */ new Date(), t = St(e,
|
|
2637
|
-
|
|
2774
|
+
let e = R ?? h ?? /* @__PURE__ */ new Date(), t = St(e, Qn(gt(e), y));
|
|
2775
|
+
ce(R ? t : null), se(R ?? h ?? /* @__PURE__ */ new Date()), le("hours");
|
|
2638
2776
|
}
|
|
2639
|
-
|
|
2777
|
+
ae(e);
|
|
2640
2778
|
}
|
|
2641
2779
|
}
|
|
2642
|
-
function
|
|
2643
|
-
let t =
|
|
2644
|
-
|
|
2780
|
+
function _e(e) {
|
|
2781
|
+
let t = Zn(e, V ?? R), n = St(t, Qn(gt(t), y));
|
|
2782
|
+
ce(n), he(n);
|
|
2645
2783
|
}
|
|
2646
|
-
function
|
|
2647
|
-
let
|
|
2648
|
-
|
|
2784
|
+
function ve(e, t = !0) {
|
|
2785
|
+
let n = V ?? R ?? /* @__PURE__ */ new Date(), r = Ct(St(xt(n, e), Qn(gt(n), y)), 0);
|
|
2786
|
+
ce(r), t && (he(r), b === "clock" && le("minutes"));
|
|
2649
2787
|
}
|
|
2650
|
-
function
|
|
2651
|
-
let
|
|
2652
|
-
|
|
2788
|
+
function ye(e, t = !0) {
|
|
2789
|
+
let n = Ct(St(V ?? R ?? /* @__PURE__ */ new Date(), e), 0);
|
|
2790
|
+
ce(n), t && he(n);
|
|
2653
2791
|
}
|
|
2654
|
-
function
|
|
2655
|
-
let e = /* @__PURE__ */ new Date(), t = Ct(St(e,
|
|
2656
|
-
|
|
2792
|
+
function be() {
|
|
2793
|
+
let e = /* @__PURE__ */ new Date(), t = Ct(St(e, Qn(gt(e), y)), 0);
|
|
2794
|
+
ce(t), se(t), he(t);
|
|
2657
2795
|
}
|
|
2658
|
-
function
|
|
2659
|
-
|
|
2796
|
+
function xe() {
|
|
2797
|
+
V && he(V), ae(!1);
|
|
2660
2798
|
}
|
|
2661
|
-
let
|
|
2799
|
+
let Ce = R ? J(R, g) : n;
|
|
2662
2800
|
return /* @__PURE__ */ v("div", {
|
|
2663
|
-
className: I(cn,
|
|
2801
|
+
className: I(cn, te),
|
|
2664
2802
|
"data-fluid": o || void 0,
|
|
2665
2803
|
"data-eds-component": "DateTimePicker",
|
|
2666
|
-
"data-label-variant":
|
|
2804
|
+
"data-label-variant": N,
|
|
2667
2805
|
children: [
|
|
2668
2806
|
/* @__PURE__ */ _("div", {
|
|
2669
2807
|
className: ln,
|
|
2670
2808
|
children: /* @__PURE__ */ v("label", {
|
|
2671
|
-
className: I(un,
|
|
2672
|
-
htmlFor:
|
|
2809
|
+
className: I(un, P && "sr-only", !P && "font-medium"),
|
|
2810
|
+
htmlFor: O,
|
|
2673
2811
|
children: [/* @__PURE__ */ _("span", { children: e }), a && /* @__PURE__ */ _("span", {
|
|
2674
2812
|
className: "text-eds-red-main",
|
|
2675
2813
|
children: "*"
|
|
@@ -2678,18 +2816,18 @@ function Bn({ label: e = "Label", labelVariant: t, placeholder: n = "Selecione d
|
|
|
2678
2816
|
}),
|
|
2679
2817
|
/* @__PURE__ */ v(A.Root, {
|
|
2680
2818
|
open: z,
|
|
2681
|
-
onOpenChange:
|
|
2819
|
+
onOpenChange: ge,
|
|
2682
2820
|
children: [/* @__PURE__ */ v(A.Trigger, {
|
|
2683
|
-
id:
|
|
2821
|
+
id: O,
|
|
2684
2822
|
disabled: i,
|
|
2685
|
-
className: I("group relative box-border inline-flex w-full cursor-pointer items-center gap-2 rounded-eds-xs border border-eds-outline-border bg-white py-0 text-left",
|
|
2823
|
+
className: I("group relative box-border inline-flex w-full cursor-pointer items-center gap-2 rounded-eds-xs border border-eds-outline-border bg-white py-0 text-left", j.trigger, Jn[l], "focus-visible:border-[color-mix(in_srgb,var(--color-eds-neutral-elements)_35%,var(--color-eds-outline-border))] focus-visible:shadow-[0_0_0_3px_var(--color-eds-outline-focus-ring)] focus-visible:outline-none", "data-disabled:cursor-not-allowed data-disabled:border-eds-outline-border data-disabled:bg-eds-neutral-background data-disabled:opacity-70"),
|
|
2686
2824
|
"data-state": l,
|
|
2687
2825
|
"data-size": u,
|
|
2688
2826
|
"data-disabled": i || void 0,
|
|
2689
|
-
"aria-describedby":
|
|
2827
|
+
"aria-describedby": k ? `${O}-desc` : void 0,
|
|
2690
2828
|
children: [
|
|
2691
|
-
|
|
2692
|
-
className: xn(
|
|
2829
|
+
P && /* @__PURE__ */ v("span", {
|
|
2830
|
+
className: xn(j.left),
|
|
2693
2831
|
children: [/* @__PURE__ */ _("span", { children: e }), a && /* @__PURE__ */ _("span", {
|
|
2694
2832
|
className: "text-eds-red-main",
|
|
2695
2833
|
"aria-hidden": "true",
|
|
@@ -2697,12 +2835,12 @@ function Bn({ label: e = "Label", labelVariant: t, placeholder: n = "Selecione d
|
|
|
2697
2835
|
})]
|
|
2698
2836
|
}),
|
|
2699
2837
|
/* @__PURE__ */ _(r, {
|
|
2700
|
-
className: I("shrink-0 text-eds-neutral-elements",
|
|
2838
|
+
className: I("shrink-0 text-eds-neutral-elements", M),
|
|
2701
2839
|
"aria-hidden": !0
|
|
2702
2840
|
}),
|
|
2703
2841
|
/* @__PURE__ */ _("span", {
|
|
2704
|
-
className: I("min-w-0 flex-1 truncate font-inherit",
|
|
2705
|
-
children:
|
|
2842
|
+
className: I("min-w-0 flex-1 truncate font-inherit", j.text, R ? "text-eds-neutral-main" : dn),
|
|
2843
|
+
children: Ce
|
|
2706
2844
|
})
|
|
2707
2845
|
]
|
|
2708
2846
|
}), /* @__PURE__ */ _(A.Portal, { children: /* @__PURE__ */ _(A.Positioner, {
|
|
@@ -2725,7 +2863,7 @@ function Bn({ label: e = "Label", labelVariant: t, placeholder: n = "Selecione d
|
|
|
2725
2863
|
icon: s,
|
|
2726
2864
|
label: "Mês anterior",
|
|
2727
2865
|
size: "sm",
|
|
2728
|
-
onClick: () =>
|
|
2866
|
+
onClick: () => se((e) => wt(e, 1))
|
|
2729
2867
|
}),
|
|
2730
2868
|
/* @__PURE__ */ _("span", {
|
|
2731
2869
|
className: "flex-1 text-center text-base font-medium text-eds-neutral-main capitalize",
|
|
@@ -2735,21 +2873,21 @@ function Bn({ label: e = "Label", labelVariant: t, placeholder: n = "Selecione d
|
|
|
2735
2873
|
icon: c,
|
|
2736
2874
|
label: "Próximo mês",
|
|
2737
2875
|
size: "sm",
|
|
2738
|
-
onClick: () =>
|
|
2876
|
+
onClick: () => se((e) => fe(e, 1))
|
|
2739
2877
|
})
|
|
2740
2878
|
]
|
|
2741
2879
|
}), /* @__PURE__ */ v("div", {
|
|
2742
2880
|
className: "grid grid-cols-7 px-4 pb-4",
|
|
2743
|
-
children: [
|
|
2881
|
+
children: [pe.map((e, t) => /* @__PURE__ */ _("span", {
|
|
2744
2882
|
className: "pb-2 text-center text-xs font-medium text-eds-neutral-main",
|
|
2745
2883
|
children: e
|
|
2746
|
-
}, `${e}-${t}`)),
|
|
2747
|
-
let t = yt(e, B), n = bt(e), r =
|
|
2884
|
+
}, `${e}-${t}`)), me.map((e) => {
|
|
2885
|
+
let t = yt(e, B), n = bt(e), r = V ? Se(e, V) : !1;
|
|
2748
2886
|
return /* @__PURE__ */ _("div", {
|
|
2749
2887
|
className: "flex items-center justify-center py-0.5",
|
|
2750
2888
|
children: /* @__PURE__ */ _("button", {
|
|
2751
2889
|
type: "button",
|
|
2752
|
-
onClick: () =>
|
|
2890
|
+
onClick: () => _e(e),
|
|
2753
2891
|
"data-selected": r || void 0,
|
|
2754
2892
|
"data-today": n || void 0,
|
|
2755
2893
|
className: I("flex size-9 shrink-0 items-center justify-center rounded-full text-sm font-medium", r ? "bg-eds-blue-main text-white" : t ? "text-eds-neutral-main hover:bg-eds-neutral-background" : "text-eds-neutral-elements/50 hover:bg-eds-neutral-background", !r && n && "ring-1 ring-inset ring-eds-blue-main"),
|
|
@@ -2758,7 +2896,39 @@ function Bn({ label: e = "Label", labelVariant: t, placeholder: n = "Selecione d
|
|
|
2758
2896
|
}, e.toISOString());
|
|
2759
2897
|
})]
|
|
2760
2898
|
})]
|
|
2761
|
-
}), /* @__PURE__ */ v("div", {
|
|
2899
|
+
}), b === "clock" ? /* @__PURE__ */ v("div", {
|
|
2900
|
+
className: "flex w-[260px] shrink-0 flex-col items-center gap-3 border-l border-eds-outline-border p-4",
|
|
2901
|
+
children: [/* @__PURE__ */ v("div", {
|
|
2902
|
+
className: "flex items-center gap-1 rounded-full bg-eds-neutral-background p-1",
|
|
2903
|
+
children: [
|
|
2904
|
+
/* @__PURE__ */ _("button", {
|
|
2905
|
+
type: "button",
|
|
2906
|
+
"aria-label": "Selecionar hora",
|
|
2907
|
+
"aria-pressed": H === "hours",
|
|
2908
|
+
onClick: () => le("hours"),
|
|
2909
|
+
className: I("rounded-full px-3 py-1 text-sm font-medium tabular-nums", H === "hours" ? "bg-white text-eds-neutral-main shadow-sm" : "text-eds-neutral-elements"),
|
|
2910
|
+
children: String(G).padStart(2, "0")
|
|
2911
|
+
}),
|
|
2912
|
+
/* @__PURE__ */ _("span", {
|
|
2913
|
+
className: "text-sm text-eds-neutral-elements",
|
|
2914
|
+
children: ":"
|
|
2915
|
+
}),
|
|
2916
|
+
/* @__PURE__ */ _("button", {
|
|
2917
|
+
type: "button",
|
|
2918
|
+
"aria-label": "Selecionar minuto",
|
|
2919
|
+
"aria-pressed": H === "minutes",
|
|
2920
|
+
onClick: () => le("minutes"),
|
|
2921
|
+
className: I("rounded-full px-3 py-1 text-sm font-medium tabular-nums", H === "minutes" ? "bg-white text-eds-neutral-main shadow-sm" : "text-eds-neutral-elements"),
|
|
2922
|
+
children: String(K).padStart(2, "0")
|
|
2923
|
+
})
|
|
2924
|
+
]
|
|
2925
|
+
}), /* @__PURE__ */ _(qn, {
|
|
2926
|
+
mode: H,
|
|
2927
|
+
value: H === "hours" ? G : K,
|
|
2928
|
+
minuteStep: de,
|
|
2929
|
+
onSelect: (e, t) => H === "hours" ? ve(e, t) : ye(e, t)
|
|
2930
|
+
})]
|
|
2931
|
+
}) : /* @__PURE__ */ v("div", {
|
|
2762
2932
|
className: "flex w-[148px] shrink-0 border-l border-eds-outline-border",
|
|
2763
2933
|
children: [/* @__PURE__ */ v("div", {
|
|
2764
2934
|
className: "flex min-h-0 flex-1 flex-col",
|
|
@@ -2766,18 +2936,18 @@ function Bn({ label: e = "Label", labelVariant: t, placeholder: n = "Selecione d
|
|
|
2766
2936
|
className: "px-2 pt-3 pb-1 text-center text-xs font-medium text-eds-neutral-elements",
|
|
2767
2937
|
children: "Hora"
|
|
2768
2938
|
}), /* @__PURE__ */ _("div", {
|
|
2769
|
-
ref:
|
|
2939
|
+
ref: ue,
|
|
2770
2940
|
className: "flex max-h-[248px] flex-col gap-0.5 overflow-y-auto overscroll-contain px-2 pb-3",
|
|
2771
2941
|
role: "listbox",
|
|
2772
2942
|
"aria-label": "Hora",
|
|
2773
|
-
children:
|
|
2774
|
-
let t =
|
|
2943
|
+
children: er.map((e) => {
|
|
2944
|
+
let t = G === e;
|
|
2775
2945
|
return /* @__PURE__ */ _("button", {
|
|
2776
2946
|
type: "button",
|
|
2777
2947
|
role: "option",
|
|
2778
2948
|
"aria-selected": t,
|
|
2779
2949
|
"data-hour": e,
|
|
2780
|
-
onClick: () =>
|
|
2950
|
+
onClick: () => ve(e),
|
|
2781
2951
|
className: I("rounded-md px-2 py-1.5 text-center text-sm tabular-nums", t ? "bg-eds-blue-main text-white" : "text-eds-neutral-main hover:bg-eds-neutral-background"),
|
|
2782
2952
|
children: String(e).padStart(2, "0")
|
|
2783
2953
|
}, e);
|
|
@@ -2789,18 +2959,18 @@ function Bn({ label: e = "Label", labelVariant: t, placeholder: n = "Selecione d
|
|
|
2789
2959
|
className: "px-2 pt-3 pb-1 text-center text-xs font-medium text-eds-neutral-elements",
|
|
2790
2960
|
children: "Min"
|
|
2791
2961
|
}), /* @__PURE__ */ _("div", {
|
|
2792
|
-
ref:
|
|
2962
|
+
ref: U,
|
|
2793
2963
|
className: "flex max-h-[248px] flex-col gap-0.5 overflow-y-auto overscroll-contain px-2 pb-3",
|
|
2794
2964
|
role: "listbox",
|
|
2795
2965
|
"aria-label": "Minuto",
|
|
2796
|
-
children:
|
|
2797
|
-
let t =
|
|
2966
|
+
children: W.map((e) => {
|
|
2967
|
+
let t = K === e;
|
|
2798
2968
|
return /* @__PURE__ */ _("button", {
|
|
2799
2969
|
type: "button",
|
|
2800
2970
|
role: "option",
|
|
2801
2971
|
"aria-selected": t,
|
|
2802
2972
|
"data-minute": e,
|
|
2803
|
-
onClick: () =>
|
|
2973
|
+
onClick: () => ye(e),
|
|
2804
2974
|
className: I("rounded-md px-2 py-1.5 text-center text-sm tabular-nums", t ? "bg-eds-blue-main text-white" : "text-eds-neutral-main hover:bg-eds-neutral-background"),
|
|
2805
2975
|
children: String(e).padStart(2, "0")
|
|
2806
2976
|
}, e);
|
|
@@ -2810,33 +2980,33 @@ function Bn({ label: e = "Label", labelVariant: t, placeholder: n = "Selecione d
|
|
|
2810
2980
|
})]
|
|
2811
2981
|
}), /* @__PURE__ */ v("div", {
|
|
2812
2982
|
className: "flex items-center justify-between gap-2 border-t border-eds-outline-border bg-eds-neutral-background px-3 py-2.5",
|
|
2813
|
-
children: [/* @__PURE__ */ _(
|
|
2983
|
+
children: [/* @__PURE__ */ _(oe, {
|
|
2814
2984
|
text: "Agora",
|
|
2815
2985
|
variant: "ghost",
|
|
2816
2986
|
size: "sm",
|
|
2817
|
-
onClick:
|
|
2818
|
-
}), /* @__PURE__ */ _(
|
|
2987
|
+
onClick: be
|
|
2988
|
+
}), /* @__PURE__ */ _(oe, {
|
|
2819
2989
|
text: "Confirmar",
|
|
2820
2990
|
size: "sm",
|
|
2821
|
-
onClick:
|
|
2822
|
-
disabled: !
|
|
2991
|
+
onClick: xe,
|
|
2992
|
+
disabled: !V
|
|
2823
2993
|
})]
|
|
2824
2994
|
})]
|
|
2825
2995
|
})
|
|
2826
2996
|
}) })]
|
|
2827
2997
|
}),
|
|
2828
|
-
|
|
2829
|
-
id: `${
|
|
2998
|
+
k && /* @__PURE__ */ _("div", {
|
|
2999
|
+
id: `${O}-desc`,
|
|
2830
3000
|
className: "text-xs text-eds-neutral-elements data-[state=invalid]:text-eds-red-main",
|
|
2831
|
-
"data-state":
|
|
2832
|
-
children:
|
|
3001
|
+
"data-state": re ? "invalid" : l,
|
|
3002
|
+
children: re ? f : d
|
|
2833
3003
|
})
|
|
2834
3004
|
]
|
|
2835
3005
|
});
|
|
2836
3006
|
}
|
|
2837
3007
|
//#endregion
|
|
2838
3008
|
//#region src/components/Dialog/Dialog.tsx
|
|
2839
|
-
var
|
|
3009
|
+
var nr = { size: {
|
|
2840
3010
|
sm: {
|
|
2841
3011
|
classes: "sm:max-w-xs",
|
|
2842
3012
|
description: "Small dialog for simple confirmations (288px)"
|
|
@@ -2853,21 +3023,21 @@ var Vn = { size: {
|
|
|
2853
3023
|
classes: "sm:max-w-3xl",
|
|
2854
3024
|
description: "Extra large dialog for detailed views (768px)"
|
|
2855
3025
|
}
|
|
2856
|
-
} },
|
|
2857
|
-
function
|
|
2858
|
-
return S(
|
|
3026
|
+
} }, rr = { size: "md" }, ir = b("dialog");
|
|
3027
|
+
function ar() {
|
|
3028
|
+
return S(ir);
|
|
2859
3029
|
}
|
|
2860
|
-
function
|
|
2861
|
-
return I(`fixed top-1/2 left-1/2 ${sn.overlay} grid w-full max-w-[calc(100%-2rem)] max-h-[calc(100vh-4rem)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl bg-white p-4 text-sm text-eds-neutral-main ring-1 ring-eds-outline-border outline-none transition-all duration-100 data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0`, L(
|
|
3030
|
+
function or({ size: e = rr.size } = {}) {
|
|
3031
|
+
return I(`fixed top-1/2 left-1/2 ${sn.overlay} grid w-full max-w-[calc(100%-2rem)] max-h-[calc(100vh-4rem)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl bg-white p-4 text-sm text-eds-neutral-main ring-1 ring-eds-outline-border outline-none transition-all duration-100 data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0`, L(nr.size, e, rr.size).classes);
|
|
2862
3032
|
}
|
|
2863
|
-
function
|
|
2864
|
-
let i =
|
|
3033
|
+
function sr({ className: e, children: t, size: n, showCloseButton: r = !0 }) {
|
|
3034
|
+
let i = ar(), a = i === "alertdialog" ? M.Portal : j.Portal, o = i === "alertdialog" ? M.Backdrop : j.Backdrop, s = i === "alertdialog" ? M.Popup : j.Popup, c = i === "alertdialog" ? M.Close : j.Close;
|
|
2865
3035
|
return /* @__PURE__ */ v(a, { children: [/* @__PURE__ */ _(o, {
|
|
2866
3036
|
className: I("fixed inset-0 isolate bg-black/50 transition-opacity duration-100 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0", sn.overlay),
|
|
2867
3037
|
style: { zIndex: sn.overlayValue }
|
|
2868
3038
|
}), /* @__PURE__ */ v(s, {
|
|
2869
3039
|
"data-eds-component": "Dialog",
|
|
2870
|
-
className: I(
|
|
3040
|
+
className: I(or({ size: n }), e),
|
|
2871
3041
|
style: { zIndex: sn.overlayValue },
|
|
2872
3042
|
children: [t, r ? /* @__PURE__ */ _(c, {
|
|
2873
3043
|
"data-eds-component": "Dialog",
|
|
@@ -2880,10 +3050,10 @@ function Kn({ className: e, children: t, size: n, showCloseButton: r = !0 }) {
|
|
|
2880
3050
|
}) : null]
|
|
2881
3051
|
})] });
|
|
2882
3052
|
}
|
|
2883
|
-
function
|
|
3053
|
+
function cr(e) {
|
|
2884
3054
|
if (e.role === "alertdialog") {
|
|
2885
3055
|
let { children: t, role: n, ...r } = e;
|
|
2886
|
-
return /* @__PURE__ */ _(
|
|
3056
|
+
return /* @__PURE__ */ _(ir.Provider, {
|
|
2887
3057
|
value: n,
|
|
2888
3058
|
children: /* @__PURE__ */ _(M.Root, {
|
|
2889
3059
|
...r,
|
|
@@ -2892,7 +3062,7 @@ function qn(e) {
|
|
|
2892
3062
|
});
|
|
2893
3063
|
}
|
|
2894
3064
|
let { children: t, role: n = "dialog", ...r } = e;
|
|
2895
|
-
return /* @__PURE__ */ _(
|
|
3065
|
+
return /* @__PURE__ */ _(ir.Provider, {
|
|
2896
3066
|
value: n,
|
|
2897
3067
|
children: /* @__PURE__ */ _(j.Root, {
|
|
2898
3068
|
...r,
|
|
@@ -2900,8 +3070,8 @@ function qn(e) {
|
|
|
2900
3070
|
})
|
|
2901
3071
|
});
|
|
2902
3072
|
}
|
|
2903
|
-
function
|
|
2904
|
-
return
|
|
3073
|
+
function lr({ children: e, ...t }) {
|
|
3074
|
+
return ar() === "alertdialog" ? /* @__PURE__ */ _(M.Trigger, {
|
|
2905
3075
|
"data-eds-component": "Dialog",
|
|
2906
3076
|
...t,
|
|
2907
3077
|
children: e
|
|
@@ -2911,56 +3081,56 @@ function Jn({ children: e, ...t }) {
|
|
|
2911
3081
|
children: e
|
|
2912
3082
|
});
|
|
2913
3083
|
}
|
|
2914
|
-
function
|
|
3084
|
+
function ur({ className: e, ...t }) {
|
|
2915
3085
|
return /* @__PURE__ */ _("div", {
|
|
2916
3086
|
"data-slot": "dialog-header",
|
|
2917
3087
|
className: I("flex flex-col gap-2", e),
|
|
2918
3088
|
...t
|
|
2919
3089
|
});
|
|
2920
3090
|
}
|
|
2921
|
-
function
|
|
3091
|
+
function dr({ className: e, ...t }) {
|
|
2922
3092
|
return /* @__PURE__ */ _("div", {
|
|
2923
3093
|
"data-slot": "dialog-footer",
|
|
2924
3094
|
className: I("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t border-eds-outline-border bg-eds-neutral-background p-4 sm:flex-row sm:justify-end", e),
|
|
2925
3095
|
...t
|
|
2926
3096
|
});
|
|
2927
3097
|
}
|
|
2928
|
-
function
|
|
2929
|
-
return /* @__PURE__ */ _(
|
|
3098
|
+
function fr({ className: e, ...t }) {
|
|
3099
|
+
return /* @__PURE__ */ _(ar() === "alertdialog" ? M.Title : j.Title, {
|
|
2930
3100
|
className: I("text-base leading-none font-medium text-eds-neutral-main", e),
|
|
2931
3101
|
...t
|
|
2932
3102
|
});
|
|
2933
3103
|
}
|
|
2934
|
-
function
|
|
2935
|
-
return /* @__PURE__ */ _(
|
|
3104
|
+
function pr({ className: e, ...t }) {
|
|
3105
|
+
return /* @__PURE__ */ _(ar() === "alertdialog" ? M.Description : j.Description, {
|
|
2936
3106
|
className: I("text-sm text-eds-neutral-elements", e),
|
|
2937
3107
|
...t
|
|
2938
3108
|
});
|
|
2939
3109
|
}
|
|
2940
|
-
function
|
|
2941
|
-
return /* @__PURE__ */ _(
|
|
3110
|
+
function mr({ children: e, ...t }) {
|
|
3111
|
+
return /* @__PURE__ */ _(ar() === "alertdialog" ? M.Close : j.Close, {
|
|
2942
3112
|
"data-eds-component": "Dialog",
|
|
2943
3113
|
...t,
|
|
2944
3114
|
children: e
|
|
2945
3115
|
});
|
|
2946
3116
|
}
|
|
2947
|
-
|
|
2948
|
-
var
|
|
2949
|
-
Root:
|
|
2950
|
-
Trigger:
|
|
2951
|
-
Header:
|
|
2952
|
-
Footer:
|
|
2953
|
-
Title:
|
|
2954
|
-
Description:
|
|
2955
|
-
Close:
|
|
3117
|
+
cr.displayName = "Dialog.Root", lr.displayName = "Dialog.Trigger", ur.displayName = "Dialog.Header", dr.displayName = "Dialog.Footer", fr.displayName = "Dialog.Title", pr.displayName = "Dialog.Description", mr.displayName = "Dialog.Close";
|
|
3118
|
+
var hr = Object.assign(sr, {
|
|
3119
|
+
Root: cr,
|
|
3120
|
+
Trigger: lr,
|
|
3121
|
+
Header: ur,
|
|
3122
|
+
Footer: dr,
|
|
3123
|
+
Title: fr,
|
|
3124
|
+
Description: pr,
|
|
3125
|
+
Close: mr
|
|
2956
3126
|
});
|
|
2957
3127
|
//#endregion
|
|
2958
3128
|
//#region src/components/FormDialog/FormDialog.tsx
|
|
2959
|
-
function
|
|
2960
|
-
return I("relative flex w-full max-h-full min-h-0 flex-col overflow-hidden rounded-xl bg-white text-sm text-eds-neutral-main ring-1 ring-eds-outline-border outline-none transition-all duration-100 data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0", "[&>form]:flex [&>form]:min-h-0 [&>form]:w-full [&>form]:flex-1 [&>form]:flex-col [&>form]:overflow-hidden", L(
|
|
3129
|
+
function gr({ size: e = "xl" } = {}) {
|
|
3130
|
+
return I("relative flex w-full max-h-full min-h-0 flex-col overflow-hidden rounded-xl bg-white text-sm text-eds-neutral-main ring-1 ring-eds-outline-border outline-none transition-all duration-100 data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0", "[&>form]:flex [&>form]:min-h-0 [&>form]:w-full [&>form]:flex-1 [&>form]:flex-col [&>form]:overflow-hidden", L(nr.size, e, rr.size).classes);
|
|
2961
3131
|
}
|
|
2962
|
-
function
|
|
2963
|
-
let r =
|
|
3132
|
+
function _r({ className: e, children: t, size: n = "xl" }) {
|
|
3133
|
+
let r = ar(), i = r === "alertdialog" ? M.Portal : j.Portal, a = r === "alertdialog" ? M.Backdrop : j.Backdrop, o = r === "alertdialog" ? M.Popup : j.Popup;
|
|
2964
3134
|
return /* @__PURE__ */ v(i, { children: [/* @__PURE__ */ _(a, {
|
|
2965
3135
|
className: I("fixed inset-0 isolate bg-black/50 transition-opacity duration-100 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0", sn.overlay),
|
|
2966
3136
|
style: { zIndex: sn.overlayValue }
|
|
@@ -2969,13 +3139,13 @@ function nr({ className: e, children: t, size: n = "xl" }) {
|
|
|
2969
3139
|
style: { zIndex: sn.overlayValue },
|
|
2970
3140
|
children: /* @__PURE__ */ _(o, {
|
|
2971
3141
|
"data-eds-component": "FormDialog",
|
|
2972
|
-
className: I("pointer-events-auto",
|
|
3142
|
+
className: I("pointer-events-auto", gr({ size: n }), e),
|
|
2973
3143
|
children: t
|
|
2974
3144
|
})
|
|
2975
3145
|
})] });
|
|
2976
3146
|
}
|
|
2977
|
-
function
|
|
2978
|
-
let s =
|
|
3147
|
+
function vr({ className: e, icon: t, title: n, subtitle: r, showCloseButton: i = !0, children: a, ...o }) {
|
|
3148
|
+
let s = ar(), c = s === "alertdialog" ? M.Close : j.Close, l = s === "alertdialog" ? M.Title : j.Title, u = s === "alertdialog" ? M.Description : j.Description, d = n != null || r != null || t;
|
|
2979
3149
|
return /* @__PURE__ */ v("div", {
|
|
2980
3150
|
"data-slot": "form-dialog-header",
|
|
2981
3151
|
className: I("relative flex shrink-0 items-start gap-3 border-b border-eds-outline-border bg-white px-5 py-4", i && "pr-12", e),
|
|
@@ -3019,43 +3189,43 @@ function rr({ className: e, icon: t, title: n, subtitle: r, showCloseButton: i =
|
|
|
3019
3189
|
]
|
|
3020
3190
|
});
|
|
3021
3191
|
}
|
|
3022
|
-
function
|
|
3192
|
+
function yr({ className: e, ...t }) {
|
|
3023
3193
|
return /* @__PURE__ */ _("div", {
|
|
3024
3194
|
"data-slot": "form-dialog-body",
|
|
3025
3195
|
className: I("min-h-0 flex-1 overflow-y-auto overscroll-contain px-5 py-4", e),
|
|
3026
3196
|
...t
|
|
3027
3197
|
});
|
|
3028
3198
|
}
|
|
3029
|
-
function
|
|
3199
|
+
function br({ className: e, ...t }) {
|
|
3030
3200
|
return /* @__PURE__ */ _("div", {
|
|
3031
3201
|
"data-slot": "form-dialog-footer",
|
|
3032
3202
|
className: I("flex shrink-0 flex-col-reverse gap-2 border-t border-eds-outline-border bg-eds-neutral-background px-5 py-4 sm:flex-row sm:justify-end", e),
|
|
3033
3203
|
...t
|
|
3034
3204
|
});
|
|
3035
3205
|
}
|
|
3036
|
-
function
|
|
3037
|
-
return /* @__PURE__ */ _(
|
|
3206
|
+
function xr({ className: e, ...t }) {
|
|
3207
|
+
return /* @__PURE__ */ _(ar() === "alertdialog" ? M.Title : j.Title, {
|
|
3038
3208
|
className: I("text-lg leading-tight font-semibold text-eds-blue-dark", e),
|
|
3039
3209
|
...t
|
|
3040
3210
|
});
|
|
3041
3211
|
}
|
|
3042
|
-
function
|
|
3043
|
-
return /* @__PURE__ */ _(
|
|
3212
|
+
function Sr({ className: e, ...t }) {
|
|
3213
|
+
return /* @__PURE__ */ _(ar() === "alertdialog" ? M.Description : j.Description, {
|
|
3044
3214
|
className: I("text-sm leading-snug text-eds-neutral-elements", e),
|
|
3045
3215
|
...t
|
|
3046
3216
|
});
|
|
3047
3217
|
}
|
|
3048
|
-
|
|
3049
|
-
var
|
|
3050
|
-
Root:
|
|
3051
|
-
Trigger:
|
|
3052
|
-
Close:
|
|
3053
|
-
Header:
|
|
3054
|
-
Body:
|
|
3055
|
-
Footer:
|
|
3056
|
-
Title:
|
|
3057
|
-
Description:
|
|
3058
|
-
}),
|
|
3218
|
+
vr.displayName = "FormDialog.Header", yr.displayName = "FormDialog.Body", br.displayName = "FormDialog.Footer", xr.displayName = "FormDialog.Title", Sr.displayName = "FormDialog.Description";
|
|
3219
|
+
var Cr = Object.assign(_r, {
|
|
3220
|
+
Root: cr,
|
|
3221
|
+
Trigger: lr,
|
|
3222
|
+
Close: mr,
|
|
3223
|
+
Header: vr,
|
|
3224
|
+
Body: yr,
|
|
3225
|
+
Footer: br,
|
|
3226
|
+
Title: xr,
|
|
3227
|
+
Description: Sr
|
|
3228
|
+
}), wr = { size: {
|
|
3059
3229
|
sm: {
|
|
3060
3230
|
classes: "px-6 py-8 gap-3",
|
|
3061
3231
|
description: "Compact empty state for smaller containers"
|
|
@@ -3068,11 +3238,11 @@ var cr = Object.assign(nr, {
|
|
|
3068
3238
|
classes: "px-12 py-20 gap-6",
|
|
3069
3239
|
description: "Large empty state for prominent placement"
|
|
3070
3240
|
}
|
|
3071
|
-
} },
|
|
3072
|
-
function
|
|
3241
|
+
} }, Tr = { size: "md" };
|
|
3242
|
+
function Er({ icon: e, title: t, description: n, action: r, size: i = Tr.size, titleLevel: a = "h2", className: o }) {
|
|
3073
3243
|
return /* @__PURE__ */ v("div", {
|
|
3074
3244
|
"data-eds-component": "Empty",
|
|
3075
|
-
className: I("flex w-full flex-col items-center rounded-eds-sm border border-eds-outline-border bg-eds-neutral-background text-center", L(
|
|
3245
|
+
className: I("flex w-full flex-col items-center rounded-eds-sm border border-eds-outline-border bg-eds-neutral-background text-center", L(wr.size, i, Tr.size).classes, o),
|
|
3076
3246
|
children: [
|
|
3077
3247
|
e && /* @__PURE__ */ _("div", {
|
|
3078
3248
|
className: "text-eds-neutral-elements",
|
|
@@ -3093,24 +3263,24 @@ function dr({ icon: e, title: t, description: n, action: r, size: i = ur.size, t
|
|
|
3093
3263
|
}
|
|
3094
3264
|
//#endregion
|
|
3095
3265
|
//#region ../../node_modules/.pnpm/brazilian-values@0.13.1/node_modules/brazilian-values/dist/brazilian-values.mjs
|
|
3096
|
-
var
|
|
3097
|
-
return e.replace(
|
|
3098
|
-
},
|
|
3099
|
-
return
|
|
3100
|
-
},
|
|
3101
|
-
return
|
|
3102
|
-
},
|
|
3103
|
-
return
|
|
3104
|
-
},
|
|
3266
|
+
var Dr = /\D/g, Or = function(e) {
|
|
3267
|
+
return e.replace(Dr, "");
|
|
3268
|
+
}, kr = function(e) {
|
|
3269
|
+
return Or(e).replace(/(\d{5})(\d{1,3})/, "$1-$2");
|
|
3270
|
+
}, Ar = function(e) {
|
|
3271
|
+
return Or(e).replace(/(\d{2})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1/$2").replace(/(\d{4})(\d{1,2})$/, "$1-$2");
|
|
3272
|
+
}, jr = function(e) {
|
|
3273
|
+
return Or(e).replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d{1,2})$/, "$1-$2");
|
|
3274
|
+
}, Mr = function(e) {
|
|
3105
3275
|
return (e.match(/\d/g)?.length ?? 0) <= 11;
|
|
3106
|
-
},
|
|
3107
|
-
return
|
|
3108
|
-
},
|
|
3109
|
-
return
|
|
3276
|
+
}, Nr = function(e) {
|
|
3277
|
+
return Mr(e) ? jr(e) : Ar(e);
|
|
3278
|
+
}, Pr = function(e) {
|
|
3279
|
+
return Or(e).replace(/(\d{1,2})/, "($1").replace(/(\(\d{2})(\d{1,4})/, "$1) $2").replace(/( \d{4})(\d{1,4})/, "$1-$2").replace(/( \d{4})(?:-)(\d{1})(\d{4})/, "$1$2-$3");
|
|
3110
3280
|
};
|
|
3111
3281
|
//#endregion
|
|
3112
3282
|
//#region src/components/Input/Input.tsx
|
|
3113
|
-
function
|
|
3283
|
+
function Fr(e) {
|
|
3114
3284
|
if (!e) return "";
|
|
3115
3285
|
let t = e.trimStart().startsWith("-"), n = e.replace(/\./g, ",").replace(/[^\d,]/g, "");
|
|
3116
3286
|
if (!n) return t ? "-" : "";
|
|
@@ -3119,29 +3289,29 @@ function br(e) {
|
|
|
3119
3289
|
let i = n.slice(0, r), a = n.slice(r + 1).replace(/,/g, "");
|
|
3120
3290
|
return `${t ? "-" : ""}${i},${a}`;
|
|
3121
3291
|
}
|
|
3122
|
-
var
|
|
3292
|
+
var Ir = {
|
|
3123
3293
|
default: "",
|
|
3124
3294
|
valid: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-green-main)_55%,var(--color-eds-outline-border))]",
|
|
3125
3295
|
invalid: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-red-main)_55%,var(--color-eds-outline-border))]",
|
|
3126
3296
|
loading: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-blue-main)_45%,var(--color-eds-outline-border))]"
|
|
3127
3297
|
};
|
|
3128
|
-
function
|
|
3129
|
-
let
|
|
3298
|
+
function Lr({ className: e, label: t = "Label", disabled: n = !1, state: r = "default", size: i = "md", inputType: a = "text", required: o = !1, placeholder: s = "Digite algo...", errorMessage: c = "Campo obrigatório", fluid: l = !1, format: f, tooltip: p = null, linkText: m = null, linkUrl: h = null, supportLink: g = null, supportLinkUrl: y = null, supportingText: b = "", lazy: x = !1, labelVariant: S, disableAutocomplete: C = !1, isLoading: w = !1, loadingIconPosition: T = "end", icon: D, hideContent: te = !1, showContentText: ne = "Mostrar", hideContentText: O = "Ocultar", defaultValue: re, value: k, id: A, name: j, onBlur: M, onFocus: P, onKeyDown: F, onClick: L, onChange: ie, ...R }) {
|
|
3299
|
+
let z = ee(), ae = A ?? z, B = a === "number", [oe, se] = E(!1), [V, ce] = E(() => {
|
|
3130
3300
|
let e = re?.toString() ?? "";
|
|
3131
|
-
return
|
|
3132
|
-
}),
|
|
3133
|
-
if (
|
|
3301
|
+
return B ? Fr(e) : e;
|
|
3302
|
+
}), H = k !== void 0, le = (H ? k : V)?.toString() ?? "", ue = B ? Fr(le) : le, U = g ?? m, W = y ?? h, de = an(S), fe = de === "floating", pe = (e) => {
|
|
3303
|
+
if (B) return Fr(e);
|
|
3134
3304
|
switch (f) {
|
|
3135
|
-
case "cep": return
|
|
3136
|
-
case "cpf": return
|
|
3137
|
-
case "cnpj": return
|
|
3138
|
-
case "cpfOrCnpj": return
|
|
3139
|
-
case "phone": return
|
|
3305
|
+
case "cep": return kr(e);
|
|
3306
|
+
case "cpf": return jr(e);
|
|
3307
|
+
case "cnpj": return Ar(e);
|
|
3308
|
+
case "cpfOrCnpj": return Nr(e);
|
|
3309
|
+
case "phone": return Pr(e);
|
|
3140
3310
|
default: return e;
|
|
3141
3311
|
}
|
|
3142
3312
|
}, me = (e, t) => {
|
|
3143
3313
|
let n = pe(e);
|
|
3144
|
-
|
|
3314
|
+
H || ce(n), ie?.(n, t);
|
|
3145
3315
|
}, G = r === "invalid", K = n || w, he = on[i], ge = w ? /* @__PURE__ */ _("span", {
|
|
3146
3316
|
className: "inline-flex shrink-0 items-center justify-center text-eds-blue-main",
|
|
3147
3317
|
"data-position": T,
|
|
@@ -3163,7 +3333,7 @@ function Sr({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
|
|
|
3163
3333
|
className: "inline-flex min-w-0 items-center gap-2",
|
|
3164
3334
|
children: [/* @__PURE__ */ v("label", {
|
|
3165
3335
|
className: I(un, fe && "sr-only", !fe && "font-medium"),
|
|
3166
|
-
htmlFor:
|
|
3336
|
+
htmlFor: ae,
|
|
3167
3337
|
children: [/* @__PURE__ */ _("span", { children: t }), o && /* @__PURE__ */ _("span", {
|
|
3168
3338
|
className: "text-eds-red-main",
|
|
3169
3339
|
children: "*"
|
|
@@ -3191,7 +3361,7 @@ function Sr({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
|
|
|
3191
3361
|
})]
|
|
3192
3362
|
}),
|
|
3193
3363
|
/* @__PURE__ */ v("div", {
|
|
3194
|
-
className: I("group relative inline-flex w-full items-center gap-2 rounded-eds-xs border border-eds-outline-border bg-white", he.control,
|
|
3364
|
+
className: I("group relative inline-flex w-full items-center gap-2 rounded-eds-xs border border-eds-outline-border bg-white", he.control, Ir[r], "focus-within:border-[color-mix(in_srgb,var(--color-eds-neutral-elements)_35%,var(--color-eds-outline-border))] focus-within:shadow-[0_0_0_3px_var(--color-eds-outline-focus-ring)]", "data-disabled:cursor-not-allowed data-disabled:border-eds-outline-border data-disabled:bg-eds-neutral-background data-disabled:opacity-70"),
|
|
3195
3365
|
"data-disabled": K || void 0,
|
|
3196
3366
|
"data-state": r,
|
|
3197
3367
|
"data-size": i,
|
|
@@ -3213,22 +3383,22 @@ function Sr({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
|
|
|
3213
3383
|
}),
|
|
3214
3384
|
T === "start" && ge,
|
|
3215
3385
|
/* @__PURE__ */ _(N, {
|
|
3216
|
-
...
|
|
3217
|
-
id:
|
|
3386
|
+
...R,
|
|
3387
|
+
id: ae,
|
|
3218
3388
|
name: j,
|
|
3219
3389
|
className: I("box-border min-w-0 flex-1 border-0 bg-transparent p-0 font-inherit text-eds-neutral-main outline-none", fn, he.text),
|
|
3220
3390
|
disabled: K,
|
|
3221
|
-
type:
|
|
3222
|
-
inputMode:
|
|
3223
|
-
lang:
|
|
3391
|
+
type: B ? "text" : te ? oe ? "text" : "password" : a,
|
|
3392
|
+
inputMode: B ? R.inputMode ?? "decimal" : R.inputMode,
|
|
3393
|
+
lang: B ? R.lang ?? "pt-BR" : R.lang,
|
|
3224
3394
|
required: o,
|
|
3225
3395
|
placeholder: s,
|
|
3226
|
-
autoComplete: C ? "off" :
|
|
3396
|
+
autoComplete: C ? "off" : R.autoComplete,
|
|
3227
3397
|
"aria-invalid": G || void 0,
|
|
3228
|
-
"aria-describedby": G ? `${
|
|
3398
|
+
"aria-describedby": G ? `${ae}-desc` : void 0,
|
|
3229
3399
|
"aria-busy": w || void 0,
|
|
3230
|
-
value:
|
|
3231
|
-
defaultValue: !
|
|
3400
|
+
value: H || B ? ue : void 0,
|
|
3401
|
+
defaultValue: !H && !B ? re : void 0,
|
|
3232
3402
|
onClick: L,
|
|
3233
3403
|
onKeyDown: F,
|
|
3234
3404
|
onFocus: P,
|
|
@@ -3237,7 +3407,7 @@ function Sr({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
|
|
|
3237
3407
|
},
|
|
3238
3408
|
onChange: (e) => {
|
|
3239
3409
|
if (x) {
|
|
3240
|
-
|
|
3410
|
+
B && !H && ce(pe(e.currentTarget.value));
|
|
3241
3411
|
return;
|
|
3242
3412
|
}
|
|
3243
3413
|
me(e.currentTarget.value, e);
|
|
@@ -3247,14 +3417,14 @@ function Sr({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
|
|
|
3247
3417
|
type: "button",
|
|
3248
3418
|
className: "shrink-0 text-sm font-medium text-eds-blue-main hover:underline",
|
|
3249
3419
|
disabled: K,
|
|
3250
|
-
onClick: () =>
|
|
3251
|
-
children:
|
|
3420
|
+
onClick: () => se((e) => !e),
|
|
3421
|
+
children: oe ? O : ne
|
|
3252
3422
|
}),
|
|
3253
3423
|
T === "end" && ge
|
|
3254
3424
|
]
|
|
3255
3425
|
}),
|
|
3256
3426
|
(G || b) && /* @__PURE__ */ _("div", {
|
|
3257
|
-
id: `${
|
|
3427
|
+
id: `${ae}-desc`,
|
|
3258
3428
|
className: "text-xs text-eds-neutral-elements data-[state=invalid]:text-eds-red-main",
|
|
3259
3429
|
"data-state": G ? "invalid" : r,
|
|
3260
3430
|
children: G ? c : b
|
|
@@ -3264,16 +3434,16 @@ function Sr({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
|
|
|
3264
3434
|
}
|
|
3265
3435
|
//#endregion
|
|
3266
3436
|
//#region src/components/Textarea/Textarea.tsx
|
|
3267
|
-
var
|
|
3437
|
+
var Rr = {
|
|
3268
3438
|
default: "",
|
|
3269
3439
|
valid: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-green-main)_55%,var(--color-eds-outline-border))]",
|
|
3270
3440
|
invalid: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-red-main)_55%,var(--color-eds-outline-border))]"
|
|
3271
|
-
},
|
|
3441
|
+
}, zr = {
|
|
3272
3442
|
sm: "min-h-20",
|
|
3273
3443
|
md: "min-h-24",
|
|
3274
3444
|
lg: "min-h-32"
|
|
3275
3445
|
};
|
|
3276
|
-
function
|
|
3446
|
+
function Br({ className: e, label: t = "Label", disabled: n = !1, state: r = "default", size: i = "md", required: a = !1, placeholder: o = "Digite algo...", errorMessage: s = "Campo obrigatório", fluid: c = !1, tooltip: l = null, supportLink: d = null, supportLinkUrl: f = null, supportingText: p = "", labelVariant: m, rows: h = 4, defaultValue: g, value: y, id: b, name: x, onBlur: S, onFocus: C, onKeyDown: w, onClick: T, onChange: D, ...te }) {
|
|
3277
3447
|
let ne = ee(), O = b ?? ne, [re, k] = E(() => g?.toString() ?? ""), A = y !== void 0, j = (A ? y : re)?.toString() ?? "", M = an(m), N = M === "floating", P = r === "invalid", F = on[i];
|
|
3278
3448
|
return /* @__PURE__ */ v("div", {
|
|
3279
3449
|
className: I(cn, e),
|
|
@@ -3315,7 +3485,7 @@ function Tr({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
|
|
|
3315
3485
|
})]
|
|
3316
3486
|
}),
|
|
3317
3487
|
/* @__PURE__ */ v("div", {
|
|
3318
|
-
className: I("group relative flex w-full flex-col rounded-eds-xs border border-eds-outline-border !bg-white", F.paddingX, "py-2.5",
|
|
3488
|
+
className: I("group relative flex w-full flex-col rounded-eds-xs border border-eds-outline-border !bg-white", F.paddingX, "py-2.5", zr[i], Rr[r], "focus-within:border-[color-mix(in_srgb,var(--color-eds-neutral-elements)_35%,var(--color-eds-outline-border))] focus-within:shadow-[0_0_0_3px_var(--color-eds-outline-focus-ring)]", "data-disabled:cursor-not-allowed data-disabled:border-eds-outline-border data-disabled:!bg-eds-neutral-background data-disabled:opacity-70"),
|
|
3319
3489
|
"data-disabled": n || void 0,
|
|
3320
3490
|
"data-state": r,
|
|
3321
3491
|
"data-size": i,
|
|
@@ -3361,12 +3531,12 @@ function Tr({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
|
|
|
3361
3531
|
}
|
|
3362
3532
|
//#endregion
|
|
3363
3533
|
//#region src/components/Select/Select.tsx
|
|
3364
|
-
var
|
|
3534
|
+
var Vr = {
|
|
3365
3535
|
default: "",
|
|
3366
3536
|
valid: "not-focus-visible:border-[color-mix(in_srgb,var(--color-eds-green-main)_55%,var(--color-eds-outline-border))]",
|
|
3367
3537
|
invalid: "not-focus-visible:border-[color-mix(in_srgb,var(--color-eds-red-main)_55%,var(--color-eds-outline-border))]"
|
|
3368
3538
|
};
|
|
3369
|
-
function
|
|
3539
|
+
function Hr({ label: e = "Label", labelVariant: t, items: n, placeholder: r = "Selecione uma opção", disabled: i = !1, required: s = !1, fluid: c = !1, state: l = "default", size: u = "md", supportingText: d = "", errorMessage: f = "Selecione uma opção válida", id: p, name: m, value: h = void 0, defaultValue: g = void 0, onValueChange: y = void 0, renderItem: b = void 0, className: x }) {
|
|
3370
3540
|
let S = ee(), C = p ?? S, w = l === "invalid", T = w || d, E = on[u], D = an(t), te = D === "floating";
|
|
3371
3541
|
return /* @__PURE__ */ v("div", {
|
|
3372
3542
|
className: I(cn, x),
|
|
@@ -3394,7 +3564,7 @@ function Dr({ label: e = "Label", labelVariant: t, items: n, placeholder: r = "S
|
|
|
3394
3564
|
defaultValue: g,
|
|
3395
3565
|
value: h,
|
|
3396
3566
|
children: [/* @__PURE__ */ v(P.Trigger, {
|
|
3397
|
-
className: I("group relative box-border inline-flex w-full cursor-pointer items-center gap-2 rounded-eds-xs border border-eds-outline-border bg-white py-0", E.trigger,
|
|
3567
|
+
className: I("group relative box-border inline-flex w-full cursor-pointer items-center gap-2 rounded-eds-xs border border-eds-outline-border bg-white py-0", E.trigger, Vr[l], "focus-visible:border-[color-mix(in_srgb,var(--color-eds-neutral-elements)_35%,var(--color-eds-outline-border))] focus-visible:shadow-[0_0_0_3px_var(--color-eds-outline-focus-ring)] focus-visible:outline-none", "data-disabled:cursor-not-allowed data-disabled:border-eds-outline-border data-disabled:bg-eds-neutral-background data-disabled:opacity-70"),
|
|
3398
3568
|
"data-state": l,
|
|
3399
3569
|
"data-size": u,
|
|
3400
3570
|
"data-disabled": i || void 0,
|
|
@@ -3459,7 +3629,7 @@ function Dr({ label: e = "Label", labelVariant: t, items: n, placeholder: r = "S
|
|
|
3459
3629
|
}
|
|
3460
3630
|
//#endregion
|
|
3461
3631
|
//#region src/components/Text/Text.tsx
|
|
3462
|
-
var
|
|
3632
|
+
var Ur = {
|
|
3463
3633
|
variant: {
|
|
3464
3634
|
heading1: {
|
|
3465
3635
|
classes: "text-3xl font-semibold",
|
|
@@ -3516,20 +3686,20 @@ var Or = {
|
|
|
3516
3686
|
description: "Large text"
|
|
3517
3687
|
}
|
|
3518
3688
|
}
|
|
3519
|
-
},
|
|
3689
|
+
}, Wr = {
|
|
3520
3690
|
variant: "body",
|
|
3521
3691
|
size: "md"
|
|
3522
|
-
},
|
|
3692
|
+
}, Gr = /* @__PURE__ */ new Set([
|
|
3523
3693
|
"heading1",
|
|
3524
3694
|
"heading2",
|
|
3525
3695
|
"heading3"
|
|
3526
|
-
]),
|
|
3527
|
-
function
|
|
3528
|
-
let l =
|
|
3696
|
+
]), Kr = /* @__PURE__ */ new Set(["mono", "mono-secondary"]);
|
|
3697
|
+
function qr({ variant: e = "body", bold: t = !1, size: n = "md", truncate: r = !1, children: i, className: a, as: o, ...s }, c) {
|
|
3698
|
+
let l = Kr.has(e), u = Gr.has(e), d = w(() => o || (l || u ? "span" : "p"), [
|
|
3529
3699
|
o,
|
|
3530
3700
|
l,
|
|
3531
3701
|
u
|
|
3532
|
-
]), f = L(
|
|
3702
|
+
]), f = L(Ur.variant, e, Wr.variant), p = L(Ur.size, n ?? "md", Wr.size);
|
|
3533
3703
|
return /* @__PURE__ */ _(d, {
|
|
3534
3704
|
ref: c,
|
|
3535
3705
|
"data-eds-component": "Text",
|
|
@@ -3538,7 +3708,7 @@ function Mr({ variant: e = "body", bold: t = !1, size: n = "md", truncate: r = !
|
|
|
3538
3708
|
children: i
|
|
3539
3709
|
});
|
|
3540
3710
|
}
|
|
3541
|
-
var
|
|
3711
|
+
var Jr = x(qr), Yr = {
|
|
3542
3712
|
layout: {
|
|
3543
3713
|
auto: {
|
|
3544
3714
|
classes: "",
|
|
@@ -3587,15 +3757,15 @@ var Nr = x(Mr), Pr = {
|
|
|
3587
3757
|
description: "Pin column to the right edge of the scroll container"
|
|
3588
3758
|
}
|
|
3589
3759
|
}
|
|
3590
|
-
},
|
|
3591
|
-
let n = L(
|
|
3760
|
+
}, Xr = (e, t) => {
|
|
3761
|
+
let n = L(Yr.sticky, e, "left").classes, r = t === "head" ? "z-2" : "z-1", i = e === "right" ? "before:-left-6" : "before:-right-6", a = "before:pointer-events-none before:absolute before:inset-y-0 before:w-6";
|
|
3592
3762
|
return t === "cell" ? I(n, r, "bg-white", a, i, e === "right" ? "before:bg-gradient-to-r before:from-transparent before:to-white" : "before:bg-gradient-to-l before:from-transparent before:to-white") : I(n, r, "bg-eds-neutral-background", a, i, e === "right" ? "before:bg-gradient-to-r before:from-transparent before:to-eds-neutral-background" : "before:bg-gradient-to-l before:from-transparent before:to-eds-neutral-background");
|
|
3593
|
-
},
|
|
3763
|
+
}, Zr = {
|
|
3594
3764
|
layout: "auto",
|
|
3595
3765
|
variant: "default",
|
|
3596
3766
|
dividers: "row"
|
|
3597
|
-
},
|
|
3598
|
-
let o = I("isolate w-full", L(
|
|
3767
|
+
}, Qr = x(({ layout: e = "auto", dividers: t = Zr.dividers, className: n, containerClassName: r, ...i }, a) => {
|
|
3768
|
+
let o = I("isolate w-full", L(Yr.layout, e, Zr.layout).classes, L(Yr.dividers, t, Zr.dividers).classes, "[&_td]:p-3", "[&_th]:border-b [&_th]:border-eds-neutral-disabled [&_th]:p-3 [&_th]:font-semibold [&_th]:text-sm", "[&_th]:bg-eds-neutral-background", "text-sm text-left text-eds-neutral-main", n);
|
|
3599
3769
|
return /* @__PURE__ */ _("div", {
|
|
3600
3770
|
className: I("w-full overflow-x-auto rounded-eds-xs border border-eds-outline-border bg-white", r),
|
|
3601
3771
|
children: /* @__PURE__ */ _("table", {
|
|
@@ -3605,7 +3775,7 @@ var Nr = x(Mr), Pr = {
|
|
|
3605
3775
|
className: o
|
|
3606
3776
|
})
|
|
3607
3777
|
});
|
|
3608
|
-
}),
|
|
3778
|
+
}), $r = x(({ variant: e = "default", sticky: t, ...n }, r) => {
|
|
3609
3779
|
let i = e === "compact", a = I("group/header", i && "[&_th]:py-2 text-xs text-eds-neutral-elements", t && "[&_th]:sticky [&_th]:top-0 [&_th]:z-1", n.className);
|
|
3610
3780
|
return /* @__PURE__ */ _("thead", {
|
|
3611
3781
|
ref: r,
|
|
@@ -3613,41 +3783,41 @@ var Nr = x(Mr), Pr = {
|
|
|
3613
3783
|
className: a,
|
|
3614
3784
|
...i && { "data-compact": "" }
|
|
3615
3785
|
});
|
|
3616
|
-
}),
|
|
3617
|
-
let r = I("group relative", e &&
|
|
3786
|
+
}), ei = x(({ sticky: e, ...t }, n) => {
|
|
3787
|
+
let r = I("group relative", e && Xr(e, "head"), t.className);
|
|
3618
3788
|
return /* @__PURE__ */ _("th", {
|
|
3619
3789
|
ref: n,
|
|
3620
3790
|
...t,
|
|
3621
3791
|
className: r
|
|
3622
3792
|
});
|
|
3623
|
-
}),
|
|
3624
|
-
let r = I(L(
|
|
3793
|
+
}), ti = x(({ variant: e = Zr.variant, ...t }, n) => {
|
|
3794
|
+
let r = I(L(Yr.variant, e, Zr.variant).classes, t.className);
|
|
3625
3795
|
return /* @__PURE__ */ _("tr", {
|
|
3626
3796
|
ref: n,
|
|
3627
3797
|
...t,
|
|
3628
3798
|
className: r
|
|
3629
3799
|
});
|
|
3630
|
-
}),
|
|
3800
|
+
}), ni = x((e, t) => /* @__PURE__ */ _("tbody", {
|
|
3631
3801
|
ref: t,
|
|
3632
3802
|
...e
|
|
3633
|
-
})),
|
|
3634
|
-
let r = I(e &&
|
|
3803
|
+
})), ri = x(({ sticky: e, ...t }, n) => {
|
|
3804
|
+
let r = I(e && Xr(e, "cell"), t.className);
|
|
3635
3805
|
return /* @__PURE__ */ _("td", {
|
|
3636
3806
|
ref: n,
|
|
3637
3807
|
...t,
|
|
3638
3808
|
className: r
|
|
3639
3809
|
});
|
|
3640
|
-
}),
|
|
3810
|
+
}), ii = x((e, t) => /* @__PURE__ */ _("tfoot", {
|
|
3641
3811
|
ref: t,
|
|
3642
3812
|
...e
|
|
3643
|
-
})),
|
|
3813
|
+
})), ai = x((e, t) => /* @__PURE__ */ _("button", {
|
|
3644
3814
|
ref: t,
|
|
3645
3815
|
...e,
|
|
3646
3816
|
type: "button",
|
|
3647
3817
|
"aria-label": "Redimensionar coluna",
|
|
3648
3818
|
className: I("opacity-0 h-full group-hover:opacity-100 focus-visible:opacity-100", "w-[10px]", "flex items-center justify-center", "cursor-col-resize touch-none select-none", "absolute top-0 right-0", "m-0 bg-white p-0", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-eds-blue-main", e.className),
|
|
3649
3819
|
children: /* @__PURE__ */ _("span", { className: "h-5 w-[2px] rounded bg-eds-neutral-disabled" })
|
|
3650
|
-
})),
|
|
3820
|
+
})), oi = x(({ checked: e, indeterminate: t, onCheckedChange: n, label: r, disabled: i, ...a }, o) => /* @__PURE__ */ _(ri, {
|
|
3651
3821
|
ref: o,
|
|
3652
3822
|
...a,
|
|
3653
3823
|
className: I("w-10 leading-none", a.className),
|
|
@@ -3659,7 +3829,7 @@ var Nr = x(Mr), Pr = {
|
|
|
3659
3829
|
disabled: i,
|
|
3660
3830
|
className: "relative before:absolute before:-inset-3 before:content-['']"
|
|
3661
3831
|
})
|
|
3662
|
-
})),
|
|
3832
|
+
})), si = x(({ checked: e, indeterminate: t, onCheckedChange: n, label: r, disabled: i, ...a }, o) => /* @__PURE__ */ _(ei, {
|
|
3663
3833
|
ref: o,
|
|
3664
3834
|
...a,
|
|
3665
3835
|
className: I("w-10 leading-none", a.className),
|
|
@@ -3672,38 +3842,38 @@ var Nr = x(Mr), Pr = {
|
|
|
3672
3842
|
className: "relative before:absolute before:-inset-3 before:content-['']"
|
|
3673
3843
|
})
|
|
3674
3844
|
}));
|
|
3675
|
-
|
|
3676
|
-
var Y = Object.assign(
|
|
3677
|
-
Header:
|
|
3678
|
-
Head:
|
|
3679
|
-
Row:
|
|
3680
|
-
Body:
|
|
3681
|
-
Cell:
|
|
3682
|
-
CheckCell:
|
|
3683
|
-
CheckHead:
|
|
3684
|
-
Footer:
|
|
3685
|
-
ResizeHandle:
|
|
3845
|
+
Qr.displayName = "Table", ni.displayName = "Table.Body", ei.displayName = "Table.Head", ti.displayName = "Table.Row", ri.displayName = "Table.Cell", ii.displayName = "Table.Footer", $r.displayName = "Table.Header", ai.displayName = "Table.ResizeHandle", oi.displayName = "Table.CheckCell", si.displayName = "Table.CheckHead";
|
|
3846
|
+
var Y = Object.assign(Qr, {
|
|
3847
|
+
Header: $r,
|
|
3848
|
+
Head: ei,
|
|
3849
|
+
Row: ti,
|
|
3850
|
+
Body: ni,
|
|
3851
|
+
Cell: ri,
|
|
3852
|
+
CheckCell: oi,
|
|
3853
|
+
CheckHead: si,
|
|
3854
|
+
Footer: ii,
|
|
3855
|
+
ResizeHandle: ai
|
|
3686
3856
|
});
|
|
3687
3857
|
//#endregion
|
|
3688
3858
|
//#region ../../node_modules/.pnpm/@tanstack+table-core@8.21.3/node_modules/@tanstack/table-core/build/lib/index.mjs
|
|
3689
|
-
function
|
|
3859
|
+
function ci(e, t) {
|
|
3690
3860
|
return typeof e == "function" ? e(t) : e;
|
|
3691
3861
|
}
|
|
3692
3862
|
function X(e, t) {
|
|
3693
3863
|
return (n) => {
|
|
3694
3864
|
t.setState((t) => ({
|
|
3695
3865
|
...t,
|
|
3696
|
-
[e]:
|
|
3866
|
+
[e]: ci(n, t[e])
|
|
3697
3867
|
}));
|
|
3698
3868
|
};
|
|
3699
3869
|
}
|
|
3700
|
-
function
|
|
3870
|
+
function li(e) {
|
|
3701
3871
|
return e instanceof Function;
|
|
3702
3872
|
}
|
|
3703
|
-
function
|
|
3873
|
+
function ui(e) {
|
|
3704
3874
|
return Array.isArray(e) && e.every((e) => typeof e == "number");
|
|
3705
3875
|
}
|
|
3706
|
-
function
|
|
3876
|
+
function di(e, t) {
|
|
3707
3877
|
let n = [], r = (e) => {
|
|
3708
3878
|
e.forEach((e) => {
|
|
3709
3879
|
n.push(e);
|
|
@@ -3742,7 +3912,7 @@ function Q(e, t, n, r) {
|
|
|
3742
3912
|
onChange: r
|
|
3743
3913
|
};
|
|
3744
3914
|
}
|
|
3745
|
-
function
|
|
3915
|
+
function fi(e, t, n, r) {
|
|
3746
3916
|
let i = {
|
|
3747
3917
|
id: `${t.id}_${n.id}`,
|
|
3748
3918
|
row: t,
|
|
@@ -3767,7 +3937,7 @@ function Zr(e, t, n, r) {
|
|
|
3767
3937
|
r.createCell == null || r.createCell(i, n, t, e);
|
|
3768
3938
|
}, {}), i;
|
|
3769
3939
|
}
|
|
3770
|
-
function
|
|
3940
|
+
function pi(e, t, n, r) {
|
|
3771
3941
|
let i = {
|
|
3772
3942
|
...e._getDefaultColumnDef(),
|
|
3773
3943
|
...t
|
|
@@ -3794,7 +3964,7 @@ function Qr(e, t, n, r) {
|
|
|
3794
3964
|
return c;
|
|
3795
3965
|
}
|
|
3796
3966
|
var $ = "debugHeaders";
|
|
3797
|
-
function
|
|
3967
|
+
function mi(e, t, n) {
|
|
3798
3968
|
let r = {
|
|
3799
3969
|
id: n.id ?? t.id,
|
|
3800
3970
|
column: t,
|
|
@@ -3822,7 +3992,7 @@ function $r(e, t, n) {
|
|
|
3822
3992
|
t.createHeader == null || t.createHeader(r, e);
|
|
3823
3993
|
}), r;
|
|
3824
3994
|
}
|
|
3825
|
-
var
|
|
3995
|
+
var hi = { createTable: (e) => {
|
|
3826
3996
|
e.getHeaderGroups = Z(() => [
|
|
3827
3997
|
e.getAllColumns(),
|
|
3828
3998
|
e.getVisibleLeafColumns(),
|
|
@@ -3830,7 +4000,7 @@ var ei = { createTable: (e) => {
|
|
|
3830
4000
|
e.getState().columnPinning.right
|
|
3831
4001
|
], (t, n, r, i) => {
|
|
3832
4002
|
let a = r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], o = i?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], s = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id)));
|
|
3833
|
-
return
|
|
4003
|
+
return gi(t, [
|
|
3834
4004
|
...a,
|
|
3835
4005
|
...s,
|
|
3836
4006
|
...o
|
|
@@ -3840,15 +4010,15 @@ var ei = { createTable: (e) => {
|
|
|
3840
4010
|
e.getVisibleLeafColumns(),
|
|
3841
4011
|
e.getState().columnPinning.left,
|
|
3842
4012
|
e.getState().columnPinning.right
|
|
3843
|
-
], (t, n, r, i) => (n = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id))),
|
|
4013
|
+
], (t, n, r, i) => (n = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id))), gi(t, n, e, "center")), Q(e.options, $, "getCenterHeaderGroups")), e.getLeftHeaderGroups = Z(() => [
|
|
3844
4014
|
e.getAllColumns(),
|
|
3845
4015
|
e.getVisibleLeafColumns(),
|
|
3846
4016
|
e.getState().columnPinning.left
|
|
3847
|
-
], (t, n, r) =>
|
|
4017
|
+
], (t, n, r) => gi(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "left"), Q(e.options, $, "getLeftHeaderGroups")), e.getRightHeaderGroups = Z(() => [
|
|
3848
4018
|
e.getAllColumns(),
|
|
3849
4019
|
e.getVisibleLeafColumns(),
|
|
3850
4020
|
e.getState().columnPinning.right
|
|
3851
|
-
], (t, n, r) =>
|
|
4021
|
+
], (t, n, r) => gi(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "right"), Q(e.options, $, "getRightHeaderGroups")), e.getFooterGroups = Z(() => [e.getHeaderGroups()], (e) => [...e].reverse(), Q(e.options, $, "getFooterGroups")), e.getLeftFooterGroups = Z(() => [e.getLeftHeaderGroups()], (e) => [...e].reverse(), Q(e.options, $, "getLeftFooterGroups")), e.getCenterFooterGroups = Z(() => [e.getCenterHeaderGroups()], (e) => [...e].reverse(), Q(e.options, $, "getCenterFooterGroups")), e.getRightFooterGroups = Z(() => [e.getRightHeaderGroups()], (e) => [...e].reverse(), Q(e.options, $, "getRightFooterGroups")), e.getFlatHeaders = Z(() => [e.getHeaderGroups()], (e) => e.map((e) => e.headers).flat(), Q(e.options, $, "getFlatHeaders")), e.getLeftFlatHeaders = Z(() => [e.getLeftHeaderGroups()], (e) => e.map((e) => e.headers).flat(), Q(e.options, $, "getLeftFlatHeaders")), e.getCenterFlatHeaders = Z(() => [e.getCenterHeaderGroups()], (e) => e.map((e) => e.headers).flat(), Q(e.options, $, "getCenterFlatHeaders")), e.getRightFlatHeaders = Z(() => [e.getRightHeaderGroups()], (e) => e.map((e) => e.headers).flat(), Q(e.options, $, "getRightFlatHeaders")), e.getCenterLeafHeaders = Z(() => [e.getCenterFlatHeaders()], (e) => e.filter((e) => {
|
|
3852
4022
|
var t;
|
|
3853
4023
|
return !((t = e.subHeaders) != null && t.length);
|
|
3854
4024
|
}), Q(e.options, $, "getCenterLeafHeaders")), e.getLeftLeafHeaders = Z(() => [e.getLeftFlatHeaders()], (e) => e.filter((e) => {
|
|
@@ -3867,7 +4037,7 @@ var ei = { createTable: (e) => {
|
|
|
3867
4037
|
...n[0]?.headers ?? []
|
|
3868
4038
|
].map((e) => e.getLeafHeaders()).flat(), Q(e.options, $, "getLeafHeaders"));
|
|
3869
4039
|
} };
|
|
3870
|
-
function
|
|
4040
|
+
function gi(e, t, n, r) {
|
|
3871
4041
|
let i = 0, a = function(e, t) {
|
|
3872
4042
|
t === void 0 && (t = 1), i = Math.max(i, t), e.filter((e) => e.getIsVisible()).forEach((e) => {
|
|
3873
4043
|
var n;
|
|
@@ -3885,7 +4055,7 @@ function ti(e, t, n, r) {
|
|
|
3885
4055
|
let o = [...a].reverse()[0], s = e.column.depth === i.depth, c, l = !1;
|
|
3886
4056
|
if (s && e.column.parent ? c = e.column.parent : (c = e.column, l = !0), o && o?.column === c) o.subHeaders.push(e);
|
|
3887
4057
|
else {
|
|
3888
|
-
let i =
|
|
4058
|
+
let i = mi(n, c, {
|
|
3889
4059
|
id: [
|
|
3890
4060
|
r,
|
|
3891
4061
|
t,
|
|
@@ -3902,7 +4072,7 @@ function ti(e, t, n, r) {
|
|
|
3902
4072
|
i.headers.push(e), e.headerGroup = i;
|
|
3903
4073
|
}), o.push(i), t > 0 && s(a, t - 1);
|
|
3904
4074
|
};
|
|
3905
|
-
s(t.map((e, t) =>
|
|
4075
|
+
s(t.map((e, t) => mi(n, e, {
|
|
3906
4076
|
depth: i,
|
|
3907
4077
|
index: t
|
|
3908
4078
|
})), i - 1), o.reverse();
|
|
@@ -3920,7 +4090,7 @@ function ti(e, t, n, r) {
|
|
|
3920
4090
|
});
|
|
3921
4091
|
return c(o[0]?.headers ?? []), o;
|
|
3922
4092
|
}
|
|
3923
|
-
var
|
|
4093
|
+
var _i = (e, t, n, r, i, a, o) => {
|
|
3924
4094
|
let s = {
|
|
3925
4095
|
id: t,
|
|
3926
4096
|
index: r,
|
|
@@ -3941,7 +4111,7 @@ var ni = (e, t, n, r, i, a, o) => {
|
|
|
3941
4111
|
},
|
|
3942
4112
|
renderValue: (t) => s.getValue(t) ?? e.options.renderFallbackValue,
|
|
3943
4113
|
subRows: a ?? [],
|
|
3944
|
-
getLeafRows: () =>
|
|
4114
|
+
getLeafRows: () => di(s.subRows, (e) => e.subRows),
|
|
3945
4115
|
getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
|
|
3946
4116
|
getParentRows: () => {
|
|
3947
4117
|
let e = [], t = s;
|
|
@@ -3952,7 +4122,7 @@ var ni = (e, t, n, r, i, a, o) => {
|
|
|
3952
4122
|
}
|
|
3953
4123
|
return e.reverse();
|
|
3954
4124
|
},
|
|
3955
|
-
getAllCells: Z(() => [e.getAllLeafColumns()], (t) => t.map((t) =>
|
|
4125
|
+
getAllCells: Z(() => [e.getAllLeafColumns()], (t) => t.map((t) => fi(e, s, t, t.id)), Q(e.options, "debugRows", "getAllCells")),
|
|
3956
4126
|
_getAllCellsByColumnId: Z(() => [s.getAllCells()], (e) => e.reduce((e, t) => (e[t.column.id] = t, e), {}), Q(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
3957
4127
|
};
|
|
3958
4128
|
for (let t = 0; t < e._features.length; t++) {
|
|
@@ -3960,66 +4130,66 @@ var ni = (e, t, n, r, i, a, o) => {
|
|
|
3960
4130
|
n == null || n.createRow == null || n.createRow(s, e);
|
|
3961
4131
|
}
|
|
3962
4132
|
return s;
|
|
3963
|
-
},
|
|
4133
|
+
}, vi = { createColumn: (e, t) => {
|
|
3964
4134
|
e._getFacetedRowModel = t.options.getFacetedRowModel && t.options.getFacetedRowModel(t, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : t.getPreFilteredRowModel(), e._getFacetedUniqueValues = t.options.getFacetedUniqueValues && t.options.getFacetedUniqueValues(t, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = t.options.getFacetedMinMaxValues && t.options.getFacetedMinMaxValues(t, e.id), e.getFacetedMinMaxValues = () => {
|
|
3965
4135
|
if (e._getFacetedMinMaxValues) return e._getFacetedMinMaxValues();
|
|
3966
4136
|
};
|
|
3967
|
-
} },
|
|
4137
|
+
} }, yi = (e, t, n) => {
|
|
3968
4138
|
var r, i;
|
|
3969
4139
|
let a = n == null || (r = n.toString()) == null ? void 0 : r.toLowerCase();
|
|
3970
4140
|
return !!(!((i = e.getValue(t)) == null || (i = i.toString()) == null || (i = i.toLowerCase()) == null) && i.includes(a));
|
|
3971
4141
|
};
|
|
3972
|
-
|
|
3973
|
-
var
|
|
4142
|
+
yi.autoRemove = (e) => ki(e);
|
|
4143
|
+
var bi = (e, t, n) => {
|
|
3974
4144
|
var r;
|
|
3975
4145
|
return !!(!((r = e.getValue(t)) == null || (r = r.toString()) == null) && r.includes(n));
|
|
3976
4146
|
};
|
|
3977
|
-
|
|
3978
|
-
var
|
|
4147
|
+
bi.autoRemove = (e) => ki(e);
|
|
4148
|
+
var xi = (e, t, n) => {
|
|
3979
4149
|
var r;
|
|
3980
4150
|
return ((r = e.getValue(t)) == null || (r = r.toString()) == null ? void 0 : r.toLowerCase()) === n?.toLowerCase();
|
|
3981
4151
|
};
|
|
3982
|
-
|
|
3983
|
-
var
|
|
3984
|
-
|
|
3985
|
-
var
|
|
4152
|
+
xi.autoRemove = (e) => ki(e);
|
|
4153
|
+
var Si = (e, t, n) => e.getValue(t)?.includes(n);
|
|
4154
|
+
Si.autoRemove = (e) => ki(e);
|
|
4155
|
+
var Ci = (e, t, n) => !n.some((n) => {
|
|
3986
4156
|
var r;
|
|
3987
4157
|
return !((r = e.getValue(t)) != null && r.includes(n));
|
|
3988
4158
|
});
|
|
3989
|
-
|
|
3990
|
-
var
|
|
3991
|
-
|
|
3992
|
-
var
|
|
3993
|
-
|
|
3994
|
-
var
|
|
3995
|
-
|
|
3996
|
-
var
|
|
4159
|
+
Ci.autoRemove = (e) => ki(e) || !(e != null && e.length);
|
|
4160
|
+
var wi = (e, t, n) => n.some((n) => e.getValue(t)?.includes(n));
|
|
4161
|
+
wi.autoRemove = (e) => ki(e) || !(e != null && e.length);
|
|
4162
|
+
var Ti = (e, t, n) => e.getValue(t) === n;
|
|
4163
|
+
Ti.autoRemove = (e) => ki(e);
|
|
4164
|
+
var Ei = (e, t, n) => e.getValue(t) == n;
|
|
4165
|
+
Ei.autoRemove = (e) => ki(e);
|
|
4166
|
+
var Di = (e, t, n) => {
|
|
3997
4167
|
let [r, i] = n, a = e.getValue(t);
|
|
3998
4168
|
return a >= r && a <= i;
|
|
3999
4169
|
};
|
|
4000
|
-
|
|
4170
|
+
Di.resolveFilterValue = (e) => {
|
|
4001
4171
|
let [t, n] = e, r = typeof t == "number" ? t : parseFloat(t), i = typeof n == "number" ? n : parseFloat(n), a = t === null || Number.isNaN(r) ? -Infinity : r, o = n === null || Number.isNaN(i) ? Infinity : i;
|
|
4002
4172
|
if (a > o) {
|
|
4003
4173
|
let e = a;
|
|
4004
4174
|
a = o, o = e;
|
|
4005
4175
|
}
|
|
4006
4176
|
return [a, o];
|
|
4007
|
-
},
|
|
4008
|
-
var
|
|
4009
|
-
includesString:
|
|
4010
|
-
includesStringSensitive:
|
|
4011
|
-
equalsString:
|
|
4012
|
-
arrIncludes:
|
|
4013
|
-
arrIncludesAll:
|
|
4014
|
-
arrIncludesSome:
|
|
4015
|
-
equals:
|
|
4016
|
-
weakEquals:
|
|
4017
|
-
inNumberRange:
|
|
4177
|
+
}, Di.autoRemove = (e) => ki(e) || ki(e[0]) && ki(e[1]);
|
|
4178
|
+
var Oi = {
|
|
4179
|
+
includesString: yi,
|
|
4180
|
+
includesStringSensitive: bi,
|
|
4181
|
+
equalsString: xi,
|
|
4182
|
+
arrIncludes: Si,
|
|
4183
|
+
arrIncludesAll: Ci,
|
|
4184
|
+
arrIncludesSome: wi,
|
|
4185
|
+
equals: Ti,
|
|
4186
|
+
weakEquals: Ei,
|
|
4187
|
+
inNumberRange: Di
|
|
4018
4188
|
};
|
|
4019
|
-
function
|
|
4189
|
+
function ki(e) {
|
|
4020
4190
|
return e == null || e === "";
|
|
4021
4191
|
}
|
|
4022
|
-
var
|
|
4192
|
+
var Ai = {
|
|
4023
4193
|
getDefaultColumnDef: () => ({ filterFn: "auto" }),
|
|
4024
4194
|
getInitialState: (e) => ({
|
|
4025
4195
|
columnFilters: [],
|
|
@@ -4033,14 +4203,14 @@ var hi = {
|
|
|
4033
4203
|
createColumn: (e, t) => {
|
|
4034
4204
|
e.getAutoFilterFn = () => {
|
|
4035
4205
|
let n = t.getCoreRowModel().flatRows[0]?.getValue(e.id);
|
|
4036
|
-
return typeof n == "string" ?
|
|
4037
|
-
}, e.getFilterFn = () =>
|
|
4206
|
+
return typeof n == "string" ? Oi.includesString : typeof n == "number" ? Oi.inNumberRange : typeof n == "boolean" || typeof n == "object" && n ? Oi.equals : Array.isArray(n) ? Oi.arrIncludes : Oi.weakEquals;
|
|
4207
|
+
}, e.getFilterFn = () => li(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : t.options.filterFns?.[e.columnDef.filterFn] ?? Oi[e.columnDef.filterFn], e.getCanFilter = () => (e.columnDef.enableColumnFilter ?? !0) && (t.options.enableColumnFilters ?? !0) && (t.options.enableFilters ?? !0) && !!e.accessorFn, e.getIsFiltered = () => e.getFilterIndex() > -1, e.getFilterValue = () => {
|
|
4038
4208
|
var n;
|
|
4039
4209
|
return (n = t.getState().columnFilters) == null || (n = n.find((t) => t.id === e.id)) == null ? void 0 : n.value;
|
|
4040
4210
|
}, e.getFilterIndex = () => t.getState().columnFilters?.findIndex((t) => t.id === e.id) ?? -1, e.setFilterValue = (n) => {
|
|
4041
4211
|
t.setColumnFilters((t) => {
|
|
4042
|
-
let r = e.getFilterFn(), i = t?.find((t) => t.id === e.id), a =
|
|
4043
|
-
if (
|
|
4212
|
+
let r = e.getFilterFn(), i = t?.find((t) => t.id === e.id), a = ci(n, i ? i.value : void 0);
|
|
4213
|
+
if (ji(r, a, e)) return t?.filter((t) => t.id !== e.id) ?? [];
|
|
4044
4214
|
let o = {
|
|
4045
4215
|
id: e.id,
|
|
4046
4216
|
value: a
|
|
@@ -4055,19 +4225,19 @@ var hi = {
|
|
|
4055
4225
|
createTable: (e) => {
|
|
4056
4226
|
e.setColumnFilters = (t) => {
|
|
4057
4227
|
let n = e.getAllLeafColumns();
|
|
4058
|
-
e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange((e) =>
|
|
4228
|
+
e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange((e) => ci(t, e)?.filter((e) => {
|
|
4059
4229
|
let t = n.find((t) => t.id === e.id);
|
|
4060
|
-
return !(t &&
|
|
4230
|
+
return !(t && ji(t.getFilterFn(), e.value, t));
|
|
4061
4231
|
}));
|
|
4062
4232
|
}, e.resetColumnFilters = (t) => {
|
|
4063
4233
|
e.setColumnFilters(t ? [] : e.initialState?.columnFilters ?? []);
|
|
4064
4234
|
}, e.getPreFilteredRowModel = () => e.getCoreRowModel(), e.getFilteredRowModel = () => (!e._getFilteredRowModel && e.options.getFilteredRowModel && (e._getFilteredRowModel = e.options.getFilteredRowModel(e)), e.options.manualFiltering || !e._getFilteredRowModel ? e.getPreFilteredRowModel() : e._getFilteredRowModel());
|
|
4065
4235
|
}
|
|
4066
4236
|
};
|
|
4067
|
-
function
|
|
4237
|
+
function ji(e, t, n) {
|
|
4068
4238
|
return (e && e.autoRemove ? e.autoRemove(t, n) : !1) || t === void 0 || typeof t == "string" && !t;
|
|
4069
4239
|
}
|
|
4070
|
-
var
|
|
4240
|
+
var Mi = {
|
|
4071
4241
|
sum: (e, t, n) => n.reduce((t, n) => {
|
|
4072
4242
|
let r = n.getValue(e);
|
|
4073
4243
|
return t + (typeof r == "number" ? r : 0);
|
|
@@ -4103,7 +4273,7 @@ var _i = {
|
|
|
4103
4273
|
median: (e, t) => {
|
|
4104
4274
|
if (!t.length) return;
|
|
4105
4275
|
let n = t.map((t) => t.getValue(e));
|
|
4106
|
-
if (!
|
|
4276
|
+
if (!ui(n)) return;
|
|
4107
4277
|
if (n.length === 1) return n[0];
|
|
4108
4278
|
let r = Math.floor(n.length / 2), i = n.sort((e, t) => e - t);
|
|
4109
4279
|
return n.length % 2 == 0 ? (i[r - 1] + i[r]) / 2 : i[r];
|
|
@@ -4111,7 +4281,7 @@ var _i = {
|
|
|
4111
4281
|
unique: (e, t) => Array.from(new Set(t.map((t) => t.getValue(e))).values()),
|
|
4112
4282
|
uniqueCount: (e, t) => new Set(t.map((t) => t.getValue(e))).size,
|
|
4113
4283
|
count: (e, t) => t.length
|
|
4114
|
-
},
|
|
4284
|
+
}, Ni = {
|
|
4115
4285
|
getDefaultColumnDef: () => ({
|
|
4116
4286
|
aggregatedCell: (e) => {
|
|
4117
4287
|
var t;
|
|
@@ -4137,11 +4307,11 @@ var _i = {
|
|
|
4137
4307
|
};
|
|
4138
4308
|
}, e.getAutoAggregationFn = () => {
|
|
4139
4309
|
let n = t.getCoreRowModel().flatRows[0]?.getValue(e.id);
|
|
4140
|
-
if (typeof n == "number") return
|
|
4141
|
-
if (Object.prototype.toString.call(n) === "[object Date]") return
|
|
4310
|
+
if (typeof n == "number") return Mi.sum;
|
|
4311
|
+
if (Object.prototype.toString.call(n) === "[object Date]") return Mi.extent;
|
|
4142
4312
|
}, e.getAggregationFn = () => {
|
|
4143
4313
|
if (!e) throw Error();
|
|
4144
|
-
return
|
|
4314
|
+
return li(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : t.options.aggregationFns?.[e.columnDef.aggregationFn] ?? Mi[e.columnDef.aggregationFn];
|
|
4145
4315
|
};
|
|
4146
4316
|
},
|
|
4147
4317
|
createTable: (e) => {
|
|
@@ -4163,20 +4333,20 @@ var _i = {
|
|
|
4163
4333
|
};
|
|
4164
4334
|
}
|
|
4165
4335
|
};
|
|
4166
|
-
function
|
|
4336
|
+
function Pi(e, t, n) {
|
|
4167
4337
|
if (!(t != null && t.length) || !n) return e;
|
|
4168
4338
|
let r = e.filter((e) => !t.includes(e.id));
|
|
4169
4339
|
return n === "remove" ? r : [...t.map((t) => e.find((e) => e.id === t)).filter(Boolean), ...r];
|
|
4170
4340
|
}
|
|
4171
|
-
var
|
|
4341
|
+
var Fi = {
|
|
4172
4342
|
getInitialState: (e) => ({
|
|
4173
4343
|
columnOrder: [],
|
|
4174
4344
|
...e
|
|
4175
4345
|
}),
|
|
4176
4346
|
getDefaultOptions: (e) => ({ onColumnOrderChange: X("columnOrder", e) }),
|
|
4177
4347
|
createColumn: (e, t) => {
|
|
4178
|
-
e.getIndex = Z((e) => [
|
|
4179
|
-
let r =
|
|
4348
|
+
e.getIndex = Z((e) => [Ki(t, e)], (t) => t.findIndex((t) => t.id === e.id), Q(t.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (n) => Ki(t, n)[0]?.id === e.id, e.getIsLastColumn = (n) => {
|
|
4349
|
+
let r = Ki(t, n);
|
|
4180
4350
|
return r[r.length - 1]?.id === e.id;
|
|
4181
4351
|
};
|
|
4182
4352
|
},
|
|
@@ -4198,15 +4368,15 @@ var bi = {
|
|
|
4198
4368
|
}
|
|
4199
4369
|
i = [...i, ...n];
|
|
4200
4370
|
}
|
|
4201
|
-
return
|
|
4371
|
+
return Pi(i, t, n);
|
|
4202
4372
|
}, Q(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
4203
4373
|
}
|
|
4204
|
-
},
|
|
4374
|
+
}, Ii = () => ({
|
|
4205
4375
|
left: [],
|
|
4206
4376
|
right: []
|
|
4207
|
-
}),
|
|
4377
|
+
}), Li = {
|
|
4208
4378
|
getInitialState: (e) => ({
|
|
4209
|
-
columnPinning:
|
|
4379
|
+
columnPinning: Ii(),
|
|
4210
4380
|
...e
|
|
4211
4381
|
}),
|
|
4212
4382
|
getDefaultOptions: (e) => ({ onColumnPinningChange: X("columnPinning", e) }),
|
|
@@ -4249,7 +4419,7 @@ var bi = {
|
|
|
4249
4419
|
})), Q(t.options, "debugRows", "getRightVisibleCells"));
|
|
4250
4420
|
},
|
|
4251
4421
|
createTable: (e) => {
|
|
4252
|
-
e.setColumnPinning = (t) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(t), e.resetColumnPinning = (t) => e.setColumnPinning(t ?
|
|
4422
|
+
e.setColumnPinning = (t) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(t), e.resetColumnPinning = (t) => e.setColumnPinning(t ? Ii() : e.initialState?.columnPinning ?? Ii()), e.getIsSomeColumnsPinned = (t) => {
|
|
4253
4423
|
let n = e.getState().columnPinning;
|
|
4254
4424
|
return t ? !!n[t]?.length : !!(n.left?.length || n.right?.length);
|
|
4255
4425
|
}, e.getLeftLeafColumns = Z(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (e, t) => (t ?? []).map((t) => e.find((e) => e.id === t)).filter(Boolean), Q(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = Z(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (e, t) => (t ?? []).map((t) => e.find((e) => e.id === t)).filter(Boolean), Q(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = Z(() => [
|
|
@@ -4262,25 +4432,25 @@ var bi = {
|
|
|
4262
4432
|
}, Q(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
4263
4433
|
}
|
|
4264
4434
|
};
|
|
4265
|
-
function
|
|
4435
|
+
function Ri(e) {
|
|
4266
4436
|
return e || (typeof document < "u" ? document : null);
|
|
4267
4437
|
}
|
|
4268
|
-
var
|
|
4438
|
+
var zi = {
|
|
4269
4439
|
size: 150,
|
|
4270
4440
|
minSize: 20,
|
|
4271
4441
|
maxSize: 2 ** 53 - 1
|
|
4272
|
-
},
|
|
4442
|
+
}, Bi = () => ({
|
|
4273
4443
|
startOffset: null,
|
|
4274
4444
|
startSize: null,
|
|
4275
4445
|
deltaOffset: null,
|
|
4276
4446
|
deltaPercentage: null,
|
|
4277
4447
|
isResizingColumn: !1,
|
|
4278
4448
|
columnSizingStart: []
|
|
4279
|
-
}),
|
|
4280
|
-
getDefaultColumnDef: () =>
|
|
4449
|
+
}), Vi = {
|
|
4450
|
+
getDefaultColumnDef: () => zi,
|
|
4281
4451
|
getInitialState: (e) => ({
|
|
4282
4452
|
columnSizing: {},
|
|
4283
|
-
columnSizingInfo:
|
|
4453
|
+
columnSizingInfo: Bi(),
|
|
4284
4454
|
...e
|
|
4285
4455
|
}),
|
|
4286
4456
|
getDefaultOptions: (e) => ({
|
|
@@ -4292,14 +4462,14 @@ var wi = {
|
|
|
4292
4462
|
createColumn: (e, t) => {
|
|
4293
4463
|
e.getSize = () => {
|
|
4294
4464
|
let n = t.getState().columnSizing[e.id];
|
|
4295
|
-
return Math.min(Math.max(e.columnDef.minSize ??
|
|
4465
|
+
return Math.min(Math.max(e.columnDef.minSize ?? zi.minSize, n ?? e.columnDef.size ?? zi.size), e.columnDef.maxSize ?? zi.maxSize);
|
|
4296
4466
|
}, e.getStart = Z((e) => [
|
|
4297
4467
|
e,
|
|
4298
|
-
|
|
4468
|
+
Ki(t, e),
|
|
4299
4469
|
t.getState().columnSizing
|
|
4300
4470
|
], (t, n) => n.slice(0, e.getIndex(t)).reduce((e, t) => e + t.getSize(), 0), Q(t.options, "debugColumns", "getStart")), e.getAfter = Z((e) => [
|
|
4301
4471
|
e,
|
|
4302
|
-
|
|
4472
|
+
Ki(t, e),
|
|
4303
4473
|
t.getState().columnSizing
|
|
4304
4474
|
], (t, n) => n.slice(e.getIndex(t) + 1).reduce((e, t) => e + t.getSize(), 0), Q(t.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
|
4305
4475
|
t.setColumnSizing((t) => {
|
|
@@ -4323,8 +4493,8 @@ var wi = {
|
|
|
4323
4493
|
}, e.getResizeHandler = (n) => {
|
|
4324
4494
|
let r = t.getColumn(e.column.id), i = r?.getCanResize();
|
|
4325
4495
|
return (a) => {
|
|
4326
|
-
if (!r || !i || (a.persist == null || a.persist(),
|
|
4327
|
-
let o = e.getSize(), s = e ? e.getLeafHeaders().map((e) => [e.column.id, e.column.getSize()]) : [[r.id, r.getSize()]], c =
|
|
4496
|
+
if (!r || !i || (a.persist == null || a.persist(), Wi(a) && a.touches && a.touches.length > 1)) return;
|
|
4497
|
+
let o = e.getSize(), s = e ? e.getLeafHeaders().map((e) => [e.column.id, e.column.getSize()]) : [[r.id, r.getSize()]], c = Wi(a) ? Math.round(a.touches[0].clientX) : a.clientX, l = {}, u = (e, n) => {
|
|
4328
4498
|
typeof n == "number" && (t.setColumnSizingInfo((e) => {
|
|
4329
4499
|
let r = t.options.columnResizeDirection === "rtl" ? -1 : 1, i = (n - (e?.startOffset ?? 0)) * r, a = Math.max(i / (e?.startSize ?? 0), -.999999);
|
|
4330
4500
|
return e.columnSizingStart.forEach((e) => {
|
|
@@ -4349,7 +4519,7 @@ var wi = {
|
|
|
4349
4519
|
deltaPercentage: null,
|
|
4350
4520
|
columnSizingStart: []
|
|
4351
4521
|
}));
|
|
4352
|
-
}, p =
|
|
4522
|
+
}, p = Ri(n), m = {
|
|
4353
4523
|
moveHandler: (e) => d(e.clientX),
|
|
4354
4524
|
upHandler: (e) => {
|
|
4355
4525
|
p?.removeEventListener("mousemove", m.moveHandler), p?.removeEventListener("mouseup", m.upHandler), f(e.clientX);
|
|
@@ -4359,8 +4529,8 @@ var wi = {
|
|
|
4359
4529
|
upHandler: (e) => {
|
|
4360
4530
|
p?.removeEventListener("touchmove", h.moveHandler), p?.removeEventListener("touchend", h.upHandler), e.cancelable && (e.preventDefault(), e.stopPropagation()), f(e.touches[0]?.clientX);
|
|
4361
4531
|
}
|
|
4362
|
-
}, g =
|
|
4363
|
-
|
|
4532
|
+
}, g = Ui() ? { passive: !1 } : !1;
|
|
4533
|
+
Wi(a) ? (p?.addEventListener("touchmove", h.moveHandler, g), p?.addEventListener("touchend", h.upHandler, g)) : (p?.addEventListener("mousemove", m.moveHandler, g), p?.addEventListener("mouseup", m.upHandler, g)), t.setColumnSizingInfo((e) => ({
|
|
4364
4534
|
...e,
|
|
4365
4535
|
startOffset: c,
|
|
4366
4536
|
startSize: o,
|
|
@@ -4376,12 +4546,12 @@ var wi = {
|
|
|
4376
4546
|
e.setColumnSizing = (t) => e.options.onColumnSizingChange == null ? void 0 : e.options.onColumnSizingChange(t), e.setColumnSizingInfo = (t) => e.options.onColumnSizingInfoChange == null ? void 0 : e.options.onColumnSizingInfoChange(t), e.resetColumnSizing = (t) => {
|
|
4377
4547
|
e.setColumnSizing(t ? {} : e.initialState.columnSizing ?? {});
|
|
4378
4548
|
}, e.resetHeaderSizeInfo = (t) => {
|
|
4379
|
-
e.setColumnSizingInfo(t ?
|
|
4549
|
+
e.setColumnSizingInfo(t ? Bi() : e.initialState.columnSizingInfo ?? Bi());
|
|
4380
4550
|
}, e.getTotalSize = () => e.getHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getLeftTotalSize = () => e.getLeftHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getCenterTotalSize = () => e.getCenterHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getRightTotalSize = () => e.getRightHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0;
|
|
4381
4551
|
}
|
|
4382
|
-
},
|
|
4383
|
-
function
|
|
4384
|
-
if (typeof
|
|
4552
|
+
}, Hi = null;
|
|
4553
|
+
function Ui() {
|
|
4554
|
+
if (typeof Hi == "boolean") return Hi;
|
|
4385
4555
|
let e = !1;
|
|
4386
4556
|
try {
|
|
4387
4557
|
let t = { get passive() {
|
|
@@ -4391,12 +4561,12 @@ function Oi() {
|
|
|
4391
4561
|
} catch {
|
|
4392
4562
|
e = !1;
|
|
4393
4563
|
}
|
|
4394
|
-
return
|
|
4564
|
+
return Hi = e, Hi;
|
|
4395
4565
|
}
|
|
4396
|
-
function
|
|
4566
|
+
function Wi(e) {
|
|
4397
4567
|
return e.type === "touchstart";
|
|
4398
4568
|
}
|
|
4399
|
-
var
|
|
4569
|
+
var Gi = {
|
|
4400
4570
|
getInitialState: (e) => ({
|
|
4401
4571
|
columnVisibility: {},
|
|
4402
4572
|
...e
|
|
@@ -4440,14 +4610,14 @@ var Ai = {
|
|
|
4440
4610
|
};
|
|
4441
4611
|
}
|
|
4442
4612
|
};
|
|
4443
|
-
function
|
|
4613
|
+
function Ki(e, t) {
|
|
4444
4614
|
return t ? t === "center" ? e.getCenterVisibleLeafColumns() : t === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
4445
4615
|
}
|
|
4446
|
-
var
|
|
4616
|
+
var qi = { createTable: (e) => {
|
|
4447
4617
|
e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
|
|
4448
4618
|
if (e._getGlobalFacetedMinMaxValues) return e._getGlobalFacetedMinMaxValues();
|
|
4449
4619
|
};
|
|
4450
|
-
} },
|
|
4620
|
+
} }, Ji = {
|
|
4451
4621
|
getInitialState: (e) => ({
|
|
4452
4622
|
globalFilter: void 0,
|
|
4453
4623
|
...e
|
|
@@ -4465,16 +4635,16 @@ var Mi = { createTable: (e) => {
|
|
|
4465
4635
|
e.getCanGlobalFilter = () => (e.columnDef.enableGlobalFilter ?? !0) && (t.options.enableGlobalFilter ?? !0) && (t.options.enableFilters ?? !0) && ((t.options.getColumnCanGlobalFilter == null ? void 0 : t.options.getColumnCanGlobalFilter(e)) ?? !0) && !!e.accessorFn;
|
|
4466
4636
|
},
|
|
4467
4637
|
createTable: (e) => {
|
|
4468
|
-
e.getGlobalAutoFilterFn = () =>
|
|
4638
|
+
e.getGlobalAutoFilterFn = () => Oi.includesString, e.getGlobalFilterFn = () => {
|
|
4469
4639
|
let { globalFilterFn: t } = e.options;
|
|
4470
|
-
return
|
|
4640
|
+
return li(t) ? t : t === "auto" ? e.getGlobalAutoFilterFn() : e.options.filterFns?.[t] ?? Oi[t];
|
|
4471
4641
|
}, e.setGlobalFilter = (t) => {
|
|
4472
4642
|
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(t);
|
|
4473
4643
|
}, e.resetGlobalFilter = (t) => {
|
|
4474
4644
|
e.setGlobalFilter(t ? void 0 : e.initialState.globalFilter);
|
|
4475
4645
|
};
|
|
4476
4646
|
}
|
|
4477
|
-
},
|
|
4647
|
+
}, Yi = {
|
|
4478
4648
|
getInitialState: (e) => ({
|
|
4479
4649
|
expanded: {},
|
|
4480
4650
|
...e
|
|
@@ -4551,14 +4721,14 @@ var Mi = { createTable: (e) => {
|
|
|
4551
4721
|
};
|
|
4552
4722
|
};
|
|
4553
4723
|
}
|
|
4554
|
-
},
|
|
4555
|
-
pageIndex:
|
|
4556
|
-
pageSize:
|
|
4557
|
-
}),
|
|
4724
|
+
}, Xi = 0, Zi = 10, Qi = () => ({
|
|
4725
|
+
pageIndex: Xi,
|
|
4726
|
+
pageSize: Zi
|
|
4727
|
+
}), $i = {
|
|
4558
4728
|
getInitialState: (e) => ({
|
|
4559
4729
|
...e,
|
|
4560
4730
|
pagination: {
|
|
4561
|
-
...
|
|
4731
|
+
...Qi(),
|
|
4562
4732
|
...e?.pagination
|
|
4563
4733
|
}
|
|
4564
4734
|
}),
|
|
@@ -4578,11 +4748,11 @@ var Mi = { createTable: (e) => {
|
|
|
4578
4748
|
e.resetPageIndex(), n = !1;
|
|
4579
4749
|
});
|
|
4580
4750
|
}
|
|
4581
|
-
}, e.setPagination = (t) => e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange((e) =>
|
|
4582
|
-
e.setPagination(t ?
|
|
4751
|
+
}, e.setPagination = (t) => e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange((e) => ci(t, e)), e.resetPagination = (t) => {
|
|
4752
|
+
e.setPagination(t ? Qi() : e.initialState.pagination ?? Qi());
|
|
4583
4753
|
}, e.setPageIndex = (t) => {
|
|
4584
4754
|
e.setPagination((n) => {
|
|
4585
|
-
let r =
|
|
4755
|
+
let r = ci(t, n.pageIndex), i = e.options.pageCount === void 0 || e.options.pageCount === -1 ? 2 ** 53 - 1 : e.options.pageCount - 1;
|
|
4586
4756
|
return r = Math.max(0, Math.min(r, i)), {
|
|
4587
4757
|
...n,
|
|
4588
4758
|
pageIndex: r
|
|
@@ -4590,13 +4760,13 @@ var Mi = { createTable: (e) => {
|
|
|
4590
4760
|
});
|
|
4591
4761
|
}, e.resetPageIndex = (t) => {
|
|
4592
4762
|
var n;
|
|
4593
|
-
e.setPageIndex(t ?
|
|
4763
|
+
e.setPageIndex(t ? Xi : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageIndex) ?? Xi);
|
|
4594
4764
|
}, e.resetPageSize = (t) => {
|
|
4595
4765
|
var n;
|
|
4596
|
-
e.setPageSize(t ?
|
|
4766
|
+
e.setPageSize(t ? Zi : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageSize) ?? Zi);
|
|
4597
4767
|
}, e.setPageSize = (t) => {
|
|
4598
4768
|
e.setPagination((e) => {
|
|
4599
|
-
let n = Math.max(1,
|
|
4769
|
+
let n = Math.max(1, ci(t, e.pageSize)), r = e.pageSize * e.pageIndex, i = Math.floor(r / n);
|
|
4600
4770
|
return {
|
|
4601
4771
|
...e,
|
|
4602
4772
|
pageIndex: i,
|
|
@@ -4604,7 +4774,7 @@ var Mi = { createTable: (e) => {
|
|
|
4604
4774
|
};
|
|
4605
4775
|
});
|
|
4606
4776
|
}, e.setPageCount = (t) => e.setPagination((n) => {
|
|
4607
|
-
let r =
|
|
4777
|
+
let r = ci(t, e.options.pageCount ?? -1);
|
|
4608
4778
|
return typeof r == "number" && (r = Math.max(-1, r)), {
|
|
4609
4779
|
...n,
|
|
4610
4780
|
pageCount: r
|
|
@@ -4617,12 +4787,12 @@ var Mi = { createTable: (e) => {
|
|
|
4617
4787
|
return n === -1 ? !0 : n === 0 ? !1 : t < n - 1;
|
|
4618
4788
|
}, e.previousPage = () => e.setPageIndex((e) => e - 1), e.nextPage = () => e.setPageIndex((e) => e + 1), e.firstPage = () => e.setPageIndex(0), e.lastPage = () => e.setPageIndex(e.getPageCount() - 1), e.getPrePaginationRowModel = () => e.getExpandedRowModel(), e.getPaginationRowModel = () => (!e._getPaginationRowModel && e.options.getPaginationRowModel && (e._getPaginationRowModel = e.options.getPaginationRowModel(e)), e.options.manualPagination || !e._getPaginationRowModel ? e.getPrePaginationRowModel() : e._getPaginationRowModel()), e.getPageCount = () => e.options.pageCount ?? Math.ceil(e.getRowCount() / e.getState().pagination.pageSize), e.getRowCount = () => e.options.rowCount ?? e.getPrePaginationRowModel().rows.length;
|
|
4619
4789
|
}
|
|
4620
|
-
},
|
|
4790
|
+
}, ea = () => ({
|
|
4621
4791
|
top: [],
|
|
4622
4792
|
bottom: []
|
|
4623
|
-
}),
|
|
4793
|
+
}), ta = {
|
|
4624
4794
|
getInitialState: (e) => ({
|
|
4625
|
-
rowPinning:
|
|
4795
|
+
rowPinning: ea(),
|
|
4626
4796
|
...e
|
|
4627
4797
|
}),
|
|
4628
4798
|
getDefaultOptions: (e) => ({ onRowPinningChange: X("rowPinning", e) }),
|
|
@@ -4664,7 +4834,7 @@ var Mi = { createTable: (e) => {
|
|
|
4664
4834
|
};
|
|
4665
4835
|
},
|
|
4666
4836
|
createTable: (e) => {
|
|
4667
|
-
e.setRowPinning = (t) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(t), e.resetRowPinning = (t) => e.setRowPinning(t ?
|
|
4837
|
+
e.setRowPinning = (t) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(t), e.resetRowPinning = (t) => e.setRowPinning(t ? ea() : e.initialState?.rowPinning ?? ea()), e.getIsSomeRowsPinned = (t) => {
|
|
4668
4838
|
let n = e.getState().rowPinning;
|
|
4669
4839
|
return t ? !!n[t]?.length : !!(n.top?.length || n.bottom?.length);
|
|
4670
4840
|
}, e._getPinnedRows = (t, n, r) => (e.options.keepPinnedRows ?? !0 ? (n ?? []).map((t) => {
|
|
@@ -4682,7 +4852,7 @@ var Mi = { createTable: (e) => {
|
|
|
4682
4852
|
return e.filter((e) => !r.has(e.id));
|
|
4683
4853
|
}, Q(e.options, "debugRows", "getCenterRows"));
|
|
4684
4854
|
}
|
|
4685
|
-
},
|
|
4855
|
+
}, na = {
|
|
4686
4856
|
getInitialState: (e) => ({
|
|
4687
4857
|
rowSelection: {},
|
|
4688
4858
|
...e
|
|
@@ -4707,17 +4877,17 @@ var Mi = { createTable: (e) => {
|
|
|
4707
4877
|
}, e.toggleAllPageRowsSelected = (t) => e.setRowSelection((n) => {
|
|
4708
4878
|
let r = t === void 0 ? !e.getIsAllPageRowsSelected() : t, i = { ...n };
|
|
4709
4879
|
return e.getRowModel().rows.forEach((t) => {
|
|
4710
|
-
|
|
4880
|
+
ra(i, t.id, r, !0, e);
|
|
4711
4881
|
}), i;
|
|
4712
|
-
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = Z(() => [e.getState().rowSelection, e.getCoreRowModel()], (t, n) => Object.keys(t).length ?
|
|
4882
|
+
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = Z(() => [e.getState().rowSelection, e.getCoreRowModel()], (t, n) => Object.keys(t).length ? ia(e, n) : {
|
|
4713
4883
|
rows: [],
|
|
4714
4884
|
flatRows: [],
|
|
4715
4885
|
rowsById: {}
|
|
4716
|
-
}, Q(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = Z(() => [e.getState().rowSelection, e.getFilteredRowModel()], (t, n) => Object.keys(t).length ?
|
|
4886
|
+
}, Q(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = Z(() => [e.getState().rowSelection, e.getFilteredRowModel()], (t, n) => Object.keys(t).length ? ia(e, n) : {
|
|
4717
4887
|
rows: [],
|
|
4718
4888
|
flatRows: [],
|
|
4719
4889
|
rowsById: {}
|
|
4720
|
-
}, Q(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = Z(() => [e.getState().rowSelection, e.getSortedRowModel()], (t, n) => Object.keys(t).length ?
|
|
4890
|
+
}, Q(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = Z(() => [e.getState().rowSelection, e.getSortedRowModel()], (t, n) => Object.keys(t).length ? ia(e, n) : {
|
|
4721
4891
|
rows: [],
|
|
4722
4892
|
flatRows: [],
|
|
4723
4893
|
rowsById: {}
|
|
@@ -4745,17 +4915,17 @@ var Mi = { createTable: (e) => {
|
|
|
4745
4915
|
t.setRowSelection((a) => {
|
|
4746
4916
|
if (n = n === void 0 ? !i : n, e.getCanSelect() && i === n) return a;
|
|
4747
4917
|
let o = { ...a };
|
|
4748
|
-
return
|
|
4918
|
+
return ra(o, e.id, n, r?.selectChildren ?? !0, t), o;
|
|
4749
4919
|
});
|
|
4750
4920
|
}, e.getIsSelected = () => {
|
|
4751
4921
|
let { rowSelection: n } = t.getState();
|
|
4752
|
-
return
|
|
4922
|
+
return aa(e, n);
|
|
4753
4923
|
}, e.getIsSomeSelected = () => {
|
|
4754
4924
|
let { rowSelection: n } = t.getState();
|
|
4755
|
-
return
|
|
4925
|
+
return oa(e, n) === "some";
|
|
4756
4926
|
}, e.getIsAllSubRowsSelected = () => {
|
|
4757
4927
|
let { rowSelection: n } = t.getState();
|
|
4758
|
-
return
|
|
4928
|
+
return oa(e, n) === "all";
|
|
4759
4929
|
}, e.getCanSelect = () => typeof t.options.enableRowSelection == "function" ? t.options.enableRowSelection(e) : t.options.enableRowSelection ?? !0, e.getCanSelectSubRows = () => typeof t.options.enableSubRowSelection == "function" ? t.options.enableSubRowSelection(e) : t.options.enableSubRowSelection ?? !0, e.getCanMultiSelect = () => typeof t.options.enableMultiRowSelection == "function" ? t.options.enableMultiRowSelection(e) : t.options.enableMultiRowSelection ?? !0, e.getToggleSelectedHandler = () => {
|
|
4760
4930
|
let t = e.getCanSelect();
|
|
4761
4931
|
return (n) => {
|
|
@@ -4763,16 +4933,16 @@ var Mi = { createTable: (e) => {
|
|
|
4763
4933
|
};
|
|
4764
4934
|
};
|
|
4765
4935
|
}
|
|
4766
|
-
},
|
|
4936
|
+
}, ra = (e, t, n, r, i) => {
|
|
4767
4937
|
var a;
|
|
4768
4938
|
let o = i.getRow(t, !0);
|
|
4769
|
-
n ? (o.getCanMultiSelect() || Object.keys(e).forEach((t) => delete e[t]), o.getCanSelect() && (e[t] = !0)) : delete e[t], r && (a = o.subRows) != null && a.length && o.getCanSelectSubRows() && o.subRows.forEach((t) =>
|
|
4939
|
+
n ? (o.getCanMultiSelect() || Object.keys(e).forEach((t) => delete e[t]), o.getCanSelect() && (e[t] = !0)) : delete e[t], r && (a = o.subRows) != null && a.length && o.getCanSelectSubRows() && o.subRows.forEach((t) => ra(e, t.id, n, r, i));
|
|
4770
4940
|
};
|
|
4771
|
-
function
|
|
4941
|
+
function ia(e, t) {
|
|
4772
4942
|
let n = e.getState().rowSelection, r = [], i = {}, a = function(e, t) {
|
|
4773
4943
|
return e.map((e) => {
|
|
4774
4944
|
var t;
|
|
4775
|
-
let o =
|
|
4945
|
+
let o = aa(e, n);
|
|
4776
4946
|
if (o && (r.push(e), i[e.id] = e), (t = e.subRows) != null && t.length && (e = {
|
|
4777
4947
|
...e,
|
|
4778
4948
|
subRows: a(e.subRows)
|
|
@@ -4785,32 +4955,32 @@ function Ui(e, t) {
|
|
|
4785
4955
|
rowsById: i
|
|
4786
4956
|
};
|
|
4787
4957
|
}
|
|
4788
|
-
function
|
|
4958
|
+
function aa(e, t) {
|
|
4789
4959
|
return t[e.id] ?? !1;
|
|
4790
4960
|
}
|
|
4791
|
-
function
|
|
4961
|
+
function oa(e, t, n) {
|
|
4792
4962
|
var r;
|
|
4793
4963
|
if (!((r = e.subRows) != null && r.length)) return !1;
|
|
4794
4964
|
let i = !0, a = !1;
|
|
4795
4965
|
return e.subRows.forEach((e) => {
|
|
4796
|
-
if (!(a && !i) && (e.getCanSelect() && (
|
|
4797
|
-
let n =
|
|
4966
|
+
if (!(a && !i) && (e.getCanSelect() && (aa(e, t) ? a = !0 : i = !1), e.subRows && e.subRows.length)) {
|
|
4967
|
+
let n = oa(e, t);
|
|
4798
4968
|
n === "all" ? a = !0 : (n === "some" && (a = !0), i = !1);
|
|
4799
4969
|
}
|
|
4800
4970
|
}), i ? "all" : a ? "some" : !1;
|
|
4801
4971
|
}
|
|
4802
|
-
var
|
|
4972
|
+
var sa = /([0-9]+)/gm, ca = (e, t, n) => ga(ha(e.getValue(n)).toLowerCase(), ha(t.getValue(n)).toLowerCase()), la = (e, t, n) => ga(ha(e.getValue(n)), ha(t.getValue(n))), ua = (e, t, n) => ma(ha(e.getValue(n)).toLowerCase(), ha(t.getValue(n)).toLowerCase()), da = (e, t, n) => ma(ha(e.getValue(n)), ha(t.getValue(n))), fa = (e, t, n) => {
|
|
4803
4973
|
let r = e.getValue(n), i = t.getValue(n);
|
|
4804
4974
|
return r > i ? 1 : r < i ? -1 : 0;
|
|
4805
|
-
},
|
|
4806
|
-
function
|
|
4975
|
+
}, pa = (e, t, n) => ma(e.getValue(n), t.getValue(n));
|
|
4976
|
+
function ma(e, t) {
|
|
4807
4977
|
return e === t ? 0 : e > t ? 1 : -1;
|
|
4808
4978
|
}
|
|
4809
|
-
function
|
|
4979
|
+
function ha(e) {
|
|
4810
4980
|
return typeof e == "number" ? isNaN(e) || e === Infinity || e === -Infinity ? "" : String(e) : typeof e == "string" ? e : "";
|
|
4811
4981
|
}
|
|
4812
|
-
function
|
|
4813
|
-
let n = e.split(
|
|
4982
|
+
function ga(e, t) {
|
|
4983
|
+
let n = e.split(sa).filter(Boolean), r = t.split(sa).filter(Boolean);
|
|
4814
4984
|
for (; n.length && r.length;) {
|
|
4815
4985
|
let e = n.shift(), t = r.shift(), i = parseInt(e, 10), a = parseInt(t, 10), o = [i, a].sort();
|
|
4816
4986
|
if (isNaN(o[0])) {
|
|
@@ -4824,22 +4994,22 @@ function ta(e, t) {
|
|
|
4824
4994
|
}
|
|
4825
4995
|
return n.length - r.length;
|
|
4826
4996
|
}
|
|
4827
|
-
var
|
|
4828
|
-
alphanumeric:
|
|
4829
|
-
alphanumericCaseSensitive:
|
|
4830
|
-
text:
|
|
4831
|
-
textCaseSensitive:
|
|
4832
|
-
datetime:
|
|
4833
|
-
basic:
|
|
4834
|
-
},
|
|
4835
|
-
ei,
|
|
4836
|
-
Ai,
|
|
4837
|
-
bi,
|
|
4838
|
-
Si,
|
|
4839
|
-
ri,
|
|
4997
|
+
var _a = {
|
|
4998
|
+
alphanumeric: ca,
|
|
4999
|
+
alphanumericCaseSensitive: la,
|
|
5000
|
+
text: ua,
|
|
5001
|
+
textCaseSensitive: da,
|
|
5002
|
+
datetime: fa,
|
|
5003
|
+
basic: pa
|
|
5004
|
+
}, va = [
|
|
4840
5005
|
hi,
|
|
4841
|
-
|
|
4842
|
-
|
|
5006
|
+
Gi,
|
|
5007
|
+
Fi,
|
|
5008
|
+
Li,
|
|
5009
|
+
vi,
|
|
5010
|
+
Ai,
|
|
5011
|
+
qi,
|
|
5012
|
+
Ji,
|
|
4843
5013
|
{
|
|
4844
5014
|
getInitialState: (e) => ({
|
|
4845
5015
|
sorting: [],
|
|
@@ -4858,13 +5028,13 @@ var na = {
|
|
|
4858
5028
|
let n = t.getFilteredRowModel().flatRows.slice(10), r = !1;
|
|
4859
5029
|
for (let t of n) {
|
|
4860
5030
|
let n = t?.getValue(e.id);
|
|
4861
|
-
if (Object.prototype.toString.call(n) === "[object Date]") return
|
|
4862
|
-
if (typeof n == "string" && (r = !0, n.split(
|
|
5031
|
+
if (Object.prototype.toString.call(n) === "[object Date]") return _a.datetime;
|
|
5032
|
+
if (typeof n == "string" && (r = !0, n.split(sa).length > 1)) return _a.alphanumeric;
|
|
4863
5033
|
}
|
|
4864
|
-
return r ?
|
|
5034
|
+
return r ? _a.text : _a.basic;
|
|
4865
5035
|
}, e.getAutoSortDir = () => typeof t.getFilteredRowModel().flatRows[0]?.getValue(e.id) == "string" ? "asc" : "desc", e.getSortingFn = () => {
|
|
4866
5036
|
if (!e) throw Error();
|
|
4867
|
-
return
|
|
5037
|
+
return li(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : t.options.sortingFns?.[e.columnDef.sortingFn] ?? _a[e.columnDef.sortingFn];
|
|
4868
5038
|
}, e.toggleSorting = (n, r) => {
|
|
4869
5039
|
let i = e.getNextSortingOrder(), a = n != null;
|
|
4870
5040
|
t.setSorting((o) => {
|
|
@@ -4901,16 +5071,16 @@ var na = {
|
|
|
4901
5071
|
}, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
|
|
4902
5072
|
}
|
|
4903
5073
|
},
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
5074
|
+
Ni,
|
|
5075
|
+
Yi,
|
|
5076
|
+
$i,
|
|
5077
|
+
ta,
|
|
5078
|
+
na,
|
|
5079
|
+
Vi
|
|
4910
5080
|
];
|
|
4911
|
-
function
|
|
5081
|
+
function ya(e) {
|
|
4912
5082
|
process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
|
4913
|
-
let t = [...
|
|
5083
|
+
let t = [...va, ...e._features ?? []], n = { _features: t }, r = n._features.reduce((e, t) => Object.assign(e, t.getDefaultOptions == null ? void 0 : t.getDefaultOptions(n)), {}), i = (e) => n.options.mergeOptions ? n.options.mergeOptions(r, e) : {
|
|
4914
5084
|
...r,
|
|
4915
5085
|
...e
|
|
4916
5086
|
}, a = { ...e.initialState ?? {} };
|
|
@@ -4936,7 +5106,7 @@ function ia(e) {
|
|
|
4936
5106
|
n.setState(n.initialState);
|
|
4937
5107
|
},
|
|
4938
5108
|
setOptions: (e) => {
|
|
4939
|
-
let t =
|
|
5109
|
+
let t = ci(e, n.options);
|
|
4940
5110
|
n.options = i(t);
|
|
4941
5111
|
},
|
|
4942
5112
|
getState: () => n.options.state,
|
|
@@ -4967,7 +5137,7 @@ function ia(e) {
|
|
|
4967
5137
|
getAllColumns: Z(() => [n._getColumnDefs()], (e) => {
|
|
4968
5138
|
let t = function(e, r, i) {
|
|
4969
5139
|
return i === void 0 && (i = 0), e.map((e) => {
|
|
4970
|
-
let a =
|
|
5140
|
+
let a = pi(n, e, i, r), o = e;
|
|
4971
5141
|
return a.columns = o.columns ? t(o.columns, a, i + 1) : [], a;
|
|
4972
5142
|
});
|
|
4973
5143
|
};
|
|
@@ -4988,7 +5158,7 @@ function ia(e) {
|
|
|
4988
5158
|
}
|
|
4989
5159
|
return n;
|
|
4990
5160
|
}
|
|
4991
|
-
function
|
|
5161
|
+
function ba() {
|
|
4992
5162
|
return (e) => Z(() => [e.options.data], (t) => {
|
|
4993
5163
|
let n = {
|
|
4994
5164
|
rows: [],
|
|
@@ -4998,7 +5168,7 @@ function aa() {
|
|
|
4998
5168
|
i === void 0 && (i = 0);
|
|
4999
5169
|
let o = [];
|
|
5000
5170
|
for (let c = 0; c < t.length; c++) {
|
|
5001
|
-
let l =
|
|
5171
|
+
let l = _i(e, e._getRowId(t[c], c, a), t[c], c, i, void 0, a?.id);
|
|
5002
5172
|
if (n.flatRows.push(l), n.rowsById[l.id] = l, o.push(l), e.options.getSubRows) {
|
|
5003
5173
|
var s;
|
|
5004
5174
|
l.originalSubRows = e.options.getSubRows(t[c], c), (s = l.originalSubRows) != null && s.length && (l.subRows = r(l.originalSubRows, i + 1, l));
|
|
@@ -5011,28 +5181,28 @@ function aa() {
|
|
|
5011
5181
|
}
|
|
5012
5182
|
//#endregion
|
|
5013
5183
|
//#region ../../node_modules/.pnpm/@tanstack+react-table@8.21.3_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-table/build/lib/index.mjs
|
|
5014
|
-
function
|
|
5015
|
-
return e ?
|
|
5184
|
+
function xa(e, t) {
|
|
5185
|
+
return e ? Sa(e) ? /*#__PURE__*/ y.createElement(e, t) : e : null;
|
|
5016
5186
|
}
|
|
5017
|
-
function
|
|
5018
|
-
return
|
|
5187
|
+
function Sa(e) {
|
|
5188
|
+
return Ca(e) || typeof e == "function" || wa(e);
|
|
5019
5189
|
}
|
|
5020
|
-
function
|
|
5190
|
+
function Ca(e) {
|
|
5021
5191
|
return typeof e == "function" && (() => {
|
|
5022
5192
|
let t = Object.getPrototypeOf(e);
|
|
5023
5193
|
return t.prototype && t.prototype.isReactComponent;
|
|
5024
5194
|
})();
|
|
5025
5195
|
}
|
|
5026
|
-
function
|
|
5196
|
+
function wa(e) {
|
|
5027
5197
|
return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
|
|
5028
5198
|
}
|
|
5029
|
-
function
|
|
5199
|
+
function Ta(e) {
|
|
5030
5200
|
let t = {
|
|
5031
5201
|
state: {},
|
|
5032
5202
|
onStateChange: () => {},
|
|
5033
5203
|
renderFallbackValue: null,
|
|
5034
5204
|
...e
|
|
5035
|
-
}, [n] = y.useState(() => ({ current:
|
|
5205
|
+
}, [n] = y.useState(() => ({ current: ya(t) })), [r, i] = y.useState(() => n.current.initialState);
|
|
5036
5206
|
return n.current.setOptions((t) => ({
|
|
5037
5207
|
...t,
|
|
5038
5208
|
...e,
|
|
@@ -5047,7 +5217,7 @@ function ua(e) {
|
|
|
5047
5217
|
}
|
|
5048
5218
|
//#endregion
|
|
5049
5219
|
//#region src/components/DataTable/DataTable.tsx
|
|
5050
|
-
function
|
|
5220
|
+
function Ea({ direction: e }) {
|
|
5051
5221
|
return e === "asc" ? /* @__PURE__ */ _(n, {
|
|
5052
5222
|
className: "size-3.5",
|
|
5053
5223
|
"aria-hidden": !0
|
|
@@ -5059,17 +5229,17 @@ function da({ direction: e }) {
|
|
|
5059
5229
|
"aria-hidden": !0
|
|
5060
5230
|
});
|
|
5061
5231
|
}
|
|
5062
|
-
function
|
|
5232
|
+
function Da({ columns: e, rows: t = 5, dividers: n }) {
|
|
5063
5233
|
return /* @__PURE__ */ v(Y, {
|
|
5064
5234
|
dividers: n,
|
|
5065
5235
|
children: [/* @__PURE__ */ _(Y.Header, { children: /* @__PURE__ */ _(Y.Row, { children: e.map((e, t) => /* @__PURE__ */ _(Y.Head, { children: typeof e.header == "string" ? e.header : null }, e.id ?? t)) }) }), /* @__PURE__ */ _(Y.Body, { children: Array.from({ length: t }).map((t, n) => /* @__PURE__ */ _(Y.Row, { children: e.map((e, t) => /* @__PURE__ */ _(Y.Cell, { children: /* @__PURE__ */ _("div", { className: "h-4 w-full max-w-40 animate-pulse rounded bg-eds-neutral-background" }) }, t)) }, n)) })]
|
|
5066
5236
|
});
|
|
5067
5237
|
}
|
|
5068
|
-
function
|
|
5069
|
-
let x = l !== void 0 && !!u, S =
|
|
5238
|
+
function Oa({ columns: e, data: t, isLoading: n = !1, error: r, pagination: i, onPageChange: a, search: o, sorting: l, onSortingChange: u, emptyStateTitle: f = "Nenhum resultado encontrado", emptyStateDescription: m, meta: h, "aria-label": g, className: y, dividers: b }) {
|
|
5239
|
+
let x = l !== void 0 && !!u, S = Ta({
|
|
5070
5240
|
data: t,
|
|
5071
5241
|
columns: e,
|
|
5072
|
-
getCoreRowModel:
|
|
5242
|
+
getCoreRowModel: ba(),
|
|
5073
5243
|
meta: h,
|
|
5074
5244
|
state: x ? { sorting: l } : void 0,
|
|
5075
5245
|
onSortingChange: u,
|
|
@@ -5082,7 +5252,7 @@ function pa({ columns: e, data: t, isLoading: n = !1, error: r, pagination: i, o
|
|
|
5082
5252
|
children: [
|
|
5083
5253
|
o && /* @__PURE__ */ _("div", {
|
|
5084
5254
|
className: "flex justify-end",
|
|
5085
|
-
children: /* @__PURE__ */ _(
|
|
5255
|
+
children: /* @__PURE__ */ _(Lr, {
|
|
5086
5256
|
label: "Buscar",
|
|
5087
5257
|
labelVariant: "floating",
|
|
5088
5258
|
className: "w-full max-w-sm",
|
|
@@ -5102,13 +5272,13 @@ function pa({ columns: e, data: t, isLoading: n = !1, error: r, pagination: i, o
|
|
|
5102
5272
|
"aria-hidden": !0
|
|
5103
5273
|
}), "Carregando..."]
|
|
5104
5274
|
}),
|
|
5105
|
-
n ? /* @__PURE__ */ _(
|
|
5275
|
+
n ? /* @__PURE__ */ _(Da, {
|
|
5106
5276
|
columns: e,
|
|
5107
5277
|
dividers: b
|
|
5108
|
-
}) : r ? /* @__PURE__ */ _(
|
|
5278
|
+
}) : r ? /* @__PURE__ */ _(Er, {
|
|
5109
5279
|
title: f,
|
|
5110
5280
|
description: m ?? "Houve um erro ao buscar os dados. Tente novamente."
|
|
5111
|
-
}) : C.length === 0 ? /* @__PURE__ */ _(
|
|
5281
|
+
}) : C.length === 0 ? /* @__PURE__ */ _(Er, {
|
|
5112
5282
|
title: f,
|
|
5113
5283
|
description: m
|
|
5114
5284
|
}) : /* @__PURE__ */ v(Y, {
|
|
@@ -5122,10 +5292,10 @@ function pa({ columns: e, data: t, isLoading: n = !1, error: r, pagination: i, o
|
|
|
5122
5292
|
type: "button",
|
|
5123
5293
|
className: "flex select-none items-center gap-1 font-semibold",
|
|
5124
5294
|
onClick: e.column.getToggleSortingHandler(),
|
|
5125
|
-
children: [
|
|
5126
|
-
}) :
|
|
5295
|
+
children: [xa(e.column.columnDef.header, e.getContext()), /* @__PURE__ */ _(Ea, { direction: t })]
|
|
5296
|
+
}) : xa(e.column.columnDef.header, e.getContext())
|
|
5127
5297
|
}, e.id);
|
|
5128
|
-
}) }, e.id)) }), /* @__PURE__ */ _(Y.Body, { children: C.map((e) => /* @__PURE__ */ _(Y.Row, { children: e.getVisibleCells().map((e) => /* @__PURE__ */ _(Y.Cell, { children:
|
|
5298
|
+
}) }, e.id)) }), /* @__PURE__ */ _(Y.Body, { children: C.map((e) => /* @__PURE__ */ _(Y.Row, { children: e.getVisibleCells().map((e) => /* @__PURE__ */ _(Y.Cell, { children: xa(e.column.columnDef.cell, e.getContext()) }, e.id)) }, e.id)) })]
|
|
5129
5299
|
}),
|
|
5130
5300
|
w && /* @__PURE__ */ v("div", {
|
|
5131
5301
|
className: "flex items-center justify-center gap-2",
|
|
@@ -5163,12 +5333,12 @@ function pa({ columns: e, data: t, isLoading: n = !1, error: r, pagination: i, o
|
|
|
5163
5333
|
}
|
|
5164
5334
|
//#endregion
|
|
5165
5335
|
//#region src/components/Tabs/Tabs.tsx
|
|
5166
|
-
var
|
|
5336
|
+
var ka = {
|
|
5167
5337
|
variant: "segmented",
|
|
5168
5338
|
size: "md"
|
|
5169
5339
|
};
|
|
5170
|
-
function
|
|
5171
|
-
let u = e ?? [], d = c === "segmented", f = c === "underline", p = l === "sm", { ref: m, isOverflowing: h } =
|
|
5340
|
+
function Aa({ tabs: e, value: t, selectedValue: n, onValueChange: r, activateOnFocus: i, className: a, listClassName: o, indicatorClassName: s, variant: c = ka.variant, size: l = ka.size }) {
|
|
5341
|
+
let u = e ?? [], d = c === "segmented", f = c === "underline", p = l === "sm", { ref: m, isOverflowing: h } = Ma(d), g = ja(m, h);
|
|
5172
5342
|
if (u.length === 0) return null;
|
|
5173
5343
|
let y = u[0]?.value, b = t !== void 0, x = {
|
|
5174
5344
|
value: b ? t : void 0,
|
|
@@ -5206,7 +5376,7 @@ function ha({ tabs: e, value: t, selectedValue: n, onValueChange: r, activateOnF
|
|
|
5206
5376
|
})]
|
|
5207
5377
|
});
|
|
5208
5378
|
}
|
|
5209
|
-
function
|
|
5379
|
+
function ja(e, t) {
|
|
5210
5380
|
let n = T(null), r = T(!1);
|
|
5211
5381
|
return () => ({
|
|
5212
5382
|
onPointerDownCapture: (i) => {
|
|
@@ -5243,7 +5413,7 @@ function ga(e, t) {
|
|
|
5243
5413
|
}
|
|
5244
5414
|
});
|
|
5245
5415
|
}
|
|
5246
|
-
function
|
|
5416
|
+
function Ma(e) {
|
|
5247
5417
|
let t = T(null), [n, r] = E(!1);
|
|
5248
5418
|
return C(() => {
|
|
5249
5419
|
if (!e) return;
|
|
@@ -5257,4 +5427,4 @@ function _a(e) {
|
|
|
5257
5427
|
};
|
|
5258
5428
|
}
|
|
5259
5429
|
//#endregion
|
|
5260
|
-
export { en as Attachment, Zt as AttachmentAction, Xt as AttachmentActions, qt as AttachmentContent, Yt as AttachmentDescription, $t as AttachmentGroup, Kt as AttachmentMedia, Jt as AttachmentTitle, Qt as AttachmentTrigger,
|
|
5430
|
+
export { en as Attachment, Zt as AttachmentAction, Xt as AttachmentActions, qt as AttachmentContent, Yt as AttachmentDescription, $t as AttachmentGroup, Kt as AttachmentMedia, Jt as AttachmentTitle, Qt as AttachmentTrigger, oe as Button, se as COLORS, Pt as Calendar, Ht as Card, rn as Checkbox, Dn as Combobox, Oa as DataTable, Mn as DatePicker, tr as DateTimePicker, hr as Dialog, Er as Empty, Cr as FormDialog, jt as IconButton, Lr as Input, Hr as Select, Y as Table, Aa as Tabs, Jr as Text, Br as Textarea };
|