@foundrykit/primitives 2.0.8 → 2.0.10

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 (175) hide show
  1. package/dist/{chunk-D4X2ZO5T.js → chunk-2SBGU5XA.js} +2 -2
  2. package/dist/chunk-3NQR7JZR.js +128 -0
  3. package/dist/{chunk-3MEIDBWZ.js → chunk-3QUMCM5K.js} +2 -2
  4. package/dist/chunk-B5YCE3UP.js +57 -0
  5. package/dist/chunk-F2TEA6ER.js +138 -0
  6. package/dist/{chunk-5OSYIETI.js → chunk-FRIOQFPE.js} +1 -1
  7. package/dist/{chunk-EDKSYP4L.js → chunk-G2YBCHWR.js} +1 -1
  8. package/dist/{chunk-DKBMAFIR.js → chunk-GKCBSG2W.js} +2 -0
  9. package/dist/chunk-HS46TIMU.js +75 -0
  10. package/dist/{chunk-R3IEOV2B.js → chunk-P5KEJOBH.js} +1 -1
  11. package/dist/{chunk-FIRYLO5W.js → chunk-SDYKJVXX.js} +2 -2
  12. package/dist/chunk-SIQHWNPH.js +45 -0
  13. package/dist/{chunk-2PXD7LAX.js → chunk-U7JIOR7A.js} +3 -3
  14. package/dist/{chunk-VA4MKQN7.js → chunk-W4XY3SNY.js} +1 -1
  15. package/dist/chunk-XCPGTXEJ.js +23 -0
  16. package/dist/components/alert-dialog/index.cjs +1 -1
  17. package/dist/components/alert-dialog/index.js +1 -1
  18. package/dist/components/card/index.cjs +63 -61
  19. package/dist/components/card/index.d.cts +8 -7
  20. package/dist/components/card/index.d.ts +8 -7
  21. package/dist/components/card/index.js +1 -1
  22. package/dist/components/context-menu/index.cjs +2 -2
  23. package/dist/components/context-menu/index.js +1 -1
  24. package/dist/components/dialog/index.cjs +182 -0
  25. package/dist/components/dialog/index.d.cts +38 -0
  26. package/dist/components/dialog/index.d.ts +38 -0
  27. package/dist/components/dialog/index.js +25 -0
  28. package/dist/components/dropdown/index.cjs +2 -2
  29. package/dist/components/dropdown/index.js +1 -1
  30. package/dist/components/hover-card/index.cjs +1 -1
  31. package/dist/components/hover-card/index.js +1 -1
  32. package/dist/components/input/index.cjs +16 -28
  33. package/dist/components/input/index.d.cts +6 -5
  34. package/dist/components/input/index.d.ts +6 -5
  35. package/dist/components/input/index.js +1 -1
  36. package/dist/components/input-group/index.cjs +270 -0
  37. package/dist/components/input-group/index.d.cts +44 -0
  38. package/dist/components/input-group/index.d.ts +44 -0
  39. package/dist/components/input-group/index.js +153 -0
  40. package/dist/components/menubar/index.cjs +2 -2
  41. package/dist/components/menubar/index.js +1 -1
  42. package/dist/components/navigation-menu/index.cjs +3 -3
  43. package/dist/components/navigation-menu/index.js +1 -1
  44. package/dist/components/popover/index.cjs +1 -1
  45. package/dist/components/popover/index.js +1 -1
  46. package/dist/components/select/index.cjs +1 -1
  47. package/dist/components/select/index.js +1 -1
  48. package/dist/components/sheet/index.cjs +170 -0
  49. package/dist/components/sheet/index.d.cts +31 -0
  50. package/dist/components/sheet/index.d.ts +31 -0
  51. package/dist/components/sheet/index.js +21 -0
  52. package/dist/components/slider/index.cjs +2 -0
  53. package/dist/components/slider/index.d.cts +3 -2
  54. package/dist/components/slider/index.d.ts +3 -2
  55. package/dist/components/slider/index.js +1 -1
  56. package/dist/components/toggle/index.cjs +81 -0
  57. package/dist/components/toggle/index.d.cts +26 -0
  58. package/dist/components/toggle/index.d.ts +26 -0
  59. package/dist/components/toggle/index.js +9 -0
  60. package/dist/components/tooltip/index.cjs +95 -0
  61. package/dist/components/tooltip/index.d.cts +25 -0
  62. package/dist/components/tooltip/index.d.ts +25 -0
  63. package/dist/components/tooltip/index.js +13 -0
  64. package/dist/index.cjs +107 -95
  65. package/dist/index.d.cts +11 -105
  66. package/dist/index.d.ts +11 -105
  67. package/dist/index.js +108 -414
  68. package/package.json +200 -8
  69. package/.turbo/turbo-build.log +0 -235
  70. package/.turbo/turbo-type-check.log +0 -4
  71. package/CHANGELOG.md +0 -224
  72. package/dist/chunk-DFGLEAZI.js +0 -63
  73. package/dist/chunk-RDQF3IQE.js +0 -25
  74. package/postcss.config.mjs +0 -6
  75. package/registry.json +0 -64
  76. package/src/components/accordion/config.ts +0 -28
  77. package/src/components/accordion/index.tsx +0 -80
  78. package/src/components/alert/config.ts +0 -40
  79. package/src/components/alert/index.tsx +0 -80
  80. package/src/components/alert-dialog/config.ts +0 -28
  81. package/src/components/alert-dialog/index.tsx +0 -188
  82. package/src/components/aspect-ratio/config.ts +0 -27
  83. package/src/components/aspect-ratio/index.tsx +0 -24
  84. package/src/components/avatar/config.ts +0 -46
  85. package/src/components/avatar/index.tsx +0 -67
  86. package/src/components/badge/config.ts +0 -56
  87. package/src/components/badge/index.tsx +0 -56
  88. package/src/components/breadcrumb/config.ts +0 -121
  89. package/src/components/breadcrumb/index.tsx +0 -127
  90. package/src/components/button/config.ts +0 -97
  91. package/src/components/button/index.tsx +0 -86
  92. package/src/components/button-group/config.ts +0 -39
  93. package/src/components/button-group/index.tsx +0 -99
  94. package/src/components/card/config.ts +0 -89
  95. package/src/components/card/index.tsx +0 -98
  96. package/src/components/checkbox/config.ts +0 -46
  97. package/src/components/checkbox/index.tsx +0 -41
  98. package/src/components/collapsible/config.ts +0 -27
  99. package/src/components/collapsible/index.tsx +0 -47
  100. package/src/components/context-menu/config.ts +0 -28
  101. package/src/components/context-menu/index.tsx +0 -271
  102. package/src/components/dialog/config.ts +0 -582
  103. package/src/components/dialog/index.tsx +0 -162
  104. package/src/components/direction/config.ts +0 -28
  105. package/src/components/direction/index.tsx +0 -27
  106. package/src/components/drawer/config.ts +0 -28
  107. package/src/components/drawer/index.tsx +0 -153
  108. package/src/components/dropdown/config.ts +0 -262
  109. package/src/components/dropdown/index.tsx +0 -280
  110. package/src/components/empty/config.ts +0 -38
  111. package/src/components/empty/index.tsx +0 -127
  112. package/src/components/field/config.ts +0 -40
  113. package/src/components/field/index.tsx +0 -252
  114. package/src/components/hover-card/config.ts +0 -27
  115. package/src/components/hover-card/index.tsx +0 -56
  116. package/src/components/input/config.ts +0 -64
  117. package/src/components/input/index.tsx +0 -33
  118. package/src/components/input-group/config.ts +0 -209
  119. package/src/components/input-group/index.tsx +0 -177
  120. package/src/components/item/config.ts +0 -52
  121. package/src/components/item/index.tsx +0 -215
  122. package/src/components/kbd/config.ts +0 -38
  123. package/src/components/kbd/index.tsx +0 -40
  124. package/src/components/label/config.ts +0 -72
  125. package/src/components/label/index.tsx +0 -32
  126. package/src/components/menubar/config.ts +0 -28
  127. package/src/components/menubar/index.tsx +0 -295
  128. package/src/components/native-select/config.ts +0 -40
  129. package/src/components/native-select/index.tsx +0 -40
  130. package/src/components/navigation-menu/config.ts +0 -32
  131. package/src/components/navigation-menu/index.tsx +0 -188
  132. package/src/components/popover/config.ts +0 -222
  133. package/src/components/popover/index.tsx +0 -60
  134. package/src/components/progress/config.ts +0 -42
  135. package/src/components/progress/index.tsx +0 -39
  136. package/src/components/radio-group/config.ts +0 -303
  137. package/src/components/radio-group/index.tsx +0 -58
  138. package/src/components/resizable/config.ts +0 -28
  139. package/src/components/resizable/index.tsx +0 -67
  140. package/src/components/scroll-area/config.ts +0 -17
  141. package/src/components/scroll-area/index.tsx +0 -70
  142. package/src/components/select/config.ts +0 -277
  143. package/src/components/select/index.tsx +0 -202
  144. package/src/components/separator/config.ts +0 -63
  145. package/src/components/separator/index.tsx +0 -38
  146. package/src/components/sheet/config.ts +0 -16
  147. package/src/components/sheet/index.tsx +0 -153
  148. package/src/components/skeleton/config.ts +0 -77
  149. package/src/components/skeleton/index.tsx +0 -22
  150. package/src/components/slider/config.ts +0 -46
  151. package/src/components/slider/index.tsx +0 -73
  152. package/src/components/sonner/config.ts +0 -27
  153. package/src/components/sonner/index.tsx +0 -37
  154. package/src/components/spinner/config.ts +0 -40
  155. package/src/components/spinner/index.tsx +0 -30
  156. package/src/components/switch/config.ts +0 -171
  157. package/src/components/switch/index.tsx +0 -40
  158. package/src/components/table/config.ts +0 -38
  159. package/src/components/table/index.tsx +0 -135
  160. package/src/components/tabs/config.ts +0 -335
  161. package/src/components/tabs/index.tsx +0 -82
  162. package/src/components/textarea/config.ts +0 -117
  163. package/src/components/textarea/index.tsx +0 -26
  164. package/src/components/toggle/config.ts +0 -67
  165. package/src/components/toggle/index.tsx +0 -59
  166. package/src/components/toggle-group/config.ts +0 -46
  167. package/src/components/toggle-group/index.tsx +0 -106
  168. package/src/components/tooltip/config.ts +0 -16
  169. package/src/components/tooltip/index.tsx +0 -75
  170. package/src/components/typography/config.ts +0 -38
  171. package/src/components/typography/index.tsx +0 -172
  172. package/src/index.ts +0 -291
  173. package/tsconfig.json +0 -9
  174. package/tsconfig.lint.json +0 -8
  175. package/tsup.config.ts +0 -55
