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,185 +0,0 @@
1
- import * as React from "react";
2
- import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
3
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
4
-
5
- import { Button } from "@disposabl/disposabl-kit/client/components/ui/button";
6
-
7
- function AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {
8
- return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />;
9
- }
10
-
11
- function AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {
12
- return (
13
- <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />
14
- );
15
- }
16
-
17
- function AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {
18
- return (
19
- <AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />
20
- );
21
- }
22
-
23
- function AlertDialogOverlay({
24
- className,
25
- ...props
26
- }: AlertDialogPrimitive.Backdrop.Props) {
27
- return (
28
- <AlertDialogPrimitive.Backdrop
29
- data-slot="alert-dialog-overlay"
30
- className={cn(
31
- "fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
32
- className,
33
- )}
34
- {...props}
35
- />
36
- );
37
- }
38
-
39
- function AlertDialogContent({
40
- className,
41
- size = "default",
42
- ...props
43
- }: AlertDialogPrimitive.Popup.Props & {
44
- size?: "default" | "sm";
45
- }) {
46
- return (
47
- <AlertDialogPortal>
48
- <AlertDialogOverlay />
49
- <AlertDialogPrimitive.Popup
50
- data-slot="alert-dialog-content"
51
- data-size={size}
52
- className={cn(
53
- "group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg 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",
54
- className,
55
- )}
56
- {...props}
57
- />
58
- </AlertDialogPortal>
59
- );
60
- }
61
-
62
- function AlertDialogHeader({
63
- className,
64
- ...props
65
- }: React.ComponentProps<"div">) {
66
- return (
67
- <div
68
- data-slot="alert-dialog-header"
69
- className={cn(
70
- "grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",
71
- className,
72
- )}
73
- {...props}
74
- />
75
- );
76
- }
77
-
78
- function AlertDialogFooter({
79
- className,
80
- ...props
81
- }: React.ComponentProps<"div">) {
82
- return (
83
- <div
84
- data-slot="alert-dialog-footer"
85
- className={cn(
86
- "flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",
87
- className,
88
- )}
89
- {...props}
90
- />
91
- );
92
- }
93
-
94
- function AlertDialogMedia({
95
- className,
96
- ...props
97
- }: React.ComponentProps<"div">) {
98
- return (
99
- <div
100
- data-slot="alert-dialog-media"
101
- className={cn(
102
- "mb-2 inline-flex size-16 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8",
103
- className,
104
- )}
105
- {...props}
106
- />
107
- );
108
- }
109
-
110
- function AlertDialogTitle({
111
- className,
112
- ...props
113
- }: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {
114
- return (
115
- <AlertDialogPrimitive.Title
116
- data-slot="alert-dialog-title"
117
- className={cn(
118
- "font-heading text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
119
- className,
120
- )}
121
- {...props}
122
- />
123
- );
124
- }
125
-
126
- function AlertDialogDescription({
127
- className,
128
- ...props
129
- }: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {
130
- return (
131
- <AlertDialogPrimitive.Description
132
- data-slot="alert-dialog-description"
133
- className={cn(
134
- "text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
135
- className,
136
- )}
137
- {...props}
138
- />
139
- );
140
- }
141
-
142
- function AlertDialogAction({
143
- className,
144
- ...props
145
- }: React.ComponentProps<typeof Button>) {
146
- return (
147
- <Button
148
- data-slot="alert-dialog-action"
149
- className={cn(className)}
150
- {...props}
151
- />
152
- );
153
- }
154
-
155
- function AlertDialogCancel({
156
- className,
157
- variant = "outline",
158
- size = "default",
159
- ...props
160
- }: AlertDialogPrimitive.Close.Props &
161
- Pick<React.ComponentProps<typeof Button>, "variant" | "size">) {
162
- return (
163
- <AlertDialogPrimitive.Close
164
- data-slot="alert-dialog-cancel"
165
- className={cn(className)}
166
- render={<Button variant={variant} size={size} />}
167
- {...props}
168
- />
169
- );
170
- }
171
-
172
- export {
173
- AlertDialog,
174
- AlertDialogAction,
175
- AlertDialogCancel,
176
- AlertDialogContent,
177
- AlertDialogDescription,
178
- AlertDialogFooter,
179
- AlertDialogHeader,
180
- AlertDialogMedia,
181
- AlertDialogOverlay,
182
- AlertDialogPortal,
183
- AlertDialogTitle,
184
- AlertDialogTrigger,
185
- };
@@ -1,75 +0,0 @@
1
- import * as React from "react";
2
- import { cva, type VariantProps } from "class-variance-authority";
3
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
4
-
5
- const alertVariants = cva(
6
- "group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
7
- {
8
- variants: {
9
- variant: {
10
- default: "bg-card text-card-foreground",
11
- destructive:
12
- "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current",
13
- },
14
- },
15
- defaultVariants: {
16
- variant: "default",
17
- },
18
- },
19
- );
20
-
21
- function Alert({
22
- className,
23
- variant,
24
- ...props
25
- }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
26
- return (
27
- <div
28
- data-slot="alert"
29
- role="alert"
30
- className={cn(alertVariants({ variant }), className)}
31
- {...props}
32
- />
33
- );
34
- }
35
-
36
- function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
37
- return (
38
- <div
39
- data-slot="alert-title"
40
- className={cn(
41
- "font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",
42
- className,
43
- )}
44
- {...props}
45
- />
46
- );
47
- }
48
-
49
- function AlertDescription({
50
- className,
51
- ...props
52
- }: React.ComponentProps<"div">) {
53
- return (
54
- <div
55
- data-slot="alert-description"
56
- className={cn(
57
- "text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
58
- className,
59
- )}
60
- {...props}
61
- />
62
- );
63
- }
64
-
65
- function AlertAction({ className, ...props }: React.ComponentProps<"div">) {
66
- return (
67
- <div
68
- data-slot="alert-action"
69
- className={cn("absolute top-2.5 right-3", className)}
70
- {...props}
71
- />
72
- );
73
- }
74
-
75
- export { Alert, AlertTitle, AlertDescription, AlertAction };
@@ -1,22 +0,0 @@
1
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
2
-
3
- function AspectRatio({
4
- ratio,
5
- className,
6
- ...props
7
- }: React.ComponentProps<"div"> & { ratio: number }) {
8
- return (
9
- <div
10
- data-slot="aspect-ratio"
11
- style={
12
- {
13
- "--ratio": ratio,
14
- } as React.CSSProperties
15
- }
16
- className={cn("relative aspect-(--ratio)", className)}
17
- {...props}
18
- />
19
- );
20
- }
21
-
22
- export { AspectRatio };
@@ -1,207 +0,0 @@
1
- import * as React from "react";
2
- import { mergeProps } from "@base-ui/react/merge-props";
3
- import { useRender } from "@base-ui/react/use-render";
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
-
9
- const attachmentVariants = cva(
10
- "group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed",
11
- {
12
- variants: {
13
- size: {
14
- default:
15
- "gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2",
16
- sm: "gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5",
17
- xs: "gap-1.5 rounded-lg text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1",
18
- },
19
- orientation: {
20
- horizontal: "min-w-40 items-center",
21
- vertical: "w-24 flex-col has-data-[slot=attachment-content]:w-30",
22
- },
23
- },
24
- },
25
- );
26
-
27
- function Attachment({
28
- className,
29
- state = "done",
30
- size = "default",
31
- orientation = "horizontal",
32
- ...props
33
- }: React.ComponentProps<"div"> &
34
- VariantProps<typeof attachmentVariants> & {
35
- state?: "idle" | "uploading" | "processing" | "error" | "done";
36
- }) {
37
- return (
38
- <div
39
- data-slot="attachment"
40
- data-state={state}
41
- data-size={size}
42
- data-orientation={orientation}
43
- className={cn(attachmentVariants({ size, orientation }), className)}
44
- {...props}
45
- />
46
- );
47
- }
48
-
49
- const attachmentMediaVariants = cva(
50
- "relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5",
51
- {
52
- variants: {
53
- variant: {
54
- icon: "",
55
- image:
56
- "opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover",
57
- },
58
- },
59
- defaultVariants: {
60
- variant: "icon",
61
- },
62
- },
63
- );
64
-
65
- function AttachmentMedia({
66
- className,
67
- variant = "icon",
68
- ...props
69
- }: React.ComponentProps<"div"> & VariantProps<typeof attachmentMediaVariants>) {
70
- return (
71
- <div
72
- data-slot="attachment-media"
73
- data-variant={variant}
74
- className={cn(attachmentMediaVariants({ variant }), className)}
75
- {...props}
76
- />
77
- );
78
- }
79
-
80
- function AttachmentContent({
81
- className,
82
- ...props
83
- }: React.ComponentProps<"div">) {
84
- return (
85
- <div
86
- data-slot="attachment-content"
87
- className={cn(
88
- "max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1",
89
- className,
90
- )}
91
- {...props}
92
- />
93
- );
94
- }
95
-
96
- function AttachmentTitle({
97
- className,
98
- ...props
99
- }: React.ComponentProps<"span">) {
100
- return (
101
- <span
102
- data-slot="attachment-title"
103
- className={cn(
104
- "block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer",
105
- className,
106
- )}
107
- {...props}
108
- />
109
- );
110
- }
111
-
112
- function AttachmentDescription({
113
- className,
114
- ...props
115
- }: React.ComponentProps<"span">) {
116
- return (
117
- <span
118
- data-slot="attachment-description"
119
- className={cn(
120
- "mt-0.5 block min-w-0 truncate text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive/80",
121
- "max-w-full",
122
- className,
123
- )}
124
- {...props}
125
- />
126
- );
127
- }
128
-
129
- function AttachmentActions({
130
- className,
131
- ...props
132
- }: React.ComponentProps<"div">) {
133
- return (
134
- <div
135
- data-slot="attachment-actions"
136
- className={cn(
137
- "relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1",
138
- className,
139
- )}
140
- {...props}
141
- />
142
- );
143
- }
144
-
145
- function AttachmentAction({
146
- className,
147
- variant,
148
- size = "icon-xs",
149
- ...props
150
- }: React.ComponentProps<typeof Button>) {
151
- return (
152
- <Button
153
- data-slot="attachment-action"
154
- variant={variant ?? "ghost"}
155
- size={size}
156
- className={cn(className)}
157
- {...props}
158
- />
159
- );
160
- }
161
-
162
- function AttachmentTrigger({
163
- className,
164
- render,
165
- type,
166
- ...props
167
- }: useRender.ComponentProps<"button">) {
168
- return useRender({
169
- defaultTagName: "button",
170
- props: mergeProps<"button">(
171
- {
172
- type: render ? type : (type ?? "button"),
173
- className: cn("absolute inset-0 z-10 outline-none", className),
174
- },
175
- props,
176
- ),
177
- render,
178
- state: {
179
- slot: "attachment-trigger",
180
- },
181
- });
182
- }
183
-
184
- function AttachmentGroup({ className, ...props }: React.ComponentProps<"div">) {
185
- return (
186
- <div
187
- data-slot="attachment-group"
188
- className={cn(
189
- "flex min-w-0 scroll-fade-x snap-x snap-mandatory scroll-px-1 scrollbar-none gap-3 overflow-x-auto overscroll-x-contain py-1 *:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start",
190
- className,
191
- )}
192
- {...props}
193
- />
194
- );
195
- }
196
-
197
- export {
198
- Attachment,
199
- AttachmentGroup,
200
- AttachmentMedia,
201
- AttachmentContent,
202
- AttachmentTitle,
203
- AttachmentDescription,
204
- AttachmentActions,
205
- AttachmentAction,
206
- AttachmentTrigger,
207
- };
@@ -1,106 +0,0 @@
1
- import * as React from "react";
2
- import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar";
3
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
4
-
5
- function Avatar({
6
- className,
7
- size = "default",
8
- ...props
9
- }: AvatarPrimitive.Root.Props & {
10
- size?: "default" | "sm" | "lg";
11
- }) {
12
- return (
13
- <AvatarPrimitive.Root
14
- data-slot="avatar"
15
- data-size={size}
16
- className={cn(
17
- "group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",
18
- className,
19
- )}
20
- {...props}
21
- />
22
- );
23
- }
24
-
25
- function AvatarImage({ className, ...props }: AvatarPrimitive.Image.Props) {
26
- return (
27
- <AvatarPrimitive.Image
28
- data-slot="avatar-image"
29
- className={cn(
30
- "aspect-square size-full rounded-full object-cover",
31
- className,
32
- )}
33
- {...props}
34
- />
35
- );
36
- }
37
-
38
- function AvatarFallback({
39
- className,
40
- ...props
41
- }: AvatarPrimitive.Fallback.Props) {
42
- return (
43
- <AvatarPrimitive.Fallback
44
- data-slot="avatar-fallback"
45
- className={cn(
46
- "flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",
47
- className,
48
- )}
49
- {...props}
50
- />
51
- );
52
- }
53
-
54
- function AvatarBadge({ className, ...props }: React.ComponentProps<"span">) {
55
- return (
56
- <span
57
- data-slot="avatar-badge"
58
- className={cn(
59
- "absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none",
60
- "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
61
- "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
62
- "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
63
- className,
64
- )}
65
- {...props}
66
- />
67
- );
68
- }
69
-
70
- function AvatarGroup({ className, ...props }: React.ComponentProps<"div">) {
71
- return (
72
- <div
73
- data-slot="avatar-group"
74
- className={cn(
75
- "group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
76
- className,
77
- )}
78
- {...props}
79
- />
80
- );
81
- }
82
-
83
- function AvatarGroupCount({
84
- className,
85
- ...props
86
- }: React.ComponentProps<"div">) {
87
- return (
88
- <div
89
- data-slot="avatar-group-count"
90
- className={cn(
91
- "relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
92
- className,
93
- )}
94
- {...props}
95
- />
96
- );
97
- }
98
-
99
- export {
100
- Avatar,
101
- AvatarImage,
102
- AvatarFallback,
103
- AvatarGroup,
104
- AvatarGroupCount,
105
- AvatarBadge,
106
- };
@@ -1,51 +0,0 @@
1
- import { mergeProps } from "@base-ui/react/merge-props";
2
- import { useRender } from "@base-ui/react/use-render";
3
- import { cva, type VariantProps } from "class-variance-authority";
4
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
5
-
6
- const badgeVariants = cva(
7
- "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
8
- {
9
- variants: {
10
- variant: {
11
- default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
12
- secondary:
13
- "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
14
- destructive:
15
- "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
16
- outline:
17
- "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
18
- ghost:
19
- "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
20
- link: "text-primary underline-offset-4 hover:underline",
21
- },
22
- },
23
- defaultVariants: {
24
- variant: "default",
25
- },
26
- },
27
- );
28
-
29
- function Badge({
30
- className,
31
- variant = "default",
32
- render,
33
- ...props
34
- }: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>) {
35
- return useRender({
36
- defaultTagName: "span",
37
- props: mergeProps<"span">(
38
- {
39
- className: cn(badgeVariants({ variant }), className),
40
- },
41
- props,
42
- ),
43
- render,
44
- state: {
45
- slot: "badge",
46
- variant,
47
- },
48
- });
49
- }
50
-
51
- export { Badge, badgeVariants };