@ishtar-sink/vega 0.0.0-stage → 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/LICENSE +661 -0
- package/README.md +135 -2
- 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/autocomplete/autocomplete.d.ts +37 -0
- package/dist/badge/badge.d.ts +8 -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/brand-logo/brand-logo.d.ts +9 -0
- package/dist/button/button.d.ts +15 -0
- package/dist/calendar/calendar.d.ts +28 -0
- 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/card.d.ts +9 -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/checkbox/checkbox.d.ts +6 -0
- package/dist/color-field/color-field.d.ts +20 -0
- package/dist/color-field/color-picker.d.ts +42 -0
- package/dist/color-field/color.d.ts +11 -0
- package/dist/confirm-dialog/confirm-dialog.d.ts +15 -0
- package/dist/date-field/date-field.d.ts +38 -0
- package/dist/date-time-field/date-time-field.d.ts +33 -0
- package/dist/dialog/dialog.d.ts +21 -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/empty-state/empty-state.d.ts +10 -0
- package/dist/error-state/error-state.d.ts +12 -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/form-layout/form-layout.d.ts +17 -0
- package/dist/icon-button/icon-button.d.ts +10 -0
- package/dist/icons/icon.d.ts +10 -0
- package/dist/icons/icon.types.d.ts +5 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/interface-icons.d.ts +144 -0
- package/dist/icons/view-icons.d.ts +17 -0
- package/dist/index.d.ts +102 -0
- package/dist/index.js +3782 -0
- package/dist/item-swatch/item-swatch.d.ts +10 -0
- package/dist/item-swatch/palette.d.ts +6 -0
- package/dist/loading-state/loading-state.d.ts +13 -0
- package/dist/menu-button/menu-button.d.ts +26 -0
- package/dist/money-field/money-field.d.ts +13 -0
- package/dist/money-field/money-mask.d.ts +6 -0
- package/dist/page-header/page-header.d.ts +20 -0
- package/dist/period-field/period-field.d.ts +47 -0
- package/dist/period-field/period.d.ts +31 -0
- package/dist/progress-bar/progress-bar.d.ts +14 -0
- 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/segmented-field/segmented-field.d.ts +24 -0
- package/dist/select-field/select-field.d.ts +24 -0
- package/dist/style.css +2 -0
- package/dist/switch/switch.d.ts +3 -0
- package/dist/switch/switch.types.d.ts +11 -0
- package/dist/tabs/tabs.d.ts +19 -0
- package/dist/tag-field/tag-field.d.ts +20 -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/dist/text-field/text-field.d.ts +10 -0
- package/dist/theme/contrast.d.ts +16 -0
- package/dist/theme/index.d.ts +5 -0
- package/dist/theme/theme.d.ts +15 -0
- package/dist/theme/tokens.d.ts +138 -0
- package/dist/time-field/parse-time.d.ts +4 -0
- package/dist/time-field/time-field.d.ts +20 -0
- package/dist/toast/toast.d.ts +11 -0
- package/dist/tokens.css +166 -0
- package/dist/toolbar/toolbar.d.ts +16 -0
- package/dist/view-switcher/view-switcher.d.ts +19 -0
- package/fonts/OFL-Inter.txt +92 -0
- package/fonts/OFL-Outfit.txt +93 -0
- package/fonts/inter-variable.woff2 +0 -0
- package/fonts/outfit-variable.ttf +0 -0
- package/package.json +78 -4
package/dist/index.js
ADDED
|
@@ -0,0 +1,3782 @@
|
|
|
1
|
+
import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
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"
|
|
16
|
+
};
|
|
17
|
+
// src/button/button.tsx
|
|
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
|
|
26
|
+
].filter(Boolean).join(" ");
|
|
27
|
+
return /* @__PURE__ */ n("button", {
|
|
28
|
+
...f,
|
|
29
|
+
type: s,
|
|
30
|
+
className: h,
|
|
31
|
+
style: m ? {
|
|
32
|
+
...u,
|
|
33
|
+
"--button-tint": i
|
|
34
|
+
} : u,
|
|
35
|
+
disabled: p,
|
|
36
|
+
"aria-disabled": p || void 0,
|
|
37
|
+
"aria-busy": r || void 0,
|
|
38
|
+
children: [r ? /* @__PURE__ */ t("span", {
|
|
39
|
+
className: se.spinner,
|
|
40
|
+
"aria-hidden": "true",
|
|
41
|
+
"data-button-spinner": ""
|
|
42
|
+
}) : null, d]
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
var ce = {
|
|
46
|
+
root: "_root_kpb9b_1",
|
|
47
|
+
secondary: "_secondary_kpb9b_32",
|
|
48
|
+
ghost: "_ghost_kpb9b_38",
|
|
49
|
+
icon: "_icon_kpb9b_42"
|
|
50
|
+
};
|
|
51
|
+
// src/icon-button/icon-button.tsx
|
|
52
|
+
function U({ icon: e, variant: n = "ghost", type: r = "button", className: i, ...a }) {
|
|
53
|
+
let o = [
|
|
54
|
+
ce.root,
|
|
55
|
+
ce[n],
|
|
56
|
+
i
|
|
57
|
+
].filter(Boolean).join(" ");
|
|
58
|
+
return /* @__PURE__ */ t("button", {
|
|
59
|
+
...a,
|
|
60
|
+
type: r,
|
|
61
|
+
className: o,
|
|
62
|
+
children: /* @__PURE__ */ t("span", {
|
|
63
|
+
className: ce.icon,
|
|
64
|
+
"aria-hidden": "true",
|
|
65
|
+
children: e
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
var W = {
|
|
70
|
+
root: "_root_1whtz_1",
|
|
71
|
+
trigger: "_trigger_1whtz_6",
|
|
72
|
+
menu: "_menu_1whtz_32",
|
|
73
|
+
bottom: "_bottom_1whtz_45",
|
|
74
|
+
alignStart: "_alignStart_1whtz_50",
|
|
75
|
+
right: "_right_1whtz_55",
|
|
76
|
+
item: "_item_1whtz_60",
|
|
77
|
+
danger: "_danger_1whtz_88",
|
|
78
|
+
icon: "_icon_1whtz_92"
|
|
79
|
+
};
|
|
80
|
+
// src/menu-button/menu-button.tsx
|
|
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);
|
|
88
|
+
};
|
|
89
|
+
}, [w, p]);
|
|
90
|
+
let O = () => Array.from(C.current?.querySelectorAll("[role=\"menuitem\"]") ?? []);
|
|
91
|
+
function k(e) {
|
|
92
|
+
T(!1), e && S.current?.focus();
|
|
93
|
+
}
|
|
94
|
+
o(() => {
|
|
95
|
+
if (!w) return;
|
|
96
|
+
O()[0]?.focus();
|
|
97
|
+
let e = (e) => {
|
|
98
|
+
x.current?.contains(e.target) || T(!1);
|
|
99
|
+
};
|
|
100
|
+
return document.addEventListener("pointerdown", e, !0), () => {
|
|
101
|
+
document.removeEventListener("pointerdown", e, !0);
|
|
102
|
+
};
|
|
103
|
+
}, [w]);
|
|
104
|
+
function A(e) {
|
|
105
|
+
let t = O(), n = t.indexOf(document.activeElement);
|
|
106
|
+
switch (e.key) {
|
|
107
|
+
case "ArrowDown":
|
|
108
|
+
t[(n + 1) % t.length]?.focus();
|
|
109
|
+
break;
|
|
110
|
+
case "ArrowUp":
|
|
111
|
+
t[(n - 1 + t.length) % t.length]?.focus();
|
|
112
|
+
break;
|
|
113
|
+
case "Home":
|
|
114
|
+
t[0]?.focus();
|
|
115
|
+
break;
|
|
116
|
+
case "End":
|
|
117
|
+
t[t.length - 1]?.focus();
|
|
118
|
+
break;
|
|
119
|
+
case "Escape":
|
|
120
|
+
e.preventDefault(), e.stopPropagation(), k(!0);
|
|
121
|
+
return;
|
|
122
|
+
case "Tab":
|
|
123
|
+
k(!1);
|
|
124
|
+
return;
|
|
125
|
+
default: return;
|
|
126
|
+
}
|
|
127
|
+
e.preventDefault();
|
|
128
|
+
}
|
|
129
|
+
function j(e) {
|
|
130
|
+
k(!0), e.onSelect?.();
|
|
131
|
+
}
|
|
132
|
+
return /* @__PURE__ */ n("div", {
|
|
133
|
+
...y,
|
|
134
|
+
className: [W.root, m].filter(Boolean).join(" "),
|
|
135
|
+
style: _,
|
|
136
|
+
ref: x,
|
|
137
|
+
children: [/* @__PURE__ */ t("button", {
|
|
138
|
+
ref: S,
|
|
139
|
+
type: "button",
|
|
140
|
+
className: g ?? W.trigger,
|
|
141
|
+
"aria-label": r,
|
|
142
|
+
"aria-haspopup": "menu",
|
|
143
|
+
"aria-expanded": w,
|
|
144
|
+
"aria-controls": w ? b : void 0,
|
|
145
|
+
onClick: () => {
|
|
146
|
+
T((e) => !e);
|
|
147
|
+
},
|
|
148
|
+
children: a
|
|
149
|
+
}), w ? /* @__PURE__ */ t("div", {
|
|
150
|
+
ref: C,
|
|
151
|
+
id: b,
|
|
152
|
+
role: "menu",
|
|
153
|
+
tabIndex: -1,
|
|
154
|
+
"aria-label": i ?? r,
|
|
155
|
+
className: [
|
|
156
|
+
W.menu,
|
|
157
|
+
p === "right-end" ? W.right : W.bottom,
|
|
158
|
+
E ? W.alignStart : "",
|
|
159
|
+
h
|
|
160
|
+
].filter(Boolean).join(" "),
|
|
161
|
+
onKeyDown: A,
|
|
162
|
+
children: u.map((r) => {
|
|
163
|
+
let i = {
|
|
164
|
+
role: "menuitem",
|
|
165
|
+
tabIndex: -1,
|
|
166
|
+
className: [W.item, r.tone === "danger" ? W.danger : ""].filter(Boolean).join(" "),
|
|
167
|
+
...r.tone ? { "data-tone": r.tone } : {}
|
|
168
|
+
}, a = /* @__PURE__ */ n(e, { children: [r.icon ? /* @__PURE__ */ t("span", {
|
|
169
|
+
"aria-hidden": "true",
|
|
170
|
+
className: W.icon,
|
|
171
|
+
children: r.icon
|
|
172
|
+
}) : null, /* @__PURE__ */ t("span", { children: r.label })] });
|
|
173
|
+
return r.href ? /* @__PURE__ */ t("a", {
|
|
174
|
+
...i,
|
|
175
|
+
href: r.href,
|
|
176
|
+
onClick: (e) => {
|
|
177
|
+
r.onSelect && !e.metaKey && !e.ctrlKey ? (e.preventDefault(), j(r)) : T(!1);
|
|
178
|
+
},
|
|
179
|
+
children: a
|
|
180
|
+
}, r.id) : /* @__PURE__ */ t("button", {
|
|
181
|
+
type: "button",
|
|
182
|
+
...i,
|
|
183
|
+
onClick: () => {
|
|
184
|
+
j(r);
|
|
185
|
+
},
|
|
186
|
+
children: a
|
|
187
|
+
}, r.id);
|
|
188
|
+
})
|
|
189
|
+
}) : null]
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
var ue = {
|
|
193
|
+
root: "_root_o7yxy_1",
|
|
194
|
+
label: "_label_o7yxy_8",
|
|
195
|
+
control: "_control_o7yxy_17",
|
|
196
|
+
help: "_help_o7yxy_41",
|
|
197
|
+
error: "_error_o7yxy_47"
|
|
198
|
+
};
|
|
199
|
+
// src/text-field/text-field.tsx
|
|
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 = [
|
|
202
|
+
l,
|
|
203
|
+
r ? m : null,
|
|
204
|
+
i ? h : null
|
|
205
|
+
].filter(Boolean).join(" ");
|
|
206
|
+
return /* @__PURE__ */ n("div", {
|
|
207
|
+
className: ue.root,
|
|
208
|
+
children: [
|
|
209
|
+
/* @__PURE__ */ t("label", {
|
|
210
|
+
htmlFor: p,
|
|
211
|
+
className: ue.label,
|
|
212
|
+
children: e
|
|
213
|
+
}),
|
|
214
|
+
/* @__PURE__ */ t("input", {
|
|
215
|
+
...d,
|
|
216
|
+
id: p,
|
|
217
|
+
className: [ue.control, o].filter(Boolean).join(" "),
|
|
218
|
+
style: c,
|
|
219
|
+
"aria-invalid": i ? !0 : u,
|
|
220
|
+
"aria-describedby": g || void 0
|
|
221
|
+
}),
|
|
222
|
+
r ? /* @__PURE__ */ t("p", {
|
|
223
|
+
id: m,
|
|
224
|
+
className: ue.help,
|
|
225
|
+
children: r
|
|
226
|
+
}) : null,
|
|
227
|
+
i ? /* @__PURE__ */ t("p", {
|
|
228
|
+
id: h,
|
|
229
|
+
role: "alert",
|
|
230
|
+
className: ue.error,
|
|
231
|
+
children: i
|
|
232
|
+
}) : null
|
|
233
|
+
]
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
var G = {
|
|
237
|
+
root: "_root_17ncm_1",
|
|
238
|
+
label: "_label_17ncm_8",
|
|
239
|
+
wrap: "_wrap_17ncm_17",
|
|
240
|
+
control: "_control_17ncm_21",
|
|
241
|
+
help: "_help_17ncm_51",
|
|
242
|
+
error: "_error_17ncm_57",
|
|
243
|
+
placeholder: "_placeholder_17ncm_72",
|
|
244
|
+
chevron: "_chevron_17ncm_76",
|
|
245
|
+
chevronOpen: "_chevronOpen_17ncm_82",
|
|
246
|
+
list: "_list_17ncm_86",
|
|
247
|
+
above: "_above_17ncm_108",
|
|
248
|
+
option: "_option_17ncm_113",
|
|
249
|
+
active: "_active_17ncm_126"
|
|
250
|
+
};
|
|
251
|
+
// src/select-field/select-field.tsx
|
|
252
|
+
function fe() {
|
|
253
|
+
return /* @__PURE__ */ t("svg", {
|
|
254
|
+
viewBox: "0 0 24 24",
|
|
255
|
+
width: "16",
|
|
256
|
+
height: "16",
|
|
257
|
+
fill: "none",
|
|
258
|
+
stroke: "currentColor",
|
|
259
|
+
strokeWidth: "2",
|
|
260
|
+
strokeLinecap: "round",
|
|
261
|
+
strokeLinejoin: "round",
|
|
262
|
+
"aria-hidden": "true",
|
|
263
|
+
focusable: "false",
|
|
264
|
+
children: /* @__PURE__ */ t("path", { d: "m6 9 6 6 6-6" })
|
|
265
|
+
});
|
|
266
|
+
}
|
|
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({
|
|
274
|
+
text: "",
|
|
275
|
+
at: 0
|
|
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));
|
|
281
|
+
}
|
|
282
|
+
function V(e) {
|
|
283
|
+
R(!1), e && P.current?.focus();
|
|
284
|
+
}
|
|
285
|
+
function ae(e) {
|
|
286
|
+
let t = m[e];
|
|
287
|
+
t && t.value !== h && g(t.value), V(!0);
|
|
288
|
+
}
|
|
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;
|
|
295
|
+
let e = (e) => {
|
|
296
|
+
N.current?.contains(e.target) || V(!1);
|
|
297
|
+
}, t = (e) => {
|
|
298
|
+
performance.now() < ee.current || F.current?.contains(e.target) || V(!1);
|
|
299
|
+
}, n = () => {
|
|
300
|
+
V(!1);
|
|
301
|
+
};
|
|
302
|
+
return document.addEventListener("pointerdown", e, !0), document.addEventListener("scroll", t, !0), window.addEventListener("resize", n), () => {
|
|
303
|
+
document.removeEventListener("pointerdown", e, !0), document.removeEventListener("scroll", t, !0), window.removeEventListener("resize", n);
|
|
304
|
+
};
|
|
305
|
+
}, [L]), o(() => {
|
|
306
|
+
L && (ee.current = performance.now() + me, document.getElementById(`${k}-${String(z)}`)?.scrollIntoView({ block: "nearest" }));
|
|
307
|
+
}, [
|
|
308
|
+
L,
|
|
309
|
+
z,
|
|
310
|
+
k
|
|
311
|
+
]);
|
|
312
|
+
function oe(e) {
|
|
313
|
+
["ArrowDown", "ArrowUp"].includes(e.key) && (e.preventDefault(), ie());
|
|
314
|
+
}
|
|
315
|
+
function se(e) {
|
|
316
|
+
let t = m.length - 1;
|
|
317
|
+
switch (e.key) {
|
|
318
|
+
case "ArrowDown":
|
|
319
|
+
B((e) => Math.min(t, e + 1));
|
|
320
|
+
break;
|
|
321
|
+
case "ArrowUp":
|
|
322
|
+
B((e) => Math.max(0, e - 1));
|
|
323
|
+
break;
|
|
324
|
+
case "Home":
|
|
325
|
+
B(0);
|
|
326
|
+
break;
|
|
327
|
+
case "End":
|
|
328
|
+
B(t);
|
|
329
|
+
break;
|
|
330
|
+
case "Enter":
|
|
331
|
+
case " ":
|
|
332
|
+
e.preventDefault(), ae(z);
|
|
333
|
+
return;
|
|
334
|
+
case "Escape":
|
|
335
|
+
e.preventDefault(), e.stopPropagation(), V(!0);
|
|
336
|
+
return;
|
|
337
|
+
case "Tab":
|
|
338
|
+
V(!1);
|
|
339
|
+
return;
|
|
340
|
+
default: {
|
|
341
|
+
if (e.key.length !== 1 || e.ctrlKey || e.metaKey) return;
|
|
342
|
+
let t = e.timeStamp, n = (t - I.current.at < pe ? I.current.text : "") + e.key.toLowerCase();
|
|
343
|
+
I.current = {
|
|
344
|
+
text: n,
|
|
345
|
+
at: t
|
|
346
|
+
};
|
|
347
|
+
let r = m.findIndex((e) => e.label.toLowerCase().startsWith(n));
|
|
348
|
+
r >= 0 && B(r);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
e.preventDefault();
|
|
352
|
+
}
|
|
353
|
+
return /* @__PURE__ */ n("div", {
|
|
354
|
+
className: G.root,
|
|
355
|
+
ref: N,
|
|
356
|
+
children: [
|
|
357
|
+
/* @__PURE__ */ t("label", {
|
|
358
|
+
id: D,
|
|
359
|
+
htmlFor: E,
|
|
360
|
+
className: G.label,
|
|
361
|
+
children: e
|
|
362
|
+
}),
|
|
363
|
+
/* @__PURE__ */ n("div", {
|
|
364
|
+
className: G.wrap,
|
|
365
|
+
children: [/* @__PURE__ */ n("button", {
|
|
366
|
+
...w,
|
|
367
|
+
ref: P,
|
|
368
|
+
type: "button",
|
|
369
|
+
id: E,
|
|
370
|
+
className: [G.control, u].filter(Boolean).join(" "),
|
|
371
|
+
style: p,
|
|
372
|
+
"aria-haspopup": "listbox",
|
|
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,
|
|
379
|
+
onClick: () => {
|
|
380
|
+
L ? V(!1) : ie();
|
|
381
|
+
},
|
|
382
|
+
onKeyDown: oe,
|
|
383
|
+
onBlur: () => {
|
|
384
|
+
L || _?.();
|
|
385
|
+
},
|
|
386
|
+
children: [/* @__PURE__ */ t("span", {
|
|
387
|
+
id: O,
|
|
388
|
+
className: re ? G.value : G.placeholder,
|
|
389
|
+
children: re?.label ?? v ?? ""
|
|
390
|
+
}), /* @__PURE__ */ t("span", {
|
|
391
|
+
className: [G.chevron, L ? G.chevronOpen : ""].join(" "),
|
|
392
|
+
children: /* @__PURE__ */ t(fe, {})
|
|
393
|
+
})]
|
|
394
|
+
}), L ? /* @__PURE__ */ t("ul", {
|
|
395
|
+
ref: F,
|
|
396
|
+
id: k,
|
|
397
|
+
role: "listbox",
|
|
398
|
+
tabIndex: 0,
|
|
399
|
+
"aria-labelledby": D,
|
|
400
|
+
"aria-activedescendant": `${k}-${String(z)}`,
|
|
401
|
+
className: [G.list, te ? G.above : ""].join(" "),
|
|
402
|
+
onKeyDown: se,
|
|
403
|
+
children: m.map((e, n) => /* @__PURE__ */ t("li", {
|
|
404
|
+
id: `${k}-${String(n)}`,
|
|
405
|
+
role: "option",
|
|
406
|
+
"aria-selected": e.value === h,
|
|
407
|
+
className: [G.option, n === z ? G.active : ""].join(" "),
|
|
408
|
+
onMouseMove: () => {
|
|
409
|
+
n !== z && B(n);
|
|
410
|
+
},
|
|
411
|
+
onClick: () => {
|
|
412
|
+
ae(n);
|
|
413
|
+
},
|
|
414
|
+
children: e.label
|
|
415
|
+
}, e.value))
|
|
416
|
+
}) : null]
|
|
417
|
+
}),
|
|
418
|
+
b ? /* @__PURE__ */ t("input", {
|
|
419
|
+
type: "hidden",
|
|
420
|
+
name: b,
|
|
421
|
+
value: h
|
|
422
|
+
}) : null,
|
|
423
|
+
r ? /* @__PURE__ */ t("p", {
|
|
424
|
+
id: A,
|
|
425
|
+
className: G.help,
|
|
426
|
+
children: r
|
|
427
|
+
}) : null,
|
|
428
|
+
i ? /* @__PURE__ */ t("p", {
|
|
429
|
+
id: j,
|
|
430
|
+
role: "alert",
|
|
431
|
+
className: G.error,
|
|
432
|
+
children: i
|
|
433
|
+
}) : null
|
|
434
|
+
]
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
var ge = {
|
|
438
|
+
root: "_root_114y1_1",
|
|
439
|
+
control: "_control_114y1_7",
|
|
440
|
+
label: "_label_114y1_20"
|
|
441
|
+
};
|
|
442
|
+
// src/checkbox/checkbox.tsx
|
|
443
|
+
function _e({ label: e, id: r, className: i, style: a, ...o }) {
|
|
444
|
+
let c = s(), l = r ?? c;
|
|
445
|
+
return /* @__PURE__ */ n("div", {
|
|
446
|
+
className: ge.root,
|
|
447
|
+
children: [/* @__PURE__ */ t("input", {
|
|
448
|
+
...o,
|
|
449
|
+
id: l,
|
|
450
|
+
type: "checkbox",
|
|
451
|
+
className: [ge.control, i].filter(Boolean).join(" "),
|
|
452
|
+
style: a
|
|
453
|
+
}), /* @__PURE__ */ t("label", {
|
|
454
|
+
htmlFor: l,
|
|
455
|
+
className: ge.label,
|
|
456
|
+
children: e
|
|
457
|
+
})]
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
var ve = {
|
|
461
|
+
root: "_root_161y9_1",
|
|
462
|
+
legend: "_legend_161y9_11",
|
|
463
|
+
group: "_group_161y9_22",
|
|
464
|
+
segment: "_segment_161y9_34",
|
|
465
|
+
input: "_input_161y9_39",
|
|
466
|
+
text: "_text_161y9_49",
|
|
467
|
+
help: "_help_161y9_74",
|
|
468
|
+
error: "_error_161y9_80"
|
|
469
|
+
};
|
|
470
|
+
// src/segmented-field/segmented-field.tsx
|
|
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 = [
|
|
473
|
+
p,
|
|
474
|
+
u ? _ : null,
|
|
475
|
+
l ? v : null
|
|
476
|
+
].filter(Boolean).join(" ");
|
|
477
|
+
return /* @__PURE__ */ n("fieldset", {
|
|
478
|
+
...m,
|
|
479
|
+
className: [ve.root, d].filter(Boolean).join(" "),
|
|
480
|
+
style: f,
|
|
481
|
+
"aria-describedby": y || void 0,
|
|
482
|
+
children: [
|
|
483
|
+
/* @__PURE__ */ t("legend", {
|
|
484
|
+
className: ve.legend,
|
|
485
|
+
children: e
|
|
486
|
+
}),
|
|
487
|
+
/* @__PURE__ */ t("div", {
|
|
488
|
+
role: "radiogroup",
|
|
489
|
+
"aria-label": e,
|
|
490
|
+
className: ve.group,
|
|
491
|
+
children: r.map((e) => /* @__PURE__ */ n("label", {
|
|
492
|
+
className: ve.segment,
|
|
493
|
+
children: [/* @__PURE__ */ t("input", {
|
|
494
|
+
type: "radio",
|
|
495
|
+
name: g,
|
|
496
|
+
value: e.value,
|
|
497
|
+
checked: e.value === i,
|
|
498
|
+
className: ve.input,
|
|
499
|
+
onChange: () => {
|
|
500
|
+
a(e.value);
|
|
501
|
+
},
|
|
502
|
+
onBlur: o
|
|
503
|
+
}), /* @__PURE__ */ t("span", {
|
|
504
|
+
className: ve.text,
|
|
505
|
+
children: e.label
|
|
506
|
+
})]
|
|
507
|
+
}, e.value))
|
|
508
|
+
}),
|
|
509
|
+
u ? /* @__PURE__ */ t("p", {
|
|
510
|
+
id: _,
|
|
511
|
+
className: ve.help,
|
|
512
|
+
children: u
|
|
513
|
+
}) : null,
|
|
514
|
+
l ? /* @__PURE__ */ t("p", {
|
|
515
|
+
id: v,
|
|
516
|
+
role: "alert",
|
|
517
|
+
className: ve.error,
|
|
518
|
+
children: l
|
|
519
|
+
}) : null
|
|
520
|
+
]
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
var K = {
|
|
524
|
+
root: "_root_1m3wp_2",
|
|
525
|
+
label: "_label_1m3wp_9",
|
|
526
|
+
wrap: "_wrap_1m3wp_18",
|
|
527
|
+
control: "_control_1m3wp_22",
|
|
528
|
+
chevron: "_chevron_1m3wp_57",
|
|
529
|
+
help: "_help_1m3wp_67",
|
|
530
|
+
error: "_error_1m3wp_73",
|
|
531
|
+
popup: "_popup_1m3wp_82",
|
|
532
|
+
above: "_above_1m3wp_95",
|
|
533
|
+
list: "_list_1m3wp_100",
|
|
534
|
+
empty: "_empty_1m3wp_108",
|
|
535
|
+
option: "_option_1m3wp_115",
|
|
536
|
+
active: "_active_1m3wp_131",
|
|
537
|
+
check: "_check_1m3wp_135",
|
|
538
|
+
pills: "_pills_1m3wp_141",
|
|
539
|
+
pill: "_pill_1m3wp_141",
|
|
540
|
+
remove: "_remove_1m3wp_163"
|
|
541
|
+
}, be = "Nenhuma opção encontrada", xe = (e) => `Remover ${e}`;
|
|
542
|
+
function Se(e) {
|
|
543
|
+
return e.normalize("NFD").replace(/\p{Diacritic}/gu, "").toLowerCase().trim();
|
|
544
|
+
}
|
|
545
|
+
function Ce() {
|
|
546
|
+
return /* @__PURE__ */ t("svg", {
|
|
547
|
+
viewBox: "0 0 24 24",
|
|
548
|
+
width: "16",
|
|
549
|
+
height: "16",
|
|
550
|
+
fill: "none",
|
|
551
|
+
stroke: "currentColor",
|
|
552
|
+
strokeWidth: "2",
|
|
553
|
+
strokeLinecap: "round",
|
|
554
|
+
strokeLinejoin: "round",
|
|
555
|
+
"aria-hidden": "true",
|
|
556
|
+
focusable: "false",
|
|
557
|
+
children: /* @__PURE__ */ t("path", { d: "m6 9 6 6 6-6" })
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
function we() {
|
|
561
|
+
return /* @__PURE__ */ t("svg", {
|
|
562
|
+
viewBox: "0 0 24 24",
|
|
563
|
+
width: "16",
|
|
564
|
+
height: "16",
|
|
565
|
+
fill: "none",
|
|
566
|
+
stroke: "currentColor",
|
|
567
|
+
strokeWidth: "2.5",
|
|
568
|
+
strokeLinecap: "round",
|
|
569
|
+
strokeLinejoin: "round",
|
|
570
|
+
"aria-hidden": "true",
|
|
571
|
+
focusable: "false",
|
|
572
|
+
children: /* @__PURE__ */ t("path", { d: "m5 12 5 5 9-10" })
|
|
573
|
+
});
|
|
574
|
+
}
|
|
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 = [
|
|
577
|
+
S,
|
|
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 ?? "";
|
|
583
|
+
function de() {
|
|
584
|
+
B(!1), ne(!1), ie("");
|
|
585
|
+
}
|
|
586
|
+
function G() {
|
|
587
|
+
y || (ae(0), B(!0));
|
|
588
|
+
}
|
|
589
|
+
function fe(t) {
|
|
590
|
+
if (e.multiple) {
|
|
591
|
+
let n = e.value.includes(t.value) ? e.value.filter((e) => e !== t.value) : [...e.value, 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();
|
|
594
|
+
}
|
|
595
|
+
function pe(t) {
|
|
596
|
+
e.multiple && (e.onChange(e.value.filter((e) => e !== t)), L.current?.focus());
|
|
597
|
+
}
|
|
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);
|
|
602
|
+
}, [
|
|
603
|
+
z,
|
|
604
|
+
U.length,
|
|
605
|
+
W
|
|
606
|
+
]), o(() => {
|
|
607
|
+
if (!z) return;
|
|
608
|
+
let e = (e) => {
|
|
609
|
+
I.current?.contains(e.target) || de();
|
|
610
|
+
};
|
|
611
|
+
return document.addEventListener("pointerdown", e, !0), window.addEventListener("resize", de), () => {
|
|
612
|
+
document.removeEventListener("pointerdown", e, !0), window.removeEventListener("resize", de);
|
|
613
|
+
};
|
|
614
|
+
}, [z]), o(() => {
|
|
615
|
+
z && document.getElementById(`${N}-${String(V)}`)?.scrollIntoView({ block: "nearest" });
|
|
616
|
+
}, [
|
|
617
|
+
z,
|
|
618
|
+
V,
|
|
619
|
+
N
|
|
620
|
+
]);
|
|
621
|
+
function me(e) {
|
|
622
|
+
ie(e.target.value), ne(!0), ae(0), B(!0);
|
|
623
|
+
}
|
|
624
|
+
function he(t) {
|
|
625
|
+
if (y) return;
|
|
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();
|
|
628
|
+
return;
|
|
629
|
+
}
|
|
630
|
+
let n = U.length - 1;
|
|
631
|
+
switch (t.key) {
|
|
632
|
+
case "ArrowDown":
|
|
633
|
+
t.preventDefault(), ae((e) => Math.min(n, e + 1));
|
|
634
|
+
break;
|
|
635
|
+
case "ArrowUp":
|
|
636
|
+
t.preventDefault(), ae((e) => Math.max(0, e - 1));
|
|
637
|
+
break;
|
|
638
|
+
case "Enter": {
|
|
639
|
+
t.preventDefault();
|
|
640
|
+
let e = U[V];
|
|
641
|
+
e && fe(e);
|
|
642
|
+
break;
|
|
643
|
+
}
|
|
644
|
+
case "Escape":
|
|
645
|
+
t.preventDefault(), t.stopPropagation(), de();
|
|
646
|
+
break;
|
|
647
|
+
case "Tab":
|
|
648
|
+
de();
|
|
649
|
+
break;
|
|
650
|
+
case "Backspace": e.multiple && ue === "" && H.length > 0 && e.onChange(e.value.slice(0, -1));
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
let ge = [K.popup, oe ? K.above : ""].filter(Boolean).join(" ");
|
|
654
|
+
return /* @__PURE__ */ n("div", {
|
|
655
|
+
className: K.root,
|
|
656
|
+
ref: I,
|
|
657
|
+
children: [
|
|
658
|
+
/* @__PURE__ */ t("label", {
|
|
659
|
+
id: M,
|
|
660
|
+
htmlFor: j,
|
|
661
|
+
className: K.label,
|
|
662
|
+
children: r
|
|
663
|
+
}),
|
|
664
|
+
/* @__PURE__ */ n("div", {
|
|
665
|
+
className: K.wrap,
|
|
666
|
+
children: [
|
|
667
|
+
/* @__PURE__ */ t("input", {
|
|
668
|
+
autoComplete: "off",
|
|
669
|
+
...O,
|
|
670
|
+
ref: L,
|
|
671
|
+
id: j,
|
|
672
|
+
type: "text",
|
|
673
|
+
role: "combobox",
|
|
674
|
+
className: [K.control, _].filter(Boolean).join(" "),
|
|
675
|
+
style: v,
|
|
676
|
+
"aria-autocomplete": "list",
|
|
677
|
+
"aria-expanded": W,
|
|
678
|
+
"aria-controls": W ? N : void 0,
|
|
679
|
+
"aria-activedescendant": le,
|
|
680
|
+
"aria-invalid": h ? !0 : C,
|
|
681
|
+
"aria-describedby": ee || void 0,
|
|
682
|
+
disabled: y,
|
|
683
|
+
value: ue,
|
|
684
|
+
onChange: me,
|
|
685
|
+
onClick: () => {
|
|
686
|
+
z || y || (G(), L.current?.select());
|
|
687
|
+
},
|
|
688
|
+
onKeyDown: he,
|
|
689
|
+
onBlur: () => {
|
|
690
|
+
z || T?.();
|
|
691
|
+
}
|
|
692
|
+
}),
|
|
693
|
+
/* @__PURE__ */ t("span", {
|
|
694
|
+
className: K.chevron,
|
|
695
|
+
children: /* @__PURE__ */ t(Ce, {})
|
|
696
|
+
}),
|
|
697
|
+
z ? /* @__PURE__ */ t("div", {
|
|
698
|
+
ref: R,
|
|
699
|
+
className: ge,
|
|
700
|
+
children: W ? /* @__PURE__ */ t("ul", {
|
|
701
|
+
id: N,
|
|
702
|
+
role: "listbox",
|
|
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);
|
|
708
|
+
return /* @__PURE__ */ n("li", {
|
|
709
|
+
id: `${N}-${String(r)}`,
|
|
710
|
+
role: "option",
|
|
711
|
+
"aria-selected": i,
|
|
712
|
+
className: [K.option, r === V ? K.active : ""].filter(Boolean).join(" "),
|
|
713
|
+
onMouseDown: (e) => {
|
|
714
|
+
e.preventDefault();
|
|
715
|
+
},
|
|
716
|
+
onMouseMove: () => {
|
|
717
|
+
r !== V && ae(r);
|
|
718
|
+
},
|
|
719
|
+
onClick: () => {
|
|
720
|
+
fe(e);
|
|
721
|
+
},
|
|
722
|
+
children: [e.label, k && i ? /* @__PURE__ */ t("span", {
|
|
723
|
+
className: K.check,
|
|
724
|
+
children: /* @__PURE__ */ t(we, {})
|
|
725
|
+
}) : null]
|
|
726
|
+
}, String(e.value));
|
|
727
|
+
})
|
|
728
|
+
}) : /* @__PURE__ */ t("p", {
|
|
729
|
+
role: "status",
|
|
730
|
+
className: K.empty,
|
|
731
|
+
children: a
|
|
732
|
+
})
|
|
733
|
+
}) : null
|
|
734
|
+
]
|
|
735
|
+
}),
|
|
736
|
+
e.multiple && e.value.length > 0 ? /* @__PURE__ */ t("ul", {
|
|
737
|
+
"aria-label": u ?? `${r} escolhidas`,
|
|
738
|
+
className: K.pills,
|
|
739
|
+
children: e.value.map((e) => {
|
|
740
|
+
let r = i.find((t) => t.value === e)?.label ?? String(e);
|
|
741
|
+
return /* @__PURE__ */ n("li", {
|
|
742
|
+
className: K.pill,
|
|
743
|
+
children: [r, /* @__PURE__ */ t("button", {
|
|
744
|
+
type: "button",
|
|
745
|
+
className: K.remove,
|
|
746
|
+
"aria-label": p(r),
|
|
747
|
+
disabled: y,
|
|
748
|
+
onClick: () => {
|
|
749
|
+
pe(e);
|
|
750
|
+
},
|
|
751
|
+
children: /* @__PURE__ */ t("span", {
|
|
752
|
+
"aria-hidden": "true",
|
|
753
|
+
children: "×"
|
|
754
|
+
})
|
|
755
|
+
})]
|
|
756
|
+
}, String(e));
|
|
757
|
+
})
|
|
758
|
+
}) : null,
|
|
759
|
+
b ? H.map((e) => /* @__PURE__ */ t("input", {
|
|
760
|
+
type: "hidden",
|
|
761
|
+
name: b,
|
|
762
|
+
value: String(e)
|
|
763
|
+
}, String(e))) : null,
|
|
764
|
+
b && !e.multiple && e.value === null ? /* @__PURE__ */ t("input", {
|
|
765
|
+
type: "hidden",
|
|
766
|
+
name: b,
|
|
767
|
+
value: ""
|
|
768
|
+
}) : null,
|
|
769
|
+
m ? /* @__PURE__ */ t("p", {
|
|
770
|
+
id: P,
|
|
771
|
+
className: K.help,
|
|
772
|
+
children: m
|
|
773
|
+
}) : null,
|
|
774
|
+
h ? /* @__PURE__ */ t("p", {
|
|
775
|
+
id: F,
|
|
776
|
+
role: "alert",
|
|
777
|
+
className: K.error,
|
|
778
|
+
children: h
|
|
779
|
+
}) : null
|
|
780
|
+
]
|
|
781
|
+
});
|
|
782
|
+
}
|
|
783
|
+
var Ee = {
|
|
784
|
+
root: "_root_gtcmb_1",
|
|
785
|
+
label: "_label_gtcmb_8",
|
|
786
|
+
control: "_control_gtcmb_17",
|
|
787
|
+
pills: "_pills_gtcmb_42",
|
|
788
|
+
pill: "_pill_gtcmb_42",
|
|
789
|
+
remove: "_remove_gtcmb_64",
|
|
790
|
+
help: "_help_gtcmb_86",
|
|
791
|
+
error: "_error_gtcmb_92"
|
|
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 = [
|
|
795
|
+
v,
|
|
796
|
+
u ? C : null,
|
|
797
|
+
p ? w : null
|
|
798
|
+
].filter(Boolean).join(" "), E = d(null), [D, O] = f("");
|
|
799
|
+
c(_, () => E.current, []);
|
|
800
|
+
function k(e) {
|
|
801
|
+
let t = e.trim().replace(/^#+/, "").trim();
|
|
802
|
+
O(""), t && (r.some((e) => e.toLowerCase() === t.toLowerCase()) || i([...r, t]));
|
|
803
|
+
}
|
|
804
|
+
function A(e) {
|
|
805
|
+
e.key === "Enter" || e.key === "," ? (e.preventDefault(), k(D)) : e.key === "Backspace" && D === "" && r.length > 0 && i(r.slice(0, -1));
|
|
806
|
+
}
|
|
807
|
+
return /* @__PURE__ */ n("div", {
|
|
808
|
+
className: Ee.root,
|
|
809
|
+
children: [
|
|
810
|
+
/* @__PURE__ */ t("label", {
|
|
811
|
+
htmlFor: S,
|
|
812
|
+
className: Ee.label,
|
|
813
|
+
children: e
|
|
814
|
+
}),
|
|
815
|
+
/* @__PURE__ */ t("input", {
|
|
816
|
+
autoComplete: "off",
|
|
817
|
+
...b,
|
|
818
|
+
ref: E,
|
|
819
|
+
id: S,
|
|
820
|
+
type: "text",
|
|
821
|
+
className: [Ee.control, h].filter(Boolean).join(" "),
|
|
822
|
+
style: g,
|
|
823
|
+
value: D,
|
|
824
|
+
"aria-invalid": p ? !0 : y,
|
|
825
|
+
"aria-describedby": T || void 0,
|
|
826
|
+
onChange: (e) => {
|
|
827
|
+
let t = e.target.value;
|
|
828
|
+
t.includes(",") ? (t.split(",").slice(0, -1).forEach((e) => {
|
|
829
|
+
k(e);
|
|
830
|
+
}), O(t.slice(t.lastIndexOf(",") + 1))) : O(t);
|
|
831
|
+
},
|
|
832
|
+
onKeyDown: A,
|
|
833
|
+
onBlur: () => {
|
|
834
|
+
k(D), a?.();
|
|
835
|
+
}
|
|
836
|
+
}),
|
|
837
|
+
r.length > 0 ? /* @__PURE__ */ t("ul", {
|
|
838
|
+
"aria-label": o ?? `${e} adicionadas`,
|
|
839
|
+
className: Ee.pills,
|
|
840
|
+
children: r.map((e) => /* @__PURE__ */ n("li", {
|
|
841
|
+
className: Ee.pill,
|
|
842
|
+
children: [/* @__PURE__ */ t("span", { children: e }), /* @__PURE__ */ t("button", {
|
|
843
|
+
type: "button",
|
|
844
|
+
className: Ee.remove,
|
|
845
|
+
"aria-label": l(e),
|
|
846
|
+
onClick: () => {
|
|
847
|
+
i(r.filter((t) => t !== e)), E.current?.focus();
|
|
848
|
+
},
|
|
849
|
+
children: /* @__PURE__ */ t("span", {
|
|
850
|
+
"aria-hidden": "true",
|
|
851
|
+
children: "×"
|
|
852
|
+
})
|
|
853
|
+
})]
|
|
854
|
+
}, e))
|
|
855
|
+
}) : null,
|
|
856
|
+
u ? /* @__PURE__ */ t("p", {
|
|
857
|
+
id: C,
|
|
858
|
+
className: Ee.help,
|
|
859
|
+
children: u
|
|
860
|
+
}) : null,
|
|
861
|
+
p ? /* @__PURE__ */ t("p", {
|
|
862
|
+
id: w,
|
|
863
|
+
role: "alert",
|
|
864
|
+
className: Ee.error,
|
|
865
|
+
children: p
|
|
866
|
+
}) : null
|
|
867
|
+
]
|
|
868
|
+
});
|
|
869
|
+
}
|
|
870
|
+
// src/color-field/color.ts
|
|
871
|
+
function ke(e, t, n) {
|
|
872
|
+
return Math.min(n, Math.max(t, e));
|
|
873
|
+
}
|
|
874
|
+
function Ae(e, t, n) {
|
|
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));
|
|
876
|
+
return [
|
|
877
|
+
Math.round(s(0) * 255),
|
|
878
|
+
Math.round(s(8) * 255),
|
|
879
|
+
Math.round(s(4) * 255)
|
|
880
|
+
];
|
|
881
|
+
}
|
|
882
|
+
function je(e, t, n) {
|
|
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;
|
|
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), [
|
|
885
|
+
Math.round(d),
|
|
886
|
+
Math.round(u * 100),
|
|
887
|
+
Math.round(l * 100)
|
|
888
|
+
];
|
|
889
|
+
}
|
|
890
|
+
function Me(e) {
|
|
891
|
+
return `#${e.map((e) => ke(Math.round(e), 0, 255).toString(16).padStart(2, "0")).join("").toUpperCase()}`;
|
|
892
|
+
}
|
|
893
|
+
function Ne(e) {
|
|
894
|
+
let t = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());
|
|
895
|
+
if (!t) return null;
|
|
896
|
+
let n = t[1] ?? "";
|
|
897
|
+
return n.length === 3 && (n = n.split("").map((e) => e + e).join("")), [
|
|
898
|
+
0,
|
|
899
|
+
2,
|
|
900
|
+
4
|
|
901
|
+
].map((e) => parseInt(n.slice(e, e + 2), 16));
|
|
902
|
+
}
|
|
903
|
+
var q = {
|
|
904
|
+
root: "_root_5gwtb_1",
|
|
905
|
+
label: "_label_5gwtb_8",
|
|
906
|
+
trigger: "_trigger_5gwtb_17",
|
|
907
|
+
swatch: "_swatch_5gwtb_44",
|
|
908
|
+
hexText: "_hexText_5gwtb_51",
|
|
909
|
+
dialog: "_dialog_5gwtb_55",
|
|
910
|
+
title: "_title_5gwtb_69",
|
|
911
|
+
picker: "_picker_5gwtb_75",
|
|
912
|
+
wheelWrap: "_wheelWrap_5gwtb_81",
|
|
913
|
+
wheel: "_wheel_5gwtb_81",
|
|
914
|
+
marker: "_marker_5gwtb_102",
|
|
915
|
+
controls: "_controls_5gwtb_113",
|
|
916
|
+
preview: "_preview_5gwtb_121",
|
|
917
|
+
numberLabel: "_numberLabel_5gwtb_127",
|
|
918
|
+
range: "_range_5gwtb_136",
|
|
919
|
+
input: "_input_5gwtb_141",
|
|
920
|
+
group: "_group_5gwtb_172",
|
|
921
|
+
buttons: "_buttons_5gwtb_189",
|
|
922
|
+
help: "_help_5gwtb_196",
|
|
923
|
+
error: "_error_5gwtb_202"
|
|
924
|
+
}, Pe = {
|
|
925
|
+
title: "Escolher cor",
|
|
926
|
+
lightness: "Luminosidade",
|
|
927
|
+
hex: "HEX",
|
|
928
|
+
rgb: "RGB",
|
|
929
|
+
red: "Vermelho",
|
|
930
|
+
green: "Verde",
|
|
931
|
+
blue: "Azul",
|
|
932
|
+
hsl: "HSL",
|
|
933
|
+
hue: "Matiz",
|
|
934
|
+
saturation: "Saturação",
|
|
935
|
+
cancel: "Cancelar",
|
|
936
|
+
apply: "Aplicar",
|
|
937
|
+
wheel: "Roda de cores",
|
|
938
|
+
wheelValue: (e, t) => `Matiz ${String(e)} graus, saturação ${String(t)}%`
|
|
939
|
+
}, J = 220, Fe = [
|
|
940
|
+
124,
|
|
941
|
+
58,
|
|
942
|
+
237
|
|
943
|
+
];
|
|
944
|
+
function Ie(e) {
|
|
945
|
+
let [t, n, r] = je(...e);
|
|
946
|
+
return {
|
|
947
|
+
h: t,
|
|
948
|
+
s: n,
|
|
949
|
+
l: r,
|
|
950
|
+
rgb: e
|
|
951
|
+
};
|
|
952
|
+
}
|
|
953
|
+
function Le(e, t, n) {
|
|
954
|
+
return {
|
|
955
|
+
h: e,
|
|
956
|
+
s: t,
|
|
957
|
+
l: n,
|
|
958
|
+
rgb: Ae(e, t, n)
|
|
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);
|
|
966
|
+
function v(e) {
|
|
967
|
+
p(e), r(Me(e.rgb));
|
|
968
|
+
}
|
|
969
|
+
o(() => {
|
|
970
|
+
let e = g.current?.getContext("2d");
|
|
971
|
+
if (!e) return;
|
|
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;
|
|
975
|
+
if (o > t) continue;
|
|
976
|
+
let c = Ae((Math.atan2(a, i) * 180 / Math.PI + 360) % 360, o / t * 100, u.l);
|
|
977
|
+
n.data[s] = c[0], n.data[s + 1] = c[1], n.data[s + 2] = c[2], n.data[s + 3] = 255;
|
|
978
|
+
}
|
|
979
|
+
e.putImageData(n, 0, 0);
|
|
980
|
+
}, [u.l]);
|
|
981
|
+
function y(e) {
|
|
982
|
+
let t = e.currentTarget.getBoundingClientRect(), n = (e.clientX - t.left) / t.width * 2 - 1, r = (e.clientY - t.top) / t.height * 2 - 1;
|
|
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));
|
|
984
|
+
}
|
|
985
|
+
function b(e) {
|
|
986
|
+
let t = e.shiftKey ? 10 : 1, { key: n } = e;
|
|
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));
|
|
989
|
+
else return;
|
|
990
|
+
e.preventDefault();
|
|
991
|
+
}
|
|
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)}%`,
|
|
995
|
+
backgroundColor: _
|
|
996
|
+
}, T = m?.key === "hex" && Ne(m.text) === null, E = (e, t) => ke(Math.round(Number(e) || 0), 0, t);
|
|
997
|
+
function D(e, t) {
|
|
998
|
+
return m?.key === e ? m.text : String(t);
|
|
999
|
+
}
|
|
1000
|
+
function O(e, r, i, a, o) {
|
|
1001
|
+
return /* @__PURE__ */ n("label", {
|
|
1002
|
+
className: q.numberLabel,
|
|
1003
|
+
children: [/* @__PURE__ */ t("span", { children: r }), /* @__PURE__ */ t("input", {
|
|
1004
|
+
type: "number",
|
|
1005
|
+
className: q.input,
|
|
1006
|
+
min: 0,
|
|
1007
|
+
max: o,
|
|
1008
|
+
value: D(e, i),
|
|
1009
|
+
onChange: (t) => {
|
|
1010
|
+
h({
|
|
1011
|
+
key: e,
|
|
1012
|
+
text: t.target.value
|
|
1013
|
+
}), a(E(t.target.value, o));
|
|
1014
|
+
},
|
|
1015
|
+
onBlur: () => {
|
|
1016
|
+
h(null);
|
|
1017
|
+
}
|
|
1018
|
+
})]
|
|
1019
|
+
});
|
|
1020
|
+
}
|
|
1021
|
+
let [k, A, j] = u.rgb, M = (e) => (t) => {
|
|
1022
|
+
let n = [...u.rgb];
|
|
1023
|
+
n[e] = t, v(Ie(n));
|
|
1024
|
+
};
|
|
1025
|
+
return /* @__PURE__ */ n("div", {
|
|
1026
|
+
...c,
|
|
1027
|
+
className: [q.picker, a].filter(Boolean).join(" "),
|
|
1028
|
+
style: s,
|
|
1029
|
+
children: [/* @__PURE__ */ n("div", {
|
|
1030
|
+
className: q.wheelWrap,
|
|
1031
|
+
children: [/* @__PURE__ */ t("canvas", {
|
|
1032
|
+
ref: g,
|
|
1033
|
+
width: J,
|
|
1034
|
+
height: J,
|
|
1035
|
+
className: q.wheel,
|
|
1036
|
+
role: "slider",
|
|
1037
|
+
tabIndex: 0,
|
|
1038
|
+
"aria-label": l.wheel,
|
|
1039
|
+
"aria-valuemin": 0,
|
|
1040
|
+
"aria-valuemax": 360,
|
|
1041
|
+
"aria-valuenow": u.h,
|
|
1042
|
+
"aria-valuetext": l.wheelValue(u.h, u.s),
|
|
1043
|
+
onPointerDown: (e) => {
|
|
1044
|
+
e.currentTarget.setPointerCapture(e.pointerId), y(e);
|
|
1045
|
+
},
|
|
1046
|
+
onPointerMove: (e) => {
|
|
1047
|
+
e.currentTarget.hasPointerCapture(e.pointerId) && y(e);
|
|
1048
|
+
},
|
|
1049
|
+
onKeyDown: b
|
|
1050
|
+
}), /* @__PURE__ */ t("span", {
|
|
1051
|
+
className: q.marker,
|
|
1052
|
+
style: w,
|
|
1053
|
+
"aria-hidden": "true"
|
|
1054
|
+
})]
|
|
1055
|
+
}), /* @__PURE__ */ n("div", {
|
|
1056
|
+
className: q.controls,
|
|
1057
|
+
children: [
|
|
1058
|
+
/* @__PURE__ */ t("span", {
|
|
1059
|
+
className: q.preview,
|
|
1060
|
+
"data-preview": "",
|
|
1061
|
+
style: { backgroundColor: _ },
|
|
1062
|
+
"aria-hidden": "true"
|
|
1063
|
+
}),
|
|
1064
|
+
/* @__PURE__ */ n("label", {
|
|
1065
|
+
className: q.numberLabel,
|
|
1066
|
+
children: [/* @__PURE__ */ t("span", { children: l.lightness }), /* @__PURE__ */ t("input", {
|
|
1067
|
+
type: "range",
|
|
1068
|
+
min: 0,
|
|
1069
|
+
max: 100,
|
|
1070
|
+
className: q.range,
|
|
1071
|
+
value: u.l,
|
|
1072
|
+
onChange: (e) => {
|
|
1073
|
+
v(Le(u.h, u.s, Number(e.target.value)));
|
|
1074
|
+
}
|
|
1075
|
+
})]
|
|
1076
|
+
}),
|
|
1077
|
+
/* @__PURE__ */ n("label", {
|
|
1078
|
+
className: q.numberLabel,
|
|
1079
|
+
children: [/* @__PURE__ */ t("span", { children: l.hex }), /* @__PURE__ */ t("input", {
|
|
1080
|
+
type: "text",
|
|
1081
|
+
className: q.input,
|
|
1082
|
+
autoComplete: "off",
|
|
1083
|
+
value: D("hex", _),
|
|
1084
|
+
"aria-invalid": T ? !0 : void 0,
|
|
1085
|
+
onChange: (e) => {
|
|
1086
|
+
h({
|
|
1087
|
+
key: "hex",
|
|
1088
|
+
text: e.target.value
|
|
1089
|
+
});
|
|
1090
|
+
let t = Ne(e.target.value);
|
|
1091
|
+
t && v(Ie(t));
|
|
1092
|
+
},
|
|
1093
|
+
onBlur: () => {
|
|
1094
|
+
h(null);
|
|
1095
|
+
}
|
|
1096
|
+
})]
|
|
1097
|
+
}),
|
|
1098
|
+
/* @__PURE__ */ n("fieldset", {
|
|
1099
|
+
className: q.group,
|
|
1100
|
+
children: [
|
|
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)
|
|
1105
|
+
]
|
|
1106
|
+
}),
|
|
1107
|
+
/* @__PURE__ */ n("fieldset", {
|
|
1108
|
+
className: q.group,
|
|
1109
|
+
children: [
|
|
1110
|
+
/* @__PURE__ */ t("legend", { children: l.hsl }),
|
|
1111
|
+
O("h", l.hue, u.h, (e) => {
|
|
1112
|
+
v(Le(e % 360, u.s, u.l));
|
|
1113
|
+
}, 360),
|
|
1114
|
+
O("s", l.saturation, u.s, (e) => {
|
|
1115
|
+
v(Le(u.h, e, u.l));
|
|
1116
|
+
}, 100),
|
|
1117
|
+
O("l", l.lightness, u.l, (e) => {
|
|
1118
|
+
v(Le(u.h, u.s, e));
|
|
1119
|
+
}, 100)
|
|
1120
|
+
]
|
|
1121
|
+
})
|
|
1122
|
+
]
|
|
1123
|
+
})]
|
|
1124
|
+
});
|
|
1125
|
+
}
|
|
1126
|
+
// src/color-field/color-field.tsx
|
|
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?.();
|
|
1143
|
+
}
|
|
1144
|
+
return /* @__PURE__ */ n("div", {
|
|
1145
|
+
className: q.root,
|
|
1146
|
+
children: [
|
|
1147
|
+
/* @__PURE__ */ t("span", {
|
|
1148
|
+
id: w,
|
|
1149
|
+
className: q.label,
|
|
1150
|
+
children: e
|
|
1151
|
+
}),
|
|
1152
|
+
/* @__PURE__ */ n("button", {
|
|
1153
|
+
...b,
|
|
1154
|
+
ref: A,
|
|
1155
|
+
type: "button",
|
|
1156
|
+
id: C,
|
|
1157
|
+
className: [q.trigger, h].filter(Boolean).join(" "),
|
|
1158
|
+
style: g,
|
|
1159
|
+
"aria-haspopup": "dialog",
|
|
1160
|
+
"aria-labelledby": `${w} ${T}`,
|
|
1161
|
+
"aria-invalid": u ? !0 : y,
|
|
1162
|
+
"aria-describedby": k || void 0,
|
|
1163
|
+
onClick: () => {
|
|
1164
|
+
P.current = r, N(!0);
|
|
1165
|
+
},
|
|
1166
|
+
children: [/* @__PURE__ */ t("span", {
|
|
1167
|
+
className: q.swatch,
|
|
1168
|
+
"data-swatch": "",
|
|
1169
|
+
style: { backgroundColor: r }
|
|
1170
|
+
}), /* @__PURE__ */ t("span", {
|
|
1171
|
+
id: T,
|
|
1172
|
+
className: q.hexText,
|
|
1173
|
+
children: ee
|
|
1174
|
+
})]
|
|
1175
|
+
}),
|
|
1176
|
+
M ? /* @__PURE__ */ n("dialog", {
|
|
1177
|
+
ref: j,
|
|
1178
|
+
"aria-labelledby": E,
|
|
1179
|
+
className: q.dialog,
|
|
1180
|
+
onCancel: (e) => {
|
|
1181
|
+
e.preventDefault(), I();
|
|
1182
|
+
},
|
|
1183
|
+
children: [
|
|
1184
|
+
/* @__PURE__ */ t("h2", {
|
|
1185
|
+
id: E,
|
|
1186
|
+
className: q.title,
|
|
1187
|
+
children: x.title
|
|
1188
|
+
}),
|
|
1189
|
+
/* @__PURE__ */ t(Re, {
|
|
1190
|
+
value: r,
|
|
1191
|
+
labels: x,
|
|
1192
|
+
onChange: (e) => {
|
|
1193
|
+
P.current = e;
|
|
1194
|
+
}
|
|
1195
|
+
}),
|
|
1196
|
+
/* @__PURE__ */ n("div", {
|
|
1197
|
+
className: q.buttons,
|
|
1198
|
+
children: [/* @__PURE__ */ t(H, {
|
|
1199
|
+
variant: "ghost",
|
|
1200
|
+
onClick: I,
|
|
1201
|
+
children: x.cancel
|
|
1202
|
+
}), /* @__PURE__ */ t(H, {
|
|
1203
|
+
variant: "primary",
|
|
1204
|
+
onClick: () => {
|
|
1205
|
+
i(P.current), I();
|
|
1206
|
+
},
|
|
1207
|
+
children: x.apply
|
|
1208
|
+
})]
|
|
1209
|
+
})
|
|
1210
|
+
]
|
|
1211
|
+
}) : null,
|
|
1212
|
+
p ? /* @__PURE__ */ t("p", {
|
|
1213
|
+
id: D,
|
|
1214
|
+
className: q.help,
|
|
1215
|
+
children: p
|
|
1216
|
+
}) : null,
|
|
1217
|
+
u ? /* @__PURE__ */ t("p", {
|
|
1218
|
+
id: O,
|
|
1219
|
+
role: "alert",
|
|
1220
|
+
className: q.error,
|
|
1221
|
+
children: u
|
|
1222
|
+
}) : null
|
|
1223
|
+
]
|
|
1224
|
+
});
|
|
1225
|
+
}
|
|
1226
|
+
var Y = {
|
|
1227
|
+
root: "_root_7069v_1",
|
|
1228
|
+
head: "_head_7069v_9",
|
|
1229
|
+
title: "_title_7069v_15",
|
|
1230
|
+
grid: "_grid_7069v_27",
|
|
1231
|
+
dow: "_dow_7069v_33",
|
|
1232
|
+
day: "_day_7069v_42",
|
|
1233
|
+
outside: "_outside_7069v_67",
|
|
1234
|
+
today: "_today_7069v_71",
|
|
1235
|
+
inRange: "_inRange_7069v_75",
|
|
1236
|
+
edge: "_edge_7069v_80",
|
|
1237
|
+
row: "_row_7069v_87"
|
|
1238
|
+
}, Be = {
|
|
1239
|
+
previous: "Mês anterior",
|
|
1240
|
+
next: "Próximo mês",
|
|
1241
|
+
today: "hoje"
|
|
1242
|
+
}, Ve = (e) => String(e).padStart(2, "0");
|
|
1243
|
+
function He(e) {
|
|
1244
|
+
return `${String(e.getFullYear())}-${Ve(e.getMonth() + 1)}-${Ve(e.getDate())}`;
|
|
1245
|
+
}
|
|
1246
|
+
function Ue(e) {
|
|
1247
|
+
let [t = 1970, n = 1, r = 1] = e.split("-").map(Number);
|
|
1248
|
+
return new Date(t, n - 1, r);
|
|
1249
|
+
}
|
|
1250
|
+
function We({ left: e }) {
|
|
1251
|
+
return /* @__PURE__ */ t("svg", {
|
|
1252
|
+
viewBox: "0 0 24 24",
|
|
1253
|
+
width: "16",
|
|
1254
|
+
height: "16",
|
|
1255
|
+
fill: "none",
|
|
1256
|
+
stroke: "currentColor",
|
|
1257
|
+
strokeWidth: "2",
|
|
1258
|
+
strokeLinecap: "round",
|
|
1259
|
+
strokeLinejoin: "round",
|
|
1260
|
+
"aria-hidden": "true",
|
|
1261
|
+
focusable: "false",
|
|
1262
|
+
children: /* @__PURE__ */ t("path", { d: e ? "M15 18l-6-6 6-6" : "M9 18l6-6-6-6" })
|
|
1263
|
+
});
|
|
1264
|
+
}
|
|
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, {
|
|
1272
|
+
month: "long",
|
|
1273
|
+
year: "numeric"
|
|
1274
|
+
}).format(new Date(b, x - 1, 1)), [
|
|
1275
|
+
f,
|
|
1276
|
+
b,
|
|
1277
|
+
x
|
|
1278
|
+
]), C = u(() => {
|
|
1279
|
+
let e = new Intl.DateTimeFormat(f, { weekday: "narrow" }), t = new Intl.DateTimeFormat(f, { weekday: "long" });
|
|
1280
|
+
return Array.from({ length: 7 }, (n, r) => {
|
|
1281
|
+
let i = new Date(2026, 0, 4 + r);
|
|
1282
|
+
return {
|
|
1283
|
+
short: e.format(i),
|
|
1284
|
+
long: t.format(i)
|
|
1285
|
+
};
|
|
1286
|
+
});
|
|
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);
|
|
1289
|
+
return {
|
|
1290
|
+
iso: He(n),
|
|
1291
|
+
date: n
|
|
1292
|
+
};
|
|
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));
|
|
1300
|
+
}
|
|
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)}`);
|
|
1308
|
+
}
|
|
1309
|
+
function F(t) {
|
|
1310
|
+
e === "single" || !a.from || a.to ? s({ from: t }) : t < a.from ? s({
|
|
1311
|
+
from: t,
|
|
1312
|
+
to: a.from
|
|
1313
|
+
}) : s({
|
|
1314
|
+
from: a.from,
|
|
1315
|
+
to: t
|
|
1316
|
+
});
|
|
1317
|
+
}
|
|
1318
|
+
function ee(e, t) {
|
|
1319
|
+
let n = {
|
|
1320
|
+
ArrowLeft: -1,
|
|
1321
|
+
ArrowRight: 1,
|
|
1322
|
+
ArrowUp: -7,
|
|
1323
|
+
ArrowDown: 7
|
|
1324
|
+
}[e.key];
|
|
1325
|
+
if (n === void 0) return;
|
|
1326
|
+
e.preventDefault();
|
|
1327
|
+
let r = Ue(t);
|
|
1328
|
+
r.setDate(r.getDate() + n), N(He(r));
|
|
1329
|
+
}
|
|
1330
|
+
return /* @__PURE__ */ n("div", {
|
|
1331
|
+
...g,
|
|
1332
|
+
ref: _,
|
|
1333
|
+
className: [Y.root, m].filter(Boolean).join(" "),
|
|
1334
|
+
children: [/* @__PURE__ */ n("div", {
|
|
1335
|
+
className: Y.head,
|
|
1336
|
+
children: [
|
|
1337
|
+
/* @__PURE__ */ t(U, {
|
|
1338
|
+
"aria-label": v.previous,
|
|
1339
|
+
icon: /* @__PURE__ */ t(We, { left: !0 }),
|
|
1340
|
+
onClick: () => {
|
|
1341
|
+
P(-1);
|
|
1342
|
+
}
|
|
1343
|
+
}),
|
|
1344
|
+
/* @__PURE__ */ t("span", {
|
|
1345
|
+
className: Y.title,
|
|
1346
|
+
children: S
|
|
1347
|
+
}),
|
|
1348
|
+
/* @__PURE__ */ t(U, {
|
|
1349
|
+
"aria-label": v.next,
|
|
1350
|
+
icon: /* @__PURE__ */ t(We, { left: !1 }),
|
|
1351
|
+
onClick: () => {
|
|
1352
|
+
P(1);
|
|
1353
|
+
}
|
|
1354
|
+
})
|
|
1355
|
+
]
|
|
1356
|
+
}), /* @__PURE__ */ n("div", {
|
|
1357
|
+
role: "grid",
|
|
1358
|
+
"aria-label": S,
|
|
1359
|
+
className: Y.grid,
|
|
1360
|
+
children: [/* @__PURE__ */ t("div", {
|
|
1361
|
+
role: "row",
|
|
1362
|
+
className: Y.row,
|
|
1363
|
+
children: C.map((e) => /* @__PURE__ */ t("span", {
|
|
1364
|
+
role: "columnheader",
|
|
1365
|
+
"aria-label": e.long,
|
|
1366
|
+
className: Y.dow,
|
|
1367
|
+
children: e.short
|
|
1368
|
+
}, e.long))
|
|
1369
|
+
}), O.map((n) => /* @__PURE__ */ t("div", {
|
|
1370
|
+
role: "row",
|
|
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 : ""
|
|
1379
|
+
].filter(Boolean).join(" ");
|
|
1380
|
+
return /* @__PURE__ */ t("span", {
|
|
1381
|
+
role: "gridcell",
|
|
1382
|
+
className: Y.row,
|
|
1383
|
+
children: /* @__PURE__ */ t("button", {
|
|
1384
|
+
type: "button",
|
|
1385
|
+
"data-day": n,
|
|
1386
|
+
"data-outside": a ? "" : void 0,
|
|
1387
|
+
className: c,
|
|
1388
|
+
tabIndex: n === M ? 0 : -1,
|
|
1389
|
+
"aria-pressed": s,
|
|
1390
|
+
"aria-label": `${w.format(i)}${n === l ? `, ${v.today}` : ""}`,
|
|
1391
|
+
onClick: () => {
|
|
1392
|
+
F(n);
|
|
1393
|
+
},
|
|
1394
|
+
onKeyDown: (e) => {
|
|
1395
|
+
ee(e, n);
|
|
1396
|
+
},
|
|
1397
|
+
children: i.getDate()
|
|
1398
|
+
})
|
|
1399
|
+
}, n);
|
|
1400
|
+
})
|
|
1401
|
+
}, n[0]?.iso))]
|
|
1402
|
+
})]
|
|
1403
|
+
});
|
|
1404
|
+
}
|
|
1405
|
+
var Ke = {
|
|
1406
|
+
root: "_root_1fogs_1",
|
|
1407
|
+
label: "_label_1fogs_8",
|
|
1408
|
+
hidden: "_hidden_1fogs_17",
|
|
1409
|
+
wrap: "_wrap_1fogs_26",
|
|
1410
|
+
control: "_control_1fogs_30",
|
|
1411
|
+
value: "_value_1fogs_63",
|
|
1412
|
+
placeholder: "_placeholder_1fogs_68",
|
|
1413
|
+
popover: "_popover_1fogs_72",
|
|
1414
|
+
actions: "_actions_1fogs_87",
|
|
1415
|
+
help: "_help_1fogs_92",
|
|
1416
|
+
error: "_error_1fogs_98"
|
|
1417
|
+
}, qe = {
|
|
1418
|
+
placeholder: "Escolher data",
|
|
1419
|
+
today: "Hoje",
|
|
1420
|
+
clear: "Limpar",
|
|
1421
|
+
previous: "Mês anterior",
|
|
1422
|
+
next: "Próximo mês",
|
|
1423
|
+
todayMarker: "hoje"
|
|
1424
|
+
};
|
|
1425
|
+
function Je() {
|
|
1426
|
+
return /* @__PURE__ */ n("svg", {
|
|
1427
|
+
viewBox: "0 0 24 24",
|
|
1428
|
+
width: "16",
|
|
1429
|
+
height: "16",
|
|
1430
|
+
fill: "none",
|
|
1431
|
+
stroke: "currentColor",
|
|
1432
|
+
strokeWidth: "2",
|
|
1433
|
+
strokeLinecap: "round",
|
|
1434
|
+
strokeLinejoin: "round",
|
|
1435
|
+
"aria-hidden": "true",
|
|
1436
|
+
focusable: "false",
|
|
1437
|
+
children: [/* @__PURE__ */ t("rect", {
|
|
1438
|
+
x: "3",
|
|
1439
|
+
y: "4",
|
|
1440
|
+
width: "18",
|
|
1441
|
+
height: "18",
|
|
1442
|
+
rx: "2"
|
|
1443
|
+
}), /* @__PURE__ */ t("path", { d: "M16 2v4M8 2v4M3 10h18" })]
|
|
1444
|
+
});
|
|
1445
|
+
}
|
|
1446
|
+
function Ye() {
|
|
1447
|
+
let e = /* @__PURE__ */ new Date(), t = (e) => String(e).padStart(2, "0");
|
|
1448
|
+
return `${String(e.getFullYear())}-${t(e.getMonth() + 1)}-${t(e.getDate())}`;
|
|
1449
|
+
}
|
|
1450
|
+
function Xe(e, t) {
|
|
1451
|
+
let [n = 1970, r = 1, i = 1] = e.split("-").map(Number);
|
|
1452
|
+
return new Intl.DateTimeFormat(t).format(new Date(n, r - 1, i));
|
|
1453
|
+
}
|
|
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?.();
|
|
1463
|
+
}
|
|
1464
|
+
function L(e) {
|
|
1465
|
+
i(e), I(!0);
|
|
1466
|
+
}
|
|
1467
|
+
o(() => {
|
|
1468
|
+
if (!N) return;
|
|
1469
|
+
A.current?.querySelector("[data-day][tabindex=\"0\"]")?.focus();
|
|
1470
|
+
let e = (e) => {
|
|
1471
|
+
A.current?.contains(e.target) || I(!1);
|
|
1472
|
+
}, t = (e) => {
|
|
1473
|
+
e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), I(!0));
|
|
1474
|
+
};
|
|
1475
|
+
return document.addEventListener("pointerdown", e, !0), document.addEventListener("keydown", t, !0), () => {
|
|
1476
|
+
document.removeEventListener("pointerdown", e, !0), document.removeEventListener("keydown", t, !0);
|
|
1477
|
+
};
|
|
1478
|
+
}, [N]);
|
|
1479
|
+
let R = {
|
|
1480
|
+
previous: M.previous,
|
|
1481
|
+
next: M.next,
|
|
1482
|
+
today: M.todayMarker
|
|
1483
|
+
};
|
|
1484
|
+
return /* @__PURE__ */ n("div", {
|
|
1485
|
+
className: Ke.root,
|
|
1486
|
+
ref: A,
|
|
1487
|
+
children: [
|
|
1488
|
+
/* @__PURE__ */ t("span", {
|
|
1489
|
+
id: w,
|
|
1490
|
+
className: [Ke.label, m ? Ke.hidden : ""].filter(Boolean).join(" "),
|
|
1491
|
+
children: e
|
|
1492
|
+
}),
|
|
1493
|
+
/* @__PURE__ */ n("div", {
|
|
1494
|
+
className: Ke.wrap,
|
|
1495
|
+
children: [/* @__PURE__ */ n("button", {
|
|
1496
|
+
...x,
|
|
1497
|
+
ref: j,
|
|
1498
|
+
type: "button",
|
|
1499
|
+
id: C,
|
|
1500
|
+
className: [Ke.control, v].filter(Boolean).join(" "),
|
|
1501
|
+
style: y,
|
|
1502
|
+
"aria-haspopup": "dialog",
|
|
1503
|
+
"aria-expanded": N,
|
|
1504
|
+
"aria-labelledby": `${w} ${T}`,
|
|
1505
|
+
"aria-invalid": g ? !0 : void 0,
|
|
1506
|
+
"aria-describedby": O || void 0,
|
|
1507
|
+
onClick: () => {
|
|
1508
|
+
N ? I(!1) : (ee((r || k).slice(0, 7)), P(!0));
|
|
1509
|
+
},
|
|
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
|
|
1514
|
+
})]
|
|
1515
|
+
}), N ? /* @__PURE__ */ n("div", {
|
|
1516
|
+
role: "dialog",
|
|
1517
|
+
"aria-label": e,
|
|
1518
|
+
className: Ke.popover,
|
|
1519
|
+
children: [/* @__PURE__ */ t(Ge, {
|
|
1520
|
+
mode: "single",
|
|
1521
|
+
month: F,
|
|
1522
|
+
onMonthChange: ee,
|
|
1523
|
+
value: { from: r },
|
|
1524
|
+
onChange: (e) => {
|
|
1525
|
+
L(e.from);
|
|
1526
|
+
},
|
|
1527
|
+
today: k,
|
|
1528
|
+
locale: l,
|
|
1529
|
+
labels: R
|
|
1530
|
+
}), /* @__PURE__ */ n("div", {
|
|
1531
|
+
className: Ke.actions,
|
|
1532
|
+
children: [/* @__PURE__ */ t(H, {
|
|
1533
|
+
variant: "ghost",
|
|
1534
|
+
onClick: () => {
|
|
1535
|
+
L(k);
|
|
1536
|
+
},
|
|
1537
|
+
children: M.today
|
|
1538
|
+
}), /* @__PURE__ */ t(H, {
|
|
1539
|
+
variant: "ghost",
|
|
1540
|
+
onClick: () => {
|
|
1541
|
+
L("");
|
|
1542
|
+
},
|
|
1543
|
+
children: M.clear
|
|
1544
|
+
})]
|
|
1545
|
+
})]
|
|
1546
|
+
}) : null]
|
|
1547
|
+
}),
|
|
1548
|
+
h ? /* @__PURE__ */ t("p", {
|
|
1549
|
+
id: E,
|
|
1550
|
+
className: Ke.help,
|
|
1551
|
+
children: h
|
|
1552
|
+
}) : null,
|
|
1553
|
+
g ? /* @__PURE__ */ t("p", {
|
|
1554
|
+
id: D,
|
|
1555
|
+
role: "alert",
|
|
1556
|
+
className: Ke.error,
|
|
1557
|
+
children: g
|
|
1558
|
+
}) : null
|
|
1559
|
+
]
|
|
1560
|
+
});
|
|
1561
|
+
}
|
|
1562
|
+
// src/time-field/parse-time.ts
|
|
1563
|
+
function Qe(e) {
|
|
1564
|
+
let t = e.replace(/\D/g, "").slice(0, 4);
|
|
1565
|
+
if (t === "") return null;
|
|
1566
|
+
let n = t;
|
|
1567
|
+
n.length === 3 && (n = `0${n}`), n.length <= 2 && (n = `${n.padStart(2, "0")}00`);
|
|
1568
|
+
let r = Math.min(23, Number(n.slice(0, 2))), i = Math.min(59, Number(n.slice(2)));
|
|
1569
|
+
return `${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}`;
|
|
1570
|
+
}
|
|
1571
|
+
function $e(e) {
|
|
1572
|
+
let t = e.replace(/\D/g, "").slice(0, 4);
|
|
1573
|
+
return t.length > 2 ? `${t.slice(0, 2)}:${t.slice(2)}` : t;
|
|
1574
|
+
}
|
|
1575
|
+
var et = {
|
|
1576
|
+
root: "_root_ntomw_1",
|
|
1577
|
+
label: "_label_ntomw_8",
|
|
1578
|
+
hidden: "_hidden_ntomw_17",
|
|
1579
|
+
wrap: "_wrap_ntomw_26",
|
|
1580
|
+
icon: "_icon_ntomw_30",
|
|
1581
|
+
control: "_control_ntomw_40",
|
|
1582
|
+
help: "_help_ntomw_65",
|
|
1583
|
+
error: "_error_ntomw_71"
|
|
1584
|
+
};
|
|
1585
|
+
// src/time-field/time-field.tsx
|
|
1586
|
+
function tt() {
|
|
1587
|
+
return /* @__PURE__ */ n("svg", {
|
|
1588
|
+
viewBox: "0 0 24 24",
|
|
1589
|
+
width: "16",
|
|
1590
|
+
height: "16",
|
|
1591
|
+
fill: "none",
|
|
1592
|
+
stroke: "currentColor",
|
|
1593
|
+
strokeWidth: "2",
|
|
1594
|
+
strokeLinecap: "round",
|
|
1595
|
+
strokeLinejoin: "round",
|
|
1596
|
+
"aria-hidden": "true",
|
|
1597
|
+
focusable: "false",
|
|
1598
|
+
children: [/* @__PURE__ */ t("circle", {
|
|
1599
|
+
cx: "12",
|
|
1600
|
+
cy: "12",
|
|
1601
|
+
r: "9"
|
|
1602
|
+
}), /* @__PURE__ */ t("path", { d: "M12 7v5l3 2" })]
|
|
1603
|
+
});
|
|
1604
|
+
}
|
|
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);
|
|
1607
|
+
return C !== r && (w(r), S(r)), /* @__PURE__ */ n("div", {
|
|
1608
|
+
className: et.root,
|
|
1609
|
+
children: [
|
|
1610
|
+
/* @__PURE__ */ t("label", {
|
|
1611
|
+
htmlFor: _,
|
|
1612
|
+
className: [et.label, c ? et.hidden : ""].filter(Boolean).join(" "),
|
|
1613
|
+
children: e
|
|
1614
|
+
}),
|
|
1615
|
+
/* @__PURE__ */ n("div", {
|
|
1616
|
+
className: et.wrap,
|
|
1617
|
+
children: [/* @__PURE__ */ t("span", {
|
|
1618
|
+
className: et.icon,
|
|
1619
|
+
children: /* @__PURE__ */ t(tt, {})
|
|
1620
|
+
}), /* @__PURE__ */ t("input", {
|
|
1621
|
+
...h,
|
|
1622
|
+
id: _,
|
|
1623
|
+
type: "text",
|
|
1624
|
+
inputMode: "numeric",
|
|
1625
|
+
maxLength: 5,
|
|
1626
|
+
autoComplete: "off",
|
|
1627
|
+
placeholder: o,
|
|
1628
|
+
value: x,
|
|
1629
|
+
className: [et.control, p].filter(Boolean).join(" "),
|
|
1630
|
+
style: m,
|
|
1631
|
+
"aria-invalid": u ? !0 : void 0,
|
|
1632
|
+
"aria-describedby": b || void 0,
|
|
1633
|
+
onChange: (e) => {
|
|
1634
|
+
S($e(e.target.value));
|
|
1635
|
+
},
|
|
1636
|
+
onBlur: () => {
|
|
1637
|
+
let e = Qe(x) ?? "";
|
|
1638
|
+
S(e), e !== r && i(e), a?.();
|
|
1639
|
+
}
|
|
1640
|
+
})]
|
|
1641
|
+
}),
|
|
1642
|
+
l ? /* @__PURE__ */ t("p", {
|
|
1643
|
+
id: v,
|
|
1644
|
+
className: et.help,
|
|
1645
|
+
children: l
|
|
1646
|
+
}) : null,
|
|
1647
|
+
u ? /* @__PURE__ */ t("p", {
|
|
1648
|
+
id: y,
|
|
1649
|
+
role: "alert",
|
|
1650
|
+
className: et.error,
|
|
1651
|
+
children: u
|
|
1652
|
+
}) : null
|
|
1653
|
+
]
|
|
1654
|
+
});
|
|
1655
|
+
}
|
|
1656
|
+
var rt = {
|
|
1657
|
+
root: "_root_2fjcj_1",
|
|
1658
|
+
legend: "_legend_2fjcj_8",
|
|
1659
|
+
row: "_row_2fjcj_19",
|
|
1660
|
+
help: "_help_2fjcj_26"
|
|
1661
|
+
};
|
|
1662
|
+
// src/date-time-field/date-time-field.tsx
|
|
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);
|
|
1665
|
+
if (w !== r && (T(r), r !== C)) {
|
|
1666
|
+
let [e = "", t = ""] = r.split("T");
|
|
1667
|
+
b(e), S(t);
|
|
1668
|
+
}
|
|
1669
|
+
let E = (e, t) => {
|
|
1670
|
+
b(e), S(t), i(e && t ? `${e}T${t}` : "");
|
|
1671
|
+
};
|
|
1672
|
+
return /* @__PURE__ */ n("fieldset", {
|
|
1673
|
+
...m,
|
|
1674
|
+
className: [rt.root, p].filter(Boolean).join(" "),
|
|
1675
|
+
children: [
|
|
1676
|
+
/* @__PURE__ */ t("legend", {
|
|
1677
|
+
className: rt.legend,
|
|
1678
|
+
children: e
|
|
1679
|
+
}),
|
|
1680
|
+
/* @__PURE__ */ n("div", {
|
|
1681
|
+
className: rt.row,
|
|
1682
|
+
children: [/* @__PURE__ */ t(Ze, {
|
|
1683
|
+
label: h,
|
|
1684
|
+
hideLabel: !0,
|
|
1685
|
+
value: y,
|
|
1686
|
+
onChange: (e) => {
|
|
1687
|
+
E(e, x);
|
|
1688
|
+
},
|
|
1689
|
+
...a ? { onBlur: a } : {},
|
|
1690
|
+
locale: o,
|
|
1691
|
+
labels: s ?? {},
|
|
1692
|
+
...c ? { today: c } : {},
|
|
1693
|
+
...l === void 0 ? {} : { disabled: l },
|
|
1694
|
+
...d ? { error: d } : {}
|
|
1695
|
+
}), /* @__PURE__ */ t(nt, {
|
|
1696
|
+
label: g,
|
|
1697
|
+
hideLabel: !0,
|
|
1698
|
+
value: x,
|
|
1699
|
+
onChange: (e) => {
|
|
1700
|
+
E(y, e);
|
|
1701
|
+
},
|
|
1702
|
+
...a ? { onBlur: a } : {},
|
|
1703
|
+
placeholder: s?.timePlaceholder ?? "hh:mm",
|
|
1704
|
+
...l === void 0 ? {} : { disabled: l }
|
|
1705
|
+
})]
|
|
1706
|
+
}),
|
|
1707
|
+
u ? /* @__PURE__ */ t("p", {
|
|
1708
|
+
className: rt.help,
|
|
1709
|
+
children: u
|
|
1710
|
+
}) : null
|
|
1711
|
+
]
|
|
1712
|
+
});
|
|
1713
|
+
}
|
|
1714
|
+
// src/period-field/period.ts
|
|
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())}`;
|
|
1718
|
+
}
|
|
1719
|
+
function st(e) {
|
|
1720
|
+
let [t = 1970, n = 1, r = 1] = e.split("-").map(Number);
|
|
1721
|
+
return new Date(t, n - 1, r);
|
|
1722
|
+
}
|
|
1723
|
+
function ct(e, t) {
|
|
1724
|
+
let n = st(e);
|
|
1725
|
+
return ot(new Date(n.getFullYear(), n.getMonth(), n.getDate() + t));
|
|
1726
|
+
}
|
|
1727
|
+
function lt(e, t, n = []) {
|
|
1728
|
+
if (e.preset === "custom") return {
|
|
1729
|
+
from: e.from ?? t,
|
|
1730
|
+
to: e.to ?? e.from ?? t
|
|
1731
|
+
};
|
|
1732
|
+
let r = n.find((t) => t.id === e.preset)?.range;
|
|
1733
|
+
return r === void 0 ? null : typeof r == "function" ? r(t) : r < 0 ? {
|
|
1734
|
+
from: ct(t, r),
|
|
1735
|
+
to: t
|
|
1736
|
+
} : {
|
|
1737
|
+
from: t,
|
|
1738
|
+
to: ct(t, r)
|
|
1739
|
+
};
|
|
1740
|
+
}
|
|
1741
|
+
var X = {
|
|
1742
|
+
root: "_root_lfjll_1",
|
|
1743
|
+
label: "_label_lfjll_8",
|
|
1744
|
+
srOnly: "_srOnly_lfjll_17",
|
|
1745
|
+
wrap: "_wrap_lfjll_29",
|
|
1746
|
+
control: "_control_lfjll_33",
|
|
1747
|
+
popover: "_popover_lfjll_56",
|
|
1748
|
+
presets: "_presets_lfjll_72",
|
|
1749
|
+
preset: "_preset_lfjll_72",
|
|
1750
|
+
custom: "_custom_lfjll_89",
|
|
1751
|
+
customTitle: "_customTitle_lfjll_95",
|
|
1752
|
+
summary: "_summary_lfjll_105",
|
|
1753
|
+
error: "_error_lfjll_112"
|
|
1754
|
+
}, ut = {
|
|
1755
|
+
title: "Escolher período",
|
|
1756
|
+
custom: "Personalizado",
|
|
1757
|
+
apply: "Aplicar",
|
|
1758
|
+
firstDay: "Escolha o primeiro dia.",
|
|
1759
|
+
lastDay: "escolha o último dia",
|
|
1760
|
+
firstDayError: "Escolha o primeiro dia no calendário.",
|
|
1761
|
+
previous: "Mês anterior",
|
|
1762
|
+
next: "Próximo mês",
|
|
1763
|
+
todayMarker: "hoje"
|
|
1764
|
+
}, dt = 8;
|
|
1765
|
+
function ft() {
|
|
1766
|
+
let e = /* @__PURE__ */ new Date(), t = (e) => String(e).padStart(2, "0");
|
|
1767
|
+
return `${String(e.getFullYear())}-${t(e.getMonth() + 1)}-${t(e.getDate())}`;
|
|
1768
|
+
}
|
|
1769
|
+
function pt() {
|
|
1770
|
+
return /* @__PURE__ */ n("svg", {
|
|
1771
|
+
viewBox: "0 0 24 24",
|
|
1772
|
+
width: "16",
|
|
1773
|
+
height: "16",
|
|
1774
|
+
fill: "none",
|
|
1775
|
+
stroke: "currentColor",
|
|
1776
|
+
strokeWidth: "2",
|
|
1777
|
+
strokeLinecap: "round",
|
|
1778
|
+
strokeLinejoin: "round",
|
|
1779
|
+
"aria-hidden": "true",
|
|
1780
|
+
focusable: "false",
|
|
1781
|
+
children: [/* @__PURE__ */ t("rect", {
|
|
1782
|
+
x: "3",
|
|
1783
|
+
y: "4",
|
|
1784
|
+
width: "18",
|
|
1785
|
+
height: "18",
|
|
1786
|
+
rx: "2"
|
|
1787
|
+
}), /* @__PURE__ */ t("path", { d: "M16 2v4M8 2v4M3 10h18" })]
|
|
1788
|
+
});
|
|
1789
|
+
}
|
|
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) => {
|
|
1797
|
+
let [t = 1970, n = 1, r = 1] = e.split("-").map(Number);
|
|
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();
|
|
1802
|
+
}
|
|
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);
|
|
1809
|
+
}
|
|
1810
|
+
l(() => {
|
|
1811
|
+
if (!A) return;
|
|
1812
|
+
let e = () => {
|
|
1813
|
+
let e = k.current, t = O.current;
|
|
1814
|
+
if (!e || !t) return;
|
|
1815
|
+
let n = t.getBoundingClientRect();
|
|
1816
|
+
e.style.maxHeight = `${String(window.innerHeight - 16)}px`;
|
|
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);
|
|
1818
|
+
e.style.left = `${String(o)}px`, e.style.top = `${String(c)}px`;
|
|
1819
|
+
};
|
|
1820
|
+
return e(), window.addEventListener("resize", e), document.addEventListener("scroll", e, !0), () => {
|
|
1821
|
+
window.removeEventListener("resize", e), document.removeEventListener("scroll", e, !0);
|
|
1822
|
+
};
|
|
1823
|
+
}, [A, h]), o(() => {
|
|
1824
|
+
if (!A) return;
|
|
1825
|
+
k.current?.querySelector("[aria-pressed=\"true\"]")?.focus();
|
|
1826
|
+
let e = (e) => {
|
|
1827
|
+
D.current?.contains(e.target) || j(!1);
|
|
1828
|
+
}, t = (e) => {
|
|
1829
|
+
e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), te(!0));
|
|
1830
|
+
};
|
|
1831
|
+
return document.addEventListener("pointerdown", e, !0), document.addEventListener("keydown", t, !0), () => {
|
|
1832
|
+
document.removeEventListener("pointerdown", e, !0), document.removeEventListener("keydown", t, !0);
|
|
1833
|
+
};
|
|
1834
|
+
}, [A]);
|
|
1835
|
+
function re(e) {
|
|
1836
|
+
u({ preset: e.id }), te(!0);
|
|
1837
|
+
}
|
|
1838
|
+
function ie(e) {
|
|
1839
|
+
e.preventDefault(), M.from ? (u({
|
|
1840
|
+
preset: "custom",
|
|
1841
|
+
from: M.from,
|
|
1842
|
+
to: M.to ?? M.from
|
|
1843
|
+
}), te(!0)) : I(!0);
|
|
1844
|
+
}
|
|
1845
|
+
let V = M.from ? M.to ? `${R(M.from)} – ${R(M.to)}` : `${R(M.from)} · ${E.lastDay}` : E.firstDay;
|
|
1846
|
+
return /* @__PURE__ */ n("div", {
|
|
1847
|
+
className: X.root,
|
|
1848
|
+
ref: D,
|
|
1849
|
+
children: [
|
|
1850
|
+
r ? /* @__PURE__ */ t("span", {
|
|
1851
|
+
id: `${w}-label`,
|
|
1852
|
+
className: i ? X.label : X.srOnly,
|
|
1853
|
+
children: r
|
|
1854
|
+
}) : null,
|
|
1855
|
+
/* @__PURE__ */ n("div", {
|
|
1856
|
+
className: X.wrap,
|
|
1857
|
+
children: [/* @__PURE__ */ n("button", {
|
|
1858
|
+
...C,
|
|
1859
|
+
ref: O,
|
|
1860
|
+
type: "button",
|
|
1861
|
+
className: [X.control, b].filter(Boolean).join(" "),
|
|
1862
|
+
style: x,
|
|
1863
|
+
"aria-haspopup": "dialog",
|
|
1864
|
+
"aria-expanded": A,
|
|
1865
|
+
...r ? { "aria-labelledby": `${w}-label ${w}-value` } : {},
|
|
1866
|
+
onClick: () => {
|
|
1867
|
+
A ? te(!1) : ne();
|
|
1868
|
+
},
|
|
1869
|
+
children: [/* @__PURE__ */ t(pt, {}), /* @__PURE__ */ t("span", {
|
|
1870
|
+
id: `${w}-value`,
|
|
1871
|
+
children: B
|
|
1872
|
+
})]
|
|
1873
|
+
}), A ? /* @__PURE__ */ n("div", {
|
|
1874
|
+
ref: k,
|
|
1875
|
+
role: "dialog",
|
|
1876
|
+
"aria-label": E.title,
|
|
1877
|
+
className: X.popover,
|
|
1878
|
+
children: [/* @__PURE__ */ t("div", {
|
|
1879
|
+
className: X.presets,
|
|
1880
|
+
children: p.map((e) => /* @__PURE__ */ t(H, {
|
|
1881
|
+
variant: "ghost",
|
|
1882
|
+
className: X.preset,
|
|
1883
|
+
"aria-pressed": a.preset === e.id,
|
|
1884
|
+
onClick: () => {
|
|
1885
|
+
re(e);
|
|
1886
|
+
},
|
|
1887
|
+
children: e.label
|
|
1888
|
+
}, e.id))
|
|
1889
|
+
}), m ? /* @__PURE__ */ n("form", {
|
|
1890
|
+
className: X.custom,
|
|
1891
|
+
noValidate: !0,
|
|
1892
|
+
onSubmit: ie,
|
|
1893
|
+
children: [
|
|
1894
|
+
/* @__PURE__ */ t("p", {
|
|
1895
|
+
className: X.customTitle,
|
|
1896
|
+
children: E.custom
|
|
1897
|
+
}),
|
|
1898
|
+
/* @__PURE__ */ t(Ge, {
|
|
1899
|
+
mode: "range",
|
|
1900
|
+
month: P,
|
|
1901
|
+
onMonthChange: F,
|
|
1902
|
+
value: M,
|
|
1903
|
+
onChange: (e) => {
|
|
1904
|
+
N(e), I(!1);
|
|
1905
|
+
},
|
|
1906
|
+
today: T,
|
|
1907
|
+
locale: _,
|
|
1908
|
+
labels: {
|
|
1909
|
+
previous: E.previous,
|
|
1910
|
+
next: E.next,
|
|
1911
|
+
today: E.todayMarker
|
|
1912
|
+
}
|
|
1913
|
+
}),
|
|
1914
|
+
/* @__PURE__ */ t("p", {
|
|
1915
|
+
className: X.summary,
|
|
1916
|
+
"aria-live": "polite",
|
|
1917
|
+
children: V
|
|
1918
|
+
}),
|
|
1919
|
+
ee ? /* @__PURE__ */ t("p", {
|
|
1920
|
+
role: "alert",
|
|
1921
|
+
className: X.error,
|
|
1922
|
+
children: E.firstDayError
|
|
1923
|
+
}) : null,
|
|
1924
|
+
/* @__PURE__ */ t(H, {
|
|
1925
|
+
variant: "primary",
|
|
1926
|
+
type: "submit",
|
|
1927
|
+
children: E.apply
|
|
1928
|
+
})
|
|
1929
|
+
]
|
|
1930
|
+
}) : null]
|
|
1931
|
+
}) : null]
|
|
1932
|
+
}),
|
|
1933
|
+
y ? /* @__PURE__ */ n(e, { children: [
|
|
1934
|
+
/* @__PURE__ */ t("input", {
|
|
1935
|
+
type: "hidden",
|
|
1936
|
+
name: y,
|
|
1937
|
+
value: a.preset
|
|
1938
|
+
}),
|
|
1939
|
+
/* @__PURE__ */ t("input", {
|
|
1940
|
+
type: "hidden",
|
|
1941
|
+
name: `${y}From`,
|
|
1942
|
+
value: z?.from ?? ""
|
|
1943
|
+
}),
|
|
1944
|
+
/* @__PURE__ */ t("input", {
|
|
1945
|
+
type: "hidden",
|
|
1946
|
+
name: `${y}To`,
|
|
1947
|
+
value: z?.to ?? ""
|
|
1948
|
+
})
|
|
1949
|
+
] }) : null
|
|
1950
|
+
]
|
|
1951
|
+
});
|
|
1952
|
+
}
|
|
1953
|
+
// src/money-field/money-mask.ts
|
|
1954
|
+
var ht = /* @__PURE__ */ new Map();
|
|
1955
|
+
function gt(e, t) {
|
|
1956
|
+
let n = `${e}|${t}`, r = ht.get(n);
|
|
1957
|
+
if (r) return r;
|
|
1958
|
+
let i = new Intl.NumberFormat(e, {
|
|
1959
|
+
style: "currency",
|
|
1960
|
+
currency: t
|
|
1961
|
+
}), a = i.formatToParts(1), o = a.findIndex((e) => e.type === "integer"), s = o;
|
|
1962
|
+
a.forEach((e, t) => {
|
|
1963
|
+
(e.type === "integer" || e.type === "fraction") && (s = t);
|
|
1964
|
+
});
|
|
1965
|
+
let c = i.formatToParts(1234567.5), l = {
|
|
1966
|
+
prefix: a.slice(0, o).map((e) => e.value).join(""),
|
|
1967
|
+
suffix: a.slice(s + 1).map((e) => e.value).join(""),
|
|
1968
|
+
group: c.find((e) => e.type === "group")?.value ?? "",
|
|
1969
|
+
decimal: c.find((e) => e.type === "decimal")?.value ?? ","
|
|
1970
|
+
};
|
|
1971
|
+
return ht.set(n, l), l;
|
|
1972
|
+
}
|
|
1973
|
+
function _t(e, t) {
|
|
1974
|
+
let n = e;
|
|
1975
|
+
return t.prefix.trim() !== "" && (n = n.split(t.prefix.trim()).join("")), t.suffix.trim() !== "" && (n = n.split(t.suffix.trim()).join("")), n;
|
|
1976
|
+
}
|
|
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) : "";
|
|
1979
|
+
return {
|
|
1980
|
+
whole: a.replace(/\D/g, "").replace(/^0+/, ""),
|
|
1981
|
+
fraction: o.replace(/\D/g, "").slice(0, 2),
|
|
1982
|
+
hasDecimal: i
|
|
1983
|
+
};
|
|
1984
|
+
}
|
|
1985
|
+
function yt(e, t, n) {
|
|
1986
|
+
let r = gt(t, n), { whole: i, fraction: a, hasDecimal: o } = vt(e, r);
|
|
1987
|
+
if (i === "" && a === "" && !o) return "";
|
|
1988
|
+
let s = (i === "" ? "0" : i).replace(/\B(?=(\d{3})+(?!\d))/g, r.group);
|
|
1989
|
+
return `${r.prefix}${s}${o ? r.decimal + a : ""}${r.suffix}`;
|
|
1990
|
+
}
|
|
1991
|
+
function bt(e, t, n) {
|
|
1992
|
+
let { whole: r, fraction: i } = vt(e, gt(t, n));
|
|
1993
|
+
if (r === "" && i === "") return null;
|
|
1994
|
+
let a = Number(r === "" ? "0" : r) * 100 + Number(i.padEnd(2, "0"));
|
|
1995
|
+
return Number.isSafeInteger(a) ? a : null;
|
|
1996
|
+
}
|
|
1997
|
+
function xt(e, t, n) {
|
|
1998
|
+
return new Intl.NumberFormat(t, {
|
|
1999
|
+
style: "currency",
|
|
2000
|
+
currency: n,
|
|
2001
|
+
minimumFractionDigits: 2,
|
|
2002
|
+
maximumFractionDigits: 2
|
|
2003
|
+
}).format(e / 100);
|
|
2004
|
+
}
|
|
2005
|
+
var St = { root: "_root_13auc_2" };
|
|
2006
|
+
// src/money-field/money-field.tsx
|
|
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({
|
|
2009
|
+
valueCents: e,
|
|
2010
|
+
locale: r,
|
|
2011
|
+
currency: i
|
|
2012
|
+
});
|
|
2013
|
+
return (u.valueCents !== e || u.locale !== r || u.currency !== i) && (d({
|
|
2014
|
+
valueCents: e,
|
|
2015
|
+
locale: r,
|
|
2016
|
+
currency: i
|
|
2017
|
+
}), bt(c, r, i) !== e && l(e === null ? "" : xt(e, r, i))), /* @__PURE__ */ t(de, {
|
|
2018
|
+
...s,
|
|
2019
|
+
className: [St.root, o].filter(Boolean).join(" "),
|
|
2020
|
+
inputMode: "decimal",
|
|
2021
|
+
autoComplete: "off",
|
|
2022
|
+
value: c,
|
|
2023
|
+
onChange: (e) => {
|
|
2024
|
+
let t = yt(e.target.value, r, i);
|
|
2025
|
+
l(t), n(bt(t, r, i));
|
|
2026
|
+
},
|
|
2027
|
+
onBlur: (e) => {
|
|
2028
|
+
let t = bt(c, r, i);
|
|
2029
|
+
t !== null && l(xt(t, r, i)), a?.(e);
|
|
2030
|
+
}
|
|
2031
|
+
});
|
|
2032
|
+
}
|
|
2033
|
+
var wt = {
|
|
2034
|
+
root: "_root_1v7mn_1",
|
|
2035
|
+
primary: "_primary_1v7mn_11",
|
|
2036
|
+
accent: "_accent_1v7mn_16",
|
|
2037
|
+
success: "_success_1v7mn_21",
|
|
2038
|
+
warning: "_warning_1v7mn_26",
|
|
2039
|
+
danger: "_danger_1v7mn_31",
|
|
2040
|
+
info: "_info_1v7mn_36"
|
|
2041
|
+
};
|
|
2042
|
+
// src/card/card.tsx
|
|
2043
|
+
function Tt({ as: e = "div", tone: n = "default", className: r, ...i }) {
|
|
2044
|
+
let a = [
|
|
2045
|
+
wt.root,
|
|
2046
|
+
n === "default" ? null : wt[n],
|
|
2047
|
+
r
|
|
2048
|
+
].filter(Boolean).join(" ");
|
|
2049
|
+
return /* @__PURE__ */ t(e, {
|
|
2050
|
+
...i,
|
|
2051
|
+
className: a
|
|
2052
|
+
});
|
|
2053
|
+
}
|
|
2054
|
+
var Et = {
|
|
2055
|
+
root: "_root_rjx3r_1",
|
|
2056
|
+
titleBlock: "_titleBlock_rjx3r_11",
|
|
2057
|
+
back: "_back_rjx3r_15",
|
|
2058
|
+
stuck: "_stuck_rjx3r_19",
|
|
2059
|
+
compact: "_compact_rjx3r_23",
|
|
2060
|
+
pageHeading: "_pageHeading_rjx3r_23",
|
|
2061
|
+
eyebrow: "_eyebrow_rjx3r_36",
|
|
2062
|
+
subtitle: "_subtitle_rjx3r_61",
|
|
2063
|
+
actions: "_actions_rjx3r_69"
|
|
2064
|
+
};
|
|
2065
|
+
// src/page-header/page-header.tsx
|
|
2066
|
+
function Dt({ title: e, eyebrow: r, subtitle: i, actions: a, back: o, stuck: s = !1, compact: c = !1, headingRef: l, className: u, ...d }) {
|
|
2067
|
+
let f = [
|
|
2068
|
+
Et.root,
|
|
2069
|
+
s ? Et.stuck : "",
|
|
2070
|
+
c ? Et.compact : "",
|
|
2071
|
+
u
|
|
2072
|
+
].filter(Boolean).join(" ");
|
|
2073
|
+
return /* @__PURE__ */ n("header", {
|
|
2074
|
+
...d,
|
|
2075
|
+
className: f,
|
|
2076
|
+
...s ? { "data-stuck": "" } : {},
|
|
2077
|
+
...c ? { "data-compact": "" } : {},
|
|
2078
|
+
children: [/* @__PURE__ */ n("div", {
|
|
2079
|
+
className: Et.titleBlock,
|
|
2080
|
+
children: [
|
|
2081
|
+
o ? /* @__PURE__ */ t("div", {
|
|
2082
|
+
className: Et.back,
|
|
2083
|
+
children: o
|
|
2084
|
+
}) : null,
|
|
2085
|
+
r ? /* @__PURE__ */ t("p", {
|
|
2086
|
+
className: Et.eyebrow,
|
|
2087
|
+
children: r
|
|
2088
|
+
}) : null,
|
|
2089
|
+
/* @__PURE__ */ t("h1", {
|
|
2090
|
+
ref: l,
|
|
2091
|
+
tabIndex: -1,
|
|
2092
|
+
"data-page-heading": "",
|
|
2093
|
+
className: Et.pageHeading,
|
|
2094
|
+
children: e
|
|
2095
|
+
}),
|
|
2096
|
+
i && !c ? /* @__PURE__ */ t("p", {
|
|
2097
|
+
className: Et.subtitle,
|
|
2098
|
+
children: i
|
|
2099
|
+
}) : null
|
|
2100
|
+
]
|
|
2101
|
+
}), a ? /* @__PURE__ */ t("div", {
|
|
2102
|
+
className: Et.actions,
|
|
2103
|
+
children: a
|
|
2104
|
+
}) : null]
|
|
2105
|
+
});
|
|
2106
|
+
}
|
|
2107
|
+
var Ot = {
|
|
2108
|
+
root: "_root_1akxr_1",
|
|
2109
|
+
search: "_search_1akxr_9",
|
|
2110
|
+
filters: "_filters_1akxr_14",
|
|
2111
|
+
trailing: "_trailing_1akxr_21"
|
|
2112
|
+
};
|
|
2113
|
+
// src/toolbar/toolbar.tsx
|
|
2114
|
+
function kt({ searchLabel: e = "Buscar", searchValue: r, onSearchChange: i, searchPlaceholder: a, filters: o, children: s, className: c, ...l }) {
|
|
2115
|
+
return /* @__PURE__ */ n("div", {
|
|
2116
|
+
...l,
|
|
2117
|
+
className: [Ot.root, c].filter(Boolean).join(" "),
|
|
2118
|
+
children: [
|
|
2119
|
+
/* @__PURE__ */ t("div", {
|
|
2120
|
+
role: "search",
|
|
2121
|
+
className: Ot.search,
|
|
2122
|
+
children: /* @__PURE__ */ t(de, {
|
|
2123
|
+
type: "search",
|
|
2124
|
+
label: e,
|
|
2125
|
+
placeholder: a,
|
|
2126
|
+
value: r,
|
|
2127
|
+
onChange: (e) => {
|
|
2128
|
+
i(e.target.value);
|
|
2129
|
+
}
|
|
2130
|
+
})
|
|
2131
|
+
}),
|
|
2132
|
+
o ? /* @__PURE__ */ t("div", {
|
|
2133
|
+
className: Ot.filters,
|
|
2134
|
+
children: o
|
|
2135
|
+
}) : null,
|
|
2136
|
+
s ? /* @__PURE__ */ t("div", {
|
|
2137
|
+
className: Ot.trailing,
|
|
2138
|
+
children: s
|
|
2139
|
+
}) : null
|
|
2140
|
+
]
|
|
2141
|
+
});
|
|
2142
|
+
}
|
|
2143
|
+
var At = {
|
|
2144
|
+
list: "_list_jx4ch_1",
|
|
2145
|
+
tab: "_tab_jx4ch_9",
|
|
2146
|
+
panel: "_panel_jx4ch_37"
|
|
2147
|
+
};
|
|
2148
|
+
// src/tabs/tabs.tsx
|
|
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 ?? _;
|
|
2151
|
+
function y(e) {
|
|
2152
|
+
p(e), o?.(e);
|
|
2153
|
+
}
|
|
2154
|
+
function b(e) {
|
|
2155
|
+
let t = r[(e + r.length) % r.length];
|
|
2156
|
+
t && (g(t.id), m.current[t.id]?.focus());
|
|
2157
|
+
}
|
|
2158
|
+
function x(e, t) {
|
|
2159
|
+
let n = {
|
|
2160
|
+
ArrowRight: t + 1,
|
|
2161
|
+
ArrowLeft: t - 1,
|
|
2162
|
+
Home: 0,
|
|
2163
|
+
End: r.length - 1
|
|
2164
|
+
}[e.key];
|
|
2165
|
+
n !== void 0 && (e.preventDefault(), b(n));
|
|
2166
|
+
}
|
|
2167
|
+
return /* @__PURE__ */ n("div", {
|
|
2168
|
+
...c,
|
|
2169
|
+
children: [/* @__PURE__ */ t("div", {
|
|
2170
|
+
role: "tablist",
|
|
2171
|
+
"aria-label": e,
|
|
2172
|
+
className: At.list,
|
|
2173
|
+
children: r.map((e, n) => {
|
|
2174
|
+
let r = e.id === _;
|
|
2175
|
+
return /* @__PURE__ */ t("button", {
|
|
2176
|
+
ref: (t) => {
|
|
2177
|
+
m.current[e.id] = t;
|
|
2178
|
+
},
|
|
2179
|
+
type: "button",
|
|
2180
|
+
role: "tab",
|
|
2181
|
+
id: `${l}-tab-${e.id}`,
|
|
2182
|
+
"aria-selected": r,
|
|
2183
|
+
"aria-controls": `${l}-panel-${e.id}`,
|
|
2184
|
+
tabIndex: e.id === v ? 0 : -1,
|
|
2185
|
+
className: At.tab,
|
|
2186
|
+
onClick: () => {
|
|
2187
|
+
y(e.id);
|
|
2188
|
+
},
|
|
2189
|
+
onFocus: () => {
|
|
2190
|
+
g(e.id);
|
|
2191
|
+
},
|
|
2192
|
+
onBlur: () => {
|
|
2193
|
+
g(void 0);
|
|
2194
|
+
},
|
|
2195
|
+
onKeyDown: (e) => {
|
|
2196
|
+
x(e, n);
|
|
2197
|
+
},
|
|
2198
|
+
children: e.label
|
|
2199
|
+
}, e.id);
|
|
2200
|
+
})
|
|
2201
|
+
}), r.map((e) => /* @__PURE__ */ t("div", {
|
|
2202
|
+
role: "tabpanel",
|
|
2203
|
+
id: `${l}-panel-${e.id}`,
|
|
2204
|
+
"aria-labelledby": `${l}-tab-${e.id}`,
|
|
2205
|
+
hidden: e.id !== _,
|
|
2206
|
+
className: At.panel,
|
|
2207
|
+
children: e.id === _ ? e.panel : null
|
|
2208
|
+
}, e.id))]
|
|
2209
|
+
});
|
|
2210
|
+
}
|
|
2211
|
+
var Mt = {
|
|
2212
|
+
root: "_root_1336w_1",
|
|
2213
|
+
option: "_option_1336w_12"
|
|
2214
|
+
};
|
|
2215
|
+
// src/view-switcher/view-switcher.tsx
|
|
2216
|
+
function Nt({ label: e, options: n, value: r, onChange: i, className: a, ...o }) {
|
|
2217
|
+
return /* @__PURE__ */ t("div", {
|
|
2218
|
+
...o,
|
|
2219
|
+
role: "group",
|
|
2220
|
+
"aria-label": e,
|
|
2221
|
+
className: [Mt.root, a].filter(Boolean).join(" "),
|
|
2222
|
+
children: n.map((e) => /* @__PURE__ */ t("button", {
|
|
2223
|
+
type: "button",
|
|
2224
|
+
"aria-pressed": e.value === r,
|
|
2225
|
+
"aria-label": e.label,
|
|
2226
|
+
title: e.label,
|
|
2227
|
+
className: Mt.option,
|
|
2228
|
+
onClick: () => {
|
|
2229
|
+
i(e.value);
|
|
2230
|
+
},
|
|
2231
|
+
children: e.icon
|
|
2232
|
+
}, e.value))
|
|
2233
|
+
});
|
|
2234
|
+
}
|
|
2235
|
+
var Pt = {
|
|
2236
|
+
grid: "_grid_11vah_2",
|
|
2237
|
+
actions: "_actions_11vah_21"
|
|
2238
|
+
};
|
|
2239
|
+
// src/form-layout/form-layout.tsx
|
|
2240
|
+
function Ft({ className: e, ...n }) {
|
|
2241
|
+
return /* @__PURE__ */ t("div", {
|
|
2242
|
+
...n,
|
|
2243
|
+
className: [Pt.grid, e].filter(Boolean).join(" ")
|
|
2244
|
+
});
|
|
2245
|
+
}
|
|
2246
|
+
function It({ cancelLabel: e = "Cancelar", submitLabel: r = "Salvar", onCancel: i, loading: a = !1, submitDisabled: o = !1, className: s, ...c }) {
|
|
2247
|
+
return /* @__PURE__ */ n("div", {
|
|
2248
|
+
...c,
|
|
2249
|
+
className: [Pt.actions, s].filter(Boolean).join(" "),
|
|
2250
|
+
"data-span": "full",
|
|
2251
|
+
children: [/* @__PURE__ */ t(H, {
|
|
2252
|
+
variant: "muted",
|
|
2253
|
+
onClick: i,
|
|
2254
|
+
children: e
|
|
2255
|
+
}), /* @__PURE__ */ t(H, {
|
|
2256
|
+
variant: "primary",
|
|
2257
|
+
type: "submit",
|
|
2258
|
+
loading: a,
|
|
2259
|
+
disabled: o,
|
|
2260
|
+
children: r
|
|
2261
|
+
})]
|
|
2262
|
+
});
|
|
2263
|
+
}
|
|
2264
|
+
var Lt = {
|
|
2265
|
+
root: "_root_1n0kf_2",
|
|
2266
|
+
wide: "_wide_1n0kf_13",
|
|
2267
|
+
inner: "_inner_1n0kf_21",
|
|
2268
|
+
title: "_title_1n0kf_25",
|
|
2269
|
+
body: "_body_1n0kf_33",
|
|
2270
|
+
actions: "_actions_1n0kf_37"
|
|
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"));
|
|
2274
|
+
}
|
|
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(() => {
|
|
2278
|
+
let t = y.current;
|
|
2279
|
+
if (!t || !e) return;
|
|
2280
|
+
let n = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
2281
|
+
t.showModal();
|
|
2282
|
+
let r = t.querySelector("[data-dialog-body]"), i = t.querySelector("[data-dialog-actions]");
|
|
2283
|
+
return (t.querySelector("[data-autofocus]") ?? (r ? zt(r)[0] : void 0) ?? (i ? zt(i)[0] : void 0))?.focus(), () => {
|
|
2284
|
+
t.close(), n?.focus();
|
|
2285
|
+
};
|
|
2286
|
+
}, [e]);
|
|
2287
|
+
function b(e) {
|
|
2288
|
+
if (_.onKeyDown?.(e), e.key === "Escape") {
|
|
2289
|
+
e.preventDefault(), i();
|
|
2290
|
+
return;
|
|
2291
|
+
}
|
|
2292
|
+
if (e.key !== "Tab") return;
|
|
2293
|
+
let t = zt(e.currentTarget), n = t[0], r = t[t.length - 1];
|
|
2294
|
+
n && r && (e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus()));
|
|
2295
|
+
}
|
|
2296
|
+
if (!e) return null;
|
|
2297
|
+
let x = [
|
|
2298
|
+
Lt.root,
|
|
2299
|
+
f === "wide" ? Lt.wide : "",
|
|
2300
|
+
h
|
|
2301
|
+
].filter(Boolean).join(" ");
|
|
2302
|
+
return /* @__PURE__ */ t("dialog", {
|
|
2303
|
+
..._,
|
|
2304
|
+
ref: y,
|
|
2305
|
+
role: u,
|
|
2306
|
+
"aria-labelledby": `${v}-title`,
|
|
2307
|
+
"aria-describedby": m ?? (u === "alertdialog" ? `${v}-body` : void 0),
|
|
2308
|
+
className: x,
|
|
2309
|
+
onKeyDown: b,
|
|
2310
|
+
onCancel: (e) => {
|
|
2311
|
+
_.onCancel?.(e), e.preventDefault(), i();
|
|
2312
|
+
},
|
|
2313
|
+
onClick: (e) => {
|
|
2314
|
+
_.onClick?.(e), p && e.target === e.currentTarget && i();
|
|
2315
|
+
},
|
|
2316
|
+
children: /* @__PURE__ */ n("div", {
|
|
2317
|
+
className: Lt.inner,
|
|
2318
|
+
children: [
|
|
2319
|
+
/* @__PURE__ */ t("h2", {
|
|
2320
|
+
id: `${v}-title`,
|
|
2321
|
+
className: Lt.title,
|
|
2322
|
+
children: r
|
|
2323
|
+
}),
|
|
2324
|
+
/* @__PURE__ */ t("div", {
|
|
2325
|
+
id: `${v}-body`,
|
|
2326
|
+
className: Lt.body,
|
|
2327
|
+
"data-dialog-body": "",
|
|
2328
|
+
children: a
|
|
2329
|
+
}),
|
|
2330
|
+
/* @__PURE__ */ t("div", {
|
|
2331
|
+
className: Lt.actions,
|
|
2332
|
+
"data-dialog-actions": "",
|
|
2333
|
+
children: l
|
|
2334
|
+
})
|
|
2335
|
+
]
|
|
2336
|
+
})
|
|
2337
|
+
});
|
|
2338
|
+
}
|
|
2339
|
+
var Vt = { description: "_description_1ftx2_1" };
|
|
2340
|
+
// src/confirm-dialog/confirm-dialog.tsx
|
|
2341
|
+
function Ht({ description: r, confirmLabel: i = "Confirmar", cancelLabel: a = "Cancelar", onConfirm: o, onCancel: s, ...c }) {
|
|
2342
|
+
return /* @__PURE__ */ t(Bt, {
|
|
2343
|
+
...c,
|
|
2344
|
+
role: "alertdialog",
|
|
2345
|
+
onClose: s,
|
|
2346
|
+
actions: /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(H, {
|
|
2347
|
+
"data-autofocus": "",
|
|
2348
|
+
variant: "secondary",
|
|
2349
|
+
onClick: s,
|
|
2350
|
+
children: a
|
|
2351
|
+
}), /* @__PURE__ */ t(H, {
|
|
2352
|
+
variant: "primary",
|
|
2353
|
+
onClick: o,
|
|
2354
|
+
children: i
|
|
2355
|
+
})] }),
|
|
2356
|
+
children: /* @__PURE__ */ t("p", {
|
|
2357
|
+
className: Vt.description,
|
|
2358
|
+
children: r
|
|
2359
|
+
})
|
|
2360
|
+
});
|
|
2361
|
+
}
|
|
2362
|
+
var Ut = {
|
|
2363
|
+
region: "_region_1l4ou_1",
|
|
2364
|
+
root: "_root_1l4ou_14",
|
|
2365
|
+
icon: "_icon_1l4ou_27",
|
|
2366
|
+
srOnly: "_srOnly_1l4ou_31",
|
|
2367
|
+
info: "_info_1l4ou_43",
|
|
2368
|
+
success: "_success_1l4ou_48",
|
|
2369
|
+
warning: "_warning_1l4ou_53",
|
|
2370
|
+
danger: "_danger_1l4ou_58"
|
|
2371
|
+
}, Wt = {
|
|
2372
|
+
info: "Informação",
|
|
2373
|
+
success: "Sucesso",
|
|
2374
|
+
warning: "Atenção",
|
|
2375
|
+
danger: "Erro"
|
|
2376
|
+
}, Gt = {
|
|
2377
|
+
info: ["M12 11v5M12 8h.01"],
|
|
2378
|
+
success: ["M8 12l3 3 5-6"],
|
|
2379
|
+
warning: ["M12 10v4M12 17h.01"],
|
|
2380
|
+
danger: ["M9 9l6 6M15 9l-6 6"]
|
|
2381
|
+
};
|
|
2382
|
+
function Kt({ tone: e }) {
|
|
2383
|
+
return /* @__PURE__ */ n("svg", {
|
|
2384
|
+
className: Ut.icon,
|
|
2385
|
+
width: "16",
|
|
2386
|
+
height: "16",
|
|
2387
|
+
viewBox: "0 0 24 24",
|
|
2388
|
+
fill: "none",
|
|
2389
|
+
stroke: "currentColor",
|
|
2390
|
+
strokeWidth: "2",
|
|
2391
|
+
strokeLinecap: "round",
|
|
2392
|
+
strokeLinejoin: "round",
|
|
2393
|
+
"aria-hidden": "true",
|
|
2394
|
+
focusable: "false",
|
|
2395
|
+
children: [e === "warning" ? /* @__PURE__ */ t("path", { d: "M12 3l9 16H3z" }) : /* @__PURE__ */ t("circle", {
|
|
2396
|
+
cx: "12",
|
|
2397
|
+
cy: "12",
|
|
2398
|
+
r: "9"
|
|
2399
|
+
}), Gt[e].map((e) => /* @__PURE__ */ t("path", { d: e }, e))]
|
|
2400
|
+
});
|
|
2401
|
+
}
|
|
2402
|
+
function qt({ className: e, ...n }) {
|
|
2403
|
+
return /* @__PURE__ */ t("div", {
|
|
2404
|
+
...n,
|
|
2405
|
+
"aria-live": "polite",
|
|
2406
|
+
className: [Ut.region, e].filter(Boolean).join(" ")
|
|
2407
|
+
});
|
|
2408
|
+
}
|
|
2409
|
+
function Jt({ tone: e = "info", toneLabel: r = Wt[e], className: i, children: a, ...o }) {
|
|
2410
|
+
return /* @__PURE__ */ n("div", {
|
|
2411
|
+
...o,
|
|
2412
|
+
className: [
|
|
2413
|
+
Ut.root,
|
|
2414
|
+
Ut[e],
|
|
2415
|
+
i
|
|
2416
|
+
].filter(Boolean).join(" "),
|
|
2417
|
+
children: [
|
|
2418
|
+
/* @__PURE__ */ t(Kt, { tone: e }),
|
|
2419
|
+
/* @__PURE__ */ t("span", {
|
|
2420
|
+
className: Ut.srOnly,
|
|
2421
|
+
children: `${r}: `
|
|
2422
|
+
}),
|
|
2423
|
+
/* @__PURE__ */ t("span", { children: a })
|
|
2424
|
+
]
|
|
2425
|
+
});
|
|
2426
|
+
}
|
|
2427
|
+
var Yt = {
|
|
2428
|
+
root: "_root_13abh_1",
|
|
2429
|
+
title: "_title_13abh_10",
|
|
2430
|
+
description: "_description_13abh_18",
|
|
2431
|
+
action: "_action_13abh_25"
|
|
2432
|
+
};
|
|
2433
|
+
// src/empty-state/empty-state.tsx
|
|
2434
|
+
function Xt({ title: e, description: r, action: i, className: a, style: o, ...s }) {
|
|
2435
|
+
return /* @__PURE__ */ n("div", {
|
|
2436
|
+
...s,
|
|
2437
|
+
className: [Yt.root, a].filter(Boolean).join(" "),
|
|
2438
|
+
style: o,
|
|
2439
|
+
children: [
|
|
2440
|
+
/* @__PURE__ */ t("p", {
|
|
2441
|
+
className: Yt.title,
|
|
2442
|
+
children: e
|
|
2443
|
+
}),
|
|
2444
|
+
/* @__PURE__ */ t("p", {
|
|
2445
|
+
className: Yt.description,
|
|
2446
|
+
children: r
|
|
2447
|
+
}),
|
|
2448
|
+
i ? /* @__PURE__ */ t("div", {
|
|
2449
|
+
className: Yt.action,
|
|
2450
|
+
children: i
|
|
2451
|
+
}) : null
|
|
2452
|
+
]
|
|
2453
|
+
});
|
|
2454
|
+
}
|
|
2455
|
+
var Zt = {
|
|
2456
|
+
root: "_root_1hr22_1",
|
|
2457
|
+
skeleton: "_skeleton_1hr22_5",
|
|
2458
|
+
row: "_row_1hr22_10",
|
|
2459
|
+
visuallyHidden: "_visuallyHidden_1hr22_17"
|
|
2460
|
+
};
|
|
2461
|
+
// src/loading-state/loading-state.tsx
|
|
2462
|
+
function Qt({ rows: e = 3, className: n, style: r, ...i }) {
|
|
2463
|
+
return /* @__PURE__ */ t("div", {
|
|
2464
|
+
...i,
|
|
2465
|
+
className: [Zt.skeleton, n].filter(Boolean).join(" "),
|
|
2466
|
+
style: r,
|
|
2467
|
+
"aria-hidden": "true",
|
|
2468
|
+
children: Array.from({ length: e }, (e, n) => /* @__PURE__ */ t("i", { className: Zt.row }, n))
|
|
2469
|
+
});
|
|
2470
|
+
}
|
|
2471
|
+
function $t({ label: e = "Carregando", rows: r, className: i, style: a, ...o }) {
|
|
2472
|
+
return /* @__PURE__ */ n("div", {
|
|
2473
|
+
...o,
|
|
2474
|
+
className: [Zt.root, i].filter(Boolean).join(" "),
|
|
2475
|
+
style: a,
|
|
2476
|
+
role: "status",
|
|
2477
|
+
"aria-busy": "true",
|
|
2478
|
+
children: [/* @__PURE__ */ t("span", {
|
|
2479
|
+
className: Zt.visuallyHidden,
|
|
2480
|
+
children: e
|
|
2481
|
+
}), /* @__PURE__ */ t(Qt, { rows: r })]
|
|
2482
|
+
});
|
|
2483
|
+
}
|
|
2484
|
+
var en = {
|
|
2485
|
+
root: "_root_gqjnf_1",
|
|
2486
|
+
title: "_title_gqjnf_10",
|
|
2487
|
+
description: "_description_gqjnf_17",
|
|
2488
|
+
action: "_action_gqjnf_24"
|
|
2489
|
+
};
|
|
2490
|
+
// src/error-state/error-state.tsx
|
|
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 }) {
|
|
2492
|
+
return /* @__PURE__ */ n("div", {
|
|
2493
|
+
...c,
|
|
2494
|
+
className: [en.root, o].filter(Boolean).join(" "),
|
|
2495
|
+
style: s,
|
|
2496
|
+
role: "alert",
|
|
2497
|
+
children: [
|
|
2498
|
+
/* @__PURE__ */ t("p", {
|
|
2499
|
+
className: en.title,
|
|
2500
|
+
children: e
|
|
2501
|
+
}),
|
|
2502
|
+
r ? /* @__PURE__ */ t("p", {
|
|
2503
|
+
className: en.description,
|
|
2504
|
+
children: r
|
|
2505
|
+
}) : null,
|
|
2506
|
+
a ? /* @__PURE__ */ t("div", {
|
|
2507
|
+
className: en.action,
|
|
2508
|
+
children: /* @__PURE__ */ t(H, {
|
|
2509
|
+
onClick: a,
|
|
2510
|
+
children: i
|
|
2511
|
+
})
|
|
2512
|
+
}) : null
|
|
2513
|
+
]
|
|
2514
|
+
});
|
|
2515
|
+
}
|
|
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"
|
|
2523
|
+
};
|
|
2524
|
+
// src/progress-bar/progress-bar.tsx
|
|
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,
|
|
2534
|
+
role: "progressbar",
|
|
2535
|
+
"aria-label": e,
|
|
2536
|
+
"aria-valuenow": o ? void 0 : u,
|
|
2537
|
+
"aria-valuemin": 0,
|
|
2538
|
+
"aria-valuemax": i,
|
|
2539
|
+
"aria-valuetext": a,
|
|
2540
|
+
"aria-busy": o ? !0 : void 0,
|
|
2541
|
+
children: /* @__PURE__ */ t("span", {
|
|
2542
|
+
className: nn.fill,
|
|
2543
|
+
style: o ? void 0 : { width: `${String(d)}%` }
|
|
2544
|
+
})
|
|
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
|
+
});
|
|
2554
|
+
}
|
|
2555
|
+
var an = {
|
|
2556
|
+
root: "_root_1tkha_1",
|
|
2557
|
+
mark: "_mark_1tkha_8",
|
|
2558
|
+
name: "_name_1tkha_20"
|
|
2559
|
+
};
|
|
2560
|
+
// src/brand-logo/brand-logo.tsx
|
|
2561
|
+
function on({ name: e, mark: r, className: i, ...a }) {
|
|
2562
|
+
return /* @__PURE__ */ n("div", {
|
|
2563
|
+
...a,
|
|
2564
|
+
className: [an.root, i].filter(Boolean).join(" "),
|
|
2565
|
+
children: [/* @__PURE__ */ t("span", {
|
|
2566
|
+
"aria-hidden": "true",
|
|
2567
|
+
className: an.mark,
|
|
2568
|
+
children: r
|
|
2569
|
+
}), /* @__PURE__ */ t("span", {
|
|
2570
|
+
className: an.name,
|
|
2571
|
+
children: e
|
|
2572
|
+
})]
|
|
2573
|
+
});
|
|
2574
|
+
}
|
|
2575
|
+
var sn = {
|
|
2576
|
+
root: "_root_1fzd7_1",
|
|
2577
|
+
neutral: "_neutral_1fzd7_11",
|
|
2578
|
+
primary: "_primary_1fzd7_16",
|
|
2579
|
+
accent: "_accent_1fzd7_21",
|
|
2580
|
+
success: "_success_1fzd7_26",
|
|
2581
|
+
warning: "_warning_1fzd7_31",
|
|
2582
|
+
danger: "_danger_1fzd7_36",
|
|
2583
|
+
info: "_info_1fzd7_41"
|
|
2584
|
+
};
|
|
2585
|
+
// src/badge/badge.tsx
|
|
2586
|
+
function cn({ tone: e = "primary", className: n, ...r }) {
|
|
2587
|
+
let i = [
|
|
2588
|
+
sn.root,
|
|
2589
|
+
sn[e],
|
|
2590
|
+
n
|
|
2591
|
+
].filter(Boolean).join(" ");
|
|
2592
|
+
return /* @__PURE__ */ t("span", {
|
|
2593
|
+
...r,
|
|
2594
|
+
className: i
|
|
2595
|
+
});
|
|
2596
|
+
}
|
|
2597
|
+
var ln = { root: "_root_1slwb_1" }, un = {
|
|
2598
|
+
bg: "#F3F0FA",
|
|
2599
|
+
bgElevated: "#FAF8FE",
|
|
2600
|
+
surface: "#FFFFFF",
|
|
2601
|
+
surfaceMuted: "#EAE5F6",
|
|
2602
|
+
surfaceHover: "#E1DAF2",
|
|
2603
|
+
border: "#D9D1EC",
|
|
2604
|
+
borderStrong: "#BFB3DD",
|
|
2605
|
+
elevation1: "#FFFFFF",
|
|
2606
|
+
elevation2: "#FFFFFF",
|
|
2607
|
+
elevation3: "#FFFFFF",
|
|
2608
|
+
primary: "#6D28D9",
|
|
2609
|
+
primaryHover: "#5B21B6",
|
|
2610
|
+
primaryBright: "#A855F7",
|
|
2611
|
+
primarySoft: "#EBE0FD",
|
|
2612
|
+
primaryOn: "#FFFFFF",
|
|
2613
|
+
accent: "#0E7490",
|
|
2614
|
+
accentFill: "#06B6D4",
|
|
2615
|
+
accentBright: "#22D3EE",
|
|
2616
|
+
accentSoft: "#D8F1F6",
|
|
2617
|
+
text: "#1A1230",
|
|
2618
|
+
textMuted: "#4F4469",
|
|
2619
|
+
textFaint: "#8B84A3",
|
|
2620
|
+
success: "#047857",
|
|
2621
|
+
successSoft: "#D9F3E7",
|
|
2622
|
+
warning: "#92400E",
|
|
2623
|
+
warningSoft: "#FCEFCF",
|
|
2624
|
+
danger: "#BE123C",
|
|
2625
|
+
dangerSoft: "#FDE2E9",
|
|
2626
|
+
info: "#0369A1",
|
|
2627
|
+
infoSoft: "#DAEEFB",
|
|
2628
|
+
shadowSm: "0 1px 2px rgba(42, 24, 96, 0.08)",
|
|
2629
|
+
shadowMd: "0 4px 12px rgba(42, 24, 96, 0.10), 0 1px 3px rgba(42, 24, 96, 0.06)",
|
|
2630
|
+
shadowLg: "0 18px 44px rgba(42, 24, 96, 0.20), 0 4px 12px rgba(42, 24, 96, 0.08)"
|
|
2631
|
+
}, dn = {
|
|
2632
|
+
bg: "#0B0816",
|
|
2633
|
+
bgElevated: "#110B21",
|
|
2634
|
+
surface: "#181028",
|
|
2635
|
+
surfaceMuted: "#130D22",
|
|
2636
|
+
surfaceHover: "#241A3D",
|
|
2637
|
+
border: "#2F2250",
|
|
2638
|
+
borderStrong: "#45337A",
|
|
2639
|
+
elevation1: "#181028",
|
|
2640
|
+
elevation2: "#201638",
|
|
2641
|
+
elevation3: "#2A1D4A",
|
|
2642
|
+
primary: "#A78BFA",
|
|
2643
|
+
primaryHover: "#C4B5FD",
|
|
2644
|
+
primaryBright: "#C084FC",
|
|
2645
|
+
primarySoft: "#2B1D52",
|
|
2646
|
+
primaryOn: "#12082B",
|
|
2647
|
+
accent: "#22D3EE",
|
|
2648
|
+
accentFill: "#06B6D4",
|
|
2649
|
+
accentBright: "#67E8F9",
|
|
2650
|
+
accentSoft: "#0F3342",
|
|
2651
|
+
text: "#F5F1FF",
|
|
2652
|
+
textMuted: "#B1A5CF",
|
|
2653
|
+
textFaint: "#7A6C9E",
|
|
2654
|
+
success: "#34D399",
|
|
2655
|
+
successSoft: "#0E2E27",
|
|
2656
|
+
warning: "#FBBF24",
|
|
2657
|
+
warningSoft: "#33260B",
|
|
2658
|
+
danger: "#FB7185",
|
|
2659
|
+
dangerSoft: "#3A1222",
|
|
2660
|
+
info: "#38BDF8",
|
|
2661
|
+
infoSoft: "#0C2C42",
|
|
2662
|
+
shadowSm: "0 1px 2px rgba(0, 0, 0, 0.45)",
|
|
2663
|
+
shadowMd: "0 6px 16px rgba(0, 0, 0, 0.50), 0 0 0 1px rgba(167, 139, 250, 0.08)",
|
|
2664
|
+
shadowLg: "0 22px 52px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(167, 139, 250, 0.14)"
|
|
2665
|
+
}, fn = {
|
|
2666
|
+
sm: 8,
|
|
2667
|
+
md: 12,
|
|
2668
|
+
lg: 18,
|
|
2669
|
+
xl: 26,
|
|
2670
|
+
pill: 999
|
|
2671
|
+
}, pn = (e) => e * 4, mn = {
|
|
2672
|
+
xs: 12,
|
|
2673
|
+
sm: 13,
|
|
2674
|
+
md: 14,
|
|
2675
|
+
base: 16,
|
|
2676
|
+
lg: 18,
|
|
2677
|
+
xl: 21,
|
|
2678
|
+
xxl: 30,
|
|
2679
|
+
xxxl: 36
|
|
2680
|
+
}, hn = {
|
|
2681
|
+
semibold: 600,
|
|
2682
|
+
bold: 700,
|
|
2683
|
+
extrabold: 800
|
|
2684
|
+
}, gn = {
|
|
2685
|
+
tight: 1.1,
|
|
2686
|
+
relaxed: 1.6
|
|
2687
|
+
}, _n = {
|
|
2688
|
+
dropdown: 40,
|
|
2689
|
+
popover: 45,
|
|
2690
|
+
toast: 200
|
|
2691
|
+
}, vn = {
|
|
2692
|
+
unit: 4,
|
|
2693
|
+
steps: [
|
|
2694
|
+
1,
|
|
2695
|
+
2,
|
|
2696
|
+
3,
|
|
2697
|
+
4,
|
|
2698
|
+
5,
|
|
2699
|
+
6,
|
|
2700
|
+
8,
|
|
2701
|
+
10
|
|
2702
|
+
]
|
|
2703
|
+
}, yn = {
|
|
2704
|
+
fast: 120,
|
|
2705
|
+
base: 200,
|
|
2706
|
+
slow: 320,
|
|
2707
|
+
ease: {
|
|
2708
|
+
standard: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
2709
|
+
enter: "cubic-bezier(0, 0, 0.2, 1)",
|
|
2710
|
+
exit: "cubic-bezier(0.4, 0, 1, 1)",
|
|
2711
|
+
linear: "linear"
|
|
2712
|
+
}
|
|
2713
|
+
}, bn = {
|
|
2714
|
+
brand: ["#7C3AED", "#06B6D4"],
|
|
2715
|
+
deep: ["#6D28D9", "#7C3AED"],
|
|
2716
|
+
calm: ["#F3EBFF", "#E0F7FB"]
|
|
2717
|
+
}, xn = {
|
|
2718
|
+
display: "'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif",
|
|
2719
|
+
body: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif"
|
|
2720
|
+
}, Sn = {
|
|
2721
|
+
md: 720,
|
|
2722
|
+
sm: 480,
|
|
2723
|
+
min: 360
|
|
2724
|
+
}, Cn = [
|
|
2725
|
+
["#7C3AED", "#06B6D4"],
|
|
2726
|
+
["#A855F7", "#22D3EE"],
|
|
2727
|
+
["#6366F1", "#2DD4BF"],
|
|
2728
|
+
["#8B5CF6", "#38BDF8"],
|
|
2729
|
+
["#4C1D95", "#0E7490"],
|
|
2730
|
+
["#9333EA", "#67E8F9"],
|
|
2731
|
+
["#5B21B6", "#14B8A6"],
|
|
2732
|
+
["#C084FC", "#0891B2"],
|
|
2733
|
+
["#7E22CE", "#06B6D4"],
|
|
2734
|
+
["#6D28D9", "#5EEAD4"]
|
|
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) {
|
|
2737
|
+
let n = 0;
|
|
2738
|
+
for (let t = 0; t < e.length; t++) n = n * 31 + e.charCodeAt(t) >>> 0;
|
|
2739
|
+
let r = t.length > 0 ? t : wn;
|
|
2740
|
+
return r[n % r.length] ?? Tn;
|
|
2741
|
+
}
|
|
2742
|
+
// src/item-swatch/item-swatch.tsx
|
|
2743
|
+
function Dn({ id: e, palette: n, className: r, style: i, children: a, ...o }) {
|
|
2744
|
+
let [s, c] = En(e, n);
|
|
2745
|
+
return /* @__PURE__ */ t("span", {
|
|
2746
|
+
...o,
|
|
2747
|
+
"aria-hidden": "true",
|
|
2748
|
+
className: [ln.root, r].filter(Boolean).join(" "),
|
|
2749
|
+
style: {
|
|
2750
|
+
...i,
|
|
2751
|
+
background: `linear-gradient(135deg, ${s}, ${c})`
|
|
2752
|
+
},
|
|
2753
|
+
children: a
|
|
2754
|
+
});
|
|
2755
|
+
}
|
|
2756
|
+
// src/icons/view-icons.tsx
|
|
2757
|
+
function On({ size: e = 18, children: n, ...r }) {
|
|
2758
|
+
return /* @__PURE__ */ t("svg", {
|
|
2759
|
+
viewBox: "0 0 24 24",
|
|
2760
|
+
width: e,
|
|
2761
|
+
height: e,
|
|
2762
|
+
fill: "none",
|
|
2763
|
+
stroke: "currentColor",
|
|
2764
|
+
strokeWidth: "2",
|
|
2765
|
+
strokeLinecap: "round",
|
|
2766
|
+
strokeLinejoin: "round",
|
|
2767
|
+
...r,
|
|
2768
|
+
"aria-hidden": "true",
|
|
2769
|
+
focusable: "false",
|
|
2770
|
+
children: n
|
|
2771
|
+
});
|
|
2772
|
+
}
|
|
2773
|
+
function kn(e) {
|
|
2774
|
+
return /* @__PURE__ */ t(On, {
|
|
2775
|
+
...e,
|
|
2776
|
+
children: /* @__PURE__ */ t("path", { d: "M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01" })
|
|
2777
|
+
});
|
|
2778
|
+
}
|
|
2779
|
+
function An(e) {
|
|
2780
|
+
return /* @__PURE__ */ n(On, {
|
|
2781
|
+
...e,
|
|
2782
|
+
children: [
|
|
2783
|
+
/* @__PURE__ */ t("rect", {
|
|
2784
|
+
x: "3",
|
|
2785
|
+
y: "3",
|
|
2786
|
+
width: "7",
|
|
2787
|
+
height: "7",
|
|
2788
|
+
rx: "1"
|
|
2789
|
+
}),
|
|
2790
|
+
/* @__PURE__ */ t("rect", {
|
|
2791
|
+
x: "14",
|
|
2792
|
+
y: "3",
|
|
2793
|
+
width: "7",
|
|
2794
|
+
height: "7",
|
|
2795
|
+
rx: "1"
|
|
2796
|
+
}),
|
|
2797
|
+
/* @__PURE__ */ t("rect", {
|
|
2798
|
+
x: "3",
|
|
2799
|
+
y: "14",
|
|
2800
|
+
width: "7",
|
|
2801
|
+
height: "7",
|
|
2802
|
+
rx: "1"
|
|
2803
|
+
}),
|
|
2804
|
+
/* @__PURE__ */ t("rect", {
|
|
2805
|
+
x: "14",
|
|
2806
|
+
y: "14",
|
|
2807
|
+
width: "7",
|
|
2808
|
+
height: "7",
|
|
2809
|
+
rx: "1"
|
|
2810
|
+
})
|
|
2811
|
+
]
|
|
2812
|
+
});
|
|
2813
|
+
}
|
|
2814
|
+
function jn(e) {
|
|
2815
|
+
return /* @__PURE__ */ t(On, {
|
|
2816
|
+
...e,
|
|
2817
|
+
children: /* @__PURE__ */ t("path", { d: "M4 20h16M6 4v16M10 4v16M14.5 5l3.5 15" })
|
|
2818
|
+
});
|
|
2819
|
+
}
|
|
2820
|
+
function Mn(e) {
|
|
2821
|
+
return /* @__PURE__ */ n(On, {
|
|
2822
|
+
...e,
|
|
2823
|
+
children: [/* @__PURE__ */ t("rect", {
|
|
2824
|
+
x: "3",
|
|
2825
|
+
y: "4",
|
|
2826
|
+
width: "18",
|
|
2827
|
+
height: "16",
|
|
2828
|
+
rx: "2"
|
|
2829
|
+
}), /* @__PURE__ */ t("path", { d: "M3 10h18M9 4v16" })]
|
|
2830
|
+
});
|
|
2831
|
+
}
|
|
2832
|
+
function Nn(e) {
|
|
2833
|
+
return /* @__PURE__ */ n(On, {
|
|
2834
|
+
...e,
|
|
2835
|
+
children: [/* @__PURE__ */ t("rect", {
|
|
2836
|
+
x: "3",
|
|
2837
|
+
y: "4",
|
|
2838
|
+
width: "18",
|
|
2839
|
+
height: "18",
|
|
2840
|
+
rx: "2"
|
|
2841
|
+
}), /* @__PURE__ */ t("path", { d: "M16 2v4M8 2v4M3 10h18M8 14h4v4H8z" })]
|
|
2842
|
+
});
|
|
2843
|
+
}
|
|
2844
|
+
function Pn(e) {
|
|
2845
|
+
return /* @__PURE__ */ n(On, {
|
|
2846
|
+
...e,
|
|
2847
|
+
children: [
|
|
2848
|
+
/* @__PURE__ */ t("path", { d: "M6 3v18M10 6h10M10 12h10M10 18h7" }),
|
|
2849
|
+
/* @__PURE__ */ t("circle", {
|
|
2850
|
+
cx: "6",
|
|
2851
|
+
cy: "6",
|
|
2852
|
+
r: "1.5"
|
|
2853
|
+
}),
|
|
2854
|
+
/* @__PURE__ */ t("circle", {
|
|
2855
|
+
cx: "6",
|
|
2856
|
+
cy: "12",
|
|
2857
|
+
r: "1.5"
|
|
2858
|
+
}),
|
|
2859
|
+
/* @__PURE__ */ t("circle", {
|
|
2860
|
+
cx: "6",
|
|
2861
|
+
cy: "18",
|
|
2862
|
+
r: "1.5"
|
|
2863
|
+
})
|
|
2864
|
+
]
|
|
2865
|
+
});
|
|
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
|
+
}
|
|
3710
|
+
// src/theme/theme.ts
|
|
3711
|
+
function ui(e) {
|
|
3712
|
+
return e;
|
|
3713
|
+
}
|
|
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) {
|
|
3719
|
+
let t = e / 255;
|
|
3720
|
+
return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
3721
|
+
}
|
|
3722
|
+
function mi(e) {
|
|
3723
|
+
if (!fi.test(e)) throw TypeError(`Cor fora do formato #RGB ou #RRGGBB: ${e}`);
|
|
3724
|
+
let t = e.slice(1);
|
|
3725
|
+
return t.length === 6 ? t : t.replace(/./g, (e) => e + e);
|
|
3726
|
+
}
|
|
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);
|
|
3729
|
+
return .2126 * n + .7152 * r + .0722 * i;
|
|
3730
|
+
}
|
|
3731
|
+
function gi(e, t) {
|
|
3732
|
+
let n = hi(e), r = hi(t);
|
|
3733
|
+
return (Math.max(n, r) + .05) / (Math.min(n, r) + .05);
|
|
3734
|
+
}
|
|
3735
|
+
var _i = 4.5, vi = 3;
|
|
3736
|
+
function $(e, t, n = _i) {
|
|
3737
|
+
return {
|
|
3738
|
+
foreground: e,
|
|
3739
|
+
background: t,
|
|
3740
|
+
minimum: n
|
|
3741
|
+
};
|
|
3742
|
+
}
|
|
3743
|
+
var yi = [
|
|
3744
|
+
$("text", "bg"),
|
|
3745
|
+
$("text", "surface"),
|
|
3746
|
+
$("text", "surfaceMuted"),
|
|
3747
|
+
$("textMuted", "bg"),
|
|
3748
|
+
$("textMuted", "surface"),
|
|
3749
|
+
$("textMuted", "surfaceMuted"),
|
|
3750
|
+
$("primary", "bg"),
|
|
3751
|
+
$("primary", "surface"),
|
|
3752
|
+
$("primary", "primarySoft"),
|
|
3753
|
+
$("primaryOn", "primary"),
|
|
3754
|
+
$("primaryOn", "primaryHover"),
|
|
3755
|
+
$("accent", "bg"),
|
|
3756
|
+
$("accent", "surface"),
|
|
3757
|
+
$("accent", "accentSoft"),
|
|
3758
|
+
$("success", "successSoft"),
|
|
3759
|
+
$("warning", "warningSoft"),
|
|
3760
|
+
$("danger", "dangerSoft"),
|
|
3761
|
+
$("info", "infoSoft"),
|
|
3762
|
+
$("textFaint", "bg", vi),
|
|
3763
|
+
$("textFaint", "surface", vi)
|
|
3764
|
+
];
|
|
3765
|
+
function bi(e) {
|
|
3766
|
+
let t = [];
|
|
3767
|
+
for (let n of ["light", "dark"]) {
|
|
3768
|
+
let r = e[n];
|
|
3769
|
+
for (let { foreground: e, background: i, minimum: a } of yi) {
|
|
3770
|
+
let o = gi(r[e], r[i]);
|
|
3771
|
+
o < a && t.push({
|
|
3772
|
+
theme: n,
|
|
3773
|
+
foreground: e,
|
|
3774
|
+
background: i,
|
|
3775
|
+
minimum: a,
|
|
3776
|
+
ratio: o
|
|
3777
|
+
});
|
|
3778
|
+
}
|
|
3779
|
+
}
|
|
3780
|
+
return t;
|
|
3781
|
+
}
|
|
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 };
|