@sbkbs/ui 1.0.2 → 1.0.3

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 (35) hide show
  1. package/README.md +13 -10
  2. package/dist/components/Accordion/Accordion.d.ts +11 -0
  3. package/dist/components/Alert/Alert.d.ts +6 -0
  4. package/dist/components/Badge/Badge.d.ts +6 -0
  5. package/dist/components/Button/Button.stories.d.ts +7 -0
  6. package/dist/components/Checkbox/Checkbox.d.ts +6 -0
  7. package/dist/components/Chip/Chip.d.ts +5 -0
  8. package/dist/components/Divider/Divider.d.ts +5 -0
  9. package/dist/components/EmptyState/EmptyState.d.ts +8 -0
  10. package/dist/components/Feedback/Feedback.stories.d.ts +5 -0
  11. package/dist/components/Layout/Layout.d.ts +14 -0
  12. package/dist/components/Navigation/Navigation.d.ts +7 -0
  13. package/dist/components/PageHeader/PageHeader.d.ts +7 -0
  14. package/dist/components/Pagination/Pagination.d.ts +7 -0
  15. package/dist/components/Popover/Popover.d.ts +7 -0
  16. package/dist/components/Radio/Radio.d.ts +6 -0
  17. package/dist/components/SectionHeader/SectionHeader.d.ts +7 -0
  18. package/dist/components/Select/Select.d.ts +13 -0
  19. package/dist/components/Skeleton/Skeleton.d.ts +7 -0
  20. package/dist/components/Switch/Switch.d.ts +7 -0
  21. package/dist/components/Table/Table.d.ts +4 -0
  22. package/dist/components/Tabs/Tabs.d.ts +11 -0
  23. package/dist/components/Tag/Tag.d.ts +5 -0
  24. package/dist/components/Textarea/Textarea.d.ts +7 -0
  25. package/dist/components/Toast/Toast.d.ts +26 -0
  26. package/dist/components/Tooltip/Tooltip.d.ts +7 -0
  27. package/dist/index.d.ts +23 -0
  28. package/dist/oficios-ui.css +1 -1
  29. package/dist/oficios-ui.js +1047 -254
  30. package/dist/oficios-ui.js.map +1 -1
  31. package/dist/oficios-ui.umd.cjs +1 -1
  32. package/dist/oficios-ui.umd.cjs.map +1 -1
  33. package/dist/theme.css +6 -0
  34. package/dist/utils/cn.d.ts +1 -0
  35. package/package.json +19 -3
