@snksergio/design-system 0.36.0 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/README.md +58 -12
  2. package/dist-lib/chunks/avatar-CIHTveDJ.mjs +1177 -0
  3. package/dist-lib/chunks/avatar-CIHTveDJ.mjs.map +1 -0
  4. package/dist-lib/chunks/avatar-YpqQgJnh.cjs +1196 -0
  5. package/dist-lib/chunks/avatar-YpqQgJnh.cjs.map +1 -0
  6. package/dist-lib/chunks/{input-CLZuK61s.cjs → input-CJnonz-G.cjs} +3 -3
  7. package/dist-lib/chunks/{input-CLZuK61s.cjs.map → input-CJnonz-G.cjs.map} +1 -1
  8. package/dist-lib/chunks/{input-Di_5Ir5M.mjs → input-jLoO8t0I.mjs} +2 -2
  9. package/dist-lib/chunks/{input-Di_5Ir5M.mjs.map → input-jLoO8t0I.mjs.map} +1 -1
  10. package/dist-lib/chunks/{kpi-delta-CMdiNoMu.mjs → kpi-delta-D0g2YzDy.mjs} +3 -2
  11. package/dist-lib/chunks/{kpi-delta-CMdiNoMu.mjs.map → kpi-delta-D0g2YzDy.mjs.map} +1 -1
  12. package/dist-lib/chunks/{kpi-delta--KmkXYn9.cjs → kpi-delta-D6cLnCqW.cjs} +8 -7
  13. package/dist-lib/chunks/{kpi-delta--KmkXYn9.cjs.map → kpi-delta-D6cLnCqW.cjs.map} +1 -1
  14. package/dist-lib/chunks/{page-header-HWma4AzM.cjs → page-header-DSTprenz.cjs} +4 -4
  15. package/dist-lib/chunks/{page-header-HWma4AzM.cjs.map → page-header-DSTprenz.cjs.map} +1 -1
  16. package/dist-lib/chunks/{page-header-gYXNGHv-.mjs → page-header-Deb1excS.mjs} +2 -2
  17. package/dist-lib/chunks/{page-header-gYXNGHv-.mjs.map → page-header-Deb1excS.mjs.map} +1 -1
  18. package/dist-lib/chunks/{panel-BCGlqoEk.mjs → panel-Cid3m9zb.mjs} +370 -9823
  19. package/dist-lib/chunks/panel-Cid3m9zb.mjs.map +1 -0
  20. package/dist-lib/chunks/{panel-Cq9UQki6.cjs → panel-DLcD8LhW.cjs} +595 -10052
  21. package/dist-lib/chunks/panel-DLcD8LhW.cjs.map +1 -0
  22. package/dist-lib/chunks/textarea-BDJRaL5h.mjs +781 -0
  23. package/dist-lib/chunks/textarea-BDJRaL5h.mjs.map +1 -0
  24. package/dist-lib/chunks/textarea-Bxl9Voe8.cjs +802 -0
  25. package/dist-lib/chunks/textarea-Bxl9Voe8.cjs.map +1 -0
  26. package/dist-lib/chunks/tooltip-DGI3hDFM.mjs +1452 -0
  27. package/dist-lib/chunks/tooltip-DGI3hDFM.mjs.map +1 -0
  28. package/dist-lib/chunks/tooltip-vLUyJ0h5.cjs +1484 -0
  29. package/dist-lib/chunks/tooltip-vLUyJ0h5.cjs.map +1 -0
  30. package/dist-lib/chunks/{useTheme-DFAlP_ab.cjs → useTheme-DQ7FaHdv.cjs} +170 -1287
  31. package/dist-lib/chunks/useTheme-DQ7FaHdv.cjs.map +1 -0
  32. package/dist-lib/chunks/{useTheme-D-405m16.mjs → useTheme-UrerJ3i-.mjs} +26 -1139
  33. package/dist-lib/chunks/useTheme-UrerJ3i-.mjs.map +1 -0
  34. package/dist-lib/index.cjs +1258 -311
  35. package/dist-lib/index.cjs.map +1 -1
  36. package/dist-lib/index.mjs +1631 -679
  37. package/dist-lib/index.mjs.map +1 -1
  38. package/dist-lib/preview/chat.cjs +45 -44
  39. package/dist-lib/preview/chat.cjs.map +1 -1
  40. package/dist-lib/preview/chat.mjs +3 -2
  41. package/dist-lib/preview/chat.mjs.map +1 -1
  42. package/dist-lib/preview/clientes.cjs +22 -20
  43. package/dist-lib/preview/clientes.cjs.map +1 -1
  44. package/dist-lib/preview/clientes.mjs +6 -4
  45. package/dist-lib/preview/clientes.mjs.map +1 -1
  46. package/dist-lib/preview/dashboard.cjs +40 -39
  47. package/dist-lib/preview/dashboard.cjs.map +1 -1
  48. package/dist-lib/preview/dashboard.mjs +4 -3
  49. package/dist-lib/preview/dashboard.mjs.map +1 -1
  50. package/dist-lib/shadcn.cjs +293 -0
  51. package/dist-lib/shadcn.cjs.map +1 -0
  52. package/dist-lib/shadcn.d.ts +2 -0
  53. package/dist-lib/shadcn.mjs +276 -0
  54. package/dist-lib/shadcn.mjs.map +1 -0
  55. package/dist-lib/src/components/index.d.ts +10 -0
  56. package/dist-lib/src/components/index.d.ts.map +1 -1
  57. package/dist-lib/src/components/shadcn/index.d.ts +60 -6
  58. package/dist-lib/src/components/shadcn/index.d.ts.map +1 -1
  59. package/dist-lib/src/hooks/useBrand.d.ts +1 -1
  60. package/package.json +11 -3
  61. package/dist-lib/chunks/panel-BCGlqoEk.mjs.map +0 -1
  62. package/dist-lib/chunks/panel-Cq9UQki6.cjs.map +0 -1
  63. package/dist-lib/chunks/useTheme-D-405m16.mjs.map +0 -1
  64. package/dist-lib/chunks/useTheme-DFAlP_ab.cjs.map +0 -1
