zudoku 0.13.6 → 0.13.7
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/app/main.js +1 -1
- package/dist/app/main.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +2 -2
- package/dist/lib/plugins/openapi/playground/Playground.js +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/ui/Accordion.d.ts +7 -0
- package/dist/lib/ui/Accordion.js +14 -0
- package/dist/lib/ui/Accordion.js.map +1 -0
- package/dist/lib/ui/Alert.d.ts +8 -0
- package/dist/lib/ui/Alert.js +23 -0
- package/dist/lib/ui/Alert.js.map +1 -0
- package/dist/lib/ui/AlertDialog.d.ts +20 -0
- package/dist/lib/ui/AlertDialog.js +27 -0
- package/dist/lib/ui/AlertDialog.js.map +1 -0
- package/dist/lib/ui/AspectRatio.d.ts +3 -0
- package/dist/lib/ui/AspectRatio.js +4 -0
- package/dist/lib/ui/AspectRatio.js.map +1 -0
- package/dist/lib/ui/Badge.d.ts +9 -0
- package/dist/lib/ui/Badge.js +21 -0
- package/dist/lib/ui/Badge.js.map +1 -0
- package/dist/lib/ui/Breadcrumb.d.ts +19 -0
- package/dist/lib/ui/Breadcrumb.js +24 -0
- package/dist/lib/ui/Breadcrumb.js.map +1 -0
- package/dist/lib/ui/Button.d.ts +1 -2
- package/dist/lib/ui/Button.js +1 -1
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/Carousel.d.ts +18 -0
- package/dist/lib/ui/Carousel.js +99 -0
- package/dist/lib/ui/Carousel.js.map +1 -0
- package/dist/lib/ui/Checkbox.d.ts +4 -0
- package/dist/lib/ui/Checkbox.js +9 -0
- package/dist/lib/ui/Checkbox.js.map +1 -0
- package/dist/lib/ui/Collapsible.d.ts +5 -0
- package/dist/lib/ui/Collapsible.js +6 -0
- package/dist/lib/ui/Collapsible.js.map +1 -0
- package/dist/lib/{components → ui}/Dialog.js +2 -2
- package/dist/lib/ui/Dialog.js.map +1 -0
- package/dist/lib/ui/Form.d.ts +23 -0
- package/dist/lib/ui/Form.js +63 -0
- package/dist/lib/ui/Form.js.map +1 -0
- package/dist/lib/ui/HoverCard.d.ts +6 -0
- package/dist/lib/ui/HoverCard.js +10 -0
- package/dist/lib/ui/HoverCard.js.map +1 -0
- package/dist/lib/ui/Label.d.ts +5 -0
- package/dist/lib/ui/Label.js +10 -0
- package/dist/lib/ui/Label.js.map +1 -0
- package/dist/lib/ui/Pagination.d.ts +28 -0
- package/dist/lib/ui/Pagination.js +24 -0
- package/dist/lib/ui/Pagination.js.map +1 -0
- package/dist/lib/ui/Popover.d.ts +6 -0
- package/dist/lib/ui/Popover.js +10 -0
- package/dist/lib/ui/Popover.js.map +1 -0
- package/dist/lib/ui/Progress.d.ts +4 -0
- package/dist/lib/ui/Progress.js +8 -0
- package/dist/lib/ui/Progress.js.map +1 -0
- package/dist/lib/ui/RadioGroup.d.ts +5 -0
- package/dist/lib/ui/RadioGroup.js +15 -0
- package/dist/lib/ui/RadioGroup.js.map +1 -0
- package/dist/lib/ui/ScrollArea.d.ts +5 -0
- package/dist/lib/ui/ScrollArea.js +12 -0
- package/dist/lib/ui/ScrollArea.js.map +1 -0
- package/dist/lib/ui/Select.js.map +1 -0
- package/dist/lib/ui/Skeleton.d.ts +2 -0
- package/dist/lib/ui/Skeleton.js +7 -0
- package/dist/lib/ui/Skeleton.js.map +1 -0
- package/dist/lib/ui/Slider.d.ts +4 -0
- package/dist/lib/ui/Slider.js +8 -0
- package/dist/lib/ui/Slider.js.map +1 -0
- package/dist/lib/ui/Switch.d.ts +4 -0
- package/dist/lib/ui/Switch.js +8 -0
- package/dist/lib/ui/Switch.js.map +1 -0
- package/dist/lib/ui/Textarea.d.ts +4 -0
- package/dist/lib/ui/Textarea.js +9 -0
- package/dist/lib/ui/Textarea.js.map +1 -0
- package/dist/lib/ui/Toggle.d.ts +12 -0
- package/dist/lib/ui/Toggle.js +26 -0
- package/dist/lib/ui/Toggle.js.map +1 -0
- package/dist/lib/ui/ToggleGroup.d.ts +12 -0
- package/dist/lib/ui/ToggleGroup.js +21 -0
- package/dist/lib/ui/ToggleGroup.js.map +1 -0
- package/dist/lib/ui/Tooltip.d.ts +7 -0
- package/dist/lib/ui/Tooltip.js +11 -0
- package/dist/lib/ui/Tooltip.js.map +1 -0
- package/dist/vite/plugin-component.js +17 -7
- package/dist/vite/plugin-component.js.map +1 -1
- package/lib/{AuthenticationPlugin-tBvLKsFg.js → AuthenticationPlugin-Bpdes0cJ.js} +2 -2
- package/lib/{AuthenticationPlugin-tBvLKsFg.js.map → AuthenticationPlugin-Bpdes0cJ.js.map} +1 -1
- package/lib/{CategoryHeading-D2WS6sRI.js → CategoryHeading-Bb9dqxD3.js} +4 -4
- package/lib/{CategoryHeading-D2WS6sRI.js.map → CategoryHeading-Bb9dqxD3.js.map} +1 -1
- package/lib/{DeveloperHint-CRiZjqd2.js → DeveloperHint-DHdLXGHA.js} +2 -2
- package/lib/{DeveloperHint-CRiZjqd2.js.map → DeveloperHint-DHdLXGHA.js.map} +1 -1
- package/lib/{Markdown-DM4zv3MA.js → Markdown-1BO9EA_X.js} +4265 -6650
- package/lib/Markdown-1BO9EA_X.js.map +1 -0
- package/lib/{MdxPage-tWI_P8wP.js → MdxPage-BEOcOICU.js} +26 -25
- package/lib/{MdxPage-tWI_P8wP.js.map → MdxPage-BEOcOICU.js.map} +1 -1
- package/lib/{OperationList-Cd3lue0b.js → OperationList-Cea2Yt8e.js} +131 -127
- package/lib/{OperationList-Cd3lue0b.js.map → OperationList-Cea2Yt8e.js.map} +1 -1
- package/lib/{Route-DI0Y0pIV.js → Route-BHT-onwf.js} +2 -2
- package/lib/{Route-DI0Y0pIV.js.map → Route-BHT-onwf.js.map} +1 -1
- package/lib/Select-m1aXZGAP.js +223 -0
- package/lib/Select-m1aXZGAP.js.map +1 -0
- package/lib/{SlotletProvider-CBqY8mp6.js → SlotletProvider-CPfsBw39.js} +4 -4
- package/lib/{SlotletProvider-CBqY8mp6.js.map → SlotletProvider-CPfsBw39.js.map} +1 -1
- package/lib/Spinner-C6zroowC.js +40 -0
- package/lib/Spinner-C6zroowC.js.map +1 -0
- package/lib/StaggeredRender-DDHSzQKE.js +17 -0
- package/lib/StaggeredRender-DDHSzQKE.js.map +1 -0
- package/lib/{ZudokuContext-DEoP3GGJ.js → ZudokuContext-D1D8Anlj.js} +19 -19
- package/lib/{ZudokuContext-DEoP3GGJ.js.map → ZudokuContext-D1D8Anlj.js.map} +1 -1
- package/lib/cn-BmFQLtkS.js +2279 -0
- package/lib/cn-BmFQLtkS.js.map +1 -0
- package/lib/hook-JSRuxV1P.js +229 -0
- package/lib/hook-JSRuxV1P.js.map +1 -0
- package/lib/index-BuAyrJe3.js +46 -0
- package/lib/index-BuAyrJe3.js.map +1 -0
- package/lib/{index-Bs9roz8y.js → index-Cj-F-4ME.js} +1203 -1428
- package/lib/index-Cj-F-4ME.js.map +1 -0
- package/lib/index.esm-C5mr_sKO.js +1193 -0
- package/lib/index.esm-C5mr_sKO.js.map +1 -0
- package/lib/ui/Accordion.js +47 -0
- package/lib/ui/Accordion.js.map +1 -0
- package/lib/ui/Alert.js +51 -0
- package/lib/ui/Alert.js.map +1 -0
- package/lib/ui/AlertDialog.js +114 -0
- package/lib/ui/AlertDialog.js.map +1 -0
- package/lib/ui/AspectRatio.js +6 -0
- package/lib/ui/AspectRatio.js.map +1 -0
- package/lib/ui/Badge.js +27 -0
- package/lib/ui/Badge.js.map +1 -0
- package/lib/ui/Breadcrumb.js +94 -0
- package/lib/ui/Breadcrumb.js.map +1 -0
- package/lib/ui/Button.js +49 -0
- package/lib/ui/Button.js.map +1 -0
- package/lib/ui/Callout.js +77 -0
- package/lib/ui/Callout.js.map +1 -0
- package/lib/ui/Card.js +62 -0
- package/lib/ui/Card.js.map +1 -0
- package/lib/ui/Carousel.js +1410 -0
- package/lib/ui/Carousel.js.map +1 -0
- package/lib/ui/Checkbox.js +28 -0
- package/lib/ui/Checkbox.js.map +1 -0
- package/lib/ui/Collapsible.js +8 -0
- package/lib/ui/Collapsible.js.map +1 -0
- package/lib/ui/Dialog.js +101 -0
- package/lib/ui/Dialog.js.map +1 -0
- package/lib/ui/Drawer.js +1153 -0
- package/lib/ui/Drawer.js.map +1 -0
- package/lib/ui/DropdownMenu.js +145 -0
- package/lib/ui/DropdownMenu.js.map +1 -0
- package/lib/ui/Form.js +95 -0
- package/lib/ui/Form.js.map +1 -0
- package/lib/ui/HoverCard.js +24 -0
- package/lib/ui/HoverCard.js.map +1 -0
- package/lib/ui/Input.js +22 -0
- package/lib/ui/Input.js.map +1 -0
- package/lib/ui/Label.js +20 -0
- package/lib/ui/Label.js.map +1 -0
- package/lib/ui/Note.js +51 -0
- package/lib/ui/Note.js.map +1 -0
- package/lib/ui/Pagination.js +106 -0
- package/lib/ui/Pagination.js.map +1 -0
- package/lib/ui/Popover.js +24 -0
- package/lib/ui/Popover.js.map +1 -0
- package/lib/ui/Progress.js +27 -0
- package/lib/ui/Progress.js.map +1 -0
- package/lib/ui/RadioGroup.js +32 -0
- package/lib/ui/RadioGroup.js.map +1 -0
- package/lib/ui/ScrollArea.js +39 -0
- package/lib/ui/ScrollArea.js.map +1 -0
- package/lib/ui/Select.js +122 -0
- package/lib/ui/Select.js.map +1 -0
- package/lib/ui/Skeleton.js +18 -0
- package/lib/ui/Skeleton.js.map +1 -0
- package/lib/ui/Slider.js +24 -0
- package/lib/ui/Slider.js.map +1 -0
- package/lib/ui/Switch.js +28 -0
- package/lib/ui/Switch.js.map +1 -0
- package/lib/ui/Tabs.js +47 -0
- package/lib/ui/Tabs.js.map +1 -0
- package/lib/ui/Textarea.js +21 -0
- package/lib/ui/Textarea.js.map +1 -0
- package/lib/ui/Toggle.js +38 -0
- package/lib/ui/Toggle.js.map +1 -0
- package/lib/ui/ToggleGroup.js +42 -0
- package/lib/ui/ToggleGroup.js.map +1 -0
- package/lib/ui/Tooltip.js +24 -0
- package/lib/ui/Tooltip.js.map +1 -0
- package/lib/{utils-G5XSiZc9.js → utils-B2yoT99j.js} +61 -61
- package/lib/{utils-G5XSiZc9.js.map → utils-B2yoT99j.js.map} +1 -1
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +2 -2
- package/lib/zudoku.components.js +847 -2844
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +22 -19
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +14 -13
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +6 -5
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/package.json +28 -6
- package/src/app/main.tsx +1 -1
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +2 -2
- package/src/lib/plugins/openapi/Sidecar.tsx +2 -2
- package/src/lib/plugins/openapi/playground/Playground.tsx +3 -3
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
- package/src/lib/ui/Accordion.tsx +56 -0
- package/src/lib/ui/Alert.tsx +59 -0
- package/src/lib/ui/AlertDialog.tsx +139 -0
- package/src/lib/ui/AspectRatio.tsx +5 -0
- package/src/lib/ui/Badge.tsx +36 -0
- package/src/lib/ui/Breadcrumb.tsx +115 -0
- package/src/lib/ui/Button.tsx +1 -1
- package/src/lib/ui/Carousel.tsx +260 -0
- package/src/lib/ui/Checkbox.tsx +28 -0
- package/src/lib/ui/Collapsible.tsx +9 -0
- package/src/lib/{components → ui}/Dialog.tsx +4 -3
- package/src/lib/ui/Form.tsx +177 -0
- package/src/lib/ui/HoverCard.tsx +27 -0
- package/src/lib/ui/Label.tsx +24 -0
- package/src/lib/ui/Pagination.tsx +117 -0
- package/src/lib/ui/Popover.tsx +29 -0
- package/src/lib/ui/Progress.tsx +26 -0
- package/src/lib/ui/RadioGroup.tsx +42 -0
- package/src/lib/ui/ScrollArea.tsx +46 -0
- package/src/lib/ui/Skeleton.tsx +15 -0
- package/src/lib/ui/Slider.tsx +26 -0
- package/src/lib/ui/Switch.tsx +27 -0
- package/src/lib/ui/Textarea.tsx +23 -0
- package/src/lib/ui/Toggle.tsx +43 -0
- package/src/lib/ui/ToggleGroup.tsx +59 -0
- package/src/lib/ui/Tooltip.tsx +28 -0
- package/dist/internal.d.ts +0 -1
- package/dist/internal.js +0 -2
- package/dist/internal.js.map +0 -1
- package/dist/lib/components/Dialog.js.map +0 -1
- package/dist/lib/components/Select.js.map +0 -1
- package/lib/Input-CO-1DOZa.js +0 -2229
- package/lib/Input-CO-1DOZa.js.map +0 -1
- package/lib/Markdown-DM4zv3MA.js.map +0 -1
- package/lib/Spinner-DFQhPMBl.js +0 -505
- package/lib/Spinner-DFQhPMBl.js.map +0 -1
- package/lib/index-Bs9roz8y.js.map +0 -1
- package/lib/index-CBr6BM_4.js +0 -2867
- package/lib/index-CBr6BM_4.js.map +0 -1
- package/lib/index-UUT9q9f9.js +0 -124
- package/lib/index-UUT9q9f9.js.map +0 -1
- /package/dist/lib/{components → ui}/Dialog.d.ts +0 -0
- /package/dist/lib/{components → ui}/Select.d.ts +0 -0
- /package/dist/lib/{components → ui}/Select.js +0 -0
- /package/src/lib/{components → ui}/Select.tsx +0 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
import { cn } from "../util/cn.js";
|
|
5
|
+
import { buttonVariants } from "./Button.js";
|
|
6
|
+
|
|
7
|
+
const AlertDialog = AlertDialogPrimitive.Root;
|
|
8
|
+
|
|
9
|
+
const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
10
|
+
|
|
11
|
+
const AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
12
|
+
|
|
13
|
+
const AlertDialogOverlay = React.forwardRef<
|
|
14
|
+
React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
|
|
15
|
+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
|
|
16
|
+
>(({ className, ...props }, ref) => (
|
|
17
|
+
<AlertDialogPrimitive.Overlay
|
|
18
|
+
className={cn(
|
|
19
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
20
|
+
className,
|
|
21
|
+
)}
|
|
22
|
+
{...props}
|
|
23
|
+
ref={ref}
|
|
24
|
+
/>
|
|
25
|
+
));
|
|
26
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
27
|
+
|
|
28
|
+
const AlertDialogContent = React.forwardRef<
|
|
29
|
+
React.ElementRef<typeof AlertDialogPrimitive.Content>,
|
|
30
|
+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
|
|
31
|
+
>(({ className, ...props }, ref) => (
|
|
32
|
+
<AlertDialogPortal>
|
|
33
|
+
<AlertDialogOverlay />
|
|
34
|
+
<AlertDialogPrimitive.Content
|
|
35
|
+
ref={ref}
|
|
36
|
+
className={cn(
|
|
37
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg 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 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
38
|
+
className,
|
|
39
|
+
)}
|
|
40
|
+
{...props}
|
|
41
|
+
/>
|
|
42
|
+
</AlertDialogPortal>
|
|
43
|
+
));
|
|
44
|
+
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
45
|
+
|
|
46
|
+
const AlertDialogHeader = ({
|
|
47
|
+
className,
|
|
48
|
+
...props
|
|
49
|
+
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
50
|
+
<div
|
|
51
|
+
className={cn(
|
|
52
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
53
|
+
className,
|
|
54
|
+
)}
|
|
55
|
+
{...props}
|
|
56
|
+
/>
|
|
57
|
+
);
|
|
58
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
59
|
+
|
|
60
|
+
const AlertDialogFooter = ({
|
|
61
|
+
className,
|
|
62
|
+
...props
|
|
63
|
+
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
64
|
+
<div
|
|
65
|
+
className={cn(
|
|
66
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
67
|
+
className,
|
|
68
|
+
)}
|
|
69
|
+
{...props}
|
|
70
|
+
/>
|
|
71
|
+
);
|
|
72
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
73
|
+
|
|
74
|
+
const AlertDialogTitle = React.forwardRef<
|
|
75
|
+
React.ElementRef<typeof AlertDialogPrimitive.Title>,
|
|
76
|
+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
|
|
77
|
+
>(({ className, ...props }, ref) => (
|
|
78
|
+
<AlertDialogPrimitive.Title
|
|
79
|
+
ref={ref}
|
|
80
|
+
className={cn("text-lg font-semibold", className)}
|
|
81
|
+
{...props}
|
|
82
|
+
/>
|
|
83
|
+
));
|
|
84
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
85
|
+
|
|
86
|
+
const AlertDialogDescription = React.forwardRef<
|
|
87
|
+
React.ElementRef<typeof AlertDialogPrimitive.Description>,
|
|
88
|
+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
|
|
89
|
+
>(({ className, ...props }, ref) => (
|
|
90
|
+
<AlertDialogPrimitive.Description
|
|
91
|
+
ref={ref}
|
|
92
|
+
className={cn("text-sm text-muted-foreground", className)}
|
|
93
|
+
{...props}
|
|
94
|
+
/>
|
|
95
|
+
));
|
|
96
|
+
AlertDialogDescription.displayName =
|
|
97
|
+
AlertDialogPrimitive.Description.displayName;
|
|
98
|
+
|
|
99
|
+
const AlertDialogAction = React.forwardRef<
|
|
100
|
+
React.ElementRef<typeof AlertDialogPrimitive.Action>,
|
|
101
|
+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
|
|
102
|
+
>(({ className, ...props }, ref) => (
|
|
103
|
+
<AlertDialogPrimitive.Action
|
|
104
|
+
ref={ref}
|
|
105
|
+
className={cn(buttonVariants(), className)}
|
|
106
|
+
{...props}
|
|
107
|
+
/>
|
|
108
|
+
));
|
|
109
|
+
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
110
|
+
|
|
111
|
+
const AlertDialogCancel = React.forwardRef<
|
|
112
|
+
React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
|
|
113
|
+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
|
|
114
|
+
>(({ className, ...props }, ref) => (
|
|
115
|
+
<AlertDialogPrimitive.Cancel
|
|
116
|
+
ref={ref}
|
|
117
|
+
className={cn(
|
|
118
|
+
buttonVariants({ variant: "outline" }),
|
|
119
|
+
"mt-2 sm:mt-0",
|
|
120
|
+
className,
|
|
121
|
+
)}
|
|
122
|
+
{...props}
|
|
123
|
+
/>
|
|
124
|
+
));
|
|
125
|
+
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
126
|
+
|
|
127
|
+
export {
|
|
128
|
+
AlertDialog,
|
|
129
|
+
AlertDialogAction,
|
|
130
|
+
AlertDialogCancel,
|
|
131
|
+
AlertDialogContent,
|
|
132
|
+
AlertDialogDescription,
|
|
133
|
+
AlertDialogFooter,
|
|
134
|
+
AlertDialogHeader,
|
|
135
|
+
AlertDialogOverlay,
|
|
136
|
+
AlertDialogPortal,
|
|
137
|
+
AlertDialogTitle,
|
|
138
|
+
AlertDialogTrigger,
|
|
139
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
import { cn } from "../util/cn.js";
|
|
5
|
+
|
|
6
|
+
const badgeVariants = cva(
|
|
7
|
+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default:
|
|
12
|
+
"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
13
|
+
secondary:
|
|
14
|
+
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
15
|
+
destructive:
|
|
16
|
+
"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
17
|
+
outline: "text-foreground",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: "default",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export interface BadgeProps
|
|
27
|
+
extends React.HTMLAttributes<HTMLDivElement>,
|
|
28
|
+
VariantProps<typeof badgeVariants> {}
|
|
29
|
+
|
|
30
|
+
function Badge({ className, variant, ...props }: BadgeProps) {
|
|
31
|
+
return (
|
|
32
|
+
<div className={cn(badgeVariants({ variant }), className)} {...props} />
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
2
|
+
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
import { cn } from "../util/cn.js";
|
|
6
|
+
|
|
7
|
+
const Breadcrumb = React.forwardRef<
|
|
8
|
+
HTMLElement,
|
|
9
|
+
React.ComponentPropsWithoutRef<"nav"> & {
|
|
10
|
+
separator?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
>(({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props} />);
|
|
13
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
14
|
+
|
|
15
|
+
const BreadcrumbList = React.forwardRef<
|
|
16
|
+
HTMLOListElement,
|
|
17
|
+
React.ComponentPropsWithoutRef<"ol">
|
|
18
|
+
>(({ className, ...props }, ref) => (
|
|
19
|
+
<ol
|
|
20
|
+
ref={ref}
|
|
21
|
+
className={cn(
|
|
22
|
+
"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
|
|
23
|
+
className,
|
|
24
|
+
)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
));
|
|
28
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
29
|
+
|
|
30
|
+
const BreadcrumbItem = React.forwardRef<
|
|
31
|
+
HTMLLIElement,
|
|
32
|
+
React.ComponentPropsWithoutRef<"li">
|
|
33
|
+
>(({ className, ...props }, ref) => (
|
|
34
|
+
<li
|
|
35
|
+
ref={ref}
|
|
36
|
+
className={cn("inline-flex items-center gap-1.5", className)}
|
|
37
|
+
{...props}
|
|
38
|
+
/>
|
|
39
|
+
));
|
|
40
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
41
|
+
|
|
42
|
+
const BreadcrumbLink = React.forwardRef<
|
|
43
|
+
HTMLAnchorElement,
|
|
44
|
+
React.ComponentPropsWithoutRef<"a"> & {
|
|
45
|
+
asChild?: boolean;
|
|
46
|
+
}
|
|
47
|
+
>(({ asChild, className, ...props }, ref) => {
|
|
48
|
+
const Comp = asChild ? Slot : "a";
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<Comp
|
|
52
|
+
ref={ref}
|
|
53
|
+
className={cn("transition-colors hover:text-foreground", className)}
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
});
|
|
58
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
59
|
+
|
|
60
|
+
const BreadcrumbPage = React.forwardRef<
|
|
61
|
+
HTMLSpanElement,
|
|
62
|
+
React.ComponentPropsWithoutRef<"span">
|
|
63
|
+
>(({ className, ...props }, ref) => (
|
|
64
|
+
<span
|
|
65
|
+
ref={ref}
|
|
66
|
+
role="link"
|
|
67
|
+
aria-disabled="true"
|
|
68
|
+
aria-current="page"
|
|
69
|
+
className={cn("font-normal text-foreground", className)}
|
|
70
|
+
{...props}
|
|
71
|
+
/>
|
|
72
|
+
));
|
|
73
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
74
|
+
|
|
75
|
+
const BreadcrumbSeparator = ({
|
|
76
|
+
children,
|
|
77
|
+
className,
|
|
78
|
+
...props
|
|
79
|
+
}: React.ComponentProps<"li">) => (
|
|
80
|
+
<li
|
|
81
|
+
role="presentation"
|
|
82
|
+
aria-hidden="true"
|
|
83
|
+
className={cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className)}
|
|
84
|
+
{...props}
|
|
85
|
+
>
|
|
86
|
+
{children ?? <ChevronRight />}
|
|
87
|
+
</li>
|
|
88
|
+
);
|
|
89
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
90
|
+
|
|
91
|
+
const BreadcrumbEllipsis = ({
|
|
92
|
+
className,
|
|
93
|
+
...props
|
|
94
|
+
}: React.ComponentProps<"span">) => (
|
|
95
|
+
<span
|
|
96
|
+
role="presentation"
|
|
97
|
+
aria-hidden="true"
|
|
98
|
+
className={cn("flex h-9 w-9 items-center justify-center", className)}
|
|
99
|
+
{...props}
|
|
100
|
+
>
|
|
101
|
+
<MoreHorizontal className="h-4 w-4" />
|
|
102
|
+
<span className="sr-only">More</span>
|
|
103
|
+
</span>
|
|
104
|
+
);
|
|
105
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
106
|
+
|
|
107
|
+
export {
|
|
108
|
+
Breadcrumb,
|
|
109
|
+
BreadcrumbEllipsis,
|
|
110
|
+
BreadcrumbItem,
|
|
111
|
+
BreadcrumbLink,
|
|
112
|
+
BreadcrumbList,
|
|
113
|
+
BreadcrumbPage,
|
|
114
|
+
BreadcrumbSeparator,
|
|
115
|
+
};
|
package/src/lib/ui/Button.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import { cva, VariantProps } from "class-variance-authority";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { cn } from "../util/cn.js";
|
|
5
5
|
|
|
6
|
-
const buttonVariants = cva(
|
|
6
|
+
export const buttonVariants = cva(
|
|
7
7
|
"not-prose inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import useEmblaCarousel, {
|
|
2
|
+
type UseEmblaCarouselType,
|
|
3
|
+
} from "embla-carousel-react";
|
|
4
|
+
import { ArrowLeft, ArrowRight } from "lucide-react";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
|
|
7
|
+
import { cn } from "../util/cn.js";
|
|
8
|
+
import { Button } from "./Button.js";
|
|
9
|
+
|
|
10
|
+
type CarouselApi = UseEmblaCarouselType[1];
|
|
11
|
+
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
12
|
+
type CarouselOptions = UseCarouselParameters[0];
|
|
13
|
+
type CarouselPlugin = UseCarouselParameters[1];
|
|
14
|
+
|
|
15
|
+
type CarouselProps = {
|
|
16
|
+
opts?: CarouselOptions;
|
|
17
|
+
plugins?: CarouselPlugin;
|
|
18
|
+
orientation?: "horizontal" | "vertical";
|
|
19
|
+
setApi?: (api: CarouselApi) => void;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
type CarouselContextProps = {
|
|
23
|
+
carouselRef: ReturnType<typeof useEmblaCarousel>[0];
|
|
24
|
+
api: ReturnType<typeof useEmblaCarousel>[1];
|
|
25
|
+
scrollPrev: () => void;
|
|
26
|
+
scrollNext: () => void;
|
|
27
|
+
canScrollPrev: boolean;
|
|
28
|
+
canScrollNext: boolean;
|
|
29
|
+
} & CarouselProps;
|
|
30
|
+
|
|
31
|
+
const CarouselContext = React.createContext<CarouselContextProps | null>(null);
|
|
32
|
+
|
|
33
|
+
function useCarousel() {
|
|
34
|
+
const context = React.useContext(CarouselContext);
|
|
35
|
+
|
|
36
|
+
if (!context) {
|
|
37
|
+
throw new Error("useCarousel must be used within a <Carousel />");
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return context;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const Carousel = React.forwardRef<
|
|
44
|
+
HTMLDivElement,
|
|
45
|
+
React.HTMLAttributes<HTMLDivElement> & CarouselProps
|
|
46
|
+
>(
|
|
47
|
+
(
|
|
48
|
+
{
|
|
49
|
+
orientation = "horizontal",
|
|
50
|
+
opts,
|
|
51
|
+
setApi,
|
|
52
|
+
plugins,
|
|
53
|
+
className,
|
|
54
|
+
children,
|
|
55
|
+
...props
|
|
56
|
+
},
|
|
57
|
+
ref,
|
|
58
|
+
) => {
|
|
59
|
+
const [carouselRef, api] = useEmblaCarousel(
|
|
60
|
+
{
|
|
61
|
+
...opts,
|
|
62
|
+
axis: orientation === "horizontal" ? "x" : "y",
|
|
63
|
+
},
|
|
64
|
+
plugins,
|
|
65
|
+
);
|
|
66
|
+
const [canScrollPrev, setCanScrollPrev] = React.useState(false);
|
|
67
|
+
const [canScrollNext, setCanScrollNext] = React.useState(false);
|
|
68
|
+
|
|
69
|
+
const onSelect = React.useCallback((api: CarouselApi) => {
|
|
70
|
+
if (!api) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
setCanScrollPrev(api.canScrollPrev());
|
|
75
|
+
setCanScrollNext(api.canScrollNext());
|
|
76
|
+
}, []);
|
|
77
|
+
|
|
78
|
+
const scrollPrev = React.useCallback(() => {
|
|
79
|
+
api?.scrollPrev();
|
|
80
|
+
}, [api]);
|
|
81
|
+
|
|
82
|
+
const scrollNext = React.useCallback(() => {
|
|
83
|
+
api?.scrollNext();
|
|
84
|
+
}, [api]);
|
|
85
|
+
|
|
86
|
+
const handleKeyDown = React.useCallback(
|
|
87
|
+
(event: React.KeyboardEvent<HTMLDivElement>) => {
|
|
88
|
+
if (event.key === "ArrowLeft") {
|
|
89
|
+
event.preventDefault();
|
|
90
|
+
scrollPrev();
|
|
91
|
+
} else if (event.key === "ArrowRight") {
|
|
92
|
+
event.preventDefault();
|
|
93
|
+
scrollNext();
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
[scrollPrev, scrollNext],
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
React.useEffect(() => {
|
|
100
|
+
if (!api || !setApi) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
setApi(api);
|
|
105
|
+
}, [api, setApi]);
|
|
106
|
+
|
|
107
|
+
React.useEffect(() => {
|
|
108
|
+
if (!api) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
onSelect(api);
|
|
113
|
+
api.on("reInit", onSelect);
|
|
114
|
+
api.on("select", onSelect);
|
|
115
|
+
|
|
116
|
+
return () => {
|
|
117
|
+
api.off("select", onSelect);
|
|
118
|
+
};
|
|
119
|
+
}, [api, onSelect]);
|
|
120
|
+
|
|
121
|
+
return (
|
|
122
|
+
<CarouselContext.Provider
|
|
123
|
+
value={{
|
|
124
|
+
carouselRef,
|
|
125
|
+
api: api,
|
|
126
|
+
opts,
|
|
127
|
+
orientation:
|
|
128
|
+
orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
129
|
+
scrollPrev,
|
|
130
|
+
scrollNext,
|
|
131
|
+
canScrollPrev,
|
|
132
|
+
canScrollNext,
|
|
133
|
+
}}
|
|
134
|
+
>
|
|
135
|
+
<div
|
|
136
|
+
ref={ref}
|
|
137
|
+
onKeyDownCapture={handleKeyDown}
|
|
138
|
+
className={cn("relative", className)}
|
|
139
|
+
role="region"
|
|
140
|
+
aria-roledescription="carousel"
|
|
141
|
+
{...props}
|
|
142
|
+
>
|
|
143
|
+
{children}
|
|
144
|
+
</div>
|
|
145
|
+
</CarouselContext.Provider>
|
|
146
|
+
);
|
|
147
|
+
},
|
|
148
|
+
);
|
|
149
|
+
Carousel.displayName = "Carousel";
|
|
150
|
+
|
|
151
|
+
const CarouselContent = React.forwardRef<
|
|
152
|
+
HTMLDivElement,
|
|
153
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
154
|
+
>(({ className, ...props }, ref) => {
|
|
155
|
+
const { carouselRef, orientation } = useCarousel();
|
|
156
|
+
|
|
157
|
+
return (
|
|
158
|
+
<div ref={carouselRef} className="overflow-hidden">
|
|
159
|
+
<div
|
|
160
|
+
ref={ref}
|
|
161
|
+
className={cn(
|
|
162
|
+
"flex",
|
|
163
|
+
orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
164
|
+
className,
|
|
165
|
+
)}
|
|
166
|
+
{...props}
|
|
167
|
+
/>
|
|
168
|
+
</div>
|
|
169
|
+
);
|
|
170
|
+
});
|
|
171
|
+
CarouselContent.displayName = "CarouselContent";
|
|
172
|
+
|
|
173
|
+
const CarouselItem = React.forwardRef<
|
|
174
|
+
HTMLDivElement,
|
|
175
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
176
|
+
>(({ className, ...props }, ref) => {
|
|
177
|
+
const { orientation } = useCarousel();
|
|
178
|
+
|
|
179
|
+
return (
|
|
180
|
+
<div
|
|
181
|
+
ref={ref}
|
|
182
|
+
role="group"
|
|
183
|
+
aria-roledescription="slide"
|
|
184
|
+
className={cn(
|
|
185
|
+
"min-w-0 shrink-0 grow-0 basis-full",
|
|
186
|
+
orientation === "horizontal" ? "pl-4" : "pt-4",
|
|
187
|
+
className,
|
|
188
|
+
)}
|
|
189
|
+
{...props}
|
|
190
|
+
/>
|
|
191
|
+
);
|
|
192
|
+
});
|
|
193
|
+
CarouselItem.displayName = "CarouselItem";
|
|
194
|
+
|
|
195
|
+
const CarouselPrevious = React.forwardRef<
|
|
196
|
+
HTMLButtonElement,
|
|
197
|
+
React.ComponentProps<typeof Button>
|
|
198
|
+
>(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
199
|
+
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
200
|
+
|
|
201
|
+
return (
|
|
202
|
+
<Button
|
|
203
|
+
ref={ref}
|
|
204
|
+
variant={variant}
|
|
205
|
+
size={size}
|
|
206
|
+
className={cn(
|
|
207
|
+
"absolute h-8 w-8 rounded-full",
|
|
208
|
+
orientation === "horizontal"
|
|
209
|
+
? "-left-12 top-1/2 -translate-y-1/2"
|
|
210
|
+
: "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
211
|
+
className,
|
|
212
|
+
)}
|
|
213
|
+
disabled={!canScrollPrev}
|
|
214
|
+
onClick={scrollPrev}
|
|
215
|
+
{...props}
|
|
216
|
+
>
|
|
217
|
+
<ArrowLeft className="h-4 w-4" />
|
|
218
|
+
<span className="sr-only">Previous slide</span>
|
|
219
|
+
</Button>
|
|
220
|
+
);
|
|
221
|
+
});
|
|
222
|
+
CarouselPrevious.displayName = "CarouselPrevious";
|
|
223
|
+
|
|
224
|
+
const CarouselNext = React.forwardRef<
|
|
225
|
+
HTMLButtonElement,
|
|
226
|
+
React.ComponentProps<typeof Button>
|
|
227
|
+
>(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
228
|
+
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
229
|
+
|
|
230
|
+
return (
|
|
231
|
+
<Button
|
|
232
|
+
ref={ref}
|
|
233
|
+
variant={variant}
|
|
234
|
+
size={size}
|
|
235
|
+
className={cn(
|
|
236
|
+
"absolute h-8 w-8 rounded-full",
|
|
237
|
+
orientation === "horizontal"
|
|
238
|
+
? "-right-12 top-1/2 -translate-y-1/2"
|
|
239
|
+
: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
240
|
+
className,
|
|
241
|
+
)}
|
|
242
|
+
disabled={!canScrollNext}
|
|
243
|
+
onClick={scrollNext}
|
|
244
|
+
{...props}
|
|
245
|
+
>
|
|
246
|
+
<ArrowRight className="h-4 w-4" />
|
|
247
|
+
<span className="sr-only">Next slide</span>
|
|
248
|
+
</Button>
|
|
249
|
+
);
|
|
250
|
+
});
|
|
251
|
+
CarouselNext.displayName = "CarouselNext";
|
|
252
|
+
|
|
253
|
+
export {
|
|
254
|
+
Carousel,
|
|
255
|
+
CarouselContent,
|
|
256
|
+
CarouselItem,
|
|
257
|
+
CarouselNext,
|
|
258
|
+
CarouselPrevious,
|
|
259
|
+
type CarouselApi,
|
|
260
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
2
|
+
import { Check } from "lucide-react";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
import { cn } from "../util/cn.js";
|
|
6
|
+
|
|
7
|
+
const Checkbox = React.forwardRef<
|
|
8
|
+
React.ElementRef<typeof CheckboxPrimitive.Root>,
|
|
9
|
+
React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
|
|
10
|
+
>(({ className, ...props }, ref) => (
|
|
11
|
+
<CheckboxPrimitive.Root
|
|
12
|
+
ref={ref}
|
|
13
|
+
className={cn(
|
|
14
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
15
|
+
className,
|
|
16
|
+
)}
|
|
17
|
+
{...props}
|
|
18
|
+
>
|
|
19
|
+
<CheckboxPrimitive.Indicator
|
|
20
|
+
className={cn("flex items-center justify-center text-current")}
|
|
21
|
+
>
|
|
22
|
+
<Check className="h-4 w-4" />
|
|
23
|
+
</CheckboxPrimitive.Indicator>
|
|
24
|
+
</CheckboxPrimitive.Root>
|
|
25
|
+
));
|
|
26
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
27
|
+
|
|
28
|
+
export { Checkbox };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
2
|
+
|
|
3
|
+
const Collapsible = CollapsiblePrimitive.Root;
|
|
4
|
+
|
|
5
|
+
const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
|
|
6
|
+
|
|
7
|
+
const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
|
|
8
|
+
|
|
9
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2
|
-
import {
|
|
2
|
+
import { X } from "lucide-react";
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
|
|
4
5
|
import { cn } from "../util/cn.js";
|
|
5
6
|
|
|
6
7
|
const Dialog = DialogPrimitive.Root;
|
|
@@ -35,14 +36,14 @@ const DialogContent = React.forwardRef<
|
|
|
35
36
|
<DialogPrimitive.Content
|
|
36
37
|
ref={ref}
|
|
37
38
|
className={cn(
|
|
38
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg 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 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg
|
|
39
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg 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 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
39
40
|
className,
|
|
40
41
|
)}
|
|
41
42
|
{...props}
|
|
42
43
|
>
|
|
43
44
|
{children}
|
|
44
45
|
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
|
|
45
|
-
<
|
|
46
|
+
<X className="h-4 w-4" />
|
|
46
47
|
<span className="sr-only">Close</span>
|
|
47
48
|
</DialogPrimitive.Close>
|
|
48
49
|
</DialogPrimitive.Content>
|