@arolariu/components 0.2.0 → 0.3.0
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/changelog.md +11 -0
- package/dist/components/ui/accordion.d.ts +4 -4
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion.js +19 -27
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts +17 -11
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +38 -61
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.d.ts +4 -5
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +17 -20
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/aspect-ratio.d.ts +1 -2
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/components/ui/aspect-ratio.js +1 -8
- package/dist/components/ui/aspect-ratio.js.map +1 -1
- package/dist/components/ui/avatar.d.ts +3 -3
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +16 -19
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/badge.d.ts +3 -3
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +7 -10
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +16 -8
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +28 -35
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/button-group.d.ts +13 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button-group.js +47 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button.d.ts +3 -2
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +15 -14
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js +20 -20
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/card.d.ts +7 -8
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/card.js +31 -44
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/carousel.d.ts +5 -6
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel.js +30 -21
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/chart.d.ts +35 -27
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +28 -26
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/checkbox.d.ts +1 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +10 -12
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/collapsible.d.ts +3 -4
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +3 -20
- package/dist/components/ui/collapsible.js.map +1 -1
- package/dist/components/ui/command.d.ts +78 -16
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +47 -72
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +21 -19
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +57 -101
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/dialog.d.ts +16 -12
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +36 -64
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/drawer.d.ts +19 -10
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer.js +32 -57
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +21 -19
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +64 -108
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdrawer.d.ts +1 -1
- package/dist/components/ui/dropdrawer.d.ts.map +1 -1
- package/dist/components/ui/dropdrawer.js +2 -5
- package/dist/components/ui/dropdrawer.js.map +1 -1
- package/dist/components/ui/empty.d.ts +13 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/empty.js +65 -0
- package/dist/components/ui/empty.js.map +1 -0
- package/dist/components/ui/field.d.ts +25 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/field.js +135 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/form.d.ts +5 -6
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/form.js +28 -27
- package/dist/components/ui/form.js.map +1 -1
- package/dist/components/ui/hover-card.d.ts +3 -3
- package/dist/components/ui/hover-card.d.ts.map +1 -1
- package/dist/components/ui/hover-card.js +11 -25
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/input-group.d.ts +17 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.js +91 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +30 -7
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js +23 -26
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input.d.ts +1 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +6 -7
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/item.d.ts +24 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/item.js +122 -0
- package/dist/components/ui/item.js.map +1 -0
- package/dist/components/ui/kbd.d.ts +5 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd.js +21 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/label.d.ts +2 -1
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.js +8 -7
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/menubar.d.ts +18 -16
- package/dist/components/ui/menubar.d.ts.map +1 -1
- package/dist/components/ui/menubar.js +73 -93
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts +8 -10
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.js +37 -55
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination.d.ts +24 -9
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js +33 -45
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/popover.d.ts +4 -4
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +9 -25
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/progress.d.ts +1 -1
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js +5 -7
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/radio-group.d.ts +2 -2
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js +16 -19
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/resizable.d.ts +20 -5
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +9 -21
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/scroll-area.d.ts +2 -2
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +12 -16
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/select.d.ts +10 -12
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +54 -77
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/separator.d.ts +1 -1
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/separator.js +6 -7
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.d.ts +23 -11
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +54 -66
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts +34 -38
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +113 -122
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/skeleton.d.ts +1 -1
- package/dist/components/ui/skeleton.d.ts.map +1 -1
- package/dist/components/ui/skeleton.js +1 -2
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/slider.d.ts +1 -1
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js +11 -30
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/sonner.d.ts +4 -2
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/sonner.js +7 -4
- package/dist/components/ui/sonner.js.map +1 -1
- package/dist/components/ui/spinner.d.ts +4 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +16 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +2 -2
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/switch.js +7 -9
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/table.d.ts +8 -8
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +36 -45
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tabs.d.ts +4 -4
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs.js +17 -26
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/textarea.d.ts +1 -1
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea.js +6 -7
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/toggle-group.d.ts +8 -3
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.js +11 -15
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle.d.ts +4 -1
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +7 -8
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/tooltip.d.ts +4 -4
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +13 -38
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/ui/typewriter.d.ts.map +1 -1
- package/dist/components/ui/typewriter.js +2 -6
- package/dist/components/ui/typewriter.js.map +1 -1
- package/dist/index.css +839 -1126
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +9 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -3
- package/package.json +37 -2
- package/src/components/ui/accordion.tsx +43 -44
- package/src/components/ui/alert-dialog.tsx +88 -99
- package/src/components/ui/alert.tsx +23 -25
- package/src/components/ui/aspect-ratio.tsx +1 -9
- package/src/components/ui/avatar.tsx +29 -24
- package/src/components/ui/badge.tsx +8 -16
- package/src/components/ui/breadcrumb.tsx +70 -73
- package/src/components/ui/button-group.tsx +69 -0
- package/src/components/ui/button.tsx +18 -24
- package/src/components/ui/calendar.tsx +20 -22
- package/src/components/ui/card.tsx +52 -71
- package/src/components/ui/carousel.tsx +145 -133
- package/src/components/ui/chart.tsx +173 -183
- package/src/components/ui/checkbox.tsx +18 -18
- package/src/components/ui/collapsible.tsx +3 -25
- package/src/components/ui/command.tsx +100 -99
- package/src/components/ui/context-menu.tsx +150 -193
- package/src/components/ui/dialog.tsx +75 -110
- package/src/components/ui/drawer.tsx +74 -102
- package/src/components/ui/dropdown-menu.tsx +153 -200
- package/src/components/ui/dropdrawer.tsx +0 -5
- package/src/components/ui/empty.tsx +86 -0
- package/src/components/ui/field.tsx +198 -0
- package/src/components/ui/form.tsx +47 -48
- package/src/components/ui/hover-card.tsx +18 -37
- package/src/components/ui/input-group.tsx +145 -0
- package/src/components/ui/input-otp.tsx +49 -59
- package/src/components/ui/input.tsx +5 -6
- package/src/components/ui/item.tsx +163 -0
- package/src/components/ui/kbd.tsx +31 -0
- package/src/components/ui/label.tsx +14 -12
- package/src/components/ui/menubar.tsx +178 -201
- package/src/components/ui/navigation-menu.tsx +85 -100
- package/src/components/ui/pagination.tsx +74 -85
- package/src/components/ui/popover.tsx +19 -38
- package/src/components/ui/progress.tsx +15 -14
- package/src/components/ui/radio-group.tsx +19 -13
- package/src/components/ui/resizable.tsx +23 -37
- package/src/components/ui/scroll-area.tsx +32 -35
- package/src/components/ui/select.tsx +112 -127
- package/src/components/ui/separator.tsx +17 -19
- package/src/components/ui/sheet.tsx +87 -108
- package/src/components/ui/sidebar.tsx +262 -271
- package/src/components/ui/skeleton.tsx +2 -3
- package/src/components/ui/slider.tsx +10 -36
- package/src/components/ui/sonner.tsx +15 -9
- package/src/components/ui/spinner.tsx +18 -0
- package/src/components/ui/switch.tsx +18 -17
- package/src/components/ui/table.tsx +66 -71
- package/src/components/ui/tabs.tsx +36 -36
- package/src/components/ui/textarea.tsx +5 -4
- package/src/components/ui/toggle-group.tsx +21 -34
- package/src/components/ui/toggle.tsx +14 -16
- package/src/components/ui/tooltip.tsx +19 -43
- package/src/components/ui/typewriter.tsx +3 -4
- package/src/index.css +6 -6
- package/src/index.ts +43 -4
|
@@ -1,137 +1,138 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
import type {DialogProps} from "@radix-ui/react-dialog";
|
|
3
4
|
import {Command as CommandPrimitive} from "cmdk";
|
|
4
|
-
import {
|
|
5
|
+
import {Search} from "lucide-react";
|
|
5
6
|
import * as React from "react";
|
|
6
7
|
|
|
7
|
-
import {Dialog, DialogContent
|
|
8
|
+
import {Dialog, DialogContent} from "@/components/ui/dialog";
|
|
8
9
|
import {cn} from "@/lib/utilities";
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
const Command = React.forwardRef<React.ElementRef<typeof CommandPrimitive>, React.ComponentPropsWithoutRef<typeof CommandPrimitive>>(
|
|
12
|
+
({className, ...props}, ref) => (
|
|
12
13
|
<CommandPrimitive
|
|
13
|
-
|
|
14
|
+
ref={ref}
|
|
14
15
|
className={cn(
|
|
15
16
|
"flex h-full w-full flex-col overflow-hidden rounded-md bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50",
|
|
16
17
|
className,
|
|
17
18
|
)}
|
|
18
19
|
{...props}
|
|
19
20
|
/>
|
|
20
|
-
)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
description = "Search for a command to run...",
|
|
26
|
-
children,
|
|
27
|
-
className,
|
|
28
|
-
showCloseButton = true,
|
|
29
|
-
...props
|
|
30
|
-
}: React.ComponentProps<typeof Dialog> & {
|
|
31
|
-
title?: string;
|
|
32
|
-
description?: string;
|
|
33
|
-
className?: string;
|
|
34
|
-
showCloseButton?: boolean;
|
|
35
|
-
}) {
|
|
21
|
+
),
|
|
22
|
+
);
|
|
23
|
+
Command.displayName = CommandPrimitive.displayName;
|
|
24
|
+
|
|
25
|
+
const CommandDialog = ({children, ...props}: DialogProps) => {
|
|
36
26
|
return (
|
|
37
27
|
<Dialog {...props}>
|
|
38
|
-
<
|
|
39
|
-
<
|
|
40
|
-
<DialogDescription>{description}</DialogDescription>
|
|
41
|
-
</DialogHeader>
|
|
42
|
-
<DialogContent
|
|
43
|
-
className={cn("overflow-hidden p-0", className)}
|
|
44
|
-
showCloseButton={showCloseButton}>
|
|
45
|
-
<Command className='**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:[&_[cmdk-group-heading]]:text-neutral-400 [&_[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'>
|
|
28
|
+
<DialogContent className='overflow-hidden p-0'>
|
|
29
|
+
<Command className='[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:[&_[cmdk-group-heading]]:text-neutral-400 [&_[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'>
|
|
46
30
|
{children}
|
|
47
31
|
</Command>
|
|
48
32
|
</DialogContent>
|
|
49
33
|
</Dialog>
|
|
50
34
|
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function CommandInput({className, ...props}: React.ComponentProps<typeof CommandPrimitive.Input>) {
|
|
54
|
-
return (
|
|
55
|
-
<div
|
|
56
|
-
data-slot='command-input-wrapper'
|
|
57
|
-
className='flex h-9 items-center gap-2 border-b px-3'>
|
|
58
|
-
<SearchIcon className='size-4 shrink-0 opacity-50' />
|
|
59
|
-
<CommandPrimitive.Input
|
|
60
|
-
data-slot='command-input'
|
|
61
|
-
className={cn(
|
|
62
|
-
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-neutral-400",
|
|
63
|
-
className,
|
|
64
|
-
)}
|
|
65
|
-
{...props}
|
|
66
|
-
/>
|
|
67
|
-
</div>
|
|
68
|
-
);
|
|
69
|
-
}
|
|
35
|
+
};
|
|
70
36
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
function CommandEmpty({...props}: React.ComponentProps<typeof CommandPrimitive.Empty>) {
|
|
82
|
-
return (
|
|
83
|
-
<CommandPrimitive.Empty
|
|
84
|
-
data-slot='command-empty'
|
|
85
|
-
className='py-6 text-center text-sm'
|
|
86
|
-
{...props}
|
|
87
|
-
/>
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function CommandGroup({className, ...props}: React.ComponentProps<typeof CommandPrimitive.Group>) {
|
|
92
|
-
return (
|
|
93
|
-
<CommandPrimitive.Group
|
|
94
|
-
data-slot='command-group'
|
|
37
|
+
const CommandInput = React.forwardRef<
|
|
38
|
+
React.ElementRef<typeof CommandPrimitive.Input>,
|
|
39
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
|
|
40
|
+
>(({className, ...props}, ref) => (
|
|
41
|
+
<div
|
|
42
|
+
className='flex items-center border-b px-3'
|
|
43
|
+
cmdk-input-wrapper=''>
|
|
44
|
+
<Search className='mr-2 h-4 w-4 shrink-0 opacity-50' />
|
|
45
|
+
<CommandPrimitive.Input
|
|
46
|
+
ref={ref}
|
|
95
47
|
className={cn(
|
|
96
|
-
"
|
|
48
|
+
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-neutral-400",
|
|
97
49
|
className,
|
|
98
50
|
)}
|
|
99
51
|
{...props}
|
|
100
52
|
/>
|
|
101
|
-
|
|
102
|
-
|
|
53
|
+
</div>
|
|
54
|
+
));
|
|
103
55
|
|
|
104
|
-
|
|
105
|
-
return (
|
|
106
|
-
<CommandPrimitive.Separator
|
|
107
|
-
data-slot='command-separator'
|
|
108
|
-
className={cn("-mx-1 h-px bg-neutral-200 dark:bg-neutral-800", className)}
|
|
109
|
-
{...props}
|
|
110
|
-
/>
|
|
111
|
-
);
|
|
112
|
-
}
|
|
56
|
+
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
113
57
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
58
|
+
const CommandList = React.forwardRef<
|
|
59
|
+
React.ElementRef<typeof CommandPrimitive.List>,
|
|
60
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>
|
|
61
|
+
>(({className, ...props}, ref) => (
|
|
62
|
+
<CommandPrimitive.List
|
|
63
|
+
ref={ref}
|
|
64
|
+
className={cn("max-h-[300px] overflow-x-hidden overflow-y-auto", className)}
|
|
65
|
+
{...props}
|
|
66
|
+
/>
|
|
67
|
+
));
|
|
68
|
+
|
|
69
|
+
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
70
|
+
|
|
71
|
+
const CommandEmpty = React.forwardRef<
|
|
72
|
+
React.ElementRef<typeof CommandPrimitive.Empty>,
|
|
73
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>
|
|
74
|
+
>((props, ref) => (
|
|
75
|
+
<CommandPrimitive.Empty
|
|
76
|
+
ref={ref}
|
|
77
|
+
className='py-6 text-center text-sm'
|
|
78
|
+
{...props}
|
|
79
|
+
/>
|
|
80
|
+
));
|
|
81
|
+
|
|
82
|
+
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
83
|
+
|
|
84
|
+
const CommandGroup = React.forwardRef<
|
|
85
|
+
React.ElementRef<typeof CommandPrimitive.Group>,
|
|
86
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>
|
|
87
|
+
>(({className, ...props}, ref) => (
|
|
88
|
+
<CommandPrimitive.Group
|
|
89
|
+
ref={ref}
|
|
90
|
+
className={cn(
|
|
91
|
+
"overflow-hidden p-1 text-neutral-950 dark:text-neutral-50 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:[&_[cmdk-group-heading]]:text-neutral-400",
|
|
92
|
+
className,
|
|
93
|
+
)}
|
|
94
|
+
{...props}
|
|
95
|
+
/>
|
|
96
|
+
));
|
|
97
|
+
|
|
98
|
+
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
99
|
+
|
|
100
|
+
const CommandSeparator = React.forwardRef<
|
|
101
|
+
React.ElementRef<typeof CommandPrimitive.Separator>,
|
|
102
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>
|
|
103
|
+
>(({className, ...props}, ref) => (
|
|
104
|
+
<CommandPrimitive.Separator
|
|
105
|
+
ref={ref}
|
|
106
|
+
className={cn("-mx-1 h-px bg-neutral-200 dark:bg-neutral-800", className)}
|
|
107
|
+
{...props}
|
|
108
|
+
/>
|
|
109
|
+
));
|
|
110
|
+
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
111
|
+
|
|
112
|
+
const CommandItem = React.forwardRef<
|
|
113
|
+
React.ElementRef<typeof CommandPrimitive.Item>,
|
|
114
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>
|
|
115
|
+
>(({className, ...props}, ref) => (
|
|
116
|
+
<CommandPrimitive.Item
|
|
117
|
+
ref={ref}
|
|
118
|
+
className={cn(
|
|
119
|
+
"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-neutral-100 data-[selected=true]:text-neutral-900 dark:data-[selected=true]:bg-neutral-800 dark:data-[selected=true]:text-neutral-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
120
|
+
className,
|
|
121
|
+
)}
|
|
122
|
+
{...props}
|
|
123
|
+
/>
|
|
124
|
+
));
|
|
125
|
+
|
|
126
|
+
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
|
126
127
|
|
|
127
|
-
|
|
128
|
+
const CommandShortcut = ({className, ...props}: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
128
129
|
return (
|
|
129
130
|
<span
|
|
130
|
-
data-slot='command-shortcut'
|
|
131
131
|
className={cn("ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400", className)}
|
|
132
132
|
{...props}
|
|
133
133
|
/>
|
|
134
134
|
);
|
|
135
|
-
}
|
|
135
|
+
};
|
|
136
|
+
CommandShortcut.displayName = "CommandShortcut";
|
|
136
137
|
|
|
137
138
|
export {Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut};
|
|
@@ -1,214 +1,171 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
4
|
-
import {
|
|
4
|
+
import {Check, ChevronRight, Circle} from "lucide-react";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
|
|
7
7
|
import {cn} from "@/lib/utilities";
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
data-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
data-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
function ContextMenuSubTrigger({
|
|
64
|
-
className,
|
|
65
|
-
inset,
|
|
66
|
-
children,
|
|
67
|
-
...props
|
|
68
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
|
|
69
|
-
inset?: boolean;
|
|
70
|
-
}) {
|
|
71
|
-
return (
|
|
72
|
-
<ContextMenuPrimitive.SubTrigger
|
|
73
|
-
data-slot='context-menu-sub-trigger'
|
|
74
|
-
data-inset={inset}
|
|
75
|
-
className={cn(
|
|
76
|
-
"flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-neutral-100 focus:text-neutral-900 data-[inset]:pl-8 data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-900 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
77
|
-
className,
|
|
78
|
-
)}
|
|
79
|
-
{...props}>
|
|
80
|
-
{children}
|
|
81
|
-
<ChevronRightIcon className='ml-auto' />
|
|
82
|
-
</ContextMenuPrimitive.SubTrigger>
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function ContextMenuSubContent({className, ...props}: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {
|
|
87
|
-
return (
|
|
88
|
-
<ContextMenuPrimitive.SubContent
|
|
89
|
-
data-slot='context-menu-sub-content'
|
|
90
|
-
className={cn(
|
|
91
|
-
"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 border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
|
|
92
|
-
className,
|
|
93
|
-
)}
|
|
94
|
-
{...props}
|
|
95
|
-
/>
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
function ContextMenuContent({className, ...props}: React.ComponentProps<typeof ContextMenuPrimitive.Content>) {
|
|
100
|
-
return (
|
|
101
|
-
<ContextMenuPrimitive.Portal>
|
|
102
|
-
<ContextMenuPrimitive.Content
|
|
103
|
-
data-slot='context-menu-content'
|
|
104
|
-
className={cn(
|
|
105
|
-
"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 border-neutral-200 bg-white p-1 text-neutral-950 shadow-md dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
|
|
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}
|
|
9
|
+
const ContextMenu = ContextMenuPrimitive.Root;
|
|
10
|
+
|
|
11
|
+
const ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
12
|
+
|
|
13
|
+
const ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
14
|
+
|
|
15
|
+
const ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
16
|
+
|
|
17
|
+
const ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
18
|
+
|
|
19
|
+
const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
20
|
+
|
|
21
|
+
const ContextMenuSubTrigger = React.forwardRef<
|
|
22
|
+
React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,
|
|
23
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {
|
|
24
|
+
inset?: boolean;
|
|
25
|
+
}
|
|
26
|
+
>(({className, inset, children, ...props}, ref) => (
|
|
27
|
+
<ContextMenuPrimitive.SubTrigger
|
|
28
|
+
ref={ref}
|
|
29
|
+
className={cn(
|
|
30
|
+
"flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-900 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-50",
|
|
31
|
+
inset && "pl-8",
|
|
32
|
+
className,
|
|
33
|
+
)}
|
|
34
|
+
{...props}>
|
|
35
|
+
{children}
|
|
36
|
+
<ChevronRight className='ml-auto h-4 w-4' />
|
|
37
|
+
</ContextMenuPrimitive.SubTrigger>
|
|
38
|
+
));
|
|
39
|
+
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
40
|
+
|
|
41
|
+
const ContextMenuSubContent = React.forwardRef<
|
|
42
|
+
React.ElementRef<typeof ContextMenuPrimitive.SubContent>,
|
|
43
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>
|
|
44
|
+
>(({className, ...props}, ref) => (
|
|
45
|
+
<ContextMenuPrimitive.SubContent
|
|
46
|
+
ref={ref}
|
|
47
|
+
className={cn(
|
|
48
|
+
"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 border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
|
|
49
|
+
className,
|
|
50
|
+
)}
|
|
51
|
+
{...props}
|
|
52
|
+
/>
|
|
53
|
+
));
|
|
54
|
+
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
55
|
+
|
|
56
|
+
const ContextMenuContent = React.forwardRef<
|
|
57
|
+
React.ElementRef<typeof ContextMenuPrimitive.Content>,
|
|
58
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>
|
|
59
|
+
>(({className, ...props}, ref) => (
|
|
60
|
+
<ContextMenuPrimitive.Portal>
|
|
61
|
+
<ContextMenuPrimitive.Content
|
|
62
|
+
ref={ref}
|
|
128
63
|
className={cn(
|
|
129
|
-
"data-[
|
|
64
|
+
"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 border-neutral-200 bg-white p-1 text-neutral-950 shadow-md dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
|
|
130
65
|
className,
|
|
131
66
|
)}
|
|
132
67
|
{...props}
|
|
133
68
|
/>
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
</
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
data-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
69
|
+
</ContextMenuPrimitive.Portal>
|
|
70
|
+
));
|
|
71
|
+
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
72
|
+
|
|
73
|
+
const ContextMenuItem = React.forwardRef<
|
|
74
|
+
React.ElementRef<typeof ContextMenuPrimitive.Item>,
|
|
75
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {
|
|
76
|
+
inset?: boolean;
|
|
77
|
+
}
|
|
78
|
+
>(({className, inset, ...props}, ref) => (
|
|
79
|
+
<ContextMenuPrimitive.Item
|
|
80
|
+
ref={ref}
|
|
81
|
+
className={cn(
|
|
82
|
+
"relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50",
|
|
83
|
+
inset && "pl-8",
|
|
84
|
+
className,
|
|
85
|
+
)}
|
|
86
|
+
{...props}
|
|
87
|
+
/>
|
|
88
|
+
));
|
|
89
|
+
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
90
|
+
|
|
91
|
+
const ContextMenuCheckboxItem = React.forwardRef<
|
|
92
|
+
React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,
|
|
93
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>
|
|
94
|
+
>(({className, children, checked, ...props}, ref) => (
|
|
95
|
+
<ContextMenuPrimitive.CheckboxItem
|
|
96
|
+
ref={ref}
|
|
97
|
+
className={cn(
|
|
98
|
+
"relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50",
|
|
99
|
+
className,
|
|
100
|
+
)}
|
|
101
|
+
checked={checked}
|
|
102
|
+
{...props}>
|
|
103
|
+
<span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
|
|
104
|
+
<ContextMenuPrimitive.ItemIndicator>
|
|
105
|
+
<Check className='h-4 w-4' />
|
|
106
|
+
</ContextMenuPrimitive.ItemIndicator>
|
|
107
|
+
</span>
|
|
108
|
+
{children}
|
|
109
|
+
</ContextMenuPrimitive.CheckboxItem>
|
|
110
|
+
));
|
|
111
|
+
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
112
|
+
|
|
113
|
+
const ContextMenuRadioItem = React.forwardRef<
|
|
114
|
+
React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,
|
|
115
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>
|
|
116
|
+
>(({className, children, ...props}, ref) => (
|
|
117
|
+
<ContextMenuPrimitive.RadioItem
|
|
118
|
+
ref={ref}
|
|
119
|
+
className={cn(
|
|
120
|
+
"relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50",
|
|
121
|
+
className,
|
|
122
|
+
)}
|
|
123
|
+
{...props}>
|
|
124
|
+
<span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
|
|
125
|
+
<ContextMenuPrimitive.ItemIndicator>
|
|
126
|
+
<Circle className='h-4 w-4 fill-current' />
|
|
127
|
+
</ContextMenuPrimitive.ItemIndicator>
|
|
128
|
+
</span>
|
|
129
|
+
{children}
|
|
130
|
+
</ContextMenuPrimitive.RadioItem>
|
|
131
|
+
));
|
|
132
|
+
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
133
|
+
|
|
134
|
+
const ContextMenuLabel = React.forwardRef<
|
|
135
|
+
React.ElementRef<typeof ContextMenuPrimitive.Label>,
|
|
136
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {
|
|
137
|
+
inset?: boolean;
|
|
138
|
+
}
|
|
139
|
+
>(({className, inset, ...props}, ref) => (
|
|
140
|
+
<ContextMenuPrimitive.Label
|
|
141
|
+
ref={ref}
|
|
142
|
+
className={cn("px-2 py-1.5 text-sm font-semibold text-neutral-950 dark:text-neutral-50", inset && "pl-8", className)}
|
|
143
|
+
{...props}
|
|
144
|
+
/>
|
|
145
|
+
));
|
|
146
|
+
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
147
|
+
|
|
148
|
+
const ContextMenuSeparator = React.forwardRef<
|
|
149
|
+
React.ElementRef<typeof ContextMenuPrimitive.Separator>,
|
|
150
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>
|
|
151
|
+
>(({className, ...props}, ref) => (
|
|
152
|
+
<ContextMenuPrimitive.Separator
|
|
153
|
+
ref={ref}
|
|
154
|
+
className={cn("-mx-1 my-1 h-px bg-neutral-200 dark:bg-neutral-800", className)}
|
|
155
|
+
{...props}
|
|
156
|
+
/>
|
|
157
|
+
));
|
|
158
|
+
ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
159
|
+
|
|
160
|
+
const ContextMenuShortcut = ({className, ...props}: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
204
161
|
return (
|
|
205
162
|
<span
|
|
206
|
-
data-slot='context-menu-shortcut'
|
|
207
163
|
className={cn("ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400", className)}
|
|
208
164
|
{...props}
|
|
209
165
|
/>
|
|
210
166
|
);
|
|
211
|
-
}
|
|
167
|
+
};
|
|
168
|
+
ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
|
212
169
|
|
|
213
170
|
export {
|
|
214
171
|
ContextMenu,
|