@@ -0,0 +1,1196 @@
1
+ "use strict";
2
+ const jsxRuntime = require("react/jsx-runtime");
3
+ const React = require("react");
4
+ const tailwindVariants = require("tailwind-variants");
5
+ const cmdk = require("cmdk");
6
+ const lucideReact = require("lucide-react");
7
+ const SheetPrimitive = require("@radix-ui/react-dialog");
8
+ const PopoverPrimitive = require("@radix-ui/react-popover");
9
+ const classVarianceAuthority = require("class-variance-authority");
10
+ const DropdownMenuPrimitive = require("@radix-ui/react-dropdown-menu");
11
+ const AvatarPrimitive = require("@radix-ui/react-avatar");
12
+ const clsx = require("clsx");
13
+ const tailwindMerge = require("tailwind-merge");
14
+ function _interopNamespaceDefault(e) {
15
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
16
+ if (e) {
17
+ for (const k in e) {
18
+ if (k !== "default") {
19
+ const d = Object.getOwnPropertyDescriptor(e, k);
20
+ Object.defineProperty(n, k, d.get ? d : {
21
+ enumerable: true,
22
+ get: () => e[k]
23
+ });
24
+ }
25
+ }
26
+ }
27
+ n.default = e;
28
+ return Object.freeze(n);
29
+ }
30
+ const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
31
+ const SheetPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(SheetPrimitive);
32
+ const PopoverPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(PopoverPrimitive);
33
+ const DropdownMenuPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(DropdownMenuPrimitive);
34
+ const AvatarPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(AvatarPrimitive);
35
+ const isDsPad = (v) => /^(pad|sp)-/.test(v);
36
+ const isDsGap = (v) => /^gp-/.test(v);
37
+ const isDsRadius = (v) => /^radius-/.test(v);
38
+ const isDsShadow = (v) => /^sh-/.test(v);
39
+ const isDsForm = (v) => /^form-/.test(v);
40
+ const twMerge = tailwindMerge.extendTailwindMerge({
41
+ extend: {
42
+ classGroups: {
43
+ "font-size": [
44
+ {
45
+ // Lista 1:1 com tokens/brands/default/semantic/typography.ts.
46
+ // Manter sincronizado com src/utils/tv.ts. Ver L-016.
47
+ text: [
48
+ // Displays (fluid clamp)
49
+ "display-2xl",
50
+ "display-xl",
51
+ "display-lg",
52
+ "display-md",
53
+ // Headings (xs estático, sm-xl fluid clamp)
54
+ "heading-xl",
55
+ "heading-lg",
56
+ "heading-md",
57
+ "heading-sm",
58
+ "heading-xs",
59
+ // Titles (weight 600 default)
60
+ "title-lg",
61
+ "title-md",
62
+ "title-sm",
63
+ // Body (xs/sm = weight 500 interactive; md-2xl = 400 corrido)
64
+ "body-2xl",
65
+ "body-xl",
66
+ "body-lg",
67
+ "body-md",
68
+ "body-sm",
69
+ "body-xs",
70
+ // Captions (weight 400)
71
+ "caption-md",
72
+ "caption-sm",
73
+ "caption-xs",
74
+ // Code (mono regular)
75
+ "code-md",
76
+ "code-sm"
77
+ ]
78
+ }
79
+ ],
80
+ /* ── Padding ──────────────────────────────────────────────────────── */
81
+ p: [{ p: [isDsPad] }],
82
+ px: [{ px: [isDsPad] }],
83
+ py: [{ py: [isDsPad] }],
84
+ pt: [{ pt: [isDsPad] }],
85
+ pr: [{ pr: [isDsPad] }],
86
+ pb: [{ pb: [isDsPad] }],
87
+ pl: [{ pl: [isDsPad] }],
88
+ ps: [{ ps: [isDsPad] }],
89
+ pe: [{ pe: [isDsPad] }],
90
+ /* ── Margin (usa mesmo sp-*) ──────────────────────────────────────── */
91
+ m: [{ m: [isDsPad] }],
92
+ mx: [{ mx: [isDsPad] }],
93
+ my: [{ my: [isDsPad] }],
94
+ mt: [{ mt: [isDsPad] }],
95
+ mr: [{ mr: [isDsPad] }],
96
+ mb: [{ mb: [isDsPad] }],
97
+ ml: [{ ml: [isDsPad] }],
98
+ ms: [{ ms: [isDsPad] }],
99
+ me: [{ me: [isDsPad] }],
100
+ /* ── Inset / position (top/right/bottom/left) ─────────────────────── */
101
+ inset: [{ inset: [isDsPad] }],
102
+ "inset-x": [{ "inset-x": [isDsPad] }],
103
+ "inset-y": [{ "inset-y": [isDsPad] }],
104
+ "top": [{ top: [isDsPad] }],
105
+ "right": [{ right: [isDsPad] }],
106
+ "bottom": [{ bottom: [isDsPad] }],
107
+ "left": [{ left: [isDsPad] }],
108
+ "start": [{ start: [isDsPad] }],
109
+ "end": [{ end: [isDsPad] }],
110
+ /* ── Gap ──────────────────────────────────────────────────────────── */
111
+ gap: [{ gap: [isDsGap] }],
112
+ "gap-x": [{ "gap-x": [isDsGap] }],
113
+ "gap-y": [{ "gap-y": [isDsGap] }],
114
+ /* ── Rounded (todas as cantos) ────────────────────────────────────── */
115
+ rounded: [{ rounded: [isDsRadius] }],
116
+ "rounded-s": [{ "rounded-s": [isDsRadius] }],
117
+ "rounded-e": [{ "rounded-e": [isDsRadius] }],
118
+ "rounded-t": [{ "rounded-t": [isDsRadius] }],
119
+ "rounded-r": [{ "rounded-r": [isDsRadius] }],
120
+ "rounded-b": [{ "rounded-b": [isDsRadius] }],
121
+ "rounded-l": [{ "rounded-l": [isDsRadius] }],
122
+ "rounded-ss": [{ "rounded-ss": [isDsRadius] }],
123
+ "rounded-se": [{ "rounded-se": [isDsRadius] }],
124
+ "rounded-ee": [{ "rounded-ee": [isDsRadius] }],
125
+ "rounded-es": [{ "rounded-es": [isDsRadius] }],
126
+ "rounded-tl": [{ "rounded-tl": [isDsRadius] }],
127
+ "rounded-tr": [{ "rounded-tr": [isDsRadius] }],
128
+ "rounded-br": [{ "rounded-br": [isDsRadius] }],
129
+ "rounded-bl": [{ "rounded-bl": [isDsRadius] }],
130
+ /* ── Shadow ───────────────────────────────────────────────────────── */
131
+ shadow: [{ shadow: [isDsShadow] }],
132
+ /* ── Form sizes (min-h, h, w, size) ───────────────────────────────── */
133
+ "min-h": [{ "min-h": [isDsForm] }],
134
+ h: [{ h: [isDsForm] }],
135
+ w: [{ w: [isDsForm] }],
136
+ size: [{ size: [isDsForm] }]
137
+ }
138
+ }
139
+ });
140
+ function cn(...inputs) {
141
+ return twMerge(clsx.clsx(inputs));
142
+ }
143
+ const twMergeConfig = {
144
+ extend: {
145
+ classGroups: {
146
+ "font-size": [
147
+ {
148
+ text: [
149
+ // Displays (fluid clamp)
150
+ "display-2xl",
151
+ "display-xl",
152
+ "display-lg",
153
+ "display-md",
154
+ // Headings (xs estático, sm-xl fluid clamp)
155
+ "heading-xl",
156
+ "heading-lg",
157
+ "heading-md",
158
+ "heading-sm",
159
+ "heading-xs",
160
+ // Titles (weight 600 default)
161
+ "title-lg",
162
+ "title-md",
163
+ "title-sm",
164
+ // Body (xs/sm = weight 500 interactive; md-2xl = 400 corrido)
165
+ "body-2xl",
166
+ "body-xl",
167
+ "body-lg",
168
+ "body-md",
169
+ "body-sm",
170
+ "body-xs",
171
+ // Captions (weight 400)
172
+ "caption-md",
173
+ "caption-sm",
174
+ "caption-xs",
175
+ // Stat (número de métrica/KPI — estático, bold, leading tight)
176
+ "stat-xl",
177
+ "stat-lg",
178
+ "stat-md",
179
+ "stat-sm",
180
+ // Code (mono regular)
181
+ "code-md",
182
+ "code-sm"
183
+ ]
184
+ }
185
+ ]
186
+ }
187
+ }
188
+ };
189
+ const tv = (options, config) => tailwindVariants.tv(options, {
190
+ ...config,
191
+ twMergeConfig
192
+ });
193
+ const buttonVariants = tv({
194
+ base: [
195
+ "inline-flex items-center justify-center",
196
+ "select-none whitespace-nowrap",
197
+ "focus-visible:outline-none",
198
+ "border border-transparent",
199
+ "text-body-sm font-semibold leading-none",
200
+ // 13px / 600 — alinhado com sandbox btn
201
+ "[&_svg]:shrink-0",
202
+ // SVG não diminui; tamanho controlado por size
203
+ "transition-all duration-200 ease-out",
204
+ "cursor-pointer",
205
+ "focus-visible:ring-4"
206
+ ],
207
+ variants: {
208
+ color: {
209
+ primary: "focus-visible:ring-ring-brand",
210
+ secondary: "focus-visible:ring-ring-secondary",
211
+ critical: "focus-visible:ring-ring-danger",
212
+ success: "focus-visible:ring-ring-success",
213
+ warning: "focus-visible:ring-ring-warning"
214
+ },
215
+ variant: {
216
+ filled: "",
217
+ outline: "",
218
+ soft: "",
219
+ ghost: "bg-transparent"
220
+ },
221
+ size: {
222
+ // h28 / pad 10 / gap 6 / radius 8 / icon 12
223
+ "2xs": "min-h-form-xs px-pad-lg gap-gp-sm rounded-radius-md [&_svg]:size-[12px]",
224
+ // h32 / pad 12 / gap 6 / radius 8 / icon 14
225
+ xs: "min-h-form-sm px-pad-xl gap-gp-sm rounded-radius-md [&_svg]:size-[14px]",
226
+ // h36 / pad 12 / gap 6 / radius 10 / icon 14
227
+ sm: "min-h-form-md px-pad-xl gap-gp-sm rounded-radius-lg [&_svg]:size-[14px]",
228
+ // h40 / pad 16 / gap 6 / radius 10 / icon 14 (alinhado com sandbox Exportar)
229
+ md: "min-h-form-lg px-pad-2xl gap-gp-sm rounded-radius-lg [&_svg]:size-[14px]",
230
+ // h44 / pad 16 / gap 8 / radius 10 / icon 16
231
+ lg: "min-h-form-xl px-pad-2xl gap-gp-md rounded-radius-lg [&_svg]:size-[16px]",
232
+ // Icon buttons — width = height (square). Regra: SVG +2px vs versão com label
233
+ // (precisa preencher mais o quadrado sem o texto carregando peso visual).
234
+ "icon-2xs": "size-form-xs rounded-radius-md p-0 [&_svg]:size-[14px]",
235
+ // 28×28 / +2 (12→14)
236
+ "icon-xs": "size-form-sm rounded-radius-md p-0 [&_svg]:size-[16px]",
237
+ // 32×32 / +2 (14→16)
238
+ "icon-sm": "size-form-md rounded-radius-lg p-0 [&_svg]:size-[16px]",
239
+ // 36×36 / +2 (14→16)
240
+ "icon-md": "size-form-lg rounded-radius-lg p-0 [&_svg]:size-[16px]",
241
+ // 40×40 / +2 (14→16)
242
+ "icon-lg": "size-form-xl rounded-radius-lg p-0 [&_svg]:size-[18px]"
243
+ // 44×44 / +2 (16→18)
244
+ },
245
+ fullWidth: {
246
+ true: "w-full flex-1"
247
+ },
248
+ /**
249
+ * Shape do botão:
250
+ * - rounded (default): mantém o radius da `size` (varia por tamanho)
251
+ * - pill: força `rounded-full` (override com `!` pra ganhar do size)
252
+ */
253
+ shape: {
254
+ rounded: "",
255
+ pill: "!rounded-full"
256
+ },
257
+ disabled: {
258
+ true: "pointer-events-none opacity-50"
259
+ }
260
+ },
261
+ compoundVariants: [
262
+ // ── Primary (brand) ─────────────────────────────────────────────
263
+ {
264
+ color: "primary",
265
+ variant: "filled",
266
+ class: "bg-bg-brand text-fg-on-brand hover:bg-bg-brand-hover"
267
+ },
268
+ {
269
+ color: "primary",
270
+ variant: "outline",
271
+ class: "bg-bg-surface border-border-brand text-fg-brand shadow-sh-sm hover:bg-bg-brand-subtle hover:border-transparent hover:shadow-sh-none"
272
+ },
273
+ {
274
+ color: "primary",
275
+ variant: "soft",
276
+ class: "bg-bg-brand-subtle text-fg-brand hover:bg-bg-brand-subtle-hover"
277
+ },
278
+ {
279
+ color: "primary",
280
+ variant: "ghost",
281
+ class: "text-fg-brand hover:bg-bg-brand-subtle"
282
+ },
283
+ // ── Secondary (neutro) ──────────────────────────────────────────
284
+ {
285
+ color: "secondary",
286
+ variant: "filled",
287
+ class: "bg-bg-muted text-fg-muted hover:bg-bg-muted-hover hover:text-fg-default"
288
+ },
289
+ {
290
+ // Outline alinhado com `.btn.tbl-tool-btn` do design-and-table-v2:
291
+ // light = bg-surface + border-subtle + fg-default + shadow-sm (mantém no hover)
292
+ // dark = bg-muted + border-input + fg-muted + sem shadow
293
+ color: "secondary",
294
+ variant: "outline",
295
+ class: [
296
+ "bg-bg-surface border-border-subtle text-fg-default shadow-sh-sm",
297
+ "dark:bg-bg-muted dark:border-border-input dark:text-fg-muted dark:shadow-sh-none",
298
+ "hover:bg-bg-muted-hover hover:text-fg-default",
299
+ "dark:hover:bg-bg-muted-hover dark:hover:text-fg-default"
300
+ ].join(" ")
301
+ },
302
+ {
303
+ color: "secondary",
304
+ variant: "soft",
305
+ class: "bg-bg-muted text-fg-muted hover:bg-bg-muted-hover hover:text-fg-default"
306
+ },
307
+ {
308
+ color: "secondary",
309
+ variant: "ghost",
310
+ class: "text-fg-muted hover:bg-bg-muted hover:text-fg-default"
311
+ },
312
+ // ── Critical (danger) ───────────────────────────────────────────
313
+ {
314
+ color: "critical",
315
+ variant: "filled",
316
+ class: "bg-bg-danger text-fg-on-danger hover:bg-bg-danger-hover"
317
+ },
318
+ {
319
+ color: "critical",
320
+ variant: "outline",
321
+ class: "bg-bg-surface border-border-danger-muted text-fg-danger shadow-sh-sm hover:bg-bg-danger-muted hover:shadow-sh-none"
322
+ },
323
+ {
324
+ color: "critical",
325
+ variant: "soft",
326
+ class: "bg-bg-danger-muted text-fg-danger hover:bg-bg-danger-muted-hover"
327
+ },
328
+ {
329
+ color: "critical",
330
+ variant: "ghost",
331
+ class: "text-fg-danger hover:bg-bg-danger-muted"
332
+ },
333
+ // ── Success ─────────────────────────────────────────────────────
334
+ {
335
+ color: "success",
336
+ variant: "filled",
337
+ class: "bg-bg-success text-fg-on-success hover:bg-bg-success-hover"
338
+ },
339
+ {
340
+ color: "success",
341
+ variant: "outline",
342
+ class: "bg-bg-surface border-border-success-muted text-fg-success shadow-sh-sm hover:bg-bg-success-muted hover:shadow-sh-none"
343
+ },
344
+ {
345
+ color: "success",
346
+ variant: "soft",
347
+ class: "bg-bg-success-muted text-fg-success hover:bg-bg-success-muted-hover"
348
+ },
349
+ {
350
+ color: "success",
351
+ variant: "ghost",
352
+ class: "text-fg-success hover:bg-bg-success-muted"
353
+ },
354
+ // ── Warning ─────────────────────────────────────────────────────
355
+ {
356
+ color: "warning",
357
+ variant: "filled",
358
+ class: "bg-bg-warning text-fg-on-warning hover:bg-bg-warning-hover"
359
+ },
360
+ {
361
+ color: "warning",
362
+ variant: "outline",
363
+ class: "bg-bg-surface border-border-warning-muted text-fg-warning shadow-sh-sm hover:bg-bg-warning-muted hover:shadow-sh-none"
364
+ },
365
+ {
366
+ color: "warning",
367
+ variant: "soft",
368
+ class: "bg-bg-warning-muted text-fg-warning hover:bg-bg-warning-muted-hover"
369
+ },
370
+ {
371
+ color: "warning",
372
+ variant: "ghost",
373
+ class: "text-fg-warning hover:bg-bg-warning-muted"
374
+ },
375
+ // ── Disabled — SEMPRE por último ────────────────────────────────
376
+ { disabled: true, class: "pointer-events-none opacity-50" }
377
+ ],
378
+ defaultVariants: {
379
+ color: "primary",
380
+ variant: "filled",
381
+ size: "md",
382
+ shape: "rounded"
383
+ }
384
+ });
385
+ const Button = React.forwardRef(
386
+ function Button2({
387
+ color,
388
+ variant,
389
+ size,
390
+ shape,
391
+ fullWidth,
392
+ loading = false,
393
+ disabled = false,
394
+ iconLeft,
395
+ iconRight,
396
+ children,
397
+ className,
398
+ type = "button",
399
+ ...rest
400
+ }, ref) {
401
+ const isDisabled = disabled || loading;
402
+ return /* @__PURE__ */ jsxRuntime.jsxs(
403
+ "button",
404
+ {
405
+ ref,
406
+ type,
407
+ disabled: isDisabled,
408
+ className: buttonVariants({
409
+ color,
410
+ variant,
411
+ size,
412
+ shape,
413
+ fullWidth,
414
+ disabled: isDisabled,
415
+ className
416
+ }),
417
+ ...rest,
418
+ children: [
419
+ loading && /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}),
420
+ !loading && iconLeft,
421
+ children,
422
+ !loading && iconRight
423
+ ]
424
+ }
425
+ );
426
+ }
427
+ );
428
+ function Spinner() {
429
+ return /* @__PURE__ */ jsxRuntime.jsx(
430
+ "svg",
431
+ {
432
+ width: "16",
433
+ height: "16",
434
+ viewBox: "0 0 16 16",
435
+ fill: "none",
436
+ className: "animate-spin",
437
+ children: /* @__PURE__ */ jsxRuntime.jsx(
438
+ "circle",
439
+ {
440
+ cx: "8",
441
+ cy: "8",
442
+ r: "6",
443
+ stroke: "currentColor",
444
+ strokeWidth: "2",
445
+ strokeLinecap: "round",
446
+ strokeDasharray: "28",
447
+ strokeDashoffset: "8",
448
+ className: "opacity-70"
449
+ }
450
+ )
451
+ }
452
+ );
453
+ }
454
+ const Dialog = SheetPrimitive__namespace.Root;
455
+ const DialogTrigger = SheetPrimitive__namespace.Trigger;
456
+ const DialogPortal = SheetPrimitive__namespace.Portal;
457
+ const DialogClose = SheetPrimitive__namespace.Close;
458
+ const DialogOverlay = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
459
+ SheetPrimitive__namespace.Overlay,
460
+ {
461
+ ref,
462
+ className: cn(
463
+ "fixed inset-0 z-50 bg-black/30 supports-[backdrop-filter]:backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
464
+ className
465
+ ),
466
+ ...props
467
+ }
468
+ ));
469
+ DialogOverlay.displayName = SheetPrimitive__namespace.Overlay.displayName;
470
+ const DialogContent = React__namespace.forwardRef(({ className, children, hideClose, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
471
+ /* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
472
+ /* @__PURE__ */ jsxRuntime.jsxs(
473
+ SheetPrimitive__namespace.Content,
474
+ {
475
+ ref,
476
+ className: cn(
477
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-gp-4xl rounded-radius-base bg-bg-surface p-pad-4xl text-body-md text-fg-default shadow-sh-xl outline-float duration-200 sm:max-w-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
478
+ className
479
+ ),
480
+ ...props,
481
+ children: [
482
+ children,
483
+ !hideClose && /* @__PURE__ */ jsxRuntime.jsxs(SheetPrimitive__namespace.Close, { className: "absolute right-4 top-4 rounded-radius-sm opacity-70 transition-opacity hover:opacity-100 outline-none ring-0 ring-ring-brand focus-visible:ring-4 disabled:pointer-events-none data-[state=open]:bg-bg-muted data-[state=open]:text-fg-muted", children: [
484
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
485
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
486
+ ] })
487
+ ]
488
+ }
489
+ )
490
+ ] }));
491
+ DialogContent.displayName = SheetPrimitive__namespace.Content.displayName;
492
+ const DialogHeader = ({
493
+ className,
494
+ ...props
495
+ }) => /* @__PURE__ */ jsxRuntime.jsx(
496
+ "div",
497
+ {
498
+ className: cn("flex flex-col gap-gp-sm", className),
499
+ ...props
500
+ }
501
+ );
502
+ DialogHeader.displayName = "DialogHeader";
503
+ const DialogFooter = ({
504
+ className,
505
+ ...props
506
+ }) => /* @__PURE__ */ jsxRuntime.jsx(
507
+ "div",
508
+ {
509
+ className: cn(
510
+ "flex flex-col-reverse gap-gp-md sm:flex-row sm:justify-end",
511
+ className
512
+ ),
513
+ ...props
514
+ }
515
+ );
516
+ DialogFooter.displayName = "DialogFooter";
517
+ const DialogTitle = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
518
+ SheetPrimitive__namespace.Title,
519
+ {
520
+ ref,
521
+ className: cn(
522
+ "text-title-md font-medium text-fg-default leading-none",
523
+ className
524
+ ),
525
+ ...props
526
+ }
527
+ ));
528
+ DialogTitle.displayName = SheetPrimitive__namespace.Title.displayName;
529
+ const DialogDescription = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
530
+ SheetPrimitive__namespace.Description,
531
+ {
532
+ ref,
533
+ className: cn("text-body-md text-fg-muted", className),
534
+ ...props
535
+ }
536
+ ));
537
+ DialogDescription.displayName = SheetPrimitive__namespace.Description.displayName;
538
+ const Command = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
539
+ cmdk.Command,
540
+ {
541
+ ref,
542
+ className: cn(
543
+ // `bg-popover`/`text-popover-foreground` são vocabulário SHADCN, não do DS —
544
+ // dependem da bridge do `index.css`, que só existe no scaffold. Em npm e
545
+ // submódulo a bridge não viaja, e a superfície caía no default do shadcn em vez
546
+ // dos tokens iGreen (L-039/L-040). Era a ÚNICA ocorrência de vocabulário shadcn
547
+ // em todo o bundle publicado — medida em 2026-08-08.
548
+ "flex h-full w-full flex-col overflow-hidden p-pad-xl bg-bg-dropdown text-fg-default",
549
+ className
550
+ ),
551
+ ...props
552
+ }
553
+ ));
554
+ Command.displayName = cmdk.Command.displayName;
555
+ const CommandDialog = ({ children, ...props }) => {
556
+ return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(
557
+ DialogContent,
558
+ {
559
+ hideClose: true,
560
+ "aria-describedby": void 0,
561
+ className: cn(
562
+ "overflow-hidden p-0 gap-0 sm:max-w-[384px]",
563
+ "rounded-[12px] border border-border-default",
564
+ // Outline padrão de elementos flutuantes
565
+ "outline-float"
566
+ ),
567
+ children: [
568
+ /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "sr-only", children: "Comando" }),
569
+ /* @__PURE__ */ jsxRuntime.jsx(Command, { children })
570
+ ]
571
+ }
572
+ ) });
573
+ };
574
+ const CommandInput = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
575
+ "div",
576
+ {
577
+ "cmdk-input-wrapper": "",
578
+ className: cn(
579
+ "flex items-center gap-gp-md h-form-md px-pad-xl rounded-radius-lg",
580
+ "bg-bg-input border border-border-subtle shadow-sh-sm",
581
+ "transition-[border-color,box-shadow,background-color] duration-150",
582
+ "focus-within:border-border-brand focus-within:shadow-sh-ring",
583
+ "dark:bg-bg-muted dark:border-border-input dark:shadow-sh-none"
584
+ ),
585
+ children: [
586
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "size-[14px] text-fg-muted shrink-0", strokeWidth: 1.8 }),
587
+ /* @__PURE__ */ jsxRuntime.jsx(
588
+ cmdk.Command.Input,
589
+ {
590
+ ref,
591
+ className: cn(
592
+ "flex-1 min-w-0 bg-transparent border-0 outline-none",
593
+ "text-body-sm font-normal text-fg-default placeholder:text-fg-muted",
594
+ "disabled:cursor-not-allowed disabled:opacity-50",
595
+ className
596
+ ),
597
+ ...props
598
+ }
599
+ )
600
+ ]
601
+ }
602
+ ));
603
+ CommandInput.displayName = cmdk.Command.Input.displayName;
604
+ const CommandList = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
605
+ cmdk.Command.List,
606
+ {
607
+ ref,
608
+ className: cn(
609
+ "max-h-[300px] overflow-y-auto overflow-x-hidden mt-pad-md scrollbar-thin",
610
+ className
611
+ ),
612
+ ...props
613
+ }
614
+ ));
615
+ CommandList.displayName = cmdk.Command.List.displayName;
616
+ const CommandEmpty = React__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
617
+ cmdk.Command.Empty,
618
+ {
619
+ ref,
620
+ className: "py-pad-5xl text-center text-body-md text-fg-muted",
621
+ ...props
622
+ }
623
+ ));
624
+ CommandEmpty.displayName = cmdk.Command.Empty.displayName;
625
+ const CommandGroup = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
626
+ cmdk.Command.Group,
627
+ {
628
+ ref,
629
+ className: cn(
630
+ "overflow-hidden text-fg-default",
631
+ "[&_[cmdk-group-heading]]:flex [&_[cmdk-group-heading]]:items-center",
632
+ "[&_[cmdk-group-heading]]:h-[28px] [&_[cmdk-group-heading]]:px-pad-xl",
633
+ "[&_[cmdk-group-heading]]:text-caption-xs [&_[cmdk-group-heading]]:font-bold",
634
+ "[&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wider",
635
+ "[&_[cmdk-group-heading]]:text-fg-subtle",
636
+ className
637
+ ),
638
+ ...props
639
+ }
640
+ ));
641
+ CommandGroup.displayName = cmdk.Command.Group.displayName;
642
+ const CommandSeparator = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
643
+ cmdk.Command.Separator,
644
+ {
645
+ ref,
646
+ className: cn("mx-pad-xs my-pad-xs h-px bg-border-default", className),
647
+ ...props
648
+ }
649
+ ));
650
+ CommandSeparator.displayName = cmdk.Command.Separator.displayName;
651
+ const CommandItem = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
652
+ cmdk.Command.Item,
653
+ {
654
+ ref,
655
+ className: cn(
656
+ "relative flex cursor-default select-none items-center gap-gp-md",
657
+ "rounded-radius-lg px-pad-xl py-pad-md",
658
+ "text-body-sm font-medium text-fg-muted",
659
+ "outline-none transition-colors",
660
+ "data-[selected='true']:bg-bg-muted data-[selected='true']:text-fg-default data-[selected='true']:[&_svg]:text-fg-default",
661
+ "data-[disabled='true']:pointer-events-none data-[disabled='true']:opacity-50",
662
+ "[&_svg]:pointer-events-none [&_svg]:size-[18px] [&_svg]:shrink-0 [&_svg]:text-fg-muted",
663
+ className
664
+ ),
665
+ ...props
666
+ }
667
+ ));
668
+ CommandItem.displayName = cmdk.Command.Item.displayName;
669
+ const CommandShortcut = ({
670
+ className,
671
+ ...props
672
+ }) => {
673
+ return /* @__PURE__ */ jsxRuntime.jsx(
674
+ "span",
675
+ {
676
+ className: cn(
677
+ "ml-auto text-caption-sm tracking-wider text-fg-subtle",
678
+ className
679
+ ),
680
+ ...props
681
+ }
682
+ );
683
+ };
684
+ CommandShortcut.displayName = "CommandShortcut";
685
+ const Popover = PopoverPrimitive__namespace.Root;
686
+ const PopoverTrigger = PopoverPrimitive__namespace.Trigger;
687
+ const PopoverAnchor = PopoverPrimitive__namespace.Anchor;
688
+ const PopoverClose = PopoverPrimitive__namespace.Close;
689
+ const POPOVER_MOBILE_SHEET = [
690
+ "max-md:w-full max-md:min-w-0 max-md:max-w-none",
691
+ "max-md:!max-h-[92vh]",
692
+ "max-md:rounded-b-none max-md:rounded-t-[12px]",
693
+ "max-md:border-x-0 max-md:border-b-0",
694
+ "max-md:outline-none max-md:shadow-none",
695
+ // Respiro de 20px (pad-3xl) no rodapé pra o conteúdo (footer/última seção)
696
+ // não colar na borda inferior do device quando vira sheet.
697
+ "max-md:pb-pad-3xl",
698
+ "max-md:data-[state=open]:zoom-in-100 max-md:data-[state=closed]:zoom-out-100",
699
+ "max-md:data-[state=open]:slide-in-from-bottom-12 max-md:data-[state=closed]:slide-out-to-bottom-12"
700
+ ].join(" ");
701
+ const PopoverSheetBackdrop = () => /* @__PURE__ */ jsxRuntime.jsx(
702
+ "div",
703
+ {
704
+ "aria-hidden": "true",
705
+ className: "fixed inset-0 z-[55] bg-overlay-scrim pointer-events-auto md:hidden animate-in fade-in-0 duration-150"
706
+ }
707
+ );
708
+ const PopoverContent = React__namespace.forwardRef(
709
+ ({ className, align = "center", sideOffset = 6, disablePortal, mobileSheet = true, ...props }, ref) => {
710
+ const content = /* @__PURE__ */ jsxRuntime.jsx(
711
+ PopoverPrimitive__namespace.Content,
712
+ {
713
+ ref,
714
+ align,
715
+ sideOffset,
716
+ "data-mobile-sheet": mobileSheet ? "" : void 0,
717
+ className: cn(
718
+ "relative z-50",
719
+ // Unificado com DropdownMenu/Select: bg-bg-dropdown (frosted no dark)
720
+ // + border-border-default + outline-float. O `before` pseudo-element
721
+ // aplica o blur backdrop (necessário pra bg-bg-dropdown semi-transparente
722
+ // render correto no dark mode).
723
+ "bg-bg-dropdown",
724
+ "border border-border-default rounded-[12px] shadow-sh-lg outline-float",
725
+ "before:pointer-events-none before:absolute before:inset-0 before:-z-10 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150",
726
+ "text-fg-default",
727
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
728
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
729
+ "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
730
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
731
+ "data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
732
+ mobileSheet && POPOVER_MOBILE_SHEET,
733
+ className
734
+ ),
735
+ ...props
736
+ }
737
+ );
738
+ if (disablePortal) {
739
+ return mobileSheet ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
740
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverSheetBackdrop, {}),
741
+ content
742
+ ] }) : content;
743
+ }
744
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
745
+ mobileSheet && /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(PopoverSheetBackdrop, {}) }),
746
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: content })
747
+ ] });
748
+ }
749
+ );
750
+ PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
751
+ const inputGroupVariants = classVarianceAuthority.cva(
752
+ [
753
+ "group/input-group relative flex w-full items-center",
754
+ "bg-bg-input dark:bg-bg-muted",
755
+ "hover:bg-bg-input-hover dark:hover:bg-bg-muted-hover",
756
+ "border border-border-input rounded-radius-lg",
757
+ "transition-[border-color,box-shadow,background-color] outline-none",
758
+ "has-[input:disabled]:cursor-not-allowed has-[input:disabled]:opacity-50 has-[input:disabled]:hover:bg-bg-input dark:has-[input:disabled]:hover:bg-bg-muted"
759
+ ],
760
+ {
761
+ variants: {
762
+ size: {
763
+ xxs: "min-h-form-xs px-pad-md gap-gp-xs rounded-radius-md text-body-sm font-normal",
764
+ xs: "min-h-form-sm px-pad-xl gap-gp-md rounded-radius-md text-body-sm font-normal",
765
+ sm: "min-h-form-md px-pad-xl gap-gp-md rounded-radius-lg text-body-sm font-normal",
766
+ md: "min-h-form-lg px-pad-xl gap-gp-md rounded-radius-lg text-body-sm font-normal"
767
+ },
768
+ state: {
769
+ default: "focus-within:border-border-brand focus-within:shadow-sh-ring",
770
+ error: "border-border-danger-muted focus-within:border-border-danger-muted focus-within:shadow-sh-ring-danger",
771
+ warning: "border-border-warning-muted focus-within:border-border-warning-muted focus-within:shadow-sh-ring-warning",
772
+ success: "border-border-success-muted focus-within:border-border-success-muted focus-within:shadow-sh-ring-success"
773
+ }
774
+ },
775
+ defaultVariants: { size: "md", state: "default" }
776
+ }
777
+ );
778
+ const InputGroup = React__namespace.forwardRef(
779
+ ({ className, size, state, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
780
+ "div",
781
+ {
782
+ ref,
783
+ role: "group",
784
+ "data-slot": "input-group",
785
+ className: cn(inputGroupVariants({ size, state }), className),
786
+ ...props
787
+ }
788
+ )
789
+ );
790
+ InputGroup.displayName = "InputGroup";
791
+ const inputGroupInputVariants = classVarianceAuthority.cva([
792
+ "flex-1 min-w-0 bg-transparent border-0 outline-none",
793
+ "text-body-sm font-normal text-fg-default placeholder:text-fg-muted placeholder:opacity-70",
794
+ "disabled:cursor-not-allowed",
795
+ "file:inline-flex file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-fg-default"
796
+ ]);
797
+ const InputGroupInput = React__namespace.forwardRef(({ className, type, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
798
+ "input",
799
+ {
800
+ ref,
801
+ type,
802
+ "data-slot": "input-group-input",
803
+ className: cn(inputGroupInputVariants(), className),
804
+ ...props
805
+ }
806
+ ));
807
+ InputGroupInput.displayName = "InputGroupInput";
808
+ const inputGroupTextareaVariants = classVarianceAuthority.cva([
809
+ "flex-1 min-w-0 bg-transparent border-0 outline-none resize-y",
810
+ "py-pad-md",
811
+ "text-body-sm font-normal leading-[1.5] text-fg-default placeholder:text-fg-muted placeholder:opacity-70",
812
+ "disabled:cursor-not-allowed"
813
+ ]);
814
+ const InputGroupTextarea = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
815
+ "textarea",
816
+ {
817
+ ref,
818
+ "data-slot": "input-group-textarea",
819
+ className: cn(inputGroupTextareaVariants(), className),
820
+ ...props
821
+ }
822
+ ));
823
+ InputGroupTextarea.displayName = "InputGroupTextarea";
824
+ const inputGroupAddonVariants = classVarianceAuthority.cva(
825
+ "flex items-center text-fg-muted shrink-0 select-none [&_svg]:size-4 [&_svg]:shrink-0",
826
+ {
827
+ variants: {
828
+ align: {
829
+ // Inline = horizontal (start/end do eixo do texto)
830
+ "inline-start": "",
831
+ "inline-end": "",
832
+ // Block = vertical (top/bottom — multi-linha em textarea)
833
+ "block-start": "",
834
+ "block-end": ""
835
+ }
836
+ },
837
+ defaultVariants: { align: "inline-start" }
838
+ }
839
+ );
840
+ const InputGroupAddon = React__namespace.forwardRef(({ className, align = "inline-start", onClick, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
841
+ "div",
842
+ {
843
+ ref,
844
+ role: "group",
845
+ "data-slot": "input-group-addon",
846
+ "data-align": align,
847
+ className: cn(inputGroupAddonVariants({ align }), className),
848
+ onClick: (e) => {
849
+ if (e.target.closest("button")) {
850
+ onClick?.(e);
851
+ return;
852
+ }
853
+ e.currentTarget.parentElement?.querySelector(
854
+ "input, textarea"
855
+ )?.focus();
856
+ onClick?.(e);
857
+ },
858
+ ...props
859
+ }
860
+ ));
861
+ InputGroupAddon.displayName = "InputGroupAddon";
862
+ const InputGroupText = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
863
+ "span",
864
+ {
865
+ ref,
866
+ "data-slot": "input-group-text",
867
+ className: cn(
868
+ "text-body-xs text-fg-muted whitespace-nowrap",
869
+ className
870
+ ),
871
+ ...props
872
+ }
873
+ ));
874
+ InputGroupText.displayName = "InputGroupText";
875
+ const inputGroupButtonVariants = classVarianceAuthority.cva(
876
+ [
877
+ "inline-flex items-center justify-center shrink-0",
878
+ "rounded-radius-md transition-colors outline-none cursor-pointer",
879
+ "focus-visible:ring-4 focus-visible:ring-ring-brand",
880
+ "disabled:cursor-not-allowed disabled:opacity-50",
881
+ "[&_svg]:size-4 [&_svg]:shrink-0"
882
+ ],
883
+ {
884
+ variants: {
885
+ size: {
886
+ xs: "h-form-xs px-pad-md gap-gp-xs text-body-xs font-normal",
887
+ "icon-xs": "size-form-xs",
888
+ sm: "h-form-sm px-pad-lg gap-gp-md text-body-xs font-normal",
889
+ "icon-sm": "size-form-sm"
890
+ },
891
+ variant: {
892
+ default: "bg-bg-muted text-fg-default hover:bg-bg-muted-hover",
893
+ destructive: "bg-bg-danger text-fg-on-danger hover:bg-bg-danger-hover",
894
+ outline: "border border-border-input bg-transparent text-fg-default hover:bg-bg-muted",
895
+ secondary: "bg-bg-emphasis text-fg-default hover:bg-bg-muted-hover",
896
+ ghost: "bg-transparent text-fg-muted hover:bg-bg-muted hover:text-fg-default",
897
+ link: "bg-transparent text-fg-brand underline-offset-4 hover:underline"
898
+ }
899
+ },
900
+ defaultVariants: { size: "xs", variant: "ghost" }
901
+ }
902
+ );
903
+ const InputGroupButton = React__namespace.forwardRef(({ className, size, variant, type = "button", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
904
+ "button",
905
+ {
906
+ ref,
907
+ type,
908
+ "data-slot": "input-group-button",
909
+ className: cn(inputGroupButtonVariants({ size, variant }), className),
910
+ ...props
911
+ }
912
+ ));
913
+ InputGroupButton.displayName = "InputGroupButton";
914
+ const DropdownMenu = DropdownMenuPrimitive__namespace.Root;
915
+ const DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
916
+ const DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
917
+ const DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
918
+ const DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
919
+ const DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
920
+ const CONTAINER_CLASSES = [
921
+ "relative z-50 min-w-[180px] overflow-hidden",
922
+ "flex flex-col gap-px",
923
+ "rounded-[12px] bg-bg-dropdown p-pad-sm",
924
+ "border border-border-default shadow-sh-lg",
925
+ // Outline padrão de elementos flutuantes
926
+ "outline-float",
927
+ "text-fg-muted",
928
+ // Frosted-glass blur (necessário pra fazer o bg-dropdown semi-transparent render correto no dark)
929
+ "before:pointer-events-none before:absolute before:inset-0 before:-z-10 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150",
930
+ // Animações Radix
931
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
932
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
933
+ "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
934
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
935
+ "data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
936
+ "origin-[--radix-dropdown-menu-content-transform-origin]"
937
+ ].join(" ");
938
+ const MOBILE_SHEET_CLASSES = [
939
+ "max-md:w-full max-md:min-w-0 max-md:max-w-none",
940
+ "max-md:!max-h-[92vh]",
941
+ "max-md:rounded-b-none max-md:rounded-t-[12px]",
942
+ "max-md:border-x-0 max-md:border-b-0",
943
+ "max-md:outline-none max-md:shadow-none",
944
+ "max-md:data-[state=open]:zoom-in-100 max-md:data-[state=closed]:zoom-out-100",
945
+ "max-md:data-[state=open]:slide-in-from-bottom-12 max-md:data-[state=closed]:slide-out-to-bottom-12"
946
+ ].join(" ");
947
+ const ITEM_BASE = [
948
+ "relative flex cursor-default select-none items-center",
949
+ "gap-pad-lg px-pad-lg py-pad-md rounded-radius-sm",
950
+ "text-body-sm font-medium",
951
+ "outline-none transition-colors",
952
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
953
+ "[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"
954
+ ].join(" ");
955
+ const ITEM_VARIANT_DEFAULT = [
956
+ "text-fg-muted [&_svg]:text-fg-muted",
957
+ "focus:bg-bg-muted focus:text-fg-default focus:[&_svg]:text-fg-default"
958
+ ].join(" ");
959
+ const ITEM_VARIANT_DESTRUCTIVE = [
960
+ "text-fg-danger [&_svg]:text-fg-danger",
961
+ "focus:bg-bg-danger-muted focus:text-fg-danger focus:[&_svg]:text-fg-danger"
962
+ ].join(" ");
963
+ const DropdownMenuSubTrigger = React__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
964
+ DropdownMenuPrimitive__namespace.SubTrigger,
965
+ {
966
+ ref,
967
+ className: cn(
968
+ ITEM_BASE,
969
+ ITEM_VARIANT_DEFAULT,
970
+ "data-[state=open]:bg-bg-muted data-[state=open]:text-fg-default",
971
+ inset && "pl-8",
972
+ className
973
+ ),
974
+ ...props,
975
+ children: [
976
+ children,
977
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "ml-auto" })
978
+ ]
979
+ }
980
+ ));
981
+ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
982
+ const DropdownMenuSubContent = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
983
+ DropdownMenuPrimitive__namespace.SubContent,
984
+ {
985
+ ref,
986
+ className: cn(CONTAINER_CLASSES, className),
987
+ ...props
988
+ }
989
+ ));
990
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
991
+ const DropdownMenuContent = React__namespace.forwardRef(({ className, sideOffset = 8, mobileSheet = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
992
+ mobileSheet && /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
993
+ "div",
994
+ {
995
+ "aria-hidden": "true",
996
+ className: "fixed inset-0 z-[55] bg-overlay-scrim pointer-events-none md:hidden animate-in fade-in-0 duration-150"
997
+ }
998
+ ) }),
999
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
1000
+ DropdownMenuPrimitive__namespace.Content,
1001
+ {
1002
+ ref,
1003
+ sideOffset,
1004
+ "data-mobile-sheet": mobileSheet ? "" : void 0,
1005
+ className: cn(
1006
+ CONTAINER_CLASSES,
1007
+ "max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto overflow-x-hidden",
1008
+ mobileSheet && MOBILE_SHEET_CLASSES,
1009
+ className
1010
+ ),
1011
+ ...props
1012
+ }
1013
+ ) })
1014
+ ] }));
1015
+ DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
1016
+ const DropdownMenuItem = React__namespace.forwardRef(({ className, inset, variant = "default", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1017
+ DropdownMenuPrimitive__namespace.Item,
1018
+ {
1019
+ ref,
1020
+ className: cn(
1021
+ ITEM_BASE,
1022
+ variant === "destructive" ? ITEM_VARIANT_DESTRUCTIVE : ITEM_VARIANT_DEFAULT,
1023
+ inset && "pl-8",
1024
+ className
1025
+ ),
1026
+ ...props
1027
+ }
1028
+ ));
1029
+ DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
1030
+ const DropdownMenuCheckboxItem = React__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
1031
+ DropdownMenuPrimitive__namespace.CheckboxItem,
1032
+ {
1033
+ ref,
1034
+ className: cn(
1035
+ ITEM_BASE,
1036
+ ITEM_VARIANT_DEFAULT,
1037
+ "pl-8 pr-pad-lg",
1038
+ className
1039
+ ),
1040
+ checked,
1041
+ ...props,
1042
+ children: [
1043
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-pad-md flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }),
1044
+ children
1045
+ ]
1046
+ }
1047
+ ));
1048
+ DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
1049
+ const DropdownMenuRadioItem = React__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
1050
+ DropdownMenuPrimitive__namespace.RadioItem,
1051
+ {
1052
+ ref,
1053
+ className: cn(
1054
+ ITEM_BASE,
1055
+ ITEM_VARIANT_DEFAULT,
1056
+ "pl-8 pr-pad-lg",
1057
+ // Selected state — brand tint (mantém no focus pra não voltar pra muted)
1058
+ "data-[state=checked]:bg-bg-brand-subtle data-[state=checked]:text-fg-brand",
1059
+ "data-[state=checked]:[&_svg]:text-fg-brand",
1060
+ "data-[state=checked]:focus:bg-bg-brand-subtle data-[state=checked]:focus:text-fg-brand",
1061
+ className
1062
+ ),
1063
+ ...props,
1064
+ children: [
1065
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-pad-md flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-4" }) }) }),
1066
+ children
1067
+ ]
1068
+ }
1069
+ ));
1070
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
1071
+ const DropdownMenuLabel = React__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1072
+ DropdownMenuPrimitive__namespace.Label,
1073
+ {
1074
+ ref,
1075
+ className: cn(
1076
+ "px-pad-lg py-pad-sm text-caption-sm font-semibold uppercase tracking-wider text-fg-subtle",
1077
+ inset && "pl-8",
1078
+ className
1079
+ ),
1080
+ ...props
1081
+ }
1082
+ ));
1083
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
1084
+ const DropdownMenuSeparator = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1085
+ DropdownMenuPrimitive__namespace.Separator,
1086
+ {
1087
+ ref,
1088
+ className: cn("mx-pad-xs my-pad-xs h-px bg-border-default", className),
1089
+ ...props
1090
+ }
1091
+ ));
1092
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive__namespace.Separator.displayName;
1093
+ const DropdownMenuShortcut = ({
1094
+ className,
1095
+ ...props
1096
+ }) => {
1097
+ return /* @__PURE__ */ jsxRuntime.jsx(
1098
+ "span",
1099
+ {
1100
+ className: cn("ml-auto text-caption-sm tracking-wider text-fg-subtle", className),
1101
+ ...props
1102
+ }
1103
+ );
1104
+ };
1105
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
1106
+ const Avatar = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1107
+ AvatarPrimitive__namespace.Root,
1108
+ {
1109
+ ref,
1110
+ className: cn(
1111
+ "relative flex size-8 shrink-0 overflow-hidden rounded-full",
1112
+ className
1113
+ ),
1114
+ ...props
1115
+ }
1116
+ ));
1117
+ Avatar.displayName = AvatarPrimitive__namespace.Root.displayName;
1118
+ const AvatarImage = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1119
+ AvatarPrimitive__namespace.Image,
1120
+ {
1121
+ ref,
1122
+ className: cn("aspect-square h-full w-full", className),
1123
+ ...props
1124
+ }
1125
+ ));
1126
+ AvatarImage.displayName = AvatarPrimitive__namespace.Image.displayName;
1127
+ const AvatarFallback = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1128
+ AvatarPrimitive__namespace.Fallback,
1129
+ {
1130
+ ref,
1131
+ className: cn(
1132
+ "flex h-full w-full items-center justify-center rounded-full bg-bg-muted text-fg-muted text-body-sm font-normal",
1133
+ className
1134
+ ),
1135
+ ...props
1136
+ }
1137
+ ));
1138
+ AvatarFallback.displayName = AvatarPrimitive__namespace.Fallback.displayName;
1139
+ exports.Avatar = Avatar;
1140
+ exports.AvatarFallback = AvatarFallback;
1141
+ exports.AvatarImage = AvatarImage;
1142
+ exports.Button = Button;
1143
+ exports.Command = Command;
1144
+ exports.CommandDialog = CommandDialog;
1145
+ exports.CommandEmpty = CommandEmpty;
1146
+ exports.CommandGroup = CommandGroup;
1147
+ exports.CommandInput = CommandInput;
1148
+ exports.CommandItem = CommandItem;
1149
+ exports.CommandList = CommandList;
1150
+ exports.CommandSeparator = CommandSeparator;
1151
+ exports.CommandShortcut = CommandShortcut;
1152
+ exports.Dialog = Dialog;
1153
+ exports.DialogClose = DialogClose;
1154
+ exports.DialogContent = DialogContent;
1155
+ exports.DialogDescription = DialogDescription;
1156
+ exports.DialogFooter = DialogFooter;
1157
+ exports.DialogHeader = DialogHeader;
1158
+ exports.DialogOverlay = DialogOverlay;
1159
+ exports.DialogPortal = DialogPortal;
1160
+ exports.DialogTitle = DialogTitle;
1161
+ exports.DialogTrigger = DialogTrigger;
1162
+ exports.DropdownMenu = DropdownMenu;
1163
+ exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
1164
+ exports.DropdownMenuContent = DropdownMenuContent;
1165
+ exports.DropdownMenuGroup = DropdownMenuGroup;
1166
+ exports.DropdownMenuItem = DropdownMenuItem;
1167
+ exports.DropdownMenuLabel = DropdownMenuLabel;
1168
+ exports.DropdownMenuPortal = DropdownMenuPortal;
1169
+ exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
1170
+ exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
1171
+ exports.DropdownMenuSeparator = DropdownMenuSeparator;
1172
+ exports.DropdownMenuShortcut = DropdownMenuShortcut;
1173
+ exports.DropdownMenuSub = DropdownMenuSub;
1174
+ exports.DropdownMenuSubContent = DropdownMenuSubContent;
1175
+ exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
1176
+ exports.DropdownMenuTrigger = DropdownMenuTrigger;
1177
+ exports.InputGroup = InputGroup;
1178
+ exports.InputGroupAddon = InputGroupAddon;
1179
+ exports.InputGroupButton = InputGroupButton;
1180
+ exports.InputGroupInput = InputGroupInput;
1181
+ exports.InputGroupText = InputGroupText;
1182
+ exports.InputGroupTextarea = InputGroupTextarea;
1183
+ exports.Popover = Popover;
1184
+ exports.PopoverAnchor = PopoverAnchor;
1185
+ exports.PopoverClose = PopoverClose;
1186
+ exports.PopoverContent = PopoverContent;
1187
+ exports.PopoverTrigger = PopoverTrigger;
1188
+ exports.buttonVariants = buttonVariants;
1189
+ exports.cn = cn;
1190
+ exports.inputGroupAddonVariants = inputGroupAddonVariants;
1191
+ exports.inputGroupButtonVariants = inputGroupButtonVariants;
1192
+ exports.inputGroupInputVariants = inputGroupInputVariants;
1193
+ exports.inputGroupTextareaVariants = inputGroupTextareaVariants;
1194
+ exports.inputGroupVariants = inputGroupVariants;
1195
+ exports.tv = tv;
1196
+ //# sourceMappingURL=avatar-YpqQgJnh.cjs.map