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,330 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import { Questionnaire as QuestionnairePrimitive } from "@shadcn/react/questionnaire";
5
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
6
-
7
- import {
8
- buttonVariants,
9
- type Button,
10
- } from "@disposabl/disposabl-kit/client/components/ui/button";
11
- import { CheckIcon } from "lucide-react";
12
-
13
- function Questionnaire({
14
- className,
15
- ...props
16
- }: React.ComponentProps<typeof QuestionnairePrimitive.Root>) {
17
- return (
18
- <QuestionnairePrimitive.Root
19
- data-slot="questionnaire"
20
- className={cn("flex w-full min-w-0 flex-col gap-6", className)}
21
- {...props}
22
- />
23
- );
24
- }
25
-
26
- function QuestionnaireProgress({
27
- className,
28
- ...props
29
- }: React.ComponentProps<typeof QuestionnairePrimitive.Progress>) {
30
- return (
31
- <QuestionnairePrimitive.Progress
32
- data-slot="questionnaire-progress"
33
- className={cn(
34
- "min-h-[1lh] w-fit min-w-[14ch] text-xs font-medium text-muted-foreground tabular-nums",
35
- className,
36
- )}
37
- {...props}
38
- />
39
- );
40
- }
41
-
42
- function QuestionnaireItem({
43
- className,
44
- ...props
45
- }: React.ComponentProps<typeof QuestionnairePrimitive.Item>) {
46
- return (
47
- <QuestionnairePrimitive.Item
48
- data-slot="questionnaire-item"
49
- className={cn(
50
- "flex min-w-0 flex-col gap-5 border-0 p-0 outline-none",
51
- className,
52
- )}
53
- {...props}
54
- />
55
- );
56
- }
57
-
58
- function QuestionnaireTitle({
59
- className,
60
- ...props
61
- }: React.ComponentProps<typeof QuestionnairePrimitive.Title>) {
62
- return (
63
- <QuestionnairePrimitive.Title
64
- data-slot="questionnaire-title"
65
- className={cn(
66
- "font-heading text-base font-semibold text-pretty [&:not(:has(~[data-slot=questionnaire-description]))]:mb-5",
67
- className,
68
- )}
69
- {...props}
70
- />
71
- );
72
- }
73
-
74
- function QuestionnaireDescription({
75
- className,
76
- ...props
77
- }: React.ComponentProps<typeof QuestionnairePrimitive.Description>) {
78
- return (
79
- <QuestionnairePrimitive.Description
80
- data-slot="questionnaire-description"
81
- className={cn("text-sm text-pretty text-muted-foreground", className)}
82
- {...props}
83
- />
84
- );
85
- }
86
-
87
- function QuestionnaireChoices({
88
- className,
89
- ...props
90
- }: React.ComponentProps<typeof QuestionnairePrimitive.Choices>) {
91
- return (
92
- <QuestionnairePrimitive.Choices
93
- data-slot="questionnaire-choices"
94
- className={cn(
95
- "group/questionnaire-choices grid min-w-0 gap-3",
96
- className,
97
- )}
98
- {...props}
99
- />
100
- );
101
- }
102
-
103
- function QuestionnaireChoice({
104
- children,
105
- className,
106
- ...props
107
- }: React.ComponentProps<typeof QuestionnairePrimitive.Choice>) {
108
- return (
109
- <QuestionnairePrimitive.Choice
110
- data-slot="questionnaire-choice"
111
- className={cn(
112
- "group/questionnaire-choice relative flex min-h-11 cursor-pointer items-start gap-3 rounded-md border border-input bg-transparent px-4 py-3.5 text-start text-sm shadow-xs transition-colors outline-none select-none hover:bg-muted/50 has-[>input:focus-visible]:border-ring has-[>input:focus-visible]:ring-3 has-[>input:focus-visible]:ring-ring/50 data-invalid:border-destructive dark:bg-input/20 data-checked:border-primary/40 data-checked:bg-muted dark:data-checked:bg-muted",
113
- "data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50",
114
- className,
115
- )}
116
- {...props}
117
- >
118
- <QuestionnairePrimitive.ChoiceInput
119
- data-slot="questionnaire-choice-input"
120
- className="absolute inset-0 z-10 size-full cursor-pointer opacity-0"
121
- />
122
- <span
123
- aria-hidden="true"
124
- data-slot="questionnaire-choice-indicator"
125
- className="pointer-events-none relative flex size-4 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-[4px] border border-input group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[type=radio]/questionnaire-choice:rounded-full group-data-checked/questionnaire-choice:border-primary group-data-checked/questionnaire-choice:bg-primary group-data-checked/questionnaire-choice:text-primary-foreground dark:bg-input/30 dark:group-data-checked/questionnaire-choice:bg-primary"
126
- >
127
- <span
128
- data-slot="questionnaire-choice-indicator-dot"
129
- className="hidden size-2 rounded-full bg-primary-foreground group-data-[type=checkbox]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block"
130
- />
131
- <CheckIcon
132
- data-slot="questionnaire-choice-indicator-check"
133
- className="hidden size-3.5 group-data-[type=radio]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block"
134
- />
135
- </span>
136
- <QuestionnairePrimitive.ChoiceLabel
137
- data-slot="questionnaire-choice-label"
138
- className="flex min-w-0 flex-1 flex-col gap-1 leading-snug"
139
- >
140
- {children}
141
- </QuestionnairePrimitive.ChoiceLabel>
142
- <QuestionnairePrimitive.ChoiceShortcut
143
- data-slot="questionnaire-choice-shortcut"
144
- className="pointer-events-none ms-auto hidden size-5 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-md border border-input bg-background font-mono text-[0.625rem] leading-none font-medium text-muted-foreground shadow-xs group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[shortcut]/questionnaire-choice:inline-flex"
145
- />
146
- </QuestionnairePrimitive.Choice>
147
- );
148
- }
149
-
150
- function QuestionnaireChoiceDescription({
151
- className,
152
- ...props
153
- }: React.ComponentProps<"span">) {
154
- return (
155
- <span
156
- data-slot="questionnaire-choice-description"
157
- className={cn("text-muted-foreground", className)}
158
- {...props}
159
- />
160
- );
161
- }
162
-
163
- function QuestionnaireInput({
164
- className,
165
- ...props
166
- }: React.ComponentProps<typeof QuestionnairePrimitive.Input>) {
167
- return (
168
- <div
169
- data-slot="questionnaire-input-wrapper"
170
- className="group/questionnaire-input relative w-full min-w-0"
171
- >
172
- <QuestionnairePrimitive.Input
173
- data-slot="questionnaire-input"
174
- className={cn(
175
- "h-9 min-h-11 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow,background-color] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 sm:min-h-0 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
176
- "selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground",
177
- className,
178
- )}
179
- {...props}
180
- />
181
- </div>
182
- );
183
- }
184
-
185
- function QuestionnaireError({
186
- className,
187
- ...props
188
- }: React.ComponentProps<typeof QuestionnairePrimitive.Error>) {
189
- return (
190
- <QuestionnairePrimitive.Error
191
- data-slot="questionnaire-error"
192
- className={cn("text-sm text-destructive", className)}
193
- {...props}
194
- />
195
- );
196
- }
197
-
198
- function QuestionnaireActions({
199
- className,
200
- ...props
201
- }: React.ComponentProps<"div">) {
202
- return (
203
- <div
204
- data-slot="questionnaire-actions"
205
- className={cn(
206
- "grid min-h-11 w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 sm:min-h-9",
207
- className,
208
- )}
209
- {...props}
210
- />
211
- );
212
- }
213
-
214
- function QuestionnairePrevious({
215
- children,
216
- className,
217
- size = "default",
218
- variant = "outline",
219
- ...props
220
- }: React.ComponentProps<typeof QuestionnairePrimitive.Previous> &
221
- Pick<React.ComponentProps<typeof Button>, "size" | "variant">) {
222
- return (
223
- <QuestionnairePrimitive.Previous
224
- data-slot="questionnaire-previous"
225
- data-size={size}
226
- data-variant={variant}
227
- className={cn(
228
- buttonVariants({ size, variant }),
229
- "col-start-1 row-start-1 min-h-11 justify-self-start sm:min-h-0",
230
- className,
231
- )}
232
- {...props}
233
- >
234
- {children ?? "Previous"}
235
- </QuestionnairePrimitive.Previous>
236
- );
237
- }
238
-
239
- function QuestionnaireSkip({
240
- children,
241
- className,
242
- size = "default",
243
- variant = "outline",
244
- ...props
245
- }: React.ComponentProps<typeof QuestionnairePrimitive.Skip> &
246
- Pick<React.ComponentProps<typeof Button>, "size" | "variant">) {
247
- return (
248
- <QuestionnairePrimitive.Skip
249
- data-slot="questionnaire-skip"
250
- data-size={size}
251
- data-variant={variant}
252
- className={cn(
253
- buttonVariants({ size, variant }),
254
- "col-start-2 row-start-1 min-h-11 justify-self-end sm:min-h-0",
255
- className,
256
- )}
257
- {...props}
258
- >
259
- {children ?? "Skip"}
260
- </QuestionnairePrimitive.Skip>
261
- );
262
- }
263
-
264
- function QuestionnaireNext({
265
- children,
266
- className,
267
- size = "default",
268
- variant = "default",
269
- ...props
270
- }: React.ComponentProps<typeof QuestionnairePrimitive.Next> &
271
- Pick<React.ComponentProps<typeof Button>, "size" | "variant">) {
272
- return (
273
- <QuestionnairePrimitive.Next
274
- data-slot="questionnaire-next"
275
- data-size={size}
276
- data-variant={variant}
277
- className={cn(
278
- buttonVariants({ size, variant }),
279
- "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0",
280
- className,
281
- )}
282
- {...props}
283
- >
284
- {children ?? "Next"}
285
- </QuestionnairePrimitive.Next>
286
- );
287
- }
288
-
289
- function QuestionnaireSubmit({
290
- children,
291
- className,
292
- size = "default",
293
- variant = "default",
294
- ...props
295
- }: React.ComponentProps<typeof QuestionnairePrimitive.Submit> &
296
- Pick<React.ComponentProps<typeof Button>, "size" | "variant">) {
297
- return (
298
- <QuestionnairePrimitive.Submit
299
- data-slot="questionnaire-submit"
300
- data-size={size}
301
- data-variant={variant}
302
- className={cn(
303
- buttonVariants({ size, variant }),
304
- "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0",
305
- className,
306
- )}
307
- {...props}
308
- >
309
- {children ?? "Submit"}
310
- </QuestionnairePrimitive.Submit>
311
- );
312
- }
313
-
314
- export {
315
- Questionnaire,
316
- QuestionnaireActions,
317
- QuestionnaireChoice,
318
- QuestionnaireChoiceDescription,
319
- QuestionnaireChoices,
320
- QuestionnaireDescription,
321
- QuestionnaireError,
322
- QuestionnaireInput,
323
- QuestionnaireItem,
324
- QuestionnaireNext,
325
- QuestionnairePrevious,
326
- QuestionnaireProgress,
327
- QuestionnaireSkip,
328
- QuestionnaireSubmit,
329
- QuestionnaireTitle,
330
- };
@@ -1,35 +0,0 @@
1
- import { Radio as RadioPrimitive } from "@base-ui/react/radio";
2
- import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
3
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
4
-
5
- function RadioGroup({ className, ...props }: RadioGroupPrimitive.Props) {
6
- return (
7
- <RadioGroupPrimitive
8
- data-slot="radio-group"
9
- className={cn("grid w-full gap-3", className)}
10
- {...props}
11
- />
12
- );
13
- }
14
-
15
- function RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {
16
- return (
17
- <RadioPrimitive.Root
18
- data-slot="radio-group-item"
19
- className={cn(
20
- "group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",
21
- className,
22
- )}
23
- {...props}
24
- >
25
- <RadioPrimitive.Indicator
26
- data-slot="radio-group-indicator"
27
- className="flex size-4 items-center justify-center"
28
- >
29
- <span className="absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" />
30
- </RadioPrimitive.Indicator>
31
- </RadioPrimitive.Root>
32
- );
33
- }
34
-
35
- export { RadioGroup, RadioGroupItem };
@@ -1,49 +0,0 @@
1
- "use client";
2
-
3
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
4
- import * as ResizablePrimitive from "react-resizable-panels";
5
-
6
- function ResizablePanelGroup({
7
- className,
8
- ...props
9
- }: ResizablePrimitive.GroupProps) {
10
- return (
11
- <ResizablePrimitive.Group
12
- data-slot="resizable-panel-group"
13
- className={cn(
14
- "flex h-full w-full aria-[orientation=vertical]:flex-col",
15
- className,
16
- )}
17
- {...props}
18
- />
19
- );
20
- }
21
-
22
- function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {
23
- return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />;
24
- }
25
-
26
- function ResizableHandle({
27
- withHandle,
28
- className,
29
- ...props
30
- }: ResizablePrimitive.SeparatorProps & {
31
- withHandle?: boolean;
32
- }) {
33
- return (
34
- <ResizablePrimitive.Separator
35
- data-slot="resizable-handle"
36
- className={cn(
37
- "relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90",
38
- className,
39
- )}
40
- {...props}
41
- >
42
- {withHandle && (
43
- <div className="z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border" />
44
- )}
45
- </ResizablePrimitive.Separator>
46
- );
47
- }
48
-
49
- export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
@@ -1,51 +0,0 @@
1
- import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
2
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
3
-
4
- function ScrollArea({
5
- className,
6
- children,
7
- ...props
8
- }: ScrollAreaPrimitive.Root.Props) {
9
- return (
10
- <ScrollAreaPrimitive.Root
11
- data-slot="scroll-area"
12
- className={cn("relative", className)}
13
- {...props}
14
- >
15
- <ScrollAreaPrimitive.Viewport
16
- data-slot="scroll-area-viewport"
17
- className="size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1"
18
- >
19
- {children}
20
- </ScrollAreaPrimitive.Viewport>
21
- <ScrollBar />
22
- <ScrollAreaPrimitive.Corner />
23
- </ScrollAreaPrimitive.Root>
24
- );
25
- }
26
-
27
- function ScrollBar({
28
- className,
29
- orientation = "vertical",
30
- ...props
31
- }: ScrollAreaPrimitive.Scrollbar.Props) {
32
- return (
33
- <ScrollAreaPrimitive.Scrollbar
34
- data-slot="scroll-area-scrollbar"
35
- data-orientation={orientation}
36
- orientation={orientation}
37
- className={cn(
38
- "flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",
39
- className,
40
- )}
41
- {...props}
42
- >
43
- <ScrollAreaPrimitive.Thumb
44
- data-slot="scroll-area-thumb"
45
- className="relative flex-1 rounded-full bg-border"
46
- />
47
- </ScrollAreaPrimitive.Scrollbar>
48
- );
49
- }
50
-
51
- export { ScrollArea, ScrollBar };
@@ -1,201 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import { Select as SelectPrimitive } from "@base-ui/react/select";
5
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
6
- import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
7
-
8
- const Select = SelectPrimitive.Root;
9
-
10
- function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {
11
- return (
12
- <SelectPrimitive.Group
13
- data-slot="select-group"
14
- className={cn("scroll-my-1 p-1", className)}
15
- {...props}
16
- />
17
- );
18
- }
19
-
20
- function SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {
21
- return (
22
- <SelectPrimitive.Value
23
- data-slot="select-value"
24
- className={cn("flex flex-1 text-left", className)}
25
- {...props}
26
- />
27
- );
28
- }
29
-
30
- function SelectTrigger({
31
- className,
32
- size = "default",
33
- children,
34
- ...props
35
- }: SelectPrimitive.Trigger.Props & {
36
- size?: "sm" | "default";
37
- }) {
38
- return (
39
- <SelectPrimitive.Trigger
40
- data-slot="select-trigger"
41
- data-size={size}
42
- className={cn(
43
- "flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
44
- className,
45
- )}
46
- {...props}
47
- >
48
- {children}
49
- <SelectPrimitive.Icon
50
- render={
51
- <ChevronDownIcon className="pointer-events-none size-4 text-muted-foreground" />
52
- }
53
- />
54
- </SelectPrimitive.Trigger>
55
- );
56
- }
57
-
58
- function SelectContent({
59
- className,
60
- children,
61
- side = "bottom",
62
- sideOffset = 4,
63
- align = "center",
64
- alignOffset = 0,
65
- alignItemWithTrigger = true,
66
- ...props
67
- }: SelectPrimitive.Popup.Props &
68
- Pick<
69
- SelectPrimitive.Positioner.Props,
70
- "align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger"
71
- >) {
72
- return (
73
- <SelectPrimitive.Portal>
74
- <SelectPrimitive.Positioner
75
- side={side}
76
- sideOffset={sideOffset}
77
- align={align}
78
- alignOffset={alignOffset}
79
- alignItemWithTrigger={alignItemWithTrigger}
80
- className="isolate z-50"
81
- >
82
- <SelectPrimitive.Popup
83
- data-slot="select-content"
84
- data-align-trigger={alignItemWithTrigger}
85
- className={cn(
86
- "relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-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",
87
- className,
88
- )}
89
- {...props}
90
- >
91
- <SelectScrollUpButton />
92
- <SelectPrimitive.List>{children}</SelectPrimitive.List>
93
- <SelectScrollDownButton />
94
- </SelectPrimitive.Popup>
95
- </SelectPrimitive.Positioner>
96
- </SelectPrimitive.Portal>
97
- );
98
- }
99
-
100
- function SelectLabel({
101
- className,
102
- ...props
103
- }: SelectPrimitive.GroupLabel.Props) {
104
- return (
105
- <SelectPrimitive.GroupLabel
106
- data-slot="select-label"
107
- className={cn("px-2 py-1.5 text-xs text-muted-foreground", className)}
108
- {...props}
109
- />
110
- );
111
- }
112
-
113
- function SelectItem({
114
- className,
115
- children,
116
- ...props
117
- }: SelectPrimitive.Item.Props) {
118
- return (
119
- <SelectPrimitive.Item
120
- data-slot="select-item"
121
- className={cn(
122
- "relative flex w-full 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 not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
123
- className,
124
- )}
125
- {...props}
126
- >
127
- <SelectPrimitive.ItemText className="flex flex-1 shrink-0 gap-2 whitespace-nowrap">
128
- {children}
129
- </SelectPrimitive.ItemText>
130
- <SelectPrimitive.ItemIndicator
131
- render={
132
- <span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center" />
133
- }
134
- >
135
- <CheckIcon className="pointer-events-none" />
136
- </SelectPrimitive.ItemIndicator>
137
- </SelectPrimitive.Item>
138
- );
139
- }
140
-
141
- function SelectSeparator({
142
- className,
143
- ...props
144
- }: SelectPrimitive.Separator.Props) {
145
- return (
146
- <SelectPrimitive.Separator
147
- data-slot="select-separator"
148
- className={cn("pointer-events-none -mx-1 my-1 h-px bg-border", className)}
149
- {...props}
150
- />
151
- );
152
- }
153
-
154
- function SelectScrollUpButton({
155
- className,
156
- ...props
157
- }: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {
158
- return (
159
- <SelectPrimitive.ScrollUpArrow
160
- data-slot="select-scroll-up-button"
161
- className={cn(
162
- "top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
163
- className,
164
- )}
165
- {...props}
166
- >
167
- <ChevronUpIcon />
168
- </SelectPrimitive.ScrollUpArrow>
169
- );
170
- }
171
-
172
- function SelectScrollDownButton({
173
- className,
174
- ...props
175
- }: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {
176
- return (
177
- <SelectPrimitive.ScrollDownArrow
178
- data-slot="select-scroll-down-button"
179
- className={cn(
180
- "bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
181
- className,
182
- )}
183
- {...props}
184
- >
185
- <ChevronDownIcon />
186
- </SelectPrimitive.ScrollDownArrow>
187
- );
188
- }
189
-
190
- export {
191
- Select,
192
- SelectContent,
193
- SelectGroup,
194
- SelectItem,
195
- SelectLabel,
196
- SelectScrollDownButton,
197
- SelectScrollUpButton,
198
- SelectSeparator,
199
- SelectTrigger,
200
- SelectValue,
201
- };