@ishtar-sink/vega 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -6
- package/dist/app-shell/app-shell.constants.d.ts +13 -0
- package/dist/app-shell/app-shell.d.ts +6 -0
- package/dist/app-shell/app-shell.types.d.ts +20 -0
- package/dist/app-shell/bottom-nav.d.ts +3 -0
- package/dist/app-shell/bottom-nav.types.d.ts +12 -0
- package/dist/app-shell/nav-link.d.ts +11 -0
- package/dist/app-shell/nav.types.d.ts +22 -0
- package/dist/app-shell/sidebar.d.ts +3 -0
- package/dist/app-shell/sidebar.types.d.ts +22 -0
- package/dist/app-shell/topbar.d.ts +3 -0
- package/dist/app-shell/topbar.types.d.ts +9 -0
- package/dist/app-shell/use-focus-trap.d.ts +6 -0
- package/dist/app-shell/use-media-query.d.ts +2 -0
- package/dist/bottom-sheet/bottom-sheet.constants.d.ts +3 -0
- package/dist/bottom-sheet/bottom-sheet.d.ts +3 -0
- package/dist/bottom-sheet/bottom-sheet.types.d.ts +26 -0
- package/dist/bottom-sheet/use-bottom-sheet.d.ts +14 -0
- package/dist/button/button.d.ts +5 -1
- package/dist/callout/callout.constants.d.ts +4 -0
- package/dist/callout/callout.d.ts +3 -0
- package/dist/callout/callout.types.d.ts +14 -0
- package/dist/card-link/card-button.d.ts +3 -0
- package/dist/card-link/card-link.d.ts +3 -0
- package/dist/card-link/card-link.types.d.ts +10 -0
- package/dist/disclosure/accordion-context.d.ts +5 -0
- package/dist/disclosure/accordion.d.ts +3 -0
- package/dist/disclosure/disclosure.d.ts +3 -0
- package/dist/disclosure/disclosure.types.d.ts +24 -0
- package/dist/disclosure/use-disclosure.d.ts +22 -0
- package/dist/focus-header/focus-header.constants.d.ts +2 -0
- package/dist/focus-header/focus-header.d.ts +3 -0
- package/dist/focus-header/focus-header.types.d.ts +24 -0
- package/dist/icons/icon.d.ts +10 -0
- package/dist/icons/icon.types.d.ts +5 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/interface-icons.d.ts +144 -0
- package/dist/index.d.ts +29 -2
- package/dist/index.js +1813 -948
- package/dist/progress-bar/progress-bar.d.ts +5 -1
- package/dist/prose/index.d.ts +2 -0
- package/dist/prose/prose.constants.d.ts +2 -0
- package/dist/prose/prose.d.ts +2 -0
- package/dist/prose/prose.types.d.ts +23 -0
- package/dist/prose/prose.utils.d.ts +4 -0
- package/dist/prose.js +91 -0
- package/dist/radio-group/radio-group.constants.d.ts +4 -0
- package/dist/radio-group/radio-group.d.ts +2 -0
- package/dist/radio-group/radio-group.types.d.ts +41 -0
- package/dist/radio-group/radio-option.d.ts +12 -0
- package/dist/style.css +1 -1
- package/dist/switch/switch.d.ts +3 -0
- package/dist/switch/switch.types.d.ts +11 -0
- package/dist/text-area-field/text-area-field.d.ts +2 -0
- package/dist/text-area-field/text-area-field.types.d.ts +17 -0
- package/dist/text-area-field/use-auto-resize.d.ts +7 -0
- package/package.json +15 -2
package/dist/index.js
CHANGED
|
@@ -1,53 +1,58 @@
|
|
|
1
1
|
import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import { createContext as r, useCallback as i, useContext as a, useEffect as o, useId as s, useImperativeHandle as c, useLayoutEffect as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
3
|
+
import { ArrowLeft as p, BookOpen as m, Calendar as h, Check as g, ChevronDown as _, ChevronLeft as v, ChevronRight as y, CircleAlert as b, CircleCheck as x, Clock as S, CloudCheck as C, Download as w, Eye as T, Flag as E, House as D, Info as O, Layers as k, Lightbulb as A, LogOut as j, Menu as M, Minus as N, Moon as P, Pencil as F, Plus as ee, RefreshCw as I, Search as L, Settings as R, Sun as z, Timer as B, Trash2 as te, TriangleAlert as ne, Upload as re, User as ie, Users as V, WifiOff as ae, X as oe } from "lucide-react";
|
|
4
|
+
var se = {
|
|
5
|
+
root: "_root_18cad_1",
|
|
6
|
+
lg: "_lg_18cad_21",
|
|
7
|
+
block: "_block_18cad_27",
|
|
8
|
+
primary: "_primary_18cad_48",
|
|
9
|
+
secondary: "_secondary_18cad_62",
|
|
10
|
+
ghost: "_ghost_18cad_66",
|
|
11
|
+
muted: "_muted_18cad_81",
|
|
12
|
+
tinted: "_tinted_18cad_93",
|
|
13
|
+
success: "_success_18cad_109",
|
|
14
|
+
spinner: "_spinner_18cad_130",
|
|
15
|
+
buttonSpin: "_button-spin_18cad_1"
|
|
13
16
|
};
|
|
14
17
|
// src/button/button.tsx
|
|
15
|
-
function
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
function H({ variant: e = "secondary", loading: r = !1, tint: i, size: a = "md", block: o = !1, type: s = "button", disabled: c, className: l, style: u, children: d, ...f }) {
|
|
19
|
+
let p = c === !0 || r, m = e === "muted" && i !== void 0, h = [
|
|
20
|
+
se.root,
|
|
21
|
+
se[e],
|
|
22
|
+
m ? se.tinted : "",
|
|
23
|
+
a === "lg" ? se.lg : "",
|
|
24
|
+
o ? se.block : "",
|
|
25
|
+
l
|
|
21
26
|
].filter(Boolean).join(" ");
|
|
22
27
|
return /* @__PURE__ */ n("button", {
|
|
23
|
-
...
|
|
24
|
-
type:
|
|
25
|
-
className:
|
|
26
|
-
style:
|
|
27
|
-
...
|
|
28
|
+
...f,
|
|
29
|
+
type: s,
|
|
30
|
+
className: h,
|
|
31
|
+
style: m ? {
|
|
32
|
+
...u,
|
|
28
33
|
"--button-tint": i
|
|
29
|
-
} :
|
|
30
|
-
disabled:
|
|
31
|
-
"aria-disabled":
|
|
34
|
+
} : u,
|
|
35
|
+
disabled: p,
|
|
36
|
+
"aria-disabled": p || void 0,
|
|
32
37
|
"aria-busy": r || void 0,
|
|
33
38
|
children: [r ? /* @__PURE__ */ t("span", {
|
|
34
|
-
className:
|
|
39
|
+
className: se.spinner,
|
|
35
40
|
"aria-hidden": "true",
|
|
36
41
|
"data-button-spinner": ""
|
|
37
|
-
}) : null,
|
|
42
|
+
}) : null, d]
|
|
38
43
|
});
|
|
39
44
|
}
|
|
40
|
-
var
|
|
45
|
+
var ce = {
|
|
41
46
|
root: "_root_kpb9b_1",
|
|
42
47
|
secondary: "_secondary_kpb9b_32",
|
|
43
48
|
ghost: "_ghost_kpb9b_38",
|
|
44
49
|
icon: "_icon_kpb9b_42"
|
|
45
50
|
};
|
|
46
51
|
// src/icon-button/icon-button.tsx
|
|
47
|
-
function
|
|
52
|
+
function U({ icon: e, variant: n = "ghost", type: r = "button", className: i, ...a }) {
|
|
48
53
|
let o = [
|
|
49
|
-
|
|
50
|
-
|
|
54
|
+
ce.root,
|
|
55
|
+
ce[n],
|
|
51
56
|
i
|
|
52
57
|
].filter(Boolean).join(" ");
|
|
53
58
|
return /* @__PURE__ */ t("button", {
|
|
@@ -55,13 +60,13 @@ function p({ icon: e, variant: n = "ghost", type: r = "button", className: i, ..
|
|
|
55
60
|
type: r,
|
|
56
61
|
className: o,
|
|
57
62
|
children: /* @__PURE__ */ t("span", {
|
|
58
|
-
className:
|
|
63
|
+
className: ce.icon,
|
|
59
64
|
"aria-hidden": "true",
|
|
60
65
|
children: e
|
|
61
66
|
})
|
|
62
67
|
});
|
|
63
68
|
}
|
|
64
|
-
var
|
|
69
|
+
var W = {
|
|
65
70
|
root: "_root_1whtz_1",
|
|
66
71
|
trigger: "_trigger_1whtz_6",
|
|
67
72
|
menu: "_menu_1whtz_32",
|
|
@@ -73,31 +78,31 @@ var m = {
|
|
|
73
78
|
icon: "_icon_1whtz_92"
|
|
74
79
|
};
|
|
75
80
|
// src/menu-button/menu-button.tsx
|
|
76
|
-
function
|
|
77
|
-
let
|
|
78
|
-
|
|
79
|
-
let [
|
|
80
|
-
|
|
81
|
-
if (
|
|
82
|
-
|
|
81
|
+
function le({ label: r, menuLabel: i, trigger: a, items: u, placement: p = "bottom-end", className: m, menuClassName: h, triggerClassName: g, style: _, ref: v, ...y }) {
|
|
82
|
+
let b = s(), x = d(null), S = d(null), C = d(null);
|
|
83
|
+
c(v, () => x.current, []);
|
|
84
|
+
let [w, T] = f(!1), [E, D] = f(!1);
|
|
85
|
+
l(() => {
|
|
86
|
+
if (w) return p === "bottom-end" && (C.current?.getBoundingClientRect().left ?? 0) < 0 && D(!0), () => {
|
|
87
|
+
D(!1);
|
|
83
88
|
};
|
|
84
|
-
}, [
|
|
85
|
-
let
|
|
86
|
-
function
|
|
87
|
-
|
|
89
|
+
}, [w, p]);
|
|
90
|
+
let O = () => Array.from(C.current?.querySelectorAll("[role=\"menuitem\"]") ?? []);
|
|
91
|
+
function k(e) {
|
|
92
|
+
T(!1), e && S.current?.focus();
|
|
88
93
|
}
|
|
89
|
-
|
|
90
|
-
if (!
|
|
91
|
-
|
|
94
|
+
o(() => {
|
|
95
|
+
if (!w) return;
|
|
96
|
+
O()[0]?.focus();
|
|
92
97
|
let e = (e) => {
|
|
93
|
-
|
|
98
|
+
x.current?.contains(e.target) || T(!1);
|
|
94
99
|
};
|
|
95
100
|
return document.addEventListener("pointerdown", e, !0), () => {
|
|
96
101
|
document.removeEventListener("pointerdown", e, !0);
|
|
97
102
|
};
|
|
98
|
-
}, [
|
|
99
|
-
function
|
|
100
|
-
let t =
|
|
103
|
+
}, [w]);
|
|
104
|
+
function A(e) {
|
|
105
|
+
let t = O(), n = t.indexOf(document.activeElement);
|
|
101
106
|
switch (e.key) {
|
|
102
107
|
case "ArrowDown":
|
|
103
108
|
t[(n + 1) % t.length]?.focus();
|
|
@@ -112,71 +117,71 @@ function h({ label: s, menuLabel: u, trigger: d, items: f, placement: p = "botto
|
|
|
112
117
|
t[t.length - 1]?.focus();
|
|
113
118
|
break;
|
|
114
119
|
case "Escape":
|
|
115
|
-
e.preventDefault(), e.stopPropagation(),
|
|
120
|
+
e.preventDefault(), e.stopPropagation(), k(!0);
|
|
116
121
|
return;
|
|
117
122
|
case "Tab":
|
|
118
|
-
|
|
123
|
+
k(!1);
|
|
119
124
|
return;
|
|
120
125
|
default: return;
|
|
121
126
|
}
|
|
122
127
|
e.preventDefault();
|
|
123
128
|
}
|
|
124
|
-
function
|
|
125
|
-
|
|
129
|
+
function j(e) {
|
|
130
|
+
k(!0), e.onSelect?.();
|
|
126
131
|
}
|
|
127
132
|
return /* @__PURE__ */ n("div", {
|
|
128
|
-
...
|
|
129
|
-
className: [
|
|
130
|
-
style:
|
|
131
|
-
ref:
|
|
133
|
+
...y,
|
|
134
|
+
className: [W.root, m].filter(Boolean).join(" "),
|
|
135
|
+
style: _,
|
|
136
|
+
ref: x,
|
|
132
137
|
children: [/* @__PURE__ */ t("button", {
|
|
133
|
-
ref:
|
|
138
|
+
ref: S,
|
|
134
139
|
type: "button",
|
|
135
|
-
className:
|
|
136
|
-
"aria-label":
|
|
140
|
+
className: g ?? W.trigger,
|
|
141
|
+
"aria-label": r,
|
|
137
142
|
"aria-haspopup": "menu",
|
|
138
|
-
"aria-expanded":
|
|
139
|
-
"aria-controls":
|
|
143
|
+
"aria-expanded": w,
|
|
144
|
+
"aria-controls": w ? b : void 0,
|
|
140
145
|
onClick: () => {
|
|
141
|
-
|
|
146
|
+
T((e) => !e);
|
|
142
147
|
},
|
|
143
|
-
children:
|
|
144
|
-
}),
|
|
145
|
-
ref:
|
|
146
|
-
id:
|
|
148
|
+
children: a
|
|
149
|
+
}), w ? /* @__PURE__ */ t("div", {
|
|
150
|
+
ref: C,
|
|
151
|
+
id: b,
|
|
147
152
|
role: "menu",
|
|
148
153
|
tabIndex: -1,
|
|
149
|
-
"aria-label":
|
|
154
|
+
"aria-label": i ?? r,
|
|
150
155
|
className: [
|
|
151
|
-
|
|
152
|
-
p === "right-end" ?
|
|
153
|
-
|
|
154
|
-
|
|
156
|
+
W.menu,
|
|
157
|
+
p === "right-end" ? W.right : W.bottom,
|
|
158
|
+
E ? W.alignStart : "",
|
|
159
|
+
h
|
|
155
160
|
].filter(Boolean).join(" "),
|
|
156
|
-
onKeyDown:
|
|
157
|
-
children:
|
|
161
|
+
onKeyDown: A,
|
|
162
|
+
children: u.map((r) => {
|
|
158
163
|
let i = {
|
|
159
164
|
role: "menuitem",
|
|
160
165
|
tabIndex: -1,
|
|
161
|
-
className: [
|
|
166
|
+
className: [W.item, r.tone === "danger" ? W.danger : ""].filter(Boolean).join(" "),
|
|
162
167
|
...r.tone ? { "data-tone": r.tone } : {}
|
|
163
168
|
}, a = /* @__PURE__ */ n(e, { children: [r.icon ? /* @__PURE__ */ t("span", {
|
|
164
169
|
"aria-hidden": "true",
|
|
165
|
-
className:
|
|
170
|
+
className: W.icon,
|
|
166
171
|
children: r.icon
|
|
167
172
|
}) : null, /* @__PURE__ */ t("span", { children: r.label })] });
|
|
168
173
|
return r.href ? /* @__PURE__ */ t("a", {
|
|
169
174
|
...i,
|
|
170
175
|
href: r.href,
|
|
171
176
|
onClick: (e) => {
|
|
172
|
-
r.onSelect && !e.metaKey && !e.ctrlKey ? (e.preventDefault(),
|
|
177
|
+
r.onSelect && !e.metaKey && !e.ctrlKey ? (e.preventDefault(), j(r)) : T(!1);
|
|
173
178
|
},
|
|
174
179
|
children: a
|
|
175
180
|
}, r.id) : /* @__PURE__ */ t("button", {
|
|
176
181
|
type: "button",
|
|
177
182
|
...i,
|
|
178
183
|
onClick: () => {
|
|
179
|
-
|
|
184
|
+
j(r);
|
|
180
185
|
},
|
|
181
186
|
children: a
|
|
182
187
|
}, r.id);
|
|
@@ -184,7 +189,7 @@ function h({ label: s, menuLabel: u, trigger: d, items: f, placement: p = "botto
|
|
|
184
189
|
}) : null]
|
|
185
190
|
});
|
|
186
191
|
}
|
|
187
|
-
var
|
|
192
|
+
var ue = {
|
|
188
193
|
root: "_root_o7yxy_1",
|
|
189
194
|
label: "_label_o7yxy_8",
|
|
190
195
|
control: "_control_o7yxy_17",
|
|
@@ -192,43 +197,43 @@ var g = {
|
|
|
192
197
|
error: "_error_o7yxy_47"
|
|
193
198
|
};
|
|
194
199
|
// src/text-field/text-field.tsx
|
|
195
|
-
function
|
|
196
|
-
let f =
|
|
200
|
+
function de({ label: e, help: r, error: i, id: a, className: o, style: c, "aria-describedby": l, "aria-invalid": u, ...d }) {
|
|
201
|
+
let f = s(), p = a ?? f, m = `${p}-help`, h = `${p}-error`, g = [
|
|
197
202
|
l,
|
|
198
203
|
r ? m : null,
|
|
199
|
-
|
|
204
|
+
i ? h : null
|
|
200
205
|
].filter(Boolean).join(" ");
|
|
201
206
|
return /* @__PURE__ */ n("div", {
|
|
202
|
-
className:
|
|
207
|
+
className: ue.root,
|
|
203
208
|
children: [
|
|
204
209
|
/* @__PURE__ */ t("label", {
|
|
205
210
|
htmlFor: p,
|
|
206
|
-
className:
|
|
211
|
+
className: ue.label,
|
|
207
212
|
children: e
|
|
208
213
|
}),
|
|
209
214
|
/* @__PURE__ */ t("input", {
|
|
210
215
|
...d,
|
|
211
216
|
id: p,
|
|
212
|
-
className: [
|
|
217
|
+
className: [ue.control, o].filter(Boolean).join(" "),
|
|
213
218
|
style: c,
|
|
214
|
-
"aria-invalid":
|
|
215
|
-
"aria-describedby":
|
|
219
|
+
"aria-invalid": i ? !0 : u,
|
|
220
|
+
"aria-describedby": g || void 0
|
|
216
221
|
}),
|
|
217
222
|
r ? /* @__PURE__ */ t("p", {
|
|
218
223
|
id: m,
|
|
219
|
-
className:
|
|
224
|
+
className: ue.help,
|
|
220
225
|
children: r
|
|
221
226
|
}) : null,
|
|
222
|
-
|
|
227
|
+
i ? /* @__PURE__ */ t("p", {
|
|
223
228
|
id: h,
|
|
224
229
|
role: "alert",
|
|
225
|
-
className:
|
|
226
|
-
children:
|
|
230
|
+
className: ue.error,
|
|
231
|
+
children: i
|
|
227
232
|
}) : null
|
|
228
233
|
]
|
|
229
234
|
});
|
|
230
235
|
}
|
|
231
|
-
var
|
|
236
|
+
var G = {
|
|
232
237
|
root: "_root_17ncm_1",
|
|
233
238
|
label: "_label_17ncm_8",
|
|
234
239
|
wrap: "_wrap_17ncm_17",
|
|
@@ -244,7 +249,7 @@ var v = {
|
|
|
244
249
|
active: "_active_17ncm_126"
|
|
245
250
|
};
|
|
246
251
|
// src/select-field/select-field.tsx
|
|
247
|
-
function
|
|
252
|
+
function fe() {
|
|
248
253
|
return /* @__PURE__ */ t("svg", {
|
|
249
254
|
viewBox: "0 0 24 24",
|
|
250
255
|
width: "16",
|
|
@@ -259,200 +264,200 @@ function y() {
|
|
|
259
264
|
children: /* @__PURE__ */ t("path", { d: "m6 9 6 6 6-6" })
|
|
260
265
|
});
|
|
261
266
|
}
|
|
262
|
-
var
|
|
263
|
-
function
|
|
264
|
-
let
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
].filter(Boolean).join(" "),
|
|
267
|
+
var pe = 700, me = 250;
|
|
268
|
+
function he({ label: e, help: r, error: i, id: a, className: u, style: p, options: m, value: h, onChange: g, onBlur: _, placeholder: v, disabled: y, name: b, ref: x, "aria-describedby": S, "aria-invalid": C, ...w }) {
|
|
269
|
+
let T = s(), E = a ?? T, D = `${E}-label`, O = `${E}-value`, k = `${E}-list`, A = `${E}-help`, j = `${E}-error`, M = [
|
|
270
|
+
S,
|
|
271
|
+
r ? A : null,
|
|
272
|
+
i ? j : null
|
|
273
|
+
].filter(Boolean).join(" "), N = d(null), P = d(null), F = d(null), ee = d(0), I = d({
|
|
269
274
|
text: "",
|
|
270
275
|
at: 0
|
|
271
|
-
}), [
|
|
272
|
-
|
|
273
|
-
let
|
|
274
|
-
function
|
|
275
|
-
|
|
276
|
+
}), [L, R] = f(!1), [z, B] = f(0), [te, ne] = f(!1);
|
|
277
|
+
c(x, () => P.current, []);
|
|
278
|
+
let re = m.find((e) => e.value === h);
|
|
279
|
+
function ie() {
|
|
280
|
+
y || (B(Math.max(0, m.findIndex((e) => e.value === h))), R(!0));
|
|
276
281
|
}
|
|
277
|
-
function
|
|
278
|
-
|
|
282
|
+
function V(e) {
|
|
283
|
+
R(!1), e && P.current?.focus();
|
|
279
284
|
}
|
|
280
|
-
function
|
|
285
|
+
function ae(e) {
|
|
281
286
|
let t = m[e];
|
|
282
|
-
t && t.value !== h && g(t.value),
|
|
287
|
+
t && t.value !== h && g(t.value), V(!0);
|
|
283
288
|
}
|
|
284
|
-
|
|
285
|
-
if (!
|
|
286
|
-
let e =
|
|
287
|
-
|
|
288
|
-
}, [
|
|
289
|
-
if (!
|
|
289
|
+
l(() => {
|
|
290
|
+
if (!L || !F.current || !N.current) return;
|
|
291
|
+
let e = N.current.getBoundingClientRect(), t = window.innerHeight - e.bottom;
|
|
292
|
+
ne(t < F.current.offsetHeight + 8 && e.top > t), ee.current = performance.now() + me, F.current.focus({ preventScroll: !0 });
|
|
293
|
+
}, [L]), o(() => {
|
|
294
|
+
if (!L) return;
|
|
290
295
|
let e = (e) => {
|
|
291
|
-
|
|
296
|
+
N.current?.contains(e.target) || V(!1);
|
|
292
297
|
}, t = (e) => {
|
|
293
|
-
performance.now() <
|
|
298
|
+
performance.now() < ee.current || F.current?.contains(e.target) || V(!1);
|
|
294
299
|
}, n = () => {
|
|
295
|
-
|
|
300
|
+
V(!1);
|
|
296
301
|
};
|
|
297
302
|
return document.addEventListener("pointerdown", e, !0), document.addEventListener("scroll", t, !0), window.addEventListener("resize", n), () => {
|
|
298
303
|
document.removeEventListener("pointerdown", e, !0), document.removeEventListener("scroll", t, !0), window.removeEventListener("resize", n);
|
|
299
304
|
};
|
|
300
|
-
}, [
|
|
301
|
-
|
|
305
|
+
}, [L]), o(() => {
|
|
306
|
+
L && (ee.current = performance.now() + me, document.getElementById(`${k}-${String(z)}`)?.scrollIntoView({ block: "nearest" }));
|
|
302
307
|
}, [
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
308
|
+
L,
|
|
309
|
+
z,
|
|
310
|
+
k
|
|
306
311
|
]);
|
|
307
|
-
function
|
|
308
|
-
["ArrowDown", "ArrowUp"].includes(e.key) && (e.preventDefault(),
|
|
312
|
+
function oe(e) {
|
|
313
|
+
["ArrowDown", "ArrowUp"].includes(e.key) && (e.preventDefault(), ie());
|
|
309
314
|
}
|
|
310
|
-
function
|
|
315
|
+
function se(e) {
|
|
311
316
|
let t = m.length - 1;
|
|
312
317
|
switch (e.key) {
|
|
313
318
|
case "ArrowDown":
|
|
314
|
-
|
|
319
|
+
B((e) => Math.min(t, e + 1));
|
|
315
320
|
break;
|
|
316
321
|
case "ArrowUp":
|
|
317
|
-
|
|
322
|
+
B((e) => Math.max(0, e - 1));
|
|
318
323
|
break;
|
|
319
324
|
case "Home":
|
|
320
|
-
|
|
325
|
+
B(0);
|
|
321
326
|
break;
|
|
322
327
|
case "End":
|
|
323
|
-
|
|
328
|
+
B(t);
|
|
324
329
|
break;
|
|
325
330
|
case "Enter":
|
|
326
331
|
case " ":
|
|
327
|
-
e.preventDefault(),
|
|
332
|
+
e.preventDefault(), ae(z);
|
|
328
333
|
return;
|
|
329
334
|
case "Escape":
|
|
330
|
-
e.preventDefault(), e.stopPropagation(),
|
|
335
|
+
e.preventDefault(), e.stopPropagation(), V(!0);
|
|
331
336
|
return;
|
|
332
337
|
case "Tab":
|
|
333
|
-
|
|
338
|
+
V(!1);
|
|
334
339
|
return;
|
|
335
340
|
default: {
|
|
336
341
|
if (e.key.length !== 1 || e.ctrlKey || e.metaKey) return;
|
|
337
|
-
let t = e.timeStamp, n = (t -
|
|
338
|
-
|
|
342
|
+
let t = e.timeStamp, n = (t - I.current.at < pe ? I.current.text : "") + e.key.toLowerCase();
|
|
343
|
+
I.current = {
|
|
339
344
|
text: n,
|
|
340
345
|
at: t
|
|
341
346
|
};
|
|
342
347
|
let r = m.findIndex((e) => e.label.toLowerCase().startsWith(n));
|
|
343
|
-
r >= 0 &&
|
|
348
|
+
r >= 0 && B(r);
|
|
344
349
|
}
|
|
345
350
|
}
|
|
346
351
|
e.preventDefault();
|
|
347
352
|
}
|
|
348
353
|
return /* @__PURE__ */ n("div", {
|
|
349
|
-
className:
|
|
350
|
-
ref:
|
|
354
|
+
className: G.root,
|
|
355
|
+
ref: N,
|
|
351
356
|
children: [
|
|
352
357
|
/* @__PURE__ */ t("label", {
|
|
353
|
-
id:
|
|
354
|
-
htmlFor:
|
|
355
|
-
className:
|
|
358
|
+
id: D,
|
|
359
|
+
htmlFor: E,
|
|
360
|
+
className: G.label,
|
|
356
361
|
children: e
|
|
357
362
|
}),
|
|
358
363
|
/* @__PURE__ */ n("div", {
|
|
359
|
-
className:
|
|
364
|
+
className: G.wrap,
|
|
360
365
|
children: [/* @__PURE__ */ n("button", {
|
|
361
|
-
...
|
|
362
|
-
ref:
|
|
366
|
+
...w,
|
|
367
|
+
ref: P,
|
|
363
368
|
type: "button",
|
|
364
|
-
id:
|
|
365
|
-
className: [
|
|
369
|
+
id: E,
|
|
370
|
+
className: [G.control, u].filter(Boolean).join(" "),
|
|
366
371
|
style: p,
|
|
367
372
|
"aria-haspopup": "listbox",
|
|
368
|
-
"aria-expanded":
|
|
369
|
-
"aria-controls":
|
|
370
|
-
"aria-labelledby": `${
|
|
371
|
-
"aria-invalid":
|
|
372
|
-
"aria-describedby":
|
|
373
|
-
disabled:
|
|
373
|
+
"aria-expanded": L,
|
|
374
|
+
"aria-controls": L ? k : void 0,
|
|
375
|
+
"aria-labelledby": `${D} ${O}`,
|
|
376
|
+
"aria-invalid": i ? !0 : C,
|
|
377
|
+
"aria-describedby": M || void 0,
|
|
378
|
+
disabled: y,
|
|
374
379
|
onClick: () => {
|
|
375
|
-
|
|
380
|
+
L ? V(!1) : ie();
|
|
376
381
|
},
|
|
377
|
-
onKeyDown:
|
|
382
|
+
onKeyDown: oe,
|
|
378
383
|
onBlur: () => {
|
|
379
|
-
|
|
384
|
+
L || _?.();
|
|
380
385
|
},
|
|
381
386
|
children: [/* @__PURE__ */ t("span", {
|
|
382
|
-
id:
|
|
383
|
-
className:
|
|
384
|
-
children:
|
|
387
|
+
id: O,
|
|
388
|
+
className: re ? G.value : G.placeholder,
|
|
389
|
+
children: re?.label ?? v ?? ""
|
|
385
390
|
}), /* @__PURE__ */ t("span", {
|
|
386
|
-
className: [
|
|
387
|
-
children: /* @__PURE__ */ t(
|
|
391
|
+
className: [G.chevron, L ? G.chevronOpen : ""].join(" "),
|
|
392
|
+
children: /* @__PURE__ */ t(fe, {})
|
|
388
393
|
})]
|
|
389
|
-
}),
|
|
390
|
-
ref:
|
|
391
|
-
id:
|
|
394
|
+
}), L ? /* @__PURE__ */ t("ul", {
|
|
395
|
+
ref: F,
|
|
396
|
+
id: k,
|
|
392
397
|
role: "listbox",
|
|
393
398
|
tabIndex: 0,
|
|
394
|
-
"aria-labelledby":
|
|
395
|
-
"aria-activedescendant": `${
|
|
396
|
-
className: [
|
|
397
|
-
onKeyDown:
|
|
399
|
+
"aria-labelledby": D,
|
|
400
|
+
"aria-activedescendant": `${k}-${String(z)}`,
|
|
401
|
+
className: [G.list, te ? G.above : ""].join(" "),
|
|
402
|
+
onKeyDown: se,
|
|
398
403
|
children: m.map((e, n) => /* @__PURE__ */ t("li", {
|
|
399
|
-
id: `${
|
|
404
|
+
id: `${k}-${String(n)}`,
|
|
400
405
|
role: "option",
|
|
401
406
|
"aria-selected": e.value === h,
|
|
402
|
-
className: [
|
|
407
|
+
className: [G.option, n === z ? G.active : ""].join(" "),
|
|
403
408
|
onMouseMove: () => {
|
|
404
|
-
n !==
|
|
409
|
+
n !== z && B(n);
|
|
405
410
|
},
|
|
406
411
|
onClick: () => {
|
|
407
|
-
|
|
412
|
+
ae(n);
|
|
408
413
|
},
|
|
409
414
|
children: e.label
|
|
410
415
|
}, e.value))
|
|
411
416
|
}) : null]
|
|
412
417
|
}),
|
|
413
|
-
|
|
418
|
+
b ? /* @__PURE__ */ t("input", {
|
|
414
419
|
type: "hidden",
|
|
415
|
-
name:
|
|
420
|
+
name: b,
|
|
416
421
|
value: h
|
|
417
422
|
}) : null,
|
|
418
|
-
|
|
419
|
-
id:
|
|
420
|
-
className:
|
|
421
|
-
children:
|
|
423
|
+
r ? /* @__PURE__ */ t("p", {
|
|
424
|
+
id: A,
|
|
425
|
+
className: G.help,
|
|
426
|
+
children: r
|
|
422
427
|
}) : null,
|
|
423
|
-
|
|
424
|
-
id:
|
|
428
|
+
i ? /* @__PURE__ */ t("p", {
|
|
429
|
+
id: j,
|
|
425
430
|
role: "alert",
|
|
426
|
-
className:
|
|
427
|
-
children:
|
|
431
|
+
className: G.error,
|
|
432
|
+
children: i
|
|
428
433
|
}) : null
|
|
429
434
|
]
|
|
430
435
|
});
|
|
431
436
|
}
|
|
432
|
-
var
|
|
437
|
+
var ge = {
|
|
433
438
|
root: "_root_114y1_1",
|
|
434
439
|
control: "_control_114y1_7",
|
|
435
440
|
label: "_label_114y1_20"
|
|
436
441
|
};
|
|
437
442
|
// src/checkbox/checkbox.tsx
|
|
438
|
-
function
|
|
439
|
-
let c =
|
|
443
|
+
function _e({ label: e, id: r, className: i, style: a, ...o }) {
|
|
444
|
+
let c = s(), l = r ?? c;
|
|
440
445
|
return /* @__PURE__ */ n("div", {
|
|
441
|
-
className:
|
|
446
|
+
className: ge.root,
|
|
442
447
|
children: [/* @__PURE__ */ t("input", {
|
|
443
|
-
...
|
|
448
|
+
...o,
|
|
444
449
|
id: l,
|
|
445
450
|
type: "checkbox",
|
|
446
|
-
className: [
|
|
447
|
-
style:
|
|
451
|
+
className: [ge.control, i].filter(Boolean).join(" "),
|
|
452
|
+
style: a
|
|
448
453
|
}), /* @__PURE__ */ t("label", {
|
|
449
454
|
htmlFor: l,
|
|
450
|
-
className:
|
|
455
|
+
className: ge.label,
|
|
451
456
|
children: e
|
|
452
457
|
})]
|
|
453
458
|
});
|
|
454
459
|
}
|
|
455
|
-
var
|
|
460
|
+
var ve = {
|
|
456
461
|
root: "_root_161y9_1",
|
|
457
462
|
legend: "_legend_161y9_11",
|
|
458
463
|
group: "_group_161y9_22",
|
|
@@ -463,59 +468,59 @@ var T = {
|
|
|
463
468
|
error: "_error_161y9_80"
|
|
464
469
|
};
|
|
465
470
|
// src/segmented-field/segmented-field.tsx
|
|
466
|
-
function
|
|
467
|
-
let h =
|
|
471
|
+
function ye({ label: e, options: r, value: i, onChange: a, onBlur: o, name: c, error: l, help: u, className: d, style: f, "aria-describedby": p, ...m }) {
|
|
472
|
+
let h = s(), g = c ?? h, _ = `${h}-help`, v = `${h}-error`, y = [
|
|
468
473
|
p,
|
|
469
474
|
u ? _ : null,
|
|
470
475
|
l ? v : null
|
|
471
476
|
].filter(Boolean).join(" ");
|
|
472
477
|
return /* @__PURE__ */ n("fieldset", {
|
|
473
478
|
...m,
|
|
474
|
-
className: [
|
|
479
|
+
className: [ve.root, d].filter(Boolean).join(" "),
|
|
475
480
|
style: f,
|
|
476
481
|
"aria-describedby": y || void 0,
|
|
477
482
|
children: [
|
|
478
483
|
/* @__PURE__ */ t("legend", {
|
|
479
|
-
className:
|
|
484
|
+
className: ve.legend,
|
|
480
485
|
children: e
|
|
481
486
|
}),
|
|
482
487
|
/* @__PURE__ */ t("div", {
|
|
483
488
|
role: "radiogroup",
|
|
484
489
|
"aria-label": e,
|
|
485
|
-
className:
|
|
490
|
+
className: ve.group,
|
|
486
491
|
children: r.map((e) => /* @__PURE__ */ n("label", {
|
|
487
|
-
className:
|
|
492
|
+
className: ve.segment,
|
|
488
493
|
children: [/* @__PURE__ */ t("input", {
|
|
489
494
|
type: "radio",
|
|
490
495
|
name: g,
|
|
491
496
|
value: e.value,
|
|
492
|
-
checked: e.value ===
|
|
493
|
-
className:
|
|
497
|
+
checked: e.value === i,
|
|
498
|
+
className: ve.input,
|
|
494
499
|
onChange: () => {
|
|
495
|
-
|
|
500
|
+
a(e.value);
|
|
496
501
|
},
|
|
497
|
-
onBlur:
|
|
502
|
+
onBlur: o
|
|
498
503
|
}), /* @__PURE__ */ t("span", {
|
|
499
|
-
className:
|
|
504
|
+
className: ve.text,
|
|
500
505
|
children: e.label
|
|
501
506
|
})]
|
|
502
507
|
}, e.value))
|
|
503
508
|
}),
|
|
504
509
|
u ? /* @__PURE__ */ t("p", {
|
|
505
510
|
id: _,
|
|
506
|
-
className:
|
|
511
|
+
className: ve.help,
|
|
507
512
|
children: u
|
|
508
513
|
}) : null,
|
|
509
514
|
l ? /* @__PURE__ */ t("p", {
|
|
510
515
|
id: v,
|
|
511
516
|
role: "alert",
|
|
512
|
-
className:
|
|
517
|
+
className: ve.error,
|
|
513
518
|
children: l
|
|
514
519
|
}) : null
|
|
515
520
|
]
|
|
516
521
|
});
|
|
517
522
|
}
|
|
518
|
-
var
|
|
523
|
+
var K = {
|
|
519
524
|
root: "_root_1m3wp_2",
|
|
520
525
|
label: "_label_1m3wp_9",
|
|
521
526
|
wrap: "_wrap_1m3wp_18",
|
|
@@ -533,11 +538,11 @@ var D = {
|
|
|
533
538
|
pills: "_pills_1m3wp_141",
|
|
534
539
|
pill: "_pill_1m3wp_141",
|
|
535
540
|
remove: "_remove_1m3wp_163"
|
|
536
|
-
},
|
|
537
|
-
function
|
|
541
|
+
}, be = "Nenhuma opção encontrada", xe = (e) => `Remover ${e}`;
|
|
542
|
+
function Se(e) {
|
|
538
543
|
return e.normalize("NFD").replace(/\p{Diacritic}/gu, "").toLowerCase().trim();
|
|
539
544
|
}
|
|
540
|
-
function
|
|
545
|
+
function Ce() {
|
|
541
546
|
return /* @__PURE__ */ t("svg", {
|
|
542
547
|
viewBox: "0 0 24 24",
|
|
543
548
|
width: "16",
|
|
@@ -552,7 +557,7 @@ function j() {
|
|
|
552
557
|
children: /* @__PURE__ */ t("path", { d: "m6 9 6 6 6-6" })
|
|
553
558
|
});
|
|
554
559
|
}
|
|
555
|
-
function
|
|
560
|
+
function we() {
|
|
556
561
|
return /* @__PURE__ */ t("svg", {
|
|
557
562
|
viewBox: "0 0 24 24",
|
|
558
563
|
width: "16",
|
|
@@ -567,177 +572,177 @@ function M() {
|
|
|
567
572
|
children: /* @__PURE__ */ t("path", { d: "m5 12 5 5 9-10" })
|
|
568
573
|
});
|
|
569
574
|
}
|
|
570
|
-
function
|
|
571
|
-
let { label:
|
|
575
|
+
function Te(e) {
|
|
576
|
+
let { label: r, options: i, emptyText: a = be, listLabel: u, removeLabel: p = xe, help: m, error: h, id: g, className: _, style: v, disabled: y, name: b, ref: x, "aria-describedby": S, "aria-invalid": C, multiple: w, onBlur: T, value: E, onChange: D, ...O } = e, k = w === !0, A = s(), j = g ?? A, M = `${j}-label`, N = `${j}-list`, P = `${j}-help`, F = `${j}-error`, ee = [
|
|
572
577
|
S,
|
|
573
|
-
m ?
|
|
574
|
-
h ?
|
|
575
|
-
].filter(Boolean).join(" "),
|
|
576
|
-
|
|
577
|
-
let
|
|
578
|
-
function ue() {
|
|
579
|
-
q(!1), te(!1), ne("");
|
|
580
|
-
}
|
|
578
|
+
m ? P : null,
|
|
579
|
+
h ? F : null
|
|
580
|
+
].filter(Boolean).join(" "), I = d(null), L = d(null), R = d(null), [z, B] = f(!1), [te, ne] = f(!1), [re, ie] = f(""), [V, ae] = f(0), [oe, se] = f(!1);
|
|
581
|
+
c(x, () => L.current, []);
|
|
582
|
+
let H = e.multiple ? e.value : e.value === null ? [] : [e.value], ce = e.multiple ? void 0 : i.find((t) => t.value === e.value), U = te ? i.filter((e) => Se(e.label).includes(Se(re))) : i, W = z && U.length > 0, le = W && U[V] ? `${N}-${String(V)}` : void 0, ue = te ? re : k ? "" : ce?.label ?? "";
|
|
581
583
|
function de() {
|
|
582
|
-
|
|
584
|
+
B(!1), ne(!1), ie("");
|
|
585
|
+
}
|
|
586
|
+
function G() {
|
|
587
|
+
y || (ae(0), B(!0));
|
|
583
588
|
}
|
|
584
589
|
function fe(t) {
|
|
585
590
|
if (e.multiple) {
|
|
586
591
|
let n = e.value.includes(t.value) ? e.value.filter((e) => e !== t.value) : [...e.value, t.value];
|
|
587
|
-
e.onChange(n),
|
|
588
|
-
} else t.value !== e.value && e.onChange(t.value),
|
|
592
|
+
e.onChange(n), ne(!1), ie(""), ae(Math.max(0, i.indexOf(t)));
|
|
593
|
+
} else t.value !== e.value && e.onChange(t.value), de();
|
|
589
594
|
}
|
|
590
595
|
function pe(t) {
|
|
591
|
-
e.multiple && (e.onChange(e.value.filter((e) => e !== t)),
|
|
596
|
+
e.multiple && (e.onChange(e.value.filter((e) => e !== t)), L.current?.focus());
|
|
592
597
|
}
|
|
593
|
-
|
|
594
|
-
if (!
|
|
595
|
-
let e =
|
|
596
|
-
|
|
598
|
+
l(() => {
|
|
599
|
+
if (!W || !R.current || !I.current) return;
|
|
600
|
+
let e = I.current.getBoundingClientRect(), t = window.innerHeight - e.bottom;
|
|
601
|
+
se(t < R.current.offsetHeight + 8 && e.top > t);
|
|
597
602
|
}, [
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
]),
|
|
602
|
-
if (!
|
|
603
|
+
z,
|
|
604
|
+
U.length,
|
|
605
|
+
W
|
|
606
|
+
]), o(() => {
|
|
607
|
+
if (!z) return;
|
|
603
608
|
let e = (e) => {
|
|
604
|
-
|
|
609
|
+
I.current?.contains(e.target) || de();
|
|
605
610
|
};
|
|
606
|
-
return document.addEventListener("pointerdown", e, !0), window.addEventListener("resize",
|
|
607
|
-
document.removeEventListener("pointerdown", e, !0), window.removeEventListener("resize",
|
|
611
|
+
return document.addEventListener("pointerdown", e, !0), window.addEventListener("resize", de), () => {
|
|
612
|
+
document.removeEventListener("pointerdown", e, !0), window.removeEventListener("resize", de);
|
|
608
613
|
};
|
|
609
|
-
}, [
|
|
610
|
-
|
|
614
|
+
}, [z]), o(() => {
|
|
615
|
+
z && document.getElementById(`${N}-${String(V)}`)?.scrollIntoView({ block: "nearest" });
|
|
611
616
|
}, [
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
617
|
+
z,
|
|
618
|
+
V,
|
|
619
|
+
N
|
|
615
620
|
]);
|
|
616
621
|
function me(e) {
|
|
617
|
-
|
|
622
|
+
ie(e.target.value), ne(!0), ae(0), B(!0);
|
|
618
623
|
}
|
|
619
624
|
function he(t) {
|
|
620
625
|
if (y) return;
|
|
621
|
-
if (!
|
|
622
|
-
t.key === "ArrowDown" || t.key === "ArrowUp" ? (t.preventDefault(),
|
|
626
|
+
if (!z) {
|
|
627
|
+
t.key === "ArrowDown" || t.key === "ArrowUp" ? (t.preventDefault(), G()) : t.key === "Backspace" && e.multiple && ue === "" && H.length > 0 ? e.onChange(e.value.slice(0, -1)) : t.key === "Enter" && t.preventDefault();
|
|
623
628
|
return;
|
|
624
629
|
}
|
|
625
|
-
let n =
|
|
630
|
+
let n = U.length - 1;
|
|
626
631
|
switch (t.key) {
|
|
627
632
|
case "ArrowDown":
|
|
628
|
-
t.preventDefault(),
|
|
633
|
+
t.preventDefault(), ae((e) => Math.min(n, e + 1));
|
|
629
634
|
break;
|
|
630
635
|
case "ArrowUp":
|
|
631
|
-
t.preventDefault(),
|
|
636
|
+
t.preventDefault(), ae((e) => Math.max(0, e - 1));
|
|
632
637
|
break;
|
|
633
638
|
case "Enter": {
|
|
634
639
|
t.preventDefault();
|
|
635
|
-
let e =
|
|
640
|
+
let e = U[V];
|
|
636
641
|
e && fe(e);
|
|
637
642
|
break;
|
|
638
643
|
}
|
|
639
644
|
case "Escape":
|
|
640
|
-
t.preventDefault(), t.stopPropagation(),
|
|
645
|
+
t.preventDefault(), t.stopPropagation(), de();
|
|
641
646
|
break;
|
|
642
647
|
case "Tab":
|
|
643
|
-
|
|
648
|
+
de();
|
|
644
649
|
break;
|
|
645
|
-
case "Backspace": e.multiple &&
|
|
650
|
+
case "Backspace": e.multiple && ue === "" && H.length > 0 && e.onChange(e.value.slice(0, -1));
|
|
646
651
|
}
|
|
647
652
|
}
|
|
648
|
-
let ge = [
|
|
653
|
+
let ge = [K.popup, oe ? K.above : ""].filter(Boolean).join(" ");
|
|
649
654
|
return /* @__PURE__ */ n("div", {
|
|
650
|
-
className:
|
|
651
|
-
ref:
|
|
655
|
+
className: K.root,
|
|
656
|
+
ref: I,
|
|
652
657
|
children: [
|
|
653
658
|
/* @__PURE__ */ t("label", {
|
|
654
|
-
id:
|
|
655
|
-
htmlFor:
|
|
656
|
-
className:
|
|
657
|
-
children:
|
|
659
|
+
id: M,
|
|
660
|
+
htmlFor: j,
|
|
661
|
+
className: K.label,
|
|
662
|
+
children: r
|
|
658
663
|
}),
|
|
659
664
|
/* @__PURE__ */ n("div", {
|
|
660
|
-
className:
|
|
665
|
+
className: K.wrap,
|
|
661
666
|
children: [
|
|
662
667
|
/* @__PURE__ */ t("input", {
|
|
663
668
|
autoComplete: "off",
|
|
664
|
-
...
|
|
665
|
-
ref:
|
|
666
|
-
id:
|
|
669
|
+
...O,
|
|
670
|
+
ref: L,
|
|
671
|
+
id: j,
|
|
667
672
|
type: "text",
|
|
668
673
|
role: "combobox",
|
|
669
|
-
className: [
|
|
674
|
+
className: [K.control, _].filter(Boolean).join(" "),
|
|
670
675
|
style: v,
|
|
671
676
|
"aria-autocomplete": "list",
|
|
672
|
-
"aria-expanded":
|
|
673
|
-
"aria-controls":
|
|
674
|
-
"aria-activedescendant":
|
|
677
|
+
"aria-expanded": W,
|
|
678
|
+
"aria-controls": W ? N : void 0,
|
|
679
|
+
"aria-activedescendant": le,
|
|
675
680
|
"aria-invalid": h ? !0 : C,
|
|
676
|
-
"aria-describedby":
|
|
681
|
+
"aria-describedby": ee || void 0,
|
|
677
682
|
disabled: y,
|
|
678
|
-
value:
|
|
683
|
+
value: ue,
|
|
679
684
|
onChange: me,
|
|
680
685
|
onClick: () => {
|
|
681
|
-
|
|
686
|
+
z || y || (G(), L.current?.select());
|
|
682
687
|
},
|
|
683
688
|
onKeyDown: he,
|
|
684
689
|
onBlur: () => {
|
|
685
|
-
|
|
690
|
+
z || T?.();
|
|
686
691
|
}
|
|
687
692
|
}),
|
|
688
693
|
/* @__PURE__ */ t("span", {
|
|
689
|
-
className:
|
|
690
|
-
children: /* @__PURE__ */ t(
|
|
694
|
+
className: K.chevron,
|
|
695
|
+
children: /* @__PURE__ */ t(Ce, {})
|
|
691
696
|
}),
|
|
692
|
-
|
|
693
|
-
ref:
|
|
697
|
+
z ? /* @__PURE__ */ t("div", {
|
|
698
|
+
ref: R,
|
|
694
699
|
className: ge,
|
|
695
|
-
children:
|
|
696
|
-
id:
|
|
700
|
+
children: W ? /* @__PURE__ */ t("ul", {
|
|
701
|
+
id: N,
|
|
697
702
|
role: "listbox",
|
|
698
|
-
"aria-labelledby":
|
|
699
|
-
"aria-multiselectable":
|
|
700
|
-
className:
|
|
701
|
-
children:
|
|
702
|
-
let i =
|
|
703
|
+
"aria-labelledby": M,
|
|
704
|
+
"aria-multiselectable": k ? !0 : void 0,
|
|
705
|
+
className: K.list,
|
|
706
|
+
children: U.map((e, r) => {
|
|
707
|
+
let i = H.includes(e.value);
|
|
703
708
|
return /* @__PURE__ */ n("li", {
|
|
704
|
-
id: `${
|
|
709
|
+
id: `${N}-${String(r)}`,
|
|
705
710
|
role: "option",
|
|
706
711
|
"aria-selected": i,
|
|
707
|
-
className: [
|
|
712
|
+
className: [K.option, r === V ? K.active : ""].filter(Boolean).join(" "),
|
|
708
713
|
onMouseDown: (e) => {
|
|
709
714
|
e.preventDefault();
|
|
710
715
|
},
|
|
711
716
|
onMouseMove: () => {
|
|
712
|
-
r !==
|
|
717
|
+
r !== V && ae(r);
|
|
713
718
|
},
|
|
714
719
|
onClick: () => {
|
|
715
720
|
fe(e);
|
|
716
721
|
},
|
|
717
|
-
children: [e.label,
|
|
718
|
-
className:
|
|
719
|
-
children: /* @__PURE__ */ t(
|
|
722
|
+
children: [e.label, k && i ? /* @__PURE__ */ t("span", {
|
|
723
|
+
className: K.check,
|
|
724
|
+
children: /* @__PURE__ */ t(we, {})
|
|
720
725
|
}) : null]
|
|
721
726
|
}, String(e.value));
|
|
722
727
|
})
|
|
723
728
|
}) : /* @__PURE__ */ t("p", {
|
|
724
729
|
role: "status",
|
|
725
|
-
className:
|
|
726
|
-
children:
|
|
730
|
+
className: K.empty,
|
|
731
|
+
children: a
|
|
727
732
|
})
|
|
728
733
|
}) : null
|
|
729
734
|
]
|
|
730
735
|
}),
|
|
731
736
|
e.multiple && e.value.length > 0 ? /* @__PURE__ */ t("ul", {
|
|
732
|
-
"aria-label":
|
|
733
|
-
className:
|
|
737
|
+
"aria-label": u ?? `${r} escolhidas`,
|
|
738
|
+
className: K.pills,
|
|
734
739
|
children: e.value.map((e) => {
|
|
735
|
-
let r =
|
|
740
|
+
let r = i.find((t) => t.value === e)?.label ?? String(e);
|
|
736
741
|
return /* @__PURE__ */ n("li", {
|
|
737
|
-
className:
|
|
742
|
+
className: K.pill,
|
|
738
743
|
children: [r, /* @__PURE__ */ t("button", {
|
|
739
744
|
type: "button",
|
|
740
|
-
className:
|
|
745
|
+
className: K.remove,
|
|
741
746
|
"aria-label": p(r),
|
|
742
747
|
disabled: y,
|
|
743
748
|
onClick: () => {
|
|
@@ -751,7 +756,7 @@ function N(e) {
|
|
|
751
756
|
}, String(e));
|
|
752
757
|
})
|
|
753
758
|
}) : null,
|
|
754
|
-
b ?
|
|
759
|
+
b ? H.map((e) => /* @__PURE__ */ t("input", {
|
|
755
760
|
type: "hidden",
|
|
756
761
|
name: b,
|
|
757
762
|
value: String(e)
|
|
@@ -762,20 +767,20 @@ function N(e) {
|
|
|
762
767
|
value: ""
|
|
763
768
|
}) : null,
|
|
764
769
|
m ? /* @__PURE__ */ t("p", {
|
|
765
|
-
id:
|
|
766
|
-
className:
|
|
770
|
+
id: P,
|
|
771
|
+
className: K.help,
|
|
767
772
|
children: m
|
|
768
773
|
}) : null,
|
|
769
774
|
h ? /* @__PURE__ */ t("p", {
|
|
770
|
-
id:
|
|
775
|
+
id: F,
|
|
771
776
|
role: "alert",
|
|
772
|
-
className:
|
|
777
|
+
className: K.error,
|
|
773
778
|
children: h
|
|
774
779
|
}) : null
|
|
775
780
|
]
|
|
776
781
|
});
|
|
777
782
|
}
|
|
778
|
-
var
|
|
783
|
+
var Ee = {
|
|
779
784
|
root: "_root_gtcmb_1",
|
|
780
785
|
label: "_label_gtcmb_8",
|
|
781
786
|
control: "_control_gtcmb_17",
|
|
@@ -784,27 +789,27 @@ var P = {
|
|
|
784
789
|
remove: "_remove_gtcmb_64",
|
|
785
790
|
help: "_help_gtcmb_86",
|
|
786
791
|
error: "_error_gtcmb_92"
|
|
787
|
-
},
|
|
788
|
-
function
|
|
789
|
-
let x =
|
|
792
|
+
}, De = (e) => `Remover ${e}`;
|
|
793
|
+
function Oe({ label: e, value: r, onChange: i, onBlur: a, listLabel: o, removeLabel: l = De, help: u, error: p, id: m, className: h, style: g, ref: _, "aria-describedby": v, "aria-invalid": y, ...b }) {
|
|
794
|
+
let x = s(), S = m ?? x, C = `${S}-help`, w = `${S}-error`, T = [
|
|
790
795
|
v,
|
|
791
|
-
|
|
796
|
+
u ? C : null,
|
|
792
797
|
p ? w : null
|
|
793
|
-
].filter(Boolean).join(" "), E =
|
|
794
|
-
|
|
798
|
+
].filter(Boolean).join(" "), E = d(null), [D, O] = f("");
|
|
799
|
+
c(_, () => E.current, []);
|
|
795
800
|
function k(e) {
|
|
796
801
|
let t = e.trim().replace(/^#+/, "").trim();
|
|
797
|
-
O(""), t && (r.some((e) => e.toLowerCase() === t.toLowerCase()) ||
|
|
802
|
+
O(""), t && (r.some((e) => e.toLowerCase() === t.toLowerCase()) || i([...r, t]));
|
|
798
803
|
}
|
|
799
804
|
function A(e) {
|
|
800
|
-
e.key === "Enter" || e.key === "," ? (e.preventDefault(), k(D)) : e.key === "Backspace" && D === "" && r.length > 0 &&
|
|
805
|
+
e.key === "Enter" || e.key === "," ? (e.preventDefault(), k(D)) : e.key === "Backspace" && D === "" && r.length > 0 && i(r.slice(0, -1));
|
|
801
806
|
}
|
|
802
807
|
return /* @__PURE__ */ n("div", {
|
|
803
|
-
className:
|
|
808
|
+
className: Ee.root,
|
|
804
809
|
children: [
|
|
805
810
|
/* @__PURE__ */ t("label", {
|
|
806
811
|
htmlFor: S,
|
|
807
|
-
className:
|
|
812
|
+
className: Ee.label,
|
|
808
813
|
children: e
|
|
809
814
|
}),
|
|
810
815
|
/* @__PURE__ */ t("input", {
|
|
@@ -813,7 +818,7 @@ function I({ label: e, value: r, onChange: o, onBlur: s, listLabel: u, removeLab
|
|
|
813
818
|
ref: E,
|
|
814
819
|
id: S,
|
|
815
820
|
type: "text",
|
|
816
|
-
className: [
|
|
821
|
+
className: [Ee.control, h].filter(Boolean).join(" "),
|
|
817
822
|
style: g,
|
|
818
823
|
value: D,
|
|
819
824
|
"aria-invalid": p ? !0 : y,
|
|
@@ -826,20 +831,20 @@ function I({ label: e, value: r, onChange: o, onBlur: s, listLabel: u, removeLab
|
|
|
826
831
|
},
|
|
827
832
|
onKeyDown: A,
|
|
828
833
|
onBlur: () => {
|
|
829
|
-
k(D),
|
|
834
|
+
k(D), a?.();
|
|
830
835
|
}
|
|
831
836
|
}),
|
|
832
837
|
r.length > 0 ? /* @__PURE__ */ t("ul", {
|
|
833
|
-
"aria-label":
|
|
834
|
-
className:
|
|
838
|
+
"aria-label": o ?? `${e} adicionadas`,
|
|
839
|
+
className: Ee.pills,
|
|
835
840
|
children: r.map((e) => /* @__PURE__ */ n("li", {
|
|
836
|
-
className:
|
|
841
|
+
className: Ee.pill,
|
|
837
842
|
children: [/* @__PURE__ */ t("span", { children: e }), /* @__PURE__ */ t("button", {
|
|
838
843
|
type: "button",
|
|
839
|
-
className:
|
|
840
|
-
"aria-label":
|
|
844
|
+
className: Ee.remove,
|
|
845
|
+
"aria-label": l(e),
|
|
841
846
|
onClick: () => {
|
|
842
|
-
|
|
847
|
+
i(r.filter((t) => t !== e)), E.current?.focus();
|
|
843
848
|
},
|
|
844
849
|
children: /* @__PURE__ */ t("span", {
|
|
845
850
|
"aria-hidden": "true",
|
|
@@ -848,25 +853,25 @@ function I({ label: e, value: r, onChange: o, onBlur: s, listLabel: u, removeLab
|
|
|
848
853
|
})]
|
|
849
854
|
}, e))
|
|
850
855
|
}) : null,
|
|
851
|
-
|
|
856
|
+
u ? /* @__PURE__ */ t("p", {
|
|
852
857
|
id: C,
|
|
853
|
-
className:
|
|
854
|
-
children:
|
|
858
|
+
className: Ee.help,
|
|
859
|
+
children: u
|
|
855
860
|
}) : null,
|
|
856
861
|
p ? /* @__PURE__ */ t("p", {
|
|
857
862
|
id: w,
|
|
858
863
|
role: "alert",
|
|
859
|
-
className:
|
|
864
|
+
className: Ee.error,
|
|
860
865
|
children: p
|
|
861
866
|
}) : null
|
|
862
867
|
]
|
|
863
868
|
});
|
|
864
869
|
}
|
|
865
870
|
// src/color-field/color.ts
|
|
866
|
-
function
|
|
871
|
+
function ke(e, t, n) {
|
|
867
872
|
return Math.min(n, Math.max(t, e));
|
|
868
873
|
}
|
|
869
|
-
function
|
|
874
|
+
function Ae(e, t, n) {
|
|
870
875
|
let r = t / 100, i = n / 100, a = (t) => (t + e / 30) % 12, o = r * Math.min(i, 1 - i), s = (e) => i - o * Math.max(-1, Math.min(a(e) - 3, 9 - a(e), 1));
|
|
871
876
|
return [
|
|
872
877
|
Math.round(s(0) * 255),
|
|
@@ -874,7 +879,7 @@ function R(e, t, n) {
|
|
|
874
879
|
Math.round(s(4) * 255)
|
|
875
880
|
];
|
|
876
881
|
}
|
|
877
|
-
function
|
|
882
|
+
function je(e, t, n) {
|
|
878
883
|
let r = e / 255, i = t / 255, a = n / 255, o = Math.max(r, i, a), s = Math.min(r, i, a), c = o - s, l = (o + s) / 2, u = c === 0 ? 0 : c / (1 - Math.abs(2 * l - 1)), d = 0;
|
|
879
884
|
return c && (d = o === r ? (i - a) / c % 6 : o === i ? (a - r) / c + 2 : (r - i) / c + 4, d = (d * 60 + 360) % 360), [
|
|
880
885
|
Math.round(d),
|
|
@@ -882,10 +887,10 @@ function z(e, t, n) {
|
|
|
882
887
|
Math.round(l * 100)
|
|
883
888
|
];
|
|
884
889
|
}
|
|
885
|
-
function
|
|
886
|
-
return `#${e.map((e) =>
|
|
890
|
+
function Me(e) {
|
|
891
|
+
return `#${e.map((e) => ke(Math.round(e), 0, 255).toString(16).padStart(2, "0")).join("").toUpperCase()}`;
|
|
887
892
|
}
|
|
888
|
-
function
|
|
893
|
+
function Ne(e) {
|
|
889
894
|
let t = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());
|
|
890
895
|
if (!t) return null;
|
|
891
896
|
let n = t[1] ?? "";
|
|
@@ -895,7 +900,7 @@ function V(e) {
|
|
|
895
900
|
4
|
|
896
901
|
].map((e) => parseInt(n.slice(e, e + 2), 16));
|
|
897
902
|
}
|
|
898
|
-
var
|
|
903
|
+
var q = {
|
|
899
904
|
root: "_root_5gwtb_1",
|
|
900
905
|
label: "_label_5gwtb_8",
|
|
901
906
|
trigger: "_trigger_5gwtb_17",
|
|
@@ -916,7 +921,7 @@ var H = {
|
|
|
916
921
|
buttons: "_buttons_5gwtb_189",
|
|
917
922
|
help: "_help_5gwtb_196",
|
|
918
923
|
error: "_error_5gwtb_202"
|
|
919
|
-
},
|
|
924
|
+
}, Pe = {
|
|
920
925
|
title: "Escolher cor",
|
|
921
926
|
lightness: "Luminosidade",
|
|
922
927
|
hex: "HEX",
|
|
@@ -931,13 +936,13 @@ var H = {
|
|
|
931
936
|
apply: "Aplicar",
|
|
932
937
|
wheel: "Roda de cores",
|
|
933
938
|
wheelValue: (e, t) => `Matiz ${String(e)} graus, saturação ${String(t)}%`
|
|
934
|
-
},
|
|
939
|
+
}, J = 220, Fe = [
|
|
935
940
|
124,
|
|
936
941
|
58,
|
|
937
942
|
237
|
|
938
943
|
];
|
|
939
|
-
function
|
|
940
|
-
let [t, n, r] =
|
|
944
|
+
function Ie(e) {
|
|
945
|
+
let [t, n, r] = je(...e);
|
|
941
946
|
return {
|
|
942
947
|
h: t,
|
|
943
948
|
s: n,
|
|
@@ -945,59 +950,59 @@ function K(e) {
|
|
|
945
950
|
rgb: e
|
|
946
951
|
};
|
|
947
952
|
}
|
|
948
|
-
function
|
|
953
|
+
function Le(e, t, n) {
|
|
949
954
|
return {
|
|
950
955
|
h: e,
|
|
951
956
|
s: t,
|
|
952
957
|
l: n,
|
|
953
|
-
rgb:
|
|
958
|
+
rgb: Ae(e, t, n)
|
|
954
959
|
};
|
|
955
960
|
}
|
|
956
|
-
function
|
|
957
|
-
let
|
|
958
|
-
...
|
|
959
|
-
...
|
|
960
|
-
}, [
|
|
961
|
+
function Re({ value: e, onChange: r, labels: i, className: a, style: s, ...c }) {
|
|
962
|
+
let l = {
|
|
963
|
+
...Pe,
|
|
964
|
+
...i
|
|
965
|
+
}, [u, p] = f(() => Ie(Ne(e) ?? Fe)), [m, h] = f(null), g = d(null), _ = Me(u.rgb);
|
|
961
966
|
function v(e) {
|
|
962
|
-
p(e),
|
|
967
|
+
p(e), r(Me(e.rgb));
|
|
963
968
|
}
|
|
964
|
-
|
|
969
|
+
o(() => {
|
|
965
970
|
let e = g.current?.getContext("2d");
|
|
966
971
|
if (!e) return;
|
|
967
|
-
let t =
|
|
968
|
-
for (let e = 0; e <
|
|
969
|
-
let i = r - t, a = e - t, o = Math.sqrt(i * i + a * a), s = (e *
|
|
972
|
+
let t = J / 2, n = e.createImageData(J, J);
|
|
973
|
+
for (let e = 0; e < J; e++) for (let r = 0; r < J; r++) {
|
|
974
|
+
let i = r - t, a = e - t, o = Math.sqrt(i * i + a * a), s = (e * J + r) * 4;
|
|
970
975
|
if (o > t) continue;
|
|
971
|
-
let c =
|
|
976
|
+
let c = Ae((Math.atan2(a, i) * 180 / Math.PI + 360) % 360, o / t * 100, u.l);
|
|
972
977
|
n.data[s] = c[0], n.data[s + 1] = c[1], n.data[s + 2] = c[2], n.data[s + 3] = 255;
|
|
973
978
|
}
|
|
974
979
|
e.putImageData(n, 0, 0);
|
|
975
|
-
}, [
|
|
980
|
+
}, [u.l]);
|
|
976
981
|
function y(e) {
|
|
977
982
|
let t = e.currentTarget.getBoundingClientRect(), n = (e.clientX - t.left) / t.width * 2 - 1, r = (e.clientY - t.top) / t.height * 2 - 1;
|
|
978
|
-
v(
|
|
983
|
+
v(Le(Math.round((Math.atan2(r, n) * 180 / Math.PI + 360) % 360), Math.round(ke(Math.sqrt(n * n + r * r), 0, 1) * 100), u.l));
|
|
979
984
|
}
|
|
980
985
|
function b(e) {
|
|
981
986
|
let t = e.shiftKey ? 10 : 1, { key: n } = e;
|
|
982
|
-
if (n === "ArrowRight" || n === "ArrowLeft") v(
|
|
983
|
-
else if (n === "ArrowUp" || n === "ArrowDown") v(
|
|
987
|
+
if (n === "ArrowRight" || n === "ArrowLeft") v(Le((u.h + (n === "ArrowRight" ? t : -t) + 360) % 360, u.s, u.l));
|
|
988
|
+
else if (n === "ArrowUp" || n === "ArrowDown") v(Le(u.h, ke(u.s + (n === "ArrowUp" ? t : -t), 0, 100), u.l));
|
|
984
989
|
else return;
|
|
985
990
|
e.preventDefault();
|
|
986
991
|
}
|
|
987
|
-
let x =
|
|
988
|
-
left: `${String((x + Math.cos(S) * C) /
|
|
989
|
-
top: `${String((x + Math.sin(S) * C) /
|
|
992
|
+
let x = J / 2, S = u.h * Math.PI / 180, C = u.s / 100 * x, w = {
|
|
993
|
+
left: `${String((x + Math.cos(S) * C) / J * 100)}%`,
|
|
994
|
+
top: `${String((x + Math.sin(S) * C) / J * 100)}%`,
|
|
990
995
|
backgroundColor: _
|
|
991
|
-
}, T = m?.key === "hex" &&
|
|
996
|
+
}, T = m?.key === "hex" && Ne(m.text) === null, E = (e, t) => ke(Math.round(Number(e) || 0), 0, t);
|
|
992
997
|
function D(e, t) {
|
|
993
998
|
return m?.key === e ? m.text : String(t);
|
|
994
999
|
}
|
|
995
1000
|
function O(e, r, i, a, o) {
|
|
996
1001
|
return /* @__PURE__ */ n("label", {
|
|
997
|
-
className:
|
|
1002
|
+
className: q.numberLabel,
|
|
998
1003
|
children: [/* @__PURE__ */ t("span", { children: r }), /* @__PURE__ */ t("input", {
|
|
999
1004
|
type: "number",
|
|
1000
|
-
className:
|
|
1005
|
+
className: q.input,
|
|
1001
1006
|
min: 0,
|
|
1002
1007
|
max: o,
|
|
1003
1008
|
value: D(e, i),
|
|
@@ -1013,28 +1018,28 @@ function ee({ value: e, onChange: i, labels: a, className: o, style: s, ...u })
|
|
|
1013
1018
|
})]
|
|
1014
1019
|
});
|
|
1015
1020
|
}
|
|
1016
|
-
let [k, A, j] =
|
|
1017
|
-
let n = [...
|
|
1018
|
-
n[e] = t, v(
|
|
1021
|
+
let [k, A, j] = u.rgb, M = (e) => (t) => {
|
|
1022
|
+
let n = [...u.rgb];
|
|
1023
|
+
n[e] = t, v(Ie(n));
|
|
1019
1024
|
};
|
|
1020
1025
|
return /* @__PURE__ */ n("div", {
|
|
1021
|
-
...
|
|
1022
|
-
className: [
|
|
1026
|
+
...c,
|
|
1027
|
+
className: [q.picker, a].filter(Boolean).join(" "),
|
|
1023
1028
|
style: s,
|
|
1024
1029
|
children: [/* @__PURE__ */ n("div", {
|
|
1025
|
-
className:
|
|
1030
|
+
className: q.wheelWrap,
|
|
1026
1031
|
children: [/* @__PURE__ */ t("canvas", {
|
|
1027
1032
|
ref: g,
|
|
1028
|
-
width:
|
|
1029
|
-
height:
|
|
1030
|
-
className:
|
|
1033
|
+
width: J,
|
|
1034
|
+
height: J,
|
|
1035
|
+
className: q.wheel,
|
|
1031
1036
|
role: "slider",
|
|
1032
1037
|
tabIndex: 0,
|
|
1033
|
-
"aria-label":
|
|
1038
|
+
"aria-label": l.wheel,
|
|
1034
1039
|
"aria-valuemin": 0,
|
|
1035
1040
|
"aria-valuemax": 360,
|
|
1036
|
-
"aria-valuenow":
|
|
1037
|
-
"aria-valuetext":
|
|
1041
|
+
"aria-valuenow": u.h,
|
|
1042
|
+
"aria-valuetext": l.wheelValue(u.h, u.s),
|
|
1038
1043
|
onPointerDown: (e) => {
|
|
1039
1044
|
e.currentTarget.setPointerCapture(e.pointerId), y(e);
|
|
1040
1045
|
},
|
|
@@ -1043,37 +1048,37 @@ function ee({ value: e, onChange: i, labels: a, className: o, style: s, ...u })
|
|
|
1043
1048
|
},
|
|
1044
1049
|
onKeyDown: b
|
|
1045
1050
|
}), /* @__PURE__ */ t("span", {
|
|
1046
|
-
className:
|
|
1051
|
+
className: q.marker,
|
|
1047
1052
|
style: w,
|
|
1048
1053
|
"aria-hidden": "true"
|
|
1049
1054
|
})]
|
|
1050
1055
|
}), /* @__PURE__ */ n("div", {
|
|
1051
|
-
className:
|
|
1056
|
+
className: q.controls,
|
|
1052
1057
|
children: [
|
|
1053
1058
|
/* @__PURE__ */ t("span", {
|
|
1054
|
-
className:
|
|
1059
|
+
className: q.preview,
|
|
1055
1060
|
"data-preview": "",
|
|
1056
1061
|
style: { backgroundColor: _ },
|
|
1057
1062
|
"aria-hidden": "true"
|
|
1058
1063
|
}),
|
|
1059
1064
|
/* @__PURE__ */ n("label", {
|
|
1060
|
-
className:
|
|
1061
|
-
children: [/* @__PURE__ */ t("span", { children:
|
|
1065
|
+
className: q.numberLabel,
|
|
1066
|
+
children: [/* @__PURE__ */ t("span", { children: l.lightness }), /* @__PURE__ */ t("input", {
|
|
1062
1067
|
type: "range",
|
|
1063
1068
|
min: 0,
|
|
1064
1069
|
max: 100,
|
|
1065
|
-
className:
|
|
1066
|
-
value:
|
|
1070
|
+
className: q.range,
|
|
1071
|
+
value: u.l,
|
|
1067
1072
|
onChange: (e) => {
|
|
1068
|
-
v(
|
|
1073
|
+
v(Le(u.h, u.s, Number(e.target.value)));
|
|
1069
1074
|
}
|
|
1070
1075
|
})]
|
|
1071
1076
|
}),
|
|
1072
1077
|
/* @__PURE__ */ n("label", {
|
|
1073
|
-
className:
|
|
1074
|
-
children: [/* @__PURE__ */ t("span", { children:
|
|
1078
|
+
className: q.numberLabel,
|
|
1079
|
+
children: [/* @__PURE__ */ t("span", { children: l.hex }), /* @__PURE__ */ t("input", {
|
|
1075
1080
|
type: "text",
|
|
1076
|
-
className:
|
|
1081
|
+
className: q.input,
|
|
1077
1082
|
autoComplete: "off",
|
|
1078
1083
|
value: D("hex", _),
|
|
1079
1084
|
"aria-invalid": T ? !0 : void 0,
|
|
@@ -1082,8 +1087,8 @@ function ee({ value: e, onChange: i, labels: a, className: o, style: s, ...u })
|
|
|
1082
1087
|
key: "hex",
|
|
1083
1088
|
text: e.target.value
|
|
1084
1089
|
});
|
|
1085
|
-
let t =
|
|
1086
|
-
t && v(
|
|
1090
|
+
let t = Ne(e.target.value);
|
|
1091
|
+
t && v(Ie(t));
|
|
1087
1092
|
},
|
|
1088
1093
|
onBlur: () => {
|
|
1089
1094
|
h(null);
|
|
@@ -1091,26 +1096,26 @@ function ee({ value: e, onChange: i, labels: a, className: o, style: s, ...u })
|
|
|
1091
1096
|
})]
|
|
1092
1097
|
}),
|
|
1093
1098
|
/* @__PURE__ */ n("fieldset", {
|
|
1094
|
-
className:
|
|
1099
|
+
className: q.group,
|
|
1095
1100
|
children: [
|
|
1096
|
-
/* @__PURE__ */ t("legend", { children:
|
|
1097
|
-
O("r",
|
|
1098
|
-
O("g",
|
|
1099
|
-
O("b",
|
|
1101
|
+
/* @__PURE__ */ t("legend", { children: l.rgb }),
|
|
1102
|
+
O("r", l.red, k, M(0), 255),
|
|
1103
|
+
O("g", l.green, A, M(1), 255),
|
|
1104
|
+
O("b", l.blue, j, M(2), 255)
|
|
1100
1105
|
]
|
|
1101
1106
|
}),
|
|
1102
1107
|
/* @__PURE__ */ n("fieldset", {
|
|
1103
|
-
className:
|
|
1108
|
+
className: q.group,
|
|
1104
1109
|
children: [
|
|
1105
|
-
/* @__PURE__ */ t("legend", { children:
|
|
1106
|
-
O("h",
|
|
1107
|
-
v(
|
|
1110
|
+
/* @__PURE__ */ t("legend", { children: l.hsl }),
|
|
1111
|
+
O("h", l.hue, u.h, (e) => {
|
|
1112
|
+
v(Le(e % 360, u.s, u.l));
|
|
1108
1113
|
}, 360),
|
|
1109
|
-
O("s",
|
|
1110
|
-
v(
|
|
1114
|
+
O("s", l.saturation, u.s, (e) => {
|
|
1115
|
+
v(Le(u.h, e, u.l));
|
|
1111
1116
|
}, 100),
|
|
1112
|
-
O("l",
|
|
1113
|
-
v(
|
|
1117
|
+
O("l", l.lightness, u.l, (e) => {
|
|
1118
|
+
v(Le(u.h, u.s, e));
|
|
1114
1119
|
}, 100)
|
|
1115
1120
|
]
|
|
1116
1121
|
})
|
|
@@ -1119,106 +1124,106 @@ function ee({ value: e, onChange: i, labels: a, className: o, style: s, ...u })
|
|
|
1119
1124
|
});
|
|
1120
1125
|
}
|
|
1121
1126
|
// src/color-field/color-field.tsx
|
|
1122
|
-
function
|
|
1123
|
-
let
|
|
1124
|
-
...
|
|
1125
|
-
...
|
|
1126
|
-
},
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
].filter(Boolean).join(" "),
|
|
1131
|
-
|
|
1132
|
-
let
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
}, [
|
|
1136
|
-
function
|
|
1137
|
-
|
|
1127
|
+
function ze({ label: e, value: r, onChange: i, onBlur: a, labels: l, error: u, help: p, id: m, className: h, style: g, ref: _, "aria-describedby": v, "aria-invalid": y, ...b }) {
|
|
1128
|
+
let x = {
|
|
1129
|
+
...Pe,
|
|
1130
|
+
...l
|
|
1131
|
+
}, S = s(), C = m ?? S, w = `${C}-label`, T = `${C}-value`, E = `${C}-title`, D = `${C}-help`, O = `${C}-error`, k = [
|
|
1132
|
+
v,
|
|
1133
|
+
p ? D : null,
|
|
1134
|
+
u ? O : null
|
|
1135
|
+
].filter(Boolean).join(" "), A = d(null), j = d(null), [M, N] = f(!1), P = d(r);
|
|
1136
|
+
c(_, () => A.current, []);
|
|
1137
|
+
let F = Ne(r), ee = F ? Me(F) : r;
|
|
1138
|
+
o(() => {
|
|
1139
|
+
M && (j.current?.showModal(), j.current?.querySelector("[role=\"slider\"]")?.focus());
|
|
1140
|
+
}, [M]);
|
|
1141
|
+
function I() {
|
|
1142
|
+
N(!1), A.current?.focus(), a?.();
|
|
1138
1143
|
}
|
|
1139
1144
|
return /* @__PURE__ */ n("div", {
|
|
1140
|
-
className:
|
|
1145
|
+
className: q.root,
|
|
1141
1146
|
children: [
|
|
1142
1147
|
/* @__PURE__ */ t("span", {
|
|
1143
|
-
id:
|
|
1144
|
-
className:
|
|
1148
|
+
id: w,
|
|
1149
|
+
className: q.label,
|
|
1145
1150
|
children: e
|
|
1146
1151
|
}),
|
|
1147
1152
|
/* @__PURE__ */ n("button", {
|
|
1148
|
-
...
|
|
1149
|
-
ref:
|
|
1153
|
+
...b,
|
|
1154
|
+
ref: A,
|
|
1150
1155
|
type: "button",
|
|
1151
|
-
id:
|
|
1152
|
-
className: [
|
|
1153
|
-
style:
|
|
1156
|
+
id: C,
|
|
1157
|
+
className: [q.trigger, h].filter(Boolean).join(" "),
|
|
1158
|
+
style: g,
|
|
1154
1159
|
"aria-haspopup": "dialog",
|
|
1155
|
-
"aria-labelledby": `${
|
|
1156
|
-
"aria-invalid":
|
|
1157
|
-
"aria-describedby":
|
|
1160
|
+
"aria-labelledby": `${w} ${T}`,
|
|
1161
|
+
"aria-invalid": u ? !0 : y,
|
|
1162
|
+
"aria-describedby": k || void 0,
|
|
1158
1163
|
onClick: () => {
|
|
1159
|
-
|
|
1164
|
+
P.current = r, N(!0);
|
|
1160
1165
|
},
|
|
1161
1166
|
children: [/* @__PURE__ */ t("span", {
|
|
1162
|
-
className:
|
|
1167
|
+
className: q.swatch,
|
|
1163
1168
|
"data-swatch": "",
|
|
1164
|
-
style: { backgroundColor:
|
|
1169
|
+
style: { backgroundColor: r }
|
|
1165
1170
|
}), /* @__PURE__ */ t("span", {
|
|
1166
|
-
id:
|
|
1167
|
-
className:
|
|
1168
|
-
children:
|
|
1171
|
+
id: T,
|
|
1172
|
+
className: q.hexText,
|
|
1173
|
+
children: ee
|
|
1169
1174
|
})]
|
|
1170
1175
|
}),
|
|
1171
|
-
|
|
1172
|
-
ref:
|
|
1173
|
-
"aria-labelledby":
|
|
1174
|
-
className:
|
|
1176
|
+
M ? /* @__PURE__ */ n("dialog", {
|
|
1177
|
+
ref: j,
|
|
1178
|
+
"aria-labelledby": E,
|
|
1179
|
+
className: q.dialog,
|
|
1175
1180
|
onCancel: (e) => {
|
|
1176
|
-
e.preventDefault(),
|
|
1181
|
+
e.preventDefault(), I();
|
|
1177
1182
|
},
|
|
1178
1183
|
children: [
|
|
1179
1184
|
/* @__PURE__ */ t("h2", {
|
|
1180
|
-
id:
|
|
1181
|
-
className:
|
|
1182
|
-
children:
|
|
1185
|
+
id: E,
|
|
1186
|
+
className: q.title,
|
|
1187
|
+
children: x.title
|
|
1183
1188
|
}),
|
|
1184
|
-
/* @__PURE__ */ t(
|
|
1185
|
-
value:
|
|
1186
|
-
labels:
|
|
1189
|
+
/* @__PURE__ */ t(Re, {
|
|
1190
|
+
value: r,
|
|
1191
|
+
labels: x,
|
|
1187
1192
|
onChange: (e) => {
|
|
1188
|
-
|
|
1193
|
+
P.current = e;
|
|
1189
1194
|
}
|
|
1190
1195
|
}),
|
|
1191
1196
|
/* @__PURE__ */ n("div", {
|
|
1192
|
-
className:
|
|
1193
|
-
children: [/* @__PURE__ */ t(
|
|
1197
|
+
className: q.buttons,
|
|
1198
|
+
children: [/* @__PURE__ */ t(H, {
|
|
1194
1199
|
variant: "ghost",
|
|
1195
|
-
onClick:
|
|
1196
|
-
children:
|
|
1197
|
-
}), /* @__PURE__ */ t(
|
|
1200
|
+
onClick: I,
|
|
1201
|
+
children: x.cancel
|
|
1202
|
+
}), /* @__PURE__ */ t(H, {
|
|
1198
1203
|
variant: "primary",
|
|
1199
1204
|
onClick: () => {
|
|
1200
|
-
|
|
1205
|
+
i(P.current), I();
|
|
1201
1206
|
},
|
|
1202
|
-
children:
|
|
1207
|
+
children: x.apply
|
|
1203
1208
|
})]
|
|
1204
1209
|
})
|
|
1205
1210
|
]
|
|
1206
1211
|
}) : null,
|
|
1207
|
-
m ? /* @__PURE__ */ t("p", {
|
|
1208
|
-
id: O,
|
|
1209
|
-
className: H.help,
|
|
1210
|
-
children: m
|
|
1211
|
-
}) : null,
|
|
1212
1212
|
p ? /* @__PURE__ */ t("p", {
|
|
1213
|
-
id:
|
|
1214
|
-
|
|
1215
|
-
className: H.error,
|
|
1213
|
+
id: D,
|
|
1214
|
+
className: q.help,
|
|
1216
1215
|
children: p
|
|
1216
|
+
}) : null,
|
|
1217
|
+
u ? /* @__PURE__ */ t("p", {
|
|
1218
|
+
id: O,
|
|
1219
|
+
role: "alert",
|
|
1220
|
+
className: q.error,
|
|
1221
|
+
children: u
|
|
1217
1222
|
}) : null
|
|
1218
1223
|
]
|
|
1219
1224
|
});
|
|
1220
1225
|
}
|
|
1221
|
-
var
|
|
1226
|
+
var Y = {
|
|
1222
1227
|
root: "_root_7069v_1",
|
|
1223
1228
|
head: "_head_7069v_9",
|
|
1224
1229
|
title: "_title_7069v_15",
|
|
@@ -1230,19 +1235,19 @@ var J = {
|
|
|
1230
1235
|
inRange: "_inRange_7069v_75",
|
|
1231
1236
|
edge: "_edge_7069v_80",
|
|
1232
1237
|
row: "_row_7069v_87"
|
|
1233
|
-
},
|
|
1238
|
+
}, Be = {
|
|
1234
1239
|
previous: "Mês anterior",
|
|
1235
1240
|
next: "Próximo mês",
|
|
1236
1241
|
today: "hoje"
|
|
1237
|
-
},
|
|
1238
|
-
function
|
|
1239
|
-
return `${String(e.getFullYear())}-${
|
|
1242
|
+
}, Ve = (e) => String(e).padStart(2, "0");
|
|
1243
|
+
function He(e) {
|
|
1244
|
+
return `${String(e.getFullYear())}-${Ve(e.getMonth() + 1)}-${Ve(e.getDate())}`;
|
|
1240
1245
|
}
|
|
1241
|
-
function
|
|
1246
|
+
function Ue(e) {
|
|
1242
1247
|
let [t = 1970, n = 1, r = 1] = e.split("-").map(Number);
|
|
1243
1248
|
return new Date(t, n - 1, r);
|
|
1244
1249
|
}
|
|
1245
|
-
function
|
|
1250
|
+
function We({ left: e }) {
|
|
1246
1251
|
return /* @__PURE__ */ t("svg", {
|
|
1247
1252
|
viewBox: "0 0 24 24",
|
|
1248
1253
|
width: "16",
|
|
@@ -1257,20 +1262,20 @@ function ie({ left: e }) {
|
|
|
1257
1262
|
children: /* @__PURE__ */ t("path", { d: e ? "M15 18l-6-6 6-6" : "M9 18l6-6-6-6" })
|
|
1258
1263
|
});
|
|
1259
1264
|
}
|
|
1260
|
-
function
|
|
1261
|
-
let
|
|
1262
|
-
|
|
1263
|
-
let
|
|
1264
|
-
...
|
|
1265
|
-
...
|
|
1266
|
-
},
|
|
1265
|
+
function Ge({ mode: e, month: r, onMonthChange: i, value: a, onChange: s, today: l, locale: f = "pt-BR", labels: p, className: m, ref: h, ...g }) {
|
|
1266
|
+
let _ = d(null);
|
|
1267
|
+
c(h, () => _.current, []);
|
|
1268
|
+
let v = {
|
|
1269
|
+
...Be,
|
|
1270
|
+
...p
|
|
1271
|
+
}, y = d(null), [b, x] = r.split("-").map(Number), S = u(() => new Intl.DateTimeFormat(f, {
|
|
1267
1272
|
month: "long",
|
|
1268
1273
|
year: "numeric"
|
|
1269
|
-
}).format(new Date(
|
|
1274
|
+
}).format(new Date(b, x - 1, 1)), [
|
|
1270
1275
|
f,
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
]),
|
|
1276
|
+
b,
|
|
1277
|
+
x
|
|
1278
|
+
]), C = u(() => {
|
|
1274
1279
|
let e = new Intl.DateTimeFormat(f, { weekday: "narrow" }), t = new Intl.DateTimeFormat(f, { weekday: "long" });
|
|
1275
1280
|
return Array.from({ length: 7 }, (n, r) => {
|
|
1276
1281
|
let i = new Date(2026, 0, 4 + r);
|
|
@@ -1279,38 +1284,38 @@ function ae({ mode: e, month: i, onMonthChange: o, value: l, onChange: u, today:
|
|
|
1279
1284
|
long: t.format(i)
|
|
1280
1285
|
};
|
|
1281
1286
|
});
|
|
1282
|
-
}, [f]),
|
|
1283
|
-
let n = new Date(
|
|
1287
|
+
}, [f]), w = u(() => new Intl.DateTimeFormat(f, { dateStyle: "long" }), [f]), T = new Date(b, x - 1, 1), E = new Date(b, x - 1, 1 - T.getDay()), D = Array.from({ length: 42 }, (e, t) => {
|
|
1288
|
+
let n = new Date(E.getFullYear(), E.getMonth(), E.getDate() + t);
|
|
1284
1289
|
return {
|
|
1285
|
-
iso:
|
|
1290
|
+
iso: He(n),
|
|
1286
1291
|
date: n
|
|
1287
1292
|
};
|
|
1288
|
-
}),
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
`${
|
|
1292
|
-
].find((e) => e && e.slice(0, 7) ===
|
|
1293
|
-
function
|
|
1294
|
-
|
|
1293
|
+
}), O = Array.from({ length: 6 }, (e, t) => D.slice(t * 7, t * 7 + 7)), k = a.from, A = e === "range" ? a.to ?? a.from : a.from, j = r, M = [
|
|
1294
|
+
k,
|
|
1295
|
+
l,
|
|
1296
|
+
`${r}-01`
|
|
1297
|
+
].find((e) => e && e.slice(0, 7) === j) ?? `${r}-01`;
|
|
1298
|
+
function N(e) {
|
|
1299
|
+
y.current = e, e.slice(0, 7) === r ? _.current?.querySelector(`[data-day="${e}"]`)?.focus() : i(e.slice(0, 7));
|
|
1295
1300
|
}
|
|
1296
|
-
|
|
1297
|
-
let e =
|
|
1298
|
-
e && e.slice(0, 7) ===
|
|
1299
|
-
}, [
|
|
1300
|
-
function
|
|
1301
|
-
let t = new Date(
|
|
1302
|
-
|
|
1301
|
+
o(() => {
|
|
1302
|
+
let e = y.current;
|
|
1303
|
+
e && e.slice(0, 7) === r && (y.current = null, _.current?.querySelector(`[data-day="${e}"]`)?.focus());
|
|
1304
|
+
}, [r]);
|
|
1305
|
+
function P(e) {
|
|
1306
|
+
let t = new Date(b, x - 1 + e, 1);
|
|
1307
|
+
i(`${String(t.getFullYear())}-${Ve(t.getMonth() + 1)}`);
|
|
1303
1308
|
}
|
|
1304
|
-
function
|
|
1305
|
-
e === "single" || !
|
|
1309
|
+
function F(t) {
|
|
1310
|
+
e === "single" || !a.from || a.to ? s({ from: t }) : t < a.from ? s({
|
|
1306
1311
|
from: t,
|
|
1307
|
-
to:
|
|
1308
|
-
}) :
|
|
1309
|
-
from:
|
|
1312
|
+
to: a.from
|
|
1313
|
+
}) : s({
|
|
1314
|
+
from: a.from,
|
|
1310
1315
|
to: t
|
|
1311
1316
|
});
|
|
1312
1317
|
}
|
|
1313
|
-
function
|
|
1318
|
+
function ee(e, t) {
|
|
1314
1319
|
let n = {
|
|
1315
1320
|
ArrowLeft: -1,
|
|
1316
1321
|
ArrowRight: 1,
|
|
@@ -1319,77 +1324,77 @@ function ae({ mode: e, month: i, onMonthChange: o, value: l, onChange: u, today:
|
|
|
1319
1324
|
}[e.key];
|
|
1320
1325
|
if (n === void 0) return;
|
|
1321
1326
|
e.preventDefault();
|
|
1322
|
-
let r =
|
|
1323
|
-
r.setDate(r.getDate() + n),
|
|
1327
|
+
let r = Ue(t);
|
|
1328
|
+
r.setDate(r.getDate() + n), N(He(r));
|
|
1324
1329
|
}
|
|
1325
1330
|
return /* @__PURE__ */ n("div", {
|
|
1326
|
-
...
|
|
1327
|
-
ref:
|
|
1328
|
-
className: [
|
|
1331
|
+
...g,
|
|
1332
|
+
ref: _,
|
|
1333
|
+
className: [Y.root, m].filter(Boolean).join(" "),
|
|
1329
1334
|
children: [/* @__PURE__ */ n("div", {
|
|
1330
|
-
className:
|
|
1335
|
+
className: Y.head,
|
|
1331
1336
|
children: [
|
|
1332
|
-
/* @__PURE__ */ t(
|
|
1333
|
-
"aria-label":
|
|
1334
|
-
icon: /* @__PURE__ */ t(
|
|
1337
|
+
/* @__PURE__ */ t(U, {
|
|
1338
|
+
"aria-label": v.previous,
|
|
1339
|
+
icon: /* @__PURE__ */ t(We, { left: !0 }),
|
|
1335
1340
|
onClick: () => {
|
|
1336
|
-
|
|
1341
|
+
P(-1);
|
|
1337
1342
|
}
|
|
1338
1343
|
}),
|
|
1339
1344
|
/* @__PURE__ */ t("span", {
|
|
1340
|
-
className:
|
|
1341
|
-
children:
|
|
1345
|
+
className: Y.title,
|
|
1346
|
+
children: S
|
|
1342
1347
|
}),
|
|
1343
|
-
/* @__PURE__ */ t(
|
|
1344
|
-
"aria-label":
|
|
1345
|
-
icon: /* @__PURE__ */ t(
|
|
1348
|
+
/* @__PURE__ */ t(U, {
|
|
1349
|
+
"aria-label": v.next,
|
|
1350
|
+
icon: /* @__PURE__ */ t(We, { left: !1 }),
|
|
1346
1351
|
onClick: () => {
|
|
1347
|
-
|
|
1352
|
+
P(1);
|
|
1348
1353
|
}
|
|
1349
1354
|
})
|
|
1350
1355
|
]
|
|
1351
1356
|
}), /* @__PURE__ */ n("div", {
|
|
1352
1357
|
role: "grid",
|
|
1353
|
-
"aria-label":
|
|
1354
|
-
className:
|
|
1358
|
+
"aria-label": S,
|
|
1359
|
+
className: Y.grid,
|
|
1355
1360
|
children: [/* @__PURE__ */ t("div", {
|
|
1356
1361
|
role: "row",
|
|
1357
|
-
className:
|
|
1358
|
-
children:
|
|
1362
|
+
className: Y.row,
|
|
1363
|
+
children: C.map((e) => /* @__PURE__ */ t("span", {
|
|
1359
1364
|
role: "columnheader",
|
|
1360
1365
|
"aria-label": e.long,
|
|
1361
|
-
className:
|
|
1366
|
+
className: Y.dow,
|
|
1362
1367
|
children: e.short
|
|
1363
1368
|
}, e.long))
|
|
1364
|
-
}),
|
|
1369
|
+
}), O.map((n) => /* @__PURE__ */ t("div", {
|
|
1365
1370
|
role: "row",
|
|
1366
|
-
className:
|
|
1367
|
-
children: n.map(({ iso: n, date:
|
|
1368
|
-
let a = n.slice(0, 7) !==
|
|
1369
|
-
|
|
1370
|
-
a ?
|
|
1371
|
-
o && !s ?
|
|
1372
|
-
s ?
|
|
1373
|
-
n ===
|
|
1371
|
+
className: Y.row,
|
|
1372
|
+
children: n.map(({ iso: n, date: i }) => {
|
|
1373
|
+
let a = n.slice(0, 7) !== r, o = e === "range" && k !== "" && n >= k && n <= A, s = k !== "" && (n === k || n === A), c = [
|
|
1374
|
+
Y.day,
|
|
1375
|
+
a ? Y.outside : "",
|
|
1376
|
+
o && !s ? Y.inRange : "",
|
|
1377
|
+
s ? Y.edge : "",
|
|
1378
|
+
n === l ? Y.today : ""
|
|
1374
1379
|
].filter(Boolean).join(" ");
|
|
1375
1380
|
return /* @__PURE__ */ t("span", {
|
|
1376
1381
|
role: "gridcell",
|
|
1377
|
-
className:
|
|
1382
|
+
className: Y.row,
|
|
1378
1383
|
children: /* @__PURE__ */ t("button", {
|
|
1379
1384
|
type: "button",
|
|
1380
1385
|
"data-day": n,
|
|
1381
1386
|
"data-outside": a ? "" : void 0,
|
|
1382
1387
|
className: c,
|
|
1383
|
-
tabIndex: n ===
|
|
1388
|
+
tabIndex: n === M ? 0 : -1,
|
|
1384
1389
|
"aria-pressed": s,
|
|
1385
|
-
"aria-label": `${
|
|
1390
|
+
"aria-label": `${w.format(i)}${n === l ? `, ${v.today}` : ""}`,
|
|
1386
1391
|
onClick: () => {
|
|
1387
|
-
|
|
1392
|
+
F(n);
|
|
1388
1393
|
},
|
|
1389
1394
|
onKeyDown: (e) => {
|
|
1390
|
-
|
|
1395
|
+
ee(e, n);
|
|
1391
1396
|
},
|
|
1392
|
-
children:
|
|
1397
|
+
children: i.getDate()
|
|
1393
1398
|
})
|
|
1394
1399
|
}, n);
|
|
1395
1400
|
})
|
|
@@ -1397,7 +1402,7 @@ function ae({ mode: e, month: i, onMonthChange: o, value: l, onChange: u, today:
|
|
|
1397
1402
|
})]
|
|
1398
1403
|
});
|
|
1399
1404
|
}
|
|
1400
|
-
var
|
|
1405
|
+
var Ke = {
|
|
1401
1406
|
root: "_root_1fogs_1",
|
|
1402
1407
|
label: "_label_1fogs_8",
|
|
1403
1408
|
hidden: "_hidden_1fogs_17",
|
|
@@ -1409,7 +1414,7 @@ var Z = {
|
|
|
1409
1414
|
actions: "_actions_1fogs_87",
|
|
1410
1415
|
help: "_help_1fogs_92",
|
|
1411
1416
|
error: "_error_1fogs_98"
|
|
1412
|
-
},
|
|
1417
|
+
}, qe = {
|
|
1413
1418
|
placeholder: "Escolher data",
|
|
1414
1419
|
today: "Hoje",
|
|
1415
1420
|
clear: "Limpar",
|
|
@@ -1417,7 +1422,7 @@ var Z = {
|
|
|
1417
1422
|
next: "Próximo mês",
|
|
1418
1423
|
todayMarker: "hoje"
|
|
1419
1424
|
};
|
|
1420
|
-
function
|
|
1425
|
+
function Je() {
|
|
1421
1426
|
return /* @__PURE__ */ n("svg", {
|
|
1422
1427
|
viewBox: "0 0 24 24",
|
|
1423
1428
|
width: "16",
|
|
@@ -1438,124 +1443,124 @@ function se() {
|
|
|
1438
1443
|
}), /* @__PURE__ */ t("path", { d: "M16 2v4M8 2v4M3 10h18" })]
|
|
1439
1444
|
});
|
|
1440
1445
|
}
|
|
1441
|
-
function
|
|
1446
|
+
function Ye() {
|
|
1442
1447
|
let e = /* @__PURE__ */ new Date(), t = (e) => String(e).padStart(2, "0");
|
|
1443
1448
|
return `${String(e.getFullYear())}-${t(e.getMonth() + 1)}-${t(e.getDate())}`;
|
|
1444
1449
|
}
|
|
1445
|
-
function
|
|
1450
|
+
function Xe(e, t) {
|
|
1446
1451
|
let [n = 1970, r = 1, i = 1] = e.split("-").map(Number);
|
|
1447
1452
|
return new Intl.DateTimeFormat(t).format(new Date(n, r - 1, i));
|
|
1448
1453
|
}
|
|
1449
|
-
function
|
|
1450
|
-
let
|
|
1451
|
-
|
|
1452
|
-
let
|
|
1453
|
-
...
|
|
1454
|
-
...
|
|
1455
|
-
}, [
|
|
1456
|
-
function
|
|
1457
|
-
|
|
1454
|
+
function Ze({ label: e, value: r, onChange: i, onBlur: a, locale: l = "pt-BR", labels: u, today: p, hideLabel: m = !1, help: h, error: g, id: _, className: v, style: y, ref: b, ...x }) {
|
|
1455
|
+
let S = s(), C = _ ?? S, w = `${C}-label`, T = `${C}-value`, E = `${C}-help`, D = `${C}-error`, O = [h ? E : null, g ? D : null].filter(Boolean).join(" "), k = p ?? Ye(), A = d(null), j = d(null);
|
|
1456
|
+
c(b, () => j.current, []);
|
|
1457
|
+
let M = {
|
|
1458
|
+
...qe,
|
|
1459
|
+
...u
|
|
1460
|
+
}, [N, P] = f(!1), [F, ee] = f((r || k).slice(0, 7));
|
|
1461
|
+
function I(e) {
|
|
1462
|
+
P(!1), e ? j.current?.focus() : a?.();
|
|
1458
1463
|
}
|
|
1459
|
-
function
|
|
1460
|
-
|
|
1464
|
+
function L(e) {
|
|
1465
|
+
i(e), I(!0);
|
|
1461
1466
|
}
|
|
1462
|
-
|
|
1463
|
-
if (!
|
|
1464
|
-
|
|
1467
|
+
o(() => {
|
|
1468
|
+
if (!N) return;
|
|
1469
|
+
A.current?.querySelector("[data-day][tabindex=\"0\"]")?.focus();
|
|
1465
1470
|
let e = (e) => {
|
|
1466
|
-
|
|
1471
|
+
A.current?.contains(e.target) || I(!1);
|
|
1467
1472
|
}, t = (e) => {
|
|
1468
|
-
e.key === "Escape" && (e.preventDefault(), e.stopPropagation(),
|
|
1473
|
+
e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), I(!0));
|
|
1469
1474
|
};
|
|
1470
1475
|
return document.addEventListener("pointerdown", e, !0), document.addEventListener("keydown", t, !0), () => {
|
|
1471
1476
|
document.removeEventListener("pointerdown", e, !0), document.removeEventListener("keydown", t, !0);
|
|
1472
1477
|
};
|
|
1473
|
-
}, [
|
|
1474
|
-
let
|
|
1475
|
-
previous:
|
|
1476
|
-
next:
|
|
1477
|
-
today:
|
|
1478
|
+
}, [N]);
|
|
1479
|
+
let R = {
|
|
1480
|
+
previous: M.previous,
|
|
1481
|
+
next: M.next,
|
|
1482
|
+
today: M.todayMarker
|
|
1478
1483
|
};
|
|
1479
1484
|
return /* @__PURE__ */ n("div", {
|
|
1480
|
-
className:
|
|
1481
|
-
ref:
|
|
1485
|
+
className: Ke.root,
|
|
1486
|
+
ref: A,
|
|
1482
1487
|
children: [
|
|
1483
1488
|
/* @__PURE__ */ t("span", {
|
|
1484
|
-
id:
|
|
1485
|
-
className: [
|
|
1489
|
+
id: w,
|
|
1490
|
+
className: [Ke.label, m ? Ke.hidden : ""].filter(Boolean).join(" "),
|
|
1486
1491
|
children: e
|
|
1487
1492
|
}),
|
|
1488
1493
|
/* @__PURE__ */ n("div", {
|
|
1489
|
-
className:
|
|
1494
|
+
className: Ke.wrap,
|
|
1490
1495
|
children: [/* @__PURE__ */ n("button", {
|
|
1491
|
-
...
|
|
1492
|
-
ref:
|
|
1496
|
+
...x,
|
|
1497
|
+
ref: j,
|
|
1493
1498
|
type: "button",
|
|
1494
|
-
id:
|
|
1495
|
-
className: [
|
|
1496
|
-
style:
|
|
1499
|
+
id: C,
|
|
1500
|
+
className: [Ke.control, v].filter(Boolean).join(" "),
|
|
1501
|
+
style: y,
|
|
1497
1502
|
"aria-haspopup": "dialog",
|
|
1498
|
-
"aria-expanded":
|
|
1499
|
-
"aria-labelledby": `${
|
|
1500
|
-
"aria-invalid":
|
|
1501
|
-
"aria-describedby":
|
|
1503
|
+
"aria-expanded": N,
|
|
1504
|
+
"aria-labelledby": `${w} ${T}`,
|
|
1505
|
+
"aria-invalid": g ? !0 : void 0,
|
|
1506
|
+
"aria-describedby": O || void 0,
|
|
1502
1507
|
onClick: () => {
|
|
1503
|
-
|
|
1508
|
+
N ? I(!1) : (ee((r || k).slice(0, 7)), P(!0));
|
|
1504
1509
|
},
|
|
1505
|
-
children: [/* @__PURE__ */ t(
|
|
1506
|
-
id:
|
|
1507
|
-
className:
|
|
1508
|
-
children:
|
|
1510
|
+
children: [/* @__PURE__ */ t(Je, {}), /* @__PURE__ */ t("span", {
|
|
1511
|
+
id: T,
|
|
1512
|
+
className: r ? Ke.value : Ke.placeholder,
|
|
1513
|
+
children: r ? Xe(r, l) : M.placeholder
|
|
1509
1514
|
})]
|
|
1510
|
-
}),
|
|
1515
|
+
}), N ? /* @__PURE__ */ n("div", {
|
|
1511
1516
|
role: "dialog",
|
|
1512
1517
|
"aria-label": e,
|
|
1513
|
-
className:
|
|
1514
|
-
children: [/* @__PURE__ */ t(
|
|
1518
|
+
className: Ke.popover,
|
|
1519
|
+
children: [/* @__PURE__ */ t(Ge, {
|
|
1515
1520
|
mode: "single",
|
|
1516
|
-
month:
|
|
1517
|
-
onMonthChange:
|
|
1518
|
-
value: { from:
|
|
1521
|
+
month: F,
|
|
1522
|
+
onMonthChange: ee,
|
|
1523
|
+
value: { from: r },
|
|
1519
1524
|
onChange: (e) => {
|
|
1520
|
-
|
|
1525
|
+
L(e.from);
|
|
1521
1526
|
},
|
|
1522
|
-
today:
|
|
1523
|
-
locale:
|
|
1524
|
-
labels:
|
|
1527
|
+
today: k,
|
|
1528
|
+
locale: l,
|
|
1529
|
+
labels: R
|
|
1525
1530
|
}), /* @__PURE__ */ n("div", {
|
|
1526
|
-
className:
|
|
1527
|
-
children: [/* @__PURE__ */ t(
|
|
1531
|
+
className: Ke.actions,
|
|
1532
|
+
children: [/* @__PURE__ */ t(H, {
|
|
1528
1533
|
variant: "ghost",
|
|
1529
1534
|
onClick: () => {
|
|
1530
|
-
|
|
1535
|
+
L(k);
|
|
1531
1536
|
},
|
|
1532
|
-
children:
|
|
1533
|
-
}), /* @__PURE__ */ t(
|
|
1537
|
+
children: M.today
|
|
1538
|
+
}), /* @__PURE__ */ t(H, {
|
|
1534
1539
|
variant: "ghost",
|
|
1535
1540
|
onClick: () => {
|
|
1536
|
-
|
|
1541
|
+
L("");
|
|
1537
1542
|
},
|
|
1538
|
-
children:
|
|
1543
|
+
children: M.clear
|
|
1539
1544
|
})]
|
|
1540
1545
|
})]
|
|
1541
1546
|
}) : null]
|
|
1542
1547
|
}),
|
|
1548
|
+
h ? /* @__PURE__ */ t("p", {
|
|
1549
|
+
id: E,
|
|
1550
|
+
className: Ke.help,
|
|
1551
|
+
children: h
|
|
1552
|
+
}) : null,
|
|
1543
1553
|
g ? /* @__PURE__ */ t("p", {
|
|
1544
1554
|
id: D,
|
|
1545
|
-
className: Z.help,
|
|
1546
|
-
children: g
|
|
1547
|
-
}) : null,
|
|
1548
|
-
_ ? /* @__PURE__ */ t("p", {
|
|
1549
|
-
id: O,
|
|
1550
1555
|
role: "alert",
|
|
1551
|
-
className:
|
|
1552
|
-
children:
|
|
1556
|
+
className: Ke.error,
|
|
1557
|
+
children: g
|
|
1553
1558
|
}) : null
|
|
1554
1559
|
]
|
|
1555
1560
|
});
|
|
1556
1561
|
}
|
|
1557
1562
|
// src/time-field/parse-time.ts
|
|
1558
|
-
function
|
|
1563
|
+
function Qe(e) {
|
|
1559
1564
|
let t = e.replace(/\D/g, "").slice(0, 4);
|
|
1560
1565
|
if (t === "") return null;
|
|
1561
1566
|
let n = t;
|
|
@@ -1563,11 +1568,11 @@ function de(e) {
|
|
|
1563
1568
|
let r = Math.min(23, Number(n.slice(0, 2))), i = Math.min(59, Number(n.slice(2)));
|
|
1564
1569
|
return `${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}`;
|
|
1565
1570
|
}
|
|
1566
|
-
function
|
|
1571
|
+
function $e(e) {
|
|
1567
1572
|
let t = e.replace(/\D/g, "").slice(0, 4);
|
|
1568
1573
|
return t.length > 2 ? `${t.slice(0, 2)}:${t.slice(2)}` : t;
|
|
1569
1574
|
}
|
|
1570
|
-
var
|
|
1575
|
+
var et = {
|
|
1571
1576
|
root: "_root_ntomw_1",
|
|
1572
1577
|
label: "_label_ntomw_8",
|
|
1573
1578
|
hidden: "_hidden_ntomw_17",
|
|
@@ -1578,7 +1583,7 @@ var pe = {
|
|
|
1578
1583
|
error: "_error_ntomw_71"
|
|
1579
1584
|
};
|
|
1580
1585
|
// src/time-field/time-field.tsx
|
|
1581
|
-
function
|
|
1586
|
+
function tt() {
|
|
1582
1587
|
return /* @__PURE__ */ n("svg", {
|
|
1583
1588
|
viewBox: "0 0 24 24",
|
|
1584
1589
|
width: "16",
|
|
@@ -1597,21 +1602,21 @@ function me() {
|
|
|
1597
1602
|
}), /* @__PURE__ */ t("path", { d: "M12 7v5l3 2" })]
|
|
1598
1603
|
});
|
|
1599
1604
|
}
|
|
1600
|
-
function
|
|
1601
|
-
let g =
|
|
1605
|
+
function nt({ label: e, value: r, onChange: i, onBlur: a, placeholder: o = "hh:mm", hideLabel: c = !1, help: l, error: u, id: d, className: p, style: m, ...h }) {
|
|
1606
|
+
let g = s(), _ = d ?? g, v = `${_}-help`, y = `${_}-error`, b = [l ? v : null, u ? y : null].filter(Boolean).join(" "), [x, S] = f(r), [C, w] = f(r);
|
|
1602
1607
|
return C !== r && (w(r), S(r)), /* @__PURE__ */ n("div", {
|
|
1603
|
-
className:
|
|
1608
|
+
className: et.root,
|
|
1604
1609
|
children: [
|
|
1605
1610
|
/* @__PURE__ */ t("label", {
|
|
1606
1611
|
htmlFor: _,
|
|
1607
|
-
className: [
|
|
1612
|
+
className: [et.label, c ? et.hidden : ""].filter(Boolean).join(" "),
|
|
1608
1613
|
children: e
|
|
1609
1614
|
}),
|
|
1610
1615
|
/* @__PURE__ */ n("div", {
|
|
1611
|
-
className:
|
|
1616
|
+
className: et.wrap,
|
|
1612
1617
|
children: [/* @__PURE__ */ t("span", {
|
|
1613
|
-
className:
|
|
1614
|
-
children: /* @__PURE__ */ t(
|
|
1618
|
+
className: et.icon,
|
|
1619
|
+
children: /* @__PURE__ */ t(tt, {})
|
|
1615
1620
|
}), /* @__PURE__ */ t("input", {
|
|
1616
1621
|
...h,
|
|
1617
1622
|
id: _,
|
|
@@ -1619,44 +1624,44 @@ function he({ label: e, value: r, onChange: a, onBlur: o, placeholder: s = "hh:m
|
|
|
1619
1624
|
inputMode: "numeric",
|
|
1620
1625
|
maxLength: 5,
|
|
1621
1626
|
autoComplete: "off",
|
|
1622
|
-
placeholder:
|
|
1627
|
+
placeholder: o,
|
|
1623
1628
|
value: x,
|
|
1624
|
-
className: [
|
|
1629
|
+
className: [et.control, p].filter(Boolean).join(" "),
|
|
1625
1630
|
style: m,
|
|
1626
|
-
"aria-invalid":
|
|
1631
|
+
"aria-invalid": u ? !0 : void 0,
|
|
1627
1632
|
"aria-describedby": b || void 0,
|
|
1628
1633
|
onChange: (e) => {
|
|
1629
|
-
S(
|
|
1634
|
+
S($e(e.target.value));
|
|
1630
1635
|
},
|
|
1631
1636
|
onBlur: () => {
|
|
1632
|
-
let e =
|
|
1633
|
-
S(e), e !== r &&
|
|
1637
|
+
let e = Qe(x) ?? "";
|
|
1638
|
+
S(e), e !== r && i(e), a?.();
|
|
1634
1639
|
}
|
|
1635
1640
|
})]
|
|
1636
1641
|
}),
|
|
1637
|
-
|
|
1642
|
+
l ? /* @__PURE__ */ t("p", {
|
|
1638
1643
|
id: v,
|
|
1639
|
-
className:
|
|
1640
|
-
children:
|
|
1644
|
+
className: et.help,
|
|
1645
|
+
children: l
|
|
1641
1646
|
}) : null,
|
|
1642
|
-
|
|
1647
|
+
u ? /* @__PURE__ */ t("p", {
|
|
1643
1648
|
id: y,
|
|
1644
1649
|
role: "alert",
|
|
1645
|
-
className:
|
|
1646
|
-
children:
|
|
1650
|
+
className: et.error,
|
|
1651
|
+
children: u
|
|
1647
1652
|
}) : null
|
|
1648
1653
|
]
|
|
1649
1654
|
});
|
|
1650
1655
|
}
|
|
1651
|
-
var
|
|
1656
|
+
var rt = {
|
|
1652
1657
|
root: "_root_2fjcj_1",
|
|
1653
1658
|
legend: "_legend_2fjcj_8",
|
|
1654
1659
|
row: "_row_2fjcj_19",
|
|
1655
1660
|
help: "_help_2fjcj_26"
|
|
1656
1661
|
};
|
|
1657
1662
|
// src/date-time-field/date-time-field.tsx
|
|
1658
|
-
function
|
|
1659
|
-
let h = s?.date ?? `${e}: data`, g = s?.time ?? `${e}: hora (24 horas)`, [_ = "", v = ""] = r.split("T"), [y, b] =
|
|
1663
|
+
function it({ label: e, value: r, onChange: i, onBlur: a, locale: o = "pt-BR", labels: s, today: c, disabled: l, help: u, error: d, className: p, ...m }) {
|
|
1664
|
+
let h = s?.date ?? `${e}: data`, g = s?.time ?? `${e}: hora (24 horas)`, [_ = "", v = ""] = r.split("T"), [y, b] = f(_), [x, S] = f(v), C = y && x ? `${y}T${x}` : "", [w, T] = f(r);
|
|
1660
1665
|
if (w !== r && (T(r), r !== C)) {
|
|
1661
1666
|
let [e = "", t = ""] = r.split("T");
|
|
1662
1667
|
b(e), S(t);
|
|
@@ -1666,15 +1671,15 @@ function _e({ label: e, value: r, onChange: i, onBlur: a, locale: o = "pt-BR", l
|
|
|
1666
1671
|
};
|
|
1667
1672
|
return /* @__PURE__ */ n("fieldset", {
|
|
1668
1673
|
...m,
|
|
1669
|
-
className: [
|
|
1674
|
+
className: [rt.root, p].filter(Boolean).join(" "),
|
|
1670
1675
|
children: [
|
|
1671
1676
|
/* @__PURE__ */ t("legend", {
|
|
1672
|
-
className:
|
|
1677
|
+
className: rt.legend,
|
|
1673
1678
|
children: e
|
|
1674
1679
|
}),
|
|
1675
1680
|
/* @__PURE__ */ n("div", {
|
|
1676
|
-
className:
|
|
1677
|
-
children: [/* @__PURE__ */ t(
|
|
1681
|
+
className: rt.row,
|
|
1682
|
+
children: [/* @__PURE__ */ t(Ze, {
|
|
1678
1683
|
label: h,
|
|
1679
1684
|
hideLabel: !0,
|
|
1680
1685
|
value: y,
|
|
@@ -1685,9 +1690,9 @@ function _e({ label: e, value: r, onChange: i, onBlur: a, locale: o = "pt-BR", l
|
|
|
1685
1690
|
locale: o,
|
|
1686
1691
|
labels: s ?? {},
|
|
1687
1692
|
...c ? { today: c } : {},
|
|
1688
|
-
...
|
|
1689
|
-
...
|
|
1690
|
-
}), /* @__PURE__ */ t(
|
|
1693
|
+
...l === void 0 ? {} : { disabled: l },
|
|
1694
|
+
...d ? { error: d } : {}
|
|
1695
|
+
}), /* @__PURE__ */ t(nt, {
|
|
1691
1696
|
label: g,
|
|
1692
1697
|
hideLabel: !0,
|
|
1693
1698
|
value: x,
|
|
@@ -1696,44 +1701,44 @@ function _e({ label: e, value: r, onChange: i, onBlur: a, locale: o = "pt-BR", l
|
|
|
1696
1701
|
},
|
|
1697
1702
|
...a ? { onBlur: a } : {},
|
|
1698
1703
|
placeholder: s?.timePlaceholder ?? "hh:mm",
|
|
1699
|
-
...
|
|
1704
|
+
...l === void 0 ? {} : { disabled: l }
|
|
1700
1705
|
})]
|
|
1701
1706
|
}),
|
|
1702
|
-
|
|
1703
|
-
className:
|
|
1704
|
-
children:
|
|
1707
|
+
u ? /* @__PURE__ */ t("p", {
|
|
1708
|
+
className: rt.help,
|
|
1709
|
+
children: u
|
|
1705
1710
|
}) : null
|
|
1706
1711
|
]
|
|
1707
1712
|
});
|
|
1708
1713
|
}
|
|
1709
1714
|
// src/period-field/period.ts
|
|
1710
|
-
var
|
|
1711
|
-
function
|
|
1712
|
-
return `${String(e.getFullYear())}-${
|
|
1715
|
+
var at = (e) => String(e).padStart(2, "0");
|
|
1716
|
+
function ot(e) {
|
|
1717
|
+
return `${String(e.getFullYear())}-${at(e.getMonth() + 1)}-${at(e.getDate())}`;
|
|
1713
1718
|
}
|
|
1714
|
-
function
|
|
1719
|
+
function st(e) {
|
|
1715
1720
|
let [t = 1970, n = 1, r = 1] = e.split("-").map(Number);
|
|
1716
1721
|
return new Date(t, n - 1, r);
|
|
1717
1722
|
}
|
|
1718
|
-
function
|
|
1719
|
-
let n =
|
|
1720
|
-
return
|
|
1723
|
+
function ct(e, t) {
|
|
1724
|
+
let n = st(e);
|
|
1725
|
+
return ot(new Date(n.getFullYear(), n.getMonth(), n.getDate() + t));
|
|
1721
1726
|
}
|
|
1722
|
-
function
|
|
1727
|
+
function lt(e, t, n = []) {
|
|
1723
1728
|
if (e.preset === "custom") return {
|
|
1724
1729
|
from: e.from ?? t,
|
|
1725
1730
|
to: e.to ?? e.from ?? t
|
|
1726
1731
|
};
|
|
1727
1732
|
let r = n.find((t) => t.id === e.preset)?.range;
|
|
1728
1733
|
return r === void 0 ? null : typeof r == "function" ? r(t) : r < 0 ? {
|
|
1729
|
-
from:
|
|
1734
|
+
from: ct(t, r),
|
|
1730
1735
|
to: t
|
|
1731
1736
|
} : {
|
|
1732
1737
|
from: t,
|
|
1733
|
-
to:
|
|
1738
|
+
to: ct(t, r)
|
|
1734
1739
|
};
|
|
1735
1740
|
}
|
|
1736
|
-
var
|
|
1741
|
+
var X = {
|
|
1737
1742
|
root: "_root_lfjll_1",
|
|
1738
1743
|
label: "_label_lfjll_8",
|
|
1739
1744
|
srOnly: "_srOnly_lfjll_17",
|
|
@@ -1746,7 +1751,7 @@ var Q = {
|
|
|
1746
1751
|
customTitle: "_customTitle_lfjll_95",
|
|
1747
1752
|
summary: "_summary_lfjll_105",
|
|
1748
1753
|
error: "_error_lfjll_112"
|
|
1749
|
-
},
|
|
1754
|
+
}, ut = {
|
|
1750
1755
|
title: "Escolher período",
|
|
1751
1756
|
custom: "Personalizado",
|
|
1752
1757
|
apply: "Aplicar",
|
|
@@ -1756,12 +1761,12 @@ var Q = {
|
|
|
1756
1761
|
previous: "Mês anterior",
|
|
1757
1762
|
next: "Próximo mês",
|
|
1758
1763
|
todayMarker: "hoje"
|
|
1759
|
-
},
|
|
1760
|
-
function
|
|
1764
|
+
}, dt = 8;
|
|
1765
|
+
function ft() {
|
|
1761
1766
|
let e = /* @__PURE__ */ new Date(), t = (e) => String(e).padStart(2, "0");
|
|
1762
1767
|
return `${String(e.getFullYear())}-${t(e.getMonth() + 1)}-${t(e.getDate())}`;
|
|
1763
1768
|
}
|
|
1764
|
-
function
|
|
1769
|
+
function pt() {
|
|
1765
1770
|
return /* @__PURE__ */ n("svg", {
|
|
1766
1771
|
viewBox: "0 0 24 24",
|
|
1767
1772
|
width: "16",
|
|
@@ -1782,173 +1787,173 @@ function Ee() {
|
|
|
1782
1787
|
}), /* @__PURE__ */ t("path", { d: "M16 2v4M8 2v4M3 10h18" })]
|
|
1783
1788
|
});
|
|
1784
1789
|
}
|
|
1785
|
-
function
|
|
1786
|
-
let
|
|
1787
|
-
...
|
|
1788
|
-
...
|
|
1789
|
-
},
|
|
1790
|
-
|
|
1791
|
-
let
|
|
1790
|
+
function mt({ label: r, labelVisible: i = !0, value: a, onChange: u, presets: p, allowCustom: m = !0, placement: h, today: g, locale: _ = "pt-BR", labels: v, name: y, className: b, style: x, ref: S, ...C }) {
|
|
1791
|
+
let w = s(), T = g ?? ft(), E = {
|
|
1792
|
+
...ut,
|
|
1793
|
+
...v
|
|
1794
|
+
}, D = d(null), O = d(null);
|
|
1795
|
+
c(S, () => O.current, []);
|
|
1796
|
+
let k = d(null), [A, j] = f(!1), [M, N] = f({ from: "" }), [P, F] = f(T.slice(0, 7)), [ee, I] = f(!1), L = new Intl.DateTimeFormat(_), R = (e) => {
|
|
1792
1797
|
let [t = 1970, n = 1, r = 1] = e.split("-").map(Number);
|
|
1793
|
-
return
|
|
1794
|
-
},
|
|
1795
|
-
function
|
|
1796
|
-
|
|
1798
|
+
return L.format(new Date(t, n - 1, r));
|
|
1799
|
+
}, z = lt(a, T, p), B = a.preset === "custom" && a.from && a.to ? `${R(a.from)} – ${R(a.to)}` : a.preset === "custom" ? E.custom : p.find((e) => e.id === a.preset)?.label ?? "";
|
|
1800
|
+
function te(e) {
|
|
1801
|
+
j(!1), e && O.current?.focus();
|
|
1797
1802
|
}
|
|
1798
|
-
function
|
|
1799
|
-
let e =
|
|
1800
|
-
|
|
1801
|
-
from:
|
|
1802
|
-
...
|
|
1803
|
-
} : { from: "" }),
|
|
1803
|
+
function ne() {
|
|
1804
|
+
let e = a.preset === "custom" && a.from ? a.from : T;
|
|
1805
|
+
N(a.preset === "custom" && a.from ? {
|
|
1806
|
+
from: a.from,
|
|
1807
|
+
...a.to ? { to: a.to } : {}
|
|
1808
|
+
} : { from: "" }), F(e.slice(0, 7)), I(!1), j(!0);
|
|
1804
1809
|
}
|
|
1805
|
-
|
|
1806
|
-
if (!
|
|
1810
|
+
l(() => {
|
|
1811
|
+
if (!A) return;
|
|
1807
1812
|
let e = () => {
|
|
1808
|
-
let e =
|
|
1813
|
+
let e = k.current, t = O.current;
|
|
1809
1814
|
if (!e || !t) return;
|
|
1810
1815
|
let n = t.getBoundingClientRect();
|
|
1811
1816
|
e.style.maxHeight = `${String(window.innerHeight - 16)}px`;
|
|
1812
|
-
let r = e.offsetWidth, i = e.offsetHeight, a =
|
|
1817
|
+
let r = e.offsetWidth, i = e.offsetHeight, a = h === "form" ? n.left + (n.width - r) / 2 : n.right - r, o = Math.max(dt, Math.min(a, window.innerWidth - r - dt)), s = n.bottom + 6, c = s + i <= window.innerHeight - dt ? s : Math.max(dt, window.innerHeight - dt - i);
|
|
1813
1818
|
e.style.left = `${String(o)}px`, e.style.top = `${String(c)}px`;
|
|
1814
1819
|
};
|
|
1815
1820
|
return e(), window.addEventListener("resize", e), document.addEventListener("scroll", e, !0), () => {
|
|
1816
1821
|
window.removeEventListener("resize", e), document.removeEventListener("scroll", e, !0);
|
|
1817
1822
|
};
|
|
1818
|
-
}, [
|
|
1819
|
-
if (!
|
|
1820
|
-
|
|
1823
|
+
}, [A, h]), o(() => {
|
|
1824
|
+
if (!A) return;
|
|
1825
|
+
k.current?.querySelector("[aria-pressed=\"true\"]")?.focus();
|
|
1821
1826
|
let e = (e) => {
|
|
1822
|
-
|
|
1827
|
+
D.current?.contains(e.target) || j(!1);
|
|
1823
1828
|
}, t = (e) => {
|
|
1824
|
-
e.key === "Escape" && (e.preventDefault(), e.stopPropagation(),
|
|
1829
|
+
e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), te(!0));
|
|
1825
1830
|
};
|
|
1826
1831
|
return document.addEventListener("pointerdown", e, !0), document.addEventListener("keydown", t, !0), () => {
|
|
1827
1832
|
document.removeEventListener("pointerdown", e, !0), document.removeEventListener("keydown", t, !0);
|
|
1828
1833
|
};
|
|
1829
|
-
}, [
|
|
1830
|
-
function
|
|
1831
|
-
|
|
1834
|
+
}, [A]);
|
|
1835
|
+
function re(e) {
|
|
1836
|
+
u({ preset: e.id }), te(!0);
|
|
1832
1837
|
}
|
|
1833
|
-
function
|
|
1834
|
-
e.preventDefault(),
|
|
1838
|
+
function ie(e) {
|
|
1839
|
+
e.preventDefault(), M.from ? (u({
|
|
1835
1840
|
preset: "custom",
|
|
1836
|
-
from:
|
|
1837
|
-
to:
|
|
1838
|
-
}),
|
|
1841
|
+
from: M.from,
|
|
1842
|
+
to: M.to ?? M.from
|
|
1843
|
+
}), te(!0)) : I(!0);
|
|
1839
1844
|
}
|
|
1840
|
-
let
|
|
1845
|
+
let V = M.from ? M.to ? `${R(M.from)} – ${R(M.to)}` : `${R(M.from)} · ${E.lastDay}` : E.firstDay;
|
|
1841
1846
|
return /* @__PURE__ */ n("div", {
|
|
1842
|
-
className:
|
|
1843
|
-
ref:
|
|
1847
|
+
className: X.root,
|
|
1848
|
+
ref: D,
|
|
1844
1849
|
children: [
|
|
1845
|
-
|
|
1846
|
-
id: `${
|
|
1847
|
-
className:
|
|
1848
|
-
children:
|
|
1850
|
+
r ? /* @__PURE__ */ t("span", {
|
|
1851
|
+
id: `${w}-label`,
|
|
1852
|
+
className: i ? X.label : X.srOnly,
|
|
1853
|
+
children: r
|
|
1849
1854
|
}) : null,
|
|
1850
1855
|
/* @__PURE__ */ n("div", {
|
|
1851
|
-
className:
|
|
1856
|
+
className: X.wrap,
|
|
1852
1857
|
children: [/* @__PURE__ */ n("button", {
|
|
1853
|
-
...
|
|
1854
|
-
ref:
|
|
1858
|
+
...C,
|
|
1859
|
+
ref: O,
|
|
1855
1860
|
type: "button",
|
|
1856
|
-
className: [
|
|
1857
|
-
style:
|
|
1861
|
+
className: [X.control, b].filter(Boolean).join(" "),
|
|
1862
|
+
style: x,
|
|
1858
1863
|
"aria-haspopup": "dialog",
|
|
1859
|
-
"aria-expanded":
|
|
1860
|
-
...
|
|
1864
|
+
"aria-expanded": A,
|
|
1865
|
+
...r ? { "aria-labelledby": `${w}-label ${w}-value` } : {},
|
|
1861
1866
|
onClick: () => {
|
|
1862
|
-
|
|
1867
|
+
A ? te(!1) : ne();
|
|
1863
1868
|
},
|
|
1864
|
-
children: [/* @__PURE__ */ t(
|
|
1865
|
-
id: `${
|
|
1866
|
-
children:
|
|
1869
|
+
children: [/* @__PURE__ */ t(pt, {}), /* @__PURE__ */ t("span", {
|
|
1870
|
+
id: `${w}-value`,
|
|
1871
|
+
children: B
|
|
1867
1872
|
})]
|
|
1868
|
-
}),
|
|
1869
|
-
ref:
|
|
1873
|
+
}), A ? /* @__PURE__ */ n("div", {
|
|
1874
|
+
ref: k,
|
|
1870
1875
|
role: "dialog",
|
|
1871
|
-
"aria-label":
|
|
1872
|
-
className:
|
|
1876
|
+
"aria-label": E.title,
|
|
1877
|
+
className: X.popover,
|
|
1873
1878
|
children: [/* @__PURE__ */ t("div", {
|
|
1874
|
-
className:
|
|
1875
|
-
children:
|
|
1879
|
+
className: X.presets,
|
|
1880
|
+
children: p.map((e) => /* @__PURE__ */ t(H, {
|
|
1876
1881
|
variant: "ghost",
|
|
1877
|
-
className:
|
|
1878
|
-
"aria-pressed":
|
|
1882
|
+
className: X.preset,
|
|
1883
|
+
"aria-pressed": a.preset === e.id,
|
|
1879
1884
|
onClick: () => {
|
|
1880
|
-
|
|
1885
|
+
re(e);
|
|
1881
1886
|
},
|
|
1882
1887
|
children: e.label
|
|
1883
1888
|
}, e.id))
|
|
1884
|
-
}),
|
|
1885
|
-
className:
|
|
1889
|
+
}), m ? /* @__PURE__ */ n("form", {
|
|
1890
|
+
className: X.custom,
|
|
1886
1891
|
noValidate: !0,
|
|
1887
|
-
onSubmit:
|
|
1892
|
+
onSubmit: ie,
|
|
1888
1893
|
children: [
|
|
1889
1894
|
/* @__PURE__ */ t("p", {
|
|
1890
|
-
className:
|
|
1891
|
-
children:
|
|
1895
|
+
className: X.customTitle,
|
|
1896
|
+
children: E.custom
|
|
1892
1897
|
}),
|
|
1893
|
-
/* @__PURE__ */ t(
|
|
1898
|
+
/* @__PURE__ */ t(Ge, {
|
|
1894
1899
|
mode: "range",
|
|
1895
|
-
month:
|
|
1896
|
-
onMonthChange:
|
|
1897
|
-
value:
|
|
1900
|
+
month: P,
|
|
1901
|
+
onMonthChange: F,
|
|
1902
|
+
value: M,
|
|
1898
1903
|
onChange: (e) => {
|
|
1899
|
-
|
|
1904
|
+
N(e), I(!1);
|
|
1900
1905
|
},
|
|
1901
|
-
today:
|
|
1902
|
-
locale:
|
|
1906
|
+
today: T,
|
|
1907
|
+
locale: _,
|
|
1903
1908
|
labels: {
|
|
1904
|
-
previous:
|
|
1905
|
-
next:
|
|
1906
|
-
today:
|
|
1909
|
+
previous: E.previous,
|
|
1910
|
+
next: E.next,
|
|
1911
|
+
today: E.todayMarker
|
|
1907
1912
|
}
|
|
1908
1913
|
}),
|
|
1909
1914
|
/* @__PURE__ */ t("p", {
|
|
1910
|
-
className:
|
|
1915
|
+
className: X.summary,
|
|
1911
1916
|
"aria-live": "polite",
|
|
1912
|
-
children:
|
|
1917
|
+
children: V
|
|
1913
1918
|
}),
|
|
1914
|
-
|
|
1919
|
+
ee ? /* @__PURE__ */ t("p", {
|
|
1915
1920
|
role: "alert",
|
|
1916
|
-
className:
|
|
1917
|
-
children:
|
|
1921
|
+
className: X.error,
|
|
1922
|
+
children: E.firstDayError
|
|
1918
1923
|
}) : null,
|
|
1919
|
-
/* @__PURE__ */ t(
|
|
1924
|
+
/* @__PURE__ */ t(H, {
|
|
1920
1925
|
variant: "primary",
|
|
1921
1926
|
type: "submit",
|
|
1922
|
-
children:
|
|
1927
|
+
children: E.apply
|
|
1923
1928
|
})
|
|
1924
1929
|
]
|
|
1925
1930
|
}) : null]
|
|
1926
1931
|
}) : null]
|
|
1927
1932
|
}),
|
|
1928
|
-
|
|
1933
|
+
y ? /* @__PURE__ */ n(e, { children: [
|
|
1929
1934
|
/* @__PURE__ */ t("input", {
|
|
1930
1935
|
type: "hidden",
|
|
1931
|
-
name:
|
|
1932
|
-
value:
|
|
1936
|
+
name: y,
|
|
1937
|
+
value: a.preset
|
|
1933
1938
|
}),
|
|
1934
1939
|
/* @__PURE__ */ t("input", {
|
|
1935
1940
|
type: "hidden",
|
|
1936
|
-
name: `${
|
|
1937
|
-
value:
|
|
1941
|
+
name: `${y}From`,
|
|
1942
|
+
value: z?.from ?? ""
|
|
1938
1943
|
}),
|
|
1939
1944
|
/* @__PURE__ */ t("input", {
|
|
1940
1945
|
type: "hidden",
|
|
1941
|
-
name: `${
|
|
1942
|
-
value:
|
|
1946
|
+
name: `${y}To`,
|
|
1947
|
+
value: z?.to ?? ""
|
|
1943
1948
|
})
|
|
1944
1949
|
] }) : null
|
|
1945
1950
|
]
|
|
1946
1951
|
});
|
|
1947
1952
|
}
|
|
1948
1953
|
// src/money-field/money-mask.ts
|
|
1949
|
-
var
|
|
1950
|
-
function
|
|
1951
|
-
let n = `${e}|${t}`, r =
|
|
1954
|
+
var ht = /* @__PURE__ */ new Map();
|
|
1955
|
+
function gt(e, t) {
|
|
1956
|
+
let n = `${e}|${t}`, r = ht.get(n);
|
|
1952
1957
|
if (r) return r;
|
|
1953
1958
|
let i = new Intl.NumberFormat(e, {
|
|
1954
1959
|
style: "currency",
|
|
@@ -1963,33 +1968,33 @@ function ke(e, t) {
|
|
|
1963
1968
|
group: c.find((e) => e.type === "group")?.value ?? "",
|
|
1964
1969
|
decimal: c.find((e) => e.type === "decimal")?.value ?? ","
|
|
1965
1970
|
};
|
|
1966
|
-
return
|
|
1971
|
+
return ht.set(n, l), l;
|
|
1967
1972
|
}
|
|
1968
|
-
function
|
|
1973
|
+
function _t(e, t) {
|
|
1969
1974
|
let n = e;
|
|
1970
1975
|
return t.prefix.trim() !== "" && (n = n.split(t.prefix.trim()).join("")), t.suffix.trim() !== "" && (n = n.split(t.suffix.trim()).join("")), n;
|
|
1971
1976
|
}
|
|
1972
|
-
function
|
|
1973
|
-
let n =
|
|
1977
|
+
function vt(e, t) {
|
|
1978
|
+
let n = _t(e, t), r = n.lastIndexOf(t.decimal), i = r >= 0, a = i ? n.slice(0, r) : n, o = i ? n.slice(r + t.decimal.length) : "";
|
|
1974
1979
|
return {
|
|
1975
1980
|
whole: a.replace(/\D/g, "").replace(/^0+/, ""),
|
|
1976
1981
|
fraction: o.replace(/\D/g, "").slice(0, 2),
|
|
1977
1982
|
hasDecimal: i
|
|
1978
1983
|
};
|
|
1979
1984
|
}
|
|
1980
|
-
function
|
|
1981
|
-
let r =
|
|
1985
|
+
function yt(e, t, n) {
|
|
1986
|
+
let r = gt(t, n), { whole: i, fraction: a, hasDecimal: o } = vt(e, r);
|
|
1982
1987
|
if (i === "" && a === "" && !o) return "";
|
|
1983
1988
|
let s = (i === "" ? "0" : i).replace(/\B(?=(\d{3})+(?!\d))/g, r.group);
|
|
1984
1989
|
return `${r.prefix}${s}${o ? r.decimal + a : ""}${r.suffix}`;
|
|
1985
1990
|
}
|
|
1986
|
-
function
|
|
1987
|
-
let { whole: r, fraction: i } =
|
|
1991
|
+
function bt(e, t, n) {
|
|
1992
|
+
let { whole: r, fraction: i } = vt(e, gt(t, n));
|
|
1988
1993
|
if (r === "" && i === "") return null;
|
|
1989
1994
|
let a = Number(r === "" ? "0" : r) * 100 + Number(i.padEnd(2, "0"));
|
|
1990
1995
|
return Number.isSafeInteger(a) ? a : null;
|
|
1991
1996
|
}
|
|
1992
|
-
function
|
|
1997
|
+
function xt(e, t, n) {
|
|
1993
1998
|
return new Intl.NumberFormat(t, {
|
|
1994
1999
|
style: "currency",
|
|
1995
2000
|
currency: n,
|
|
@@ -1997,35 +2002,35 @@ function Pe(e, t, n) {
|
|
|
1997
2002
|
maximumFractionDigits: 2
|
|
1998
2003
|
}).format(e / 100);
|
|
1999
2004
|
}
|
|
2000
|
-
var
|
|
2005
|
+
var St = { root: "_root_13auc_2" };
|
|
2001
2006
|
// src/money-field/money-field.tsx
|
|
2002
|
-
function
|
|
2003
|
-
let [c,
|
|
2007
|
+
function Ct({ valueCents: e, onChange: n, locale: r = "pt-BR", currency: i = "BRL", onBlur: a, className: o, ...s }) {
|
|
2008
|
+
let [c, l] = f(() => e === null ? "" : xt(e, r, i)), [u, d] = f({
|
|
2004
2009
|
valueCents: e,
|
|
2005
2010
|
locale: r,
|
|
2006
2011
|
currency: i
|
|
2007
2012
|
});
|
|
2008
|
-
return (
|
|
2013
|
+
return (u.valueCents !== e || u.locale !== r || u.currency !== i) && (d({
|
|
2009
2014
|
valueCents: e,
|
|
2010
2015
|
locale: r,
|
|
2011
2016
|
currency: i
|
|
2012
|
-
}),
|
|
2017
|
+
}), bt(c, r, i) !== e && l(e === null ? "" : xt(e, r, i))), /* @__PURE__ */ t(de, {
|
|
2013
2018
|
...s,
|
|
2014
|
-
className: [
|
|
2019
|
+
className: [St.root, o].filter(Boolean).join(" "),
|
|
2015
2020
|
inputMode: "decimal",
|
|
2016
2021
|
autoComplete: "off",
|
|
2017
2022
|
value: c,
|
|
2018
2023
|
onChange: (e) => {
|
|
2019
|
-
let t =
|
|
2020
|
-
|
|
2024
|
+
let t = yt(e.target.value, r, i);
|
|
2025
|
+
l(t), n(bt(t, r, i));
|
|
2021
2026
|
},
|
|
2022
2027
|
onBlur: (e) => {
|
|
2023
|
-
let t =
|
|
2024
|
-
t !== null &&
|
|
2028
|
+
let t = bt(c, r, i);
|
|
2029
|
+
t !== null && l(xt(t, r, i)), a?.(e);
|
|
2025
2030
|
}
|
|
2026
2031
|
});
|
|
2027
2032
|
}
|
|
2028
|
-
var
|
|
2033
|
+
var wt = {
|
|
2029
2034
|
root: "_root_1v7mn_1",
|
|
2030
2035
|
primary: "_primary_1v7mn_11",
|
|
2031
2036
|
accent: "_accent_1v7mn_16",
|
|
@@ -2035,10 +2040,10 @@ var Le = {
|
|
|
2035
2040
|
info: "_info_1v7mn_36"
|
|
2036
2041
|
};
|
|
2037
2042
|
// src/card/card.tsx
|
|
2038
|
-
function
|
|
2043
|
+
function Tt({ as: e = "div", tone: n = "default", className: r, ...i }) {
|
|
2039
2044
|
let a = [
|
|
2040
|
-
|
|
2041
|
-
n === "default" ? null :
|
|
2045
|
+
wt.root,
|
|
2046
|
+
n === "default" ? null : wt[n],
|
|
2042
2047
|
r
|
|
2043
2048
|
].filter(Boolean).join(" ");
|
|
2044
2049
|
return /* @__PURE__ */ t(e, {
|
|
@@ -2046,7 +2051,7 @@ function Re({ as: e = "div", tone: n = "default", className: r, ...i }) {
|
|
|
2046
2051
|
className: a
|
|
2047
2052
|
});
|
|
2048
2053
|
}
|
|
2049
|
-
var
|
|
2054
|
+
var Et = {
|
|
2050
2055
|
root: "_root_rjx3r_1",
|
|
2051
2056
|
titleBlock: "_titleBlock_rjx3r_11",
|
|
2052
2057
|
back: "_back_rjx3r_15",
|
|
@@ -2058,11 +2063,11 @@ var ze = {
|
|
|
2058
2063
|
actions: "_actions_rjx3r_69"
|
|
2059
2064
|
};
|
|
2060
2065
|
// src/page-header/page-header.tsx
|
|
2061
|
-
function
|
|
2066
|
+
function Dt({ title: e, eyebrow: r, subtitle: i, actions: a, back: o, stuck: s = !1, compact: c = !1, headingRef: l, className: u, ...d }) {
|
|
2062
2067
|
let f = [
|
|
2063
|
-
|
|
2064
|
-
s ?
|
|
2065
|
-
c ?
|
|
2068
|
+
Et.root,
|
|
2069
|
+
s ? Et.stuck : "",
|
|
2070
|
+
c ? Et.compact : "",
|
|
2066
2071
|
u
|
|
2067
2072
|
].filter(Boolean).join(" ");
|
|
2068
2073
|
return /* @__PURE__ */ n("header", {
|
|
@@ -2071,50 +2076,50 @@ function Be({ title: e, eyebrow: r, subtitle: i, actions: a, back: o, stuck: s =
|
|
|
2071
2076
|
...s ? { "data-stuck": "" } : {},
|
|
2072
2077
|
...c ? { "data-compact": "" } : {},
|
|
2073
2078
|
children: [/* @__PURE__ */ n("div", {
|
|
2074
|
-
className:
|
|
2079
|
+
className: Et.titleBlock,
|
|
2075
2080
|
children: [
|
|
2076
2081
|
o ? /* @__PURE__ */ t("div", {
|
|
2077
|
-
className:
|
|
2082
|
+
className: Et.back,
|
|
2078
2083
|
children: o
|
|
2079
2084
|
}) : null,
|
|
2080
2085
|
r ? /* @__PURE__ */ t("p", {
|
|
2081
|
-
className:
|
|
2086
|
+
className: Et.eyebrow,
|
|
2082
2087
|
children: r
|
|
2083
2088
|
}) : null,
|
|
2084
2089
|
/* @__PURE__ */ t("h1", {
|
|
2085
2090
|
ref: l,
|
|
2086
2091
|
tabIndex: -1,
|
|
2087
2092
|
"data-page-heading": "",
|
|
2088
|
-
className:
|
|
2093
|
+
className: Et.pageHeading,
|
|
2089
2094
|
children: e
|
|
2090
2095
|
}),
|
|
2091
2096
|
i && !c ? /* @__PURE__ */ t("p", {
|
|
2092
|
-
className:
|
|
2097
|
+
className: Et.subtitle,
|
|
2093
2098
|
children: i
|
|
2094
2099
|
}) : null
|
|
2095
2100
|
]
|
|
2096
2101
|
}), a ? /* @__PURE__ */ t("div", {
|
|
2097
|
-
className:
|
|
2102
|
+
className: Et.actions,
|
|
2098
2103
|
children: a
|
|
2099
2104
|
}) : null]
|
|
2100
2105
|
});
|
|
2101
2106
|
}
|
|
2102
|
-
var
|
|
2107
|
+
var Ot = {
|
|
2103
2108
|
root: "_root_1akxr_1",
|
|
2104
2109
|
search: "_search_1akxr_9",
|
|
2105
2110
|
filters: "_filters_1akxr_14",
|
|
2106
2111
|
trailing: "_trailing_1akxr_21"
|
|
2107
2112
|
};
|
|
2108
2113
|
// src/toolbar/toolbar.tsx
|
|
2109
|
-
function
|
|
2114
|
+
function kt({ searchLabel: e = "Buscar", searchValue: r, onSearchChange: i, searchPlaceholder: a, filters: o, children: s, className: c, ...l }) {
|
|
2110
2115
|
return /* @__PURE__ */ n("div", {
|
|
2111
2116
|
...l,
|
|
2112
|
-
className: [
|
|
2117
|
+
className: [Ot.root, c].filter(Boolean).join(" "),
|
|
2113
2118
|
children: [
|
|
2114
2119
|
/* @__PURE__ */ t("div", {
|
|
2115
2120
|
role: "search",
|
|
2116
|
-
className:
|
|
2117
|
-
children: /* @__PURE__ */ t(
|
|
2121
|
+
className: Ot.search,
|
|
2122
|
+
children: /* @__PURE__ */ t(de, {
|
|
2118
2123
|
type: "search",
|
|
2119
2124
|
label: e,
|
|
2120
2125
|
placeholder: a,
|
|
@@ -2125,26 +2130,26 @@ function He({ searchLabel: e = "Buscar", searchValue: r, onSearchChange: i, sear
|
|
|
2125
2130
|
})
|
|
2126
2131
|
}),
|
|
2127
2132
|
o ? /* @__PURE__ */ t("div", {
|
|
2128
|
-
className:
|
|
2133
|
+
className: Ot.filters,
|
|
2129
2134
|
children: o
|
|
2130
2135
|
}) : null,
|
|
2131
2136
|
s ? /* @__PURE__ */ t("div", {
|
|
2132
|
-
className:
|
|
2137
|
+
className: Ot.trailing,
|
|
2133
2138
|
children: s
|
|
2134
2139
|
}) : null
|
|
2135
2140
|
]
|
|
2136
2141
|
});
|
|
2137
2142
|
}
|
|
2138
|
-
var
|
|
2143
|
+
var At = {
|
|
2139
2144
|
list: "_list_jx4ch_1",
|
|
2140
2145
|
tab: "_tab_jx4ch_9",
|
|
2141
2146
|
panel: "_panel_jx4ch_37"
|
|
2142
2147
|
};
|
|
2143
2148
|
// src/tabs/tabs.tsx
|
|
2144
|
-
function
|
|
2145
|
-
let
|
|
2149
|
+
function jt({ label: e, tabs: r, value: i, defaultValue: a, onChange: o, ...c }) {
|
|
2150
|
+
let l = s(), [u, p] = f(a ?? r[0]?.id), m = d({}), [h, g] = f(void 0), _ = i ?? u, v = h ?? _;
|
|
2146
2151
|
function y(e) {
|
|
2147
|
-
p(e),
|
|
2152
|
+
p(e), o?.(e);
|
|
2148
2153
|
}
|
|
2149
2154
|
function b(e) {
|
|
2150
2155
|
let t = r[(e + r.length) % r.length];
|
|
@@ -2160,11 +2165,11 @@ function We({ label: e, tabs: r, value: a, defaultValue: o, onChange: s, ...u })
|
|
|
2160
2165
|
n !== void 0 && (e.preventDefault(), b(n));
|
|
2161
2166
|
}
|
|
2162
2167
|
return /* @__PURE__ */ n("div", {
|
|
2163
|
-
...
|
|
2168
|
+
...c,
|
|
2164
2169
|
children: [/* @__PURE__ */ t("div", {
|
|
2165
2170
|
role: "tablist",
|
|
2166
2171
|
"aria-label": e,
|
|
2167
|
-
className:
|
|
2172
|
+
className: At.list,
|
|
2168
2173
|
children: r.map((e, n) => {
|
|
2169
2174
|
let r = e.id === _;
|
|
2170
2175
|
return /* @__PURE__ */ t("button", {
|
|
@@ -2173,11 +2178,11 @@ function We({ label: e, tabs: r, value: a, defaultValue: o, onChange: s, ...u })
|
|
|
2173
2178
|
},
|
|
2174
2179
|
type: "button",
|
|
2175
2180
|
role: "tab",
|
|
2176
|
-
id: `${
|
|
2181
|
+
id: `${l}-tab-${e.id}`,
|
|
2177
2182
|
"aria-selected": r,
|
|
2178
|
-
"aria-controls": `${
|
|
2183
|
+
"aria-controls": `${l}-panel-${e.id}`,
|
|
2179
2184
|
tabIndex: e.id === v ? 0 : -1,
|
|
2180
|
-
className:
|
|
2185
|
+
className: At.tab,
|
|
2181
2186
|
onClick: () => {
|
|
2182
2187
|
y(e.id);
|
|
2183
2188
|
},
|
|
@@ -2195,31 +2200,31 @@ function We({ label: e, tabs: r, value: a, defaultValue: o, onChange: s, ...u })
|
|
|
2195
2200
|
})
|
|
2196
2201
|
}), r.map((e) => /* @__PURE__ */ t("div", {
|
|
2197
2202
|
role: "tabpanel",
|
|
2198
|
-
id: `${
|
|
2199
|
-
"aria-labelledby": `${
|
|
2203
|
+
id: `${l}-panel-${e.id}`,
|
|
2204
|
+
"aria-labelledby": `${l}-tab-${e.id}`,
|
|
2200
2205
|
hidden: e.id !== _,
|
|
2201
|
-
className:
|
|
2206
|
+
className: At.panel,
|
|
2202
2207
|
children: e.id === _ ? e.panel : null
|
|
2203
2208
|
}, e.id))]
|
|
2204
2209
|
});
|
|
2205
2210
|
}
|
|
2206
|
-
var
|
|
2211
|
+
var Mt = {
|
|
2207
2212
|
root: "_root_1336w_1",
|
|
2208
2213
|
option: "_option_1336w_12"
|
|
2209
2214
|
};
|
|
2210
2215
|
// src/view-switcher/view-switcher.tsx
|
|
2211
|
-
function
|
|
2216
|
+
function Nt({ label: e, options: n, value: r, onChange: i, className: a, ...o }) {
|
|
2212
2217
|
return /* @__PURE__ */ t("div", {
|
|
2213
2218
|
...o,
|
|
2214
2219
|
role: "group",
|
|
2215
2220
|
"aria-label": e,
|
|
2216
|
-
className: [
|
|
2221
|
+
className: [Mt.root, a].filter(Boolean).join(" "),
|
|
2217
2222
|
children: n.map((e) => /* @__PURE__ */ t("button", {
|
|
2218
2223
|
type: "button",
|
|
2219
2224
|
"aria-pressed": e.value === r,
|
|
2220
2225
|
"aria-label": e.label,
|
|
2221
2226
|
title: e.label,
|
|
2222
|
-
className:
|
|
2227
|
+
className: Mt.option,
|
|
2223
2228
|
onClick: () => {
|
|
2224
2229
|
i(e.value);
|
|
2225
2230
|
},
|
|
@@ -2227,27 +2232,27 @@ function Ke({ label: e, options: n, value: r, onChange: i, className: a, ...o })
|
|
|
2227
2232
|
}, e.value))
|
|
2228
2233
|
});
|
|
2229
2234
|
}
|
|
2230
|
-
var
|
|
2235
|
+
var Pt = {
|
|
2231
2236
|
grid: "_grid_11vah_2",
|
|
2232
2237
|
actions: "_actions_11vah_21"
|
|
2233
2238
|
};
|
|
2234
2239
|
// src/form-layout/form-layout.tsx
|
|
2235
|
-
function
|
|
2240
|
+
function Ft({ className: e, ...n }) {
|
|
2236
2241
|
return /* @__PURE__ */ t("div", {
|
|
2237
2242
|
...n,
|
|
2238
|
-
className: [
|
|
2243
|
+
className: [Pt.grid, e].filter(Boolean).join(" ")
|
|
2239
2244
|
});
|
|
2240
2245
|
}
|
|
2241
|
-
function
|
|
2246
|
+
function It({ cancelLabel: e = "Cancelar", submitLabel: r = "Salvar", onCancel: i, loading: a = !1, submitDisabled: o = !1, className: s, ...c }) {
|
|
2242
2247
|
return /* @__PURE__ */ n("div", {
|
|
2243
2248
|
...c,
|
|
2244
|
-
className: [
|
|
2249
|
+
className: [Pt.actions, s].filter(Boolean).join(" "),
|
|
2245
2250
|
"data-span": "full",
|
|
2246
|
-
children: [/* @__PURE__ */ t(
|
|
2251
|
+
children: [/* @__PURE__ */ t(H, {
|
|
2247
2252
|
variant: "muted",
|
|
2248
2253
|
onClick: i,
|
|
2249
2254
|
children: e
|
|
2250
|
-
}), /* @__PURE__ */ t(
|
|
2255
|
+
}), /* @__PURE__ */ t(H, {
|
|
2251
2256
|
variant: "primary",
|
|
2252
2257
|
type: "submit",
|
|
2253
2258
|
loading: a,
|
|
@@ -2256,105 +2261,105 @@ function Ye({ cancelLabel: e = "Cancelar", submitLabel: r = "Salvar", onCancel:
|
|
|
2256
2261
|
})]
|
|
2257
2262
|
});
|
|
2258
2263
|
}
|
|
2259
|
-
var
|
|
2264
|
+
var Lt = {
|
|
2260
2265
|
root: "_root_1n0kf_2",
|
|
2261
2266
|
wide: "_wide_1n0kf_13",
|
|
2262
2267
|
inner: "_inner_1n0kf_21",
|
|
2263
2268
|
title: "_title_1n0kf_25",
|
|
2264
2269
|
body: "_body_1n0kf_33",
|
|
2265
2270
|
actions: "_actions_1n0kf_37"
|
|
2266
|
-
},
|
|
2267
|
-
function
|
|
2268
|
-
return Array.from(e.querySelectorAll(
|
|
2271
|
+
}, Rt = "button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])";
|
|
2272
|
+
function zt(e) {
|
|
2273
|
+
return Array.from(e.querySelectorAll(Rt)).filter((e) => !e.hasAttribute("disabled"));
|
|
2269
2274
|
}
|
|
2270
|
-
function
|
|
2271
|
-
let v =
|
|
2272
|
-
|
|
2275
|
+
function Bt({ open: e, title: r, onClose: i, children: a, actions: l, role: u = "dialog", size: f = "default", closeOnBackdrop: p = !1, "aria-describedby": m, className: h, ref: g, ..._ }) {
|
|
2276
|
+
let v = s(), y = d(null);
|
|
2277
|
+
c(g, () => y.current), o(() => {
|
|
2273
2278
|
let t = y.current;
|
|
2274
2279
|
if (!t || !e) return;
|
|
2275
2280
|
let n = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
2276
2281
|
t.showModal();
|
|
2277
2282
|
let r = t.querySelector("[data-dialog-body]"), i = t.querySelector("[data-dialog-actions]");
|
|
2278
|
-
return (t.querySelector("[data-autofocus]") ?? (r ?
|
|
2283
|
+
return (t.querySelector("[data-autofocus]") ?? (r ? zt(r)[0] : void 0) ?? (i ? zt(i)[0] : void 0))?.focus(), () => {
|
|
2279
2284
|
t.close(), n?.focus();
|
|
2280
2285
|
};
|
|
2281
2286
|
}, [e]);
|
|
2282
2287
|
function b(e) {
|
|
2283
2288
|
if (_.onKeyDown?.(e), e.key === "Escape") {
|
|
2284
|
-
e.preventDefault(),
|
|
2289
|
+
e.preventDefault(), i();
|
|
2285
2290
|
return;
|
|
2286
2291
|
}
|
|
2287
2292
|
if (e.key !== "Tab") return;
|
|
2288
|
-
let t =
|
|
2293
|
+
let t = zt(e.currentTarget), n = t[0], r = t[t.length - 1];
|
|
2289
2294
|
n && r && (e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus()));
|
|
2290
2295
|
}
|
|
2291
2296
|
if (!e) return null;
|
|
2292
2297
|
let x = [
|
|
2293
|
-
|
|
2294
|
-
f === "wide" ?
|
|
2298
|
+
Lt.root,
|
|
2299
|
+
f === "wide" ? Lt.wide : "",
|
|
2295
2300
|
h
|
|
2296
2301
|
].filter(Boolean).join(" ");
|
|
2297
2302
|
return /* @__PURE__ */ t("dialog", {
|
|
2298
2303
|
..._,
|
|
2299
2304
|
ref: y,
|
|
2300
|
-
role:
|
|
2305
|
+
role: u,
|
|
2301
2306
|
"aria-labelledby": `${v}-title`,
|
|
2302
|
-
"aria-describedby": m ?? (
|
|
2307
|
+
"aria-describedby": m ?? (u === "alertdialog" ? `${v}-body` : void 0),
|
|
2303
2308
|
className: x,
|
|
2304
2309
|
onKeyDown: b,
|
|
2305
2310
|
onCancel: (e) => {
|
|
2306
|
-
_.onCancel?.(e), e.preventDefault(),
|
|
2311
|
+
_.onCancel?.(e), e.preventDefault(), i();
|
|
2307
2312
|
},
|
|
2308
2313
|
onClick: (e) => {
|
|
2309
|
-
_.onClick?.(e), p && e.target === e.currentTarget &&
|
|
2314
|
+
_.onClick?.(e), p && e.target === e.currentTarget && i();
|
|
2310
2315
|
},
|
|
2311
2316
|
children: /* @__PURE__ */ n("div", {
|
|
2312
|
-
className:
|
|
2317
|
+
className: Lt.inner,
|
|
2313
2318
|
children: [
|
|
2314
2319
|
/* @__PURE__ */ t("h2", {
|
|
2315
2320
|
id: `${v}-title`,
|
|
2316
|
-
className:
|
|
2317
|
-
children:
|
|
2321
|
+
className: Lt.title,
|
|
2322
|
+
children: r
|
|
2318
2323
|
}),
|
|
2319
2324
|
/* @__PURE__ */ t("div", {
|
|
2320
2325
|
id: `${v}-body`,
|
|
2321
|
-
className:
|
|
2326
|
+
className: Lt.body,
|
|
2322
2327
|
"data-dialog-body": "",
|
|
2323
|
-
children:
|
|
2328
|
+
children: a
|
|
2324
2329
|
}),
|
|
2325
2330
|
/* @__PURE__ */ t("div", {
|
|
2326
|
-
className:
|
|
2331
|
+
className: Lt.actions,
|
|
2327
2332
|
"data-dialog-actions": "",
|
|
2328
|
-
children:
|
|
2333
|
+
children: l
|
|
2329
2334
|
})
|
|
2330
2335
|
]
|
|
2331
2336
|
})
|
|
2332
2337
|
});
|
|
2333
2338
|
}
|
|
2334
|
-
var
|
|
2339
|
+
var Vt = { description: "_description_1ftx2_1" };
|
|
2335
2340
|
// src/confirm-dialog/confirm-dialog.tsx
|
|
2336
|
-
function
|
|
2337
|
-
return /* @__PURE__ */ t(
|
|
2341
|
+
function Ht({ description: r, confirmLabel: i = "Confirmar", cancelLabel: a = "Cancelar", onConfirm: o, onCancel: s, ...c }) {
|
|
2342
|
+
return /* @__PURE__ */ t(Bt, {
|
|
2338
2343
|
...c,
|
|
2339
2344
|
role: "alertdialog",
|
|
2340
2345
|
onClose: s,
|
|
2341
|
-
actions: /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(
|
|
2346
|
+
actions: /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(H, {
|
|
2342
2347
|
"data-autofocus": "",
|
|
2343
2348
|
variant: "secondary",
|
|
2344
2349
|
onClick: s,
|
|
2345
2350
|
children: a
|
|
2346
|
-
}), /* @__PURE__ */ t(
|
|
2351
|
+
}), /* @__PURE__ */ t(H, {
|
|
2347
2352
|
variant: "primary",
|
|
2348
2353
|
onClick: o,
|
|
2349
2354
|
children: i
|
|
2350
2355
|
})] }),
|
|
2351
2356
|
children: /* @__PURE__ */ t("p", {
|
|
2352
|
-
className:
|
|
2357
|
+
className: Vt.description,
|
|
2353
2358
|
children: r
|
|
2354
2359
|
})
|
|
2355
2360
|
});
|
|
2356
2361
|
}
|
|
2357
|
-
var
|
|
2362
|
+
var Ut = {
|
|
2358
2363
|
region: "_region_1l4ou_1",
|
|
2359
2364
|
root: "_root_1l4ou_14",
|
|
2360
2365
|
icon: "_icon_1l4ou_27",
|
|
@@ -2363,20 +2368,20 @@ var nt = {
|
|
|
2363
2368
|
success: "_success_1l4ou_48",
|
|
2364
2369
|
warning: "_warning_1l4ou_53",
|
|
2365
2370
|
danger: "_danger_1l4ou_58"
|
|
2366
|
-
},
|
|
2371
|
+
}, Wt = {
|
|
2367
2372
|
info: "Informação",
|
|
2368
2373
|
success: "Sucesso",
|
|
2369
2374
|
warning: "Atenção",
|
|
2370
2375
|
danger: "Erro"
|
|
2371
|
-
},
|
|
2376
|
+
}, Gt = {
|
|
2372
2377
|
info: ["M12 11v5M12 8h.01"],
|
|
2373
2378
|
success: ["M8 12l3 3 5-6"],
|
|
2374
2379
|
warning: ["M12 10v4M12 17h.01"],
|
|
2375
2380
|
danger: ["M9 9l6 6M15 9l-6 6"]
|
|
2376
2381
|
};
|
|
2377
|
-
function
|
|
2382
|
+
function Kt({ tone: e }) {
|
|
2378
2383
|
return /* @__PURE__ */ n("svg", {
|
|
2379
|
-
className:
|
|
2384
|
+
className: Ut.icon,
|
|
2380
2385
|
width: "16",
|
|
2381
2386
|
height: "16",
|
|
2382
2387
|
viewBox: "0 0 24 24",
|
|
@@ -2391,116 +2396,116 @@ function at({ tone: e }) {
|
|
|
2391
2396
|
cx: "12",
|
|
2392
2397
|
cy: "12",
|
|
2393
2398
|
r: "9"
|
|
2394
|
-
}),
|
|
2399
|
+
}), Gt[e].map((e) => /* @__PURE__ */ t("path", { d: e }, e))]
|
|
2395
2400
|
});
|
|
2396
2401
|
}
|
|
2397
|
-
function
|
|
2402
|
+
function qt({ className: e, ...n }) {
|
|
2398
2403
|
return /* @__PURE__ */ t("div", {
|
|
2399
2404
|
...n,
|
|
2400
2405
|
"aria-live": "polite",
|
|
2401
|
-
className: [
|
|
2406
|
+
className: [Ut.region, e].filter(Boolean).join(" ")
|
|
2402
2407
|
});
|
|
2403
2408
|
}
|
|
2404
|
-
function
|
|
2409
|
+
function Jt({ tone: e = "info", toneLabel: r = Wt[e], className: i, children: a, ...o }) {
|
|
2405
2410
|
return /* @__PURE__ */ n("div", {
|
|
2406
2411
|
...o,
|
|
2407
2412
|
className: [
|
|
2408
|
-
|
|
2409
|
-
|
|
2413
|
+
Ut.root,
|
|
2414
|
+
Ut[e],
|
|
2410
2415
|
i
|
|
2411
2416
|
].filter(Boolean).join(" "),
|
|
2412
2417
|
children: [
|
|
2413
|
-
/* @__PURE__ */ t(
|
|
2418
|
+
/* @__PURE__ */ t(Kt, { tone: e }),
|
|
2414
2419
|
/* @__PURE__ */ t("span", {
|
|
2415
|
-
className:
|
|
2420
|
+
className: Ut.srOnly,
|
|
2416
2421
|
children: `${r}: `
|
|
2417
2422
|
}),
|
|
2418
2423
|
/* @__PURE__ */ t("span", { children: a })
|
|
2419
2424
|
]
|
|
2420
2425
|
});
|
|
2421
2426
|
}
|
|
2422
|
-
var
|
|
2427
|
+
var Yt = {
|
|
2423
2428
|
root: "_root_13abh_1",
|
|
2424
2429
|
title: "_title_13abh_10",
|
|
2425
2430
|
description: "_description_13abh_18",
|
|
2426
2431
|
action: "_action_13abh_25"
|
|
2427
2432
|
};
|
|
2428
2433
|
// src/empty-state/empty-state.tsx
|
|
2429
|
-
function
|
|
2434
|
+
function Xt({ title: e, description: r, action: i, className: a, style: o, ...s }) {
|
|
2430
2435
|
return /* @__PURE__ */ n("div", {
|
|
2431
2436
|
...s,
|
|
2432
|
-
className: [
|
|
2437
|
+
className: [Yt.root, a].filter(Boolean).join(" "),
|
|
2433
2438
|
style: o,
|
|
2434
2439
|
children: [
|
|
2435
2440
|
/* @__PURE__ */ t("p", {
|
|
2436
|
-
className:
|
|
2441
|
+
className: Yt.title,
|
|
2437
2442
|
children: e
|
|
2438
2443
|
}),
|
|
2439
2444
|
/* @__PURE__ */ t("p", {
|
|
2440
|
-
className:
|
|
2445
|
+
className: Yt.description,
|
|
2441
2446
|
children: r
|
|
2442
2447
|
}),
|
|
2443
2448
|
i ? /* @__PURE__ */ t("div", {
|
|
2444
|
-
className:
|
|
2449
|
+
className: Yt.action,
|
|
2445
2450
|
children: i
|
|
2446
2451
|
}) : null
|
|
2447
2452
|
]
|
|
2448
2453
|
});
|
|
2449
2454
|
}
|
|
2450
|
-
var
|
|
2455
|
+
var Zt = {
|
|
2451
2456
|
root: "_root_1hr22_1",
|
|
2452
2457
|
skeleton: "_skeleton_1hr22_5",
|
|
2453
2458
|
row: "_row_1hr22_10",
|
|
2454
2459
|
visuallyHidden: "_visuallyHidden_1hr22_17"
|
|
2455
2460
|
};
|
|
2456
2461
|
// src/loading-state/loading-state.tsx
|
|
2457
|
-
function
|
|
2462
|
+
function Qt({ rows: e = 3, className: n, style: r, ...i }) {
|
|
2458
2463
|
return /* @__PURE__ */ t("div", {
|
|
2459
2464
|
...i,
|
|
2460
|
-
className: [
|
|
2465
|
+
className: [Zt.skeleton, n].filter(Boolean).join(" "),
|
|
2461
2466
|
style: r,
|
|
2462
2467
|
"aria-hidden": "true",
|
|
2463
|
-
children: Array.from({ length: e }, (e, n) => /* @__PURE__ */ t("i", { className:
|
|
2468
|
+
children: Array.from({ length: e }, (e, n) => /* @__PURE__ */ t("i", { className: Zt.row }, n))
|
|
2464
2469
|
});
|
|
2465
2470
|
}
|
|
2466
|
-
function
|
|
2471
|
+
function $t({ label: e = "Carregando", rows: r, className: i, style: a, ...o }) {
|
|
2467
2472
|
return /* @__PURE__ */ n("div", {
|
|
2468
2473
|
...o,
|
|
2469
|
-
className: [
|
|
2474
|
+
className: [Zt.root, i].filter(Boolean).join(" "),
|
|
2470
2475
|
style: a,
|
|
2471
2476
|
role: "status",
|
|
2472
2477
|
"aria-busy": "true",
|
|
2473
2478
|
children: [/* @__PURE__ */ t("span", {
|
|
2474
|
-
className:
|
|
2479
|
+
className: Zt.visuallyHidden,
|
|
2475
2480
|
children: e
|
|
2476
|
-
}), /* @__PURE__ */ t(
|
|
2481
|
+
}), /* @__PURE__ */ t(Qt, { rows: r })]
|
|
2477
2482
|
});
|
|
2478
2483
|
}
|
|
2479
|
-
var
|
|
2484
|
+
var en = {
|
|
2480
2485
|
root: "_root_gqjnf_1",
|
|
2481
2486
|
title: "_title_gqjnf_10",
|
|
2482
2487
|
description: "_description_gqjnf_17",
|
|
2483
2488
|
action: "_action_gqjnf_24"
|
|
2484
2489
|
};
|
|
2485
2490
|
// src/error-state/error-state.tsx
|
|
2486
|
-
function
|
|
2491
|
+
function tn({ title: e = "Não foi possível carregar.", description: r, retryLabel: i = "Tentar de novo", onRetry: a, className: o, style: s, ...c }) {
|
|
2487
2492
|
return /* @__PURE__ */ n("div", {
|
|
2488
2493
|
...c,
|
|
2489
|
-
className: [
|
|
2494
|
+
className: [en.root, o].filter(Boolean).join(" "),
|
|
2490
2495
|
style: s,
|
|
2491
2496
|
role: "alert",
|
|
2492
2497
|
children: [
|
|
2493
2498
|
/* @__PURE__ */ t("p", {
|
|
2494
|
-
className:
|
|
2499
|
+
className: en.title,
|
|
2495
2500
|
children: e
|
|
2496
2501
|
}),
|
|
2497
2502
|
r ? /* @__PURE__ */ t("p", {
|
|
2498
|
-
className:
|
|
2503
|
+
className: en.description,
|
|
2499
2504
|
children: r
|
|
2500
2505
|
}) : null,
|
|
2501
2506
|
a ? /* @__PURE__ */ t("div", {
|
|
2502
|
-
className:
|
|
2503
|
-
children: /* @__PURE__ */ t(
|
|
2507
|
+
className: en.action,
|
|
2508
|
+
children: /* @__PURE__ */ t(H, {
|
|
2504
2509
|
onClick: a,
|
|
2505
2510
|
children: i
|
|
2506
2511
|
})
|
|
@@ -2508,49 +2513,66 @@ function mt({ title: e = "Não foi possível carregar.", description: r, retryLa
|
|
|
2508
2513
|
]
|
|
2509
2514
|
});
|
|
2510
2515
|
}
|
|
2511
|
-
var
|
|
2512
|
-
root: "
|
|
2513
|
-
fill: "
|
|
2516
|
+
var nn = {
|
|
2517
|
+
root: "_root_1rz7h_1",
|
|
2518
|
+
fill: "_fill_1rz7h_8",
|
|
2519
|
+
labeled: "_labeled_1rz7h_16",
|
|
2520
|
+
valueText: "_valueText_1rz7h_22",
|
|
2521
|
+
indeterminate: "_indeterminate_1rz7h_28",
|
|
2522
|
+
progressIndeterminate: "_progress-indeterminate_1rz7h_1"
|
|
2514
2523
|
};
|
|
2515
2524
|
// src/progress-bar/progress-bar.tsx
|
|
2516
|
-
function
|
|
2517
|
-
let
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2525
|
+
function rn({ label: e, value: r, max: i = 100, valueText: a, indeterminate: o = !1, className: s, style: c, ...l }) {
|
|
2526
|
+
let u = Math.min(Math.max(r, 0), i), d = i > 0 ? u / i * 100 : 0, f = [
|
|
2527
|
+
nn.root,
|
|
2528
|
+
o && nn.indeterminate,
|
|
2529
|
+
s
|
|
2530
|
+
].filter(Boolean).join(" "), p = /* @__PURE__ */ t("div", {
|
|
2531
|
+
...l,
|
|
2532
|
+
className: f,
|
|
2533
|
+
style: c,
|
|
2522
2534
|
role: "progressbar",
|
|
2523
2535
|
"aria-label": e,
|
|
2524
|
-
"aria-valuenow":
|
|
2536
|
+
"aria-valuenow": o ? void 0 : u,
|
|
2525
2537
|
"aria-valuemin": 0,
|
|
2526
|
-
"aria-valuemax":
|
|
2538
|
+
"aria-valuemax": i,
|
|
2539
|
+
"aria-valuetext": a,
|
|
2540
|
+
"aria-busy": o ? !0 : void 0,
|
|
2527
2541
|
children: /* @__PURE__ */ t("span", {
|
|
2528
|
-
className:
|
|
2529
|
-
style: { width: `${String(
|
|
2542
|
+
className: nn.fill,
|
|
2543
|
+
style: o ? void 0 : { width: `${String(d)}%` }
|
|
2530
2544
|
})
|
|
2531
2545
|
});
|
|
2546
|
+
return a === void 0 ? p : /* @__PURE__ */ n("div", {
|
|
2547
|
+
className: nn.labeled,
|
|
2548
|
+
children: [p, /* @__PURE__ */ t("span", {
|
|
2549
|
+
className: nn.valueText,
|
|
2550
|
+
"aria-hidden": "true",
|
|
2551
|
+
children: a
|
|
2552
|
+
})]
|
|
2553
|
+
});
|
|
2532
2554
|
}
|
|
2533
|
-
var
|
|
2555
|
+
var an = {
|
|
2534
2556
|
root: "_root_1tkha_1",
|
|
2535
2557
|
mark: "_mark_1tkha_8",
|
|
2536
2558
|
name: "_name_1tkha_20"
|
|
2537
2559
|
};
|
|
2538
2560
|
// src/brand-logo/brand-logo.tsx
|
|
2539
|
-
function
|
|
2561
|
+
function on({ name: e, mark: r, className: i, ...a }) {
|
|
2540
2562
|
return /* @__PURE__ */ n("div", {
|
|
2541
2563
|
...a,
|
|
2542
|
-
className: [
|
|
2564
|
+
className: [an.root, i].filter(Boolean).join(" "),
|
|
2543
2565
|
children: [/* @__PURE__ */ t("span", {
|
|
2544
2566
|
"aria-hidden": "true",
|
|
2545
|
-
className:
|
|
2567
|
+
className: an.mark,
|
|
2546
2568
|
children: r
|
|
2547
2569
|
}), /* @__PURE__ */ t("span", {
|
|
2548
|
-
className:
|
|
2570
|
+
className: an.name,
|
|
2549
2571
|
children: e
|
|
2550
2572
|
})]
|
|
2551
2573
|
});
|
|
2552
2574
|
}
|
|
2553
|
-
var
|
|
2575
|
+
var sn = {
|
|
2554
2576
|
root: "_root_1fzd7_1",
|
|
2555
2577
|
neutral: "_neutral_1fzd7_11",
|
|
2556
2578
|
primary: "_primary_1fzd7_16",
|
|
@@ -2561,10 +2583,10 @@ var yt = {
|
|
|
2561
2583
|
info: "_info_1fzd7_41"
|
|
2562
2584
|
};
|
|
2563
2585
|
// src/badge/badge.tsx
|
|
2564
|
-
function
|
|
2586
|
+
function cn({ tone: e = "primary", className: n, ...r }) {
|
|
2565
2587
|
let i = [
|
|
2566
|
-
|
|
2567
|
-
|
|
2588
|
+
sn.root,
|
|
2589
|
+
sn[e],
|
|
2568
2590
|
n
|
|
2569
2591
|
].filter(Boolean).join(" ");
|
|
2570
2592
|
return /* @__PURE__ */ t("span", {
|
|
@@ -2572,7 +2594,7 @@ function bt({ tone: e = "primary", className: n, ...r }) {
|
|
|
2572
2594
|
className: i
|
|
2573
2595
|
});
|
|
2574
2596
|
}
|
|
2575
|
-
var
|
|
2597
|
+
var ln = { root: "_root_1slwb_1" }, un = {
|
|
2576
2598
|
bg: "#F3F0FA",
|
|
2577
2599
|
bgElevated: "#FAF8FE",
|
|
2578
2600
|
surface: "#FFFFFF",
|
|
@@ -2606,7 +2628,7 @@ var xt = { root: "_root_1slwb_1" }, St = {
|
|
|
2606
2628
|
shadowSm: "0 1px 2px rgba(42, 24, 96, 0.08)",
|
|
2607
2629
|
shadowMd: "0 4px 12px rgba(42, 24, 96, 0.10), 0 1px 3px rgba(42, 24, 96, 0.06)",
|
|
2608
2630
|
shadowLg: "0 18px 44px rgba(42, 24, 96, 0.20), 0 4px 12px rgba(42, 24, 96, 0.08)"
|
|
2609
|
-
},
|
|
2631
|
+
}, dn = {
|
|
2610
2632
|
bg: "#0B0816",
|
|
2611
2633
|
bgElevated: "#110B21",
|
|
2612
2634
|
surface: "#181028",
|
|
@@ -2640,13 +2662,13 @@ var xt = { root: "_root_1slwb_1" }, St = {
|
|
|
2640
2662
|
shadowSm: "0 1px 2px rgba(0, 0, 0, 0.45)",
|
|
2641
2663
|
shadowMd: "0 6px 16px rgba(0, 0, 0, 0.50), 0 0 0 1px rgba(167, 139, 250, 0.08)",
|
|
2642
2664
|
shadowLg: "0 22px 52px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(167, 139, 250, 0.14)"
|
|
2643
|
-
},
|
|
2665
|
+
}, fn = {
|
|
2644
2666
|
sm: 8,
|
|
2645
2667
|
md: 12,
|
|
2646
2668
|
lg: 18,
|
|
2647
2669
|
xl: 26,
|
|
2648
2670
|
pill: 999
|
|
2649
|
-
},
|
|
2671
|
+
}, pn = (e) => e * 4, mn = {
|
|
2650
2672
|
xs: 12,
|
|
2651
2673
|
sm: 13,
|
|
2652
2674
|
md: 14,
|
|
@@ -2655,18 +2677,18 @@ var xt = { root: "_root_1slwb_1" }, St = {
|
|
|
2655
2677
|
xl: 21,
|
|
2656
2678
|
xxl: 30,
|
|
2657
2679
|
xxxl: 36
|
|
2658
|
-
},
|
|
2680
|
+
}, hn = {
|
|
2659
2681
|
semibold: 600,
|
|
2660
2682
|
bold: 700,
|
|
2661
2683
|
extrabold: 800
|
|
2662
|
-
},
|
|
2684
|
+
}, gn = {
|
|
2663
2685
|
tight: 1.1,
|
|
2664
2686
|
relaxed: 1.6
|
|
2665
|
-
},
|
|
2687
|
+
}, _n = {
|
|
2666
2688
|
dropdown: 40,
|
|
2667
2689
|
popover: 45,
|
|
2668
2690
|
toast: 200
|
|
2669
|
-
},
|
|
2691
|
+
}, vn = {
|
|
2670
2692
|
unit: 4,
|
|
2671
2693
|
steps: [
|
|
2672
2694
|
1,
|
|
@@ -2678,7 +2700,7 @@ var xt = { root: "_root_1slwb_1" }, St = {
|
|
|
2678
2700
|
8,
|
|
2679
2701
|
10
|
|
2680
2702
|
]
|
|
2681
|
-
},
|
|
2703
|
+
}, yn = {
|
|
2682
2704
|
fast: 120,
|
|
2683
2705
|
base: 200,
|
|
2684
2706
|
slow: 320,
|
|
@@ -2688,18 +2710,18 @@ var xt = { root: "_root_1slwb_1" }, St = {
|
|
|
2688
2710
|
exit: "cubic-bezier(0.4, 0, 1, 1)",
|
|
2689
2711
|
linear: "linear"
|
|
2690
2712
|
}
|
|
2691
|
-
},
|
|
2713
|
+
}, bn = {
|
|
2692
2714
|
brand: ["#7C3AED", "#06B6D4"],
|
|
2693
2715
|
deep: ["#6D28D9", "#7C3AED"],
|
|
2694
2716
|
calm: ["#F3EBFF", "#E0F7FB"]
|
|
2695
|
-
},
|
|
2717
|
+
}, xn = {
|
|
2696
2718
|
display: "'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif",
|
|
2697
2719
|
body: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif"
|
|
2698
|
-
},
|
|
2720
|
+
}, Sn = {
|
|
2699
2721
|
md: 720,
|
|
2700
2722
|
sm: 480,
|
|
2701
2723
|
min: 360
|
|
2702
|
-
},
|
|
2724
|
+
}, Cn = [
|
|
2703
2725
|
["#7C3AED", "#06B6D4"],
|
|
2704
2726
|
["#A855F7", "#22D3EE"],
|
|
2705
2727
|
["#6366F1", "#2DD4BF"],
|
|
@@ -2710,20 +2732,20 @@ var xt = { root: "_root_1slwb_1" }, St = {
|
|
|
2710
2732
|
["#C084FC", "#0891B2"],
|
|
2711
2733
|
["#7E22CE", "#06B6D4"],
|
|
2712
2734
|
["#6D28D9", "#5EEAD4"]
|
|
2713
|
-
],
|
|
2714
|
-
function
|
|
2735
|
+
], wn = Cn.map((e, t) => [`var(--item-palette-${String(t + 1)}-from)`, `var(--item-palette-${String(t + 1)}-to)`]), Tn = ["var(--item-palette-1-from)", "var(--item-palette-1-to)"];
|
|
2736
|
+
function En(e, t = wn) {
|
|
2715
2737
|
let n = 0;
|
|
2716
2738
|
for (let t = 0; t < e.length; t++) n = n * 31 + e.charCodeAt(t) >>> 0;
|
|
2717
|
-
let r = t.length > 0 ? t :
|
|
2718
|
-
return r[n % r.length] ??
|
|
2739
|
+
let r = t.length > 0 ? t : wn;
|
|
2740
|
+
return r[n % r.length] ?? Tn;
|
|
2719
2741
|
}
|
|
2720
2742
|
// src/item-swatch/item-swatch.tsx
|
|
2721
|
-
function
|
|
2722
|
-
let [s, c] =
|
|
2743
|
+
function Dn({ id: e, palette: n, className: r, style: i, children: a, ...o }) {
|
|
2744
|
+
let [s, c] = En(e, n);
|
|
2723
2745
|
return /* @__PURE__ */ t("span", {
|
|
2724
2746
|
...o,
|
|
2725
2747
|
"aria-hidden": "true",
|
|
2726
|
-
className: [
|
|
2748
|
+
className: [ln.root, r].filter(Boolean).join(" "),
|
|
2727
2749
|
style: {
|
|
2728
2750
|
...i,
|
|
2729
2751
|
background: `linear-gradient(135deg, ${s}, ${c})`
|
|
@@ -2732,7 +2754,7 @@ function zt({ id: e, palette: n, className: r, style: i, children: a, ...o }) {
|
|
|
2732
2754
|
});
|
|
2733
2755
|
}
|
|
2734
2756
|
// src/icons/view-icons.tsx
|
|
2735
|
-
function
|
|
2757
|
+
function On({ size: e = 18, children: n, ...r }) {
|
|
2736
2758
|
return /* @__PURE__ */ t("svg", {
|
|
2737
2759
|
viewBox: "0 0 24 24",
|
|
2738
2760
|
width: e,
|
|
@@ -2748,14 +2770,14 @@ function Bt({ size: e = 18, children: n, ...r }) {
|
|
|
2748
2770
|
children: n
|
|
2749
2771
|
});
|
|
2750
2772
|
}
|
|
2751
|
-
function
|
|
2752
|
-
return /* @__PURE__ */ t(
|
|
2773
|
+
function kn(e) {
|
|
2774
|
+
return /* @__PURE__ */ t(On, {
|
|
2753
2775
|
...e,
|
|
2754
2776
|
children: /* @__PURE__ */ t("path", { d: "M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01" })
|
|
2755
2777
|
});
|
|
2756
2778
|
}
|
|
2757
|
-
function
|
|
2758
|
-
return /* @__PURE__ */ n(
|
|
2779
|
+
function An(e) {
|
|
2780
|
+
return /* @__PURE__ */ n(On, {
|
|
2759
2781
|
...e,
|
|
2760
2782
|
children: [
|
|
2761
2783
|
/* @__PURE__ */ t("rect", {
|
|
@@ -2789,14 +2811,14 @@ function Ht(e) {
|
|
|
2789
2811
|
]
|
|
2790
2812
|
});
|
|
2791
2813
|
}
|
|
2792
|
-
function
|
|
2793
|
-
return /* @__PURE__ */ t(
|
|
2814
|
+
function jn(e) {
|
|
2815
|
+
return /* @__PURE__ */ t(On, {
|
|
2794
2816
|
...e,
|
|
2795
2817
|
children: /* @__PURE__ */ t("path", { d: "M4 20h16M6 4v16M10 4v16M14.5 5l3.5 15" })
|
|
2796
2818
|
});
|
|
2797
2819
|
}
|
|
2798
|
-
function
|
|
2799
|
-
return /* @__PURE__ */ n(
|
|
2820
|
+
function Mn(e) {
|
|
2821
|
+
return /* @__PURE__ */ n(On, {
|
|
2800
2822
|
...e,
|
|
2801
2823
|
children: [/* @__PURE__ */ t("rect", {
|
|
2802
2824
|
x: "3",
|
|
@@ -2807,8 +2829,8 @@ function Wt(e) {
|
|
|
2807
2829
|
}), /* @__PURE__ */ t("path", { d: "M3 10h18M9 4v16" })]
|
|
2808
2830
|
});
|
|
2809
2831
|
}
|
|
2810
|
-
function
|
|
2811
|
-
return /* @__PURE__ */ n(
|
|
2832
|
+
function Nn(e) {
|
|
2833
|
+
return /* @__PURE__ */ n(On, {
|
|
2812
2834
|
...e,
|
|
2813
2835
|
children: [/* @__PURE__ */ t("rect", {
|
|
2814
2836
|
x: "3",
|
|
@@ -2819,8 +2841,8 @@ function Gt(e) {
|
|
|
2819
2841
|
}), /* @__PURE__ */ t("path", { d: "M16 2v4M8 2v4M3 10h18M8 14h4v4H8z" })]
|
|
2820
2842
|
});
|
|
2821
2843
|
}
|
|
2822
|
-
function
|
|
2823
|
-
return /* @__PURE__ */ n(
|
|
2844
|
+
function Pn(e) {
|
|
2845
|
+
return /* @__PURE__ */ n(On, {
|
|
2824
2846
|
...e,
|
|
2825
2847
|
children: [
|
|
2826
2848
|
/* @__PURE__ */ t("path", { d: "M6 3v18M10 6h10M10 12h10M10 18h7" }),
|
|
@@ -2842,40 +2864,883 @@ function Kt(e) {
|
|
|
2842
2864
|
]
|
|
2843
2865
|
});
|
|
2844
2866
|
}
|
|
2867
|
+
// src/icons/icon.tsx
|
|
2868
|
+
function Z(e, n) {
|
|
2869
|
+
function r({ size: n = 20, ...r }) {
|
|
2870
|
+
return /* @__PURE__ */ t(e, {
|
|
2871
|
+
size: n,
|
|
2872
|
+
strokeWidth: 2,
|
|
2873
|
+
color: "currentColor",
|
|
2874
|
+
...r,
|
|
2875
|
+
"aria-hidden": "true",
|
|
2876
|
+
focusable: "false"
|
|
2877
|
+
});
|
|
2878
|
+
}
|
|
2879
|
+
return r.displayName = n, r;
|
|
2880
|
+
}
|
|
2881
|
+
// src/icons/interface-icons.tsx
|
|
2882
|
+
var Fn = Z(D, "HomeIcon"), In = Z(m, "BookOpenIcon"), Ln = Z(k, "LayersIcon"), Rn = Z(B, "TimerIcon"), zn = Z(V, "UsersIcon"), Bn = Z(M, "MenuIcon"), Vn = Z(v, "ChevronLeftIcon"), Hn = Z(y, "ChevronRightIcon"), Un = Z(_, "ChevronDownIcon"), Wn = Z(p, "ArrowLeftIcon"), Gn = Z(oe, "CloseIcon"), Kn = Z(ee, "PlusIcon"), qn = Z(N, "MinusIcon"), Jn = Z(w, "DownloadIcon"), Yn = Z(re, "UploadIcon"), Xn = Z(E, "FlagIcon"), Zn = Z(I, "RefreshIcon"), Qn = Z(T, "EyeIcon"), $n = Z(g, "CheckIcon"), er = Z(x, "CircleCheckIcon"), tr = Z(O, "InfoIcon"), nr = Z(ne, "AlertTriangleIcon"), rr = Z(b, "CircleAlertIcon"), ir = Z(ae, "WifiOffIcon"), ar = Z(C, "CloudCheckIcon"), or = Z(ie, "UserIcon"), sr = Z(R, "SettingsIcon"), cr = Z(j, "LogOutIcon"), lr = Z(z, "SunIcon"), ur = Z(P, "MoonIcon"), dr = Z(A, "LightbulbIcon"), fr = Z(S, "ClockIcon"), pr = Z(h, "CalendarIcon"), mr = Z(F, "PencilIcon"), hr = Z(L, "SearchIcon"), gr = Z(te, "TrashIcon"), _r = {
|
|
2883
|
+
field: "_field_cxlrf_1",
|
|
2884
|
+
root: "_root_cxlrf_7",
|
|
2885
|
+
track: "_track_cxlrf_19",
|
|
2886
|
+
thumb: "_thumb_cxlrf_30",
|
|
2887
|
+
text: "_text_cxlrf_63",
|
|
2888
|
+
label: "_label_cxlrf_69",
|
|
2889
|
+
help: "_help_cxlrf_74"
|
|
2890
|
+
};
|
|
2891
|
+
// src/switch/switch.tsx
|
|
2892
|
+
function vr({ label: e, help: r, checked: i, onCheckedChange: a, id: o, className: c, style: l, disabled: u, onClick: d, "aria-describedby": f, ...p }) {
|
|
2893
|
+
let m = s(), h = o ?? m, g = `${h}-help`, _ = [f, r ? g : null].filter(Boolean).join(" ");
|
|
2894
|
+
function v(e) {
|
|
2895
|
+
d?.(e), e.defaultPrevented || a(!i);
|
|
2896
|
+
}
|
|
2897
|
+
return /* @__PURE__ */ n("div", {
|
|
2898
|
+
className: _r.field,
|
|
2899
|
+
children: [/* @__PURE__ */ t("button", {
|
|
2900
|
+
...p,
|
|
2901
|
+
id: h,
|
|
2902
|
+
type: "button",
|
|
2903
|
+
role: "switch",
|
|
2904
|
+
"aria-checked": i,
|
|
2905
|
+
"aria-describedby": _ || void 0,
|
|
2906
|
+
disabled: u,
|
|
2907
|
+
className: [_r.root, c].filter(Boolean).join(" "),
|
|
2908
|
+
style: l,
|
|
2909
|
+
onClick: v,
|
|
2910
|
+
children: /* @__PURE__ */ t("span", {
|
|
2911
|
+
className: _r.track,
|
|
2912
|
+
"aria-hidden": "true",
|
|
2913
|
+
children: /* @__PURE__ */ t("span", { className: _r.thumb })
|
|
2914
|
+
})
|
|
2915
|
+
}), /* @__PURE__ */ n("div", {
|
|
2916
|
+
className: _r.text,
|
|
2917
|
+
children: [/* @__PURE__ */ t("label", {
|
|
2918
|
+
htmlFor: h,
|
|
2919
|
+
className: _r.label,
|
|
2920
|
+
children: e
|
|
2921
|
+
}), r ? /* @__PURE__ */ t("p", {
|
|
2922
|
+
id: g,
|
|
2923
|
+
className: _r.help,
|
|
2924
|
+
children: r
|
|
2925
|
+
}) : null]
|
|
2926
|
+
})]
|
|
2927
|
+
});
|
|
2928
|
+
}
|
|
2929
|
+
var Q = {
|
|
2930
|
+
root: "_root_16dd3_1",
|
|
2931
|
+
legend: "_legend_16dd3_11",
|
|
2932
|
+
srOnly: "_srOnly_16dd3_21",
|
|
2933
|
+
help: "_help_16dd3_33",
|
|
2934
|
+
error: "_error_16dd3_39",
|
|
2935
|
+
options: "_options_16dd3_48",
|
|
2936
|
+
option: "_option_16dd3_48",
|
|
2937
|
+
input: "_input_16dd3_68",
|
|
2938
|
+
card: "_card_16dd3_86",
|
|
2939
|
+
checked: "_checked_16dd3_108",
|
|
2940
|
+
success: "_success_16dd3_113",
|
|
2941
|
+
danger: "_danger_16dd3_114",
|
|
2942
|
+
neutral: "_neutral_16dd3_128",
|
|
2943
|
+
toneIcon: "_toneIcon_16dd3_132",
|
|
2944
|
+
marker: "_marker_16dd3_140",
|
|
2945
|
+
text: "_text_16dd3_152",
|
|
2946
|
+
description: "_description_16dd3_159",
|
|
2947
|
+
check: "_check_16dd3_108"
|
|
2948
|
+
}, yr = {
|
|
2949
|
+
success: er,
|
|
2950
|
+
danger: rr
|
|
2951
|
+
};
|
|
2952
|
+
// src/radio-group/radio-option.tsx
|
|
2953
|
+
function br({ option: e, name: r, checked: i, variant: a, readOnly: o, describedBy: s, onSelect: c }) {
|
|
2954
|
+
let { value: l, label: u, description: d, marker: f, disabled: p, tone: m, adornment: h } = e, g = m === "success" || m === "danger" ? yr[m] : null, _ = [
|
|
2955
|
+
Q.option,
|
|
2956
|
+
Q[a],
|
|
2957
|
+
m ? Q[m] : "",
|
|
2958
|
+
i ? Q.checked : ""
|
|
2959
|
+
].filter(Boolean).join(" ");
|
|
2960
|
+
return /* @__PURE__ */ n("label", {
|
|
2961
|
+
className: _,
|
|
2962
|
+
children: [
|
|
2963
|
+
/* @__PURE__ */ t("input", {
|
|
2964
|
+
type: "radio",
|
|
2965
|
+
name: r,
|
|
2966
|
+
value: l,
|
|
2967
|
+
checked: i,
|
|
2968
|
+
disabled: p,
|
|
2969
|
+
"aria-describedby": s,
|
|
2970
|
+
className: Q.input,
|
|
2971
|
+
onChange: () => {
|
|
2972
|
+
o || c(l);
|
|
2973
|
+
}
|
|
2974
|
+
}),
|
|
2975
|
+
f ? /* @__PURE__ */ t("span", {
|
|
2976
|
+
className: Q.marker,
|
|
2977
|
+
children: f
|
|
2978
|
+
}) : null,
|
|
2979
|
+
/* @__PURE__ */ n("span", {
|
|
2980
|
+
className: Q.text,
|
|
2981
|
+
children: [/* @__PURE__ */ t("span", { children: u }), d ? /* @__PURE__ */ t("span", {
|
|
2982
|
+
className: Q.description,
|
|
2983
|
+
children: d
|
|
2984
|
+
}) : null]
|
|
2985
|
+
}),
|
|
2986
|
+
g ? /* @__PURE__ */ t(g, { className: Q.toneIcon }) : null,
|
|
2987
|
+
i && a === "card" ? /* @__PURE__ */ t($n, { className: Q.check }) : null,
|
|
2988
|
+
h
|
|
2989
|
+
]
|
|
2990
|
+
});
|
|
2991
|
+
}
|
|
2992
|
+
// src/radio-group/radio-group.tsx
|
|
2993
|
+
function xr({ label: e, hideLabel: r, options: i, value: a, onChange: o, name: c, variant: l = "default", readOnly: u = !1, help: d, error: f, className: p, style: m, ref: h, "aria-describedby": g, ..._ }) {
|
|
2994
|
+
let v = s(), y = c ?? v, b = `${v}-legend`, x = `${v}-help`, S = `${v}-error`, C = [
|
|
2995
|
+
g,
|
|
2996
|
+
d ? x : null,
|
|
2997
|
+
f ? S : null
|
|
2998
|
+
].filter(Boolean).join(" ");
|
|
2999
|
+
return /* @__PURE__ */ n("fieldset", {
|
|
3000
|
+
..._,
|
|
3001
|
+
ref: h,
|
|
3002
|
+
className: [Q.root, p].filter(Boolean).join(" "),
|
|
3003
|
+
style: m,
|
|
3004
|
+
"aria-describedby": C || void 0,
|
|
3005
|
+
children: [
|
|
3006
|
+
/* @__PURE__ */ t("legend", {
|
|
3007
|
+
id: b,
|
|
3008
|
+
className: r ? Q.srOnly : Q.legend,
|
|
3009
|
+
children: e
|
|
3010
|
+
}),
|
|
3011
|
+
/* @__PURE__ */ t("div", {
|
|
3012
|
+
role: "radiogroup",
|
|
3013
|
+
"aria-labelledby": b,
|
|
3014
|
+
"aria-readonly": u || void 0,
|
|
3015
|
+
"aria-invalid": f ? !0 : void 0,
|
|
3016
|
+
className: Q.options,
|
|
3017
|
+
children: i.map((e) => /* @__PURE__ */ t(br, {
|
|
3018
|
+
option: e,
|
|
3019
|
+
name: y,
|
|
3020
|
+
checked: e.value === a,
|
|
3021
|
+
variant: l,
|
|
3022
|
+
readOnly: u,
|
|
3023
|
+
onSelect: o
|
|
3024
|
+
}, e.value))
|
|
3025
|
+
}),
|
|
3026
|
+
d ? /* @__PURE__ */ t("p", {
|
|
3027
|
+
id: x,
|
|
3028
|
+
className: Q.help,
|
|
3029
|
+
children: d
|
|
3030
|
+
}) : null,
|
|
3031
|
+
f ? /* @__PURE__ */ t("p", {
|
|
3032
|
+
id: S,
|
|
3033
|
+
role: "alert",
|
|
3034
|
+
className: Q.error,
|
|
3035
|
+
children: f
|
|
3036
|
+
}) : null
|
|
3037
|
+
]
|
|
3038
|
+
});
|
|
3039
|
+
}
|
|
3040
|
+
var Sr = {
|
|
3041
|
+
root: "_root_qc9fc_1",
|
|
3042
|
+
label: "_label_qc9fc_8",
|
|
3043
|
+
control: "_control_qc9fc_17",
|
|
3044
|
+
help: "_help_qc9fc_43",
|
|
3045
|
+
counter: "_counter_qc9fc_49",
|
|
3046
|
+
error: "_error_qc9fc_57"
|
|
3047
|
+
};
|
|
3048
|
+
// src/text-area-field/use-auto-resize.ts
|
|
3049
|
+
function Cr(e, { enabled: t, minRows: n, maxRows: r }) {
|
|
3050
|
+
if (!t) return;
|
|
3051
|
+
let i = e.split("\n").length;
|
|
3052
|
+
return Math.min(Math.max(i, n), r);
|
|
3053
|
+
}
|
|
3054
|
+
// src/text-area-field/text-area-field.tsx
|
|
3055
|
+
function wr({ label: e, help: r, error: i, autoResize: a = !1, minRows: o = 3, maxRows: c = 12, counter: l, id: u, className: d, style: p, rows: m, value: h, defaultValue: g, onChange: _, "aria-describedby": v, "aria-invalid": y, ...b }) {
|
|
3056
|
+
let x = s(), S = u ?? x, C = `${S}-help`, w = `${S}-counter`, T = `${S}-error`, [E, D] = f(String(h ?? g ?? "")), O = Cr(h === void 0 ? E : String(h), {
|
|
3057
|
+
enabled: a,
|
|
3058
|
+
minRows: o,
|
|
3059
|
+
maxRows: c
|
|
3060
|
+
}), k = [
|
|
3061
|
+
v,
|
|
3062
|
+
r ? C : null,
|
|
3063
|
+
l ? w : null,
|
|
3064
|
+
i ? T : null
|
|
3065
|
+
].filter(Boolean).join(" ");
|
|
3066
|
+
function A(e) {
|
|
3067
|
+
D(e.target.value), _?.(e);
|
|
3068
|
+
}
|
|
3069
|
+
return /* @__PURE__ */ n("div", {
|
|
3070
|
+
className: Sr.root,
|
|
3071
|
+
children: [
|
|
3072
|
+
/* @__PURE__ */ t("label", {
|
|
3073
|
+
htmlFor: S,
|
|
3074
|
+
className: Sr.label,
|
|
3075
|
+
children: e
|
|
3076
|
+
}),
|
|
3077
|
+
/* @__PURE__ */ t("textarea", {
|
|
3078
|
+
...b,
|
|
3079
|
+
id: S,
|
|
3080
|
+
value: h,
|
|
3081
|
+
defaultValue: g,
|
|
3082
|
+
onChange: A,
|
|
3083
|
+
rows: O ?? m,
|
|
3084
|
+
className: [Sr.control, d].filter(Boolean).join(" "),
|
|
3085
|
+
style: p,
|
|
3086
|
+
"aria-invalid": i ? !0 : y,
|
|
3087
|
+
"aria-describedby": k || void 0
|
|
3088
|
+
}),
|
|
3089
|
+
r ? /* @__PURE__ */ t("p", {
|
|
3090
|
+
id: C,
|
|
3091
|
+
className: Sr.help,
|
|
3092
|
+
children: r
|
|
3093
|
+
}) : null,
|
|
3094
|
+
l ? /* @__PURE__ */ t("p", {
|
|
3095
|
+
id: w,
|
|
3096
|
+
className: Sr.counter,
|
|
3097
|
+
children: l
|
|
3098
|
+
}) : null,
|
|
3099
|
+
i ? /* @__PURE__ */ t("p", {
|
|
3100
|
+
id: T,
|
|
3101
|
+
role: "alert",
|
|
3102
|
+
className: Sr.error,
|
|
3103
|
+
children: i
|
|
3104
|
+
}) : null
|
|
3105
|
+
]
|
|
3106
|
+
});
|
|
3107
|
+
}
|
|
3108
|
+
var Tr = {
|
|
3109
|
+
root: "_root_1bltb_1",
|
|
3110
|
+
summary: "_summary_1bltb_10",
|
|
3111
|
+
icon: "_icon_1bltb_29",
|
|
3112
|
+
chevron: "_chevron_1bltb_33",
|
|
3113
|
+
content: "_content_1bltb_42",
|
|
3114
|
+
accent: "_accent_1bltb_58",
|
|
3115
|
+
warning: "_warning_1bltb_66",
|
|
3116
|
+
info: "_info_1bltb_74"
|
|
3117
|
+
}, Er = r(null);
|
|
3118
|
+
// src/disclosure/use-disclosure.ts
|
|
3119
|
+
function Dr({ open: e, defaultOpen: t = !1, onOpenChange: n }) {
|
|
3120
|
+
let r = a(Er), [i] = f(t);
|
|
3121
|
+
function o(t) {
|
|
3122
|
+
e === void 0 ? t.open = !t.open : n?.(!e);
|
|
3123
|
+
}
|
|
3124
|
+
function s(t) {
|
|
3125
|
+
e !== void 0 && (t.preventDefault(), n?.(!e));
|
|
3126
|
+
}
|
|
3127
|
+
function c(e) {
|
|
3128
|
+
if (e.key !== "Enter" && e.key !== " ") return;
|
|
3129
|
+
e.preventDefault();
|
|
3130
|
+
let t = e.currentTarget.parentElement;
|
|
3131
|
+
t instanceof HTMLDetailsElement && o(t);
|
|
3132
|
+
}
|
|
3133
|
+
function l(e) {
|
|
3134
|
+
let t = e.currentTarget;
|
|
3135
|
+
n?.(t.open), t.open && r?.onOpen(t);
|
|
3136
|
+
}
|
|
3137
|
+
return {
|
|
3138
|
+
detailsProps: e === void 0 ? {
|
|
3139
|
+
open: i || void 0,
|
|
3140
|
+
onToggle: l
|
|
3141
|
+
} : { open: e },
|
|
3142
|
+
summaryProps: {
|
|
3143
|
+
onClick: s,
|
|
3144
|
+
onKeyDown: c
|
|
3145
|
+
},
|
|
3146
|
+
accordion: r
|
|
3147
|
+
};
|
|
3148
|
+
}
|
|
3149
|
+
// src/disclosure/disclosure.tsx
|
|
3150
|
+
function Or({ title: e, icon: r, open: i, defaultOpen: a, onOpenChange: o, tone: s = "default", className: c, children: l, ...u }) {
|
|
3151
|
+
let { detailsProps: d, summaryProps: f, accordion: p } = Dr({
|
|
3152
|
+
open: i,
|
|
3153
|
+
defaultOpen: a,
|
|
3154
|
+
onOpenChange: o
|
|
3155
|
+
}), m = [
|
|
3156
|
+
Tr.root,
|
|
3157
|
+
s === "default" ? null : Tr[s],
|
|
3158
|
+
c
|
|
3159
|
+
].filter(Boolean).join(" ");
|
|
3160
|
+
return /* @__PURE__ */ n("details", {
|
|
3161
|
+
...u,
|
|
3162
|
+
className: m,
|
|
3163
|
+
name: p?.name,
|
|
3164
|
+
...d,
|
|
3165
|
+
children: [/* @__PURE__ */ n("summary", {
|
|
3166
|
+
className: Tr.summary,
|
|
3167
|
+
...f,
|
|
3168
|
+
children: [
|
|
3169
|
+
r ? /* @__PURE__ */ t("span", {
|
|
3170
|
+
"aria-hidden": "true",
|
|
3171
|
+
className: Tr.icon,
|
|
3172
|
+
children: r
|
|
3173
|
+
}) : null,
|
|
3174
|
+
/* @__PURE__ */ t("span", {
|
|
3175
|
+
className: Tr.title,
|
|
3176
|
+
children: e
|
|
3177
|
+
}),
|
|
3178
|
+
/* @__PURE__ */ t(Un, { className: Tr.chevron })
|
|
3179
|
+
]
|
|
3180
|
+
}), /* @__PURE__ */ t("div", {
|
|
3181
|
+
className: Tr.content,
|
|
3182
|
+
children: l
|
|
3183
|
+
})]
|
|
3184
|
+
});
|
|
3185
|
+
}
|
|
3186
|
+
// src/disclosure/accordion.tsx
|
|
3187
|
+
function kr({ type: e = "multiple", ref: n, ...r }) {
|
|
3188
|
+
let i = s(), a = d(null);
|
|
3189
|
+
c(n, () => a.current);
|
|
3190
|
+
let o = u(() => ({
|
|
3191
|
+
name: i,
|
|
3192
|
+
onOpen(e) {
|
|
3193
|
+
(a.current?.querySelectorAll("details[open]"))?.forEach((t) => {
|
|
3194
|
+
t !== e && t.getAttribute("name") === i && (t.open = !1);
|
|
3195
|
+
});
|
|
3196
|
+
}
|
|
3197
|
+
}), [i]), l = /* @__PURE__ */ t("div", {
|
|
3198
|
+
...r,
|
|
3199
|
+
ref: a
|
|
3200
|
+
});
|
|
3201
|
+
return e === "multiple" ? l : /* @__PURE__ */ t(Er.Provider, {
|
|
3202
|
+
value: o,
|
|
3203
|
+
children: l
|
|
3204
|
+
});
|
|
3205
|
+
}
|
|
3206
|
+
// src/callout/callout.constants.ts
|
|
3207
|
+
var Ar = {
|
|
3208
|
+
neutral: tr,
|
|
3209
|
+
accent: dr,
|
|
3210
|
+
info: tr,
|
|
3211
|
+
success: er,
|
|
3212
|
+
warning: nr,
|
|
3213
|
+
danger: rr
|
|
3214
|
+
}, jr = {
|
|
3215
|
+
root: "_root_l7jw3_1",
|
|
3216
|
+
icon: "_icon_l7jw3_14",
|
|
3217
|
+
body: "_body_l7jw3_19",
|
|
3218
|
+
title: "_title_l7jw3_24",
|
|
3219
|
+
action: "_action_l7jw3_30",
|
|
3220
|
+
neutral: "_neutral_l7jw3_41",
|
|
3221
|
+
accent: "_accent_l7jw3_46",
|
|
3222
|
+
info: "_info_l7jw3_50",
|
|
3223
|
+
success: "_success_l7jw3_54",
|
|
3224
|
+
warning: "_warning_l7jw3_58",
|
|
3225
|
+
danger: "_danger_l7jw3_62"
|
|
3226
|
+
};
|
|
3227
|
+
// src/callout/callout.tsx
|
|
3228
|
+
function Mr({ tone: e = "neutral", title: r, icon: i, action: a, live: o = "off", className: c, role: l, children: u, ...d }) {
|
|
3229
|
+
let f = s(), p = Ar[e], m = [
|
|
3230
|
+
jr.root,
|
|
3231
|
+
jr[e],
|
|
3232
|
+
c
|
|
3233
|
+
].filter(Boolean).join(" ");
|
|
3234
|
+
return /* @__PURE__ */ n("aside", {
|
|
3235
|
+
...d,
|
|
3236
|
+
role: o === "polite" ? "status" : l,
|
|
3237
|
+
"aria-labelledby": r ? f : void 0,
|
|
3238
|
+
className: m,
|
|
3239
|
+
children: [
|
|
3240
|
+
i === !1 ? null : i === void 0 ? /* @__PURE__ */ t(p, { className: jr.icon }) : /* @__PURE__ */ t("span", {
|
|
3241
|
+
"aria-hidden": "true",
|
|
3242
|
+
className: jr.icon,
|
|
3243
|
+
children: i
|
|
3244
|
+
}),
|
|
3245
|
+
/* @__PURE__ */ n("div", {
|
|
3246
|
+
className: jr.body,
|
|
3247
|
+
children: [r ? /* @__PURE__ */ t("p", {
|
|
3248
|
+
id: f,
|
|
3249
|
+
className: jr.title,
|
|
3250
|
+
children: r
|
|
3251
|
+
}) : null, u]
|
|
3252
|
+
}),
|
|
3253
|
+
a ? /* @__PURE__ */ t("div", {
|
|
3254
|
+
className: jr.action,
|
|
3255
|
+
children: a
|
|
3256
|
+
}) : null
|
|
3257
|
+
]
|
|
3258
|
+
});
|
|
3259
|
+
}
|
|
3260
|
+
// src/bottom-sheet/bottom-sheet.constants.ts
|
|
3261
|
+
var Nr = { close: "Fechar" }, Pr = "button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])", Fr = {
|
|
3262
|
+
root: "_root_uyiyv_1",
|
|
3263
|
+
bottom: "_bottom_uyiyv_18",
|
|
3264
|
+
auto: "_auto_uyiyv_19",
|
|
3265
|
+
sheetUp: "_sheet-up_uyiyv_1",
|
|
3266
|
+
side: "_side_uyiyv_28",
|
|
3267
|
+
sheetIn: "_sheet-in_uyiyv_1",
|
|
3268
|
+
handle: "_handle_uyiyv_51",
|
|
3269
|
+
header: "_header_uyiyv_90",
|
|
3270
|
+
title: "_title_uyiyv_98",
|
|
3271
|
+
description: "_description_uyiyv_106",
|
|
3272
|
+
close: "_close_uyiyv_111",
|
|
3273
|
+
body: "_body_uyiyv_117",
|
|
3274
|
+
footer: "_footer_uyiyv_124"
|
|
3275
|
+
};
|
|
3276
|
+
// src/bottom-sheet/use-bottom-sheet.ts
|
|
3277
|
+
function Ir(e) {
|
|
3278
|
+
return Array.from(e.querySelectorAll(Pr)).filter((e) => !e.hasAttribute("disabled"));
|
|
3279
|
+
}
|
|
3280
|
+
function Lr({ open: e, onClose: t, ref: n }) {
|
|
3281
|
+
let r = d(null);
|
|
3282
|
+
c(n, () => r.current), o(() => {
|
|
3283
|
+
let t = r.current;
|
|
3284
|
+
if (!t || !e) return;
|
|
3285
|
+
let n = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
3286
|
+
t.showModal();
|
|
3287
|
+
let i = t.querySelector("[data-sheet-body]");
|
|
3288
|
+
return ((i ? Ir(i)[0] : void 0) ?? Ir(t)[0])?.focus(), () => {
|
|
3289
|
+
t.close(), n?.focus();
|
|
3290
|
+
};
|
|
3291
|
+
}, [e]);
|
|
3292
|
+
function i(e) {
|
|
3293
|
+
if (e.key !== "Tab") return;
|
|
3294
|
+
let t = Ir(e.currentTarget), n = t[0], r = t[t.length - 1];
|
|
3295
|
+
n && r && (e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus()));
|
|
3296
|
+
}
|
|
3297
|
+
function a(e) {
|
|
3298
|
+
e.preventDefault(), t();
|
|
3299
|
+
}
|
|
3300
|
+
function s(e) {
|
|
3301
|
+
e.target === e.currentTarget && t();
|
|
3302
|
+
}
|
|
3303
|
+
return {
|
|
3304
|
+
dialogRef: r,
|
|
3305
|
+
onKeyDown: i,
|
|
3306
|
+
onCancel: a,
|
|
3307
|
+
onClick: s
|
|
3308
|
+
};
|
|
3309
|
+
}
|
|
3310
|
+
// src/bottom-sheet/bottom-sheet.tsx
|
|
3311
|
+
function Rr({ open: e, onClose: r, title: i, description: a, footer: o, placement: c = "auto", labels: l, children: u, className: d, ref: f, ...p }) {
|
|
3312
|
+
let m = s(), { dialogRef: h, onKeyDown: g, onCancel: _, onClick: v } = Lr({
|
|
3313
|
+
open: e,
|
|
3314
|
+
onClose: r,
|
|
3315
|
+
ref: f
|
|
3316
|
+
});
|
|
3317
|
+
if (!e) return null;
|
|
3318
|
+
let y = {
|
|
3319
|
+
...Nr,
|
|
3320
|
+
...l
|
|
3321
|
+
}, b = [
|
|
3322
|
+
Fr.root,
|
|
3323
|
+
Fr[c],
|
|
3324
|
+
d
|
|
3325
|
+
].filter(Boolean).join(" ");
|
|
3326
|
+
return /* @__PURE__ */ n("dialog", {
|
|
3327
|
+
...p,
|
|
3328
|
+
ref: h,
|
|
3329
|
+
"aria-labelledby": `${m}-title`,
|
|
3330
|
+
"aria-describedby": a ? `${m}-description` : void 0,
|
|
3331
|
+
className: b,
|
|
3332
|
+
onKeyDown: (e) => {
|
|
3333
|
+
p.onKeyDown?.(e), g(e);
|
|
3334
|
+
},
|
|
3335
|
+
onCancel: (e) => {
|
|
3336
|
+
p.onCancel?.(e), _(e);
|
|
3337
|
+
},
|
|
3338
|
+
onClick: (e) => {
|
|
3339
|
+
p.onClick?.(e), v(e);
|
|
3340
|
+
},
|
|
3341
|
+
children: [
|
|
3342
|
+
/* @__PURE__ */ t("span", {
|
|
3343
|
+
"aria-hidden": "true",
|
|
3344
|
+
className: Fr.handle
|
|
3345
|
+
}),
|
|
3346
|
+
/* @__PURE__ */ n("header", {
|
|
3347
|
+
className: Fr.header,
|
|
3348
|
+
children: [/* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("h2", {
|
|
3349
|
+
id: `${m}-title`,
|
|
3350
|
+
className: Fr.title,
|
|
3351
|
+
children: i
|
|
3352
|
+
}), a ? /* @__PURE__ */ t("p", {
|
|
3353
|
+
id: `${m}-description`,
|
|
3354
|
+
className: Fr.description,
|
|
3355
|
+
children: a
|
|
3356
|
+
}) : null] }), /* @__PURE__ */ t(U, {
|
|
3357
|
+
"aria-label": y.close,
|
|
3358
|
+
icon: /* @__PURE__ */ t(Gn, {}),
|
|
3359
|
+
className: Fr.close,
|
|
3360
|
+
onClick: r
|
|
3361
|
+
})]
|
|
3362
|
+
}),
|
|
3363
|
+
/* @__PURE__ */ t("div", {
|
|
3364
|
+
className: Fr.body,
|
|
3365
|
+
"data-sheet-body": "",
|
|
3366
|
+
children: u
|
|
3367
|
+
}),
|
|
3368
|
+
o ? /* @__PURE__ */ t("footer", {
|
|
3369
|
+
className: Fr.footer,
|
|
3370
|
+
children: o
|
|
3371
|
+
}) : null
|
|
3372
|
+
]
|
|
3373
|
+
});
|
|
3374
|
+
}
|
|
3375
|
+
var zr = {
|
|
3376
|
+
interactive: "_interactive_10vva_1",
|
|
3377
|
+
button: "_button_10vva_27"
|
|
3378
|
+
};
|
|
3379
|
+
// src/card-link/card-link.tsx
|
|
3380
|
+
function Br({ tone: e = "default", className: n, children: r, ...i }) {
|
|
3381
|
+
let a = [
|
|
3382
|
+
wt.root,
|
|
3383
|
+
e === "default" ? null : wt[e],
|
|
3384
|
+
zr.interactive,
|
|
3385
|
+
n
|
|
3386
|
+
].filter(Boolean).join(" ");
|
|
3387
|
+
return /* @__PURE__ */ t("a", {
|
|
3388
|
+
...i,
|
|
3389
|
+
className: a,
|
|
3390
|
+
children: r
|
|
3391
|
+
});
|
|
3392
|
+
}
|
|
3393
|
+
// src/card-link/card-button.tsx
|
|
3394
|
+
function Vr({ tone: e = "default", type: n = "button", className: r, ...i }) {
|
|
3395
|
+
let a = [
|
|
3396
|
+
wt.root,
|
|
3397
|
+
e === "default" ? null : wt[e],
|
|
3398
|
+
zr.interactive,
|
|
3399
|
+
zr.button,
|
|
3400
|
+
r
|
|
3401
|
+
].filter(Boolean).join(" ");
|
|
3402
|
+
return /* @__PURE__ */ t("button", {
|
|
3403
|
+
...i,
|
|
3404
|
+
type: n,
|
|
3405
|
+
className: a
|
|
3406
|
+
});
|
|
3407
|
+
}
|
|
3408
|
+
// src/focus-header/focus-header.constants.ts
|
|
3409
|
+
var Hr = { exit: "Sair" }, Ur = {
|
|
3410
|
+
root: "_root_yx1lb_1",
|
|
3411
|
+
row: "_row_yx1lb_8",
|
|
3412
|
+
exit: "_exit_yx1lb_15",
|
|
3413
|
+
title: "_title_yx1lb_21",
|
|
3414
|
+
position: "_position_yx1lb_33"
|
|
3415
|
+
};
|
|
3416
|
+
// src/focus-header/focus-header.tsx
|
|
3417
|
+
function Wr({ title: e, onExit: r, position: i, progress: a, labels: o, className: s, ...c }) {
|
|
3418
|
+
let l = {
|
|
3419
|
+
...Hr,
|
|
3420
|
+
...o
|
|
3421
|
+
}, u = [Ur.root, s].filter(Boolean).join(" ");
|
|
3422
|
+
return /* @__PURE__ */ n("header", {
|
|
3423
|
+
...c,
|
|
3424
|
+
className: u,
|
|
3425
|
+
children: [/* @__PURE__ */ n("div", {
|
|
3426
|
+
className: Ur.row,
|
|
3427
|
+
children: [
|
|
3428
|
+
/* @__PURE__ */ t(U, {
|
|
3429
|
+
className: Ur.exit,
|
|
3430
|
+
"aria-label": l.exit,
|
|
3431
|
+
icon: /* @__PURE__ */ t(Gn, {}),
|
|
3432
|
+
onClick: r
|
|
3433
|
+
}),
|
|
3434
|
+
/* @__PURE__ */ t("h1", {
|
|
3435
|
+
className: Ur.title,
|
|
3436
|
+
children: e
|
|
3437
|
+
}),
|
|
3438
|
+
i ? /* @__PURE__ */ t("span", {
|
|
3439
|
+
className: Ur.position,
|
|
3440
|
+
children: i
|
|
3441
|
+
}) : null
|
|
3442
|
+
]
|
|
3443
|
+
}), a ? /* @__PURE__ */ t(rn, {
|
|
3444
|
+
label: a.label,
|
|
3445
|
+
value: a.value,
|
|
3446
|
+
max: a.max
|
|
3447
|
+
}) : null]
|
|
3448
|
+
});
|
|
3449
|
+
}
|
|
3450
|
+
var Gr = {
|
|
3451
|
+
root: "_root_1q3n3_1",
|
|
3452
|
+
start: "_start_1q3n3_16",
|
|
3453
|
+
end: "_end_1q3n3_17",
|
|
3454
|
+
center: "_center_1q3n3_24"
|
|
3455
|
+
};
|
|
3456
|
+
// src/app-shell/topbar.tsx
|
|
3457
|
+
function Kr({ start: e, center: r, end: i, className: a, ...o }) {
|
|
3458
|
+
let s = [Gr.root, a].filter(Boolean).join(" ");
|
|
3459
|
+
return /* @__PURE__ */ n("header", {
|
|
3460
|
+
...o,
|
|
3461
|
+
className: s,
|
|
3462
|
+
children: [
|
|
3463
|
+
/* @__PURE__ */ t("div", {
|
|
3464
|
+
className: Gr.start,
|
|
3465
|
+
children: e
|
|
3466
|
+
}),
|
|
3467
|
+
/* @__PURE__ */ t("div", {
|
|
3468
|
+
className: Gr.center,
|
|
3469
|
+
children: r
|
|
3470
|
+
}),
|
|
3471
|
+
/* @__PURE__ */ t("div", {
|
|
3472
|
+
className: Gr.end,
|
|
3473
|
+
children: i
|
|
3474
|
+
})
|
|
3475
|
+
]
|
|
3476
|
+
});
|
|
3477
|
+
}
|
|
3478
|
+
// src/app-shell/app-shell.constants.ts
|
|
3479
|
+
var qr = { navigation: "Principal" }, Jr = {
|
|
3480
|
+
skipToContent: "Pular para o conteúdo",
|
|
3481
|
+
openMenu: "Abrir menu"
|
|
3482
|
+
}, Yr = `(max-width: ${String(Sn.md - .02)}px)`, Xr = "a[href], button:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
3483
|
+
// src/app-shell/nav-link.tsx
|
|
3484
|
+
function Zr({ item: r, className: i, iconClassName: a, badgeClassName: o, renderLink: s }) {
|
|
3485
|
+
let c = r.current ? "page" : void 0, l = /* @__PURE__ */ n(e, { children: [
|
|
3486
|
+
/* @__PURE__ */ t("span", {
|
|
3487
|
+
className: a,
|
|
3488
|
+
"aria-hidden": "true",
|
|
3489
|
+
children: r.icon
|
|
3490
|
+
}),
|
|
3491
|
+
/* @__PURE__ */ t("span", { children: r.label }),
|
|
3492
|
+
r.badge === void 0 ? null : /* @__PURE__ */ n(e, { children: [" ", /* @__PURE__ */ t("span", {
|
|
3493
|
+
className: o,
|
|
3494
|
+
children: r.badge
|
|
3495
|
+
})] })
|
|
3496
|
+
] });
|
|
3497
|
+
return s ? s(r, {
|
|
3498
|
+
className: i ?? "",
|
|
3499
|
+
"aria-current": c,
|
|
3500
|
+
children: l
|
|
3501
|
+
}) : /* @__PURE__ */ t("a", {
|
|
3502
|
+
href: r.href,
|
|
3503
|
+
className: i,
|
|
3504
|
+
"aria-current": c,
|
|
3505
|
+
children: l
|
|
3506
|
+
});
|
|
3507
|
+
}
|
|
3508
|
+
var Qr = {
|
|
3509
|
+
root: "_root_g4r00_2",
|
|
3510
|
+
brand: "_brand_g4r00_18",
|
|
3511
|
+
nav: "_nav_g4r00_22",
|
|
3512
|
+
list: "_list_g4r00_28",
|
|
3513
|
+
link: "_link_g4r00_37",
|
|
3514
|
+
icon: "_icon_g4r00_71",
|
|
3515
|
+
badge: "_badge_g4r00_77",
|
|
3516
|
+
footer: "_footer_g4r00_92",
|
|
3517
|
+
drawer: "_drawer_g4r00_98",
|
|
3518
|
+
drawerOpen: "_drawerOpen_g4r00_111"
|
|
3519
|
+
};
|
|
3520
|
+
// src/app-shell/use-focus-trap.ts
|
|
3521
|
+
function $r(e) {
|
|
3522
|
+
return e ? Array.from(e.querySelectorAll(Xr)) : [];
|
|
3523
|
+
}
|
|
3524
|
+
function ei(e, t, n) {
|
|
3525
|
+
return o(() => {
|
|
3526
|
+
t && $r(e.current)[0]?.focus();
|
|
3527
|
+
}, [t, e]), function(r) {
|
|
3528
|
+
if (!t) return;
|
|
3529
|
+
if (r.key === "Escape") {
|
|
3530
|
+
r.preventDefault(), n?.();
|
|
3531
|
+
return;
|
|
3532
|
+
}
|
|
3533
|
+
if (r.key !== "Tab") return;
|
|
3534
|
+
let i = $r(e.current), a = i[0], o = i[i.length - 1];
|
|
3535
|
+
r.shiftKey && document.activeElement === a ? (r.preventDefault(), o?.focus()) : !r.shiftKey && document.activeElement === o && (r.preventDefault(), a?.focus());
|
|
3536
|
+
};
|
|
3537
|
+
}
|
|
3538
|
+
// src/app-shell/sidebar.tsx
|
|
3539
|
+
function ti({ brand: e, items: r, renderLink: i, footer: a, drawer: o = !1, open: s = !1, onClose: l, labels: u, className: f, onKeyDown: p, ref: m, ...h }) {
|
|
3540
|
+
let g = {
|
|
3541
|
+
...qr,
|
|
3542
|
+
...u
|
|
3543
|
+
}, _ = d(null);
|
|
3544
|
+
c(m, () => _.current);
|
|
3545
|
+
let v = o && s, y = ei(_, v, l);
|
|
3546
|
+
function b(e) {
|
|
3547
|
+
p?.(e), y(e);
|
|
3548
|
+
}
|
|
3549
|
+
function x(e) {
|
|
3550
|
+
v && e.target instanceof Element && e.target.closest("a") && l?.();
|
|
3551
|
+
}
|
|
3552
|
+
let S = [
|
|
3553
|
+
Qr.root,
|
|
3554
|
+
o ? Qr.drawer : "",
|
|
3555
|
+
v ? Qr.drawerOpen : "",
|
|
3556
|
+
f
|
|
3557
|
+
].filter(Boolean).join(" ");
|
|
3558
|
+
return /* @__PURE__ */ n("aside", {
|
|
3559
|
+
...h,
|
|
3560
|
+
ref: _,
|
|
3561
|
+
className: S,
|
|
3562
|
+
inert: o && !s,
|
|
3563
|
+
onKeyDown: b,
|
|
3564
|
+
children: [
|
|
3565
|
+
/* @__PURE__ */ t("div", {
|
|
3566
|
+
className: Qr.brand,
|
|
3567
|
+
children: e
|
|
3568
|
+
}),
|
|
3569
|
+
/* @__PURE__ */ t("nav", {
|
|
3570
|
+
"aria-label": g.navigation,
|
|
3571
|
+
className: Qr.nav,
|
|
3572
|
+
onClick: x,
|
|
3573
|
+
children: /* @__PURE__ */ t("ul", {
|
|
3574
|
+
className: Qr.list,
|
|
3575
|
+
children: r.map((e) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(Zr, {
|
|
3576
|
+
item: e,
|
|
3577
|
+
className: Qr.link,
|
|
3578
|
+
iconClassName: Qr.icon,
|
|
3579
|
+
badgeClassName: Qr.badge,
|
|
3580
|
+
renderLink: i
|
|
3581
|
+
}) }, e.id))
|
|
3582
|
+
})
|
|
3583
|
+
}),
|
|
3584
|
+
a === void 0 ? null : /* @__PURE__ */ t("div", {
|
|
3585
|
+
className: Qr.footer,
|
|
3586
|
+
children: a
|
|
3587
|
+
})
|
|
3588
|
+
]
|
|
3589
|
+
});
|
|
3590
|
+
}
|
|
3591
|
+
var ni = {
|
|
3592
|
+
root: "_root_1b9bc_2",
|
|
3593
|
+
list: "_list_1b9bc_14",
|
|
3594
|
+
item: "_item_1b9bc_23",
|
|
3595
|
+
link: "_link_1b9bc_28",
|
|
3596
|
+
icon: "_icon_1b9bc_69",
|
|
3597
|
+
badge: "_badge_1b9bc_75"
|
|
3598
|
+
}, ri = 3, ii = 5;
|
|
3599
|
+
function ai() {
|
|
3600
|
+
return typeof process > "u" || process.env.NODE_ENV !== "production";
|
|
3601
|
+
}
|
|
3602
|
+
function oi({ items: e, renderLink: n, labels: r, className: i, ...a }) {
|
|
3603
|
+
let s = {
|
|
3604
|
+
...qr,
|
|
3605
|
+
...r
|
|
3606
|
+
}, c = e.length;
|
|
3607
|
+
o(() => {
|
|
3608
|
+
!ai() || c >= ri && c <= ii || console.warn(`BottomNav: use de 3 a 5 destinos; recebeu ${String(c)}.`);
|
|
3609
|
+
}, [c]);
|
|
3610
|
+
let l = [ni.root, i].filter(Boolean).join(" ");
|
|
3611
|
+
return /* @__PURE__ */ t("nav", {
|
|
3612
|
+
...a,
|
|
3613
|
+
"aria-label": s.navigation,
|
|
3614
|
+
className: l,
|
|
3615
|
+
children: /* @__PURE__ */ t("ul", {
|
|
3616
|
+
className: ni.list,
|
|
3617
|
+
children: e.map((e) => /* @__PURE__ */ t("li", {
|
|
3618
|
+
className: ni.item,
|
|
3619
|
+
children: /* @__PURE__ */ t(Zr, {
|
|
3620
|
+
item: e,
|
|
3621
|
+
className: ni.link,
|
|
3622
|
+
iconClassName: ni.icon,
|
|
3623
|
+
badgeClassName: ni.badge,
|
|
3624
|
+
renderLink: n
|
|
3625
|
+
})
|
|
3626
|
+
}, e.id))
|
|
3627
|
+
})
|
|
3628
|
+
});
|
|
3629
|
+
}
|
|
3630
|
+
var si = {
|
|
3631
|
+
root: "_root_1lvgn_2",
|
|
3632
|
+
skipLink: "_skipLink_1lvgn_11",
|
|
3633
|
+
column: "_column_1lvgn_32",
|
|
3634
|
+
main: "_main_1lvgn_40",
|
|
3635
|
+
scrim: "_scrim_1lvgn_50"
|
|
3636
|
+
};
|
|
3637
|
+
// src/app-shell/use-media-query.ts
|
|
3638
|
+
function ci(e) {
|
|
3639
|
+
let [t, n] = f(() => window.matchMedia(e).matches);
|
|
3640
|
+
return o(() => {
|
|
3641
|
+
let t = window.matchMedia(e), r = () => {
|
|
3642
|
+
n(t.matches);
|
|
3643
|
+
};
|
|
3644
|
+
return r(), t.addEventListener("change", r), () => {
|
|
3645
|
+
t.removeEventListener("change", r);
|
|
3646
|
+
};
|
|
3647
|
+
}, [e]), t;
|
|
3648
|
+
}
|
|
3649
|
+
// src/app-shell/app-shell.tsx
|
|
3650
|
+
function li({ sidebar: r, topbar: a, mobileNav: o = "drawer", hideNavigation: c = !1, children: l, labels: u, className: p, ...m }) {
|
|
3651
|
+
let h = {
|
|
3652
|
+
...Jr,
|
|
3653
|
+
...u
|
|
3654
|
+
}, g = s(), _ = s(), v = d(null), [y, b] = f(!1), x = ci(Yr), S = !c, C = S && x && o === "drawer", w = S && x && o === "bottom", T = C && y, E = i(() => {
|
|
3655
|
+
b(!1), v.current?.focus();
|
|
3656
|
+
}, []), [D, O] = f(x);
|
|
3657
|
+
x !== D && (O(x), x || b(!1));
|
|
3658
|
+
let k = C ? /* @__PURE__ */ t(U, {
|
|
3659
|
+
ref: v,
|
|
3660
|
+
icon: /* @__PURE__ */ t(Bn, {}),
|
|
3661
|
+
"aria-label": h.openMenu,
|
|
3662
|
+
"aria-expanded": T,
|
|
3663
|
+
"aria-controls": g,
|
|
3664
|
+
onClick: () => {
|
|
3665
|
+
b(!0);
|
|
3666
|
+
}
|
|
3667
|
+
}) : null, A = [si.root, p].filter(Boolean).join(" ");
|
|
3668
|
+
return /* @__PURE__ */ n("div", {
|
|
3669
|
+
...m,
|
|
3670
|
+
className: A,
|
|
3671
|
+
"data-mobile-nav": o,
|
|
3672
|
+
children: [
|
|
3673
|
+
S ? /* @__PURE__ */ t("a", {
|
|
3674
|
+
href: `#${_}`,
|
|
3675
|
+
className: si.skipLink,
|
|
3676
|
+
children: h.skipToContent
|
|
3677
|
+
}) : null,
|
|
3678
|
+
S && !w ? /* @__PURE__ */ t(ti, {
|
|
3679
|
+
...r,
|
|
3680
|
+
id: g,
|
|
3681
|
+
drawer: C,
|
|
3682
|
+
open: T,
|
|
3683
|
+
onClose: E
|
|
3684
|
+
}) : null,
|
|
3685
|
+
T ? /* @__PURE__ */ t("div", {
|
|
3686
|
+
className: si.scrim,
|
|
3687
|
+
"aria-hidden": "true",
|
|
3688
|
+
onClick: E
|
|
3689
|
+
}) : null,
|
|
3690
|
+
/* @__PURE__ */ n("div", {
|
|
3691
|
+
className: si.column,
|
|
3692
|
+
children: [a || C ? /* @__PURE__ */ t(Kr, {
|
|
3693
|
+
...a,
|
|
3694
|
+
start: /* @__PURE__ */ n(e, { children: [k, a?.start] })
|
|
3695
|
+
}) : null, /* @__PURE__ */ t("main", {
|
|
3696
|
+
id: _,
|
|
3697
|
+
tabIndex: -1,
|
|
3698
|
+
className: si.main,
|
|
3699
|
+
children: l
|
|
3700
|
+
})]
|
|
3701
|
+
}),
|
|
3702
|
+
w ? /* @__PURE__ */ t(oi, {
|
|
3703
|
+
items: r.items,
|
|
3704
|
+
renderLink: r.renderLink,
|
|
3705
|
+
labels: r.labels
|
|
3706
|
+
}) : null
|
|
3707
|
+
]
|
|
3708
|
+
});
|
|
3709
|
+
}
|
|
2845
3710
|
// src/theme/theme.ts
|
|
2846
|
-
function
|
|
3711
|
+
function ui(e) {
|
|
2847
3712
|
return e;
|
|
2848
3713
|
}
|
|
2849
|
-
var
|
|
2850
|
-
light:
|
|
2851
|
-
dark:
|
|
2852
|
-
}),
|
|
2853
|
-
function
|
|
3714
|
+
var di = ui({
|
|
3715
|
+
light: un,
|
|
3716
|
+
dark: dn
|
|
3717
|
+
}), fi = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
3718
|
+
function pi(e) {
|
|
2854
3719
|
let t = e / 255;
|
|
2855
3720
|
return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
2856
3721
|
}
|
|
2857
|
-
function
|
|
2858
|
-
if (!
|
|
3722
|
+
function mi(e) {
|
|
3723
|
+
if (!fi.test(e)) throw TypeError(`Cor fora do formato #RGB ou #RRGGBB: ${e}`);
|
|
2859
3724
|
let t = e.slice(1);
|
|
2860
3725
|
return t.length === 6 ? t : t.replace(/./g, (e) => e + e);
|
|
2861
3726
|
}
|
|
2862
|
-
function
|
|
2863
|
-
let t = parseInt(
|
|
3727
|
+
function hi(e) {
|
|
3728
|
+
let t = parseInt(mi(e), 16), n = pi(t >> 16 & 255), r = pi(t >> 8 & 255), i = pi(t & 255);
|
|
2864
3729
|
return .2126 * n + .7152 * r + .0722 * i;
|
|
2865
3730
|
}
|
|
2866
|
-
function
|
|
2867
|
-
let n =
|
|
3731
|
+
function gi(e, t) {
|
|
3732
|
+
let n = hi(e), r = hi(t);
|
|
2868
3733
|
return (Math.max(n, r) + .05) / (Math.min(n, r) + .05);
|
|
2869
3734
|
}
|
|
2870
|
-
var
|
|
2871
|
-
function $(e, t, n =
|
|
3735
|
+
var _i = 4.5, vi = 3;
|
|
3736
|
+
function $(e, t, n = _i) {
|
|
2872
3737
|
return {
|
|
2873
3738
|
foreground: e,
|
|
2874
3739
|
background: t,
|
|
2875
3740
|
minimum: n
|
|
2876
3741
|
};
|
|
2877
3742
|
}
|
|
2878
|
-
var
|
|
3743
|
+
var yi = [
|
|
2879
3744
|
$("text", "bg"),
|
|
2880
3745
|
$("text", "surface"),
|
|
2881
3746
|
$("text", "surfaceMuted"),
|
|
@@ -2894,15 +3759,15 @@ var nn = [
|
|
|
2894
3759
|
$("warning", "warningSoft"),
|
|
2895
3760
|
$("danger", "dangerSoft"),
|
|
2896
3761
|
$("info", "infoSoft"),
|
|
2897
|
-
$("textFaint", "bg",
|
|
2898
|
-
$("textFaint", "surface",
|
|
3762
|
+
$("textFaint", "bg", vi),
|
|
3763
|
+
$("textFaint", "surface", vi)
|
|
2899
3764
|
];
|
|
2900
|
-
function
|
|
3765
|
+
function bi(e) {
|
|
2901
3766
|
let t = [];
|
|
2902
3767
|
for (let n of ["light", "dark"]) {
|
|
2903
3768
|
let r = e[n];
|
|
2904
|
-
for (let { foreground: e, background: i, minimum: a } of
|
|
2905
|
-
let o =
|
|
3769
|
+
for (let { foreground: e, background: i, minimum: a } of yi) {
|
|
3770
|
+
let o = gi(r[e], r[i]);
|
|
2906
3771
|
o < a && t.push({
|
|
2907
3772
|
theme: n,
|
|
2908
3773
|
foreground: e,
|
|
@@ -2914,4 +3779,4 @@ function rn(e) {
|
|
|
2914
3779
|
}
|
|
2915
3780
|
return t;
|
|
2916
3781
|
}
|
|
2917
|
-
export {
|
|
3782
|
+
export { kr as Accordion, nr as AlertTriangleIcon, li as AppShell, Wn as ArrowLeftIcon, Te as Autocomplete, cn as Badge, In as BookOpenIcon, oi as BottomNav, Rr as BottomSheet, on as BrandLogo, H as Button, yi as CONTRAST_REQUIREMENTS, Ge as Calendar, pr as CalendarIcon, Mr as Callout, Tt as Card, Vr as CardButton, Br as CardLink, $n as CheckIcon, _e as Checkbox, Un as ChevronDownIcon, Vn as ChevronLeftIcon, Hn as ChevronRightIcon, rr as CircleAlertIcon, er as CircleCheckIcon, fr as ClockIcon, Gn as CloseIcon, ar as CloudCheckIcon, ze as ColorField, Re as ColorPicker, Ht as ConfirmDialog, Pe as DEFAULT_COLOR_FIELD_LABELS, Ze as DateField, it as DateTimeField, Nn as DayIcon, Bt as Dialog, Or as Disclosure, Jn as DownloadIcon, Xt as EmptyState, tn as ErrorState, Qn as EyeIcon, Xn as FlagIcon, Wr as FocusHeader, It as FormActions, Ft as FormGrid, An as GridIcon, Fn as HomeIcon, U as IconButton, tr as InfoIcon, Dn as ItemSwatch, Ln as LayersIcon, dr as LightbulbIcon, kn as ListIcon, $t as LoadingState, cr as LogOutIcon, le as MenuButton, Bn as MenuIcon, qn as MinusIcon, Ct as MoneyField, ur as MoonIcon, Dt as PageHeader, mr as PencilIcon, mt as PeriodField, Kn as PlusIcon, rn as ProgressBar, xr as RadioGroup, Zn as RefreshIcon, hr as SearchIcon, ye as SegmentedField, he as SelectField, sr as SettingsIcon, jn as ShelfIcon, ti as Sidebar, Qt as Skeleton, lr as SunIcon, vr as Switch, Mn as TableIcon, jt as Tabs, Oe as TagField, wr as TextAreaField, de as TextField, nt as TimeField, Pn as TimelineIcon, Rn as TimerIcon, Jt as Toast, qt as ToastRegion, kt as Toolbar, Kr as Topbar, gr as TrashIcon, Yn as UploadIcon, or as UserIcon, zn as UsersIcon, Nt as ViewSwitcher, ir as WifiOffIcon, Sn as breakpoints, bi as checkThemeContrast, gi as contrastRatio, dn as dark, ui as defineTheme, mn as fontSizes, hn as fontWeights, xn as fonts, xt as formatCents, bn as gradients, Ne as hexToRgb, Ae as hslToRgb, di as ishtarSinkTheme, Cn as itemPalette, un as light, gn as lineHeights, yt as maskMoneyInput, $e as maskTime, yn as motion, bt as parseMoneyInput, Qe as parseTime, fn as radii, lt as resolvePeriod, Me as rgbToHex, je as rgbToHsl, pn as space, vn as spacing, _n as zIndices };
|