@pelatform/ui 1.5.9 → 2.0.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 (104) hide show
  1. package/css/source.css +20 -0
  2. package/css/theme.css +1 -2
  3. package/dist/animation.d.ts +4 -379
  4. package/dist/animation.js +2 -1752
  5. package/dist/aria.d.ts +1 -31
  6. package/dist/aria.js +2 -139
  7. package/dist/base.d.ts +1 -651
  8. package/dist/base.js +2 -5559
  9. package/dist/chunk-UEVIEY7W.js +51 -0
  10. package/dist/{components.cjs → chunk-VZEE3GOC.js} +81 -2344
  11. package/dist/components.d.ts +224 -181
  12. package/dist/components.js +364 -765
  13. package/dist/default.d.ts +1 -1322
  14. package/dist/default.js +2 -8931
  15. package/dist/hooks.d.ts +4 -1087
  16. package/dist/hooks.js +5 -662
  17. package/dist/index.d.ts +58 -308
  18. package/dist/index.js +5 -226
  19. package/package.json +29 -109
  20. package/dist/animation.cjs +0 -1752
  21. package/dist/animation.d.cts +0 -379
  22. package/dist/aria.cjs +0 -139
  23. package/dist/aria.d.cts +0 -31
  24. package/dist/badge-BtI4BMea.d.cts +0 -33
  25. package/dist/badge-BtI4BMea.d.ts +0 -33
  26. package/dist/base.cjs +0 -5559
  27. package/dist/base.d.cts +0 -651
  28. package/dist/chunk-3N75YA6Q.cjs +0 -60
  29. package/dist/chunk-7472NIIL.cjs +0 -40
  30. package/dist/chunk-BXUKTDPN.cjs +0 -576
  31. package/dist/chunk-CD2BCCQU.js +0 -180
  32. package/dist/chunk-CJXIPSTG.cjs +0 -10
  33. package/dist/chunk-CTHRAJQZ.js +0 -1522
  34. package/dist/chunk-D373YKDA.js +0 -196
  35. package/dist/chunk-EZW5GNS4.js +0 -6
  36. package/dist/chunk-HILACSFA.cjs +0 -1522
  37. package/dist/chunk-HR3R6KKM.js +0 -40
  38. package/dist/chunk-HW52LCWN.js +0 -22
  39. package/dist/chunk-I46SELBA.cjs +0 -22
  40. package/dist/chunk-J4JGE3U5.cjs +0 -180
  41. package/dist/chunk-RQHJBTEU.js +0 -10
  42. package/dist/chunk-SK6SSJHC.js +0 -9
  43. package/dist/chunk-T74DBLYY.js +0 -60
  44. package/dist/chunk-TB6DU23O.js +0 -576
  45. package/dist/chunk-UP53DCYH.cjs +0 -6
  46. package/dist/chunk-ZBO5IAMA.cjs +0 -196
  47. package/dist/chunk-ZDR3OZ7Z.cjs +0 -9
  48. package/dist/colors-CUDWvz1g.d.cts +0 -42
  49. package/dist/colors-CUDWvz1g.d.ts +0 -42
  50. package/dist/components-CidsRcc3.d.cts +0 -46
  51. package/dist/components-CidsRcc3.d.ts +0 -46
  52. package/dist/components.d.cts +0 -2944
  53. package/dist/default.cjs +0 -8931
  54. package/dist/default.d.cts +0 -1322
  55. package/dist/hooks.cjs +0 -666
  56. package/dist/hooks.d.cts +0 -1176
  57. package/dist/index.cjs +0 -230
  58. package/dist/index.d.cts +0 -318
  59. package/dist/input-AwYIskrX.d.cts +0 -22
  60. package/dist/input-AwYIskrX.d.ts +0 -22
  61. package/dist/menu-GmSRfRGB.d.cts +0 -43
  62. package/dist/menu-GmSRfRGB.d.ts +0 -43
  63. package/dist/metafile-cjs.json +0 -1
  64. package/dist/metafile-esm.json +0 -1
  65. package/dist/re-export/cva.cjs +0 -6
  66. package/dist/re-export/cva.d.cts +0 -10
  67. package/dist/re-export/cva.d.ts +0 -10
  68. package/dist/re-export/cva.js +0 -6
  69. package/dist/re-export/motion.cjs +0 -2
  70. package/dist/re-export/motion.d.cts +0 -1
  71. package/dist/re-export/motion.d.ts +0 -1
  72. package/dist/re-export/motion.js +0 -2
  73. package/dist/re-export/next-themes.cjs +0 -2
  74. package/dist/re-export/next-themes.d.cts +0 -1
  75. package/dist/re-export/next-themes.d.ts +0 -1
  76. package/dist/re-export/next-themes.js +0 -2
  77. package/dist/re-export/react-day-picker.cjs +0 -2
  78. package/dist/re-export/react-day-picker.d.cts +0 -1
  79. package/dist/re-export/react-day-picker.d.ts +0 -1
  80. package/dist/re-export/react-day-picker.js +0 -2
  81. package/dist/re-export/react-hook-form.cjs +0 -2
  82. package/dist/re-export/react-hook-form.d.cts +0 -1
  83. package/dist/re-export/react-hook-form.d.ts +0 -1
  84. package/dist/re-export/react-hook-form.js +0 -2
  85. package/dist/re-export/resolver.cjs +0 -2
  86. package/dist/re-export/resolver.d.cts +0 -1
  87. package/dist/re-export/resolver.d.ts +0 -1
  88. package/dist/re-export/resolver.js +0 -2
  89. package/dist/re-export/sonner.cjs +0 -2
  90. package/dist/re-export/sonner.d.cts +0 -1
  91. package/dist/re-export/sonner.d.ts +0 -1
  92. package/dist/re-export/sonner.js +0 -2
  93. package/dist/re-export/tanstack-query.cjs +0 -2
  94. package/dist/re-export/tanstack-query.d.cts +0 -1
  95. package/dist/re-export/tanstack-query.d.ts +0 -1
  96. package/dist/re-export/tanstack-query.js +0 -2
  97. package/dist/re-export/tanstack-table.cjs +0 -2
  98. package/dist/re-export/tanstack-table.d.cts +0 -1
  99. package/dist/re-export/tanstack-table.d.ts +0 -1
  100. package/dist/re-export/tanstack-table.js +0 -2
  101. package/dist/re-export/zod.cjs +0 -2
  102. package/dist/re-export/zod.d.cts +0 -1
  103. package/dist/re-export/zod.d.ts +0 -1
  104. package/dist/re-export/zod.js +0 -2
