@foundrykit/primitives 2.0.9 → 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.
- package/dist/chunk-3NQR7JZR.js +128 -0
- package/dist/chunk-B5YCE3UP.js +57 -0
- package/dist/chunk-F2TEA6ER.js +138 -0
- package/dist/chunk-SIQHWNPH.js +45 -0
- package/dist/components/dialog/index.cjs +182 -0
- package/dist/components/dialog/index.d.cts +38 -0
- package/dist/components/dialog/index.d.ts +38 -0
- package/dist/components/dialog/index.js +25 -0
- package/dist/components/input-group/index.cjs +270 -0
- package/dist/components/input-group/index.d.cts +44 -0
- package/dist/components/input-group/index.d.ts +44 -0
- package/dist/components/input-group/index.js +153 -0
- package/dist/components/sheet/index.cjs +170 -0
- package/dist/components/sheet/index.d.cts +31 -0
- package/dist/components/sheet/index.d.ts +31 -0
- package/dist/components/sheet/index.js +21 -0
- package/dist/components/toggle/index.cjs +81 -0
- package/dist/components/toggle/index.d.cts +26 -0
- package/dist/components/toggle/index.d.ts +26 -0
- package/dist/components/toggle/index.js +9 -0
- package/dist/components/tooltip/index.cjs +95 -0
- package/dist/components/tooltip/index.d.cts +25 -0
- package/dist/components/tooltip/index.d.ts +25 -0
- package/dist/components/tooltip/index.js +13 -0
- package/dist/index.d.cts +11 -105
- package/dist/index.d.ts +11 -105
- package/dist/index.js +93 -399
- package/package.json +200 -8
- package/CHANGELOG.md +0 -230
- package/postcss.config.mjs +0 -6
- package/registry.json +0 -64
- package/src/components/accordion/config.ts +0 -28
- package/src/components/accordion/index.tsx +0 -80
- package/src/components/alert/config.ts +0 -40
- package/src/components/alert/index.tsx +0 -80
- package/src/components/alert-dialog/config.ts +0 -28
- package/src/components/alert-dialog/index.tsx +0 -188
- package/src/components/aspect-ratio/config.ts +0 -27
- package/src/components/aspect-ratio/index.tsx +0 -24
- package/src/components/avatar/config.ts +0 -46
- package/src/components/avatar/index.tsx +0 -67
- package/src/components/badge/config.ts +0 -56
- package/src/components/badge/index.tsx +0 -56
- package/src/components/breadcrumb/config.ts +0 -121
- package/src/components/breadcrumb/index.tsx +0 -127
- package/src/components/button/config.ts +0 -97
- package/src/components/button/index.tsx +0 -86
- package/src/components/button-group/config.ts +0 -39
- package/src/components/button-group/index.tsx +0 -99
- package/src/components/card/config.ts +0 -89
- package/src/components/card/index.tsx +0 -90
- package/src/components/checkbox/config.ts +0 -46
- package/src/components/checkbox/index.tsx +0 -41
- package/src/components/collapsible/config.ts +0 -27
- package/src/components/collapsible/index.tsx +0 -47
- package/src/components/context-menu/config.ts +0 -28
- package/src/components/context-menu/index.tsx +0 -271
- package/src/components/dialog/config.ts +0 -582
- package/src/components/dialog/index.tsx +0 -162
- package/src/components/direction/config.ts +0 -28
- package/src/components/direction/index.tsx +0 -27
- package/src/components/drawer/config.ts +0 -28
- package/src/components/drawer/index.tsx +0 -153
- package/src/components/dropdown/config.ts +0 -262
- package/src/components/dropdown/index.tsx +0 -280
- package/src/components/empty/config.ts +0 -38
- package/src/components/empty/index.tsx +0 -127
- package/src/components/field/config.ts +0 -40
- package/src/components/field/index.tsx +0 -252
- package/src/components/hover-card/config.ts +0 -27
- package/src/components/hover-card/index.tsx +0 -56
- package/src/components/input/config.ts +0 -64
- package/src/components/input/index.tsx +0 -32
- package/src/components/input-group/config.ts +0 -209
- package/src/components/input-group/index.tsx +0 -177
- package/src/components/item/config.ts +0 -52
- package/src/components/item/index.tsx +0 -215
- package/src/components/kbd/config.ts +0 -38
- package/src/components/kbd/index.tsx +0 -40
- package/src/components/label/config.ts +0 -72
- package/src/components/label/index.tsx +0 -32
- package/src/components/menubar/config.ts +0 -28
- package/src/components/menubar/index.tsx +0 -295
- package/src/components/native-select/config.ts +0 -40
- package/src/components/native-select/index.tsx +0 -40
- package/src/components/navigation-menu/config.ts +0 -32
- package/src/components/navigation-menu/index.tsx +0 -188
- package/src/components/popover/config.ts +0 -222
- package/src/components/popover/index.tsx +0 -60
- package/src/components/progress/config.ts +0 -42
- package/src/components/progress/index.tsx +0 -39
- package/src/components/radio-group/config.ts +0 -303
- package/src/components/radio-group/index.tsx +0 -58
- package/src/components/resizable/config.ts +0 -28
- package/src/components/resizable/index.tsx +0 -67
- package/src/components/scroll-area/config.ts +0 -17
- package/src/components/scroll-area/index.tsx +0 -70
- package/src/components/select/config.ts +0 -277
- package/src/components/select/index.tsx +0 -202
- package/src/components/separator/config.ts +0 -63
- package/src/components/separator/index.tsx +0 -38
- package/src/components/sheet/config.ts +0 -16
- package/src/components/sheet/index.tsx +0 -153
- package/src/components/skeleton/config.ts +0 -77
- package/src/components/skeleton/index.tsx +0 -22
- package/src/components/slider/config.ts +0 -46
- package/src/components/slider/index.tsx +0 -76
- package/src/components/sonner/config.ts +0 -27
- package/src/components/sonner/index.tsx +0 -37
- package/src/components/spinner/config.ts +0 -40
- package/src/components/spinner/index.tsx +0 -30
- package/src/components/switch/config.ts +0 -171
- package/src/components/switch/index.tsx +0 -40
- package/src/components/table/config.ts +0 -38
- package/src/components/table/index.tsx +0 -135
- package/src/components/tabs/config.ts +0 -335
- package/src/components/tabs/index.tsx +0 -82
- package/src/components/textarea/config.ts +0 -117
- package/src/components/textarea/index.tsx +0 -26
- package/src/components/toggle/config.ts +0 -67
- package/src/components/toggle/index.tsx +0 -59
- package/src/components/toggle-group/config.ts +0 -46
- package/src/components/toggle-group/index.tsx +0 -106
- package/src/components/tooltip/config.ts +0 -16
- package/src/components/tooltip/index.tsx +0 -75
- package/src/components/typography/config.ts +0 -38
- package/src/components/typography/index.tsx +0 -172
- package/src/index.ts +0 -291
- package/tsconfig.json +0 -9
- package/tsconfig.lint.json +0 -8
- 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,
|
|
@@ -38,6 +70,16 @@ import {
|
|
|
38
70
|
SelectTrigger,
|
|
39
71
|
SelectValue
|
|
40
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";
|
|
@@ -49,21 +91,12 @@ import {
|
|
|
49
91
|
toast
|
|
50
92
|
} from "./chunk-VPBVKBZ7.js";
|
|
51
93
|
import {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Switch
|
|
56
|
-
} from "./chunk-DXZ4GUQO.js";
|
|
94
|
+
Kbd,
|
|
95
|
+
KbdGroup
|
|
96
|
+
} from "./chunk-PLLG76QJ.js";
|
|
57
97
|
import {
|
|
58
|
-
|
|
59
|
-
|
|
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,
|
|
@@ -110,14 +143,17 @@ import {
|
|
|
110
143
|
RadioGroupItem
|
|
111
144
|
} from "./chunk-SUEPE6OX.js";
|
|
112
145
|
import {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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,
|
|
@@ -162,6 +198,9 @@ import {
|
|
|
162
198
|
HoverCardContent,
|
|
163
199
|
HoverCardTrigger
|
|
164
200
|
} from "./chunk-W4XY3SNY.js";
|
|
201
|
+
import {
|
|
202
|
+
Textarea
|
|
203
|
+
} from "./chunk-XVIHRZGJ.js";
|
|
165
204
|
import {
|
|
166
205
|
Input
|
|
167
206
|
} from "./chunk-XCPGTXEJ.js";
|
|
@@ -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
|
|
@@ -232,28 +264,20 @@ import {
|
|
|
232
264
|
ContextMenuSubTrigger,
|
|
233
265
|
ContextMenuTrigger
|
|
234
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
281
|
import {
|
|
258
282
|
AlertDialog,
|
|
259
283
|
AlertDialogAction,
|
|
@@ -267,6 +291,9 @@ import {
|
|
|
267
291
|
AlertDialogTitle,
|
|
268
292
|
AlertDialogTrigger
|
|
269
293
|
} from "./chunk-P5KEJOBH.js";
|
|
294
|
+
import {
|
|
295
|
+
AspectRatio
|
|
296
|
+
} from "./chunk-AJAAMJYH.js";
|
|
270
297
|
import {
|
|
271
298
|
Alert,
|
|
272
299
|
AlertDescription,
|
|
@@ -274,8 +301,11 @@ import {
|
|
|
274
301
|
alertVariants
|
|
275
302
|
} from "./chunk-BIFBYERK.js";
|
|
276
303
|
import {
|
|
277
|
-
|
|
278
|
-
|
|
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 motion-safe:data-[state=closed]:zoom-out-95 motion-safe: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" && "motion-safe:data-[state=closed]:slide-out-to-right motion-safe: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" && "motion-safe:data-[state=closed]:slide-out-to-left motion-safe: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" && "motion-safe:data-[state=closed]:slide-out-to-top motion-safe:data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
483
|
-
side === "bottom" && "motion-safe:data-[state=closed]:slide-out-to-bottom motion-safe: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 motion-safe:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=left]:slide-in-from-right-2 motion-safe:data-[side=right]:slide-in-from-left-2 motion-safe: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
|
-
|
|
554
|
+
cn,
|
|
861
555
|
emptyMediaVariants,
|
|
862
556
|
fieldVariants,
|
|
863
557
|
itemMediaVariants,
|