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