@snksergio/design-system 0.1.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 (73) hide show
  1. package/README.md +260 -0
  2. package/dist-lib/chunks/app-shell-BNTvOETJ.mjs +2681 -0
  3. package/dist-lib/chunks/app-shell-BNTvOETJ.mjs.map +1 -0
  4. package/dist-lib/chunks/app-shell-CDy42aNI.mjs +2663 -0
  5. package/dist-lib/chunks/app-shell-CDy42aNI.mjs.map +1 -0
  6. package/dist-lib/chunks/app-shell-mocks-kWIVSzLs.mjs +208 -0
  7. package/dist-lib/chunks/app-shell-mocks-kWIVSzLs.mjs.map +1 -0
  8. package/dist-lib/chunks/app-shell-mocks-oO_IV3Gw.mjs +207 -0
  9. package/dist-lib/chunks/app-shell-mocks-oO_IV3Gw.mjs.map +1 -0
  10. package/dist-lib/chunks/badge-B_2Zt52o.mjs +797 -0
  11. package/dist-lib/chunks/badge-B_2Zt52o.mjs.map +1 -0
  12. package/dist-lib/chunks/badge-DKpXURa1.mjs +813 -0
  13. package/dist-lib/chunks/badge-DKpXURa1.mjs.map +1 -0
  14. package/dist-lib/chunks/chat-v2-mocks-BV9Wha_Z.mjs +192 -0
  15. package/dist-lib/chunks/chat-v2-mocks-BV9Wha_Z.mjs.map +1 -0
  16. package/dist-lib/chunks/chat-v2-mocks-DvZRkhmz.mjs +193 -0
  17. package/dist-lib/chunks/chat-v2-mocks-DvZRkhmz.mjs.map +1 -0
  18. package/dist-lib/chunks/chip-group-CsKBBHW2.mjs +796 -0
  19. package/dist-lib/chunks/chip-group-CsKBBHW2.mjs.map +1 -0
  20. package/dist-lib/chunks/chip-group-D3D0i72q.mjs +780 -0
  21. package/dist-lib/chunks/chip-group-D3D0i72q.mjs.map +1 -0
  22. package/dist-lib/chunks/clientes-showcase-mocks-BMfbNNJh.mjs +185 -0
  23. package/dist-lib/chunks/clientes-showcase-mocks-BMfbNNJh.mjs.map +1 -0
  24. package/dist-lib/chunks/clientes-showcase-mocks-Cq9u3nGZ.mjs +169 -0
  25. package/dist-lib/chunks/clientes-showcase-mocks-Cq9u3nGZ.mjs.map +1 -0
  26. package/dist-lib/chunks/input-374MpdBL.mjs +72 -0
  27. package/dist-lib/chunks/input-374MpdBL.mjs.map +1 -0
  28. package/dist-lib/chunks/input-DF4XAWmr.mjs +56 -0
  29. package/dist-lib/chunks/input-DF4XAWmr.mjs.map +1 -0
  30. package/dist-lib/chunks/page-header-Dw-3wqAG.mjs +75 -0
  31. package/dist-lib/chunks/page-header-Dw-3wqAG.mjs.map +1 -0
  32. package/dist-lib/chunks/page-header-mC1gGtOI.mjs +76 -0
  33. package/dist-lib/chunks/page-header-mC1gGtOI.mjs.map +1 -0
  34. package/dist-lib/chunks/panel-Ds15whqp.mjs +9717 -0
  35. package/dist-lib/chunks/panel-Ds15whqp.mjs.map +1 -0
  36. package/dist-lib/chunks/panel-bzNmFlEZ.mjs +9737 -0
  37. package/dist-lib/chunks/panel-bzNmFlEZ.mjs.map +1 -0
  38. package/dist-lib/chunks/useTheme-BUPLZBMs.mjs +66 -0
  39. package/dist-lib/chunks/useTheme-BUPLZBMs.mjs.map +1 -0
  40. package/dist-lib/chunks/useTheme-Dee4mo-A.mjs +65 -0
  41. package/dist-lib/chunks/useTheme-Dee4mo-A.mjs.map +1 -0
  42. package/dist-lib/index.cjs +1207 -0
  43. package/dist-lib/index.cjs.map +1 -0
  44. package/dist-lib/index.d.ts +2 -0
  45. package/dist-lib/index.mjs +1209 -0
  46. package/dist-lib/index.mjs.map +1 -0
  47. package/dist-lib/preview/chat.cjs +1120 -0
  48. package/dist-lib/preview/chat.cjs.map +1 -0
  49. package/dist-lib/preview/chat.d.ts +6 -0
  50. package/dist-lib/preview/chat.mjs +1120 -0
  51. package/dist-lib/preview/chat.mjs.map +1 -0
  52. package/dist-lib/preview/clientes.cjs +897 -0
  53. package/dist-lib/preview/clientes.cjs.map +1 -0
  54. package/dist-lib/preview/clientes.d.ts +6 -0
  55. package/dist-lib/preview/clientes.mjs +897 -0
  56. package/dist-lib/preview/clientes.mjs.map +1 -0
  57. package/dist-lib/preview/dashboard.cjs +733 -0
  58. package/dist-lib/preview/dashboard.cjs.map +1 -0
  59. package/dist-lib/preview/dashboard.d.ts +4 -0
  60. package/dist-lib/preview/dashboard.mjs +733 -0
  61. package/dist-lib/preview/dashboard.mjs.map +1 -0
  62. package/dist-lib/preview/mocks.cjs +15 -0
  63. package/dist-lib/preview/mocks.cjs.map +1 -0
  64. package/dist-lib/preview/mocks.d.ts +2 -0
  65. package/dist-lib/preview/mocks.mjs +15 -0
  66. package/dist-lib/preview/mocks.mjs.map +1 -0
  67. package/dist-lib/theme.css +668 -0
  68. package/dist-lib/tokens.cjs +915 -0
  69. package/dist-lib/tokens.cjs.map +1 -0
  70. package/dist-lib/tokens.d.ts +2 -0
  71. package/dist-lib/tokens.mjs +915 -0
  72. package/dist-lib/tokens.mjs.map +1 -0
  73. package/package.json +142 -0
