@catalystsoftware/ui 1.0.5 → 1.0.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/data/data.tsx +29 -29
- package/dist/data/tailwind.config.js +3821 -261
- package/dist/data.tsx +29 -29
- package/package.json +4 -3
- package/components/catalyst-ui/buttons/burger.tsx +0 -207
- package/components/catalyst-ui/core/data-display/timeline.tsx +0 -210
- package/components/catalyst-ui/core/feedback/alert.tsx +0 -491
- package/components/catalyst-ui/core/feedback/spinner-1.tsx +0 -65
- package/components/catalyst-ui/core/feedback/toast.tsx +0 -1857
- package/components/catalyst-ui/core/navigation/menu.tsx +0 -164
- package/components/catalyst-ui/forms/toggle-class.tsx +0 -176
- package/components/catalyst-ui/hooks/use-copy-to-clipboard.tsx +0 -419
- package/components/catalyst-ui/hooks/use-counter.tsx +0 -13
- package/components/catalyst-ui/hooks/use-event-listener.tsx +0 -23
- package/components/catalyst-ui/hooks/use-export-markdown.tsx +0 -47
- package/components/catalyst-ui/hooks/use-focus.tsx +0 -17
- package/components/catalyst-ui/hooks/use-interval.tsx +0 -23
- package/components/catalyst-ui/hooks/use-is-client.tsx +0 -16
- package/components/catalyst-ui/hooks/use-media-query.tsx +0 -19
- package/components/catalyst-ui/hooks/use-mobile.tsx +0 -19
- package/components/catalyst-ui/hooks/use-resize-observer.tsx +0 -81
- package/components/catalyst-ui/hooks/use-timeout.tsx +0 -21
- package/components/catalyst-ui/hooks/use-timer.tsx +0 -209
- package/components/catalyst-ui/hooks/use-toggle.tsx +0 -12
- package/components/catalyst-ui/media/image.tsx +0 -13
- package/components/catalyst-ui/overlays/dual-sidebar.tsx +0 -4142
- package/components/catalyst-ui/overlays/sidebar-original.tsx +0 -726
- package/components/catalyst-ui/primitives/accordion.tsx +0 -250
- package/components/catalyst-ui/primitives/alert-dialog.tsx +0 -126
- package/components/catalyst-ui/primitives/aspect-ratio.tsx +0 -9
- package/components/catalyst-ui/primitives/avatar.tsx +0 -296
- package/components/catalyst-ui/primitives/badge.tsx +0 -57
- package/components/catalyst-ui/primitives/breadcrumb.tsx +0 -101
- package/components/catalyst-ui/primitives/button.tsx +0 -265
- package/components/catalyst-ui/primitives/calendar-v4.tsx +0 -208
- package/components/catalyst-ui/primitives/calendar.tsx +0 -295
- package/components/catalyst-ui/primitives/card.tsx +0 -618
- package/components/catalyst-ui/primitives/carousel.tsx +0 -238
- package/components/catalyst-ui/primitives/chart.tsx +0 -347
- package/components/catalyst-ui/primitives/checkbox.tsx +0 -225
- package/components/catalyst-ui/primitives/collapsible.tsx +0 -212
- package/components/catalyst-ui/primitives/command.tsx +0 -393
- package/components/catalyst-ui/primitives/context-menu.tsx +0 -236
- package/components/catalyst-ui/primitives/dialog.tsx +0 -471
- package/components/catalyst-ui/primitives/drawer.tsx +0 -761
- package/components/catalyst-ui/primitives/dropdown-menu.tsx +0 -290
- package/components/catalyst-ui/primitives/empty.tsx +0 -104
- package/components/catalyst-ui/primitives/field.tsx +0 -244
- package/components/catalyst-ui/primitives/hover-card.tsx +0 -124
- package/components/catalyst-ui/primitives/input-otp.tsx +0 -76
- package/components/catalyst-ui/primitives/input.tsx +0 -64
- package/components/catalyst-ui/primitives/item.tsx +0 -196
- package/components/catalyst-ui/primitives/kbd.tsx +0 -75
- package/components/catalyst-ui/primitives/label.tsx +0 -24
- package/components/catalyst-ui/primitives/navigation-menu.tsx +0 -150
- package/components/catalyst-ui/primitives/pagination.tsx +0 -198
- package/components/catalyst-ui/primitives/popover.tsx +0 -232
- package/components/catalyst-ui/primitives/progress.tsx +0 -34
- package/components/catalyst-ui/primitives/radio-group.tsx +0 -43
- package/components/catalyst-ui/primitives/resizable.tsx +0 -56
- package/components/catalyst-ui/primitives/select.tsx +0 -155
- package/components/catalyst-ui/primitives/separator.tsx +0 -74
- package/components/catalyst-ui/primitives/sheet.tsx +0 -126
- package/components/catalyst-ui/primitives/skeleton.tsx +0 -15
- package/components/catalyst-ui/primitives/slider.tsx +0 -27
- package/components/catalyst-ui/primitives/switch.tsx +0 -187
- package/components/catalyst-ui/primitives/tabs.tsx +0 -335
- package/components/catalyst-ui/primitives/textarea.tsx +0 -24
- package/components/catalyst-ui/primitives/toggle-group.tsx +0 -55
- package/components/catalyst-ui/primitives/toggle.tsx +0 -42
- package/components/catalyst-ui/primitives/tooltip.tsx +0 -116
- package/components/catalyst-ui/utils/basic-auth.tsx +0 -40
- package/components/catalyst-ui/utils/context-storage.tsx +0 -19
- package/components/catalyst-ui/utils/cors-middleware.tsx +0 -71
- package/components/catalyst-ui/utils/deferred-content.tsx +0 -595
- package/components/catalyst-ui/utils/honeypot-middleware.tsx +0 -38
- package/components/catalyst-ui/utils/incId.tsx +0 -75
- package/components/catalyst-ui/utils/jwk-auth.tsx +0 -36
- package/components/catalyst-ui/utils/request-id.tsx +0 -14
- package/components/catalyst-ui/utils/secure-headers.tsx +0 -37
- package/components/catalyst-ui/utils/server-timing.tsx +0 -23
- package/components/catalyst-ui/utils/utils.ts +0 -43
- package/components/catalyst-ui/utils/with-cookie.tsx +0 -43
- package/components/catalyst-ui/x/accordian-x.tsx +0 -428
- package/components/catalyst-ui/x/alert-x.tsx +0 -413
- package/components/catalyst-ui/x/animated-text-x.tsx +0 -2242
- package/components/catalyst-ui/x/avatar-x.tsx +0 -515
- package/components/catalyst-ui/x/badge-x.tsx +0 -670
- package/components/catalyst-ui/x/button-X.tsx +0 -2857
- package/components/catalyst-ui/x/button-group-x.tsx +0 -847
- package/components/catalyst-ui/x/calendar-x.tsx +0 -1910
- package/components/catalyst-ui/x/card-x.tsx +0 -2597
- package/components/catalyst-ui/x/checkbox-x.tsx +0 -656
- package/components/catalyst-ui/x/collapsible-x.tsx +0 -1360
- package/components/catalyst-ui/x/combobox-x.tsx +0 -911
- package/components/catalyst-ui/x/data-table-x.tsx +0 -1753
- package/components/catalyst-ui/x/date-picker-x.tsx +0 -648
- package/components/catalyst-ui/x/dialog-x.tsx +0 -659
- package/components/catalyst-ui/x/dropdown-menu-x.tsx +0 -612
- package/components/catalyst-ui/x/hover-card-x.tsx +0 -375
- package/components/catalyst-ui/x/icon-x.tsx +0 -840
- package/components/catalyst-ui/x/input-mask-x.tsx +0 -981
- package/components/catalyst-ui/x/input-otp-x.tsx +0 -659
- package/components/catalyst-ui/x/loader-x.tsx +0 -1757
- package/components/catalyst-ui/x/pagination-x.tsx +0 -622
- package/components/catalyst-ui/x/popover-x.tsx +0 -744
- package/components/catalyst-ui/x/radio-group-x.tsx +0 -499
- package/components/catalyst-ui/x/select-x.tsx +0 -1127
- package/components/catalyst-ui/x/sheet-x.tsx +0 -668
- package/components/catalyst-ui/x/switch-x.tsx +0 -681
- package/components/catalyst-ui/x/table-x.tsx +0 -574
- package/components/catalyst-ui/x/tabs-x.tsx +0 -839
- package/components/catalyst-ui/x/textarea-x.tsx +0 -1263
- package/components/catalyst-ui/x/tooltip-x.tsx +0 -396
- package/components/catalyst-ui/x/tracker-x.tsx +0 -560
- package/data/bg-data.tsx +0 -901
- package/data/buttons-data.tsx +0 -2327
- package/data/charts-data.tsx +0 -102
- package/data/chat-data.tsx +0 -83
- package/data/code-data.tsx +0 -1040
- package/data/comboboxes-data.tsx +0 -1843
- package/data/command-data.tsx +0 -1381
- package/data/core-data.tsx +0 -15953
- package/data/crm-data.tsx +0 -47
- package/data/data.tsx +0 -159
- package/data/date-and-time-data.tsx +0 -554
- package/data/dependencies.tsx +0 -7
- package/data/ecommerce-data.tsx +0 -1387
- package/data/forms-data.tsx +0 -7890
- package/data/hooks-data.tsx +0 -5487
- package/data/index.ts +0 -34
- package/data/inputs-data.tsx +0 -557
- package/data/interactive-data.tsx +0 -5394
- package/data/lofi-data.tsx +0 -18295
- package/data/marketing-data.tsx +0 -2546
- package/data/media-data.tsx +0 -1510
- package/data/motion-data.tsx +0 -5801
- package/data/overlay-data.tsx +0 -4136
- package/data/pdf-data.tsx +0 -124
- package/data/pos-data.tsx +0 -213
- package/data/postcss.config.js +0 -6
- package/data/primitive-data.tsx +0 -5170
- package/data/prompt-data.tsx +0 -1226
- package/data/requiredLibs.ts +0 -4
- package/data/sandbox-data.tsx +0 -1
- package/data/sidebars-data.tsx +0 -5421
- package/data/stacks-data.tsx +0 -32
- package/data/table-data.tsx +0 -706
- package/data/tailwind.config.js +0 -270
- package/data/tailwind.config.ngin.js +0 -3830
- package/data/tailwind.css +0 -431
- package/data/tools-data.tsx +0 -6910
- package/data/typography-data.tsx +0 -2050
- package/data/utils-data.tsx +0 -6500
- package/data/x-data.tsx +0 -1171
|
@@ -1,471 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { X } from "lucide-react";
|
|
3
|
-
import { cn } from '~/components/catalyst-ui';
|
|
4
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
5
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
6
|
-
|
|
7
|
-
const dialogContentVariants = cva(
|
|
8
|
-
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed z-50 grid w-full border shadow-lg duration-200",
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
default: "top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] max-w-[calc(100%-2rem)] gap-4 rounded-lg p-6 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:max-w-lg",
|
|
13
|
-
topLeft: "top-0 left-0 m-6 max-w-[425px] translate-x-0 translate-y-0 gap-4 rounded-lg p-6 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 max-sm:max-w-[calc(100%-3rem)]",
|
|
14
|
-
top: "top-0 left-[50%] mt-6 translate-x-[-50%] translate-y-0 max-w-[calc(100%-2rem)] gap-4 rounded-lg p-6 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:max-w-[425px]",
|
|
15
|
-
topRight: "top-0 right-0 left-auto m-6 max-w-[425px] translate-x-0 translate-y-0 gap-4 rounded-lg p-6 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 max-sm:max-w-[calc(100%-3rem)]",
|
|
16
|
-
middleLeft: "top-[50%] left-0 ml-6 max-w-[425px] translate-x-0 translate-y-[-50%] gap-4 rounded-lg p-6 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 max-sm:max-w-[calc(100%-3rem)]",
|
|
17
|
-
middleRight: "top-[50%] right-0 left-auto mr-6 max-w-[425px] translate-x-0 translate-y-[-50%] gap-4 rounded-lg p-6 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 max-sm:max-w-[calc(100%-3rem)]",
|
|
18
|
-
bottomLeft: "top-auto bottom-0 left-0 m-6 max-w-[425px] translate-x-0 translate-y-0 gap-4 rounded-lg p-6 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 max-sm:max-w-[calc(100%-3rem)]",
|
|
19
|
-
bottom: "top-auto bottom-0 left-[50%] mb-6 translate-x-[-50%] translate-y-0 max-w-[calc(100%-2rem)] gap-4 rounded-lg p-6 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:max-w-[425px]",
|
|
20
|
-
bottomRight: "top-auto right-0 bottom-0 left-auto m-6 max-w-[425px] translate-x-0 translate-y-0 gap-4 rounded-lg p-6 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 max-sm:max-w-[calc(100%-3rem)]",
|
|
21
|
-
slideTop: "top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] max-w-[calc(100%-2rem)] gap-4 rounded-lg p-6 data-[state=open]:zoom-in-100 data-[state=open]:slide-in-from-bottom-20 data-[state=open]:duration-600 sm:max-w-[425px]",
|
|
22
|
-
slideRight: "top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] max-w-[calc(100%-2rem)] gap-4 rounded-lg p-6 data-[state=open]:zoom-in-100 data-[state=open]:slide-in-from-left-20 data-[state=open]:duration-600 sm:max-w-[425px]",
|
|
23
|
-
zoomIn: "top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] max-w-[calc(100%-2rem)] gap-4 rounded-lg p-6 data-[state=open]:zoom-in-0 data-[state=open]:duration-600 sm:max-w-[425px]",
|
|
24
|
-
fullscreen: "mb-8 h-[calc(100vh-2rem)] min-w-[calc(100vw-2rem)] translate-x-[-50%] translate-y-[-50%] gap-0 p-0 top-[50%] left-[50%]",
|
|
25
|
-
scrollable: "top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] max-w-[calc(100%-2rem)] max-h-[min(600px,80vh)] flex-col gap-0 p-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:max-w-md",
|
|
26
|
-
stickyHeader: "top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] max-w-[calc(100%-2rem)] max-h-[min(600px,80vh)] flex-col gap-0 p-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:max-w-md",
|
|
27
|
-
stickyFooter: "top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] max-w-[calc(100%-2rem)] max-h-[min(600px,80vh)] flex-col gap-0 p-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:max-w-md",
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
defaultVariants: {
|
|
31
|
-
variant: "default",
|
|
32
|
-
},
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
type DialogContextType = {
|
|
37
|
-
variant?: VariantProps<typeof dialogContentVariants>["variant"]
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const DialogContext = React.createContext<DialogContextType>({
|
|
41
|
-
variant: "default",
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
export const useDialogContext = () => {
|
|
45
|
-
const context = React.useContext(DialogContext)
|
|
46
|
-
if (!context) {
|
|
47
|
-
throw new Error("Dialog components must be used within Dialog")
|
|
48
|
-
}
|
|
49
|
-
return context
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function Dialog({
|
|
53
|
-
variant,
|
|
54
|
-
...props
|
|
55
|
-
}: React.ComponentProps<typeof DialogPrimitive.Root> & VariantProps<typeof dialogContentVariants>) {
|
|
56
|
-
return (
|
|
57
|
-
<DialogContext.Provider value={{ variant }}>
|
|
58
|
-
<DialogPrimitive.Root data-slot="dialog" {...props} />
|
|
59
|
-
</DialogContext.Provider>
|
|
60
|
-
)
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function DialogTrigger({
|
|
64
|
-
...props
|
|
65
|
-
}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
|
|
66
|
-
return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function DialogPortal({
|
|
70
|
-
...props
|
|
71
|
-
}: React.ComponentProps<typeof DialogPrimitive.Portal>) {
|
|
72
|
-
return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function DialogClose({
|
|
76
|
-
...props
|
|
77
|
-
}: React.ComponentProps<typeof DialogPrimitive.Close>) {
|
|
78
|
-
return <DialogPrimitive.Close data-slot="dialog-close" {...props} />
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function DialogOverlay({
|
|
82
|
-
className,
|
|
83
|
-
...props
|
|
84
|
-
}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
|
|
85
|
-
return (
|
|
86
|
-
<DialogPrimitive.Overlay
|
|
87
|
-
data-slot="dialog-overlay"
|
|
88
|
-
className={cn(
|
|
89
|
-
"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",
|
|
90
|
-
className
|
|
91
|
-
)}
|
|
92
|
-
{...props}
|
|
93
|
-
/>
|
|
94
|
-
)
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
function DialogContent({
|
|
98
|
-
className,
|
|
99
|
-
children,
|
|
100
|
-
showCloseButton = true,
|
|
101
|
-
...props
|
|
102
|
-
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
103
|
-
showCloseButton?: boolean
|
|
104
|
-
}) {
|
|
105
|
-
const { variant } = useDialogContext()
|
|
106
|
-
|
|
107
|
-
return (
|
|
108
|
-
<DialogPortal data-slot="dialog-portal">
|
|
109
|
-
<DialogOverlay />
|
|
110
|
-
<DialogPrimitive.Content
|
|
111
|
-
data-slot="dialog-content"
|
|
112
|
-
className={cn(dialogContentVariants({ variant }), className)}
|
|
113
|
-
{...props}
|
|
114
|
-
>
|
|
115
|
-
{children}
|
|
116
|
-
{showCloseButton && (
|
|
117
|
-
<DialogPrimitive.Close
|
|
118
|
-
data-slot="dialog-close"
|
|
119
|
-
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"
|
|
120
|
-
>
|
|
121
|
-
<X />
|
|
122
|
-
<span className="sr-only">Close</span>
|
|
123
|
-
</DialogPrimitive.Close>
|
|
124
|
-
)}
|
|
125
|
-
</DialogPrimitive.Content>
|
|
126
|
-
</DialogPortal>
|
|
127
|
-
)
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
131
|
-
return (
|
|
132
|
-
<div
|
|
133
|
-
data-slot="dialog-header"
|
|
134
|
-
className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
|
|
135
|
-
{...props}
|
|
136
|
-
/>
|
|
137
|
-
)
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
function DialogFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
141
|
-
return (
|
|
142
|
-
<div
|
|
143
|
-
data-slot="dialog-footer"
|
|
144
|
-
className={cn(
|
|
145
|
-
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
146
|
-
className
|
|
147
|
-
)}
|
|
148
|
-
{...props}
|
|
149
|
-
/>
|
|
150
|
-
)
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
function DialogTitle({
|
|
154
|
-
className,
|
|
155
|
-
...props
|
|
156
|
-
}: React.ComponentProps<typeof DialogPrimitive.Title>) {
|
|
157
|
-
return (
|
|
158
|
-
<DialogPrimitive.Title
|
|
159
|
-
data-slot="dialog-title"
|
|
160
|
-
className={cn("text-lg leading-none font-semibold", className)}
|
|
161
|
-
{...props}
|
|
162
|
-
/>
|
|
163
|
-
)
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
function DialogDescription({
|
|
167
|
-
className,
|
|
168
|
-
...props
|
|
169
|
-
}: React.ComponentProps<typeof DialogPrimitive.Description>) {
|
|
170
|
-
return (
|
|
171
|
-
<DialogPrimitive.Description
|
|
172
|
-
data-slot="dialog-description"
|
|
173
|
-
className={cn("text-muted-foreground text-sm", className)}
|
|
174
|
-
{...props}
|
|
175
|
-
/>
|
|
176
|
-
)
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
export {
|
|
180
|
-
Dialog,
|
|
181
|
-
DialogClose,
|
|
182
|
-
DialogContent,
|
|
183
|
-
DialogDescription,
|
|
184
|
-
DialogFooter,
|
|
185
|
-
DialogHeader,
|
|
186
|
-
DialogOverlay,
|
|
187
|
-
DialogPortal,
|
|
188
|
-
DialogTitle,
|
|
189
|
-
DialogTrigger,
|
|
190
|
-
dialogContentVariants,
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
export function DialogDemo555() {
|
|
195
|
-
return (
|
|
196
|
-
<div className="flex flex-col gap-4 p-8">
|
|
197
|
-
<h1 className="text-2xl font-bold mb-6">Simplified Dialog Demo</h1>
|
|
198
|
-
|
|
199
|
-
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
|
200
|
-
{/* Basic Dialog */}
|
|
201
|
-
<Dialog>
|
|
202
|
-
<DialogTrigger asChild>
|
|
203
|
-
<Button variant="outline" className="w-full">
|
|
204
|
-
<Info className="h-4 w-4 mr-2" />
|
|
205
|
-
Basic Dialog
|
|
206
|
-
</Button>
|
|
207
|
-
</DialogTrigger>
|
|
208
|
-
<DialogContent size="md">
|
|
209
|
-
<DialogHeader>
|
|
210
|
-
<DialogTitle>Basic Dialog</DialogTitle>
|
|
211
|
-
<DialogDescription>
|
|
212
|
-
This is a simple dialog example with basic content.
|
|
213
|
-
</DialogDescription>
|
|
214
|
-
</DialogHeader>
|
|
215
|
-
<DialogBody>
|
|
216
|
-
<div className="space-y-4">
|
|
217
|
-
<p>This is the dialog content area.</p>
|
|
218
|
-
<p>You can put any content here - forms, lists, images, etc.</p>
|
|
219
|
-
<div className="bg-gray-100 p-4 rounded">
|
|
220
|
-
<h3 className="font-medium mb-2">Example Content</h3>
|
|
221
|
-
<p className="text-sm text-gray-600">
|
|
222
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
223
|
-
Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
224
|
-
</p>
|
|
225
|
-
</div>
|
|
226
|
-
</div>
|
|
227
|
-
</DialogBody>
|
|
228
|
-
<DialogFooter>
|
|
229
|
-
<DialogClose asChild>
|
|
230
|
-
<Button variant="outline">Cancel</Button>
|
|
231
|
-
</DialogClose>
|
|
232
|
-
<DialogClose asChild>
|
|
233
|
-
<Button>Got it</Button>
|
|
234
|
-
</DialogClose>
|
|
235
|
-
</DialogFooter>
|
|
236
|
-
</DialogContent>
|
|
237
|
-
</Dialog>
|
|
238
|
-
|
|
239
|
-
{/* Confirmation Dialog */}
|
|
240
|
-
<Dialog>
|
|
241
|
-
<DialogTrigger asChild>
|
|
242
|
-
<Button variant="destructive" className="w-full">
|
|
243
|
-
<Trash2 className="h-4 w-4 mr-2" />
|
|
244
|
-
Delete Item
|
|
245
|
-
</Button>
|
|
246
|
-
</DialogTrigger>
|
|
247
|
-
<DialogContent size="sm">
|
|
248
|
-
<DialogHeader>
|
|
249
|
-
<DialogTitle className="flex items-center gap-2 text-red-600">
|
|
250
|
-
<AlertTriangle className="h-5 w-5" />
|
|
251
|
-
Confirm Deletion
|
|
252
|
-
</DialogTitle>
|
|
253
|
-
<DialogDescription>
|
|
254
|
-
Are you sure you want to delete this item? This action cannot be undone.
|
|
255
|
-
</DialogDescription>
|
|
256
|
-
</DialogHeader>
|
|
257
|
-
<DialogFooter>
|
|
258
|
-
<DialogClose asChild>
|
|
259
|
-
<Button variant="outline">Cancel</Button>
|
|
260
|
-
</DialogClose>
|
|
261
|
-
<DialogClose asChild>
|
|
262
|
-
<Button variant="destructive">Delete</Button>
|
|
263
|
-
</DialogClose>
|
|
264
|
-
</DialogFooter>
|
|
265
|
-
</DialogContent>
|
|
266
|
-
</Dialog>
|
|
267
|
-
|
|
268
|
-
{/* Success Dialog */}
|
|
269
|
-
<Dialog>
|
|
270
|
-
<DialogTrigger asChild>
|
|
271
|
-
<Button variant="outline" className="w-full">
|
|
272
|
-
<CheckCircle className="h-4 w-4 mr-2" />
|
|
273
|
-
Success Dialog
|
|
274
|
-
</Button>
|
|
275
|
-
</DialogTrigger>
|
|
276
|
-
<DialogContent size="sm">
|
|
277
|
-
<DialogHeader>
|
|
278
|
-
<DialogTitle className="flex items-center gap-2 text-green-600">
|
|
279
|
-
<CheckCircle className="h-5 w-5" />
|
|
280
|
-
Success!
|
|
281
|
-
</DialogTitle>
|
|
282
|
-
<DialogDescription>
|
|
283
|
-
Your action has been completed successfully.
|
|
284
|
-
</DialogDescription>
|
|
285
|
-
</DialogHeader>
|
|
286
|
-
<DialogFooter>
|
|
287
|
-
<DialogClose asChild>
|
|
288
|
-
<Button className="w-full">Continue</Button>
|
|
289
|
-
</DialogClose>
|
|
290
|
-
</DialogFooter>
|
|
291
|
-
</DialogContent>
|
|
292
|
-
</Dialog>
|
|
293
|
-
|
|
294
|
-
{/* Form Dialog */}
|
|
295
|
-
<Dialog>
|
|
296
|
-
<DialogTrigger asChild>
|
|
297
|
-
<Button variant="outline" className="w-full">
|
|
298
|
-
<User className="h-4 w-4 mr-2" />
|
|
299
|
-
Edit Profile
|
|
300
|
-
</Button>
|
|
301
|
-
</DialogTrigger>
|
|
302
|
-
<DialogContent size="lg">
|
|
303
|
-
<DialogHeader>
|
|
304
|
-
<DialogTitle className="flex items-center gap-2">
|
|
305
|
-
<User className="h-5 w-5" />
|
|
306
|
-
Edit Profile
|
|
307
|
-
</DialogTitle>
|
|
308
|
-
<DialogDescription>
|
|
309
|
-
Update your profile information below.
|
|
310
|
-
</DialogDescription>
|
|
311
|
-
</DialogHeader>
|
|
312
|
-
<DialogBody>
|
|
313
|
-
<form className="space-y-4">
|
|
314
|
-
<div className="grid grid-cols-2 gap-4">
|
|
315
|
-
<div>
|
|
316
|
-
<Label htmlFor="firstName">First Name</Label>
|
|
317
|
-
<Input id="firstName" placeholder="John" />
|
|
318
|
-
</div>
|
|
319
|
-
<div>
|
|
320
|
-
<Label htmlFor="lastName">Last Name</Label>
|
|
321
|
-
<Input id="lastName" placeholder="Doe" />
|
|
322
|
-
</div>
|
|
323
|
-
</div>
|
|
324
|
-
|
|
325
|
-
<div>
|
|
326
|
-
<Label htmlFor="email">Email</Label>
|
|
327
|
-
<div className="relative">
|
|
328
|
-
<Mail className="absolute left-3 top-3 h-4 w-4 text-gray-400" />
|
|
329
|
-
<Input id="email" type="email" placeholder="john@example.com" className="pl-10" />
|
|
330
|
-
</div>
|
|
331
|
-
</div>
|
|
332
|
-
|
|
333
|
-
<div>
|
|
334
|
-
<Label htmlFor="phone">Phone</Label>
|
|
335
|
-
<div className="relative">
|
|
336
|
-
<Phone className="absolute left-3 top-3 h-4 w-4 text-gray-400" />
|
|
337
|
-
<Input id="phone" placeholder="+1 (555) 000-0000" className="pl-10" />
|
|
338
|
-
</div>
|
|
339
|
-
</div>
|
|
340
|
-
|
|
341
|
-
<div>
|
|
342
|
-
<Label htmlFor="bio">Bio</Label>
|
|
343
|
-
<Textarea id="bio" placeholder="Tell us about yourself..." rows={3} />
|
|
344
|
-
</div>
|
|
345
|
-
</form>
|
|
346
|
-
</DialogBody>
|
|
347
|
-
<DialogFooter>
|
|
348
|
-
<DialogClose asChild>
|
|
349
|
-
<Button variant="outline">Cancel</Button>
|
|
350
|
-
</DialogClose>
|
|
351
|
-
<DialogClose asChild>
|
|
352
|
-
<Button>Save Changes</Button>
|
|
353
|
-
</DialogClose>
|
|
354
|
-
</DialogFooter>
|
|
355
|
-
</DialogContent>
|
|
356
|
-
</Dialog>
|
|
357
|
-
|
|
358
|
-
{/* Large Dialog */}
|
|
359
|
-
<Dialog>
|
|
360
|
-
<DialogTrigger asChild>
|
|
361
|
-
<Button variant="outline" className="w-full">
|
|
362
|
-
Large Dialog
|
|
363
|
-
</Button>
|
|
364
|
-
</DialogTrigger>
|
|
365
|
-
<DialogContent size="xl">
|
|
366
|
-
<DialogHeader>
|
|
367
|
-
<DialogTitle>Large Dialog Example</DialogTitle>
|
|
368
|
-
<DialogDescription>
|
|
369
|
-
This is a larger dialog for more complex content.
|
|
370
|
-
</DialogDescription>
|
|
371
|
-
</DialogHeader>
|
|
372
|
-
<DialogBody>
|
|
373
|
-
<div className="space-y-6">
|
|
374
|
-
<div>
|
|
375
|
-
<h3 className="text-lg font-medium mb-3">Section 1</h3>
|
|
376
|
-
<p className="text-sm text-gray-600 mb-4">
|
|
377
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod
|
|
378
|
-
tempor incididunt ut labore et dolore magna aliqua.
|
|
379
|
-
</p>
|
|
380
|
-
<div className="grid grid-cols-2 gap-4">
|
|
381
|
-
<div className="bg-blue-50 p-4 rounded">
|
|
382
|
-
<h4 className="font-medium mb-2">Feature A</h4>
|
|
383
|
-
<p className="text-sm">Description of feature A</p>
|
|
384
|
-
</div>
|
|
385
|
-
<div className="bg-green-50 p-4 rounded">
|
|
386
|
-
<h4 className="font-medium mb-2">Feature B</h4>
|
|
387
|
-
<p className="text-sm">Description of feature B</p>
|
|
388
|
-
</div>
|
|
389
|
-
</div>
|
|
390
|
-
</div>
|
|
391
|
-
|
|
392
|
-
<div>
|
|
393
|
-
<h3 className="text-lg font-medium mb-3">Section 2</h3>
|
|
394
|
-
<p className="text-sm text-gray-600">
|
|
395
|
-
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
396
|
-
nisi ut aliquip ex ea commodo consequat.
|
|
397
|
-
</p>
|
|
398
|
-
</div>
|
|
399
|
-
</div>
|
|
400
|
-
</DialogBody>
|
|
401
|
-
<DialogFooter>
|
|
402
|
-
<DialogClose asChild>
|
|
403
|
-
<Button variant="outline">Cancel</Button>
|
|
404
|
-
</DialogClose>
|
|
405
|
-
<DialogClose asChild>
|
|
406
|
-
<Button>Confirm</Button>
|
|
407
|
-
</DialogClose>
|
|
408
|
-
</DialogFooter>
|
|
409
|
-
</DialogContent>
|
|
410
|
-
</Dialog>
|
|
411
|
-
|
|
412
|
-
{/* Small Dialog */}
|
|
413
|
-
<Dialog>
|
|
414
|
-
<DialogTrigger asChild>
|
|
415
|
-
<Button variant="outline" className="w-full">
|
|
416
|
-
Small Dialog
|
|
417
|
-
</Button>
|
|
418
|
-
</DialogTrigger>
|
|
419
|
-
<DialogContent size="sm">
|
|
420
|
-
<DialogHeader>
|
|
421
|
-
<DialogTitle>Quick Action</DialogTitle>
|
|
422
|
-
<DialogDescription>
|
|
423
|
-
This is a compact dialog for simple actions.
|
|
424
|
-
</DialogDescription>
|
|
425
|
-
</DialogHeader>
|
|
426
|
-
<DialogBody>
|
|
427
|
-
<p className="text-sm">Are you sure you want to continue?</p>
|
|
428
|
-
</DialogBody>
|
|
429
|
-
<DialogFooter>
|
|
430
|
-
<DialogClose asChild>
|
|
431
|
-
<Button variant="outline" size="sm">No</Button>
|
|
432
|
-
</DialogClose>
|
|
433
|
-
<DialogClose asChild>
|
|
434
|
-
<Button size="sm">Yes</Button>
|
|
435
|
-
</DialogClose>
|
|
436
|
-
</DialogFooter>
|
|
437
|
-
</DialogContent>
|
|
438
|
-
</Dialog>
|
|
439
|
-
</div>
|
|
440
|
-
|
|
441
|
-
{/* Usage Example Code */}
|
|
442
|
-
<div className="mt-8 p-4 bg-gray-50 rounded-lg">
|
|
443
|
-
<h2 className="text-lg font-semibold mb-2">Simplified Dialog Usage</h2>
|
|
444
|
-
<pre className="text-sm overflow-x-auto">
|
|
445
|
-
{`<Dialog>
|
|
446
|
-
<DialogTrigger asChild>
|
|
447
|
-
<Button>Open Dialog</Button>
|
|
448
|
-
</DialogTrigger>
|
|
449
|
-
<DialogContent size="md">
|
|
450
|
-
<DialogHeader>
|
|
451
|
-
<DialogTitle>Dialog Title</DialogTitle>
|
|
452
|
-
<DialogDescription>Dialog description</DialogDescription>
|
|
453
|
-
</DialogHeader>
|
|
454
|
-
<DialogBody>
|
|
455
|
-
{/* Your content here */}
|
|
456
|
-
</DialogBody>
|
|
457
|
-
<DialogFooter>
|
|
458
|
-
<DialogClose asChild>
|
|
459
|
-
<Button variant="outline">Cancel</Button>
|
|
460
|
-
</DialogClose>
|
|
461
|
-
<DialogClose asChild>
|
|
462
|
-
<Button>Confirm</Button>
|
|
463
|
-
</DialogClose>
|
|
464
|
-
</DialogFooter>
|
|
465
|
-
</DialogContent>
|
|
466
|
-
</Dialog>`}
|
|
467
|
-
</pre>
|
|
468
|
-
</div>
|
|
469
|
-
</div>
|
|
470
|
-
)
|
|
471
|
-
}
|