@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,781 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
4
+ import { c as cn } from "./avatar-CIHTveDJ.mjs";
5
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
6
+ import { Minus, Check, ChevronLeftIcon, ChevronRightIcon, ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight, MoreHorizontal, ChevronDown, ChevronUp, X } from "lucide-react";
7
+ import { getDefaultClassNames, DayPicker } from "react-day-picker";
8
+ import { cva } from "class-variance-authority";
9
+ import * as SelectPrimitive from "@radix-ui/react-select";
10
+ import * as SheetPrimitive from "@radix-ui/react-dialog";
11
+ import * as SwitchPrimitives from "@radix-ui/react-switch";
12
+ const AlertDialog = AlertDialogPrimitive.Root;
13
+ const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
14
+ const AlertDialogPortal = AlertDialogPrimitive.Portal;
15
+ const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
16
+ AlertDialogPrimitive.Overlay,
17
+ {
18
+ ref,
19
+ className: cn(
20
+ "fixed inset-0 z-50 bg-black/30 supports-[backdrop-filter]:backdrop-blur-sm",
21
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
22
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
23
+ className
24
+ ),
25
+ ...props
26
+ }
27
+ ));
28
+ AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
29
+ const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
30
+ /* @__PURE__ */ jsx(AlertDialogOverlay, {}),
31
+ /* @__PURE__ */ jsx(
32
+ AlertDialogPrimitive.Content,
33
+ {
34
+ ref,
35
+ className: cn(
36
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] sm:max-w-[420px]",
37
+ "translate-x-[-50%] translate-y-[-50%]",
38
+ "rounded-radius-2xl bg-bg-surface text-fg-default",
39
+ "border border-border-default shadow-sh-2xl outline-float",
40
+ "duration-200",
41
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
42
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
43
+ "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
44
+ className
45
+ ),
46
+ ...props
47
+ }
48
+ )
49
+ ] }));
50
+ AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
51
+ const AlertDialogHeader = ({
52
+ className,
53
+ ...props
54
+ }) => /* @__PURE__ */ jsx(
55
+ "div",
56
+ {
57
+ className: cn(
58
+ "flex flex-col items-center text-center gap-gp-lg",
59
+ "px-pad-4xl pt-[32px] pb-pad-3xl",
60
+ className
61
+ ),
62
+ ...props
63
+ }
64
+ );
65
+ AlertDialogHeader.displayName = "AlertDialogHeader";
66
+ const AlertDialogFooter = ({
67
+ className,
68
+ ...props
69
+ }) => (
70
+ // Mobile: empilha vertical, confirm em cima (flex-col-reverse põe Cancel embaixo)
71
+ // sm+: lado a lado horizontal
72
+ /* @__PURE__ */ jsx(
73
+ "div",
74
+ {
75
+ className: cn(
76
+ "flex flex-col-reverse items-stretch gap-gp-md sm:flex-row",
77
+ "px-pad-3xl pb-pad-3xl",
78
+ className
79
+ ),
80
+ ...props
81
+ }
82
+ )
83
+ );
84
+ AlertDialogFooter.displayName = "AlertDialogFooter";
85
+ const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
86
+ AlertDialogPrimitive.Title,
87
+ {
88
+ ref,
89
+ className: cn(
90
+ "text-body-xl font-bold tracking-[-0.01em] text-fg-default leading-tight",
91
+ className
92
+ ),
93
+ ...props
94
+ }
95
+ ));
96
+ AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
97
+ const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
98
+ AlertDialogPrimitive.Description,
99
+ {
100
+ ref,
101
+ className: cn(
102
+ "text-body-sm font-normal leading-[1.5] text-fg-muted max-w-[340px]",
103
+ className
104
+ ),
105
+ ...props
106
+ }
107
+ ));
108
+ AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
109
+ const AlertDialogAction = AlertDialogPrimitive.Action;
110
+ const AlertDialogCancel = AlertDialogPrimitive.Cancel;
111
+ const Checkbox = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
112
+ CheckboxPrimitive.Root,
113
+ {
114
+ ref,
115
+ className: cn(
116
+ "peer relative flex size-4 shrink-0 items-center justify-center cursor-pointer",
117
+ "rounded-radius-xs",
118
+ "bg-bg-input dark:bg-bg-muted",
119
+ "border-[1.5px] border-border-input",
120
+ "transition-[background-color,border-color,box-shadow] outline-none",
121
+ "hover:border-border-default",
122
+ "focus-visible:shadow-sh-ring",
123
+ "disabled:cursor-not-allowed disabled:opacity-50",
124
+ "data-[state=checked]:bg-bg-brand data-[state=checked]:border-border-brand",
125
+ "data-[state=indeterminate]:bg-bg-brand data-[state=indeterminate]:border-border-brand",
126
+ className
127
+ ),
128
+ ...props,
129
+ children: /* @__PURE__ */ jsx(
130
+ CheckboxPrimitive.Indicator,
131
+ {
132
+ className: cn("grid place-content-center text-fg-on-brand"),
133
+ children: props.checked === "indeterminate" ? /* @__PURE__ */ jsx(Minus, { className: "size-3", strokeWidth: 3 }) : /* @__PURE__ */ jsx(Check, { className: "size-3", strokeWidth: 3 })
134
+ }
135
+ )
136
+ }
137
+ ));
138
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
139
+ function Calendar({
140
+ className,
141
+ classNames,
142
+ showOutsideDays = true,
143
+ captionLayout = "label",
144
+ components,
145
+ ...props
146
+ }) {
147
+ const defaultClassNames = getDefaultClassNames();
148
+ return /* @__PURE__ */ jsx(
149
+ DayPicker,
150
+ {
151
+ showOutsideDays,
152
+ className: cn(
153
+ "group/calendar bg-transparent p-0 [--cell-size:2.5rem]",
154
+ className
155
+ ),
156
+ captionLayout,
157
+ classNames: {
158
+ root: cn("w-full", defaultClassNames.root),
159
+ months: cn("relative flex flex-col gap-gp-2xl sm:flex-row sm:gap-gp-4xl", defaultClassNames.months),
160
+ month: cn("flex w-full flex-col gap-gp-2xl", defaultClassNames.month),
161
+ nav: cn(
162
+ "absolute inset-x-0 top-0 flex w-full items-center justify-between",
163
+ defaultClassNames.nav
164
+ ),
165
+ button_previous: cn(
166
+ "inline-flex items-center justify-center size-[--cell-size] rounded-full text-fg-muted hover:bg-bg-muted transition-colors select-none aria-disabled:opacity-30",
167
+ defaultClassNames.button_previous
168
+ ),
169
+ button_next: cn(
170
+ "inline-flex items-center justify-center size-[--cell-size] rounded-full text-fg-muted hover:bg-bg-muted transition-colors select-none aria-disabled:opacity-30",
171
+ defaultClassNames.button_next
172
+ ),
173
+ month_caption: cn(
174
+ "flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",
175
+ defaultClassNames.month_caption
176
+ ),
177
+ caption_label: cn(
178
+ "text-body-md font-medium font-semibold select-none",
179
+ captionLayout === "dropdown" ? "hidden" : "",
180
+ defaultClassNames.caption_label
181
+ ),
182
+ dropdowns: cn(
183
+ "flex items-center gap-gp-md",
184
+ defaultClassNames.dropdowns
185
+ ),
186
+ dropdown: cn(
187
+ "cursor-pointer appearance-none bg-transparent text-body-md font-medium font-semibold text-fg-default outline-none",
188
+ defaultClassNames.dropdown
189
+ ),
190
+ months_dropdown: cn("", defaultClassNames.months_dropdown),
191
+ years_dropdown: cn("", defaultClassNames.years_dropdown),
192
+ table: "w-full border-collapse",
193
+ weekdays: cn("flex", defaultClassNames.weekdays),
194
+ weekday: cn(
195
+ "flex-1 min-w-8 max-w-12 text-body-sm font-normal text-fg-muted select-none text-center",
196
+ defaultClassNames.weekday
197
+ ),
198
+ week: cn("mt-gp-md flex w-full", defaultClassNames.week),
199
+ day: cn(
200
+ // flex-1: cada dia ocupa 1/7 igual ao header de weekdays (que usa flex-1).
201
+ // Sem isso o dia dimensionava por aspect-square e desalinhava das colunas.
202
+ "group/day relative flex-1 aspect-square min-w-8 max-w-12 p-0 text-center select-none",
203
+ defaultClassNames.day
204
+ ),
205
+ range_start: cn("rounded-l-full", defaultClassNames.range_start),
206
+ range_end: cn("rounded-r-full", defaultClassNames.range_end),
207
+ range_middle: cn("", defaultClassNames.range_middle),
208
+ today: cn("", defaultClassNames.today),
209
+ outside: cn(
210
+ "text-fg-subtle opacity-40",
211
+ defaultClassNames.outside
212
+ ),
213
+ disabled: cn("text-fg-disabled opacity-50", defaultClassNames.disabled),
214
+ hidden: cn("invisible", defaultClassNames.hidden),
215
+ ...classNames
216
+ },
217
+ components: {
218
+ Root: ({ className: rootCn, rootRef, ...rootProps }) => /* @__PURE__ */ jsx("div", { "data-slot": "calendar", ref: rootRef, className: cn(rootCn), ...rootProps }),
219
+ Chevron: ({ orientation }) => {
220
+ if (orientation === "left") return /* @__PURE__ */ jsx(ChevronLeftIcon, { className: "size-4" });
221
+ return /* @__PURE__ */ jsx(ChevronRightIcon, { className: "size-4" });
222
+ },
223
+ DayButton: CalendarDayButton,
224
+ ...components
225
+ },
226
+ ...props
227
+ }
228
+ );
229
+ }
230
+ function CalendarDayButton({
231
+ className,
232
+ day,
233
+ modifiers,
234
+ ...props
235
+ }) {
236
+ const ref = React.useRef(null);
237
+ React.useEffect(() => {
238
+ if (modifiers.focused) ref.current?.focus();
239
+ }, [modifiers.focused]);
240
+ const isRangeStart = modifiers.range_start;
241
+ const isRangeEnd = modifiers.range_end;
242
+ const isRangeMiddle = modifiers.range_middle;
243
+ const isSingleSelected = modifiers.selected && !isRangeStart && !isRangeEnd && !isRangeMiddle;
244
+ return /* @__PURE__ */ jsx(
245
+ "button",
246
+ {
247
+ ref,
248
+ type: "button",
249
+ "data-selected-single": isSingleSelected,
250
+ "data-range-start": isRangeStart || void 0,
251
+ "data-range-end": isRangeEnd || void 0,
252
+ "data-range-middle": isRangeMiddle || void 0,
253
+ className: cn(
254
+ "relative flex aspect-square w-full items-center justify-center text-body-md font-normal leading-none outline-none transition-colors",
255
+ // Default shape
256
+ "rounded-full",
257
+ // Hover
258
+ "hover:bg-bg-muted",
259
+ // Single selected
260
+ "data-[selected-single=true]:bg-bg-brand data-[selected-single=true]:text-fg-on-brand data-[selected-single=true]:hover:bg-bg-brand",
261
+ // Range start
262
+ "data-[range-start]:bg-bg-brand data-[range-start]:text-fg-on-brand data-[range-start]:rounded-full data-[range-start]:hover:bg-bg-brand",
263
+ // Range end
264
+ "data-[range-end]:bg-bg-brand data-[range-end]:text-fg-on-brand data-[range-end]:rounded-full data-[range-end]:hover:bg-bg-brand",
265
+ // Range middle
266
+ "data-[range-middle]:bg-bg-brand-subtle data-[range-middle]:text-fg-brand data-[range-middle]:rounded-none",
267
+ // Today
268
+ modifiers.today && !isSingleSelected && !isRangeStart && !isRangeEnd && !isRangeMiddle && "bg-bg-brand text-fg-on-brand font-semibold hover:bg-bg-brand",
269
+ // Outside
270
+ modifiers.outside && "text-fg-subtle opacity-40 hover:bg-transparent",
271
+ // Disabled
272
+ modifiers.disabled && "opacity-30 pointer-events-none",
273
+ className
274
+ ),
275
+ ...props
276
+ }
277
+ );
278
+ }
279
+ const Pagination = ({
280
+ className,
281
+ ...props
282
+ }) => /* @__PURE__ */ jsx(
283
+ "nav",
284
+ {
285
+ role: "navigation",
286
+ "aria-label": "Paginação",
287
+ className: cn("inline-flex items-center gap-gp-xs", className),
288
+ ...props
289
+ }
290
+ );
291
+ Pagination.displayName = "Pagination";
292
+ const PaginationContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
293
+ "ul",
294
+ {
295
+ ref,
296
+ className: cn(
297
+ "inline-flex items-center gap-[2px]",
298
+ "bg-bg-muted rounded-radius-lg p-[3px] mx-gp-sm h-form-md",
299
+ className
300
+ ),
301
+ ...props
302
+ }
303
+ ));
304
+ PaginationContent.displayName = "PaginationContent";
305
+ const PaginationItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("", className), ...props }));
306
+ PaginationItem.displayName = "PaginationItem";
307
+ const paginationLinkVariants = cva(
308
+ [
309
+ "inline-flex items-center justify-center",
310
+ "min-w-[30px] h-[30px] px-pad-md",
311
+ "rounded-radius-md text-body-sm font-medium tabular-nums",
312
+ "outline-none cursor-pointer transition-[background-color,color,box-shadow]",
313
+ "focus-visible:shadow-sh-ring",
314
+ "disabled:opacity-50 disabled:pointer-events-none"
315
+ ],
316
+ {
317
+ variants: {
318
+ isActive: {
319
+ true: "bg-bg-accent text-fg-default font-semibold shadow-sh-sm",
320
+ false: "bg-transparent text-fg-muted hover:text-fg-default"
321
+ }
322
+ },
323
+ defaultVariants: { isActive: false }
324
+ }
325
+ );
326
+ const PaginationLink = React.forwardRef(({ className, isActive, type = "button", ...props }, ref) => /* @__PURE__ */ jsx(
327
+ "button",
328
+ {
329
+ ref,
330
+ type,
331
+ "aria-current": isActive ? "page" : void 0,
332
+ className: cn(paginationLinkVariants({ isActive }), className),
333
+ ...props
334
+ }
335
+ ));
336
+ PaginationLink.displayName = "PaginationLink";
337
+ const paginationNavVariants = cva([
338
+ "inline-flex items-center justify-center shrink-0",
339
+ "size-form-md rounded-radius-lg",
340
+ "border border-border-default bg-transparent text-fg-default",
341
+ "outline-none cursor-pointer transition-[background-color,color,opacity,border-color,box-shadow]",
342
+ "hover:bg-bg-muted",
343
+ "focus-visible:shadow-sh-ring",
344
+ "disabled:opacity-35 disabled:pointer-events-none",
345
+ "[&_svg]:size-4"
346
+ ]);
347
+ const PaginationPrevious = React.forwardRef(
348
+ ({ className, type = "button", "aria-label": ariaLabel, ...props }, ref) => /* @__PURE__ */ jsx(
349
+ "button",
350
+ {
351
+ ref,
352
+ type,
353
+ "aria-label": ariaLabel ?? "Página anterior",
354
+ className: cn(paginationNavVariants(), className),
355
+ ...props,
356
+ children: /* @__PURE__ */ jsx(ChevronLeft, {})
357
+ }
358
+ )
359
+ );
360
+ PaginationPrevious.displayName = "PaginationPrevious";
361
+ const PaginationNext = React.forwardRef(
362
+ ({ className, type = "button", "aria-label": ariaLabel, ...props }, ref) => /* @__PURE__ */ jsx(
363
+ "button",
364
+ {
365
+ ref,
366
+ type,
367
+ "aria-label": ariaLabel ?? "Próxima página",
368
+ className: cn(paginationNavVariants(), className),
369
+ ...props,
370
+ children: /* @__PURE__ */ jsx(ChevronRight, {})
371
+ }
372
+ )
373
+ );
374
+ PaginationNext.displayName = "PaginationNext";
375
+ const PaginationFirst = React.forwardRef(
376
+ ({ className, type = "button", "aria-label": ariaLabel, ...props }, ref) => /* @__PURE__ */ jsx(
377
+ "button",
378
+ {
379
+ ref,
380
+ type,
381
+ "aria-label": ariaLabel ?? "Primeira página",
382
+ className: cn(paginationNavVariants(), className),
383
+ ...props,
384
+ children: /* @__PURE__ */ jsx(ChevronsLeft, {})
385
+ }
386
+ )
387
+ );
388
+ PaginationFirst.displayName = "PaginationFirst";
389
+ const PaginationLast = React.forwardRef(
390
+ ({ className, type = "button", "aria-label": ariaLabel, ...props }, ref) => /* @__PURE__ */ jsx(
391
+ "button",
392
+ {
393
+ ref,
394
+ type,
395
+ "aria-label": ariaLabel ?? "Última página",
396
+ className: cn(paginationNavVariants(), className),
397
+ ...props,
398
+ children: /* @__PURE__ */ jsx(ChevronsRight, {})
399
+ }
400
+ )
401
+ );
402
+ PaginationLast.displayName = "PaginationLast";
403
+ const PaginationEllipsis = ({
404
+ className,
405
+ ...props
406
+ }) => /* @__PURE__ */ jsx(
407
+ "span",
408
+ {
409
+ "aria-hidden": "true",
410
+ className: cn(
411
+ "inline-flex items-center justify-center min-w-[22px] h-[30px]",
412
+ "text-body-sm font-normal text-fg-muted tracking-wider select-none",
413
+ className
414
+ ),
415
+ ...props,
416
+ children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "size-4" })
417
+ }
418
+ );
419
+ PaginationEllipsis.displayName = "PaginationEllipsis";
420
+ function getPaginationRange(page, total) {
421
+ if (total <= 7) return Array.from({ length: total }, (_, i) => i + 1);
422
+ const set = /* @__PURE__ */ new Set([1, 2, total - 1, total, page - 1, page, page + 1]);
423
+ const sorted = [...set].filter((n) => n >= 1 && n <= total).sort((a, b) => a - b);
424
+ const out = [];
425
+ sorted.forEach((n, i) => {
426
+ if (i > 0 && n - sorted[i - 1] > 1) out.push("ellipsis");
427
+ out.push(n);
428
+ });
429
+ return out;
430
+ }
431
+ const Select = SelectPrimitive.Root;
432
+ const SelectGroup = SelectPrimitive.Group;
433
+ const SelectValue = SelectPrimitive.Value;
434
+ const SelectTrigger = React.forwardRef(({ className, children, state = "default", ...props }, ref) => /* @__PURE__ */ jsxs(
435
+ SelectPrimitive.Trigger,
436
+ {
437
+ ref,
438
+ className: cn(
439
+ "flex min-h-form-lg w-full items-center justify-between gap-gp-md",
440
+ "rounded-radius-lg px-pad-xl",
441
+ "bg-bg-input dark:bg-bg-muted",
442
+ "hover:bg-bg-input-hover dark:hover:bg-bg-muted-hover",
443
+ "border border-border-input",
444
+ "text-body-sm font-normal text-fg-default",
445
+ "transition-[color,box-shadow,background-color,border-color] outline-none",
446
+ "data-[placeholder]:text-fg-muted data-[placeholder]:opacity-70",
447
+ state === "default" && "focus-visible:border-border-brand data-[state=open]:border-border-brand focus-visible:shadow-sh-ring data-[state=open]:shadow-sh-ring",
448
+ state === "error" && "border-border-danger-muted focus-visible:border-border-danger-muted data-[state=open]:border-border-danger-muted focus-visible:shadow-sh-ring-danger data-[state=open]:shadow-sh-ring-danger",
449
+ state === "warning" && "border-border-warning-muted focus-visible:border-border-warning-muted data-[state=open]:border-border-warning-muted focus-visible:shadow-sh-ring-warning data-[state=open]:shadow-sh-ring-warning",
450
+ state === "success" && "border-border-success-muted focus-visible:border-border-success-muted data-[state=open]:border-border-success-muted focus-visible:shadow-sh-ring-success data-[state=open]:shadow-sh-ring-success",
451
+ "disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-bg-input dark:disabled:hover:bg-bg-muted",
452
+ "[&>span]:line-clamp-1",
453
+ className
454
+ ),
455
+ ...props,
456
+ children: [
457
+ children,
458
+ /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-4 text-fg-muted shrink-0" }) })
459
+ ]
460
+ }
461
+ ));
462
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
463
+ const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
464
+ SelectPrimitive.ScrollUpButton,
465
+ {
466
+ ref,
467
+ className: cn(
468
+ "flex cursor-default items-center justify-center py-pad-xs",
469
+ className
470
+ ),
471
+ ...props,
472
+ children: /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" })
473
+ }
474
+ ));
475
+ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
476
+ const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
477
+ SelectPrimitive.ScrollDownButton,
478
+ {
479
+ ref,
480
+ className: cn(
481
+ "flex cursor-default items-center justify-center py-pad-xs",
482
+ className
483
+ ),
484
+ ...props,
485
+ children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
486
+ }
487
+ ));
488
+ SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
489
+ const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
490
+ SelectPrimitive.Content,
491
+ {
492
+ ref,
493
+ className: cn(
494
+ "relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden",
495
+ "rounded-[12px] bg-bg-dropdown border border-border-default shadow-sh-lg outline-float",
496
+ "before:pointer-events-none before:absolute before:inset-0 before:-z-10 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150",
497
+ "text-fg-default",
498
+ "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",
499
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
500
+ "origin-[--radix-select-content-transform-origin]",
501
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
502
+ className
503
+ ),
504
+ position,
505
+ ...props,
506
+ children: [
507
+ /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
508
+ /* @__PURE__ */ jsx(
509
+ SelectPrimitive.Viewport,
510
+ {
511
+ className: cn(
512
+ "p-pad-sm",
513
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
514
+ ),
515
+ children
516
+ }
517
+ ),
518
+ /* @__PURE__ */ jsx(SelectScrollDownButton, {})
519
+ ]
520
+ }
521
+ ) }));
522
+ SelectContent.displayName = SelectPrimitive.Content.displayName;
523
+ const SelectLabel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
524
+ SelectPrimitive.Label,
525
+ {
526
+ ref,
527
+ className: cn("py-pad-sm pl-8 pr-2 text-body-md font-medium text-fg-muted", className),
528
+ ...props
529
+ }
530
+ ));
531
+ SelectLabel.displayName = SelectPrimitive.Label.displayName;
532
+ const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
533
+ SelectPrimitive.Item,
534
+ {
535
+ ref,
536
+ className: cn(
537
+ "relative flex w-full cursor-default select-none items-center gap-pad-md",
538
+ "rounded-radius-sm py-pad-md pl-8 pr-pad-lg",
539
+ "text-body-sm font-medium text-fg-muted",
540
+ "outline-none transition-colors",
541
+ "focus:bg-bg-muted focus:text-fg-default",
542
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
543
+ "[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-fg-muted",
544
+ "focus:[&_svg]:text-fg-default",
545
+ className
546
+ ),
547
+ ...props,
548
+ children: [
549
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
550
+ /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
551
+ ]
552
+ }
553
+ ));
554
+ SelectItem.displayName = SelectPrimitive.Item.displayName;
555
+ const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
556
+ SelectPrimitive.Separator,
557
+ {
558
+ ref,
559
+ className: cn("-mx-1 my-1 h-px bg-border", className),
560
+ ...props
561
+ }
562
+ ));
563
+ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
564
+ const Sheet = SheetPrimitive.Root;
565
+ const SheetTrigger = SheetPrimitive.Trigger;
566
+ const SheetClose = SheetPrimitive.Close;
567
+ const SheetPortal = SheetPrimitive.Portal;
568
+ const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
569
+ SheetPrimitive.Overlay,
570
+ {
571
+ className: cn(
572
+ "fixed inset-0 z-50 bg-overlay-scrim data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
573
+ className
574
+ ),
575
+ ...props,
576
+ ref
577
+ }
578
+ ));
579
+ SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
580
+ const sheetVariants = cva(
581
+ "fixed z-50 bg-bg-surface dark:bg-bg-canvas text-fg-default shadow-sh-2xl ease-[cubic-bezier(0.4,0,0.2,1)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-[220ms] data-[state=open]:duration-[220ms] data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
582
+ {
583
+ variants: {
584
+ side: {
585
+ top: "inset-x-0 top-0 border-b border-border-default data-[state=closed]:slide-out-to-top-12 data-[state=open]:slide-in-from-top-12",
586
+ bottom: "inset-x-0 bottom-0 border-t border-border-default data-[state=closed]:slide-out-to-bottom-12 data-[state=open]:slide-in-from-bottom-12",
587
+ left: "inset-y-0 left-0 h-full w-3/4 border-r border-border-default data-[state=closed]:slide-out-to-left-12 data-[state=open]:slide-in-from-left-12 sm:max-w-sm",
588
+ right: "inset-y-0 right-0 h-full w-3/4 border-l border-border-default data-[state=closed]:slide-out-to-right-12 data-[state=open]:slide-in-from-right-12 sm:max-w-sm"
589
+ }
590
+ },
591
+ defaultVariants: {
592
+ side: "right"
593
+ }
594
+ }
595
+ );
596
+ const SheetContent = React.forwardRef(({ side = "right", className, children, hideClose, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
597
+ /* @__PURE__ */ jsx(SheetOverlay, {}),
598
+ /* @__PURE__ */ jsxs(
599
+ SheetPrimitive.Content,
600
+ {
601
+ ref,
602
+ className: cn(sheetVariants({ side }), className),
603
+ ...props,
604
+ children: [
605
+ children,
606
+ !hideClose && /* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "absolute right-pad-2xl top-pad-2xl rounded-radius-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus-visible:ring-4 focus-visible:ring-ring-secondary disabled:pointer-events-none data-[state=open]:bg-bg-muted text-fg-muted", children: [
607
+ /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
608
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
609
+ ] })
610
+ ]
611
+ }
612
+ )
613
+ ] }));
614
+ SheetContent.displayName = SheetPrimitive.Content.displayName;
615
+ const SheetHeader = ({
616
+ className,
617
+ ...props
618
+ }) => /* @__PURE__ */ jsx(
619
+ "div",
620
+ {
621
+ className: cn(
622
+ "flex flex-col gap-gp-sm text-left",
623
+ className
624
+ ),
625
+ ...props
626
+ }
627
+ );
628
+ SheetHeader.displayName = "SheetHeader";
629
+ const SheetFooter = ({
630
+ className,
631
+ ...props
632
+ }) => /* @__PURE__ */ jsx(
633
+ "div",
634
+ {
635
+ className: cn(
636
+ "flex flex-col-reverse gap-gp-md sm:flex-row sm:justify-end",
637
+ className
638
+ ),
639
+ ...props
640
+ }
641
+ );
642
+ SheetFooter.displayName = "SheetFooter";
643
+ const SheetTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
644
+ SheetPrimitive.Title,
645
+ {
646
+ ref,
647
+ className: cn("text-body-lg font-medium font-semibold text-fg-default", className),
648
+ ...props
649
+ }
650
+ ));
651
+ SheetTitle.displayName = SheetPrimitive.Title.displayName;
652
+ const SheetDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
653
+ SheetPrimitive.Description,
654
+ {
655
+ ref,
656
+ className: cn("text-body-md text-fg-muted", className),
657
+ ...props
658
+ }
659
+ ));
660
+ SheetDescription.displayName = SheetPrimitive.Description.displayName;
661
+ const Switch = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
662
+ SwitchPrimitives.Root,
663
+ {
664
+ className: cn(
665
+ "peer relative inline-flex h-[24px] w-[42px] shrink-0 cursor-pointer items-center",
666
+ "rounded-radius-full",
667
+ "transition-[background-color,box-shadow] duration-150 outline-none",
668
+ "data-[state=unchecked]:bg-bg-emphasis dark:data-[state=unchecked]:bg-bg-accent",
669
+ "data-[state=checked]:bg-bg-brand",
670
+ "focus-visible:shadow-sh-ring",
671
+ "disabled:cursor-not-allowed disabled:opacity-50",
672
+ className
673
+ ),
674
+ ...props,
675
+ ref,
676
+ children: /* @__PURE__ */ jsx(
677
+ SwitchPrimitives.Thumb,
678
+ {
679
+ className: cn(
680
+ "pointer-events-none block size-[20px] rounded-radius-full bg-white",
681
+ "shadow-[0_1px_2px_rgba(0,0,0,0.10)]",
682
+ "transition-transform duration-[180ms] ease-[cubic-bezier(0.4,0,0.2,1)]",
683
+ "data-[state=unchecked]:translate-x-[2px]",
684
+ "data-[state=checked]:translate-x-[20px]"
685
+ )
686
+ }
687
+ )
688
+ }
689
+ ));
690
+ Switch.displayName = SwitchPrimitives.Root.displayName;
691
+ const textareaVariants = cva(
692
+ [
693
+ "flex min-h-[100px] w-full resize-y",
694
+ "bg-bg-input dark:bg-bg-muted",
695
+ "hover:bg-bg-input-hover dark:hover:bg-bg-muted-hover",
696
+ "border border-border-input rounded-radius-lg",
697
+ "px-pad-xl py-pad-lg",
698
+ "text-body-sm font-normal leading-[1.5] text-fg-default",
699
+ "placeholder:text-fg-muted placeholder:opacity-70",
700
+ "transition-[color,box-shadow,background-color,border-color] outline-none",
701
+ "disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-bg-input dark:disabled:hover:bg-bg-muted"
702
+ ],
703
+ {
704
+ variants: {
705
+ state: {
706
+ default: "focus-visible:border-border-brand focus-visible:shadow-sh-ring",
707
+ error: "border-border-danger-muted focus-visible:border-border-danger-muted focus-visible:shadow-sh-ring-danger",
708
+ warning: "border-border-warning-muted focus-visible:border-border-warning-muted focus-visible:shadow-sh-ring-warning",
709
+ success: "border-border-success-muted focus-visible:border-border-success-muted focus-visible:shadow-sh-ring-success"
710
+ }
711
+ },
712
+ defaultVariants: {
713
+ state: "default"
714
+ }
715
+ }
716
+ );
717
+ const Textarea = React.forwardRef(
718
+ ({ className, state, ...props }, ref) => {
719
+ return /* @__PURE__ */ jsx(
720
+ "textarea",
721
+ {
722
+ className: cn(textareaVariants({ state }), className),
723
+ ref,
724
+ ...props
725
+ }
726
+ );
727
+ }
728
+ );
729
+ Textarea.displayName = "Textarea";
730
+ export {
731
+ AlertDialog as A,
732
+ SelectSeparator as B,
733
+ Calendar as C,
734
+ SelectTrigger as D,
735
+ SelectValue as E,
736
+ Sheet as F,
737
+ SheetClose as G,
738
+ SheetContent as H,
739
+ SheetDescription as I,
740
+ SheetFooter as J,
741
+ SheetHeader as K,
742
+ SheetOverlay as L,
743
+ SheetPortal as M,
744
+ SheetTitle as N,
745
+ SheetTrigger as O,
746
+ Pagination as P,
747
+ Switch as Q,
748
+ getPaginationRange as R,
749
+ Select as S,
750
+ Textarea as T,
751
+ paginationLinkVariants as U,
752
+ paginationNavVariants as V,
753
+ textareaVariants as W,
754
+ AlertDialogAction as a,
755
+ AlertDialogCancel as b,
756
+ AlertDialogContent as c,
757
+ AlertDialogDescription as d,
758
+ AlertDialogFooter as e,
759
+ AlertDialogHeader as f,
760
+ AlertDialogOverlay as g,
761
+ AlertDialogPortal as h,
762
+ AlertDialogTitle as i,
763
+ AlertDialogTrigger as j,
764
+ CalendarDayButton as k,
765
+ Checkbox as l,
766
+ PaginationContent as m,
767
+ PaginationEllipsis as n,
768
+ PaginationFirst as o,
769
+ PaginationItem as p,
770
+ PaginationLast as q,
771
+ PaginationLink as r,
772
+ PaginationNext as s,
773
+ PaginationPrevious as t,
774
+ SelectContent as u,
775
+ SelectGroup as v,
776
+ SelectItem as w,
777
+ SelectLabel as x,
778
+ SelectScrollDownButton as y,
779
+ SelectScrollUpButton as z
780
+ };
781
+ //# sourceMappingURL=textarea-BDJRaL5h.mjs.map