@@ -1,27 +1,77 @@
1
- import { jsxs as v, jsx as e } from "react/jsx-runtime";
2
- import { useState as z, useEffect as b, useContext as $, createContext as P } from "react";
3
- const W = ({
4
- variant: t = "primary",
5
- size: a = "md",
6
- compact: r = !1,
1
+ import { jsx as t, jsxs as m } from "react/jsx-runtime";
2
+ import { useState as N, useRef as z, useEffect as w, useId as B, useCallback as S, useMemo as R, useContext as _, createContext as A, isValidElement as K } from "react";
3
+ const f = (...e) => e.filter(Boolean).join(" "), V = ({ items: e, defaultOpenId: r }) => {
4
+ const [a, n] = N(r ?? null), o = z(null);
5
+ return /* @__PURE__ */ t("div", { className: "grid gap-2", ref: o, children: e.map((s) => {
6
+ const d = a === s.id, v = `accordion-trigger-${s.id}`, c = `accordion-panel-${s.id}`;
7
+ return /* @__PURE__ */ m(
8
+ "div",
9
+ {
10
+ className: "overflow-hidden rounded-[var(--border-radius-md)] border border-[var(--border-color)]",
11
+ children: [
12
+ /* @__PURE__ */ m(
13
+ "button",
14
+ {
15
+ "aria-controls": c,
16
+ "aria-expanded": d,
17
+ className: "flex w-full items-center justify-between bg-[var(--bg-secondary)] px-4 py-3 text-left text-sm font-medium text-[var(--text-primary)] hover:bg-[var(--bg-hover)]",
18
+ id: v,
19
+ onKeyDown: (i) => {
20
+ var h, b, g, y;
21
+ if (!o.current)
22
+ return;
23
+ const l = Array.from(
24
+ o.current.querySelectorAll(
25
+ '[id^="accordion-trigger-"]'
26
+ )
27
+ ), u = l.findIndex((x) => x.id === v);
28
+ u === -1 || l.length === 0 || (i.key === "ArrowDown" ? (i.preventDefault(), (h = l[(u + 1) % l.length]) == null || h.focus()) : i.key === "ArrowUp" ? (i.preventDefault(), (b = l[(u - 1 + l.length) % l.length]) == null || b.focus()) : i.key === "Home" ? (i.preventDefault(), (g = l[0]) == null || g.focus()) : i.key === "End" && (i.preventDefault(), (y = l[l.length - 1]) == null || y.focus()));
29
+ },
30
+ onClick: () => n((i) => i === s.id ? null : s.id),
31
+ type: "button",
32
+ children: [
33
+ s.title,
34
+ /* @__PURE__ */ t("span", { className: f("transition", d ? "rotate-180" : ""), children: "⌄" })
35
+ ]
36
+ }
37
+ ),
38
+ d && /* @__PURE__ */ t(
39
+ "div",
40
+ {
41
+ "aria-labelledby": v,
42
+ className: "bg-[var(--bg-tertiary)] px-4 py-3 text-sm text-[var(--text-secondary)]",
43
+ id: c,
44
+ role: "region",
45
+ children: s.content
46
+ }
47
+ )
48
+ ]
49
+ },
50
+ s.id
51
+ );
52
+ }) });
53
+ }, W = ({
54
+ variant: e = "primary",
55
+ size: r = "md",
56
+ compact: a = !1,
7
57
  fullWidth: n = !1,
8
58
  isLoading: o = !1,
9
59
  leftIcon: s,
10
- rightIcon: i,
11
- children: d,
12
- className: h = "",
13
- disabled: c,
60
+ rightIcon: d,
61
+ children: v,
62
+ className: c = "",
63
+ disabled: i,
14
64
  palette: l,
15
- style: f,
16
- ...m
65
+ style: u,
66
+ ...h
17
67
  }) => {
18
- const x = "relative inline-flex select-none items-center justify-center overflow-hidden whitespace-nowrap rounded-[var(--border-radius-md)] border border-transparent font-semibold leading-none tracking-[0.01em] transition-[all_var(--transition-base)]", p = "focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--md-primary)]", N = "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-60", u = n ? "w-full" : "", g = "", M = l === "off-white" && t === "primary" ? "border-[var(--border-color)]" : "", _ = {
19
- xs: r ? "min-h-[1.75rem] min-w-[1.75rem] gap-1 px-2 py-1 text-[var(--font-size-xs)]" : "min-h-8 min-w-8 gap-1.5 px-3 py-1.5 text-[var(--font-size-xs)]",
20
- sm: r ? "min-h-8 min-w-8 gap-[0.3125rem] px-2.5 py-1.5 text-[var(--font-size-sm)]" : "min-h-9 min-w-9 gap-[0.4375rem] px-3.5 py-2 text-[var(--font-size-sm)]",
21
- md: r ? "min-h-[2.375rem] min-w-[2.375rem] gap-1.5 px-3 py-2 text-[var(--font-size-base)]" : "min-h-11 min-w-11 gap-2 px-4 py-2.5 text-[var(--font-size-base)]",
22
- lg: r ? "min-h-[2.625rem] min-w-[2.625rem] gap-[0.4375rem] px-3.5 py-[0.5625rem] text-[var(--font-size-lg)]" : "min-h-12 min-w-12 gap-[0.5625rem] px-6 py-4 text-[var(--font-size-lg)]",
23
- xl: r ? "min-h-12 min-w-12 gap-2 px-4 py-3 text-[var(--font-size-xl)]" : "min-h-14 min-w-14 gap-2.5 px-8 py-6 text-[var(--font-size-xl)]"
24
- }, E = {
68
+ const b = "relative inline-flex select-none items-center justify-center overflow-hidden whitespace-nowrap rounded-[var(--border-radius-md)] border border-transparent font-semibold leading-none tracking-[0.01em] transition-[all_var(--transition-base)]", g = "focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--md-primary)]", y = "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-60", x = n ? "w-full" : "", p = "", k = l === "off-white" && e === "primary" ? "border-[var(--border-color)]" : "", C = {
69
+ xs: a ? "min-h-[1.75rem] min-w-[1.75rem] gap-1 px-2 py-1 text-[var(--font-size-xs)]" : "min-h-8 min-w-8 gap-1.5 px-3 py-1.5 text-[var(--font-size-xs)]",
70
+ sm: a ? "min-h-8 min-w-8 gap-[0.3125rem] px-2.5 py-1.5 text-[var(--font-size-sm)]" : "min-h-9 min-w-9 gap-[0.4375rem] px-3.5 py-2 text-[var(--font-size-sm)]",
71
+ md: a ? "min-h-[2.375rem] min-w-[2.375rem] gap-1.5 px-3 py-2 text-[var(--font-size-base)]" : "min-h-11 min-w-11 gap-2 px-4 py-2.5 text-[var(--font-size-base)]",
72
+ lg: a ? "min-h-[2.625rem] min-w-[2.625rem] gap-[0.4375rem] px-3.5 py-[0.5625rem] text-[var(--font-size-lg)]" : "min-h-12 min-w-12 gap-[0.5625rem] px-6 py-4 text-[var(--font-size-lg)]",
73
+ xl: a ? "min-h-12 min-w-12 gap-2 px-4 py-3 text-[var(--font-size-xl)]" : "min-h-14 min-w-14 gap-2.5 px-8 py-6 text-[var(--font-size-xl)]"
74
+ }, j = {
25
75
  primary: "bg-[var(--md-primary)] text-[var(--md-on-primary)] shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--primary-color-hover)] hover:shadow-[var(--shadow-md)]",
26
76
  secondary: "bg-[var(--md-secondary)] text-[var(--md-on-secondary)] shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--secondary-color-light)] hover:shadow-[var(--shadow-md)]",
27
77
  success: "bg-[var(--success-color)] text-white shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--success-color-light)] hover:shadow-[var(--shadow-md)]",
@@ -30,13 +80,13 @@ const W = ({
30
80
  info: "bg-[var(--info-color)] text-white shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--info-color-light)] hover:shadow-[var(--shadow-md)]",
31
81
  neutral: "bg-[var(--neutral-color)] text-white shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--neutral-color-light)] hover:shadow-[var(--shadow-md)]",
32
82
  ghost: "border-[var(--border-color)] bg-[var(--bg-secondary)] text-[var(--md-on-surface)] shadow-[var(--shadow-xs)] hover:bg-[var(--bg-hover)] hover:text-[var(--md-primary)] hover:border-[var(--border-color-hover)]"
33
- }, C = {
34
- xs: r ? "h-3 w-3" : "h-3.5 w-3.5",
35
- sm: r ? "h-3.5 w-3.5" : "h-4 w-4",
83
+ }, I = {
84
+ xs: a ? "h-3 w-3" : "h-3.5 w-3.5",
85
+ sm: a ? "h-3.5 w-3.5" : "h-4 w-4",
36
86
  md: "h-[1.125rem] w-[1.125rem]",
37
87
  lg: "h-5 w-5",
38
88
  xl: "h-5 w-5"
39
- }, w = {
89
+ }, M = {
40
90
  "verde-vibrante": {
41
91
  primary: "var(--brand-verde-vibrante)",
42
92
  hover: "var(--brand-verde-profundo)"
@@ -66,121 +116,255 @@ const W = ({
66
116
  hover: "var(--brand-branco)",
67
117
  onPrimary: "var(--brand-grafite-azulado)"
68
118
  }
69
- }, y = {};
70
- l && t === "primary" && (y["--md-primary"] = w[l].primary, y["--primary-color-hover"] = w[l].hover, w[l].onPrimary && (y["--md-on-primary"] = w[l].onPrimary));
71
- const B = [
119
+ }, E = {};
120
+ l && e === "primary" && (E["--md-primary"] = M[l].primary, E["--primary-color-hover"] = M[l].hover, M[l].onPrimary && (E["--md-on-primary"] = M[l].onPrimary));
121
+ const F = [
122
+ b,
123
+ g,
124
+ y,
125
+ C[r],
126
+ j[e],
127
+ k,
72
128
  x,
73
129
  p,
74
- N,
75
- _[a],
76
- E[t],
77
- M,
78
- u,
79
- g,
80
- h
130
+ c
81
131
  ].filter(Boolean).join(" ");
82
- return /* @__PURE__ */ v(
132
+ return /* @__PURE__ */ m(
83
133
  "button",
84
134
  {
85
- className: B,
86
- disabled: c || o,
87
- style: { ...y, ...f },
88
- ...m,
135
+ className: F,
136
+ disabled: i || o,
137
+ style: { ...E, ...u },
138
+ ...h,
89
139
  children: [
90
- o && /* @__PURE__ */ e(
140
+ o && /* @__PURE__ */ t(
91
141
  "span",
92
142
  {
93
143
  "aria-hidden": "true",
94
144
  className: "absolute inline-flex h-[1em] w-[1em] animate-spin items-center justify-center",
95
- children: /* @__PURE__ */ v("svg", { fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: [
96
- /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "10", strokeOpacity: "0.25" }),
97
- /* @__PURE__ */ e("path", { d: "M12 2 A10 10 0 0 1 22 12", strokeLinecap: "round" })
145
+ children: /* @__PURE__ */ m("svg", { fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: [
146
+ /* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "10", strokeOpacity: "0.25" }),
147
+ /* @__PURE__ */ t("path", { d: "M12 2 A10 10 0 0 1 22 12", strokeLinecap: "round" })
98
148
  ] })
99
149
  }
100
150
  ),
101
- !o && s && /* @__PURE__ */ e(
151
+ !o && s && /* @__PURE__ */ t(
102
152
  "span",
103
153
  {
104
- className: `mr-1 inline-flex shrink-0 items-center justify-center leading-none ${C[a]}`,
154
+ className: `mr-1 inline-flex shrink-0 items-center justify-center leading-none ${I[r]}`,
105
155
  children: s
106
156
  }
107
157
  ),
108
- !o && /* @__PURE__ */ e("span", { className: "btn__content inline-flex items-center justify-center", children: d }),
109
- !o && i && /* @__PURE__ */ e(
158
+ !o && /* @__PURE__ */ t("span", { className: "btn__content inline-flex items-center justify-center", children: v }),
159
+ !o && d && /* @__PURE__ */ t(
110
160
  "span",
111
161
  {
112
- className: `ml-1 inline-flex shrink-0 items-center justify-center leading-none ${C[a]}`,
113
- children: i
162
+ className: `ml-1 inline-flex shrink-0 items-center justify-center leading-none ${I[r]}`,
163
+ children: d
114
164
  }
115
165
  )
116
166
  ]
117
167
  }
118
168
  );
119
- }, F = ({
120
- variant: t = "default",
121
- padding: a = "md",
122
- hoverable: r = !1,
169
+ }, G = ({
170
+ title: e,
171
+ tone: r = "info",
172
+ children: a,
173
+ className: n,
174
+ ...o
175
+ }) => {
176
+ const s = {
177
+ info: "border-[var(--info-color)]/40 bg-[var(--info-color)]/10 text-[var(--text-primary)]",
178
+ success: "border-[var(--success-color)]/40 bg-[var(--success-color)]/10 text-[var(--text-primary)]",
179
+ warning: "border-[var(--warning-color)]/40 bg-[var(--warning-color)]/10 text-[var(--text-primary)]",
180
+ error: "border-[var(--md-error)]/40 bg-[var(--md-error)]/10 text-[var(--text-primary)]"
181
+ }[r];
182
+ return /* @__PURE__ */ m(
183
+ "div",
184
+ {
185
+ className: f(
186
+ "rounded-[var(--border-radius-md)] border p-4",
187
+ s,
188
+ n
189
+ ),
190
+ role: "alert",
191
+ ...o,
192
+ children: [
193
+ e && /* @__PURE__ */ t("p", { className: "mb-1 text-sm font-semibold", children: e }),
194
+ /* @__PURE__ */ t("div", { className: "text-sm leading-relaxed", children: a })
195
+ ]
196
+ }
197
+ );
198
+ }, U = ({
199
+ size: e = "md",
200
+ tone: r = "neutral",
201
+ className: a,
202
+ children: n,
203
+ ...o
204
+ }) => {
205
+ const s = {
206
+ neutral: "bg-[var(--bg-tertiary)] text-[var(--text-secondary)]",
207
+ primary: "bg-[var(--md-primary)] text-[var(--md-on-primary)]",
208
+ success: "bg-[var(--success-color)] text-white",
209
+ warning: "bg-[var(--warning-color)] text-white",
210
+ error: "bg-[var(--md-error)] text-[var(--md-on-error)]",
211
+ info: "bg-[var(--info-color)] text-white"
212
+ }[r];
213
+ return /* @__PURE__ */ t(
214
+ "span",
215
+ {
216
+ className: f(
217
+ "inline-flex items-center rounded-full font-medium leading-none",
218
+ s,
219
+ e === "sm" ? "px-2 py-0.5 text-[0.6875rem]" : "px-2.5 py-1 text-xs",
220
+ a
221
+ ),
222
+ ...o,
223
+ children: n
224
+ }
225
+ );
226
+ }, Y = ({
227
+ variant: e = "default",
228
+ padding: r = "md",
229
+ hoverable: a = !1,
123
230
  children: n,
124
231
  className: o = "",
125
232
  ...s
126
233
  }) => {
127
- const i = "relative overflow-hidden rounded-[var(--border-radius-lg)] transition-[var(--transition-all)]", d = {
234
+ const d = "relative overflow-hidden rounded-[var(--border-radius-lg)] transition-[var(--transition-all)]", v = {
128
235
  default: "bg-[var(--md-surface)] border border-[var(--md-outline-variant)] shadow-[var(--shadow-sm)]",
129
236
  elevated: "bg-[var(--md-surface)] border border-[var(--md-outline-variant)] shadow-[var(--shadow-lg)]",
130
237
  outlined: "bg-transparent border border-[var(--md-outline-variant)] shadow-none",
131
238
  flat: "bg-[var(--md-surface)] border-0 shadow-none"
132
- }, h = {
239
+ }, c = {
133
240
  none: "p-0",
134
241
  sm: "p-[var(--spacing-md)]",
135
242
  md: "p-[var(--spacing-lg)]",
136
243
  lg: "p-[var(--spacing-xl)]",
137
244
  xl: "p-[var(--spacing-2xl)]"
138
- }, c = r ? "hover:shadow-[var(--shadow-md)]" : "", l = [
245
+ }, i = a ? "hover:shadow-[var(--shadow-md)]" : "", l = [
246
+ d,
247
+ v[e],
248
+ c[r],
139
249
  i,
140
- d[t],
141
- h[a],
142
- c,
143
250
  o
144
251
  ].filter(Boolean).join(" ");
145
- return /* @__PURE__ */ e("div", { className: l, ...s, children: n });
146
- }, A = ({
147
- poweredByText: t = "Powered by",
148
- logoSrc: a,
149
- logoAlt: r = "Logo",
252
+ return /* @__PURE__ */ t("div", { className: l, ...s, children: n });
253
+ }, J = ({
254
+ label: e,
255
+ helperText: r,
256
+ className: a,
257
+ id: n,
258
+ ...o
259
+ }) => {
260
+ const s = n || `checkbox-${Math.random().toString(36).slice(2, 9)}`;
261
+ return /* @__PURE__ */ m("label", { className: f("inline-flex cursor-pointer items-start gap-2", a), htmlFor: s, children: [
262
+ /* @__PURE__ */ t(
263
+ "input",
264
+ {
265
+ className: "mt-0.5 h-4 w-4 rounded border-[var(--md-outline-variant)] bg-[var(--md-surface)] text-[var(--md-primary)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--border-color-focus)]",
266
+ id: s,
267
+ type: "checkbox",
268
+ ...o
269
+ }
270
+ ),
271
+ /* @__PURE__ */ m("span", { className: "grid gap-0.5", children: [
272
+ e && /* @__PURE__ */ t("span", { className: "text-sm text-[var(--text-primary)]", children: e }),
273
+ r && /* @__PURE__ */ t("span", { className: "text-xs text-[var(--text-muted)]", children: r })
274
+ ] })
275
+ ] });
276
+ }, L = ({
277
+ selected: e = !1,
278
+ className: r,
279
+ children: a,
280
+ ...n
281
+ }) => /* @__PURE__ */ t(
282
+ "button",
283
+ {
284
+ className: f(
285
+ "inline-flex items-center rounded-full border px-3 py-1.5 text-sm transition",
286
+ e ? "border-[var(--md-primary)] bg-[color:color-mix(in_srgb,var(--md-primary)_16%,transparent)] text-[var(--md-on-surface)]" : "border-[var(--border-color)] bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]",
287
+ r
288
+ ),
289
+ type: "button",
290
+ ...n,
291
+ children: a
292
+ }
293
+ ), Q = ({
294
+ orientation: e = "horizontal",
295
+ className: r,
296
+ ...a
297
+ }) => /* @__PURE__ */ t(
298
+ "div",
299
+ {
300
+ className: f(
301
+ "bg-[var(--border-color)]",
302
+ e === "horizontal" ? "h-px w-full" : "h-full w-px",
303
+ r
304
+ ),
305
+ role: "separator",
306
+ ...a
307
+ }
308
+ ), X = ({
309
+ icon: e,
310
+ title: r,
311
+ description: a,
312
+ action: n,
313
+ className: o,
314
+ ...s
315
+ }) => /* @__PURE__ */ m(
316
+ "div",
317
+ {
318
+ className: f(
319
+ "grid justify-items-center gap-3 rounded-[var(--border-radius-lg)] border border-dashed border-[var(--border-color)] bg-[var(--bg-secondary)] p-6 text-center",
320
+ o
321
+ ),
322
+ ...s,
323
+ children: [
324
+ e && /* @__PURE__ */ t("div", { className: "text-[var(--text-muted)]", children: e }),
325
+ /* @__PURE__ */ t("h3", { className: "m-0 text-lg font-semibold text-[var(--text-primary)]", children: r }),
326
+ a && /* @__PURE__ */ t("p", { className: "m-0 max-w-[30rem] text-sm text-[var(--text-secondary)]", children: a }),
327
+ n && /* @__PURE__ */ t("div", { className: "mt-1", children: n })
328
+ ]
329
+ }
330
+ ), Z = ({
331
+ poweredByText: e = "Powered by",
332
+ logoSrc: r,
333
+ logoAlt: a = "Logo",
150
334
  logoFallbackText: n,
151
335
  className: o = ""
152
336
  }) => {
153
- const [s, i] = z(!0);
154
- return /* @__PURE__ */ e(
337
+ const [s, d] = N(!0);
338
+ return /* @__PURE__ */ t(
155
339
  "footer",
156
340
  {
157
341
  className: [
158
342
  "relative z-[1] flex w-full shrink-0 items-center justify-center border-t border-[var(--border-color)] bg-[var(--bg-secondary)] px-[var(--spacing-2xl)] py-[var(--spacing-lg)]",
159
343
  o
160
344
  ].filter(Boolean).join(" "),
161
- children: /* @__PURE__ */ v("div", { className: "flex items-center gap-[var(--spacing-md)]", children: [
162
- t && /* @__PURE__ */ e("span", { className: "text-[0.95rem] font-normal text-[var(--text-secondary)]", children: t }),
163
- (a || n) && /* @__PURE__ */ v("div", { className: "flex items-center", children: [
164
- a && s && /* @__PURE__ */ e(
345
+ children: /* @__PURE__ */ m("div", { className: "flex items-center gap-[var(--spacing-md)]", children: [
346
+ e && /* @__PURE__ */ t("span", { className: "text-[0.95rem] font-normal text-[var(--text-secondary)]", children: e }),
347
+ (r || n) && /* @__PURE__ */ m("div", { className: "flex items-center", children: [
348
+ r && s && /* @__PURE__ */ t(
165
349
  "img",
166
350
  {
167
- alt: r,
351
+ alt: a,
168
352
  className: "h-6 w-auto object-contain",
169
- onError: (d) => {
170
- i(!1);
353
+ onError: (v) => {
354
+ d(!1);
171
355
  },
172
- src: a,
356
+ src: r,
173
357
  style: {
174
358
  filter: "brightness(0)"
175
359
  }
176
360
  }
177
361
  ),
178
- n && /* @__PURE__ */ e(
362
+ n && /* @__PURE__ */ t(
179
363
  "span",
180
364
  {
181
365
  className: "flex items-center text-base font-bold tracking-[0.1em] text-[var(--md-primary)]",
182
366
  style: {
183
- display: a && s ? "none" : "flex",
367
+ display: r && s ? "none" : "flex",
184
368
  fontFamily: '"Orbitron", sans-serif'
185
369
  },
186
370
  children: n
@@ -190,83 +374,83 @@ const W = ({
190
374
  ] })
191
375
  }
192
376
  );
193
- }, k = () => typeof document > "u" ? "light" : document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : "light", V = ({
194
- logoSrc: t,
195
- logoDarkSrc: a,
196
- logoAlt: r = "Logo",
377
+ }, $ = () => typeof document > "u" ? "light" : document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : "light", ee = ({
378
+ logoSrc: e,
379
+ logoDarkSrc: r,
380
+ logoAlt: a = "Logo",
197
381
  title: n,
198
382
  subtitle: o,
199
383
  theme: s,
200
- onLogoClick: i,
201
- rightContent: d,
202
- className: h = ""
384
+ onLogoClick: d,
385
+ rightContent: v,
386
+ className: c = ""
203
387
  }) => {
204
- const [c, l] = z(!1), [f, m] = z(
205
- () => s ?? k()
206
- ), x = f === "dark" && a ? a : t;
207
- b(() => {
208
- const u = () => l(window.scrollY > 10);
209
- return window.addEventListener("scroll", u, { passive: !0 }), () => window.removeEventListener("scroll", u);
210
- }, []), b(() => {
388
+ const [i, l] = N(!1), [u, h] = N(
389
+ () => s ?? $()
390
+ ), b = u === "dark" && r ? r : e;
391
+ w(() => {
392
+ const x = () => l(window.scrollY > 10);
393
+ return window.addEventListener("scroll", x, { passive: !0 }), () => window.removeEventListener("scroll", x);
394
+ }, []), w(() => {
211
395
  if (s) {
212
- m(s);
396
+ h(s);
213
397
  return;
214
398
  }
215
- const u = () => m(k());
216
- if (u(), typeof MutationObserver > "u")
399
+ const x = () => h($());
400
+ if (x(), typeof MutationObserver > "u")
217
401
  return;
218
- const g = new MutationObserver(u);
219
- return g.observe(document.documentElement, {
402
+ const p = new MutationObserver(x);
403
+ return p.observe(document.documentElement, {
220
404
  attributes: !0,
221
405
  attributeFilter: ["data-theme"]
222
- }), () => g.disconnect();
406
+ }), () => p.disconnect();
223
407
  }, [s]);
224
- const p = () => i?.(), N = (u) => {
225
- u.key === "Enter" && i?.();
408
+ const g = () => d == null ? void 0 : d(), y = (x) => {
409
+ x.key === "Enter" && (d == null || d());
226
410
  };
227
- return /* @__PURE__ */ v(
411
+ return /* @__PURE__ */ m(
228
412
  "header",
229
413
  {
230
414
  className: [
231
415
  "fixed inset-x-0 top-0 z-[1000] w-full backdrop-blur-[12px]",
232
- h
416
+ c
233
417
  ].filter(Boolean).join(" "),
234
418
  children: [
235
- /* @__PURE__ */ e("div", { className: "h-0.5 w-full bg-[var(--md-primary)]" }),
236
- /* @__PURE__ */ v(
419
+ /* @__PURE__ */ t("div", { className: "h-0.5 w-full bg-[var(--md-primary)]" }),
420
+ /* @__PURE__ */ m(
237
421
  "div",
238
422
  {
239
423
  className: "flex items-center justify-between px-6 py-2 shadow-[var(--shadow-sm)] max-md:flex-col max-md:gap-3 max-md:px-4 max-md:py-3",
240
424
  style: {
241
425
  color: "var(--md-on-surface)",
242
- background: `color-mix(in srgb, var(--md-surface) ${c ? "14%" : "18%"}, transparent)`,
243
- borderBottom: `1px solid color-mix(in srgb, var(--md-outline-variant) ${c ? "22%" : "30%"}, transparent)`
426
+ background: `color-mix(in srgb, var(--md-surface) ${i ? "14%" : "18%"}, transparent)`,
427
+ borderBottom: `1px solid color-mix(in srgb, var(--md-outline-variant) ${i ? "22%" : "30%"}, transparent)`
244
428
  },
245
429
  children: [
246
- /* @__PURE__ */ v(
430
+ /* @__PURE__ */ m(
247
431
  "div",
248
432
  {
249
433
  className: "flex cursor-pointer items-center gap-3 transition-opacity duration-200 ease-in-out hover:opacity-80",
250
- onClick: i ? p : void 0,
251
- onKeyDown: i ? N : void 0,
252
- role: i ? "button" : void 0,
253
- tabIndex: i ? 0 : void 0,
434
+ onClick: d ? g : void 0,
435
+ onKeyDown: d ? y : void 0,
436
+ role: d ? "button" : void 0,
437
+ tabIndex: d ? 0 : void 0,
254
438
  children: [
255
- x && /* @__PURE__ */ v("div", { className: "flex h-16 w-16 shrink-0 items-center justify-center", children: [
256
- /* @__PURE__ */ e(
439
+ b && /* @__PURE__ */ m("div", { className: "flex h-16 w-16 shrink-0 items-center justify-center", children: [
440
+ /* @__PURE__ */ t(
257
441
  "img",
258
442
  {
259
- alt: r,
443
+ alt: a,
260
444
  className: "h-full w-full object-contain",
261
- onError: (u) => {
262
- u.target.style.display = "none";
263
- const g = u.target.nextElementSibling;
264
- g && (g.style.display = "block");
445
+ onError: (x) => {
446
+ x.target.style.display = "none";
447
+ const p = x.target.nextElementSibling;
448
+ p && (p.style.display = "block");
265
449
  },
266
- src: x
450
+ src: b
267
451
  }
268
452
  ),
269
- /* @__PURE__ */ v(
453
+ /* @__PURE__ */ m(
270
454
  "svg",
271
455
  {
272
456
  className: "hidden h-full w-full",
@@ -275,14 +459,14 @@ const W = ({
275
459
  strokeWidth: "2",
276
460
  viewBox: "0 0 24 24",
277
461
  children: [
278
- /* @__PURE__ */ e("path", { d: "M12 2L2 7l10 5 10-5-10-5z" }),
279
- /* @__PURE__ */ e("path", { d: "M2 17l10 5 10-5M2 12l10 5 10-5" })
462
+ /* @__PURE__ */ t("path", { d: "M12 2L2 7l10 5 10-5-10-5z" }),
463
+ /* @__PURE__ */ t("path", { d: "M2 17l10 5 10-5M2 12l10 5 10-5" })
280
464
  ]
281
465
  }
282
466
  )
283
467
  ] }),
284
- (n || o) && /* @__PURE__ */ v("div", { className: "flex flex-col gap-1", children: [
285
- n && /* @__PURE__ */ e(
468
+ (n || o) && /* @__PURE__ */ m("div", { className: "flex flex-col gap-1", children: [
469
+ n && /* @__PURE__ */ t(
286
470
  "h1",
287
471
  {
288
472
  className: "m-0 inline-flex items-baseline text-[1.375rem] font-bold leading-[1.2] tracking-[0.05em] text-[var(--md-on-surface)] max-md:text-xl",
@@ -290,106 +474,172 @@ const W = ({
290
474
  children: n
291
475
  }
292
476
  ),
293
- o && /* @__PURE__ */ e("p", { className: "m-0 text-[0.8125rem] font-normal text-[var(--md-on-surface-variant)] max-md:text-xs", children: o })
477
+ o && /* @__PURE__ */ t("p", { className: "m-0 text-[0.8125rem] font-normal text-[var(--md-on-surface-variant)] max-md:text-xs", children: o })
294
478
  ] })
295
479
  ]
296
480
  }
297
481
  ),
298
- d && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-3 max-md:w-full max-md:flex-wrap max-md:justify-between", children: d })
482
+ v && /* @__PURE__ */ t("div", { className: "flex shrink-0 items-center gap-3 max-md:w-full max-md:flex-wrap max-md:justify-between", children: v })
299
483
  ]
300
484
  }
301
485
  )
302
486
  ]
303
487
  }
304
488
  );
305
- }, K = ({
306
- label: t,
307
- error: a,
308
- helperText: r,
489
+ }, re = ({
490
+ label: e,
491
+ error: r,
492
+ helperText: a,
309
493
  leftIcon: n,
310
494
  rightIcon: o,
311
495
  fullWidth: s = !1,
312
- size: i = "md",
313
- className: d = "",
314
- id: h,
315
- ...c
496
+ size: d = "md",
497
+ className: v = "",
498
+ id: c,
499
+ ...i
316
500
  }) => {
317
- const l = h || `input-${Math.random().toString(36).substring(2, 9)}`, f = !!a, x = [
501
+ const l = c || `input-${Math.random().toString(36).substring(2, 9)}`, u = !!r, b = [
318
502
  "w-full rounded-[var(--border-radius-md)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] font-inherit text-[var(--md-on-surface)] outline-none transition-[var(--transition-all)] placeholder:text-[var(--md-on-surface-variant)] placeholder:opacity-70 hover:not-disabled:not-focus:border-[var(--border-color-hover)] focus:border-[var(--border-color-focus)] focus:[box-shadow:0_0_0_0.1875rem_rgba(47,93,140,0.15)] disabled:cursor-not-allowed disabled:bg-[var(--md-surface-container-high)] disabled:opacity-60",
319
- f ? "border-[var(--md-error)] focus:border-[var(--md-error)] focus:[box-shadow:0_0_0_0.1875rem_rgba(186,26,26,0.2)]" : "",
503
+ u ? "border-[var(--md-error)] focus:border-[var(--md-error)] focus:[box-shadow:0_0_0_0.1875rem_rgba(186,26,26,0.2)]" : "",
320
504
  n ? "pl-10" : "",
321
505
  o ? "pr-10" : "",
322
506
  {
323
507
  sm: "min-h-8 px-[var(--spacing-md)] py-[var(--spacing-sm)] text-[var(--font-size-sm)]",
324
508
  md: "min-h-10 px-[var(--spacing-lg)] py-[var(--spacing-md)] text-[var(--font-size-base)]",
325
509
  lg: "min-h-12 px-[var(--spacing-xl)] py-[var(--spacing-lg)] text-[var(--font-size-lg)]"
326
- }[i],
327
- d
510
+ }[d],
511
+ v
328
512
  ].filter(Boolean).join(" ");
329
- return /* @__PURE__ */ v("div", { className: `flex flex-col gap-[var(--spacing-xs)] ${s ? "w-full" : ""}`, children: [
330
- t && /* @__PURE__ */ e(
513
+ return /* @__PURE__ */ m("div", { className: `flex flex-col gap-[var(--spacing-xs)] ${s ? "w-full" : ""}`, children: [
514
+ e && /* @__PURE__ */ t(
331
515
  "label",
332
516
  {
333
517
  className: "text-[var(--font-size-sm)] font-[var(--font-weight-semibold)] text-[var(--md-on-surface)]",
334
518
  htmlFor: l,
335
- children: t
519
+ children: e
336
520
  }
337
521
  ),
338
- /* @__PURE__ */ v("div", { className: "group relative flex w-full items-center", children: [
339
- n && /* @__PURE__ */ e("span", { className: "pointer-events-none absolute left-[var(--spacing-md)] z-[1] flex items-center justify-center text-[var(--md-on-surface-variant)] group-focus-within:text-[var(--md-primary)] [&_svg]:h-[1.125rem] [&_svg]:w-[1.125rem]", children: n }),
340
- /* @__PURE__ */ e(
522
+ /* @__PURE__ */ m("div", { className: "group relative flex w-full items-center", children: [
523
+ n && /* @__PURE__ */ t("span", { className: "pointer-events-none absolute left-[var(--spacing-md)] z-[1] flex items-center justify-center text-[var(--md-on-surface-variant)] group-focus-within:text-[var(--md-primary)] [&_svg]:h-[1.125rem] [&_svg]:w-[1.125rem]", children: n }),
524
+ /* @__PURE__ */ t(
341
525
  "input",
342
526
  {
343
- "aria-describedby": a ? `${l}-error` : r ? `${l}-helper` : void 0,
344
- "aria-invalid": f ? !0 : void 0,
345
- className: x,
527
+ "aria-describedby": r ? `${l}-error` : a ? `${l}-helper` : void 0,
528
+ "aria-invalid": u ? !0 : void 0,
529
+ className: b,
346
530
  id: l,
347
- ...c
531
+ ...i
348
532
  }
349
533
  ),
350
- o && /* @__PURE__ */ e("span", { className: "pointer-events-none absolute right-[var(--spacing-md)] z-[1] flex items-center justify-center text-[var(--md-on-surface-variant)] group-focus-within:text-[var(--md-primary)] [&_svg]:h-[1.125rem] [&_svg]:w-[1.125rem]", children: o })
534
+ o && /* @__PURE__ */ t("span", { className: "pointer-events-none absolute right-[var(--spacing-md)] z-[1] flex items-center justify-center text-[var(--md-on-surface-variant)] group-focus-within:text-[var(--md-primary)] [&_svg]:h-[1.125rem] [&_svg]:w-[1.125rem]", children: o })
351
535
  ] }),
352
- a && /* @__PURE__ */ e(
536
+ r && /* @__PURE__ */ t(
353
537
  "span",
354
538
  {
355
539
  className: "mt-[var(--spacing-xs)] block text-[var(--font-size-xs)] text-[var(--md-error)]",
356
540
  id: `${l}-error`,
357
541
  role: "alert",
358
- children: a
542
+ children: r
359
543
  }
360
544
  ),
361
- r && !a && /* @__PURE__ */ e(
545
+ a && !r && /* @__PURE__ */ t(
362
546
  "span",
363
547
  {
364
548
  className: "mt-[var(--spacing-xs)] block text-[var(--font-size-xs)] text-[var(--md-on-surface-variant)]",
365
549
  id: `${l}-helper`,
366
- children: r
550
+ children: a
367
551
  }
368
552
  )
369
553
  ] });
370
- }, R = ({
371
- isOpen: t,
372
- onClose: a,
373
- title: r,
554
+ }, ae = ({
555
+ size: e = "lg",
556
+ className: r,
557
+ ...a
558
+ }) => {
559
+ const n = {
560
+ sm: "max-w-2xl",
561
+ md: "max-w-4xl",
562
+ lg: "max-w-6xl",
563
+ xl: "max-w-7xl",
564
+ full: "max-w-none"
565
+ }[e];
566
+ return /* @__PURE__ */ t("div", { className: f("mx-auto w-full px-4", n, r), ...a });
567
+ }, te = ({
568
+ gap: e = "md",
569
+ className: r,
570
+ ...a
571
+ }) => {
572
+ const n = {
573
+ xs: "gap-1",
574
+ sm: "gap-2",
575
+ md: "gap-3",
576
+ lg: "gap-4",
577
+ xl: "gap-6"
578
+ }[e];
579
+ return /* @__PURE__ */ t("div", { className: f("flex flex-col", n, r), ...a });
580
+ }, oe = ({
581
+ cols: e = 2,
582
+ gap: r = "md",
583
+ className: a,
584
+ ...n
585
+ }) => {
586
+ const o = {
587
+ 1: "grid-cols-1",
588
+ 2: "grid-cols-2",
589
+ 3: "grid-cols-3",
590
+ 4: "grid-cols-4"
591
+ }[e], s = {
592
+ xs: "gap-1",
593
+ sm: "gap-2",
594
+ md: "gap-3",
595
+ lg: "gap-4",
596
+ xl: "gap-6"
597
+ }[r];
598
+ return /* @__PURE__ */ t("div", { className: f("grid", o, s, a), ...n });
599
+ }, ne = ({
600
+ isOpen: e,
601
+ onClose: r,
602
+ title: a,
374
603
  subtitle: n,
375
604
  children: o,
376
605
  size: s = "md",
377
- showCloseButton: i = !0,
378
- closeOnOverlayClick: d = !0,
379
- className: h = ""
606
+ showCloseButton: d = !0,
607
+ closeOnOverlayClick: v = !0,
608
+ className: c = ""
380
609
  }) => {
381
- if (b(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
382
- document.body.style.overflow = "";
383
- }), [t]), b(() => {
384
- const m = (x) => {
385
- x.key === "Escape" && t && a();
610
+ const i = z(null), l = z(null);
611
+ if (w(() => (e ? (l.current = document.activeElement, document.body.style.overflow = "hidden") : document.body.style.overflow = "", () => {
612
+ document.body.style.overflow = "", l.current && l.current.focus();
613
+ }), [e]), w(() => {
614
+ const g = (x) => {
615
+ x.key === "Escape" && e && r();
616
+ }, y = (x) => {
617
+ if (x.key !== "Tab" || !i.current || !e)
618
+ return;
619
+ const p = i.current.querySelectorAll(
620
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
621
+ );
622
+ if (p.length === 0) {
623
+ x.preventDefault();
624
+ return;
625
+ }
626
+ const k = p[0], C = p[p.length - 1], j = document.activeElement;
627
+ x.shiftKey && j === k ? (x.preventDefault(), C.focus()) : !x.shiftKey && j === C && (x.preventDefault(), k.focus());
628
+ };
629
+ return e && (document.addEventListener("keydown", g), document.addEventListener("keydown", y), requestAnimationFrame(() => {
630
+ var p;
631
+ const x = ((p = i.current) == null ? void 0 : p.querySelector(
632
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
633
+ )) ?? i.current;
634
+ x == null || x.focus();
635
+ })), () => {
636
+ document.removeEventListener("keydown", g), document.removeEventListener("keydown", y);
386
637
  };
387
- return t && document.addEventListener("keydown", m), () => document.removeEventListener("keydown", m);
388
- }, [t, a]), !t)
638
+ }, [e, r]), !e)
389
639
  return null;
390
- const c = (m) => {
391
- d && m.target === m.currentTarget && a();
392
- }, f = [
640
+ const u = (g) => {
641
+ v && g.target === g.currentTarget && r();
642
+ }, b = [
393
643
  "relative z-[var(--z-index-modal)] m-auto flex w-full max-h-[90vh] max-w-full flex-col overflow-hidden rounded-[var(--border-radius-2xl)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] shadow-[var(--shadow-2xl)]",
394
644
  {
395
645
  sm: "max-w-[25rem]",
@@ -398,37 +648,37 @@ const W = ({
398
648
  xl: "max-w-[56.25rem]",
399
649
  full: "max-h-[90vh] max-w-[90vw]"
400
650
  }[s],
401
- h
651
+ c
402
652
  ].filter(Boolean).join(" ");
403
- return /* @__PURE__ */ e(
653
+ return /* @__PURE__ */ t(
404
654
  "div",
405
655
  {
406
- "aria-labelledby": r ? "modal-title" : void 0,
656
+ "aria-labelledby": a ? "modal-title" : void 0,
407
657
  "aria-modal": "true",
408
658
  className: "fixed inset-0 z-[var(--z-index-modal-backdrop)] flex min-h-[100dvh] items-center justify-center overflow-y-auto bg-black/50 p-[var(--spacing-lg)] backdrop-blur-[8px]",
409
- onClick: c,
659
+ onClick: u,
410
660
  role: "dialog",
411
- children: /* @__PURE__ */ v("div", { className: f, children: [
412
- (r || n || i) && /* @__PURE__ */ v("div", { className: "flex shrink-0 items-start justify-between gap-[var(--spacing-lg)] border-b border-[var(--md-outline-variant)] p-[var(--spacing-2xl)]", children: [
413
- (r || n) && /* @__PURE__ */ v("div", { className: "flex-1", children: [
414
- r && /* @__PURE__ */ e(
661
+ children: /* @__PURE__ */ m("div", { className: b, ref: i, tabIndex: -1, children: [
662
+ (a || n || d) && /* @__PURE__ */ m("div", { className: "flex shrink-0 items-start justify-between gap-[var(--spacing-lg)] border-b border-[var(--md-outline-variant)] p-[var(--spacing-2xl)]", children: [
663
+ (a || n) && /* @__PURE__ */ m("div", { className: "flex-1", children: [
664
+ a && /* @__PURE__ */ t(
415
665
  "h2",
416
666
  {
417
667
  className: "mb-[var(--spacing-xs)] mt-0 text-[var(--font-size-2xl)] font-[var(--font-weight-semibold)] leading-[var(--line-height-tight)] text-[var(--md-on-surface)]",
418
668
  id: "modal-title",
419
- children: r
669
+ children: a
420
670
  }
421
671
  ),
422
- n && /* @__PURE__ */ e("p", { className: "m-0 text-[var(--font-size-base)] leading-[var(--line-height-normal)] text-[var(--md-on-surface-variant)]", children: n })
672
+ n && /* @__PURE__ */ t("p", { className: "m-0 text-[var(--font-size-base)] leading-[var(--line-height-normal)] text-[var(--md-on-surface-variant)]", children: n })
423
673
  ] }),
424
- i && /* @__PURE__ */ e(
674
+ d && /* @__PURE__ */ t(
425
675
  "button",
426
676
  {
427
677
  "aria-label": "Fechar modal",
428
678
  className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-[var(--border-radius-md)] border-0 bg-[var(--md-surface-container-high)] text-[var(--md-on-surface)] transition-[var(--transition-all)] hover:bg-[color:color-mix(in_srgb,var(--md-error)_15%,var(--md-surface))] hover:text-[var(--md-error)]",
429
- onClick: a,
679
+ onClick: r,
430
680
  type: "button",
431
- children: /* @__PURE__ */ v(
681
+ children: /* @__PURE__ */ m(
432
682
  "svg",
433
683
  {
434
684
  fill: "none",
@@ -437,99 +687,581 @@ const W = ({
437
687
  strokeWidth: "2",
438
688
  viewBox: "0 0 24 24",
439
689
  children: [
440
- /* @__PURE__ */ e("line", { x1: "18", x2: "6", y1: "6", y2: "18" }),
441
- /* @__PURE__ */ e("line", { x1: "6", x2: "18", y1: "6", y2: "18" })
690
+ /* @__PURE__ */ t("line", { x1: "18", x2: "6", y1: "6", y2: "18" }),
691
+ /* @__PURE__ */ t("line", { x1: "6", x2: "18", y1: "6", y2: "18" })
442
692
  ]
443
693
  }
444
694
  )
445
695
  }
446
696
  )
447
697
  ] }),
448
- /* @__PURE__ */ e("div", { className: "flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto p-[var(--spacing-2xl)]", children: o })
698
+ /* @__PURE__ */ t("div", { className: "flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto p-[var(--spacing-2xl)]", children: o })
449
699
  ] })
450
700
  }
451
701
  );
452
- }, D = ({
453
- as: t = "p",
454
- size: a = "md",
455
- weight: r = "normal",
702
+ }, se = ({ className: e, ...r }) => /* @__PURE__ */ t(
703
+ "aside",
704
+ {
705
+ className: f(
706
+ "h-full rounded-[var(--border-radius-lg)] border border-[var(--border-color)] bg-[var(--bg-secondary)] p-4",
707
+ e
708
+ ),
709
+ ...r
710
+ }
711
+ ), ie = ({ className: e, ...r }) => /* @__PURE__ */ t(
712
+ "header",
713
+ {
714
+ className: f(
715
+ "flex min-h-14 items-center justify-between border-b border-[var(--border-color)] bg-[var(--bg-secondary)] px-4",
716
+ e
717
+ ),
718
+ ...r
719
+ }
720
+ ), le = ({
721
+ currentPage: e,
722
+ totalPages: r,
723
+ onPageChange: a
724
+ }) => {
725
+ if (r <= 1)
726
+ return null;
727
+ const n = Array.from({ length: r }, (o, s) => s + 1);
728
+ return /* @__PURE__ */ m("nav", { "aria-label": "Paginação", className: "flex flex-wrap items-center gap-1", children: [
729
+ /* @__PURE__ */ t(
730
+ "button",
731
+ {
732
+ className: "rounded-[var(--border-radius-sm)] border border-[var(--border-color)] px-2 py-1 text-sm disabled:opacity-50",
733
+ disabled: e === 1,
734
+ onClick: () => a(Math.max(e - 1, 1)),
735
+ type: "button",
736
+ children: "Anterior"
737
+ }
738
+ ),
739
+ n.map((o) => /* @__PURE__ */ t(
740
+ "button",
741
+ {
742
+ className: f(
743
+ "rounded-[var(--border-radius-sm)] border px-2.5 py-1 text-sm",
744
+ o === e ? "border-[var(--md-primary)] bg-[var(--md-primary)] text-[var(--md-on-primary)]" : "border-[var(--border-color)] bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]"
745
+ ),
746
+ onClick: () => a(o),
747
+ type: "button",
748
+ children: o
749
+ },
750
+ o
751
+ )),
752
+ /* @__PURE__ */ t(
753
+ "button",
754
+ {
755
+ className: "rounded-[var(--border-radius-sm)] border border-[var(--border-color)] px-2 py-1 text-sm disabled:opacity-50",
756
+ disabled: e === r,
757
+ onClick: () => a(Math.min(e + 1, r)),
758
+ type: "button",
759
+ children: "Próxima"
760
+ }
761
+ )
762
+ ] });
763
+ }, de = ({
764
+ as: e = "p",
765
+ size: r = "md",
766
+ weight: a = "normal",
456
767
  align: n = "left",
457
768
  muted: o = !1,
458
769
  italic: s = !1,
459
- children: i,
460
- className: d = "",
461
- ...h
770
+ children: d,
771
+ className: v = "",
772
+ ...c
462
773
  }) => {
463
- const c = t, l = {
774
+ const i = e, l = {
464
775
  xs: "text-[var(--font-size-xs)] leading-[var(--line-height-normal)]",
465
776
  sm: "text-[var(--font-size-sm)] leading-[var(--line-height-normal)]",
466
777
  md: "text-[var(--font-size-base)] leading-[var(--line-height-relaxed)]",
467
778
  lg: "text-[var(--font-size-lg)] leading-[var(--line-height-loose)]"
468
- }, f = {
779
+ }, u = {
469
780
  light: "font-[var(--font-weight-light)]",
470
781
  normal: "font-[var(--font-weight-normal)]",
471
782
  medium: "font-[var(--font-weight-medium)]"
472
- }, m = {
783
+ }, h = {
473
784
  left: "text-left",
474
785
  center: "text-center",
475
786
  right: "text-right",
476
787
  justify: "text-justify"
477
- }, x = [
788
+ }, b = [
478
789
  "m-0 text-[var(--text-primary)] transition-[var(--transition-colors)]",
479
- l[a],
480
- f[r],
481
- m[n],
790
+ l[r],
791
+ u[a],
792
+ h[n],
482
793
  s ? "italic" : "not-italic",
483
794
  o ? "text-[var(--text-muted)]" : "",
484
- d
795
+ v
485
796
  ].filter(Boolean).join(" ");
486
- return /* @__PURE__ */ e(c, { className: x, ...h, children: i });
487
- }, H = ({
488
- as: t = "p",
489
- size: a = "md",
490
- weight: r = "normal",
797
+ return /* @__PURE__ */ t(i, { className: b, ...c, children: d });
798
+ }, ce = ({
799
+ title: e,
800
+ subtitle: r,
801
+ actions: a,
802
+ className: n,
803
+ ...o
804
+ }) => /* @__PURE__ */ t(
805
+ "header",
806
+ {
807
+ className: f(
808
+ "grid gap-3 rounded-[var(--border-radius-lg)] border border-[var(--border-color)] bg-[var(--bg-secondary)] p-5 shadow-[var(--shadow-sm)]",
809
+ n
810
+ ),
811
+ ...o,
812
+ children: /* @__PURE__ */ m("div", { className: "flex items-start justify-between gap-4", children: [
813
+ /* @__PURE__ */ m("div", { className: "grid gap-1", children: [
814
+ /* @__PURE__ */ t("h1", { className: "m-0 text-2xl font-bold text-[var(--text-primary)]", children: e }),
815
+ r && /* @__PURE__ */ t("p", { className: "m-0 text-sm text-[var(--text-secondary)]", children: r })
816
+ ] }),
817
+ a && /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: a })
818
+ ] })
819
+ }
820
+ ), me = ({
821
+ children: e,
822
+ content: r,
823
+ defaultOpen: a = !1
824
+ }) => {
825
+ const [n, o] = N(a), s = z(null), d = z(null), v = z(null), c = B();
826
+ return w(() => {
827
+ const i = (l) => {
828
+ var u;
829
+ (u = s.current) != null && u.contains(l.target) || o(!1);
830
+ };
831
+ return document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
832
+ }, []), w(() => {
833
+ if (!n || !v.current)
834
+ return;
835
+ const i = v.current.querySelector(
836
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
837
+ );
838
+ i == null || i.focus();
839
+ }, [n]), w(() => {
840
+ const i = (l) => {
841
+ var u;
842
+ l.key === "Escape" && (o(!1), (u = d.current) == null || u.focus());
843
+ };
844
+ return n && document.addEventListener("keydown", i), () => document.removeEventListener("keydown", i);
845
+ }, [n]), /* @__PURE__ */ m("div", { className: "relative inline-flex", ref: s, children: [
846
+ /* @__PURE__ */ t(
847
+ "button",
848
+ {
849
+ "aria-controls": n ? c : void 0,
850
+ "aria-expanded": n,
851
+ "aria-haspopup": "dialog",
852
+ className: "inline-flex",
853
+ onClick: () => o((i) => !i),
854
+ ref: d,
855
+ type: "button",
856
+ children: e
857
+ }
858
+ ),
859
+ n && /* @__PURE__ */ t(
860
+ "div",
861
+ {
862
+ className: f(
863
+ "absolute left-1/2 top-full z-30 mt-2 w-max -translate-x-1/2 rounded-[var(--border-radius-md)] border border-[var(--border-color)] bg-[var(--bg-secondary)] p-3 shadow-[var(--shadow-md)]"
864
+ ),
865
+ id: c,
866
+ ref: v,
867
+ role: "dialog",
868
+ tabIndex: -1,
869
+ children: r
870
+ }
871
+ )
872
+ ] });
873
+ }, ve = ({
874
+ label: e,
875
+ helperText: r,
876
+ className: a,
877
+ id: n,
878
+ ...o
879
+ }) => {
880
+ const s = n || `radio-${Math.random().toString(36).slice(2, 9)}`;
881
+ return /* @__PURE__ */ m("label", { className: f("inline-flex cursor-pointer items-start gap-2", a), htmlFor: s, children: [
882
+ /* @__PURE__ */ t(
883
+ "input",
884
+ {
885
+ className: "mt-0.5 h-4 w-4 border-[var(--md-outline-variant)] bg-[var(--md-surface)] text-[var(--md-primary)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--border-color-focus)]",
886
+ id: s,
887
+ type: "radio",
888
+ ...o
889
+ }
890
+ ),
891
+ /* @__PURE__ */ m("span", { className: "grid gap-0.5", children: [
892
+ e && /* @__PURE__ */ t("span", { className: "text-sm text-[var(--text-primary)]", children: e }),
893
+ r && /* @__PURE__ */ t("span", { className: "text-xs text-[var(--text-muted)]", children: r })
894
+ ] })
895
+ ] });
896
+ }, ue = ({
897
+ title: e,
898
+ subtitle: r,
899
+ actions: a,
900
+ className: n,
901
+ ...o
902
+ }) => /* @__PURE__ */ m("div", { className: f("flex items-start justify-between gap-4", n), ...o, children: [
903
+ /* @__PURE__ */ m("div", { className: "grid gap-1", children: [
904
+ /* @__PURE__ */ t("h2", { className: "m-0 text-xl font-semibold text-[var(--text-primary)]", children: e }),
905
+ r && /* @__PURE__ */ t("p", { className: "m-0 text-sm text-[var(--text-secondary)]", children: r })
906
+ ] }),
907
+ a && /* @__PURE__ */ t("div", { className: "flex shrink-0 items-center gap-2", children: a })
908
+ ] }), fe = ({
909
+ label: e,
910
+ helperText: r,
911
+ error: a,
912
+ options: n,
913
+ size: o = "md",
914
+ className: s,
915
+ id: d,
916
+ ...v
917
+ }) => {
918
+ const c = d || `select-${Math.random().toString(36).slice(2, 9)}`, i = {
919
+ sm: "min-h-8 px-3 py-1.5 text-sm",
920
+ md: "min-h-10 px-3.5 py-2 text-base",
921
+ lg: "min-h-12 px-4 py-3 text-lg"
922
+ }[o];
923
+ return /* @__PURE__ */ m("div", { className: "grid gap-1", children: [
924
+ e && /* @__PURE__ */ t(
925
+ "label",
926
+ {
927
+ className: "text-[var(--font-size-sm)] font-[var(--font-weight-semibold)] text-[var(--md-on-surface)]",
928
+ htmlFor: c,
929
+ children: e
930
+ }
931
+ ),
932
+ /* @__PURE__ */ t(
933
+ "select",
934
+ {
935
+ className: f(
936
+ "w-full rounded-[var(--border-radius-md)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] text-[var(--md-on-surface)] outline-none transition focus:border-[var(--border-color-focus)] focus:[box-shadow:0_0_0_0.1875rem_rgba(47,93,140,0.15)]",
937
+ a ? "border-[var(--md-error)]" : "",
938
+ i,
939
+ s
940
+ ),
941
+ id: c,
942
+ ...v,
943
+ children: n.map((l) => /* @__PURE__ */ t("option", { value: l.value, children: l.label }, l.value))
944
+ }
945
+ ),
946
+ a ? /* @__PURE__ */ t("span", { className: "text-xs text-[var(--md-error)]", children: a }) : r && /* @__PURE__ */ t("span", { className: "text-xs text-[var(--md-on-surface-variant)]", children: r })
947
+ ] });
948
+ }, xe = ({
949
+ circle: e = !1,
950
+ width: r,
951
+ height: a,
952
+ className: n,
953
+ style: o,
954
+ ...s
955
+ }) => /* @__PURE__ */ t(
956
+ "div",
957
+ {
958
+ className: f(
959
+ "animate-pulse bg-[var(--md-surface-container-high)]",
960
+ e ? "rounded-full" : "rounded-[var(--border-radius-sm)]",
961
+ n
962
+ ),
963
+ style: { width: r, height: a, ...o },
964
+ ...s
965
+ }
966
+ ), be = ({
967
+ as: e = "p",
968
+ size: r = "md",
969
+ weight: a = "normal",
491
970
  align: n = "left",
492
971
  muted: o = !1,
493
972
  italic: s = !1,
494
- children: i,
495
- className: d = "",
496
- ...h
973
+ children: d,
974
+ className: v = "",
975
+ ...c
497
976
  }) => {
498
- const c = t, l = {
977
+ const i = e, l = {
499
978
  xs: "text-[var(--font-size-xs)]",
500
979
  sm: "text-[var(--font-size-sm)]",
501
980
  md: "text-[var(--font-size-base)]",
502
981
  lg: "text-[var(--font-size-lg)]"
503
- }, f = {
982
+ }, u = {
504
983
  normal: "font-[var(--font-weight-normal)]",
505
984
  medium: "font-[var(--font-weight-medium)]",
506
985
  semibold: "font-[var(--font-weight-semibold)]"
507
- }, m = {
986
+ }, h = {
508
987
  left: "text-left",
509
988
  center: "text-center",
510
989
  right: "text-right"
511
- }, x = [
990
+ }, b = [
512
991
  "m-0 leading-[var(--line-height-normal)] text-[var(--text-secondary)] transition-[var(--transition-colors)]",
513
- l[a],
514
- f[r],
515
- m[n],
992
+ l[r],
993
+ u[a],
994
+ h[n],
516
995
  s ? "italic" : "not-italic",
517
996
  o ? "text-[var(--text-muted)] opacity-80" : "",
518
- d
997
+ v
519
998
  ].filter(Boolean).join(" ");
520
- return /* @__PURE__ */ e(c, { className: x, ...h, children: i });
521
- }, O = ({
522
- as: t = "h1",
523
- size: a = "2xl",
524
- weight: r = "bold",
999
+ return /* @__PURE__ */ t(i, { className: b, ...c, children: d });
1000
+ }, he = ({
1001
+ checked: e = !1,
1002
+ onCheckedChange: r,
1003
+ label: a,
1004
+ className: n,
1005
+ ...o
1006
+ }) => /* @__PURE__ */ m("div", { className: f("inline-flex items-center gap-2", n), children: [
1007
+ /* @__PURE__ */ t(
1008
+ "button",
1009
+ {
1010
+ "aria-checked": e,
1011
+ className: f(
1012
+ "relative inline-flex h-6 w-11 items-center rounded-full border transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--border-color-focus)]",
1013
+ e ? "border-[var(--md-primary)] bg-[var(--md-primary)]" : "border-[var(--md-outline)] bg-[var(--md-surface-container-high)]"
1014
+ ),
1015
+ onClick: () => r == null ? void 0 : r(!e),
1016
+ role: "switch",
1017
+ type: "button",
1018
+ ...o,
1019
+ children: /* @__PURE__ */ t(
1020
+ "span",
1021
+ {
1022
+ className: f(
1023
+ "inline-block h-5 w-5 rounded-full bg-[var(--md-surface)] shadow transition",
1024
+ e ? "translate-x-5" : "translate-x-0.5"
1025
+ )
1026
+ }
1027
+ )
1028
+ }
1029
+ ),
1030
+ a && /* @__PURE__ */ t("span", { className: "text-sm text-[var(--text-primary)]", children: a })
1031
+ ] }), pe = ({
1032
+ className: e,
1033
+ children: r,
1034
+ onRemove: a,
1035
+ ...n
1036
+ }) => /* @__PURE__ */ m(
1037
+ "span",
1038
+ {
1039
+ className: f(
1040
+ "inline-flex items-center gap-1 rounded-[var(--border-radius-sm)] border border-[var(--border-color)] bg-[var(--bg-secondary)] px-2.5 py-1 text-xs text-[var(--text-secondary)]",
1041
+ e
1042
+ ),
1043
+ ...n,
1044
+ children: [
1045
+ r,
1046
+ a && /* @__PURE__ */ t(
1047
+ "button",
1048
+ {
1049
+ "aria-label": "Remover tag",
1050
+ className: "inline-flex h-4 w-4 items-center justify-center rounded-full text-[var(--text-muted)] transition hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)]",
1051
+ onClick: a,
1052
+ type: "button",
1053
+ children: "×"
1054
+ }
1055
+ )
1056
+ ]
1057
+ }
1058
+ ), ge = ({ items: e, defaultTabId: r }) => {
1059
+ var v;
1060
+ const [a, n] = N(r ?? ((v = e[0]) == null ? void 0 : v.id)), o = e.find((c) => c.id === a) ?? e[0], s = Math.max(
1061
+ 0,
1062
+ e.findIndex((c) => c.id === (o == null ? void 0 : o.id))
1063
+ ), d = (c) => {
1064
+ const i = e[c];
1065
+ if (!i)
1066
+ return;
1067
+ n(i.id);
1068
+ const l = document.getElementById(`tab-${i.id}`);
1069
+ l == null || l.focus();
1070
+ };
1071
+ return /* @__PURE__ */ m("div", { className: "grid gap-3", children: [
1072
+ /* @__PURE__ */ t(
1073
+ "div",
1074
+ {
1075
+ "aria-orientation": "horizontal",
1076
+ className: "inline-flex flex-wrap gap-1 rounded-[var(--border-radius-md)] bg-[var(--bg-tertiary)] p-1",
1077
+ role: "tablist",
1078
+ children: e.map((c, i) => /* @__PURE__ */ t(
1079
+ "button",
1080
+ {
1081
+ "aria-controls": `panel-${c.id}`,
1082
+ "aria-selected": a === c.id,
1083
+ className: f(
1084
+ "rounded-[var(--border-radius-sm)] px-3 py-1.5 text-sm transition",
1085
+ a === c.id ? "bg-[var(--bg-secondary)] text-[var(--text-primary)] shadow-[var(--shadow-xs)]" : "text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]"
1086
+ ),
1087
+ id: `tab-${c.id}`,
1088
+ onClick: () => n(c.id),
1089
+ onKeyDown: (l) => {
1090
+ l.key === "ArrowRight" ? (l.preventDefault(), d((i + 1) % e.length)) : l.key === "ArrowLeft" ? (l.preventDefault(), d((i - 1 + e.length) % e.length)) : l.key === "Home" ? (l.preventDefault(), d(0)) : l.key === "End" && (l.preventDefault(), d(e.length - 1));
1091
+ },
1092
+ role: "tab",
1093
+ tabIndex: i === s ? 0 : -1,
1094
+ type: "button",
1095
+ children: c.label
1096
+ },
1097
+ c.id
1098
+ ))
1099
+ }
1100
+ ),
1101
+ /* @__PURE__ */ t(
1102
+ "div",
1103
+ {
1104
+ "aria-labelledby": `tab-${(o == null ? void 0 : o.id) ?? ""}`,
1105
+ className: "rounded-[var(--border-radius-md)] border border-[var(--border-color)] bg-[var(--bg-secondary)] p-4",
1106
+ id: `panel-${(o == null ? void 0 : o.id) ?? ""}`,
1107
+ role: "tabpanel",
1108
+ children: o == null ? void 0 : o.content
1109
+ }
1110
+ )
1111
+ ] });
1112
+ }, ye = ({ className: e, children: r, ...a }) => /* @__PURE__ */ t("div", { className: "overflow-x-auto rounded-[var(--border-radius-md)] border border-[var(--border-color)]", children: /* @__PURE__ */ t(
1113
+ "table",
1114
+ {
1115
+ className: f(
1116
+ "w-full min-w-[36rem] border-collapse bg-[var(--bg-secondary)] text-left",
1117
+ e
1118
+ ),
1119
+ ...a,
1120
+ children: r
1121
+ }
1122
+ ) }), we = ({
1123
+ label: e,
1124
+ helperText: r,
1125
+ error: a,
1126
+ className: n,
1127
+ id: o,
1128
+ ...s
1129
+ }) => {
1130
+ const d = o || `textarea-${Math.random().toString(36).slice(2, 9)}`;
1131
+ return /* @__PURE__ */ m("div", { className: "grid gap-1", children: [
1132
+ e && /* @__PURE__ */ t(
1133
+ "label",
1134
+ {
1135
+ className: "text-[var(--font-size-sm)] font-[var(--font-weight-semibold)] text-[var(--md-on-surface)]",
1136
+ htmlFor: d,
1137
+ children: e
1138
+ }
1139
+ ),
1140
+ /* @__PURE__ */ t(
1141
+ "textarea",
1142
+ {
1143
+ className: f(
1144
+ "min-h-24 w-full rounded-[var(--border-radius-md)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] px-3.5 py-2 text-[var(--md-on-surface)] outline-none transition placeholder:text-[var(--md-on-surface-variant)] focus:border-[var(--border-color-focus)] focus:[box-shadow:0_0_0_0.1875rem_rgba(47,93,140,0.15)]",
1145
+ a ? "border-[var(--md-error)] focus:border-[var(--md-error)] focus:[box-shadow:0_0_0_0.1875rem_rgba(186,26,26,0.2)]" : "",
1146
+ n
1147
+ ),
1148
+ id: d,
1149
+ ...s
1150
+ }
1151
+ ),
1152
+ a ? /* @__PURE__ */ t("span", { className: "text-xs text-[var(--md-error)]", children: a }) : r && /* @__PURE__ */ t("span", { className: "text-xs text-[var(--md-on-surface-variant)]", children: r })
1153
+ ] });
1154
+ }, P = ({
1155
+ tone: e = "info",
1156
+ title: r,
1157
+ description: a,
1158
+ onDismiss: n,
1159
+ className: o,
1160
+ ...s
1161
+ }) => {
1162
+ const d = {
1163
+ info: "border-[var(--info-color)]/40",
1164
+ success: "border-[var(--success-color)]/40",
1165
+ warning: "border-[var(--warning-color)]/40",
1166
+ error: "border-[var(--md-error)]/40"
1167
+ }[e], v = e === "error" || e === "warning" ? "assertive" : "polite", c = e === "error" || e === "warning" ? "alert" : "status";
1168
+ return /* @__PURE__ */ m(
1169
+ "div",
1170
+ {
1171
+ className: f(
1172
+ "w-[22rem] rounded-[var(--border-radius-md)] border bg-[var(--bg-secondary)] p-3 shadow-[var(--shadow-lg)]",
1173
+ d,
1174
+ o
1175
+ ),
1176
+ "aria-atomic": "true",
1177
+ "aria-live": v,
1178
+ onKeyDown: (i) => {
1179
+ i.key === "Escape" && (n == null || n());
1180
+ },
1181
+ role: c,
1182
+ tabIndex: 0,
1183
+ ...s,
1184
+ children: [
1185
+ /* @__PURE__ */ m("div", { className: "flex items-start justify-between gap-2", children: [
1186
+ /* @__PURE__ */ t("p", { className: "m-0 text-sm font-semibold text-[var(--text-primary)]", children: r }),
1187
+ n && /* @__PURE__ */ t(
1188
+ "button",
1189
+ {
1190
+ "aria-label": "Fechar notificação",
1191
+ className: "inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-[var(--border-radius-sm)] text-[var(--text-secondary)] transition hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--border-color-focus)]",
1192
+ onClick: n,
1193
+ type: "button",
1194
+ children: /* @__PURE__ */ t("span", { "aria-hidden": !0, children: "×" })
1195
+ }
1196
+ )
1197
+ ] }),
1198
+ a && /* @__PURE__ */ t("p", { className: "mt-1 text-sm text-[var(--text-secondary)]", children: a })
1199
+ ]
1200
+ }
1201
+ );
1202
+ }, T = A(void 0), Ne = ({
1203
+ children: e,
1204
+ durationMs: r = 4e3
1205
+ }) => {
1206
+ const [a, n] = N([]), o = z(/* @__PURE__ */ new Map()), s = S((c) => {
1207
+ const i = o.current.get(c);
1208
+ i && (window.clearTimeout(i), o.current.delete(c)), n((l) => l.filter((u) => u.id !== c));
1209
+ }, []), d = S(
1210
+ (c) => {
1211
+ const i = c.id ?? `toast-${Math.random().toString(36).slice(2, 9)}`;
1212
+ n((u) => [...u, { ...c, id: i }]);
1213
+ const l = window.setTimeout(() => s(i), r);
1214
+ o.current.set(i, l);
1215
+ },
1216
+ [s, r]
1217
+ );
1218
+ w(() => () => {
1219
+ o.current.forEach((c) => window.clearTimeout(c)), o.current.clear();
1220
+ }, []);
1221
+ const v = R(
1222
+ () => ({ toasts: a, pushToast: d, dismissToast: s }),
1223
+ [a, d, s]
1224
+ );
1225
+ return /* @__PURE__ */ m(T.Provider, { value: v, children: [
1226
+ e,
1227
+ /* @__PURE__ */ t(q, {})
1228
+ ] });
1229
+ }, ze = () => {
1230
+ const e = _(T);
1231
+ if (!e)
1232
+ throw new Error("useToast must be used inside ToastProvider");
1233
+ return e;
1234
+ }, q = () => {
1235
+ const e = _(T);
1236
+ return !e || e.toasts.length === 0 ? null : /* @__PURE__ */ t(
1237
+ "div",
1238
+ {
1239
+ "aria-label": "Notificações",
1240
+ className: "pointer-events-none fixed bottom-4 right-4 z-[1200] grid gap-2",
1241
+ role: "region",
1242
+ children: e.toasts.map((r) => /* @__PURE__ */ t(
1243
+ P,
1244
+ {
1245
+ ...r,
1246
+ className: "pointer-events-auto",
1247
+ onDismiss: () => e.dismissToast(r.id)
1248
+ },
1249
+ r.id
1250
+ ))
1251
+ }
1252
+ );
1253
+ }, ke = ({
1254
+ as: e = "h1",
1255
+ size: r = "2xl",
1256
+ weight: a = "bold",
525
1257
  align: n = "left",
526
1258
  gradient: o = !1,
527
1259
  italic: s = !1,
528
- children: i,
529
- className: d = "",
530
- ...h
1260
+ children: d,
1261
+ className: v = "",
1262
+ ...c
531
1263
  }) => {
532
- const c = t, l = {
1264
+ const i = e, l = {
533
1265
  xs: "text-[var(--font-size-sm)]",
534
1266
  sm: "text-[var(--font-size-base)]",
535
1267
  md: "text-[var(--font-size-lg)]",
@@ -538,56 +1270,117 @@ const W = ({
538
1270
  "2xl": "text-[var(--font-size-3xl)]",
539
1271
  "3xl": "text-[var(--font-size-4xl)]",
540
1272
  "4xl": "text-[3rem]"
541
- }, f = {
1273
+ }, u = {
542
1274
  light: "font-[var(--font-weight-light)]",
543
1275
  normal: "font-[var(--font-weight-normal)]",
544
1276
  medium: "font-[var(--font-weight-medium)]",
545
1277
  semibold: "font-[var(--font-weight-semibold)]",
546
1278
  bold: "font-[var(--font-weight-bold)]",
547
1279
  extrabold: "font-extrabold"
548
- }, m = {
1280
+ }, h = {
549
1281
  left: "text-left",
550
1282
  center: "text-center",
551
1283
  right: "text-right"
552
- }, x = o ? "bg-[linear-gradient(135deg,var(--text-primary)_0%,var(--primary-color)_50%,var(--secondary-color)_100%)] bg-clip-text text-transparent" : "", p = [
1284
+ }, b = o ? "bg-[linear-gradient(135deg,var(--text-primary)_0%,var(--primary-color)_50%,var(--secondary-color)_100%)] bg-clip-text text-transparent" : "", g = [
553
1285
  "m-0 leading-[var(--line-height-tight)] text-[var(--text-primary)] transition-[var(--transition-colors)]",
554
- l[a],
555
- f[r],
556
- m[n],
1286
+ l[r],
1287
+ u[a],
1288
+ h[n],
557
1289
  s ? "italic" : "not-italic",
558
- x,
559
- d
1290
+ b,
1291
+ v
560
1292
  ].filter(Boolean).join(" ");
561
- return /* @__PURE__ */ e(c, { className: p, ...h, children: i });
562
- }, j = P(void 0), Y = () => {
563
- const t = $(j);
564
- if (!t)
1293
+ return /* @__PURE__ */ t(i, { className: g, ...c, children: d });
1294
+ }, Ce = ({
1295
+ children: e,
1296
+ content: r,
1297
+ side: a = "top"
1298
+ }) => {
1299
+ const [n, o] = N(!1), s = B(), d = a === "top" ? "bottom-full mb-2 left-1/2 -translate-x-1/2" : "top-full mt-2 left-1/2 -translate-x-1/2", v = {
1300
+ "aria-describedby": s,
1301
+ onBlur: () => o(!1),
1302
+ onFocus: () => o(!0),
1303
+ onKeyDown: (i) => {
1304
+ i.key === "Escape" && o(!1);
1305
+ },
1306
+ onMouseEnter: () => o(!0),
1307
+ onMouseLeave: () => o(!1)
1308
+ }, c = K(e) ? /* @__PURE__ */ t("span", { className: "inline-flex", ...v, children: e }) : /* @__PURE__ */ t("span", { className: "inline-flex", tabIndex: 0, ...v, children: e });
1309
+ return /* @__PURE__ */ m("span", { className: "relative inline-flex", children: [
1310
+ c,
1311
+ /* @__PURE__ */ t(
1312
+ "span",
1313
+ {
1314
+ "aria-hidden": !n,
1315
+ className: f(
1316
+ "pointer-events-none absolute z-20 whitespace-nowrap rounded bg-[var(--brand-cinza-escuro)] px-2 py-1 text-xs text-white shadow-[var(--shadow-sm)] transition",
1317
+ n ? "opacity-100" : "opacity-0",
1318
+ d
1319
+ ),
1320
+ id: s,
1321
+ role: "tooltip",
1322
+ children: r
1323
+ }
1324
+ )
1325
+ ] });
1326
+ }, D = A(void 0), je = () => {
1327
+ const e = _(D);
1328
+ if (!e)
565
1329
  throw new Error("useTheme must be used within a ThemeProvider");
566
- return t;
567
- }, q = ({
568
- children: t,
569
- defaultTheme: a = "light"
1330
+ return e;
1331
+ }, Me = ({
1332
+ children: e,
1333
+ defaultTheme: r = "light"
570
1334
  }) => {
571
- const [r, n] = z(() => typeof window > "u" ? a : window.localStorage.getItem("theme") || a);
572
- b(() => {
573
- typeof window > "u" || (window.localStorage.setItem("theme", r), document.documentElement.setAttribute("data-theme", r));
574
- }, [r]);
1335
+ const [a, n] = N(() => typeof window > "u" ? r : window.localStorage.getItem("theme") || r);
1336
+ w(() => {
1337
+ typeof window > "u" || (window.localStorage.setItem("theme", a), document.documentElement.setAttribute("data-theme", a));
1338
+ }, [a]);
575
1339
  const o = () => {
576
1340
  n((s) => s === "dark" ? "light" : "dark");
577
1341
  };
578
- return /* @__PURE__ */ e(j.Provider, { value: { theme: r, toggleTheme: o }, children: t });
1342
+ return /* @__PURE__ */ t(D.Provider, { value: { theme: a, toggleTheme: o }, children: e });
579
1343
  };
580
1344
  export {
1345
+ V as Accordion,
1346
+ G as Alert,
1347
+ U as Badge,
581
1348
  W as Button,
582
- F as Card,
583
- A as Footer,
584
- V as Header,
585
- K as Input,
586
- R as Modal,
587
- D as Paragraph,
588
- H as Subtitle,
589
- q as ThemeProvider,
590
- O as Title,
591
- Y as useTheme
1349
+ Y as Card,
1350
+ J as Checkbox,
1351
+ L as Chip,
1352
+ ae as Container,
1353
+ Q as Divider,
1354
+ X as EmptyState,
1355
+ Z as Footer,
1356
+ oe as Grid,
1357
+ ee as Header,
1358
+ re as Input,
1359
+ ne as Modal,
1360
+ ce as PageHeader,
1361
+ le as Pagination,
1362
+ de as Paragraph,
1363
+ me as Popover,
1364
+ ve as Radio,
1365
+ ue as SectionHeader,
1366
+ fe as Select,
1367
+ se as Sidebar,
1368
+ xe as Skeleton,
1369
+ te as Stack,
1370
+ be as Subtitle,
1371
+ he as Switch,
1372
+ ye as Table,
1373
+ ge as Tabs,
1374
+ pe as Tag,
1375
+ we as Textarea,
1376
+ Me as ThemeProvider,
1377
+ ke as Title,
1378
+ P as Toast,
1379
+ Ne as ToastProvider,
1380
+ q as ToastViewport,
1381
+ Ce as Tooltip,
1382
+ ie as Topbar,
1383
+ je as useTheme,
1384
+ ze as useToast
592
1385
  };
593
1386
  //# sourceMappingURL=oficios-ui.js.map