@fluityy/designsystem 0.2.3 → 0.2.4
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/components/CodeBlock/CodeBlock.d.ts +7 -0
- package/dist/components/Toast/Toast.d.ts +6 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.js +494 -396
- package/dist/index.js.map +1 -1
- package/dist/styles.css +14 -5
- package/dist/theme/ThemeProvider.d.ts +7 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as t, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p, useState as x, useRef as L, useEffect as N, createContext as C, useContext as y, useId as K, cloneElement as q, Children as oe, Fragment as le, useCallback as z, useMemo as se } from "react";
|
|
3
3
|
import { cva as V } from "class-variance-authority";
|
|
4
4
|
import { clsx as ie } from "clsx";
|
|
5
5
|
import { twMerge as ce } from "tailwind-merge";
|
|
@@ -33,17 +33,17 @@ const de = V(
|
|
|
33
33
|
size: "md"
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
),
|
|
37
|
-
({ className: e, variant: r, size: a, fullWidth: n, ...o },
|
|
36
|
+
), S = p(
|
|
37
|
+
({ className: e, variant: r, size: a, fullWidth: n, ...o }, l) => /* @__PURE__ */ t(
|
|
38
38
|
"button",
|
|
39
39
|
{
|
|
40
|
-
ref:
|
|
40
|
+
ref: l,
|
|
41
41
|
className: i(de({ variant: r, size: a, fullWidth: n }), e),
|
|
42
42
|
...o
|
|
43
43
|
}
|
|
44
44
|
)
|
|
45
45
|
);
|
|
46
|
-
|
|
46
|
+
S.displayName = "Button";
|
|
47
47
|
const fe = V(
|
|
48
48
|
"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",
|
|
49
49
|
{
|
|
@@ -60,41 +60,41 @@ const fe = V(
|
|
|
60
60
|
},
|
|
61
61
|
defaultVariants: { size: "md", invalid: !1 }
|
|
62
62
|
}
|
|
63
|
-
), me =
|
|
64
|
-
({ className: e, size: r, invalid: a, label: n, id: o, type:
|
|
65
|
-
const [
|
|
63
|
+
), me = p(
|
|
64
|
+
({ className: e, size: r, invalid: a, label: n, id: o, type: l, ...s }, c) => {
|
|
65
|
+
const [d, f] = x(!1), g = l === "password", b = g ? d ? "text" : "password" : l, v = o ?? (n ? n.toLowerCase().replace(/\s+/g, "-") : void 0), h = /* @__PURE__ */ u("div", { className: "relative flex w-full items-center", children: [
|
|
66
66
|
/* @__PURE__ */ t(
|
|
67
67
|
"input",
|
|
68
68
|
{
|
|
69
69
|
ref: c,
|
|
70
|
-
id:
|
|
71
|
-
type:
|
|
70
|
+
id: v,
|
|
71
|
+
type: b,
|
|
72
72
|
className: i(
|
|
73
73
|
fe({ size: r, invalid: a }),
|
|
74
|
-
|
|
74
|
+
g && "pr-10",
|
|
75
75
|
e
|
|
76
76
|
),
|
|
77
|
-
...
|
|
77
|
+
...s
|
|
78
78
|
}
|
|
79
79
|
),
|
|
80
|
-
|
|
80
|
+
g && /* @__PURE__ */ t(
|
|
81
81
|
"button",
|
|
82
82
|
{
|
|
83
83
|
type: "button",
|
|
84
84
|
tabIndex: -1,
|
|
85
|
-
onClick: () =>
|
|
86
|
-
"aria-label":
|
|
85
|
+
onClick: () => f((w) => !w),
|
|
86
|
+
"aria-label": d ? "Ocultar senha" : "Mostrar senha",
|
|
87
87
|
className: "absolute right-3 cursor-pointer text-fg-muted transition-colors hover:text-fg",
|
|
88
|
-
children:
|
|
88
|
+
children: d ? (
|
|
89
89
|
// olho fechado
|
|
90
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ u("svg", { viewBox: "0 0 24 24", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: 1.75, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
|
|
91
91
|
/* @__PURE__ */ t("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94" }),
|
|
92
92
|
/* @__PURE__ */ t("path", { d: "M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19" }),
|
|
93
93
|
/* @__PURE__ */ t("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
|
|
94
94
|
] })
|
|
95
95
|
) : (
|
|
96
96
|
// olho aberto
|
|
97
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ u("svg", { viewBox: "0 0 24 24", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: 1.75, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
|
|
98
98
|
/* @__PURE__ */ t("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
|
|
99
99
|
/* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "3" })
|
|
100
100
|
] })
|
|
@@ -102,14 +102,14 @@ const fe = V(
|
|
|
102
102
|
}
|
|
103
103
|
)
|
|
104
104
|
] });
|
|
105
|
-
return n ? /* @__PURE__ */
|
|
106
|
-
/* @__PURE__ */ t("label", { htmlFor:
|
|
107
|
-
|
|
108
|
-
] }) :
|
|
105
|
+
return n ? /* @__PURE__ */ u("div", { className: "flex w-full flex-col gap-1.5", children: [
|
|
106
|
+
/* @__PURE__ */ t("label", { htmlFor: v, className: "text-xs font-medium text-fg", children: n }),
|
|
107
|
+
h
|
|
108
|
+
] }) : h;
|
|
109
109
|
}
|
|
110
110
|
);
|
|
111
111
|
me.displayName = "Input";
|
|
112
|
-
const pe =
|
|
112
|
+
const pe = p(
|
|
113
113
|
({ className: e, ...r }, a) => /* @__PURE__ */ t(
|
|
114
114
|
"div",
|
|
115
115
|
{
|
|
@@ -123,19 +123,19 @@ const pe = g(
|
|
|
123
123
|
)
|
|
124
124
|
);
|
|
125
125
|
pe.displayName = "Card";
|
|
126
|
-
const ge =
|
|
126
|
+
const ge = p(
|
|
127
127
|
({ className: e, ...r }, a) => /* @__PURE__ */ t("div", { ref: a, className: i("flex flex-col gap-1 p-6", e), ...r })
|
|
128
128
|
);
|
|
129
129
|
ge.displayName = "CardHeader";
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
const
|
|
130
|
+
const he = p(({ className: e, ...r }, a) => /* @__PURE__ */ t("h3", { ref: a, className: i("text-lg font-semibold text-fg", e), ...r }));
|
|
131
|
+
he.displayName = "CardTitle";
|
|
132
|
+
const be = p(({ className: e, ...r }, a) => /* @__PURE__ */ t("p", { ref: a, className: i("text-sm text-fg-muted", e), ...r }));
|
|
133
|
+
be.displayName = "CardDescription";
|
|
134
|
+
const xe = p(
|
|
135
135
|
({ className: e, ...r }, a) => /* @__PURE__ */ t("div", { ref: a, className: i("p-6 pt-0", e), ...r })
|
|
136
136
|
);
|
|
137
|
-
|
|
138
|
-
const
|
|
137
|
+
xe.displayName = "CardContent";
|
|
138
|
+
const ve = V(
|
|
139
139
|
"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",
|
|
140
140
|
{
|
|
141
141
|
variants: {
|
|
@@ -157,39 +157,39 @@ const xe = V(
|
|
|
157
157
|
],
|
|
158
158
|
defaultVariants: { size: "md", checked: !1 }
|
|
159
159
|
}
|
|
160
|
-
), G =
|
|
161
|
-
({ className: e, size: r, checked: a, defaultChecked: n, onCheckedChange: o, disabled:
|
|
162
|
-
const
|
|
160
|
+
), G = p(
|
|
161
|
+
({ className: e, size: r, checked: a, defaultChecked: n, onCheckedChange: o, disabled: l, ...s }, c) => {
|
|
162
|
+
const d = a !== void 0, [f, g] = x(n ?? !1), b = d ? a : f;
|
|
163
163
|
return /* @__PURE__ */ t(
|
|
164
164
|
"button",
|
|
165
165
|
{
|
|
166
166
|
ref: c,
|
|
167
167
|
type: "button",
|
|
168
168
|
role: "switch",
|
|
169
|
-
"aria-checked":
|
|
170
|
-
disabled:
|
|
169
|
+
"aria-checked": b,
|
|
170
|
+
disabled: l,
|
|
171
171
|
onClick: () => {
|
|
172
|
-
const
|
|
173
|
-
|
|
172
|
+
const h = !b;
|
|
173
|
+
d || g(h), o == null || o(h);
|
|
174
174
|
},
|
|
175
|
-
className: i(
|
|
176
|
-
...
|
|
177
|
-
children: /* @__PURE__ */ t("span", { className: we({ size: r, checked:
|
|
175
|
+
className: i(ve({ size: r, checked: b }), e),
|
|
176
|
+
...s,
|
|
177
|
+
children: /* @__PURE__ */ t("span", { className: we({ size: r, checked: b }) })
|
|
178
178
|
}
|
|
179
179
|
);
|
|
180
180
|
}
|
|
181
181
|
);
|
|
182
182
|
G.displayName = "Switch";
|
|
183
|
-
const ye =
|
|
184
|
-
({ className: e, label: r, indeterminate: a = !1, disabled: n, id: o, ...
|
|
185
|
-
const c =
|
|
183
|
+
const ye = p(
|
|
184
|
+
({ className: e, label: r, indeterminate: a = !1, disabled: n, id: o, ...l }, s) => {
|
|
185
|
+
const c = L(null);
|
|
186
186
|
N(() => {
|
|
187
187
|
c.current && (c.current.indeterminate = a);
|
|
188
188
|
}, [a]);
|
|
189
|
-
const
|
|
190
|
-
c.current =
|
|
189
|
+
const d = (f) => {
|
|
190
|
+
c.current = f, typeof s == "function" ? s(f) : s && (s.current = f);
|
|
191
191
|
};
|
|
192
|
-
return /* @__PURE__ */
|
|
192
|
+
return /* @__PURE__ */ u(
|
|
193
193
|
"label",
|
|
194
194
|
{
|
|
195
195
|
className: i(
|
|
@@ -201,15 +201,15 @@ const ye = g(
|
|
|
201
201
|
/* @__PURE__ */ t(
|
|
202
202
|
"input",
|
|
203
203
|
{
|
|
204
|
-
ref:
|
|
204
|
+
ref: d,
|
|
205
205
|
id: o,
|
|
206
206
|
type: "checkbox",
|
|
207
207
|
disabled: n,
|
|
208
208
|
className: "peer sr-only",
|
|
209
|
-
...
|
|
209
|
+
...l
|
|
210
210
|
}
|
|
211
211
|
),
|
|
212
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ u(
|
|
213
213
|
"span",
|
|
214
214
|
{
|
|
215
215
|
className: i(
|
|
@@ -248,33 +248,33 @@ const ye = g(
|
|
|
248
248
|
}
|
|
249
249
|
);
|
|
250
250
|
ye.displayName = "Checkbox";
|
|
251
|
-
const
|
|
252
|
-
function
|
|
251
|
+
const U = C(null);
|
|
252
|
+
function ur({
|
|
253
253
|
value: e,
|
|
254
254
|
defaultValue: r,
|
|
255
255
|
onValueChange: a,
|
|
256
256
|
name: n,
|
|
257
257
|
className: o,
|
|
258
|
-
children:
|
|
259
|
-
...
|
|
258
|
+
children: l,
|
|
259
|
+
...s
|
|
260
260
|
}) {
|
|
261
|
-
const c = K(),
|
|
262
|
-
|
|
261
|
+
const c = K(), d = e !== void 0, [f, g] = x(r), b = d ? e : f, v = (h) => {
|
|
262
|
+
d || g(h), a == null || a(h);
|
|
263
263
|
};
|
|
264
264
|
return /* @__PURE__ */ t(
|
|
265
|
-
|
|
265
|
+
U.Provider,
|
|
266
266
|
{
|
|
267
|
-
value: { name: n ?? c, value:
|
|
268
|
-
children: /* @__PURE__ */ t("div", { role: "radiogroup", className: i("flex flex-col gap-2", o), ...
|
|
267
|
+
value: { name: n ?? c, value: b, onChange: v },
|
|
268
|
+
children: /* @__PURE__ */ t("div", { role: "radiogroup", className: i("flex flex-col gap-2", o), ...s, children: l })
|
|
269
269
|
}
|
|
270
270
|
);
|
|
271
271
|
}
|
|
272
|
-
const Ne =
|
|
273
|
-
({ className: e, value: r, label: a, disabled: n, ...o },
|
|
274
|
-
const
|
|
275
|
-
if (!
|
|
276
|
-
const c =
|
|
277
|
-
return /* @__PURE__ */
|
|
272
|
+
const Ne = p(
|
|
273
|
+
({ className: e, value: r, label: a, disabled: n, ...o }, l) => {
|
|
274
|
+
const s = y(U);
|
|
275
|
+
if (!s) throw new Error("<Radio> precisa estar dentro de <RadioGroup>");
|
|
276
|
+
const c = s.value === r;
|
|
277
|
+
return /* @__PURE__ */ u(
|
|
278
278
|
"label",
|
|
279
279
|
{
|
|
280
280
|
className: i(
|
|
@@ -286,13 +286,13 @@ const Ne = g(
|
|
|
286
286
|
/* @__PURE__ */ t(
|
|
287
287
|
"input",
|
|
288
288
|
{
|
|
289
|
-
ref:
|
|
289
|
+
ref: l,
|
|
290
290
|
type: "radio",
|
|
291
|
-
name:
|
|
291
|
+
name: s.name,
|
|
292
292
|
value: r,
|
|
293
293
|
checked: c,
|
|
294
294
|
disabled: n,
|
|
295
|
-
onChange: () =>
|
|
295
|
+
onChange: () => s.onChange(r),
|
|
296
296
|
className: "peer sr-only",
|
|
297
297
|
...o
|
|
298
298
|
}
|
|
@@ -332,12 +332,12 @@ const Ce = V(
|
|
|
332
332
|
},
|
|
333
333
|
defaultVariants: { size: "md", invalid: !1 }
|
|
334
334
|
}
|
|
335
|
-
), Ve =
|
|
336
|
-
({ className: e, size: r, invalid: a, children: n, ...o },
|
|
335
|
+
), Ve = p(
|
|
336
|
+
({ className: e, size: r, invalid: a, children: n, ...o }, l) => /* @__PURE__ */ u("div", { className: "relative inline-flex w-full items-center", children: [
|
|
337
337
|
/* @__PURE__ */ t(
|
|
338
338
|
"select",
|
|
339
339
|
{
|
|
340
|
-
ref:
|
|
340
|
+
ref: l,
|
|
341
341
|
className: i(Ce({ size: r, invalid: a }), e),
|
|
342
342
|
...o,
|
|
343
343
|
children: n
|
|
@@ -360,27 +360,27 @@ const Ce = V(
|
|
|
360
360
|
] })
|
|
361
361
|
);
|
|
362
362
|
Ve.displayName = "Select";
|
|
363
|
-
const
|
|
363
|
+
const O = C(null);
|
|
364
364
|
function j() {
|
|
365
|
-
const e =
|
|
365
|
+
const e = y(O);
|
|
366
366
|
if (!e) throw new Error("Componentes de Dropdown precisam estar dentro de <Dropdown>");
|
|
367
367
|
return e;
|
|
368
368
|
}
|
|
369
|
-
function
|
|
370
|
-
const [r, a] =
|
|
369
|
+
function dr({ children: e }) {
|
|
370
|
+
const [r, a] = x(!1), n = L(null);
|
|
371
371
|
return N(() => {
|
|
372
372
|
if (!r) return;
|
|
373
|
-
const o = (
|
|
374
|
-
n.current && !n.current.contains(
|
|
375
|
-
},
|
|
376
|
-
|
|
373
|
+
const o = (s) => {
|
|
374
|
+
n.current && !n.current.contains(s.target) && a(!1);
|
|
375
|
+
}, l = (s) => {
|
|
376
|
+
s.key === "Escape" && a(!1);
|
|
377
377
|
};
|
|
378
|
-
return document.addEventListener("mousedown", o), document.addEventListener("keydown",
|
|
379
|
-
document.removeEventListener("mousedown", o), document.removeEventListener("keydown",
|
|
378
|
+
return document.addEventListener("mousedown", o), document.addEventListener("keydown", l), () => {
|
|
379
|
+
document.removeEventListener("mousedown", o), document.removeEventListener("keydown", l);
|
|
380
380
|
};
|
|
381
|
-
}, [r]), /* @__PURE__ */ t(
|
|
381
|
+
}, [r]), /* @__PURE__ */ t(O.Provider, { value: { open: r, setOpen: a }, children: /* @__PURE__ */ t("div", { ref: n, className: "relative inline-block text-left", children: e }) });
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function fr({ children: e }) {
|
|
384
384
|
const { open: r, setOpen: a } = j();
|
|
385
385
|
return q(e, {
|
|
386
386
|
onClick: () => a(!r),
|
|
@@ -388,7 +388,7 @@ function ir({ children: e }) {
|
|
|
388
388
|
"aria-expanded": r
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function mr({
|
|
392
392
|
children: e,
|
|
393
393
|
align: r = "start",
|
|
394
394
|
className: a
|
|
@@ -407,21 +407,21 @@ function cr({
|
|
|
407
407
|
}
|
|
408
408
|
) : null;
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function pr({
|
|
411
411
|
children: e,
|
|
412
412
|
onSelect: r,
|
|
413
413
|
destructive: a,
|
|
414
414
|
className: n,
|
|
415
415
|
...o
|
|
416
416
|
}) {
|
|
417
|
-
const { setOpen:
|
|
417
|
+
const { setOpen: l } = j();
|
|
418
418
|
return /* @__PURE__ */ t(
|
|
419
419
|
"button",
|
|
420
420
|
{
|
|
421
421
|
type: "button",
|
|
422
422
|
role: "menuitem",
|
|
423
423
|
onClick: () => {
|
|
424
|
-
r == null || r(),
|
|
424
|
+
r == null || r(), l(!1);
|
|
425
425
|
},
|
|
426
426
|
className: i(
|
|
427
427
|
"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm outline-none transition-colors cursor-pointer",
|
|
@@ -434,11 +434,11 @@ function ur({
|
|
|
434
434
|
}
|
|
435
435
|
);
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function gr() {
|
|
438
438
|
return /* @__PURE__ */ t("div", { role: "separator", className: "my-1 h-px bg-border-default" });
|
|
439
439
|
}
|
|
440
440
|
const ke = V(
|
|
441
|
-
"inline-flex items-center gap-1 font-medium whitespace-nowrap rounded-
|
|
441
|
+
"inline-flex items-center gap-1 font-medium whitespace-nowrap rounded-[var(--flui-radius-badge)]",
|
|
442
442
|
{
|
|
443
443
|
variants: {
|
|
444
444
|
variant: {
|
|
@@ -458,7 +458,7 @@ const ke = V(
|
|
|
458
458
|
},
|
|
459
459
|
defaultVariants: { variant: "neutral", size: "sm" }
|
|
460
460
|
}
|
|
461
|
-
), Y =
|
|
461
|
+
), Y = p(
|
|
462
462
|
({ className: e, variant: r, size: a, ...n }, o) => /* @__PURE__ */ t(
|
|
463
463
|
"span",
|
|
464
464
|
{
|
|
@@ -498,26 +498,26 @@ function Ee(e) {
|
|
|
498
498
|
return ((a = r[0]) == null ? void 0 : a.toUpperCase()) ?? "";
|
|
499
499
|
}).join("") : "";
|
|
500
500
|
}
|
|
501
|
-
const
|
|
502
|
-
({ className: e, size: r = "md", src: a, alt: n, name: o, status:
|
|
503
|
-
const [
|
|
504
|
-
return /* @__PURE__ */
|
|
505
|
-
/* @__PURE__ */ t("span", { className: "flex h-full w-full items-center justify-center overflow-hidden rounded-full bg-bg-muted font-medium text-fg", children:
|
|
501
|
+
const Le = p(
|
|
502
|
+
({ className: e, size: r = "md", src: a, alt: n, name: o, status: l, ...s }, c) => {
|
|
503
|
+
const [d, f] = x(!1), g = a && !d;
|
|
504
|
+
return /* @__PURE__ */ u("span", { ref: c, className: i(ze({ size: r }), e), ...s, children: [
|
|
505
|
+
/* @__PURE__ */ t("span", { className: "flex h-full w-full items-center justify-center overflow-hidden rounded-full bg-bg-muted font-medium text-fg", children: g ? /* @__PURE__ */ t(
|
|
506
506
|
"img",
|
|
507
507
|
{
|
|
508
508
|
src: a,
|
|
509
509
|
alt: n ?? o ?? "",
|
|
510
510
|
className: "h-full w-full object-cover",
|
|
511
|
-
onError: () =>
|
|
511
|
+
onError: () => f(!0)
|
|
512
512
|
}
|
|
513
513
|
) : /* @__PURE__ */ t("span", { "aria-hidden": !0, children: Ee(o) }) }),
|
|
514
|
-
|
|
514
|
+
l && /* @__PURE__ */ t(
|
|
515
515
|
"span",
|
|
516
516
|
{
|
|
517
|
-
"aria-label":
|
|
517
|
+
"aria-label": l,
|
|
518
518
|
className: i(
|
|
519
519
|
"absolute bottom-[8%] right-[8%] rounded-full ring-2 ring-bg",
|
|
520
|
-
Me[
|
|
520
|
+
Me[l],
|
|
521
521
|
Te[r ?? "md"]
|
|
522
522
|
)
|
|
523
523
|
}
|
|
@@ -525,8 +525,8 @@ const Pe = g(
|
|
|
525
525
|
] });
|
|
526
526
|
}
|
|
527
527
|
);
|
|
528
|
-
|
|
529
|
-
const
|
|
528
|
+
Le.displayName = "Avatar";
|
|
529
|
+
const Pe = V("animate-spin text-primary", {
|
|
530
530
|
variants: {
|
|
531
531
|
size: {
|
|
532
532
|
sm: "h-4 w-4",
|
|
@@ -535,8 +535,8 @@ const De = V("animate-spin text-primary", {
|
|
|
535
535
|
}
|
|
536
536
|
},
|
|
537
537
|
defaultVariants: { size: "md" }
|
|
538
|
-
}),
|
|
539
|
-
({ className: e, size: r, label: a = "Carregando", ...n }, o) => /* @__PURE__ */
|
|
538
|
+
}), De = p(
|
|
539
|
+
({ className: e, size: r, label: a = "Carregando", ...n }, o) => /* @__PURE__ */ u(
|
|
540
540
|
"svg",
|
|
541
541
|
{
|
|
542
542
|
ref: o,
|
|
@@ -544,7 +544,7 @@ const De = V("animate-spin text-primary", {
|
|
|
544
544
|
fill: "none",
|
|
545
545
|
role: "status",
|
|
546
546
|
"aria-label": a,
|
|
547
|
-
className: i(
|
|
547
|
+
className: i(Pe({ size: r }), e),
|
|
548
548
|
...n,
|
|
549
549
|
children: [
|
|
550
550
|
/* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "3", className: "opacity-20" }),
|
|
@@ -561,14 +561,14 @@ const De = V("animate-spin text-primary", {
|
|
|
561
561
|
}
|
|
562
562
|
)
|
|
563
563
|
);
|
|
564
|
-
|
|
565
|
-
const
|
|
566
|
-
({ className: e, value: r = 0, max: a = 100, indeterminate: n, ...o },
|
|
567
|
-
const
|
|
564
|
+
De.displayName = "Spinner";
|
|
565
|
+
const Ae = p(
|
|
566
|
+
({ className: e, value: r = 0, max: a = 100, indeterminate: n, ...o }, l) => {
|
|
567
|
+
const s = Math.min(100, Math.max(0, r / a * 100));
|
|
568
568
|
return /* @__PURE__ */ t(
|
|
569
569
|
"div",
|
|
570
570
|
{
|
|
571
|
-
ref:
|
|
571
|
+
ref: l,
|
|
572
572
|
role: "progressbar",
|
|
573
573
|
"aria-valuemin": 0,
|
|
574
574
|
"aria-valuemax": a,
|
|
@@ -582,15 +582,15 @@ const je = g(
|
|
|
582
582
|
"div",
|
|
583
583
|
{
|
|
584
584
|
className: "h-full rounded-full bg-primary transition-[width] duration-300",
|
|
585
|
-
style: { width: `${
|
|
585
|
+
style: { width: `${s}%` }
|
|
586
586
|
}
|
|
587
587
|
)
|
|
588
588
|
}
|
|
589
589
|
);
|
|
590
590
|
}
|
|
591
591
|
);
|
|
592
|
-
|
|
593
|
-
const Ie =
|
|
592
|
+
Ae.displayName = "Progress";
|
|
593
|
+
const Ie = p(
|
|
594
594
|
({ className: e, orientation: r = "horizontal", label: a, ...n }, o) => r === "vertical" ? /* @__PURE__ */ t(
|
|
595
595
|
"div",
|
|
596
596
|
{
|
|
@@ -600,7 +600,7 @@ const Ie = g(
|
|
|
600
600
|
className: i("mx-2 h-full w-px self-stretch bg-border-default", e),
|
|
601
601
|
...n
|
|
602
602
|
}
|
|
603
|
-
) : a ? /* @__PURE__ */
|
|
603
|
+
) : a ? /* @__PURE__ */ u(
|
|
604
604
|
"div",
|
|
605
605
|
{
|
|
606
606
|
ref: o,
|
|
@@ -625,17 +625,17 @@ const Ie = g(
|
|
|
625
625
|
)
|
|
626
626
|
);
|
|
627
627
|
Ie.displayName = "Divider";
|
|
628
|
-
const Se =
|
|
628
|
+
const Se = p(
|
|
629
629
|
({ className: e, children: r, ...a }, n) => {
|
|
630
630
|
const o = oe.toArray(r);
|
|
631
|
-
return /* @__PURE__ */ t("nav", { ref: n, "aria-label": "breadcrumb", className: e, ...a, children: /* @__PURE__ */ t("ol", { className: "flex flex-wrap items-center gap-1.5 text-sm", children: o.map((
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
] },
|
|
631
|
+
return /* @__PURE__ */ t("nav", { ref: n, "aria-label": "breadcrumb", className: e, ...a, children: /* @__PURE__ */ t("ol", { className: "flex flex-wrap items-center gap-1.5 text-sm", children: o.map((l, s) => /* @__PURE__ */ u(le, { children: [
|
|
632
|
+
l,
|
|
633
|
+
s < o.length - 1 && /* @__PURE__ */ t(je, {})
|
|
634
|
+
] }, s)) }) });
|
|
635
635
|
}
|
|
636
636
|
);
|
|
637
637
|
Se.displayName = "Breadcrumb";
|
|
638
|
-
function
|
|
638
|
+
function hr({
|
|
639
639
|
href: e,
|
|
640
640
|
current: r,
|
|
641
641
|
className: a,
|
|
@@ -658,45 +658,45 @@ function fr({
|
|
|
658
658
|
}
|
|
659
659
|
) });
|
|
660
660
|
}
|
|
661
|
-
function
|
|
661
|
+
function je() {
|
|
662
662
|
return /* @__PURE__ */ t("li", { "aria-hidden": !0, className: "text-fg-muted", children: "/" });
|
|
663
663
|
}
|
|
664
664
|
function Be(e, r = 1e3) {
|
|
665
|
-
const [a, n] =
|
|
665
|
+
const [a, n] = x(0);
|
|
666
666
|
return N(() => {
|
|
667
667
|
n(0);
|
|
668
|
-
const o = performance.now(),
|
|
669
|
-
const c = Math.min((
|
|
670
|
-
n(e *
|
|
668
|
+
const o = performance.now(), l = (s) => {
|
|
669
|
+
const c = Math.min((s - o) / r, 1), d = 1 - (1 - c) ** 4;
|
|
670
|
+
n(e * d), c < 1 ? requestAnimationFrame(l) : n(e);
|
|
671
671
|
};
|
|
672
|
-
requestAnimationFrame(
|
|
672
|
+
requestAnimationFrame(l);
|
|
673
673
|
}, [e, r]), a;
|
|
674
674
|
}
|
|
675
|
-
const _e =
|
|
676
|
-
({ className: e, label: r, value: a, countUp: n, formatCount: o, delta:
|
|
677
|
-
const
|
|
678
|
-
return /* @__PURE__ */
|
|
675
|
+
const _e = p(
|
|
676
|
+
({ className: e, label: r, value: a, countUp: n, formatCount: o, delta: l, helpText: s, icon: c, ...d }, f) => {
|
|
677
|
+
const g = Be(n ?? 0), b = typeof l == "number", v = b && l >= 0, h = n !== void 0 ? o ? o(g) : Math.round(g).toLocaleString("pt-BR") : a;
|
|
678
|
+
return /* @__PURE__ */ u(
|
|
679
679
|
"div",
|
|
680
680
|
{
|
|
681
|
-
ref:
|
|
681
|
+
ref: f,
|
|
682
682
|
className: i(
|
|
683
|
-
"flex flex-col gap-2 rounded-xl bg-bg-muted dark:bg-
|
|
683
|
+
"flex flex-col gap-2 rounded-xl bg-bg-muted dark:bg-neutral-900 p-8 shadow-sm",
|
|
684
684
|
e
|
|
685
685
|
),
|
|
686
|
-
...
|
|
686
|
+
...d,
|
|
687
687
|
children: [
|
|
688
|
-
/* @__PURE__ */
|
|
688
|
+
/* @__PURE__ */ u("div", { className: "flex items-center justify-between", children: [
|
|
689
689
|
/* @__PURE__ */ t("span", { className: "text-sm text-fg-muted", children: r }),
|
|
690
690
|
c && /* @__PURE__ */ t("span", { className: "text-fg-muted", children: c })
|
|
691
691
|
] }),
|
|
692
|
-
/* @__PURE__ */ t("span", { className: "text-3xl font-bold text-fg whitespace-nowrap tabular-nums", children:
|
|
693
|
-
|
|
694
|
-
|
|
692
|
+
/* @__PURE__ */ t("span", { className: "text-3xl font-bold text-fg whitespace-nowrap tabular-nums", children: h }),
|
|
693
|
+
b && /* @__PURE__ */ u(Y, { variant: v ? "success" : "danger", size: "sm", className: "self-start", children: [
|
|
694
|
+
v ? "▲" : "▼",
|
|
695
695
|
" ",
|
|
696
|
-
Math.abs(
|
|
696
|
+
Math.abs(l),
|
|
697
697
|
"%"
|
|
698
698
|
] }),
|
|
699
|
-
|
|
699
|
+
s && /* @__PURE__ */ t("span", { className: "text-xs text-fg-muted", children: s })
|
|
700
700
|
]
|
|
701
701
|
}
|
|
702
702
|
);
|
|
@@ -723,16 +723,16 @@ const Re = V("flex gap-3 rounded-lg p-4 text-sm", {
|
|
|
723
723
|
success: "✓",
|
|
724
724
|
warning: "!",
|
|
725
725
|
danger: "✕"
|
|
726
|
-
}, He =
|
|
727
|
-
({ className: e, variant: r = "info", title: a, onClose: n, children: o, ...
|
|
726
|
+
}, He = p(
|
|
727
|
+
({ className: e, variant: r = "info", title: a, onClose: n, children: o, ...l }, s) => {
|
|
728
728
|
const c = r ?? "info";
|
|
729
|
-
return /* @__PURE__ */
|
|
729
|
+
return /* @__PURE__ */ u(
|
|
730
730
|
"div",
|
|
731
731
|
{
|
|
732
|
-
ref:
|
|
732
|
+
ref: s,
|
|
733
733
|
role: "alert",
|
|
734
734
|
className: i(Re({ variant: r }), e),
|
|
735
|
-
...
|
|
735
|
+
...l,
|
|
736
736
|
children: [
|
|
737
737
|
/* @__PURE__ */ t(
|
|
738
738
|
"span",
|
|
@@ -745,7 +745,7 @@ const Re = V("flex gap-3 rounded-lg p-4 text-sm", {
|
|
|
745
745
|
children: We[c]
|
|
746
746
|
}
|
|
747
747
|
),
|
|
748
|
-
/* @__PURE__ */
|
|
748
|
+
/* @__PURE__ */ u("div", { className: "min-w-0 flex-1", children: [
|
|
749
749
|
a && /* @__PURE__ */ t("div", { className: "font-semibold text-fg", children: a }),
|
|
750
750
|
o && /* @__PURE__ */ t("div", { className: "text-fg-muted", children: o })
|
|
751
751
|
] }),
|
|
@@ -770,43 +770,43 @@ function Ke({
|
|
|
770
770
|
defaultValue: r,
|
|
771
771
|
onChange: a
|
|
772
772
|
}) {
|
|
773
|
-
const n = e !== void 0, [o,
|
|
774
|
-
(
|
|
775
|
-
n ||
|
|
773
|
+
const n = e !== void 0, [o, l] = x(r), s = n ? e : o, c = z(
|
|
774
|
+
(d) => {
|
|
775
|
+
n || l(d), a == null || a(d);
|
|
776
776
|
},
|
|
777
777
|
[n, a]
|
|
778
778
|
);
|
|
779
|
-
return [
|
|
779
|
+
return [s, c];
|
|
780
780
|
}
|
|
781
781
|
const $ = C(null);
|
|
782
|
-
function
|
|
783
|
-
const e =
|
|
782
|
+
function B() {
|
|
783
|
+
const e = y($);
|
|
784
784
|
if (!e) throw new Error("Componentes de Tabs precisam estar dentro de <Tabs>");
|
|
785
785
|
return e;
|
|
786
786
|
}
|
|
787
|
-
function
|
|
787
|
+
function br({
|
|
788
788
|
value: e,
|
|
789
789
|
defaultValue: r,
|
|
790
790
|
onValueChange: a,
|
|
791
791
|
className: n,
|
|
792
792
|
children: o,
|
|
793
|
-
...
|
|
793
|
+
...l
|
|
794
794
|
}) {
|
|
795
|
-
const [
|
|
795
|
+
const [s, c] = Ke({
|
|
796
796
|
value: e,
|
|
797
797
|
defaultValue: r ?? "",
|
|
798
798
|
onChange: a
|
|
799
799
|
});
|
|
800
|
-
return /* @__PURE__ */ t($.Provider, { value: { value:
|
|
800
|
+
return /* @__PURE__ */ t($.Provider, { value: { value: s, setValue: c }, children: /* @__PURE__ */ t("div", { className: n, ...l, children: o }) });
|
|
801
801
|
}
|
|
802
|
-
function
|
|
803
|
-
const { value: n } =
|
|
802
|
+
function xr({ className: e, children: r, ...a }) {
|
|
803
|
+
const { value: n } = B(), o = L(null), [l, s] = x({ left: 0, width: 0, ready: !1 });
|
|
804
804
|
return N(() => {
|
|
805
805
|
const c = o.current;
|
|
806
806
|
if (!c) return;
|
|
807
|
-
const
|
|
808
|
-
|
|
809
|
-
}, [n]), /* @__PURE__ */
|
|
807
|
+
const d = c.querySelector('[aria-selected="true"]');
|
|
808
|
+
d && s({ left: d.offsetLeft, width: d.offsetWidth, ready: !0 });
|
|
809
|
+
}, [n]), /* @__PURE__ */ u(
|
|
810
810
|
"div",
|
|
811
811
|
{
|
|
812
812
|
ref: o,
|
|
@@ -815,20 +815,20 @@ function pr({ className: e, children: r, ...a }) {
|
|
|
815
815
|
...a,
|
|
816
816
|
children: [
|
|
817
817
|
r,
|
|
818
|
-
|
|
818
|
+
l.ready && /* @__PURE__ */ t(
|
|
819
819
|
"span",
|
|
820
820
|
{
|
|
821
821
|
"aria-hidden": !0,
|
|
822
822
|
className: "pointer-events-none absolute bottom-[-1px] h-[2px] rounded-full bg-primary transition-all duration-250 ease-out",
|
|
823
|
-
style: { left:
|
|
823
|
+
style: { left: l.left, width: l.width }
|
|
824
824
|
}
|
|
825
825
|
)
|
|
826
826
|
]
|
|
827
827
|
}
|
|
828
828
|
);
|
|
829
829
|
}
|
|
830
|
-
function
|
|
831
|
-
const n =
|
|
830
|
+
function vr({ value: e, className: r, ...a }) {
|
|
831
|
+
const n = B(), o = n.value === e;
|
|
832
832
|
return /* @__PURE__ */ t(
|
|
833
833
|
"button",
|
|
834
834
|
{
|
|
@@ -846,8 +846,8 @@ function gr({ value: e, className: r, ...a }) {
|
|
|
846
846
|
}
|
|
847
847
|
);
|
|
848
848
|
}
|
|
849
|
-
function
|
|
850
|
-
return
|
|
849
|
+
function wr({ value: e, className: r, ...a }) {
|
|
850
|
+
return B().value !== e ? null : /* @__PURE__ */ t(
|
|
851
851
|
"div",
|
|
852
852
|
{
|
|
853
853
|
role: "tabpanel",
|
|
@@ -856,24 +856,24 @@ function br({ value: e, className: r, ...a }) {
|
|
|
856
856
|
}
|
|
857
857
|
);
|
|
858
858
|
}
|
|
859
|
-
const J = C(null),
|
|
859
|
+
const J = C(null), _ = C("");
|
|
860
860
|
function Q() {
|
|
861
|
-
const e =
|
|
861
|
+
const e = y(J);
|
|
862
862
|
if (!e) throw new Error("Componentes de Accordion precisam estar dentro de <Accordion>");
|
|
863
863
|
return e;
|
|
864
864
|
}
|
|
865
|
-
function
|
|
865
|
+
function yr({
|
|
866
866
|
type: e = "single",
|
|
867
867
|
defaultValue: r,
|
|
868
868
|
className: a,
|
|
869
869
|
children: n,
|
|
870
870
|
...o
|
|
871
871
|
}) {
|
|
872
|
-
const
|
|
873
|
-
const
|
|
874
|
-
return e === "single" ?
|
|
872
|
+
const l = r ? Array.isArray(r) ? r : [r] : [], [s, c] = x(l), d = (f) => c((g) => {
|
|
873
|
+
const b = g.includes(f);
|
|
874
|
+
return e === "single" ? b ? [] : [f] : b ? g.filter((v) => v !== f) : [...g, f];
|
|
875
875
|
});
|
|
876
|
-
return /* @__PURE__ */ t(J.Provider, { value: { open:
|
|
876
|
+
return /* @__PURE__ */ t(J.Provider, { value: { open: s, toggle: d }, children: /* @__PURE__ */ t(
|
|
877
877
|
"div",
|
|
878
878
|
{
|
|
879
879
|
className: i("border-y border-border-default divide-y divide-border-default", a),
|
|
@@ -882,20 +882,20 @@ function hr({
|
|
|
882
882
|
}
|
|
883
883
|
) });
|
|
884
884
|
}
|
|
885
|
-
function
|
|
886
|
-
return /* @__PURE__ */ t(
|
|
885
|
+
function Nr({ value: e, children: r, ...a }) {
|
|
886
|
+
return /* @__PURE__ */ t(_.Provider, { value: e, children: /* @__PURE__ */ t("div", { ...a, children: r }) });
|
|
887
887
|
}
|
|
888
|
-
function
|
|
888
|
+
function Cr({
|
|
889
889
|
className: e,
|
|
890
890
|
children: r,
|
|
891
891
|
...a
|
|
892
892
|
}) {
|
|
893
|
-
const n = Q(), o =
|
|
894
|
-
return /* @__PURE__ */
|
|
893
|
+
const n = Q(), o = y(_), l = n.open.includes(o);
|
|
894
|
+
return /* @__PURE__ */ u(
|
|
895
895
|
"button",
|
|
896
896
|
{
|
|
897
897
|
type: "button",
|
|
898
|
-
"aria-expanded":
|
|
898
|
+
"aria-expanded": l,
|
|
899
899
|
onClick: () => n.toggle(o),
|
|
900
900
|
className: i(
|
|
901
901
|
"flex w-full items-center justify-between gap-2 py-4 text-left text-sm font-medium text-fg outline-none cursor-pointer",
|
|
@@ -905,16 +905,16 @@ function xr({
|
|
|
905
905
|
...a,
|
|
906
906
|
children: [
|
|
907
907
|
r,
|
|
908
|
-
/* @__PURE__ */ t("span", { className: i("text-fg-muted transition-transform",
|
|
908
|
+
/* @__PURE__ */ t("span", { className: i("text-fg-muted transition-transform", l && "rotate-180"), children: "▾" })
|
|
909
909
|
]
|
|
910
910
|
}
|
|
911
911
|
);
|
|
912
912
|
}
|
|
913
|
-
function
|
|
913
|
+
function Vr({
|
|
914
914
|
className: e,
|
|
915
915
|
...r
|
|
916
916
|
}) {
|
|
917
|
-
const a = Q(), n =
|
|
917
|
+
const a = Q(), n = y(_);
|
|
918
918
|
return a.open.includes(n) ? /* @__PURE__ */ t("div", { className: i("pb-4 text-sm text-fg-muted", e), ...r }) : null;
|
|
919
919
|
}
|
|
920
920
|
const qe = {
|
|
@@ -923,23 +923,23 @@ const qe = {
|
|
|
923
923
|
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
924
924
|
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
925
925
|
};
|
|
926
|
-
function
|
|
927
|
-
const [o,
|
|
928
|
-
return /* @__PURE__ */
|
|
926
|
+
function kr({ content: e, side: r = "top", children: a, className: n }) {
|
|
927
|
+
const [o, l] = x(!1), s = K();
|
|
928
|
+
return /* @__PURE__ */ u(
|
|
929
929
|
"span",
|
|
930
930
|
{
|
|
931
931
|
className: "relative inline-flex",
|
|
932
|
-
onMouseEnter: () =>
|
|
933
|
-
onMouseLeave: () =>
|
|
934
|
-
onFocus: () =>
|
|
935
|
-
onBlur: () =>
|
|
932
|
+
onMouseEnter: () => l(!0),
|
|
933
|
+
onMouseLeave: () => l(!1),
|
|
934
|
+
onFocus: () => l(!0),
|
|
935
|
+
onBlur: () => l(!1),
|
|
936
936
|
children: [
|
|
937
|
-
/* @__PURE__ */ t("span", { "aria-describedby": o ?
|
|
937
|
+
/* @__PURE__ */ t("span", { "aria-describedby": o ? s : void 0, children: a }),
|
|
938
938
|
o && /* @__PURE__ */ t(
|
|
939
939
|
"span",
|
|
940
940
|
{
|
|
941
941
|
role: "tooltip",
|
|
942
|
-
id:
|
|
942
|
+
id: s,
|
|
943
943
|
className: i(
|
|
944
944
|
"pointer-events-none absolute z-50 whitespace-nowrap rounded-md bg-fg px-2 py-1 text-xs text-bg shadow-md",
|
|
945
945
|
"animate-[flui-fade-in_120ms_ease-out]",
|
|
@@ -955,23 +955,23 @@ function yr({ content: e, side: r = "top", children: a, className: n }) {
|
|
|
955
955
|
}
|
|
956
956
|
const X = C(null);
|
|
957
957
|
function Z() {
|
|
958
|
-
const e =
|
|
958
|
+
const e = y(X);
|
|
959
959
|
if (!e) throw new Error("Componentes de Popover precisam estar dentro de <Popover>");
|
|
960
960
|
return e;
|
|
961
961
|
}
|
|
962
|
-
function
|
|
963
|
-
const [r, a] =
|
|
962
|
+
function zr({ children: e }) {
|
|
963
|
+
const [r, a] = x(!1), n = L(null);
|
|
964
964
|
return N(() => {
|
|
965
965
|
if (!r) return;
|
|
966
|
-
const o = (
|
|
967
|
-
n.current && !n.current.contains(
|
|
968
|
-
},
|
|
969
|
-
return document.addEventListener("mousedown", o), document.addEventListener("keydown",
|
|
970
|
-
document.removeEventListener("mousedown", o), document.removeEventListener("keydown",
|
|
966
|
+
const o = (s) => {
|
|
967
|
+
n.current && !n.current.contains(s.target) && a(!1);
|
|
968
|
+
}, l = (s) => s.key === "Escape" && a(!1);
|
|
969
|
+
return document.addEventListener("mousedown", o), document.addEventListener("keydown", l), () => {
|
|
970
|
+
document.removeEventListener("mousedown", o), document.removeEventListener("keydown", l);
|
|
971
971
|
};
|
|
972
972
|
}, [r]), /* @__PURE__ */ t(X.Provider, { value: { open: r, setOpen: a }, children: /* @__PURE__ */ t("div", { ref: n, className: "relative inline-block", children: e }) });
|
|
973
973
|
}
|
|
974
|
-
function
|
|
974
|
+
function Mr({ children: e }) {
|
|
975
975
|
const { open: r, setOpen: a } = Z();
|
|
976
976
|
return q(e, {
|
|
977
977
|
onClick: () => a(!r),
|
|
@@ -979,7 +979,7 @@ function Cr({ children: e }) {
|
|
|
979
979
|
"aria-expanded": r
|
|
980
980
|
});
|
|
981
981
|
}
|
|
982
|
-
function
|
|
982
|
+
function Tr({
|
|
983
983
|
children: e,
|
|
984
984
|
align: r = "start",
|
|
985
985
|
className: a
|
|
@@ -999,8 +999,8 @@ function Vr({
|
|
|
999
999
|
}
|
|
1000
1000
|
) : null;
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1003
|
-
const [r, a] =
|
|
1002
|
+
function R({ children: e }) {
|
|
1003
|
+
const [r, a] = x(!1);
|
|
1004
1004
|
return N(() => a(!0), []), r ? ue(e, document.body) : null;
|
|
1005
1005
|
}
|
|
1006
1006
|
function ee(e, r) {
|
|
@@ -1015,7 +1015,7 @@ function ee(e, r) {
|
|
|
1015
1015
|
const re = C(null);
|
|
1016
1016
|
function Ge({ open: e, onOpenChange: r, children: a }) {
|
|
1017
1017
|
const n = () => r == null ? void 0 : r(!1);
|
|
1018
|
-
return ee(e, n), e ? /* @__PURE__ */ t(
|
|
1018
|
+
return ee(e, n), e ? /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(re.Provider, { value: { close: n }, children: /* @__PURE__ */ u("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
|
|
1019
1019
|
/* @__PURE__ */ t(
|
|
1020
1020
|
"div",
|
|
1021
1021
|
{
|
|
@@ -1026,13 +1026,13 @@ function Ge({ open: e, onOpenChange: r, children: a }) {
|
|
|
1026
1026
|
a
|
|
1027
1027
|
] }) }) }) : null;
|
|
1028
1028
|
}
|
|
1029
|
-
function
|
|
1029
|
+
function Ue({
|
|
1030
1030
|
className: e,
|
|
1031
1031
|
children: r,
|
|
1032
1032
|
...a
|
|
1033
1033
|
}) {
|
|
1034
|
-
const n =
|
|
1035
|
-
return /* @__PURE__ */
|
|
1034
|
+
const n = y(re);
|
|
1035
|
+
return /* @__PURE__ */ u(
|
|
1036
1036
|
"div",
|
|
1037
1037
|
{
|
|
1038
1038
|
role: "dialog",
|
|
@@ -1059,33 +1059,33 @@ function Oe({
|
|
|
1059
1059
|
}
|
|
1060
1060
|
);
|
|
1061
1061
|
}
|
|
1062
|
-
function
|
|
1062
|
+
function Er({ className: e, ...r }) {
|
|
1063
1063
|
return /* @__PURE__ */ t("div", { className: i("flex flex-col gap-1 p-6 pb-2", e), ...r });
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1065
|
+
function Lr({ className: e, ...r }) {
|
|
1066
1066
|
return /* @__PURE__ */ t("h2", { className: i("text-lg font-semibold text-fg", e), ...r });
|
|
1067
1067
|
}
|
|
1068
|
-
function
|
|
1068
|
+
function Pr({
|
|
1069
1069
|
className: e,
|
|
1070
1070
|
...r
|
|
1071
1071
|
}) {
|
|
1072
1072
|
return /* @__PURE__ */ t("p", { className: i("text-sm text-fg-muted", e), ...r });
|
|
1073
1073
|
}
|
|
1074
|
-
function
|
|
1074
|
+
function Dr({ className: e, ...r }) {
|
|
1075
1075
|
return /* @__PURE__ */ t("div", { className: i("px-6 py-2", e), ...r });
|
|
1076
1076
|
}
|
|
1077
|
-
function
|
|
1077
|
+
function Ar({ className: e, ...r }) {
|
|
1078
1078
|
return /* @__PURE__ */ t("div", { className: i("flex justify-end gap-2 p-6 pt-4", e), ...r });
|
|
1079
1079
|
}
|
|
1080
|
-
const te = C(null),
|
|
1080
|
+
const te = C(null), Oe = {
|
|
1081
1081
|
left: "left-0 top-0 h-full w-[420px] max-w-[96vw] border-r",
|
|
1082
1082
|
right: "right-0 top-0 h-full w-[420px] max-w-[96vw] border-l",
|
|
1083
1083
|
top: "top-0 left-0 w-full max-h-[90vh] border-b",
|
|
1084
1084
|
bottom: "bottom-0 left-0 w-full max-h-[90vh] border-t"
|
|
1085
1085
|
};
|
|
1086
|
-
function
|
|
1086
|
+
function Ir({ open: e, onOpenChange: r, side: a = "right", children: n }) {
|
|
1087
1087
|
const o = () => r == null ? void 0 : r(!1);
|
|
1088
|
-
return ee(e, o), e ? /* @__PURE__ */ t(
|
|
1088
|
+
return ee(e, o), e ? /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(te.Provider, { value: { close: o, side: a }, children: /* @__PURE__ */ u("div", { className: "fixed inset-0 z-50", children: [
|
|
1089
1089
|
/* @__PURE__ */ t(
|
|
1090
1090
|
"div",
|
|
1091
1091
|
{
|
|
@@ -1096,13 +1096,13 @@ function Pr({ open: e, onOpenChange: r, side: a = "right", children: n }) {
|
|
|
1096
1096
|
n
|
|
1097
1097
|
] }) }) }) : null;
|
|
1098
1098
|
}
|
|
1099
|
-
function
|
|
1099
|
+
function Sr({
|
|
1100
1100
|
className: e,
|
|
1101
1101
|
children: r,
|
|
1102
1102
|
...a
|
|
1103
1103
|
}) {
|
|
1104
|
-
const n =
|
|
1105
|
-
return /* @__PURE__ */
|
|
1104
|
+
const n = y(te), o = (n == null ? void 0 : n.side) ?? "right";
|
|
1105
|
+
return /* @__PURE__ */ u(
|
|
1106
1106
|
"div",
|
|
1107
1107
|
{
|
|
1108
1108
|
role: "dialog",
|
|
@@ -1110,7 +1110,7 @@ function Dr({
|
|
|
1110
1110
|
className: i(
|
|
1111
1111
|
"absolute z-10 flex flex-col border-border-default bg-bg shadow-lg",
|
|
1112
1112
|
"animate-[flui-fade-in_160ms_ease-out]",
|
|
1113
|
-
|
|
1113
|
+
Oe[o],
|
|
1114
1114
|
e
|
|
1115
1115
|
),
|
|
1116
1116
|
...a,
|
|
@@ -1130,7 +1130,7 @@ function Dr({
|
|
|
1130
1130
|
}
|
|
1131
1131
|
);
|
|
1132
1132
|
}
|
|
1133
|
-
function
|
|
1133
|
+
function jr({ className: e, ...r }) {
|
|
1134
1134
|
return /* @__PURE__ */ t(
|
|
1135
1135
|
"div",
|
|
1136
1136
|
{
|
|
@@ -1139,13 +1139,13 @@ function Lr({ className: e, ...r }) {
|
|
|
1139
1139
|
}
|
|
1140
1140
|
);
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
1142
|
+
function Br({ className: e, ...r }) {
|
|
1143
1143
|
return /* @__PURE__ */ t("h2", { className: i("text-lg font-semibold text-fg", e), ...r });
|
|
1144
1144
|
}
|
|
1145
|
-
function
|
|
1145
|
+
function _r({ className: e, ...r }) {
|
|
1146
1146
|
return /* @__PURE__ */ t("div", { className: i("flex-1 overflow-y-auto p-6", e), ...r });
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1148
|
+
function Rr({ className: e, ...r }) {
|
|
1149
1149
|
return /* @__PURE__ */ t(
|
|
1150
1150
|
"div",
|
|
1151
1151
|
{
|
|
@@ -1154,63 +1154,81 @@ function Sr({ className: e, ...r }) {
|
|
|
1154
1154
|
}
|
|
1155
1155
|
);
|
|
1156
1156
|
}
|
|
1157
|
-
const ae = C(null),
|
|
1158
|
-
info: { wrapper: "bg-
|
|
1159
|
-
success: { wrapper: "bg-
|
|
1160
|
-
warning: { wrapper: "bg-
|
|
1161
|
-
danger: { wrapper: "bg-
|
|
1157
|
+
const ae = C(null), Ye = {
|
|
1158
|
+
info: { wrapper: "bg-[var(--color-toast-info-bg)]", title: "text-fg", description: "text-fg-muted", action: "text-primary hover:text-primary/80" },
|
|
1159
|
+
success: { wrapper: "bg-[var(--color-toast-success-bg)]", title: "text-success-fg", description: "text-fg-muted", action: "text-success-fg hover:text-success-fg/80" },
|
|
1160
|
+
warning: { wrapper: "bg-[var(--color-toast-warning-bg)]", title: "text-fg", description: "text-fg-muted", action: "text-fg hover:text-fg/80" },
|
|
1161
|
+
danger: { wrapper: "bg-[var(--color-toast-danger-bg)]", title: "text-danger", description: "text-fg-muted", action: "text-danger hover:text-danger/80" }
|
|
1162
1162
|
};
|
|
1163
|
-
function
|
|
1164
|
-
const [r, a] =
|
|
1165
|
-
a((c) => c.
|
|
1166
|
-
|
|
1163
|
+
function Fr({ children: e }) {
|
|
1164
|
+
const [r, a] = x([]), n = L(0), o = z((s) => {
|
|
1165
|
+
a((c) => c.map((d) => d.id === s ? { ...d, leaving: !0 } : d)), setTimeout(() => {
|
|
1166
|
+
a((c) => c.filter((d) => d.id !== s));
|
|
1167
|
+
}, 160);
|
|
1168
|
+
}, []), l = z((s) => {
|
|
1167
1169
|
const c = ++n.current;
|
|
1168
|
-
return a((
|
|
1170
|
+
return a((d) => [...d, { id: c, variant: "info", duration: 4e3, ...s }]), c;
|
|
1169
1171
|
}, []);
|
|
1170
|
-
return /* @__PURE__ */
|
|
1172
|
+
return /* @__PURE__ */ u(ae.Provider, { value: { toast: l, dismiss: o }, children: [
|
|
1171
1173
|
e,
|
|
1172
|
-
/* @__PURE__ */ t(
|
|
1174
|
+
/* @__PURE__ */ t(R, { children: /* @__PURE__ */ t("div", { className: "pointer-events-none fixed bottom-4 right-8 z-[60] flex w-80 max-w-[90vw] flex-col gap-2", children: r.map((s) => /* @__PURE__ */ t($e, { item: s, onDismiss: () => o(s.id) }, s.id)) }) })
|
|
1173
1175
|
] });
|
|
1174
1176
|
}
|
|
1175
|
-
function
|
|
1176
|
-
|
|
1177
|
+
function $e({ item: e, onDismiss: r }) {
|
|
1178
|
+
N(() => {
|
|
1177
1179
|
if (!e.duration) return;
|
|
1178
|
-
const
|
|
1179
|
-
return () => clearTimeout(
|
|
1180
|
-
}, [e.duration, r])
|
|
1180
|
+
const n = setTimeout(r, e.duration);
|
|
1181
|
+
return () => clearTimeout(n);
|
|
1182
|
+
}, [e.duration, r]);
|
|
1183
|
+
const a = Ye[e.variant ?? "info"];
|
|
1184
|
+
return /* @__PURE__ */ u(
|
|
1181
1185
|
"div",
|
|
1182
1186
|
{
|
|
1183
1187
|
role: "status",
|
|
1184
1188
|
className: i(
|
|
1185
|
-
"pointer-events-auto flex items-start gap-3 rounded-
|
|
1186
|
-
"animate-[flui-slide-up_160ms_ease-out]",
|
|
1187
|
-
|
|
1189
|
+
"pointer-events-auto flex items-start gap-3 rounded-3xl p-4 shadow-sm",
|
|
1190
|
+
e.leaving ? "animate-[flui-slide-down_160ms_ease-in_forwards]" : "animate-[flui-slide-up_160ms_ease-out]",
|
|
1191
|
+
a.wrapper
|
|
1188
1192
|
),
|
|
1189
1193
|
children: [
|
|
1190
|
-
/* @__PURE__ */
|
|
1191
|
-
|
|
1192
|
-
|
|
1194
|
+
e.icon && /* @__PURE__ */ t("span", { className: i("mt-0.5 shrink-0", a.title), children: e.icon }),
|
|
1195
|
+
/* @__PURE__ */ u("div", { className: "min-w-0 flex-1", children: [
|
|
1196
|
+
/* @__PURE__ */ t("div", { className: i("text-sm font-semibold", a.title), children: e.title }),
|
|
1197
|
+
e.description && /* @__PURE__ */ t("div", { className: i("mt-0.5 text-sm", a.description), children: e.description })
|
|
1193
1198
|
] }),
|
|
1194
|
-
/* @__PURE__ */
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1199
|
+
/* @__PURE__ */ u("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
1200
|
+
e.action && /* @__PURE__ */ t(
|
|
1201
|
+
"button",
|
|
1202
|
+
{
|
|
1203
|
+
type: "button",
|
|
1204
|
+
onClick: () => {
|
|
1205
|
+
e.action.onClick(), r();
|
|
1206
|
+
},
|
|
1207
|
+
className: i("cursor-pointer rounded-sm px-1.5 py-0.5 text-xs font-semibold transition-colors", a.action),
|
|
1208
|
+
children: e.action.label
|
|
1209
|
+
}
|
|
1210
|
+
),
|
|
1211
|
+
/* @__PURE__ */ t(
|
|
1212
|
+
"button",
|
|
1213
|
+
{
|
|
1214
|
+
type: "button",
|
|
1215
|
+
onClick: r,
|
|
1216
|
+
"aria-label": "Fechar",
|
|
1217
|
+
className: i("cursor-pointer rounded-sm px-1 transition-colors opacity-60 hover:opacity-100", a.title),
|
|
1218
|
+
children: "✕"
|
|
1219
|
+
}
|
|
1220
|
+
)
|
|
1221
|
+
] })
|
|
1204
1222
|
]
|
|
1205
1223
|
}
|
|
1206
1224
|
);
|
|
1207
1225
|
}
|
|
1208
|
-
function
|
|
1209
|
-
const e =
|
|
1226
|
+
function Je() {
|
|
1227
|
+
const e = y(ae);
|
|
1210
1228
|
if (!e) throw new Error("useToast precisa estar dentro de <ToastProvider>");
|
|
1211
1229
|
return e;
|
|
1212
1230
|
}
|
|
1213
|
-
const
|
|
1231
|
+
const Qe = V(
|
|
1214
1232
|
"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",
|
|
1215
1233
|
{
|
|
1216
1234
|
variants: {
|
|
@@ -1221,27 +1239,71 @@ const $e = V(
|
|
|
1221
1239
|
},
|
|
1222
1240
|
defaultVariants: { invalid: !1 }
|
|
1223
1241
|
}
|
|
1224
|
-
),
|
|
1242
|
+
), Xe = p(
|
|
1225
1243
|
({ className: e, invalid: r, ...a }, n) => /* @__PURE__ */ t(
|
|
1226
1244
|
"textarea",
|
|
1227
1245
|
{
|
|
1228
1246
|
ref: n,
|
|
1229
|
-
className: i(
|
|
1247
|
+
className: i(Qe({ invalid: r }), e),
|
|
1230
1248
|
...a
|
|
1231
1249
|
}
|
|
1232
1250
|
)
|
|
1233
1251
|
);
|
|
1234
|
-
|
|
1235
|
-
|
|
1252
|
+
Xe.displayName = "Textarea";
|
|
1253
|
+
const Ze = p(
|
|
1254
|
+
({ code: e, language: r, className: a, ...n }, o) => {
|
|
1255
|
+
const { toast: l } = Je();
|
|
1256
|
+
function s() {
|
|
1257
|
+
navigator.clipboard.writeText(e).then(() => {
|
|
1258
|
+
l({ title: "Copiado!", variant: "success", duration: 2e3 });
|
|
1259
|
+
});
|
|
1260
|
+
}
|
|
1261
|
+
return /* @__PURE__ */ u(
|
|
1262
|
+
"div",
|
|
1263
|
+
{
|
|
1264
|
+
ref: o,
|
|
1265
|
+
className: i("overflow-hidden rounded-lg bg-bg-subtle", a),
|
|
1266
|
+
...n,
|
|
1267
|
+
children: [
|
|
1268
|
+
/* @__PURE__ */ u("div", { className: "flex items-center justify-between bg-bg-muted px-4 py-2", children: [
|
|
1269
|
+
r ? /* @__PURE__ */ t("span", { className: "font-mono text-xs text-fg-muted", children: r }) : /* @__PURE__ */ t("span", {}),
|
|
1270
|
+
/* @__PURE__ */ u(
|
|
1271
|
+
"button",
|
|
1272
|
+
{
|
|
1273
|
+
type: "button",
|
|
1274
|
+
onClick: s,
|
|
1275
|
+
"aria-label": "Copiar código",
|
|
1276
|
+
className: "inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-fg-muted transition-colors hover:bg-bg hover:text-fg",
|
|
1277
|
+
children: [
|
|
1278
|
+
/* @__PURE__ */ t(er, {}),
|
|
1279
|
+
"Copiar"
|
|
1280
|
+
]
|
|
1281
|
+
}
|
|
1282
|
+
)
|
|
1283
|
+
] }),
|
|
1284
|
+
/* @__PURE__ */ t("pre", { className: "overflow-x-auto p-4 text-sm leading-relaxed", children: /* @__PURE__ */ t("code", { className: "font-mono text-fg", children: e }) })
|
|
1285
|
+
]
|
|
1286
|
+
}
|
|
1287
|
+
);
|
|
1288
|
+
}
|
|
1289
|
+
);
|
|
1290
|
+
Ze.displayName = "CodeBlock";
|
|
1291
|
+
function er() {
|
|
1292
|
+
return /* @__PURE__ */ u("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
|
|
1293
|
+
/* @__PURE__ */ t("rect", { x: "6", y: "6", width: "8", height: "8", rx: "1.5" }),
|
|
1294
|
+
/* @__PURE__ */ t("path", { d: "M4 10H3a1.5 1.5 0 0 1-1.5-1.5v-6A1.5 1.5 0 0 1 3 1h6A1.5 1.5 0 0 1 10.5 2.5V4" })
|
|
1295
|
+
] });
|
|
1296
|
+
}
|
|
1297
|
+
function rr({
|
|
1236
1298
|
user: e,
|
|
1237
1299
|
nav: r,
|
|
1238
1300
|
active: a,
|
|
1239
1301
|
onSelect: n,
|
|
1240
1302
|
footerAction: o
|
|
1241
1303
|
}) {
|
|
1242
|
-
const
|
|
1243
|
-
return /* @__PURE__ */
|
|
1244
|
-
/* @__PURE__ */
|
|
1304
|
+
const l = (s) => "flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-left text-sm transition-colors " + (s ? "bg-bg-muted font-medium text-fg" : "text-fg hover:bg-bg-muted");
|
|
1305
|
+
return /* @__PURE__ */ u("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: [
|
|
1306
|
+
/* @__PURE__ */ u("div", { className: "flex items-center gap-2.5 px-1", children: [
|
|
1245
1307
|
e.avatar ? /* @__PURE__ */ t(
|
|
1246
1308
|
"img",
|
|
1247
1309
|
{
|
|
@@ -1250,7 +1312,7 @@ function Qe({
|
|
|
1250
1312
|
className: "h-8 w-8 shrink-0 rounded-full object-cover"
|
|
1251
1313
|
}
|
|
1252
1314
|
) : /* @__PURE__ */ t("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() }),
|
|
1253
|
-
/* @__PURE__ */
|
|
1315
|
+
/* @__PURE__ */ u("div", { className: "min-w-0", children: [
|
|
1254
1316
|
/* @__PURE__ */ t("p", { className: "truncate text-sm font-medium text-fg", children: e.name }),
|
|
1255
1317
|
e.subtitle && /* @__PURE__ */ t("p", { className: "truncate text-xs text-fg-muted", children: e.subtitle })
|
|
1256
1318
|
] }),
|
|
@@ -1269,173 +1331,182 @@ function Qe({
|
|
|
1269
1331
|
}
|
|
1270
1332
|
)
|
|
1271
1333
|
] }),
|
|
1272
|
-
r.map(({ group:
|
|
1273
|
-
/* @__PURE__ */ t("p", { className: "mb-1 px-1 text-xs font-semibold text-fg-muted", children:
|
|
1274
|
-
/* @__PURE__ */ t("ul", { className: "flex flex-col gap-0.5", children: c.map((
|
|
1334
|
+
r.map(({ group: s, items: c }) => /* @__PURE__ */ u("div", { children: [
|
|
1335
|
+
/* @__PURE__ */ t("p", { className: "mb-1 px-1 text-xs font-semibold text-fg-muted", children: s }),
|
|
1336
|
+
/* @__PURE__ */ t("ul", { className: "flex flex-col gap-0.5", children: c.map((d) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ u(
|
|
1275
1337
|
"button",
|
|
1276
1338
|
{
|
|
1277
1339
|
type: "button",
|
|
1278
|
-
onClick: () => n(
|
|
1279
|
-
className:
|
|
1340
|
+
onClick: () => n(d.id),
|
|
1341
|
+
className: l(d.id === a),
|
|
1280
1342
|
children: [
|
|
1281
|
-
|
|
1282
|
-
|
|
1343
|
+
d.icon && /* @__PURE__ */ t("span", { className: "shrink-0 text-fg [&>svg]:h-[15px] [&>svg]:w-[15px]", children: d.icon }),
|
|
1344
|
+
d.label
|
|
1283
1345
|
]
|
|
1284
1346
|
}
|
|
1285
|
-
) },
|
|
1286
|
-
] },
|
|
1347
|
+
) }, d.id)) })
|
|
1348
|
+
] }, s)),
|
|
1287
1349
|
o && /* @__PURE__ */ t("div", { className: "mt-auto", children: o })
|
|
1288
1350
|
] });
|
|
1289
1351
|
}
|
|
1290
|
-
function
|
|
1352
|
+
function Wr({
|
|
1291
1353
|
title: e,
|
|
1292
1354
|
description: r,
|
|
1293
1355
|
checked: a,
|
|
1294
1356
|
onCheckedChange: n
|
|
1295
1357
|
}) {
|
|
1296
|
-
return /* @__PURE__ */
|
|
1297
|
-
/* @__PURE__ */
|
|
1358
|
+
return /* @__PURE__ */ u("div", { className: "flex items-center justify-between gap-6 px-4 py-4", children: [
|
|
1359
|
+
/* @__PURE__ */ u("div", { children: [
|
|
1298
1360
|
/* @__PURE__ */ t("p", { className: "text-sm font-medium text-fg", children: e }),
|
|
1299
1361
|
r && /* @__PURE__ */ t("p", { className: "mt-0.5 text-sm text-fg-muted", children: r })
|
|
1300
1362
|
] }),
|
|
1301
1363
|
/* @__PURE__ */ t(G, { checked: a, onCheckedChange: n, className: "shrink-0" })
|
|
1302
1364
|
] });
|
|
1303
1365
|
}
|
|
1304
|
-
function
|
|
1366
|
+
function tr({ children: e }) {
|
|
1305
1367
|
return /* @__PURE__ */ t("div", { className: "divide-y divide-border-default rounded-xl bg-bg", children: e });
|
|
1306
1368
|
}
|
|
1307
|
-
function
|
|
1369
|
+
function Hr({
|
|
1308
1370
|
title: e,
|
|
1309
1371
|
children: r
|
|
1310
1372
|
}) {
|
|
1311
|
-
return /* @__PURE__ */
|
|
1373
|
+
return /* @__PURE__ */ u("div", { className: "flex flex-col gap-3", children: [
|
|
1312
1374
|
/* @__PURE__ */ t("h3", { className: "text-base font-semibold text-fg", children: e }),
|
|
1313
|
-
/* @__PURE__ */ t(
|
|
1375
|
+
/* @__PURE__ */ t(tr, { children: r })
|
|
1314
1376
|
] });
|
|
1315
1377
|
}
|
|
1316
|
-
function
|
|
1378
|
+
function Kr({
|
|
1317
1379
|
icon: e,
|
|
1318
1380
|
title: r,
|
|
1319
1381
|
description: a,
|
|
1320
1382
|
connected: n = !1,
|
|
1321
1383
|
onConnect: o,
|
|
1322
|
-
onDisconnect:
|
|
1384
|
+
onDisconnect: l
|
|
1323
1385
|
}) {
|
|
1324
|
-
return /* @__PURE__ */
|
|
1386
|
+
return /* @__PURE__ */ u("div", { className: "flex items-center gap-4 rounded-xl bg-bg px-4 py-4", children: [
|
|
1325
1387
|
/* @__PURE__ */ t("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-bg-muted", children: /* @__PURE__ */ t("span", { className: "[&>svg]:h-4 [&>svg]:w-4", children: e }) }),
|
|
1326
|
-
/* @__PURE__ */
|
|
1388
|
+
/* @__PURE__ */ u("div", { className: "flex-1 min-w-0", children: [
|
|
1327
1389
|
/* @__PURE__ */ t("p", { className: "text-sm font-medium text-fg", children: r }),
|
|
1328
1390
|
a && /* @__PURE__ */ t("p", { className: "mt-0.5 text-sm text-fg-muted", children: a })
|
|
1329
1391
|
] }),
|
|
1330
|
-
n ? /* @__PURE__ */ t(
|
|
1392
|
+
n ? /* @__PURE__ */ t(S, { variant: "danger-ghost", size: "sm", onClick: l, children: "Desconectar" }) : /* @__PURE__ */ t(S, { variant: "secondary", size: "sm", onClick: o, children: "Conectar" })
|
|
1331
1393
|
] });
|
|
1332
1394
|
}
|
|
1333
|
-
function
|
|
1395
|
+
function qr({
|
|
1334
1396
|
open: e,
|
|
1335
1397
|
onOpenChange: r,
|
|
1336
1398
|
user: a,
|
|
1337
1399
|
nav: n,
|
|
1338
1400
|
defaultSection: o,
|
|
1339
|
-
activeSection:
|
|
1340
|
-
onSectionChange:
|
|
1401
|
+
activeSection: l,
|
|
1402
|
+
onSectionChange: s,
|
|
1341
1403
|
sectionTitles: c = {},
|
|
1342
|
-
sectionSubtitles:
|
|
1343
|
-
renderSection:
|
|
1344
|
-
footerAction:
|
|
1404
|
+
sectionSubtitles: d = {},
|
|
1405
|
+
renderSection: f,
|
|
1406
|
+
footerAction: g
|
|
1345
1407
|
}) {
|
|
1346
|
-
var
|
|
1347
|
-
const
|
|
1348
|
-
o ??
|
|
1349
|
-
),
|
|
1350
|
-
|
|
1351
|
-
},
|
|
1352
|
-
return /* @__PURE__ */ t(Ge, { open: e, onOpenChange: r, children: /* @__PURE__ */ t(
|
|
1408
|
+
var T, E;
|
|
1409
|
+
const b = ((E = (T = n[0]) == null ? void 0 : T.items[0]) == null ? void 0 : E.id) ?? "", [v, h] = x(
|
|
1410
|
+
o ?? b
|
|
1411
|
+
), w = l ?? v, P = (k) => {
|
|
1412
|
+
h(k), s == null || s(k);
|
|
1413
|
+
}, M = n.flatMap((k) => k.items).find((k) => k.id === w), D = c[w] ?? (M == null ? void 0 : M.label) ?? w, m = d[w];
|
|
1414
|
+
return /* @__PURE__ */ t(Ge, { open: e, onOpenChange: r, children: /* @__PURE__ */ t(Ue, { className: "max-w-[1300px] overflow-hidden p-0", children: /* @__PURE__ */ u("div", { className: "flex h-[820px]", children: [
|
|
1353
1415
|
/* @__PURE__ */ t(
|
|
1354
|
-
|
|
1416
|
+
rr,
|
|
1355
1417
|
{
|
|
1356
1418
|
user: a,
|
|
1357
1419
|
nav: n,
|
|
1358
|
-
active:
|
|
1359
|
-
onSelect:
|
|
1360
|
-
footerAction:
|
|
1420
|
+
active: w,
|
|
1421
|
+
onSelect: P,
|
|
1422
|
+
footerAction: g
|
|
1361
1423
|
}
|
|
1362
1424
|
),
|
|
1363
|
-
/* @__PURE__ */
|
|
1364
|
-
/* @__PURE__ */
|
|
1365
|
-
/* @__PURE__ */ t("h2", { className: "font-display text-2xl font-semibold tracking-tight text-fg", children:
|
|
1366
|
-
|
|
1425
|
+
/* @__PURE__ */ u("div", { className: "flex flex-1 flex-col overflow-hidden bg-bg-subtle", children: [
|
|
1426
|
+
/* @__PURE__ */ u("div", { className: "relative px-[200px] pb-8 pt-8", children: [
|
|
1427
|
+
/* @__PURE__ */ t("h2", { className: "font-display text-2xl font-semibold tracking-tight text-fg", children: D }),
|
|
1428
|
+
m && /* @__PURE__ */ t("p", { className: "mt-0.5 text-sm text-fg-muted", children: m }),
|
|
1367
1429
|
/* @__PURE__ */ t("div", { className: "pointer-events-none absolute inset-x-0 -bottom-6 h-6 bg-gradient-to-b from-bg-subtle to-transparent" })
|
|
1368
1430
|
] }),
|
|
1369
|
-
/* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto px-[200px] pb-8 pt-6", children: (
|
|
1431
|
+
/* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto px-[200px] pb-8 pt-6", children: (f == null ? void 0 : f(w)) ?? /* @__PURE__ */ u("p", { className: "text-sm text-fg-muted", children: [
|
|
1370
1432
|
"Conteúdo de ",
|
|
1371
|
-
/* @__PURE__ */ t("strong", { children:
|
|
1433
|
+
/* @__PURE__ */ t("strong", { children: D }),
|
|
1372
1434
|
"."
|
|
1373
1435
|
] }) })
|
|
1374
1436
|
] })
|
|
1375
1437
|
] }) }) });
|
|
1376
1438
|
}
|
|
1377
|
-
const ne = C(null), F = "flui-color-mode", W = "flui-brand";
|
|
1378
|
-
function
|
|
1439
|
+
const ne = C(null), F = "flui-color-mode", W = "flui-brand", H = "flui-radius";
|
|
1440
|
+
function ar() {
|
|
1379
1441
|
var e;
|
|
1380
1442
|
return typeof window < "u" && ((e = window.matchMedia) == null ? void 0 : e.call(window, "(prefers-color-scheme: dark)").matches);
|
|
1381
1443
|
}
|
|
1382
|
-
function
|
|
1444
|
+
function I(e, r) {
|
|
1383
1445
|
try {
|
|
1384
1446
|
return localStorage.getItem(e) ?? r;
|
|
1385
1447
|
} catch {
|
|
1386
1448
|
return r;
|
|
1387
1449
|
}
|
|
1388
1450
|
}
|
|
1389
|
-
function
|
|
1451
|
+
function Gr({
|
|
1390
1452
|
children: e,
|
|
1391
1453
|
defaultMode: r = "system",
|
|
1392
1454
|
defaultBrand: a = "default",
|
|
1393
|
-
|
|
1455
|
+
defaultRadius: n = "default",
|
|
1456
|
+
target: o
|
|
1394
1457
|
}) {
|
|
1395
|
-
const [
|
|
1396
|
-
() =>
|
|
1397
|
-
), [
|
|
1398
|
-
() =>
|
|
1399
|
-
), [
|
|
1458
|
+
const [l, s] = x(
|
|
1459
|
+
() => I(F, r)
|
|
1460
|
+
), [c, d] = x(
|
|
1461
|
+
() => I(W, a)
|
|
1462
|
+
), [f, g] = x(
|
|
1463
|
+
() => I(H, n)
|
|
1464
|
+
), [b, v] = x(ar);
|
|
1400
1465
|
N(() => {
|
|
1401
|
-
var
|
|
1402
|
-
const
|
|
1403
|
-
if (!
|
|
1404
|
-
const
|
|
1405
|
-
return
|
|
1466
|
+
var E;
|
|
1467
|
+
const m = (E = window.matchMedia) == null ? void 0 : E.call(window, "(prefers-color-scheme: dark)");
|
|
1468
|
+
if (!m) return;
|
|
1469
|
+
const T = (k) => v(k.matches);
|
|
1470
|
+
return m.addEventListener("change", T), () => m.removeEventListener("change", T);
|
|
1406
1471
|
}, []);
|
|
1407
|
-
const
|
|
1472
|
+
const h = l === "system" ? b ? "dark" : "light" : l;
|
|
1408
1473
|
N(() => {
|
|
1409
|
-
const
|
|
1410
|
-
|
|
1411
|
-
}, [
|
|
1412
|
-
const
|
|
1413
|
-
s(
|
|
1474
|
+
const m = (o == null ? void 0 : o()) ?? document.documentElement;
|
|
1475
|
+
m.setAttribute("data-theme", h), c && c !== "default" ? m.setAttribute("data-brand", c) : m.removeAttribute("data-brand"), f && f !== "default" ? m.setAttribute("data-radius", f) : m.removeAttribute("data-radius");
|
|
1476
|
+
}, [h, c, f, o]);
|
|
1477
|
+
const w = z((m) => {
|
|
1478
|
+
s(m);
|
|
1479
|
+
try {
|
|
1480
|
+
localStorage.setItem(F, m);
|
|
1481
|
+
} catch {
|
|
1482
|
+
}
|
|
1483
|
+
}, []), P = z((m) => {
|
|
1484
|
+
d(m);
|
|
1414
1485
|
try {
|
|
1415
|
-
localStorage.setItem(
|
|
1486
|
+
localStorage.setItem(W, m);
|
|
1416
1487
|
} catch {
|
|
1417
1488
|
}
|
|
1418
|
-
}, []),
|
|
1419
|
-
|
|
1489
|
+
}, []), A = z((m) => {
|
|
1490
|
+
g(m);
|
|
1420
1491
|
try {
|
|
1421
|
-
localStorage.setItem(
|
|
1492
|
+
localStorage.setItem(H, m);
|
|
1422
1493
|
} catch {
|
|
1423
1494
|
}
|
|
1424
|
-
}, []),
|
|
1425
|
-
|
|
1426
|
-
}, [
|
|
1427
|
-
() => ({ mode:
|
|
1428
|
-
[
|
|
1495
|
+
}, []), M = z(() => {
|
|
1496
|
+
w(h === "dark" ? "light" : "dark");
|
|
1497
|
+
}, [h, w]), D = se(
|
|
1498
|
+
() => ({ mode: l, resolvedMode: h, brand: c, radius: f, setMode: w, setBrand: P, setRadius: A, toggleMode: M }),
|
|
1499
|
+
[l, h, c, f, w, P, A, M]
|
|
1429
1500
|
);
|
|
1430
|
-
return /* @__PURE__ */ t(ne.Provider, { value:
|
|
1501
|
+
return /* @__PURE__ */ t(ne.Provider, { value: D, children: e });
|
|
1431
1502
|
}
|
|
1432
|
-
function
|
|
1433
|
-
const e =
|
|
1503
|
+
function Ur() {
|
|
1504
|
+
const e = y(ne);
|
|
1434
1505
|
if (!e)
|
|
1435
1506
|
throw new Error("useTheme precisa estar dentro de <ThemeProvider>");
|
|
1436
1507
|
return e;
|
|
1437
1508
|
}
|
|
1438
|
-
const
|
|
1509
|
+
const Or = [
|
|
1439
1510
|
{
|
|
1440
1511
|
name: "flui-color-accent-scale-50",
|
|
1441
1512
|
cssVar: "--flui-color-accent-scale-50",
|
|
@@ -1839,6 +1910,32 @@ const qr = [
|
|
|
1839
1910
|
isColor: !0,
|
|
1840
1911
|
reference: null
|
|
1841
1912
|
},
|
|
1913
|
+
{
|
|
1914
|
+
name: "flui-color-neutral-950",
|
|
1915
|
+
cssVar: "--flui-color-neutral-950",
|
|
1916
|
+
path: [
|
|
1917
|
+
"color",
|
|
1918
|
+
"neutral",
|
|
1919
|
+
"950"
|
|
1920
|
+
],
|
|
1921
|
+
group: "color",
|
|
1922
|
+
value: "#0e1015",
|
|
1923
|
+
isColor: !0,
|
|
1924
|
+
reference: null
|
|
1925
|
+
},
|
|
1926
|
+
{
|
|
1927
|
+
name: "flui-color-neutral-1000",
|
|
1928
|
+
cssVar: "--flui-color-neutral-1000",
|
|
1929
|
+
path: [
|
|
1930
|
+
"color",
|
|
1931
|
+
"neutral",
|
|
1932
|
+
"1000"
|
|
1933
|
+
],
|
|
1934
|
+
group: "color",
|
|
1935
|
+
value: "#050608",
|
|
1936
|
+
isColor: !0,
|
|
1937
|
+
reference: null
|
|
1938
|
+
},
|
|
1842
1939
|
{
|
|
1843
1940
|
name: "flui-color-success-500",
|
|
1844
1941
|
cssVar: "--flui-color-success-500",
|
|
@@ -2666,73 +2763,74 @@ const qr = [
|
|
|
2666
2763
|
}
|
|
2667
2764
|
];
|
|
2668
2765
|
export {
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2766
|
+
yr as Accordion,
|
|
2767
|
+
Vr as AccordionContent,
|
|
2768
|
+
Nr as AccordionItem,
|
|
2769
|
+
Cr as AccordionTrigger,
|
|
2673
2770
|
He as Alert,
|
|
2674
|
-
|
|
2771
|
+
Le as Avatar,
|
|
2675
2772
|
Y as Badge,
|
|
2676
2773
|
Se as Breadcrumb,
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2774
|
+
hr as BreadcrumbItem,
|
|
2775
|
+
je as BreadcrumbSeparator,
|
|
2776
|
+
S as Button,
|
|
2680
2777
|
pe as Card,
|
|
2681
|
-
|
|
2682
|
-
|
|
2778
|
+
xe as CardContent,
|
|
2779
|
+
be as CardDescription,
|
|
2683
2780
|
ge as CardHeader,
|
|
2684
|
-
|
|
2781
|
+
he as CardTitle,
|
|
2685
2782
|
ye as Checkbox,
|
|
2783
|
+
Ze as CodeBlock,
|
|
2686
2784
|
Ie as Divider,
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2785
|
+
Ir as Drawer,
|
|
2786
|
+
_r as DrawerBody,
|
|
2787
|
+
Sr as DrawerContent,
|
|
2788
|
+
Rr as DrawerFooter,
|
|
2789
|
+
jr as DrawerHeader,
|
|
2790
|
+
Br as DrawerTitle,
|
|
2791
|
+
dr as Dropdown,
|
|
2792
|
+
mr as DropdownContent,
|
|
2793
|
+
pr as DropdownItem,
|
|
2794
|
+
gr as DropdownSeparator,
|
|
2795
|
+
fr as DropdownTrigger,
|
|
2698
2796
|
me as Input,
|
|
2699
|
-
|
|
2797
|
+
Kr as IntegrationRow,
|
|
2700
2798
|
Ge as Modal,
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2799
|
+
Dr as ModalBody,
|
|
2800
|
+
Ue as ModalContent,
|
|
2801
|
+
Pr as ModalDescription,
|
|
2802
|
+
Ar as ModalFooter,
|
|
2803
|
+
Er as ModalHeader,
|
|
2804
|
+
Lr as ModalTitle,
|
|
2805
|
+
zr as Popover,
|
|
2806
|
+
Tr as PopoverContent,
|
|
2807
|
+
Mr as PopoverTrigger,
|
|
2808
|
+
qr as ProfileSettingsModal,
|
|
2809
|
+
Ae as Progress,
|
|
2712
2810
|
Ne as Radio,
|
|
2713
|
-
|
|
2811
|
+
ur as RadioGroup,
|
|
2714
2812
|
Ve as Select,
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2813
|
+
Wr as SettingRow,
|
|
2814
|
+
tr as SettingsCard,
|
|
2815
|
+
Hr as SettingsGroup,
|
|
2816
|
+
De as Spinner,
|
|
2719
2817
|
_e as StatCard,
|
|
2720
2818
|
G as Switch,
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2819
|
+
br as Tabs,
|
|
2820
|
+
wr as TabsContent,
|
|
2821
|
+
xr as TabsList,
|
|
2822
|
+
vr as TabsTrigger,
|
|
2823
|
+
Xe as Textarea,
|
|
2824
|
+
Gr as ThemeProvider,
|
|
2825
|
+
Fr as ToastProvider,
|
|
2826
|
+
kr as Tooltip,
|
|
2729
2827
|
ke as badgeVariants,
|
|
2730
2828
|
de as buttonVariants,
|
|
2731
2829
|
i as cn,
|
|
2732
2830
|
fe as inputVariants,
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2831
|
+
Qe as textareaVariants,
|
|
2832
|
+
Or as tokens,
|
|
2833
|
+
Ur as useTheme,
|
|
2834
|
+
Je as useToast
|
|
2737
2835
|
};
|
|
2738
2836
|
//# sourceMappingURL=index.js.map
|