@@ -0,0 +1,780 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { forwardRef, createContext, useContext } from "react";
3
+ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
4
+ import { clsx } from "clsx";
5
+ import { extendTailwindMerge } from "tailwind-merge";
6
+ import { tv as tv$1 } from "tailwind-variants";
7
+ const isDsPad = (v) => /^(pad|sp)-/.test(v);
8
+ const isDsGap = (v) => /^gp-/.test(v);
9
+ const isDsRadius = (v) => /^radius-/.test(v);
10
+ const isDsShadow = (v) => /^sh-/.test(v);
11
+ const isDsForm = (v) => /^form-/.test(v);
12
+ const twMerge = extendTailwindMerge({
13
+ extend: {
14
+ classGroups: {
15
+ "font-size": [
16
+ {
17
+ text: [
18
+ // Displays
19
+ "display-2xl",
20
+ "display-xl",
21
+ "display-lg",
22
+ "display-md",
23
+ // Headings
24
+ "heading-xl",
25
+ "heading-lg",
26
+ "heading-md",
27
+ "heading-sm",
28
+ "heading-xs",
29
+ "heading-2xs",
30
+ // Titles
31
+ "title-lg",
32
+ "title-md",
33
+ "title-sm",
34
+ // Labels
35
+ "label-xl",
36
+ "label-lg",
37
+ "label-md",
38
+ "label-sm",
39
+ "label-xs",
40
+ // Paragraphs
41
+ "paragraph-xl",
42
+ "paragraph-lg",
43
+ "paragraph-md",
44
+ "paragraph-sm",
45
+ "paragraph-xs",
46
+ // Body
47
+ "body-lg",
48
+ "body-md",
49
+ "body-sm",
50
+ "body-lg-medium",
51
+ "body-md-medium",
52
+ "body-sm-medium",
53
+ // Captions
54
+ "caption-md",
55
+ "caption-sm",
56
+ // Subheadings
57
+ "subheading-md",
58
+ "subheading-sm",
59
+ "subheading-xs",
60
+ "subheading-2xs",
61
+ // Overlines
62
+ "overline-md",
63
+ "overline-sm",
64
+ // Code
65
+ "code-md",
66
+ "code-sm"
67
+ ]
68
+ }
69
+ ],
70
+ /* ── Padding ──────────────────────────────────────────────────────── */
71
+ p: [{ p: [isDsPad] }],
72
+ px: [{ px: [isDsPad] }],
73
+ py: [{ py: [isDsPad] }],
74
+ pt: [{ pt: [isDsPad] }],
75
+ pr: [{ pr: [isDsPad] }],
76
+ pb: [{ pb: [isDsPad] }],
77
+ pl: [{ pl: [isDsPad] }],
78
+ ps: [{ ps: [isDsPad] }],
79
+ pe: [{ pe: [isDsPad] }],
80
+ /* ── Margin (usa mesmo sp-*) ──────────────────────────────────────── */
81
+ m: [{ m: [isDsPad] }],
82
+ mx: [{ mx: [isDsPad] }],
83
+ my: [{ my: [isDsPad] }],
84
+ mt: [{ mt: [isDsPad] }],
85
+ mr: [{ mr: [isDsPad] }],
86
+ mb: [{ mb: [isDsPad] }],
87
+ ml: [{ ml: [isDsPad] }],
88
+ ms: [{ ms: [isDsPad] }],
89
+ me: [{ me: [isDsPad] }],
90
+ /* ── Inset / position (top/right/bottom/left) ─────────────────────── */
91
+ inset: [{ inset: [isDsPad] }],
92
+ "inset-x": [{ "inset-x": [isDsPad] }],
93
+ "inset-y": [{ "inset-y": [isDsPad] }],
94
+ "top": [{ top: [isDsPad] }],
95
+ "right": [{ right: [isDsPad] }],
96
+ "bottom": [{ bottom: [isDsPad] }],
97
+ "left": [{ left: [isDsPad] }],
98
+ "start": [{ start: [isDsPad] }],
99
+ "end": [{ end: [isDsPad] }],
100
+ /* ── Gap ──────────────────────────────────────────────────────────── */
101
+ gap: [{ gap: [isDsGap] }],
102
+ "gap-x": [{ "gap-x": [isDsGap] }],
103
+ "gap-y": [{ "gap-y": [isDsGap] }],
104
+ /* ── Rounded (todas as cantos) ────────────────────────────────────── */
105
+ rounded: [{ rounded: [isDsRadius] }],
106
+ "rounded-s": [{ "rounded-s": [isDsRadius] }],
107
+ "rounded-e": [{ "rounded-e": [isDsRadius] }],
108
+ "rounded-t": [{ "rounded-t": [isDsRadius] }],
109
+ "rounded-r": [{ "rounded-r": [isDsRadius] }],
110
+ "rounded-b": [{ "rounded-b": [isDsRadius] }],
111
+ "rounded-l": [{ "rounded-l": [isDsRadius] }],
112
+ "rounded-ss": [{ "rounded-ss": [isDsRadius] }],
113
+ "rounded-se": [{ "rounded-se": [isDsRadius] }],
114
+ "rounded-ee": [{ "rounded-ee": [isDsRadius] }],
115
+ "rounded-es": [{ "rounded-es": [isDsRadius] }],
116
+ "rounded-tl": [{ "rounded-tl": [isDsRadius] }],
117
+ "rounded-tr": [{ "rounded-tr": [isDsRadius] }],
118
+ "rounded-br": [{ "rounded-br": [isDsRadius] }],
119
+ "rounded-bl": [{ "rounded-bl": [isDsRadius] }],
120
+ /* ── Shadow ───────────────────────────────────────────────────────── */
121
+ shadow: [{ shadow: [isDsShadow] }],
122
+ /* ── Form sizes (min-h, h, w, size) ───────────────────────────────── */
123
+ "min-h": [{ "min-h": [isDsForm] }],
124
+ h: [{ h: [isDsForm] }],
125
+ w: [{ w: [isDsForm] }],
126
+ size: [{ size: [isDsForm] }]
127
+ }
128
+ }
129
+ });
130
+ function cn(...inputs) {
131
+ return twMerge(clsx(inputs));
132
+ }
133
+ const twMergeConfig = {
134
+ extend: {
135
+ classGroups: {
136
+ "font-size": [
137
+ {
138
+ text: [
139
+ // Displays
140
+ "display-2xl",
141
+ "display-xl",
142
+ "display-lg",
143
+ "display-md",
144
+ // Headings (heading-2xs removido — duplicata de title-lg)
145
+ "heading-xl",
146
+ "heading-lg",
147
+ "heading-md",
148
+ "heading-sm",
149
+ "heading-xs",
150
+ // Titles
151
+ "title-lg",
152
+ "title-md",
153
+ "title-sm",
154
+ // Labels (+ label-base 13px e label-2xs 11px)
155
+ "label-xl",
156
+ "label-lg",
157
+ "label-md",
158
+ "label-sm",
159
+ "label-base",
160
+ "label-xs",
161
+ "label-2xs",
162
+ // Paragraphs (+ paragraph-base 13px)
163
+ "paragraph-xl",
164
+ "paragraph-lg",
165
+ "paragraph-md",
166
+ "paragraph-sm",
167
+ "paragraph-base",
168
+ "paragraph-xs",
169
+ // Captions (+ caption-xs 10px)
170
+ "caption-md",
171
+ "caption-sm",
172
+ "caption-xs",
173
+ // Subheadings (+ strong-md/sm com weight 700 + tracking apertado)
174
+ "subheading-md",
175
+ "subheading-sm",
176
+ "subheading-xs",
177
+ "subheading-2xs",
178
+ "subheading-strong-md",
179
+ "subheading-strong-sm",
180
+ // Code
181
+ "code-md",
182
+ "code-sm"
183
+ ]
184
+ }
185
+ ]
186
+ }
187
+ }
188
+ };
189
+ const tv = (options, config) => tv$1(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-[13px] 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 = 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__ */ 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__ */ jsx(Spinner, {}),
420
+ !loading && iconLeft,
421
+ children,
422
+ !loading && iconRight
423
+ ]
424
+ }
425
+ );
426
+ }
427
+ );
428
+ function Spinner() {
429
+ return /* @__PURE__ */ 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__ */ 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 chipVariants = tv({
455
+ base: [
456
+ "inline-flex items-center justify-center gap-gp-xs shrink-0",
457
+ "font-semibold whitespace-nowrap select-none",
458
+ "transition-[background-color,color,border-color,box-shadow] duration-150",
459
+ "[&_svg]:shrink-0"
460
+ ],
461
+ variants: {
462
+ size: {
463
+ sm: "h-[24px] px-pad-md text-[11px] [&_svg]:size-[12px]",
464
+ md: "h-form-xs px-pad-lg text-[12px] [&_svg]:size-[12px]",
465
+ // 28px
466
+ lg: "h-form-sm px-pad-xl text-[13px] [&_svg]:size-[14px]",
467
+ // 32px
468
+ xl: "h-form-md px-pad-xl text-[13px] [&_svg]:size-[14px]"
469
+ // 36px (= Button md)
470
+ },
471
+ /**
472
+ * `pill` = rounded-full (default — chip pílula clássico).
473
+ * `rounded` = canto arredondado igual ao Button (radius-md em sm/md, radius-lg em lg/xl).
474
+ */
475
+ shape: {
476
+ pill: "rounded-radius-full",
477
+ rounded: ""
478
+ // aplica via compoundVariants por size
479
+ },
480
+ color: {
481
+ primary: "",
482
+ neutral: "",
483
+ danger: "",
484
+ warning: "",
485
+ success: "",
486
+ info: ""
487
+ },
488
+ variant: {
489
+ solid: "",
490
+ outline: "border",
491
+ soft: "",
492
+ "soft-outline": "border"
493
+ },
494
+ interactive: {
495
+ true: "cursor-pointer outline-none focus-visible:shadow-sh-ring",
496
+ false: ""
497
+ },
498
+ selected: {
499
+ true: "",
500
+ false: ""
501
+ }
502
+ },
503
+ compoundVariants: [
504
+ /* ── Shape rounded × size — radius proporcional ao Button ──── */
505
+ { shape: "rounded", size: "sm", class: "rounded-radius-md" },
506
+ { shape: "rounded", size: "md", class: "rounded-radius-md" },
507
+ { shape: "rounded", size: "lg", class: "rounded-radius-lg" },
508
+ { shape: "rounded", size: "xl", class: "rounded-radius-lg" },
509
+ /* ── Solid ──────────────────────────────────────────────────── */
510
+ { color: "primary", variant: "solid", class: "bg-bg-brand text-fg-on-brand" },
511
+ { color: "neutral", variant: "solid", class: "bg-bg-muted text-fg-default" },
512
+ { color: "danger", variant: "solid", class: "bg-bg-danger text-fg-on-danger" },
513
+ { color: "warning", variant: "solid", class: "bg-bg-warning text-fg-on-warning" },
514
+ { color: "success", variant: "solid", class: "bg-bg-success text-fg-on-success" },
515
+ { color: "info", variant: "solid", class: "bg-bg-info text-fg-on-info" },
516
+ /* ── Outline ────────────────────────────────────────────────── */
517
+ { color: "primary", variant: "outline", class: "bg-transparent border-border-brand text-fg-brand" },
518
+ { color: "neutral", variant: "outline", class: "bg-transparent border-border-default text-fg-default" },
519
+ { color: "danger", variant: "outline", class: "bg-transparent border-border-danger-muted text-fg-danger" },
520
+ { color: "warning", variant: "outline", class: "bg-transparent border-border-warning-muted text-fg-warning" },
521
+ { color: "success", variant: "outline", class: "bg-transparent border-border-success-muted text-fg-success" },
522
+ { color: "info", variant: "outline", class: "bg-transparent border-border-info-muted text-fg-info" },
523
+ /* ── Soft ───────────────────────────────────────────────────── */
524
+ { color: "primary", variant: "soft", class: "bg-bg-brand-subtle text-fg-brand" },
525
+ { color: "neutral", variant: "soft", class: "bg-bg-muted text-fg-muted" },
526
+ { color: "danger", variant: "soft", class: "bg-bg-danger-muted text-fg-danger" },
527
+ { color: "warning", variant: "soft", class: "bg-bg-warning-muted text-fg-warning" },
528
+ { color: "success", variant: "soft", class: "bg-bg-success-muted text-fg-success" },
529
+ { color: "info", variant: "soft", class: "bg-bg-info-muted text-fg-info" },
530
+ /* ── Soft + Outline (bg sutil + borda definida) ─────────────── */
531
+ { color: "primary", variant: "soft-outline", class: "bg-bg-brand-subtle border-border-brand text-fg-brand" },
532
+ { color: "neutral", variant: "soft-outline", class: "bg-bg-muted border-border-default text-fg-muted" },
533
+ { color: "danger", variant: "soft-outline", class: "bg-bg-danger-muted border-border-danger-muted text-fg-danger" },
534
+ { color: "warning", variant: "soft-outline", class: "bg-bg-warning-muted border-border-warning-muted text-fg-warning" },
535
+ { color: "success", variant: "soft-outline", class: "bg-bg-success-muted border-border-success-muted text-fg-success" },
536
+ { color: "info", variant: "soft-outline", class: "bg-bg-info-muted border-border-info-muted text-fg-info" },
537
+ /* ── Hover (somente quando interactive) ────────────────────── */
538
+ { interactive: true, color: "primary", variant: "solid", class: "hover:bg-bg-brand-hover" },
539
+ { interactive: true, color: "neutral", variant: "solid", class: "hover:bg-bg-muted-hover" },
540
+ { interactive: true, color: "danger", variant: "solid", class: "hover:bg-bg-danger-hover" },
541
+ { interactive: true, color: "warning", variant: "solid", class: "hover:bg-bg-warning-hover" },
542
+ { interactive: true, color: "success", variant: "solid", class: "hover:bg-bg-success-hover" },
543
+ { interactive: true, color: "info", variant: "solid", class: "hover:bg-bg-info-hover" },
544
+ { interactive: true, color: "primary", variant: "outline", class: "hover:bg-bg-brand-subtle" },
545
+ { interactive: true, color: "neutral", variant: "outline", class: "hover:bg-bg-muted" },
546
+ { interactive: true, color: "danger", variant: "outline", class: "hover:bg-bg-danger-muted" },
547
+ { interactive: true, color: "warning", variant: "outline", class: "hover:bg-bg-warning-muted" },
548
+ { interactive: true, color: "success", variant: "outline", class: "hover:bg-bg-success-muted" },
549
+ { interactive: true, color: "info", variant: "outline", class: "hover:bg-bg-info-muted" },
550
+ { interactive: true, color: "primary", variant: "soft", class: "hover:bg-bg-brand-subtle-hover" },
551
+ { interactive: true, color: "neutral", variant: "soft", class: "hover:bg-bg-muted-hover hover:text-fg-default" },
552
+ { interactive: true, color: "danger", variant: "soft", class: "hover:bg-bg-danger-muted-hover" },
553
+ { interactive: true, color: "warning", variant: "soft", class: "hover:bg-bg-warning-muted-hover" },
554
+ { interactive: true, color: "success", variant: "soft", class: "hover:bg-bg-success-muted-hover" },
555
+ { interactive: true, color: "info", variant: "soft", class: "hover:bg-bg-info-muted-hover" },
556
+ { interactive: true, color: "primary", variant: "soft-outline", class: "hover:bg-bg-brand-subtle-hover" },
557
+ { interactive: true, color: "neutral", variant: "soft-outline", class: "hover:bg-bg-muted-hover hover:text-fg-default" },
558
+ { interactive: true, color: "danger", variant: "soft-outline", class: "hover:bg-bg-danger-muted-hover" },
559
+ { interactive: true, color: "warning", variant: "soft-outline", class: "hover:bg-bg-warning-muted-hover" },
560
+ { interactive: true, color: "success", variant: "soft-outline", class: "hover:bg-bg-success-muted-hover" },
561
+ { interactive: true, color: "info", variant: "soft-outline", class: "hover:bg-bg-info-muted-hover" },
562
+ /* ── Selected (ChipGroup) — força "soft" da color como visual ativo ── */
563
+ { selected: true, color: "primary", class: "bg-bg-brand-subtle text-fg-brand border-transparent" },
564
+ { selected: true, color: "neutral", class: "bg-bg-accent text-fg-default font-semibold border-transparent shadow-sh-sm" },
565
+ { selected: true, color: "danger", class: "bg-bg-danger-muted text-fg-danger border-transparent" },
566
+ { selected: true, color: "warning", class: "bg-bg-warning-muted text-fg-warning border-transparent" },
567
+ { selected: true, color: "success", class: "bg-bg-success-muted text-fg-success border-transparent" },
568
+ { selected: true, color: "info", class: "bg-bg-info-muted text-fg-info border-transparent" }
569
+ ],
570
+ defaultVariants: {
571
+ color: "neutral",
572
+ variant: "soft",
573
+ size: "md",
574
+ shape: "pill",
575
+ interactive: false,
576
+ selected: false
577
+ }
578
+ });
579
+ const chipCount = tv({
580
+ base: [
581
+ "inline-flex items-center justify-center min-w-[16px] h-[16px] px-[4px]",
582
+ "rounded-radius-full text-[10px] font-semibold leading-none",
583
+ "bg-bg-muted text-fg-default"
584
+ ]
585
+ });
586
+ const Chip = forwardRef(function Chip2({
587
+ children,
588
+ color,
589
+ variant,
590
+ size,
591
+ shape,
592
+ selected,
593
+ onClick,
594
+ asButton,
595
+ className,
596
+ type,
597
+ ...rest
598
+ }, ref) {
599
+ const interactive = Boolean(onClick) || asButton === true;
600
+ const classes = cn(
601
+ chipVariants({ color, variant, size, shape, interactive, selected }),
602
+ className
603
+ );
604
+ if (interactive) {
605
+ return /* @__PURE__ */ jsx(
606
+ "button",
607
+ {
608
+ ref,
609
+ type: type ?? "button",
610
+ onClick,
611
+ className: classes,
612
+ "aria-pressed": selected,
613
+ ...rest,
614
+ children
615
+ }
616
+ );
617
+ }
618
+ return /* @__PURE__ */ jsx(
619
+ "span",
620
+ {
621
+ ref,
622
+ className: classes,
623
+ ...rest,
624
+ children
625
+ }
626
+ );
627
+ });
628
+ const SELECTED_CLASSES = {
629
+ primary: {
630
+ solid: "data-[state=on]:bg-bg-brand data-[state=on]:text-fg-on-brand data-[state=on]:border-transparent",
631
+ outline: "data-[state=on]:border-border-brand data-[state=on]:text-fg-brand data-[state=on]:bg-transparent",
632
+ soft: "data-[state=on]:bg-bg-brand-subtle data-[state=on]:text-fg-brand data-[state=on]:border-transparent",
633
+ "soft-outline": "data-[state=on]:bg-bg-brand-subtle data-[state=on]:border-border-brand data-[state=on]:text-fg-brand"
634
+ },
635
+ neutral: {
636
+ solid: "data-[state=on]:bg-bg-muted data-[state=on]:text-fg-default data-[state=on]:border-transparent",
637
+ outline: "data-[state=on]:border-border-default data-[state=on]:text-fg-default data-[state=on]:bg-transparent",
638
+ soft: "data-[state=on]:bg-bg-accent data-[state=on]:text-fg-default data-[state=on]:border-transparent data-[state=on]:shadow-sh-sm",
639
+ "soft-outline": "data-[state=on]:bg-bg-muted data-[state=on]:border-border-default data-[state=on]:text-fg-default"
640
+ },
641
+ danger: {
642
+ solid: "data-[state=on]:bg-bg-danger data-[state=on]:text-fg-on-danger data-[state=on]:border-transparent",
643
+ outline: "data-[state=on]:border-border-danger-muted data-[state=on]:text-fg-danger data-[state=on]:bg-transparent",
644
+ soft: "data-[state=on]:bg-bg-danger-muted data-[state=on]:text-fg-danger data-[state=on]:border-transparent",
645
+ "soft-outline": "data-[state=on]:bg-bg-danger-muted data-[state=on]:border-border-danger-muted data-[state=on]:text-fg-danger"
646
+ },
647
+ warning: {
648
+ solid: "data-[state=on]:bg-bg-warning data-[state=on]:text-fg-on-warning data-[state=on]:border-transparent",
649
+ outline: "data-[state=on]:border-border-warning-muted data-[state=on]:text-fg-warning data-[state=on]:bg-transparent",
650
+ soft: "data-[state=on]:bg-bg-warning-muted data-[state=on]:text-fg-warning data-[state=on]:border-transparent",
651
+ "soft-outline": "data-[state=on]:bg-bg-warning-muted data-[state=on]:border-border-warning-muted data-[state=on]:text-fg-warning"
652
+ },
653
+ success: {
654
+ solid: "data-[state=on]:bg-bg-success data-[state=on]:text-fg-on-success data-[state=on]:border-transparent",
655
+ outline: "data-[state=on]:border-border-success-muted data-[state=on]:text-fg-success data-[state=on]:bg-transparent",
656
+ soft: "data-[state=on]:bg-bg-success-muted data-[state=on]:text-fg-success data-[state=on]:border-transparent",
657
+ "soft-outline": "data-[state=on]:bg-bg-success-muted data-[state=on]:border-border-success-muted data-[state=on]:text-fg-success"
658
+ },
659
+ info: {
660
+ solid: "data-[state=on]:bg-bg-info data-[state=on]:text-fg-on-info data-[state=on]:border-transparent",
661
+ outline: "data-[state=on]:border-border-info-muted data-[state=on]:text-fg-info data-[state=on]:bg-transparent",
662
+ soft: "data-[state=on]:bg-bg-info-muted data-[state=on]:text-fg-info data-[state=on]:border-transparent",
663
+ "soft-outline": "data-[state=on]:bg-bg-info-muted data-[state=on]:border-border-info-muted data-[state=on]:text-fg-info"
664
+ }
665
+ };
666
+ const ChipGroup = forwardRef(
667
+ function ChipGroup2(props, ref) {
668
+ const {
669
+ inactiveColor = "neutral",
670
+ inactiveVariant = "outline",
671
+ activeColor = "primary",
672
+ activeVariant = "soft-outline",
673
+ size = "md",
674
+ shape = "pill",
675
+ orientation = "horizontal",
676
+ ariaLabel,
677
+ className,
678
+ children
679
+ } = props;
680
+ const contextValue = {
681
+ inactiveColor,
682
+ inactiveVariant,
683
+ activeColor,
684
+ activeVariant,
685
+ size,
686
+ shape
687
+ };
688
+ if (props.type === "single") {
689
+ return /* @__PURE__ */ jsx(ChipGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
690
+ ToggleGroupPrimitive.Root,
691
+ {
692
+ ref,
693
+ type: "single",
694
+ value: props.value,
695
+ defaultValue: props.defaultValue,
696
+ onValueChange: props.onValueChange,
697
+ orientation,
698
+ "aria-label": ariaLabel,
699
+ className: cn(
700
+ "inline-flex items-center gap-gp-sm",
701
+ orientation === "vertical" && "flex-col",
702
+ className
703
+ ),
704
+ children
705
+ }
706
+ ) });
707
+ }
708
+ return /* @__PURE__ */ jsx(ChipGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
709
+ ToggleGroupPrimitive.Root,
710
+ {
711
+ ref,
712
+ type: "multiple",
713
+ value: props.value,
714
+ defaultValue: props.defaultValue,
715
+ onValueChange: props.onValueChange,
716
+ orientation,
717
+ "aria-label": ariaLabel,
718
+ className: cn(
719
+ "inline-flex items-center gap-gp-sm",
720
+ orientation === "vertical" && "flex-col",
721
+ className
722
+ ),
723
+ children
724
+ }
725
+ ) });
726
+ }
727
+ );
728
+ const ChipGroupContext = createContext({
729
+ inactiveColor: "neutral",
730
+ inactiveVariant: "outline",
731
+ activeColor: "primary",
732
+ activeVariant: "soft-outline",
733
+ size: "md",
734
+ shape: "pill"
735
+ });
736
+ const ChipGroupItem = forwardRef(
737
+ function ChipGroupItem2({ className, children, ...rest }, ref) {
738
+ const {
739
+ inactiveColor,
740
+ inactiveVariant,
741
+ activeColor,
742
+ activeVariant,
743
+ size,
744
+ shape
745
+ } = useContext(ChipGroupContext);
746
+ return /* @__PURE__ */ jsx(
747
+ ToggleGroupPrimitive.Item,
748
+ {
749
+ ref,
750
+ className: cn(
751
+ // Estado OFF — visual inativo (passa pelo chipVariants normal)
752
+ chipVariants({
753
+ color: inactiveColor,
754
+ variant: inactiveVariant,
755
+ size,
756
+ shape,
757
+ interactive: true
758
+ }),
759
+ // Estado ON — override via data-state=on com classes do active*
760
+ SELECTED_CLASSES[activeColor][activeVariant],
761
+ className
762
+ ),
763
+ ...rest,
764
+ children
765
+ }
766
+ );
767
+ }
768
+ );
769
+ export {
770
+ Button as B,
771
+ Chip as C,
772
+ ChipGroup as a,
773
+ ChipGroupItem as b,
774
+ cn as c,
775
+ buttonVariants as d,
776
+ chipCount as e,
777
+ chipVariants as f,
778
+ tv as t
779
+ };
780
+ //# sourceMappingURL=chip-group-D3D0i72q.mjs.map