package/dist/index.js CHANGED
@@ -1,17 +1,4 @@
1
1
  "use client";
2
- import {
3
- Tabs,
4
- TabsContent,
5
- TabsList,
6
- TabsTrigger
7
- } from "./chunk-FF5D53KL.js";
8
- import {
9
- Textarea
10
- } from "./chunk-XVIHRZGJ.js";
11
- import {
12
- ToggleGroup,
13
- ToggleGroupItem
14
- } from "./chunk-GPEL656S.js";
15
2
  import {
16
3
  TypographyBlockquote,
17
4
  TypographyH1,
@@ -26,6 +13,51 @@ import {
26
13
  TypographyP,
27
14
  TypographySmall
28
15
  } from "./chunk-TA23RNS4.js";
16
+ import {
17
+ Spinner
18
+ } from "./chunk-EEAK2RWF.js";
19
+ import {
20
+ Switch
21
+ } from "./chunk-DXZ4GUQO.js";
22
+ import {
23
+ Table,
24
+ TableBody,
25
+ TableCaption,
26
+ TableCell,
27
+ TableFooter,
28
+ TableHead,
29
+ TableHeader,
30
+ TableRow
31
+ } from "./chunk-67UXTT4O.js";
32
+ import {
33
+ Tabs,
34
+ TabsContent,
35
+ TabsList,
36
+ TabsTrigger
37
+ } from "./chunk-FF5D53KL.js";
38
+ import {
39
+ Toggle,
40
+ toggleVariants
41
+ } from "./chunk-SIQHWNPH.js";
42
+ import {
43
+ ToggleGroup,
44
+ ToggleGroupItem
45
+ } from "./chunk-GPEL656S.js";
46
+ import {
47
+ Tooltip,
48
+ TooltipContent,
49
+ TooltipProvider,
50
+ TooltipTrigger
51
+ } from "./chunk-B5YCE3UP.js";
52
+ import {
53
+ ResizableHandle,
54
+ ResizablePanel,
55
+ ResizablePanelGroup
56
+ } from "./chunk-PAO3DSEF.js";
57
+ import {
58
+ ScrollArea,
59
+ ScrollBar
60
+ } from "./chunk-MYIUX3DT.js";
29
61
  import {
30
62
  Select,
31
63
  SelectContent,
@@ -37,33 +69,34 @@ import {
37
69
  SelectSeparator,
38
70
  SelectTrigger,
39
71
  SelectValue
40
- } from "./chunk-5OSYIETI.js";
72
+ } from "./chunk-FRIOQFPE.js";
73
+ import {
74
+ Sheet,
75
+ SheetClose,
76
+ SheetContent,
77
+ SheetDescription,
78
+ SheetFooter,
79
+ SheetHeader,
80
+ SheetTitle,
81
+ SheetTrigger
82
+ } from "./chunk-3NQR7JZR.js";
41
83
  import {
42
84
  Skeleton
43
85
  } from "./chunk-SKR3J46C.js";
44
86
  import {
45
87
  Slider
46
- } from "./chunk-DKBMAFIR.js";
88
+ } from "./chunk-GKCBSG2W.js";
47
89
  import {
48
90
  Toaster,
49
91
  toast
50
92
  } from "./chunk-VPBVKBZ7.js";
