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.
- package/dist/disposabl.js +1 -1
- package/dist/index.js +2 -2
- package/dist/templates/default/.github/workflows/pipeline.yml +1 -1
- package/dist/templates/default/apps/web/src/router/_authenticated/dashboard.api-keys.tsx +1 -1
- package/dist/templates/default/bun.lock +77 -1397
- package/dist/templates/default/package.json +1 -2
- package/dist/templates/default/packages/backend/README.md +3 -1
- package/dist/templates/default/packages/backend/convex/_generated/api.d.ts +6 -0
- package/dist/templates/default/packages/backend/convex/_generated/server.d.ts +0 -2
- package/dist/templates/default/packages/backend/convex/auth.config.ts +2 -10
- package/dist/templates/default/packages/backend/convex/convex.config.ts +3 -14
- package/dist/templates/default/packages/backend/convex/mcpEnterprise/README.md +42 -0
- package/dist/templates/default/packages/backend/convex/mcpEnterprise/internal.ts +153 -0
- package/dist/templates/default/packages/backend/convex/mcpEnterprise/provision.ts +102 -0
- package/dist/templates/default/packages/backend/convex/mcpEnterprise/validator.ts +35 -0
- package/dist/templates/default/packages/backend/convex/schema.ts +18 -0
- package/dist/templates/default/packages/backend/package.json +0 -1
- package/dist/templates/default/packages/cli/README.md +9 -24
- package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/login.tsx +1 -1
- package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/signUp.tsx +1 -1
- package/dist/templates/default/packages/disposabl-kit/client/routes/consent.tsx +71 -13
- package/dist/templates/default/packages/disposabl-kit/package.json +4 -14
- package/dist/templates/default/packages/disposabl-kit/server/http.ts +19 -12
- package/dist/templates/default/packages/disposabl-kit/server/lib/functions.ts +12 -0
- package/dist/templates/default/packages/disposabl-kit/server/mcp/enterprise.ts +267 -0
- package/dist/templates/default/packages/disposabl-kit/server/mcp/identity.ts +33 -0
- package/dist/templates/default/vendor/README.md +30 -0
- package/dist/templates/default/vendor/convex-auth-6c0ebf3f.tgz +0 -0
- package/package.json +1 -1
- package/dist/templates/default/apps/web/src/components/connections/expo-connection.tsx +0 -97
- package/dist/templates/default/apps/web/src/components/connections/provider-logo.tsx +0 -44
- package/dist/templates/default/apps/web/src/components/connections/use-connection-setup.ts +0 -169
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/accordion.tsx +0 -77
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/alert-dialog.tsx +0 -185
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/alert.tsx +0 -75
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/aspect-ratio.tsx +0 -22
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/attachment.tsx +0 -207
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/avatar.tsx +0 -106
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/badge.tsx +0 -51
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/breadcrumb.tsx +0 -121
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/bubble.tsx +0 -127
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/button-group.tsx +0 -87
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/calendar.tsx +0 -241
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/carousel.tsx +0 -239
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/chart.tsx +0 -368
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/checkbox.tsx +0 -27
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/code-block.tsx +0 -243
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/collapsible.tsx +0 -19
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/combobox.tsx +0 -300
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/command.tsx +0 -194
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/context-menu.tsx +0 -271
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/dialog.tsx +0 -156
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/direction.tsx +0 -4
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/drawer.tsx +0 -224
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/dropdown-menu.tsx +0 -269
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/empty.tsx +0 -103
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/hover-card.tsx +0 -50
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/input-group.tsx +0 -158
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/input-otp.tsx +0 -83
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/item.tsx +0 -201
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/kbd.tsx +0 -26
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/marker.tsx +0 -70
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/menubar.tsx +0 -284
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/message-scroller.tsx +0 -128
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/message.tsx +0 -91
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/native-select.tsx +0 -64
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/navigation-menu.tsx +0 -170
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/pagination.tsx +0 -133
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/popover.tsx +0 -87
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/progress.tsx +0 -82
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/questionnaire.tsx +0 -330
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/radio-group.tsx +0 -35
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/resizable.tsx +0 -49
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/scroll-area.tsx +0 -51
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/select.tsx +0 -201
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/sheet.tsx +0 -132
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/sidebar.tsx +0 -723
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/skeleton.tsx +0 -13
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/slider.tsx +0 -51
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/switch.tsx +0 -31
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/table.tsx +0 -113
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/tabs.tsx +0 -81
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/textarea.tsx +0 -17
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/toast.tsx +0 -229
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/toggle-group.tsx +0 -87
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/toggle.tsx +0 -42
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/tooltip.tsx +0 -65
- package/dist/templates/default/packages/disposabl-kit/client/components/ui/trace.tsx +0 -161
- package/dist/templates/default/packages/disposabl-kit/client/hooks/use-mobile.ts +0 -21
- package/dist/templates/default/patches/@convex-dev%2Fauth@2.0.0-beta.0.patch +0 -310
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
|
|
2
|
-
|
|
3
|
-
function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
|
|
4
|
-
return (
|
|
5
|
-
<div
|
|
6
|
-
data-slot="skeleton"
|
|
7
|
-
className={cn("animate-pulse rounded-md bg-muted", className)}
|
|
8
|
-
{...props}
|
|
9
|
-
/>
|
|
10
|
-
);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { Skeleton };
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Slider as SliderPrimitive } from "@base-ui/react/slider";
|
|
2
|
-
import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
|
|
3
|
-
|
|
4
|
-
function Slider({
|
|
5
|
-
className,
|
|
6
|
-
defaultValue,
|
|
7
|
-
value,
|
|
8
|
-
min = 0,
|
|
9
|
-
max = 100,
|
|
10
|
-
...props
|
|
11
|
-
}: SliderPrimitive.Root.Props) {
|
|
12
|
-
const _values = Array.isArray(value)
|
|
13
|
-
? value
|
|
14
|
-
: Array.isArray(defaultValue)
|
|
15
|
-
? defaultValue
|
|
16
|
-
: [min, max];
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<SliderPrimitive.Root
|
|
20
|
-
className={cn("data-horizontal:w-full data-vertical:h-full", className)}
|
|
21
|
-
data-slot="slider"
|
|
22
|
-
defaultValue={defaultValue}
|
|
23
|
-
value={value}
|
|
24
|
-
min={min}
|
|
25
|
-
max={max}
|
|
26
|
-
thumbAlignment="edge"
|
|
27
|
-
{...props}
|
|
28
|
-
>
|
|
29
|
-
<SliderPrimitive.Control className="relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col">
|
|
30
|
-
<SliderPrimitive.Track
|
|
31
|
-
data-slot="slider-track"
|
|
32
|
-
className="relative grow overflow-hidden rounded-full bg-muted select-none data-horizontal:h-1.5 data-horizontal:w-full data-vertical:h-full data-vertical:w-1.5"
|
|
33
|
-
>
|
|
34
|
-
<SliderPrimitive.Indicator
|
|
35
|
-
data-slot="slider-range"
|
|
36
|
-
className="bg-primary select-none data-horizontal:h-full data-vertical:w-full"
|
|
37
|
-
/>
|
|
38
|
-
</SliderPrimitive.Track>
|
|
39
|
-
{Array.from({ length: _values.length }, (_, index) => (
|
|
40
|
-
<SliderPrimitive.Thumb
|
|
41
|
-
data-slot="slider-thumb"
|
|
42
|
-
key={index}
|
|
43
|
-
className="block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] select-none hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
44
|
-
/>
|
|
45
|
-
))}
|
|
46
|
-
</SliderPrimitive.Control>
|
|
47
|
-
</SliderPrimitive.Root>
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export { Slider };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
|
|
4
|
-
import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
|
|
5
|
-
|
|
6
|
-
function Switch({
|
|
7
|
-
className,
|
|
8
|
-
size = "default",
|
|
9
|
-
...props
|
|
10
|
-
}: SwitchPrimitive.Root.Props & {
|
|
11
|
-
size?: "sm" | "default";
|
|
12
|
-
}) {
|
|
13
|
-
return (
|
|
14
|
-
<SwitchPrimitive.Root
|
|
15
|
-
data-slot="switch"
|
|
16
|
-
data-size={size}
|
|
17
|
-
className={cn(
|
|
18
|
-
"peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
19
|
-
className,
|
|
20
|
-
)}
|
|
21
|
-
{...props}
|
|
22
|
-
>
|
|
23
|
-
<SwitchPrimitive.Thumb
|
|
24
|
-
data-slot="switch-thumb"
|
|
25
|
-
className="pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
|
|
26
|
-
/>
|
|
27
|
-
</SwitchPrimitive.Root>
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export { Switch };
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
|
|
3
|
-
|
|
4
|
-
function Table({ className, ...props }: React.ComponentProps<"table">) {
|
|
5
|
-
return (
|
|
6
|
-
<div
|
|
7
|
-
data-slot="table-container"
|
|
8
|
-
className="relative w-full overflow-x-auto"
|
|
9
|
-
>
|
|
10
|
-
<table
|
|
11
|
-
data-slot="table"
|
|
12
|
-
className={cn("w-full caption-bottom text-sm", className)}
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
</div>
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
|
|
20
|
-
return (
|
|
21
|
-
<thead
|
|
22
|
-
data-slot="table-header"
|
|
23
|
-
className={cn("[&_tr]:border-b", className)}
|
|
24
|
-
{...props}
|
|
25
|
-
/>
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
|
|
30
|
-
return (
|
|
31
|
-
<tbody
|
|
32
|
-
data-slot="table-body"
|
|
33
|
-
className={cn("[&_tr:last-child]:border-0", className)}
|
|
34
|
-
{...props}
|
|
35
|
-
/>
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
|
|
40
|
-
return (
|
|
41
|
-
<tfoot
|
|
42
|
-
data-slot="table-footer"
|
|
43
|
-
className={cn(
|
|
44
|
-
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
45
|
-
className,
|
|
46
|
-
)}
|
|
47
|
-
{...props}
|
|
48
|
-
/>
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
|
|
53
|
-
return (
|
|
54
|
-
<tr
|
|
55
|
-
data-slot="table-row"
|
|
56
|
-
className={cn(
|
|
57
|
-
"border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",
|
|
58
|
-
className,
|
|
59
|
-
)}
|
|
60
|
-
{...props}
|
|
61
|
-
/>
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function TableHead({ className, ...props }: React.ComponentProps<"th">) {
|
|
66
|
-
return (
|
|
67
|
-
<th
|
|
68
|
-
data-slot="table-head"
|
|
69
|
-
className={cn(
|
|
70
|
-
"h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",
|
|
71
|
-
className,
|
|
72
|
-
)}
|
|
73
|
-
{...props}
|
|
74
|
-
/>
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function TableCell({ className, ...props }: React.ComponentProps<"td">) {
|
|
79
|
-
return (
|
|
80
|
-
<td
|
|
81
|
-
data-slot="table-cell"
|
|
82
|
-
className={cn(
|
|
83
|
-
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",
|
|
84
|
-
className,
|
|
85
|
-
)}
|
|
86
|
-
{...props}
|
|
87
|
-
/>
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function TableCaption({
|
|
92
|
-
className,
|
|
93
|
-
...props
|
|
94
|
-
}: React.ComponentProps<"caption">) {
|
|
95
|
-
return (
|
|
96
|
-
<caption
|
|
97
|
-
data-slot="table-caption"
|
|
98
|
-
className={cn("mt-4 text-sm text-muted-foreground", className)}
|
|
99
|
-
{...props}
|
|
100
|
-
/>
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export {
|
|
105
|
-
Table,
|
|
106
|
-
TableHeader,
|
|
107
|
-
TableBody,
|
|
108
|
-
TableFooter,
|
|
109
|
-
TableHead,
|
|
110
|
-
TableRow,
|
|
111
|
-
TableCell,
|
|
112
|
-
TableCaption,
|
|
113
|
-
};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
|
|
4
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
5
|
-
import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
|
|
6
|
-
|
|
7
|
-
function Tabs({
|
|
8
|
-
className,
|
|
9
|
-
orientation = "horizontal",
|
|
10
|
-
...props
|
|
11
|
-
}: TabsPrimitive.Root.Props) {
|
|
12
|
-
return (
|
|
13
|
-
<TabsPrimitive.Root
|
|
14
|
-
data-slot="tabs"
|
|
15
|
-
data-orientation={orientation}
|
|
16
|
-
className={cn(
|
|
17
|
-
"group/tabs flex gap-2 data-horizontal:flex-col",
|
|
18
|
-
className,
|
|
19
|
-
)}
|
|
20
|
-
{...props}
|
|
21
|
-
/>
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const tabsListVariants = cva(
|
|
26
|
-
"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",
|
|
27
|
-
{
|
|
28
|
-
variants: {
|
|
29
|
-
variant: {
|
|
30
|
-
default: "bg-muted",
|
|
31
|
-
line: "gap-1 bg-transparent",
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
defaultVariants: {
|
|
35
|
-
variant: "default",
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
function TabsList({
|
|
41
|
-
className,
|
|
42
|
-
variant = "default",
|
|
43
|
-
...props
|
|
44
|
-
}: TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>) {
|
|
45
|
-
return (
|
|
46
|
-
<TabsPrimitive.List
|
|
47
|
-
data-slot="tabs-list"
|
|
48
|
-
data-variant={variant}
|
|
49
|
-
className={cn(tabsListVariants({ variant }), className)}
|
|
50
|
-
{...props}
|
|
51
|
-
/>
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props) {
|
|
56
|
-
return (
|
|
57
|
-
<TabsPrimitive.Tab
|
|
58
|
-
data-slot="tabs-trigger"
|
|
59
|
-
className={cn(
|
|
60
|
-
"relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
61
|
-
"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",
|
|
62
|
-
"data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground",
|
|
63
|
-
"after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",
|
|
64
|
-
className,
|
|
65
|
-
)}
|
|
66
|
-
{...props}
|
|
67
|
-
/>
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function TabsContent({ className, ...props }: TabsPrimitive.Panel.Props) {
|
|
72
|
-
return (
|
|
73
|
-
<TabsPrimitive.Panel
|
|
74
|
-
data-slot="tabs-content"
|
|
75
|
-
className={cn("flex-1 text-sm outline-none", className)}
|
|
76
|
-
{...props}
|
|
77
|
-
/>
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
|
|
3
|
-
|
|
4
|
-
function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
|
|
5
|
-
return (
|
|
6
|
-
<textarea
|
|
7
|
-
data-slot="textarea"
|
|
8
|
-
className={cn(
|
|
9
|
-
"flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground 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 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
10
|
-
className,
|
|
11
|
-
)}
|
|
12
|
-
{...props}
|
|
13
|
-
/>
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { Textarea };
|
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { Toast as ToastPrimitive } from "@base-ui/react/toast";
|
|
5
|
-
import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
|
|
6
|
-
|
|
7
|
-
import { Button } from "@disposabl/disposabl-kit/client/components/ui/button";
|
|
8
|
-
import {
|
|
9
|
-
XIcon,
|
|
10
|
-
CircleCheckIcon,
|
|
11
|
-
InfoIcon,
|
|
12
|
-
TriangleAlertIcon,
|
|
13
|
-
OctagonXIcon,
|
|
14
|
-
Loader2Icon,
|
|
15
|
-
} from "lucide-react";
|
|
16
|
-
|
|
17
|
-
const toast = ToastPrimitive.createToastManager();
|
|
18
|
-
|
|
19
|
-
function ToastProvider({ ...props }: ToastPrimitive.Provider.Props) {
|
|
20
|
-
return <ToastPrimitive.Provider {...props} />;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function ToastPortal({ ...props }: ToastPrimitive.Portal.Props) {
|
|
24
|
-
return <ToastPrimitive.Portal data-slot="toast-portal" {...props} />;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function ToastViewport({ className, ...props }: ToastPrimitive.Viewport.Props) {
|
|
28
|
-
return (
|
|
29
|
-
<ToastPrimitive.Viewport
|
|
30
|
-
data-slot="toast-viewport"
|
|
31
|
-
className={cn(
|
|
32
|
-
"pointer-events-none fixed inset-x-4 bottom-4 z-50 mx-auto w-auto max-w-sm outline-none sm:right-4 sm:left-auto sm:mx-0 sm:w-full",
|
|
33
|
-
className,
|
|
34
|
-
)}
|
|
35
|
-
{...props}
|
|
36
|
-
/>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function Toast({ className, ...props }: ToastPrimitive.Root.Props) {
|
|
41
|
-
return (
|
|
42
|
-
<ToastPrimitive.Root
|
|
43
|
-
data-slot="toast"
|
|
44
|
-
className={cn(
|
|
45
|
-
"group/toast pointer-events-auto absolute right-0 bottom-0 z-[calc(1000-var(--toast-index))] w-full origin-bottom rounded-2xl border bg-popover text-popover-foreground shadow-lg will-change-transform outline-none select-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
46
|
-
"[--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))]",
|
|
47
|
-
"h-(--height) [transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))] [transition:transform_500ms_cubic-bezier(0.22,1,0.36,1),opacity_500ms,height_150ms]",
|
|
48
|
-
"after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']",
|
|
49
|
-
"data-expanded:h-(--toast-height) data-expanded:[transform:translateX(var(--toast-swipe-movement-x))_translateY(var(--offset-y))]",
|
|
50
|
-
"data-limited:opacity-0 data-starting-style:[transform:translateY(150%)]",
|
|
51
|
-
"[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(150%)]",
|
|
52
|
-
"data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]",
|
|
53
|
-
"data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]",
|
|
54
|
-
"data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]",
|
|
55
|
-
"data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]",
|
|
56
|
-
"data-expanded:data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]",
|
|
57
|
-
"data-expanded:data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]",
|
|
58
|
-
"data-expanded:data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]",
|
|
59
|
-
"data-expanded:data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]",
|
|
60
|
-
className,
|
|
61
|
-
)}
|
|
62
|
-
{...props}
|
|
63
|
-
/>
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function ToastContent({ className, ...props }: ToastPrimitive.Content.Props) {
|
|
68
|
-
return (
|
|
69
|
-
<ToastPrimitive.Content
|
|
70
|
-
data-slot="toast-content"
|
|
71
|
-
className={cn(
|
|
72
|
-
"flex h-full items-center gap-3 overflow-hidden p-4 transition-opacity duration-250 ease-[cubic-bezier(0.22,1,0.36,1)] data-behind:opacity-0 data-expanded:opacity-100",
|
|
73
|
-
className,
|
|
74
|
-
)}
|
|
75
|
-
{...props}
|
|
76
|
-
/>
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
function ToastTitle({ className, ...props }: ToastPrimitive.Title.Props) {
|
|
81
|
-
return (
|
|
82
|
-
<ToastPrimitive.Title
|
|
83
|
-
data-slot="toast-title"
|
|
84
|
-
className={cn("text-sm font-medium", className)}
|
|
85
|
-
{...props}
|
|
86
|
-
/>
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function ToastDescription({
|
|
91
|
-
className,
|
|
92
|
-
...props
|
|
93
|
-
}: ToastPrimitive.Description.Props) {
|
|
94
|
-
return (
|
|
95
|
-
<ToastPrimitive.Description
|
|
96
|
-
data-slot="toast-description"
|
|
97
|
-
className={cn("text-sm text-muted-foreground", className)}
|
|
98
|
-
{...props}
|
|
99
|
-
/>
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function ToastAction({
|
|
104
|
-
className,
|
|
105
|
-
render = <Button variant="outline" size="sm" />,
|
|
106
|
-
...props
|
|
107
|
-
}: ToastPrimitive.Action.Props) {
|
|
108
|
-
return (
|
|
109
|
-
<ToastPrimitive.Action
|
|
110
|
-
data-slot="toast-action"
|
|
111
|
-
render={render}
|
|
112
|
-
className={cn("shrink-0", className)}
|
|
113
|
-
{...props}
|
|
114
|
-
/>
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function ToastClose({
|
|
119
|
-
className,
|
|
120
|
-
children,
|
|
121
|
-
render = <Button variant="ghost" size="icon-sm" />,
|
|
122
|
-
...props
|
|
123
|
-
}: ToastPrimitive.Close.Props) {
|
|
124
|
-
return (
|
|
125
|
-
<ToastPrimitive.Close
|
|
126
|
-
data-slot="toast-close"
|
|
127
|
-
aria-label="Close toast"
|
|
128
|
-
render={render}
|
|
129
|
-
className={cn(
|
|
130
|
-
"relative shrink-0 text-muted-foreground after:absolute after:-inset-2 after:content-[''] hover:text-foreground",
|
|
131
|
-
className,
|
|
132
|
-
)}
|
|
133
|
-
{...props}
|
|
134
|
-
>
|
|
135
|
-
{children ?? <XIcon aria-hidden="true" />}
|
|
136
|
-
</ToastPrimitive.Close>
|
|
137
|
-
);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
function ToastIcon({ type }: { type: string | undefined }) {
|
|
141
|
-
let icon: React.ReactNode = null;
|
|
142
|
-
|
|
143
|
-
if (type === "success") {
|
|
144
|
-
icon = <CircleCheckIcon aria-hidden="true" />;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
if (type === "info") {
|
|
148
|
-
icon = <InfoIcon aria-hidden="true" />;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
if (type === "warning") {
|
|
152
|
-
icon = <TriangleAlertIcon aria-hidden="true" />;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
if (type === "error") {
|
|
156
|
-
icon = <OctagonXIcon className="text-destructive" aria-hidden="true" />;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
if (type === "loading") {
|
|
160
|
-
icon = <Loader2Icon className="animate-spin" aria-hidden="true" />;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
if (!icon) {
|
|
164
|
-
return null;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
return (
|
|
168
|
-
<span
|
|
169
|
-
data-slot="toast-icon"
|
|
170
|
-
className="shrink-0 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4"
|
|
171
|
-
>
|
|
172
|
-
{icon}
|
|
173
|
-
</span>
|
|
174
|
-
);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
function ToastList() {
|
|
178
|
-
const { toasts } = ToastPrimitive.useToastManager();
|
|
179
|
-
|
|
180
|
-
return toasts.map((toastItem) => (
|
|
181
|
-
<Toast key={toastItem.id} toast={toastItem}>
|
|
182
|
-
<ToastContent>
|
|
183
|
-
<ToastIcon type={toastItem.type} />
|
|
184
|
-
<div className="flex min-w-0 flex-1 flex-col gap-1">
|
|
185
|
-
<ToastTitle />
|
|
186
|
-
<ToastDescription />
|
|
187
|
-
</div>
|
|
188
|
-
<ToastAction />
|
|
189
|
-
<ToastClose />
|
|
190
|
-
</ToastContent>
|
|
191
|
-
</Toast>
|
|
192
|
-
));
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
function Toaster({
|
|
196
|
-
children,
|
|
197
|
-
toastManager = toast,
|
|
198
|
-
...props
|
|
199
|
-
}: ToastPrimitive.Provider.Props) {
|
|
200
|
-
return (
|
|
201
|
-
<ToastProvider toastManager={toastManager} {...props}>
|
|
202
|
-
{children}
|
|
203
|
-
<ToastPortal>
|
|
204
|
-
<ToastViewport>
|
|
205
|
-
<ToastList />
|
|
206
|
-
</ToastViewport>
|
|
207
|
-
</ToastPortal>
|
|
208
|
-
</ToastProvider>
|
|
209
|
-
);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
const createToastManager = ToastPrimitive.createToastManager;
|
|
213
|
-
const useToastManager = ToastPrimitive.useToastManager;
|
|
214
|
-
|
|
215
|
-
export {
|
|
216
|
-
Toaster,
|
|
217
|
-
Toast,
|
|
218
|
-
ToastAction,
|
|
219
|
-
ToastClose,
|
|
220
|
-
ToastContent,
|
|
221
|
-
ToastDescription,
|
|
222
|
-
ToastPortal,
|
|
223
|
-
ToastProvider,
|
|
224
|
-
ToastTitle,
|
|
225
|
-
ToastViewport,
|
|
226
|
-
createToastManager,
|
|
227
|
-
toast,
|
|
228
|
-
useToastManager,
|
|
229
|
-
};
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Toggle as TogglePrimitive } from "@base-ui/react/toggle";
|
|
3
|
-
import { ToggleGroup as ToggleGroupPrimitive } from "@base-ui/react/toggle-group";
|
|
4
|
-
import { type VariantProps } from "class-variance-authority";
|
|
5
|
-
import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
|
|
6
|
-
|
|
7
|
-
import { toggleVariants } from "@disposabl/disposabl-kit/client/components/ui/toggle";
|
|
8
|
-
|
|
9
|
-
const ToggleGroupContext = React.createContext<
|
|
10
|
-
VariantProps<typeof toggleVariants> & {
|
|
11
|
-
spacing?: number;
|
|
12
|
-
orientation?: "horizontal" | "vertical";
|
|
13
|
-
}
|
|
14
|
-
>({
|
|
15
|
-
size: "default",
|
|
16
|
-
variant: "default",
|
|
17
|
-
spacing: 2,
|
|
18
|
-
orientation: "horizontal",
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
function ToggleGroup({
|
|
22
|
-
className,
|
|
23
|
-
variant,
|
|
24
|
-
size,
|
|
25
|
-
spacing = 2,
|
|
26
|
-
orientation = "horizontal",
|
|
27
|
-
children,
|
|
28
|
-
...props
|
|
29
|
-
}: ToggleGroupPrimitive.Props &
|
|
30
|
-
VariantProps<typeof toggleVariants> & {
|
|
31
|
-
spacing?: number;
|
|
32
|
-
orientation?: "horizontal" | "vertical";
|
|
33
|
-
}) {
|
|
34
|
-
return (
|
|
35
|
-
<ToggleGroupPrimitive
|
|
36
|
-
data-slot="toggle-group"
|
|
37
|
-
data-variant={variant}
|
|
38
|
-
data-size={size}
|
|
39
|
-
data-spacing={spacing}
|
|
40
|
-
data-orientation={orientation}
|
|
41
|
-
style={{ "--gap": spacing } as React.CSSProperties}
|
|
42
|
-
className={cn(
|
|
43
|
-
"group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=0]:data-[variant=outline]:shadow-xs data-vertical:flex-col data-vertical:items-stretch",
|
|
44
|
-
className,
|
|
45
|
-
)}
|
|
46
|
-
{...props}
|
|
47
|
-
>
|
|
48
|
-
<ToggleGroupContext.Provider
|
|
49
|
-
value={{ variant, size, spacing, orientation }}
|
|
50
|
-
>
|
|
51
|
-
{children}
|
|
52
|
-
</ToggleGroupContext.Provider>
|
|
53
|
-
</ToggleGroupPrimitive>
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function ToggleGroupItem({
|
|
58
|
-
className,
|
|
59
|
-
children,
|
|
60
|
-
variant = "default",
|
|
61
|
-
size = "default",
|
|
62
|
-
...props
|
|
63
|
-
}: TogglePrimitive.Props & VariantProps<typeof toggleVariants>) {
|
|
64
|
-
const context = React.useContext(ToggleGroupContext);
|
|
65
|
-
|
|
66
|
-
return (
|
|
67
|
-
<TogglePrimitive
|
|
68
|
-
data-slot="toggle-group-item"
|
|
69
|
-
data-variant={context.variant || variant}
|
|
70
|
-
data-size={context.size || size}
|
|
71
|
-
data-spacing={context.spacing}
|
|
72
|
-
className={cn(
|
|
73
|
-
"shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 group-data-[spacing=0]/toggle-group:shadow-none focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-md group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-md data-[state=on]:bg-muted group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",
|
|
74
|
-
toggleVariants({
|
|
75
|
-
variant: context.variant || variant,
|
|
76
|
-
size: context.size || size,
|
|
77
|
-
}),
|
|
78
|
-
className,
|
|
79
|
-
)}
|
|
80
|
-
{...props}
|
|
81
|
-
>
|
|
82
|
-
{children}
|
|
83
|
-
</TogglePrimitive>
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Toggle as TogglePrimitive } from "@base-ui/react/toggle";
|
|
2
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
-
import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
|
|
4
|
-
|
|
5
|
-
const toggleVariants = cva(
|
|
6
|
-
"group/toggle inline-flex items-center justify-center gap-1 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
7
|
-
{
|
|
8
|
-
variants: {
|
|
9
|
-
variant: {
|
|
10
|
-
default: "bg-transparent",
|
|
11
|
-
outline: "border border-input bg-transparent shadow-xs hover:bg-muted",
|
|
12
|
-
},
|
|
13
|
-
size: {
|
|
14
|
-
default:
|
|
15
|
-
"h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
16
|
-
sm: "h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
17
|
-
lg: "h-10 min-w-10 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
defaultVariants: {
|
|
21
|
-
variant: "default",
|
|
22
|
-
size: "default",
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
function Toggle({
|
|
28
|
-
className,
|
|
29
|
-
variant = "default",
|
|
30
|
-
size = "default",
|
|
31
|
-
...props
|
|
32
|
-
}: TogglePrimitive.Props & VariantProps<typeof toggleVariants>) {
|
|
33
|
-
return (
|
|
34
|
-
<TogglePrimitive
|
|
35
|
-
data-slot="toggle"
|
|
36
|
-
className={cn(toggleVariants({ variant, size, className }))}
|
|
37
|
-
{...props}
|
|
38
|
-
/>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export { Toggle, toggleVariants };
|