@vincisys/eyeson 0.3.0 → 0.4.1
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/Attachment/Attachment.d.ts +98 -0
- package/dist/components/Attachment/Attachment.d.ts.map +1 -0
- package/dist/components/Button/Button.d.ts +7 -7
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +13 -1
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +40 -29
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/FormDialog/FormDialog.d.ts +84 -0
- package/dist/components/FormDialog/FormDialog.d.ts.map +1 -0
- package/dist/components/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/Input/Input.d.ts +15 -1
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +14 -2
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/index.d.ts +10 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +845 -622
- package/dist/lib/field-styles.d.ts +3 -0
- package/dist/lib/field-styles.d.ts.map +1 -1
- package/dist/styles/eyes-binding.css +1 -1
- package/dist/styles/eyes-standalone.css +1 -1
- package/dist/styles/theme-eyes.css +12 -1
- package/package.json +75 -72
package/dist/index.js
CHANGED
|
@@ -3,28 +3,30 @@ import { CalendarDays as t, Check as n, ChevronDown as r, ChevronLeft as i, Chev
|
|
|
3
3
|
import { clsx as u } from "clsx";
|
|
4
4
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
5
5
|
import { createContext as m, forwardRef as h, useContext as g, useEffect as _, useId as v, useMemo as y, useRef as b, useState as x } from "react";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
6
|
+
import { mergeProps as S } from "@base-ui/react/merge-props";
|
|
7
|
+
import { useRender as C } from "@base-ui/react/use-render";
|
|
8
|
+
import { Checkbox as w } from "@base-ui/react/checkbox";
|
|
9
|
+
import { Field as T } from "@base-ui/react/field";
|
|
10
|
+
import { Combobox as E } from "@base-ui/react/combobox";
|
|
11
|
+
import { Popover as D } from "@base-ui/react/popover";
|
|
12
|
+
import { Dialog as O } from "@base-ui/react/dialog";
|
|
13
|
+
import { AlertDialog as k } from "@base-ui/react/alert-dialog";
|
|
14
|
+
import { Input as A } from "@base-ui/react/input";
|
|
15
|
+
import { Select as j } from "@base-ui/react/select";
|
|
16
|
+
import { Tabs as M } from "@base-ui/react/tabs";
|
|
15
17
|
//#region src/lib/utils.ts
|
|
16
|
-
function
|
|
18
|
+
function N(...e) {
|
|
17
19
|
return u(e);
|
|
18
20
|
}
|
|
19
21
|
//#endregion
|
|
20
22
|
//#region src/utils/resolve-variant.ts
|
|
21
|
-
function
|
|
23
|
+
function P(e, t, n) {
|
|
22
24
|
let r = e[t];
|
|
23
25
|
return r === void 0 ? e[n] : r;
|
|
24
26
|
}
|
|
25
27
|
//#endregion
|
|
26
28
|
//#region src/components/Button/Button.tsx
|
|
27
|
-
var
|
|
29
|
+
var F = /* @__PURE__ */ new Set([
|
|
28
30
|
"blue-background",
|
|
29
31
|
"green-background",
|
|
30
32
|
"green-main",
|
|
@@ -36,37 +38,38 @@ var M = /* @__PURE__ */ new Set([
|
|
|
36
38
|
"red-background",
|
|
37
39
|
"red-dark",
|
|
38
40
|
"red-middle"
|
|
39
|
-
]),
|
|
41
|
+
]), I = {
|
|
40
42
|
size: {
|
|
41
|
-
sm: { classes: "
|
|
42
|
-
md: { classes: "
|
|
43
|
-
lg: { classes: "gap-
|
|
43
|
+
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" },
|
|
44
|
+
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" },
|
|
45
|
+
lg: { classes: "h-[calc(2.25rem*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" }
|
|
44
46
|
},
|
|
45
47
|
variant: {
|
|
46
|
-
solid: { classes: "border-
|
|
47
|
-
outline: { classes: "border
|
|
48
|
-
ghost: { classes: "border-
|
|
49
|
-
link: { classes: "
|
|
48
|
+
solid: { classes: "border-transparent bg-[var(--eds-btn-accent)] text-[var(--eds-btn-solid-fg,#fff)] hover:bg-[color-mix(in_srgb,var(--eds-btn-accent)_80%,transparent)] data-disabled:not-data-loading:bg-eds-neutral-disabled data-disabled:not-data-loading:text-white data-loading:data-disabled:bg-[var(--eds-btn-accent)] data-loading:data-disabled:text-[var(--eds-btn-solid-fg,#fff)]" },
|
|
49
|
+
outline: { classes: "border-eds-outline-border 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:border-eds-outline-border data-disabled:not-data-loading:bg-transparent data-disabled:not-data-loading:text-eds-neutral-disabled data-loading:data-disabled:border-eds-outline-border data-loading:data-disabled:bg-transparent data-loading:data-disabled:text-[var(--eds-btn-accent)] data-loading:data-disabled:opacity-100" },
|
|
50
|
+
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)]" },
|
|
51
|
+
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)]" }
|
|
50
52
|
}
|
|
51
|
-
},
|
|
53
|
+
}, L = {
|
|
52
54
|
size: "md",
|
|
53
55
|
variant: "solid"
|
|
54
|
-
},
|
|
55
|
-
sm:
|
|
56
|
-
md:
|
|
57
|
-
lg:
|
|
56
|
+
}, ee = {
|
|
57
|
+
sm: 14,
|
|
58
|
+
md: 16,
|
|
59
|
+
lg: 16
|
|
58
60
|
};
|
|
59
|
-
function
|
|
60
|
-
let r =
|
|
61
|
-
return
|
|
61
|
+
function R({ variant: e = L.variant, size: t = L.size, fluid: n = !1 }) {
|
|
62
|
+
let r = P(I.size, t, L.size), i = P(I.variant, e, L.variant);
|
|
63
|
+
return N("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");
|
|
62
64
|
}
|
|
63
|
-
function
|
|
64
|
-
let _ =
|
|
65
|
+
function te({ text: t = "Button", className: n, icon: r, iconPosition: i = "start", variant: a = "solid", color: o = "blue-main", size: c = "md", fluid: l = !1, isLoading: u = !1, disabled: m, style: h, ...g }) {
|
|
66
|
+
let _ = ee[c], v = !!(m || u), y = !!(u || r), b = i === "end" ? "inline-end" : "inline-start", x = {
|
|
65
67
|
"--eds-btn-accent": `var(--color-eds-${o})`,
|
|
66
|
-
...
|
|
68
|
+
...F.has(o) ? { "--eds-btn-solid-fg": "#fff" } : {},
|
|
67
69
|
...h
|
|
68
|
-
},
|
|
70
|
+
}, S = y ? /* @__PURE__ */ f("span", {
|
|
69
71
|
className: "eds-btn-icon-wrap flex shrink-0 items-center justify-center",
|
|
72
|
+
"data-icon": b,
|
|
70
73
|
"aria-hidden": !0,
|
|
71
74
|
children: u ? /* @__PURE__ */ f(s, {
|
|
72
75
|
className: "block size-full animate-eds-spin",
|
|
@@ -77,18 +80,18 @@ function I({ text: t = "Button", className: n, icon: r, iconPosition: i = "start
|
|
|
77
80
|
})
|
|
78
81
|
}) : null;
|
|
79
82
|
return /* @__PURE__ */ f(e, {
|
|
80
|
-
className:
|
|
83
|
+
className: N(R({
|
|
81
84
|
variant: a,
|
|
82
85
|
size: c,
|
|
83
86
|
fluid: l
|
|
84
87
|
}), n),
|
|
85
|
-
style:
|
|
88
|
+
style: x,
|
|
86
89
|
disabled: v,
|
|
87
90
|
"data-eds-component": "Button",
|
|
88
91
|
"data-loading": u || void 0,
|
|
89
92
|
"aria-busy": u || void 0,
|
|
90
93
|
...g,
|
|
91
|
-
children: i === "end" ? /* @__PURE__ */ p(d, { children: [t,
|
|
94
|
+
children: i === "end" ? /* @__PURE__ */ p(d, { children: [t, S] }) : /* @__PURE__ */ p(d, { children: [S, t] })
|
|
92
95
|
});
|
|
93
96
|
}
|
|
94
97
|
//#endregion
|
|
@@ -114,102 +117,102 @@ var ne = [
|
|
|
114
117
|
"red-dark",
|
|
115
118
|
"red-main",
|
|
116
119
|
"red-middle"
|
|
117
|
-
],
|
|
118
|
-
|
|
120
|
+
], re = 365.2425, z = 6048e5, ie = 864e5, B = 3600 * 24;
|
|
121
|
+
B * 7, B * re / 12 * 3;
|
|
119
122
|
var ae = Symbol.for("constructDateFrom");
|
|
120
123
|
//#endregion
|
|
121
124
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.js
|
|
122
|
-
function
|
|
125
|
+
function V(e, t) {
|
|
123
126
|
return typeof e == "function" ? e(t) : e && typeof e == "object" && ae in e ? e[ae](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
124
127
|
}
|
|
125
128
|
//#endregion
|
|
126
129
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.js
|
|
127
|
-
function
|
|
128
|
-
return
|
|
130
|
+
function H(e, t) {
|
|
131
|
+
return V(t || e, e);
|
|
129
132
|
}
|
|
130
133
|
//#endregion
|
|
131
134
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addDays.js
|
|
132
135
|
function oe(e, t, n) {
|
|
133
|
-
let r =
|
|
134
|
-
return isNaN(t) ?
|
|
136
|
+
let r = H(e, n?.in);
|
|
137
|
+
return isNaN(t) ? V(n?.in || e, NaN) : (t && r.setDate(r.getDate() + t), r);
|
|
135
138
|
}
|
|
136
139
|
//#endregion
|
|
137
140
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addMonths.js
|
|
138
|
-
function
|
|
139
|
-
let r =
|
|
140
|
-
if (isNaN(t)) return
|
|
141
|
+
function se(e, t, n) {
|
|
142
|
+
let r = H(e, n?.in);
|
|
143
|
+
if (isNaN(t)) return V(n?.in || e, NaN);
|
|
141
144
|
if (!t) return r;
|
|
142
|
-
let i = r.getDate(), a =
|
|
145
|
+
let i = r.getDate(), a = V(n?.in || e, r.getTime());
|
|
143
146
|
return a.setMonth(r.getMonth() + t + 1, 0), i >= a.getDate() ? a : (r.setFullYear(a.getFullYear(), a.getMonth(), i), r);
|
|
144
147
|
}
|
|
145
148
|
//#endregion
|
|
146
149
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.js
|
|
147
|
-
var
|
|
148
|
-
function
|
|
149
|
-
return
|
|
150
|
+
var ce = {};
|
|
151
|
+
function U() {
|
|
152
|
+
return ce;
|
|
150
153
|
}
|
|
151
154
|
//#endregion
|
|
152
155
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.js
|
|
153
|
-
function
|
|
154
|
-
let n =
|
|
156
|
+
function W(e, t) {
|
|
157
|
+
let n = U(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, i = H(e, t?.in), a = i.getDay(), o = (a < r ? 7 : 0) + a - r;
|
|
155
158
|
return i.setDate(i.getDate() - o), i.setHours(0, 0, 0, 0), i;
|
|
156
159
|
}
|
|
157
160
|
//#endregion
|
|
158
161
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.js
|
|
159
|
-
function
|
|
160
|
-
return
|
|
162
|
+
function G(e, t) {
|
|
163
|
+
return W(e, {
|
|
161
164
|
...t,
|
|
162
165
|
weekStartsOn: 1
|
|
163
166
|
});
|
|
164
167
|
}
|
|
165
168
|
//#endregion
|
|
166
169
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.js
|
|
167
|
-
function
|
|
168
|
-
let n =
|
|
170
|
+
function K(e, t) {
|
|
171
|
+
let n = H(e, t?.in), r = n.getFullYear(), i = V(n, 0);
|
|
169
172
|
i.setFullYear(r + 1, 0, 4), i.setHours(0, 0, 0, 0);
|
|
170
|
-
let a =
|
|
173
|
+
let a = G(i), o = V(n, 0);
|
|
171
174
|
o.setFullYear(r, 0, 4), o.setHours(0, 0, 0, 0);
|
|
172
|
-
let s =
|
|
175
|
+
let s = G(o);
|
|
173
176
|
return n.getTime() >= a.getTime() ? r + 1 : n.getTime() >= s.getTime() ? r : r - 1;
|
|
174
177
|
}
|
|
175
178
|
//#endregion
|
|
176
179
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
|
|
177
180
|
function le(e) {
|
|
178
|
-
let t =
|
|
181
|
+
let t = H(e), n = new Date(Date.UTC(t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds()));
|
|
179
182
|
return n.setUTCFullYear(t.getFullYear()), e - +n;
|
|
180
183
|
}
|
|
181
184
|
//#endregion
|
|
182
185
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.js
|
|
183
186
|
function ue(e, ...t) {
|
|
184
|
-
let n =
|
|
187
|
+
let n = V.bind(null, e || t.find((e) => typeof e == "object"));
|
|
185
188
|
return t.map(n);
|
|
186
189
|
}
|
|
187
190
|
//#endregion
|
|
188
191
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.js
|
|
189
192
|
function de(e, t) {
|
|
190
|
-
let n =
|
|
193
|
+
let n = H(e, t?.in);
|
|
191
194
|
return n.setHours(0, 0, 0, 0), n;
|
|
192
195
|
}
|
|
193
196
|
//#endregion
|
|
194
197
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.js
|
|
195
198
|
function fe(e, t, n) {
|
|
196
199
|
let [r, i] = ue(n?.in, e, t), a = de(r), o = de(i), s = +a - le(a), c = +o - le(o);
|
|
197
|
-
return Math.round((s - c) /
|
|
200
|
+
return Math.round((s - c) / ie);
|
|
198
201
|
}
|
|
199
202
|
//#endregion
|
|
200
203
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.js
|
|
201
204
|
function pe(e, t) {
|
|
202
|
-
let n =
|
|
203
|
-
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0),
|
|
205
|
+
let n = K(e, t), r = V(t?.in || e, 0);
|
|
206
|
+
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), G(r);
|
|
204
207
|
}
|
|
205
208
|
//#endregion
|
|
206
209
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructNow.js
|
|
207
210
|
function me(e) {
|
|
208
|
-
return
|
|
211
|
+
return V(e, Date.now());
|
|
209
212
|
}
|
|
210
213
|
//#endregion
|
|
211
214
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isSameDay.js
|
|
212
|
-
function
|
|
215
|
+
function q(e, t, n) {
|
|
213
216
|
let [r, i] = ue(n?.in, e, t);
|
|
214
217
|
return +de(r) == +de(i);
|
|
215
218
|
}
|
|
@@ -221,30 +224,30 @@ function he(e) {
|
|
|
221
224
|
//#endregion
|
|
222
225
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.js
|
|
223
226
|
function ge(e) {
|
|
224
|
-
return !(!he(e) && typeof e != "number" || isNaN(+
|
|
227
|
+
return !(!he(e) && typeof e != "number" || isNaN(+H(e)));
|
|
225
228
|
}
|
|
226
229
|
//#endregion
|
|
227
230
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/endOfMonth.js
|
|
228
231
|
function _e(e, t) {
|
|
229
|
-
let n =
|
|
232
|
+
let n = H(e, t?.in), r = n.getMonth();
|
|
230
233
|
return n.setFullYear(n.getFullYear(), r + 1, 0), n.setHours(23, 59, 59, 999), n;
|
|
231
234
|
}
|
|
232
235
|
//#endregion
|
|
233
236
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfMonth.js
|
|
234
237
|
function ve(e, t) {
|
|
235
|
-
let n =
|
|
238
|
+
let n = H(e, t?.in);
|
|
236
239
|
return n.setDate(1), n.setHours(0, 0, 0, 0), n;
|
|
237
240
|
}
|
|
238
241
|
//#endregion
|
|
239
242
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.js
|
|
240
243
|
function ye(e, t) {
|
|
241
|
-
let n =
|
|
244
|
+
let n = H(e, t?.in);
|
|
242
245
|
return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
243
246
|
}
|
|
244
247
|
//#endregion
|
|
245
248
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/endOfWeek.js
|
|
246
249
|
function be(e, t) {
|
|
247
|
-
let n =
|
|
250
|
+
let n = U(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, i = H(e, t?.in), a = i.getDay(), o = (a < r ? -7 : 0) + 6 - (a - r);
|
|
248
251
|
return i.setDate(i.getDate() + o), i.setHours(23, 59, 59, 999), i;
|
|
249
252
|
}
|
|
250
253
|
//#endregion
|
|
@@ -317,14 +320,14 @@ var xe = {
|
|
|
317
320
|
};
|
|
318
321
|
//#endregion
|
|
319
322
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js
|
|
320
|
-
function
|
|
323
|
+
function Ce(e) {
|
|
321
324
|
return (t = {}) => {
|
|
322
325
|
let n = t.width ? String(t.width) : e.defaultWidth;
|
|
323
326
|
return e.formats[n] || e.formats[e.defaultWidth];
|
|
324
327
|
};
|
|
325
328
|
}
|
|
326
|
-
var
|
|
327
|
-
date:
|
|
329
|
+
var we = {
|
|
330
|
+
date: Ce({
|
|
328
331
|
formats: {
|
|
329
332
|
full: "EEEE, MMMM do, y",
|
|
330
333
|
long: "MMMM do, y",
|
|
@@ -333,7 +336,7 @@ var Ce = {
|
|
|
333
336
|
},
|
|
334
337
|
defaultWidth: "full"
|
|
335
338
|
}),
|
|
336
|
-
time:
|
|
339
|
+
time: Ce({
|
|
337
340
|
formats: {
|
|
338
341
|
full: "h:mm:ss a zzzz",
|
|
339
342
|
long: "h:mm:ss a z",
|
|
@@ -342,7 +345,7 @@ var Ce = {
|
|
|
342
345
|
},
|
|
343
346
|
defaultWidth: "full"
|
|
344
347
|
}),
|
|
345
|
-
dateTime:
|
|
348
|
+
dateTime: Ce({
|
|
346
349
|
formats: {
|
|
347
350
|
full: "{{date}} 'at' {{time}}",
|
|
348
351
|
long: "{{date}} 'at' {{time}}",
|
|
@@ -351,17 +354,17 @@ var Ce = {
|
|
|
351
354
|
},
|
|
352
355
|
defaultWidth: "full"
|
|
353
356
|
})
|
|
354
|
-
},
|
|
357
|
+
}, Te = {
|
|
355
358
|
lastWeek: "'last' eeee 'at' p",
|
|
356
359
|
yesterday: "'yesterday at' p",
|
|
357
360
|
today: "'today at' p",
|
|
358
361
|
tomorrow: "'tomorrow at' p",
|
|
359
362
|
nextWeek: "eeee 'at' p",
|
|
360
363
|
other: "P"
|
|
361
|
-
},
|
|
364
|
+
}, Ee = (e, t, n, r) => Te[e];
|
|
362
365
|
//#endregion
|
|
363
366
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js
|
|
364
|
-
function
|
|
367
|
+
function J(e) {
|
|
365
368
|
return (t, n) => {
|
|
366
369
|
let r = n?.context ? String(n.context) : "standalone", i;
|
|
367
370
|
if (r === "formatting" && e.formattingValues) {
|
|
@@ -375,7 +378,7 @@ function q(e) {
|
|
|
375
378
|
return i[a];
|
|
376
379
|
};
|
|
377
380
|
}
|
|
378
|
-
var
|
|
381
|
+
var De = {
|
|
379
382
|
ordinalNumber: (e, t) => {
|
|
380
383
|
let n = Number(e), r = n % 100;
|
|
381
384
|
if (r > 20 || r < 10) switch (r % 10) {
|
|
@@ -385,7 +388,7 @@ var Ee = {
|
|
|
385
388
|
}
|
|
386
389
|
return n + "th";
|
|
387
390
|
},
|
|
388
|
-
era:
|
|
391
|
+
era: J({
|
|
389
392
|
values: {
|
|
390
393
|
narrow: ["B", "A"],
|
|
391
394
|
abbreviated: ["BC", "AD"],
|
|
@@ -393,7 +396,7 @@ var Ee = {
|
|
|
393
396
|
},
|
|
394
397
|
defaultWidth: "wide"
|
|
395
398
|
}),
|
|
396
|
-
quarter:
|
|
399
|
+
quarter: J({
|
|
397
400
|
values: {
|
|
398
401
|
narrow: [
|
|
399
402
|
"1",
|
|
@@ -417,7 +420,7 @@ var Ee = {
|
|
|
417
420
|
defaultWidth: "wide",
|
|
418
421
|
argumentCallback: (e) => e - 1
|
|
419
422
|
}),
|
|
420
|
-
month:
|
|
423
|
+
month: J({
|
|
421
424
|
values: {
|
|
422
425
|
narrow: [
|
|
423
426
|
"J",
|
|
@@ -464,7 +467,7 @@ var Ee = {
|
|
|
464
467
|
},
|
|
465
468
|
defaultWidth: "wide"
|
|
466
469
|
}),
|
|
467
|
-
day:
|
|
470
|
+
day: J({
|
|
468
471
|
values: {
|
|
469
472
|
narrow: [
|
|
470
473
|
"S",
|
|
@@ -505,7 +508,7 @@ var Ee = {
|
|
|
505
508
|
},
|
|
506
509
|
defaultWidth: "wide"
|
|
507
510
|
}),
|
|
508
|
-
dayPeriod:
|
|
511
|
+
dayPeriod: J({
|
|
509
512
|
values: {
|
|
510
513
|
narrow: {
|
|
511
514
|
am: "a",
|
|
@@ -576,11 +579,11 @@ var Ee = {
|
|
|
576
579
|
};
|
|
577
580
|
//#endregion
|
|
578
581
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.js
|
|
579
|
-
function
|
|
582
|
+
function Y(e) {
|
|
580
583
|
return (t, n = {}) => {
|
|
581
584
|
let r = n.width, i = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], a = t.match(i);
|
|
582
585
|
if (!a) return null;
|
|
583
|
-
let o = a[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ?
|
|
586
|
+
let o = a[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? ke(s, (e) => e.test(o)) : Oe(s, (e) => e.test(o)), l;
|
|
584
587
|
l = e.valueCallback ? e.valueCallback(c) : c, l = n.valueCallback ? n.valueCallback(l) : l;
|
|
585
588
|
let u = t.slice(o.length);
|
|
586
589
|
return {
|
|
@@ -589,15 +592,15 @@ function J(e) {
|
|
|
589
592
|
};
|
|
590
593
|
};
|
|
591
594
|
}
|
|
592
|
-
function
|
|
595
|
+
function Oe(e, t) {
|
|
593
596
|
for (let n in e) if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n])) return n;
|
|
594
597
|
}
|
|
595
|
-
function
|
|
598
|
+
function ke(e, t) {
|
|
596
599
|
for (let n = 0; n < e.length; n++) if (t(e[n])) return n;
|
|
597
600
|
}
|
|
598
601
|
//#endregion
|
|
599
602
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
|
|
600
|
-
function
|
|
603
|
+
function Ae(e) {
|
|
601
604
|
return (t, n = {}) => {
|
|
602
605
|
let r = t.match(e.matchPattern);
|
|
603
606
|
if (!r) return null;
|
|
@@ -614,19 +617,19 @@ function ke(e) {
|
|
|
614
617
|
}
|
|
615
618
|
//#endregion
|
|
616
619
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.js
|
|
617
|
-
var
|
|
620
|
+
var je = {
|
|
618
621
|
code: "en-US",
|
|
619
622
|
formatDistance: Se,
|
|
620
|
-
formatLong:
|
|
621
|
-
formatRelative:
|
|
622
|
-
localize:
|
|
623
|
+
formatLong: we,
|
|
624
|
+
formatRelative: Ee,
|
|
625
|
+
localize: De,
|
|
623
626
|
match: {
|
|
624
|
-
ordinalNumber:
|
|
627
|
+
ordinalNumber: Ae({
|
|
625
628
|
matchPattern: /^(\d+)(th|st|nd|rd)?/i,
|
|
626
629
|
parsePattern: /\d+/i,
|
|
627
630
|
valueCallback: (e) => parseInt(e, 10)
|
|
628
631
|
}),
|
|
629
|
-
era:
|
|
632
|
+
era: Y({
|
|
630
633
|
matchPatterns: {
|
|
631
634
|
narrow: /^(b|a)/i,
|
|
632
635
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
@@ -636,7 +639,7 @@ var Ae = {
|
|
|
636
639
|
parsePatterns: { any: [/^b/i, /^(a|c)/i] },
|
|
637
640
|
defaultParseWidth: "any"
|
|
638
641
|
}),
|
|
639
|
-
quarter:
|
|
642
|
+
quarter: Y({
|
|
640
643
|
matchPatterns: {
|
|
641
644
|
narrow: /^[1234]/i,
|
|
642
645
|
abbreviated: /^q[1234]/i,
|
|
@@ -652,7 +655,7 @@ var Ae = {
|
|
|
652
655
|
defaultParseWidth: "any",
|
|
653
656
|
valueCallback: (e) => e + 1
|
|
654
657
|
}),
|
|
655
|
-
month:
|
|
658
|
+
month: Y({
|
|
656
659
|
matchPatterns: {
|
|
657
660
|
narrow: /^[jfmasond]/i,
|
|
658
661
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
@@ -691,7 +694,7 @@ var Ae = {
|
|
|
691
694
|
},
|
|
692
695
|
defaultParseWidth: "any"
|
|
693
696
|
}),
|
|
694
|
-
day:
|
|
697
|
+
day: Y({
|
|
695
698
|
matchPatterns: {
|
|
696
699
|
narrow: /^[smtwf]/i,
|
|
697
700
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
@@ -721,7 +724,7 @@ var Ae = {
|
|
|
721
724
|
},
|
|
722
725
|
defaultParseWidth: "any"
|
|
723
726
|
}),
|
|
724
|
-
dayPeriod:
|
|
727
|
+
dayPeriod: Y({
|
|
725
728
|
matchPatterns: {
|
|
726
729
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
727
730
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
@@ -747,56 +750,56 @@ var Ae = {
|
|
|
747
750
|
};
|
|
748
751
|
//#endregion
|
|
749
752
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.js
|
|
750
|
-
function
|
|
751
|
-
let n =
|
|
753
|
+
function Me(e, t) {
|
|
754
|
+
let n = H(e, t?.in);
|
|
752
755
|
return fe(n, ye(n)) + 1;
|
|
753
756
|
}
|
|
754
757
|
//#endregion
|
|
755
758
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.js
|
|
756
|
-
function
|
|
757
|
-
let n =
|
|
758
|
-
return Math.round(r /
|
|
759
|
+
function Ne(e, t) {
|
|
760
|
+
let n = H(e, t?.in), r = G(n) - +pe(n);
|
|
761
|
+
return Math.round(r / z) + 1;
|
|
759
762
|
}
|
|
760
763
|
//#endregion
|
|
761
764
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.js
|
|
762
|
-
function
|
|
763
|
-
let n =
|
|
765
|
+
function Pe(e, t) {
|
|
766
|
+
let n = H(e, t?.in), r = n.getFullYear(), i = U(), a = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? i.firstWeekContainsDate ?? i.locale?.options?.firstWeekContainsDate ?? 1, o = V(t?.in || e, 0);
|
|
764
767
|
o.setFullYear(r + 1, 0, a), o.setHours(0, 0, 0, 0);
|
|
765
|
-
let s =
|
|
768
|
+
let s = W(o, t), c = V(t?.in || e, 0);
|
|
766
769
|
c.setFullYear(r, 0, a), c.setHours(0, 0, 0, 0);
|
|
767
|
-
let l =
|
|
770
|
+
let l = W(c, t);
|
|
768
771
|
return +n >= +s ? r + 1 : +n >= +l ? r : r - 1;
|
|
769
772
|
}
|
|
770
773
|
//#endregion
|
|
771
774
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.js
|
|
772
|
-
function
|
|
773
|
-
let n =
|
|
774
|
-
return a.setFullYear(i, 0, r), a.setHours(0, 0, 0, 0),
|
|
775
|
+
function Fe(e, t) {
|
|
776
|
+
let n = U(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, i = Pe(e, t), a = V(t?.in || e, 0);
|
|
777
|
+
return a.setFullYear(i, 0, r), a.setHours(0, 0, 0, 0), W(a, t);
|
|
775
778
|
}
|
|
776
779
|
//#endregion
|
|
777
780
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.js
|
|
778
|
-
function
|
|
779
|
-
let n =
|
|
780
|
-
return Math.round(r /
|
|
781
|
+
function Ie(e, t) {
|
|
782
|
+
let n = H(e, t?.in), r = W(n, t) - +Fe(n, t);
|
|
783
|
+
return Math.round(r / z) + 1;
|
|
781
784
|
}
|
|
782
785
|
//#endregion
|
|
783
786
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.js
|
|
784
|
-
function
|
|
787
|
+
function X(e, t) {
|
|
785
788
|
return (e < 0 ? "-" : "") + Math.abs(e).toString().padStart(t, "0");
|
|
786
789
|
}
|
|
787
790
|
//#endregion
|
|
788
791
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.js
|
|
789
|
-
var
|
|
792
|
+
var Z = {
|
|
790
793
|
y(e, t) {
|
|
791
794
|
let n = e.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
792
|
-
return
|
|
795
|
+
return X(t === "yy" ? r % 100 : r, t.length);
|
|
793
796
|
},
|
|
794
797
|
M(e, t) {
|
|
795
798
|
let n = e.getMonth();
|
|
796
|
-
return t === "M" ? String(n + 1) :
|
|
799
|
+
return t === "M" ? String(n + 1) : X(n + 1, 2);
|
|
797
800
|
},
|
|
798
801
|
d(e, t) {
|
|
799
|
-
return
|
|
802
|
+
return X(e.getDate(), t.length);
|
|
800
803
|
},
|
|
801
804
|
a(e, t) {
|
|
802
805
|
let n = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
@@ -809,22 +812,22 @@ var X = {
|
|
|
809
812
|
}
|
|
810
813
|
},
|
|
811
814
|
h(e, t) {
|
|
812
|
-
return
|
|
815
|
+
return X(e.getHours() % 12 || 12, t.length);
|
|
813
816
|
},
|
|
814
817
|
H(e, t) {
|
|
815
|
-
return
|
|
818
|
+
return X(e.getHours(), t.length);
|
|
816
819
|
},
|
|
817
820
|
m(e, t) {
|
|
818
|
-
return
|
|
821
|
+
return X(e.getMinutes(), t.length);
|
|
819
822
|
},
|
|
820
823
|
s(e, t) {
|
|
821
|
-
return
|
|
824
|
+
return X(e.getSeconds(), t.length);
|
|
822
825
|
},
|
|
823
826
|
S(e, t) {
|
|
824
827
|
let n = t.length, r = e.getMilliseconds();
|
|
825
|
-
return
|
|
828
|
+
return X(Math.trunc(r * 10 ** (n - 3)), t.length);
|
|
826
829
|
}
|
|
827
|
-
},
|
|
830
|
+
}, Le = {
|
|
828
831
|
am: "am",
|
|
829
832
|
pm: "pm",
|
|
830
833
|
midnight: "midnight",
|
|
@@ -833,7 +836,7 @@ var X = {
|
|
|
833
836
|
afternoon: "afternoon",
|
|
834
837
|
evening: "evening",
|
|
835
838
|
night: "night"
|
|
836
|
-
},
|
|
839
|
+
}, Re = {
|
|
837
840
|
G: function(e, t, n) {
|
|
838
841
|
let r = +(e.getFullYear() > 0);
|
|
839
842
|
switch (t) {
|
|
@@ -849,23 +852,23 @@ var X = {
|
|
|
849
852
|
let t = e.getFullYear(), r = t > 0 ? t : 1 - t;
|
|
850
853
|
return n.ordinalNumber(r, { unit: "year" });
|
|
851
854
|
}
|
|
852
|
-
return
|
|
855
|
+
return Z.y(e, t);
|
|
853
856
|
},
|
|
854
857
|
Y: function(e, t, n, r) {
|
|
855
|
-
let i =
|
|
856
|
-
return t === "YY" ?
|
|
858
|
+
let i = Pe(e, r), a = i > 0 ? i : 1 - i;
|
|
859
|
+
return t === "YY" ? X(a % 100, 2) : t === "Yo" ? n.ordinalNumber(a, { unit: "year" }) : X(a, t.length);
|
|
857
860
|
},
|
|
858
861
|
R: function(e, t) {
|
|
859
|
-
return
|
|
862
|
+
return X(K(e), t.length);
|
|
860
863
|
},
|
|
861
864
|
u: function(e, t) {
|
|
862
|
-
return
|
|
865
|
+
return X(e.getFullYear(), t.length);
|
|
863
866
|
},
|
|
864
867
|
Q: function(e, t, n) {
|
|
865
868
|
let r = Math.ceil((e.getMonth() + 1) / 3);
|
|
866
869
|
switch (t) {
|
|
867
870
|
case "Q": return String(r);
|
|
868
|
-
case "QQ": return
|
|
871
|
+
case "QQ": return X(r, 2);
|
|
869
872
|
case "Qo": return n.ordinalNumber(r, { unit: "quarter" });
|
|
870
873
|
case "QQQ": return n.quarter(r, {
|
|
871
874
|
width: "abbreviated",
|
|
@@ -885,7 +888,7 @@ var X = {
|
|
|
885
888
|
let r = Math.ceil((e.getMonth() + 1) / 3);
|
|
886
889
|
switch (t) {
|
|
887
890
|
case "q": return String(r);
|
|
888
|
-
case "qq": return
|
|
891
|
+
case "qq": return X(r, 2);
|
|
889
892
|
case "qo": return n.ordinalNumber(r, { unit: "quarter" });
|
|
890
893
|
case "qqq": return n.quarter(r, {
|
|
891
894
|
width: "abbreviated",
|
|
@@ -905,7 +908,7 @@ var X = {
|
|
|
905
908
|
let r = e.getMonth();
|
|
906
909
|
switch (t) {
|
|
907
910
|
case "M":
|
|
908
|
-
case "MM": return
|
|
911
|
+
case "MM": return Z.M(e, t);
|
|
909
912
|
case "Mo": return n.ordinalNumber(r + 1, { unit: "month" });
|
|
910
913
|
case "MMM": return n.month(r, {
|
|
911
914
|
width: "abbreviated",
|
|
@@ -925,7 +928,7 @@ var X = {
|
|
|
925
928
|
let r = e.getMonth();
|
|
926
929
|
switch (t) {
|
|
927
930
|
case "L": return String(r + 1);
|
|
928
|
-
case "LL": return
|
|
931
|
+
case "LL": return X(r + 1, 2);
|
|
929
932
|
case "Lo": return n.ordinalNumber(r + 1, { unit: "month" });
|
|
930
933
|
case "LLL": return n.month(r, {
|
|
931
934
|
width: "abbreviated",
|
|
@@ -942,19 +945,19 @@ var X = {
|
|
|
942
945
|
}
|
|
943
946
|
},
|
|
944
947
|
w: function(e, t, n, r) {
|
|
945
|
-
let i =
|
|
946
|
-
return t === "wo" ? n.ordinalNumber(i, { unit: "week" }) :
|
|
948
|
+
let i = Ie(e, r);
|
|
949
|
+
return t === "wo" ? n.ordinalNumber(i, { unit: "week" }) : X(i, t.length);
|
|
947
950
|
},
|
|
948
951
|
I: function(e, t, n) {
|
|
949
|
-
let r =
|
|
950
|
-
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) :
|
|
952
|
+
let r = Ne(e);
|
|
953
|
+
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : X(r, t.length);
|
|
951
954
|
},
|
|
952
955
|
d: function(e, t, n) {
|
|
953
|
-
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) :
|
|
956
|
+
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : Z.d(e, t);
|
|
954
957
|
},
|
|
955
958
|
D: function(e, t, n) {
|
|
956
|
-
let r =
|
|
957
|
-
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) :
|
|
959
|
+
let r = Me(e);
|
|
960
|
+
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : X(r, t.length);
|
|
958
961
|
},
|
|
959
962
|
E: function(e, t, n) {
|
|
960
963
|
let r = e.getDay();
|
|
@@ -983,7 +986,7 @@ var X = {
|
|
|
983
986
|
let i = e.getDay(), a = (i - r.weekStartsOn + 8) % 7 || 7;
|
|
984
987
|
switch (t) {
|
|
985
988
|
case "e": return String(a);
|
|
986
|
-
case "ee": return
|
|
989
|
+
case "ee": return X(a, 2);
|
|
987
990
|
case "eo": return n.ordinalNumber(a, { unit: "day" });
|
|
988
991
|
case "eee": return n.day(i, {
|
|
989
992
|
width: "abbreviated",
|
|
@@ -1007,7 +1010,7 @@ var X = {
|
|
|
1007
1010
|
let i = e.getDay(), a = (i - r.weekStartsOn + 8) % 7 || 7;
|
|
1008
1011
|
switch (t) {
|
|
1009
1012
|
case "c": return String(a);
|
|
1010
|
-
case "cc": return
|
|
1013
|
+
case "cc": return X(a, t.length);
|
|
1011
1014
|
case "co": return n.ordinalNumber(a, { unit: "day" });
|
|
1012
1015
|
case "ccc": return n.day(i, {
|
|
1013
1016
|
width: "abbreviated",
|
|
@@ -1031,7 +1034,7 @@ var X = {
|
|
|
1031
1034
|
let r = e.getDay(), i = r === 0 ? 7 : r;
|
|
1032
1035
|
switch (t) {
|
|
1033
1036
|
case "i": return String(i);
|
|
1034
|
-
case "ii": return
|
|
1037
|
+
case "ii": return X(i, t.length);
|
|
1035
1038
|
case "io": return n.ordinalNumber(i, { unit: "day" });
|
|
1036
1039
|
case "iii": return n.day(r, {
|
|
1037
1040
|
width: "abbreviated",
|
|
@@ -1075,7 +1078,7 @@ var X = {
|
|
|
1075
1078
|
},
|
|
1076
1079
|
b: function(e, t, n) {
|
|
1077
1080
|
let r = e.getHours(), i;
|
|
1078
|
-
switch (i = r === 12 ?
|
|
1081
|
+
switch (i = r === 12 ? Le.noon : r === 0 ? Le.midnight : r / 12 >= 1 ? "pm" : "am", t) {
|
|
1079
1082
|
case "b":
|
|
1080
1083
|
case "bb": return n.dayPeriod(i, {
|
|
1081
1084
|
width: "abbreviated",
|
|
@@ -1097,7 +1100,7 @@ var X = {
|
|
|
1097
1100
|
},
|
|
1098
1101
|
B: function(e, t, n) {
|
|
1099
1102
|
let r = e.getHours(), i;
|
|
1100
|
-
switch (i = r >= 17 ?
|
|
1103
|
+
switch (i = r >= 17 ? Le.evening : r >= 12 ? Le.afternoon : r >= 4 ? Le.morning : Le.night, t) {
|
|
1101
1104
|
case "B":
|
|
1102
1105
|
case "BB":
|
|
1103
1106
|
case "BBB": return n.dayPeriod(i, {
|
|
@@ -1119,45 +1122,45 @@ var X = {
|
|
|
1119
1122
|
let t = e.getHours() % 12;
|
|
1120
1123
|
return t === 0 && (t = 12), n.ordinalNumber(t, { unit: "hour" });
|
|
1121
1124
|
}
|
|
1122
|
-
return
|
|
1125
|
+
return Z.h(e, t);
|
|
1123
1126
|
},
|
|
1124
1127
|
H: function(e, t, n) {
|
|
1125
|
-
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) :
|
|
1128
|
+
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : Z.H(e, t);
|
|
1126
1129
|
},
|
|
1127
1130
|
K: function(e, t, n) {
|
|
1128
1131
|
let r = e.getHours() % 12;
|
|
1129
|
-
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) :
|
|
1132
|
+
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : X(r, t.length);
|
|
1130
1133
|
},
|
|
1131
1134
|
k: function(e, t, n) {
|
|
1132
1135
|
let r = e.getHours();
|
|
1133
|
-
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) :
|
|
1136
|
+
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : X(r, t.length);
|
|
1134
1137
|
},
|
|
1135
1138
|
m: function(e, t, n) {
|
|
1136
|
-
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) :
|
|
1139
|
+
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : Z.m(e, t);
|
|
1137
1140
|
},
|
|
1138
1141
|
s: function(e, t, n) {
|
|
1139
|
-
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) :
|
|
1142
|
+
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : Z.s(e, t);
|
|
1140
1143
|
},
|
|
1141
1144
|
S: function(e, t) {
|
|
1142
|
-
return
|
|
1145
|
+
return Z.S(e, t);
|
|
1143
1146
|
},
|
|
1144
1147
|
X: function(e, t, n) {
|
|
1145
1148
|
let r = e.getTimezoneOffset();
|
|
1146
1149
|
if (r === 0) return "Z";
|
|
1147
1150
|
switch (t) {
|
|
1148
|
-
case "X": return
|
|
1151
|
+
case "X": return Be(r);
|
|
1149
1152
|
case "XXXX":
|
|
1150
|
-
case "XX": return
|
|
1151
|
-
default: return
|
|
1153
|
+
case "XX": return Ve(r);
|
|
1154
|
+
default: return Ve(r, ":");
|
|
1152
1155
|
}
|
|
1153
1156
|
},
|
|
1154
1157
|
x: function(e, t, n) {
|
|
1155
1158
|
let r = e.getTimezoneOffset();
|
|
1156
1159
|
switch (t) {
|
|
1157
|
-
case "x": return
|
|
1160
|
+
case "x": return Be(r);
|
|
1158
1161
|
case "xxxx":
|
|
1159
|
-
case "xx": return
|
|
1160
|
-
default: return
|
|
1162
|
+
case "xx": return Ve(r);
|
|
1163
|
+
default: return Ve(r, ":");
|
|
1161
1164
|
}
|
|
1162
1165
|
},
|
|
1163
1166
|
O: function(e, t, n) {
|
|
@@ -1165,8 +1168,8 @@ var X = {
|
|
|
1165
1168
|
switch (t) {
|
|
1166
1169
|
case "O":
|
|
1167
1170
|
case "OO":
|
|
1168
|
-
case "OOO": return "GMT" +
|
|
1169
|
-
default: return "GMT" +
|
|
1171
|
+
case "OOO": return "GMT" + ze(r, ":");
|
|
1172
|
+
default: return "GMT" + Ve(r, ":");
|
|
1170
1173
|
}
|
|
1171
1174
|
},
|
|
1172
1175
|
z: function(e, t, n) {
|
|
@@ -1174,49 +1177,49 @@ var X = {
|
|
|
1174
1177
|
switch (t) {
|
|
1175
1178
|
case "z":
|
|
1176
1179
|
case "zz":
|
|
1177
|
-
case "zzz": return "GMT" +
|
|
1178
|
-
default: return "GMT" +
|
|
1180
|
+
case "zzz": return "GMT" + ze(r, ":");
|
|
1181
|
+
default: return "GMT" + Ve(r, ":");
|
|
1179
1182
|
}
|
|
1180
1183
|
},
|
|
1181
1184
|
t: function(e, t, n) {
|
|
1182
|
-
return
|
|
1185
|
+
return X(Math.trunc(e / 1e3), t.length);
|
|
1183
1186
|
},
|
|
1184
1187
|
T: function(e, t, n) {
|
|
1185
|
-
return
|
|
1188
|
+
return X(+e, t.length);
|
|
1186
1189
|
}
|
|
1187
1190
|
};
|
|
1188
|
-
function
|
|
1191
|
+
function ze(e, t = "") {
|
|
1189
1192
|
let n = e > 0 ? "-" : "+", r = Math.abs(e), i = Math.trunc(r / 60), a = r % 60;
|
|
1190
|
-
return a === 0 ? n + String(i) : n + String(i) + t +
|
|
1193
|
+
return a === 0 ? n + String(i) : n + String(i) + t + X(a, 2);
|
|
1191
1194
|
}
|
|
1192
|
-
function
|
|
1193
|
-
return e % 60 == 0 ? (e > 0 ? "-" : "+") +
|
|
1195
|
+
function Be(e, t) {
|
|
1196
|
+
return e % 60 == 0 ? (e > 0 ? "-" : "+") + X(Math.abs(e) / 60, 2) : Ve(e, t);
|
|
1194
1197
|
}
|
|
1195
|
-
function
|
|
1196
|
-
let n = e > 0 ? "-" : "+", r = Math.abs(e), i =
|
|
1198
|
+
function Ve(e, t = "") {
|
|
1199
|
+
let n = e > 0 ? "-" : "+", r = Math.abs(e), i = X(Math.trunc(r / 60), 2), a = X(r % 60, 2);
|
|
1197
1200
|
return n + i + t + a;
|
|
1198
1201
|
}
|
|
1199
1202
|
//#endregion
|
|
1200
1203
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/longFormatters.js
|
|
1201
|
-
var
|
|
1204
|
+
var He = (e, t) => {
|
|
1202
1205
|
switch (e) {
|
|
1203
1206
|
case "P": return t.date({ width: "short" });
|
|
1204
1207
|
case "PP": return t.date({ width: "medium" });
|
|
1205
1208
|
case "PPP": return t.date({ width: "long" });
|
|
1206
1209
|
default: return t.date({ width: "full" });
|
|
1207
1210
|
}
|
|
1208
|
-
},
|
|
1211
|
+
}, Ue = (e, t) => {
|
|
1209
1212
|
switch (e) {
|
|
1210
1213
|
case "p": return t.time({ width: "short" });
|
|
1211
1214
|
case "pp": return t.time({ width: "medium" });
|
|
1212
1215
|
case "ppp": return t.time({ width: "long" });
|
|
1213
1216
|
default: return t.time({ width: "full" });
|
|
1214
1217
|
}
|
|
1215
|
-
},
|
|
1216
|
-
p:
|
|
1218
|
+
}, We = {
|
|
1219
|
+
p: Ue,
|
|
1217
1220
|
P: (e, t) => {
|
|
1218
1221
|
let n = e.match(/(P+)(p+)?/) || [], r = n[1], i = n[2];
|
|
1219
|
-
if (!i) return
|
|
1222
|
+
if (!i) return He(e, t);
|
|
1220
1223
|
let a;
|
|
1221
1224
|
switch (r) {
|
|
1222
1225
|
case "P":
|
|
@@ -1232,42 +1235,42 @@ var Be = (e, t) => {
|
|
|
1232
1235
|
a = t.dateTime({ width: "full" });
|
|
1233
1236
|
break;
|
|
1234
1237
|
}
|
|
1235
|
-
return a.replace("{{date}}",
|
|
1238
|
+
return a.replace("{{date}}", He(r, t)).replace("{{time}}", Ue(i, t));
|
|
1236
1239
|
}
|
|
1237
|
-
},
|
|
1240
|
+
}, Ge = /^D+$/, Ke = /^Y+$/, qe = [
|
|
1238
1241
|
"D",
|
|
1239
1242
|
"DD",
|
|
1240
1243
|
"YY",
|
|
1241
1244
|
"YYYY"
|
|
1242
1245
|
];
|
|
1243
|
-
function
|
|
1244
|
-
return
|
|
1246
|
+
function Je(e) {
|
|
1247
|
+
return Ge.test(e);
|
|
1245
1248
|
}
|
|
1246
|
-
function
|
|
1247
|
-
return
|
|
1249
|
+
function Ye(e) {
|
|
1250
|
+
return Ke.test(e);
|
|
1248
1251
|
}
|
|
1249
|
-
function
|
|
1250
|
-
let r =
|
|
1251
|
-
if (console.warn(r),
|
|
1252
|
+
function Xe(e, t, n) {
|
|
1253
|
+
let r = Ze(e, t, n);
|
|
1254
|
+
if (console.warn(r), qe.includes(e)) throw RangeError(r);
|
|
1252
1255
|
}
|
|
1253
|
-
function
|
|
1256
|
+
function Ze(e, t, n) {
|
|
1254
1257
|
let r = e[0] === "Y" ? "years" : "days of the month";
|
|
1255
1258
|
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1256
1259
|
}
|
|
1257
1260
|
//#endregion
|
|
1258
1261
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.js
|
|
1259
|
-
var
|
|
1262
|
+
var Qe = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, $e = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, et = /^'([^]*?)'?$/, tt = /''/g, nt = /[a-zA-Z]/;
|
|
1260
1263
|
function Q(e, t, n) {
|
|
1261
|
-
let r =
|
|
1264
|
+
let r = U(), i = n?.locale ?? r.locale ?? je, 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 = H(e, n?.in);
|
|
1262
1265
|
if (!ge(s)) throw RangeError("Invalid time value");
|
|
1263
|
-
let c = t.match(
|
|
1266
|
+
let c = t.match($e).map((e) => {
|
|
1264
1267
|
let t = e[0];
|
|
1265
1268
|
if (t === "p" || t === "P") {
|
|
1266
|
-
let n =
|
|
1269
|
+
let n = We[t];
|
|
1267
1270
|
return n(e, i.formatLong);
|
|
1268
1271
|
}
|
|
1269
1272
|
return e;
|
|
1270
|
-
}).join("").match(
|
|
1273
|
+
}).join("").match(Qe).map((e) => {
|
|
1271
1274
|
if (e === "''") return {
|
|
1272
1275
|
isToken: !1,
|
|
1273
1276
|
value: "'"
|
|
@@ -1275,13 +1278,13 @@ function Q(e, t, n) {
|
|
|
1275
1278
|
let t = e[0];
|
|
1276
1279
|
if (t === "'") return {
|
|
1277
1280
|
isToken: !1,
|
|
1278
|
-
value:
|
|
1281
|
+
value: rt(e)
|
|
1279
1282
|
};
|
|
1280
|
-
if (
|
|
1283
|
+
if (Re[t]) return {
|
|
1281
1284
|
isToken: !0,
|
|
1282
1285
|
value: e
|
|
1283
1286
|
};
|
|
1284
|
-
if (t.match(
|
|
1287
|
+
if (t.match(nt)) throw RangeError("Format string contains an unescaped latin alphabet character `" + t + "`");
|
|
1285
1288
|
return {
|
|
1286
1289
|
isToken: !1,
|
|
1287
1290
|
value: e
|
|
@@ -1296,44 +1299,44 @@ function Q(e, t, n) {
|
|
|
1296
1299
|
return c.map((r) => {
|
|
1297
1300
|
if (!r.isToken) return r.value;
|
|
1298
1301
|
let a = r.value;
|
|
1299
|
-
(!n?.useAdditionalWeekYearTokens &&
|
|
1300
|
-
let o =
|
|
1302
|
+
(!n?.useAdditionalWeekYearTokens && Ye(a) || !n?.useAdditionalDayOfYearTokens && Je(a)) && Xe(a, t, String(e));
|
|
1303
|
+
let o = Re[a[0]];
|
|
1301
1304
|
return o(s, a, i.localize, l);
|
|
1302
1305
|
}).join("");
|
|
1303
1306
|
}
|
|
1304
|
-
function
|
|
1305
|
-
let t = e.match(
|
|
1306
|
-
return t ? t[1].replace(
|
|
1307
|
+
function rt(e) {
|
|
1308
|
+
let t = e.match(et);
|
|
1309
|
+
return t ? t[1].replace(tt, "'") : e;
|
|
1307
1310
|
}
|
|
1308
1311
|
//#endregion
|
|
1309
1312
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isAfter.js
|
|
1310
|
-
function
|
|
1311
|
-
return +
|
|
1313
|
+
function it(e, t) {
|
|
1314
|
+
return +H(e) > +H(t);
|
|
1312
1315
|
}
|
|
1313
1316
|
//#endregion
|
|
1314
1317
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isBefore.js
|
|
1315
|
-
function
|
|
1316
|
-
return +
|
|
1318
|
+
function at(e, t) {
|
|
1319
|
+
return +H(e) < +H(t);
|
|
1317
1320
|
}
|
|
1318
1321
|
//#endregion
|
|
1319
1322
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isSameMonth.js
|
|
1320
|
-
function
|
|
1323
|
+
function ot(e, t, n) {
|
|
1321
1324
|
let [r, i] = ue(n?.in, e, t);
|
|
1322
1325
|
return r.getFullYear() === i.getFullYear() && r.getMonth() === i.getMonth();
|
|
1323
1326
|
}
|
|
1324
1327
|
//#endregion
|
|
1325
1328
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isToday.js
|
|
1326
|
-
function
|
|
1327
|
-
return
|
|
1329
|
+
function st(e, t) {
|
|
1330
|
+
return q(V(t?.in || e, e), me(t?.in || e));
|
|
1328
1331
|
}
|
|
1329
1332
|
//#endregion
|
|
1330
1333
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/subMonths.js
|
|
1331
|
-
function
|
|
1332
|
-
return
|
|
1334
|
+
function ct(e, t, n) {
|
|
1335
|
+
return se(e, -t, n);
|
|
1333
1336
|
}
|
|
1334
1337
|
//#endregion
|
|
1335
1338
|
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/pt-BR/_lib/formatDistance.js
|
|
1336
|
-
var
|
|
1339
|
+
var lt = {
|
|
1337
1340
|
lessThanXSeconds: {
|
|
1338
1341
|
one: "menos de um segundo",
|
|
1339
1342
|
other: "menos de {{count}} segundos"
|
|
@@ -1395,11 +1398,11 @@ var st = {
|
|
|
1395
1398
|
one: "quase 1 ano",
|
|
1396
1399
|
other: "quase {{count}} anos"
|
|
1397
1400
|
}
|
|
1398
|
-
},
|
|
1399
|
-
let r, i =
|
|
1401
|
+
}, ut = (e, t, n) => {
|
|
1402
|
+
let r, i = lt[e];
|
|
1400
1403
|
return r = typeof i == "string" ? i : t === 1 ? i.one : i.other.replace("{{count}}", String(t)), n?.addSuffix ? n.comparison && n.comparison > 0 ? "em " + r : "há " + r : r;
|
|
1401
|
-
},
|
|
1402
|
-
date:
|
|
1404
|
+
}, dt = {
|
|
1405
|
+
date: Ce({
|
|
1403
1406
|
formats: {
|
|
1404
1407
|
full: "EEEE, d 'de' MMMM 'de' y",
|
|
1405
1408
|
long: "d 'de' MMMM 'de' y",
|
|
@@ -1408,7 +1411,7 @@ var st = {
|
|
|
1408
1411
|
},
|
|
1409
1412
|
defaultWidth: "full"
|
|
1410
1413
|
}),
|
|
1411
|
-
time:
|
|
1414
|
+
time: Ce({
|
|
1412
1415
|
formats: {
|
|
1413
1416
|
full: "HH:mm:ss zzzz",
|
|
1414
1417
|
long: "HH:mm:ss z",
|
|
@@ -1417,7 +1420,7 @@ var st = {
|
|
|
1417
1420
|
},
|
|
1418
1421
|
defaultWidth: "full"
|
|
1419
1422
|
}),
|
|
1420
|
-
dateTime:
|
|
1423
|
+
dateTime: Ce({
|
|
1421
1424
|
formats: {
|
|
1422
1425
|
full: "{{date}} 'às' {{time}}",
|
|
1423
1426
|
long: "{{date}} 'às' {{time}}",
|
|
@@ -1426,7 +1429,7 @@ var st = {
|
|
|
1426
1429
|
},
|
|
1427
1430
|
defaultWidth: "full"
|
|
1428
1431
|
})
|
|
1429
|
-
},
|
|
1432
|
+
}, ft = {
|
|
1430
1433
|
lastWeek: (e) => {
|
|
1431
1434
|
let t = e.getDay();
|
|
1432
1435
|
return "'" + (t === 0 || t === 6 ? "último" : "última") + "' eeee 'às' p";
|
|
@@ -1436,12 +1439,12 @@ var st = {
|
|
|
1436
1439
|
tomorrow: "'amanhã às' p",
|
|
1437
1440
|
nextWeek: "eeee 'às' p",
|
|
1438
1441
|
other: "P"
|
|
1439
|
-
},
|
|
1442
|
+
}, pt = {
|
|
1440
1443
|
code: "pt-BR",
|
|
1441
|
-
formatDistance:
|
|
1442
|
-
formatLong:
|
|
1444
|
+
formatDistance: ut,
|
|
1445
|
+
formatLong: dt,
|
|
1443
1446
|
formatRelative: (e, t, n, r) => {
|
|
1444
|
-
let i =
|
|
1447
|
+
let i = ft[e];
|
|
1445
1448
|
return typeof i == "function" ? i(t) : i;
|
|
1446
1449
|
},
|
|
1447
1450
|
localize: {
|
|
@@ -1449,7 +1452,7 @@ var st = {
|
|
|
1449
1452
|
let n = Number(e);
|
|
1450
1453
|
return t?.unit === "week" ? n + "ª" : n + "º";
|
|
1451
1454
|
},
|
|
1452
|
-
era:
|
|
1455
|
+
era: J({
|
|
1453
1456
|
values: {
|
|
1454
1457
|
narrow: ["AC", "DC"],
|
|
1455
1458
|
abbreviated: ["AC", "DC"],
|
|
@@ -1457,7 +1460,7 @@ var st = {
|
|
|
1457
1460
|
},
|
|
1458
1461
|
defaultWidth: "wide"
|
|
1459
1462
|
}),
|
|
1460
|
-
quarter:
|
|
1463
|
+
quarter: J({
|
|
1461
1464
|
values: {
|
|
1462
1465
|
narrow: [
|
|
1463
1466
|
"1",
|
|
@@ -1481,7 +1484,7 @@ var st = {
|
|
|
1481
1484
|
defaultWidth: "wide",
|
|
1482
1485
|
argumentCallback: (e) => e - 1
|
|
1483
1486
|
}),
|
|
1484
|
-
month:
|
|
1487
|
+
month: J({
|
|
1485
1488
|
values: {
|
|
1486
1489
|
narrow: [
|
|
1487
1490
|
"j",
|
|
@@ -1528,7 +1531,7 @@ var st = {
|
|
|
1528
1531
|
},
|
|
1529
1532
|
defaultWidth: "wide"
|
|
1530
1533
|
}),
|
|
1531
|
-
day:
|
|
1534
|
+
day: J({
|
|
1532
1535
|
values: {
|
|
1533
1536
|
narrow: [
|
|
1534
1537
|
"D",
|
|
@@ -1569,7 +1572,7 @@ var st = {
|
|
|
1569
1572
|
},
|
|
1570
1573
|
defaultWidth: "wide"
|
|
1571
1574
|
}),
|
|
1572
|
-
dayPeriod:
|
|
1575
|
+
dayPeriod: J({
|
|
1573
1576
|
values: {
|
|
1574
1577
|
narrow: {
|
|
1575
1578
|
am: "a",
|
|
@@ -1639,12 +1642,12 @@ var st = {
|
|
|
1639
1642
|
})
|
|
1640
1643
|
},
|
|
1641
1644
|
match: {
|
|
1642
|
-
ordinalNumber:
|
|
1645
|
+
ordinalNumber: Ae({
|
|
1643
1646
|
matchPattern: /^(\d+)[ºªo]?/i,
|
|
1644
1647
|
parsePattern: /\d+/i,
|
|
1645
1648
|
valueCallback: (e) => parseInt(e, 10)
|
|
1646
1649
|
}),
|
|
1647
|
-
era:
|
|
1650
|
+
era: Y({
|
|
1648
1651
|
matchPatterns: {
|
|
1649
1652
|
narrow: /^(ac|dc|a|d)/i,
|
|
1650
1653
|
abbreviated: /^(a\.?\s?c\.?|d\.?\s?c\.?)/i,
|
|
@@ -1657,7 +1660,7 @@ var st = {
|
|
|
1657
1660
|
},
|
|
1658
1661
|
defaultParseWidth: "any"
|
|
1659
1662
|
}),
|
|
1660
|
-
quarter:
|
|
1663
|
+
quarter: Y({
|
|
1661
1664
|
matchPatterns: {
|
|
1662
1665
|
narrow: /^[1234]/i,
|
|
1663
1666
|
abbreviated: /^T[1234]/i,
|
|
@@ -1673,7 +1676,7 @@ var st = {
|
|
|
1673
1676
|
defaultParseWidth: "any",
|
|
1674
1677
|
valueCallback: (e) => e + 1
|
|
1675
1678
|
}),
|
|
1676
|
-
month:
|
|
1679
|
+
month: Y({
|
|
1677
1680
|
matchPatterns: {
|
|
1678
1681
|
narrow: /^[jfmajsond]/i,
|
|
1679
1682
|
abbreviated: /^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,
|
|
@@ -1712,7 +1715,7 @@ var st = {
|
|
|
1712
1715
|
},
|
|
1713
1716
|
defaultParseWidth: "any"
|
|
1714
1717
|
}),
|
|
1715
|
-
day:
|
|
1718
|
+
day: Y({
|
|
1716
1719
|
matchPatterns: {
|
|
1717
1720
|
narrow: /^(dom|[23456]ª?|s[aá]b)/i,
|
|
1718
1721
|
short: /^(dom|[23456]ª?|s[aá]b)/i,
|
|
@@ -1751,7 +1754,7 @@ var st = {
|
|
|
1751
1754
|
},
|
|
1752
1755
|
defaultParseWidth: "any"
|
|
1753
1756
|
}),
|
|
1754
|
-
dayPeriod:
|
|
1757
|
+
dayPeriod: Y({
|
|
1755
1758
|
matchPatterns: {
|
|
1756
1759
|
narrow: /^(a|p|mn|md|(da) (manhã|tarde|noite))/i,
|
|
1757
1760
|
any: /^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i
|
|
@@ -1774,26 +1777,26 @@ var st = {
|
|
|
1774
1777
|
weekStartsOn: 0,
|
|
1775
1778
|
firstWeekContainsDate: 1
|
|
1776
1779
|
}
|
|
1777
|
-
},
|
|
1780
|
+
}, mt = {
|
|
1778
1781
|
sm: {
|
|
1779
|
-
classes: "size-
|
|
1780
|
-
iconPx:
|
|
1782
|
+
classes: "size-[calc(1.75rem*1.188*1.1)] rounded-[min(var(--radius-eds-xs),12px)] [&_svg:not([class*='size-'])]:size-3.5",
|
|
1783
|
+
iconPx: 14
|
|
1781
1784
|
},
|
|
1782
1785
|
md: {
|
|
1783
|
-
classes: "size-
|
|
1784
|
-
iconPx:
|
|
1786
|
+
classes: "size-[calc(2rem*1.188*1.1)]",
|
|
1787
|
+
iconPx: 16
|
|
1785
1788
|
},
|
|
1786
1789
|
lg: {
|
|
1787
|
-
classes: "size-
|
|
1788
|
-
iconPx:
|
|
1790
|
+
classes: "size-[calc(2.25rem*1.188*1.1)]",
|
|
1791
|
+
iconPx: 16
|
|
1789
1792
|
}
|
|
1790
1793
|
};
|
|
1791
|
-
function
|
|
1792
|
-
let u =
|
|
1794
|
+
function ht({ icon: t, label: n, className: r, variant: i = "ghost", color: a = "neutral-main", size: o = "md", disabled: s, style: c, ...l }) {
|
|
1795
|
+
let u = P(mt, o, L.size), d = P(I.variant, i, L.variant);
|
|
1793
1796
|
return /* @__PURE__ */ f(e, {
|
|
1794
1797
|
style: {
|
|
1795
1798
|
"--eds-btn-accent": `var(--color-eds-${a})`,
|
|
1796
|
-
...
|
|
1799
|
+
...F.has(a) ? { "--eds-btn-solid-fg": "#fff" } : {},
|
|
1797
1800
|
...c
|
|
1798
1801
|
},
|
|
1799
1802
|
disabled: s,
|
|
@@ -1802,7 +1805,7 @@ function pt({ icon: t, label: n, className: r, variant: i = "ghost", color: a =
|
|
|
1802
1805
|
"aria-label": n,
|
|
1803
1806
|
title: n,
|
|
1804
1807
|
"data-eds-component": "IconButton",
|
|
1805
|
-
className:
|
|
1808
|
+
className: N("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", u.classes, d.classes, r),
|
|
1806
1809
|
children: /* @__PURE__ */ f(t, {
|
|
1807
1810
|
size: u.iconPx,
|
|
1808
1811
|
"aria-hidden": !0
|
|
@@ -1811,7 +1814,7 @@ function pt({ icon: t, label: n, className: r, variant: i = "ghost", color: a =
|
|
|
1811
1814
|
}
|
|
1812
1815
|
//#endregion
|
|
1813
1816
|
//#region src/components/Calendar/Calendar.tsx
|
|
1814
|
-
var
|
|
1817
|
+
var gt = [
|
|
1815
1818
|
"Dom",
|
|
1816
1819
|
"Seg",
|
|
1817
1820
|
"Ter",
|
|
@@ -1820,13 +1823,13 @@ var mt = [
|
|
|
1820
1823
|
"Sex",
|
|
1821
1824
|
"Sáb"
|
|
1822
1825
|
];
|
|
1823
|
-
function
|
|
1824
|
-
let n =
|
|
1826
|
+
function _t(e, t) {
|
|
1827
|
+
let n = W(ve(e), { weekStartsOn: t }), r = be(_e(e), { weekStartsOn: t }), i = [];
|
|
1825
1828
|
for (let e = n; e <= r; e = oe(e, 1)) i.push(e);
|
|
1826
1829
|
return i;
|
|
1827
1830
|
}
|
|
1828
|
-
function
|
|
1829
|
-
let [h, g] = x(() => t ?? /* @__PURE__ */ new Date()), _ = e !== void 0, v = _ ? e : h, b = y(() => [...
|
|
1831
|
+
function vt({ month: e, defaultMonth: t, onMonthChange: n, events: r = [], maxVisibleEvents: o = 3, weekStartsOn: s = 0, onDayClick: c, onEventClick: l, renderEvent: u, showNavigation: d = !0, className: m }) {
|
|
1832
|
+
let [h, g] = x(() => t ?? /* @__PURE__ */ new Date()), _ = e !== void 0, v = _ ? e : h, b = y(() => [...gt.slice(s), ...gt.slice(0, s)], [s]), S = y(() => _t(v, s), [v, s]), C = y(() => {
|
|
1830
1833
|
let e = /* @__PURE__ */ new Map();
|
|
1831
1834
|
for (let t of r) {
|
|
1832
1835
|
let n = Q(t.date, "yyyy-MM-dd"), r = e.get(n);
|
|
@@ -1838,25 +1841,25 @@ function gt({ month: e, defaultMonth: t, onMonthChange: n, events: r = [], maxVi
|
|
|
1838
1841
|
_ || g(e), n?.(e);
|
|
1839
1842
|
}
|
|
1840
1843
|
return /* @__PURE__ */ p("div", {
|
|
1841
|
-
className:
|
|
1844
|
+
className: N("flex h-full w-full flex-col", m),
|
|
1842
1845
|
"data-eds-component": "Calendar",
|
|
1843
1846
|
children: [d && /* @__PURE__ */ p("div", {
|
|
1844
1847
|
className: "mb-3 flex shrink-0 items-center justify-between",
|
|
1845
1848
|
children: [/* @__PURE__ */ f("span", {
|
|
1846
1849
|
className: "text-base font-medium text-eds-neutral-main capitalize",
|
|
1847
|
-
children: Q(v, "MMMM yyyy", { locale:
|
|
1850
|
+
children: Q(v, "MMMM yyyy", { locale: pt })
|
|
1848
1851
|
}), /* @__PURE__ */ p("div", {
|
|
1849
1852
|
className: "flex items-center gap-1",
|
|
1850
|
-
children: [/* @__PURE__ */ f(
|
|
1853
|
+
children: [/* @__PURE__ */ f(ht, {
|
|
1851
1854
|
icon: i,
|
|
1852
1855
|
label: "Mês anterior",
|
|
1853
1856
|
size: "sm",
|
|
1854
|
-
onClick: () => w(
|
|
1855
|
-
}), /* @__PURE__ */ f(
|
|
1857
|
+
onClick: () => w(ct(v, 1))
|
|
1858
|
+
}), /* @__PURE__ */ f(ht, {
|
|
1856
1859
|
icon: a,
|
|
1857
1860
|
label: "Próximo mês",
|
|
1858
1861
|
size: "sm",
|
|
1859
|
-
onClick: () => w(
|
|
1862
|
+
onClick: () => w(se(v, 1))
|
|
1860
1863
|
})]
|
|
1861
1864
|
})]
|
|
1862
1865
|
}), /* @__PURE__ */ p("div", {
|
|
@@ -1864,22 +1867,22 @@ function gt({ month: e, defaultMonth: t, onMonthChange: n, events: r = [], maxVi
|
|
|
1864
1867
|
children: [/* @__PURE__ */ f("div", {
|
|
1865
1868
|
className: "grid shrink-0 grid-cols-7",
|
|
1866
1869
|
children: b.map((e, t) => /* @__PURE__ */ f("div", {
|
|
1867
|
-
className:
|
|
1870
|
+
className: N("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"),
|
|
1868
1871
|
children: e
|
|
1869
1872
|
}, e))
|
|
1870
1873
|
}), /* @__PURE__ */ f("div", {
|
|
1871
1874
|
className: "grid flex-1 auto-rows-fr grid-cols-7",
|
|
1872
1875
|
children: S.map((e, t) => {
|
|
1873
|
-
let n =
|
|
1876
|
+
let n = ot(e, v), r = st(e), i = Q(e, "yyyy-MM-dd"), a = C.get(i) ?? [], s = a.slice(0, o), d = a.length - s.length, m = n ? Q(e, "d") : Q(e, "d MMM", { locale: pt });
|
|
1874
1877
|
return /* @__PURE__ */ p("div", {
|
|
1875
1878
|
"data-date": i,
|
|
1876
1879
|
onClick: () => c?.(e),
|
|
1877
|
-
className:
|
|
1880
|
+
className: N("flex flex-col gap-1 border-r border-b border-eds-neutral-disabled px-1.5 pt-1.5", t % 7 == 0 && "border-l", c && "cursor-pointer", n ? "bg-white" : "bg-eds-neutral-background"),
|
|
1878
1881
|
children: [(() => {
|
|
1879
1882
|
let e = {
|
|
1880
1883
|
"aria-current": r ? "date" : void 0,
|
|
1881
1884
|
"data-today": r || void 0,
|
|
1882
|
-
className:
|
|
1885
|
+
className: N("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")
|
|
1883
1886
|
};
|
|
1884
1887
|
return c ? /* @__PURE__ */ f("button", {
|
|
1885
1888
|
type: "button",
|
|
@@ -1925,70 +1928,165 @@ function gt({ month: e, defaultMonth: t, onMonthChange: n, events: r = [], maxVi
|
|
|
1925
1928
|
}
|
|
1926
1929
|
//#endregion
|
|
1927
1930
|
//#region src/components/Card/Card.tsx
|
|
1928
|
-
function
|
|
1931
|
+
function yt({ className: e, ...t }) {
|
|
1929
1932
|
return /* @__PURE__ */ f("div", {
|
|
1930
1933
|
"data-eds-component": "Card",
|
|
1931
|
-
className:
|
|
1934
|
+
className: N("flex flex-col gap-6 rounded-eds-sm border border-eds-outline-border bg-white py-6 text-eds-neutral-main shadow-sm", e),
|
|
1932
1935
|
...t
|
|
1933
1936
|
});
|
|
1934
1937
|
}
|
|
1935
|
-
function
|
|
1938
|
+
function bt({ className: e, ...t }) {
|
|
1936
1939
|
return /* @__PURE__ */ f("div", {
|
|
1937
1940
|
"data-slot": "card-header",
|
|
1938
|
-
className:
|
|
1941
|
+
className: N("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),
|
|
1939
1942
|
...t
|
|
1940
1943
|
});
|
|
1941
1944
|
}
|
|
1942
|
-
function
|
|
1945
|
+
function xt({ className: e, ...t }) {
|
|
1943
1946
|
return /* @__PURE__ */ f("h3", {
|
|
1944
1947
|
"data-slot": "card-title",
|
|
1945
|
-
className:
|
|
1948
|
+
className: N("text-lg leading-none font-semibold text-eds-neutral-main", e),
|
|
1946
1949
|
...t
|
|
1947
1950
|
});
|
|
1948
1951
|
}
|
|
1949
|
-
function
|
|
1952
|
+
function St({ className: e, ...t }) {
|
|
1950
1953
|
return /* @__PURE__ */ f("p", {
|
|
1951
1954
|
"data-slot": "card-description",
|
|
1952
|
-
className:
|
|
1955
|
+
className: N("text-sm text-eds-neutral-elements", e),
|
|
1953
1956
|
...t
|
|
1954
1957
|
});
|
|
1955
1958
|
}
|
|
1956
|
-
function
|
|
1959
|
+
function Ct({ className: e, ...t }) {
|
|
1957
1960
|
return /* @__PURE__ */ f("div", {
|
|
1958
1961
|
"data-slot": "card-action",
|
|
1959
|
-
className:
|
|
1962
|
+
className: N("col-start-2 row-span-2 row-start-1 self-start justify-self-end", e),
|
|
1960
1963
|
...t
|
|
1961
1964
|
});
|
|
1962
1965
|
}
|
|
1963
|
-
function
|
|
1966
|
+
function wt({ className: e, ...t }) {
|
|
1964
1967
|
return /* @__PURE__ */ f("div", {
|
|
1965
1968
|
"data-slot": "card-content",
|
|
1966
|
-
className:
|
|
1969
|
+
className: N("px-6", e),
|
|
1967
1970
|
...t
|
|
1968
1971
|
});
|
|
1969
1972
|
}
|
|
1970
|
-
function
|
|
1973
|
+
function Tt({ className: e, ...t }) {
|
|
1971
1974
|
return /* @__PURE__ */ f("div", {
|
|
1972
1975
|
"data-slot": "card-footer",
|
|
1973
|
-
className:
|
|
1976
|
+
className: N("-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),
|
|
1974
1977
|
...t
|
|
1975
1978
|
});
|
|
1976
1979
|
}
|
|
1977
|
-
|
|
1978
|
-
var
|
|
1979
|
-
Header:
|
|
1980
|
-
Title:
|
|
1981
|
-
Description:
|
|
1982
|
-
Action:
|
|
1983
|
-
Content:
|
|
1984
|
-
Footer:
|
|
1985
|
-
}),
|
|
1986
|
-
|
|
1987
|
-
|
|
1980
|
+
bt.displayName = "Card.Header", xt.displayName = "Card.Title", St.displayName = "Card.Description", Ct.displayName = "Card.Action", wt.displayName = "Card.Content", Tt.displayName = "Card.Footer";
|
|
1981
|
+
var Et = Object.assign(yt, {
|
|
1982
|
+
Header: bt,
|
|
1983
|
+
Title: xt,
|
|
1984
|
+
Description: St,
|
|
1985
|
+
Action: Ct,
|
|
1986
|
+
Content: wt,
|
|
1987
|
+
Footer: Tt
|
|
1988
|
+
}), Dt = {
|
|
1989
|
+
default: { classes: "gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2" },
|
|
1990
|
+
sm: { classes: "gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5" },
|
|
1991
|
+
xs: { classes: "gap-1.5 rounded-eds-lil text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1" }
|
|
1992
|
+
}, Ot = {
|
|
1993
|
+
horizontal: { classes: "min-w-40 items-center" },
|
|
1994
|
+
vertical: { classes: "w-24 flex-col has-data-[slot=attachment-content]:w-[7.5rem]" }
|
|
1995
|
+
};
|
|
1996
|
+
function kt({ className: e, state: t = "done", size: n = "default", orientation: r = "horizontal", ...i }) {
|
|
1997
|
+
let a = P(Dt, n, "default"), o = P(Ot, r, "horizontal");
|
|
1998
|
+
return /* @__PURE__ */ f("div", {
|
|
1999
|
+
"data-eds-component": "Attachment",
|
|
2000
|
+
"data-slot": "attachment",
|
|
2001
|
+
"data-state": t,
|
|
2002
|
+
"data-size": n,
|
|
2003
|
+
"data-orientation": r,
|
|
2004
|
+
className: N("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),
|
|
2005
|
+
...i
|
|
2006
|
+
});
|
|
2007
|
+
}
|
|
2008
|
+
function At({ className: e, variant: t = "icon", ...n }) {
|
|
2009
|
+
return /* @__PURE__ */ f("div", {
|
|
2010
|
+
"data-slot": "attachment-media",
|
|
2011
|
+
"data-variant": t,
|
|
2012
|
+
className: N("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),
|
|
2013
|
+
...n
|
|
2014
|
+
});
|
|
2015
|
+
}
|
|
2016
|
+
function jt({ className: e, ...t }) {
|
|
2017
|
+
return /* @__PURE__ */ f("div", {
|
|
2018
|
+
"data-slot": "attachment-content",
|
|
2019
|
+
className: N("max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1", e),
|
|
2020
|
+
...t
|
|
2021
|
+
});
|
|
2022
|
+
}
|
|
2023
|
+
function Mt({ className: e, ...t }) {
|
|
2024
|
+
return /* @__PURE__ */ f("span", {
|
|
2025
|
+
"data-slot": "attachment-title",
|
|
2026
|
+
className: N("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),
|
|
2027
|
+
...t
|
|
2028
|
+
});
|
|
2029
|
+
}
|
|
2030
|
+
function Nt({ className: e, ...t }) {
|
|
2031
|
+
return /* @__PURE__ */ f("span", {
|
|
2032
|
+
"data-slot": "attachment-description",
|
|
2033
|
+
className: N("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),
|
|
2034
|
+
...t
|
|
2035
|
+
});
|
|
2036
|
+
}
|
|
2037
|
+
function Pt({ className: e, ...t }) {
|
|
2038
|
+
return /* @__PURE__ */ f("div", {
|
|
2039
|
+
"data-slot": "attachment-actions",
|
|
2040
|
+
className: N("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),
|
|
2041
|
+
...t
|
|
2042
|
+
});
|
|
2043
|
+
}
|
|
2044
|
+
function Ft({ variant: e = "ghost", color: t = "blue-main", size: n = "sm", className: r, ...i }) {
|
|
2045
|
+
return /* @__PURE__ */ f(ht, {
|
|
2046
|
+
"data-slot": "attachment-action",
|
|
2047
|
+
variant: e,
|
|
2048
|
+
color: t,
|
|
2049
|
+
size: n,
|
|
2050
|
+
className: N("relative z-20", r),
|
|
2051
|
+
...i
|
|
2052
|
+
});
|
|
2053
|
+
}
|
|
2054
|
+
function It({ className: e, render: t, type: n, ...r }) {
|
|
2055
|
+
return C({
|
|
2056
|
+
defaultTagName: "button",
|
|
2057
|
+
props: S({
|
|
2058
|
+
type: t ? n : n ?? "button",
|
|
2059
|
+
className: N("absolute inset-0 z-10 cursor-pointer rounded-[inherit] outline-none focus-visible:ring-2 focus-visible:ring-eds-blue-main/45", e)
|
|
2060
|
+
}, r),
|
|
2061
|
+
render: t,
|
|
2062
|
+
state: { slot: "attachment-trigger" }
|
|
2063
|
+
});
|
|
2064
|
+
}
|
|
2065
|
+
function Lt({ className: e, ...t }) {
|
|
2066
|
+
return /* @__PURE__ */ f("div", {
|
|
2067
|
+
"data-eds-component": "AttachmentGroup",
|
|
2068
|
+
"data-slot": "attachment-group",
|
|
2069
|
+
className: N("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),
|
|
2070
|
+
...t
|
|
2071
|
+
});
|
|
2072
|
+
}
|
|
2073
|
+
At.displayName = "Attachment.Media", jt.displayName = "Attachment.Content", Mt.displayName = "Attachment.Title", Nt.displayName = "Attachment.Description", Pt.displayName = "Attachment.Actions", Ft.displayName = "Attachment.Action", It.displayName = "Attachment.Trigger", Lt.displayName = "Attachment.Group";
|
|
2074
|
+
var Rt = Object.assign(kt, {
|
|
2075
|
+
Media: At,
|
|
2076
|
+
Content: jt,
|
|
2077
|
+
Title: Mt,
|
|
2078
|
+
Description: Nt,
|
|
2079
|
+
Actions: Pt,
|
|
2080
|
+
Action: Ft,
|
|
2081
|
+
Trigger: It,
|
|
2082
|
+
Group: Lt
|
|
2083
|
+
}), zt = N("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");
|
|
2084
|
+
function Bt({ className: e, ...t }) {
|
|
2085
|
+
return /* @__PURE__ */ f(w.Root, {
|
|
1988
2086
|
"data-eds-component": "Checkbox",
|
|
1989
|
-
className:
|
|
2087
|
+
className: N(zt, e),
|
|
1990
2088
|
...t,
|
|
1991
|
-
children: /* @__PURE__ */ f(
|
|
2089
|
+
children: /* @__PURE__ */ f(w.Indicator, {
|
|
1992
2090
|
keepMounted: !0,
|
|
1993
2091
|
className: "flex items-center justify-center text-white data-unchecked:invisible",
|
|
1994
2092
|
render: (e, t) => /* @__PURE__ */ f("span", {
|
|
@@ -2006,17 +2104,17 @@ function Et({ className: e, ...t }) {
|
|
|
2006
2104
|
})
|
|
2007
2105
|
});
|
|
2008
2106
|
}
|
|
2009
|
-
function
|
|
2010
|
-
return t ? /* @__PURE__ */ f(
|
|
2011
|
-
className:
|
|
2012
|
-
children: /* @__PURE__ */ p(
|
|
2013
|
-
className:
|
|
2014
|
-
children: [/* @__PURE__ */ f(
|
|
2107
|
+
function Vt({ className: e, label: t, disabled: n, ...r }) {
|
|
2108
|
+
return t ? /* @__PURE__ */ f(T.Root, {
|
|
2109
|
+
className: N("inline-flex", e),
|
|
2110
|
+
children: /* @__PURE__ */ p(T.Label, {
|
|
2111
|
+
className: N("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"),
|
|
2112
|
+
children: [/* @__PURE__ */ f(Bt, {
|
|
2015
2113
|
disabled: n,
|
|
2016
2114
|
...r
|
|
2017
2115
|
}), /* @__PURE__ */ f("span", { children: t })]
|
|
2018
2116
|
})
|
|
2019
|
-
}) : /* @__PURE__ */ f(
|
|
2117
|
+
}) : /* @__PURE__ */ f(Bt, {
|
|
2020
2118
|
className: e,
|
|
2021
2119
|
disabled: n,
|
|
2022
2120
|
...r
|
|
@@ -2024,13 +2122,16 @@ function Dt({ className: e, label: t, disabled: n, ...r }) {
|
|
|
2024
2122
|
}
|
|
2025
2123
|
//#endregion
|
|
2026
2124
|
//#region src/lib/field-styles.ts
|
|
2027
|
-
|
|
2028
|
-
|
|
2125
|
+
function Ht(e, t) {
|
|
2126
|
+
return e ?? (t === !1 ? "outside" : "floating");
|
|
2127
|
+
}
|
|
2128
|
+
var Ut = "box-border inline-flex w-[214px] flex-col gap-1.5 data-fluid:w-full", Wt = "flex items-center justify-between gap-3", Gt = "inline-flex items-baseline gap-1 text-sm text-eds-neutral-main", Kt = "box-border min-w-(--anchor-width) max-h-[280px] overflow-visible rounded-eds-xs border border-eds-outline-border bg-white py-1 shadow-[0_4px_6px_-1px_rgb(0_0_0_/_0.07),0_2px_4px_-2px_rgb(0_0_0_/_0.06)]", qt = "box-border max-h-60 overflow-y-auto overscroll-contain p-0.5 outline-none", Jt = "box-border flex w-full cursor-pointer items-center gap-2 rounded-md px-2.5 py-2 text-left text-sm text-eds-neutral-main data-highlighted:bg-eds-neutral-elements/10 data-disabled:cursor-not-allowed data-disabled:opacity-50", Yt = "inline-flex size-4 shrink-0 items-center justify-center text-eds-blue-main", Xt = "z-50 outline-none";
|
|
2129
|
+
function Zt(e) {
|
|
2029
2130
|
return `pointer-events-none absolute top-0 z-1 -translate-y-1/2 bg-transparent px-0 pr-1 text-sm text-eds-neutral-elements ${e} before:absolute before:inset-x-0 before:top-1/2 before:-z-10 before:h-0.5 before:-translate-y-1/2 before:bg-white before:content-[''] group-data-disabled:before:bg-eds-neutral-background`;
|
|
2030
2131
|
}
|
|
2031
2132
|
//#endregion
|
|
2032
2133
|
//#region src/components/ComboBox/Combobox.tsx
|
|
2033
|
-
var
|
|
2134
|
+
var Qt = {
|
|
2034
2135
|
sm: {
|
|
2035
2136
|
group: "h-8 pr-2 pl-2.5",
|
|
2036
2137
|
text: "text-sm",
|
|
@@ -2049,24 +2150,24 @@ var Lt = {
|
|
|
2049
2150
|
left: "left-3.5",
|
|
2050
2151
|
icon: "size-8"
|
|
2051
2152
|
}
|
|
2052
|
-
},
|
|
2153
|
+
}, $t = {
|
|
2053
2154
|
default: "",
|
|
2054
2155
|
valid: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-green-main)_55%,var(--color-eds-outline-border))]",
|
|
2055
2156
|
invalid: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-red-main)_55%,var(--color-eds-outline-border))]"
|
|
2056
|
-
},
|
|
2057
|
-
function
|
|
2058
|
-
let
|
|
2157
|
+
}, en = E.Root;
|
|
2158
|
+
function tn({ label: e = "Label", floatingLabel: t = !0, items: i, placeholder: a = "Selecione uma opção", disabled: o = !1, required: s = !1, fluid: c = !1, state: u = "default", size: d = "md", supportingText: m = "", errorMessage: h = "Selecione uma opção válida", emptyMessage: g = "Nenhum resultado.", readOnly: _ = !1, id: y, name: b, value: x, defaultValue: S, onValueChange: C, getItemLabel: w, getItemValue: T, renderItem: D, className: O, inputProps: k }) {
|
|
2159
|
+
let A = v(), j = y ?? A, M = u === "invalid", P = M || !!m, F = Qt[d], I = (e) => w ? w(e) : e.label ?? "", L = (e) => T ? T(e) : e.value ?? I(e), ee = (e) => {
|
|
2059
2160
|
C?.(e);
|
|
2060
|
-
},
|
|
2161
|
+
}, R = w ? (e) => w(e) : void 0, te = T ? (e) => T(e) : void 0;
|
|
2061
2162
|
return /* @__PURE__ */ p("div", {
|
|
2062
|
-
className:
|
|
2163
|
+
className: N(Ut, O),
|
|
2063
2164
|
"data-fluid": c || void 0,
|
|
2064
2165
|
"data-eds-component": "Combobox",
|
|
2065
2166
|
children: [
|
|
2066
2167
|
/* @__PURE__ */ f("div", {
|
|
2067
|
-
className:
|
|
2168
|
+
className: Wt,
|
|
2068
2169
|
children: /* @__PURE__ */ p("label", {
|
|
2069
|
-
className:
|
|
2170
|
+
className: N(Gt, t && "sr-only"),
|
|
2070
2171
|
htmlFor: j,
|
|
2071
2172
|
children: [/* @__PURE__ */ f("span", { children: e }), s && /* @__PURE__ */ f("span", {
|
|
2072
2173
|
className: "text-eds-red-main",
|
|
@@ -2074,43 +2175,43 @@ function Bt({ label: e = "Label", floatingLabel: t = !0, items: i, placeholder:
|
|
|
2074
2175
|
})]
|
|
2075
2176
|
})
|
|
2076
2177
|
}),
|
|
2077
|
-
/* @__PURE__ */ p(
|
|
2178
|
+
/* @__PURE__ */ p(en, {
|
|
2078
2179
|
items: i,
|
|
2079
2180
|
name: b,
|
|
2080
2181
|
disabled: o,
|
|
2081
2182
|
required: s,
|
|
2082
|
-
onValueChange: C ?
|
|
2183
|
+
onValueChange: C ? ee : void 0,
|
|
2083
2184
|
...x === void 0 ? S === void 0 ? {} : { defaultValue: S } : { value: x },
|
|
2084
|
-
itemToStringLabel:
|
|
2085
|
-
itemToStringValue:
|
|
2086
|
-
children: [/* @__PURE__ */ p(
|
|
2087
|
-
className:
|
|
2185
|
+
itemToStringLabel: R,
|
|
2186
|
+
itemToStringValue: te,
|
|
2187
|
+
children: [/* @__PURE__ */ p(E.InputGroup, {
|
|
2188
|
+
className: N("group relative inline-flex w-full items-center gap-1 rounded-eds-xs border border-eds-outline-border bg-white", F.group, $t[u], "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"),
|
|
2088
2189
|
"data-state": u,
|
|
2089
2190
|
"data-size": d,
|
|
2090
2191
|
"data-disabled": o || void 0,
|
|
2091
2192
|
children: [
|
|
2092
2193
|
t && /* @__PURE__ */ p("span", {
|
|
2093
|
-
className:
|
|
2194
|
+
className: Zt(F.left),
|
|
2094
2195
|
children: [/* @__PURE__ */ f("span", { children: e }), s && /* @__PURE__ */ f("span", {
|
|
2095
2196
|
className: "text-eds-red-main",
|
|
2096
2197
|
"aria-hidden": "true",
|
|
2097
2198
|
children: "*"
|
|
2098
2199
|
})]
|
|
2099
2200
|
}),
|
|
2100
|
-
/* @__PURE__ */ f(
|
|
2101
|
-
...
|
|
2201
|
+
/* @__PURE__ */ f(E.Input, {
|
|
2202
|
+
...k,
|
|
2102
2203
|
id: j,
|
|
2103
|
-
className:
|
|
2204
|
+
className: N("box-border min-w-0 flex-1 border-0 bg-transparent p-0 font-inherit text-eds-neutral-main outline-none placeholder:text-eds-neutral-elements placeholder:opacity-100 disabled:cursor-not-allowed read-only:not-disabled:cursor-pointer", F.text),
|
|
2104
2205
|
placeholder: a,
|
|
2105
2206
|
disabled: o,
|
|
2106
2207
|
readOnly: _,
|
|
2107
2208
|
required: s,
|
|
2108
2209
|
"aria-invalid": M || void 0,
|
|
2109
|
-
"aria-describedby":
|
|
2210
|
+
"aria-describedby": P ? `${j}-desc` : void 0
|
|
2110
2211
|
}),
|
|
2111
2212
|
/* @__PURE__ */ p("div", {
|
|
2112
2213
|
className: "inline-flex shrink-0 items-center gap-0.5",
|
|
2113
|
-
children: [/* @__PURE__ */ f(
|
|
2214
|
+
children: [/* @__PURE__ */ f(E.Clear, {
|
|
2114
2215
|
className: "inline-flex size-7 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",
|
|
2115
2216
|
"aria-label": "Limpar seleção",
|
|
2116
2217
|
"data-disabled": o || void 0,
|
|
@@ -2119,7 +2220,7 @@ function Bt({ label: e = "Label", floatingLabel: t = !0, items: i, placeholder:
|
|
|
2119
2220
|
strokeWidth: 2,
|
|
2120
2221
|
"aria-hidden": !0
|
|
2121
2222
|
})
|
|
2122
|
-
}), /* @__PURE__ */ f(
|
|
2223
|
+
}), /* @__PURE__ */ f(E.Trigger, {
|
|
2123
2224
|
className: "inline-flex size-7 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",
|
|
2124
2225
|
"aria-label": "Abrir lista",
|
|
2125
2226
|
"data-disabled": o || void 0,
|
|
@@ -2131,21 +2232,21 @@ function Bt({ label: e = "Label", floatingLabel: t = !0, items: i, placeholder:
|
|
|
2131
2232
|
})]
|
|
2132
2233
|
})
|
|
2133
2234
|
]
|
|
2134
|
-
}), /* @__PURE__ */ f(
|
|
2135
|
-
className:
|
|
2235
|
+
}), /* @__PURE__ */ f(E.Portal, { children: /* @__PURE__ */ f(E.Positioner, {
|
|
2236
|
+
className: Xt,
|
|
2136
2237
|
sideOffset: 4,
|
|
2137
|
-
children: /* @__PURE__ */ p(
|
|
2138
|
-
className:
|
|
2139
|
-
children: [/* @__PURE__ */ f(
|
|
2238
|
+
children: /* @__PURE__ */ p(E.Popup, {
|
|
2239
|
+
className: Kt,
|
|
2240
|
+
children: [/* @__PURE__ */ f(E.Empty, { children: /* @__PURE__ */ f("div", {
|
|
2140
2241
|
className: "px-3 py-2.5 text-sm text-eds-neutral-elements",
|
|
2141
2242
|
children: g
|
|
2142
|
-
}) }), /* @__PURE__ */ f(
|
|
2143
|
-
className:
|
|
2144
|
-
children: (e) => /* @__PURE__ */ p(
|
|
2243
|
+
}) }), /* @__PURE__ */ f(E.List, {
|
|
2244
|
+
className: qt,
|
|
2245
|
+
children: (e) => /* @__PURE__ */ p(E.Item, {
|
|
2145
2246
|
value: e,
|
|
2146
|
-
className:
|
|
2147
|
-
children: [/* @__PURE__ */ f(
|
|
2148
|
-
className:
|
|
2247
|
+
className: Jt,
|
|
2248
|
+
children: [/* @__PURE__ */ f(E.ItemIndicator, {
|
|
2249
|
+
className: Yt,
|
|
2149
2250
|
children: /* @__PURE__ */ f(n, {
|
|
2150
2251
|
size: 14,
|
|
2151
2252
|
strokeWidth: 2.5,
|
|
@@ -2153,14 +2254,14 @@ function Bt({ label: e = "Label", floatingLabel: t = !0, items: i, placeholder:
|
|
|
2153
2254
|
})
|
|
2154
2255
|
}), D ? D(e) : /* @__PURE__ */ f("span", {
|
|
2155
2256
|
className: "block min-w-0 flex-1 text-left",
|
|
2156
|
-
children:
|
|
2257
|
+
children: I(e)
|
|
2157
2258
|
})]
|
|
2158
|
-
},
|
|
2259
|
+
}, L(e))
|
|
2159
2260
|
})]
|
|
2160
2261
|
})
|
|
2161
2262
|
}) })]
|
|
2162
2263
|
}),
|
|
2163
|
-
|
|
2264
|
+
P && /* @__PURE__ */ f("div", {
|
|
2164
2265
|
id: `${j}-desc`,
|
|
2165
2266
|
className: "text-xs text-eds-neutral-elements data-[state=invalid]:text-eds-red-main",
|
|
2166
2267
|
"data-state": M ? "invalid" : void 0,
|
|
@@ -2171,7 +2272,7 @@ function Bt({ label: e = "Label", floatingLabel: t = !0, items: i, placeholder:
|
|
|
2171
2272
|
}
|
|
2172
2273
|
//#endregion
|
|
2173
2274
|
//#region src/components/DatePicker/DatePicker.tsx
|
|
2174
|
-
var
|
|
2275
|
+
var nn = {
|
|
2175
2276
|
sm: {
|
|
2176
2277
|
trigger: "h-8 px-2.5",
|
|
2177
2278
|
text: "text-sm",
|
|
@@ -2190,11 +2291,11 @@ var Vt = {
|
|
|
2190
2291
|
left: "left-3.5",
|
|
2191
2292
|
icon: "size-5"
|
|
2192
2293
|
}
|
|
2193
|
-
},
|
|
2294
|
+
}, rn = {
|
|
2194
2295
|
default: "",
|
|
2195
2296
|
valid: "not-focus-visible:border-[color-mix(in_srgb,var(--color-eds-green-main)_55%,var(--color-eds-outline-border))]",
|
|
2196
2297
|
invalid: "not-focus-visible:border-[color-mix(in_srgb,var(--color-eds-red-main)_55%,var(--color-eds-outline-border))]"
|
|
2197
|
-
},
|
|
2298
|
+
}, an = [
|
|
2198
2299
|
"D",
|
|
2199
2300
|
"S",
|
|
2200
2301
|
"T",
|
|
@@ -2203,155 +2304,156 @@ var Vt = {
|
|
|
2203
2304
|
"S",
|
|
2204
2305
|
"S"
|
|
2205
2306
|
];
|
|
2206
|
-
function
|
|
2207
|
-
let n =
|
|
2307
|
+
function on(e, t) {
|
|
2308
|
+
let n = W(ve(e), { weekStartsOn: t }), r = be(_e(e), { weekStartsOn: t }), i = [];
|
|
2208
2309
|
for (let e = n; e <= r; e = oe(e, 1)) i.push(e);
|
|
2209
2310
|
return i;
|
|
2210
2311
|
}
|
|
2211
|
-
function
|
|
2312
|
+
function sn(e) {
|
|
2212
2313
|
return e.mode === "range";
|
|
2213
2314
|
}
|
|
2214
|
-
function
|
|
2215
|
-
let { label: n = "Label",
|
|
2315
|
+
function cn(e) {
|
|
2316
|
+
let { label: n = "Label", labelVariant: r, floatingLabel: o, disabled: s = !1, required: c = !1, fluid: l = !1, state: u = "default", size: d = "md", supportingText: m = "", errorMessage: h = "Selecione uma data válida", id: g, weekStartsOn: _ = 0, dateFormat: b = "dd/MM/yyyy", className: S } = e, C = sn(e), w = e.placeholder ?? (C ? "Selecione um período" : "Selecione uma data"), T = v(), E = g ?? T, O = u === "invalid", k = O || m, A = nn[d], j = Ht(r, o), M = j === "floating", P = sn(e) ? {
|
|
2216
2317
|
from: e.defaultValue?.from ?? null,
|
|
2217
2318
|
to: e.defaultValue?.to ?? null
|
|
2218
2319
|
} : {
|
|
2219
2320
|
from: e.defaultValue ?? null,
|
|
2220
2321
|
to: null
|
|
2221
|
-
},
|
|
2322
|
+
}, F = sn(e) ? e.value === void 0 ? void 0 : {
|
|
2222
2323
|
from: e.value?.from ?? null,
|
|
2223
2324
|
to: e.value?.to ?? null
|
|
2224
2325
|
} : e.value === void 0 ? void 0 : {
|
|
2225
2326
|
from: e.value ?? null,
|
|
2226
2327
|
to: null
|
|
2227
|
-
},
|
|
2228
|
-
function
|
|
2229
|
-
|
|
2328
|
+
}, I = F !== void 0, [L, ee] = x(P), R = I ? F : L, te = sn(e) ? Math.max(1, e.numberOfMonths ?? 1) : 1, ne = sn(e) ? e.presets : void 0, [re, z] = x(!1), [ie, B] = x(() => R.from ?? e.defaultMonth ?? /* @__PURE__ */ new Date()), ae = y(() => [...an.slice(_), ...an.slice(0, _)], [_]), V = y(() => Array.from({ length: te }, (e, t) => se(ie, t)), [ie, te]);
|
|
2329
|
+
function H(t) {
|
|
2330
|
+
s || (t && B(R.from ?? e.defaultMonth ?? /* @__PURE__ */ new Date()), z(t));
|
|
2230
2331
|
}
|
|
2231
|
-
function
|
|
2232
|
-
if (
|
|
2233
|
-
let n =
|
|
2332
|
+
function oe(t) {
|
|
2333
|
+
if (sn(e)) {
|
|
2334
|
+
let n = R, r;
|
|
2234
2335
|
r = !n.from || n.to ? {
|
|
2235
2336
|
from: t,
|
|
2236
2337
|
to: null
|
|
2237
|
-
} :
|
|
2338
|
+
} : at(t, n.from) ? {
|
|
2238
2339
|
from: t,
|
|
2239
2340
|
to: n.from
|
|
2240
2341
|
} : {
|
|
2241
2342
|
from: n.from,
|
|
2242
2343
|
to: t
|
|
2243
|
-
},
|
|
2344
|
+
}, I || ee(r), r.from && e.onValueChange?.({
|
|
2244
2345
|
from: r.from,
|
|
2245
2346
|
to: r.to ?? void 0
|
|
2246
|
-
}), r.from && r.to &&
|
|
2347
|
+
}), r.from && r.to && z(!1);
|
|
2247
2348
|
return;
|
|
2248
2349
|
}
|
|
2249
|
-
|
|
2350
|
+
I || ee({
|
|
2250
2351
|
from: t,
|
|
2251
2352
|
to: null
|
|
2252
|
-
}), e.onValueChange?.(t),
|
|
2353
|
+
}), e.onValueChange?.(t), z(!1);
|
|
2253
2354
|
}
|
|
2254
|
-
function
|
|
2355
|
+
function ce(t) {
|
|
2255
2356
|
let n = {
|
|
2256
2357
|
from: t.from,
|
|
2257
2358
|
to: t.to ?? null
|
|
2258
2359
|
};
|
|
2259
|
-
|
|
2360
|
+
I || ee(n), sn(e) && e.onValueChange?.({
|
|
2260
2361
|
from: t.from,
|
|
2261
2362
|
to: t.to ?? void 0
|
|
2262
|
-
}),
|
|
2363
|
+
}), B(t.from);
|
|
2263
2364
|
}
|
|
2264
|
-
function
|
|
2265
|
-
return !
|
|
2365
|
+
function U(e) {
|
|
2366
|
+
return !R.from || !R.to || !e.range.to ? !1 : q(R.from, e.range.from) && q(R.to, e.range.to);
|
|
2266
2367
|
}
|
|
2267
|
-
let
|
|
2368
|
+
let W = R.from ? !C || !R.to ? Q(R.from, b) : `${Q(R.from, b)} - ${Q(R.to, b)}` : w;
|
|
2268
2369
|
return /* @__PURE__ */ p("div", {
|
|
2269
|
-
className:
|
|
2270
|
-
"data-fluid":
|
|
2370
|
+
className: N(Ut, S),
|
|
2371
|
+
"data-fluid": l || void 0,
|
|
2271
2372
|
"data-eds-component": "DatePicker",
|
|
2373
|
+
"data-label-variant": j,
|
|
2272
2374
|
children: [
|
|
2273
2375
|
/* @__PURE__ */ f("div", {
|
|
2274
|
-
className:
|
|
2376
|
+
className: Wt,
|
|
2275
2377
|
children: /* @__PURE__ */ p("label", {
|
|
2276
|
-
className:
|
|
2378
|
+
className: N(Gt, M && "sr-only", !M && "font-medium"),
|
|
2277
2379
|
htmlFor: E,
|
|
2278
|
-
children: [/* @__PURE__ */ f("span", { children: n }),
|
|
2380
|
+
children: [/* @__PURE__ */ f("span", { children: n }), c && /* @__PURE__ */ f("span", {
|
|
2279
2381
|
className: "text-eds-red-main",
|
|
2280
2382
|
children: "*"
|
|
2281
2383
|
})]
|
|
2282
2384
|
})
|
|
2283
2385
|
}),
|
|
2284
|
-
/* @__PURE__ */ p(
|
|
2285
|
-
open:
|
|
2286
|
-
onOpenChange:
|
|
2287
|
-
children: [/* @__PURE__ */ p(
|
|
2386
|
+
/* @__PURE__ */ p(D.Root, {
|
|
2387
|
+
open: re,
|
|
2388
|
+
onOpenChange: H,
|
|
2389
|
+
children: [/* @__PURE__ */ p(D.Trigger, {
|
|
2288
2390
|
id: E,
|
|
2289
|
-
disabled:
|
|
2290
|
-
className:
|
|
2291
|
-
"data-state":
|
|
2292
|
-
"data-size":
|
|
2293
|
-
"data-disabled":
|
|
2294
|
-
"aria-describedby":
|
|
2391
|
+
disabled: s,
|
|
2392
|
+
className: N("group relative inline-flex w-full cursor-pointer items-center gap-2 rounded-eds-xs border border-eds-outline-border bg-white text-left", A.trigger, rn[u], "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"),
|
|
2393
|
+
"data-state": u,
|
|
2394
|
+
"data-size": d,
|
|
2395
|
+
"data-disabled": s || void 0,
|
|
2396
|
+
"aria-describedby": k ? `${E}-desc` : void 0,
|
|
2295
2397
|
children: [
|
|
2296
|
-
|
|
2297
|
-
className:
|
|
2298
|
-
children: [/* @__PURE__ */ f("span", { children: n }),
|
|
2398
|
+
M && /* @__PURE__ */ p("span", {
|
|
2399
|
+
className: Zt(A.left),
|
|
2400
|
+
children: [/* @__PURE__ */ f("span", { children: n }), c && /* @__PURE__ */ f("span", {
|
|
2299
2401
|
className: "text-eds-red-main",
|
|
2300
2402
|
"aria-hidden": "true",
|
|
2301
2403
|
children: "*"
|
|
2302
2404
|
})]
|
|
2303
2405
|
}),
|
|
2304
2406
|
/* @__PURE__ */ f(t, {
|
|
2305
|
-
className:
|
|
2407
|
+
className: N("shrink-0 text-eds-neutral-elements", A.icon),
|
|
2306
2408
|
"aria-hidden": !0
|
|
2307
2409
|
}),
|
|
2308
2410
|
/* @__PURE__ */ f("span", {
|
|
2309
|
-
className:
|
|
2310
|
-
children:
|
|
2411
|
+
className: N("min-w-0 flex-1 truncate font-inherit", A.text, R.from ? "text-eds-neutral-main" : "text-eds-neutral-elements"),
|
|
2412
|
+
children: W
|
|
2311
2413
|
})
|
|
2312
2414
|
]
|
|
2313
|
-
}), /* @__PURE__ */ f(
|
|
2415
|
+
}), /* @__PURE__ */ f(D.Portal, { children: /* @__PURE__ */ f(D.Positioner, {
|
|
2314
2416
|
className: "z-50 outline-none",
|
|
2315
2417
|
sideOffset: 4,
|
|
2316
2418
|
align: "start",
|
|
2317
|
-
children: /* @__PURE__ */ p(
|
|
2419
|
+
children: /* @__PURE__ */ p(D.Popup, {
|
|
2318
2420
|
"data-eds-component": "DatePicker",
|
|
2319
2421
|
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",
|
|
2320
|
-
children: [
|
|
2422
|
+
children: [ne && ne.length > 0 && /* @__PURE__ */ f("div", {
|
|
2321
2423
|
className: "flex w-40 shrink-0 flex-col gap-0.5 border-r border-eds-outline-border p-2 text-sm",
|
|
2322
|
-
children:
|
|
2424
|
+
children: ne.map((e) => /* @__PURE__ */ f("button", {
|
|
2323
2425
|
type: "button",
|
|
2324
|
-
onClick: () =>
|
|
2325
|
-
className:
|
|
2426
|
+
onClick: () => ce(e.range),
|
|
2427
|
+
className: N("rounded-md px-3 py-1.5 text-left whitespace-nowrap", U(e) ? "bg-eds-blue-main text-white" : "text-eds-neutral-main hover:bg-eds-neutral-background"),
|
|
2326
2428
|
children: e.label
|
|
2327
2429
|
}, e.label))
|
|
2328
2430
|
}), /* @__PURE__ */ f("div", {
|
|
2329
2431
|
className: "flex",
|
|
2330
|
-
children:
|
|
2331
|
-
let n = t === 0, r = t ===
|
|
2432
|
+
children: V.map((e, t) => {
|
|
2433
|
+
let n = t === 0, r = t === V.length - 1, o = on(e, _);
|
|
2332
2434
|
return /* @__PURE__ */ p("div", {
|
|
2333
|
-
className:
|
|
2435
|
+
className: N("w-[284px] shrink-0", !n && "border-l border-eds-outline-border"),
|
|
2334
2436
|
children: [/* @__PURE__ */ p("div", {
|
|
2335
2437
|
className: "flex items-center gap-2.5 p-4",
|
|
2336
2438
|
children: [
|
|
2337
|
-
n ? /* @__PURE__ */ f(
|
|
2439
|
+
n ? /* @__PURE__ */ f(ht, {
|
|
2338
2440
|
icon: i,
|
|
2339
2441
|
label: "Mês anterior",
|
|
2340
2442
|
size: "sm",
|
|
2341
|
-
onClick: () =>
|
|
2443
|
+
onClick: () => B((e) => ct(e, 1))
|
|
2342
2444
|
}) : /* @__PURE__ */ f("span", {
|
|
2343
2445
|
className: "size-8 shrink-0",
|
|
2344
2446
|
"aria-hidden": !0
|
|
2345
2447
|
}),
|
|
2346
2448
|
/* @__PURE__ */ f("span", {
|
|
2347
2449
|
className: "flex-1 text-center text-base font-medium text-eds-neutral-main capitalize",
|
|
2348
|
-
children: Q(e, "MMMM yyyy", { locale:
|
|
2450
|
+
children: Q(e, "MMMM yyyy", { locale: pt })
|
|
2349
2451
|
}),
|
|
2350
|
-
r ? /* @__PURE__ */ f(
|
|
2452
|
+
r ? /* @__PURE__ */ f(ht, {
|
|
2351
2453
|
icon: a,
|
|
2352
2454
|
label: "Próximo mês",
|
|
2353
2455
|
size: "sm",
|
|
2354
|
-
onClick: () =>
|
|
2456
|
+
onClick: () => B((e) => se(e, 1))
|
|
2355
2457
|
}) : /* @__PURE__ */ f("span", {
|
|
2356
2458
|
className: "size-8 shrink-0",
|
|
2357
2459
|
"aria-hidden": !0
|
|
@@ -2359,19 +2461,19 @@ function Gt(e) {
|
|
|
2359
2461
|
]
|
|
2360
2462
|
}), /* @__PURE__ */ p("div", {
|
|
2361
2463
|
className: "grid grid-cols-7 px-4 pb-4",
|
|
2362
|
-
children: [
|
|
2464
|
+
children: [ae.map((e, t) => /* @__PURE__ */ f("span", {
|
|
2363
2465
|
className: "pb-2 text-center text-xs font-medium text-eds-neutral-main",
|
|
2364
2466
|
children: e
|
|
2365
2467
|
}, `${e}-${t}`)), o.map((t) => {
|
|
2366
|
-
let n =
|
|
2468
|
+
let n = ot(t, e), r = st(t), i = C && R.from ? q(t, R.from) : !1, a = C && R.to ? q(t, R.to) : !1, o = !!(C && R.from && R.to && !q(R.from, R.to)), s = o && R.from && R.to ? it(t, R.from) && at(t, R.to) : !1, c = C ? i || a : R.from ? q(t, R.from) : !1;
|
|
2367
2469
|
return /* @__PURE__ */ f("div", {
|
|
2368
|
-
className:
|
|
2470
|
+
className: N("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"),
|
|
2369
2471
|
children: /* @__PURE__ */ f("button", {
|
|
2370
2472
|
type: "button",
|
|
2371
|
-
onClick: () =>
|
|
2473
|
+
onClick: () => oe(t),
|
|
2372
2474
|
"data-selected": c || void 0,
|
|
2373
2475
|
"data-today": r || void 0,
|
|
2374
|
-
className:
|
|
2476
|
+
className: N("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"),
|
|
2375
2477
|
children: Q(t, "d")
|
|
2376
2478
|
})
|
|
2377
2479
|
}, t.toISOString());
|
|
@@ -2383,107 +2485,226 @@ function Gt(e) {
|
|
|
2383
2485
|
})
|
|
2384
2486
|
}) })]
|
|
2385
2487
|
}),
|
|
2386
|
-
|
|
2488
|
+
k && /* @__PURE__ */ f("div", {
|
|
2387
2489
|
id: `${E}-desc`,
|
|
2388
2490
|
className: "text-xs text-eds-neutral-elements data-[state=invalid]:text-eds-red-main",
|
|
2389
|
-
"data-state":
|
|
2390
|
-
children:
|
|
2491
|
+
"data-state": O ? "invalid" : u,
|
|
2492
|
+
children: O ? h : m
|
|
2391
2493
|
})
|
|
2392
2494
|
]
|
|
2393
2495
|
});
|
|
2394
2496
|
}
|
|
2395
2497
|
//#endregion
|
|
2396
2498
|
//#region src/components/Dialog/Dialog.tsx
|
|
2397
|
-
var
|
|
2499
|
+
var ln = { size: {
|
|
2398
2500
|
sm: {
|
|
2399
|
-
classes: "sm:w-
|
|
2501
|
+
classes: "sm:max-w-xs",
|
|
2400
2502
|
description: "Small dialog for simple confirmations (288px)"
|
|
2401
2503
|
},
|
|
2402
2504
|
md: {
|
|
2403
|
-
classes: "sm:w-
|
|
2505
|
+
classes: "sm:max-w-sm",
|
|
2404
2506
|
description: "Default dialog width (384px)"
|
|
2405
2507
|
},
|
|
2406
2508
|
lg: {
|
|
2407
|
-
classes: "sm:w-
|
|
2509
|
+
classes: "sm:max-w-lg",
|
|
2408
2510
|
description: "Large dialog for complex content (512px)"
|
|
2409
2511
|
},
|
|
2410
2512
|
xl: {
|
|
2411
|
-
classes: "sm:w-
|
|
2513
|
+
classes: "sm:max-w-3xl",
|
|
2412
2514
|
description: "Extra large dialog for detailed views (768px)"
|
|
2413
2515
|
}
|
|
2414
|
-
} },
|
|
2415
|
-
function
|
|
2416
|
-
return g(
|
|
2516
|
+
} }, un = { size: "md" }, dn = m("dialog");
|
|
2517
|
+
function $() {
|
|
2518
|
+
return g(dn);
|
|
2417
2519
|
}
|
|
2418
|
-
function
|
|
2419
|
-
return
|
|
2520
|
+
function fn({ size: e = un.size } = {}) {
|
|
2521
|
+
return N("fixed top-1/2 left-1/2 z-[60] 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", P(ln.size, e, un.size).classes);
|
|
2420
2522
|
}
|
|
2421
|
-
function
|
|
2422
|
-
let
|
|
2423
|
-
return /* @__PURE__ */ p(
|
|
2523
|
+
function pn({ className: e, children: t, size: n, showCloseButton: r = !0 }) {
|
|
2524
|
+
let i = $(), a = i === "alertdialog" ? k.Portal : O.Portal, o = i === "alertdialog" ? k.Backdrop : O.Backdrop, s = i === "alertdialog" ? k.Popup : O.Popup, c = i === "alertdialog" ? k.Close : O.Close;
|
|
2525
|
+
return /* @__PURE__ */ p(a, { children: [/* @__PURE__ */ f(o, { className: "fixed inset-0 z-[60] isolate bg-black/10 transition-opacity duration-100 supports-backdrop-filter:backdrop-blur-xs data-[ending-style]:opacity-0 data-[starting-style]:opacity-0" }), /* @__PURE__ */ p(s, {
|
|
2424
2526
|
"data-eds-component": "Dialog",
|
|
2425
|
-
className:
|
|
2426
|
-
children: t
|
|
2527
|
+
className: N(fn({ size: n }), e),
|
|
2528
|
+
children: [t, r ? /* @__PURE__ */ f(c, {
|
|
2529
|
+
"data-eds-component": "Dialog",
|
|
2530
|
+
"aria-label": "Fechar",
|
|
2531
|
+
className: "absolute top-2 right-2 inline-flex size-7 cursor-pointer items-center justify-center rounded-lg border border-transparent text-eds-neutral-elements transition-colors outline-none hover:bg-eds-neutral-background hover:text-eds-neutral-main focus-visible:ring-3 focus-visible:ring-eds-outline-focus-ring",
|
|
2532
|
+
children: /* @__PURE__ */ f(l, {
|
|
2533
|
+
className: "size-4",
|
|
2534
|
+
"aria-hidden": !0
|
|
2535
|
+
})
|
|
2536
|
+
}) : null]
|
|
2427
2537
|
})] });
|
|
2428
2538
|
}
|
|
2429
|
-
function
|
|
2539
|
+
function mn(e) {
|
|
2430
2540
|
if (e.role === "alertdialog") {
|
|
2431
2541
|
let { children: t, role: n, ...r } = e;
|
|
2432
|
-
return /* @__PURE__ */ f(
|
|
2542
|
+
return /* @__PURE__ */ f(dn.Provider, {
|
|
2433
2543
|
value: n,
|
|
2434
|
-
children: /* @__PURE__ */ f(
|
|
2544
|
+
children: /* @__PURE__ */ f(k.Root, {
|
|
2435
2545
|
...r,
|
|
2436
2546
|
children: t
|
|
2437
2547
|
})
|
|
2438
2548
|
});
|
|
2439
2549
|
}
|
|
2440
2550
|
let { children: t, role: n = "dialog", ...r } = e;
|
|
2441
|
-
return /* @__PURE__ */ f(
|
|
2551
|
+
return /* @__PURE__ */ f(dn.Provider, {
|
|
2442
2552
|
value: n,
|
|
2443
|
-
children: /* @__PURE__ */ f(
|
|
2553
|
+
children: /* @__PURE__ */ f(O.Root, {
|
|
2444
2554
|
...r,
|
|
2445
2555
|
children: t
|
|
2446
2556
|
})
|
|
2447
2557
|
});
|
|
2448
2558
|
}
|
|
2449
|
-
function
|
|
2450
|
-
return
|
|
2559
|
+
function hn({ children: e, ...t }) {
|
|
2560
|
+
return $() === "alertdialog" ? /* @__PURE__ */ f(k.Trigger, {
|
|
2451
2561
|
"data-eds-component": "Dialog",
|
|
2452
2562
|
...t,
|
|
2453
2563
|
children: e
|
|
2454
|
-
}) : /* @__PURE__ */ f(
|
|
2564
|
+
}) : /* @__PURE__ */ f(O.Trigger, {
|
|
2455
2565
|
"data-eds-component": "Dialog",
|
|
2456
2566
|
...t,
|
|
2457
2567
|
children: e
|
|
2458
2568
|
});
|
|
2459
2569
|
}
|
|
2460
|
-
function
|
|
2461
|
-
return /* @__PURE__ */ f(
|
|
2462
|
-
|
|
2570
|
+
function gn({ className: e, ...t }) {
|
|
2571
|
+
return /* @__PURE__ */ f("div", {
|
|
2572
|
+
"data-slot": "dialog-header",
|
|
2573
|
+
className: N("flex flex-col gap-2", e),
|
|
2463
2574
|
...t
|
|
2464
2575
|
});
|
|
2465
2576
|
}
|
|
2466
|
-
function
|
|
2467
|
-
return /* @__PURE__ */ f(
|
|
2468
|
-
|
|
2577
|
+
function _n({ className: e, ...t }) {
|
|
2578
|
+
return /* @__PURE__ */ f("div", {
|
|
2579
|
+
"data-slot": "dialog-footer",
|
|
2580
|
+
className: N("-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),
|
|
2469
2581
|
...t
|
|
2470
2582
|
});
|
|
2471
2583
|
}
|
|
2472
|
-
function
|
|
2473
|
-
return /* @__PURE__ */ f(
|
|
2584
|
+
function vn({ className: e, ...t }) {
|
|
2585
|
+
return /* @__PURE__ */ f($() === "alertdialog" ? k.Title : O.Title, {
|
|
2586
|
+
className: N("text-base leading-none font-medium text-eds-neutral-main", e),
|
|
2587
|
+
...t
|
|
2588
|
+
});
|
|
2589
|
+
}
|
|
2590
|
+
function yn({ className: e, ...t }) {
|
|
2591
|
+
return /* @__PURE__ */ f($() === "alertdialog" ? k.Description : O.Description, {
|
|
2592
|
+
className: N("text-sm text-eds-neutral-elements", e),
|
|
2593
|
+
...t
|
|
2594
|
+
});
|
|
2595
|
+
}
|
|
2596
|
+
function bn({ children: e, ...t }) {
|
|
2597
|
+
return /* @__PURE__ */ f($() === "alertdialog" ? k.Close : O.Close, {
|
|
2474
2598
|
"data-eds-component": "Dialog",
|
|
2475
2599
|
...t,
|
|
2476
2600
|
children: e
|
|
2477
2601
|
});
|
|
2478
2602
|
}
|
|
2479
|
-
|
|
2480
|
-
var
|
|
2481
|
-
Root:
|
|
2482
|
-
Trigger:
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2603
|
+
mn.displayName = "Dialog.Root", hn.displayName = "Dialog.Trigger", gn.displayName = "Dialog.Header", _n.displayName = "Dialog.Footer", vn.displayName = "Dialog.Title", yn.displayName = "Dialog.Description", bn.displayName = "Dialog.Close";
|
|
2604
|
+
var xn = Object.assign(pn, {
|
|
2605
|
+
Root: mn,
|
|
2606
|
+
Trigger: hn,
|
|
2607
|
+
Header: gn,
|
|
2608
|
+
Footer: _n,
|
|
2609
|
+
Title: vn,
|
|
2610
|
+
Description: yn,
|
|
2611
|
+
Close: bn
|
|
2612
|
+
});
|
|
2613
|
+
//#endregion
|
|
2614
|
+
//#region src/components/FormDialog/FormDialog.tsx
|
|
2615
|
+
function Sn({ size: e = "xl" } = {}) {
|
|
2616
|
+
return N("fixed top-1/2 left-1/2 z-[60] flex w-full max-w-[calc(100%-2rem)] max-h-[calc(100vh-4rem)] -translate-x-1/2 -translate-y-1/2 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", P(ln.size, e, un.size).classes);
|
|
2617
|
+
}
|
|
2618
|
+
function Cn({ className: e, children: t, size: n = "xl" }) {
|
|
2619
|
+
let r = $(), i = r === "alertdialog" ? k.Portal : O.Portal, a = r === "alertdialog" ? k.Backdrop : O.Backdrop, o = r === "alertdialog" ? k.Popup : O.Popup;
|
|
2620
|
+
return /* @__PURE__ */ p(i, { children: [/* @__PURE__ */ f(a, { className: "fixed inset-0 z-[60] isolate bg-black/10 transition-opacity duration-100 supports-backdrop-filter:backdrop-blur-xs data-[ending-style]:opacity-0 data-[starting-style]:opacity-0" }), /* @__PURE__ */ f(o, {
|
|
2621
|
+
"data-eds-component": "FormDialog",
|
|
2622
|
+
className: N(Sn({ size: n }), e),
|
|
2623
|
+
children: t
|
|
2624
|
+
})] });
|
|
2625
|
+
}
|
|
2626
|
+
function wn({ className: e, icon: t, title: n, subtitle: r, showCloseButton: i = !0, children: a, ...o }) {
|
|
2627
|
+
let s = $(), c = s === "alertdialog" ? k.Close : O.Close, u = s === "alertdialog" ? k.Title : O.Title, d = s === "alertdialog" ? k.Description : O.Description, m = n != null || r != null || t;
|
|
2628
|
+
return /* @__PURE__ */ p("div", {
|
|
2629
|
+
"data-slot": "form-dialog-header",
|
|
2630
|
+
className: N("relative flex shrink-0 items-start gap-3 border-b border-eds-outline-border px-5 py-4", i && "pr-12", e),
|
|
2631
|
+
...o,
|
|
2632
|
+
children: [
|
|
2633
|
+
t ? /* @__PURE__ */ f("span", {
|
|
2634
|
+
"data-slot": "form-dialog-icon",
|
|
2635
|
+
className: "inline-flex size-10 shrink-0 items-center justify-center rounded-eds-lil bg-eds-blue-background/45 text-eds-blue-main",
|
|
2636
|
+
"aria-hidden": !0,
|
|
2637
|
+
children: /* @__PURE__ */ f(t, {
|
|
2638
|
+
className: "size-5",
|
|
2639
|
+
strokeWidth: 2
|
|
2640
|
+
})
|
|
2641
|
+
}) : null,
|
|
2642
|
+
m ? /* @__PURE__ */ p("div", {
|
|
2643
|
+
className: "min-w-0 flex-1 flex flex-col gap-1",
|
|
2644
|
+
children: [
|
|
2645
|
+
n == null ? null : /* @__PURE__ */ f(u, {
|
|
2646
|
+
className: "text-lg leading-tight font-semibold text-eds-blue-dark",
|
|
2647
|
+
children: n
|
|
2648
|
+
}),
|
|
2649
|
+
r == null ? null : /* @__PURE__ */ f(d, {
|
|
2650
|
+
className: "text-sm leading-snug text-eds-neutral-elements",
|
|
2651
|
+
children: r
|
|
2652
|
+
}),
|
|
2653
|
+
a
|
|
2654
|
+
]
|
|
2655
|
+
}) : /* @__PURE__ */ f("div", {
|
|
2656
|
+
className: "min-w-0 flex-1",
|
|
2657
|
+
children: a
|
|
2658
|
+
}),
|
|
2659
|
+
i ? /* @__PURE__ */ f(c, {
|
|
2660
|
+
"data-eds-component": "FormDialog",
|
|
2661
|
+
"aria-label": "Fechar",
|
|
2662
|
+
className: "absolute top-3.5 right-3.5 inline-flex size-8 cursor-pointer items-center justify-center rounded-lg border border-transparent text-eds-neutral-elements transition-colors outline-none hover:bg-eds-neutral-background hover:text-eds-neutral-main focus-visible:ring-3 focus-visible:ring-eds-outline-focus-ring",
|
|
2663
|
+
children: /* @__PURE__ */ f(l, {
|
|
2664
|
+
className: "size-4",
|
|
2665
|
+
"aria-hidden": !0
|
|
2666
|
+
})
|
|
2667
|
+
}) : null
|
|
2668
|
+
]
|
|
2669
|
+
});
|
|
2670
|
+
}
|
|
2671
|
+
function Tn({ className: e, ...t }) {
|
|
2672
|
+
return /* @__PURE__ */ f("div", {
|
|
2673
|
+
"data-slot": "form-dialog-body",
|
|
2674
|
+
className: N("min-h-0 flex-1 overflow-y-auto overscroll-contain px-5 py-4", e),
|
|
2675
|
+
...t
|
|
2676
|
+
});
|
|
2677
|
+
}
|
|
2678
|
+
function En({ className: e, ...t }) {
|
|
2679
|
+
return /* @__PURE__ */ f("div", {
|
|
2680
|
+
"data-slot": "form-dialog-footer",
|
|
2681
|
+
className: N("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),
|
|
2682
|
+
...t
|
|
2683
|
+
});
|
|
2684
|
+
}
|
|
2685
|
+
function Dn({ className: e, ...t }) {
|
|
2686
|
+
return /* @__PURE__ */ f($() === "alertdialog" ? k.Title : O.Title, {
|
|
2687
|
+
className: N("text-lg leading-tight font-semibold text-eds-blue-dark", e),
|
|
2688
|
+
...t
|
|
2689
|
+
});
|
|
2690
|
+
}
|
|
2691
|
+
function On({ className: e, ...t }) {
|
|
2692
|
+
return /* @__PURE__ */ f($() === "alertdialog" ? k.Description : O.Description, {
|
|
2693
|
+
className: N("text-sm leading-snug text-eds-neutral-elements", e),
|
|
2694
|
+
...t
|
|
2695
|
+
});
|
|
2696
|
+
}
|
|
2697
|
+
wn.displayName = "FormDialog.Header", Tn.displayName = "FormDialog.Body", En.displayName = "FormDialog.Footer", Dn.displayName = "FormDialog.Title", On.displayName = "FormDialog.Description";
|
|
2698
|
+
var kn = Object.assign(Cn, {
|
|
2699
|
+
Root: mn,
|
|
2700
|
+
Trigger: hn,
|
|
2701
|
+
Close: bn,
|
|
2702
|
+
Header: wn,
|
|
2703
|
+
Body: Tn,
|
|
2704
|
+
Footer: En,
|
|
2705
|
+
Title: Dn,
|
|
2706
|
+
Description: On
|
|
2707
|
+
}), An = { size: {
|
|
2487
2708
|
sm: {
|
|
2488
2709
|
classes: "px-6 py-8 gap-3",
|
|
2489
2710
|
description: "Compact empty state for smaller containers"
|
|
@@ -2496,11 +2717,11 @@ var rn = Object.assign(Zt, {
|
|
|
2496
2717
|
classes: "px-12 py-20 gap-6",
|
|
2497
2718
|
description: "Large empty state for prominent placement"
|
|
2498
2719
|
}
|
|
2499
|
-
} },
|
|
2500
|
-
function
|
|
2720
|
+
} }, jn = { size: "md" };
|
|
2721
|
+
function Mn({ icon: e, title: t, description: n, action: r, size: i = jn.size, titleLevel: a = "h2", className: o }) {
|
|
2501
2722
|
return /* @__PURE__ */ p("div", {
|
|
2502
2723
|
"data-eds-component": "Empty",
|
|
2503
|
-
className:
|
|
2724
|
+
className: N("flex w-full flex-col items-center rounded-eds-sm border border-eds-outline-border bg-eds-neutral-background text-center", P(An.size, i, jn.size).classes, o),
|
|
2504
2725
|
children: [
|
|
2505
2726
|
e && /* @__PURE__ */ f("div", {
|
|
2506
2727
|
className: "text-eds-neutral-elements",
|
|
@@ -2521,58 +2742,58 @@ function sn({ icon: e, title: t, description: n, action: r, size: i = on.size, t
|
|
|
2521
2742
|
}
|
|
2522
2743
|
//#endregion
|
|
2523
2744
|
//#region ../../node_modules/.pnpm/brazilian-values@0.13.1/node_modules/brazilian-values/dist/brazilian-values.mjs
|
|
2524
|
-
var
|
|
2525
|
-
return e.replace(
|
|
2526
|
-
},
|
|
2527
|
-
return
|
|
2528
|
-
},
|
|
2529
|
-
return
|
|
2530
|
-
},
|
|
2531
|
-
return
|
|
2532
|
-
},
|
|
2745
|
+
var Nn = /\D/g, Pn = function(e) {
|
|
2746
|
+
return e.replace(Nn, "");
|
|
2747
|
+
}, Fn = function(e) {
|
|
2748
|
+
return Pn(e).replace(/(\d{5})(\d{1,3})/, "$1-$2");
|
|
2749
|
+
}, In = function(e) {
|
|
2750
|
+
return Pn(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");
|
|
2751
|
+
}, Ln = function(e) {
|
|
2752
|
+
return Pn(e).replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d{1,2})$/, "$1-$2");
|
|
2753
|
+
}, Rn = function(e) {
|
|
2533
2754
|
return (e.match(/\d/g)?.length ?? 0) <= 11;
|
|
2534
|
-
},
|
|
2535
|
-
return
|
|
2536
|
-
},
|
|
2537
|
-
return
|
|
2538
|
-
},
|
|
2755
|
+
}, zn = function(e) {
|
|
2756
|
+
return Rn(e) ? Ln(e) : In(e);
|
|
2757
|
+
}, Bn = function(e) {
|
|
2758
|
+
return Pn(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");
|
|
2759
|
+
}, Vn = {
|
|
2539
2760
|
sm: {
|
|
2540
|
-
control: "h-
|
|
2761
|
+
control: "h-9 px-3",
|
|
2541
2762
|
text: "text-sm",
|
|
2542
|
-
left: "left-
|
|
2763
|
+
left: "left-3"
|
|
2543
2764
|
},
|
|
2544
2765
|
md: {
|
|
2545
|
-
control: "h-
|
|
2766
|
+
control: "h-10 px-3.5",
|
|
2546
2767
|
text: "text-base",
|
|
2547
|
-
left: "left-3"
|
|
2768
|
+
left: "left-3.5"
|
|
2548
2769
|
},
|
|
2549
2770
|
lg: {
|
|
2550
|
-
control: "h-
|
|
2771
|
+
control: "h-12 px-4",
|
|
2551
2772
|
text: "text-base",
|
|
2552
|
-
left: "left-
|
|
2773
|
+
left: "left-4"
|
|
2553
2774
|
}
|
|
2554
|
-
},
|
|
2775
|
+
}, Hn = {
|
|
2555
2776
|
default: "",
|
|
2556
2777
|
valid: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-green-main)_55%,var(--color-eds-outline-border))]",
|
|
2557
2778
|
invalid: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-red-main)_55%,var(--color-eds-outline-border))]",
|
|
2558
2779
|
loading: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-blue-main)_45%,var(--color-eds-outline-border))]"
|
|
2559
2780
|
};
|
|
2560
|
-
function
|
|
2561
|
-
let re = v(),
|
|
2781
|
+
function Un({ className: e, label: t = "Label", disabled: n = !1, state: r = "default", size: i = "md", inputType: a = "text", required: c = !1, placeholder: l = "Digite algo...", errorMessage: u = "Campo obrigatório", fluid: d = !1, format: m, tooltip: h = null, linkText: g = null, linkUrl: _ = null, supportLink: y = null, supportLinkUrl: b = null, supportingText: S = "", lazy: C = !1, labelVariant: w, floatingLabel: T, disableAutocomplete: E = !1, isLoading: D = !1, loadingIconPosition: O = "end", icon: k, defaultValue: j, value: M, id: P, name: F, onBlur: I, onFocus: L, onKeyDown: ee, onClick: R, onChange: te, ...ne }) {
|
|
2782
|
+
let re = v(), z = P ?? re, [ie, B] = x(() => j?.toString() ?? ""), ae = M !== void 0, V = (ae ? M : ie)?.toString() ?? "", H = y ?? g, oe = b ?? _, se = Ht(w, T), ce = se === "floating", U = (e) => {
|
|
2562
2783
|
switch (m) {
|
|
2563
|
-
case "cep": return
|
|
2564
|
-
case "cpf": return
|
|
2565
|
-
case "cnpj": return
|
|
2566
|
-
case "cpfOrCnpj": return
|
|
2567
|
-
case "phone": return
|
|
2784
|
+
case "cep": return Fn(e);
|
|
2785
|
+
case "cpf": return Ln(e);
|
|
2786
|
+
case "cnpj": return In(e);
|
|
2787
|
+
case "cpfOrCnpj": return zn(e);
|
|
2788
|
+
case "phone": return Bn(e);
|
|
2568
2789
|
default: return e;
|
|
2569
2790
|
}
|
|
2570
|
-
},
|
|
2571
|
-
let n =
|
|
2572
|
-
|
|
2573
|
-
},
|
|
2791
|
+
}, W = (e, t) => {
|
|
2792
|
+
let n = U(e);
|
|
2793
|
+
ae || B(n), te?.(n, t);
|
|
2794
|
+
}, G = r === "invalid", K = n || D, le = Vn[i], ue = D ? /* @__PURE__ */ f("span", {
|
|
2574
2795
|
className: "inline-flex shrink-0 items-center justify-center text-eds-blue-main",
|
|
2575
|
-
"data-position":
|
|
2796
|
+
"data-position": O,
|
|
2576
2797
|
"aria-hidden": !0,
|
|
2577
2798
|
children: /* @__PURE__ */ f(s, {
|
|
2578
2799
|
className: "animate-eds-spin",
|
|
@@ -2580,17 +2801,18 @@ function vn({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
|
|
|
2580
2801
|
})
|
|
2581
2802
|
}) : null;
|
|
2582
2803
|
return /* @__PURE__ */ p("div", {
|
|
2583
|
-
className:
|
|
2804
|
+
className: N(Ut, e),
|
|
2584
2805
|
"data-fluid": d || void 0,
|
|
2585
2806
|
"data-eds-component": "Input",
|
|
2807
|
+
"data-label-variant": se,
|
|
2586
2808
|
children: [
|
|
2587
2809
|
/* @__PURE__ */ p("div", {
|
|
2588
|
-
className:
|
|
2810
|
+
className: Wt,
|
|
2589
2811
|
children: [/* @__PURE__ */ p("div", {
|
|
2590
2812
|
className: "inline-flex min-w-0 items-center gap-2",
|
|
2591
2813
|
children: [/* @__PURE__ */ p("label", {
|
|
2592
|
-
className:
|
|
2593
|
-
htmlFor:
|
|
2814
|
+
className: N(Gt, ce && "sr-only", !ce && "font-medium"),
|
|
2815
|
+
htmlFor: z,
|
|
2594
2816
|
children: [/* @__PURE__ */ f("span", { children: t }), c && /* @__PURE__ */ f("span", {
|
|
2595
2817
|
className: "text-eds-red-main",
|
|
2596
2818
|
children: "*"
|
|
@@ -2600,85 +2822,85 @@ function vn({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
|
|
|
2600
2822
|
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",
|
|
2601
2823
|
"aria-label": h,
|
|
2602
2824
|
title: h,
|
|
2603
|
-
disabled:
|
|
2825
|
+
disabled: K,
|
|
2604
2826
|
children: /* @__PURE__ */ f(o, {
|
|
2605
2827
|
size: 16,
|
|
2606
2828
|
"aria-hidden": !0
|
|
2607
2829
|
})
|
|
2608
2830
|
})]
|
|
2609
|
-
}),
|
|
2831
|
+
}), H && oe && /* @__PURE__ */ f("a", {
|
|
2610
2832
|
className: "text-sm whitespace-nowrap text-eds-blue-main underline underline-offset-[0.15em] aria-disabled:pointer-events-none aria-disabled:opacity-60",
|
|
2611
|
-
href:
|
|
2612
|
-
"aria-disabled":
|
|
2613
|
-
tabIndex:
|
|
2833
|
+
href: oe,
|
|
2834
|
+
"aria-disabled": K || void 0,
|
|
2835
|
+
tabIndex: K ? -1 : 0,
|
|
2614
2836
|
onClick: (e) => {
|
|
2615
|
-
|
|
2837
|
+
K && e.preventDefault();
|
|
2616
2838
|
},
|
|
2617
|
-
children:
|
|
2839
|
+
children: H
|
|
2618
2840
|
})]
|
|
2619
2841
|
}),
|
|
2620
2842
|
/* @__PURE__ */ p("div", {
|
|
2621
|
-
className:
|
|
2622
|
-
"data-disabled":
|
|
2843
|
+
className: N("group relative inline-flex w-full items-center gap-2 rounded-eds-xs border border-eds-outline-border bg-white", le.control, Hn[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"),
|
|
2844
|
+
"data-disabled": K || void 0,
|
|
2623
2845
|
"data-state": r,
|
|
2624
2846
|
"data-size": i,
|
|
2625
|
-
"data-floating":
|
|
2626
|
-
"data-has-value":
|
|
2847
|
+
"data-floating": ce || void 0,
|
|
2848
|
+
"data-has-value": V ? !0 : void 0,
|
|
2627
2849
|
children: [
|
|
2628
|
-
|
|
2629
|
-
className:
|
|
2850
|
+
ce && /* @__PURE__ */ p("span", {
|
|
2851
|
+
className: Zt(le.left),
|
|
2630
2852
|
children: [/* @__PURE__ */ f("span", { children: t }), c && /* @__PURE__ */ f("span", {
|
|
2631
2853
|
className: "text-eds-red-main",
|
|
2632
2854
|
"aria-hidden": "true",
|
|
2633
2855
|
children: "*"
|
|
2634
2856
|
})]
|
|
2635
2857
|
}),
|
|
2636
|
-
|
|
2858
|
+
k && /* @__PURE__ */ f(k, {
|
|
2637
2859
|
className: "shrink-0 text-eds-neutral-elements",
|
|
2638
2860
|
size: 16,
|
|
2639
2861
|
"aria-hidden": !0
|
|
2640
2862
|
}),
|
|
2641
|
-
|
|
2642
|
-
/* @__PURE__ */ f(
|
|
2643
|
-
...
|
|
2644
|
-
id:
|
|
2645
|
-
name:
|
|
2646
|
-
className:
|
|
2647
|
-
disabled:
|
|
2863
|
+
O === "start" && ue,
|
|
2864
|
+
/* @__PURE__ */ f(A, {
|
|
2865
|
+
...ne,
|
|
2866
|
+
id: z,
|
|
2867
|
+
name: F,
|
|
2868
|
+
className: N("box-border min-w-0 flex-1 border-0 bg-transparent p-0 font-inherit text-eds-neutral-main outline-none placeholder:text-eds-neutral-elements placeholder:opacity-100", le.text),
|
|
2869
|
+
disabled: K,
|
|
2648
2870
|
type: a,
|
|
2649
2871
|
required: c,
|
|
2650
2872
|
placeholder: l,
|
|
2651
|
-
autoComplete:
|
|
2652
|
-
"aria-invalid":
|
|
2653
|
-
"aria-describedby":
|
|
2654
|
-
"aria-busy":
|
|
2655
|
-
value:
|
|
2656
|
-
defaultValue:
|
|
2657
|
-
onClick:
|
|
2658
|
-
onKeyDown:
|
|
2659
|
-
onFocus:
|
|
2873
|
+
autoComplete: E ? "off" : ne.autoComplete,
|
|
2874
|
+
"aria-invalid": G || void 0,
|
|
2875
|
+
"aria-describedby": G ? `${z}-desc` : void 0,
|
|
2876
|
+
"aria-busy": D || void 0,
|
|
2877
|
+
value: ae ? M : void 0,
|
|
2878
|
+
defaultValue: ae ? void 0 : j,
|
|
2879
|
+
onClick: R,
|
|
2880
|
+
onKeyDown: ee,
|
|
2881
|
+
onFocus: L,
|
|
2660
2882
|
onBlur: (e) => {
|
|
2661
|
-
|
|
2883
|
+
I?.(e), C && W(e.currentTarget.value, e);
|
|
2662
2884
|
},
|
|
2663
2885
|
onChange: (e) => {
|
|
2664
|
-
C ||
|
|
2886
|
+
C || W(e.currentTarget.value, e);
|
|
2665
2887
|
}
|
|
2666
2888
|
}),
|
|
2667
|
-
|
|
2889
|
+
O === "end" && ue
|
|
2668
2890
|
]
|
|
2669
2891
|
}),
|
|
2670
|
-
(
|
|
2671
|
-
id: `${
|
|
2892
|
+
(G || S) && /* @__PURE__ */ f("div", {
|
|
2893
|
+
id: `${z}-desc`,
|
|
2672
2894
|
className: "text-xs text-eds-neutral-elements data-[state=invalid]:text-eds-red-main",
|
|
2673
|
-
"data-state":
|
|
2674
|
-
children:
|
|
2895
|
+
"data-state": G ? "invalid" : r,
|
|
2896
|
+
children: G ? u : S
|
|
2675
2897
|
})
|
|
2676
2898
|
]
|
|
2677
2899
|
});
|
|
2678
2900
|
}
|
|
2679
2901
|
//#endregion
|
|
2680
2902
|
//#region src/components/Select/Select.tsx
|
|
2681
|
-
var
|
|
2903
|
+
var Wn = {
|
|
2682
2904
|
sm: {
|
|
2683
2905
|
trigger: "h-8 pr-2 pl-2.5",
|
|
2684
2906
|
text: "text-sm",
|
|
@@ -2697,58 +2919,59 @@ var yn = {
|
|
|
2697
2919
|
left: "left-3.5",
|
|
2698
2920
|
icon: "size-8"
|
|
2699
2921
|
}
|
|
2700
|
-
},
|
|
2922
|
+
}, Gn = {
|
|
2701
2923
|
default: "",
|
|
2702
2924
|
valid: "not-focus-visible:border-[color-mix(in_srgb,var(--color-eds-green-main)_55%,var(--color-eds-outline-border))]",
|
|
2703
2925
|
invalid: "not-focus-visible:border-[color-mix(in_srgb,var(--color-eds-red-main)_55%,var(--color-eds-outline-border))]"
|
|
2704
2926
|
};
|
|
2705
|
-
function
|
|
2706
|
-
let
|
|
2927
|
+
function Kn({ label: e = "Label", labelVariant: t, floatingLabel: i, items: a, placeholder: o = "Selecione uma opção", disabled: s = !1, required: c = !1, fluid: l = !1, state: u = "default", size: d = "md", supportingText: m = "", errorMessage: h = "Selecione uma opção válida", id: g, name: _, value: y = void 0, defaultValue: b = void 0, onValueChange: x = void 0, renderItem: S = void 0, className: C }) {
|
|
2928
|
+
let w = v(), T = g ?? w, E = u === "invalid", D = E || m, O = Wn[d], k = Ht(t, i), A = k === "floating";
|
|
2707
2929
|
return /* @__PURE__ */ p("div", {
|
|
2708
|
-
className:
|
|
2709
|
-
"data-fluid":
|
|
2930
|
+
className: N(Ut, C),
|
|
2931
|
+
"data-fluid": l || void 0,
|
|
2710
2932
|
"data-eds-component": "Select",
|
|
2933
|
+
"data-label-variant": k,
|
|
2711
2934
|
children: [
|
|
2712
2935
|
/* @__PURE__ */ f("div", {
|
|
2713
|
-
className:
|
|
2936
|
+
className: Wt,
|
|
2714
2937
|
children: /* @__PURE__ */ p("label", {
|
|
2715
|
-
className:
|
|
2716
|
-
htmlFor:
|
|
2717
|
-
children: [/* @__PURE__ */ f("span", { children: e }),
|
|
2938
|
+
className: N(Gt, A && "sr-only", !A && "font-medium"),
|
|
2939
|
+
htmlFor: T,
|
|
2940
|
+
children: [/* @__PURE__ */ f("span", { children: e }), c && /* @__PURE__ */ f("span", {
|
|
2718
2941
|
className: "text-eds-red-main",
|
|
2719
2942
|
children: "*"
|
|
2720
2943
|
})]
|
|
2721
2944
|
})
|
|
2722
2945
|
}),
|
|
2723
|
-
/* @__PURE__ */ p(
|
|
2724
|
-
id:
|
|
2725
|
-
name:
|
|
2726
|
-
disabled:
|
|
2727
|
-
required:
|
|
2728
|
-
onValueChange:
|
|
2729
|
-
defaultValue:
|
|
2730
|
-
value:
|
|
2731
|
-
children: [/* @__PURE__ */ p(
|
|
2732
|
-
className:
|
|
2733
|
-
"data-state":
|
|
2734
|
-
"data-size":
|
|
2735
|
-
"data-disabled":
|
|
2736
|
-
"aria-describedby":
|
|
2946
|
+
/* @__PURE__ */ p(j.Root, {
|
|
2947
|
+
id: T,
|
|
2948
|
+
name: _,
|
|
2949
|
+
disabled: s,
|
|
2950
|
+
required: c,
|
|
2951
|
+
onValueChange: x,
|
|
2952
|
+
defaultValue: b,
|
|
2953
|
+
value: y,
|
|
2954
|
+
children: [/* @__PURE__ */ p(j.Trigger, {
|
|
2955
|
+
className: N("group relative inline-flex w-full cursor-pointer items-center gap-1 rounded-eds-xs border border-eds-outline-border bg-white", O.trigger, Gn[u], "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"),
|
|
2956
|
+
"data-state": u,
|
|
2957
|
+
"data-size": d,
|
|
2958
|
+
"data-disabled": s || void 0,
|
|
2959
|
+
"aria-describedby": D ? `${T}-desc` : void 0,
|
|
2737
2960
|
children: [
|
|
2738
|
-
|
|
2739
|
-
className:
|
|
2740
|
-
children: [/* @__PURE__ */ f("span", { children: e }),
|
|
2961
|
+
A && /* @__PURE__ */ p("span", {
|
|
2962
|
+
className: Zt(O.left),
|
|
2963
|
+
children: [/* @__PURE__ */ f("span", { children: e }), c && /* @__PURE__ */ f("span", {
|
|
2741
2964
|
className: "text-eds-red-main",
|
|
2742
2965
|
"aria-hidden": "true",
|
|
2743
2966
|
children: "*"
|
|
2744
2967
|
})]
|
|
2745
2968
|
}),
|
|
2746
|
-
/* @__PURE__ */ f(
|
|
2747
|
-
className:
|
|
2748
|
-
placeholder:
|
|
2969
|
+
/* @__PURE__ */ f(j.Value, {
|
|
2970
|
+
className: N("box-border min-w-0 flex-1 truncate text-left font-inherit text-eds-neutral-main", O.text),
|
|
2971
|
+
placeholder: o
|
|
2749
2972
|
}),
|
|
2750
|
-
/* @__PURE__ */ f(
|
|
2751
|
-
className:
|
|
2973
|
+
/* @__PURE__ */ f(j.Icon, {
|
|
2974
|
+
className: N("inline-flex shrink-0 items-center justify-center rounded-md text-eds-neutral-elements", O.icon),
|
|
2752
2975
|
"aria-hidden": !0,
|
|
2753
2976
|
children: /* @__PURE__ */ f(r, {
|
|
2754
2977
|
className: "size-4 shrink-0",
|
|
@@ -2756,43 +2979,43 @@ function xn({ label: e = "Label", floatingLabel: t = !0, items: i, placeholder:
|
|
|
2756
2979
|
})
|
|
2757
2980
|
})
|
|
2758
2981
|
]
|
|
2759
|
-
}), /* @__PURE__ */ f(
|
|
2760
|
-
className:
|
|
2982
|
+
}), /* @__PURE__ */ f(j.Portal, { children: /* @__PURE__ */ f(j.Positioner, {
|
|
2983
|
+
className: Xt,
|
|
2761
2984
|
sideOffset: 4,
|
|
2762
|
-
children: /* @__PURE__ */ f(
|
|
2763
|
-
className:
|
|
2764
|
-
children: /* @__PURE__ */ f(
|
|
2765
|
-
className:
|
|
2766
|
-
children:
|
|
2985
|
+
children: /* @__PURE__ */ f(j.Popup, {
|
|
2986
|
+
className: Kt,
|
|
2987
|
+
children: /* @__PURE__ */ f(j.List, {
|
|
2988
|
+
className: qt,
|
|
2989
|
+
children: a.map((e) => /* @__PURE__ */ p(j.Item, {
|
|
2767
2990
|
value: e,
|
|
2768
|
-
className:
|
|
2769
|
-
children: [/* @__PURE__ */ f(
|
|
2770
|
-
className:
|
|
2991
|
+
className: Jt,
|
|
2992
|
+
children: [/* @__PURE__ */ f(j.ItemIndicator, {
|
|
2993
|
+
className: Yt,
|
|
2771
2994
|
children: /* @__PURE__ */ f(n, {
|
|
2772
2995
|
size: 14,
|
|
2773
2996
|
"aria-hidden": !0
|
|
2774
2997
|
})
|
|
2775
|
-
}), /* @__PURE__ */ f(
|
|
2998
|
+
}), /* @__PURE__ */ f(j.ItemText, {
|
|
2776
2999
|
className: "block min-w-0 flex-1 text-left",
|
|
2777
|
-
children:
|
|
3000
|
+
children: S ? S(e) : e.label
|
|
2778
3001
|
})]
|
|
2779
3002
|
}, e.value))
|
|
2780
3003
|
})
|
|
2781
3004
|
})
|
|
2782
3005
|
}) })]
|
|
2783
3006
|
}),
|
|
2784
|
-
|
|
2785
|
-
id: `${
|
|
3007
|
+
D && /* @__PURE__ */ f("div", {
|
|
3008
|
+
id: `${T}-desc`,
|
|
2786
3009
|
className: "text-xs text-eds-neutral-elements data-[state=invalid]:text-eds-red-main",
|
|
2787
|
-
"data-state":
|
|
2788
|
-
children:
|
|
3010
|
+
"data-state": E ? "invalid" : u,
|
|
3011
|
+
children: E ? h : m
|
|
2789
3012
|
})
|
|
2790
3013
|
]
|
|
2791
3014
|
});
|
|
2792
3015
|
}
|
|
2793
3016
|
//#endregion
|
|
2794
3017
|
//#region src/components/Text/Text.tsx
|
|
2795
|
-
var
|
|
3018
|
+
var qn = {
|
|
2796
3019
|
variant: {
|
|
2797
3020
|
heading1: {
|
|
2798
3021
|
classes: "text-3xl font-semibold",
|
|
@@ -2849,29 +3072,29 @@ var Sn = {
|
|
|
2849
3072
|
description: "Large text"
|
|
2850
3073
|
}
|
|
2851
3074
|
}
|
|
2852
|
-
},
|
|
3075
|
+
}, Jn = {
|
|
2853
3076
|
variant: "body",
|
|
2854
3077
|
size: "md"
|
|
2855
|
-
},
|
|
3078
|
+
}, Yn = /* @__PURE__ */ new Set([
|
|
2856
3079
|
"heading1",
|
|
2857
3080
|
"heading2",
|
|
2858
3081
|
"heading3"
|
|
2859
|
-
]),
|
|
2860
|
-
function
|
|
2861
|
-
let l =
|
|
3082
|
+
]), Xn = /* @__PURE__ */ new Set(["mono", "mono-secondary"]);
|
|
3083
|
+
function Zn({ variant: e = "body", bold: t = !1, size: n = "md", truncate: r = !1, children: i, className: a, as: o, ...s }, c) {
|
|
3084
|
+
let l = Xn.has(e), u = Yn.has(e), d = y(() => o || (l || u ? "span" : "p"), [
|
|
2862
3085
|
o,
|
|
2863
3086
|
l,
|
|
2864
3087
|
u
|
|
2865
|
-
]), p =
|
|
3088
|
+
]), p = P(qn.variant, e, Jn.variant), m = P(qn.size, n ?? "md", Jn.size);
|
|
2866
3089
|
return /* @__PURE__ */ f(d, {
|
|
2867
3090
|
ref: c,
|
|
2868
3091
|
"data-eds-component": "Text",
|
|
2869
|
-
className:
|
|
3092
|
+
className: N(p.classes, !u && m.classes, !u && t && "font-medium", r && "min-w-0 truncate", a),
|
|
2870
3093
|
...s,
|
|
2871
3094
|
children: i
|
|
2872
3095
|
});
|
|
2873
3096
|
}
|
|
2874
|
-
var
|
|
3097
|
+
var Qn = h(Zn), $n = {
|
|
2875
3098
|
layout: {
|
|
2876
3099
|
auto: {
|
|
2877
3100
|
classes: "",
|
|
@@ -2902,16 +3125,16 @@ var Dn = h(En), On = {
|
|
|
2902
3125
|
description: "Pin column to the right edge of the scroll container"
|
|
2903
3126
|
}
|
|
2904
3127
|
}
|
|
2905
|
-
},
|
|
2906
|
-
let n =
|
|
2907
|
-
return t === "cell" ?
|
|
2908
|
-
},
|
|
3128
|
+
}, er = (e, t) => {
|
|
3129
|
+
let n = P($n.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";
|
|
3130
|
+
return t === "cell" ? N(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") : N(n, r, "bg-white group-data-[compact]/header:bg-eds-neutral-background", a, i, e === "right" ? "before:bg-gradient-to-r before:from-transparent before:to-white group-data-[compact]/header:before:to-eds-neutral-background" : "before:bg-gradient-to-l before:from-transparent before:to-white group-data-[compact]/header:before:to-eds-neutral-background");
|
|
3131
|
+
}, tr = {
|
|
2909
3132
|
layout: "auto",
|
|
2910
3133
|
variant: "default"
|
|
2911
|
-
},
|
|
2912
|
-
let a =
|
|
3134
|
+
}, nr = h(({ layout: e = "auto", className: t, containerClassName: n, ...r }, i) => {
|
|
3135
|
+
let a = N("isolate w-full", P($n.layout, e, tr.layout).classes, "[&_td]:border-b [&_td]:border-eds-neutral-disabled [&_tr:last-child_td]:border-b-0", "[&_td]:p-3", "[&_th]:border-b [&_th]:border-eds-neutral-disabled [&_th]:p-3 [&_th]:font-semibold [&_th]:text-base", "[&_th]:bg-white", "text-base text-left text-eds-neutral-main", t);
|
|
2913
3136
|
return /* @__PURE__ */ f("div", {
|
|
2914
|
-
className:
|
|
3137
|
+
className: N("w-full overflow-x-auto rounded-eds-xs border border-eds-outline-border bg-white", n),
|
|
2915
3138
|
children: /* @__PURE__ */ f("table", {
|
|
2916
3139
|
ref: i,
|
|
2917
3140
|
"data-eds-component": "Table",
|
|
@@ -2919,53 +3142,53 @@ var Dn = h(En), On = {
|
|
|
2919
3142
|
className: a
|
|
2920
3143
|
})
|
|
2921
3144
|
});
|
|
2922
|
-
}),
|
|
2923
|
-
let i = e === "compact", a =
|
|
3145
|
+
}), rr = h(({ variant: e = "default", sticky: t, ...n }, r) => {
|
|
3146
|
+
let i = e === "compact", a = N("group/header", i && "[&_th]:bg-eds-neutral-background [&_th]:py-2 text-xs text-eds-neutral-elements", t && "[&_th]:sticky [&_th]:top-0 [&_th]:z-1", n.className);
|
|
2924
3147
|
return /* @__PURE__ */ f("thead", {
|
|
2925
3148
|
ref: r,
|
|
2926
3149
|
...n,
|
|
2927
3150
|
className: a,
|
|
2928
3151
|
...i && { "data-compact": "" }
|
|
2929
3152
|
});
|
|
2930
|
-
}),
|
|
2931
|
-
let r =
|
|
3153
|
+
}), ir = h(({ sticky: e, ...t }, n) => {
|
|
3154
|
+
let r = N("group relative", e && er(e, "head"), t.className);
|
|
2932
3155
|
return /* @__PURE__ */ f("th", {
|
|
2933
3156
|
ref: n,
|
|
2934
3157
|
...t,
|
|
2935
3158
|
className: r
|
|
2936
3159
|
});
|
|
2937
|
-
}),
|
|
2938
|
-
let r =
|
|
3160
|
+
}), ar = h(({ variant: e = tr.variant, ...t }, n) => {
|
|
3161
|
+
let r = N(P($n.variant, e, tr.variant).classes, t.className);
|
|
2939
3162
|
return /* @__PURE__ */ f("tr", {
|
|
2940
3163
|
ref: n,
|
|
2941
3164
|
...t,
|
|
2942
3165
|
className: r
|
|
2943
3166
|
});
|
|
2944
|
-
}),
|
|
3167
|
+
}), or = h((e, t) => /* @__PURE__ */ f("tbody", {
|
|
2945
3168
|
ref: t,
|
|
2946
3169
|
...e
|
|
2947
|
-
})),
|
|
2948
|
-
let r =
|
|
3170
|
+
})), sr = h(({ sticky: e, ...t }, n) => {
|
|
3171
|
+
let r = N(e && er(e, "cell"), t.className);
|
|
2949
3172
|
return /* @__PURE__ */ f("td", {
|
|
2950
3173
|
ref: n,
|
|
2951
3174
|
...t,
|
|
2952
3175
|
className: r
|
|
2953
3176
|
});
|
|
2954
|
-
}),
|
|
3177
|
+
}), cr = h((e, t) => /* @__PURE__ */ f("tfoot", {
|
|
2955
3178
|
ref: t,
|
|
2956
3179
|
...e
|
|
2957
|
-
})),
|
|
3180
|
+
})), lr = h((e, t) => /* @__PURE__ */ f("button", {
|
|
2958
3181
|
ref: t,
|
|
2959
3182
|
...e,
|
|
2960
3183
|
type: "button",
|
|
2961
3184
|
"aria-label": "Redimensionar coluna",
|
|
2962
|
-
className:
|
|
3185
|
+
className: N("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),
|
|
2963
3186
|
children: /* @__PURE__ */ f("span", { className: "h-5 w-[2px] rounded bg-eds-neutral-disabled" })
|
|
2964
|
-
})),
|
|
3187
|
+
})), ur = h(({ checked: e, indeterminate: t, onCheckedChange: n, label: r, disabled: i, ...a }, o) => /* @__PURE__ */ f(sr, {
|
|
2965
3188
|
ref: o,
|
|
2966
3189
|
...a,
|
|
2967
|
-
className:
|
|
2968
|
-
children: /* @__PURE__ */ f(
|
|
3190
|
+
className: N("w-10 leading-none", a.className),
|
|
3191
|
+
children: /* @__PURE__ */ f(Vt, {
|
|
2969
3192
|
checked: e,
|
|
2970
3193
|
indeterminate: t,
|
|
2971
3194
|
onCheckedChange: n,
|
|
@@ -2973,11 +3196,11 @@ var Dn = h(En), On = {
|
|
|
2973
3196
|
disabled: i,
|
|
2974
3197
|
className: "relative before:absolute before:-inset-3 before:content-['']"
|
|
2975
3198
|
})
|
|
2976
|
-
})),
|
|
3199
|
+
})), dr = h(({ checked: e, indeterminate: t, onCheckedChange: n, label: r, disabled: i, ...a }, o) => /* @__PURE__ */ f(ir, {
|
|
2977
3200
|
ref: o,
|
|
2978
3201
|
...a,
|
|
2979
|
-
className:
|
|
2980
|
-
children: /* @__PURE__ */ f(
|
|
3202
|
+
className: N("w-10 leading-none", a.className),
|
|
3203
|
+
children: /* @__PURE__ */ f(Vt, {
|
|
2981
3204
|
checked: e,
|
|
2982
3205
|
indeterminate: t,
|
|
2983
3206
|
onCheckedChange: n,
|
|
@@ -2986,42 +3209,42 @@ var Dn = h(En), On = {
|
|
|
2986
3209
|
className: "relative before:absolute before:-inset-3 before:content-['']"
|
|
2987
3210
|
})
|
|
2988
3211
|
}));
|
|
2989
|
-
|
|
2990
|
-
var
|
|
2991
|
-
Header:
|
|
2992
|
-
Head:
|
|
2993
|
-
Row:
|
|
2994
|
-
Body:
|
|
2995
|
-
Cell:
|
|
2996
|
-
CheckCell:
|
|
2997
|
-
CheckHead:
|
|
2998
|
-
Footer:
|
|
2999
|
-
ResizeHandle:
|
|
3000
|
-
}),
|
|
3212
|
+
nr.displayName = "Table", or.displayName = "Table.Body", ir.displayName = "Table.Head", ar.displayName = "Table.Row", sr.displayName = "Table.Cell", cr.displayName = "Table.Footer", rr.displayName = "Table.Header", lr.displayName = "Table.ResizeHandle", ur.displayName = "Table.CheckCell", dr.displayName = "Table.CheckHead";
|
|
3213
|
+
var fr = Object.assign(nr, {
|
|
3214
|
+
Header: rr,
|
|
3215
|
+
Head: ir,
|
|
3216
|
+
Row: ar,
|
|
3217
|
+
Body: or,
|
|
3218
|
+
Cell: sr,
|
|
3219
|
+
CheckCell: ur,
|
|
3220
|
+
CheckHead: dr,
|
|
3221
|
+
Footer: cr,
|
|
3222
|
+
ResizeHandle: lr
|
|
3223
|
+
}), pr = {
|
|
3001
3224
|
variant: "segmented",
|
|
3002
3225
|
size: "md"
|
|
3003
3226
|
};
|
|
3004
|
-
function
|
|
3005
|
-
let u = e ?? [], d = c === "segmented", m = c === "underline", h = l === "sm", { ref: g, isOverflowing: _ } =
|
|
3227
|
+
function mr({ tabs: e, value: t, selectedValue: n, onValueChange: r, activateOnFocus: i, className: a, listClassName: o, indicatorClassName: s, variant: c = pr.variant, size: l = pr.size }) {
|
|
3228
|
+
let u = e ?? [], d = c === "segmented", m = c === "underline", h = l === "sm", { ref: g, isOverflowing: _ } = gr(d), v = hr(g, _);
|
|
3006
3229
|
if (u.length === 0) return null;
|
|
3007
3230
|
let y = u[0]?.value, b = t !== void 0, x = {
|
|
3008
3231
|
value: b ? t : void 0,
|
|
3009
3232
|
defaultValue: b ? void 0 : n ?? y
|
|
3010
3233
|
};
|
|
3011
|
-
return /* @__PURE__ */ p(
|
|
3234
|
+
return /* @__PURE__ */ p(M.Root, {
|
|
3012
3235
|
...x,
|
|
3013
3236
|
"data-eds-component": "Tabs",
|
|
3014
|
-
className:
|
|
3237
|
+
className: N("relative isolate min-w-0 font-medium", d && (h ? "rounded-md" : "rounded-lg") + " ring ring-eds-outline-border", a),
|
|
3015
3238
|
onValueChange: (e) => {
|
|
3016
3239
|
r?.(String(e));
|
|
3017
3240
|
},
|
|
3018
|
-
children: [d && /* @__PURE__ */ f("div", { className:
|
|
3241
|
+
children: [d && /* @__PURE__ */ f("div", { className: N("absolute inset-x-0 top-1/2 z-0 -translate-y-1/2 rounded-lg bg-eds-neutral-background", h ? "h-6.5" : "h-9") }), /* @__PURE__ */ p(M.List, {
|
|
3019
3242
|
ref: g,
|
|
3020
3243
|
activateOnFocus: i,
|
|
3021
3244
|
"data-overflowing": _ ? "" : void 0,
|
|
3022
3245
|
...v(),
|
|
3023
|
-
className:
|
|
3024
|
-
children: [u.map((e) => /* @__PURE__ */ f(
|
|
3246
|
+
className: N("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 && _ && "[mask-image:linear-gradient(to_right,transparent,black_var(--scroll-fade-width),black_calc(100%-var(--scroll-fade-width)),transparent)]", d && (h ? "h-6.5 rounded-md" : "h-9"), _ && "cursor-grab active:cursor-grabbing", m && "gap-4 border-b border-eds-outline-border pb-2", m && (h ? "h-6.5" : "h-7.5"), o),
|
|
3247
|
+
children: [u.map((e) => /* @__PURE__ */ f(M.Tab, {
|
|
3025
3248
|
value: e.value,
|
|
3026
3249
|
render: e.render,
|
|
3027
3250
|
onClick: (e) => {
|
|
@@ -3031,16 +3254,16 @@ function Un({ tabs: e, value: t, selectedValue: n, onValueChange: r, activateOnF
|
|
|
3031
3254
|
inline: "nearest"
|
|
3032
3255
|
});
|
|
3033
3256
|
},
|
|
3034
|
-
className:
|
|
3257
|
+
className: N("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", _ ? "cursor-grab active:cursor-grabbing" : "cursor-pointer", h ? "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 && (h ? "px-2 rounded-sm" : "px-2.5 rounded-md"), m && "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", m && (h ? "px-1.5 py-2.5" : "px-2 py-3"), e.className),
|
|
3035
3258
|
children: e.label
|
|
3036
|
-
}, e.value)), /* @__PURE__ */ f(
|
|
3259
|
+
}, e.value)), /* @__PURE__ */ f(M.Indicator, { render: (e) => /* @__PURE__ */ f("div", {
|
|
3037
3260
|
...e,
|
|
3038
|
-
className:
|
|
3261
|
+
className: N("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 && N("top-(--active-tab-top) h-(--active-tab-height) bg-white shadow-sm ring ring-eds-outline-border", h ? "rounded" : "rounded-md"), m && "bottom-0 h-0.5 bg-eds-blue-main", s)
|
|
3039
3262
|
}) })]
|
|
3040
3263
|
})]
|
|
3041
3264
|
});
|
|
3042
3265
|
}
|
|
3043
|
-
function
|
|
3266
|
+
function hr(e, t) {
|
|
3044
3267
|
let n = b(null), r = b(!1);
|
|
3045
3268
|
return () => ({
|
|
3046
3269
|
onPointerDownCapture: (i) => {
|
|
@@ -3077,7 +3300,7 @@ function Wn(e, t) {
|
|
|
3077
3300
|
}
|
|
3078
3301
|
});
|
|
3079
3302
|
}
|
|
3080
|
-
function
|
|
3303
|
+
function gr(e) {
|
|
3081
3304
|
let t = b(null), [n, r] = x(!1);
|
|
3082
3305
|
return _(() => {
|
|
3083
3306
|
if (!e) return;
|
|
@@ -3091,4 +3314,4 @@ function Gn(e) {
|
|
|
3091
3314
|
};
|
|
3092
3315
|
}
|
|
3093
3316
|
//#endregion
|
|
3094
|
-
export {
|
|
3317
|
+
export { Rt as Attachment, Ft as AttachmentAction, Pt as AttachmentActions, jt as AttachmentContent, Nt as AttachmentDescription, Lt as AttachmentGroup, At as AttachmentMedia, Mt as AttachmentTitle, It as AttachmentTrigger, te as Button, ne as COLORS, vt as Calendar, Et as Card, Vt as Checkbox, tn as Combobox, cn as DatePicker, xn as Dialog, Mn as Empty, kn as FormDialog, ht as IconButton, Un as Input, Kn as Select, fr as Table, mr as Tabs, Qn as Text };
|