51
93
  import {
52
- Spinner
53
- } from "./chunk-EEAK2RWF.js";
54
- import {
55
- Switch
56
- } from "./chunk-DXZ4GUQO.js";
94
+ Kbd,
95
+ KbdGroup
96
+ } from "./chunk-PLLG76QJ.js";
57
97
  import {
58
- Table,
59
- TableBody,
60
- TableCaption,
61
- TableCell,
62
- TableFooter,
63
- TableHead,
64
- TableHeader,
65
- TableRow
66
- } from "./chunk-67UXTT4O.js";
98
+ Label
99
+ } from "./chunk-MCXSVXO4.js";
67
100
  import {
68
101
  Menubar,
69
102
  MenubarCheckboxItem,
@@ -81,7 +114,7 @@ import {
81
114
  MenubarSubContent,
82
115
  MenubarSubTrigger,
83
116
  MenubarTrigger
84
- } from "./chunk-FIRYLO5W.js";
117
+ } from "./chunk-SDYKJVXX.js";
85
118
  import {
86
119
  NativeSelect
87
120
  } from "./chunk-76APYFRN.js";
@@ -95,13 +128,13 @@ import {
95
128
  NavigationMenuTrigger,
96
129
  NavigationMenuViewport,
97
130
  navigationMenuTriggerStyle
98
- } from "./chunk-2PXD7LAX.js";
131
+ } from "./chunk-U7JIOR7A.js";
99
132
  import {
100
133
  Popover,
101
134
  PopoverAnchor,
102
135
  PopoverContent,
103
136
  PopoverTrigger
104
- } from "./chunk-EDKSYP4L.js";
137
+ } from "./chunk-G2YBCHWR.js";
105
138
  import {
106
139
  Progress
107
140
  } from "./chunk-MMZJQ7RW.js";
