@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,796 @@
1
+ "use strict";
2
+ const jsxRuntime = require("react/jsx-runtime");
3
+ const React = require("react");
4
+ const ToggleGroupPrimitive = require("@radix-ui/react-toggle-group");
5
+ const clsx = require("clsx");
6
+ const tailwindMerge = require("tailwind-merge");
7
+ const tailwindVariants = require("tailwind-variants");
8
+ function _interopNamespaceDefault(e) {
9
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
10
+ if (e) {
11
+ for (const k in e) {
12
+ if (k !== "default") {
13
+ const d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: () => e[k]
17
+ });
18
+ }
19
+ }
20
+ }
21
+ n.default = e;
22
+ return Object.freeze(n);
23
+ }
24
+ const ToggleGroupPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(ToggleGroupPrimitive);
25
+ const isDsPad = (v) => /^(pad|sp)-/.test(v);
26
+ const isDsGap = (v) => /^gp-/.test(v);
27
+ const isDsRadius = (v) => /^radius-/.test(v);
28
+ const isDsShadow = (v) => /^sh-/.test(v);
29
+ const isDsForm = (v) => /^form-/.test(v);
30
+ const twMerge = tailwindMerge.extendTailwindMerge({
31
+ extend: {
32
+ classGroups: {
33
+ "font-size": [
34
+ {
35
+ text: [
36
+ // Displays
37
+ "display-2xl",
38
+ "display-xl",
39
+ "display-lg",
40
+ "display-md",
41
+ // Headings
42
+ "heading-xl",
43
+ "heading-lg",
44
+ "heading-md",
45
+ "heading-sm",
46
+ "heading-xs",
47
+ "heading-2xs",
48
+ // Titles
49
+ "title-lg",
50
+ "title-md",
51
+ "title-sm",
52
+ // Labels
53
+ "label-xl",
54
+ "label-lg",
55
+ "label-md",
56
+ "label-sm",
57
+ "label-xs",
58
+ // Paragraphs
59
+ "paragraph-xl",
60
+ "paragraph-lg",
61
+ "paragraph-md",
62
+ "paragraph-sm",
63
+ "paragraph-xs",
64
+ // Body
65
+ "body-lg",
66
+ "body-md",
67
+ "body-sm",
68
+ "body-lg-medium",
69
+ "body-md-medium",
70
+ "body-sm-medium",
71
+ // Captions
72
+ "caption-md",
73
+ "caption-sm",
74
+ // Subheadings
75
+ "subheading-md",
76
+ "subheading-sm",
77
+ "subheading-xs",
78
+ "subheading-2xs",
79
+ // Overlines
80
+ "overline-md",
81
+ "overline-sm",
82
+ // Code
83
+ "code-md",
84
+ "code-sm"
85
+ ]
86
+ }
87
+ ],
88
+ /* ── Padding ──────────────────────────────────────────────────────── */
89
+ p: [{ p: [isDsPad] }],
90
+ px: [{ px: [isDsPad] }],
91
+ py: [{ py: [isDsPad] }],
92
+ pt: [{ pt: [isDsPad] }],
93
+ pr: [{ pr: [isDsPad] }],
94
+ pb: [{ pb: [isDsPad] }],
95
+ pl: [{ pl: [isDsPad] }],
96
+ ps: [{ ps: [isDsPad] }],
97
+ pe: [{ pe: [isDsPad] }],
98
+ /* ── Margin (usa mesmo sp-*) ──────────────────────────────────────── */
99
+ m: [{ m: [isDsPad] }],
100
+ mx: [{ mx: [isDsPad] }],
101
+ my: [{ my: [isDsPad] }],
102
+ mt: [{ mt: [isDsPad] }],
103
+ mr: [{ mr: [isDsPad] }],
104
+ mb: [{ mb: [isDsPad] }],
105
+ ml: [{ ml: [isDsPad] }],
106
+ ms: [{ ms: [isDsPad] }],
107
+ me: [{ me: [isDsPad] }],
108
+ /* ── Inset / position (top/right/bottom/left) ─────────────────────── */
109
+ inset: [{ inset: [isDsPad] }],
110
+ "inset-x": [{ "inset-x": [isDsPad] }],
111
+ "inset-y": [{ "inset-y": [isDsPad] }],
112
+ "top": [{ top: [isDsPad] }],
113
+ "right": [{ right: [isDsPad] }],
114
+ "bottom": [{ bottom: [isDsPad] }],
115
+ "left": [{ left: [isDsPad] }],
116
+ "start": [{ start: [isDsPad] }],
117
+ "end": [{ end: [isDsPad] }],
118
+ /* ── Gap ──────────────────────────────────────────────────────────── */
119
+ gap: [{ gap: [isDsGap] }],
120
+ "gap-x": [{ "gap-x": [isDsGap] }],
121
+ "gap-y": [{ "gap-y": [isDsGap] }],
122
+ /* ── Rounded (todas as cantos) ────────────────────────────────────── */
123
+ rounded: [{ rounded: [isDsRadius] }],
124
+ "rounded-s": [{ "rounded-s": [isDsRadius] }],
125
+ "rounded-e": [{ "rounded-e": [isDsRadius] }],
126
+ "rounded-t": [{ "rounded-t": [isDsRadius] }],
127
+ "rounded-r": [{ "rounded-r": [isDsRadius] }],
128
+ "rounded-b": [{ "rounded-b": [isDsRadius] }],
129
+ "rounded-l": [{ "rounded-l": [isDsRadius] }],
130
+ "rounded-ss": [{ "rounded-ss": [isDsRadius] }],
131
+ "rounded-se": [{ "rounded-se": [isDsRadius] }],
132
+ "rounded-ee": [{ "rounded-ee": [isDsRadius] }],
133
+ "rounded-es": [{ "rounded-es": [isDsRadius] }],
134
+ "rounded-tl": [{ "rounded-tl": [isDsRadius] }],
135
+ "rounded-tr": [{ "rounded-tr": [isDsRadius] }],
136
+ "rounded-br": [{ "rounded-br": [isDsRadius] }],
137
+ "rounded-bl": [{ "rounded-bl": [isDsRadius] }],
138
+ /* ── Shadow ───────────────────────────────────────────────────────── */
139
+ shadow: [{ shadow: [isDsShadow] }],
140
+ /* ── Form sizes (min-h, h, w, size) ───────────────────────────────── */
141
+ "min-h": [{ "min-h": [isDsForm] }],
142
+ h: [{ h: [isDsForm] }],
143
+ w: [{ w: [isDsForm] }],
144
+ size: [{ size: [isDsForm] }]
145
+ }
146
+ }
147
+ });
148
+ function cn(...inputs) {
149
+ return twMerge(clsx.clsx(inputs));
150
+ }
151
+ const twMergeConfig = {
152
+ extend: {
153
+ classGroups: {
154
+ "font-size": [
155
+ {
156
+ text: [
157
+ // Displays
158
+ "display-2xl",
159
+ "display-xl",
160
+ "display-lg",
161
+ "display-md",
162
+ // Headings (heading-2xs removido — duplicata de title-lg)
163
+ "heading-xl",
164
+ "heading-lg",
165
+ "heading-md",
166
+ "heading-sm",
167
+ "heading-xs",
168
+ // Titles
169
+ "title-lg",
170
+ "title-md",
171
+ "title-sm",
172
+ // Labels (+ label-base 13px e label-2xs 11px)
173
+ "label-xl",
174
+ "label-lg",
175
+ "label-md",
176
+ "label-sm",
177
+ "label-base",
178
+ "label-xs",
179
+ "label-2xs",
180
+ // Paragraphs (+ paragraph-base 13px)
181
+ "paragraph-xl",
182
+ "paragraph-lg",
183
+ "paragraph-md",
184
+ "paragraph-sm",
185
+ "paragraph-base",
186
+ "paragraph-xs",
187
+ // Captions (+ caption-xs 10px)
188
+ "caption-md",
189
+ "caption-sm",
190
+ "caption-xs",
191
+ // Subheadings (+ strong-md/sm com weight 700 + tracking apertado)
192
+ "subheading-md",
193
+ "subheading-sm",
194
+ "subheading-xs",
195
+ "subheading-2xs",
196
+ "subheading-strong-md",
197
+ "subheading-strong-sm",
198
+ // Code
199
+ "code-md",
200
+ "code-sm"
201
+ ]
202
+ }
203
+ ]
204
+ }
205
+ }
206
+ };
207
+ const tv = (options, config) => tailwindVariants.tv(options, {
208
+ ...config,
209
+ twMergeConfig
210
+ });
211
+ const buttonVariants = tv({
212
+ base: [
213
+ "inline-flex items-center justify-center",
214
+ "select-none whitespace-nowrap",
215
+ "focus-visible:outline-none",
216
+ "border border-transparent",
217
+ "text-[13px] font-semibold leading-none",
218
+ // 13px / 600 — alinhado com sandbox btn
219
+ "[&_svg]:shrink-0",
220
+ // SVG não diminui; tamanho controlado por size
221
+ "transition-all duration-200 ease-out",
222
+ "cursor-pointer",
223
+ "focus-visible:ring-4"
224
+ ],
225
+ variants: {
226
+ color: {
227
+ primary: "focus-visible:ring-ring-brand",
228
+ secondary: "focus-visible:ring-ring-secondary",
229
+ critical: "focus-visible:ring-ring-danger",
230
+ success: "focus-visible:ring-ring-success",
231
+ warning: "focus-visible:ring-ring-warning"
232
+ },
233
+ variant: {
234
+ filled: "",
235
+ outline: "",
236
+ soft: "",
237
+ ghost: "bg-transparent"
238
+ },
239
+ size: {
240
+ // h28 / pad 10 / gap 6 / radius 8 / icon 12
241
+ "2xs": "min-h-form-xs px-pad-lg gap-gp-sm rounded-radius-md [&_svg]:size-[12px]",
242
+ // h32 / pad 12 / gap 6 / radius 8 / icon 14
243
+ xs: "min-h-form-sm px-pad-xl gap-gp-sm rounded-radius-md [&_svg]:size-[14px]",
244
+ // h36 / pad 12 / gap 6 / radius 10 / icon 14
245
+ sm: "min-h-form-md px-pad-xl gap-gp-sm rounded-radius-lg [&_svg]:size-[14px]",
246
+ // h40 / pad 16 / gap 6 / radius 10 / icon 14 (alinhado com sandbox Exportar)
247
+ md: "min-h-form-lg px-pad-2xl gap-gp-sm rounded-radius-lg [&_svg]:size-[14px]",
248
+ // h44 / pad 16 / gap 8 / radius 10 / icon 16
249
+ lg: "min-h-form-xl px-pad-2xl gap-gp-md rounded-radius-lg [&_svg]:size-[16px]",
250
+ // Icon buttons — width = height (square). Regra: SVG +2px vs versão com label
251
+ // (precisa preencher mais o quadrado sem o texto carregando peso visual).
252
+ "icon-2xs": "size-form-xs rounded-radius-md p-0 [&_svg]:size-[14px]",
253
+ // 28×28 / +2 (12→14)
254
+ "icon-xs": "size-form-sm rounded-radius-md p-0 [&_svg]:size-[16px]",
255
+ // 32×32 / +2 (14→16)
256
+ "icon-sm": "size-form-md rounded-radius-lg p-0 [&_svg]:size-[16px]",
257
+ // 36×36 / +2 (14→16)
258
+ "icon-md": "size-form-lg rounded-radius-lg p-0 [&_svg]:size-[16px]",
259
+ // 40×40 / +2 (14→16)
260
+ "icon-lg": "size-form-xl rounded-radius-lg p-0 [&_svg]:size-[18px]"
261
+ // 44×44 / +2 (16→18)
262
+ },
263
+ fullWidth: {
264
+ true: "w-full flex-1"
265
+ },
266
+ /**
267
+ * Shape do botão:
268
+ * - rounded (default): mantém o radius da `size` (varia por tamanho)
269
+ * - pill: força `rounded-full` (override com `!` pra ganhar do size)
270
+ */
271
+ shape: {
272
+ rounded: "",
273
+ pill: "!rounded-full"
274
+ },
275
+ disabled: {
276
+ true: "pointer-events-none opacity-50"
277
+ }
278
+ },
279
+ compoundVariants: [
280
+ // ── Primary (brand) ─────────────────────────────────────────────
281
+ {
282
+ color: "primary",
283
+ variant: "filled",
284
+ class: "bg-bg-brand text-fg-on-brand hover:bg-bg-brand-hover"
285
+ },
286
+ {
287
+ color: "primary",
288
+ variant: "outline",
289
+ 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"
290
+ },
291
+ {
292
+ color: "primary",
293
+ variant: "soft",
294
+ class: "bg-bg-brand-subtle text-fg-brand hover:bg-bg-brand-subtle-hover"
295
+ },
296
+ {
297
+ color: "primary",
298
+ variant: "ghost",
299
+ class: "text-fg-brand hover:bg-bg-brand-subtle"
300
+ },
301
+ // ── Secondary (neutro) ──────────────────────────────────────────
302
+ {
303
+ color: "secondary",
304
+ variant: "filled",
305
+ class: "bg-bg-muted text-fg-muted hover:bg-bg-muted-hover hover:text-fg-default"
306
+ },
307
+ {
308
+ // Outline alinhado com `.btn.tbl-tool-btn` do design-and-table-v2:
309
+ // light = bg-surface + border-subtle + fg-default + shadow-sm (mantém no hover)
310
+ // dark = bg-muted + border-input + fg-muted + sem shadow
311
+ color: "secondary",
312
+ variant: "outline",
313
+ class: [
314
+ "bg-bg-surface border-border-subtle text-fg-default shadow-sh-sm",
315
+ "dark:bg-bg-muted dark:border-border-input dark:text-fg-muted dark:shadow-sh-none",
316
+ "hover:bg-bg-muted-hover hover:text-fg-default",
317
+ "dark:hover:bg-bg-muted-hover dark:hover:text-fg-default"
318
+ ].join(" ")
319
+ },
320
+ {
321
+ color: "secondary",
322
+ variant: "soft",
323
+ class: "bg-bg-muted text-fg-muted hover:bg-bg-muted-hover hover:text-fg-default"
324
+ },
325
+ {
326
+ color: "secondary",
327
+ variant: "ghost",
328
+ class: "text-fg-muted hover:bg-bg-muted hover:text-fg-default"
329
+ },
330
+ // ── Critical (danger) ───────────────────────────────────────────
331
+ {
332
+ color: "critical",
333
+ variant: "filled",
334
+ class: "bg-bg-danger text-fg-on-danger hover:bg-bg-danger-hover"
335
+ },
336
+ {
337
+ color: "critical",
338
+ variant: "outline",
339
+ class: "bg-bg-surface border-border-danger-muted text-fg-danger shadow-sh-sm hover:bg-bg-danger-muted hover:shadow-sh-none"
340
+ },
341
+ {
342
+ color: "critical",
343
+ variant: "soft",
344
+ class: "bg-bg-danger-muted text-fg-danger hover:bg-bg-danger-muted-hover"
345
+ },
346
+ {
347
+ color: "critical",
348
+ variant: "ghost",
349
+ class: "text-fg-danger hover:bg-bg-danger-muted"
350
+ },
351
+ // ── Success ─────────────────────────────────────────────────────
352
+ {
353
+ color: "success",
354
+ variant: "filled",
355
+ class: "bg-bg-success text-fg-on-success hover:bg-bg-success-hover"
356
+ },
357
+ {
358
+ color: "success",
359
+ variant: "outline",
360
+ class: "bg-bg-surface border-border-success-muted text-fg-success shadow-sh-sm hover:bg-bg-success-muted hover:shadow-sh-none"
361
+ },
362
+ {
363
+ color: "success",
364
+ variant: "soft",
365
+ class: "bg-bg-success-muted text-fg-success hover:bg-bg-success-muted-hover"
366
+ },
367
+ {
368
+ color: "success",
369
+ variant: "ghost",
370
+ class: "text-fg-success hover:bg-bg-success-muted"
371
+ },
372
+ // ── Warning ─────────────────────────────────────────────────────
373
+ {
374
+ color: "warning",
375
+ variant: "filled",
376
+ class: "bg-bg-warning text-fg-on-warning hover:bg-bg-warning-hover"
377
+ },
378
+ {
379
+ color: "warning",
380
+ variant: "outline",
381
+ class: "bg-bg-surface border-border-warning-muted text-fg-warning shadow-sh-sm hover:bg-bg-warning-muted hover:shadow-sh-none"
382
+ },
383
+ {
384
+ color: "warning",
385
+ variant: "soft",
386
+ class: "bg-bg-warning-muted text-fg-warning hover:bg-bg-warning-muted-hover"
387
+ },
388
+ {
389
+ color: "warning",
390
+ variant: "ghost",
391
+ class: "text-fg-warning hover:bg-bg-warning-muted"
392
+ },
393
+ // ── Disabled — SEMPRE por último ────────────────────────────────
394
+ { disabled: true, class: "pointer-events-none opacity-50" }
395
+ ],
396
+ defaultVariants: {
397
+ color: "primary",
398
+ variant: "filled",
399
+ size: "md",
400
+ shape: "rounded"
401
+ }
402
+ });
403
+ const Button = React.forwardRef(
404
+ function Button2({
405
+ color,
406
+ variant,
407
+ size,
408
+ shape,
409
+ fullWidth,
410
+ loading = false,
411
+ disabled = false,
412
+ iconLeft,
413
+ iconRight,
414
+ children,
415
+ className,
416
+ type = "button",
417
+ ...rest
418
+ }, ref) {
419
+ const isDisabled = disabled || loading;
420
+ return /* @__PURE__ */ jsxRuntime.jsxs(
421
+ "button",
422
+ {
423
+ ref,
424
+ type,
425
+ disabled: isDisabled,
426
+ className: buttonVariants({
427
+ color,
428
+ variant,
429
+ size,
430
+ shape,
431
+ fullWidth,
432
+ disabled: isDisabled,
433
+ className
434
+ }),
435
+ ...rest,
436
+ children: [
437
+ loading && /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}),
438
+ !loading && iconLeft,
439
+ children,
440
+ !loading && iconRight
441
+ ]
442
+ }
443
+ );
444
+ }
445
+ );
446
+ function Spinner() {
447
+ return /* @__PURE__ */ jsxRuntime.jsx(
448
+ "svg",
449
+ {
450
+ width: "16",
451
+ height: "16",
452
+ viewBox: "0 0 16 16",
453
+ fill: "none",
454
+ className: "animate-spin",
455
+ children: /* @__PURE__ */ jsxRuntime.jsx(
456
+ "circle",
457
+ {
458
+ cx: "8",
459
+ cy: "8",
460
+ r: "6",
461
+ stroke: "currentColor",
462
+ strokeWidth: "2",
463
+ strokeLinecap: "round",
464
+ strokeDasharray: "28",
465
+ strokeDashoffset: "8",
466
+ className: "opacity-70"
467
+ }
468
+ )
469
+ }
470
+ );
471
+ }
472
+ const chipVariants = tv({
473
+ base: [
474
+ "inline-flex items-center justify-center gap-gp-xs shrink-0",
475
+ "font-semibold whitespace-nowrap select-none",
476
+ "transition-[background-color,color,border-color,box-shadow] duration-150",
477
+ "[&_svg]:shrink-0"
478
+ ],
479
+ variants: {
480
+ size: {
481
+ sm: "h-[24px] px-pad-md text-[11px] [&_svg]:size-[12px]",
482
+ md: "h-form-xs px-pad-lg text-[12px] [&_svg]:size-[12px]",
483
+ // 28px
484
+ lg: "h-form-sm px-pad-xl text-[13px] [&_svg]:size-[14px]",
485
+ // 32px
486
+ xl: "h-form-md px-pad-xl text-[13px] [&_svg]:size-[14px]"
487
+ // 36px (= Button md)
488
+ },
489
+ /**
490
+ * `pill` = rounded-full (default — chip pílula clássico).
491
+ * `rounded` = canto arredondado igual ao Button (radius-md em sm/md, radius-lg em lg/xl).
492
+ */
493
+ shape: {
494
+ pill: "rounded-radius-full",
495
+ rounded: ""
496
+ // aplica via compoundVariants por size
497
+ },
498
+ color: {
499
+ primary: "",
500
+ neutral: "",
501
+ danger: "",
502
+ warning: "",
503
+ success: "",
504
+ info: ""
505
+ },
506
+ variant: {
507
+ solid: "",
508
+ outline: "border",
509
+ soft: "",
510
+ "soft-outline": "border"
511
+ },
512
+ interactive: {
513
+ true: "cursor-pointer outline-none focus-visible:shadow-sh-ring",
514
+ false: ""
515
+ },
516
+ selected: {
517
+ true: "",
518
+ false: ""
519
+ }
520
+ },
521
+ compoundVariants: [
522
+ /* ── Shape rounded × size — radius proporcional ao Button ──── */
523
+ { shape: "rounded", size: "sm", class: "rounded-radius-md" },
524
+ { shape: "rounded", size: "md", class: "rounded-radius-md" },
525
+ { shape: "rounded", size: "lg", class: "rounded-radius-lg" },
526
+ { shape: "rounded", size: "xl", class: "rounded-radius-lg" },
527
+ /* ── Solid ──────────────────────────────────────────────────── */
528
+ { color: "primary", variant: "solid", class: "bg-bg-brand text-fg-on-brand" },
529
+ { color: "neutral", variant: "solid", class: "bg-bg-muted text-fg-default" },
530
+ { color: "danger", variant: "solid", class: "bg-bg-danger text-fg-on-danger" },
531
+ { color: "warning", variant: "solid", class: "bg-bg-warning text-fg-on-warning" },
532
+ { color: "success", variant: "solid", class: "bg-bg-success text-fg-on-success" },
533
+ { color: "info", variant: "solid", class: "bg-bg-info text-fg-on-info" },
534
+ /* ── Outline ────────────────────────────────────────────────── */
535
+ { color: "primary", variant: "outline", class: "bg-transparent border-border-brand text-fg-brand" },
536
+ { color: "neutral", variant: "outline", class: "bg-transparent border-border-default text-fg-default" },
537
+ { color: "danger", variant: "outline", class: "bg-transparent border-border-danger-muted text-fg-danger" },
538
+ { color: "warning", variant: "outline", class: "bg-transparent border-border-warning-muted text-fg-warning" },
539
+ { color: "success", variant: "outline", class: "bg-transparent border-border-success-muted text-fg-success" },
540
+ { color: "info", variant: "outline", class: "bg-transparent border-border-info-muted text-fg-info" },
541
+ /* ── Soft ───────────────────────────────────────────────────── */
542
+ { color: "primary", variant: "soft", class: "bg-bg-brand-subtle text-fg-brand" },
543
+ { color: "neutral", variant: "soft", class: "bg-bg-muted text-fg-muted" },
544
+ { color: "danger", variant: "soft", class: "bg-bg-danger-muted text-fg-danger" },
545
+ { color: "warning", variant: "soft", class: "bg-bg-warning-muted text-fg-warning" },
546
+ { color: "success", variant: "soft", class: "bg-bg-success-muted text-fg-success" },
547
+ { color: "info", variant: "soft", class: "bg-bg-info-muted text-fg-info" },
548
+ /* ── Soft + Outline (bg sutil + borda definida) ─────────────── */
549
+ { color: "primary", variant: "soft-outline", class: "bg-bg-brand-subtle border-border-brand text-fg-brand" },
550
+ { color: "neutral", variant: "soft-outline", class: "bg-bg-muted border-border-default text-fg-muted" },
551
+ { color: "danger", variant: "soft-outline", class: "bg-bg-danger-muted border-border-danger-muted text-fg-danger" },
552
+ { color: "warning", variant: "soft-outline", class: "bg-bg-warning-muted border-border-warning-muted text-fg-warning" },
553
+ { color: "success", variant: "soft-outline", class: "bg-bg-success-muted border-border-success-muted text-fg-success" },
554
+ { color: "info", variant: "soft-outline", class: "bg-bg-info-muted border-border-info-muted text-fg-info" },
555
+ /* ── Hover (somente quando interactive) ────────────────────── */
556
+ { interactive: true, color: "primary", variant: "solid", class: "hover:bg-bg-brand-hover" },
557
+ { interactive: true, color: "neutral", variant: "solid", class: "hover:bg-bg-muted-hover" },
558
+ { interactive: true, color: "danger", variant: "solid", class: "hover:bg-bg-danger-hover" },
559
+ { interactive: true, color: "warning", variant: "solid", class: "hover:bg-bg-warning-hover" },
560
+ { interactive: true, color: "success", variant: "solid", class: "hover:bg-bg-success-hover" },
561
+ { interactive: true, color: "info", variant: "solid", class: "hover:bg-bg-info-hover" },
562
+ { interactive: true, color: "primary", variant: "outline", class: "hover:bg-bg-brand-subtle" },
563
+ { interactive: true, color: "neutral", variant: "outline", class: "hover:bg-bg-muted" },
564
+ { interactive: true, color: "danger", variant: "outline", class: "hover:bg-bg-danger-muted" },
565
+ { interactive: true, color: "warning", variant: "outline", class: "hover:bg-bg-warning-muted" },
566
+ { interactive: true, color: "success", variant: "outline", class: "hover:bg-bg-success-muted" },
567
+ { interactive: true, color: "info", variant: "outline", class: "hover:bg-bg-info-muted" },
568
+ { interactive: true, color: "primary", variant: "soft", class: "hover:bg-bg-brand-subtle-hover" },
569
+ { interactive: true, color: "neutral", variant: "soft", class: "hover:bg-bg-muted-hover hover:text-fg-default" },
570
+ { interactive: true, color: "danger", variant: "soft", class: "hover:bg-bg-danger-muted-hover" },
571
+ { interactive: true, color: "warning", variant: "soft", class: "hover:bg-bg-warning-muted-hover" },
572
+ { interactive: true, color: "success", variant: "soft", class: "hover:bg-bg-success-muted-hover" },
573
+ { interactive: true, color: "info", variant: "soft", class: "hover:bg-bg-info-muted-hover" },
574
+ { interactive: true, color: "primary", variant: "soft-outline", class: "hover:bg-bg-brand-subtle-hover" },
575
+ { interactive: true, color: "neutral", variant: "soft-outline", class: "hover:bg-bg-muted-hover hover:text-fg-default" },
576
+ { interactive: true, color: "danger", variant: "soft-outline", class: "hover:bg-bg-danger-muted-hover" },
577
+ { interactive: true, color: "warning", variant: "soft-outline", class: "hover:bg-bg-warning-muted-hover" },
578
+ { interactive: true, color: "success", variant: "soft-outline", class: "hover:bg-bg-success-muted-hover" },
579
+ { interactive: true, color: "info", variant: "soft-outline", class: "hover:bg-bg-info-muted-hover" },
580
+ /* ── Selected (ChipGroup) — força "soft" da color como visual ativo ── */
581
+ { selected: true, color: "primary", class: "bg-bg-brand-subtle text-fg-brand border-transparent" },
582
+ { selected: true, color: "neutral", class: "bg-bg-accent text-fg-default font-semibold border-transparent shadow-sh-sm" },
583
+ { selected: true, color: "danger", class: "bg-bg-danger-muted text-fg-danger border-transparent" },
584
+ { selected: true, color: "warning", class: "bg-bg-warning-muted text-fg-warning border-transparent" },
585
+ { selected: true, color: "success", class: "bg-bg-success-muted text-fg-success border-transparent" },
586
+ { selected: true, color: "info", class: "bg-bg-info-muted text-fg-info border-transparent" }
587
+ ],
588
+ defaultVariants: {
589
+ color: "neutral",
590
+ variant: "soft",
591
+ size: "md",
592
+ shape: "pill",
593
+ interactive: false,
594
+ selected: false
595
+ }
596
+ });
597
+ const chipCount = tv({
598
+ base: [
599
+ "inline-flex items-center justify-center min-w-[16px] h-[16px] px-[4px]",
600
+ "rounded-radius-full text-[10px] font-semibold leading-none",
601
+ "bg-bg-muted text-fg-default"
602
+ ]
603
+ });
604
+ const Chip = React.forwardRef(function Chip2({
605
+ children,
606
+ color,
607
+ variant,
608
+ size,
609
+ shape,
610
+ selected,
611
+ onClick,
612
+ asButton,
613
+ className,
614
+ type,
615
+ ...rest
616
+ }, ref) {
617
+ const interactive = Boolean(onClick) || asButton === true;
618
+ const classes = cn(
619
+ chipVariants({ color, variant, size, shape, interactive, selected }),
620
+ className
621
+ );
622
+ if (interactive) {
623
+ return /* @__PURE__ */ jsxRuntime.jsx(
624
+ "button",
625
+ {
626
+ ref,
627
+ type: type ?? "button",
628
+ onClick,
629
+ className: classes,
630
+ "aria-pressed": selected,
631
+ ...rest,
632
+ children
633
+ }
634
+ );
635
+ }
636
+ return /* @__PURE__ */ jsxRuntime.jsx(
637
+ "span",
638
+ {
639
+ ref,
640
+ className: classes,
641
+ ...rest,
642
+ children
643
+ }
644
+ );
645
+ });
646
+ const SELECTED_CLASSES = {
647
+ primary: {
648
+ solid: "data-[state=on]:bg-bg-brand data-[state=on]:text-fg-on-brand data-[state=on]:border-transparent",
649
+ outline: "data-[state=on]:border-border-brand data-[state=on]:text-fg-brand data-[state=on]:bg-transparent",
650
+ soft: "data-[state=on]:bg-bg-brand-subtle data-[state=on]:text-fg-brand data-[state=on]:border-transparent",
651
+ "soft-outline": "data-[state=on]:bg-bg-brand-subtle data-[state=on]:border-border-brand data-[state=on]:text-fg-brand"
652
+ },
653
+ neutral: {
654
+ solid: "data-[state=on]:bg-bg-muted data-[state=on]:text-fg-default data-[state=on]:border-transparent",
655
+ outline: "data-[state=on]:border-border-default data-[state=on]:text-fg-default data-[state=on]:bg-transparent",
656
+ soft: "data-[state=on]:bg-bg-accent data-[state=on]:text-fg-default data-[state=on]:border-transparent data-[state=on]:shadow-sh-sm",
657
+ "soft-outline": "data-[state=on]:bg-bg-muted data-[state=on]:border-border-default data-[state=on]:text-fg-default"
658
+ },
659
+ danger: {
660
+ solid: "data-[state=on]:bg-bg-danger data-[state=on]:text-fg-on-danger data-[state=on]:border-transparent",
661
+ outline: "data-[state=on]:border-border-danger-muted data-[state=on]:text-fg-danger data-[state=on]:bg-transparent",
662
+ soft: "data-[state=on]:bg-bg-danger-muted data-[state=on]:text-fg-danger data-[state=on]:border-transparent",
663
+ "soft-outline": "data-[state=on]:bg-bg-danger-muted data-[state=on]:border-border-danger-muted data-[state=on]:text-fg-danger"
664
+ },
665
+ warning: {
666
+ solid: "data-[state=on]:bg-bg-warning data-[state=on]:text-fg-on-warning data-[state=on]:border-transparent",
667
+ outline: "data-[state=on]:border-border-warning-muted data-[state=on]:text-fg-warning data-[state=on]:bg-transparent",
668
+ soft: "data-[state=on]:bg-bg-warning-muted data-[state=on]:text-fg-warning data-[state=on]:border-transparent",
669
+ "soft-outline": "data-[state=on]:bg-bg-warning-muted data-[state=on]:border-border-warning-muted data-[state=on]:text-fg-warning"
670
+ },
671
+ success: {
672
+ solid: "data-[state=on]:bg-bg-success data-[state=on]:text-fg-on-success data-[state=on]:border-transparent",
673
+ outline: "data-[state=on]:border-border-success-muted data-[state=on]:text-fg-success data-[state=on]:bg-transparent",
674
+ soft: "data-[state=on]:bg-bg-success-muted data-[state=on]:text-fg-success data-[state=on]:border-transparent",
675
+ "soft-outline": "data-[state=on]:bg-bg-success-muted data-[state=on]:border-border-success-muted data-[state=on]:text-fg-success"
676
+ },
677
+ info: {
678
+ solid: "data-[state=on]:bg-bg-info data-[state=on]:text-fg-on-info data-[state=on]:border-transparent",
679
+ outline: "data-[state=on]:border-border-info-muted data-[state=on]:text-fg-info data-[state=on]:bg-transparent",
680
+ soft: "data-[state=on]:bg-bg-info-muted data-[state=on]:text-fg-info data-[state=on]:border-transparent",
681
+ "soft-outline": "data-[state=on]:bg-bg-info-muted data-[state=on]:border-border-info-muted data-[state=on]:text-fg-info"
682
+ }
683
+ };
684
+ const ChipGroup = React.forwardRef(
685
+ function ChipGroup2(props, ref) {
686
+ const {
687
+ inactiveColor = "neutral",
688
+ inactiveVariant = "outline",
689
+ activeColor = "primary",
690
+ activeVariant = "soft-outline",
691
+ size = "md",
692
+ shape = "pill",
693
+ orientation = "horizontal",
694
+ ariaLabel,
695
+ className,
696
+ children
697
+ } = props;
698
+ const contextValue = {
699
+ inactiveColor,
700
+ inactiveVariant,
701
+ activeColor,
702
+ activeVariant,
703
+ size,
704
+ shape
705
+ };
706
+ if (props.type === "single") {
707
+ return /* @__PURE__ */ jsxRuntime.jsx(ChipGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
708
+ ToggleGroupPrimitive__namespace.Root,
709
+ {
710
+ ref,
711
+ type: "single",
712
+ value: props.value,
713
+ defaultValue: props.defaultValue,
714
+ onValueChange: props.onValueChange,
715
+ orientation,
716
+ "aria-label": ariaLabel,
717
+ className: cn(
718
+ "inline-flex items-center gap-gp-sm",
719
+ orientation === "vertical" && "flex-col",
720
+ className
721
+ ),
722
+ children
723
+ }
724
+ ) });
725
+ }
726
+ return /* @__PURE__ */ jsxRuntime.jsx(ChipGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
727
+ ToggleGroupPrimitive__namespace.Root,
728
+ {
729
+ ref,
730
+ type: "multiple",
731
+ value: props.value,
732
+ defaultValue: props.defaultValue,
733
+ onValueChange: props.onValueChange,
734
+ orientation,
735
+ "aria-label": ariaLabel,
736
+ className: cn(
737
+ "inline-flex items-center gap-gp-sm",
738
+ orientation === "vertical" && "flex-col",
739
+ className
740
+ ),
741
+ children
742
+ }
743
+ ) });
744
+ }
745
+ );
746
+ const ChipGroupContext = React.createContext({
747
+ inactiveColor: "neutral",
748
+ inactiveVariant: "outline",
749
+ activeColor: "primary",
750
+ activeVariant: "soft-outline",
751
+ size: "md",
752
+ shape: "pill"
753
+ });
754
+ const ChipGroupItem = React.forwardRef(
755
+ function ChipGroupItem2({ className, children, ...rest }, ref) {
756
+ const {
757
+ inactiveColor,
758
+ inactiveVariant,
759
+ activeColor,
760
+ activeVariant,
761
+ size,
762
+ shape
763
+ } = React.useContext(ChipGroupContext);
764
+ return /* @__PURE__ */ jsxRuntime.jsx(
765
+ ToggleGroupPrimitive__namespace.Item,
766
+ {
767
+ ref,
768
+ className: cn(
769
+ // Estado OFF — visual inativo (passa pelo chipVariants normal)
770
+ chipVariants({
771
+ color: inactiveColor,
772
+ variant: inactiveVariant,
773
+ size,
774
+ shape,
775
+ interactive: true
776
+ }),
777
+ // Estado ON — override via data-state=on com classes do active*
778
+ SELECTED_CLASSES[activeColor][activeVariant],
779
+ className
780
+ ),
781
+ ...rest,
782
+ children
783
+ }
784
+ );
785
+ }
786
+ );
787
+ exports.Button = Button;
788
+ exports.Chip = Chip;
789
+ exports.ChipGroup = ChipGroup;
790
+ exports.ChipGroupItem = ChipGroupItem;
791
+ exports.buttonVariants = buttonVariants;
792
+ exports.chipCount = chipCount;
793
+ exports.chipVariants = chipVariants;
794
+ exports.cn = cn;
795
+ exports.tv = tv;
796
+ //# sourceMappingURL=chip-group-CsKBBHW2.mjs.map