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.
Files changed (70) hide show
  1. package/dist/disposabl.js +1 -1
  2. package/dist/index.js +2 -2
  3. package/dist/templates/default/apps/web/src/router/_authenticated/dashboard.api-keys.tsx +1 -1
  4. package/dist/templates/default/bun.lock +16 -1230
  5. package/dist/templates/default/packages/cli/README.md +9 -24
  6. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/login.tsx +1 -1
  7. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/signUp.tsx +1 -1
  8. package/dist/templates/default/packages/disposabl-kit/client/routes/consent.tsx +71 -13
  9. package/dist/templates/default/packages/disposabl-kit/package.json +0 -12
  10. package/package.json +1 -1
  11. package/dist/templates/default/apps/web/src/components/connections/expo-connection.tsx +0 -97
  12. package/dist/templates/default/apps/web/src/components/connections/provider-logo.tsx +0 -44
  13. package/dist/templates/default/apps/web/src/components/connections/use-connection-setup.ts +0 -169
  14. package/dist/templates/default/packages/disposabl-kit/client/components/ui/accordion.tsx +0 -77
  15. package/dist/templates/default/packages/disposabl-kit/client/components/ui/alert-dialog.tsx +0 -185
  16. package/dist/templates/default/packages/disposabl-kit/client/components/ui/alert.tsx +0 -75
  17. package/dist/templates/default/packages/disposabl-kit/client/components/ui/aspect-ratio.tsx +0 -22
  18. package/dist/templates/default/packages/disposabl-kit/client/components/ui/attachment.tsx +0 -207
  19. package/dist/templates/default/packages/disposabl-kit/client/components/ui/avatar.tsx +0 -106
  20. package/dist/templates/default/packages/disposabl-kit/client/components/ui/badge.tsx +0 -51
  21. package/dist/templates/default/packages/disposabl-kit/client/components/ui/breadcrumb.tsx +0 -121
  22. package/dist/templates/default/packages/disposabl-kit/client/components/ui/bubble.tsx +0 -127
  23. package/dist/templates/default/packages/disposabl-kit/client/components/ui/button-group.tsx +0 -87
  24. package/dist/templates/default/packages/disposabl-kit/client/components/ui/calendar.tsx +0 -241
  25. package/dist/templates/default/packages/disposabl-kit/client/components/ui/carousel.tsx +0 -239
  26. package/dist/templates/default/packages/disposabl-kit/client/components/ui/chart.tsx +0 -368
  27. package/dist/templates/default/packages/disposabl-kit/client/components/ui/checkbox.tsx +0 -27
  28. package/dist/templates/default/packages/disposabl-kit/client/components/ui/code-block.tsx +0 -243
  29. package/dist/templates/default/packages/disposabl-kit/client/components/ui/collapsible.tsx +0 -19
  30. package/dist/templates/default/packages/disposabl-kit/client/components/ui/combobox.tsx +0 -300
  31. package/dist/templates/default/packages/disposabl-kit/client/components/ui/command.tsx +0 -194
  32. package/dist/templates/default/packages/disposabl-kit/client/components/ui/context-menu.tsx +0 -271
  33. package/dist/templates/default/packages/disposabl-kit/client/components/ui/dialog.tsx +0 -156
  34. package/dist/templates/default/packages/disposabl-kit/client/components/ui/direction.tsx +0 -4
  35. package/dist/templates/default/packages/disposabl-kit/client/components/ui/drawer.tsx +0 -224
  36. package/dist/templates/default/packages/disposabl-kit/client/components/ui/dropdown-menu.tsx +0 -269
  37. package/dist/templates/default/packages/disposabl-kit/client/components/ui/empty.tsx +0 -103
  38. package/dist/templates/default/packages/disposabl-kit/client/components/ui/hover-card.tsx +0 -50
  39. package/dist/templates/default/packages/disposabl-kit/client/components/ui/input-group.tsx +0 -158
  40. package/dist/templates/default/packages/disposabl-kit/client/components/ui/input-otp.tsx +0 -83
  41. package/dist/templates/default/packages/disposabl-kit/client/components/ui/item.tsx +0 -201
  42. package/dist/templates/default/packages/disposabl-kit/client/components/ui/kbd.tsx +0 -26
  43. package/dist/templates/default/packages/disposabl-kit/client/components/ui/marker.tsx +0 -70
  44. package/dist/templates/default/packages/disposabl-kit/client/components/ui/menubar.tsx +0 -284
  45. package/dist/templates/default/packages/disposabl-kit/client/components/ui/message-scroller.tsx +0 -128
  46. package/dist/templates/default/packages/disposabl-kit/client/components/ui/message.tsx +0 -91
  47. package/dist/templates/default/packages/disposabl-kit/client/components/ui/native-select.tsx +0 -64
  48. package/dist/templates/default/packages/disposabl-kit/client/components/ui/navigation-menu.tsx +0 -170
  49. package/dist/templates/default/packages/disposabl-kit/client/components/ui/pagination.tsx +0 -133
  50. package/dist/templates/default/packages/disposabl-kit/client/components/ui/popover.tsx +0 -87
  51. package/dist/templates/default/packages/disposabl-kit/client/components/ui/progress.tsx +0 -82
  52. package/dist/templates/default/packages/disposabl-kit/client/components/ui/questionnaire.tsx +0 -330
  53. package/dist/templates/default/packages/disposabl-kit/client/components/ui/radio-group.tsx +0 -35
  54. package/dist/templates/default/packages/disposabl-kit/client/components/ui/resizable.tsx +0 -49
  55. package/dist/templates/default/packages/disposabl-kit/client/components/ui/scroll-area.tsx +0 -51
  56. package/dist/templates/default/packages/disposabl-kit/client/components/ui/select.tsx +0 -201
  57. package/dist/templates/default/packages/disposabl-kit/client/components/ui/sheet.tsx +0 -132
  58. package/dist/templates/default/packages/disposabl-kit/client/components/ui/sidebar.tsx +0 -723
  59. package/dist/templates/default/packages/disposabl-kit/client/components/ui/skeleton.tsx +0 -13
  60. package/dist/templates/default/packages/disposabl-kit/client/components/ui/slider.tsx +0 -51
  61. package/dist/templates/default/packages/disposabl-kit/client/components/ui/switch.tsx +0 -31
  62. package/dist/templates/default/packages/disposabl-kit/client/components/ui/table.tsx +0 -113
  63. package/dist/templates/default/packages/disposabl-kit/client/components/ui/tabs.tsx +0 -81
  64. package/dist/templates/default/packages/disposabl-kit/client/components/ui/textarea.tsx +0 -17
  65. package/dist/templates/default/packages/disposabl-kit/client/components/ui/toast.tsx +0 -229
  66. package/dist/templates/default/packages/disposabl-kit/client/components/ui/toggle-group.tsx +0 -87
  67. package/dist/templates/default/packages/disposabl-kit/client/components/ui/toggle.tsx +0 -42
  68. package/dist/templates/default/packages/disposabl-kit/client/components/ui/tooltip.tsx +0 -65
  69. package/dist/templates/default/packages/disposabl-kit/client/components/ui/trace.tsx +0 -161
  70. package/dist/templates/default/packages/disposabl-kit/client/hooks/use-mobile.ts +0 -21