@@ -110,14 +143,17 @@ import {
110
143
  RadioGroupItem
111
144
  } from "./chunk-SUEPE6OX.js";
112
145
  import {
113
- ResizableHandle,
114
- ResizablePanel,
115
- ResizablePanelGroup
116
- } from "./chunk-PAO3DSEF.js";
117
- import {
118
- ScrollArea,
119
- ScrollBar
120
- } from "./chunk-MYIUX3DT.js";
146
+ Drawer,
147
+ DrawerClose,
148
+ DrawerContent,
149
+ DrawerDescription,
150
+ DrawerFooter,
151
+ DrawerHeader,
152
+ DrawerOverlay,
153
+ DrawerPortal,
154
+ DrawerTitle,
155
+ DrawerTrigger
156
+ } from "./chunk-ED6T7ZZN.js";
121
157
  import {
122
158
  DropdownMenu,
123
159
  DropdownMenuCheckboxItem,
@@ -134,7 +170,7 @@ import {
134
170
  DropdownMenuSubContent,
135
171
  DropdownMenuSubTrigger,
136
172
  DropdownMenuTrigger
137
- } from "./chunk-D4X2ZO5T.js";
173
+ } from "./chunk-2SBGU5XA.js";
138
174
  import {
139
175
  Empty,
140
176
  EmptyContent,
@@ -161,10 +197,13 @@ import {
161
197
  HoverCard,
162
198
  HoverCardContent,
163
199
  HoverCardTrigger
164
- } from "./chunk-VA4MKQN7.js";
200
+ } from "./chunk-W4XY3SNY.js";
201
+ import {
202
+ Textarea
203
+ } from "./chunk-XVIHRZGJ.js";
165
204
  import {
166
205
  Input
167
- } from "./chunk-RDQF3IQE.js";
206
+ } from "./chunk-XCPGTXEJ.js";
168
207
  import {
169
208
  Item,
170
209
  ItemActions,
@@ -179,13 +218,6 @@ import {
179
218
  itemMediaVariants,
180
219
  itemVariants
181
220
  } from "./chunk-JTSIBZS4.js";
182
- import {
183
- Kbd,
184
- KbdGroup
185
- } from "./chunk-PLLG76QJ.js";
186
- import {
187
- Label
188
- } from "./chunk-MCXSVXO4.js";
189
221
  import {
190
222
  Button,
191
223
  buttonVariants
@@ -206,7 +238,7 @@ import {
206
238
  CardFooter,
207
239
  CardHeader,
208
240
  CardTitle
209
- } from "./chunk-DFGLEAZI.js";
241
+ } from "./chunk-HS46TIMU.js";
210
242
  import {
211
243
  Checkbox
212
244
  } from "./chunk-3UKWAM5M.js";
@@ -231,35 +263,21 @@ import {
231
263
  ContextMenuSubContent,
232
264
  ContextMenuSubTrigger,
233
265
  ContextMenuTrigger
234
- } from "./chunk-3MEIDBWZ.js";
266
+ } from "./chunk-3QUMCM5K.js";
267
+ import {
268
+ Dialog,
269
+ DialogClose,
270
+ DialogContent,
271
+ DialogDescription,
272
+ DialogFooter,
273
+ DialogHeader,
274
+ DialogTitle,
275
+ DialogTrigger
276
+ } from "./chunk-F2TEA6ER.js";
235
277
  import {
236
278
  DirectionProvider,
237
279
  useDirection
238
280
  } from "./chunk-YT2ZIMZI.js";
