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,169 +0,0 @@
1
- import { useEffect, useRef, useState } from "react";
2
- import { useAction, useMutation, useQuery } from "convex/react";
3
- import { ConvexError } from "convex/values";
4
- import { api } from "../../../../../packages/backend/convex/_generated/api";
5
-
6
- type Provider = "github" | "convex";
7
- type Installation = { installationId: string; owner: string };
8
- const pendingKey = "disposabl.pendingConnectionProvider";
9
- const isProvider = (value: string | null): value is Provider =>
10
- value === "github" || value === "convex";
11
-
12
- export function useConnectionSetup() {
13
- const status = useQuery(api.connections.index.status, {});
14
- const start = useAction(api.connections.index.start);
15
- const resumeInstall = useAction(api.connections.index.resumeGithubInstall);
16
- const confirmBlacksmith = useMutation(
17
- api.connections.index.confirmBlacksmith,
18
- );
19
- const complete = useAction(api.connections.index.complete);
20
- const selectGithub = useAction(api.connections.index.selectGithub);
21
- const disconnect = useMutation(api.connections.index.disconnect);
22
- const [busy, setBusy] = useState(false);
23
- const [error, setError] = useState<string>();
24
- const [installations, setInstallations] = useState<Installation[]>([]);
25
- const [proof, setProof] = useState<string>();
26
- const [installNeeded, setInstallNeeded] = useState(false);
27
- const [mobile, setMobile] = useState(false);
28
- const consumed = useRef(false);
29
- const fail = (cause: unknown) =>
30
- setError(
31
- cause instanceof ConvexError && typeof cause.data === "string"
32
- ? cause.data
33
- : cause instanceof Error
34
- ? cause.message
35
- : "Something went wrong. Please try again.",
36
- );
37
-
38
- useEffect(() => {
39
- if (consumed.current) return;
40
- consumed.current = true;
41
- const url = new URL(window.location.href);
42
- const mobileKey = "disposabl.setupMobile";
43
- if (url.searchParams.has("mobile"))
44
- sessionStorage.setItem(
45
- mobileKey,
46
- url.searchParams.get("mobile") === "1" ? "1" : "0",
47
- );
48
- setMobile(sessionStorage.getItem(mobileKey) === "1");
49
- const queryProvider = url.searchParams.get("provider");
50
- const pending = sessionStorage.getItem(pendingKey);
51
- const provider = isProvider(queryProvider)
52
- ? queryProvider
53
- : isProvider(pending)
54
- ? pending
55
- : null;
56
- const code = url.searchParams.get("code");
57
- const state = url.searchParams.get("state");
58
- const denial = url.searchParams.get("error");
59
- const installationReturn =
60
- url.searchParams.has("installation_id") ||
61
- url.searchParams.has("setup_action");
62
- // Remove callback credentials even after a denial or malformed response.
63
- for (const key of [
64
- "installation_id",
65
- "setup_action",
66
- "state",
67
- "code",
68
- "provider",
69
- "error",
70
- "error_description",
71
- ])
72
- url.searchParams.delete(key);
73
- window.history.replaceState(window.history.state, "", url.toString());
74
- if (denial) {
75
- sessionStorage.removeItem(pendingKey);
76
- setError(
77
- "Authorization was cancelled. Use the setup button to try again.",
78
- );
79
- return;
80
- }
81
- if (installationReturn) {
82
- setBusy(true);
83
- sessionStorage.setItem(pendingKey, "github");
84
- void (state ? resumeInstall({ state }) : start({ provider: "github" }))
85
- .then((next) => window.location.assign(next))
86
- .catch(fail)
87
- .finally(() => setBusy(false));
88
- return;
89
- }
90
- const callback =
91
- code !== null ||
92
- state !== null ||
93
- denial !== null ||
94
- queryProvider !== null;
95
- if (!callback) return;
96
- if (!provider || !code || !state) {
97
- setError(
98
- "The authorization response is incomplete. Please connect again to restart authorization.",
99
- );
100
- return;
101
- }
102
- sessionStorage.removeItem(pendingKey);
103
- setBusy(true);
104
- void complete({ provider, code, state })
105
- .then(async (result) => {
106
- if (provider !== "github") return;
107
- const installation = result.installations.at(0);
108
- if (result.installations.length === 1 && installation) {
109
- if (!result.proof)
110
- throw new Error(
111
- "GitHub did not return an account selection proof. Please connect again.",
112
- );
113
- await selectGithub({
114
- proof: result.proof,
115
- installationId: installation.installationId,
116
- });
117
- } else {
118
- setInstallations(result.installations);
119
- setProof(result.proof);
120
- setInstallNeeded(result.installations.length === 0);
121
- }
122
- })
123
- .catch(fail)
124
- .finally(() => setBusy(false));
125
- }, [complete, selectGithub, resumeInstall, start]);
126
-
127
- async function run(action: () => Promise<void>) {
128
- if (busy) return;
129
- setBusy(true);
130
- setError(undefined);
131
- try {
132
- await action();
133
- } catch (cause) {
134
- fail(cause);
135
- } finally {
136
- setBusy(false);
137
- }
138
- }
139
- function connect(provider: Provider) {
140
- void run(async () => {
141
- const url = await start({ provider, install: provider === "github" });
142
- sessionStorage.setItem(pendingKey, provider);
143
- window.location.assign(url);
144
- });
145
- }
146
-
147
- function chooseOrganization(installationId: string) {
148
- void run(async () => {
149
- if (!proof)
150
- throw new Error("Restart GitHub setup to choose an organization.");
151
- await selectGithub({ proof, installationId });
152
- setInstallations([]);
153
- setProof(undefined);
154
- });
155
- }
156
- return {
157
- status,
158
- busy,
159
- error,
160
- run,
161
- connect,
162
- disconnect,
163
- installations,
164
- chooseOrganization,
165
- installNeeded,
166
- confirmBlacksmith,
167
- mobile,
168
- };
169
- }
@@ -1,77 +0,0 @@
1
- import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion";
2
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
3
- import { ChevronDownIcon, ChevronUpIcon } from "lucide-react";
4
-
5
- function Accordion({ className, ...props }: AccordionPrimitive.Root.Props) {
6
- return (
7
- <AccordionPrimitive.Root
8
- data-slot="accordion"
9
- className={cn("flex w-full flex-col", className)}
10
- {...props}
11
- />
12
- );
13
- }
14
-
15
- function AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props) {
16
- return (
17
- <AccordionPrimitive.Item
18
- data-slot="accordion-item"
19
- className={cn("not-last:border-b", className)}
20
- {...props}
21
- />
22
- );
23
- }
24
-
25
- function AccordionTrigger({
26
- className,
27
- children,
28
- ...props
29
- }: AccordionPrimitive.Trigger.Props) {
30
- return (
31
- <AccordionPrimitive.Header className="flex">
32
- <AccordionPrimitive.Trigger
33
- data-slot="accordion-trigger"
34
- className={cn(
35
- "group/accordion-trigger relative flex flex-1 items-start justify-between rounded-md border border-transparent py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",
36
- className,
37
- )}
38
- {...props}
39
- >
40
- {children}
41
- <ChevronDownIcon
42
- data-slot="accordion-trigger-icon"
43
- className="pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"
44
- />
45
- <ChevronUpIcon
46
- data-slot="accordion-trigger-icon"
47
- className="pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"
48
- />
49
- </AccordionPrimitive.Trigger>
50
- </AccordionPrimitive.Header>
51
- );
52
- }
53
-
54
- function AccordionContent({
55
- className,
56
- children,
57
- ...props
58
- }: AccordionPrimitive.Panel.Props) {
59
- return (
60
- <AccordionPrimitive.Panel
61
- data-slot="accordion-content"
62
- className="overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up"
63
- {...props}
64
- >
65
- <div
66
- className={cn(
67
- "h-(--accordion-panel-height) pt-0 pb-4 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
68
- className,
69
- )}
70
- >
71
- {children}
72
- </div>
73
- </AccordionPrimitive.Panel>
74
- );
75
- }
76
-
77
- export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -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 };