create-disposabl-app 0.9.1 → 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 (90) hide show
  1. package/dist/disposabl.js +1 -1
  2. package/dist/index.js +2 -2
  3. package/dist/templates/default/.github/workflows/pipeline.yml +1 -1
  4. package/dist/templates/default/apps/web/src/router/_authenticated/dashboard.api-keys.tsx +1 -1
  5. package/dist/templates/default/bun.lock +77 -1397
  6. package/dist/templates/default/package.json +1 -2
  7. package/dist/templates/default/packages/backend/README.md +3 -1
  8. package/dist/templates/default/packages/backend/convex/_generated/api.d.ts +6 -0
  9. package/dist/templates/default/packages/backend/convex/_generated/server.d.ts +0 -2
  10. package/dist/templates/default/packages/backend/convex/auth.config.ts +2 -10
  11. package/dist/templates/default/packages/backend/convex/convex.config.ts +3 -14
  12. package/dist/templates/default/packages/backend/convex/mcpEnterprise/README.md +42 -0
  13. package/dist/templates/default/packages/backend/convex/mcpEnterprise/internal.ts +153 -0
  14. package/dist/templates/default/packages/backend/convex/mcpEnterprise/provision.ts +102 -0
  15. package/dist/templates/default/packages/backend/convex/mcpEnterprise/validator.ts +35 -0
  16. package/dist/templates/default/packages/backend/convex/schema.ts +18 -0
  17. package/dist/templates/default/packages/backend/package.json +0 -1
  18. package/dist/templates/default/packages/cli/README.md +9 -24
  19. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/login.tsx +1 -1
  20. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/signUp.tsx +1 -1
  21. package/dist/templates/default/packages/disposabl-kit/client/routes/consent.tsx +71 -13
  22. package/dist/templates/default/packages/disposabl-kit/package.json +4 -14
  23. package/dist/templates/default/packages/disposabl-kit/server/http.ts +19 -12
  24. package/dist/templates/default/packages/disposabl-kit/server/lib/functions.ts +12 -0
  25. package/dist/templates/default/packages/disposabl-kit/server/mcp/enterprise.ts +267 -0
  26. package/dist/templates/default/packages/disposabl-kit/server/mcp/identity.ts +33 -0
  27. package/dist/templates/default/vendor/README.md +30 -0
  28. package/dist/templates/default/vendor/convex-auth-6c0ebf3f.tgz +0 -0
  29. package/package.json +1 -1
  30. package/dist/templates/default/apps/web/src/components/connections/expo-connection.tsx +0 -97
  31. package/dist/templates/default/apps/web/src/components/connections/provider-logo.tsx +0 -44
  32. package/dist/templates/default/apps/web/src/components/connections/use-connection-setup.ts +0 -169
  33. package/dist/templates/default/packages/disposabl-kit/client/components/ui/accordion.tsx +0 -77
  34. package/dist/templates/default/packages/disposabl-kit/client/components/ui/alert-dialog.tsx +0 -185
  35. package/dist/templates/default/packages/disposabl-kit/client/components/ui/alert.tsx +0 -75
  36. package/dist/templates/default/packages/disposabl-kit/client/components/ui/aspect-ratio.tsx +0 -22
  37. package/dist/templates/default/packages/disposabl-kit/client/components/ui/attachment.tsx +0 -207
  38. package/dist/templates/default/packages/disposabl-kit/client/components/ui/avatar.tsx +0 -106
  39. package/dist/templates/default/packages/disposabl-kit/client/components/ui/badge.tsx +0 -51
  40. package/dist/templates/default/packages/disposabl-kit/client/components/ui/breadcrumb.tsx +0 -121
  41. package/dist/templates/default/packages/disposabl-kit/client/components/ui/bubble.tsx +0 -127
  42. package/dist/templates/default/packages/disposabl-kit/client/components/ui/button-group.tsx +0 -87
  43. package/dist/templates/default/packages/disposabl-kit/client/components/ui/calendar.tsx +0 -241
  44. package/dist/templates/default/packages/disposabl-kit/client/components/ui/carousel.tsx +0 -239
  45. package/dist/templates/default/packages/disposabl-kit/client/components/ui/chart.tsx +0 -368
  46. package/dist/templates/default/packages/disposabl-kit/client/components/ui/checkbox.tsx +0 -27
  47. package/dist/templates/default/packages/disposabl-kit/client/components/ui/code-block.tsx +0 -243
  48. package/dist/templates/default/packages/disposabl-kit/client/components/ui/collapsible.tsx +0 -19
  49. package/dist/templates/default/packages/disposabl-kit/client/components/ui/combobox.tsx +0 -300
  50. package/dist/templates/default/packages/disposabl-kit/client/components/ui/command.tsx +0 -194
  51. package/dist/templates/default/packages/disposabl-kit/client/components/ui/context-menu.tsx +0 -271
  52. package/dist/templates/default/packages/disposabl-kit/client/components/ui/dialog.tsx +0 -156
  53. package/dist/templates/default/packages/disposabl-kit/client/components/ui/direction.tsx +0 -4
  54. package/dist/templates/default/packages/disposabl-kit/client/components/ui/drawer.tsx +0 -224
  55. package/dist/templates/default/packages/disposabl-kit/client/components/ui/dropdown-menu.tsx +0 -269
  56. package/dist/templates/default/packages/disposabl-kit/client/components/ui/empty.tsx +0 -103
  57. package/dist/templates/default/packages/disposabl-kit/client/components/ui/hover-card.tsx +0 -50
  58. package/dist/templates/default/packages/disposabl-kit/client/components/ui/input-group.tsx +0 -158
  59. package/dist/templates/default/packages/disposabl-kit/client/components/ui/input-otp.tsx +0 -83
  60. package/dist/templates/default/packages/disposabl-kit/client/components/ui/item.tsx +0 -201
  61. package/dist/templates/default/packages/disposabl-kit/client/components/ui/kbd.tsx +0 -26
  62. package/dist/templates/default/packages/disposabl-kit/client/components/ui/marker.tsx +0 -70
  63. package/dist/templates/default/packages/disposabl-kit/client/components/ui/menubar.tsx +0 -284
  64. package/dist/templates/default/packages/disposabl-kit/client/components/ui/message-scroller.tsx +0 -128
  65. package/dist/templates/default/packages/disposabl-kit/client/components/ui/message.tsx +0 -91
  66. package/dist/templates/default/packages/disposabl-kit/client/components/ui/native-select.tsx +0 -64
  67. package/dist/templates/default/packages/disposabl-kit/client/components/ui/navigation-menu.tsx +0 -170
  68. package/dist/templates/default/packages/disposabl-kit/client/components/ui/pagination.tsx +0 -133
  69. package/dist/templates/default/packages/disposabl-kit/client/components/ui/popover.tsx +0 -87
  70. package/dist/templates/default/packages/disposabl-kit/client/components/ui/progress.tsx +0 -82
  71. package/dist/templates/default/packages/disposabl-kit/client/components/ui/questionnaire.tsx +0 -330
  72. package/dist/templates/default/packages/disposabl-kit/client/components/ui/radio-group.tsx +0 -35
  73. package/dist/templates/default/packages/disposabl-kit/client/components/ui/resizable.tsx +0 -49
  74. package/dist/templates/default/packages/disposabl-kit/client/components/ui/scroll-area.tsx +0 -51
  75. package/dist/templates/default/packages/disposabl-kit/client/components/ui/select.tsx +0 -201
  76. package/dist/templates/default/packages/disposabl-kit/client/components/ui/sheet.tsx +0 -132
  77. package/dist/templates/default/packages/disposabl-kit/client/components/ui/sidebar.tsx +0 -723
  78. package/dist/templates/default/packages/disposabl-kit/client/components/ui/skeleton.tsx +0 -13
  79. package/dist/templates/default/packages/disposabl-kit/client/components/ui/slider.tsx +0 -51
  80. package/dist/templates/default/packages/disposabl-kit/client/components/ui/switch.tsx +0 -31
  81. package/dist/templates/default/packages/disposabl-kit/client/components/ui/table.tsx +0 -113
  82. package/dist/templates/default/packages/disposabl-kit/client/components/ui/tabs.tsx +0 -81
  83. package/dist/templates/default/packages/disposabl-kit/client/components/ui/textarea.tsx +0 -17
  84. package/dist/templates/default/packages/disposabl-kit/client/components/ui/toast.tsx +0 -229
  85. package/dist/templates/default/packages/disposabl-kit/client/components/ui/toggle-group.tsx +0 -87
  86. package/dist/templates/default/packages/disposabl-kit/client/components/ui/toggle.tsx +0 -42
  87. package/dist/templates/default/packages/disposabl-kit/client/components/ui/tooltip.tsx +0 -65
  88. package/dist/templates/default/packages/disposabl-kit/client/components/ui/trace.tsx +0 -161
  89. package/dist/templates/default/packages/disposabl-kit/client/hooks/use-mobile.ts +0 -21
  90. package/dist/templates/default/patches/@convex-dev%2Fauth@2.0.0-beta.0.patch +0 -310