239
- import {
240
- Drawer,
241
- DrawerClose,
242
- DrawerContent,
243
- DrawerDescription,
244
- DrawerFooter,
245
- DrawerHeader,
246
- DrawerOverlay,
247
- DrawerPortal,
248
- DrawerTitle,
249
- DrawerTrigger
250
- } from "./chunk-ED6T7ZZN.js";
251
- import {
252
- Accordion,
253
- AccordionContent,
254
- AccordionItem,
255
- AccordionTrigger
256
- } from "./chunk-2JOT4DV4.js";
257
- import {
258
- Alert,
259
- AlertDescription,
260
- AlertTitle,
261
- alertVariants
262
- } from "./chunk-BIFBYERK.js";
263
281
  import {
264
282
  AlertDialog,
265
283
  AlertDialogAction,
@@ -272,10 +290,22 @@ import {
272
290
  AlertDialogPortal,
273
291
  AlertDialogTitle,
274
292
  AlertDialogTrigger
275
- } from "./chunk-R3IEOV2B.js";
293
+ } from "./chunk-P5KEJOBH.js";
276
294
  import {
277
295
  AspectRatio
278
296
  } from "./chunk-AJAAMJYH.js";
297
+ import {
298
+ Alert,
299
+ AlertDescription,
300
+ AlertTitle,
301
+ alertVariants
302
+ } from "./chunk-BIFBYERK.js";
303
+ import {
304
+ Accordion,
305
+ AccordionContent,
306
+ AccordionItem,
307
+ AccordionTrigger
308
+ } from "./chunk-2JOT4DV4.js";
279
309
  import {
280
310
  Avatar,
281
311
  AvatarFallback,
@@ -296,343 +326,7 @@ import {
296
326
  } from "./chunk-3BAO7TAS.js";
297
327
 
298
328
  // src/index.ts
299
- import { cn as cn5 } from "@foundrykit/utils";
300
-
301
- // src/components/dialog/index.tsx
302
329
  import { cn } from "@foundrykit/utils";
303
- import * as DialogPrimitive from "@radix-ui/react-dialog";
304
- import { XIcon } from "lucide-react";
305
- import { jsx, jsxs } from "react/jsx-runtime";
306
- function Dialog({
307
- ...props
308
- }) {
309
- return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
310
- }
311
- function DialogTrigger({
312
- ...props
313
- }) {
314
- return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
315
- }
316
- function DialogPortal({
317
- ...props
318
- }) {
319
- return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
320
- }
321
- function DialogClose({
322
- ...props
323
- }) {
324
- return /* @__PURE__ */ jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
325
- }
326
- function DialogOverlay({
327
- className,
328
- ...props
329
- }) {
330
- return /* @__PURE__ */ jsx(
331
- DialogPrimitive.Overlay,
332
- {
333
- "data-slot": "dialog-overlay",
334
- className: cn(
335
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
336
- className
337
- ),
338
- ...props
339
- }
340
- );
341
- }
342
- function DialogContent({
343
- className,
344
- children,
345
- showCloseButton = true,
346
- ...props
347
- }) {
348
- return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
349
- /* @__PURE__ */ jsx(DialogOverlay, {}),
350
- /* @__PURE__ */ jsxs(
351
- DialogPrimitive.Content,
352
- {
353
- "data-slot": "dialog-content",
354
- className: cn(
355
- "bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
356
- className
357
- ),
358
- ...props,
359
- children: [
360
- children,
361
- showCloseButton && /* @__PURE__ */ jsxs(
362
- DialogPrimitive.Close,
363
- {
364
- "data-slot": "dialog-close",
365
- className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
366
- children: [
367
- /* @__PURE__ */ jsx(XIcon, {}),
368
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
369
- ]
370
- }
371
- )
372
- ]
373
- }
374
- )
375
- ] });
376
- }
377
- function DialogHeader({ className, ...props }) {
378
- return /* @__PURE__ */ jsx(
379
- "div",
380
- {
381
- "data-slot": "dialog-header",
382
- className: cn("flex flex-col gap-2 text-center sm:text-left", className),
383
- ...props
384
- }
385
- );
386
- }
387
- function DialogFooter({ className, ...props }) {
388
- return /* @__PURE__ */ jsx(
389
- "div",
390
- {
391
- "data-slot": "dialog-footer",
392
- className: cn(
393
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
394
- className
395
- ),
396
- ...props
397
- }
398
- );
399
- }
400
- function DialogTitle({
401
- className,
402
- ...props
403
- }) {
404
- return /* @__PURE__ */ jsx(
405
- DialogPrimitive.Title,
406
- {
407
- "data-slot": "dialog-title",
408
- className: cn("text-lg leading-none font-semibold", className),
409
- ...props
410
- }
411
- );
412
- }
413
- function DialogDescription({
414
- className,
415
- ...props
416
- }) {
417
- return /* @__PURE__ */ jsx(
418
- DialogPrimitive.Description,
419
- {
420
- "data-slot": "dialog-description",
421
- className: cn("text-muted-foreground text-sm", className),
422
- ...props
423
- }
424
- );
425
- }
426
-
427
- // src/components/sheet/index.tsx
428
- import { cn as cn2 } from "@foundrykit/utils";
429
- import * as SheetPrimitive from "@radix-ui/react-dialog";
430
- import { XIcon as XIcon2 } from "lucide-react";
431
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
432
- function Sheet({ ...props }) {
433
- return /* @__PURE__ */ jsx2(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
434
- }
435
- function SheetTrigger({
436
- ...props
437
- }) {
438
- return /* @__PURE__ */ jsx2(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
439
- }
440
- function SheetClose({
441
- ...props
442
- }) {
443
- return /* @__PURE__ */ jsx2(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
444
- }
445
- function SheetPortal({
446
- ...props
447
- }) {
448
- return /* @__PURE__ */ jsx2(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
449
- }
450
- function SheetOverlay({
451
- className,
452
- ...props
453
- }) {
454
- return /* @__PURE__ */ jsx2(
455
- SheetPrimitive.Overlay,
456
- {
457
- "data-slot": "sheet-overlay",
458
- className: cn2(
459
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
460
- className
461
- ),
462
- ...props
463
- }
464
- );
465
- }
466
- function SheetContent({
467
- className,
468
- children,
469
- side = "right",
470
- ...props
471
- }) {
472
- return /* @__PURE__ */ jsxs2(SheetPortal, { children: [
473
- /* @__PURE__ */ jsx2(SheetOverlay, {}),
474
- /* @__PURE__ */ jsxs2(
475
- SheetPrimitive.Content,
476
- {
477
- "data-slot": "sheet-content",
478
- className: cn2(
479
- "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
480
- side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
481
- side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
482
- side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
483
- side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
484
- className
485
- ),
486
- ...props,
487
- children: [
488
- children,
489
- /* @__PURE__ */ jsxs2(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
490
- /* @__PURE__ */ jsx2(XIcon2, { className: "size-4" }),
491
- /* @__PURE__ */ jsx2("span", { className: "sr-only", children: "Close" })
492
- ] })
493
- ]
494
- }
495
- )
496
- ] });
497
- }
498
- function SheetHeader({ className, ...props }) {
499
- return /* @__PURE__ */ jsx2(
500
- "div",
501
- {
502
- "data-slot": "sheet-header",
503
- className: cn2("flex flex-col gap-1.5 p-4", className),
504
- ...props
505
- }
506
- );
507
- }
508
- function SheetFooter({ className, ...props }) {
509
- return /* @__PURE__ */ jsx2(
510
- "div",
511
- {
512
- "data-slot": "sheet-footer",
513
- className: cn2("mt-auto flex flex-col gap-2 p-4", className),
514
- ...props
515
- }
516
- );
517
- }
518
- function SheetTitle({
519
- className,
520
- ...props
521
- }) {
522
- return /* @__PURE__ */ jsx2(
523
- SheetPrimitive.Title,
524
- {
525
- "data-slot": "sheet-title",
526
- className: cn2("text-foreground font-semibold", className),
527
- ...props
528
- }
529
- );
530
- }
531
- function SheetDescription({
532
- className,
533
- ...props
534
- }) {
535
- return /* @__PURE__ */ jsx2(
536
- SheetPrimitive.Description,
537
- {
538
- "data-slot": "sheet-description",
539
- className: cn2("text-muted-foreground text-sm", className),
540
- ...props
541
- }
542
- );
543
- }
544
-
545
- // src/components/toggle/index.tsx
546
- import { cn as cn3 } from "@foundrykit/utils";
547
- import * as TogglePrimitive from "@radix-ui/react-toggle";
548
- import { cva } from "class-variance-authority";
549
- import { jsx as jsx3 } from "react/jsx-runtime";
550
- var toggleVariants = cva(
551
- "hover:bg-muted hover:text-muted-foreground data-[state=on]:bg-accent data-[state=on]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
552
- {
553
- variants: {
554
- variant: {
555
- default: "bg-transparent",
556
- outline: "border-input hover:bg-accent hover:text-accent-foreground border bg-transparent shadow-xs"
557
- },
558
- size: {
559
- default: "h-9 min-w-9 px-2",
560
- sm: "h-8 min-w-8 px-1.5",
561
- lg: "h-10 min-w-10 px-2.5"
562
- }
563
- },
564
- defaultVariants: {
565
- variant: "default",
566
- size: "default"
567
- }
568
- }
569
- );
570
- function Toggle({
571
- className,
572
- variant,
573
- size,
574
- ...props
575
- }) {
576
- return /* @__PURE__ */ jsx3(
577
- TogglePrimitive.Root,
578
- {
579
- "data-slot": "toggle",
580
- className: cn3(toggleVariants({ variant, size, className })),
581
- ...props
582
- }
583
- );
584
- }
585
-
586
- // src/components/tooltip/index.tsx
587
- import { cn as cn4 } from "@foundrykit/utils";
588
- import * as TooltipPrimitive from "@radix-ui/react-tooltip";
589
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
590
- function TooltipProvider({
591
- delayDuration = 0,
592
- ...props
593
- }) {
594
- return /* @__PURE__ */ jsx4(
595
- TooltipPrimitive.Provider,
596
- {
597
- "data-slot": "tooltip-provider",
598
- delayDuration,
599
- ...props
600
- }
601
- );
602
- }
603
- function Tooltip({
604
- ...props
605
- }) {
606
- return /* @__PURE__ */ jsx4(TooltipProvider, { children: /* @__PURE__ */ jsx4(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
607
- }
608
- function TooltipTrigger({
609
- ...props
610
- }) {
611
- return /* @__PURE__ */ jsx4(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
612
- }
613
- function TooltipContent({
614
- className,
615
- sideOffset = 0,
616
- children,
617
- ...props
618
- }) {
619
- return /* @__PURE__ */ jsx4(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs3(
620
- TooltipPrimitive.Content,
621
- {
622
- "data-slot": "tooltip-content",
623
- sideOffset,
624
- className: cn4(
625
- "bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out 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) rounded-md px-3 py-1.5 text-xs text-balance",
626
- className
627
- ),
628
- ...props,
629
- children: [
630
- children,
631
- /* @__PURE__ */ jsx4(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
632
- ]
633
- }
634
- ) });
635
- }
636
330
  export {
637
331
  Accordion,
638
332
  AccordionContent,
@@ -857,7 +551,7 @@ export {
857
551
  badgeVariants,
858
552
  buttonGroupVariants,
859
553
  buttonVariants,
860
- cn5 as cn,
554
+ cn,
861
555
  emptyMediaVariants,
862
556
  fieldVariants,
863
557
  itemMediaVariants,