@fluityy/designsystem 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { jsx as n, jsxs as f } from "react/jsx-runtime";
2
- import { forwardRef as d, useState as b, useRef as k, useEffect as y, createContext as C, useContext as v, useId as B, cloneElement as I, Children as Z, Fragment as ee, useCallback as V, useMemo as re } from "react";
1
+ import { jsx as a, jsxs as f } from "react/jsx-runtime";
2
+ import { forwardRef as p, useState as b, useRef as T, useEffect as y, createContext as C, useContext as w, useId as H, cloneElement as K, Children as ae, Fragment as ne, useCallback as M, useMemo as oe } from "react";
3
3
  import { cva as N } from "class-variance-authority";
4
- import { clsx as te } from "clsx";
5
- import { twMerge as ae } from "tailwind-merge";
6
- import { createPortal as ne } from "react-dom";
4
+ import { clsx as le } from "clsx";
5
+ import { twMerge as se } from "tailwind-merge";
6
+ import { createPortal as ie } from "react-dom";
7
7
  function i(...e) {
8
- return ae(te(e));
8
+ return se(le(e));
9
9
  }
10
- const oe = N(
10
+ const ce = N(
11
11
  // base: tudo derivado de tokens via utilitários mapeados no @theme
12
12
  "inline-flex items-center justify-center gap-2 font-medium whitespace-nowrap transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 ring-offset-bg disabled:opacity-50 disabled:pointer-events-none select-none",
13
13
  {
@@ -32,18 +32,18 @@ const oe = N(
32
32
  size: "md"
33
33
  }
34
34
  }
35
- ), le = d(
36
- ({ className: e, variant: r, size: t, fullWidth: a, ...o }, s) => /* @__PURE__ */ n(
35
+ ), ue = p(
36
+ ({ className: e, variant: r, size: t, fullWidth: n, ...o }, s) => /* @__PURE__ */ a(
37
37
  "button",
38
38
  {
39
39
  ref: s,
40
- className: i(oe({ variant: r, size: t, fullWidth: a }), e),
40
+ className: i(ce({ variant: r, size: t, fullWidth: n }), e),
41
41
  ...o
42
42
  }
43
43
  )
44
44
  );
45
- le.displayName = "Button";
46
- const se = N(
45
+ ue.displayName = "Button";
46
+ const fe = N(
47
47
  "flex w-full bg-bg-muted text-fg placeholder:text-fg-muted border border-transparent transition-colors outline-none rounded-lg focus-visible:border-border-strong disabled:opacity-50 disabled:pointer-events-none",
48
48
  {
49
49
  variants: {
@@ -59,26 +59,26 @@ const se = N(
59
59
  },
60
60
  defaultVariants: { size: "md", invalid: !1 }
61
61
  }
62
- ), ie = d(
63
- ({ className: e, size: r, invalid: t, label: a, id: o, ...s }, l) => {
64
- const c = o ?? (a ? a.toLowerCase().replace(/\s+/g, "-") : void 0), u = /* @__PURE__ */ n(
62
+ ), de = p(
63
+ ({ className: e, size: r, invalid: t, label: n, id: o, ...s }, l) => {
64
+ const c = o ?? (n ? n.toLowerCase().replace(/\s+/g, "-") : void 0), u = /* @__PURE__ */ a(
65
65
  "input",
66
66
  {
67
67
  ref: l,
68
68
  id: c,
69
- className: i(se({ size: r, invalid: t }), e),
69
+ className: i(fe({ size: r, invalid: t }), e),
70
70
  ...s
71
71
  }
72
72
  );
73
- return a ? /* @__PURE__ */ f("div", { className: "flex w-full flex-col gap-1.5", children: [
74
- /* @__PURE__ */ n("label", { htmlFor: c, className: "text-xs font-medium text-fg", children: a }),
73
+ return n ? /* @__PURE__ */ f("div", { className: "flex w-full flex-col gap-1.5", children: [
74
+ /* @__PURE__ */ a("label", { htmlFor: c, className: "text-xs font-medium text-fg", children: n }),
75
75
  u
76
76
  ] }) : u;
77
77
  }
78
78
  );
79
- ie.displayName = "Input";
80
- const ce = d(
81
- ({ className: e, ...r }, t) => /* @__PURE__ */ n(
79
+ de.displayName = "Input";
80
+ const me = p(
81
+ ({ className: e, ...r }, t) => /* @__PURE__ */ a(
82
82
  "div",
83
83
  {
84
84
  ref: t,
@@ -90,20 +90,20 @@ const ce = d(
90
90
  }
91
91
  )
92
92
  );
93
- ce.displayName = "Card";
94
- const ue = d(
95
- ({ className: e, ...r }, t) => /* @__PURE__ */ n("div", { ref: t, className: i("flex flex-col gap-1 p-6", e), ...r })
93
+ me.displayName = "Card";
94
+ const pe = p(
95
+ ({ className: e, ...r }, t) => /* @__PURE__ */ a("div", { ref: t, className: i("flex flex-col gap-1 p-6", e), ...r })
96
96
  );
97
- ue.displayName = "CardHeader";
98
- const fe = d(({ className: e, ...r }, t) => /* @__PURE__ */ n("h3", { ref: t, className: i("text-lg font-semibold text-fg", e), ...r }));
99
- fe.displayName = "CardTitle";
100
- const de = d(({ className: e, ...r }, t) => /* @__PURE__ */ n("p", { ref: t, className: i("text-sm text-fg-muted", e), ...r }));
101
- de.displayName = "CardDescription";
102
- const me = d(
103
- ({ className: e, ...r }, t) => /* @__PURE__ */ n("div", { ref: t, className: i("p-6 pt-0", e), ...r })
97
+ pe.displayName = "CardHeader";
98
+ const ge = p(({ className: e, ...r }, t) => /* @__PURE__ */ a("h3", { ref: t, className: i("text-lg font-semibold text-fg", e), ...r }));
99
+ ge.displayName = "CardTitle";
100
+ const be = p(({ className: e, ...r }, t) => /* @__PURE__ */ a("p", { ref: t, className: i("text-sm text-fg-muted", e), ...r }));
101
+ be.displayName = "CardDescription";
102
+ const he = p(
103
+ ({ className: e, ...r }, t) => /* @__PURE__ */ a("div", { ref: t, className: i("p-6 pt-0", e), ...r })
104
104
  );
105
- me.displayName = "CardContent";
106
- const pe = N(
105
+ he.displayName = "CardContent";
106
+ const ve = N(
107
107
  "relative inline-flex shrink-0 cursor-pointer items-center rounded-full transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 ring-offset-bg disabled:cursor-not-allowed disabled:opacity-50",
108
108
  {
109
109
  variants: {
@@ -112,7 +112,7 @@ const pe = N(
112
112
  },
113
113
  defaultVariants: { size: "md", checked: !1 }
114
114
  }
115
- ), ge = N(
115
+ ), xe = N(
116
116
  "pointer-events-none absolute left-0.5 inline-block rounded-full bg-fg-on-brand shadow-sm transition-transform",
117
117
  {
118
118
  variants: {
@@ -125,10 +125,10 @@ const pe = N(
125
125
  ],
126
126
  defaultVariants: { size: "md", checked: !1 }
127
127
  }
128
- ), be = d(
129
- ({ className: e, size: r, checked: t, defaultChecked: a, onCheckedChange: o, disabled: s, ...l }, c) => {
130
- const u = t !== void 0, [p, m] = b(a ?? !1), g = u ? t : p;
131
- return /* @__PURE__ */ n(
128
+ ), we = p(
129
+ ({ className: e, size: r, checked: t, defaultChecked: n, onCheckedChange: o, disabled: s, ...l }, c) => {
130
+ const u = t !== void 0, [d, m] = b(n ?? !1), g = u ? t : d;
131
+ return /* @__PURE__ */ a(
132
132
  "button",
133
133
  {
134
134
  ref: c,
@@ -137,42 +137,42 @@ const pe = N(
137
137
  "aria-checked": g,
138
138
  disabled: s,
139
139
  onClick: () => {
140
- const w = !g;
141
- u || m(w), o == null || o(w);
140
+ const x = !g;
141
+ u || m(x), o == null || o(x);
142
142
  },
143
- className: i(pe({ size: r, checked: g }), e),
143
+ className: i(ve({ size: r, checked: g }), e),
144
144
  ...l,
145
- children: /* @__PURE__ */ n("span", { className: ge({ size: r, checked: g }) })
145
+ children: /* @__PURE__ */ a("span", { className: xe({ size: r, checked: g }) })
146
146
  }
147
147
  );
148
148
  }
149
149
  );
150
- be.displayName = "Switch";
151
- const he = d(
152
- ({ className: e, label: r, indeterminate: t = !1, disabled: a, id: o, ...s }, l) => {
153
- const c = k(null);
150
+ we.displayName = "Switch";
151
+ const ye = p(
152
+ ({ className: e, label: r, indeterminate: t = !1, disabled: n, id: o, ...s }, l) => {
153
+ const c = T(null);
154
154
  y(() => {
155
155
  c.current && (c.current.indeterminate = t);
156
156
  }, [t]);
157
- const u = (p) => {
158
- c.current = p, typeof l == "function" ? l(p) : l && (l.current = p);
157
+ const u = (d) => {
158
+ c.current = d, typeof l == "function" ? l(d) : l && (l.current = d);
159
159
  };
160
160
  return /* @__PURE__ */ f(
161
161
  "label",
162
162
  {
163
163
  className: i(
164
164
  "relative inline-flex items-center gap-2 select-none",
165
- a ? "cursor-not-allowed opacity-50" : "cursor-pointer",
165
+ n ? "cursor-not-allowed opacity-50" : "cursor-pointer",
166
166
  e
167
167
  ),
168
168
  children: [
169
- /* @__PURE__ */ n(
169
+ /* @__PURE__ */ a(
170
170
  "input",
171
171
  {
172
172
  ref: u,
173
173
  id: o,
174
174
  type: "checkbox",
175
- disabled: a,
175
+ disabled: n,
176
176
  className: "peer sr-only",
177
177
  ...s
178
178
  }
@@ -191,7 +191,7 @@ const he = d(
191
191
  "peer-indeterminate:[&>span]:opacity-100"
192
192
  ),
193
193
  children: [
194
- /* @__PURE__ */ n(
194
+ /* @__PURE__ */ a(
195
195
  "svg",
196
196
  {
197
197
  viewBox: "0 0 16 16",
@@ -202,44 +202,44 @@ const he = d(
202
202
  strokeLinecap: "round",
203
203
  strokeLinejoin: "round",
204
204
  "aria-hidden": !0,
205
- children: /* @__PURE__ */ n("path", { d: "M3.5 8.5l3 3 6-6.5" })
205
+ children: /* @__PURE__ */ a("path", { d: "M3.5 8.5l3 3 6-6.5" })
206
206
  }
207
207
  ),
208
- /* @__PURE__ */ n("span", { className: "absolute h-0.5 w-2.5 rounded-full bg-fg-on-brand opacity-0" })
208
+ /* @__PURE__ */ a("span", { className: "absolute h-0.5 w-2.5 rounded-full bg-fg-on-brand opacity-0" })
209
209
  ]
210
210
  }
211
211
  ),
212
- r && /* @__PURE__ */ n("span", { className: "text-sm text-fg", children: r })
212
+ r && /* @__PURE__ */ a("span", { className: "text-sm text-fg", children: r })
213
213
  ]
214
214
  }
215
215
  );
216
216
  }
217
217
  );
218
- he.displayName = "Checkbox";
219
- const j = C(null);
220
- function Xe({
218
+ ye.displayName = "Checkbox";
219
+ const q = C(null);
220
+ function or({
221
221
  value: e,
222
222
  defaultValue: r,
223
223
  onValueChange: t,
224
- name: a,
224
+ name: n,
225
225
  className: o,
226
226
  children: s,
227
227
  ...l
228
228
  }) {
229
- const c = B(), u = e !== void 0, [p, m] = b(r), g = u ? e : p, x = (w) => {
230
- u || m(w), t == null || t(w);
229
+ const c = H(), u = e !== void 0, [d, m] = b(r), g = u ? e : d, v = (x) => {
230
+ u || m(x), t == null || t(x);
231
231
  };
232
- return /* @__PURE__ */ n(
233
- j.Provider,
232
+ return /* @__PURE__ */ a(
233
+ q.Provider,
234
234
  {
235
- value: { name: a ?? c, value: g, onChange: x },
236
- children: /* @__PURE__ */ n("div", { role: "radiogroup", className: i("flex flex-col gap-2", o), ...l, children: s })
235
+ value: { name: n ?? c, value: g, onChange: v },
236
+ children: /* @__PURE__ */ a("div", { role: "radiogroup", className: i("flex flex-col gap-2", o), ...l, children: s })
237
237
  }
238
238
  );
239
239
  }
240
- const ve = d(
241
- ({ className: e, value: r, label: t, disabled: a, ...o }, s) => {
242
- const l = v(j);
240
+ const Ce = p(
241
+ ({ className: e, value: r, label: t, disabled: n, ...o }, s) => {
242
+ const l = w(q);
243
243
  if (!l) throw new Error("<Radio> precisa estar dentro de <RadioGroup>");
244
244
  const c = l.value === r;
245
245
  return /* @__PURE__ */ f(
@@ -247,11 +247,11 @@ const ve = d(
247
247
  {
248
248
  className: i(
249
249
  "inline-flex items-center gap-2 select-none",
250
- a ? "cursor-not-allowed opacity-50" : "cursor-pointer",
250
+ n ? "cursor-not-allowed opacity-50" : "cursor-pointer",
251
251
  e
252
252
  ),
253
253
  children: [
254
- /* @__PURE__ */ n(
254
+ /* @__PURE__ */ a(
255
255
  "input",
256
256
  {
257
257
  ref: s,
@@ -259,13 +259,13 @@ const ve = d(
259
259
  name: l.name,
260
260
  value: r,
261
261
  checked: c,
262
- disabled: a,
262
+ disabled: n,
263
263
  onChange: () => l.onChange(r),
264
264
  className: "peer sr-only",
265
265
  ...o
266
266
  }
267
267
  ),
268
- /* @__PURE__ */ n(
268
+ /* @__PURE__ */ a(
269
269
  "span",
270
270
  {
271
271
  className: i(
@@ -274,44 +274,44 @@ const ve = d(
274
274
  "peer-focus-visible:ring-2 peer-focus-visible:ring-primary peer-focus-visible:ring-offset-2 ring-offset-bg",
275
275
  "peer-checked:[&>span]:scale-100"
276
276
  ),
277
- children: /* @__PURE__ */ n("span", { className: "h-2.5 w-2.5 scale-0 rounded-full bg-primary transition-transform" })
277
+ children: /* @__PURE__ */ a("span", { className: "h-2.5 w-2.5 scale-0 rounded-full bg-primary transition-transform" })
278
278
  }
279
279
  ),
280
- t && /* @__PURE__ */ n("span", { className: "text-sm text-fg", children: t })
280
+ t && /* @__PURE__ */ a("span", { className: "text-sm text-fg", children: t })
281
281
  ]
282
282
  }
283
283
  );
284
284
  }
285
285
  );
286
- ve.displayName = "Radio";
287
- const xe = N(
288
- "w-full appearance-none bg-bg text-fg border transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-1 ring-offset-bg disabled:opacity-50 disabled:pointer-events-none rounded-md pr-9",
286
+ Ce.displayName = "Radio";
287
+ const Ne = N(
288
+ "w-full appearance-none bg-bg-muted text-fg border border-transparent transition-colors outline-none focus-visible:border-border-strong disabled:opacity-50 disabled:pointer-events-none rounded-lg pr-9",
289
289
  {
290
290
  variants: {
291
291
  size: {
292
- sm: "h-8 pl-3 text-sm",
293
- md: "h-10 pl-3 text-md",
294
- lg: "h-12 pl-4 text-lg"
292
+ sm: "h-8 pl-3 text-xs",
293
+ md: "h-10 pl-3 text-sm",
294
+ lg: "h-12 pl-4 text-md"
295
295
  },
296
296
  invalid: {
297
- true: "border-danger focus-visible:ring-danger",
298
- false: "border-border-strong"
297
+ true: "border-danger!",
298
+ false: ""
299
299
  }
300
300
  },
301
301
  defaultVariants: { size: "md", invalid: !1 }
302
302
  }
303
- ), we = d(
304
- ({ className: e, size: r, invalid: t, children: a, ...o }, s) => /* @__PURE__ */ f("div", { className: "relative inline-flex w-full items-center", children: [
305
- /* @__PURE__ */ n(
303
+ ), Ve = p(
304
+ ({ className: e, size: r, invalid: t, children: n, ...o }, s) => /* @__PURE__ */ f("div", { className: "relative inline-flex w-full items-center", children: [
305
+ /* @__PURE__ */ a(
306
306
  "select",
307
307
  {
308
308
  ref: s,
309
- className: i(xe({ size: r, invalid: t }), e),
309
+ className: i(Ne({ size: r, invalid: t }), e),
310
310
  ...o,
311
- children: a
311
+ children: n
312
312
  }
313
313
  ),
314
- /* @__PURE__ */ n(
314
+ /* @__PURE__ */ a(
315
315
  "svg",
316
316
  {
317
317
  viewBox: "0 0 16 16",
@@ -322,47 +322,47 @@ const xe = N(
322
322
  strokeLinecap: "round",
323
323
  strokeLinejoin: "round",
324
324
  "aria-hidden": !0,
325
- children: /* @__PURE__ */ n("path", { d: "M4 6l4 4 4-4" })
325
+ children: /* @__PURE__ */ a("path", { d: "M4 6l4 4 4-4" })
326
326
  }
327
327
  )
328
328
  ] })
329
329
  );
330
- we.displayName = "Select";
331
- const R = C(null);
332
- function T() {
333
- const e = v(R);
330
+ Ve.displayName = "Select";
331
+ const G = C(null);
332
+ function L() {
333
+ const e = w(G);
334
334
  if (!e) throw new Error("Componentes de Dropdown precisam estar dentro de <Dropdown>");
335
335
  return e;
336
336
  }
337
- function Ze({ children: e }) {
338
- const [r, t] = b(!1), a = k(null);
337
+ function lr({ children: e }) {
338
+ const [r, t] = b(!1), n = T(null);
339
339
  return y(() => {
340
340
  if (!r) return;
341
341
  const o = (l) => {
342
- a.current && !a.current.contains(l.target) && t(!1);
342
+ n.current && !n.current.contains(l.target) && t(!1);
343
343
  }, s = (l) => {
344
344
  l.key === "Escape" && t(!1);
345
345
  };
346
346
  return document.addEventListener("mousedown", o), document.addEventListener("keydown", s), () => {
347
347
  document.removeEventListener("mousedown", o), document.removeEventListener("keydown", s);
348
348
  };
349
- }, [r]), /* @__PURE__ */ n(R.Provider, { value: { open: r, setOpen: t }, children: /* @__PURE__ */ n("div", { ref: a, className: "relative inline-block text-left", children: e }) });
349
+ }, [r]), /* @__PURE__ */ a(G.Provider, { value: { open: r, setOpen: t }, children: /* @__PURE__ */ a("div", { ref: n, className: "relative inline-block text-left", children: e }) });
350
350
  }
351
- function er({ children: e }) {
352
- const { open: r, setOpen: t } = T();
353
- return I(e, {
351
+ function sr({ children: e }) {
352
+ const { open: r, setOpen: t } = L();
353
+ return K(e, {
354
354
  onClick: () => t(!r),
355
355
  "aria-haspopup": "menu",
356
356
  "aria-expanded": r
357
357
  });
358
358
  }
359
- function rr({
359
+ function ir({
360
360
  children: e,
361
361
  align: r = "start",
362
362
  className: t
363
363
  }) {
364
- const { open: a } = T();
365
- return a ? /* @__PURE__ */ n(
364
+ const { open: n } = L();
365
+ return n ? /* @__PURE__ */ a(
366
366
  "div",
367
367
  {
368
368
  role: "menu",
@@ -375,15 +375,15 @@ function rr({
375
375
  }
376
376
  ) : null;
377
377
  }
378
- function tr({
378
+ function cr({
379
379
  children: e,
380
380
  onSelect: r,
381
381
  destructive: t,
382
- className: a,
382
+ className: n,
383
383
  ...o
384
384
  }) {
385
- const { setOpen: s } = T();
386
- return /* @__PURE__ */ n(
385
+ const { setOpen: s } = L();
386
+ return /* @__PURE__ */ a(
387
387
  "button",
388
388
  {
389
389
  type: "button",
@@ -395,17 +395,17 @@ function tr({
395
395
  "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm outline-none transition-colors",
396
396
  "hover:bg-bg-muted focus-visible:bg-bg-muted disabled:opacity-50 disabled:pointer-events-none",
397
397
  t ? "text-danger" : "text-fg",
398
- a
398
+ n
399
399
  ),
400
400
  ...o,
401
401
  children: e
402
402
  }
403
403
  );
404
404
  }
405
- function ar() {
406
- return /* @__PURE__ */ n("div", { role: "separator", className: "my-1 h-px bg-border-default" });
405
+ function ur() {
406
+ return /* @__PURE__ */ a("div", { role: "separator", className: "my-1 h-px bg-border-default" });
407
407
  }
408
- const ye = N(
408
+ const ke = N(
409
409
  "inline-flex items-center gap-1 font-medium whitespace-nowrap rounded-full",
410
410
  {
411
411
  variants: {
@@ -426,18 +426,18 @@ const ye = N(
426
426
  },
427
427
  defaultVariants: { variant: "neutral", size: "sm" }
428
428
  }
429
- ), F = d(
430
- ({ className: e, variant: r, size: t, ...a }, o) => /* @__PURE__ */ n(
429
+ ), U = p(
430
+ ({ className: e, variant: r, size: t, ...n }, o) => /* @__PURE__ */ a(
431
431
  "span",
432
432
  {
433
433
  ref: o,
434
- className: i(ye({ variant: r, size: t }), e),
435
- ...a
434
+ className: i(ke({ variant: r, size: t }), e),
435
+ ...n
436
436
  }
437
437
  )
438
438
  );
439
- F.displayName = "Badge";
440
- const Ce = N("relative inline-flex shrink-0 select-none", {
439
+ U.displayName = "Badge";
440
+ const ze = N("relative inline-flex shrink-0 select-none", {
441
441
  variants: {
442
442
  size: {
443
443
  xs: "h-6 w-6 text-xs",
@@ -448,53 +448,53 @@ const Ce = N("relative inline-flex shrink-0 select-none", {
448
448
  }
449
449
  },
450
450
  defaultVariants: { size: "md" }
451
- }), Ne = {
451
+ }), Me = {
452
452
  online: "bg-accent",
453
453
  busy: "bg-danger",
454
454
  away: "bg-warning",
455
455
  offline: "bg-border-strong"
456
- }, Ve = {
456
+ }, Te = {
457
457
  xs: "h-1.5 w-1.5",
458
458
  sm: "h-2 w-2",
459
459
  md: "h-2.5 w-2.5",
460
460
  lg: "h-3 w-3",
461
461
  xl: "h-3.5 w-3.5"
462
462
  };
463
- function ke(e) {
463
+ function Ee(e) {
464
464
  return e ? e.trim().split(/\s+/).slice(0, 2).map((r) => {
465
465
  var t;
466
466
  return ((t = r[0]) == null ? void 0 : t.toUpperCase()) ?? "";
467
467
  }).join("") : "";
468
468
  }
469
- const ze = d(
470
- ({ className: e, size: r = "md", src: t, alt: a, name: o, status: s, ...l }, c) => {
471
- const [u, p] = b(!1), m = t && !u;
472
- return /* @__PURE__ */ f("span", { ref: c, className: i(Ce({ size: r }), e), ...l, children: [
473
- /* @__PURE__ */ n("span", { className: "flex h-full w-full items-center justify-center overflow-hidden rounded-full bg-bg-muted font-medium text-fg", children: m ? /* @__PURE__ */ n(
469
+ const De = p(
470
+ ({ className: e, size: r = "md", src: t, alt: n, name: o, status: s, ...l }, c) => {
471
+ const [u, d] = b(!1), m = t && !u;
472
+ return /* @__PURE__ */ f("span", { ref: c, className: i(ze({ size: r }), e), ...l, children: [
473
+ /* @__PURE__ */ a("span", { className: "flex h-full w-full items-center justify-center overflow-hidden rounded-full bg-bg-muted font-medium text-fg", children: m ? /* @__PURE__ */ a(
474
474
  "img",
475
475
  {
476
476
  src: t,
477
- alt: a ?? o ?? "",
477
+ alt: n ?? o ?? "",
478
478
  className: "h-full w-full object-cover",
479
- onError: () => p(!0)
479
+ onError: () => d(!0)
480
480
  }
481
- ) : /* @__PURE__ */ n("span", { "aria-hidden": !0, children: ke(o) }) }),
482
- s && /* @__PURE__ */ n(
481
+ ) : /* @__PURE__ */ a("span", { "aria-hidden": !0, children: Ee(o) }) }),
482
+ s && /* @__PURE__ */ a(
483
483
  "span",
484
484
  {
485
485
  "aria-label": s,
486
486
  className: i(
487
487
  "absolute bottom-[8%] right-[8%] rounded-full ring-2 ring-bg",
488
- Ne[s],
489
- Ve[r ?? "md"]
488
+ Me[s],
489
+ Te[r ?? "md"]
490
490
  )
491
491
  }
492
492
  )
493
493
  ] });
494
494
  }
495
495
  );
496
- ze.displayName = "Avatar";
497
- const Te = N("animate-spin text-primary", {
496
+ De.displayName = "Avatar";
497
+ const Pe = N("animate-spin text-primary", {
498
498
  variants: {
499
499
  size: {
500
500
  sm: "h-4 w-4",
@@ -503,8 +503,8 @@ const Te = N("animate-spin text-primary", {
503
503
  }
504
504
  },
505
505
  defaultVariants: { size: "md" }
506
- }), Ee = d(
507
- ({ className: e, size: r, label: t = "Carregando", ...a }, o) => /* @__PURE__ */ f(
506
+ }), Le = p(
507
+ ({ className: e, size: r, label: t = "Carregando", ...n }, o) => /* @__PURE__ */ f(
508
508
  "svg",
509
509
  {
510
510
  ref: o,
@@ -512,11 +512,11 @@ const Te = N("animate-spin text-primary", {
512
512
  fill: "none",
513
513
  role: "status",
514
514
  "aria-label": t,
515
- className: i(Te({ size: r }), e),
516
- ...a,
515
+ className: i(Pe({ size: r }), e),
516
+ ...n,
517
517
  children: [
518
- /* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "3", className: "opacity-20" }),
519
- /* @__PURE__ */ n(
518
+ /* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "3", className: "opacity-20" }),
519
+ /* @__PURE__ */ a(
520
520
  "path",
521
521
  {
522
522
  d: "M12 2a10 10 0 0 1 10 10",
@@ -529,24 +529,24 @@ const Te = N("animate-spin text-primary", {
529
529
  }
530
530
  )
531
531
  );
532
- Ee.displayName = "Spinner";
533
- const Me = d(
534
- ({ className: e, value: r = 0, max: t = 100, indeterminate: a, ...o }, s) => {
532
+ Le.displayName = "Spinner";
533
+ const Ie = p(
534
+ ({ className: e, value: r = 0, max: t = 100, indeterminate: n, ...o }, s) => {
535
535
  const l = Math.min(100, Math.max(0, r / t * 100));
536
- return /* @__PURE__ */ n(
536
+ return /* @__PURE__ */ a(
537
537
  "div",
538
538
  {
539
539
  ref: s,
540
540
  role: "progressbar",
541
541
  "aria-valuemin": 0,
542
542
  "aria-valuemax": t,
543
- "aria-valuenow": a ? void 0 : r,
543
+ "aria-valuenow": n ? void 0 : r,
544
544
  className: i(
545
545
  "relative h-2 w-full overflow-hidden rounded-full bg-bg-muted",
546
546
  e
547
547
  ),
548
548
  ...o,
549
- children: a ? /* @__PURE__ */ n("div", { className: "absolute inset-y-0 w-1/3 rounded-full bg-primary animate-[flui-indeterminate_1.2s_ease-in-out_infinite]" }) : /* @__PURE__ */ n(
549
+ children: n ? /* @__PURE__ */ a("div", { className: "absolute inset-y-0 w-1/3 rounded-full bg-primary animate-[flui-indeterminate_1.2s_ease-in-out_infinite]" }) : /* @__PURE__ */ a(
550
550
  "div",
551
551
  {
552
552
  className: "h-full rounded-full bg-primary transition-[width] duration-300",
@@ -557,16 +557,16 @@ const Me = d(
557
557
  );
558
558
  }
559
559
  );
560
- Me.displayName = "Progress";
561
- const De = d(
562
- ({ className: e, orientation: r = "horizontal", label: t, ...a }, o) => r === "vertical" ? /* @__PURE__ */ n(
560
+ Ie.displayName = "Progress";
561
+ const _e = p(
562
+ ({ className: e, orientation: r = "horizontal", label: t, ...n }, o) => r === "vertical" ? /* @__PURE__ */ a(
563
563
  "div",
564
564
  {
565
565
  ref: o,
566
566
  role: "separator",
567
567
  "aria-orientation": "vertical",
568
568
  className: i("mx-2 h-full w-px self-stretch bg-border-default", e),
569
- ...a
569
+ ...n
570
570
  }
571
571
  ) : t ? /* @__PURE__ */ f(
572
572
  "div",
@@ -574,79 +574,79 @@ const De = d(
574
574
  ref: o,
575
575
  role: "separator",
576
576
  className: i("flex items-center gap-3 text-sm text-fg-muted", e),
577
- ...a,
577
+ ...n,
578
578
  children: [
579
- /* @__PURE__ */ n("span", { className: "h-px flex-1 bg-border-default" }),
579
+ /* @__PURE__ */ a("span", { className: "h-px flex-1 bg-border-default" }),
580
580
  t,
581
- /* @__PURE__ */ n("span", { className: "h-px flex-1 bg-border-default" })
581
+ /* @__PURE__ */ a("span", { className: "h-px flex-1 bg-border-default" })
582
582
  ]
583
583
  }
584
- ) : /* @__PURE__ */ n(
584
+ ) : /* @__PURE__ */ a(
585
585
  "div",
586
586
  {
587
587
  ref: o,
588
588
  role: "separator",
589
589
  "aria-orientation": "horizontal",
590
590
  className: i("h-px w-full bg-border-default", e),
591
- ...a
591
+ ...n
592
592
  }
593
593
  )
594
594
  );
595
- De.displayName = "Divider";
596
- const Pe = d(
597
- ({ className: e, children: r, ...t }, a) => {
598
- const o = Z.toArray(r);
599
- return /* @__PURE__ */ n("nav", { ref: a, "aria-label": "breadcrumb", className: e, ...t, children: /* @__PURE__ */ n("ol", { className: "flex flex-wrap items-center gap-1.5 text-sm", children: o.map((s, l) => /* @__PURE__ */ f(ee, { children: [
595
+ _e.displayName = "Divider";
596
+ const Ae = p(
597
+ ({ className: e, children: r, ...t }, n) => {
598
+ const o = ae.toArray(r);
599
+ return /* @__PURE__ */ a("nav", { ref: n, "aria-label": "breadcrumb", className: e, ...t, children: /* @__PURE__ */ a("ol", { className: "flex flex-wrap items-center gap-1.5 text-sm", children: o.map((s, l) => /* @__PURE__ */ f(ne, { children: [
600
600
  s,
601
- l < o.length - 1 && /* @__PURE__ */ n(Le, {})
601
+ l < o.length - 1 && /* @__PURE__ */ a(Be, {})
602
602
  ] }, l)) }) });
603
603
  }
604
604
  );
605
- Pe.displayName = "Breadcrumb";
606
- function nr({
605
+ Ae.displayName = "Breadcrumb";
606
+ function fr({
607
607
  href: e,
608
608
  current: r,
609
609
  className: t,
610
- children: a,
610
+ children: n,
611
611
  ...o
612
612
  }) {
613
- return /* @__PURE__ */ n("li", { className: i("inline-flex items-center", t), ...o, children: r || !e ? /* @__PURE__ */ n(
613
+ return /* @__PURE__ */ a("li", { className: i("inline-flex items-center", t), ...o, children: r || !e ? /* @__PURE__ */ a(
614
614
  "span",
615
615
  {
616
616
  "aria-current": r ? "page" : void 0,
617
617
  className: i(r ? "font-medium text-fg" : "text-fg-muted"),
618
- children: a
618
+ children: n
619
619
  }
620
- ) : /* @__PURE__ */ n(
620
+ ) : /* @__PURE__ */ a(
621
621
  "a",
622
622
  {
623
623
  href: e,
624
624
  className: "text-fg-muted transition-colors hover:text-fg hover:underline",
625
- children: a
625
+ children: n
626
626
  }
627
627
  ) });
628
628
  }
629
- function Le() {
630
- return /* @__PURE__ */ n("li", { "aria-hidden": !0, className: "text-fg-muted", children: "/" });
629
+ function Be() {
630
+ return /* @__PURE__ */ a("li", { "aria-hidden": !0, className: "text-fg-muted", children: "/" });
631
631
  }
632
- function Ae(e, r = 1e3) {
633
- const [t, a] = b(0);
632
+ function je(e, r = 1e3) {
633
+ const [t, n] = b(0);
634
634
  return y(() => {
635
- a(0);
635
+ n(0);
636
636
  const o = performance.now(), s = (l) => {
637
637
  const c = Math.min((l - o) / r, 1), u = 1 - (1 - c) ** 4;
638
- a(e * u), c < 1 ? requestAnimationFrame(s) : a(e);
638
+ n(e * u), c < 1 ? requestAnimationFrame(s) : n(e);
639
639
  };
640
640
  requestAnimationFrame(s);
641
641
  }, [e, r]), t;
642
642
  }
643
- const _e = d(
644
- ({ className: e, label: r, value: t, countUp: a, formatCount: o, delta: s, helpText: l, icon: c, ...u }, p) => {
645
- const m = Ae(a ?? 0), g = typeof s == "number", x = g && s >= 0, w = a !== void 0 ? o ? o(m) : Math.round(m).toLocaleString("pt-BR") : t;
643
+ const Se = p(
644
+ ({ className: e, label: r, value: t, countUp: n, formatCount: o, delta: s, helpText: l, icon: c, ...u }, d) => {
645
+ const m = je(n ?? 0), g = typeof s == "number", v = g && s >= 0, x = n !== void 0 ? o ? o(m) : Math.round(m).toLocaleString("pt-BR") : t;
646
646
  return /* @__PURE__ */ f(
647
647
  "div",
648
648
  {
649
- ref: p,
649
+ ref: d,
650
650
  className: i(
651
651
  "flex flex-col gap-2 rounded-xl bg-bg-muted dark:bg-bg-subtle p-8 shadow-sm",
652
652
  e
@@ -654,24 +654,24 @@ const _e = d(
654
654
  ...u,
655
655
  children: [
656
656
  /* @__PURE__ */ f("div", { className: "flex items-center justify-between", children: [
657
- /* @__PURE__ */ n("span", { className: "text-sm text-fg-muted", children: r }),
658
- c && /* @__PURE__ */ n("span", { className: "text-fg-muted", children: c })
657
+ /* @__PURE__ */ a("span", { className: "text-sm text-fg-muted", children: r }),
658
+ c && /* @__PURE__ */ a("span", { className: "text-fg-muted", children: c })
659
659
  ] }),
660
- /* @__PURE__ */ n("span", { className: "text-3xl font-bold text-fg whitespace-nowrap tabular-nums", children: w }),
661
- g && /* @__PURE__ */ f(F, { variant: x ? "success" : "danger", size: "sm", className: "self-start", children: [
662
- x ? "▲" : "▼",
660
+ /* @__PURE__ */ a("span", { className: "text-3xl font-bold text-fg whitespace-nowrap tabular-nums", children: x }),
661
+ g && /* @__PURE__ */ f(U, { variant: v ? "success" : "danger", size: "sm", className: "self-start", children: [
662
+ v ? "▲" : "▼",
663
663
  " ",
664
664
  Math.abs(s),
665
665
  "%"
666
666
  ] }),
667
- l && /* @__PURE__ */ n("span", { className: "text-xs text-fg-muted", children: l })
667
+ l && /* @__PURE__ */ a("span", { className: "text-xs text-fg-muted", children: l })
668
668
  ]
669
669
  }
670
670
  );
671
671
  }
672
672
  );
673
- _e.displayName = "StatCard";
674
- const Se = N("flex gap-3 rounded-lg p-4 text-sm", {
673
+ Se.displayName = "StatCard";
674
+ const Re = N("flex gap-3 rounded-lg p-4 text-sm", {
675
675
  variants: {
676
676
  variant: {
677
677
  info: "bg-primary/10 text-fg",
@@ -681,47 +681,47 @@ const Se = N("flex gap-3 rounded-lg p-4 text-sm", {
681
681
  }
682
682
  },
683
683
  defaultVariants: { variant: "info" }
684
- }), Be = {
684
+ }), Fe = {
685
685
  info: "text-primary",
686
686
  success: "text-success-fg",
687
687
  warning: "text-warning",
688
688
  danger: "text-danger"
689
- }, Ie = {
689
+ }, We = {
690
690
  info: "ℹ",
691
691
  success: "✓",
692
692
  warning: "!",
693
693
  danger: "✕"
694
- }, je = d(
695
- ({ className: e, variant: r = "info", title: t, onClose: a, children: o, ...s }, l) => {
694
+ }, He = p(
695
+ ({ className: e, variant: r = "info", title: t, onClose: n, children: o, ...s }, l) => {
696
696
  const c = r ?? "info";
697
697
  return /* @__PURE__ */ f(
698
698
  "div",
699
699
  {
700
700
  ref: l,
701
701
  role: "alert",
702
- className: i(Se({ variant: r }), e),
702
+ className: i(Re({ variant: r }), e),
703
703
  ...s,
704
704
  children: [
705
- /* @__PURE__ */ n(
705
+ /* @__PURE__ */ a(
706
706
  "span",
707
707
  {
708
708
  "aria-hidden": !0,
709
709
  className: i(
710
710
  "flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-xs font-bold",
711
- Be[c]
711
+ Fe[c]
712
712
  ),
713
- children: Ie[c]
713
+ children: We[c]
714
714
  }
715
715
  ),
716
716
  /* @__PURE__ */ f("div", { className: "min-w-0 flex-1", children: [
717
- t && /* @__PURE__ */ n("div", { className: "font-semibold text-fg", children: t }),
718
- o && /* @__PURE__ */ n("div", { className: "text-fg-muted", children: o })
717
+ t && /* @__PURE__ */ a("div", { className: "font-semibold text-fg", children: t }),
718
+ o && /* @__PURE__ */ a("div", { className: "text-fg-muted", children: o })
719
719
  ] }),
720
- a && /* @__PURE__ */ n(
720
+ n && /* @__PURE__ */ a(
721
721
  "button",
722
722
  {
723
723
  type: "button",
724
- onClick: a,
724
+ onClick: n,
725
725
  "aria-label": "Fechar",
726
726
  className: "shrink-0 rounded-sm px-1 text-fg-muted transition-colors hover:text-fg",
727
727
  children: "✕"
@@ -732,49 +732,49 @@ const Se = N("flex gap-3 rounded-lg p-4 text-sm", {
732
732
  );
733
733
  }
734
734
  );
735
- je.displayName = "Alert";
736
- function Re({
735
+ He.displayName = "Alert";
736
+ function Ke({
737
737
  value: e,
738
738
  defaultValue: r,
739
739
  onChange: t
740
740
  }) {
741
- const a = e !== void 0, [o, s] = b(r), l = a ? e : o, c = V(
741
+ const n = e !== void 0, [o, s] = b(r), l = n ? e : o, c = M(
742
742
  (u) => {
743
- a || s(u), t == null || t(u);
743
+ n || s(u), t == null || t(u);
744
744
  },
745
- [a, t]
745
+ [n, t]
746
746
  );
747
747
  return [l, c];
748
748
  }
749
- const H = C(null);
750
- function E() {
751
- const e = v(H);
749
+ const O = C(null);
750
+ function I() {
751
+ const e = w(O);
752
752
  if (!e) throw new Error("Componentes de Tabs precisam estar dentro de <Tabs>");
753
753
  return e;
754
754
  }
755
- function or({
755
+ function dr({
756
756
  value: e,
757
757
  defaultValue: r,
758
758
  onValueChange: t,
759
- className: a,
759
+ className: n,
760
760
  children: o,
761
761
  ...s
762
762
  }) {
763
- const [l, c] = Re({
763
+ const [l, c] = Ke({
764
764
  value: e,
765
765
  defaultValue: r ?? "",
766
766
  onChange: t
767
767
  });
768
- return /* @__PURE__ */ n(H.Provider, { value: { value: l, setValue: c }, children: /* @__PURE__ */ n("div", { className: a, ...s, children: o }) });
768
+ return /* @__PURE__ */ a(O.Provider, { value: { value: l, setValue: c }, children: /* @__PURE__ */ a("div", { className: n, ...s, children: o }) });
769
769
  }
770
- function lr({ className: e, children: r, ...t }) {
771
- const { value: a } = E(), o = k(null), [s, l] = b({ left: 0, width: 0, ready: !1 });
770
+ function mr({ className: e, children: r, ...t }) {
771
+ const { value: n } = I(), o = T(null), [s, l] = b({ left: 0, width: 0, ready: !1 });
772
772
  return y(() => {
773
773
  const c = o.current;
774
774
  if (!c) return;
775
775
  const u = c.querySelector('[aria-selected="true"]');
776
776
  u && l({ left: u.offsetLeft, width: u.offsetWidth, ready: !0 });
777
- }, [a]), /* @__PURE__ */ f(
777
+ }, [n]), /* @__PURE__ */ f(
778
778
  "div",
779
779
  {
780
780
  ref: o,
@@ -783,7 +783,7 @@ function lr({ className: e, children: r, ...t }) {
783
783
  ...t,
784
784
  children: [
785
785
  r,
786
- s.ready && /* @__PURE__ */ n(
786
+ s.ready && /* @__PURE__ */ a(
787
787
  "span",
788
788
  {
789
789
  "aria-hidden": !0,
@@ -795,15 +795,15 @@ function lr({ className: e, children: r, ...t }) {
795
795
  }
796
796
  );
797
797
  }
798
- function sr({ value: e, className: r, ...t }) {
799
- const a = E(), o = a.value === e;
800
- return /* @__PURE__ */ n(
798
+ function pr({ value: e, className: r, ...t }) {
799
+ const n = I(), o = n.value === e;
800
+ return /* @__PURE__ */ a(
801
801
  "button",
802
802
  {
803
803
  type: "button",
804
804
  role: "tab",
805
805
  "aria-selected": o,
806
- onClick: () => a.setValue(e),
806
+ onClick: () => n.setValue(e),
807
807
  className: i(
808
808
  "px-4 py-2 text-sm font-medium transition-colors outline-none",
809
809
  "focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 ring-offset-bg",
@@ -814,8 +814,8 @@ function sr({ value: e, className: r, ...t }) {
814
814
  }
815
815
  );
816
816
  }
817
- function ir({ value: e, className: r, ...t }) {
818
- return E().value !== e ? null : /* @__PURE__ */ n(
817
+ function gr({ value: e, className: r, ...t }) {
818
+ return I().value !== e ? null : /* @__PURE__ */ a(
819
819
  "div",
820
820
  {
821
821
  role: "tabpanel",
@@ -824,47 +824,47 @@ function ir({ value: e, className: r, ...t }) {
824
824
  }
825
825
  );
826
826
  }
827
- const W = C(null), M = C("");
828
- function K() {
829
- const e = v(W);
827
+ const Y = C(null), _ = C("");
828
+ function $() {
829
+ const e = w(Y);
830
830
  if (!e) throw new Error("Componentes de Accordion precisam estar dentro de <Accordion>");
831
831
  return e;
832
832
  }
833
- function cr({
833
+ function br({
834
834
  type: e = "single",
835
835
  defaultValue: r,
836
836
  className: t,
837
- children: a,
837
+ children: n,
838
838
  ...o
839
839
  }) {
840
- const s = r ? Array.isArray(r) ? r : [r] : [], [l, c] = b(s), u = (p) => c((m) => {
841
- const g = m.includes(p);
842
- return e === "single" ? g ? [] : [p] : g ? m.filter((x) => x !== p) : [...m, p];
840
+ const s = r ? Array.isArray(r) ? r : [r] : [], [l, c] = b(s), u = (d) => c((m) => {
841
+ const g = m.includes(d);
842
+ return e === "single" ? g ? [] : [d] : g ? m.filter((v) => v !== d) : [...m, d];
843
843
  });
844
- return /* @__PURE__ */ n(W.Provider, { value: { open: l, toggle: u }, children: /* @__PURE__ */ n(
844
+ return /* @__PURE__ */ a(Y.Provider, { value: { open: l, toggle: u }, children: /* @__PURE__ */ a(
845
845
  "div",
846
846
  {
847
847
  className: i("border-y border-border-default divide-y divide-border-default", t),
848
848
  ...o,
849
- children: a
849
+ children: n
850
850
  }
851
851
  ) });
852
852
  }
853
- function ur({ value: e, children: r, ...t }) {
854
- return /* @__PURE__ */ n(M.Provider, { value: e, children: /* @__PURE__ */ n("div", { ...t, children: r }) });
853
+ function hr({ value: e, children: r, ...t }) {
854
+ return /* @__PURE__ */ a(_.Provider, { value: e, children: /* @__PURE__ */ a("div", { ...t, children: r }) });
855
855
  }
856
- function fr({
856
+ function vr({
857
857
  className: e,
858
858
  children: r,
859
859
  ...t
860
860
  }) {
861
- const a = K(), o = v(M), s = a.open.includes(o);
861
+ const n = $(), o = w(_), s = n.open.includes(o);
862
862
  return /* @__PURE__ */ f(
863
863
  "button",
864
864
  {
865
865
  type: "button",
866
866
  "aria-expanded": s,
867
- onClick: () => a.toggle(o),
867
+ onClick: () => n.toggle(o),
868
868
  className: i(
869
869
  "flex w-full items-center justify-between gap-2 py-4 text-left text-sm font-medium text-fg outline-none",
870
870
  "focus-visible:ring-2 focus-visible:ring-primary ring-offset-bg",
@@ -873,26 +873,26 @@ function fr({
873
873
  ...t,
874
874
  children: [
875
875
  r,
876
- /* @__PURE__ */ n("span", { className: i("text-fg-muted transition-transform", s && "rotate-180"), children: "▾" })
876
+ /* @__PURE__ */ a("span", { className: i("text-fg-muted transition-transform", s && "rotate-180"), children: "▾" })
877
877
  ]
878
878
  }
879
879
  );
880
880
  }
881
- function dr({
881
+ function xr({
882
882
  className: e,
883
883
  ...r
884
884
  }) {
885
- const t = K(), a = v(M);
886
- return t.open.includes(a) ? /* @__PURE__ */ n("div", { className: i("pb-4 text-sm text-fg-muted", e), ...r }) : null;
885
+ const t = $(), n = w(_);
886
+ return t.open.includes(n) ? /* @__PURE__ */ a("div", { className: i("pb-4 text-sm text-fg-muted", e), ...r }) : null;
887
887
  }
888
- const Fe = {
888
+ const qe = {
889
889
  top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
890
890
  bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
891
891
  left: "right-full top-1/2 -translate-y-1/2 mr-2",
892
892
  right: "left-full top-1/2 -translate-y-1/2 ml-2"
893
893
  };
894
- function mr({ content: e, side: r = "top", children: t, className: a }) {
895
- const [o, s] = b(!1), l = B();
894
+ function wr({ content: e, side: r = "top", children: t, className: n }) {
895
+ const [o, s] = b(!1), l = H();
896
896
  return /* @__PURE__ */ f(
897
897
  "span",
898
898
  {
@@ -902,8 +902,8 @@ function mr({ content: e, side: r = "top", children: t, className: a }) {
902
902
  onFocus: () => s(!0),
903
903
  onBlur: () => s(!1),
904
904
  children: [
905
- /* @__PURE__ */ n("span", { "aria-describedby": o ? l : void 0, children: t }),
906
- o && /* @__PURE__ */ n(
905
+ /* @__PURE__ */ a("span", { "aria-describedby": o ? l : void 0, children: t }),
906
+ o && /* @__PURE__ */ a(
907
907
  "span",
908
908
  {
909
909
  role: "tooltip",
@@ -911,8 +911,8 @@ function mr({ content: e, side: r = "top", children: t, className: a }) {
911
911
  className: i(
912
912
  "pointer-events-none absolute z-50 whitespace-nowrap rounded-md bg-fg px-2 py-1 text-xs text-bg shadow-md",
913
913
  "animate-[flui-fade-in_120ms_ease-out]",
914
- Fe[r],
915
- a
914
+ qe[r],
915
+ n
916
916
  ),
917
917
  children: e
918
918
  }
@@ -921,39 +921,39 @@ function mr({ content: e, side: r = "top", children: t, className: a }) {
921
921
  }
922
922
  );
923
923
  }
924
- const q = C(null);
925
- function G() {
926
- const e = v(q);
924
+ const J = C(null);
925
+ function Q() {
926
+ const e = w(J);
927
927
  if (!e) throw new Error("Componentes de Popover precisam estar dentro de <Popover>");
928
928
  return e;
929
929
  }
930
- function pr({ children: e }) {
931
- const [r, t] = b(!1), a = k(null);
930
+ function yr({ children: e }) {
931
+ const [r, t] = b(!1), n = T(null);
932
932
  return y(() => {
933
933
  if (!r) return;
934
934
  const o = (l) => {
935
- a.current && !a.current.contains(l.target) && t(!1);
935
+ n.current && !n.current.contains(l.target) && t(!1);
936
936
  }, s = (l) => l.key === "Escape" && t(!1);
937
937
  return document.addEventListener("mousedown", o), document.addEventListener("keydown", s), () => {
938
938
  document.removeEventListener("mousedown", o), document.removeEventListener("keydown", s);
939
939
  };
940
- }, [r]), /* @__PURE__ */ n(q.Provider, { value: { open: r, setOpen: t }, children: /* @__PURE__ */ n("div", { ref: a, className: "relative inline-block", children: e }) });
940
+ }, [r]), /* @__PURE__ */ a(J.Provider, { value: { open: r, setOpen: t }, children: /* @__PURE__ */ a("div", { ref: n, className: "relative inline-block", children: e }) });
941
941
  }
942
- function gr({ children: e }) {
943
- const { open: r, setOpen: t } = G();
944
- return I(e, {
942
+ function Cr({ children: e }) {
943
+ const { open: r, setOpen: t } = Q();
944
+ return K(e, {
945
945
  onClick: () => t(!r),
946
946
  "aria-haspopup": "dialog",
947
947
  "aria-expanded": r
948
948
  });
949
949
  }
950
- function br({
950
+ function Nr({
951
951
  children: e,
952
952
  align: r = "start",
953
953
  className: t
954
954
  }) {
955
- const { open: a } = G();
956
- return a ? /* @__PURE__ */ n(
955
+ const { open: n } = Q();
956
+ return n ? /* @__PURE__ */ a(
957
957
  "div",
958
958
  {
959
959
  role: "dialog",
@@ -967,39 +967,39 @@ function br({
967
967
  }
968
968
  ) : null;
969
969
  }
970
- function D({ children: e }) {
970
+ function A({ children: e }) {
971
971
  const [r, t] = b(!1);
972
- return y(() => t(!0), []), r ? ne(e, document.body) : null;
972
+ return y(() => t(!0), []), r ? ie(e, document.body) : null;
973
973
  }
974
- function O(e, r) {
974
+ function X(e, r) {
975
975
  y(() => {
976
976
  if (!e) return;
977
- const t = (o) => o.key === "Escape" && r(), a = document.body.style.overflow;
977
+ const t = (o) => o.key === "Escape" && r(), n = document.body.style.overflow;
978
978
  return document.body.style.overflow = "hidden", document.addEventListener("keydown", t), () => {
979
- document.body.style.overflow = a, document.removeEventListener("keydown", t);
979
+ document.body.style.overflow = n, document.removeEventListener("keydown", t);
980
980
  };
981
981
  }, [e, r]);
982
982
  }
983
- const U = C(null);
984
- function hr({ open: e, onOpenChange: r, children: t }) {
985
- const a = () => r == null ? void 0 : r(!1);
986
- return O(e, a), e ? /* @__PURE__ */ n(D, { children: /* @__PURE__ */ n(U.Provider, { value: { close: a }, children: /* @__PURE__ */ f("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
987
- /* @__PURE__ */ n(
983
+ const Z = C(null);
984
+ function Ge({ open: e, onOpenChange: r, children: t }) {
985
+ const n = () => r == null ? void 0 : r(!1);
986
+ return X(e, n), e ? /* @__PURE__ */ a(A, { children: /* @__PURE__ */ a(Z.Provider, { value: { close: n }, children: /* @__PURE__ */ f("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
987
+ /* @__PURE__ */ a(
988
988
  "div",
989
989
  {
990
990
  className: "absolute inset-0 bg-black/60 backdrop-blur-sm animate-[flui-fade-in_120ms_ease-out]",
991
- onClick: a
991
+ onClick: n
992
992
  }
993
993
  ),
994
994
  t
995
995
  ] }) }) }) : null;
996
996
  }
997
- function vr({
997
+ function Ue({
998
998
  className: e,
999
999
  children: r,
1000
1000
  ...t
1001
1001
  }) {
1002
- const a = v(U);
1002
+ const n = w(Z);
1003
1003
  return /* @__PURE__ */ f(
1004
1004
  "div",
1005
1005
  {
@@ -1013,11 +1013,11 @@ function vr({
1013
1013
  ...t,
1014
1014
  children: [
1015
1015
  r,
1016
- /* @__PURE__ */ n(
1016
+ /* @__PURE__ */ a(
1017
1017
  "button",
1018
1018
  {
1019
1019
  type: "button",
1020
- onClick: () => a == null ? void 0 : a.close(),
1020
+ onClick: () => n == null ? void 0 : n.close(),
1021
1021
  "aria-label": "Fechar",
1022
1022
  className: "absolute right-4 top-4 rounded-sm px-1 text-fg-muted transition-colors hover:text-fg",
1023
1023
  children: "✕"
@@ -1027,49 +1027,49 @@ function vr({
1027
1027
  }
1028
1028
  );
1029
1029
  }
1030
- function xr({ className: e, ...r }) {
1031
- return /* @__PURE__ */ n("div", { className: i("flex flex-col gap-1 p-6 pb-2", e), ...r });
1030
+ function Vr({ className: e, ...r }) {
1031
+ return /* @__PURE__ */ a("div", { className: i("flex flex-col gap-1 p-6 pb-2", e), ...r });
1032
1032
  }
1033
- function wr({ className: e, ...r }) {
1034
- return /* @__PURE__ */ n("h2", { className: i("text-lg font-semibold text-fg", e), ...r });
1033
+ function kr({ className: e, ...r }) {
1034
+ return /* @__PURE__ */ a("h2", { className: i("text-lg font-semibold text-fg", e), ...r });
1035
1035
  }
1036
- function yr({
1036
+ function zr({
1037
1037
  className: e,
1038
1038
  ...r
1039
1039
  }) {
1040
- return /* @__PURE__ */ n("p", { className: i("text-sm text-fg-muted", e), ...r });
1040
+ return /* @__PURE__ */ a("p", { className: i("text-sm text-fg-muted", e), ...r });
1041
1041
  }
1042
- function Cr({ className: e, ...r }) {
1043
- return /* @__PURE__ */ n("div", { className: i("px-6 py-2", e), ...r });
1042
+ function Mr({ className: e, ...r }) {
1043
+ return /* @__PURE__ */ a("div", { className: i("px-6 py-2", e), ...r });
1044
1044
  }
1045
- function Nr({ className: e, ...r }) {
1046
- return /* @__PURE__ */ n("div", { className: i("flex justify-end gap-2 p-6 pt-4", e), ...r });
1045
+ function Tr({ className: e, ...r }) {
1046
+ return /* @__PURE__ */ a("div", { className: i("flex justify-end gap-2 p-6 pt-4", e), ...r });
1047
1047
  }
1048
- const Y = C(null), He = {
1048
+ const ee = C(null), Oe = {
1049
1049
  left: "left-0 top-0 h-full w-[420px] max-w-[96vw] border-r",
1050
1050
  right: "right-0 top-0 h-full w-[420px] max-w-[96vw] border-l",
1051
1051
  top: "top-0 left-0 w-full max-h-[90vh] border-b",
1052
1052
  bottom: "bottom-0 left-0 w-full max-h-[90vh] border-t"
1053
1053
  };
1054
- function Vr({ open: e, onOpenChange: r, side: t = "right", children: a }) {
1054
+ function Er({ open: e, onOpenChange: r, side: t = "right", children: n }) {
1055
1055
  const o = () => r == null ? void 0 : r(!1);
1056
- return O(e, o), e ? /* @__PURE__ */ n(D, { children: /* @__PURE__ */ n(Y.Provider, { value: { close: o, side: t }, children: /* @__PURE__ */ f("div", { className: "fixed inset-0 z-50", children: [
1057
- /* @__PURE__ */ n(
1056
+ return X(e, o), e ? /* @__PURE__ */ a(A, { children: /* @__PURE__ */ a(ee.Provider, { value: { close: o, side: t }, children: /* @__PURE__ */ f("div", { className: "fixed inset-0 z-50", children: [
1057
+ /* @__PURE__ */ a(
1058
1058
  "div",
1059
1059
  {
1060
1060
  className: "absolute inset-0 bg-black/60 backdrop-blur-sm animate-[flui-fade-in_120ms_ease-out]",
1061
1061
  onClick: o
1062
1062
  }
1063
1063
  ),
1064
- a
1064
+ n
1065
1065
  ] }) }) }) : null;
1066
1066
  }
1067
- function kr({
1067
+ function Dr({
1068
1068
  className: e,
1069
1069
  children: r,
1070
1070
  ...t
1071
1071
  }) {
1072
- const a = v(Y), o = (a == null ? void 0 : a.side) ?? "right";
1072
+ const n = w(ee), o = (n == null ? void 0 : n.side) ?? "right";
1073
1073
  return /* @__PURE__ */ f(
1074
1074
  "div",
1075
1075
  {
@@ -1078,17 +1078,17 @@ function kr({
1078
1078
  className: i(
1079
1079
  "absolute z-10 flex flex-col border-border-default bg-bg shadow-lg",
1080
1080
  "animate-[flui-fade-in_160ms_ease-out]",
1081
- He[o],
1081
+ Oe[o],
1082
1082
  e
1083
1083
  ),
1084
1084
  ...t,
1085
1085
  children: [
1086
1086
  r,
1087
- /* @__PURE__ */ n(
1087
+ /* @__PURE__ */ a(
1088
1088
  "button",
1089
1089
  {
1090
1090
  type: "button",
1091
- onClick: () => a == null ? void 0 : a.close(),
1091
+ onClick: () => n == null ? void 0 : n.close(),
1092
1092
  "aria-label": "Fechar",
1093
1093
  className: "absolute right-4 top-4 rounded-sm px-1 text-fg-muted transition-colors hover:text-fg",
1094
1094
  children: "✕"
@@ -1098,8 +1098,8 @@ function kr({
1098
1098
  }
1099
1099
  );
1100
1100
  }
1101
- function zr({ className: e, ...r }) {
1102
- return /* @__PURE__ */ n(
1101
+ function Pr({ className: e, ...r }) {
1102
+ return /* @__PURE__ */ a(
1103
1103
  "div",
1104
1104
  {
1105
1105
  className: i("flex flex-col gap-1 border-b border-border-default p-6", e),
@@ -1107,14 +1107,14 @@ function zr({ className: e, ...r }) {
1107
1107
  }
1108
1108
  );
1109
1109
  }
1110
- function Tr({ className: e, ...r }) {
1111
- return /* @__PURE__ */ n("h2", { className: i("text-lg font-semibold text-fg", e), ...r });
1110
+ function Lr({ className: e, ...r }) {
1111
+ return /* @__PURE__ */ a("h2", { className: i("text-lg font-semibold text-fg", e), ...r });
1112
1112
  }
1113
- function Er({ className: e, ...r }) {
1114
- return /* @__PURE__ */ n("div", { className: i("flex-1 overflow-y-auto p-6", e), ...r });
1113
+ function Ir({ className: e, ...r }) {
1114
+ return /* @__PURE__ */ a("div", { className: i("flex-1 overflow-y-auto p-6", e), ...r });
1115
1115
  }
1116
- function Mr({ className: e, ...r }) {
1117
- return /* @__PURE__ */ n(
1116
+ function _r({ className: e, ...r }) {
1117
+ return /* @__PURE__ */ a(
1118
1118
  "div",
1119
1119
  {
1120
1120
  className: i("flex justify-end gap-2 border-t border-border-default p-6", e),
@@ -1122,25 +1122,25 @@ function Mr({ className: e, ...r }) {
1122
1122
  }
1123
1123
  );
1124
1124
  }
1125
- const $ = C(null), z = {
1125
+ const re = C(null), D = {
1126
1126
  info: { wrapper: "bg-brand-100 border-l-primary", title: "text-fg", description: "text-fg-muted" },
1127
1127
  success: { wrapper: "bg-success-subtle border-l-success", title: "text-success-fg", description: "text-success-fg/70" },
1128
1128
  warning: { wrapper: "bg-warning/15 border-l-warning", title: "text-fg", description: "text-fg-muted" },
1129
1129
  danger: { wrapper: "bg-danger/10 border-l-danger", title: "text-danger", description: "text-danger/70" }
1130
1130
  };
1131
- function Dr({ children: e }) {
1132
- const [r, t] = b([]), a = k(0), o = V((l) => {
1131
+ function Ar({ children: e }) {
1132
+ const [r, t] = b([]), n = T(0), o = M((l) => {
1133
1133
  t((c) => c.filter((u) => u.id !== l));
1134
- }, []), s = V((l) => {
1135
- const c = ++a.current;
1134
+ }, []), s = M((l) => {
1135
+ const c = ++n.current;
1136
1136
  return t((u) => [...u, { id: c, variant: "info", duration: 4e3, ...l }]), c;
1137
1137
  }, []);
1138
- return /* @__PURE__ */ f($.Provider, { value: { toast: s, dismiss: o }, children: [
1138
+ return /* @__PURE__ */ f(re.Provider, { value: { toast: s, dismiss: o }, children: [
1139
1139
  e,
1140
- /* @__PURE__ */ n(D, { children: /* @__PURE__ */ n("div", { className: "pointer-events-none fixed bottom-4 right-4 z-[60] flex w-80 max-w-[90vw] flex-col gap-2", children: r.map((l) => /* @__PURE__ */ n(We, { item: l, onDismiss: () => o(l.id) }, l.id)) }) })
1140
+ /* @__PURE__ */ a(A, { children: /* @__PURE__ */ a("div", { className: "pointer-events-none fixed bottom-4 right-4 z-[60] flex w-80 max-w-[90vw] flex-col gap-2", children: r.map((l) => /* @__PURE__ */ a(Ye, { item: l, onDismiss: () => o(l.id) }, l.id)) }) })
1141
1141
  ] });
1142
1142
  }
1143
- function We({ item: e, onDismiss: r }) {
1143
+ function Ye({ item: e, onDismiss: r }) {
1144
1144
  return y(() => {
1145
1145
  if (!e.duration) return;
1146
1146
  const t = setTimeout(r, e.duration);
@@ -1152,20 +1152,20 @@ function We({ item: e, onDismiss: r }) {
1152
1152
  className: i(
1153
1153
  "pointer-events-auto flex items-start gap-3 rounded-lg border-l-4 p-4 shadow-md",
1154
1154
  "animate-[flui-slide-up_160ms_ease-out]",
1155
- z[e.variant ?? "info"].wrapper
1155
+ D[e.variant ?? "info"].wrapper
1156
1156
  ),
1157
1157
  children: [
1158
1158
  /* @__PURE__ */ f("div", { className: "min-w-0 flex-1", children: [
1159
- /* @__PURE__ */ n("div", { className: i("text-sm font-semibold", z[e.variant ?? "info"].title), children: e.title }),
1160
- e.description && /* @__PURE__ */ n("div", { className: i("mt-0.5 text-sm", z[e.variant ?? "info"].description), children: e.description })
1159
+ /* @__PURE__ */ a("div", { className: i("text-sm font-semibold", D[e.variant ?? "info"].title), children: e.title }),
1160
+ e.description && /* @__PURE__ */ a("div", { className: i("mt-0.5 text-sm", D[e.variant ?? "info"].description), children: e.description })
1161
1161
  ] }),
1162
- /* @__PURE__ */ n(
1162
+ /* @__PURE__ */ a(
1163
1163
  "button",
1164
1164
  {
1165
1165
  type: "button",
1166
1166
  onClick: r,
1167
1167
  "aria-label": "Fechar",
1168
- className: i("shrink-0 rounded-sm px-1 transition-colors opacity-60 hover:opacity-100", z[e.variant ?? "info"].title),
1168
+ className: i("shrink-0 rounded-sm px-1 transition-colors opacity-60 hover:opacity-100", D[e.variant ?? "info"].title),
1169
1169
  children: "✕"
1170
1170
  }
1171
1171
  )
@@ -1173,12 +1173,12 @@ function We({ item: e, onDismiss: r }) {
1173
1173
  }
1174
1174
  );
1175
1175
  }
1176
- function Pr() {
1177
- const e = v($);
1176
+ function Br() {
1177
+ const e = w(re);
1178
1178
  if (!e) throw new Error("useToast precisa estar dentro de <ToastProvider>");
1179
1179
  return e;
1180
1180
  }
1181
- const Ke = N(
1181
+ const $e = N(
1182
1182
  "flex w-full bg-bg-muted text-fg placeholder:text-fg-muted border border-transparent transition-colors outline-none resize-y rounded-lg min-h-28 px-3 py-3 text-sm focus-visible:border-border-strong disabled:opacity-50 disabled:pointer-events-none",
1183
1183
  {
1184
1184
  variants: {
@@ -1189,79 +1189,177 @@ const Ke = N(
1189
1189
  },
1190
1190
  defaultVariants: { invalid: !1 }
1191
1191
  }
1192
- ), qe = d(
1193
- ({ className: e, invalid: r, ...t }, a) => /* @__PURE__ */ n(
1192
+ ), Je = p(
1193
+ ({ className: e, invalid: r, ...t }, n) => /* @__PURE__ */ a(
1194
1194
  "textarea",
1195
1195
  {
1196
- ref: a,
1197
- className: i(Ke({ invalid: r }), e),
1196
+ ref: n,
1197
+ className: i($e({ invalid: r }), e),
1198
1198
  ...t
1199
1199
  }
1200
1200
  )
1201
1201
  );
1202
- qe.displayName = "Textarea";
1203
- const J = C(null), A = "flui-color-mode", _ = "flui-brand";
1204
- function Ge() {
1202
+ Je.displayName = "Textarea";
1203
+ function Qe({
1204
+ user: e,
1205
+ nav: r,
1206
+ active: t,
1207
+ onSelect: n,
1208
+ footerAction: o
1209
+ }) {
1210
+ const s = (l) => "flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-left text-sm transition-colors " + (l ? "bg-bg-muted font-medium text-fg" : "text-fg hover:bg-bg-muted");
1211
+ return /* @__PURE__ */ f("aside", { className: "flex w-52 shrink-0 flex-col gap-5 overflow-y-auto border-r border-border-default py-5 pl-4 pr-2", children: [
1212
+ /* @__PURE__ */ f("div", { className: "flex items-center gap-2.5 px-1", children: [
1213
+ e.avatar ? /* @__PURE__ */ a(
1214
+ "img",
1215
+ {
1216
+ src: e.avatar,
1217
+ alt: e.name,
1218
+ className: "h-8 w-8 shrink-0 rounded-full object-cover"
1219
+ }
1220
+ ) : /* @__PURE__ */ a("span", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-primary-subtle text-xs font-semibold text-primary", children: e.initials ?? e.name.slice(0, 2).toUpperCase() }),
1221
+ /* @__PURE__ */ f("div", { className: "min-w-0", children: [
1222
+ /* @__PURE__ */ a("p", { className: "truncate text-sm font-medium text-fg", children: e.name }),
1223
+ e.subtitle && /* @__PURE__ */ a("p", { className: "truncate text-xs text-fg-muted", children: e.subtitle })
1224
+ ] }),
1225
+ /* @__PURE__ */ a(
1226
+ "svg",
1227
+ {
1228
+ viewBox: "0 0 16 16",
1229
+ className: "ml-auto h-3.5 w-3.5 shrink-0 text-fg-muted",
1230
+ fill: "none",
1231
+ stroke: "currentColor",
1232
+ strokeWidth: "1.5",
1233
+ strokeLinecap: "round",
1234
+ strokeLinejoin: "round",
1235
+ "aria-hidden": !0,
1236
+ children: /* @__PURE__ */ a("path", { d: "M5 7l3-3 3 3M5 9l3 3 3-3" })
1237
+ }
1238
+ )
1239
+ ] }),
1240
+ r.map(({ group: l, items: c }) => /* @__PURE__ */ f("div", { children: [
1241
+ /* @__PURE__ */ a("p", { className: "mb-1 px-1 text-xs font-semibold text-fg-muted", children: l }),
1242
+ /* @__PURE__ */ a("ul", { className: "flex flex-col gap-0.5", children: c.map((u) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ f(
1243
+ "button",
1244
+ {
1245
+ type: "button",
1246
+ onClick: () => n(u.id),
1247
+ className: s(u.id === t),
1248
+ children: [
1249
+ u.icon && /* @__PURE__ */ a("span", { className: "shrink-0 text-fg [&>svg]:h-[15px] [&>svg]:w-[15px]", children: u.icon }),
1250
+ u.label
1251
+ ]
1252
+ }
1253
+ ) }, u.id)) })
1254
+ ] }, l)),
1255
+ o && /* @__PURE__ */ a("div", { className: "mt-auto", children: o })
1256
+ ] });
1257
+ }
1258
+ function jr({
1259
+ open: e,
1260
+ onOpenChange: r,
1261
+ user: t,
1262
+ nav: n,
1263
+ defaultSection: o,
1264
+ activeSection: s,
1265
+ onSectionChange: l,
1266
+ sectionTitles: c = {},
1267
+ sectionSubtitles: u = {},
1268
+ renderSection: d,
1269
+ footerAction: m
1270
+ }) {
1271
+ var j, S;
1272
+ const g = ((S = (j = n[0]) == null ? void 0 : j.items[0]) == null ? void 0 : S.id) ?? "", [v, x] = b(
1273
+ o ?? g
1274
+ ), V = s ?? v, h = (z) => {
1275
+ x(z), l == null || l(z);
1276
+ }, k = n.flatMap((z) => z.items).find((z) => z.id === V), E = c[V] ?? (k == null ? void 0 : k.label) ?? V, B = u[V];
1277
+ return /* @__PURE__ */ a(Ge, { open: e, onOpenChange: r, children: /* @__PURE__ */ a(Ue, { className: "max-w-[1300px] overflow-hidden p-0", children: /* @__PURE__ */ f("div", { className: "flex h-[820px]", children: [
1278
+ /* @__PURE__ */ a(
1279
+ Qe,
1280
+ {
1281
+ user: t,
1282
+ nav: n,
1283
+ active: V,
1284
+ onSelect: h,
1285
+ footerAction: m
1286
+ }
1287
+ ),
1288
+ /* @__PURE__ */ f("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
1289
+ /* @__PURE__ */ f("div", { className: "px-[200px] pb-5 pt-8", children: [
1290
+ /* @__PURE__ */ a("h2", { className: "font-display text-2xl font-semibold tracking-tight text-fg", children: E }),
1291
+ B && /* @__PURE__ */ a("p", { className: "mt-0.5 text-sm text-fg-muted", children: B })
1292
+ ] }),
1293
+ /* @__PURE__ */ a("div", { className: "flex-1 overflow-y-auto px-[200px] pb-8", children: (d == null ? void 0 : d(V)) ?? /* @__PURE__ */ f("p", { className: "text-sm text-fg-muted", children: [
1294
+ "Conteúdo de ",
1295
+ /* @__PURE__ */ a("strong", { children: E }),
1296
+ "."
1297
+ ] }) })
1298
+ ] })
1299
+ ] }) }) });
1300
+ }
1301
+ const te = C(null), R = "flui-color-mode", F = "flui-brand";
1302
+ function Xe() {
1205
1303
  var e;
1206
1304
  return typeof window < "u" && ((e = window.matchMedia) == null ? void 0 : e.call(window, "(prefers-color-scheme: dark)").matches);
1207
1305
  }
1208
- function S(e, r) {
1306
+ function W(e, r) {
1209
1307
  try {
1210
1308
  return localStorage.getItem(e) ?? r;
1211
1309
  } catch {
1212
1310
  return r;
1213
1311
  }
1214
1312
  }
1215
- function Lr({
1313
+ function Sr({
1216
1314
  children: e,
1217
1315
  defaultMode: r = "system",
1218
1316
  defaultBrand: t = "default",
1219
- target: a
1317
+ target: n
1220
1318
  }) {
1221
1319
  const [o, s] = b(
1222
- () => S(A, r)
1320
+ () => W(R, r)
1223
1321
  ), [l, c] = b(
1224
- () => S(_, t)
1225
- ), [u, p] = b(Ge);
1322
+ () => W(F, t)
1323
+ ), [u, d] = b(Xe);
1226
1324
  y(() => {
1227
- var L;
1228
- const h = (L = window.matchMedia) == null ? void 0 : L.call(window, "(prefers-color-scheme: dark)");
1325
+ var k;
1326
+ const h = (k = window.matchMedia) == null ? void 0 : k.call(window, "(prefers-color-scheme: dark)");
1229
1327
  if (!h) return;
1230
- const P = (X) => p(X.matches);
1328
+ const P = (E) => d(E.matches);
1231
1329
  return h.addEventListener("change", P), () => h.removeEventListener("change", P);
1232
1330
  }, []);
1233
1331
  const m = o === "system" ? u ? "dark" : "light" : o;
1234
1332
  y(() => {
1235
- const h = (a == null ? void 0 : a()) ?? document.documentElement;
1333
+ const h = (n == null ? void 0 : n()) ?? document.documentElement;
1236
1334
  h.setAttribute("data-theme", m), l && l !== "default" ? h.setAttribute("data-brand", l) : h.removeAttribute("data-brand");
1237
- }, [m, l, a]);
1238
- const g = V((h) => {
1335
+ }, [m, l, n]);
1336
+ const g = M((h) => {
1239
1337
  s(h);
1240
1338
  try {
1241
- localStorage.setItem(A, h);
1339
+ localStorage.setItem(R, h);
1242
1340
  } catch {
1243
1341
  }
1244
- }, []), x = V((h) => {
1342
+ }, []), v = M((h) => {
1245
1343
  c(h);
1246
1344
  try {
1247
- localStorage.setItem(_, h);
1345
+ localStorage.setItem(F, h);
1248
1346
  } catch {
1249
1347
  }
1250
- }, []), w = V(() => {
1348
+ }, []), x = M(() => {
1251
1349
  g(m === "dark" ? "light" : "dark");
1252
- }, [m, g]), Q = re(
1253
- () => ({ mode: o, resolvedMode: m, brand: l, setMode: g, setBrand: x, toggleMode: w }),
1254
- [o, m, l, g, x, w]
1350
+ }, [m, g]), V = oe(
1351
+ () => ({ mode: o, resolvedMode: m, brand: l, setMode: g, setBrand: v, toggleMode: x }),
1352
+ [o, m, l, g, v, x]
1255
1353
  );
1256
- return /* @__PURE__ */ n(J.Provider, { value: Q, children: e });
1354
+ return /* @__PURE__ */ a(te.Provider, { value: V, children: e });
1257
1355
  }
1258
- function Ar() {
1259
- const e = v(J);
1356
+ function Rr() {
1357
+ const e = w(te);
1260
1358
  if (!e)
1261
1359
  throw new Error("useTheme precisa estar dentro de <ThemeProvider>");
1262
1360
  return e;
1263
1361
  }
1264
- const _r = [
1362
+ const Fr = [
1265
1363
  {
1266
1364
  name: "flui-color-accent-scale-50",
1267
1365
  cssVar: "--flui-color-accent-scale-50",
@@ -2492,68 +2590,69 @@ const _r = [
2492
2590
  }
2493
2591
  ];
2494
2592
  export {
2495
- cr as Accordion,
2496
- dr as AccordionContent,
2497
- ur as AccordionItem,
2498
- fr as AccordionTrigger,
2499
- je as Alert,
2500
- ze as Avatar,
2501
- F as Badge,
2502
- Pe as Breadcrumb,
2503
- nr as BreadcrumbItem,
2504
- Le as BreadcrumbSeparator,
2505
- le as Button,
2506
- ce as Card,
2507
- me as CardContent,
2508
- de as CardDescription,
2509
- ue as CardHeader,
2510
- fe as CardTitle,
2511
- he as Checkbox,
2512
- De as Divider,
2513
- Vr as Drawer,
2514
- Er as DrawerBody,
2515
- kr as DrawerContent,
2516
- Mr as DrawerFooter,
2517
- zr as DrawerHeader,
2518
- Tr as DrawerTitle,
2519
- Ze as Dropdown,
2520
- rr as DropdownContent,
2521
- tr as DropdownItem,
2522
- ar as DropdownSeparator,
2523
- er as DropdownTrigger,
2524
- ie as Input,
2525
- hr as Modal,
2526
- Cr as ModalBody,
2527
- vr as ModalContent,
2528
- yr as ModalDescription,
2529
- Nr as ModalFooter,
2530
- xr as ModalHeader,
2531
- wr as ModalTitle,
2532
- pr as Popover,
2533
- br as PopoverContent,
2534
- gr as PopoverTrigger,
2535
- Me as Progress,
2536
- ve as Radio,
2537
- Xe as RadioGroup,
2538
- we as Select,
2539
- Ee as Spinner,
2540
- _e as StatCard,
2541
- be as Switch,
2542
- or as Tabs,
2543
- ir as TabsContent,
2544
- lr as TabsList,
2545
- sr as TabsTrigger,
2546
- qe as Textarea,
2547
- Lr as ThemeProvider,
2548
- Dr as ToastProvider,
2549
- mr as Tooltip,
2550
- ye as badgeVariants,
2551
- oe as buttonVariants,
2593
+ br as Accordion,
2594
+ xr as AccordionContent,
2595
+ hr as AccordionItem,
2596
+ vr as AccordionTrigger,
2597
+ He as Alert,
2598
+ De as Avatar,
2599
+ U as Badge,
2600
+ Ae as Breadcrumb,
2601
+ fr as BreadcrumbItem,
2602
+ Be as BreadcrumbSeparator,
2603
+ ue as Button,
2604
+ me as Card,
2605
+ he as CardContent,
2606
+ be as CardDescription,
2607
+ pe as CardHeader,
2608
+ ge as CardTitle,
2609
+ ye as Checkbox,
2610
+ _e as Divider,
2611
+ Er as Drawer,
2612
+ Ir as DrawerBody,
2613
+ Dr as DrawerContent,
2614
+ _r as DrawerFooter,
2615
+ Pr as DrawerHeader,
2616
+ Lr as DrawerTitle,
2617
+ lr as Dropdown,
2618
+ ir as DropdownContent,
2619
+ cr as DropdownItem,
2620
+ ur as DropdownSeparator,
2621
+ sr as DropdownTrigger,
2622
+ de as Input,
2623
+ Ge as Modal,
2624
+ Mr as ModalBody,
2625
+ Ue as ModalContent,
2626
+ zr as ModalDescription,
2627
+ Tr as ModalFooter,
2628
+ Vr as ModalHeader,
2629
+ kr as ModalTitle,
2630
+ yr as Popover,
2631
+ Nr as PopoverContent,
2632
+ Cr as PopoverTrigger,
2633
+ jr as ProfileSettingsModal,
2634
+ Ie as Progress,
2635
+ Ce as Radio,
2636
+ or as RadioGroup,
2637
+ Ve as Select,
2638
+ Le as Spinner,
2639
+ Se as StatCard,
2640
+ we as Switch,
2641
+ dr as Tabs,
2642
+ gr as TabsContent,
2643
+ mr as TabsList,
2644
+ pr as TabsTrigger,
2645
+ Je as Textarea,
2646
+ Sr as ThemeProvider,
2647
+ Ar as ToastProvider,
2648
+ wr as Tooltip,
2649
+ ke as badgeVariants,
2650
+ ce as buttonVariants,
2552
2651
  i as cn,
2553
- se as inputVariants,
2554
- Ke as textareaVariants,
2555
- _r as tokens,
2556
- Ar as useTheme,
2557
- Pr as useToast
2652
+ fe as inputVariants,
2653
+ $e as textareaVariants,
2654
+ Fr as tokens,
2655
+ Rr as useTheme,
2656
+ Br as useToast
2558
2657
  };
2559
2658
  //# sourceMappingURL=index.js.map