@sbkbs/ui 1.0.1 → 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 (38) 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/Paragraph/Paragraph.d.ts +1 -0
  16. package/dist/components/Popover/Popover.d.ts +7 -0
  17. package/dist/components/Radio/Radio.d.ts +6 -0
  18. package/dist/components/SectionHeader/SectionHeader.d.ts +7 -0
  19. package/dist/components/Select/Select.d.ts +13 -0
  20. package/dist/components/Skeleton/Skeleton.d.ts +7 -0
  21. package/dist/components/Subtitle/Subtitle.d.ts +1 -0
  22. package/dist/components/Switch/Switch.d.ts +7 -0
  23. package/dist/components/Table/Table.d.ts +4 -0
  24. package/dist/components/Tabs/Tabs.d.ts +11 -0
  25. package/dist/components/Tag/Tag.d.ts +5 -0
  26. package/dist/components/Textarea/Textarea.d.ts +7 -0
  27. package/dist/components/Title/Title.d.ts +1 -0
  28. package/dist/components/Toast/Toast.d.ts +26 -0
  29. package/dist/components/Tooltip/Tooltip.d.ts +7 -0
  30. package/dist/index.d.ts +23 -0
  31. package/dist/oficios-ui.css +1 -1
  32. package/dist/oficios-ui.js +1048 -248
  33. package/dist/oficios-ui.js.map +1 -1
  34. package/dist/oficios-ui.umd.cjs +1 -1
  35. package/dist/oficios-ui.umd.cjs.map +1 -1
  36. package/dist/theme.css +6 -0
  37. package/dist/utils/cn.d.ts +1 -0
  38. 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 y, useEffect as p, useContext as B, createContext as $ } from "react";