@@ -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 };
@@ -1,158 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import { cva, type VariantProps } from "class-variance-authority";
5
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
6
-
7
- import { Button } from "@disposabl/disposabl-kit/client/components/ui/button";
8
- import { Input } from "@disposabl/disposabl-kit/client/components/ui/input";
9
- import { Textarea } from "@disposabl/disposabl-kit/client/components/ui/textarea";
10
-
11
- function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
12
- return (
13
- <div
14
- data-slot="input-group"
15
- role="group"
16
- className={cn(
17
- "group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
18
- className,
19
- )}
20
- {...props}
21
- />
22
- );
23
- }
24
-
25
- const inputGroupAddonVariants = cva(
26
- "flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
27
- {
28
- variants: {
29
- align: {
30
- "inline-start":
31
- "order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]",
32
- "inline-end":
33
- "order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]",
34
- "block-start":
35
- "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
36
- "block-end":
37
- "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2",
38
- },
39
- },
40
- defaultVariants: {
41
- align: "inline-start",
42
- },
43
- },
44
- );
45
-
46
- function InputGroupAddon({
47
- className,
48
- align = "inline-start",
49
- ...props
50
- }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>) {
51
- return (
52
- <div
53
- role="group"
54
- data-slot="input-group-addon"
55
- data-align={align}
56
- className={cn(inputGroupAddonVariants({ align }), className)}
57
- onClick={(e) => {
58
- if ((e.target as HTMLElement).closest("button")) {
59
- return;
60
- }
61
- e.currentTarget.parentElement?.querySelector("input")?.focus();
62
- }}
63
- {...props}
64
- />
65
- );
66
- }
67
-
68
- const inputGroupButtonVariants = cva(
69
- "flex items-center gap-2 text-sm shadow-none",
70
- {
71
- variants: {
72
- size: {
73
- xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
74
- sm: "",
75
- "icon-xs":
76
- "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
77
- "icon-sm": "size-8 p-0 has-[>svg]:p-0",
78
- },
79
- },
80
- defaultVariants: {
81
- size: "xs",
82
- },
83
- },
84
- );
85
-
86
- function InputGroupButton({
87
- className,
88
- type = "button",
89
- variant = "ghost",
90
- size = "xs",
91
- ...props
92
- }: Omit<React.ComponentProps<typeof Button>, "size" | "type"> &
93
- VariantProps<typeof inputGroupButtonVariants> & {
94
- type?: "button" | "submit" | "reset";
95
- }) {
96
- return (
97
- <Button
98
- type={type}
99
- data-size={size}
100
- variant={variant}
101
- className={cn(inputGroupButtonVariants({ size }), className)}
102
- {...props}
103
- />
104
- );
105
- }
106
-
107
- function InputGroupText({ className, ...props }: React.ComponentProps<"span">) {
108
- return (
109
- <span
110
- className={cn(
111
- "flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
112
- className,
113
- )}
114
- {...props}
115
- />
116
- );
117
- }
118
-
119
- function InputGroupInput({
120
- className,
121
- ...props
122
- }: React.ComponentProps<"input">) {
123
- return (
124
- <Input
125
- data-slot="input-group-control"
126
- className={cn(
127
- "flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
128
- className,
129
- )}
130
- {...props}
131
- />
132
- );
133
- }
134
-
135
- function InputGroupTextarea({
136
- className,
137
- ...props
138
- }: React.ComponentProps<"textarea">) {
139
- return (
140
- <Textarea
141
- data-slot="input-group-control"
142
- className={cn(
143
- "flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
144
- className,
145
- )}
146
- {...props}
147
- />
148
- );
149
- }
150
-
151
- export {
152
- InputGroup,
153
- InputGroupAddon,
154
- InputGroupButton,
155
- InputGroupText,
156
- InputGroupInput,
157
- InputGroupTextarea,
158
- };
@@ -1,83 +0,0 @@
1
- import * as React from "react";
2
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
3
- import { OTPInput, OTPInputContext } from "input-otp";
4
- import { MinusIcon } from "lucide-react";
5
-
6
- function InputOTP({
7
- className,
8
- containerClassName,
9
- ...props
10
- }: React.ComponentProps<typeof OTPInput> & {
11
- containerClassName?: string;
12
- }) {
13
- return (
14
- <OTPInput
15
- data-slot="input-otp"
16
- containerClassName={cn(
17
- "cn-input-otp flex items-center has-disabled:opacity-50",
18
- containerClassName,
19
- )}
20
- spellCheck={false}
21
- className={cn("disabled:cursor-not-allowed", className)}
22
- {...props}
23
- />
24
- );
25
- }
26
-
27
- function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">) {
28
- return (
29
- <div
30
- data-slot="input-otp-group"
31
- className={cn(
32
- "flex items-center rounded-md has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40",
33
- className,
34
- )}
35
- {...props}
36
- />
37
- );
38
- }
39
-
40
- function InputOTPSlot({
41
- index,
42
- className,
43
- ...props
44
- }: React.ComponentProps<"div"> & {
45
- index: number;
46
- }) {
47
- const inputOTPContext = React.useContext(OTPInputContext);
48
- const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index] ?? {};
49
-
50
- return (
51
- <div
52
- data-slot="input-otp-slot"
53
- data-active={isActive}
54
- className={cn(
55
- "relative flex size-9 items-center justify-center border-y border-r border-input text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40",
56
- className,
57
- )}
58
- {...props}
59
- >
60
- {char}
61
- {hasFakeCaret && (
62
- <div className="pointer-events-none absolute inset-0 flex items-center justify-center">
63
- <div className="h-4 w-px animate-caret-blink bg-foreground duration-1000" />
64
- </div>
65
- )}
66
- </div>
67
- );
68
- }
69
-
70
- function InputOTPSeparator({ ...props }: React.ComponentProps<"div">) {
71
- return (
72
- <div
73
- data-slot="input-otp-separator"
74
- className="flex items-center [&_svg:not([class*='size-'])]:size-4"
75
- role="separator"
76
- {...props}
77
- >
78
- <MinusIcon />
79
- </div>
80
- );
81
- }
82
-
83
- export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };