@vincisys/eyeson 0.9.0 → 0.10.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 +26 -9
- package/dist/components/ComboBox/Combobox.d.ts.map +1 -1
- package/dist/index.js +782 -740
- package/dist/lib/field-styles.d.ts +2 -0
- package/dist/lib/field-styles.d.ts.map +1 -1
- package/dist/styles/eyes-standalone.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,29 +6,29 @@ import * as y from "react";
|
|
|
6
6
|
import { createContext as b, forwardRef as x, useContext as S, useEffect as C, useId as ee, useMemo as w, useRef as T, useState as E } from "react";
|
|
7
7
|
import { Tooltip as D } from "@base-ui/react/tooltip";
|
|
8
8
|
import { mergeProps as te } from "@base-ui/react/merge-props";
|
|
9
|
-
import { useRender as
|
|
10
|
-
import { Checkbox as
|
|
11
|
-
import { Field as
|
|
12
|
-
import { Combobox as
|
|
13
|
-
import { Popover as
|
|
14
|
-
import { Dialog as
|
|
15
|
-
import { AlertDialog as
|
|
16
|
-
import { Input as
|
|
17
|
-
import { Select as
|
|
18
|
-
import { Tabs as
|
|
9
|
+
import { useRender as ne } from "@base-ui/react/use-render";
|
|
10
|
+
import { Checkbox as O } from "@base-ui/react/checkbox";
|
|
11
|
+
import { Field as re } from "@base-ui/react/field";
|
|
12
|
+
import { Combobox as k } from "@base-ui/react/combobox";
|
|
13
|
+
import { Popover as A } from "@base-ui/react/popover";
|
|
14
|
+
import { Dialog as j } from "@base-ui/react/dialog";
|
|
15
|
+
import { AlertDialog as M } from "@base-ui/react/alert-dialog";
|
|
16
|
+
import { Input as N } from "@base-ui/react/input";
|
|
17
|
+
import { Select as P } from "@base-ui/react/select";
|
|
18
|
+
import { Tabs as F } from "@base-ui/react/tabs";
|
|
19
19
|
//#region src/lib/utils.ts
|
|
20
|
-
function
|
|
20
|
+
function I(...e) {
|
|
21
21
|
return h(e);
|
|
22
22
|
}
|
|
23
23
|
//#endregion
|
|
24
24
|
//#region src/utils/resolve-variant.ts
|
|
25
|
-
function
|
|
25
|
+
function L(e, t, n) {
|
|
26
26
|
let r = e[t];
|
|
27
27
|
return r === void 0 ? e[n] : r;
|
|
28
28
|
}
|
|
29
29
|
//#endregion
|
|
30
30
|
//#region src/components/Button/Button.tsx
|
|
31
|
-
var
|
|
31
|
+
var R = /* @__PURE__ */ new Set([
|
|
32
32
|
"blue-background",
|
|
33
33
|
"green-background",
|
|
34
34
|
"green-main",
|
|
@@ -40,7 +40,7 @@ var z = /* @__PURE__ */ new Set([
|
|
|
40
40
|
"red-background",
|
|
41
41
|
"red-dark",
|
|
42
42
|
"red-middle"
|
|
43
|
-
]),
|
|
43
|
+
]), z = {
|
|
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 z = /* @__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
|
+
}, ie = {
|
|
56
56
|
size: "md",
|
|
57
57
|
variant: "solid"
|
|
58
|
-
},
|
|
58
|
+
}, B = {
|
|
59
59
|
sm: 14,
|
|
60
60
|
md: 16,
|
|
61
61
|
lg: 16
|
|
62
62
|
};
|
|
63
|
-
function
|
|
64
|
-
let r =
|
|
65
|
-
return
|
|
63
|
+
function V({ variant: e = ie.variant, size: t = ie.size, fluid: n = !1 }) {
|
|
64
|
+
let r = L(z.size, t, ie.size), i = L(z.variant, e, ie.variant);
|
|
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 ae({ 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 = B[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
|
+
...R.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 ie({ text: t = "Button", className: n, icon: r, iconPosition: i = "star
|
|
|
82
82
|
})
|
|
83
83
|
}) : null;
|
|
84
84
|
return /* @__PURE__ */ _(e, {
|
|
85
|
-
className:
|
|
85
|
+
className: I(V({
|
|
86
86
|
variant: a,
|
|
87
87
|
size: s,
|
|
88
88
|
fluid: c
|
|
@@ -98,7 +98,7 @@ function ie({ 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 H = [
|
|
102
102
|
"blue-background",
|
|
103
103
|
"blue-dark",
|
|
104
104
|
"blue-main",
|
|
@@ -119,50 +119,50 @@ var U = [
|
|
|
119
119
|
"red-dark",
|
|
120
120
|
"red-main",
|
|
121
121
|
"red-middle"
|
|
122
|
-
],
|
|
123
|
-
|
|
124
|
-
var
|
|
122
|
+
], oe = 365.2425, se = 6048e5, ce = 864e5, le = 3600 * 24;
|
|
123
|
+
le * 7, le * oe / 12 * 3;
|
|
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
|
|
127
|
-
function
|
|
128
|
-
return typeof e == "function" ? e(t) : e && typeof e == "object" &&
|
|
127
|
+
function U(e, t) {
|
|
128
|
+
return typeof e == "function" ? e(t) : e && typeof e == "object" && ue in e ? e[ue](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
129
129
|
}
|
|
130
130
|
//#endregion
|
|
131
131
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.js
|
|
132
|
-
function
|
|
133
|
-
return
|
|
132
|
+
function W(e, t) {
|
|
133
|
+
return U(t || e, e);
|
|
134
134
|
}
|
|
135
135
|
//#endregion
|
|
136
136
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addDays.js
|
|
137
|
-
function
|
|
138
|
-
let r =
|
|
139
|
-
return isNaN(t) ?
|
|
137
|
+
function de(e, t, n) {
|
|
138
|
+
let r = W(e, n?.in);
|
|
139
|
+
return isNaN(t) ? U(n?.in || e, NaN) : (t && r.setDate(r.getDate() + t), r);
|
|
140
140
|
}
|
|
141
141
|
//#endregion
|
|
142
142
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addMonths.js
|
|
143
|
-
function
|
|
144
|
-
let r =
|
|
145
|
-
if (isNaN(t)) return
|
|
143
|
+
function fe(e, t, n) {
|
|
144
|
+
let r = W(e, n?.in);
|
|
145
|
+
if (isNaN(t)) return U(n?.in || e, NaN);
|
|
146
146
|
if (!t) return r;
|
|
147
|
-
let i = r.getDate(), a =
|
|
147
|
+
let i = r.getDate(), a = U(n?.in || e, r.getTime());
|
|
148
148
|
return a.setMonth(r.getMonth() + t + 1, 0), i >= a.getDate() ? a : (r.setFullYear(a.getFullYear(), a.getMonth(), i), r);
|
|
149
149
|
}
|
|
150
150
|
//#endregion
|
|
151
151
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.js
|
|
152
|
-
var
|
|
153
|
-
function
|
|
154
|
-
return
|
|
152
|
+
var pe = {};
|
|
153
|
+
function me() {
|
|
154
|
+
return pe;
|
|
155
155
|
}
|
|
156
156
|
//#endregion
|
|
157
157
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.js
|
|
158
|
-
function
|
|
159
|
-
let n =
|
|
158
|
+
function G(e, t) {
|
|
159
|
+
let n = me(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, i = W(e, t?.in), a = i.getDay(), o = (a < r ? 7 : 0) + a - r;
|
|
160
160
|
return i.setDate(i.getDate() - o), i.setHours(0, 0, 0, 0), i;
|
|
161
161
|
}
|
|
162
162
|
//#endregion
|
|
163
163
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.js
|
|
164
|
-
function
|
|
165
|
-
return
|
|
164
|
+
function K(e, t) {
|
|
165
|
+
return G(e, {
|
|
166
166
|
...t,
|
|
167
167
|
weekStartsOn: 1
|
|
168
168
|
});
|
|
@@ -170,47 +170,47 @@ function me(e, t) {
|
|
|
170
170
|
//#endregion
|
|
171
171
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.js
|
|
172
172
|
function he(e, t) {
|
|
173
|
-
let n =
|
|
173
|
+
let n = W(e, t?.in), r = n.getFullYear(), i = U(n, 0);
|
|
174
174
|
i.setFullYear(r + 1, 0, 4), i.setHours(0, 0, 0, 0);
|
|
175
|
-
let a =
|
|
175
|
+
let a = K(i), o = U(n, 0);
|
|
176
176
|
o.setFullYear(r, 0, 4), o.setHours(0, 0, 0, 0);
|
|
177
|
-
let s =
|
|
177
|
+
let s = K(o);
|
|
178
178
|
return n.getTime() >= a.getTime() ? r + 1 : n.getTime() >= s.getTime() ? r : r - 1;
|
|
179
179
|
}
|
|
180
180
|
//#endregion
|
|
181
181
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
|
|
182
182
|
function ge(e) {
|
|
183
|
-
let t =
|
|
183
|
+
let t = W(e), n = new Date(Date.UTC(t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds()));
|
|
184
184
|
return n.setUTCFullYear(t.getFullYear()), e - +n;
|
|
185
185
|
}
|
|
186
186
|
//#endregion
|
|
187
187
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.js
|
|
188
188
|
function _e(e, ...t) {
|
|
189
|
-
let n =
|
|
189
|
+
let n = U.bind(null, e || t.find((e) => typeof e == "object"));
|
|
190
190
|
return t.map(n);
|
|
191
191
|
}
|
|
192
192
|
//#endregion
|
|
193
193
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.js
|
|
194
194
|
function ve(e, t) {
|
|
195
|
-
let n =
|
|
195
|
+
let n = W(e, t?.in);
|
|
196
196
|
return n.setHours(0, 0, 0, 0), n;
|
|
197
197
|
}
|
|
198
198
|
//#endregion
|
|
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) / ce);
|
|
203
203
|
}
|
|
204
204
|
//#endregion
|
|
205
205
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.js
|
|
206
206
|
function be(e, t) {
|
|
207
|
-
let n = he(e, t), r =
|
|
208
|
-
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0),
|
|
207
|
+
let n = he(e, t), r = U(t?.in || e, 0);
|
|
208
|
+
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), K(r);
|
|
209
209
|
}
|
|
210
210
|
//#endregion
|
|
211
211
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructNow.js
|
|
212
212
|
function xe(e) {
|
|
213
|
-
return
|
|
213
|
+
return U(e, Date.now());
|
|
214
214
|
}
|
|
215
215
|
//#endregion
|
|
216
216
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isSameDay.js
|
|
@@ -226,30 +226,30 @@ function Ce(e) {
|
|
|
226
226
|
//#endregion
|
|
227
227
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.js
|
|
228
228
|
function we(e) {
|
|
229
|
-
return !(!Ce(e) && typeof e != "number" || isNaN(+
|
|
229
|
+
return !(!Ce(e) && typeof e != "number" || isNaN(+W(e)));
|
|
230
230
|
}
|
|
231
231
|
//#endregion
|
|
232
232
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/endOfMonth.js
|
|
233
233
|
function Te(e, t) {
|
|
234
|
-
let n =
|
|
234
|
+
let n = W(e, t?.in), r = n.getMonth();
|
|
235
235
|
return n.setFullYear(n.getFullYear(), r + 1, 0), n.setHours(23, 59, 59, 999), n;
|
|
236
236
|
}
|
|
237
237
|
//#endregion
|
|
238
238
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfMonth.js
|
|
239
239
|
function Ee(e, t) {
|
|
240
|
-
let n =
|
|
240
|
+
let n = W(e, t?.in);
|
|
241
241
|
return n.setDate(1), n.setHours(0, 0, 0, 0), n;
|
|
242
242
|
}
|
|
243
243
|
//#endregion
|
|
244
244
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.js
|
|
245
245
|
function De(e, t) {
|
|
246
|
-
let n =
|
|
246
|
+
let n = W(e, t?.in);
|
|
247
247
|
return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
248
248
|
}
|
|
249
249
|
//#endregion
|
|
250
250
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/endOfWeek.js
|
|
251
251
|
function Oe(e, t) {
|
|
252
|
-
let n =
|
|
252
|
+
let n = me(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, i = W(e, t?.in), a = i.getDay(), o = (a < r ? -7 : 0) + 6 - (a - r);
|
|
253
253
|
return i.setDate(i.getDate() + o), i.setHours(23, 59, 59, 999), i;
|
|
254
254
|
}
|
|
255
255
|
//#endregion
|
|
@@ -753,36 +753,36 @@ var Ve = {
|
|
|
753
753
|
//#endregion
|
|
754
754
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.js
|
|
755
755
|
function He(e, t) {
|
|
756
|
-
let n =
|
|
756
|
+
let n = W(e, t?.in);
|
|
757
757
|
return ye(n, De(n)) + 1;
|
|
758
758
|
}
|
|
759
759
|
//#endregion
|
|
760
760
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.js
|
|
761
761
|
function Ue(e, t) {
|
|
762
|
-
let n =
|
|
763
|
-
return Math.round(r /
|
|
762
|
+
let n = W(e, t?.in), r = K(n) - +be(n);
|
|
763
|
+
return Math.round(r / se) + 1;
|
|
764
764
|
}
|
|
765
765
|
//#endregion
|
|
766
766
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.js
|
|
767
767
|
function We(e, t) {
|
|
768
|
-
let n =
|
|
768
|
+
let n = W(e, t?.in), r = n.getFullYear(), i = me(), a = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? i.firstWeekContainsDate ?? i.locale?.options?.firstWeekContainsDate ?? 1, o = U(t?.in || e, 0);
|
|
769
769
|
o.setFullYear(r + 1, 0, a), o.setHours(0, 0, 0, 0);
|
|
770
|
-
let s =
|
|
770
|
+
let s = G(o, t), c = U(t?.in || e, 0);
|
|
771
771
|
c.setFullYear(r, 0, a), c.setHours(0, 0, 0, 0);
|
|
772
|
-
let l =
|
|
772
|
+
let l = G(c, t);
|
|
773
773
|
return +n >= +s ? r + 1 : +n >= +l ? r : r - 1;
|
|
774
774
|
}
|
|
775
775
|
//#endregion
|
|
776
776
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.js
|
|
777
777
|
function Ge(e, t) {
|
|
778
|
-
let n =
|
|
779
|
-
return a.setFullYear(i, 0, r), a.setHours(0, 0, 0, 0),
|
|
778
|
+
let n = me(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, i = We(e, t), a = U(t?.in || e, 0);
|
|
779
|
+
return a.setFullYear(i, 0, r), a.setHours(0, 0, 0, 0), G(a, t);
|
|
780
780
|
}
|
|
781
781
|
//#endregion
|
|
782
782
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.js
|
|
783
783
|
function Ke(e, t) {
|
|
784
|
-
let n =
|
|
785
|
-
return Math.round(r /
|
|
784
|
+
let n = W(e, t?.in), r = G(n, t) - +Ge(n, t);
|
|
785
|
+
return Math.round(r / se) + 1;
|
|
786
786
|
}
|
|
787
787
|
//#endregion
|
|
788
788
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.js
|
|
@@ -1263,7 +1263,7 @@ function ct(e, t, n) {
|
|
|
1263
1263
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.js
|
|
1264
1264
|
var lt = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ut = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, dt = /^'([^]*?)'?$/, ft = /''/g, pt = /[a-zA-Z]/;
|
|
1265
1265
|
function J(e, t, n) {
|
|
1266
|
-
let r =
|
|
1266
|
+
let r = me(), i = n?.locale ?? r.locale ?? Ve, a = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, s = W(e, n?.in);
|
|
1267
1267
|
if (!we(s)) throw RangeError("Invalid time value");
|
|
1268
1268
|
let c = t.match(ut).map((e) => {
|
|
1269
1269
|
let t = e[0];
|
|
@@ -1313,22 +1313,22 @@ function mt(e) {
|
|
|
1313
1313
|
//#endregion
|
|
1314
1314
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getHours.js
|
|
1315
1315
|
function ht(e, t) {
|
|
1316
|
-
return
|
|
1316
|
+
return W(e, t?.in).getHours();
|
|
1317
1317
|
}
|
|
1318
1318
|
//#endregion
|
|
1319
1319
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getMinutes.js
|
|
1320
1320
|
function gt(e, t) {
|
|
1321
|
-
return
|
|
1321
|
+
return W(e, t?.in).getMinutes();
|
|
1322
1322
|
}
|
|
1323
1323
|
//#endregion
|
|
1324
1324
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isAfter.js
|
|
1325
1325
|
function _t(e, t) {
|
|
1326
|
-
return +
|
|
1326
|
+
return +W(e) > +W(t);
|
|
1327
1327
|
}
|
|
1328
1328
|
//#endregion
|
|
1329
1329
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isBefore.js
|
|
1330
1330
|
function vt(e, t) {
|
|
1331
|
-
return +
|
|
1331
|
+
return +W(e) < +W(t);
|
|
1332
1332
|
}
|
|
1333
1333
|
//#endregion
|
|
1334
1334
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isSameMonth.js
|
|
@@ -1339,30 +1339,30 @@ function yt(e, t, n) {
|
|
|
1339
1339
|
//#endregion
|
|
1340
1340
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isToday.js
|
|
1341
1341
|
function bt(e, t) {
|
|
1342
|
-
return Se(
|
|
1342
|
+
return Se(U(t?.in || e, e), xe(t?.in || e));
|
|
1343
1343
|
}
|
|
1344
1344
|
//#endregion
|
|
1345
1345
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/setHours.js
|
|
1346
1346
|
function xt(e, t, n) {
|
|
1347
|
-
let r =
|
|
1347
|
+
let r = W(e, n?.in);
|
|
1348
1348
|
return r.setHours(t), r;
|
|
1349
1349
|
}
|
|
1350
1350
|
//#endregion
|
|
1351
1351
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/setMinutes.js
|
|
1352
1352
|
function St(e, t, n) {
|
|
1353
|
-
let r =
|
|
1353
|
+
let r = W(e, n?.in);
|
|
1354
1354
|
return r.setMinutes(t), r;
|
|
1355
1355
|
}
|
|
1356
1356
|
//#endregion
|
|
1357
1357
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/setSeconds.js
|
|
1358
1358
|
function Ct(e, t, n) {
|
|
1359
|
-
let r =
|
|
1359
|
+
let r = W(e, n?.in);
|
|
1360
1360
|
return r.setSeconds(t), r;
|
|
1361
1361
|
}
|
|
1362
1362
|
//#endregion
|
|
1363
1363
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/subMonths.js
|
|
1364
1364
|
function wt(e, t, n) {
|
|
1365
|
-
return
|
|
1365
|
+
return fe(e, -t, n);
|
|
1366
1366
|
}
|
|
1367
1367
|
//#endregion
|
|
1368
1368
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/pt-BR/_lib/formatDistance.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 =
|
|
1825
|
+
let f = ee(), p = L(At, s, ie.size), m = L(z.variant, i, ie.variant), h = /* @__PURE__ */ _(e, {
|
|
1826
1826
|
style: {
|
|
1827
1827
|
"--eds-btn-base-accent": `var(--color-eds-${a})`,
|
|
1828
|
-
...
|
|
1828
|
+
...R.has(a) ? { "--eds-btn-solid-fg": "#fff" } : {},
|
|
1829
1829
|
...o ? { "--eds-btn-hover-accent": `var(--color-eds-${o})` } : {},
|
|
1830
1830
|
...l
|
|
1831
1831
|
},
|
|
@@ -1836,7 +1836,7 @@ function jt({ icon: t, label: n, className: r, variant: i = "ghost", color: a =
|
|
|
1836
1836
|
"aria-describedby": u ? f : void 0,
|
|
1837
1837
|
title: u ? void 0 : n,
|
|
1838
1838
|
"data-eds-component": "IconButton",
|
|
1839
|
-
className:
|
|
1839
|
+
className: I("group/button inline-flex shrink-0 items-center justify-center rounded-lg border bg-clip-padding text-sm font-medium 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:opacity-50", "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "[--eds-btn-accent:var(--eds-btn-base-accent)]", o && "hover:[--eds-btn-accent:var(--eds-btn-hover-accent)] focus-visible:[--eds-btn-accent:var(--eds-btn-hover-accent)]", o && i === "outline" && "hover:border-[color-mix(in_srgb,var(--eds-btn-accent)_90%,black)]", p.classes, m.classes, r),
|
|
1840
1840
|
children: /* @__PURE__ */ _(t, {
|
|
1841
1841
|
size: p.iconPx,
|
|
1842
1842
|
"aria-hidden": !0
|
|
@@ -1868,8 +1868,8 @@ var Mt = [
|
|
|
1868
1868
|
"Sáb"
|
|
1869
1869
|
];
|
|
1870
1870
|
function Nt(e, t) {
|
|
1871
|
-
let n =
|
|
1872
|
-
for (let e = n; e <= r; e =
|
|
1871
|
+
let n = G(Ee(e), { weekStartsOn: t }), r = Oe(Te(e), { weekStartsOn: t }), i = [];
|
|
1872
|
+
for (let e = n; e <= r; e = de(e, 1)) i.push(e);
|
|
1873
1873
|
return i;
|
|
1874
1874
|
}
|
|
1875
1875
|
function Pt({ month: e, defaultMonth: t, onMonthChange: n, events: r = [], maxVisibleEvents: i = 3, weekStartsOn: a = 0, onDayClick: o, onEventClick: l, renderEvent: u, showNavigation: d = !0, className: f }) {
|
|
@@ -1885,7 +1885,7 @@ function Pt({ month: e, defaultMonth: t, onMonthChange: n, events: r = [], maxVi
|
|
|
1885
1885
|
h || m(e), n?.(e);
|
|
1886
1886
|
}
|
|
1887
1887
|
return /* @__PURE__ */ v("div", {
|
|
1888
|
-
className:
|
|
1888
|
+
className: I("flex h-full w-full flex-col", f),
|
|
1889
1889
|
"data-eds-component": "Calendar",
|
|
1890
1890
|
children: [d && /* @__PURE__ */ v("div", {
|
|
1891
1891
|
className: "mb-3 flex shrink-0 items-center justify-between",
|
|
@@ -1903,7 +1903,7 @@ function Pt({ month: e, defaultMonth: t, onMonthChange: n, events: r = [], maxVi
|
|
|
1903
1903
|
icon: c,
|
|
1904
1904
|
label: "Próximo mês",
|
|
1905
1905
|
size: "sm",
|
|
1906
|
-
onClick: () => S(
|
|
1906
|
+
onClick: () => S(fe(g, 1))
|
|
1907
1907
|
})]
|
|
1908
1908
|
})]
|
|
1909
1909
|
}), /* @__PURE__ */ v("div", {
|
|
@@ -1911,7 +1911,7 @@ function Pt({ month: e, defaultMonth: t, onMonthChange: n, events: r = [], maxVi
|
|
|
1911
1911
|
children: [/* @__PURE__ */ _("div", {
|
|
1912
1912
|
className: "grid shrink-0 grid-cols-7",
|
|
1913
1913
|
children: y.map((e, t) => /* @__PURE__ */ _("div", {
|
|
1914
|
-
className:
|
|
1914
|
+
className: I("border-t border-r border-b border-eds-neutral-disabled py-1.5 text-center text-base text-eds-neutral-main", t === 0 && "border-l"),
|
|
1915
1915
|
children: e
|
|
1916
1916
|
}, e))
|
|
1917
1917
|
}), /* @__PURE__ */ _("div", {
|
|
@@ -1921,12 +1921,12 @@ function Pt({ month: e, defaultMonth: t, onMonthChange: n, events: r = [], maxVi
|
|
|
1921
1921
|
return /* @__PURE__ */ v("div", {
|
|
1922
1922
|
"data-date": a,
|
|
1923
1923
|
onClick: () => o?.(e),
|
|
1924
|
-
className:
|
|
1924
|
+
className: I("flex flex-col gap-1 border-r border-b border-eds-neutral-disabled px-1.5 pt-1.5", t % 7 == 0 && "border-l", o && "cursor-pointer", n ? "bg-white" : "bg-eds-neutral-background"),
|
|
1925
1925
|
children: [(() => {
|
|
1926
1926
|
let e = {
|
|
1927
1927
|
"aria-current": r ? "date" : void 0,
|
|
1928
1928
|
"data-today": r || void 0,
|
|
1929
|
-
className:
|
|
1929
|
+
className: I("shrink-0 self-center rounded-full text-sm", r ? "flex size-7 items-center justify-center bg-eds-blue-main text-white" : "px-1 py-0.5 text-eds-neutral-main")
|
|
1930
1930
|
};
|
|
1931
1931
|
return o ? /* @__PURE__ */ _("button", {
|
|
1932
1932
|
type: "button",
|
|
@@ -1975,49 +1975,49 @@ function Pt({ month: e, defaultMonth: t, onMonthChange: n, events: r = [], maxVi
|
|
|
1975
1975
|
function Ft({ className: e, ...t }) {
|
|
1976
1976
|
return /* @__PURE__ */ _("div", {
|
|
1977
1977
|
"data-eds-component": "Card",
|
|
1978
|
-
className:
|
|
1978
|
+
className: I("flex flex-col gap-6 rounded-eds-sm border border-eds-outline-border bg-white py-6 text-eds-neutral-main shadow-sm", e),
|
|
1979
1979
|
...t
|
|
1980
1980
|
});
|
|
1981
1981
|
}
|
|
1982
1982
|
function It({ className: e, ...t }) {
|
|
1983
1983
|
return /* @__PURE__ */ _("div", {
|
|
1984
1984
|
"data-slot": "card-header",
|
|
1985
|
-
className:
|
|
1985
|
+
className: I("grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-[[data-slot=card-action]]:grid-cols-[1fr_auto]", e),
|
|
1986
1986
|
...t
|
|
1987
1987
|
});
|
|
1988
1988
|
}
|
|
1989
1989
|
function Lt({ className: e, ...t }) {
|
|
1990
1990
|
return /* @__PURE__ */ _("h3", {
|
|
1991
1991
|
"data-slot": "card-title",
|
|
1992
|
-
className:
|
|
1992
|
+
className: I("text-lg leading-none font-semibold text-eds-neutral-main", e),
|
|
1993
1993
|
...t
|
|
1994
1994
|
});
|
|
1995
1995
|
}
|
|
1996
1996
|
function Rt({ className: e, ...t }) {
|
|
1997
1997
|
return /* @__PURE__ */ _("p", {
|
|
1998
1998
|
"data-slot": "card-description",
|
|
1999
|
-
className:
|
|
1999
|
+
className: I("text-sm text-eds-neutral-elements", e),
|
|
2000
2000
|
...t
|
|
2001
2001
|
});
|
|
2002
2002
|
}
|
|
2003
2003
|
function zt({ className: e, ...t }) {
|
|
2004
2004
|
return /* @__PURE__ */ _("div", {
|
|
2005
2005
|
"data-slot": "card-action",
|
|
2006
|
-
className:
|
|
2006
|
+
className: I("col-start-2 row-span-2 row-start-1 self-start justify-self-end", e),
|
|
2007
2007
|
...t
|
|
2008
2008
|
});
|
|
2009
2009
|
}
|
|
2010
2010
|
function Bt({ className: e, ...t }) {
|
|
2011
2011
|
return /* @__PURE__ */ _("div", {
|
|
2012
2012
|
"data-slot": "card-content",
|
|
2013
|
-
className:
|
|
2013
|
+
className: I("px-6", e),
|
|
2014
2014
|
...t
|
|
2015
2015
|
});
|
|
2016
2016
|
}
|
|
2017
2017
|
function Vt({ className: e, ...t }) {
|
|
2018
2018
|
return /* @__PURE__ */ _("div", {
|
|
2019
2019
|
"data-slot": "card-footer",
|
|
2020
|
-
className:
|
|
2020
|
+
className: I("-mb-6 -mt-6 flex flex-col-reverse gap-2 rounded-b-eds-sm border-t border-eds-outline-border bg-eds-neutral-background px-6 py-4 sm:flex-row sm:justify-end", e),
|
|
2021
2021
|
...t
|
|
2022
2022
|
});
|
|
2023
2023
|
}
|
|
@@ -2038,14 +2038,14 @@ var Ht = Object.assign(Ft, {
|
|
|
2038
2038
|
vertical: { classes: "w-24 flex-col has-data-[slot=attachment-content]:w-[7.5rem]" }
|
|
2039
2039
|
};
|
|
2040
2040
|
function Gt({ className: e, state: t = "done", size: n = "default", orientation: r = "horizontal", ...i }) {
|
|
2041
|
-
let a =
|
|
2041
|
+
let a = L(Ut, n, "default"), o = L(Wt, r, "horizontal");
|
|
2042
2042
|
return /* @__PURE__ */ _("div", {
|
|
2043
2043
|
"data-eds-component": "Attachment",
|
|
2044
2044
|
"data-slot": "attachment",
|
|
2045
2045
|
"data-state": t,
|
|
2046
2046
|
"data-size": n,
|
|
2047
2047
|
"data-orientation": r,
|
|
2048
|
-
className:
|
|
2048
|
+
className: I("group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-eds-xs border border-eds-outline-border bg-white text-eds-neutral-main transition-colors", "focus-within:ring-1 focus-within:ring-eds-blue-main/40", "has-[>a,>button]:hover:bg-eds-blue-background/25", "data-[state=idle]:border-dashed data-[state=idle]:border-eds-blue-middle/55", "data-[state=error]:border-eds-red-main/35 data-[state=error]:bg-eds-red-background/20", "data-[state=uploading]:border-eds-blue-middle/45 data-[state=processing]:border-eds-blue-middle/45", a.classes, o.classes, e),
|
|
2049
2049
|
...i
|
|
2050
2050
|
});
|
|
2051
2051
|
}
|
|
@@ -2053,35 +2053,35 @@ function Kt({ className: e, variant: t = "icon", ...n }) {
|
|
|
2053
2053
|
return /* @__PURE__ */ _("div", {
|
|
2054
2054
|
"data-slot": "attachment-media",
|
|
2055
2055
|
"data-variant": t,
|
|
2056
|
-
className:
|
|
2056
|
+
className: I("relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-eds-lil bg-eds-blue-background/45 text-eds-blue-main", "group-data-[orientation=vertical]/attachment:w-full", "group-data-[size=sm]/attachment:w-8", "group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md", "group-data-[state=error]/attachment:bg-eds-red-background/55 group-data-[state=error]/attachment:text-eds-red-dark", "group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:!size-6", "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", "group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6", "group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5", t === "image" && "opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 [&_img]:aspect-square [&_img]:size-full [&_img]:object-cover", e),
|
|
2057
2057
|
...n
|
|
2058
2058
|
});
|
|
2059
2059
|
}
|
|
2060
2060
|
function qt({ className: e, ...t }) {
|
|
2061
2061
|
return /* @__PURE__ */ _("div", {
|
|
2062
2062
|
"data-slot": "attachment-content",
|
|
2063
|
-
className:
|
|
2063
|
+
className: I("max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1", e),
|
|
2064
2064
|
...t
|
|
2065
2065
|
});
|
|
2066
2066
|
}
|
|
2067
2067
|
function Jt({ className: e, ...t }) {
|
|
2068
2068
|
return /* @__PURE__ */ _("span", {
|
|
2069
2069
|
"data-slot": "attachment-title",
|
|
2070
|
-
className:
|
|
2070
|
+
className: I("block max-w-full min-w-0 truncate font-medium text-eds-neutral-main", "group-data-[state=uploading]/attachment:animate-eds-shimmer group-data-[state=processing]/attachment:animate-eds-shimmer", "group-data-[state=uploading]/attachment:text-eds-blue-main group-data-[state=processing]/attachment:text-eds-blue-main", e),
|
|
2071
2071
|
...t
|
|
2072
2072
|
});
|
|
2073
2073
|
}
|
|
2074
2074
|
function Yt({ className: e, ...t }) {
|
|
2075
2075
|
return /* @__PURE__ */ _("span", {
|
|
2076
2076
|
"data-slot": "attachment-description",
|
|
2077
|
-
className:
|
|
2077
|
+
className: I("mt-0.5 block max-w-full min-w-0 truncate text-xs text-eds-neutral-elements", "group-data-[state=error]/attachment:text-eds-red-main/85", "group-data-[state=uploading]/attachment:text-eds-blue-middle group-data-[state=processing]/attachment:text-eds-blue-middle", e),
|
|
2078
2078
|
...t
|
|
2079
2079
|
});
|
|
2080
2080
|
}
|
|
2081
2081
|
function Xt({ className: e, ...t }) {
|
|
2082
2082
|
return /* @__PURE__ */ _("div", {
|
|
2083
2083
|
"data-slot": "attachment-actions",
|
|
2084
|
-
className:
|
|
2084
|
+
className: I("relative z-20 flex shrink-0 items-center", "group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1", e),
|
|
2085
2085
|
...t
|
|
2086
2086
|
});
|
|
2087
2087
|
}
|
|
@@ -2091,16 +2091,16 @@ function Zt({ variant: e = "ghost", color: t = "blue-main", size: n = "sm", clas
|
|
|
2091
2091
|
variant: e,
|
|
2092
2092
|
color: t,
|
|
2093
2093
|
size: n,
|
|
2094
|
-
className:
|
|
2094
|
+
className: I("relative z-20", r),
|
|
2095
2095
|
...i
|
|
2096
2096
|
});
|
|
2097
2097
|
}
|
|
2098
2098
|
function Qt({ className: e, render: t, type: n, ...r }) {
|
|
2099
|
-
return
|
|
2099
|
+
return ne({
|
|
2100
2100
|
defaultTagName: "button",
|
|
2101
2101
|
props: te({
|
|
2102
2102
|
type: t ? n : n ?? "button",
|
|
2103
|
-
className:
|
|
2103
|
+
className: I("absolute inset-0 z-10 cursor-pointer rounded-[inherit] outline-none focus-visible:ring-2 focus-visible:ring-eds-blue-main/45", e)
|
|
2104
2104
|
}, r),
|
|
2105
2105
|
render: t,
|
|
2106
2106
|
state: { slot: "attachment-trigger" }
|
|
@@ -2110,7 +2110,7 @@ function $t({ className: e, ...t }) {
|
|
|
2110
2110
|
return /* @__PURE__ */ _("div", {
|
|
2111
2111
|
"data-eds-component": "AttachmentGroup",
|
|
2112
2112
|
"data-slot": "attachment-group",
|
|
2113
|
-
className:
|
|
2113
|
+
className: I("flex min-w-0 snap-x snap-mandatory scroll-px-1 gap-3 overflow-x-auto overscroll-x-contain py-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", "*:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start", e),
|
|
2114
2114
|
...t
|
|
2115
2115
|
});
|
|
2116
2116
|
}
|
|
@@ -2124,13 +2124,13 @@ var en = Object.assign(Gt, {
|
|
|
2124
2124
|
Action: Zt,
|
|
2125
2125
|
Trigger: Qt,
|
|
2126
2126
|
Group: $t
|
|
2127
|
-
}), tn =
|
|
2127
|
+
}), tn = I("relative flex size-[18px] shrink-0 items-center justify-center rounded-[4px] border border-eds-neutral-elements bg-white transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-eds-brand focus-visible:ring-offset-1", "data-checked:border-eds-blue-main data-checked:bg-eds-blue-main", "data-indeterminate:border-eds-blue-main data-indeterminate:bg-eds-blue-main", "data-disabled:cursor-not-allowed data-disabled:border-eds-neutral-disabled data-disabled:bg-eds-neutral-background data-disabled:opacity-70");
|
|
2128
2128
|
function nn({ className: e, ...t }) {
|
|
2129
|
-
return /* @__PURE__ */ _(
|
|
2129
|
+
return /* @__PURE__ */ _(O.Root, {
|
|
2130
2130
|
"data-eds-component": "Checkbox",
|
|
2131
|
-
className:
|
|
2131
|
+
className: I(tn, e),
|
|
2132
2132
|
...t,
|
|
2133
|
-
children: /* @__PURE__ */ _(
|
|
2133
|
+
children: /* @__PURE__ */ _(O.Indicator, {
|
|
2134
2134
|
keepMounted: !0,
|
|
2135
2135
|
className: "flex items-center justify-center text-white data-unchecked:invisible",
|
|
2136
2136
|
render: (e, t) => /* @__PURE__ */ _("span", {
|
|
@@ -2149,10 +2149,10 @@ function nn({ className: e, ...t }) {
|
|
|
2149
2149
|
});
|
|
2150
2150
|
}
|
|
2151
2151
|
function rn({ className: e, label: t, disabled: n, ...r }) {
|
|
2152
|
-
return t ? /* @__PURE__ */ _(
|
|
2153
|
-
className:
|
|
2154
|
-
children: /* @__PURE__ */ v(
|
|
2155
|
-
className:
|
|
2152
|
+
return t ? /* @__PURE__ */ _(re.Root, {
|
|
2153
|
+
className: I("inline-flex", e),
|
|
2154
|
+
children: /* @__PURE__ */ v(re.Label, {
|
|
2155
|
+
className: I("inline-flex min-h-7 cursor-pointer items-center gap-[9px] rounded-md pl-2 text-base leading-6 text-eds-default", n && "cursor-not-allowed opacity-70"),
|
|
2156
2156
|
children: [/* @__PURE__ */ _(nn, {
|
|
2157
2157
|
disabled: n,
|
|
2158
2158
|
...r
|
|
@@ -2173,6 +2173,7 @@ var on = {
|
|
|
2173
2173
|
sm: {
|
|
2174
2174
|
control: "h-9 px-3",
|
|
2175
2175
|
trigger: "h-9 px-3",
|
|
2176
|
+
triggerMultiple: "min-h-9 px-3 py-1",
|
|
2176
2177
|
text: "text-sm",
|
|
2177
2178
|
left: "left-3",
|
|
2178
2179
|
icon: "size-6",
|
|
@@ -2181,6 +2182,7 @@ var on = {
|
|
|
2181
2182
|
md: {
|
|
2182
2183
|
control: "h-10 px-3.5",
|
|
2183
2184
|
trigger: "h-10 px-3.5",
|
|
2185
|
+
triggerMultiple: "min-h-10 px-3.5 py-1.5",
|
|
2184
2186
|
text: "text-base",
|
|
2185
2187
|
left: "left-3.5",
|
|
2186
2188
|
icon: "size-7",
|
|
@@ -2189,6 +2191,7 @@ var on = {
|
|
|
2189
2191
|
lg: {
|
|
2190
2192
|
control: "h-12 px-4",
|
|
2191
2193
|
trigger: "h-12 px-4",
|
|
2194
|
+
triggerMultiple: "min-h-12 px-4 py-2",
|
|
2192
2195
|
text: "text-base",
|
|
2193
2196
|
left: "left-4",
|
|
2194
2197
|
icon: "size-8",
|
|
@@ -2209,133 +2212,172 @@ var Sn = {
|
|
|
2209
2212
|
default: "",
|
|
2210
2213
|
valid: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-green-main)_55%,var(--color-eds-outline-border))]",
|
|
2211
2214
|
invalid: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-red-main)_55%,var(--color-eds-outline-border))]"
|
|
2212
|
-
}, 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 =
|
|
2213
|
-
function
|
|
2214
|
-
let
|
|
2215
|
-
|
|
2216
|
-
},
|
|
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
|
+
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 ?? "", R = (e) => T ? T(e) : e.value ?? L(e), z = (e) => {
|
|
2218
|
+
C?.(e);
|
|
2219
|
+
}, ie = w ? (e) => w(e) : void 0, B = T ? (e) => T(e) : void 0, V = /* @__PURE__ */ v("div", {
|
|
2220
|
+
className: "inline-flex shrink-0 items-center",
|
|
2221
|
+
children: [/* @__PURE__ */ _(k.Clear, {
|
|
2222
|
+
className: I(Cn, N.icon),
|
|
2223
|
+
"aria-label": "Limpar seleção",
|
|
2224
|
+
"data-disabled": i || void 0,
|
|
2225
|
+
children: /* @__PURE__ */ _(m, {
|
|
2226
|
+
className: "size-4 shrink-0",
|
|
2227
|
+
strokeWidth: 2,
|
|
2228
|
+
"aria-hidden": !0
|
|
2229
|
+
})
|
|
2230
|
+
}), /* @__PURE__ */ _(k.Trigger, {
|
|
2231
|
+
className: I(Cn, N.icon),
|
|
2232
|
+
"aria-label": "Abrir lista",
|
|
2233
|
+
"data-disabled": i || void 0,
|
|
2234
|
+
children: /* @__PURE__ */ _(o, {
|
|
2235
|
+
className: "size-4 shrink-0",
|
|
2236
|
+
strokeWidth: 2,
|
|
2237
|
+
"aria-hidden": !0
|
|
2238
|
+
})
|
|
2239
|
+
})]
|
|
2240
|
+
}), ae = F ? /* @__PURE__ */ v("span", {
|
|
2241
|
+
className: xn(N.left),
|
|
2242
|
+
children: [/* @__PURE__ */ _("span", { children: e }), s && /* @__PURE__ */ _("span", {
|
|
2243
|
+
className: "text-eds-red-main",
|
|
2244
|
+
"aria-hidden": "true",
|
|
2245
|
+
children: "*"
|
|
2246
|
+
})]
|
|
2247
|
+
}) : null;
|
|
2217
2248
|
return /* @__PURE__ */ v("div", {
|
|
2218
|
-
className:
|
|
2249
|
+
className: I(cn, ne),
|
|
2219
2250
|
"data-fluid": c || void 0,
|
|
2220
2251
|
"data-eds-component": "Combobox",
|
|
2221
|
-
"data-label-variant":
|
|
2252
|
+
"data-label-variant": P,
|
|
2222
2253
|
children: [
|
|
2223
2254
|
/* @__PURE__ */ _("div", {
|
|
2224
2255
|
className: ln,
|
|
2225
2256
|
children: /* @__PURE__ */ v("label", {
|
|
2226
|
-
className:
|
|
2227
|
-
htmlFor:
|
|
2257
|
+
className: I(un, F && "sr-only", !F && "font-medium"),
|
|
2258
|
+
htmlFor: A,
|
|
2228
2259
|
children: [/* @__PURE__ */ _("span", { children: e }), s && /* @__PURE__ */ _("span", {
|
|
2229
2260
|
className: "text-eds-red-main",
|
|
2230
2261
|
children: "*"
|
|
2231
2262
|
})]
|
|
2232
2263
|
})
|
|
2233
2264
|
}),
|
|
2234
|
-
/* @__PURE__ */ v(
|
|
2265
|
+
/* @__PURE__ */ v(En, {
|
|
2235
2266
|
items: n,
|
|
2236
2267
|
name: y,
|
|
2268
|
+
multiple: b,
|
|
2237
2269
|
disabled: i,
|
|
2238
2270
|
required: s,
|
|
2239
|
-
onValueChange:
|
|
2240
|
-
...
|
|
2241
|
-
itemToStringLabel:
|
|
2242
|
-
itemToStringValue:
|
|
2243
|
-
children: [/* @__PURE__ */ v(
|
|
2244
|
-
className:
|
|
2271
|
+
onValueChange: C ? z : void 0,
|
|
2272
|
+
...x === void 0 ? S === void 0 ? {} : { defaultValue: S } : { value: x },
|
|
2273
|
+
itemToStringLabel: ie,
|
|
2274
|
+
itemToStringValue: B,
|
|
2275
|
+
children: [b ? /* @__PURE__ */ v(k.Chips, {
|
|
2276
|
+
className: I(mn, "h-auto flex-wrap content-start gap-1.5", N.triggerMultiple, Sn[l]),
|
|
2245
2277
|
"data-state": l,
|
|
2246
2278
|
"data-size": u,
|
|
2247
2279
|
"data-disabled": i || void 0,
|
|
2248
|
-
"data-floating":
|
|
2280
|
+
"data-floating": F || void 0,
|
|
2249
2281
|
children: [
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
children:
|
|
2282
|
+
ae,
|
|
2283
|
+
/* @__PURE__ */ _(k.Value, { children: (e) => e.map((e) => /* @__PURE__ */ v(k.Chip, {
|
|
2284
|
+
className: wn,
|
|
2285
|
+
children: [/* @__PURE__ */ _("span", {
|
|
2286
|
+
className: "truncate",
|
|
2287
|
+
children: te ? te(e) : L(e)
|
|
2288
|
+
}), /* @__PURE__ */ _(k.ChipRemove, {
|
|
2289
|
+
className: Tn,
|
|
2290
|
+
"aria-label": E ? E(e) : `Remover ${L(e)}`,
|
|
2291
|
+
children: /* @__PURE__ */ _(m, {
|
|
2292
|
+
size: 10,
|
|
2293
|
+
strokeWidth: 2.5,
|
|
2294
|
+
"aria-hidden": !0
|
|
2295
|
+
})
|
|
2256
2296
|
})]
|
|
2257
|
-
}),
|
|
2258
|
-
/* @__PURE__ */
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2297
|
+
}, R(e))) }),
|
|
2298
|
+
/* @__PURE__ */ v("div", {
|
|
2299
|
+
className: "flex min-w-[120px] flex-1 items-center gap-1",
|
|
2300
|
+
children: [/* @__PURE__ */ _(k.Input, {
|
|
2301
|
+
...O,
|
|
2302
|
+
id: A,
|
|
2303
|
+
className: I("min-w-0 flex-1 border-0 bg-transparent p-0 font-inherit text-eds-neutral-main outline-none disabled:cursor-not-allowed read-only:not-disabled:cursor-pointer", fn, N.text),
|
|
2304
|
+
placeholder: r,
|
|
2305
|
+
disabled: i,
|
|
2306
|
+
readOnly: h,
|
|
2307
|
+
required: s,
|
|
2308
|
+
"aria-invalid": j || void 0,
|
|
2309
|
+
"aria-describedby": M ? `${A}-desc` : void 0
|
|
2310
|
+
}), V]
|
|
2311
|
+
})
|
|
2312
|
+
]
|
|
2313
|
+
}) : /* @__PURE__ */ v(k.InputGroup, {
|
|
2314
|
+
className: I(mn, "box-border py-0", N.trigger, Sn[l]),
|
|
2315
|
+
"data-state": l,
|
|
2316
|
+
"data-size": u,
|
|
2317
|
+
"data-disabled": i || void 0,
|
|
2318
|
+
"data-floating": F || void 0,
|
|
2319
|
+
children: [
|
|
2320
|
+
ae,
|
|
2321
|
+
/* @__PURE__ */ _(k.Input, {
|
|
2322
|
+
...O,
|
|
2323
|
+
id: A,
|
|
2324
|
+
className: I("box-border min-w-0 flex-1 border-0 bg-transparent p-0 font-inherit text-eds-neutral-main outline-none disabled:cursor-not-allowed read-only:not-disabled:cursor-pointer", fn, N.text),
|
|
2262
2325
|
placeholder: r,
|
|
2263
2326
|
disabled: i,
|
|
2264
2327
|
readOnly: h,
|
|
2265
2328
|
required: s,
|
|
2266
|
-
"aria-invalid":
|
|
2267
|
-
"aria-describedby":
|
|
2329
|
+
"aria-invalid": j || void 0,
|
|
2330
|
+
"aria-describedby": M ? `${A}-desc` : void 0
|
|
2268
2331
|
}),
|
|
2269
|
-
|
|
2270
|
-
className: "inline-flex shrink-0 items-center",
|
|
2271
|
-
children: [/* @__PURE__ */ _(A.Clear, {
|
|
2272
|
-
className: L(Cn, j.icon),
|
|
2273
|
-
"aria-label": "Limpar seleção",
|
|
2274
|
-
"data-disabled": i || void 0,
|
|
2275
|
-
children: /* @__PURE__ */ _(m, {
|
|
2276
|
-
className: "size-4 shrink-0",
|
|
2277
|
-
strokeWidth: 2,
|
|
2278
|
-
"aria-hidden": !0
|
|
2279
|
-
})
|
|
2280
|
-
}), /* @__PURE__ */ _(A.Trigger, {
|
|
2281
|
-
className: L(Cn, j.icon),
|
|
2282
|
-
"aria-label": "Abrir lista",
|
|
2283
|
-
"data-disabled": i || void 0,
|
|
2284
|
-
children: /* @__PURE__ */ _(o, {
|
|
2285
|
-
className: "size-4 shrink-0",
|
|
2286
|
-
strokeWidth: 2,
|
|
2287
|
-
"aria-hidden": !0
|
|
2288
|
-
})
|
|
2289
|
-
})]
|
|
2290
|
-
})
|
|
2332
|
+
V
|
|
2291
2333
|
]
|
|
2292
|
-
}), /* @__PURE__ */ _(
|
|
2334
|
+
}), /* @__PURE__ */ _(k.Portal, { children: /* @__PURE__ */ _(k.Positioner, {
|
|
2293
2335
|
className: yn,
|
|
2294
2336
|
style: bn,
|
|
2295
2337
|
positionMethod: "fixed",
|
|
2296
2338
|
sideOffset: 4,
|
|
2297
|
-
children: /* @__PURE__ */ v(
|
|
2339
|
+
children: /* @__PURE__ */ v(k.Popup, {
|
|
2298
2340
|
className: hn,
|
|
2299
|
-
children: [/* @__PURE__ */ _(
|
|
2341
|
+
children: [/* @__PURE__ */ _(k.Empty, { children: /* @__PURE__ */ _("div", {
|
|
2300
2342
|
className: "px-3 py-2.5 text-sm text-eds-neutral-elements",
|
|
2301
2343
|
children: p
|
|
2302
|
-
}) }), /* @__PURE__ */ _(
|
|
2344
|
+
}) }), /* @__PURE__ */ _(k.List, {
|
|
2303
2345
|
className: gn,
|
|
2304
|
-
children: (e) => /* @__PURE__ */ v(
|
|
2346
|
+
children: (e) => /* @__PURE__ */ v(k.Item, {
|
|
2305
2347
|
value: e,
|
|
2306
2348
|
className: _n,
|
|
2307
|
-
children: [/* @__PURE__ */ _(
|
|
2349
|
+
children: [/* @__PURE__ */ _(k.ItemIndicator, {
|
|
2308
2350
|
className: vn,
|
|
2309
2351
|
children: /* @__PURE__ */ _(a, {
|
|
2310
2352
|
size: 14,
|
|
2311
2353
|
strokeWidth: 2.5,
|
|
2312
2354
|
"aria-hidden": !0
|
|
2313
2355
|
})
|
|
2314
|
-
}),
|
|
2356
|
+
}), D ? D(e) : /* @__PURE__ */ _("span", {
|
|
2315
2357
|
className: "block min-w-0 flex-1 text-left",
|
|
2316
|
-
children:
|
|
2358
|
+
children: L(e)
|
|
2317
2359
|
})]
|
|
2318
|
-
},
|
|
2360
|
+
}, R(e))
|
|
2319
2361
|
})]
|
|
2320
2362
|
})
|
|
2321
2363
|
}) })]
|
|
2322
2364
|
}),
|
|
2323
|
-
|
|
2324
|
-
id: `${
|
|
2365
|
+
M && /* @__PURE__ */ _("div", {
|
|
2366
|
+
id: `${A}-desc`,
|
|
2325
2367
|
className: "text-xs text-eds-neutral-elements data-[state=invalid]:text-eds-red-main",
|
|
2326
|
-
"data-state":
|
|
2327
|
-
children:
|
|
2368
|
+
"data-state": j ? "invalid" : void 0,
|
|
2369
|
+
children: j ? f : d
|
|
2328
2370
|
})
|
|
2329
2371
|
]
|
|
2330
2372
|
});
|
|
2331
2373
|
}
|
|
2332
2374
|
//#endregion
|
|
2333
2375
|
//#region src/components/DatePicker/DatePicker.tsx
|
|
2334
|
-
var
|
|
2376
|
+
var On = {
|
|
2335
2377
|
default: "",
|
|
2336
2378
|
valid: "not-focus-visible:border-[color-mix(in_srgb,var(--color-eds-green-main)_55%,var(--color-eds-outline-border))]",
|
|
2337
2379
|
invalid: "not-focus-visible:border-[color-mix(in_srgb,var(--color-eds-red-main)_55%,var(--color-eds-outline-border))]"
|
|
2338
|
-
},
|
|
2380
|
+
}, kn = [
|
|
2339
2381
|
"D",
|
|
2340
2382
|
"S",
|
|
2341
2383
|
"T",
|
|
@@ -2344,34 +2386,34 @@ var En = {
|
|
|
2344
2386
|
"S",
|
|
2345
2387
|
"S"
|
|
2346
2388
|
];
|
|
2347
|
-
function
|
|
2348
|
-
let n =
|
|
2349
|
-
for (let e = n; e <= r; e =
|
|
2389
|
+
function An(e, t) {
|
|
2390
|
+
let n = G(Ee(e), { weekStartsOn: t }), r = Oe(Te(e), { weekStartsOn: t }), i = [];
|
|
2391
|
+
for (let e = n; e <= r; e = de(e, 1)) i.push(e);
|
|
2350
2392
|
return i;
|
|
2351
2393
|
}
|
|
2352
|
-
function
|
|
2394
|
+
function jn(e) {
|
|
2353
2395
|
return e.mode === "range";
|
|
2354
2396
|
}
|
|
2355
|
-
function
|
|
2356
|
-
let { label: t = "Label", labelVariant: n, disabled: r = !1, required: a = !1, fluid: o = !1, state: l = "default", size: u = "md", supportingText: d = "", errorMessage: f = "Selecione uma data válida", id: p, weekStartsOn: m = 0, dateFormat: h = "dd/MM/yyyy", className: g } = e, y =
|
|
2397
|
+
function Mn(e) {
|
|
2398
|
+
let { label: t = "Label", labelVariant: n, disabled: r = !1, required: a = !1, fluid: o = !1, state: l = "default", size: u = "md", supportingText: d = "", errorMessage: f = "Selecione uma data válida", id: p, weekStartsOn: m = 0, dateFormat: h = "dd/MM/yyyy", className: g } = e, y = jn(e), b = e.placeholder ?? (y ? "Selecione um período" : "Selecione uma data"), x = ee(), S = p ?? x, C = l === "invalid", T = C || d, D = on[u], te = u === "lg" ? "size-5" : "size-4", ne = an(n), O = ne === "floating", re = jn(e) ? {
|
|
2357
2399
|
from: e.defaultValue?.from ?? null,
|
|
2358
2400
|
to: e.defaultValue?.to ?? null
|
|
2359
2401
|
} : {
|
|
2360
2402
|
from: e.defaultValue ?? null,
|
|
2361
2403
|
to: null
|
|
2362
|
-
},
|
|
2404
|
+
}, k = jn(e) ? e.value === void 0 ? void 0 : {
|
|
2363
2405
|
from: e.value?.from ?? null,
|
|
2364
2406
|
to: e.value?.to ?? null
|
|
2365
2407
|
} : e.value === void 0 ? void 0 : {
|
|
2366
2408
|
from: e.value ?? null,
|
|
2367
2409
|
to: null
|
|
2368
|
-
},
|
|
2369
|
-
function
|
|
2370
|
-
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, [R, z] = E(!1), [ie, B] = E(() => P.from ?? e.defaultMonth ?? /* @__PURE__ */ new Date()), V = w(() => [...kn.slice(m), ...kn.slice(0, m)], [m]), ae = w(() => Array.from({ length: F }, (e, t) => fe(ie, t)), [ie, F]);
|
|
2411
|
+
function H(t) {
|
|
2412
|
+
r || (t && B(P.from ?? e.defaultMonth ?? /* @__PURE__ */ new Date()), z(t));
|
|
2371
2413
|
}
|
|
2372
|
-
function
|
|
2373
|
-
if (
|
|
2374
|
-
let n =
|
|
2414
|
+
function oe(t) {
|
|
2415
|
+
if (jn(e)) {
|
|
2416
|
+
let n = P, r;
|
|
2375
2417
|
r = !n.from || n.to ? {
|
|
2376
2418
|
from: t,
|
|
2377
2419
|
to: null
|
|
@@ -2381,41 +2423,41 @@ function An(e) {
|
|
|
2381
2423
|
} : {
|
|
2382
2424
|
from: n.from,
|
|
2383
2425
|
to: t
|
|
2384
|
-
},
|
|
2426
|
+
}, j || N(r), r.from && e.onValueChange?.({
|
|
2385
2427
|
from: r.from,
|
|
2386
2428
|
to: r.to ?? void 0
|
|
2387
|
-
}), r.from && r.to &&
|
|
2429
|
+
}), r.from && r.to && z(!1);
|
|
2388
2430
|
return;
|
|
2389
2431
|
}
|
|
2390
|
-
|
|
2432
|
+
j || N({
|
|
2391
2433
|
from: t,
|
|
2392
2434
|
to: null
|
|
2393
|
-
}), e.onValueChange?.(t),
|
|
2435
|
+
}), e.onValueChange?.(t), z(!1);
|
|
2394
2436
|
}
|
|
2395
|
-
function
|
|
2437
|
+
function se(t) {
|
|
2396
2438
|
let n = {
|
|
2397
2439
|
from: t.from,
|
|
2398
2440
|
to: t.to ?? null
|
|
2399
2441
|
};
|
|
2400
|
-
|
|
2442
|
+
j || N(n), jn(e) && e.onValueChange?.({
|
|
2401
2443
|
from: t.from,
|
|
2402
2444
|
to: t.to ?? void 0
|
|
2403
|
-
}),
|
|
2445
|
+
}), B(t.from);
|
|
2404
2446
|
}
|
|
2405
|
-
function
|
|
2406
|
-
return !
|
|
2447
|
+
function ce(e) {
|
|
2448
|
+
return !P.from || !P.to || !e.range.to ? !1 : Se(P.from, e.range.from) && Se(P.to, e.range.to);
|
|
2407
2449
|
}
|
|
2408
|
-
let
|
|
2450
|
+
let le = P.from ? !y || !P.to ? J(P.from, h) : `${J(P.from, h)} - ${J(P.to, h)}` : b;
|
|
2409
2451
|
return /* @__PURE__ */ v("div", {
|
|
2410
|
-
className:
|
|
2452
|
+
className: I(cn, g),
|
|
2411
2453
|
"data-fluid": o || void 0,
|
|
2412
2454
|
"data-eds-component": "DatePicker",
|
|
2413
|
-
"data-label-variant":
|
|
2455
|
+
"data-label-variant": ne,
|
|
2414
2456
|
children: [
|
|
2415
2457
|
/* @__PURE__ */ _("div", {
|
|
2416
2458
|
className: ln,
|
|
2417
2459
|
children: /* @__PURE__ */ v("label", {
|
|
2418
|
-
className:
|
|
2460
|
+
className: I(un, O && "sr-only", !O && "font-medium"),
|
|
2419
2461
|
htmlFor: S,
|
|
2420
2462
|
children: [/* @__PURE__ */ _("span", { children: t }), a && /* @__PURE__ */ _("span", {
|
|
2421
2463
|
className: "text-eds-red-main",
|
|
@@ -2423,19 +2465,19 @@ function An(e) {
|
|
|
2423
2465
|
})]
|
|
2424
2466
|
})
|
|
2425
2467
|
}),
|
|
2426
|
-
/* @__PURE__ */ v(
|
|
2427
|
-
open:
|
|
2428
|
-
onOpenChange:
|
|
2429
|
-
children: [/* @__PURE__ */ v(
|
|
2468
|
+
/* @__PURE__ */ v(A.Root, {
|
|
2469
|
+
open: R,
|
|
2470
|
+
onOpenChange: H,
|
|
2471
|
+
children: [/* @__PURE__ */ v(A.Trigger, {
|
|
2430
2472
|
id: S,
|
|
2431
2473
|
disabled: r,
|
|
2432
|
-
className:
|
|
2474
|
+
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", D.trigger, On[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"),
|
|
2433
2475
|
"data-state": l,
|
|
2434
2476
|
"data-size": u,
|
|
2435
2477
|
"data-disabled": r || void 0,
|
|
2436
2478
|
"aria-describedby": T ? `${S}-desc` : void 0,
|
|
2437
2479
|
children: [
|
|
2438
|
-
|
|
2480
|
+
O && /* @__PURE__ */ v("span", {
|
|
2439
2481
|
className: xn(D.left),
|
|
2440
2482
|
children: [/* @__PURE__ */ _("span", { children: t }), a && /* @__PURE__ */ _("span", {
|
|
2441
2483
|
className: "text-eds-red-main",
|
|
@@ -2444,37 +2486,37 @@ function An(e) {
|
|
|
2444
2486
|
})]
|
|
2445
2487
|
}),
|
|
2446
2488
|
/* @__PURE__ */ _(i, {
|
|
2447
|
-
className:
|
|
2489
|
+
className: I("shrink-0 text-eds-neutral-elements", te),
|
|
2448
2490
|
"aria-hidden": !0
|
|
2449
2491
|
}),
|
|
2450
2492
|
/* @__PURE__ */ _("span", {
|
|
2451
|
-
className:
|
|
2452
|
-
children:
|
|
2493
|
+
className: I("min-w-0 flex-1 truncate font-inherit", D.text, P.from ? "text-eds-neutral-main" : dn),
|
|
2494
|
+
children: le
|
|
2453
2495
|
})
|
|
2454
2496
|
]
|
|
2455
|
-
}), /* @__PURE__ */ _(
|
|
2497
|
+
}), /* @__PURE__ */ _(A.Portal, { children: /* @__PURE__ */ _(A.Positioner, {
|
|
2456
2498
|
className: yn,
|
|
2457
2499
|
style: bn,
|
|
2458
2500
|
positionMethod: "fixed",
|
|
2459
2501
|
sideOffset: 4,
|
|
2460
2502
|
align: "start",
|
|
2461
|
-
children: /* @__PURE__ */ v(
|
|
2503
|
+
children: /* @__PURE__ */ v(A.Popup, {
|
|
2462
2504
|
"data-eds-component": "DatePicker",
|
|
2463
2505
|
className: "flex overflow-hidden rounded-eds-xs border border-eds-outline-border bg-white shadow-[0_4px_6px_-1px_rgb(0_0_0_/_0.07),0_2px_4px_-2px_rgb(0_0_0_/_0.06)] transition-all data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
|
2464
|
-
children: [
|
|
2506
|
+
children: [L && L.length > 0 && /* @__PURE__ */ _("div", {
|
|
2465
2507
|
className: "flex w-40 shrink-0 flex-col gap-0.5 border-r border-eds-outline-border p-2 text-sm",
|
|
2466
|
-
children:
|
|
2508
|
+
children: L.map((e) => /* @__PURE__ */ _("button", {
|
|
2467
2509
|
type: "button",
|
|
2468
|
-
onClick: () =>
|
|
2469
|
-
className:
|
|
2510
|
+
onClick: () => se(e.range),
|
|
2511
|
+
className: I("rounded-md px-3 py-1.5 text-left whitespace-nowrap", ce(e) ? "bg-eds-blue-main text-white" : "text-eds-neutral-main hover:bg-eds-neutral-background"),
|
|
2470
2512
|
children: e.label
|
|
2471
2513
|
}, e.label))
|
|
2472
2514
|
}), /* @__PURE__ */ _("div", {
|
|
2473
2515
|
className: "flex",
|
|
2474
|
-
children:
|
|
2475
|
-
let n = t === 0, r = t ===
|
|
2516
|
+
children: ae.map((e, t) => {
|
|
2517
|
+
let n = t === 0, r = t === ae.length - 1, i = An(e, m);
|
|
2476
2518
|
return /* @__PURE__ */ v("div", {
|
|
2477
|
-
className:
|
|
2519
|
+
className: I("w-[284px] shrink-0", !n && "border-l border-eds-outline-border"),
|
|
2478
2520
|
children: [/* @__PURE__ */ v("div", {
|
|
2479
2521
|
className: "flex items-center gap-2.5 p-4",
|
|
2480
2522
|
children: [
|
|
@@ -2482,7 +2524,7 @@ function An(e) {
|
|
|
2482
2524
|
icon: s,
|
|
2483
2525
|
label: "Mês anterior",
|
|
2484
2526
|
size: "sm",
|
|
2485
|
-
onClick: () =>
|
|
2527
|
+
onClick: () => B((e) => wt(e, 1))
|
|
2486
2528
|
}) : /* @__PURE__ */ _("span", {
|
|
2487
2529
|
className: "size-8 shrink-0",
|
|
2488
2530
|
"aria-hidden": !0
|
|
@@ -2495,7 +2537,7 @@ function An(e) {
|
|
|
2495
2537
|
icon: c,
|
|
2496
2538
|
label: "Próximo mês",
|
|
2497
2539
|
size: "sm",
|
|
2498
|
-
onClick: () =>
|
|
2540
|
+
onClick: () => B((e) => fe(e, 1))
|
|
2499
2541
|
}) : /* @__PURE__ */ _("span", {
|
|
2500
2542
|
className: "size-8 shrink-0",
|
|
2501
2543
|
"aria-hidden": !0
|
|
@@ -2503,19 +2545,19 @@ function An(e) {
|
|
|
2503
2545
|
]
|
|
2504
2546
|
}), /* @__PURE__ */ v("div", {
|
|
2505
2547
|
className: "grid grid-cols-7 px-4 pb-4",
|
|
2506
|
-
children: [
|
|
2548
|
+
children: [V.map((e, t) => /* @__PURE__ */ _("span", {
|
|
2507
2549
|
className: "pb-2 text-center text-xs font-medium text-eds-neutral-main",
|
|
2508
2550
|
children: e
|
|
2509
2551
|
}, `${e}-${t}`)), i.map((t) => {
|
|
2510
|
-
let n = yt(t, e), r = bt(t), i = y &&
|
|
2552
|
+
let n = yt(t, e), r = bt(t), i = y && P.from ? Se(t, P.from) : !1, a = y && P.to ? Se(t, P.to) : !1, o = !!(y && P.from && P.to && !Se(P.from, P.to)), s = o && P.from && P.to ? _t(t, P.from) && vt(t, P.to) : !1, c = y ? i || a : P.from ? Se(t, P.from) : !1;
|
|
2511
2553
|
return /* @__PURE__ */ _("div", {
|
|
2512
|
-
className:
|
|
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"),
|
|
2513
2555
|
children: /* @__PURE__ */ _("button", {
|
|
2514
2556
|
type: "button",
|
|
2515
|
-
onClick: () =>
|
|
2557
|
+
onClick: () => oe(t),
|
|
2516
2558
|
"data-selected": c || void 0,
|
|
2517
2559
|
"data-today": r || void 0,
|
|
2518
|
-
className:
|
|
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"),
|
|
2519
2561
|
children: J(t, "d")
|
|
2520
2562
|
})
|
|
2521
2563
|
}, t.toISOString());
|
|
@@ -2538,11 +2580,11 @@ function An(e) {
|
|
|
2538
2580
|
}
|
|
2539
2581
|
//#endregion
|
|
2540
2582
|
//#region src/components/DateTimePicker/DateTimePicker.tsx
|
|
2541
|
-
var
|
|
2583
|
+
var Nn = {
|
|
2542
2584
|
default: "",
|
|
2543
2585
|
valid: "not-focus-visible:border-[color-mix(in_srgb,var(--color-eds-green-main)_55%,var(--color-eds-outline-border))]",
|
|
2544
2586
|
invalid: "not-focus-visible:border-[color-mix(in_srgb,var(--color-eds-red-main)_55%,var(--color-eds-outline-border))]"
|
|
2545
|
-
},
|
|
2587
|
+
}, Pn = [
|
|
2546
2588
|
"D",
|
|
2547
2589
|
"S",
|
|
2548
2590
|
"T",
|
|
@@ -2551,103 +2593,103 @@ var jn = {
|
|
|
2551
2593
|
"S",
|
|
2552
2594
|
"S"
|
|
2553
2595
|
];
|
|
2554
|
-
function
|
|
2555
|
-
let n =
|
|
2556
|
-
for (let e = n; e <= r; e =
|
|
2596
|
+
function Fn(e, t) {
|
|
2597
|
+
let n = G(Ee(e), { weekStartsOn: t }), r = Oe(Te(e), { weekStartsOn: t }), i = [];
|
|
2598
|
+
for (let e = n; e <= r; e = de(e, 1)) i.push(e);
|
|
2557
2599
|
return i;
|
|
2558
2600
|
}
|
|
2559
|
-
function
|
|
2601
|
+
function In(e, t) {
|
|
2560
2602
|
let n = t ? ht(t) : 0, r = t ? gt(t) : 0;
|
|
2561
2603
|
return Ct(St(xt(e, n), r), 0);
|
|
2562
2604
|
}
|
|
2563
|
-
function
|
|
2605
|
+
function Ln(e, t) {
|
|
2564
2606
|
let n = Math.round(e / t) * t;
|
|
2565
2607
|
return Math.min(59, Math.max(0, n >= 60 ? 60 - t : n));
|
|
2566
2608
|
}
|
|
2567
|
-
function
|
|
2609
|
+
function Rn(e) {
|
|
2568
2610
|
let t = Math.max(1, Math.min(30, Math.floor(e))), n = [];
|
|
2569
2611
|
for (let e = 0; e < 60; e += t) n.push(e);
|
|
2570
2612
|
return n;
|
|
2571
2613
|
}
|
|
2572
|
-
var
|
|
2573
|
-
function
|
|
2574
|
-
let te = ee(),
|
|
2614
|
+
var zn = Array.from({ length: 24 }, (e, t) => t);
|
|
2615
|
+
function Bn({ 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, value: b, defaultValue: x = null, onValueChange: S, className: D }) {
|
|
2616
|
+
let te = ee(), ne = p ?? te, O = l === "invalid", re = O || d, k = on[u], j = u === "lg" ? "size-5" : "size-4", M = an(t), N = M === "floating", P = b !== void 0, [F, L] = E(x), R = P ? b ?? null : F, [z, ie] = E(!1), [B, V] = E(() => R ?? h ?? /* @__PURE__ */ new Date()), [H, oe] = E(R), se = T(null), ce = T(null), le = w(() => Rn(y), [y]), ue = w(() => [...Pn.slice(m), ...Pn.slice(0, m)], [m]), U = w(() => Fn(B, m), [B, m]), W = H ? ht(H) : 0, de = H ? Ln(gt(H), y) : 0;
|
|
2575
2617
|
C(() => {
|
|
2576
|
-
if (!
|
|
2618
|
+
if (!z) return;
|
|
2577
2619
|
let e = (e, t, n) => {
|
|
2578
2620
|
(e?.querySelector(`[data-${t}="${n}"]`))?.scrollIntoView({ block: "center" });
|
|
2579
2621
|
};
|
|
2580
2622
|
requestAnimationFrame(() => {
|
|
2581
|
-
e(
|
|
2623
|
+
e(se.current, "hour", W), e(ce.current, "minute", de);
|
|
2582
2624
|
});
|
|
2583
2625
|
}, [
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2626
|
+
z,
|
|
2627
|
+
W,
|
|
2628
|
+
de
|
|
2587
2629
|
]);
|
|
2588
|
-
function fe(e) {
|
|
2589
|
-
F || R(e), S?.(e);
|
|
2590
|
-
}
|
|
2591
2630
|
function pe(e) {
|
|
2631
|
+
P || L(e), S?.(e);
|
|
2632
|
+
}
|
|
2633
|
+
function me(e) {
|
|
2592
2634
|
if (!i) {
|
|
2593
2635
|
if (e) {
|
|
2594
|
-
let e =
|
|
2595
|
-
|
|
2636
|
+
let e = R ?? h ?? /* @__PURE__ */ new Date(), t = St(e, Ln(gt(e), y));
|
|
2637
|
+
oe(R ? t : null), V(R ?? h ?? /* @__PURE__ */ new Date());
|
|
2596
2638
|
}
|
|
2597
|
-
|
|
2639
|
+
ie(e);
|
|
2598
2640
|
}
|
|
2599
2641
|
}
|
|
2600
|
-
function
|
|
2601
|
-
let t =
|
|
2602
|
-
|
|
2642
|
+
function G(e) {
|
|
2643
|
+
let t = In(e, H ?? R), n = St(t, Ln(gt(t), y));
|
|
2644
|
+
oe(n), pe(n);
|
|
2603
2645
|
}
|
|
2604
|
-
function
|
|
2605
|
-
let t =
|
|
2606
|
-
|
|
2646
|
+
function K(e) {
|
|
2647
|
+
let t = H ?? R ?? /* @__PURE__ */ new Date(), n = Ct(St(xt(t, e), Ln(gt(t), y)), 0);
|
|
2648
|
+
oe(n), pe(n);
|
|
2607
2649
|
}
|
|
2608
2650
|
function he(e) {
|
|
2609
|
-
let t = Ct(St(
|
|
2610
|
-
|
|
2651
|
+
let t = Ct(St(H ?? R ?? /* @__PURE__ */ new Date(), e), 0);
|
|
2652
|
+
oe(t), pe(t);
|
|
2611
2653
|
}
|
|
2612
2654
|
function ge() {
|
|
2613
|
-
let e = /* @__PURE__ */ new Date(), t = Ct(St(e,
|
|
2614
|
-
|
|
2655
|
+
let e = /* @__PURE__ */ new Date(), t = Ct(St(e, Ln(gt(e), y)), 0);
|
|
2656
|
+
oe(t), V(t), pe(t);
|
|
2615
2657
|
}
|
|
2616
2658
|
function _e() {
|
|
2617
|
-
|
|
2659
|
+
H && pe(H), ie(!1);
|
|
2618
2660
|
}
|
|
2619
|
-
let ve =
|
|
2661
|
+
let ve = R ? J(R, g) : n;
|
|
2620
2662
|
return /* @__PURE__ */ v("div", {
|
|
2621
|
-
className:
|
|
2663
|
+
className: I(cn, D),
|
|
2622
2664
|
"data-fluid": o || void 0,
|
|
2623
2665
|
"data-eds-component": "DateTimePicker",
|
|
2624
|
-
"data-label-variant":
|
|
2666
|
+
"data-label-variant": M,
|
|
2625
2667
|
children: [
|
|
2626
2668
|
/* @__PURE__ */ _("div", {
|
|
2627
2669
|
className: ln,
|
|
2628
2670
|
children: /* @__PURE__ */ v("label", {
|
|
2629
|
-
className:
|
|
2630
|
-
htmlFor:
|
|
2671
|
+
className: I(un, N && "sr-only", !N && "font-medium"),
|
|
2672
|
+
htmlFor: ne,
|
|
2631
2673
|
children: [/* @__PURE__ */ _("span", { children: e }), a && /* @__PURE__ */ _("span", {
|
|
2632
2674
|
className: "text-eds-red-main",
|
|
2633
2675
|
children: "*"
|
|
2634
2676
|
})]
|
|
2635
2677
|
})
|
|
2636
2678
|
}),
|
|
2637
|
-
/* @__PURE__ */ v(
|
|
2638
|
-
open:
|
|
2639
|
-
onOpenChange:
|
|
2640
|
-
children: [/* @__PURE__ */ v(
|
|
2641
|
-
id:
|
|
2679
|
+
/* @__PURE__ */ v(A.Root, {
|
|
2680
|
+
open: z,
|
|
2681
|
+
onOpenChange: me,
|
|
2682
|
+
children: [/* @__PURE__ */ v(A.Trigger, {
|
|
2683
|
+
id: ne,
|
|
2642
2684
|
disabled: i,
|
|
2643
|
-
className:
|
|
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", k.trigger, Nn[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"),
|
|
2644
2686
|
"data-state": l,
|
|
2645
2687
|
"data-size": u,
|
|
2646
2688
|
"data-disabled": i || void 0,
|
|
2647
|
-
"aria-describedby":
|
|
2689
|
+
"aria-describedby": re ? `${ne}-desc` : void 0,
|
|
2648
2690
|
children: [
|
|
2649
|
-
|
|
2650
|
-
className: xn(
|
|
2691
|
+
N && /* @__PURE__ */ v("span", {
|
|
2692
|
+
className: xn(k.left),
|
|
2651
2693
|
children: [/* @__PURE__ */ _("span", { children: e }), a && /* @__PURE__ */ _("span", {
|
|
2652
2694
|
className: "text-eds-red-main",
|
|
2653
2695
|
"aria-hidden": "true",
|
|
@@ -2655,21 +2697,21 @@ function Rn({ label: e = "Label", labelVariant: t, placeholder: n = "Selecione d
|
|
|
2655
2697
|
})]
|
|
2656
2698
|
}),
|
|
2657
2699
|
/* @__PURE__ */ _(r, {
|
|
2658
|
-
className:
|
|
2700
|
+
className: I("shrink-0 text-eds-neutral-elements", j),
|
|
2659
2701
|
"aria-hidden": !0
|
|
2660
2702
|
}),
|
|
2661
2703
|
/* @__PURE__ */ _("span", {
|
|
2662
|
-
className:
|
|
2704
|
+
className: I("min-w-0 flex-1 truncate font-inherit", k.text, R ? "text-eds-neutral-main" : dn),
|
|
2663
2705
|
children: ve
|
|
2664
2706
|
})
|
|
2665
2707
|
]
|
|
2666
|
-
}), /* @__PURE__ */ _(
|
|
2708
|
+
}), /* @__PURE__ */ _(A.Portal, { children: /* @__PURE__ */ _(A.Positioner, {
|
|
2667
2709
|
className: yn,
|
|
2668
2710
|
style: bn,
|
|
2669
2711
|
positionMethod: "fixed",
|
|
2670
2712
|
sideOffset: 4,
|
|
2671
2713
|
align: "start",
|
|
2672
|
-
children: /* @__PURE__ */ v(
|
|
2714
|
+
children: /* @__PURE__ */ v(A.Popup, {
|
|
2673
2715
|
"data-eds-component": "DateTimePicker",
|
|
2674
2716
|
className: "flex flex-col overflow-hidden rounded-eds-xs border border-eds-outline-border bg-white shadow-[0_4px_6px_-1px_rgb(0_0_0_/_0.07),0_2px_4px_-2px_rgb(0_0_0_/_0.06)] transition-all data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
|
2675
2717
|
children: [/* @__PURE__ */ v("div", {
|
|
@@ -2683,34 +2725,34 @@ function Rn({ label: e = "Label", labelVariant: t, placeholder: n = "Selecione d
|
|
|
2683
2725
|
icon: s,
|
|
2684
2726
|
label: "Mês anterior",
|
|
2685
2727
|
size: "sm",
|
|
2686
|
-
onClick: () =>
|
|
2728
|
+
onClick: () => V((e) => wt(e, 1))
|
|
2687
2729
|
}),
|
|
2688
2730
|
/* @__PURE__ */ _("span", {
|
|
2689
2731
|
className: "flex-1 text-center text-base font-medium text-eds-neutral-main capitalize",
|
|
2690
|
-
children: J(
|
|
2732
|
+
children: J(B, "MMMM yyyy", { locale: kt })
|
|
2691
2733
|
}),
|
|
2692
2734
|
/* @__PURE__ */ _(jt, {
|
|
2693
2735
|
icon: c,
|
|
2694
2736
|
label: "Próximo mês",
|
|
2695
2737
|
size: "sm",
|
|
2696
|
-
onClick: () =>
|
|
2738
|
+
onClick: () => V((e) => fe(e, 1))
|
|
2697
2739
|
})
|
|
2698
2740
|
]
|
|
2699
2741
|
}), /* @__PURE__ */ v("div", {
|
|
2700
2742
|
className: "grid grid-cols-7 px-4 pb-4",
|
|
2701
|
-
children: [
|
|
2743
|
+
children: [ue.map((e, t) => /* @__PURE__ */ _("span", {
|
|
2702
2744
|
className: "pb-2 text-center text-xs font-medium text-eds-neutral-main",
|
|
2703
2745
|
children: e
|
|
2704
|
-
}, `${e}-${t}`)),
|
|
2705
|
-
let t = yt(e,
|
|
2746
|
+
}, `${e}-${t}`)), U.map((e) => {
|
|
2747
|
+
let t = yt(e, B), n = bt(e), r = H ? Se(e, H) : !1;
|
|
2706
2748
|
return /* @__PURE__ */ _("div", {
|
|
2707
2749
|
className: "flex items-center justify-center py-0.5",
|
|
2708
2750
|
children: /* @__PURE__ */ _("button", {
|
|
2709
2751
|
type: "button",
|
|
2710
|
-
onClick: () =>
|
|
2752
|
+
onClick: () => G(e),
|
|
2711
2753
|
"data-selected": r || void 0,
|
|
2712
2754
|
"data-today": n || void 0,
|
|
2713
|
-
className:
|
|
2755
|
+
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"),
|
|
2714
2756
|
children: J(e, "d")
|
|
2715
2757
|
})
|
|
2716
2758
|
}, e.toISOString());
|
|
@@ -2724,19 +2766,19 @@ function Rn({ label: e = "Label", labelVariant: t, placeholder: n = "Selecione d
|
|
|
2724
2766
|
className: "px-2 pt-3 pb-1 text-center text-xs font-medium text-eds-neutral-elements",
|
|
2725
2767
|
children: "Hora"
|
|
2726
2768
|
}), /* @__PURE__ */ _("div", {
|
|
2727
|
-
ref:
|
|
2769
|
+
ref: se,
|
|
2728
2770
|
className: "flex max-h-[248px] flex-col gap-0.5 overflow-y-auto overscroll-contain px-2 pb-3",
|
|
2729
2771
|
role: "listbox",
|
|
2730
2772
|
"aria-label": "Hora",
|
|
2731
|
-
children:
|
|
2732
|
-
let t =
|
|
2773
|
+
children: zn.map((e) => {
|
|
2774
|
+
let t = W === e;
|
|
2733
2775
|
return /* @__PURE__ */ _("button", {
|
|
2734
2776
|
type: "button",
|
|
2735
2777
|
role: "option",
|
|
2736
2778
|
"aria-selected": t,
|
|
2737
2779
|
"data-hour": e,
|
|
2738
|
-
onClick: () =>
|
|
2739
|
-
className:
|
|
2780
|
+
onClick: () => K(e),
|
|
2781
|
+
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"),
|
|
2740
2782
|
children: String(e).padStart(2, "0")
|
|
2741
2783
|
}, e);
|
|
2742
2784
|
})
|
|
@@ -2747,19 +2789,19 @@ function Rn({ label: e = "Label", labelVariant: t, placeholder: n = "Selecione d
|
|
|
2747
2789
|
className: "px-2 pt-3 pb-1 text-center text-xs font-medium text-eds-neutral-elements",
|
|
2748
2790
|
children: "Min"
|
|
2749
2791
|
}), /* @__PURE__ */ _("div", {
|
|
2750
|
-
ref:
|
|
2792
|
+
ref: ce,
|
|
2751
2793
|
className: "flex max-h-[248px] flex-col gap-0.5 overflow-y-auto overscroll-contain px-2 pb-3",
|
|
2752
2794
|
role: "listbox",
|
|
2753
2795
|
"aria-label": "Minuto",
|
|
2754
|
-
children:
|
|
2755
|
-
let t =
|
|
2796
|
+
children: le.map((e) => {
|
|
2797
|
+
let t = de === e;
|
|
2756
2798
|
return /* @__PURE__ */ _("button", {
|
|
2757
2799
|
type: "button",
|
|
2758
2800
|
role: "option",
|
|
2759
2801
|
"aria-selected": t,
|
|
2760
2802
|
"data-minute": e,
|
|
2761
2803
|
onClick: () => he(e),
|
|
2762
|
-
className:
|
|
2804
|
+
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"),
|
|
2763
2805
|
children: String(e).padStart(2, "0")
|
|
2764
2806
|
}, e);
|
|
2765
2807
|
})
|
|
@@ -2768,33 +2810,33 @@ function Rn({ label: e = "Label", labelVariant: t, placeholder: n = "Selecione d
|
|
|
2768
2810
|
})]
|
|
2769
2811
|
}), /* @__PURE__ */ v("div", {
|
|
2770
2812
|
className: "flex items-center justify-between gap-2 border-t border-eds-outline-border bg-eds-neutral-background px-3 py-2.5",
|
|
2771
|
-
children: [/* @__PURE__ */ _(
|
|
2813
|
+
children: [/* @__PURE__ */ _(ae, {
|
|
2772
2814
|
text: "Agora",
|
|
2773
2815
|
variant: "ghost",
|
|
2774
2816
|
size: "sm",
|
|
2775
2817
|
onClick: ge
|
|
2776
|
-
}), /* @__PURE__ */ _(
|
|
2818
|
+
}), /* @__PURE__ */ _(ae, {
|
|
2777
2819
|
text: "Confirmar",
|
|
2778
2820
|
size: "sm",
|
|
2779
2821
|
onClick: _e,
|
|
2780
|
-
disabled: !
|
|
2822
|
+
disabled: !H
|
|
2781
2823
|
})]
|
|
2782
2824
|
})]
|
|
2783
2825
|
})
|
|
2784
2826
|
}) })]
|
|
2785
2827
|
}),
|
|
2786
|
-
|
|
2787
|
-
id: `${
|
|
2828
|
+
re && /* @__PURE__ */ _("div", {
|
|
2829
|
+
id: `${ne}-desc`,
|
|
2788
2830
|
className: "text-xs text-eds-neutral-elements data-[state=invalid]:text-eds-red-main",
|
|
2789
|
-
"data-state":
|
|
2790
|
-
children:
|
|
2831
|
+
"data-state": O ? "invalid" : l,
|
|
2832
|
+
children: O ? f : d
|
|
2791
2833
|
})
|
|
2792
2834
|
]
|
|
2793
2835
|
});
|
|
2794
2836
|
}
|
|
2795
2837
|
//#endregion
|
|
2796
2838
|
//#region src/components/Dialog/Dialog.tsx
|
|
2797
|
-
var
|
|
2839
|
+
var Vn = { size: {
|
|
2798
2840
|
sm: {
|
|
2799
2841
|
classes: "sm:max-w-xs",
|
|
2800
2842
|
description: "Small dialog for simple confirmations (288px)"
|
|
@@ -2811,21 +2853,21 @@ var zn = { size: {
|
|
|
2811
2853
|
classes: "sm:max-w-3xl",
|
|
2812
2854
|
description: "Extra large dialog for detailed views (768px)"
|
|
2813
2855
|
}
|
|
2814
|
-
} },
|
|
2815
|
-
function
|
|
2816
|
-
return S(
|
|
2856
|
+
} }, Hn = { size: "md" }, Un = b("dialog");
|
|
2857
|
+
function Wn() {
|
|
2858
|
+
return S(Un);
|
|
2817
2859
|
}
|
|
2818
|
-
function
|
|
2819
|
-
return
|
|
2860
|
+
function Gn({ size: e = Hn.size } = {}) {
|
|
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(Vn.size, e, Hn.size).classes);
|
|
2820
2862
|
}
|
|
2821
|
-
function
|
|
2822
|
-
let i =
|
|
2863
|
+
function Kn({ className: e, children: t, size: n, showCloseButton: r = !0 }) {
|
|
2864
|
+
let i = Wn(), 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;
|
|
2823
2865
|
return /* @__PURE__ */ v(a, { children: [/* @__PURE__ */ _(o, {
|
|
2824
|
-
className:
|
|
2866
|
+
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),
|
|
2825
2867
|
style: { zIndex: sn.overlayValue }
|
|
2826
2868
|
}), /* @__PURE__ */ v(s, {
|
|
2827
2869
|
"data-eds-component": "Dialog",
|
|
2828
|
-
className:
|
|
2870
|
+
className: I(Gn({ size: n }), e),
|
|
2829
2871
|
style: { zIndex: sn.overlayValue },
|
|
2830
2872
|
children: [t, r ? /* @__PURE__ */ _(c, {
|
|
2831
2873
|
"data-eds-component": "Dialog",
|
|
@@ -2838,105 +2880,105 @@ function Wn({ className: e, children: t, size: n, showCloseButton: r = !0 }) {
|
|
|
2838
2880
|
}) : null]
|
|
2839
2881
|
})] });
|
|
2840
2882
|
}
|
|
2841
|
-
function
|
|
2883
|
+
function qn(e) {
|
|
2842
2884
|
if (e.role === "alertdialog") {
|
|
2843
2885
|
let { children: t, role: n, ...r } = e;
|
|
2844
|
-
return /* @__PURE__ */ _(
|
|
2886
|
+
return /* @__PURE__ */ _(Un.Provider, {
|
|
2845
2887
|
value: n,
|
|
2846
|
-
children: /* @__PURE__ */ _(
|
|
2888
|
+
children: /* @__PURE__ */ _(M.Root, {
|
|
2847
2889
|
...r,
|
|
2848
2890
|
children: t
|
|
2849
2891
|
})
|
|
2850
2892
|
});
|
|
2851
2893
|
}
|
|
2852
2894
|
let { children: t, role: n = "dialog", ...r } = e;
|
|
2853
|
-
return /* @__PURE__ */ _(
|
|
2895
|
+
return /* @__PURE__ */ _(Un.Provider, {
|
|
2854
2896
|
value: n,
|
|
2855
|
-
children: /* @__PURE__ */ _(
|
|
2897
|
+
children: /* @__PURE__ */ _(j.Root, {
|
|
2856
2898
|
...r,
|
|
2857
2899
|
children: t
|
|
2858
2900
|
})
|
|
2859
2901
|
});
|
|
2860
2902
|
}
|
|
2861
|
-
function
|
|
2862
|
-
return
|
|
2903
|
+
function Jn({ children: e, ...t }) {
|
|
2904
|
+
return Wn() === "alertdialog" ? /* @__PURE__ */ _(M.Trigger, {
|
|
2863
2905
|
"data-eds-component": "Dialog",
|
|
2864
2906
|
...t,
|
|
2865
2907
|
children: e
|
|
2866
|
-
}) : /* @__PURE__ */ _(
|
|
2908
|
+
}) : /* @__PURE__ */ _(j.Trigger, {
|
|
2867
2909
|
"data-eds-component": "Dialog",
|
|
2868
2910
|
...t,
|
|
2869
2911
|
children: e
|
|
2870
2912
|
});
|
|
2871
2913
|
}
|
|
2872
|
-
function
|
|
2914
|
+
function Yn({ className: e, ...t }) {
|
|
2873
2915
|
return /* @__PURE__ */ _("div", {
|
|
2874
2916
|
"data-slot": "dialog-header",
|
|
2875
|
-
className:
|
|
2917
|
+
className: I("flex flex-col gap-2", e),
|
|
2876
2918
|
...t
|
|
2877
2919
|
});
|
|
2878
2920
|
}
|
|
2879
|
-
function
|
|
2921
|
+
function Xn({ className: e, ...t }) {
|
|
2880
2922
|
return /* @__PURE__ */ _("div", {
|
|
2881
2923
|
"data-slot": "dialog-footer",
|
|
2882
|
-
className:
|
|
2924
|
+
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),
|
|
2883
2925
|
...t
|
|
2884
2926
|
});
|
|
2885
2927
|
}
|
|
2886
|
-
function
|
|
2887
|
-
return /* @__PURE__ */ _(
|
|
2888
|
-
className:
|
|
2928
|
+
function Zn({ className: e, ...t }) {
|
|
2929
|
+
return /* @__PURE__ */ _(Wn() === "alertdialog" ? M.Title : j.Title, {
|
|
2930
|
+
className: I("text-base leading-none font-medium text-eds-neutral-main", e),
|
|
2889
2931
|
...t
|
|
2890
2932
|
});
|
|
2891
2933
|
}
|
|
2892
|
-
function
|
|
2893
|
-
return /* @__PURE__ */ _(
|
|
2894
|
-
className:
|
|
2934
|
+
function Qn({ className: e, ...t }) {
|
|
2935
|
+
return /* @__PURE__ */ _(Wn() === "alertdialog" ? M.Description : j.Description, {
|
|
2936
|
+
className: I("text-sm text-eds-neutral-elements", e),
|
|
2895
2937
|
...t
|
|
2896
2938
|
});
|
|
2897
2939
|
}
|
|
2898
|
-
function
|
|
2899
|
-
return /* @__PURE__ */ _(
|
|
2940
|
+
function $n({ children: e, ...t }) {
|
|
2941
|
+
return /* @__PURE__ */ _(Wn() === "alertdialog" ? M.Close : j.Close, {
|
|
2900
2942
|
"data-eds-component": "Dialog",
|
|
2901
2943
|
...t,
|
|
2902
2944
|
children: e
|
|
2903
2945
|
});
|
|
2904
2946
|
}
|
|
2905
|
-
|
|
2906
|
-
var
|
|
2907
|
-
Root:
|
|
2908
|
-
Trigger:
|
|
2909
|
-
Header:
|
|
2910
|
-
Footer:
|
|
2911
|
-
Title:
|
|
2912
|
-
Description:
|
|
2913
|
-
Close:
|
|
2947
|
+
qn.displayName = "Dialog.Root", Jn.displayName = "Dialog.Trigger", Yn.displayName = "Dialog.Header", Xn.displayName = "Dialog.Footer", Zn.displayName = "Dialog.Title", Qn.displayName = "Dialog.Description", $n.displayName = "Dialog.Close";
|
|
2948
|
+
var er = Object.assign(Kn, {
|
|
2949
|
+
Root: qn,
|
|
2950
|
+
Trigger: Jn,
|
|
2951
|
+
Header: Yn,
|
|
2952
|
+
Footer: Xn,
|
|
2953
|
+
Title: Zn,
|
|
2954
|
+
Description: Qn,
|
|
2955
|
+
Close: $n
|
|
2914
2956
|
});
|
|
2915
2957
|
//#endregion
|
|
2916
2958
|
//#region src/components/FormDialog/FormDialog.tsx
|
|
2917
|
-
function
|
|
2918
|
-
return
|
|
2959
|
+
function tr({ size: e = "xl" } = {}) {
|
|
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(Vn.size, e, Hn.size).classes);
|
|
2919
2961
|
}
|
|
2920
|
-
function
|
|
2921
|
-
let r =
|
|
2962
|
+
function nr({ className: e, children: t, size: n = "xl" }) {
|
|
2963
|
+
let r = Wn(), i = r === "alertdialog" ? M.Portal : j.Portal, a = r === "alertdialog" ? M.Backdrop : j.Backdrop, o = r === "alertdialog" ? M.Popup : j.Popup;
|
|
2922
2964
|
return /* @__PURE__ */ v(i, { children: [/* @__PURE__ */ _(a, {
|
|
2923
|
-
className:
|
|
2965
|
+
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),
|
|
2924
2966
|
style: { zIndex: sn.overlayValue }
|
|
2925
2967
|
}), /* @__PURE__ */ _("div", {
|
|
2926
|
-
className:
|
|
2968
|
+
className: I("pointer-events-none fixed inset-0 flex items-center justify-center p-4 sm:p-8", sn.overlay),
|
|
2927
2969
|
style: { zIndex: sn.overlayValue },
|
|
2928
2970
|
children: /* @__PURE__ */ _(o, {
|
|
2929
2971
|
"data-eds-component": "FormDialog",
|
|
2930
|
-
className:
|
|
2972
|
+
className: I("pointer-events-auto", tr({ size: n }), e),
|
|
2931
2973
|
children: t
|
|
2932
2974
|
})
|
|
2933
2975
|
})] });
|
|
2934
2976
|
}
|
|
2935
|
-
function
|
|
2936
|
-
let s =
|
|
2977
|
+
function rr({ className: e, icon: t, title: n, subtitle: r, showCloseButton: i = !0, children: a, ...o }) {
|
|
2978
|
+
let s = Wn(), 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;
|
|
2937
2979
|
return /* @__PURE__ */ v("div", {
|
|
2938
2980
|
"data-slot": "form-dialog-header",
|
|
2939
|
-
className:
|
|
2981
|
+
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),
|
|
2940
2982
|
...o,
|
|
2941
2983
|
children: [
|
|
2942
2984
|
t ? /* @__PURE__ */ _("span", {
|
|
@@ -2977,43 +3019,43 @@ function tr({ className: e, icon: t, title: n, subtitle: r, showCloseButton: i =
|
|
|
2977
3019
|
]
|
|
2978
3020
|
});
|
|
2979
3021
|
}
|
|
2980
|
-
function
|
|
3022
|
+
function ir({ className: e, ...t }) {
|
|
2981
3023
|
return /* @__PURE__ */ _("div", {
|
|
2982
3024
|
"data-slot": "form-dialog-body",
|
|
2983
|
-
className:
|
|
3025
|
+
className: I("min-h-0 flex-1 overflow-y-auto overscroll-contain px-5 py-4", e),
|
|
2984
3026
|
...t
|
|
2985
3027
|
});
|
|
2986
3028
|
}
|
|
2987
|
-
function
|
|
3029
|
+
function ar({ className: e, ...t }) {
|
|
2988
3030
|
return /* @__PURE__ */ _("div", {
|
|
2989
3031
|
"data-slot": "form-dialog-footer",
|
|
2990
|
-
className:
|
|
3032
|
+
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),
|
|
2991
3033
|
...t
|
|
2992
3034
|
});
|
|
2993
3035
|
}
|
|
2994
|
-
function
|
|
2995
|
-
return /* @__PURE__ */ _(
|
|
2996
|
-
className:
|
|
3036
|
+
function or({ className: e, ...t }) {
|
|
3037
|
+
return /* @__PURE__ */ _(Wn() === "alertdialog" ? M.Title : j.Title, {
|
|
3038
|
+
className: I("text-lg leading-tight font-semibold text-eds-blue-dark", e),
|
|
2997
3039
|
...t
|
|
2998
3040
|
});
|
|
2999
3041
|
}
|
|
3000
|
-
function
|
|
3001
|
-
return /* @__PURE__ */ _(
|
|
3002
|
-
className:
|
|
3042
|
+
function sr({ className: e, ...t }) {
|
|
3043
|
+
return /* @__PURE__ */ _(Wn() === "alertdialog" ? M.Description : j.Description, {
|
|
3044
|
+
className: I("text-sm leading-snug text-eds-neutral-elements", e),
|
|
3003
3045
|
...t
|
|
3004
3046
|
});
|
|
3005
3047
|
}
|
|
3006
|
-
|
|
3007
|
-
var
|
|
3008
|
-
Root:
|
|
3009
|
-
Trigger:
|
|
3010
|
-
Close:
|
|
3011
|
-
Header:
|
|
3012
|
-
Body:
|
|
3013
|
-
Footer:
|
|
3014
|
-
Title:
|
|
3015
|
-
Description:
|
|
3016
|
-
}),
|
|
3048
|
+
rr.displayName = "FormDialog.Header", ir.displayName = "FormDialog.Body", ar.displayName = "FormDialog.Footer", or.displayName = "FormDialog.Title", sr.displayName = "FormDialog.Description";
|
|
3049
|
+
var cr = Object.assign(nr, {
|
|
3050
|
+
Root: qn,
|
|
3051
|
+
Trigger: Jn,
|
|
3052
|
+
Close: $n,
|
|
3053
|
+
Header: rr,
|
|
3054
|
+
Body: ir,
|
|
3055
|
+
Footer: ar,
|
|
3056
|
+
Title: or,
|
|
3057
|
+
Description: sr
|
|
3058
|
+
}), lr = { size: {
|
|
3017
3059
|
sm: {
|
|
3018
3060
|
classes: "px-6 py-8 gap-3",
|
|
3019
3061
|
description: "Compact empty state for smaller containers"
|
|
@@ -3026,11 +3068,11 @@ var or = Object.assign(er, {
|
|
|
3026
3068
|
classes: "px-12 py-20 gap-6",
|
|
3027
3069
|
description: "Large empty state for prominent placement"
|
|
3028
3070
|
}
|
|
3029
|
-
} },
|
|
3030
|
-
function
|
|
3071
|
+
} }, ur = { size: "md" };
|
|
3072
|
+
function dr({ icon: e, title: t, description: n, action: r, size: i = ur.size, titleLevel: a = "h2", className: o }) {
|
|
3031
3073
|
return /* @__PURE__ */ v("div", {
|
|
3032
3074
|
"data-eds-component": "Empty",
|
|
3033
|
-
className:
|
|
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(lr.size, i, ur.size).classes, o),
|
|
3034
3076
|
children: [
|
|
3035
3077
|
e && /* @__PURE__ */ _("div", {
|
|
3036
3078
|
className: "text-eds-neutral-elements",
|
|
@@ -3051,24 +3093,24 @@ function lr({ icon: e, title: t, description: n, action: r, size: i = cr.size, t
|
|
|
3051
3093
|
}
|
|
3052
3094
|
//#endregion
|
|
3053
3095
|
//#region ../../node_modules/.pnpm/brazilian-values@0.13.1/node_modules/brazilian-values/dist/brazilian-values.mjs
|
|
3054
|
-
var
|
|
3055
|
-
return e.replace(
|
|
3056
|
-
}, fr = function(e) {
|
|
3057
|
-
return dr(e).replace(/(\d{5})(\d{1,3})/, "$1-$2");
|
|
3058
|
-
}, pr = function(e) {
|
|
3059
|
-
return dr(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");
|
|
3096
|
+
var fr = /\D/g, pr = function(e) {
|
|
3097
|
+
return e.replace(fr, "");
|
|
3060
3098
|
}, mr = function(e) {
|
|
3061
|
-
return
|
|
3099
|
+
return pr(e).replace(/(\d{5})(\d{1,3})/, "$1-$2");
|
|
3062
3100
|
}, hr = function(e) {
|
|
3063
|
-
return (e.
|
|
3101
|
+
return pr(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");
|
|
3064
3102
|
}, gr = function(e) {
|
|
3065
|
-
return
|
|
3103
|
+
return pr(e).replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d{1,2})$/, "$1-$2");
|
|
3066
3104
|
}, _r = function(e) {
|
|
3067
|
-
return
|
|
3105
|
+
return (e.match(/\d/g)?.length ?? 0) <= 11;
|
|
3106
|
+
}, vr = function(e) {
|
|
3107
|
+
return _r(e) ? gr(e) : hr(e);
|
|
3108
|
+
}, yr = function(e) {
|
|
3109
|
+
return pr(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");
|
|
3068
3110
|
};
|
|
3069
3111
|
//#endregion
|
|
3070
3112
|
//#region src/components/Input/Input.tsx
|
|
3071
|
-
function
|
|
3113
|
+
function br(e) {
|
|
3072
3114
|
if (!e) return "";
|
|
3073
3115
|
let t = e.trimStart().startsWith("-"), n = e.replace(/\./g, ",").replace(/[^\d,]/g, "");
|
|
3074
3116
|
if (!n) return t ? "-" : "";
|
|
@@ -3077,30 +3119,30 @@ function vr(e) {
|
|
|
3077
3119
|
let i = n.slice(0, r), a = n.slice(r + 1).replace(/,/g, "");
|
|
3078
3120
|
return `${t ? "-" : ""}${i},${a}`;
|
|
3079
3121
|
}
|
|
3080
|
-
var
|
|
3122
|
+
var xr = {
|
|
3081
3123
|
default: "",
|
|
3082
3124
|
valid: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-green-main)_55%,var(--color-eds-outline-border))]",
|
|
3083
3125
|
invalid: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-red-main)_55%,var(--color-eds-outline-border))]",
|
|
3084
3126
|
loading: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-blue-main)_45%,var(--color-eds-outline-border))]"
|
|
3085
3127
|
};
|
|
3086
|
-
function
|
|
3087
|
-
let
|
|
3088
|
-
let e =
|
|
3089
|
-
return
|
|
3090
|
-
}),
|
|
3091
|
-
if (
|
|
3128
|
+
function Sr({ 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: R, ...z }) {
|
|
3129
|
+
let ie = ee(), B = A ?? ie, V = a === "number", [ae, H] = E(!1), [oe, se] = E(() => {
|
|
3130
|
+
let e = re?.toString() ?? "";
|
|
3131
|
+
return V ? br(e) : e;
|
|
3132
|
+
}), ce = k !== void 0, le = (ce ? k : oe)?.toString() ?? "", ue = V ? br(le) : le, U = g ?? m, W = y ?? h, de = an(S), fe = de === "floating", pe = (e) => {
|
|
3133
|
+
if (V) return br(e);
|
|
3092
3134
|
switch (f) {
|
|
3093
|
-
case "cep": return
|
|
3094
|
-
case "cpf": return
|
|
3095
|
-
case "cnpj": return
|
|
3096
|
-
case "cpfOrCnpj": return
|
|
3097
|
-
case "phone": return
|
|
3135
|
+
case "cep": return mr(e);
|
|
3136
|
+
case "cpf": return gr(e);
|
|
3137
|
+
case "cnpj": return hr(e);
|
|
3138
|
+
case "cpfOrCnpj": return vr(e);
|
|
3139
|
+
case "phone": return yr(e);
|
|
3098
3140
|
default: return e;
|
|
3099
3141
|
}
|
|
3100
|
-
},
|
|
3101
|
-
let n =
|
|
3102
|
-
|
|
3103
|
-
},
|
|
3142
|
+
}, me = (e, t) => {
|
|
3143
|
+
let n = pe(e);
|
|
3144
|
+
ce || se(n), R?.(n, t);
|
|
3145
|
+
}, G = r === "invalid", K = n || w, he = on[i], ge = w ? /* @__PURE__ */ _("span", {
|
|
3104
3146
|
className: "inline-flex shrink-0 items-center justify-center text-eds-blue-main",
|
|
3105
3147
|
"data-position": T,
|
|
3106
3148
|
"aria-hidden": !0,
|
|
@@ -3110,18 +3152,18 @@ function br({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
|
|
|
3110
3152
|
})
|
|
3111
3153
|
}) : null;
|
|
3112
3154
|
return /* @__PURE__ */ v("div", {
|
|
3113
|
-
className:
|
|
3155
|
+
className: I(cn, e),
|
|
3114
3156
|
"data-fluid": l || void 0,
|
|
3115
3157
|
"data-eds-component": "Input",
|
|
3116
|
-
"data-label-variant":
|
|
3158
|
+
"data-label-variant": de,
|
|
3117
3159
|
children: [
|
|
3118
3160
|
/* @__PURE__ */ v("div", {
|
|
3119
3161
|
className: ln,
|
|
3120
3162
|
children: [/* @__PURE__ */ v("div", {
|
|
3121
3163
|
className: "inline-flex min-w-0 items-center gap-2",
|
|
3122
3164
|
children: [/* @__PURE__ */ v("label", {
|
|
3123
|
-
className:
|
|
3124
|
-
htmlFor:
|
|
3165
|
+
className: I(un, fe && "sr-only", !fe && "font-medium"),
|
|
3166
|
+
htmlFor: B,
|
|
3125
3167
|
children: [/* @__PURE__ */ _("span", { children: t }), o && /* @__PURE__ */ _("span", {
|
|
3126
3168
|
className: "text-eds-red-main",
|
|
3127
3169
|
children: "*"
|
|
@@ -3131,32 +3173,32 @@ function br({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
|
|
|
3131
3173
|
className: "inline-flex size-7 cursor-help items-center justify-center rounded-md text-eds-neutral-elements focus-visible:outline-2 focus-visible:outline-eds-blue-main focus-visible:outline-offset-2",
|
|
3132
3174
|
"aria-label": p,
|
|
3133
3175
|
title: p,
|
|
3134
|
-
disabled:
|
|
3176
|
+
disabled: K,
|
|
3135
3177
|
children: /* @__PURE__ */ _(u, {
|
|
3136
3178
|
size: 16,
|
|
3137
3179
|
"aria-hidden": !0
|
|
3138
3180
|
})
|
|
3139
3181
|
})]
|
|
3140
|
-
}),
|
|
3182
|
+
}), U && W && /* @__PURE__ */ _("a", {
|
|
3141
3183
|
className: "text-sm whitespace-nowrap text-eds-blue-main underline underline-offset-[0.15em] aria-disabled:pointer-events-none aria-disabled:opacity-60",
|
|
3142
|
-
href:
|
|
3143
|
-
"aria-disabled":
|
|
3144
|
-
tabIndex:
|
|
3184
|
+
href: W,
|
|
3185
|
+
"aria-disabled": K || void 0,
|
|
3186
|
+
tabIndex: K ? -1 : 0,
|
|
3145
3187
|
onClick: (e) => {
|
|
3146
|
-
|
|
3188
|
+
K && e.preventDefault();
|
|
3147
3189
|
},
|
|
3148
|
-
children:
|
|
3190
|
+
children: U
|
|
3149
3191
|
})]
|
|
3150
3192
|
}),
|
|
3151
3193
|
/* @__PURE__ */ v("div", {
|
|
3152
|
-
className:
|
|
3153
|
-
"data-disabled":
|
|
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, xr[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
|
+
"data-disabled": K || void 0,
|
|
3154
3196
|
"data-state": r,
|
|
3155
3197
|
"data-size": i,
|
|
3156
|
-
"data-floating":
|
|
3157
|
-
"data-has-value":
|
|
3198
|
+
"data-floating": fe || void 0,
|
|
3199
|
+
"data-has-value": ue ? !0 : void 0,
|
|
3158
3200
|
children: [
|
|
3159
|
-
|
|
3201
|
+
fe && /* @__PURE__ */ v("span", {
|
|
3160
3202
|
className: xn(he.left),
|
|
3161
3203
|
children: [/* @__PURE__ */ _("span", { children: t }), o && /* @__PURE__ */ _("span", {
|
|
3162
3204
|
className: "text-eds-red-main",
|
|
@@ -3170,82 +3212,82 @@ function br({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
|
|
|
3170
3212
|
"aria-hidden": !0
|
|
3171
3213
|
}),
|
|
3172
3214
|
T === "start" && ge,
|
|
3173
|
-
/* @__PURE__ */ _(
|
|
3174
|
-
...
|
|
3175
|
-
id:
|
|
3176
|
-
name:
|
|
3177
|
-
className:
|
|
3178
|
-
disabled:
|
|
3179
|
-
type:
|
|
3180
|
-
inputMode:
|
|
3181
|
-
lang:
|
|
3215
|
+
/* @__PURE__ */ _(N, {
|
|
3216
|
+
...z,
|
|
3217
|
+
id: B,
|
|
3218
|
+
name: j,
|
|
3219
|
+
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
|
+
disabled: K,
|
|
3221
|
+
type: V ? "text" : te ? ae ? "text" : "password" : a,
|
|
3222
|
+
inputMode: V ? z.inputMode ?? "decimal" : z.inputMode,
|
|
3223
|
+
lang: V ? z.lang ?? "pt-BR" : z.lang,
|
|
3182
3224
|
required: o,
|
|
3183
3225
|
placeholder: s,
|
|
3184
|
-
autoComplete: C ? "off" :
|
|
3185
|
-
"aria-invalid":
|
|
3186
|
-
"aria-describedby":
|
|
3226
|
+
autoComplete: C ? "off" : z.autoComplete,
|
|
3227
|
+
"aria-invalid": G || void 0,
|
|
3228
|
+
"aria-describedby": G ? `${B}-desc` : void 0,
|
|
3187
3229
|
"aria-busy": w || void 0,
|
|
3188
|
-
value:
|
|
3189
|
-
defaultValue: !
|
|
3190
|
-
onClick:
|
|
3191
|
-
onKeyDown:
|
|
3192
|
-
onFocus:
|
|
3230
|
+
value: ce || V ? ue : void 0,
|
|
3231
|
+
defaultValue: !ce && !V ? re : void 0,
|
|
3232
|
+
onClick: L,
|
|
3233
|
+
onKeyDown: F,
|
|
3234
|
+
onFocus: P,
|
|
3193
3235
|
onBlur: (e) => {
|
|
3194
|
-
|
|
3236
|
+
M?.(e), x && me(e.currentTarget.value, e);
|
|
3195
3237
|
},
|
|
3196
3238
|
onChange: (e) => {
|
|
3197
3239
|
if (x) {
|
|
3198
|
-
|
|
3240
|
+
V && !ce && se(pe(e.currentTarget.value));
|
|
3199
3241
|
return;
|
|
3200
3242
|
}
|
|
3201
|
-
|
|
3243
|
+
me(e.currentTarget.value, e);
|
|
3202
3244
|
}
|
|
3203
3245
|
}),
|
|
3204
3246
|
te && !w && /* @__PURE__ */ _("button", {
|
|
3205
3247
|
type: "button",
|
|
3206
3248
|
className: "shrink-0 text-sm font-medium text-eds-blue-main hover:underline",
|
|
3207
|
-
disabled:
|
|
3208
|
-
onClick: () =>
|
|
3209
|
-
children:
|
|
3249
|
+
disabled: K,
|
|
3250
|
+
onClick: () => H((e) => !e),
|
|
3251
|
+
children: ae ? O : ne
|
|
3210
3252
|
}),
|
|
3211
3253
|
T === "end" && ge
|
|
3212
3254
|
]
|
|
3213
3255
|
}),
|
|
3214
|
-
(
|
|
3215
|
-
id: `${
|
|
3256
|
+
(G || b) && /* @__PURE__ */ _("div", {
|
|
3257
|
+
id: `${B}-desc`,
|
|
3216
3258
|
className: "text-xs text-eds-neutral-elements data-[state=invalid]:text-eds-red-main",
|
|
3217
|
-
"data-state":
|
|
3218
|
-
children:
|
|
3259
|
+
"data-state": G ? "invalid" : r,
|
|
3260
|
+
children: G ? c : b
|
|
3219
3261
|
})
|
|
3220
3262
|
]
|
|
3221
3263
|
});
|
|
3222
3264
|
}
|
|
3223
3265
|
//#endregion
|
|
3224
3266
|
//#region src/components/Textarea/Textarea.tsx
|
|
3225
|
-
var
|
|
3267
|
+
var Cr = {
|
|
3226
3268
|
default: "",
|
|
3227
3269
|
valid: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-green-main)_55%,var(--color-eds-outline-border))]",
|
|
3228
3270
|
invalid: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-red-main)_55%,var(--color-eds-outline-border))]"
|
|
3229
|
-
},
|
|
3271
|
+
}, wr = {
|
|
3230
3272
|
sm: "min-h-20",
|
|
3231
3273
|
md: "min-h-24",
|
|
3232
3274
|
lg: "min-h-32"
|
|
3233
3275
|
};
|
|
3234
|
-
function
|
|
3235
|
-
let
|
|
3276
|
+
function Tr({ 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
|
+
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];
|
|
3236
3278
|
return /* @__PURE__ */ v("div", {
|
|
3237
|
-
className:
|
|
3279
|
+
className: I(cn, e),
|
|
3238
3280
|
"data-fluid": c || void 0,
|
|
3239
3281
|
"data-eds-component": "Textarea",
|
|
3240
|
-
"data-label-variant":
|
|
3282
|
+
"data-label-variant": M,
|
|
3241
3283
|
children: [
|
|
3242
3284
|
/* @__PURE__ */ v("div", {
|
|
3243
3285
|
className: ln,
|
|
3244
3286
|
children: [/* @__PURE__ */ v("div", {
|
|
3245
3287
|
className: "inline-flex min-w-0 items-center gap-2",
|
|
3246
3288
|
children: [/* @__PURE__ */ v("label", {
|
|
3247
|
-
className:
|
|
3248
|
-
htmlFor:
|
|
3289
|
+
className: I(un, N && "sr-only", !N && "font-medium"),
|
|
3290
|
+
htmlFor: O,
|
|
3249
3291
|
children: [/* @__PURE__ */ _("span", { children: t }), a && /* @__PURE__ */ _("span", {
|
|
3250
3292
|
className: "text-eds-red-main",
|
|
3251
3293
|
children: "*"
|
|
@@ -3273,14 +3315,14 @@ function Cr({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
|
|
|
3273
3315
|
})]
|
|
3274
3316
|
}),
|
|
3275
3317
|
/* @__PURE__ */ v("div", {
|
|
3276
|
-
className:
|
|
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", wr[i], Cr[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"),
|
|
3277
3319
|
"data-disabled": n || void 0,
|
|
3278
3320
|
"data-state": r,
|
|
3279
3321
|
"data-size": i,
|
|
3280
|
-
"data-floating":
|
|
3281
|
-
"data-has-value":
|
|
3282
|
-
children: [
|
|
3283
|
-
className: xn(
|
|
3322
|
+
"data-floating": N || void 0,
|
|
3323
|
+
"data-has-value": j ? !0 : void 0,
|
|
3324
|
+
children: [N && /* @__PURE__ */ v("span", {
|
|
3325
|
+
className: xn(F.left),
|
|
3284
3326
|
children: [/* @__PURE__ */ _("span", { children: t }), a && /* @__PURE__ */ _("span", {
|
|
3285
3327
|
className: "text-eds-red-main",
|
|
3286
3328
|
"aria-hidden": "true",
|
|
@@ -3288,46 +3330,46 @@ function Cr({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
|
|
|
3288
3330
|
})]
|
|
3289
3331
|
}), /* @__PURE__ */ _("textarea", {
|
|
3290
3332
|
...te,
|
|
3291
|
-
id:
|
|
3333
|
+
id: O,
|
|
3292
3334
|
name: x,
|
|
3293
3335
|
rows: h,
|
|
3294
|
-
className:
|
|
3336
|
+
className: I("box-border min-h-[inherit] w-full flex-1 resize-y appearance-none border-0 !bg-white p-0 font-inherit text-eds-neutral-main shadow-none outline-none", fn, F.text, "disabled:cursor-not-allowed disabled:!bg-eds-neutral-background"),
|
|
3295
3337
|
disabled: n,
|
|
3296
3338
|
required: a,
|
|
3297
3339
|
placeholder: o,
|
|
3298
|
-
"aria-invalid":
|
|
3299
|
-
"aria-describedby":
|
|
3300
|
-
value:
|
|
3301
|
-
defaultValue:
|
|
3340
|
+
"aria-invalid": P || void 0,
|
|
3341
|
+
"aria-describedby": P ? `${O}-desc` : void 0,
|
|
3342
|
+
value: A ? y : void 0,
|
|
3343
|
+
defaultValue: A ? void 0 : g,
|
|
3302
3344
|
onClick: T,
|
|
3303
3345
|
onKeyDown: w,
|
|
3304
3346
|
onFocus: C,
|
|
3305
3347
|
onBlur: S,
|
|
3306
3348
|
onChange: (e) => {
|
|
3307
|
-
|
|
3349
|
+
A || k(e.target.value), D?.(e.target.value, e);
|
|
3308
3350
|
}
|
|
3309
3351
|
})]
|
|
3310
3352
|
}),
|
|
3311
|
-
(
|
|
3312
|
-
id: `${
|
|
3353
|
+
(P || p) && /* @__PURE__ */ _("div", {
|
|
3354
|
+
id: `${O}-desc`,
|
|
3313
3355
|
className: "text-xs text-eds-neutral-elements data-[state=invalid]:text-eds-red-main",
|
|
3314
|
-
"data-state":
|
|
3315
|
-
children:
|
|
3356
|
+
"data-state": P ? "invalid" : r,
|
|
3357
|
+
children: P ? s : p
|
|
3316
3358
|
})
|
|
3317
3359
|
]
|
|
3318
3360
|
});
|
|
3319
3361
|
}
|
|
3320
3362
|
//#endregion
|
|
3321
3363
|
//#region src/components/Select/Select.tsx
|
|
3322
|
-
var
|
|
3364
|
+
var Er = {
|
|
3323
3365
|
default: "",
|
|
3324
3366
|
valid: "not-focus-visible:border-[color-mix(in_srgb,var(--color-eds-green-main)_55%,var(--color-eds-outline-border))]",
|
|
3325
3367
|
invalid: "not-focus-visible:border-[color-mix(in_srgb,var(--color-eds-red-main)_55%,var(--color-eds-outline-border))]"
|
|
3326
3368
|
};
|
|
3327
|
-
function
|
|
3369
|
+
function Dr({ 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 }) {
|
|
3328
3370
|
let S = ee(), C = p ?? S, w = l === "invalid", T = w || d, E = on[u], D = an(t), te = D === "floating";
|
|
3329
3371
|
return /* @__PURE__ */ v("div", {
|
|
3330
|
-
className:
|
|
3372
|
+
className: I(cn, x),
|
|
3331
3373
|
"data-fluid": c || void 0,
|
|
3332
3374
|
"data-eds-component": "Select",
|
|
3333
3375
|
"data-label-variant": D,
|
|
@@ -3335,7 +3377,7 @@ function Tr({ label: e = "Label", labelVariant: t, items: n, placeholder: r = "S
|
|
|
3335
3377
|
/* @__PURE__ */ _("div", {
|
|
3336
3378
|
className: ln,
|
|
3337
3379
|
children: /* @__PURE__ */ v("label", {
|
|
3338
|
-
className:
|
|
3380
|
+
className: I(un, te && "sr-only", !te && "font-medium"),
|
|
3339
3381
|
htmlFor: C,
|
|
3340
3382
|
children: [/* @__PURE__ */ _("span", { children: e }), s && /* @__PURE__ */ _("span", {
|
|
3341
3383
|
className: "text-eds-red-main",
|
|
@@ -3343,7 +3385,7 @@ function Tr({ label: e = "Label", labelVariant: t, items: n, placeholder: r = "S
|
|
|
3343
3385
|
})]
|
|
3344
3386
|
})
|
|
3345
3387
|
}),
|
|
3346
|
-
/* @__PURE__ */ v(
|
|
3388
|
+
/* @__PURE__ */ v(P.Root, {
|
|
3347
3389
|
id: C,
|
|
3348
3390
|
name: m,
|
|
3349
3391
|
disabled: i,
|
|
@@ -3351,8 +3393,8 @@ function Tr({ label: e = "Label", labelVariant: t, items: n, placeholder: r = "S
|
|
|
3351
3393
|
onValueChange: y,
|
|
3352
3394
|
defaultValue: g,
|
|
3353
3395
|
value: h,
|
|
3354
|
-
children: [/* @__PURE__ */ v(
|
|
3355
|
-
className:
|
|
3396
|
+
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, Er[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"),
|
|
3356
3398
|
"data-state": l,
|
|
3357
3399
|
"data-size": u,
|
|
3358
3400
|
"data-disabled": i || void 0,
|
|
@@ -3366,12 +3408,12 @@ function Tr({ label: e = "Label", labelVariant: t, items: n, placeholder: r = "S
|
|
|
3366
3408
|
children: "*"
|
|
3367
3409
|
})]
|
|
3368
3410
|
}),
|
|
3369
|
-
/* @__PURE__ */ _(
|
|
3370
|
-
className:
|
|
3411
|
+
/* @__PURE__ */ _(P.Value, {
|
|
3412
|
+
className: I("box-border min-w-0 flex-1 truncate text-left font-inherit text-eds-neutral-main", pn, E.text),
|
|
3371
3413
|
placeholder: r
|
|
3372
3414
|
}),
|
|
3373
|
-
/* @__PURE__ */ _(
|
|
3374
|
-
className:
|
|
3415
|
+
/* @__PURE__ */ _(P.Icon, {
|
|
3416
|
+
className: I("inline-flex shrink-0 items-center justify-center rounded-md text-eds-neutral-elements", E.icon),
|
|
3375
3417
|
"aria-hidden": !0,
|
|
3376
3418
|
children: /* @__PURE__ */ _(o, {
|
|
3377
3419
|
className: "size-4 shrink-0",
|
|
@@ -3379,25 +3421,25 @@ function Tr({ label: e = "Label", labelVariant: t, items: n, placeholder: r = "S
|
|
|
3379
3421
|
})
|
|
3380
3422
|
})
|
|
3381
3423
|
]
|
|
3382
|
-
}), /* @__PURE__ */ _(
|
|
3424
|
+
}), /* @__PURE__ */ _(P.Portal, { children: /* @__PURE__ */ _(P.Positioner, {
|
|
3383
3425
|
className: yn,
|
|
3384
3426
|
style: bn,
|
|
3385
3427
|
positionMethod: "fixed",
|
|
3386
3428
|
sideOffset: 4,
|
|
3387
|
-
children: /* @__PURE__ */ _(
|
|
3429
|
+
children: /* @__PURE__ */ _(P.Popup, {
|
|
3388
3430
|
className: hn,
|
|
3389
|
-
children: /* @__PURE__ */ _(
|
|
3431
|
+
children: /* @__PURE__ */ _(P.List, {
|
|
3390
3432
|
className: gn,
|
|
3391
|
-
children: n.map((e) => /* @__PURE__ */ v(
|
|
3433
|
+
children: n.map((e) => /* @__PURE__ */ v(P.Item, {
|
|
3392
3434
|
value: e,
|
|
3393
3435
|
className: _n,
|
|
3394
|
-
children: [/* @__PURE__ */ _(
|
|
3436
|
+
children: [/* @__PURE__ */ _(P.ItemIndicator, {
|
|
3395
3437
|
className: vn,
|
|
3396
3438
|
children: /* @__PURE__ */ _(a, {
|
|
3397
3439
|
size: 14,
|
|
3398
3440
|
"aria-hidden": !0
|
|
3399
3441
|
})
|
|
3400
|
-
}), /* @__PURE__ */ _(
|
|
3442
|
+
}), /* @__PURE__ */ _(P.ItemText, {
|
|
3401
3443
|
className: "block min-w-0 flex-1 text-left",
|
|
3402
3444
|
children: b ? b(e) : e.label
|
|
3403
3445
|
})]
|
|
@@ -3417,7 +3459,7 @@ function Tr({ label: e = "Label", labelVariant: t, items: n, placeholder: r = "S
|
|
|
3417
3459
|
}
|
|
3418
3460
|
//#endregion
|
|
3419
3461
|
//#region src/components/Text/Text.tsx
|
|
3420
|
-
var
|
|
3462
|
+
var Or = {
|
|
3421
3463
|
variant: {
|
|
3422
3464
|
heading1: {
|
|
3423
3465
|
classes: "text-3xl font-semibold",
|
|
@@ -3474,29 +3516,29 @@ var Er = {
|
|
|
3474
3516
|
description: "Large text"
|
|
3475
3517
|
}
|
|
3476
3518
|
}
|
|
3477
|
-
},
|
|
3519
|
+
}, kr = {
|
|
3478
3520
|
variant: "body",
|
|
3479
3521
|
size: "md"
|
|
3480
|
-
},
|
|
3522
|
+
}, Ar = /* @__PURE__ */ new Set([
|
|
3481
3523
|
"heading1",
|
|
3482
3524
|
"heading2",
|
|
3483
3525
|
"heading3"
|
|
3484
|
-
]),
|
|
3485
|
-
function
|
|
3486
|
-
let l =
|
|
3526
|
+
]), jr = /* @__PURE__ */ new Set(["mono", "mono-secondary"]);
|
|
3527
|
+
function Mr({ variant: e = "body", bold: t = !1, size: n = "md", truncate: r = !1, children: i, className: a, as: o, ...s }, c) {
|
|
3528
|
+
let l = jr.has(e), u = Ar.has(e), d = w(() => o || (l || u ? "span" : "p"), [
|
|
3487
3529
|
o,
|
|
3488
3530
|
l,
|
|
3489
3531
|
u
|
|
3490
|
-
]), f =
|
|
3532
|
+
]), f = L(Or.variant, e, kr.variant), p = L(Or.size, n ?? "md", kr.size);
|
|
3491
3533
|
return /* @__PURE__ */ _(d, {
|
|
3492
3534
|
ref: c,
|
|
3493
3535
|
"data-eds-component": "Text",
|
|
3494
|
-
className:
|
|
3536
|
+
className: I(f.classes, !u && p.classes, !u && t && "font-medium", r && "min-w-0 truncate", a),
|
|
3495
3537
|
...s,
|
|
3496
3538
|
children: i
|
|
3497
3539
|
});
|
|
3498
3540
|
}
|
|
3499
|
-
var
|
|
3541
|
+
var Nr = x(Mr), Pr = {
|
|
3500
3542
|
layout: {
|
|
3501
3543
|
auto: {
|
|
3502
3544
|
classes: "",
|
|
@@ -3545,17 +3587,17 @@ var jr = x(Ar), Mr = {
|
|
|
3545
3587
|
description: "Pin column to the right edge of the scroll container"
|
|
3546
3588
|
}
|
|
3547
3589
|
}
|
|
3548
|
-
},
|
|
3549
|
-
let n =
|
|
3550
|
-
return t === "cell" ?
|
|
3551
|
-
},
|
|
3590
|
+
}, Fr = (e, t) => {
|
|
3591
|
+
let n = L(Pr.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
|
+
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
|
+
}, Ir = {
|
|
3552
3594
|
layout: "auto",
|
|
3553
3595
|
variant: "default",
|
|
3554
3596
|
dividers: "row"
|
|
3555
|
-
},
|
|
3556
|
-
let o =
|
|
3597
|
+
}, Lr = x(({ layout: e = "auto", dividers: t = Ir.dividers, className: n, containerClassName: r, ...i }, a) => {
|
|
3598
|
+
let o = I("isolate w-full", L(Pr.layout, e, Ir.layout).classes, L(Pr.dividers, t, Ir.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);
|
|
3557
3599
|
return /* @__PURE__ */ _("div", {
|
|
3558
|
-
className:
|
|
3600
|
+
className: I("w-full overflow-x-auto rounded-eds-xs border border-eds-outline-border bg-white", r),
|
|
3559
3601
|
children: /* @__PURE__ */ _("table", {
|
|
3560
3602
|
ref: a,
|
|
3561
3603
|
"data-eds-component": "Table",
|
|
@@ -3563,52 +3605,52 @@ var jr = x(Ar), Mr = {
|
|
|
3563
3605
|
className: o
|
|
3564
3606
|
})
|
|
3565
3607
|
});
|
|
3566
|
-
}),
|
|
3567
|
-
let i = e === "compact", a =
|
|
3608
|
+
}), Rr = x(({ variant: e = "default", sticky: t, ...n }, r) => {
|
|
3609
|
+
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);
|
|
3568
3610
|
return /* @__PURE__ */ _("thead", {
|
|
3569
3611
|
ref: r,
|
|
3570
3612
|
...n,
|
|
3571
3613
|
className: a,
|
|
3572
3614
|
...i && { "data-compact": "" }
|
|
3573
3615
|
});
|
|
3574
|
-
}),
|
|
3575
|
-
let r =
|
|
3616
|
+
}), zr = x(({ sticky: e, ...t }, n) => {
|
|
3617
|
+
let r = I("group relative", e && Fr(e, "head"), t.className);
|
|
3576
3618
|
return /* @__PURE__ */ _("th", {
|
|
3577
3619
|
ref: n,
|
|
3578
3620
|
...t,
|
|
3579
3621
|
className: r
|
|
3580
3622
|
});
|
|
3581
|
-
}),
|
|
3582
|
-
let r = L(
|
|
3623
|
+
}), Br = x(({ variant: e = Ir.variant, ...t }, n) => {
|
|
3624
|
+
let r = I(L(Pr.variant, e, Ir.variant).classes, t.className);
|
|
3583
3625
|
return /* @__PURE__ */ _("tr", {
|
|
3584
3626
|
ref: n,
|
|
3585
3627
|
...t,
|
|
3586
3628
|
className: r
|
|
3587
3629
|
});
|
|
3588
|
-
}),
|
|
3630
|
+
}), Vr = x((e, t) => /* @__PURE__ */ _("tbody", {
|
|
3589
3631
|
ref: t,
|
|
3590
3632
|
...e
|
|
3591
|
-
})),
|
|
3592
|
-
let r =
|
|
3633
|
+
})), Hr = x(({ sticky: e, ...t }, n) => {
|
|
3634
|
+
let r = I(e && Fr(e, "cell"), t.className);
|
|
3593
3635
|
return /* @__PURE__ */ _("td", {
|
|
3594
3636
|
ref: n,
|
|
3595
3637
|
...t,
|
|
3596
3638
|
className: r
|
|
3597
3639
|
});
|
|
3598
|
-
}),
|
|
3640
|
+
}), Ur = x((e, t) => /* @__PURE__ */ _("tfoot", {
|
|
3599
3641
|
ref: t,
|
|
3600
3642
|
...e
|
|
3601
|
-
})),
|
|
3643
|
+
})), Wr = x((e, t) => /* @__PURE__ */ _("button", {
|
|
3602
3644
|
ref: t,
|
|
3603
3645
|
...e,
|
|
3604
3646
|
type: "button",
|
|
3605
3647
|
"aria-label": "Redimensionar coluna",
|
|
3606
|
-
className:
|
|
3648
|
+
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),
|
|
3607
3649
|
children: /* @__PURE__ */ _("span", { className: "h-5 w-[2px] rounded bg-eds-neutral-disabled" })
|
|
3608
|
-
})),
|
|
3650
|
+
})), Gr = x(({ checked: e, indeterminate: t, onCheckedChange: n, label: r, disabled: i, ...a }, o) => /* @__PURE__ */ _(Hr, {
|
|
3609
3651
|
ref: o,
|
|
3610
3652
|
...a,
|
|
3611
|
-
className:
|
|
3653
|
+
className: I("w-10 leading-none", a.className),
|
|
3612
3654
|
children: /* @__PURE__ */ _(rn, {
|
|
3613
3655
|
checked: e,
|
|
3614
3656
|
indeterminate: t,
|
|
@@ -3617,10 +3659,10 @@ var jr = x(Ar), Mr = {
|
|
|
3617
3659
|
disabled: i,
|
|
3618
3660
|
className: "relative before:absolute before:-inset-3 before:content-['']"
|
|
3619
3661
|
})
|
|
3620
|
-
})),
|
|
3662
|
+
})), Kr = x(({ checked: e, indeterminate: t, onCheckedChange: n, label: r, disabled: i, ...a }, o) => /* @__PURE__ */ _(zr, {
|
|
3621
3663
|
ref: o,
|
|
3622
3664
|
...a,
|
|
3623
|
-
className:
|
|
3665
|
+
className: I("w-10 leading-none", a.className),
|
|
3624
3666
|
children: /* @__PURE__ */ _(rn, {
|
|
3625
3667
|
checked: e,
|
|
3626
3668
|
indeterminate: t,
|
|
@@ -3630,38 +3672,38 @@ var jr = x(Ar), Mr = {
|
|
|
3630
3672
|
className: "relative before:absolute before:-inset-3 before:content-['']"
|
|
3631
3673
|
})
|
|
3632
3674
|
}));
|
|
3633
|
-
|
|
3634
|
-
var Y = Object.assign(
|
|
3635
|
-
Header:
|
|
3636
|
-
Head:
|
|
3637
|
-
Row:
|
|
3638
|
-
Body:
|
|
3639
|
-
Cell:
|
|
3640
|
-
CheckCell:
|
|
3641
|
-
CheckHead:
|
|
3642
|
-
Footer:
|
|
3643
|
-
ResizeHandle:
|
|
3675
|
+
Lr.displayName = "Table", Vr.displayName = "Table.Body", zr.displayName = "Table.Head", Br.displayName = "Table.Row", Hr.displayName = "Table.Cell", Ur.displayName = "Table.Footer", Rr.displayName = "Table.Header", Wr.displayName = "Table.ResizeHandle", Gr.displayName = "Table.CheckCell", Kr.displayName = "Table.CheckHead";
|
|
3676
|
+
var Y = Object.assign(Lr, {
|
|
3677
|
+
Header: Rr,
|
|
3678
|
+
Head: zr,
|
|
3679
|
+
Row: Br,
|
|
3680
|
+
Body: Vr,
|
|
3681
|
+
Cell: Hr,
|
|
3682
|
+
CheckCell: Gr,
|
|
3683
|
+
CheckHead: Kr,
|
|
3684
|
+
Footer: Ur,
|
|
3685
|
+
ResizeHandle: Wr
|
|
3644
3686
|
});
|
|
3645
3687
|
//#endregion
|
|
3646
3688
|
//#region ../../node_modules/.pnpm/@tanstack+table-core@8.21.3/node_modules/@tanstack/table-core/build/lib/index.mjs
|
|
3647
|
-
function
|
|
3689
|
+
function qr(e, t) {
|
|
3648
3690
|
return typeof e == "function" ? e(t) : e;
|
|
3649
3691
|
}
|
|
3650
3692
|
function X(e, t) {
|
|
3651
3693
|
return (n) => {
|
|
3652
3694
|
t.setState((t) => ({
|
|
3653
3695
|
...t,
|
|
3654
|
-
[e]:
|
|
3696
|
+
[e]: qr(n, t[e])
|
|
3655
3697
|
}));
|
|
3656
3698
|
};
|
|
3657
3699
|
}
|
|
3658
|
-
function
|
|
3700
|
+
function Jr(e) {
|
|
3659
3701
|
return e instanceof Function;
|
|
3660
3702
|
}
|
|
3661
|
-
function
|
|
3703
|
+
function Yr(e) {
|
|
3662
3704
|
return Array.isArray(e) && e.every((e) => typeof e == "number");
|
|
3663
3705
|
}
|
|
3664
|
-
function
|
|
3706
|
+
function Xr(e, t) {
|
|
3665
3707
|
let n = [], r = (e) => {
|
|
3666
3708
|
e.forEach((e) => {
|
|
3667
3709
|
n.push(e);
|
|
@@ -3700,7 +3742,7 @@ function Q(e, t, n, r) {
|
|
|
3700
3742
|
onChange: r
|
|
3701
3743
|
};
|
|
3702
3744
|
}
|
|
3703
|
-
function
|
|
3745
|
+
function Zr(e, t, n, r) {
|
|
3704
3746
|
let i = {
|
|
3705
3747
|
id: `${t.id}_${n.id}`,
|
|
3706
3748
|
row: t,
|
|
@@ -3725,7 +3767,7 @@ function Yr(e, t, n, r) {
|
|
|
3725
3767
|
r.createCell == null || r.createCell(i, n, t, e);
|
|
3726
3768
|
}, {}), i;
|
|
3727
3769
|
}
|
|
3728
|
-
function
|
|
3770
|
+
function Qr(e, t, n, r) {
|
|
3729
3771
|
let i = {
|
|
3730
3772
|
...e._getDefaultColumnDef(),
|
|
3731
3773
|
...t
|
|
@@ -3752,7 +3794,7 @@ function Xr(e, t, n, r) {
|
|
|
3752
3794
|
return c;
|
|
3753
3795
|
}
|
|
3754
3796
|
var $ = "debugHeaders";
|
|
3755
|
-
function
|
|
3797
|
+
function $r(e, t, n) {
|
|
3756
3798
|
let r = {
|
|
3757
3799
|
id: n.id ?? t.id,
|
|
3758
3800
|
column: t,
|
|
@@ -3780,7 +3822,7 @@ function Zr(e, t, n) {
|
|
|
3780
3822
|
t.createHeader == null || t.createHeader(r, e);
|
|
3781
3823
|
}), r;
|
|
3782
3824
|
}
|
|
3783
|
-
var
|
|
3825
|
+
var ei = { createTable: (e) => {
|
|
3784
3826
|
e.getHeaderGroups = Z(() => [
|
|
3785
3827
|
e.getAllColumns(),
|
|
3786
3828
|
e.getVisibleLeafColumns(),
|
|
@@ -3788,7 +3830,7 @@ var Qr = { createTable: (e) => {
|
|
|
3788
3830
|
e.getState().columnPinning.right
|
|
3789
3831
|
], (t, n, r, i) => {
|
|
3790
3832
|
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)));
|
|
3791
|
-
return
|
|
3833
|
+
return ti(t, [
|
|
3792
3834
|
...a,
|
|
3793
3835
|
...s,
|
|
3794
3836
|
...o
|
|
@@ -3798,15 +3840,15 @@ var Qr = { createTable: (e) => {
|
|
|
3798
3840
|
e.getVisibleLeafColumns(),
|
|
3799
3841
|
e.getState().columnPinning.left,
|
|
3800
3842
|
e.getState().columnPinning.right
|
|
3801
|
-
], (t, n, r, i) => (n = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id))),
|
|
3843
|
+
], (t, n, r, i) => (n = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id))), ti(t, n, e, "center")), Q(e.options, $, "getCenterHeaderGroups")), e.getLeftHeaderGroups = Z(() => [
|
|
3802
3844
|
e.getAllColumns(),
|
|
3803
3845
|
e.getVisibleLeafColumns(),
|
|
3804
3846
|
e.getState().columnPinning.left
|
|
3805
|
-
], (t, n, r) =>
|
|
3847
|
+
], (t, n, r) => ti(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "left"), Q(e.options, $, "getLeftHeaderGroups")), e.getRightHeaderGroups = Z(() => [
|
|
3806
3848
|
e.getAllColumns(),
|
|
3807
3849
|
e.getVisibleLeafColumns(),
|
|
3808
3850
|
e.getState().columnPinning.right
|
|
3809
|
-
], (t, n, r) =>
|
|
3851
|
+
], (t, n, r) => ti(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) => {
|
|
3810
3852
|
var t;
|
|
3811
3853
|
return !((t = e.subHeaders) != null && t.length);
|
|
3812
3854
|
}), Q(e.options, $, "getCenterLeafHeaders")), e.getLeftLeafHeaders = Z(() => [e.getLeftFlatHeaders()], (e) => e.filter((e) => {
|
|
@@ -3825,7 +3867,7 @@ var Qr = { createTable: (e) => {
|
|
|
3825
3867
|
...n[0]?.headers ?? []
|
|
3826
3868
|
].map((e) => e.getLeafHeaders()).flat(), Q(e.options, $, "getLeafHeaders"));
|
|
3827
3869
|
} };
|
|
3828
|
-
function
|
|
3870
|
+
function ti(e, t, n, r) {
|
|
3829
3871
|
let i = 0, a = function(e, t) {
|
|
3830
3872
|
t === void 0 && (t = 1), i = Math.max(i, t), e.filter((e) => e.getIsVisible()).forEach((e) => {
|
|
3831
3873
|
var n;
|
|
@@ -3843,7 +3885,7 @@ function $r(e, t, n, r) {
|
|
|
3843
3885
|
let o = [...a].reverse()[0], s = e.column.depth === i.depth, c, l = !1;
|
|
3844
3886
|
if (s && e.column.parent ? c = e.column.parent : (c = e.column, l = !0), o && o?.column === c) o.subHeaders.push(e);
|
|
3845
3887
|
else {
|
|
3846
|
-
let i =
|
|
3888
|
+
let i = $r(n, c, {
|
|
3847
3889
|
id: [
|
|
3848
3890
|
r,
|
|
3849
3891
|
t,
|
|
@@ -3860,7 +3902,7 @@ function $r(e, t, n, r) {
|
|
|
3860
3902
|
i.headers.push(e), e.headerGroup = i;
|
|
3861
3903
|
}), o.push(i), t > 0 && s(a, t - 1);
|
|
3862
3904
|
};
|
|
3863
|
-
s(t.map((e, t) =>
|
|
3905
|
+
s(t.map((e, t) => $r(n, e, {
|
|
3864
3906
|
depth: i,
|
|
3865
3907
|
index: t
|
|
3866
3908
|
})), i - 1), o.reverse();
|
|
@@ -3878,7 +3920,7 @@ function $r(e, t, n, r) {
|
|
|
3878
3920
|
});
|
|
3879
3921
|
return c(o[0]?.headers ?? []), o;
|
|
3880
3922
|
}
|
|
3881
|
-
var
|
|
3923
|
+
var ni = (e, t, n, r, i, a, o) => {
|
|
3882
3924
|
let s = {
|
|
3883
3925
|
id: t,
|
|
3884
3926
|
index: r,
|
|
@@ -3899,7 +3941,7 @@ var ei = (e, t, n, r, i, a, o) => {
|
|
|
3899
3941
|
},
|
|
3900
3942
|
renderValue: (t) => s.getValue(t) ?? e.options.renderFallbackValue,
|
|
3901
3943
|
subRows: a ?? [],
|
|
3902
|
-
getLeafRows: () =>
|
|
3944
|
+
getLeafRows: () => Xr(s.subRows, (e) => e.subRows),
|
|
3903
3945
|
getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
|
|
3904
3946
|
getParentRows: () => {
|
|
3905
3947
|
let e = [], t = s;
|
|
@@ -3910,7 +3952,7 @@ var ei = (e, t, n, r, i, a, o) => {
|
|
|
3910
3952
|
}
|
|
3911
3953
|
return e.reverse();
|
|
3912
3954
|
},
|
|
3913
|
-
getAllCells: Z(() => [e.getAllLeafColumns()], (t) => t.map((t) =>
|
|
3955
|
+
getAllCells: Z(() => [e.getAllLeafColumns()], (t) => t.map((t) => Zr(e, s, t, t.id)), Q(e.options, "debugRows", "getAllCells")),
|
|
3914
3956
|
_getAllCellsByColumnId: Z(() => [s.getAllCells()], (e) => e.reduce((e, t) => (e[t.column.id] = t, e), {}), Q(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
3915
3957
|
};
|
|
3916
3958
|
for (let t = 0; t < e._features.length; t++) {
|
|
@@ -3918,66 +3960,66 @@ var ei = (e, t, n, r, i, a, o) => {
|
|
|
3918
3960
|
n == null || n.createRow == null || n.createRow(s, e);
|
|
3919
3961
|
}
|
|
3920
3962
|
return s;
|
|
3921
|
-
},
|
|
3963
|
+
}, ri = { createColumn: (e, t) => {
|
|
3922
3964
|
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 = () => {
|
|
3923
3965
|
if (e._getFacetedMinMaxValues) return e._getFacetedMinMaxValues();
|
|
3924
3966
|
};
|
|
3925
|
-
} },
|
|
3967
|
+
} }, ii = (e, t, n) => {
|
|
3926
3968
|
var r, i;
|
|
3927
3969
|
let a = n == null || (r = n.toString()) == null ? void 0 : r.toLowerCase();
|
|
3928
3970
|
return !!(!((i = e.getValue(t)) == null || (i = i.toString()) == null || (i = i.toLowerCase()) == null) && i.includes(a));
|
|
3929
3971
|
};
|
|
3930
|
-
|
|
3931
|
-
var
|
|
3972
|
+
ii.autoRemove = (e) => mi(e);
|
|
3973
|
+
var ai = (e, t, n) => {
|
|
3932
3974
|
var r;
|
|
3933
3975
|
return !!(!((r = e.getValue(t)) == null || (r = r.toString()) == null) && r.includes(n));
|
|
3934
3976
|
};
|
|
3935
|
-
|
|
3936
|
-
var
|
|
3977
|
+
ai.autoRemove = (e) => mi(e);
|
|
3978
|
+
var oi = (e, t, n) => {
|
|
3937
3979
|
var r;
|
|
3938
3980
|
return ((r = e.getValue(t)) == null || (r = r.toString()) == null ? void 0 : r.toLowerCase()) === n?.toLowerCase();
|
|
3939
3981
|
};
|
|
3940
|
-
|
|
3941
|
-
var
|
|
3942
|
-
|
|
3943
|
-
var
|
|
3982
|
+
oi.autoRemove = (e) => mi(e);
|
|
3983
|
+
var si = (e, t, n) => e.getValue(t)?.includes(n);
|
|
3984
|
+
si.autoRemove = (e) => mi(e);
|
|
3985
|
+
var ci = (e, t, n) => !n.some((n) => {
|
|
3944
3986
|
var r;
|
|
3945
3987
|
return !((r = e.getValue(t)) != null && r.includes(n));
|
|
3946
3988
|
});
|
|
3947
|
-
|
|
3948
|
-
var
|
|
3949
|
-
|
|
3950
|
-
var
|
|
3951
|
-
|
|
3952
|
-
var
|
|
3953
|
-
|
|
3954
|
-
var
|
|
3989
|
+
ci.autoRemove = (e) => mi(e) || !(e != null && e.length);
|
|
3990
|
+
var li = (e, t, n) => n.some((n) => e.getValue(t)?.includes(n));
|
|
3991
|
+
li.autoRemove = (e) => mi(e) || !(e != null && e.length);
|
|
3992
|
+
var ui = (e, t, n) => e.getValue(t) === n;
|
|
3993
|
+
ui.autoRemove = (e) => mi(e);
|
|
3994
|
+
var di = (e, t, n) => e.getValue(t) == n;
|
|
3995
|
+
di.autoRemove = (e) => mi(e);
|
|
3996
|
+
var fi = (e, t, n) => {
|
|
3955
3997
|
let [r, i] = n, a = e.getValue(t);
|
|
3956
3998
|
return a >= r && a <= i;
|
|
3957
3999
|
};
|
|
3958
|
-
|
|
4000
|
+
fi.resolveFilterValue = (e) => {
|
|
3959
4001
|
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;
|
|
3960
4002
|
if (a > o) {
|
|
3961
4003
|
let e = a;
|
|
3962
4004
|
a = o, o = e;
|
|
3963
4005
|
}
|
|
3964
4006
|
return [a, o];
|
|
3965
|
-
},
|
|
3966
|
-
var
|
|
3967
|
-
includesString:
|
|
3968
|
-
includesStringSensitive:
|
|
3969
|
-
equalsString:
|
|
3970
|
-
arrIncludes:
|
|
3971
|
-
arrIncludesAll:
|
|
3972
|
-
arrIncludesSome:
|
|
3973
|
-
equals:
|
|
3974
|
-
weakEquals:
|
|
3975
|
-
inNumberRange:
|
|
4007
|
+
}, fi.autoRemove = (e) => mi(e) || mi(e[0]) && mi(e[1]);
|
|
4008
|
+
var pi = {
|
|
4009
|
+
includesString: ii,
|
|
4010
|
+
includesStringSensitive: ai,
|
|
4011
|
+
equalsString: oi,
|
|
4012
|
+
arrIncludes: si,
|
|
4013
|
+
arrIncludesAll: ci,
|
|
4014
|
+
arrIncludesSome: li,
|
|
4015
|
+
equals: ui,
|
|
4016
|
+
weakEquals: di,
|
|
4017
|
+
inNumberRange: fi
|
|
3976
4018
|
};
|
|
3977
|
-
function
|
|
4019
|
+
function mi(e) {
|
|
3978
4020
|
return e == null || e === "";
|
|
3979
4021
|
}
|
|
3980
|
-
var
|
|
4022
|
+
var hi = {
|
|
3981
4023
|
getDefaultColumnDef: () => ({ filterFn: "auto" }),
|
|
3982
4024
|
getInitialState: (e) => ({
|
|
3983
4025
|
columnFilters: [],
|
|
@@ -3991,14 +4033,14 @@ var pi = {
|
|
|
3991
4033
|
createColumn: (e, t) => {
|
|
3992
4034
|
e.getAutoFilterFn = () => {
|
|
3993
4035
|
let n = t.getCoreRowModel().flatRows[0]?.getValue(e.id);
|
|
3994
|
-
return typeof n == "string" ?
|
|
3995
|
-
}, e.getFilterFn = () =>
|
|
4036
|
+
return typeof n == "string" ? pi.includesString : typeof n == "number" ? pi.inNumberRange : typeof n == "boolean" || typeof n == "object" && n ? pi.equals : Array.isArray(n) ? pi.arrIncludes : pi.weakEquals;
|
|
4037
|
+
}, e.getFilterFn = () => Jr(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : t.options.filterFns?.[e.columnDef.filterFn] ?? pi[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 = () => {
|
|
3996
4038
|
var n;
|
|
3997
4039
|
return (n = t.getState().columnFilters) == null || (n = n.find((t) => t.id === e.id)) == null ? void 0 : n.value;
|
|
3998
4040
|
}, e.getFilterIndex = () => t.getState().columnFilters?.findIndex((t) => t.id === e.id) ?? -1, e.setFilterValue = (n) => {
|
|
3999
4041
|
t.setColumnFilters((t) => {
|
|
4000
|
-
let r = e.getFilterFn(), i = t?.find((t) => t.id === e.id), a =
|
|
4001
|
-
if (
|
|
4042
|
+
let r = e.getFilterFn(), i = t?.find((t) => t.id === e.id), a = qr(n, i ? i.value : void 0);
|
|
4043
|
+
if (gi(r, a, e)) return t?.filter((t) => t.id !== e.id) ?? [];
|
|
4002
4044
|
let o = {
|
|
4003
4045
|
id: e.id,
|
|
4004
4046
|
value: a
|
|
@@ -4013,19 +4055,19 @@ var pi = {
|
|
|
4013
4055
|
createTable: (e) => {
|
|
4014
4056
|
e.setColumnFilters = (t) => {
|
|
4015
4057
|
let n = e.getAllLeafColumns();
|
|
4016
|
-
e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange((e) =>
|
|
4058
|
+
e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange((e) => qr(t, e)?.filter((e) => {
|
|
4017
4059
|
let t = n.find((t) => t.id === e.id);
|
|
4018
|
-
return !(t &&
|
|
4060
|
+
return !(t && gi(t.getFilterFn(), e.value, t));
|
|
4019
4061
|
}));
|
|
4020
4062
|
}, e.resetColumnFilters = (t) => {
|
|
4021
4063
|
e.setColumnFilters(t ? [] : e.initialState?.columnFilters ?? []);
|
|
4022
4064
|
}, 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());
|
|
4023
4065
|
}
|
|
4024
4066
|
};
|
|
4025
|
-
function
|
|
4067
|
+
function gi(e, t, n) {
|
|
4026
4068
|
return (e && e.autoRemove ? e.autoRemove(t, n) : !1) || t === void 0 || typeof t == "string" && !t;
|
|
4027
4069
|
}
|
|
4028
|
-
var
|
|
4070
|
+
var _i = {
|
|
4029
4071
|
sum: (e, t, n) => n.reduce((t, n) => {
|
|
4030
4072
|
let r = n.getValue(e);
|
|
4031
4073
|
return t + (typeof r == "number" ? r : 0);
|
|
@@ -4061,7 +4103,7 @@ var hi = {
|
|
|
4061
4103
|
median: (e, t) => {
|
|
4062
4104
|
if (!t.length) return;
|
|
4063
4105
|
let n = t.map((t) => t.getValue(e));
|
|
4064
|
-
if (!
|
|
4106
|
+
if (!Yr(n)) return;
|
|
4065
4107
|
if (n.length === 1) return n[0];
|
|
4066
4108
|
let r = Math.floor(n.length / 2), i = n.sort((e, t) => e - t);
|
|
4067
4109
|
return n.length % 2 == 0 ? (i[r - 1] + i[r]) / 2 : i[r];
|
|
@@ -4069,7 +4111,7 @@ var hi = {
|
|
|
4069
4111
|
unique: (e, t) => Array.from(new Set(t.map((t) => t.getValue(e))).values()),
|
|
4070
4112
|
uniqueCount: (e, t) => new Set(t.map((t) => t.getValue(e))).size,
|
|
4071
4113
|
count: (e, t) => t.length
|
|
4072
|
-
},
|
|
4114
|
+
}, vi = {
|
|
4073
4115
|
getDefaultColumnDef: () => ({
|
|
4074
4116
|
aggregatedCell: (e) => {
|
|
4075
4117
|
var t;
|
|
@@ -4095,11 +4137,11 @@ var hi = {
|
|
|
4095
4137
|
};
|
|
4096
4138
|
}, e.getAutoAggregationFn = () => {
|
|
4097
4139
|
let n = t.getCoreRowModel().flatRows[0]?.getValue(e.id);
|
|
4098
|
-
if (typeof n == "number") return
|
|
4099
|
-
if (Object.prototype.toString.call(n) === "[object Date]") return
|
|
4140
|
+
if (typeof n == "number") return _i.sum;
|
|
4141
|
+
if (Object.prototype.toString.call(n) === "[object Date]") return _i.extent;
|
|
4100
4142
|
}, e.getAggregationFn = () => {
|
|
4101
4143
|
if (!e) throw Error();
|
|
4102
|
-
return
|
|
4144
|
+
return Jr(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : t.options.aggregationFns?.[e.columnDef.aggregationFn] ?? _i[e.columnDef.aggregationFn];
|
|
4103
4145
|
};
|
|
4104
4146
|
},
|
|
4105
4147
|
createTable: (e) => {
|
|
@@ -4121,20 +4163,20 @@ var hi = {
|
|
|
4121
4163
|
};
|
|
4122
4164
|
}
|
|
4123
4165
|
};
|
|
4124
|
-
function
|
|
4166
|
+
function yi(e, t, n) {
|
|
4125
4167
|
if (!(t != null && t.length) || !n) return e;
|
|
4126
4168
|
let r = e.filter((e) => !t.includes(e.id));
|
|
4127
4169
|
return n === "remove" ? r : [...t.map((t) => e.find((e) => e.id === t)).filter(Boolean), ...r];
|
|
4128
4170
|
}
|
|
4129
|
-
var
|
|
4171
|
+
var bi = {
|
|
4130
4172
|
getInitialState: (e) => ({
|
|
4131
4173
|
columnOrder: [],
|
|
4132
4174
|
...e
|
|
4133
4175
|
}),
|
|
4134
4176
|
getDefaultOptions: (e) => ({ onColumnOrderChange: X("columnOrder", e) }),
|
|
4135
4177
|
createColumn: (e, t) => {
|
|
4136
|
-
e.getIndex = Z((e) => [
|
|
4137
|
-
let r =
|
|
4178
|
+
e.getIndex = Z((e) => [ji(t, e)], (t) => t.findIndex((t) => t.id === e.id), Q(t.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (n) => ji(t, n)[0]?.id === e.id, e.getIsLastColumn = (n) => {
|
|
4179
|
+
let r = ji(t, n);
|
|
4138
4180
|
return r[r.length - 1]?.id === e.id;
|
|
4139
4181
|
};
|
|
4140
4182
|
},
|
|
@@ -4156,15 +4198,15 @@ var vi = {
|
|
|
4156
4198
|
}
|
|
4157
4199
|
i = [...i, ...n];
|
|
4158
4200
|
}
|
|
4159
|
-
return
|
|
4201
|
+
return yi(i, t, n);
|
|
4160
4202
|
}, Q(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
4161
4203
|
}
|
|
4162
|
-
},
|
|
4204
|
+
}, xi = () => ({
|
|
4163
4205
|
left: [],
|
|
4164
4206
|
right: []
|
|
4165
|
-
}),
|
|
4207
|
+
}), Si = {
|
|
4166
4208
|
getInitialState: (e) => ({
|
|
4167
|
-
columnPinning:
|
|
4209
|
+
columnPinning: xi(),
|
|
4168
4210
|
...e
|
|
4169
4211
|
}),
|
|
4170
4212
|
getDefaultOptions: (e) => ({ onColumnPinningChange: X("columnPinning", e) }),
|
|
@@ -4207,7 +4249,7 @@ var vi = {
|
|
|
4207
4249
|
})), Q(t.options, "debugRows", "getRightVisibleCells"));
|
|
4208
4250
|
},
|
|
4209
4251
|
createTable: (e) => {
|
|
4210
|
-
e.setColumnPinning = (t) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(t), e.resetColumnPinning = (t) => e.setColumnPinning(t ?
|
|
4252
|
+
e.setColumnPinning = (t) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(t), e.resetColumnPinning = (t) => e.setColumnPinning(t ? xi() : e.initialState?.columnPinning ?? xi()), e.getIsSomeColumnsPinned = (t) => {
|
|
4211
4253
|
let n = e.getState().columnPinning;
|
|
4212
4254
|
return t ? !!n[t]?.length : !!(n.left?.length || n.right?.length);
|
|
4213
4255
|
}, 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(() => [
|
|
@@ -4220,25 +4262,25 @@ var vi = {
|
|
|
4220
4262
|
}, Q(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
4221
4263
|
}
|
|
4222
4264
|
};
|
|
4223
|
-
function
|
|
4265
|
+
function Ci(e) {
|
|
4224
4266
|
return e || (typeof document < "u" ? document : null);
|
|
4225
4267
|
}
|
|
4226
|
-
var
|
|
4268
|
+
var wi = {
|
|
4227
4269
|
size: 150,
|
|
4228
4270
|
minSize: 20,
|
|
4229
4271
|
maxSize: 2 ** 53 - 1
|
|
4230
|
-
},
|
|
4272
|
+
}, Ti = () => ({
|
|
4231
4273
|
startOffset: null,
|
|
4232
4274
|
startSize: null,
|
|
4233
4275
|
deltaOffset: null,
|
|
4234
4276
|
deltaPercentage: null,
|
|
4235
4277
|
isResizingColumn: !1,
|
|
4236
4278
|
columnSizingStart: []
|
|
4237
|
-
}),
|
|
4238
|
-
getDefaultColumnDef: () =>
|
|
4279
|
+
}), Ei = {
|
|
4280
|
+
getDefaultColumnDef: () => wi,
|
|
4239
4281
|
getInitialState: (e) => ({
|
|
4240
4282
|
columnSizing: {},
|
|
4241
|
-
columnSizingInfo:
|
|
4283
|
+
columnSizingInfo: Ti(),
|
|
4242
4284
|
...e
|
|
4243
4285
|
}),
|
|
4244
4286
|
getDefaultOptions: (e) => ({
|
|
@@ -4250,14 +4292,14 @@ var Si = {
|
|
|
4250
4292
|
createColumn: (e, t) => {
|
|
4251
4293
|
e.getSize = () => {
|
|
4252
4294
|
let n = t.getState().columnSizing[e.id];
|
|
4253
|
-
return Math.min(Math.max(e.columnDef.minSize ??
|
|
4295
|
+
return Math.min(Math.max(e.columnDef.minSize ?? wi.minSize, n ?? e.columnDef.size ?? wi.size), e.columnDef.maxSize ?? wi.maxSize);
|
|
4254
4296
|
}, e.getStart = Z((e) => [
|
|
4255
4297
|
e,
|
|
4256
|
-
|
|
4298
|
+
ji(t, e),
|
|
4257
4299
|
t.getState().columnSizing
|
|
4258
4300
|
], (t, n) => n.slice(0, e.getIndex(t)).reduce((e, t) => e + t.getSize(), 0), Q(t.options, "debugColumns", "getStart")), e.getAfter = Z((e) => [
|
|
4259
4301
|
e,
|
|
4260
|
-
|
|
4302
|
+
ji(t, e),
|
|
4261
4303
|
t.getState().columnSizing
|
|
4262
4304
|
], (t, n) => n.slice(e.getIndex(t) + 1).reduce((e, t) => e + t.getSize(), 0), Q(t.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
|
4263
4305
|
t.setColumnSizing((t) => {
|
|
@@ -4281,8 +4323,8 @@ var Si = {
|
|
|
4281
4323
|
}, e.getResizeHandler = (n) => {
|
|
4282
4324
|
let r = t.getColumn(e.column.id), i = r?.getCanResize();
|
|
4283
4325
|
return (a) => {
|
|
4284
|
-
if (!r || !i || (a.persist == null || a.persist(),
|
|
4285
|
-
let o = e.getSize(), s = e ? e.getLeafHeaders().map((e) => [e.column.id, e.column.getSize()]) : [[r.id, r.getSize()]], c =
|
|
4326
|
+
if (!r || !i || (a.persist == null || a.persist(), ki(a) && a.touches && a.touches.length > 1)) return;
|
|
4327
|
+
let o = e.getSize(), s = e ? e.getLeafHeaders().map((e) => [e.column.id, e.column.getSize()]) : [[r.id, r.getSize()]], c = ki(a) ? Math.round(a.touches[0].clientX) : a.clientX, l = {}, u = (e, n) => {
|
|
4286
4328
|
typeof n == "number" && (t.setColumnSizingInfo((e) => {
|
|
4287
4329
|
let r = t.options.columnResizeDirection === "rtl" ? -1 : 1, i = (n - (e?.startOffset ?? 0)) * r, a = Math.max(i / (e?.startSize ?? 0), -.999999);
|
|
4288
4330
|
return e.columnSizingStart.forEach((e) => {
|
|
@@ -4307,7 +4349,7 @@ var Si = {
|
|
|
4307
4349
|
deltaPercentage: null,
|
|
4308
4350
|
columnSizingStart: []
|
|
4309
4351
|
}));
|
|
4310
|
-
}, p =
|
|
4352
|
+
}, p = Ci(n), m = {
|
|
4311
4353
|
moveHandler: (e) => d(e.clientX),
|
|
4312
4354
|
upHandler: (e) => {
|
|
4313
4355
|
p?.removeEventListener("mousemove", m.moveHandler), p?.removeEventListener("mouseup", m.upHandler), f(e.clientX);
|
|
@@ -4317,8 +4359,8 @@ var Si = {
|
|
|
4317
4359
|
upHandler: (e) => {
|
|
4318
4360
|
p?.removeEventListener("touchmove", h.moveHandler), p?.removeEventListener("touchend", h.upHandler), e.cancelable && (e.preventDefault(), e.stopPropagation()), f(e.touches[0]?.clientX);
|
|
4319
4361
|
}
|
|
4320
|
-
}, g =
|
|
4321
|
-
|
|
4362
|
+
}, g = Oi() ? { passive: !1 } : !1;
|
|
4363
|
+
ki(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) => ({
|
|
4322
4364
|
...e,
|
|
4323
4365
|
startOffset: c,
|
|
4324
4366
|
startSize: o,
|
|
@@ -4334,12 +4376,12 @@ var Si = {
|
|
|
4334
4376
|
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) => {
|
|
4335
4377
|
e.setColumnSizing(t ? {} : e.initialState.columnSizing ?? {});
|
|
4336
4378
|
}, e.resetHeaderSizeInfo = (t) => {
|
|
4337
|
-
e.setColumnSizingInfo(t ?
|
|
4379
|
+
e.setColumnSizingInfo(t ? Ti() : e.initialState.columnSizingInfo ?? Ti());
|
|
4338
4380
|
}, 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;
|
|
4339
4381
|
}
|
|
4340
|
-
},
|
|
4341
|
-
function
|
|
4342
|
-
if (typeof
|
|
4382
|
+
}, Di = null;
|
|
4383
|
+
function Oi() {
|
|
4384
|
+
if (typeof Di == "boolean") return Di;
|
|
4343
4385
|
let e = !1;
|
|
4344
4386
|
try {
|
|
4345
4387
|
let t = { get passive() {
|
|
@@ -4349,12 +4391,12 @@ function Ei() {
|
|
|
4349
4391
|
} catch {
|
|
4350
4392
|
e = !1;
|
|
4351
4393
|
}
|
|
4352
|
-
return
|
|
4394
|
+
return Di = e, Di;
|
|
4353
4395
|
}
|
|
4354
|
-
function
|
|
4396
|
+
function ki(e) {
|
|
4355
4397
|
return e.type === "touchstart";
|
|
4356
4398
|
}
|
|
4357
|
-
var
|
|
4399
|
+
var Ai = {
|
|
4358
4400
|
getInitialState: (e) => ({
|
|
4359
4401
|
columnVisibility: {},
|
|
4360
4402
|
...e
|
|
@@ -4398,14 +4440,14 @@ var Oi = {
|
|
|
4398
4440
|
};
|
|
4399
4441
|
}
|
|
4400
4442
|
};
|
|
4401
|
-
function
|
|
4443
|
+
function ji(e, t) {
|
|
4402
4444
|
return t ? t === "center" ? e.getCenterVisibleLeafColumns() : t === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
4403
4445
|
}
|
|
4404
|
-
var
|
|
4446
|
+
var Mi = { createTable: (e) => {
|
|
4405
4447
|
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 = () => {
|
|
4406
4448
|
if (e._getGlobalFacetedMinMaxValues) return e._getGlobalFacetedMinMaxValues();
|
|
4407
4449
|
};
|
|
4408
|
-
} },
|
|
4450
|
+
} }, Ni = {
|
|
4409
4451
|
getInitialState: (e) => ({
|
|
4410
4452
|
globalFilter: void 0,
|
|
4411
4453
|
...e
|
|
@@ -4423,16 +4465,16 @@ var Ai = { createTable: (e) => {
|
|
|
4423
4465
|
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;
|
|
4424
4466
|
},
|
|
4425
4467
|
createTable: (e) => {
|
|
4426
|
-
e.getGlobalAutoFilterFn = () =>
|
|
4468
|
+
e.getGlobalAutoFilterFn = () => pi.includesString, e.getGlobalFilterFn = () => {
|
|
4427
4469
|
let { globalFilterFn: t } = e.options;
|
|
4428
|
-
return
|
|
4470
|
+
return Jr(t) ? t : t === "auto" ? e.getGlobalAutoFilterFn() : e.options.filterFns?.[t] ?? pi[t];
|
|
4429
4471
|
}, e.setGlobalFilter = (t) => {
|
|
4430
4472
|
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(t);
|
|
4431
4473
|
}, e.resetGlobalFilter = (t) => {
|
|
4432
4474
|
e.setGlobalFilter(t ? void 0 : e.initialState.globalFilter);
|
|
4433
4475
|
};
|
|
4434
4476
|
}
|
|
4435
|
-
},
|
|
4477
|
+
}, Pi = {
|
|
4436
4478
|
getInitialState: (e) => ({
|
|
4437
4479
|
expanded: {},
|
|
4438
4480
|
...e
|
|
@@ -4509,14 +4551,14 @@ var Ai = { createTable: (e) => {
|
|
|
4509
4551
|
};
|
|
4510
4552
|
};
|
|
4511
4553
|
}
|
|
4512
|
-
},
|
|
4513
|
-
pageIndex:
|
|
4514
|
-
pageSize:
|
|
4515
|
-
}),
|
|
4554
|
+
}, Fi = 0, Ii = 10, Li = () => ({
|
|
4555
|
+
pageIndex: Fi,
|
|
4556
|
+
pageSize: Ii
|
|
4557
|
+
}), Ri = {
|
|
4516
4558
|
getInitialState: (e) => ({
|
|
4517
4559
|
...e,
|
|
4518
4560
|
pagination: {
|
|
4519
|
-
...
|
|
4561
|
+
...Li(),
|
|
4520
4562
|
...e?.pagination
|
|
4521
4563
|
}
|
|
4522
4564
|
}),
|
|
@@ -4536,11 +4578,11 @@ var Ai = { createTable: (e) => {
|
|
|
4536
4578
|
e.resetPageIndex(), n = !1;
|
|
4537
4579
|
});
|
|
4538
4580
|
}
|
|
4539
|
-
}, e.setPagination = (t) => e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange((e) =>
|
|
4540
|
-
e.setPagination(t ?
|
|
4581
|
+
}, e.setPagination = (t) => e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange((e) => qr(t, e)), e.resetPagination = (t) => {
|
|
4582
|
+
e.setPagination(t ? Li() : e.initialState.pagination ?? Li());
|
|
4541
4583
|
}, e.setPageIndex = (t) => {
|
|
4542
4584
|
e.setPagination((n) => {
|
|
4543
|
-
let r =
|
|
4585
|
+
let r = qr(t, n.pageIndex), i = e.options.pageCount === void 0 || e.options.pageCount === -1 ? 2 ** 53 - 1 : e.options.pageCount - 1;
|
|
4544
4586
|
return r = Math.max(0, Math.min(r, i)), {
|
|
4545
4587
|
...n,
|
|
4546
4588
|
pageIndex: r
|
|
@@ -4548,13 +4590,13 @@ var Ai = { createTable: (e) => {
|
|
|
4548
4590
|
});
|
|
4549
4591
|
}, e.resetPageIndex = (t) => {
|
|
4550
4592
|
var n;
|
|
4551
|
-
e.setPageIndex(t ?
|
|
4593
|
+
e.setPageIndex(t ? Fi : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageIndex) ?? Fi);
|
|
4552
4594
|
}, e.resetPageSize = (t) => {
|
|
4553
4595
|
var n;
|
|
4554
|
-
e.setPageSize(t ?
|
|
4596
|
+
e.setPageSize(t ? Ii : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageSize) ?? Ii);
|
|
4555
4597
|
}, e.setPageSize = (t) => {
|
|
4556
4598
|
e.setPagination((e) => {
|
|
4557
|
-
let n = Math.max(1,
|
|
4599
|
+
let n = Math.max(1, qr(t, e.pageSize)), r = e.pageSize * e.pageIndex, i = Math.floor(r / n);
|
|
4558
4600
|
return {
|
|
4559
4601
|
...e,
|
|
4560
4602
|
pageIndex: i,
|
|
@@ -4562,7 +4604,7 @@ var Ai = { createTable: (e) => {
|
|
|
4562
4604
|
};
|
|
4563
4605
|
});
|
|
4564
4606
|
}, e.setPageCount = (t) => e.setPagination((n) => {
|
|
4565
|
-
let r =
|
|
4607
|
+
let r = qr(t, e.options.pageCount ?? -1);
|
|
4566
4608
|
return typeof r == "number" && (r = Math.max(-1, r)), {
|
|
4567
4609
|
...n,
|
|
4568
4610
|
pageCount: r
|
|
@@ -4575,12 +4617,12 @@ var Ai = { createTable: (e) => {
|
|
|
4575
4617
|
return n === -1 ? !0 : n === 0 ? !1 : t < n - 1;
|
|
4576
4618
|
}, 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;
|
|
4577
4619
|
}
|
|
4578
|
-
},
|
|
4620
|
+
}, zi = () => ({
|
|
4579
4621
|
top: [],
|
|
4580
4622
|
bottom: []
|
|
4581
|
-
}),
|
|
4623
|
+
}), Bi = {
|
|
4582
4624
|
getInitialState: (e) => ({
|
|
4583
|
-
rowPinning:
|
|
4625
|
+
rowPinning: zi(),
|
|
4584
4626
|
...e
|
|
4585
4627
|
}),
|
|
4586
4628
|
getDefaultOptions: (e) => ({ onRowPinningChange: X("rowPinning", e) }),
|
|
@@ -4622,7 +4664,7 @@ var Ai = { createTable: (e) => {
|
|
|
4622
4664
|
};
|
|
4623
4665
|
},
|
|
4624
4666
|
createTable: (e) => {
|
|
4625
|
-
e.setRowPinning = (t) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(t), e.resetRowPinning = (t) => e.setRowPinning(t ?
|
|
4667
|
+
e.setRowPinning = (t) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(t), e.resetRowPinning = (t) => e.setRowPinning(t ? zi() : e.initialState?.rowPinning ?? zi()), e.getIsSomeRowsPinned = (t) => {
|
|
4626
4668
|
let n = e.getState().rowPinning;
|
|
4627
4669
|
return t ? !!n[t]?.length : !!(n.top?.length || n.bottom?.length);
|
|
4628
4670
|
}, e._getPinnedRows = (t, n, r) => (e.options.keepPinnedRows ?? !0 ? (n ?? []).map((t) => {
|
|
@@ -4640,7 +4682,7 @@ var Ai = { createTable: (e) => {
|
|
|
4640
4682
|
return e.filter((e) => !r.has(e.id));
|
|
4641
4683
|
}, Q(e.options, "debugRows", "getCenterRows"));
|
|
4642
4684
|
}
|
|
4643
|
-
},
|
|
4685
|
+
}, Vi = {
|
|
4644
4686
|
getInitialState: (e) => ({
|
|
4645
4687
|
rowSelection: {},
|
|
4646
4688
|
...e
|
|
@@ -4665,17 +4707,17 @@ var Ai = { createTable: (e) => {
|
|
|
4665
4707
|
}, e.toggleAllPageRowsSelected = (t) => e.setRowSelection((n) => {
|
|
4666
4708
|
let r = t === void 0 ? !e.getIsAllPageRowsSelected() : t, i = { ...n };
|
|
4667
4709
|
return e.getRowModel().rows.forEach((t) => {
|
|
4668
|
-
|
|
4710
|
+
Hi(i, t.id, r, !0, e);
|
|
4669
4711
|
}), i;
|
|
4670
|
-
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = Z(() => [e.getState().rowSelection, e.getCoreRowModel()], (t, n) => Object.keys(t).length ?
|
|
4712
|
+
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = Z(() => [e.getState().rowSelection, e.getCoreRowModel()], (t, n) => Object.keys(t).length ? Ui(e, n) : {
|
|
4671
4713
|
rows: [],
|
|
4672
4714
|
flatRows: [],
|
|
4673
4715
|
rowsById: {}
|
|
4674
|
-
}, Q(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = Z(() => [e.getState().rowSelection, e.getFilteredRowModel()], (t, n) => Object.keys(t).length ?
|
|
4716
|
+
}, Q(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = Z(() => [e.getState().rowSelection, e.getFilteredRowModel()], (t, n) => Object.keys(t).length ? Ui(e, n) : {
|
|
4675
4717
|
rows: [],
|
|
4676
4718
|
flatRows: [],
|
|
4677
4719
|
rowsById: {}
|
|
4678
|
-
}, Q(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = Z(() => [e.getState().rowSelection, e.getSortedRowModel()], (t, n) => Object.keys(t).length ?
|
|
4720
|
+
}, Q(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = Z(() => [e.getState().rowSelection, e.getSortedRowModel()], (t, n) => Object.keys(t).length ? Ui(e, n) : {
|
|
4679
4721
|
rows: [],
|
|
4680
4722
|
flatRows: [],
|
|
4681
4723
|
rowsById: {}
|
|
@@ -4703,17 +4745,17 @@ var Ai = { createTable: (e) => {
|
|
|
4703
4745
|
t.setRowSelection((a) => {
|
|
4704
4746
|
if (n = n === void 0 ? !i : n, e.getCanSelect() && i === n) return a;
|
|
4705
4747
|
let o = { ...a };
|
|
4706
|
-
return
|
|
4748
|
+
return Hi(o, e.id, n, r?.selectChildren ?? !0, t), o;
|
|
4707
4749
|
});
|
|
4708
4750
|
}, e.getIsSelected = () => {
|
|
4709
4751
|
let { rowSelection: n } = t.getState();
|
|
4710
|
-
return
|
|
4752
|
+
return Wi(e, n);
|
|
4711
4753
|
}, e.getIsSomeSelected = () => {
|
|
4712
4754
|
let { rowSelection: n } = t.getState();
|
|
4713
|
-
return
|
|
4755
|
+
return Gi(e, n) === "some";
|
|
4714
4756
|
}, e.getIsAllSubRowsSelected = () => {
|
|
4715
4757
|
let { rowSelection: n } = t.getState();
|
|
4716
|
-
return
|
|
4758
|
+
return Gi(e, n) === "all";
|
|
4717
4759
|
}, 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 = () => {
|
|
4718
4760
|
let t = e.getCanSelect();
|
|
4719
4761
|
return (n) => {
|
|
@@ -4721,16 +4763,16 @@ var Ai = { createTable: (e) => {
|
|
|
4721
4763
|
};
|
|
4722
4764
|
};
|
|
4723
4765
|
}
|
|
4724
|
-
},
|
|
4766
|
+
}, Hi = (e, t, n, r, i) => {
|
|
4725
4767
|
var a;
|
|
4726
4768
|
let o = i.getRow(t, !0);
|
|
4727
|
-
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) =>
|
|
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) => Hi(e, t.id, n, r, i));
|
|
4728
4770
|
};
|
|
4729
|
-
function
|
|
4771
|
+
function Ui(e, t) {
|
|
4730
4772
|
let n = e.getState().rowSelection, r = [], i = {}, a = function(e, t) {
|
|
4731
4773
|
return e.map((e) => {
|
|
4732
4774
|
var t;
|
|
4733
|
-
let o =
|
|
4775
|
+
let o = Wi(e, n);
|
|
4734
4776
|
if (o && (r.push(e), i[e.id] = e), (t = e.subRows) != null && t.length && (e = {
|
|
4735
4777
|
...e,
|
|
4736
4778
|
subRows: a(e.subRows)
|
|
@@ -4743,32 +4785,32 @@ function Vi(e, t) {
|
|
|
4743
4785
|
rowsById: i
|
|
4744
4786
|
};
|
|
4745
4787
|
}
|
|
4746
|
-
function
|
|
4788
|
+
function Wi(e, t) {
|
|
4747
4789
|
return t[e.id] ?? !1;
|
|
4748
4790
|
}
|
|
4749
|
-
function
|
|
4791
|
+
function Gi(e, t, n) {
|
|
4750
4792
|
var r;
|
|
4751
4793
|
if (!((r = e.subRows) != null && r.length)) return !1;
|
|
4752
4794
|
let i = !0, a = !1;
|
|
4753
4795
|
return e.subRows.forEach((e) => {
|
|
4754
|
-
if (!(a && !i) && (e.getCanSelect() && (
|
|
4755
|
-
let n =
|
|
4796
|
+
if (!(a && !i) && (e.getCanSelect() && (Wi(e, t) ? a = !0 : i = !1), e.subRows && e.subRows.length)) {
|
|
4797
|
+
let n = Gi(e, t);
|
|
4756
4798
|
n === "all" ? a = !0 : (n === "some" && (a = !0), i = !1);
|
|
4757
4799
|
}
|
|
4758
4800
|
}), i ? "all" : a ? "some" : !1;
|
|
4759
4801
|
}
|
|
4760
|
-
var
|
|
4802
|
+
var Ki = /([0-9]+)/gm, qi = (e, t, n) => ta(ea(e.getValue(n)).toLowerCase(), ea(t.getValue(n)).toLowerCase()), Ji = (e, t, n) => ta(ea(e.getValue(n)), ea(t.getValue(n))), Yi = (e, t, n) => $i(ea(e.getValue(n)).toLowerCase(), ea(t.getValue(n)).toLowerCase()), Xi = (e, t, n) => $i(ea(e.getValue(n)), ea(t.getValue(n))), Zi = (e, t, n) => {
|
|
4761
4803
|
let r = e.getValue(n), i = t.getValue(n);
|
|
4762
4804
|
return r > i ? 1 : r < i ? -1 : 0;
|
|
4763
|
-
},
|
|
4764
|
-
function
|
|
4805
|
+
}, Qi = (e, t, n) => $i(e.getValue(n), t.getValue(n));
|
|
4806
|
+
function $i(e, t) {
|
|
4765
4807
|
return e === t ? 0 : e > t ? 1 : -1;
|
|
4766
4808
|
}
|
|
4767
|
-
function
|
|
4809
|
+
function ea(e) {
|
|
4768
4810
|
return typeof e == "number" ? isNaN(e) || e === Infinity || e === -Infinity ? "" : String(e) : typeof e == "string" ? e : "";
|
|
4769
4811
|
}
|
|
4770
|
-
function
|
|
4771
|
-
let n = e.split(
|
|
4812
|
+
function ta(e, t) {
|
|
4813
|
+
let n = e.split(Ki).filter(Boolean), r = t.split(Ki).filter(Boolean);
|
|
4772
4814
|
for (; n.length && r.length;) {
|
|
4773
4815
|
let e = n.shift(), t = r.shift(), i = parseInt(e, 10), a = parseInt(t, 10), o = [i, a].sort();
|
|
4774
4816
|
if (isNaN(o[0])) {
|
|
@@ -4782,22 +4824,22 @@ function $i(e, t) {
|
|
|
4782
4824
|
}
|
|
4783
4825
|
return n.length - r.length;
|
|
4784
4826
|
}
|
|
4785
|
-
var
|
|
4786
|
-
alphanumeric:
|
|
4787
|
-
alphanumericCaseSensitive:
|
|
4788
|
-
text:
|
|
4789
|
-
textCaseSensitive:
|
|
4790
|
-
datetime:
|
|
4791
|
-
basic:
|
|
4792
|
-
},
|
|
4793
|
-
|
|
4794
|
-
Oi,
|
|
4795
|
-
vi,
|
|
4796
|
-
bi,
|
|
4797
|
-
ti,
|
|
4798
|
-
pi,
|
|
4827
|
+
var na = {
|
|
4828
|
+
alphanumeric: qi,
|
|
4829
|
+
alphanumericCaseSensitive: Ji,
|
|
4830
|
+
text: Yi,
|
|
4831
|
+
textCaseSensitive: Xi,
|
|
4832
|
+
datetime: Zi,
|
|
4833
|
+
basic: Qi
|
|
4834
|
+
}, ra = [
|
|
4835
|
+
ei,
|
|
4799
4836
|
Ai,
|
|
4800
|
-
|
|
4837
|
+
bi,
|
|
4838
|
+
Si,
|
|
4839
|
+
ri,
|
|
4840
|
+
hi,
|
|
4841
|
+
Mi,
|
|
4842
|
+
Ni,
|
|
4801
4843
|
{
|
|
4802
4844
|
getInitialState: (e) => ({
|
|
4803
4845
|
sorting: [],
|
|
@@ -4816,13 +4858,13 @@ var ea = {
|
|
|
4816
4858
|
let n = t.getFilteredRowModel().flatRows.slice(10), r = !1;
|
|
4817
4859
|
for (let t of n) {
|
|
4818
4860
|
let n = t?.getValue(e.id);
|
|
4819
|
-
if (Object.prototype.toString.call(n) === "[object Date]") return
|
|
4820
|
-
if (typeof n == "string" && (r = !0, n.split(
|
|
4861
|
+
if (Object.prototype.toString.call(n) === "[object Date]") return na.datetime;
|
|
4862
|
+
if (typeof n == "string" && (r = !0, n.split(Ki).length > 1)) return na.alphanumeric;
|
|
4821
4863
|
}
|
|
4822
|
-
return r ?
|
|
4864
|
+
return r ? na.text : na.basic;
|
|
4823
4865
|
}, e.getAutoSortDir = () => typeof t.getFilteredRowModel().flatRows[0]?.getValue(e.id) == "string" ? "asc" : "desc", e.getSortingFn = () => {
|
|
4824
4866
|
if (!e) throw Error();
|
|
4825
|
-
return
|
|
4867
|
+
return Jr(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : t.options.sortingFns?.[e.columnDef.sortingFn] ?? na[e.columnDef.sortingFn];
|
|
4826
4868
|
}, e.toggleSorting = (n, r) => {
|
|
4827
4869
|
let i = e.getNextSortingOrder(), a = n != null;
|
|
4828
4870
|
t.setSorting((o) => {
|
|
@@ -4859,16 +4901,16 @@ var ea = {
|
|
|
4859
4901
|
}, 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());
|
|
4860
4902
|
}
|
|
4861
4903
|
},
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
Ii,
|
|
4904
|
+
vi,
|
|
4905
|
+
Pi,
|
|
4865
4906
|
Ri,
|
|
4866
|
-
|
|
4867
|
-
|
|
4907
|
+
Bi,
|
|
4908
|
+
Vi,
|
|
4909
|
+
Ei
|
|
4868
4910
|
];
|
|
4869
|
-
function
|
|
4911
|
+
function ia(e) {
|
|
4870
4912
|
process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
|
4871
|
-
let t = [...
|
|
4913
|
+
let t = [...ra, ...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) : {
|
|
4872
4914
|
...r,
|
|
4873
4915
|
...e
|
|
4874
4916
|
}, a = { ...e.initialState ?? {} };
|
|
@@ -4894,7 +4936,7 @@ function na(e) {
|
|
|
4894
4936
|
n.setState(n.initialState);
|
|
4895
4937
|
},
|
|
4896
4938
|
setOptions: (e) => {
|
|
4897
|
-
let t =
|
|
4939
|
+
let t = qr(e, n.options);
|
|
4898
4940
|
n.options = i(t);
|
|
4899
4941
|
},
|
|
4900
4942
|
getState: () => n.options.state,
|
|
@@ -4925,7 +4967,7 @@ function na(e) {
|
|
|
4925
4967
|
getAllColumns: Z(() => [n._getColumnDefs()], (e) => {
|
|
4926
4968
|
let t = function(e, r, i) {
|
|
4927
4969
|
return i === void 0 && (i = 0), e.map((e) => {
|
|
4928
|
-
let a =
|
|
4970
|
+
let a = Qr(n, e, i, r), o = e;
|
|
4929
4971
|
return a.columns = o.columns ? t(o.columns, a, i + 1) : [], a;
|
|
4930
4972
|
});
|
|
4931
4973
|
};
|
|
@@ -4946,7 +4988,7 @@ function na(e) {
|
|
|
4946
4988
|
}
|
|
4947
4989
|
return n;
|
|
4948
4990
|
}
|
|
4949
|
-
function
|
|
4991
|
+
function aa() {
|
|
4950
4992
|
return (e) => Z(() => [e.options.data], (t) => {
|
|
4951
4993
|
let n = {
|
|
4952
4994
|
rows: [],
|
|
@@ -4956,7 +4998,7 @@ function ra() {
|
|
|
4956
4998
|
i === void 0 && (i = 0);
|
|
4957
4999
|
let o = [];
|
|
4958
5000
|
for (let c = 0; c < t.length; c++) {
|
|
4959
|
-
let l =
|
|
5001
|
+
let l = ni(e, e._getRowId(t[c], c, a), t[c], c, i, void 0, a?.id);
|
|
4960
5002
|
if (n.flatRows.push(l), n.rowsById[l.id] = l, o.push(l), e.options.getSubRows) {
|
|
4961
5003
|
var s;
|
|
4962
5004
|
l.originalSubRows = e.options.getSubRows(t[c], c), (s = l.originalSubRows) != null && s.length && (l.subRows = r(l.originalSubRows, i + 1, l));
|
|
@@ -4969,28 +5011,28 @@ function ra() {
|
|
|
4969
5011
|
}
|
|
4970
5012
|
//#endregion
|
|
4971
5013
|
//#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
|
|
4972
|
-
function
|
|
4973
|
-
return e ?
|
|
5014
|
+
function oa(e, t) {
|
|
5015
|
+
return e ? sa(e) ? /*#__PURE__*/ y.createElement(e, t) : e : null;
|
|
4974
5016
|
}
|
|
4975
|
-
function
|
|
4976
|
-
return
|
|
5017
|
+
function sa(e) {
|
|
5018
|
+
return ca(e) || typeof e == "function" || la(e);
|
|
4977
5019
|
}
|
|
4978
|
-
function
|
|
5020
|
+
function ca(e) {
|
|
4979
5021
|
return typeof e == "function" && (() => {
|
|
4980
5022
|
let t = Object.getPrototypeOf(e);
|
|
4981
5023
|
return t.prototype && t.prototype.isReactComponent;
|
|
4982
5024
|
})();
|
|
4983
5025
|
}
|
|
4984
|
-
function
|
|
5026
|
+
function la(e) {
|
|
4985
5027
|
return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
|
|
4986
5028
|
}
|
|
4987
|
-
function
|
|
5029
|
+
function ua(e) {
|
|
4988
5030
|
let t = {
|
|
4989
5031
|
state: {},
|
|
4990
5032
|
onStateChange: () => {},
|
|
4991
5033
|
renderFallbackValue: null,
|
|
4992
5034
|
...e
|
|
4993
|
-
}, [n] = y.useState(() => ({ current:
|
|
5035
|
+
}, [n] = y.useState(() => ({ current: ia(t) })), [r, i] = y.useState(() => n.current.initialState);
|
|
4994
5036
|
return n.current.setOptions((t) => ({
|
|
4995
5037
|
...t,
|
|
4996
5038
|
...e,
|
|
@@ -5005,7 +5047,7 @@ function ca(e) {
|
|
|
5005
5047
|
}
|
|
5006
5048
|
//#endregion
|
|
5007
5049
|
//#region src/components/DataTable/DataTable.tsx
|
|
5008
|
-
function
|
|
5050
|
+
function da({ direction: e }) {
|
|
5009
5051
|
return e === "asc" ? /* @__PURE__ */ _(n, {
|
|
5010
5052
|
className: "size-3.5",
|
|
5011
5053
|
"aria-hidden": !0
|
|
@@ -5017,17 +5059,17 @@ function la({ direction: e }) {
|
|
|
5017
5059
|
"aria-hidden": !0
|
|
5018
5060
|
});
|
|
5019
5061
|
}
|
|
5020
|
-
function
|
|
5062
|
+
function fa({ columns: e, rows: t = 5, dividers: n }) {
|
|
5021
5063
|
return /* @__PURE__ */ v(Y, {
|
|
5022
5064
|
dividers: n,
|
|
5023
5065
|
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)) })]
|
|
5024
5066
|
});
|
|
5025
5067
|
}
|
|
5026
|
-
function
|
|
5027
|
-
let x = l !== void 0 && !!u, S =
|
|
5068
|
+
function pa({ 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 }) {
|
|
5069
|
+
let x = l !== void 0 && !!u, S = ua({
|
|
5028
5070
|
data: t,
|
|
5029
5071
|
columns: e,
|
|
5030
|
-
getCoreRowModel:
|
|
5072
|
+
getCoreRowModel: aa(),
|
|
5031
5073
|
meta: h,
|
|
5032
5074
|
state: x ? { sorting: l } : void 0,
|
|
5033
5075
|
onSortingChange: u,
|
|
@@ -5036,11 +5078,11 @@ function da({ columns: e, data: t, isLoading: n = !1, error: r, pagination: i, o
|
|
|
5036
5078
|
}), C = S.getRowModel().rows, ee = i ? Math.max(1, Math.ceil(i.total / Math.max(1, i.limit))) : 1, w = !!i && !!a && ee > 1;
|
|
5037
5079
|
return /* @__PURE__ */ v("div", {
|
|
5038
5080
|
"data-eds-component": "DataTable",
|
|
5039
|
-
className:
|
|
5081
|
+
className: I("flex w-full flex-col gap-4", y),
|
|
5040
5082
|
children: [
|
|
5041
5083
|
o && /* @__PURE__ */ _("div", {
|
|
5042
5084
|
className: "flex justify-end",
|
|
5043
|
-
children: /* @__PURE__ */ _(
|
|
5085
|
+
children: /* @__PURE__ */ _(Sr, {
|
|
5044
5086
|
label: "Buscar",
|
|
5045
5087
|
labelVariant: "floating",
|
|
5046
5088
|
className: "w-full max-w-sm",
|
|
@@ -5060,13 +5102,13 @@ function da({ columns: e, data: t, isLoading: n = !1, error: r, pagination: i, o
|
|
|
5060
5102
|
"aria-hidden": !0
|
|
5061
5103
|
}), "Carregando..."]
|
|
5062
5104
|
}),
|
|
5063
|
-
n ? /* @__PURE__ */ _(
|
|
5105
|
+
n ? /* @__PURE__ */ _(fa, {
|
|
5064
5106
|
columns: e,
|
|
5065
5107
|
dividers: b
|
|
5066
|
-
}) : r ? /* @__PURE__ */ _(
|
|
5108
|
+
}) : r ? /* @__PURE__ */ _(dr, {
|
|
5067
5109
|
title: f,
|
|
5068
5110
|
description: m ?? "Houve um erro ao buscar os dados. Tente novamente."
|
|
5069
|
-
}) : C.length === 0 ? /* @__PURE__ */ _(
|
|
5111
|
+
}) : C.length === 0 ? /* @__PURE__ */ _(dr, {
|
|
5070
5112
|
title: f,
|
|
5071
5113
|
description: m
|
|
5072
5114
|
}) : /* @__PURE__ */ v(Y, {
|
|
@@ -5080,10 +5122,10 @@ function da({ columns: e, data: t, isLoading: n = !1, error: r, pagination: i, o
|
|
|
5080
5122
|
type: "button",
|
|
5081
5123
|
className: "flex select-none items-center gap-1 font-semibold",
|
|
5082
5124
|
onClick: e.column.getToggleSortingHandler(),
|
|
5083
|
-
children: [
|
|
5084
|
-
}) :
|
|
5125
|
+
children: [oa(e.column.columnDef.header, e.getContext()), /* @__PURE__ */ _(da, { direction: t })]
|
|
5126
|
+
}) : oa(e.column.columnDef.header, e.getContext())
|
|
5085
5127
|
}, e.id);
|
|
5086
|
-
}) }, e.id)) }), /* @__PURE__ */ _(Y.Body, { children: C.map((e) => /* @__PURE__ */ _(Y.Row, { children: e.getVisibleCells().map((e) => /* @__PURE__ */ _(Y.Cell, { children:
|
|
5128
|
+
}) }, e.id)) }), /* @__PURE__ */ _(Y.Body, { children: C.map((e) => /* @__PURE__ */ _(Y.Row, { children: e.getVisibleCells().map((e) => /* @__PURE__ */ _(Y.Cell, { children: oa(e.column.columnDef.cell, e.getContext()) }, e.id)) }, e.id)) })]
|
|
5087
5129
|
}),
|
|
5088
5130
|
w && /* @__PURE__ */ v("div", {
|
|
5089
5131
|
className: "flex items-center justify-center gap-2",
|
|
@@ -5121,31 +5163,31 @@ function da({ columns: e, data: t, isLoading: n = !1, error: r, pagination: i, o
|
|
|
5121
5163
|
}
|
|
5122
5164
|
//#endregion
|
|
5123
5165
|
//#region src/components/Tabs/Tabs.tsx
|
|
5124
|
-
var
|
|
5166
|
+
var ma = {
|
|
5125
5167
|
variant: "segmented",
|
|
5126
5168
|
size: "md"
|
|
5127
5169
|
};
|
|
5128
|
-
function
|
|
5129
|
-
let u = e ?? [], d = c === "segmented", f = c === "underline", p = l === "sm", { ref: m, isOverflowing: h } =
|
|
5170
|
+
function ha({ tabs: e, value: t, selectedValue: n, onValueChange: r, activateOnFocus: i, className: a, listClassName: o, indicatorClassName: s, variant: c = ma.variant, size: l = ma.size }) {
|
|
5171
|
+
let u = e ?? [], d = c === "segmented", f = c === "underline", p = l === "sm", { ref: m, isOverflowing: h } = _a(d), g = ga(m, h);
|
|
5130
5172
|
if (u.length === 0) return null;
|
|
5131
5173
|
let y = u[0]?.value, b = t !== void 0, x = {
|
|
5132
5174
|
value: b ? t : void 0,
|
|
5133
5175
|
defaultValue: b ? void 0 : n ?? y
|
|
5134
5176
|
};
|
|
5135
|
-
return /* @__PURE__ */ v(
|
|
5177
|
+
return /* @__PURE__ */ v(F.Root, {
|
|
5136
5178
|
...x,
|
|
5137
5179
|
"data-eds-component": "Tabs",
|
|
5138
|
-
className:
|
|
5180
|
+
className: I("relative isolate min-w-0 font-medium", d && (p ? "rounded-md" : "rounded-lg") + " ring ring-eds-outline-border", a),
|
|
5139
5181
|
onValueChange: (e) => {
|
|
5140
5182
|
r?.(String(e));
|
|
5141
5183
|
},
|
|
5142
|
-
children: [d && /* @__PURE__ */ _("div", { className:
|
|
5184
|
+
children: [d && /* @__PURE__ */ _("div", { className: I("absolute inset-x-0 top-1/2 z-0 -translate-y-1/2 rounded-lg bg-eds-neutral-background", p ? "h-6.5" : "h-9") }), /* @__PURE__ */ v(F.List, {
|
|
5143
5185
|
ref: m,
|
|
5144
5186
|
activateOnFocus: i,
|
|
5145
5187
|
"data-overflowing": h ? "" : void 0,
|
|
5146
5188
|
...g(),
|
|
5147
|
-
className:
|
|
5148
|
-
children: [u.map((e) => /* @__PURE__ */ _(
|
|
5189
|
+
className: I("relative flex min-w-0 shrink items-stretch", d && "overflow-x-auto rounded-lg bg-eds-neutral-background px-0.5 [--scroll-fade-width:3rem] scroll-px-(--scroll-fade-width)", d && h && "[mask-image:linear-gradient(to_right,transparent,black_var(--scroll-fade-width),black_calc(100%-var(--scroll-fade-width)),transparent)]", d && (p ? "h-6.5 rounded-md" : "h-9"), h && "cursor-grab active:cursor-grabbing", f && "gap-4 border-b border-eds-outline-border pb-2", f && (p ? "h-6.5" : "h-7.5"), o),
|
|
5190
|
+
children: [u.map((e) => /* @__PURE__ */ _(F.Tab, {
|
|
5149
5191
|
value: e.value,
|
|
5150
5192
|
render: e.render,
|
|
5151
5193
|
onClick: (e) => {
|
|
@@ -5155,16 +5197,16 @@ function pa({ tabs: e, value: t, selectedValue: n, onValueChange: r, activateOnF
|
|
|
5155
5197
|
inline: "nearest"
|
|
5156
5198
|
});
|
|
5157
5199
|
},
|
|
5158
|
-
className:
|
|
5200
|
+
className: I("relative z-2 flex items-center rounded bg-transparent whitespace-nowrap focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-eds-blue-main", h ? "cursor-grab active:cursor-grabbing" : "cursor-pointer", p ? "text-xs" : "text-base", d && "my-0.5 text-eds-neutral-elements hover:text-eds-neutral-main aria-selected:text-eds-neutral-main focus-visible:ring-inset", d && (p ? "px-2 rounded-sm" : "px-2.5 rounded-md"), f && "text-eds-neutral-elements hover:bg-eds-neutral-elements/10 hover:text-eds-neutral-main aria-selected:hover:bg-eds-neutral-elements/10 aria-selected:font-medium aria-selected:text-eds-neutral-main", f && (p ? "px-1.5 py-2.5" : "px-2 py-3"), e.className),
|
|
5159
5201
|
children: e.label
|
|
5160
|
-
}, e.value)), /* @__PURE__ */ _(
|
|
5202
|
+
}, e.value)), /* @__PURE__ */ _(F.Indicator, { render: (e) => /* @__PURE__ */ _("div", {
|
|
5161
5203
|
...e,
|
|
5162
|
-
className:
|
|
5204
|
+
className: I("absolute z-1 left-0", "w-(--active-tab-width) translate-x-(--active-tab-left) transition-all duration-200", "data-[rendered=false]:scale-90 data-[rendered=false]:opacity-0", d && I("top-(--active-tab-top) h-(--active-tab-height) bg-white shadow-sm ring ring-eds-outline-border", p ? "rounded" : "rounded-md"), f && "bottom-0 h-0.5 bg-eds-blue-main", s)
|
|
5163
5205
|
}) })]
|
|
5164
5206
|
})]
|
|
5165
5207
|
});
|
|
5166
5208
|
}
|
|
5167
|
-
function
|
|
5209
|
+
function ga(e, t) {
|
|
5168
5210
|
let n = T(null), r = T(!1);
|
|
5169
5211
|
return () => ({
|
|
5170
5212
|
onPointerDownCapture: (i) => {
|
|
@@ -5201,7 +5243,7 @@ function ma(e, t) {
|
|
|
5201
5243
|
}
|
|
5202
5244
|
});
|
|
5203
5245
|
}
|
|
5204
|
-
function
|
|
5246
|
+
function _a(e) {
|
|
5205
5247
|
let t = T(null), [n, r] = E(!1);
|
|
5206
5248
|
return C(() => {
|
|
5207
5249
|
if (!e) return;
|
|
@@ -5215,4 +5257,4 @@ function ha(e) {
|
|
|
5215
5257
|
};
|
|
5216
5258
|
}
|
|
5217
5259
|
//#endregion
|
|
5218
|
-
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,
|
|
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, ae as Button, H as COLORS, Pt as Calendar, Ht as Card, rn as Checkbox, Dn as Combobox, pa as DataTable, Mn as DatePicker, Bn as DateTimePicker, er as Dialog, dr as Empty, cr as FormDialog, jt as IconButton, Sr as Input, Dr as Select, Y as Table, ha as Tabs, Nr as Text, Tr as Textarea };
|