@@ -1,1522 +0,0 @@
1
- 'use client';
2
-
3
- import {
4
- buttonVariants
5
- } from "./chunk-TB6DU23O.js";
6
- import {
7
- cn
8
- } from "./chunk-RQHJBTEU.js";
9
-
10
- // src/ui/default/alert.tsx
11
- import { cva } from "class-variance-authority";
12
- import { X } from "lucide-react";
13
- import { jsx, jsxs } from "react/jsx-runtime";
14
- var alertVariants = cva("flex items-stretch w-full gap-2 group-[.toaster]:w-(--width)", {
15
- variants: {
16
- variant: {
17
- secondary: "",
18
- primary: "",
19
- destructive: "",
20
- success: "",
21
- info: "",
22
- mono: "",
23
- warning: ""
24
- },
25
- icon: {
26
- primary: "",
27
- destructive: "",
28
- success: "",
29
- info: "",
30
- warning: ""
31
- },
32
- appearance: {
33
- solid: "",
34
- outline: "",
35
- light: "",
36
- stroke: "text-foreground"
37
- },
38
- size: {
39
- lg: "rounded-lg p-4 gap-3 text-base [&>[data-slot=alert-icon]>svg]:size-6 *:data-slot=alert-icon:mt-0.5 [&_[data-slot=alert-close]]:mt-1",
40
- md: "rounded-lg p-3.5 gap-2.5 text-sm [&>[data-slot=alert-icon]>svg]:size-5 *:data-slot=alert-icon:mt-0 [&_[data-slot=alert-close]]:mt-0.5",
41
- sm: "rounded-md px-3 py-2.5 gap-2 text-xs [&>[data-slot=alert-icon]>svg]:size-4 *:data-alert-icon:mt-0.5 [&_[data-slot=alert-close]]:mt-0.25 [&_[data-slot=alert-close]_svg]:size-3.5"
42
- }
43
- },
44
- compoundVariants: [
45
- /* Solid */
46
- {
47
- variant: "secondary",
48
- appearance: "solid",
49
- className: "bg-muted text-foreground"
50
- },
51
- {
52
- variant: "primary",
53
- appearance: "solid",
54
- className: "bg-primary text-primary-foreground"
55
- },
56
- {
57
- variant: "destructive",
58
- appearance: "solid",
59
- className: "bg-destructive text-destructive-foreground"
60
- },
61
- {
62
- variant: "success",
63
- appearance: "solid",
64
- className: "bg-[var(--color-success,var(--color-green-500))] text-[var(--color-success-foreground,var(--color-white))]"
65
- },
66
- {
67
- variant: "info",
68
- appearance: "solid",
69
- className: "bg-[var(--color-info,var(--color-violet-600))] text-[var(--color-info-foreground,var(--color-white))]"
70
- },
71
- {
72
- variant: "warning",
73
- appearance: "solid",
74
- className: "bg-[var(--color-warning,var(--color-yellow-500))] text-[var(--color-warning-foreground,var(--color-white))]"
75
- },
76
- {
77
- variant: "mono",
78
- appearance: "solid",
79
- className: "bg-zinc-950 text-white dark:bg-zinc-300 dark:text-black *:data-slot-[alert=close]:text-white"
80
- },
81
- /* Outline */
82
- {
83
- variant: "secondary",
84
- appearance: "outline",
85
- className: "border border-border bg-background text-foreground [&_[data-slot=alert-close]]:text-foreground"
86
- },
87
- {
88
- variant: "primary",
89
- appearance: "outline",
90
- className: "border border-border bg-background text-primary [&_[data-slot=alert-close]]:text-foreground"
91
- },
92
- {
93
- variant: "destructive",
94
- appearance: "outline",
95
- className: "border border-border bg-background text-destructive [&_[data-slot=alert-close]]:text-foreground"
96
- },
97
- {
98
- variant: "success",
99
- appearance: "outline",
100
- className: "border border-border bg-background text-[var(--color-success,var(--color-green-500))] [&_[data-slot=alert-close]]:text-foreground"
101
- },
102
- {
103
- variant: "info",
104
- appearance: "outline",
105
- className: "border border-border bg-background text-[var(--color-info,var(--color-violet-600))] [&_[data-slot=alert-close]]:text-foreground"
106
- },
107
- {
108
- variant: "warning",
109
- appearance: "outline",
110
- className: "border border-border bg-background text-[var(--color-warning,var(--color-yellow-500))] [&_[data-slot=alert-close]]:text-foreground"
111
- },
112
- {
113
- variant: "mono",
114
- appearance: "outline",
115
- className: "border border-border bg-background text-foreground [&_[data-slot=alert-close]]:text-foreground"
116
- },
117
- /* Light */
118
- {
119
- variant: "secondary",
120
- appearance: "light",
121
- className: "bg-muted border border-border text-foreground"
122
- },
123
- {
124
- variant: "primary",
125
- appearance: "light",
126
- className: "text-foreground bg-[var(--color-primary-soft,var(--color-blue-50))] border border-[var(--color-primary-alpha,var(--color-blue-100))] [&_[data-slot=alert-icon]]:text-primary dark:bg-[var(--color-primary-soft,var(--color-blue-950))] dark:border-[var(--color-primary-alpha,var(--color-blue-900))]"
127
- },
128
- {
129
- variant: "destructive",
130
- appearance: "light",
131
- className: "bg-[var(--color-destructive-soft,var(--color-red-50))] border border-[var(--color-destructive-alpha,var(--color-red-100))] text-foreground [&_[data-slot=alert-icon]]:text-destructive dark:bg-[var(--color-destructive-soft,var(--color-red-950))] dark:border-[var(--color-destructive-alpha,var(--color-red-900))] "
132
- },
133
- {
134
- variant: "success",
135
- appearance: "light",
136
- className: "bg-[var(--color-success-soft,var(--color-green-50))] border border-[var(--color-success-alpha,var(--color-green-200))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-success-foreground,var(--color-green-600))] dark:bg-[var(--color-success-soft,var(--color-green-950))] dark:border-[var(--color-success-alpha,var(--color-green-900))]"
137
- },
138
- {
139
- variant: "info",
140
- appearance: "light",
141
- className: "bg-[var(--color-info-soft,var(--color-violet-50))] border border-[var(--color-info-alpha,var(--color-violet-100))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-info-foreground,var(--color-violet-600))] dark:bg-[var(--color-info-soft,var(--color-violet-950))] dark:border-[var(--color-info-alpha,var(--color-violet-900))]"
142
- },
143
- {
144
- variant: "warning",
145
- appearance: "light",
146
- className: "bg-[var(--color-warning-soft,var(--color-yellow-50))] border border-[var(--color-warning-alpha,var(--color-yellow-200))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-warning-foreground,var(--color-yellow-600))] dark:bg-[var(--color-warning-soft,var(--color-yellow-950))] dark:border-[var(--color-warning-alpha,var(--color-yellow-900))]"
147
- },
148
- /* Mono */
149
- {
150
- variant: "mono",
151
- icon: "primary",
152
- className: "[&_[data-slot=alert-icon]]:text-primary"
153
- },
154
- {
155
- variant: "mono",
156
- icon: "warning",
157
- className: "[&_[data-slot=alert-icon]]:text-[var(--color-warning-foreground,var(--color-yellow-600))]"
158
- },
159
- {
160
- variant: "mono",
161
- icon: "success",
162
- className: "[&_[data-slot=alert-icon]]:text-[var(--color-success-foreground,var(--color-green-600))]"
163
- },
164
- {
165
- variant: "mono",
166
- icon: "destructive",
167
- className: "[&_[data-slot=alert-icon]]:text-destructive"
168
- },
169
- {
170
- variant: "mono",
171
- icon: "info",
172
- className: "[&_[data-slot=alert-icon]]:text-[var(--color-info-foreground,var(--color-violet-600))]"
173
- }
174
- ],
175
- defaultVariants: {
176
- variant: "secondary",
177
- appearance: "solid",
178
- size: "md"
179
- }
180
- });
181
- function Alert({
182
- className,
183
- variant,
184
- size,
185
- icon,
186
- appearance,
187
- close = false,
188
- onClose,
189
- children,
190
- ...props
191
- }) {
192
- return /* @__PURE__ */ jsxs(
193
- "div",
194
- {
195
- "data-slot": "alert",
196
- role: "alert",
197
- className: cn(alertVariants({ variant, size, icon, appearance }), className),
198
- ...props,
199
- children: [
200
- children,
201
- close && /* @__PURE__ */ jsx(
202
- "button",
203
- {
204
- onClick: onClose,
205
- "aria-label": "Dismiss",
206
- "data-slot": "alert-close",
207
- className: cn("group size-4 shrink-0 cursor-pointer"),
208
- children: /* @__PURE__ */ jsx(X, { className: "size-4 opacity-60 group-hover:opacity-100" })
209
- }
210
- )
211
- ]
212
- }
213
- );
214
- }
215
- function AlertTitle({ className, ...props }) {
216
- return /* @__PURE__ */ jsx("div", { "data-slot": "alert-title", className: cn("grow tracking-tight", className), ...props });
217
- }
218
- function AlertIcon({ children, className, ...props }) {
219
- return /* @__PURE__ */ jsx("div", { "data-slot": "alert-icon", className: cn("shrink-0", className), ...props, children });
220
- }
221
- function AlertToolbar({ children, className, ...props }) {
222
- return /* @__PURE__ */ jsx("div", { "data-slot": "alert-toolbar", className: cn(className), ...props, children });
223
- }
224
- function AlertDescription({ className, ...props }) {
225
- return /* @__PURE__ */ jsx(
226
- "div",
227
- {
228
- "data-slot": "alert-description",
229
- className: cn("text-sm [&_p]:mb-2 [&_p]:leading-relaxed", className),
230
- ...props
231
- }
232
- );
233
- }
234
- function AlertContent({ className, ...props }) {
235
- return /* @__PURE__ */ jsx(
236
- "div",
237
- {
238
- "data-slot": "alert-content",
239
- className: cn("space-y-2 **:data-[slot=alert-title]:font-semibold", className),
240
- ...props
241
- }
242
- );
243
- }
244
-
245
- // src/ui/default/alert-dialog.tsx
246
- import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
247
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
248
- function AlertDialog({ ...props }) {
249
- return /* @__PURE__ */ jsx2(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
250
- }
251
- function AlertDialogTrigger({
252
- ...props
253
- }) {
254
- return /* @__PURE__ */ jsx2(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
255
- }
256
- function AlertDialogPortal({ ...props }) {
257
- return /* @__PURE__ */ jsx2(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
258
- }
259
- function AlertDialogOverlay({
260
- className,
261
- ...props
262
- }) {
263
- return /* @__PURE__ */ jsx2(
264
- AlertDialogPrimitive.Overlay,
265
- {
266
- "data-slot": "alert-dialog-overlay",
267
- className: cn(
268
- "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/30 [backdrop-filter:blur(4px)] data-[state=closed]:animate-out data-[state=open]:animate-in",
269
- className
270
- ),
271
- ...props
272
- }
273
- );
274
- }
275
- function AlertDialogContent({
276
- className,
277
- ...props
278
- }) {
279
- return /* @__PURE__ */ jsxs2(AlertDialogPortal, { children: [
280
- /* @__PURE__ */ jsx2(AlertDialogOverlay, {}),
281
- /* @__PURE__ */ jsx2(
282
- AlertDialogPrimitive.Content,
283
- {
284
- "data-slot": "alert-dialog-content",
285
- className: cn(
286
- "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-black/5 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:rounded-lg",
287
- className
288
- ),
289
- ...props
290
- }
291
- )
292
- ] });
293
- }
294
- var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx2(
295
- "div",
296
- {
297
- "data-slot": "alert-dialog-header",
298
- className: cn("flex flex-col space-y-2 text-center sm:text-left", className),
299
- ...props
300
- }
301
- );
302
- var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx2(
303
- "div",
304
- {
305
- "data-slot": "alert-dialog-footer",
306
- className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2.5", className),
307
- ...props
308
- }
309
- );
310
- function AlertDialogTitle({
311
- className,
312
- ...props
313
- }) {
314
- return /* @__PURE__ */ jsx2(
315
- AlertDialogPrimitive.Title,
316
- {
317
- "data-slot": "alert-dialog-title",
318
- className: cn("font-semibold text-lg", className),
319
- ...props
320
- }
321
- );
322
- }
323
- function AlertDialogDescription({
324
- className,
325
- ...props
326
- }) {
327
- return /* @__PURE__ */ jsx2(
328
- AlertDialogPrimitive.Description,
329
- {
330
- "data-slot": "alert-dialog-description",
331
- className: cn("text-muted-foreground text-sm", className),
332
- ...props
333
- }
334
- );
335
- }
336
- function AlertDialogAction({
337
- className,
338
- variant,
339
- ...props
340
- }) {
341
- return /* @__PURE__ */ jsx2(
342
- AlertDialogPrimitive.Action,
343
- {
344
- "data-slot": "alert-dialog-action",
345
- className: cn(buttonVariants({ variant }), className),
346
- ...props
347
- }
348
- );
349
- }
350
- function AlertDialogCancel({
351
- className,
352
- ...props
353
- }) {
354
- return /* @__PURE__ */ jsx2(
355
- AlertDialogPrimitive.Cancel,
356
- {
357
- "data-slot": "alert-dialog-cancel",
358
- className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className),
359
- ...props
360
- }
361
- );
362
- }
363
-
364
- // src/ui/default/card.tsx
365
- import * as React from "react";
366
- import { cva as cva2 } from "class-variance-authority";
367
- import { jsx as jsx3 } from "react/jsx-runtime";
368
- var CardContext = React.createContext({
369
- variant: "default"
370
- // Default value
371
- });
372
- var useCardContext = () => {
373
- const context = React.useContext(CardContext);
374
- if (!context) {
375
- throw new Error("useCardContext must be used within a Card component");
376
- }
377
- return context;
378
- };
379
- var cardVariants = cva2("flex flex-col items-stretch text-card-foreground rounded-xl", {
380
- variants: {
381
- variant: {
382
- default: "bg-card border border-border shadow-xs black/5",
383
- accent: "bg-muted shadow-xs p-1"
384
- }
385
- },
386
- defaultVariants: {
387
- variant: "default"
388
- }
389
- });
390
- var cardHeaderVariants = cva2(
391
- "flex items-center justify-between flex-wrap px-5 min-h-14 gap-2.5",
392
- {
393
- variants: {
394
- variant: {
395
- default: "border-b border-border",
396
- accent: ""
397
- }
398
- },
399
- defaultVariants: {
400
- variant: "default"
401
- }
402
- }
403
- );
404
- var cardContentVariants = cva2("grow p-5", {
405
- variants: {
406
- variant: {
407
- default: "",
408
- accent: "bg-card rounded-t-xl last:rounded-b-xl"
409
- }
410
- },
411
- defaultVariants: {
412
- variant: "default"
413
- }
414
- });
415
- var cardTableVariants = cva2("grid grow", {
416
- variants: {
417
- variant: {
418
- default: "",
419
- accent: "bg-card rounded-xl"
420
- }
421
- },
422
- defaultVariants: {
423
- variant: "default"
424
- }
425
- });
426
- var cardFooterVariants = cva2("flex items-center px-5 min-h-14", {
427
- variants: {
428
- variant: {
429
- default: "border-t border-border",
430
- accent: "bg-card rounded-b-xl mt-0.5"
431
- }
432
- },
433
- defaultVariants: {
434
- variant: "default"
435
- }
436
- });
437
- function Card({
438
- className,
439
- variant = "default",
440
- ...props
441
- }) {
442
- return /* @__PURE__ */ jsx3(CardContext.Provider, { value: { variant: variant || "default" }, children: /* @__PURE__ */ jsx3("div", { "data-slot": "card", className: cn(cardVariants({ variant }), className), ...props }) });
443
- }
444
- function CardHeader({ className, ...props }) {
445
- const { variant } = useCardContext();
446
- return /* @__PURE__ */ jsx3(
447
- "div",
448
- {
449
- "data-slot": "card-header",
450
- className: cn(cardHeaderVariants({ variant }), className),
451
- ...props
452
- }
453
- );
454
- }
455
- function CardContent({ className, ...props }) {
456
- const { variant } = useCardContext();
457
- return /* @__PURE__ */ jsx3(
458
- "div",
459
- {
460
- "data-slot": "card-content",
461
- className: cn(cardContentVariants({ variant }), className),
462
- ...props
463
- }
464
- );
465
- }
466
- function CardTable({ className, ...props }) {
467
- const { variant } = useCardContext();
468
- return /* @__PURE__ */ jsx3(
469
- "div",
470
- {
471
- "data-slot": "card-table",
472
- className: cn(cardTableVariants({ variant }), className),
473
- ...props
474
- }
475
- );
476
- }
477
- function CardFooter({ className, ...props }) {
478
- const { variant } = useCardContext();
479
- return /* @__PURE__ */ jsx3(
480
- "div",
481
- {
482
- "data-slot": "card-footer",
483
- className: cn(cardFooterVariants({ variant }), className),
484
- ...props
485
- }
486
- );
487
- }
488
- function CardHeading({ className, ...props }) {
489
- return /* @__PURE__ */ jsx3("div", { "data-slot": "card-heading", className: cn("space-y-1", className), ...props });
490
- }
491
- function CardToolbar({ className, ...props }) {
492
- return /* @__PURE__ */ jsx3(
493
- "div",
494
- {
495
- "data-slot": "card-toolbar",
496
- className: cn("flex items-center gap-2.5", className),
497
- ...props
498
- }
499
- );
500
- }
501
- function CardTitle({ className, ...props }) {
502
- return /* @__PURE__ */ jsx3(
503
- "h3",
504
- {
505
- "data-slot": "card-title",
506
- className: cn("font-semibold text-base leading-none tracking-tight", className),
507
- ...props
508
- }
509
- );
510
- }
511
- function CardDescription({ className, ...props }) {
512
- return /* @__PURE__ */ jsx3(
513
- "div",
514
- {
515
- "data-slot": "card-description",
516
- className: cn("text-muted-foreground text-sm", className),
517
- ...props
518
- }
519
- );
520
- }
521
-
522
- // src/ui/default/badge.tsx
523
- import { cva as cva3 } from "class-variance-authority";
524
- import { Slot as SlotPrimitive } from "radix-ui";
525
- import { jsx as jsx4 } from "react/jsx-runtime";
526
- var badgeVariants = cva3(
527
- "inline-flex items-center whitespace-nowrap justify-center border border-transparent font-medium focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 [&_svg]:-ms-px [&_svg]:shrink-0",
528
- {
529
- variants: {
530
- variant: {
531
- primary: "bg-primary text-primary-foreground",
532
- secondary: "bg-secondary text-secondary-foreground",
533
- success: "bg-[var(--color-success-accent,var(--color-green-500))] text-[var(--color-success-foreground,var(--color-white))]",
534
- warning: "bg-[var(--color-warning-accent,var(--color-yellow-500))] text-[var(--color-warning-foreground,var(--color-white))]",
535
- info: "bg-[var(--color-info-accent,var(--color-violet-500))] text-[var(--color-info-foreground,var(--color-white))]",
536
- outline: "bg-transparent border border-border text-secondary-foreground",
537
- destructive: "bg-destructive text-destructive-foreground"
538
- },
539
- appearance: {
540
- default: "",
541
- light: "",
542
- outline: "",
543
- ghost: "border-transparent bg-transparent"
544
- },
545
- disabled: {
546
- true: "opacity-50 pointer-events-none"
547
- },
548
- size: {
549
- lg: "rounded-md px-[0.5rem] h-7 min-w-7 gap-1.5 text-xs [&_svg]:size-3.5",
550
- md: "rounded-md px-[0.45rem] h-6 min-w-6 gap-1.5 text-xs [&_svg]:size-3.5 ",
551
- sm: "rounded-sm px-[0.325rem] h-5 min-w-5 gap-1 text-[0.6875rem] leading-[0.75rem] [&_svg]:size-3",
552
- xs: "rounded-sm px-[0.25rem] h-4 min-w-4 gap-1 text-[0.625rem] leading-[0.5rem] [&_svg]:size-3"
553
- },
554
- shape: {
555
- default: "",
556
- circle: "rounded-full"
557
- }
558
- },
559
- compoundVariants: [
560
- /* Light */
561
- {
562
- variant: "primary",
563
- appearance: "light",
564
- className: "text-[var(--color-primary-accent,var(--color-blue-700))] bg-[var(--color-primary-soft,var(--color-blue-50))] dark:bg-[var(--color-primary-soft,var(--color-blue-950))] dark:text-[var(--color-primary-soft,var(--color-blue-600))]"
565
- },
566
- {
567
- variant: "secondary",
568
- appearance: "light",
569
- className: "bg-secondary dark:bg-secondary/50 text-secondary-foreground"
570
- },
571
- {
572
- variant: "success",
573
- appearance: "light",
574
- className: "text-[var(--color-success-accent,var(--color-green-800))] bg-[var(--color-success-soft,var(--color-green-100))] dark:bg-[var(--color-success-soft,var(--color-green-950))] dark:text-[var(--color-success-soft,var(--color-green-600))]"
575
- },
576
- {
577
- variant: "warning",
578
- appearance: "light",
579
- className: "text-[var(--color-warning-accent,var(--color-yellow-700))] bg-[var(--color-warning-soft,var(--color-yellow-100))] dark:bg-[var(--color-warning-soft,var(--color-yellow-950))] dark:text-[var(--color-warning-soft,var(--color-yellow-600))]"
580
- },
581
- {
582
- variant: "info",
583
- appearance: "light",
584
- className: "text-[var(--color-info-accent,var(--color-violet-700))] bg-[var(--color-info-soft,var(--color-violet-100))] dark:bg-[var(--color-info-soft,var(--color-violet-950))] dark:text-[var(--color-info-soft,var(--color-violet-400))]"
585
- },
586
- {
587
- variant: "destructive",
588
- appearance: "light",
589
- className: "text-[var(--color-destructive-accent,var(--color-red-700))] bg-[var(--color-destructive-soft,var(--color-red-50))] dark:bg-[var(--color-destructive-soft,var(--color-red-950))] dark:text-[var(--color-destructive-soft,var(--color-red-600))]"
590
- },
591
- /* Outline */
592
- {
593
- variant: "primary",
594
- appearance: "outline",
595
- className: "text-[var(--color-primary-accent,var(--color-blue-700))] border-[var(--color-primary-soft,var(--color-blue-100))] bg-[var(--color-primary-soft,var(--color-blue-50))] dark:bg-[var(--color-primary-soft,var(--color-blue-950))] dark:border-[var(--color-primary-soft,var(--color-blue-900))] dark:text-[var(--color-primary-soft,var(--color-blue-600))]"
596
- },
597
- {
598
- variant: "success",
599
- appearance: "outline",
600
- className: "text-[var(--color-success-accent,var(--color-green-700))] border-[var(--color-success-soft,var(--color-green-200))] bg-[var(--color-success-soft,var(--color-green-50))] dark:bg-[var(--color-success-soft,var(--color-green-950))] dark:border-[var(--color-success-soft,var(--color-green-900))] dark:text-[var(--color-success-soft,var(--color-green-600))]"
601
- },
602
- {
603
- variant: "warning",
604
- appearance: "outline",
605
- className: "text-[var(--color-warning-accent,var(--color-yellow-700))] border-[var(--color-warning-soft,var(--color-yellow-200))] bg-[var(--color-warning-soft,var(--color-yellow-50))] dark:bg-[var(--color-warning-soft,var(--color-yellow-950))] dark:border-[var(--color-warning-soft,var(--color-yellow-900))] dark:text-[var(--color-warning-soft,var(--color-yellow-600))]"
606
- },
607
- {
608
- variant: "info",
609
- appearance: "outline",
610
- className: "text-[var(--color-info-accent,var(--color-violet-700))] border-[var(--color-info-soft,var(--color-violet-100))] bg-[var(--color-info-soft,var(--color-violet-50))] dark:bg-[var(--color-info-soft,var(--color-violet-950))] dark:border-[var(--color-info-soft,var(--color-violet-900))] dark:text-[var(--color-info-soft,var(--color-violet-400))]"
611
- },
612
- {
613
- variant: "destructive",
614
- appearance: "outline",
615
- className: "text-[var(--color-destructive-accent,var(--color-red-700))] border-[var(--color-destructive-soft,var(--color-red-100))] bg-[var(--color-destructive-soft,var(--color-red-50))] dark:bg-[var(--color-destructive-soft,var(--color-red-950))] dark:border-[var(--color-destructive-soft,var(--color-red-900))] dark:text-[var(--color-destructive-soft,var(--color-red-600))]"
616
- },
617
- /* Ghost */
618
- {
619
- variant: "primary",
620
- appearance: "ghost",
621
- className: "text-primary"
622
- },
623
- {
624
- variant: "secondary",
625
- appearance: "ghost",
626
- className: "text-secondary-foreground"
627
- },
628
- {
629
- variant: "success",
630
- appearance: "ghost",
631
- className: "text-[var(--color-success-accent,var(--color-green-500))]"
632
- },
633
- {
634
- variant: "warning",
635
- appearance: "ghost",
636
- className: "text-[var(--color-warning-accent,var(--color-yellow-500))]"
637
- },
638
- {
639
- variant: "info",
640
- appearance: "ghost",
641
- className: "text-[var(--color-info-accent,var(--color-violet-500))]"
642
- },
643
- {
644
- variant: "destructive",
645
- appearance: "ghost",
646
- className: "text-destructive"
647
- },
648
- { size: "lg", appearance: "ghost", className: "px-0" },
649
- { size: "md", appearance: "ghost", className: "px-0" },
650
- { size: "sm", appearance: "ghost", className: "px-0" },
651
- { size: "xs", appearance: "ghost", className: "px-0" }
652
- ],
653
- defaultVariants: {
654
- variant: "primary",
655
- appearance: "default",
656
- size: "md"
657
- }
658
- }
659
- );
660
- var badgeButtonVariants = cva3(
661
- "cursor-pointer transition-all inline-flex items-center justify-center leading-none size-3.5 [&>svg]:opacity-100! [&>svg]:size-3.5! p-0 rounded-md -me-0.5 opacity-60 hover:opacity-100",
662
- {
663
- variants: {
664
- variant: {
665
- default: ""
666
- }
667
- },
668
- defaultVariants: {
669
- variant: "default"
670
- }
671
- }
672
- );
673
- function Badge({
674
- className,
675
- variant,
676
- size,
677
- appearance,
678
- shape,
679
- asChild = false,
680
- disabled,
681
- ...props
682
- }) {
683
- const Comp = asChild ? SlotPrimitive.Slot : "span";
684
- return /* @__PURE__ */ jsx4(
685
- Comp,
686
- {
687
- "data-slot": "badge",
688
- className: cn(badgeVariants({ variant, size, appearance, shape, disabled }), className),
689
- ...props
690
- }
691
- );
692
- }
693
- function BadgeButton({
694
- className,
695
- variant,
696
- asChild = false,
697
- ...props
698
- }) {
699
- const Comp = asChild ? SlotPrimitive.Slot : "span";
700
- return /* @__PURE__ */ jsx4(
701
- Comp,
702
- {
703
- "data-slot": "badge-button",
704
- className: cn(badgeButtonVariants({ variant, className })),
705
- role: "button",
706
- ...props
707
- }
708
- );
709
- }
710
- function BadgeDot({ className, ...props }) {
711
- return /* @__PURE__ */ jsx4(
712
- "span",
713
- {
714
- "data-slot": "badge-dot",
715
- className: cn("size-1.5 rounded-full bg-[currentColor] opacity-75", className),
716
- ...props
717
- }
718
- );
719
- }
720
-
721
- // src/ui/default/dialog.tsx
722
- import { cva as cva4 } from "class-variance-authority";
723
- import { X as X2 } from "lucide-react";
724
- import { Dialog as DialogPrimitive } from "radix-ui";
725
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
726
- var dialogContentVariants = cva4(
727
- "flex flex-col fixed outline-0 z-50 border border-border bg-background p-6 shadow-lg shadow-black/5 duration-200 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 sm:rounded-lg",
728
- {
729
- variants: {
730
- variant: {
731
- default: "left-[50%] top-[50%] max-w-lg translate-x-[-50%] translate-y-[-50%] w-full",
732
- fullscreen: "inset-5"
733
- }
734
- },
735
- defaultVariants: {
736
- variant: "default"
737
- }
738
- }
739
- );
740
- function Dialog({ ...props }) {
741
- return /* @__PURE__ */ jsx5(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
742
- }
743
- function DialogTrigger({ ...props }) {
744
- return /* @__PURE__ */ jsx5(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
745
- }
746
- function DialogPortal({ ...props }) {
747
- return /* @__PURE__ */ jsx5(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
748
- }
749
- function DialogClose({ ...props }) {
750
- return /* @__PURE__ */ jsx5(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
751
- }
752
- function DialogOverlay({
753
- className,
754
- ...props
755
- }) {
756
- return /* @__PURE__ */ jsx5(
757
- DialogPrimitive.Overlay,
758
- {
759
- "data-slot": "dialog-overlay",
760
- className: cn(
761
- "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/30 [backdrop-filter:blur(4px)] data-[state=closed]:animate-out data-[state=open]:animate-in",
762
- className
763
- ),
764
- ...props
765
- }
766
- );
767
- }
768
- function DialogContent({
769
- className,
770
- children,
771
- showCloseButton = true,
772
- overlay = true,
773
- variant,
774
- ...props
775
- }) {
776
- return /* @__PURE__ */ jsxs3(DialogPortal, { children: [
777
- overlay && /* @__PURE__ */ jsx5(DialogOverlay, {}),
778
- /* @__PURE__ */ jsxs3(
779
- DialogPrimitive.Content,
780
- {
781
- "data-slot": "dialog-content",
782
- className: cn(dialogContentVariants({ variant }), className),
783
- ...props,
784
- children: [
785
- children,
786
- showCloseButton && /* @__PURE__ */ jsxs3(DialogClose, { className: "absolute end-5 top-5 cursor-pointer rounded-sm opacity-60 outline-0 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
787
- /* @__PURE__ */ jsx5(X2, { className: "size-4" }),
788
- /* @__PURE__ */ jsx5("span", { className: "sr-only", children: "Close" })
789
- ] })
790
- ]
791
- }
792
- )
793
- ] });
794
- }
795
- var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx5(
796
- "div",
797
- {
798
- "data-slot": "dialog-header",
799
- className: cn("mb-5 flex flex-col space-y-1 text-center sm:text-start", className),
800
- ...props
801
- }
802
- );
803
- var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx5(
804
- "div",
805
- {
806
- "data-slot": "dialog-footer",
807
- className: cn(
808
- "flex flex-col-reverse pt-5 sm:flex-row sm:justify-end sm:space-x-2.5",
809
- className
810
- ),
811
- ...props
812
- }
813
- );
814
- function DialogTitle({ className, ...props }) {
815
- return /* @__PURE__ */ jsx5(
816
- DialogPrimitive.Title,
817
- {
818
- "data-slot": "dialog-title",
819
- className: cn("font-semibold text-lg leading-none tracking-tight", className),
820
- ...props
821
- }
822
- );
823
- }
824
- var DialogBody = ({ className, ...props }) => /* @__PURE__ */ jsx5("div", { "data-slot": "dialog-body", className: cn("grow", className), ...props });
825
- function DialogDescription({
826
- className,
827
- ...props
828
- }) {
829
- return /* @__PURE__ */ jsx5(
830
- DialogPrimitive.Description,
831
- {
832
- "data-slot": "dialog-description",
833
- className: cn("text-muted-foreground text-sm", className),
834
- ...props
835
- }
836
- );
837
- }
838
-
839
- // src/ui/default/command.tsx
840
- import { Command as CommandPrimitive } from "cmdk";
841
- import { Check, Search } from "lucide-react";
842
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
843
- function Command({ className, ...props }) {
844
- return /* @__PURE__ */ jsx6(
845
- CommandPrimitive,
846
- {
847
- className: cn(
848
- "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
849
- className
850
- ),
851
- ...props
852
- }
853
- );
854
- }
855
- var CommandDialog = ({ children, className, ...props }) => {
856
- return /* @__PURE__ */ jsx6(Dialog, { ...props, children: /* @__PURE__ */ jsxs4(DialogContent, { className: cn("overflow-hidden p-0 shadow-lg", className), children: [
857
- /* @__PURE__ */ jsx6(DialogTitle, { className: "hidden" }),
858
- /* @__PURE__ */ jsx6(Command, { className: "[&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground **:[[cmdk-group]]:px-2 **:[[cmdk-input]]:h-12 **:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3", children })
859
- ] }) });
860
- };
861
- function CommandInput({
862
- className,
863
- ...props
864
- }) {
865
- return /* @__PURE__ */ jsxs4(
866
- "div",
867
- {
868
- className: "flex items-center border-border border-b px-3",
869
- "cmdk-input-wrapper": "",
870
- "data-slot": "command-input",
871
- children: [
872
- /* @__PURE__ */ jsx6(Search, { className: "me-2 h-4 w-4 shrink-0 opacity-50" }),
873
- /* @__PURE__ */ jsx6(
874
- CommandPrimitive.Input,
875
- {
876
- className: cn(
877
- "flex h-11 w-full rounded-md bg-transparent py-3 text-foreground text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
878
- className
879
- ),
880
- ...props
881
- }
882
- )
883
- ]
884
- }
885
- );
886
- }
887
- function CommandList({ className, ...props }) {
888
- return /* @__PURE__ */ jsx6(
889
- CommandPrimitive.List,
890
- {
891
- "data-slot": "command-list",
892
- className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
893
- ...props
894
- }
895
- );
896
- }
897
- function CommandEmpty({ ...props }) {
898
- return /* @__PURE__ */ jsx6(
899
- CommandPrimitive.Empty,
900
- {
901
- "data-slot": "command-empty",
902
- className: "py-6 text-center text-sm",
903
- ...props
904
- }
905
- );
906
- }
907
- function CommandGroup({
908
- className,
909
- ...props
910
- }) {
911
- return /* @__PURE__ */ jsx6(
912
- CommandPrimitive.Group,
913
- {
914
- "data-slot": "command-group",
915
- className: cn(
916
- "overflow-hidden p-1.5 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground **:[[cmdk-group-heading]]:text-xs",
917
- className
918
- ),
919
- ...props
920
- }
921
- );
922
- }
923
- function CommandSeparator({
924
- className,
925
- ...props
926
- }) {
927
- return /* @__PURE__ */ jsx6(
928
- CommandPrimitive.Separator,
929
- {
930
- "data-slot": "command-separator",
931
- className: cn("-mx-1.5 h-px bg-border", className),
932
- ...props
933
- }
934
- );
935
- }
936
- function CommandItem({ className, ...props }) {
937
- return /* @__PURE__ */ jsx6(
938
- CommandPrimitive.Item,
939
- {
940
- "data-slot": "command-item",
941
- className: cn(
942
- "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-foreground text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
943
- "[&_svg:not([role=img]):not([class*=text-])]:opacity-60",
944
- className
945
- ),
946
- ...props
947
- }
948
- );
949
- }
950
- var CommandShortcut = ({ className, ...props }) => {
951
- return /* @__PURE__ */ jsx6(
952
- "span",
953
- {
954
- "data-slot": "command-shortcut",
955
- className: cn("ms-auto text-muted-foreground text-xs tracking-widest", className),
956
- ...props
957
- }
958
- );
959
- };
960
- function CommandCheck({ icon: Icon = Check, className, ...props }) {
961
- return /* @__PURE__ */ jsx6(
962
- Icon,
963
- {
964
- "data-slot": "command-check",
965
- "data-check": "true",
966
- className: cn("ms-auto size-4 text-primary", className),
967
- ...props
968
- }
969
- );
970
- }
971
-
972
- // src/ui/default/dropdown-menu.tsx
973
- import { Check as Check2, ChevronRight, Circle } from "lucide-react";
974
- import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
975
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
976
- function DropdownMenu({ ...props }) {
977
- return /* @__PURE__ */ jsx7(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
978
- }
979
- function DropdownMenuPortal({
980
- ...props
981
- }) {
982
- return /* @__PURE__ */ jsx7(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
983
- }
984
- function DropdownMenuTrigger({
985
- ...props
986
- }) {
987
- return /* @__PURE__ */ jsx7(
988
- DropdownMenuPrimitive.Trigger,
989
- {
990
- className: "select-none",
991
- "data-slot": "dropdown-menu-trigger",
992
- ...props
993
- }
994
- );
995
- }
996
- function DropdownMenuSubTrigger({
997
- className,
998
- inset,
999
- children,
1000
- ...props
1001
- }) {
1002
- return /* @__PURE__ */ jsxs5(
1003
- DropdownMenuPrimitive.SubTrigger,
1004
- {
1005
- "data-slot": "dropdown-menu-sub-trigger",
1006
- className: cn(
1007
- "flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden",
1008
- "focus:bg-accent focus:text-foreground",
1009
- "data-[state=open]:bg-accent data-[state=open]:text-foreground",
1010
- "data-[here=true]:bg-accent data-[here=true]:text-foreground",
1011
- "[&>svg]:pointer-events-none [&>svg]:size-4 [&>svg]:shrink-0 [&_svg:not([role=img]):not([class*=text-])]:opacity-60",
1012
- inset && "ps-8",
1013
- className
1014
- ),
1015
- ...props,
1016
- children: [
1017
- children,
1018
- /* @__PURE__ */ jsx7(
1019
- ChevronRight,
1020
- {
1021
- "data-slot": "dropdown-menu-sub-trigger-indicator",
1022
- className: "ms-auto size-3.5! rtl:rotate-180"
1023
- }
1024
- )
1025
- ]
1026
- }
1027
- );
1028
- }
1029
- function DropdownMenuSubContent({
1030
- className,
1031
- ...props
1032
- }) {
1033
- return /* @__PURE__ */ jsx7(
1034
- DropdownMenuPrimitive.SubContent,
1035
- {
1036
- "data-slot": "dropdown-menu-sub-content",
1037
- className: cn(
1038
- "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 min-w-32 space-y-0.5 overflow-hidden rounded-md border border-border bg-popover p-2 text-popover-foreground shadow-black/5 shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in",
1039
- className
1040
- ),
1041
- ...props
1042
- }
1043
- );
1044
- }
1045
- function DropdownMenuContent({
1046
- className,
1047
- sideOffset = 4,
1048
- ...props
1049
- }) {
1050
- return /* @__PURE__ */ jsx7(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx7(
1051
- DropdownMenuPrimitive.Content,
1052
- {
1053
- "data-slot": "dropdown-menu-content",
1054
- sideOffset,
1055
- className: cn(
1056
- "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 min-w-32 space-y-0.5 overflow-hidden rounded-md border border-border bg-popover p-2 text-popover-foreground shadow-black/5 shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in",
1057
- className
1058
- ),
1059
- ...props
1060
- }
1061
- ) });
1062
- }
1063
- function DropdownMenuGroup({ ...props }) {
1064
- return /* @__PURE__ */ jsx7(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
1065
- }
1066
- function DropdownMenuItem({
1067
- className,
1068
- inset,
1069
- variant,
1070
- ...props
1071
- }) {
1072
- return /* @__PURE__ */ jsx7(
1073
- DropdownMenuPrimitive.Item,
1074
- {
1075
- "data-slot": "dropdown-menu-item",
1076
- className: cn(
1077
- "relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-foreground text-sm outline-hidden transition-colors data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg:not([class*=size-])]:size-4 [&_svg:not([role=img]):not([class*=text-])]:opacity-60 [&_svg]:pointer-events-none [&_svg]:shrink-0",
1078
- "focus:bg-accent focus:text-foreground",
1079
- "data-[active=true]:bg-accent data-[active=true]:text-accent-foreground",
1080
- inset && "ps-8",
1081
- variant === "destructive" && "text-destructive hover:bg-destructive/5 hover:text-destructive focus:bg-destructive/5 focus:text-destructive data-[active=true]:bg-destructive/5",
1082
- className
1083
- ),
1084
- ...props
1085
- }
1086
- );
1087
- }
1088
- function DropdownMenuCheckboxItem({
1089
- className,
1090
- children,
1091
- checked,
1092
- ...props
1093
- }) {
1094
- return /* @__PURE__ */ jsxs5(
1095
- DropdownMenuPrimitive.CheckboxItem,
1096
- {
1097
- "data-slot": "dropdown-menu-checkbox-item",
1098
- className: cn(
1099
- "relative flex cursor-default select-none items-center rounded-md py-1.5 ps-8 pe-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
1100
- className
1101
- ),
1102
- checked,
1103
- ...props,
1104
- children: [
1105
- /* @__PURE__ */ jsx7("span", { className: "absolute start-2 flex h-3.5 w-3.5 items-center justify-center text-muted-foreground", children: /* @__PURE__ */ jsx7(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx7(Check2, { className: "h-4 w-4 text-primary" }) }) }),
1106
- children
1107
- ]
1108
- }
1109
- );
1110
- }
1111
- function DropdownMenuRadioItem({
1112
- className,
1113
- children,
1114
- ...props
1115
- }) {
1116
- return /* @__PURE__ */ jsxs5(
1117
- DropdownMenuPrimitive.RadioItem,
1118
- {
1119
- "data-slot": "dropdown-menu-radio-item",
1120
- className: cn(
1121
- "relative flex cursor-default select-none items-center rounded-md py-1.5 ps-6 pe-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
1122
- className
1123
- ),
1124
- ...props,
1125
- children: [
1126
- /* @__PURE__ */ jsx7("span", { className: "absolute start-1.5 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx7(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx7(Circle, { className: "h-1.5 w-1.5 fill-primary stroke-primary" }) }) }),
1127
- children
1128
- ]
1129
- }
1130
- );
1131
- }
1132
- function DropdownMenuLabel({
1133
- className,
1134
- inset,
1135
- ...props
1136
- }) {
1137
- return /* @__PURE__ */ jsx7(
1138
- DropdownMenuPrimitive.Label,
1139
- {
1140
- "data-slot": "dropdown-menu-label",
1141
- className: cn(
1142
- "px-2 py-1.5 font-medium text-muted-foreground text-xs",
1143
- inset && "ps-8",
1144
- className
1145
- ),
1146
- ...props
1147
- }
1148
- );
1149
- }
1150
- function DropdownMenuRadioGroup({
1151
- ...props
1152
- }) {
1153
- return /* @__PURE__ */ jsx7(DropdownMenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props });
1154
- }
1155
- function DropdownMenuSeparator({
1156
- className,
1157
- ...props
1158
- }) {
1159
- return /* @__PURE__ */ jsx7(
1160
- DropdownMenuPrimitive.Separator,
1161
- {
1162
- "data-slot": "dropdown-menu-separator",
1163
- className: cn("-mx-2 my-1.5 h-px bg-muted", className),
1164
- ...props
1165
- }
1166
- );
1167
- }
1168
- function DropdownMenuShortcut({ className, ...props }) {
1169
- return /* @__PURE__ */ jsx7(
1170
- "span",
1171
- {
1172
- "data-slot": "dropdown-menu-shortcut",
1173
- className: cn("ms-auto text-xs tracking-widest opacity-60", className),
1174
- ...props
1175
- }
1176
- );
1177
- }
1178
- function DropdownMenuSub({ ...props }) {
1179
- return /* @__PURE__ */ jsx7(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
1180
- }
1181
-
1182
- // src/ui/default/collapsible.tsx
1183
- import { Collapsible as CollapsiblePrimitive } from "radix-ui";
1184
- import { jsx as jsx8 } from "react/jsx-runtime";
1185
- function Collapsible({ ...props }) {
1186
- return /* @__PURE__ */ jsx8(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
1187
- }
1188
- function CollapsibleTrigger({
1189
- ...props
1190
- }) {
1191
- return /* @__PURE__ */ jsx8(CollapsiblePrimitive.CollapsibleTrigger, { "data-slot": "collapsible-trigger", ...props });
1192
- }
1193
- function CollapsibleContent({
1194
- className,
1195
- children,
1196
- ...props
1197
- }) {
1198
- return /* @__PURE__ */ jsx8(
1199
- CollapsiblePrimitive.CollapsibleContent,
1200
- {
1201
- "data-slot": "collapsible-content",
1202
- className: cn(
1203
- "overflow-hidden transition-all data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",
1204
- className
1205
- ),
1206
- ...props,
1207
- children
1208
- }
1209
- );
1210
- }
1211
-
1212
- // src/ui/default/drawer.tsx
1213
- import { Drawer as DrawerPrimitive } from "vaul";
1214
- import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
1215
- var Drawer = ({
1216
- shouldScaleBackground = true,
1217
- ...props
1218
- }) => /* @__PURE__ */ jsx9(DrawerPrimitive.Root, { shouldScaleBackground, ...props });
1219
- function DrawerTrigger({ ...props }) {
1220
- return /* @__PURE__ */ jsx9(DrawerPrimitive.Trigger, { "data-slot": "drawer-trigger", ...props });
1221
- }
1222
- function DrawerPortal({ ...props }) {
1223
- return /* @__PURE__ */ jsx9(DrawerPrimitive.Portal, { "data-slot": "drawer-portal", ...props });
1224
- }
1225
- function DrawerClose({ ...props }) {
1226
- return /* @__PURE__ */ jsx9(DrawerPrimitive.Close, { "data-slot": "drawer-close", ...props });
1227
- }
1228
- function DrawerOverlay({
1229
- className,
1230
- ...props
1231
- }) {
1232
- return /* @__PURE__ */ jsx9(
1233
- DrawerPrimitive.Overlay,
1234
- {
1235
- "data-slot": "drawer-overlay",
1236
- className: cn("fixed inset-0 z-50 bg-black/80", className),
1237
- ...props
1238
- }
1239
- );
1240
- }
1241
- function DrawerContent({
1242
- className,
1243
- children,
1244
- ...props
1245
- }) {
1246
- return /* @__PURE__ */ jsxs6(DrawerPortal, { children: [
1247
- /* @__PURE__ */ jsx9(DrawerOverlay, {}),
1248
- /* @__PURE__ */ jsxs6(
1249
- DrawerPrimitive.Content,
1250
- {
1251
- "data-slot": "drawer-content",
1252
- className: cn(
1253
- "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
1254
- className
1255
- ),
1256
- ...props,
1257
- children: [
1258
- /* @__PURE__ */ jsx9("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
1259
- children
1260
- ]
1261
- }
1262
- )
1263
- ] });
1264
- }
1265
- var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ jsx9(
1266
- "div",
1267
- {
1268
- "data-slot": "drawer-header",
1269
- className: cn("grid gap-1.5 p-4 text-center sm:text-left", className),
1270
- ...props
1271
- }
1272
- );
1273
- var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ jsx9(
1274
- "div",
1275
- {
1276
- "data-slot": "drawer-footer",
1277
- className: cn("mt-auto flex flex-col gap-2 p-4", className),
1278
- ...props
1279
- }
1280
- );
1281
- function DrawerTitle({ className, ...props }) {
1282
- return /* @__PURE__ */ jsx9(
1283
- DrawerPrimitive.Title,
1284
- {
1285
- "data-slot": "drawer-title",
1286
- className: cn("font-semibold text-lg leading-none tracking-tight", className),
1287
- ...props
1288
- }
1289
- );
1290
- }
1291
- function DrawerDescription({
1292
- className,
1293
- ...props
1294
- }) {
1295
- return /* @__PURE__ */ jsx9(
1296
- DrawerPrimitive.Description,
1297
- {
1298
- "data-slot": "drawer-description",
1299
- className: cn("text-muted-foreground text-sm", className),
1300
- ...props
1301
- }
1302
- );
1303
- }
1304
-
1305
- // src/ui/default/tooltip.tsx
1306
- import { Tooltip as TooltipPrimitive } from "radix-ui";
1307
- import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
1308
- function TooltipProvider({
1309
- delayDuration = 0,
1310
- ...props
1311
- }) {
1312
- return /* @__PURE__ */ jsx10(
1313
- TooltipPrimitive.Provider,
1314
- {
1315
- "data-slot": "tooltip-provider",
1316
- delayDuration,
1317
- ...props
1318
- }
1319
- );
1320
- }
1321
- function Tooltip({ ...props }) {
1322
- return /* @__PURE__ */ jsx10(TooltipProvider, { children: /* @__PURE__ */ jsx10(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
1323
- }
1324
- function TooltipTrigger({ ...props }) {
1325
- return /* @__PURE__ */ jsx10(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
1326
- }
1327
- function TooltipContent({
1328
- className,
1329
- sideOffset = 0,
1330
- children,
1331
- ...props
1332
- }) {
1333
- return /* @__PURE__ */ jsx10(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs7(
1334
- TooltipPrimitive.Content,
1335
- {
1336
- "data-slot": "tooltip-content",
1337
- sideOffset,
1338
- className: cn(
1339
- "fade-in-0 zoom-in-95 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in text-balance rounded-md bg-foreground px-3 py-1.5 text-background text-xs data-[state=closed]:animate-out",
1340
- className
1341
- ),
1342
- ...props,
1343
- children: [
1344
- children,
1345
- /* @__PURE__ */ jsx10(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })
1346
- ]
1347
- }
1348
- ) });
1349
- }
1350
-
1351
- // src/ui/default/avatar.tsx
1352
- import { cva as cva5 } from "class-variance-authority";
1353
- import { Avatar as AvatarPrimitive } from "radix-ui";
1354
- import { jsx as jsx11 } from "react/jsx-runtime";
1355
- var avatarStatusVariants = cva5(
1356
- "flex items-center rounded-full size-2 border-2 border-background",
1357
- {
1358
- variants: {
1359
- variant: {
1360
- online: "bg-green-600",
1361
- offline: "bg-zinc-400 dark:bg-zinc-500",
1362
- busy: "bg-yellow-600",
1363
- away: "bg-blue-600"
1364
- }
1365
- },
1366
- defaultVariants: {
1367
- variant: "online"
1368
- }
1369
- }
1370
- );
1371
- function Avatar({ className, ...props }) {
1372
- return /* @__PURE__ */ jsx11(
1373
- AvatarPrimitive.Root,
1374
- {
1375
- "data-slot": "avatar",
1376
- className: cn("relative flex size-10 shrink-0", className),
1377
- ...props
1378
- }
1379
- );
1380
- }
1381
- function AvatarImage({ className, ...props }) {
1382
- return /* @__PURE__ */ jsx11("div", { className: cn("relative overflow-hidden rounded-full", className), children: /* @__PURE__ */ jsx11(
1383
- AvatarPrimitive.Image,
1384
- {
1385
- "data-slot": "avatar-image",
1386
- className: cn("aspect-square h-full w-full"),
1387
- ...props
1388
- }
1389
- ) });
1390
- }
1391
- function AvatarFallback({
1392
- className,
1393
- ...props
1394
- }) {
1395
- return /* @__PURE__ */ jsx11(
1396
- AvatarPrimitive.Fallback,
1397
- {
1398
- "data-slot": "avatar-fallback",
1399
- className: cn(
1400
- "flex h-full w-full items-center justify-center rounded-full border border-border bg-accent text-accent-foreground text-xs",
1401
- className
1402
- ),
1403
- ...props
1404
- }
1405
- );
1406
- }
1407
- function AvatarIndicator({ className, ...props }) {
1408
- return /* @__PURE__ */ jsx11(
1409
- "div",
1410
- {
1411
- "data-slot": "avatar-indicator",
1412
- className: cn("absolute flex size-6 items-center justify-center", className),
1413
- ...props
1414
- }
1415
- );
1416
- }
1417
- function AvatarStatus({
1418
- className,
1419
- variant,
1420
- ...props
1421
- }) {
1422
- return /* @__PURE__ */ jsx11(
1423
- "div",
1424
- {
1425
- "data-slot": "avatar-status",
1426
- className: cn(avatarStatusVariants({ variant }), className),
1427
- ...props
1428
- }
1429
- );
1430
- }
1431
-
1432
- export {
1433
- Alert,
1434
- AlertTitle,
1435
- AlertIcon,
1436
- AlertToolbar,
1437
- AlertDescription,
1438
- AlertContent,
1439
- AlertDialog,
1440
- AlertDialogTrigger,
1441
- AlertDialogPortal,
1442
- AlertDialogOverlay,
1443
- AlertDialogContent,
1444
- AlertDialogHeader,
1445
- AlertDialogFooter,
1446
- AlertDialogTitle,
1447
- AlertDialogDescription,
1448
- AlertDialogAction,
1449
- AlertDialogCancel,
1450
- Card,
1451
- CardHeader,
1452
- CardContent,
1453
- CardTable,
1454
- CardFooter,
1455
- CardHeading,
1456
- CardToolbar,
1457
- CardTitle,
1458
- CardDescription,
1459
- badgeVariants,
1460
- Badge,
1461
- BadgeButton,
1462
- BadgeDot,
1463
- Dialog,
1464
- DialogTrigger,
1465
- DialogPortal,
1466
- DialogClose,
1467
- DialogOverlay,
1468
- DialogContent,
1469
- DialogHeader,
1470
- DialogFooter,
1471
- DialogTitle,
1472
- DialogBody,
1473
- DialogDescription,
1474
- Command,
1475
- CommandDialog,
1476
- CommandInput,
1477
- CommandList,
1478
- CommandEmpty,
1479
- CommandGroup,
1480
- CommandSeparator,
1481
- CommandItem,
1482
- CommandShortcut,
1483
- CommandCheck,
1484
- DropdownMenu,
1485
- DropdownMenuPortal,
1486
- DropdownMenuTrigger,
1487
- DropdownMenuSubTrigger,
1488
- DropdownMenuSubContent,
1489
- DropdownMenuContent,
1490
- DropdownMenuGroup,
1491
- DropdownMenuItem,
1492
- DropdownMenuCheckboxItem,
1493
- DropdownMenuRadioItem,
1494
- DropdownMenuLabel,
1495
- DropdownMenuRadioGroup,
1496
- DropdownMenuSeparator,
1497
- DropdownMenuShortcut,
1498
- DropdownMenuSub,
1499
- Collapsible,
1500
- CollapsibleTrigger,
1501
- CollapsibleContent,
1502
- Drawer,
1503
- DrawerTrigger,
1504
- DrawerPortal,
1505
- DrawerClose,
1506
- DrawerOverlay,
1507
- DrawerContent,
1508
- DrawerHeader,
1509
- DrawerFooter,
1510
- DrawerTitle,
1511
- DrawerDescription,
1512
- TooltipProvider,
1513
- Tooltip,
1514
- TooltipTrigger,
1515
- TooltipContent,
1516
- avatarStatusVariants,
1517
- Avatar,
1518
- AvatarImage,
1519
- AvatarFallback,
1520
- AvatarIndicator,
1521
- AvatarStatus
1522
- };