@arch-cadre/ui 0.0.44 → 0.0.47
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/components/accordion.js +18 -0
- package/dist/components/alert-dialog.js +39 -0
- package/dist/components/alert.js +24 -0
- package/dist/components/aspect-ratio.js +7 -0
- package/dist/components/avatar.js +14 -0
- package/dist/components/badge.js +22 -0
- package/dist/components/breadcrumb.js +30 -0
- package/dist/components/button-group.js +28 -0
- package/dist/components/button.js +33 -0
- package/dist/components/calendar.js +76 -0
- package/dist/components/card.js +24 -0
- package/dist/components/checkbox.js +9 -0
- package/dist/components/collapsible.js +13 -0
- package/dist/components/command.js +34 -0
- package/dist/components/context-menu.js +51 -0
- package/dist/components/dialog.js +36 -0
- package/dist/components/drawer.js +35 -0
- package/dist/components/dropdown-menu.js +51 -0
- package/dist/components/empty.js +33 -0
- package/dist/components/field.js +78 -0
- package/dist/components/form.js +59 -0
- package/dist/components/hover-card.js +14 -0
- package/dist/components/input-group.js +63 -0
- package/dist/components/input-otp.js +21 -0
- package/dist/components/input.js +6 -0
- package/dist/components/item.js +66 -0
- package/dist/components/kbd.js +9 -0
- package/dist/components/label.js +8 -0
- package/dist/components/language-switcher.js +20 -0
- package/dist/components/menubar.js +54 -0
- package/dist/components/navigation-menu.js +31 -0
- package/dist/components/pagination.js +31 -0
- package/dist/components/popover.js +17 -0
- package/dist/components/progress.js +8 -0
- package/dist/components/radio-group.js +12 -0
- package/dist/components/scroll-area.js +13 -0
- package/dist/components/select.js +38 -0
- package/dist/components/separator.js +8 -0
- package/dist/components/sheet.js +40 -0
- package/dist/components/sidebar.js +213 -0
- package/dist/components/skeleton.js +6 -0
- package/dist/components/slider.js +14 -0
- package/dist/components/sonner.js +21 -0
- package/dist/components/spinner.js +7 -0
- package/dist/components/switch.js +8 -0
- package/dist/components/table.js +28 -0
- package/dist/components/tabs.js +17 -0
- package/dist/components/textarea.js +6 -0
- package/dist/components/toggle-group.js +22 -0
- package/dist/components/toggle.js +26 -0
- package/dist/components/tooltip.js +17 -0
- package/dist/hooks/use-mobile.js +15 -0
- package/dist/hooks/use-user.js +25 -0
- package/dist/lib/{utils.mjs → utils.js} +1 -1
- package/dist/logo.js +28 -0
- package/dist/postcss.config.mjs +1 -2
- package/dist/providers/auth-provider.js +27 -0
- package/dist/providers/index.js +23 -0
- package/dist/shared/access-denied.js +6 -0
- package/dist/shared/loader.js +41 -0
- package/dist/shared/page-loader.js +6 -0
- package/dist/shared/scroll-fade-effect.js +5 -0
- package/package.json +17 -20
- package/build.config.ts +0 -23
- package/components.json +0 -20
- package/dist/components/.gitkeep +0 -0
- package/dist/components/accordion.d.ts +0 -7
- package/dist/components/accordion.mjs +0 -58
- package/dist/components/alert-dialog.d.ts +0 -14
- package/dist/components/alert-dialog.mjs +0 -144
- package/dist/components/alert.d.ts +0 -9
- package/dist/components/alert.mjs +0 -62
- package/dist/components/aspect-ratio.d.ts +0 -4
- package/dist/components/aspect-ratio.mjs +0 -9
- package/dist/components/avatar.d.ts +0 -6
- package/dist/components/avatar.mjs +0 -50
- package/dist/components/badge.d.ts +0 -9
- package/dist/components/badge.mjs +0 -37
- package/dist/components/breadcrumb.d.ts +0 -11
- package/dist/components/breadcrumb.mjs +0 -105
- package/dist/components/button-group.d.ts +0 -13
- package/dist/components/button-group.mjs +0 -76
- package/dist/components/button.d.ts +0 -10
- package/dist/components/button.mjs +0 -51
- package/dist/components/calendar.d.ts +0 -8
- package/dist/components/calendar.mjs +0 -191
- package/dist/components/card.d.ts +0 -9
- package/dist/components/card.mjs +0 -90
- package/dist/components/checkbox.d.ts +0 -4
- package/dist/components/checkbox.mjs +0 -30
- package/dist/components/collapsible.d.ts +0 -6
- package/dist/components/collapsible.mjs +0 -31
- package/dist/components/command.d.ts +0 -18
- package/dist/components/command.mjs +0 -169
- package/dist/components/context-menu.d.ts +0 -25
- package/dist/components/context-menu.mjs +0 -218
- package/dist/components/dialog.d.ts +0 -15
- package/dist/components/dialog.mjs +0 -130
- package/dist/components/drawer.d.ts +0 -13
- package/dist/components/drawer.mjs +0 -124
- package/dist/components/dropdown-menu.d.ts +0 -25
- package/dist/components/dropdown-menu.mjs +0 -226
- package/dist/components/empty.d.ts +0 -12
- package/dist/components/empty.mjs +0 -102
- package/dist/components/field.d.ts +0 -25
- package/dist/components/field.mjs +0 -228
- package/dist/components/form.d.ts +0 -23
- package/dist/components/form.mjs +0 -123
- package/dist/components/hover-card.d.ts +0 -6
- package/dist/components/hover-card.mjs +0 -35
- package/dist/components/input-group.d.ts +0 -16
- package/dist/components/input-group.mjs +0 -155
- package/dist/components/input-otp.d.ts +0 -11
- package/dist/components/input-otp.mjs +0 -59
- package/dist/components/input.d.ts +0 -3
- package/dist/components/input.mjs +0 -19
- package/dist/components/item.d.ts +0 -23
- package/dist/components/item.mjs +0 -187
- package/dist/components/kbd.d.ts +0 -4
- package/dist/components/kbd.mjs +0 -28
- package/dist/components/label.d.ts +0 -4
- package/dist/components/label.mjs +0 -21
- package/dist/components/language-switcher.d.ts +0 -2
- package/dist/components/language-switcher.mjs +0 -30
- package/dist/components/menubar.d.ts +0 -26
- package/dist/components/menubar.mjs +0 -246
- package/dist/components/navigation-menu.d.ts +0 -14
- package/dist/components/navigation-menu.mjs +0 -166
- package/dist/components/pagination.d.ts +0 -15
- package/dist/components/pagination.mjs +0 -116
- package/dist/components/popover.d.ts +0 -7
- package/dist/components/popover.mjs +0 -40
- package/dist/components/progress.d.ts +0 -4
- package/dist/components/progress.mjs +0 -30
- package/dist/components/radio-group.d.ts +0 -5
- package/dist/components/radio-group.mjs +0 -43
- package/dist/components/scroll-area.d.ts +0 -7
- package/dist/components/scroll-area.mjs +0 -59
- package/dist/components/select.d.ts +0 -15
- package/dist/components/select.mjs +0 -173
- package/dist/components/separator.d.ts +0 -4
- package/dist/components/separator.mjs +0 -25
- package/dist/components/sheet.d.ts +0 -13
- package/dist/components/sheet.mjs +0 -119
- package/dist/components/sidebar.d.ts +0 -69
- package/dist/components/sidebar.mjs +0 -635
- package/dist/components/skeleton.d.ts +0 -3
- package/dist/components/skeleton.mjs +0 -13
- package/dist/components/slider.d.ts +0 -4
- package/dist/components/slider.mjs +0 -59
- package/dist/components/sonner.d.ts +0 -4
- package/dist/components/sonner.mjs +0 -36
- package/dist/components/spinner.d.ts +0 -3
- package/dist/components/spinner.mjs +0 -15
- package/dist/components/switch.d.ts +0 -4
- package/dist/components/switch.mjs +0 -30
- package/dist/components/table.d.ts +0 -10
- package/dist/components/table.mjs +0 -115
- package/dist/components/tabs.d.ts +0 -7
- package/dist/components/tabs.mjs +0 -63
- package/dist/components/textarea.d.ts +0 -3
- package/dist/components/textarea.mjs +0 -16
- package/dist/components/toggle-group.d.ts +0 -9
- package/dist/components/toggle-group.mjs +0 -65
- package/dist/components/toggle.d.ts +0 -9
- package/dist/components/toggle.mjs +0 -41
- package/dist/components/tooltip.d.ts +0 -7
- package/dist/components/tooltip.mjs +0 -49
- package/dist/hooks/.gitkeep +0 -0
- package/dist/hooks/use-mobile.d.ts +0 -1
- package/dist/hooks/use-mobile.mjs +0 -17
- package/dist/hooks/use-user.d.ts +0 -12
- package/dist/hooks/use-user.mjs +0 -12
- package/dist/index.mjs +0 -15
- package/dist/lib/utils.d.ts +0 -2
- package/dist/logo.d.ts +0 -15
- package/dist/logo.mjs +0 -32
- package/dist/postcss.config.d.mts +0 -3
- package/dist/providers/auth-provider.d.ts +0 -15
- package/dist/providers/auth-provider.mjs +0 -37
- package/dist/providers/index.d.ts +0 -7
- package/dist/providers/index.mjs +0 -33
- package/dist/shared/access-denied.d.ts +0 -2
- package/dist/shared/access-denied.mjs +0 -12
- package/dist/shared/loader.d.ts +0 -11
- package/dist/shared/loader.mjs +0 -98
- package/dist/shared/page-loader.d.ts +0 -7
- package/dist/shared/page-loader.mjs +0 -6
- package/dist/shared/scroll-fade-effect.d.ts +0 -4
- package/dist/shared/scroll-fade-effect.mjs +0 -20
- package/dist/styles/globals.css +0 -1
- package/postcss.config.mjs +0 -6
- package/scripts/switchToDist.js +0 -55
- package/scripts/switchToSrc.js +0 -52
- package/src/components/.gitkeep +0 -0
- package/src/components/accordion.tsx +0 -66
- package/src/components/alert-dialog.tsx +0 -157
- package/src/components/alert.tsx +0 -66
- package/src/components/aspect-ratio.tsx +0 -12
- package/src/components/avatar.tsx +0 -53
- package/src/components/badge.tsx +0 -46
- package/src/components/breadcrumb.tsx +0 -111
- package/src/components/button-group.tsx +0 -86
- package/src/components/button.tsx +0 -62
- package/src/components/calendar.tsx +0 -220
- package/src/components/card.tsx +0 -92
- package/src/components/checkbox.tsx +0 -32
- package/src/components/collapsible.tsx +0 -34
- package/src/components/command.tsx +0 -184
- package/src/components/context-menu.tsx +0 -252
- package/src/components/dialog.tsx +0 -143
- package/src/components/drawer.tsx +0 -135
- package/src/components/dropdown-menu.tsx +0 -257
- package/src/components/empty.tsx +0 -105
- package/src/components/field.tsx +0 -251
- package/src/components/form.tsx +0 -170
- package/src/components/hover-card.tsx +0 -44
- package/src/components/input-group.tsx +0 -170
- package/src/components/input-otp.tsx +0 -77
- package/src/components/input.tsx +0 -21
- package/src/components/item.tsx +0 -193
- package/src/components/kbd.tsx +0 -29
- package/src/components/label.tsx +0 -24
- package/src/components/language-switcher.tsx +0 -49
- package/src/components/menubar.tsx +0 -276
- package/src/components/navigation-menu.tsx +0 -168
- package/src/components/pagination.tsx +0 -130
- package/src/components/popover.tsx +0 -48
- package/src/components/progress.tsx +0 -31
- package/src/components/radio-group.tsx +0 -45
- package/src/components/scroll-area.tsx +0 -67
- package/src/components/select.tsx +0 -190
- package/src/components/separator.tsx +0 -28
- package/src/components/sheet.tsx +0 -139
- package/src/components/sidebar.tsx +0 -726
- package/src/components/skeleton.tsx +0 -14
- package/src/components/slider.tsx +0 -63
- package/src/components/sonner.tsx +0 -41
- package/src/components/spinner.tsx +0 -17
- package/src/components/switch.tsx +0 -31
- package/src/components/table.tsx +0 -116
- package/src/components/tabs.tsx +0 -66
- package/src/components/textarea.tsx +0 -18
- package/src/components/toggle-group.tsx +0 -83
- package/src/components/toggle.tsx +0 -47
- package/src/components/tooltip.tsx +0 -61
- package/src/hooks/.gitkeep +0 -0
- package/src/hooks/use-mobile.ts +0 -21
- package/src/hooks/use-user.ts +0 -27
- package/src/index.ts +0 -15
- package/src/lib/utils.ts +0 -6
- package/src/logo.tsx +0 -49
- package/src/postcss.config.mjs +0 -6
- package/src/providers/auth-provider.tsx +0 -66
- package/src/providers/index.tsx +0 -50
- package/src/shared/access-denied.tsx +0 -31
- package/src/shared/loader.tsx +0 -109
- package/src/shared/page-loader.tsx +0 -24
- package/src/shared/scroll-fade-effect.tsx +0 -23
- package/src/styles/globals.css +0 -314
- package/tsconfig.json +0 -24
- /package/dist/{index.d.ts → index.js} +0 -0
package/src/components/card.tsx
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "../lib/utils";
|
|
4
|
-
|
|
5
|
-
function Card({ className, ...props }: React.ComponentProps<"div">) {
|
|
6
|
-
return (
|
|
7
|
-
<div
|
|
8
|
-
data-slot="card"
|
|
9
|
-
className={cn(
|
|
10
|
-
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
|
|
11
|
-
className,
|
|
12
|
-
)}
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
19
|
-
return (
|
|
20
|
-
<div
|
|
21
|
-
data-slot="card-header"
|
|
22
|
-
className={cn(
|
|
23
|
-
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
24
|
-
className,
|
|
25
|
-
)}
|
|
26
|
-
{...props}
|
|
27
|
-
/>
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
32
|
-
return (
|
|
33
|
-
<div
|
|
34
|
-
data-slot="card-title"
|
|
35
|
-
className={cn("leading-none font-semibold", className)}
|
|
36
|
-
{...props}
|
|
37
|
-
/>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
|
|
42
|
-
return (
|
|
43
|
-
<div
|
|
44
|
-
data-slot="card-description"
|
|
45
|
-
className={cn("text-muted-foreground text-sm", className)}
|
|
46
|
-
{...props}
|
|
47
|
-
/>
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
|
|
52
|
-
return (
|
|
53
|
-
<div
|
|
54
|
-
data-slot="card-action"
|
|
55
|
-
className={cn(
|
|
56
|
-
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
57
|
-
className,
|
|
58
|
-
)}
|
|
59
|
-
{...props}
|
|
60
|
-
/>
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
65
|
-
return (
|
|
66
|
-
<div
|
|
67
|
-
data-slot="card-content"
|
|
68
|
-
className={cn("px-6", className)}
|
|
69
|
-
{...props}
|
|
70
|
-
/>
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
75
|
-
return (
|
|
76
|
-
<div
|
|
77
|
-
data-slot="card-footer"
|
|
78
|
-
className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
|
|
79
|
-
{...props}
|
|
80
|
-
/>
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export {
|
|
85
|
-
Card,
|
|
86
|
-
CardHeader,
|
|
87
|
-
CardFooter,
|
|
88
|
-
CardTitle,
|
|
89
|
-
CardAction,
|
|
90
|
-
CardDescription,
|
|
91
|
-
CardContent,
|
|
92
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { CheckIcon } from "lucide-react";
|
|
4
|
-
import { Checkbox as CheckboxPrimitive } from "radix-ui";
|
|
5
|
-
import * as React from "react";
|
|
6
|
-
|
|
7
|
-
import { cn } from "../lib/utils";
|
|
8
|
-
|
|
9
|
-
function Checkbox({
|
|
10
|
-
className,
|
|
11
|
-
...props
|
|
12
|
-
}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
|
|
13
|
-
return (
|
|
14
|
-
<CheckboxPrimitive.Root
|
|
15
|
-
data-slot="checkbox"
|
|
16
|
-
className={cn(
|
|
17
|
-
"peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
18
|
-
className,
|
|
19
|
-
)}
|
|
20
|
-
{...props}
|
|
21
|
-
>
|
|
22
|
-
<CheckboxPrimitive.Indicator
|
|
23
|
-
data-slot="checkbox-indicator"
|
|
24
|
-
className="grid place-content-center text-current transition-none"
|
|
25
|
-
>
|
|
26
|
-
<CheckIcon className="size-3.5" />
|
|
27
|
-
</CheckboxPrimitive.Indicator>
|
|
28
|
-
</CheckboxPrimitive.Root>
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export { Checkbox };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { Collapsible as CollapsiblePrimitive } from "radix-ui";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
|
|
6
|
-
function Collapsible({
|
|
7
|
-
...props
|
|
8
|
-
}: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {
|
|
9
|
-
return <CollapsiblePrimitive.Root data-slot="collapsible" {...props} />;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function CollapsibleTrigger({
|
|
13
|
-
...props
|
|
14
|
-
}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {
|
|
15
|
-
return (
|
|
16
|
-
<CollapsiblePrimitive.CollapsibleTrigger
|
|
17
|
-
data-slot="collapsible-trigger"
|
|
18
|
-
{...props}
|
|
19
|
-
/>
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function CollapsibleContent({
|
|
24
|
-
...props
|
|
25
|
-
}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {
|
|
26
|
-
return (
|
|
27
|
-
<CollapsiblePrimitive.CollapsibleContent
|
|
28
|
-
data-slot="collapsible-content"
|
|
29
|
-
{...props}
|
|
30
|
-
/>
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { Command as CommandPrimitive } from "cmdk";
|
|
4
|
-
import { SearchIcon } from "lucide-react";
|
|
5
|
-
import * as React from "react";
|
|
6
|
-
|
|
7
|
-
import { cn } from "../lib/utils";
|
|
8
|
-
import {
|
|
9
|
-
Dialog,
|
|
10
|
-
DialogContent,
|
|
11
|
-
DialogDescription,
|
|
12
|
-
DialogHeader,
|
|
13
|
-
DialogTitle,
|
|
14
|
-
} from "./dialog";
|
|
15
|
-
|
|
16
|
-
function Command({
|
|
17
|
-
className,
|
|
18
|
-
...props
|
|
19
|
-
}: React.ComponentProps<typeof CommandPrimitive>) {
|
|
20
|
-
return (
|
|
21
|
-
<CommandPrimitive
|
|
22
|
-
data-slot="command"
|
|
23
|
-
className={cn(
|
|
24
|
-
"bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
|
|
25
|
-
className,
|
|
26
|
-
)}
|
|
27
|
-
{...props}
|
|
28
|
-
/>
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function CommandDialog({
|
|
33
|
-
title = "Command Palette",
|
|
34
|
-
description = "Search for a command to run...",
|
|
35
|
-
children,
|
|
36
|
-
className,
|
|
37
|
-
showCloseButton = true,
|
|
38
|
-
...props
|
|
39
|
-
}: React.ComponentProps<typeof Dialog> & {
|
|
40
|
-
title?: string;
|
|
41
|
-
description?: string;
|
|
42
|
-
className?: string;
|
|
43
|
-
showCloseButton?: boolean;
|
|
44
|
-
}) {
|
|
45
|
-
return (
|
|
46
|
-
<Dialog {...props}>
|
|
47
|
-
<DialogHeader className="sr-only">
|
|
48
|
-
<DialogTitle>{title}</DialogTitle>
|
|
49
|
-
<DialogDescription>{description}</DialogDescription>
|
|
50
|
-
</DialogHeader>
|
|
51
|
-
<DialogContent
|
|
52
|
-
className={cn("overflow-hidden p-0", className)}
|
|
53
|
-
showCloseButton={showCloseButton}
|
|
54
|
-
>
|
|
55
|
-
<Command className="[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
|
|
56
|
-
{children}
|
|
57
|
-
</Command>
|
|
58
|
-
</DialogContent>
|
|
59
|
-
</Dialog>
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function CommandInput({
|
|
64
|
-
className,
|
|
65
|
-
...props
|
|
66
|
-
}: React.ComponentProps<typeof CommandPrimitive.Input>) {
|
|
67
|
-
return (
|
|
68
|
-
<div
|
|
69
|
-
data-slot="command-input-wrapper"
|
|
70
|
-
className="flex h-9 items-center gap-2 border-b px-3"
|
|
71
|
-
>
|
|
72
|
-
<SearchIcon className="size-4 shrink-0 opacity-50" />
|
|
73
|
-
<CommandPrimitive.Input
|
|
74
|
-
data-slot="command-input"
|
|
75
|
-
className={cn(
|
|
76
|
-
"placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
77
|
-
className,
|
|
78
|
-
)}
|
|
79
|
-
{...props}
|
|
80
|
-
/>
|
|
81
|
-
</div>
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function CommandList({
|
|
86
|
-
className,
|
|
87
|
-
...props
|
|
88
|
-
}: React.ComponentProps<typeof CommandPrimitive.List>) {
|
|
89
|
-
return (
|
|
90
|
-
<CommandPrimitive.List
|
|
91
|
-
data-slot="command-list"
|
|
92
|
-
className={cn(
|
|
93
|
-
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
94
|
-
className,
|
|
95
|
-
)}
|
|
96
|
-
{...props}
|
|
97
|
-
/>
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function CommandEmpty({
|
|
102
|
-
...props
|
|
103
|
-
}: React.ComponentProps<typeof CommandPrimitive.Empty>) {
|
|
104
|
-
return (
|
|
105
|
-
<CommandPrimitive.Empty
|
|
106
|
-
data-slot="command-empty"
|
|
107
|
-
className="py-6 text-center text-sm"
|
|
108
|
-
{...props}
|
|
109
|
-
/>
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function CommandGroup({
|
|
114
|
-
className,
|
|
115
|
-
...props
|
|
116
|
-
}: React.ComponentProps<typeof CommandPrimitive.Group>) {
|
|
117
|
-
return (
|
|
118
|
-
<CommandPrimitive.Group
|
|
119
|
-
data-slot="command-group"
|
|
120
|
-
className={cn(
|
|
121
|
-
"text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
|
|
122
|
-
className,
|
|
123
|
-
)}
|
|
124
|
-
{...props}
|
|
125
|
-
/>
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
function CommandSeparator({
|
|
130
|
-
className,
|
|
131
|
-
...props
|
|
132
|
-
}: React.ComponentProps<typeof CommandPrimitive.Separator>) {
|
|
133
|
-
return (
|
|
134
|
-
<CommandPrimitive.Separator
|
|
135
|
-
data-slot="command-separator"
|
|
136
|
-
className={cn("bg-border -mx-1 h-px", className)}
|
|
137
|
-
{...props}
|
|
138
|
-
/>
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
function CommandItem({
|
|
143
|
-
className,
|
|
144
|
-
...props
|
|
145
|
-
}: React.ComponentProps<typeof CommandPrimitive.Item>) {
|
|
146
|
-
return (
|
|
147
|
-
<CommandPrimitive.Item
|
|
148
|
-
data-slot="command-item"
|
|
149
|
-
className={cn(
|
|
150
|
-
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
151
|
-
className,
|
|
152
|
-
)}
|
|
153
|
-
{...props}
|
|
154
|
-
/>
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function CommandShortcut({
|
|
159
|
-
className,
|
|
160
|
-
...props
|
|
161
|
-
}: React.ComponentProps<"span">) {
|
|
162
|
-
return (
|
|
163
|
-
<span
|
|
164
|
-
data-slot="command-shortcut"
|
|
165
|
-
className={cn(
|
|
166
|
-
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
167
|
-
className,
|
|
168
|
-
)}
|
|
169
|
-
{...props}
|
|
170
|
-
/>
|
|
171
|
-
);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export {
|
|
175
|
-
Command,
|
|
176
|
-
CommandDialog,
|
|
177
|
-
CommandInput,
|
|
178
|
-
CommandList,
|
|
179
|
-
CommandEmpty,
|
|
180
|
-
CommandGroup,
|
|
181
|
-
CommandItem,
|
|
182
|
-
CommandShortcut,
|
|
183
|
-
CommandSeparator,
|
|
184
|
-
};
|
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
4
|
-
import { ContextMenu as ContextMenuPrimitive } from "radix-ui";
|
|
5
|
-
import * as React from "react";
|
|
6
|
-
|
|
7
|
-
import { cn } from "../lib/utils";
|
|
8
|
-
|
|
9
|
-
function ContextMenu({
|
|
10
|
-
...props
|
|
11
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {
|
|
12
|
-
return <ContextMenuPrimitive.Root data-slot="context-menu" {...props} />;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function ContextMenuTrigger({
|
|
16
|
-
...props
|
|
17
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {
|
|
18
|
-
return (
|
|
19
|
-
<ContextMenuPrimitive.Trigger data-slot="context-menu-trigger" {...props} />
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function ContextMenuGroup({
|
|
24
|
-
...props
|
|
25
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.Group>) {
|
|
26
|
-
return (
|
|
27
|
-
<ContextMenuPrimitive.Group data-slot="context-menu-group" {...props} />
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function ContextMenuPortal({
|
|
32
|
-
...props
|
|
33
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.Portal>) {
|
|
34
|
-
return (
|
|
35
|
-
<ContextMenuPrimitive.Portal data-slot="context-menu-portal" {...props} />
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function ContextMenuSub({
|
|
40
|
-
...props
|
|
41
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.Sub>) {
|
|
42
|
-
return <ContextMenuPrimitive.Sub data-slot="context-menu-sub" {...props} />;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function ContextMenuRadioGroup({
|
|
46
|
-
...props
|
|
47
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>) {
|
|
48
|
-
return (
|
|
49
|
-
<ContextMenuPrimitive.RadioGroup
|
|
50
|
-
data-slot="context-menu-radio-group"
|
|
51
|
-
{...props}
|
|
52
|
-
/>
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function ContextMenuSubTrigger({
|
|
57
|
-
className,
|
|
58
|
-
inset,
|
|
59
|
-
children,
|
|
60
|
-
...props
|
|
61
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
|
|
62
|
-
inset?: boolean;
|
|
63
|
-
}) {
|
|
64
|
-
return (
|
|
65
|
-
<ContextMenuPrimitive.SubTrigger
|
|
66
|
-
data-slot="context-menu-sub-trigger"
|
|
67
|
-
data-inset={inset}
|
|
68
|
-
className={cn(
|
|
69
|
-
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
70
|
-
className,
|
|
71
|
-
)}
|
|
72
|
-
{...props}
|
|
73
|
-
>
|
|
74
|
-
{children}
|
|
75
|
-
<ChevronRightIcon className="ml-auto" />
|
|
76
|
-
</ContextMenuPrimitive.SubTrigger>
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
function ContextMenuSubContent({
|
|
81
|
-
className,
|
|
82
|
-
...props
|
|
83
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {
|
|
84
|
-
return (
|
|
85
|
-
<ContextMenuPrimitive.SubContent
|
|
86
|
-
data-slot="context-menu-sub-content"
|
|
87
|
-
className={cn(
|
|
88
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
89
|
-
className,
|
|
90
|
-
)}
|
|
91
|
-
{...props}
|
|
92
|
-
/>
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function ContextMenuContent({
|
|
97
|
-
className,
|
|
98
|
-
...props
|
|
99
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.Content>) {
|
|
100
|
-
return (
|
|
101
|
-
<ContextMenuPrimitive.Portal>
|
|
102
|
-
<ContextMenuPrimitive.Content
|
|
103
|
-
data-slot="context-menu-content"
|
|
104
|
-
className={cn(
|
|
105
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
106
|
-
className,
|
|
107
|
-
)}
|
|
108
|
-
{...props}
|
|
109
|
-
/>
|
|
110
|
-
</ContextMenuPrimitive.Portal>
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
function ContextMenuItem({
|
|
115
|
-
className,
|
|
116
|
-
inset,
|
|
117
|
-
variant = "default",
|
|
118
|
-
...props
|
|
119
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {
|
|
120
|
-
inset?: boolean;
|
|
121
|
-
variant?: "default" | "destructive";
|
|
122
|
-
}) {
|
|
123
|
-
return (
|
|
124
|
-
<ContextMenuPrimitive.Item
|
|
125
|
-
data-slot="context-menu-item"
|
|
126
|
-
data-inset={inset}
|
|
127
|
-
data-variant={variant}
|
|
128
|
-
className={cn(
|
|
129
|
-
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
130
|
-
className,
|
|
131
|
-
)}
|
|
132
|
-
{...props}
|
|
133
|
-
/>
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
function ContextMenuCheckboxItem({
|
|
138
|
-
className,
|
|
139
|
-
children,
|
|
140
|
-
checked,
|
|
141
|
-
...props
|
|
142
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>) {
|
|
143
|
-
return (
|
|
144
|
-
<ContextMenuPrimitive.CheckboxItem
|
|
145
|
-
data-slot="context-menu-checkbox-item"
|
|
146
|
-
className={cn(
|
|
147
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
148
|
-
className,
|
|
149
|
-
)}
|
|
150
|
-
checked={checked}
|
|
151
|
-
{...props}
|
|
152
|
-
>
|
|
153
|
-
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
154
|
-
<ContextMenuPrimitive.ItemIndicator>
|
|
155
|
-
<CheckIcon className="size-4" />
|
|
156
|
-
</ContextMenuPrimitive.ItemIndicator>
|
|
157
|
-
</span>
|
|
158
|
-
{children}
|
|
159
|
-
</ContextMenuPrimitive.CheckboxItem>
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
function ContextMenuRadioItem({
|
|
164
|
-
className,
|
|
165
|
-
children,
|
|
166
|
-
...props
|
|
167
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem>) {
|
|
168
|
-
return (
|
|
169
|
-
<ContextMenuPrimitive.RadioItem
|
|
170
|
-
data-slot="context-menu-radio-item"
|
|
171
|
-
className={cn(
|
|
172
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
173
|
-
className,
|
|
174
|
-
)}
|
|
175
|
-
{...props}
|
|
176
|
-
>
|
|
177
|
-
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
178
|
-
<ContextMenuPrimitive.ItemIndicator>
|
|
179
|
-
<CircleIcon className="size-2 fill-current" />
|
|
180
|
-
</ContextMenuPrimitive.ItemIndicator>
|
|
181
|
-
</span>
|
|
182
|
-
{children}
|
|
183
|
-
</ContextMenuPrimitive.RadioItem>
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
function ContextMenuLabel({
|
|
188
|
-
className,
|
|
189
|
-
inset,
|
|
190
|
-
...props
|
|
191
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {
|
|
192
|
-
inset?: boolean;
|
|
193
|
-
}) {
|
|
194
|
-
return (
|
|
195
|
-
<ContextMenuPrimitive.Label
|
|
196
|
-
data-slot="context-menu-label"
|
|
197
|
-
data-inset={inset}
|
|
198
|
-
className={cn(
|
|
199
|
-
"text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
200
|
-
className,
|
|
201
|
-
)}
|
|
202
|
-
{...props}
|
|
203
|
-
/>
|
|
204
|
-
);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function ContextMenuSeparator({
|
|
208
|
-
className,
|
|
209
|
-
...props
|
|
210
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.Separator>) {
|
|
211
|
-
return (
|
|
212
|
-
<ContextMenuPrimitive.Separator
|
|
213
|
-
data-slot="context-menu-separator"
|
|
214
|
-
className={cn("bg-border -mx-1 my-1 h-px", className)}
|
|
215
|
-
{...props}
|
|
216
|
-
/>
|
|
217
|
-
);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
function ContextMenuShortcut({
|
|
221
|
-
className,
|
|
222
|
-
...props
|
|
223
|
-
}: React.ComponentProps<"span">) {
|
|
224
|
-
return (
|
|
225
|
-
<span
|
|
226
|
-
data-slot="context-menu-shortcut"
|
|
227
|
-
className={cn(
|
|
228
|
-
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
229
|
-
className,
|
|
230
|
-
)}
|
|
231
|
-
{...props}
|
|
232
|
-
/>
|
|
233
|
-
);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
export {
|
|
237
|
-
ContextMenu,
|
|
238
|
-
ContextMenuTrigger,
|
|
239
|
-
ContextMenuContent,
|
|
240
|
-
ContextMenuItem,
|
|
241
|
-
ContextMenuCheckboxItem,
|
|
242
|
-
ContextMenuRadioItem,
|
|
243
|
-
ContextMenuLabel,
|
|
244
|
-
ContextMenuSeparator,
|
|
245
|
-
ContextMenuShortcut,
|
|
246
|
-
ContextMenuGroup,
|
|
247
|
-
ContextMenuPortal,
|
|
248
|
-
ContextMenuSub,
|
|
249
|
-
ContextMenuSubContent,
|
|
250
|
-
ContextMenuSubTrigger,
|
|
251
|
-
ContextMenuRadioGroup,
|
|
252
|
-
};
|