create-disposabl-app 0.10.0 → 0.10.1
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/disposabl.js +1 -1
- package/dist/index.js +2 -2
- package/dist/templates/default/apps/web/src/router/_authenticated/dashboard.api-keys.tsx +1 -1
- package/dist/templates/default/bun.lock +16 -1230
- package/dist/templates/default/packages/cli/README.md +9 -24
- package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/login.tsx +1 -1
- package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/signUp.tsx +1 -1
- package/dist/templates/default/packages/disposabl-kit/client/routes/consent.tsx +71 -13
- package/dist/templates/default/packages/disposabl-kit/package.json +0 -12
- package/package.json +1 -1
- package/dist/templates/default/apps/web/src/components/connections/expo-connection.tsx +0 -97
- package/dist/templates/default/apps/web/src/components/connections/provider-logo.tsx +0 -44
- package/dist/templates/default/apps/web/src/components/connections/use-connection-setup.ts +0 -169
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/accordion.tsx +0 -77
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/alert-dialog.tsx +0 -185
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/alert.tsx +0 -75
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/aspect-ratio.tsx +0 -22
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/attachment.tsx +0 -207
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/avatar.tsx +0 -106
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/badge.tsx +0 -51
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/breadcrumb.tsx +0 -121
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/bubble.tsx +0 -127
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/button-group.tsx +0 -87
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/calendar.tsx +0 -241
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/carousel.tsx +0 -239
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/chart.tsx +0 -368
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/checkbox.tsx +0 -27
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/code-block.tsx +0 -243
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/collapsible.tsx +0 -19
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/combobox.tsx +0 -300
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/command.tsx +0 -194
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/context-menu.tsx +0 -271
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/dialog.tsx +0 -156
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/direction.tsx +0 -4
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/drawer.tsx +0 -224
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/dropdown-menu.tsx +0 -269
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/empty.tsx +0 -103
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/hover-card.tsx +0 -50
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/input-group.tsx +0 -158
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/input-otp.tsx +0 -83
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/item.tsx +0 -201
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/kbd.tsx +0 -26
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/marker.tsx +0 -70
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/menubar.tsx +0 -284
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/message-scroller.tsx +0 -128
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/message.tsx +0 -91
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/native-select.tsx +0 -64
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/navigation-menu.tsx +0 -170
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/pagination.tsx +0 -133
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/popover.tsx +0 -87
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/progress.tsx +0 -82
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/questionnaire.tsx +0 -330
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/radio-group.tsx +0 -35
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/resizable.tsx +0 -49
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/scroll-area.tsx +0 -51
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/select.tsx +0 -201
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/sheet.tsx +0 -132
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/sidebar.tsx +0 -723
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/skeleton.tsx +0 -13
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/slider.tsx +0 -51
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/switch.tsx +0 -31
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/table.tsx +0 -113
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/tabs.tsx +0 -81
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/textarea.tsx +0 -17
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/toast.tsx +0 -229
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/toggle-group.tsx +0 -87
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/toggle.tsx +0 -42
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/tooltip.tsx +0 -65
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/trace.tsx +0 -161
- package/dist/templates/default/packages/disposabl-kit/client/hooks/use-mobile.ts +0 -21
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Command as CommandPrimitive } from "cmdk";
|
|
3
|
-
import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
Dialog,
|
|
7
|
-
DialogContent,
|
|
8
|
-
DialogDescription,
|
|
9
|
-
DialogHeader,
|
|
10
|
-
DialogTitle,
|
|
11
|
-
} from "@disposabl/disposabl-kit/client/components/ui/dialog";
|
|
12
|
-
import {
|
|
13
|
-
InputGroup,
|
|
14
|
-
InputGroupAddon,
|
|
15
|
-
} from "@disposabl/disposabl-kit/client/components/ui/input-group";
|
|
16
|
-
import { SearchIcon, CheckIcon } from "lucide-react";
|
|
17
|
-
|
|
18
|
-
function Command({
|
|
19
|
-
className,
|
|
20
|
-
...props
|
|
21
|
-
}: React.ComponentProps<typeof CommandPrimitive>) {
|
|
22
|
-
return (
|
|
23
|
-
<CommandPrimitive
|
|
24
|
-
data-slot="command"
|
|
25
|
-
className={cn(
|
|
26
|
-
"flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",
|
|
27
|
-
className,
|
|
28
|
-
)}
|
|
29
|
-
{...props}
|
|
30
|
-
/>
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function CommandDialog({
|
|
35
|
-
title = "Command Palette",
|
|
36
|
-
description = "Search for a command to run...",
|
|
37
|
-
children,
|
|
38
|
-
className,
|
|
39
|
-
showCloseButton = false,
|
|
40
|
-
...props
|
|
41
|
-
}: Omit<React.ComponentProps<typeof Dialog>, "children"> & {
|
|
42
|
-
title?: string;
|
|
43
|
-
description?: string;
|
|
44
|
-
className?: string;
|
|
45
|
-
showCloseButton?: boolean;
|
|
46
|
-
children: React.ReactNode;
|
|
47
|
-
}) {
|
|
48
|
-
return (
|
|
49
|
-
<Dialog {...props}>
|
|
50
|
-
<DialogHeader className="sr-only">
|
|
51
|
-
<DialogTitle>{title}</DialogTitle>
|
|
52
|
-
<DialogDescription>{description}</DialogDescription>
|
|
53
|
-
</DialogHeader>
|
|
54
|
-
<DialogContent
|
|
55
|
-
className={cn(
|
|
56
|
-
"top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0",
|
|
57
|
-
className,
|
|
58
|
-
)}
|
|
59
|
-
showCloseButton={showCloseButton}
|
|
60
|
-
>
|
|
61
|
-
{children}
|
|
62
|
-
</DialogContent>
|
|
63
|
-
</Dialog>
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function CommandInput({
|
|
68
|
-
className,
|
|
69
|
-
...props
|
|
70
|
-
}: React.ComponentProps<typeof CommandPrimitive.Input>) {
|
|
71
|
-
return (
|
|
72
|
-
<div data-slot="command-input-wrapper" className="p-1 pb-0">
|
|
73
|
-
<InputGroup className="h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!">
|
|
74
|
-
<CommandPrimitive.Input
|
|
75
|
-
data-slot="command-input"
|
|
76
|
-
className={cn(
|
|
77
|
-
"w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
78
|
-
className,
|
|
79
|
-
)}
|
|
80
|
-
{...props}
|
|
81
|
-
/>
|
|
82
|
-
<InputGroupAddon>
|
|
83
|
-
<SearchIcon className="size-4 shrink-0 opacity-50" />
|
|
84
|
-
</InputGroupAddon>
|
|
85
|
-
</InputGroup>
|
|
86
|
-
</div>
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function CommandList({
|
|
91
|
-
className,
|
|
92
|
-
...props
|
|
93
|
-
}: React.ComponentProps<typeof CommandPrimitive.List>) {
|
|
94
|
-
return (
|
|
95
|
-
<CommandPrimitive.List
|
|
96
|
-
data-slot="command-list"
|
|
97
|
-
className={cn(
|
|
98
|
-
"no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",
|
|
99
|
-
className,
|
|
100
|
-
)}
|
|
101
|
-
{...props}
|
|
102
|
-
/>
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function CommandEmpty({
|
|
107
|
-
className,
|
|
108
|
-
...props
|
|
109
|
-
}: React.ComponentProps<typeof CommandPrimitive.Empty>) {
|
|
110
|
-
return (
|
|
111
|
-
<CommandPrimitive.Empty
|
|
112
|
-
data-slot="command-empty"
|
|
113
|
-
className={cn("py-6 text-center text-sm", className)}
|
|
114
|
-
{...props}
|
|
115
|
-
/>
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function CommandGroup({
|
|
120
|
-
className,
|
|
121
|
-
...props
|
|
122
|
-
}: React.ComponentProps<typeof CommandPrimitive.Group>) {
|
|
123
|
-
return (
|
|
124
|
-
<CommandPrimitive.Group
|
|
125
|
-
data-slot="command-group"
|
|
126
|
-
className={cn(
|
|
127
|
-
"overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",
|
|
128
|
-
className,
|
|
129
|
-
)}
|
|
130
|
-
{...props}
|
|
131
|
-
/>
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
function CommandSeparator({
|
|
136
|
-
className,
|
|
137
|
-
...props
|
|
138
|
-
}: React.ComponentProps<typeof CommandPrimitive.Separator>) {
|
|
139
|
-
return (
|
|
140
|
-
<CommandPrimitive.Separator
|
|
141
|
-
data-slot="command-separator"
|
|
142
|
-
className={cn("-mx-1 h-px w-auto bg-border", className)}
|
|
143
|
-
{...props}
|
|
144
|
-
/>
|
|
145
|
-
);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function CommandItem({
|
|
149
|
-
className,
|
|
150
|
-
children,
|
|
151
|
-
...props
|
|
152
|
-
}: React.ComponentProps<typeof CommandPrimitive.Item>) {
|
|
153
|
-
return (
|
|
154
|
-
<CommandPrimitive.Item
|
|
155
|
-
data-slot="command-item"
|
|
156
|
-
className={cn(
|
|
157
|
-
"group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:**:[svg]:text-foreground",
|
|
158
|
-
className,
|
|
159
|
-
)}
|
|
160
|
-
{...props}
|
|
161
|
-
>
|
|
162
|
-
{children}
|
|
163
|
-
<CheckIcon className="ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" />
|
|
164
|
-
</CommandPrimitive.Item>
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
function CommandShortcut({
|
|
169
|
-
className,
|
|
170
|
-
...props
|
|
171
|
-
}: React.ComponentProps<"span">) {
|
|
172
|
-
return (
|
|
173
|
-
<span
|
|
174
|
-
data-slot="command-shortcut"
|
|
175
|
-
className={cn(
|
|
176
|
-
"ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground",
|
|
177
|
-
className,
|
|
178
|
-
)}
|
|
179
|
-
{...props}
|
|
180
|
-
/>
|
|
181
|
-
);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
export {
|
|
185
|
-
Command,
|
|
186
|
-
CommandDialog,
|
|
187
|
-
CommandInput,
|
|
188
|
-
CommandList,
|
|
189
|
-
CommandEmpty,
|
|
190
|
-
CommandGroup,
|
|
191
|
-
CommandItem,
|
|
192
|
-
CommandShortcut,
|
|
193
|
-
CommandSeparator,
|
|
194
|
-
};
|
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu";
|
|
5
|
-
import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
|
|
6
|
-
import { ChevronRightIcon, CheckIcon } from "lucide-react";
|
|
7
|
-
|
|
8
|
-
function ContextMenu({ ...props }: ContextMenuPrimitive.Root.Props) {
|
|
9
|
-
return <ContextMenuPrimitive.Root data-slot="context-menu" {...props} />;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function ContextMenuPortal({ ...props }: ContextMenuPrimitive.Portal.Props) {
|
|
13
|
-
return (
|
|
14
|
-
<ContextMenuPrimitive.Portal data-slot="context-menu-portal" {...props} />
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function ContextMenuTrigger({
|
|
19
|
-
className,
|
|
20
|
-
...props
|
|
21
|
-
}: ContextMenuPrimitive.Trigger.Props) {
|
|
22
|
-
return (
|
|
23
|
-
<ContextMenuPrimitive.Trigger
|
|
24
|
-
data-slot="context-menu-trigger"
|
|
25
|
-
className={cn("select-none", className)}
|
|
26
|
-
{...props}
|
|
27
|
-
/>
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function ContextMenuContent({
|
|
32
|
-
className,
|
|
33
|
-
align = "start",
|
|
34
|
-
alignOffset = 4,
|
|
35
|
-
side = "right",
|
|
36
|
-
sideOffset = 0,
|
|
37
|
-
...props
|
|
38
|
-
}: ContextMenuPrimitive.Popup.Props &
|
|
39
|
-
Pick<
|
|
40
|
-
ContextMenuPrimitive.Positioner.Props,
|
|
41
|
-
"align" | "alignOffset" | "side" | "sideOffset"
|
|
42
|
-
>) {
|
|
43
|
-
return (
|
|
44
|
-
<ContextMenuPrimitive.Portal>
|
|
45
|
-
<ContextMenuPrimitive.Positioner
|
|
46
|
-
className="isolate z-50 outline-none"
|
|
47
|
-
align={align}
|
|
48
|
-
alignOffset={alignOffset}
|
|
49
|
-
side={side}
|
|
50
|
-
sideOffset={sideOffset}
|
|
51
|
-
>
|
|
52
|
-
<ContextMenuPrimitive.Popup
|
|
53
|
-
data-slot="context-menu-content"
|
|
54
|
-
className={cn(
|
|
55
|
-
"z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
56
|
-
className,
|
|
57
|
-
)}
|
|
58
|
-
{...props}
|
|
59
|
-
/>
|
|
60
|
-
</ContextMenuPrimitive.Positioner>
|
|
61
|
-
</ContextMenuPrimitive.Portal>
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function ContextMenuGroup({ ...props }: ContextMenuPrimitive.Group.Props) {
|
|
66
|
-
return (
|
|
67
|
-
<ContextMenuPrimitive.Group data-slot="context-menu-group" {...props} />
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function ContextMenuLabel({
|
|
72
|
-
className,
|
|
73
|
-
inset,
|
|
74
|
-
...props
|
|
75
|
-
}: ContextMenuPrimitive.GroupLabel.Props & {
|
|
76
|
-
inset?: boolean;
|
|
77
|
-
}) {
|
|
78
|
-
return (
|
|
79
|
-
<ContextMenuPrimitive.GroupLabel
|
|
80
|
-
data-slot="context-menu-label"
|
|
81
|
-
data-inset={inset}
|
|
82
|
-
className={cn(
|
|
83
|
-
"px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:pl-8",
|
|
84
|
-
className,
|
|
85
|
-
)}
|
|
86
|
-
{...props}
|
|
87
|
-
/>
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function ContextMenuItem({
|
|
92
|
-
className,
|
|
93
|
-
inset,
|
|
94
|
-
variant = "default",
|
|
95
|
-
...props
|
|
96
|
-
}: ContextMenuPrimitive.Item.Props & {
|
|
97
|
-
inset?: boolean;
|
|
98
|
-
variant?: "default" | "destructive";
|
|
99
|
-
}) {
|
|
100
|
-
return (
|
|
101
|
-
<ContextMenuPrimitive.Item
|
|
102
|
-
data-slot="context-menu-item"
|
|
103
|
-
data-inset={inset}
|
|
104
|
-
data-variant={variant}
|
|
105
|
-
className={cn(
|
|
106
|
-
"group/context-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive",
|
|
107
|
-
className,
|
|
108
|
-
)}
|
|
109
|
-
{...props}
|
|
110
|
-
/>
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
function ContextMenuSub({ ...props }: ContextMenuPrimitive.SubmenuRoot.Props) {
|
|
115
|
-
return (
|
|
116
|
-
<ContextMenuPrimitive.SubmenuRoot data-slot="context-menu-sub" {...props} />
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
function ContextMenuSubTrigger({
|
|
121
|
-
className,
|
|
122
|
-
inset,
|
|
123
|
-
children,
|
|
124
|
-
...props
|
|
125
|
-
}: ContextMenuPrimitive.SubmenuTrigger.Props & {
|
|
126
|
-
inset?: boolean;
|
|
127
|
-
}) {
|
|
128
|
-
return (
|
|
129
|
-
<ContextMenuPrimitive.SubmenuTrigger
|
|
130
|
-
data-slot="context-menu-sub-trigger"
|
|
131
|
-
data-inset={inset}
|
|
132
|
-
className={cn(
|
|
133
|
-
"flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
134
|
-
className,
|
|
135
|
-
)}
|
|
136
|
-
{...props}
|
|
137
|
-
>
|
|
138
|
-
{children}
|
|
139
|
-
<ChevronRightIcon className="ml-auto" />
|
|
140
|
-
</ContextMenuPrimitive.SubmenuTrigger>
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
function ContextMenuSubContent({
|
|
145
|
-
...props
|
|
146
|
-
}: React.ComponentProps<typeof ContextMenuContent>) {
|
|
147
|
-
return (
|
|
148
|
-
<ContextMenuContent
|
|
149
|
-
data-slot="context-menu-sub-content"
|
|
150
|
-
className="shadow-lg"
|
|
151
|
-
side="right"
|
|
152
|
-
{...props}
|
|
153
|
-
/>
|
|
154
|
-
);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
function ContextMenuCheckboxItem({
|
|
158
|
-
className,
|
|
159
|
-
children,
|
|
160
|
-
checked,
|
|
161
|
-
inset,
|
|
162
|
-
...props
|
|
163
|
-
}: ContextMenuPrimitive.CheckboxItem.Props & {
|
|
164
|
-
inset?: boolean;
|
|
165
|
-
}) {
|
|
166
|
-
return (
|
|
167
|
-
<ContextMenuPrimitive.CheckboxItem
|
|
168
|
-
data-slot="context-menu-checkbox-item"
|
|
169
|
-
data-inset={inset}
|
|
170
|
-
className={cn(
|
|
171
|
-
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
172
|
-
className,
|
|
173
|
-
)}
|
|
174
|
-
checked={checked}
|
|
175
|
-
{...props}
|
|
176
|
-
>
|
|
177
|
-
<span className="pointer-events-none absolute right-2">
|
|
178
|
-
<ContextMenuPrimitive.CheckboxItemIndicator>
|
|
179
|
-
<CheckIcon />
|
|
180
|
-
</ContextMenuPrimitive.CheckboxItemIndicator>
|
|
181
|
-
</span>
|
|
182
|
-
{children}
|
|
183
|
-
</ContextMenuPrimitive.CheckboxItem>
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
function ContextMenuRadioGroup({
|
|
188
|
-
...props
|
|
189
|
-
}: ContextMenuPrimitive.RadioGroup.Props) {
|
|
190
|
-
return (
|
|
191
|
-
<ContextMenuPrimitive.RadioGroup
|
|
192
|
-
data-slot="context-menu-radio-group"
|
|
193
|
-
{...props}
|
|
194
|
-
/>
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
function ContextMenuRadioItem({
|
|
199
|
-
className,
|
|
200
|
-
children,
|
|
201
|
-
inset,
|
|
202
|
-
...props
|
|
203
|
-
}: ContextMenuPrimitive.RadioItem.Props & {
|
|
204
|
-
inset?: boolean;
|
|
205
|
-
}) {
|
|
206
|
-
return (
|
|
207
|
-
<ContextMenuPrimitive.RadioItem
|
|
208
|
-
data-slot="context-menu-radio-item"
|
|
209
|
-
data-inset={inset}
|
|
210
|
-
className={cn(
|
|
211
|
-
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
212
|
-
className,
|
|
213
|
-
)}
|
|
214
|
-
{...props}
|
|
215
|
-
>
|
|
216
|
-
<span className="pointer-events-none absolute right-2">
|
|
217
|
-
<ContextMenuPrimitive.RadioItemIndicator>
|
|
218
|
-
<CheckIcon />
|
|
219
|
-
</ContextMenuPrimitive.RadioItemIndicator>
|
|
220
|
-
</span>
|
|
221
|
-
{children}
|
|
222
|
-
</ContextMenuPrimitive.RadioItem>
|
|
223
|
-
);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
function ContextMenuSeparator({
|
|
227
|
-
className,
|
|
228
|
-
...props
|
|
229
|
-
}: ContextMenuPrimitive.Separator.Props) {
|
|
230
|
-
return (
|
|
231
|
-
<ContextMenuPrimitive.Separator
|
|
232
|
-
data-slot="context-menu-separator"
|
|
233
|
-
className={cn("-mx-1 my-1 h-px bg-border", className)}
|
|
234
|
-
{...props}
|
|
235
|
-
/>
|
|
236
|
-
);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
function ContextMenuShortcut({
|
|
240
|
-
className,
|
|
241
|
-
...props
|
|
242
|
-
}: React.ComponentProps<"span">) {
|
|
243
|
-
return (
|
|
244
|
-
<span
|
|
245
|
-
data-slot="context-menu-shortcut"
|
|
246
|
-
className={cn(
|
|
247
|
-
"ml-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground",
|
|
248
|
-
className,
|
|
249
|
-
)}
|
|
250
|
-
{...props}
|
|
251
|
-
/>
|
|
252
|
-
);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
export {
|
|
256
|
-
ContextMenu,
|
|
257
|
-
ContextMenuTrigger,
|
|
258
|
-
ContextMenuContent,
|
|
259
|
-
ContextMenuItem,
|
|
260
|
-
ContextMenuCheckboxItem,
|
|
261
|
-
ContextMenuRadioItem,
|
|
262
|
-
ContextMenuLabel,
|
|
263
|
-
ContextMenuSeparator,
|
|
264
|
-
ContextMenuShortcut,
|
|
265
|
-
ContextMenuGroup,
|
|
266
|
-
ContextMenuPortal,
|
|
267
|
-
ContextMenuSub,
|
|
268
|
-
ContextMenuSubContent,
|
|
269
|
-
ContextMenuSubTrigger,
|
|
270
|
-
ContextMenuRadioGroup,
|
|
271
|
-
};
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
5
|
-
import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
|
|
6
|
-
|
|
7
|
-
import { Button } from "@disposabl/disposabl-kit/client/components/ui/button";
|
|
8
|
-
import { XIcon } from "lucide-react";
|
|
9
|
-
|
|
10
|
-
function Dialog({ ...props }: DialogPrimitive.Root.Props) {
|
|
11
|
-
return <DialogPrimitive.Root data-slot="dialog" {...props} />;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) {
|
|
15
|
-
return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function DialogPortal({ ...props }: DialogPrimitive.Portal.Props) {
|
|
19
|
-
return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function DialogClose({ ...props }: DialogPrimitive.Close.Props) {
|
|
23
|
-
return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function DialogOverlay({
|
|
27
|
-
className,
|
|
28
|
-
...props
|
|
29
|
-
}: DialogPrimitive.Backdrop.Props) {
|
|
30
|
-
return (
|
|
31
|
-
<DialogPrimitive.Backdrop
|
|
32
|
-
data-slot="dialog-overlay"
|
|
33
|
-
className={cn(
|
|
34
|
-
"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
35
|
-
className,
|
|
36
|
-
)}
|
|
37
|
-
{...props}
|
|
38
|
-
/>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function DialogContent({
|
|
43
|
-
className,
|
|
44
|
-
children,
|
|
45
|
-
showCloseButton = true,
|
|
46
|
-
...props
|
|
47
|
-
}: DialogPrimitive.Popup.Props & {
|
|
48
|
-
showCloseButton?: boolean;
|
|
49
|
-
}) {
|
|
50
|
-
return (
|
|
51
|
-
<DialogPortal>
|
|
52
|
-
<DialogOverlay />
|
|
53
|
-
<DialogPrimitive.Popup
|
|
54
|
-
data-slot="dialog-content"
|
|
55
|
-
className={cn(
|
|
56
|
-
"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
57
|
-
className,
|
|
58
|
-
)}
|
|
59
|
-
{...props}
|
|
60
|
-
>
|
|
61
|
-
{children}
|
|
62
|
-
{showCloseButton && (
|
|
63
|
-
<DialogPrimitive.Close
|
|
64
|
-
data-slot="dialog-close"
|
|
65
|
-
render={
|
|
66
|
-
<Button
|
|
67
|
-
variant="ghost"
|
|
68
|
-
className="absolute top-4 right-4"
|
|
69
|
-
size="icon-sm"
|
|
70
|
-
/>
|
|
71
|
-
}
|
|
72
|
-
>
|
|
73
|
-
<XIcon />
|
|
74
|
-
<span className="sr-only">Close</span>
|
|
75
|
-
</DialogPrimitive.Close>
|
|
76
|
-
)}
|
|
77
|
-
</DialogPrimitive.Popup>
|
|
78
|
-
</DialogPortal>
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
83
|
-
return (
|
|
84
|
-
<div
|
|
85
|
-
data-slot="dialog-header"
|
|
86
|
-
className={cn("flex flex-col gap-2", className)}
|
|
87
|
-
{...props}
|
|
88
|
-
/>
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function DialogFooter({
|
|
93
|
-
className,
|
|
94
|
-
showCloseButton = false,
|
|
95
|
-
children,
|
|
96
|
-
...props
|
|
97
|
-
}: React.ComponentProps<"div"> & {
|
|
98
|
-
showCloseButton?: boolean;
|
|
99
|
-
}) {
|
|
100
|
-
return (
|
|
101
|
-
<div
|
|
102
|
-
data-slot="dialog-footer"
|
|
103
|
-
className={cn(
|
|
104
|
-
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
105
|
-
className,
|
|
106
|
-
)}
|
|
107
|
-
{...props}
|
|
108
|
-
>
|
|
109
|
-
{children}
|
|
110
|
-
{showCloseButton && (
|
|
111
|
-
<DialogPrimitive.Close render={<Button variant="outline" />}>
|
|
112
|
-
Close
|
|
113
|
-
</DialogPrimitive.Close>
|
|
114
|
-
)}
|
|
115
|
-
</div>
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {
|
|
120
|
-
return (
|
|
121
|
-
<DialogPrimitive.Title
|
|
122
|
-
data-slot="dialog-title"
|
|
123
|
-
className={cn("font-heading leading-none font-medium", className)}
|
|
124
|
-
{...props}
|
|
125
|
-
/>
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
function DialogDescription({
|
|
130
|
-
className,
|
|
131
|
-
...props
|
|
132
|
-
}: DialogPrimitive.Description.Props) {
|
|
133
|
-
return (
|
|
134
|
-
<DialogPrimitive.Description
|
|
135
|
-
data-slot="dialog-description"
|
|
136
|
-
className={cn(
|
|
137
|
-
"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
|
|
138
|
-
className,
|
|
139
|
-
)}
|
|
140
|
-
{...props}
|
|
141
|
-
/>
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export {
|
|
146
|
-
Dialog,
|
|
147
|
-
DialogClose,
|
|
148
|
-
DialogContent,
|
|
149
|
-
DialogDescription,
|
|
150
|
-
DialogFooter,
|
|
151
|
-
DialogHeader,
|
|
152
|
-
DialogOverlay,
|
|
153
|
-
DialogPortal,
|
|
154
|
-
DialogTitle,
|
|
155
|
-
DialogTrigger,
|
|
156
|
-
};
|