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,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 };
@@ -1,121 +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 { cn } from "@disposabl/disposabl-kit/client/lib/utils";
5
- import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
6
-
7
- function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">) {
8
- return (
9
- <nav
10
- aria-label="breadcrumb"
11
- data-slot="breadcrumb"
12
- className={cn(className)}
13
- {...props}
14
- />
15
- );
16
- }
17
-
18
- function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
19
- return (
20
- <ol
21
- data-slot="breadcrumb-list"
22
- className={cn(
23
- "flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground sm:gap-2.5",
24
- className,
25
- )}
26
- {...props}
27
- />
28
- );
29
- }
30
-
31
- function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
32
- return (
33
- <li
34
- data-slot="breadcrumb-item"
35
- className={cn("inline-flex items-center gap-1.5", className)}
36
- {...props}
37
- />
38
- );
39
- }
40
-
41
- function BreadcrumbLink({
42
- className,
43
- render,
44
- ...props
45
- }: useRender.ComponentProps<"a">) {
46
- return useRender({
47
- defaultTagName: "a",
48
- props: mergeProps<"a">(
49
- {
50
- className: cn("transition-colors hover:text-foreground", className),
51
- },
52
- props,
53
- ),
54
- render,
55
- state: {
56
- slot: "breadcrumb-link",
57
- },
58
- });
59
- }
60
-
61
- function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
62
- return (
63
- <span
64
- data-slot="breadcrumb-page"
65
- role="link"
66
- aria-disabled="true"
67
- aria-current="page"
68
- className={cn("font-normal text-foreground", className)}
69
- {...props}
70
- />
71
- );
72
- }
73
-
74
- function BreadcrumbSeparator({
75
- children,
76
- className,
77
- ...props
78
- }: React.ComponentProps<"li">) {
79
- return (
80
- <li
81
- data-slot="breadcrumb-separator"
82
- role="presentation"
83
- aria-hidden="true"
84
- className={cn("[&>svg]:size-3.5", className)}
85
- {...props}
86
- >
87
- {children ?? <ChevronRightIcon />}
88
- </li>
89
- );
90
- }
91
-
92
- function BreadcrumbEllipsis({
93
- className,
94
- ...props
95
- }: React.ComponentProps<"span">) {
96
- return (
97
- <span
98
- data-slot="breadcrumb-ellipsis"
99
- role="presentation"
100
- aria-hidden="true"
101
- className={cn(
102
- "flex size-5 items-center justify-center [&>svg]:size-4",
103
- className,
104
- )}
105
- {...props}
106
- >
107
- <MoreHorizontalIcon />
108
- <span className="sr-only">More</span>
109
- </span>
110
- );
111
- }
112
-
113
- export {
114
- Breadcrumb,
115
- BreadcrumbList,
116
- BreadcrumbItem,
117
- BreadcrumbLink,
118
- BreadcrumbPage,
119
- BreadcrumbSeparator,
120
- BreadcrumbEllipsis,
121
- };
@@ -1,127 +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
- function BubbleGroup({ className, ...props }: React.ComponentProps<"div">) {
8
- return (
9
- <div
10
- data-slot="bubble-group"
11
- className={cn("flex min-w-0 flex-col gap-2", className)}
12
- {...props}
13
- />
14
- );
15
- }
16
-
17
- const bubbleVariants = cva(
18
- "group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full",
19
- {
20
- variants: {
21
- variant: {
22
- default:
23
- "*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",
24
- secondary:
25
- "*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",
26
- muted:
27
- "*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",
28
- tinted:
29
- "*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",
30
- outline:
31
- "*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",
32
- ghost:
33
- "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",
34
- destructive:
35
- "*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30",
36
- },
37
- },
38
- defaultVariants: {
39
- variant: "default",
40
- },
41
- },
42
- );
43
-
44
- function Bubble({
45
- variant = "default",
46
- align = "start",
47
- className,
48
- ...props
49
- }: React.ComponentProps<"div"> &
50
- VariantProps<typeof bubbleVariants> & {
51
- align?: "start" | "end";
52
- }) {
53
- return (
54
- <div
55
- data-slot="bubble"
56
- data-variant={variant}
57
- data-align={align}
58
- className={cn(bubbleVariants({ variant }), className)}
59
- {...props}
60
- />
61
- );
62
- }
63
-
64
- function BubbleContent({
65
- className,
66
- render,
67
- ...props
68
- }: useRender.ComponentProps<"div">) {
69
- return useRender({
70
- defaultTagName: "div",
71
- props: mergeProps<"div">(
72
- {
73
- className: cn(
74
- "w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50",
75
- className,
76
- ),
77
- },
78
- props,
79
- ),
80
- render,
81
- state: {
82
- slot: "bubble-content",
83
- },
84
- });
85
- }
86
-
87
- const bubbleReactionsVariants = cva(
88
- "absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0",
89
- {
90
- variants: {
91
- side: {
92
- top: "top-0 -translate-y-3/4",
93
- bottom: "bottom-0 translate-y-3/4",
94
- },
95
- align: {
96
- start: "left-3",
97
- end: "right-3",
98
- },
99
- },
100
- defaultVariants: {
101
- side: "bottom",
102
- align: "end",
103
- },
104
- },
105
- );
106
-
107
- function BubbleReactions({
108
- side = "bottom",
109
- align = "end",
110
- className,
111
- ...props
112
- }: React.ComponentProps<"div"> & {
113
- align?: "start" | "end";
114
- side?: "top" | "bottom";
115
- }) {
116
- return (
117
- <div
118
- data-slot="bubble-reactions"
119
- data-align={align}
120
- data-side={side}
121
- className={cn(bubbleReactionsVariants({ side, align }), className)}
122
- {...props}
123
- />
124
- );
125
- }
126
-
127
- export { BubbleGroup, Bubble, BubbleContent, BubbleReactions };
@@ -1,87 +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
- import { Separator } from "@disposabl/disposabl-kit/client/components/ui/separator";
7
-
8
- const buttonGroupVariants = cva(
9
- "flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
10
- {
11
- variants: {
12
- orientation: {
13
- horizontal:
14
- "*:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-md! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0",
15
- vertical:
16
- "flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-md! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0",
17
- },
18
- },
19
- defaultVariants: {
20
- orientation: "horizontal",
21
- },
22
- },
23
- );
24
-
25
- function ButtonGroup({
26
- className,
27
- orientation,
28
- ...props
29
- }: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>) {
30
- return (
31
- <div
32
- role="group"
33
- data-slot="button-group"
34
- data-orientation={orientation}
35
- className={cn(buttonGroupVariants({ orientation }), className)}
36
- {...props}
37
- />
38
- );
39
- }
40
-
41
- function ButtonGroupText({
42
- className,
43
- render,
44
- ...props
45
- }: useRender.ComponentProps<"div">) {
46
- return useRender({
47
- defaultTagName: "div",
48
- props: mergeProps<"div">(
49
- {
50
- className: cn(
51
- "flex items-center gap-2 rounded-md border bg-muted px-2.5 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
52
- className,
53
- ),
54
- },
55
- props,
56
- ),
57
- render,
58
- state: {
59
- slot: "button-group-text",
60
- },
61
- });
62
- }
63
-
64
- function ButtonGroupSeparator({
65
- className,
66
- orientation = "vertical",
67
- ...props
68
- }: React.ComponentProps<typeof Separator>) {
69
- return (
70
- <Separator
71
- data-slot="button-group-separator"
72
- orientation={orientation}
73
- className={cn(
74
- "relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto",
75
- className,
76
- )}
77
- {...props}
78
- />
79
- );
80
- }
81
-
82
- export {
83
- ButtonGroup,
84
- ButtonGroupSeparator,
85
- ButtonGroupText,
86
- buttonGroupVariants,
87
- };