@@ -1,224 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
5
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
6
-
7
- type DrawerContextProps = {
8
- hasSnapPoints: boolean;
9
- modal: DrawerPrimitive.Root.Props["modal"];
10
- showSwipeHandle: boolean;
11
- swipeDirection: NonNullable<DrawerPrimitive.Root.Props["swipeDirection"]>;
12
- };
13
-
14
- const DrawerContext = React.createContext<DrawerContextProps | null>(null);
15
-
16
- function useDrawer() {
17
- const context = React.useContext(DrawerContext);
18
-
19
- if (!context) {
20
- throw new Error("useDrawer must be used within a Drawer.");
21
- }
22
-
23
- return context;
24
- }
25
-
26
- function Drawer({
27
- modal = true,
28
- showSwipeHandle = false,
29
- snapPoints,
30
- swipeDirection = "down",
31
- ...props
32
- }: DrawerPrimitive.Root.Props & {
33
- showSwipeHandle?: boolean;
34
- }) {
35
- const hasSnapPoints = snapPoints != null && snapPoints.length > 0;
36
- const contextValue = React.useMemo(
37
- () => ({ hasSnapPoints, modal, showSwipeHandle, swipeDirection }),
38
- [hasSnapPoints, modal, showSwipeHandle, swipeDirection],
39
- );
40
-
41
- return (
42
- <DrawerContext.Provider value={contextValue}>
43
- <DrawerPrimitive.Root
44
- data-slot="drawer"
45
- modal={modal}
46
- snapPoints={snapPoints}
47
- swipeDirection={swipeDirection}
48
- {...props}
49
- />
50
- </DrawerContext.Provider>
51
- );
52
- }
53
-
54
- function DrawerTrigger({ ...props }: DrawerPrimitive.Trigger.Props) {
55
- return <DrawerPrimitive.Trigger data-slot="drawer-trigger" {...props} />;
56
- }
57
-
58
- function DrawerPortal({ ...props }: DrawerPrimitive.Portal.Props) {
59
- return <DrawerPrimitive.Portal data-slot="drawer-portal" {...props} />;
60
- }
61
-
62
- function DrawerClose({ ...props }: DrawerPrimitive.Close.Props) {
63
- return <DrawerPrimitive.Close data-slot="drawer-close" {...props} />;
64
- }
65
-
66
- function DrawerOverlay({
67
- className,
68
- ...props
69
- }: DrawerPrimitive.Backdrop.Props) {
70
- return (
71
- <DrawerPrimitive.Backdrop
72
- data-slot="drawer-overlay"
73
- className={cn(
74
- "fixed inset-0 z-50 min-h-dvh bg-black/10 opacity-[max(var(--drawer-overlay-min-opacity,0),calc(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] select-none data-ending-style:pointer-events-none data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-snap-points:[--drawer-overlay-min-opacity:0.5] data-starting-style:opacity-0 data-swiping:duration-0 supports-backdrop-filter:backdrop-blur-xs supports-[-webkit-touch-callout:none]:absolute",
75
- className,
76
- )}
77
- {...props}
78
- />
79
- );
80
- }
81
-
82
- function DrawerSwipeHandle({
83
- className,
84
- ...props
85
- }: React.ComponentProps<"div">) {
86
- return (
87
- <div
88
- data-slot="drawer-swipe-handle"
89
- aria-hidden="true"
90
- className={cn(
91
- "relative z-10 flex shrink-0 cursor-grab transition-opacity duration-200 group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-[swipe-axis=x]/drawer-popup:h-full group-data-[swipe-axis=x]/drawer-popup:w-3 group-data-[swipe-axis=x]/drawer-popup:items-center group-data-[swipe-axis=y]/drawer-popup:h-3 group-data-[swipe-axis=y]/drawer-popup:w-full group-data-[swipe-axis=y]/drawer-popup:justify-center group-data-[swipe-direction=down]/drawer-popup:items-end group-data-[swipe-direction=left]/drawer-popup:order-last group-data-[swipe-direction=left]/drawer-popup:justify-start group-data-[swipe-direction=right]/drawer-popup:justify-end group-data-[swipe-direction=up]/drawer-popup:order-last group-data-[swipe-direction=up]/drawer-popup:items-start after:block after:shrink-0 after:rounded-full after:bg-muted group-data-[swipe-axis=x]/drawer-popup:after:h-[100px] group-data-[swipe-axis=x]/drawer-popup:after:w-1.5 group-data-[swipe-axis=y]/drawer-popup:after:h-1.5 group-data-[swipe-axis=y]/drawer-popup:after:w-[100px] active:cursor-grabbing",
92
- className,
93
- )}
94
- {...props}
95
- />
96
- );
97
- }
98
-
99
- function DrawerContent({
100
- className,
101
- children,
102
- ...props
103
- }: DrawerPrimitive.Popup.Props) {
104
- const { hasSnapPoints, modal, showSwipeHandle, swipeDirection } = useDrawer();
105
- const swipeAxis =
106
- swipeDirection === "down" || swipeDirection === "up" ? "y" : "x";
107
-
108
- return (
109
- <DrawerPortal data-slot="drawer-portal">
110
- {modal === true && (
111
- <DrawerOverlay data-snap-points={hasSnapPoints ? "" : undefined} />
112
- )}
113
- <DrawerPrimitive.Viewport
114
- data-slot="drawer-viewport"
115
- data-modal={modal}
116
- className="pointer-events-none fixed inset-0 z-50 select-none data-[modal=true]:pointer-events-auto"
117
- >
118
- <DrawerPrimitive.Popup
119
- data-slot="drawer-popup"
120
- data-swipe-axis={swipeAxis}
121
- data-snap-points={hasSnapPoints ? "" : undefined}
122
- className={cn(
123
- // Base.
124
- "group/drawer-popup pointer-events-auto fixed z-50 m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col bg-popover text-sm text-popover-foreground transition-[transform,height,opacity,filter] duration-450 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform outline-none select-none [interpolate-size:allow-keywords] data-[swipe-direction=down]:rounded-t-xl data-[swipe-direction=down]:border-t data-[swipe-direction=left]:rounded-r-xl data-[swipe-direction=left]:border-r data-[swipe-direction=right]:rounded-l-xl data-[swipe-direction=right]:border-l data-[swipe-direction=up]:rounded-b-xl data-[swipe-direction=up]:border-b",
125
- // Nested.
126
- "data-nested-drawer-open:overflow-hidden data-nested-drawer-open:brightness-95",
127
- // Bleed.
128
- "after:pointer-events-none after:absolute after:bg-(--drawer-bleed-background,var(--color-popover)) data-[swipe-axis=x]:after:inset-y-0 data-[swipe-axis=x]:after:w-(--bleed) data-[swipe-axis=y]:after:inset-x-0 data-[swipe-axis=y]:after:h-(--bleed) data-[swipe-direction=down]:after:top-full data-[swipe-direction=left]:after:right-full data-[swipe-direction=right]:after:left-full data-[swipe-direction=up]:after:bottom-full",
129
- // Sizing.
130
- "[--drawer-content-height:var(--drawer-height,auto)] data-[swipe-axis=x]:[--drawer-content-width:75%] data-[swipe-axis=y]:[--drawer-content-max-height:calc(100dvh-6rem)] data-[swipe-axis=y]:data-snap-points:[--drawer-content-height:100dvh] data-[swipe-axis=x]:sm:[--drawer-content-width:24rem]",
131
- // Stack.
132
- "[--bleed:3rem] [--peek:1rem] [--stack-height:var(--drawer-frontmost-height,var(--drawer-height,0px))] [--stack-peek-offset:max(0px,calc((var(--nested-drawers)-var(--stack-progress))*var(--peek)))] [--stack-progress:clamp(0,var(--drawer-swipe-progress),1)] [--stack-scale-base:max(0,calc(1-(var(--nested-drawers)*var(--stack-step))))] [--stack-scale:clamp(0,calc(var(--stack-scale-base)+(var(--stack-step)*var(--stack-progress))),1)] [--stack-shrink:calc(1-var(--stack-scale))] [--stack-step:0.05]",
133
- // Transitions.
134
- "data-ending-style:transform-(--closed-transform) data-ending-style:opacity-[0.9999] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-nested-drawer-swiping:duration-0 data-ending-style:data-nested-drawer-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-starting-style:transform-(--closed-transform) data-swiping:duration-0 data-ending-style:data-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)]",
135
- // Axis: y.
136
- "data-[swipe-axis=y]:inset-x-0 data-[swipe-axis=y]:data-nested-drawer-open:h-(--stack-height)",
137
- // Axis: x.
138
- "data-[swipe-axis=x]:inset-y-0 data-[swipe-axis=x]:flex-row",
139
- // Direction: down.
140
- "data-[swipe-direction=down]:bottom-0 data-[swipe-direction=down]:origin-bottom data-[swipe-direction=down]:[--closed-transform:translate3d(0,calc(100%+var(--drawer-inset,0px)+2px),0)] data-[swipe-direction=down]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)-var(--stack-peek-offset)-(var(--stack-shrink)*var(--stack-height)))]",
141
- // Direction: up.
142
- "data-[swipe-direction=up]:top-0 data-[swipe-direction=up]:origin-top data-[swipe-direction=up]:[--closed-transform:translate3d(0,calc(-100%-var(--drawer-inset,0px)-2px),0)] data-[swipe-direction=up]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)+var(--stack-peek-offset)+(var(--stack-shrink)*var(--stack-height)))]",
143
- // Direction: left.
144
- "data-[swipe-direction=left]:left-0 data-[swipe-direction=left]:origin-left data-[swipe-direction=left]:[--closed-transform:translate3d(calc(-100%-var(--drawer-inset,0px)-2px),0,0)] data-[swipe-direction=left]:[--translate-x:calc(var(--drawer-swipe-movement-x)+var(--stack-peek-offset)+(var(--stack-shrink)*100%))]",
145
- // Direction: right.
146
- "data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:origin-right data-[swipe-direction=right]:[--closed-transform:translate3d(calc(100%+var(--drawer-inset,0px)+2px),0,0)] data-[swipe-direction=right]:[--translate-x:calc(var(--drawer-swipe-movement-x)-var(--stack-peek-offset)-(var(--stack-shrink)*100%))]",
147
- className,
148
- )}
149
- {...props}
150
- >
151
- {showSwipeHandle && <DrawerSwipeHandle />}
152
- <DrawerPrimitive.Content
153
- data-slot="drawer-content"
154
- className={cn(
155
- "flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-300 ease-[cubic-bezier(0.45,1.005,0,1.005)] select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none",
156
- )}
157
- >
158
- {children}
159
- </DrawerPrimitive.Content>
160
- </DrawerPrimitive.Popup>
161
- </DrawerPrimitive.Viewport>
162
- </DrawerPortal>
163
- );
164
- }
165
-
166
- function DrawerHeader({ className, ...props }: React.ComponentProps<"div">) {
167
- return (
168
- <div
169
- data-slot="drawer-header"
170
- className={cn(
171
- "flex shrink-0 flex-col gap-0.5 p-4 pb-0 group-data-[swipe-axis=y]/drawer-popup:text-center md:gap-1.5 md:text-left",
172
- className,
173
- )}
174
- {...props}
175
- />
176
- );
177
- }
178
-
179
- function DrawerFooter({ className, ...props }: React.ComponentProps<"div">) {
180
- return (
181
- <div
182
- data-slot="drawer-footer"
183
- className={cn("mt-auto flex shrink-0 flex-col gap-2 p-4 pt-0", className)}
184
- {...props}
185
- />
186
- );
187
- }
188
-
189
- function DrawerTitle({ className, ...props }: DrawerPrimitive.Title.Props) {
190
- return (
191
- <DrawerPrimitive.Title
192
- data-slot="drawer-title"
193
- className={cn("font-heading font-medium text-foreground", className)}
194
- {...props}
195
- />
196
- );
197
- }
198
-
199
- function DrawerDescription({
200
- className,
201
- ...props
202
- }: DrawerPrimitive.Description.Props) {
203
- return (
204
- <DrawerPrimitive.Description
205
- data-slot="drawer-description"
206
- className={cn("text-sm text-balance text-muted-foreground", className)}
207
- {...props}
208
- />
209
- );
210
- }
211
-
212
- export {
213
- Drawer,
214
- DrawerPortal,
215
- DrawerOverlay,
216
- DrawerSwipeHandle,
217
- DrawerTrigger,
218
- DrawerClose,
219
- DrawerContent,
220
- DrawerHeader,
221
- DrawerFooter,
222
- DrawerTitle,
223
- DrawerDescription,
224
- };
@@ -1,269 +0,0 @@
1
- import * as React from "react";
2
- import { Menu as MenuPrimitive } from "@base-ui/react/menu";
3
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
4
- import { ChevronRightIcon, CheckIcon } from "lucide-react";
5
-
6
- function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {
7
- return <MenuPrimitive.Root data-slot="dropdown-menu" {...props} />;
8
- }
9
-
10
- function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) {
11
- return <MenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />;
12
- }
13
-
14
- function DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props) {
15
- return <MenuPrimitive.Trigger data-slot="dropdown-menu-trigger" {...props} />;
16
- }
17
-
18
- function DropdownMenuContent({
19
- align = "start",
20
- alignOffset = 0,
21
- side = "bottom",
22
- sideOffset = 4,
23
- className,
24
- ...props
25
- }: MenuPrimitive.Popup.Props &
26
- Pick<
27
- MenuPrimitive.Positioner.Props,
28
- "align" | "alignOffset" | "side" | "sideOffset"
29
- >) {
30
- return (
31
- <MenuPrimitive.Portal>
32
- <MenuPrimitive.Positioner
33
- className="isolate z-50 outline-none"
34
- align={align}
35
- alignOffset={alignOffset}
36
- side={side}
37
- sideOffset={sideOffset}
38
- >
39
- <MenuPrimitive.Popup
40
- data-slot="dropdown-menu-content"
41
- className={cn(
42
- "z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 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:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",
43
- className,
44
- )}
45
- {...props}
46
- />
47
- </MenuPrimitive.Positioner>
48
- </MenuPrimitive.Portal>
49
- );
50
- }
51
-
52
- function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props) {
53
- return <MenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />;
54
- }
55
-
56
- function DropdownMenuLabel({
57
- className,
58
- inset,
59
- ...props
60
- }: MenuPrimitive.GroupLabel.Props & {
61
- inset?: boolean;
62
- }) {
63
- return (
64
- <MenuPrimitive.GroupLabel
65
- data-slot="dropdown-menu-label"
66
- data-inset={inset}
67
- className={cn(
68
- "px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:pl-8",
69
- className,
70
- )}
71
- {...props}
72
- />
73
- );
74
- }
75
-
76
- function DropdownMenuItem({
77
- className,
78
- inset,
79
- variant = "default",
80
- ...props
81
- }: MenuPrimitive.Item.Props & {
82
- inset?: boolean;
83
- variant?: "default" | "destructive";
84
- }) {
85
- return (
86
- <MenuPrimitive.Item
87
- data-slot="dropdown-menu-item"
88
- data-inset={inset}
89
- data-variant={variant}
90
- className={cn(
91
- "group/dropdown-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 not-data-[variant=destructive]: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 data-[variant=destructive]:*:[svg]:text-destructive",
92
- className,
93
- )}
94
- {...props}
95
- />
96
- );
97
- }
98
-
99
- function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props) {
100
- return <MenuPrimitive.SubmenuRoot data-slot="dropdown-menu-sub" {...props} />;
101
- }
102
-
103
- function DropdownMenuSubTrigger({
104
- className,
105
- inset,
106
- children,
107
- ...props
108
- }: MenuPrimitive.SubmenuTrigger.Props & {
109
- inset?: boolean;
110
- }) {
111
- return (
112
- <MenuPrimitive.SubmenuTrigger
113
- data-slot="dropdown-menu-sub-trigger"
114
- data-inset={inset}
115
- className={cn(
116
- "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 not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
117
- className,
118
- )}
119
- {...props}
120
- >
121
- {children}
122
- <ChevronRightIcon className="ml-auto" />
123
- </MenuPrimitive.SubmenuTrigger>
124
- );
125
- }
126
-
127
- function DropdownMenuSubContent({
128
- align = "start",
129
- alignOffset = -3,
130
- side = "right",
131
- sideOffset = 0,
132
- className,
133
- ...props
134
- }: React.ComponentProps<typeof DropdownMenuContent>) {
135
- return (
136
- <DropdownMenuContent
137
- data-slot="dropdown-menu-sub-content"
138
- className={cn(
139
- "w-auto min-w-[96px] rounded-md bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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",
140
- className,
141
- )}
142
- align={align}
143
- alignOffset={alignOffset}
144
- side={side}
145
- sideOffset={sideOffset}
146
- {...props}
147
- />
148
- );
149
- }
150
-
151
- function DropdownMenuCheckboxItem({
152
- className,
153
- children,
154
- checked,
155
- inset,
156
- ...props
157
- }: MenuPrimitive.CheckboxItem.Props & {
158
- inset?: boolean;
159
- }) {
160
- return (
161
- <MenuPrimitive.CheckboxItem
162
- data-slot="dropdown-menu-checkbox-item"
163
- data-inset={inset}
164
- className={cn(
165
- "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 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",
166
- className,
167
- )}
168
- checked={checked}
169
- {...props}
170
- >
171
- <span
172
- className="pointer-events-none absolute right-2 flex items-center justify-center"
173
- data-slot="dropdown-menu-checkbox-item-indicator"
174
- >
175
- <MenuPrimitive.CheckboxItemIndicator>
176
- <CheckIcon />
177
- </MenuPrimitive.CheckboxItemIndicator>
178
- </span>
179
- {children}
180
- </MenuPrimitive.CheckboxItem>
181
- );
182
- }
183
-
184
- function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props) {
185
- return (
186
- <MenuPrimitive.RadioGroup
187
- data-slot="dropdown-menu-radio-group"
188
- {...props}
189
- />
190
- );
191
- }
192
-
193
- function DropdownMenuRadioItem({
194
- className,
195
- children,
196
- inset,
197
- ...props
198
- }: MenuPrimitive.RadioItem.Props & {
199
- inset?: boolean;
200
- }) {
201
- return (
202
- <MenuPrimitive.RadioItem
203
- data-slot="dropdown-menu-radio-item"
204
- data-inset={inset}
205
- className={cn(
206
- "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 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",
207
- className,
208
- )}
209
- {...props}
210
- >
211
- <span
212
- className="pointer-events-none absolute right-2 flex items-center justify-center"
213
- data-slot="dropdown-menu-radio-item-indicator"
214
- >
215
- <MenuPrimitive.RadioItemIndicator>
216
- <CheckIcon />
217
- </MenuPrimitive.RadioItemIndicator>
218
- </span>
219
- {children}
220
- </MenuPrimitive.RadioItem>
221
- );
222
- }
223
-
224
- function DropdownMenuSeparator({
225
- className,
226
- ...props
227
- }: MenuPrimitive.Separator.Props) {
228
- return (
229
- <MenuPrimitive.Separator
230
- data-slot="dropdown-menu-separator"
231
- className={cn("-mx-1 my-1 h-px bg-border", className)}
232
- {...props}
233
- />
234
- );
235
- }
236
-
237
- function DropdownMenuShortcut({
238
- className,
239
- ...props
240
- }: React.ComponentProps<"span">) {
241
- return (
242
- <span
243
- data-slot="dropdown-menu-shortcut"
244
- className={cn(
245
- "ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
246
- className,
247
- )}
248
- {...props}
249
- />
250
- );
251
- }
252
-
253
- export {
254
- DropdownMenu,
255
- DropdownMenuPortal,
256
- DropdownMenuTrigger,
257
- DropdownMenuContent,
258
- DropdownMenuGroup,
259
- DropdownMenuLabel,
260
- DropdownMenuItem,
261
- DropdownMenuCheckboxItem,
262
- DropdownMenuRadioGroup,
263
- DropdownMenuRadioItem,
264
- DropdownMenuSeparator,
265
- DropdownMenuShortcut,
266
- DropdownMenuSub,
267
- DropdownMenuSubTrigger,
268
- DropdownMenuSubContent,
269
- };
@@ -1,103 +0,0 @@
1
- import { cva, type VariantProps } from "class-variance-authority";
2
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
3
-
4
- function Empty({ className, ...props }: React.ComponentProps<"div">) {
5
- return (
6
- <div
7
- data-slot="empty"
8
- className={cn(
9
- "flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-lg border-dashed p-12 text-center text-balance",
10
- className,
11
- )}
12
- {...props}
13
- />
14
- );
15
- }
16
-
17
- function EmptyHeader({ className, ...props }: React.ComponentProps<"div">) {
18
- return (
19
- <div
20
- data-slot="empty-header"
21
- className={cn("flex max-w-sm flex-col items-center gap-2", className)}
22
- {...props}
23
- />
24
- );
25
- }
26
-
27
- const emptyMediaVariants = cva(
28
- "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
29
- {
30
- variants: {
31
- variant: {
32
- default: "bg-transparent",
33
- icon: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6",
34
- },
35
- },
36
- defaultVariants: {
37
- variant: "default",
38
- },
39
- },
40
- );
41
-
42
- function EmptyMedia({
43
- className,
44
- variant = "default",
45
- ...props
46
- }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>) {
47
- return (
48
- <div
49
- data-slot="empty-icon"
50
- data-variant={variant}
51
- className={cn(emptyMediaVariants({ variant, className }))}
52
- {...props}
53
- />
54
- );
55
- }
56
-
57
- function EmptyTitle({ className, ...props }: React.ComponentProps<"div">) {
58
- return (
59
- <div
60
- data-slot="empty-title"
61
- className={cn(
62
- "font-heading text-lg font-medium tracking-tight",
63
- className,
64
- )}
65
- {...props}
66
- />
67
- );
68
- }
69
-
70
- function EmptyDescription({ className, ...props }: React.ComponentProps<"p">) {
71
- return (
72
- <div
73
- data-slot="empty-description"
74
- className={cn(
75
- "text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
76
- className,
77
- )}
78
- {...props}
79
- />
80
- );
81
- }
82
-
83
- function EmptyContent({ className, ...props }: React.ComponentProps<"div">) {
84
- return (
85
- <div
86
- data-slot="empty-content"
87
- className={cn(
88
- "flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",
89
- className,
90
- )}
91
- {...props}
92
- />
93
- );
94
- }
95
-
96
- export {
97
- Empty,
98
- EmptyHeader,
99
- EmptyTitle,
100
- EmptyDescription,
101
- EmptyContent,
102
- EmptyMedia,
103
- };
@@ -1,50 +0,0 @@
1
- "use client";
2
-
3
- import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card";
4
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
5
-
6
- function HoverCard({ ...props }: PreviewCardPrimitive.Root.Props) {
7
- return <PreviewCardPrimitive.Root data-slot="hover-card" {...props} />;
8
- }
9
-
10
- function HoverCardTrigger({ ...props }: PreviewCardPrimitive.Trigger.Props) {
11
- return (
12
- <PreviewCardPrimitive.Trigger data-slot="hover-card-trigger" {...props} />
13
- );
14
- }
15
-
16
- function HoverCardContent({
17
- className,
18
- side = "bottom",
19
- sideOffset = 4,
20
- align = "center",
21
- alignOffset = 4,
22
- ...props
23
- }: PreviewCardPrimitive.Popup.Props &
24
- Pick<
25
- PreviewCardPrimitive.Positioner.Props,
26
- "align" | "alignOffset" | "side" | "sideOffset"
27
- >) {
28
- return (
29
- <PreviewCardPrimitive.Portal data-slot="hover-card-portal">
30
- <PreviewCardPrimitive.Positioner
31
- align={align}
32
- alignOffset={alignOffset}
33
- side={side}
34
- sideOffset={sideOffset}
35
- className="isolate z-50"
36
- >
37
- <PreviewCardPrimitive.Popup
38
- data-slot="hover-card-content"
39
- className={cn(
40
- "z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 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",
41
- className,
42
- )}
43
- {...props}
44
- />
45
- </PreviewCardPrimitive.Positioner>
46
- </PreviewCardPrimitive.Portal>
47
- );
48
- }
49
-
50
- export { HoverCard, HoverCardTrigger, HoverCardContent };