3
- const T = ({
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 u = "relative inline-flex select-none items-center justify-center overflow-hidden whitespace-nowrap border border-transparent font-semibold leading-none tracking-[0.01em] transition-[all_var(--transition-base)]", z = "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", x = n ? "w-full" : "", g = o ? "[&_.btn__content]:opacity-0" : "", M = {
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
- }, _ = {
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)]",
@@ -29,14 +79,14 @@ const T = ({
29
79
  warning: "bg-[var(--warning-color)] text-white shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--warning-color-light)] hover:shadow-[var(--shadow-md)]",
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
- ghost: "border-[var(--md-outline-variant)] bg-transparent text-[var(--md-on-surface)] 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",
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)]"
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
- }, b = {
89
+ }, M = {
40
90
  "verde-vibrante": {
41
91
  primary: "var(--brand-verde-vibrante)",
42
92
  hover: "var(--brand-verde-profundo)"
@@ -66,120 +116,255 @@ const T = ({
66
116
  hover: "var(--brand-branco)",
67
117
  onPrimary: "var(--brand-grafite-azulado)"
68
118
  }
69
- }, w = {};
70
- l && t === "primary" && (w["--md-primary"] = b[l].primary, w["--primary-color-hover"] = b[l].hover, b[l].onPrimary && (w["--md-on-primary"] = b[l].onPrimary));
71
- const E = [
72
- u,
73
- z,
74
- N,
75
- M[a],
76
- _[t],
77
- x,
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,
78
123
  g,
79
- h
124
+ y,
125
+ C[r],
126
+ j[e],
127
+ k,
128
+ x,
129
+ p,
130
+ c
80
131
  ].filter(Boolean).join(" ");
81
- return /* @__PURE__ */ v(
132
+ return /* @__PURE__ */ m(
82
133
  "button",
83
134
  {
84
- className: E,
85
- disabled: c || o,
86
- style: { ...w, ...f },
87
- ...m,
135
+ className: F,
136
+ disabled: i || o,
137
+ style: { ...E, ...u },
138
+ ...h,
88
139
  children: [
89
- o && /* @__PURE__ */ e(
140
+ o && /* @__PURE__ */ t(
90
141
  "span",
91
142
  {
92
143
  "aria-hidden": "true",
93
144
  className: "absolute inline-flex h-[1em] w-[1em] animate-spin items-center justify-center",
94
- children: /* @__PURE__ */ v("svg", { fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: [
95
- /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "10", strokeOpacity: "0.25" }),
96
- /* @__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" })
97
148
  ] })
98
149
  }
99
150
  ),
100
- !o && s && /* @__PURE__ */ e(
151
+ !o && s && /* @__PURE__ */ t(
101
152
  "span",
102
153
  {
103
- 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]}`,
104
155
  children: s
105
156
  }
106
157
  ),
107
- /* @__PURE__ */ e("span", { className: "btn__content inline-flex items-center justify-center", children: d }),
108
- !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(
109
160
  "span",
110
161
  {
111
- className: `ml-1 inline-flex shrink-0 items-center justify-center leading-none ${C[a]}`,
112
- children: i
162
+ className: `ml-1 inline-flex shrink-0 items-center justify-center leading-none ${I[r]}`,
163
+ children: d
113
164
  }
114
165
  )
115
166
  ]
116
167
  }
117
168
  );
118
- }, F = ({
119
- variant: t = "default",
120
- padding: a = "md",
121
- 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,
122
230
  children: n,
123
231
  className: o = "",
124
232
  ...s
125
233
  }) => {
126
- 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 = {
127
235
  default: "bg-[var(--md-surface)] border border-[var(--md-outline-variant)] shadow-[var(--shadow-sm)]",
128
236
  elevated: "bg-[var(--md-surface)] border border-[var(--md-outline-variant)] shadow-[var(--shadow-lg)]",
129
237
  outlined: "bg-transparent border border-[var(--md-outline-variant)] shadow-none",
130
238
  flat: "bg-[var(--md-surface)] border-0 shadow-none"
131
- }, h = {
239
+ }, c = {
132
240
  none: "p-0",
133
241
  sm: "p-[var(--spacing-md)]",
134
242
  md: "p-[var(--spacing-lg)]",
135
243
  lg: "p-[var(--spacing-xl)]",
136
244
  xl: "p-[var(--spacing-2xl)]"
137
- }, 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],
138
249
  i,
139
- d[t],
140
- h[a],
141
- c,
142
250
  o
143
251
  ].filter(Boolean).join(" ");
144
- return /* @__PURE__ */ e("div", { className: l, ...s, children: n });
145
- }, W = ({
146
- poweredByText: t = "Powered by",
147
- logoSrc: a,
148
- 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",
149
334
  logoFallbackText: n,
150
335
  className: o = ""
151
336
  }) => {
152
- const [s, i] = y(!0);
153
- return /* @__PURE__ */ e(
337
+ const [s, d] = N(!0);
338
+ return /* @__PURE__ */ t(
154
339
  "footer",
155
340
  {
156
341
  className: [
157
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)]",
158
343
  o
159
344
  ].filter(Boolean).join(" "),
160
- children: /* @__PURE__ */ v("div", { className: "flex items-center gap-[var(--spacing-md)]", children: [
161
- t && /* @__PURE__ */ e("span", { className: "text-[0.95rem] font-normal text-[var(--text-secondary)]", children: t }),
162
- (a || n) && /* @__PURE__ */ v("div", { className: "flex items-center", children: [
163
- 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(
164
349
  "img",
165
350
  {
166
- alt: r,
351
+ alt: a,
167
352
  className: "h-6 w-auto object-contain",
168
- onError: (d) => {
169
- i(!1);
353
+ onError: (v) => {
354
+ d(!1);
170
355
  },
171
- src: a,
356
+ src: r,
172
357
  style: {
173
358
  filter: "brightness(0)"
174
359
  }
175
360
  }
176
361
  ),
177
- n && /* @__PURE__ */ e(
362
+ n && /* @__PURE__ */ t(
178
363
  "span",
179
364
  {
180
365
  className: "flex items-center text-base font-bold tracking-[0.1em] text-[var(--md-primary)]",
181
366
  style: {
182
- display: a && s ? "none" : "flex",
367
+ display: r && s ? "none" : "flex",
183
368
  fontFamily: '"Orbitron", sans-serif'
184
369
  },
185
370
  children: n
@@ -189,83 +374,83 @@ const T = ({
189
374
  ] })
190
375
  }
191
376
  );
192
- }, k = () => typeof document > "u" ? "light" : document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : "light", A = ({
193
- logoSrc: t,
194
- logoDarkSrc: a,
195
- 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",
196
381
  title: n,
197
382
  subtitle: o,
198
383
  theme: s,
199
- onLogoClick: i,
200
- rightContent: d,
201
- className: h = ""
384
+ onLogoClick: d,
385
+ rightContent: v,
386
+ className: c = ""
202
387
  }) => {
203
- const [c, l] = y(!1), [f, m] = y(
204
- () => s ?? k()
205
- ), u = f === "dark" && a ? a : t;
206
- p(() => {
388
+ const [i, l] = N(!1), [u, h] = N(
389
+ () => s ?? $()
390
+ ), b = u === "dark" && r ? r : e;
391
+ w(() => {
207
392
  const x = () => l(window.scrollY > 10);
208
393
  return window.addEventListener("scroll", x, { passive: !0 }), () => window.removeEventListener("scroll", x);
209
- }, []), p(() => {
394
+ }, []), w(() => {
210
395
  if (s) {
211
- m(s);
396
+ h(s);
212
397
  return;
213
398
  }
214
- const x = () => m(k());
399
+ const x = () => h($());
215
400
  if (x(), typeof MutationObserver > "u")
216
401
  return;
217
- const g = new MutationObserver(x);
218
- return g.observe(document.documentElement, {
402
+ const p = new MutationObserver(x);
403
+ return p.observe(document.documentElement, {
219
404
  attributes: !0,
220
405
  attributeFilter: ["data-theme"]
221
- }), () => g.disconnect();
406
+ }), () => p.disconnect();
222
407
  }, [s]);
223
- const z = () => i?.(), N = (x) => {
224
- x.key === "Enter" && i?.();
408
+ const g = () => d == null ? void 0 : d(), y = (x) => {
409
+ x.key === "Enter" && (d == null || d());
225
410
  };
226
- return /* @__PURE__ */ v(
411
+ return /* @__PURE__ */ m(
227
412
  "header",
228
413
  {
229
414
  className: [
230
415
  "fixed inset-x-0 top-0 z-[1000] w-full backdrop-blur-[12px]",
231
- h
416
+ c
232
417
  ].filter(Boolean).join(" "),
233
418
  children: [
234
- /* @__PURE__ */ e("div", { className: "h-0.5 w-full bg-[var(--md-primary)]" }),
235
- /* @__PURE__ */ v(
419
+ /* @__PURE__ */ t("div", { className: "h-0.5 w-full bg-[var(--md-primary)]" }),
420
+ /* @__PURE__ */ m(
236
421
  "div",
237
422
  {
238
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",
239
424
  style: {
240
425
  color: "var(--md-on-surface)",
241
- background: `color-mix(in srgb, var(--md-surface) ${c ? "14%" : "18%"}, transparent)`,
242
- 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)`
243
428
  },
244
429
  children: [
245
- /* @__PURE__ */ v(
430
+ /* @__PURE__ */ m(
246
431
  "div",
247
432
  {
248
433
  className: "flex cursor-pointer items-center gap-3 transition-opacity duration-200 ease-in-out hover:opacity-80",
249
- onClick: i ? z : void 0,
250
- onKeyDown: i ? N : void 0,
251
- role: i ? "button" : void 0,
252
- 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,
253
438
  children: [
254
- u && /* @__PURE__ */ v("div", { className: "flex h-16 w-16 shrink-0 items-center justify-center", children: [
255
- /* @__PURE__ */ e(
439
+ b && /* @__PURE__ */ m("div", { className: "flex h-16 w-16 shrink-0 items-center justify-center", children: [
440
+ /* @__PURE__ */ t(
256
441
  "img",
257
442
  {
258
- alt: r,
443
+ alt: a,
259
444
  className: "h-full w-full object-contain",
260
445
  onError: (x) => {
261
446
  x.target.style.display = "none";
262
- const g = x.target.nextElementSibling;
263
- g && (g.style.display = "block");
447
+ const p = x.target.nextElementSibling;
448
+ p && (p.style.display = "block");
264
449
  },
265
- src: u
450
+ src: b
266
451
  }
267
452
  ),
268
- /* @__PURE__ */ v(
453
+ /* @__PURE__ */ m(
269
454
  "svg",
270
455
  {
271
456
  className: "hidden h-full w-full",
@@ -274,14 +459,14 @@ const T = ({
274
459
  strokeWidth: "2",
275
460
  viewBox: "0 0 24 24",
276
461
  children: [
277
- /* @__PURE__ */ e("path", { d: "M12 2L2 7l10 5 10-5-10-5z" }),
278
- /* @__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" })
279
464
  ]
280
465
  }
281
466
  )
282
467
  ] }),
283
- (n || o) && /* @__PURE__ */ v("div", { className: "flex flex-col gap-1", children: [
284
- n && /* @__PURE__ */ e(
468
+ (n || o) && /* @__PURE__ */ m("div", { className: "flex flex-col gap-1", children: [
469
+ n && /* @__PURE__ */ t(
285
470
  "h1",
286
471
  {
287
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",
@@ -289,106 +474,172 @@ const T = ({
289
474
  children: n
290
475
  }
291
476
  ),
292
- 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 })
293
478
  ] })
294
479
  ]
295
480
  }
296
481
  ),
297
- 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 })
298
483
  ]
299
484
  }
300
485
  )
301
486
  ]
302
487
  }
303
488
  );
304
- }, V = ({
305
- label: t,
306
- error: a,
307
- helperText: r,
489
+ }, re = ({
490
+ label: e,
491
+ error: r,
492
+ helperText: a,
308
493
  leftIcon: n,
309
494
  rightIcon: o,
310
495
  fullWidth: s = !1,
311
- size: i = "md",
312
- className: d = "",
313
- id: h,
314
- ...c
496
+ size: d = "md",
497
+ className: v = "",
498
+ id: c,
499
+ ...i
315
500
  }) => {
316
- const l = h || `input-${Math.random().toString(36).substring(2, 9)}`, f = !!a, u = [
501
+ const l = c || `input-${Math.random().toString(36).substring(2, 9)}`, u = !!r, b = [
317
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",
318
- 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)]" : "",
319
504
  n ? "pl-10" : "",
320
505
  o ? "pr-10" : "",
321
506
  {
322
507
  sm: "min-h-8 px-[var(--spacing-md)] py-[var(--spacing-sm)] text-[var(--font-size-sm)]",
323
508
  md: "min-h-10 px-[var(--spacing-lg)] py-[var(--spacing-md)] text-[var(--font-size-base)]",
324
509
  lg: "min-h-12 px-[var(--spacing-xl)] py-[var(--spacing-lg)] text-[var(--font-size-lg)]"
325
- }[i],
326
- d
510
+ }[d],
511
+ v
327
512
  ].filter(Boolean).join(" ");
328
- return /* @__PURE__ */ v("div", { className: `flex flex-col gap-[var(--spacing-xs)] ${s ? "w-full" : ""}`, children: [
329
- t && /* @__PURE__ */ e(
513
+ return /* @__PURE__ */ m("div", { className: `flex flex-col gap-[var(--spacing-xs)] ${s ? "w-full" : ""}`, children: [
514
+ e && /* @__PURE__ */ t(
330
515
  "label",
331
516
  {
332
517
  className: "text-[var(--font-size-sm)] font-[var(--font-weight-semibold)] text-[var(--md-on-surface)]",
333
518
  htmlFor: l,
334
- children: t
519
+ children: e
335
520
  }
336
521
  ),
337
- /* @__PURE__ */ v("div", { className: "group relative flex w-full items-center", children: [
338
- 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 }),
339
- /* @__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(
340
525
  "input",
341
526
  {
342
- "aria-describedby": a ? `${l}-error` : r ? `${l}-helper` : void 0,
343
- "aria-invalid": f ? !0 : void 0,
344
- className: u,
527
+ "aria-describedby": r ? `${l}-error` : a ? `${l}-helper` : void 0,
528
+ "aria-invalid": u ? !0 : void 0,
529
+ className: b,
345
530
  id: l,
346
- ...c
531
+ ...i
347
532
  }
348
533
  ),
349
- 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 })
350
535
  ] }),
351
- a && /* @__PURE__ */ e(
536
+ r && /* @__PURE__ */ t(
352
537
  "span",
353
538
  {
354
539
  className: "mt-[var(--spacing-xs)] block text-[var(--font-size-xs)] text-[var(--md-error)]",
355
540
  id: `${l}-error`,
356
541
  role: "alert",
357
- children: a
542
+ children: r
358
543
  }
359
544
  ),
360
- r && !a && /* @__PURE__ */ e(
545
+ a && !r && /* @__PURE__ */ t(
361
546
  "span",
362
547
  {
363
548
  className: "mt-[var(--spacing-xs)] block text-[var(--font-size-xs)] text-[var(--md-on-surface-variant)]",
364
549
  id: `${l}-helper`,
365
- children: r
550
+ children: a
366
551
  }
367
552
  )
368
553
  ] });
369
- }, K = ({
370
- isOpen: t,
371
- onClose: a,
372
- 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,
373
603
  subtitle: n,
374
604
  children: o,
375
605
  size: s = "md",
376
- showCloseButton: i = !0,
377
- closeOnOverlayClick: d = !0,
378
- className: h = ""
606
+ showCloseButton: d = !0,
607
+ closeOnOverlayClick: v = !0,
608
+ className: c = ""
379
609
  }) => {
380
- if (p(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
381
- document.body.style.overflow = "";
382
- }), [t]), p(() => {
383
- const m = (u) => {
384
- u.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);
385
637
  };
386
- return t && document.addEventListener("keydown", m), () => document.removeEventListener("keydown", m);
387
- }, [t, a]), !t)
638
+ }, [e, r]), !e)
388
639
  return null;
389
- const c = (m) => {
390
- d && m.target === m.currentTarget && a();
391
- }, f = [
640
+ const u = (g) => {
641
+ v && g.target === g.currentTarget && r();
642
+ }, b = [
392
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)]",
393
644
  {
394
645
  sm: "max-w-[25rem]",
@@ -397,37 +648,37 @@ const T = ({
397
648
  xl: "max-w-[56.25rem]",
398
649
  full: "max-h-[90vh] max-w-[90vw]"
399
650
  }[s],
400
- h
651
+ c
401
652
  ].filter(Boolean).join(" ");
402
- return /* @__PURE__ */ e(
653
+ return /* @__PURE__ */ t(
403
654
  "div",
404
655
  {
405
- "aria-labelledby": r ? "modal-title" : void 0,
656
+ "aria-labelledby": a ? "modal-title" : void 0,
406
657
  "aria-modal": "true",
407
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]",
408
- onClick: c,
659
+ onClick: u,
409
660
  role: "dialog",
410
- children: /* @__PURE__ */ v("div", { className: f, children: [
411
- (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: [
412
- (r || n) && /* @__PURE__ */ v("div", { className: "flex-1", children: [
413
- 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(
414
665
  "h2",
415
666
  {
416
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)]",
417
668
  id: "modal-title",
418
- children: r
669
+ children: a
419
670
  }
420
671
  ),
421
- 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 })
422
673
  ] }),
423
- i && /* @__PURE__ */ e(
674
+ d && /* @__PURE__ */ t(
424
675
  "button",
425
676
  {
426
677
  "aria-label": "Fechar modal",
427
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)]",
428
- onClick: a,
679
+ onClick: r,
429
680
  type: "button",
430
- children: /* @__PURE__ */ v(
681
+ children: /* @__PURE__ */ m(
431
682
  "svg",
432
683
  {
433
684
  fill: "none",
@@ -436,94 +687,581 @@ const T = ({
436
687
  strokeWidth: "2",
437
688
  viewBox: "0 0 24 24",
438
689
  children: [
439
- /* @__PURE__ */ e("line", { x1: "18", x2: "6", y1: "6", y2: "18" }),
440
- /* @__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" })
441
692
  ]
442
693
  }
443
694
  )
444
695
  }
445
696
  )
446
697
  ] }),
447
- /* @__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 })
448
699
  ] })
449
700
  }
450
701
  );
451
- }, R = ({
452
- as: t = "p",
453
- size: a = "md",
454
- 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",
455
767
  align: n = "left",
456
768
  muted: o = !1,
457
- children: s,
458
- className: i = "",
459
- ...d
769
+ italic: s = !1,
770
+ children: d,
771
+ className: v = "",
772
+ ...c
460
773
  }) => {
461
- const h = t, c = {
774
+ const i = e, l = {
462
775
  xs: "text-[var(--font-size-xs)] leading-[var(--line-height-normal)]",
463
776
  sm: "text-[var(--font-size-sm)] leading-[var(--line-height-normal)]",
464
777
  md: "text-[var(--font-size-base)] leading-[var(--line-height-relaxed)]",
465
778
  lg: "text-[var(--font-size-lg)] leading-[var(--line-height-loose)]"
466
- }, l = {
779
+ }, u = {
467
780
  light: "font-[var(--font-weight-light)]",
468
781
  normal: "font-[var(--font-weight-normal)]",
469
782
  medium: "font-[var(--font-weight-medium)]"
470
- }, f = {
783
+ }, h = {
471
784
  left: "text-left",
472
785
  center: "text-center",
473
786
  right: "text-right",
474
787
  justify: "text-justify"
475
- }, m = [
788
+ }, b = [
476
789
  "m-0 text-[var(--text-primary)] transition-[var(--transition-colors)]",
477
- c[a],
478
790
  l[r],
479
- f[n],
791
+ u[a],
792
+ h[n],
793
+ s ? "italic" : "not-italic",
480
794
  o ? "text-[var(--text-muted)]" : "",
481
- i
795
+ v
482
796
  ].filter(Boolean).join(" ");
483
- return /* @__PURE__ */ e(h, { className: m, ...d, children: s });
484
- }, D = ({
485
- as: t = "p",
486
- size: a = "md",
487
- 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",
488
970
  align: n = "left",
489
971
  muted: o = !1,
490
- children: s,
491
- className: i = "",
492
- ...d
972
+ italic: s = !1,
973
+ children: d,
974
+ className: v = "",
975
+ ...c
493
976
  }) => {
494
- const h = t, c = {
977
+ const i = e, l = {
495
978
  xs: "text-[var(--font-size-xs)]",
496
979
  sm: "text-[var(--font-size-sm)]",
497
980
  md: "text-[var(--font-size-base)]",
498
981
  lg: "text-[var(--font-size-lg)]"
499
- }, l = {
982
+ }, u = {
500
983
  normal: "font-[var(--font-weight-normal)]",
501
984
  medium: "font-[var(--font-weight-medium)]",
502
985
  semibold: "font-[var(--font-weight-semibold)]"
503
- }, f = {
986
+ }, h = {
504
987
  left: "text-left",
505
988
  center: "text-center",
506
989
  right: "text-right"
507
- }, m = [
990
+ }, b = [
508
991
  "m-0 leading-[var(--line-height-normal)] text-[var(--text-secondary)] transition-[var(--transition-colors)]",
509
- c[a],
510
992
  l[r],
511
- f[n],
993
+ u[a],
994
+ h[n],
995
+ s ? "italic" : "not-italic",
512
996
  o ? "text-[var(--text-muted)] opacity-80" : "",
513
- i
997
+ v
514
998
  ].filter(Boolean).join(" ");
515
- return /* @__PURE__ */ e(h, { className: m, ...d, children: s });
516
- }, H = ({
517
- as: t = "h1",
518
- size: a = "2xl",
519
- 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",
520
1257
  align: n = "left",
521
1258
  gradient: o = !1,
522
- children: s,
523
- className: i = "",
524
- ...d
1259
+ italic: s = !1,
1260
+ children: d,
1261
+ className: v = "",
1262
+ ...c
525
1263
  }) => {
526
- const h = t, c = {
1264
+ const i = e, l = {
527
1265
  xs: "text-[var(--font-size-sm)]",
528
1266
  sm: "text-[var(--font-size-base)]",
529
1267
  md: "text-[var(--font-size-lg)]",
@@ -532,55 +1270,117 @@ const T = ({
532
1270
  "2xl": "text-[var(--font-size-3xl)]",
533
1271
  "3xl": "text-[var(--font-size-4xl)]",
534
1272
  "4xl": "text-[3rem]"
535
- }, l = {
1273
+ }, u = {
536
1274
  light: "font-[var(--font-weight-light)]",
537
1275
  normal: "font-[var(--font-weight-normal)]",
538
1276
  medium: "font-[var(--font-weight-medium)]",
539
1277
  semibold: "font-[var(--font-weight-semibold)]",
540
1278
  bold: "font-[var(--font-weight-bold)]",
541
1279
  extrabold: "font-extrabold"
542
- }, f = {
1280
+ }, h = {
543
1281
  left: "text-left",
544
1282
  center: "text-center",
545
1283
  right: "text-right"
546
- }, m = o ? "bg-[linear-gradient(135deg,var(--text-primary)_0%,var(--primary-color)_50%,var(--secondary-color)_100%)] bg-clip-text text-transparent" : "", u = [
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 = [
547
1285
  "m-0 leading-[var(--line-height-tight)] text-[var(--text-primary)] transition-[var(--transition-colors)]",
548
- c[a],
549
1286
  l[r],
550
- f[n],
551
- m,
552
- i
1287
+ u[a],
1288
+ h[n],
1289
+ s ? "italic" : "not-italic",
1290
+ b,
1291
+ v
553
1292
  ].filter(Boolean).join(" ");
554
- return /* @__PURE__ */ e(h, { className: u, ...d, children: s });
555
- }, j = $(void 0), O = () => {
556
- const t = B(j);
557
- 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)
558
1329
  throw new Error("useTheme must be used within a ThemeProvider");
559
- return t;
560
- }, Y = ({
561
- children: t,
562
- defaultTheme: a = "light"
1330
+ return e;
1331
+ }, Me = ({
1332
+ children: e,
1333
+ defaultTheme: r = "light"
563
1334
  }) => {
564
- const [r, n] = y(() => typeof window > "u" ? a : window.localStorage.getItem("theme") || a);
565
- p(() => {
566
- typeof window > "u" || (window.localStorage.setItem("theme", r), document.documentElement.setAttribute("data-theme", r));
567
- }, [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]);
568
1339
  const o = () => {
569
1340
  n((s) => s === "dark" ? "light" : "dark");
570
1341
  };
571
- 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 });
572
1343
  };
573
1344
  export {
574
- T as Button,
575
- F as Card,
576
- W as Footer,
577
- A as Header,
578
- V as Input,
579
- K as Modal,
580
- R as Paragraph,
581
- D as Subtitle,
582
- Y as ThemeProvider,
583
- H as Title,
584
- O as useTheme
1345
+ V as Accordion,
1346
+ G as Alert,
1347
+ U as Badge,
1348
+ W as Button,
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
585
1385
  };
586
1386
  //# sourceMappingURL=oficios-ui.js.map