@ishtar-sink/vega 0.1.0 → 0.2.0

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