@arolariu/components 0.0.31 → 0.0.33
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/LICENSE +21 -0
- package/changelog.md +14 -0
- package/dist/cjs/components/ui/alert-dialog.cjs.map +1 -1
- package/dist/cjs/components/ui/alert.cjs +1 -1
- package/dist/cjs/components/ui/alert.cjs.map +1 -1
- package/dist/cjs/components/ui/aspect-ratio.cjs.map +1 -1
- package/dist/cjs/components/ui/avatar.cjs.map +1 -1
- package/dist/cjs/components/ui/badge.cjs.map +1 -1
- package/dist/cjs/components/ui/breadcrumb.cjs.map +1 -1
- package/dist/cjs/components/ui/button.cjs.map +1 -1
- package/dist/cjs/components/ui/calendar.cjs.map +1 -1
- package/dist/cjs/components/ui/card.cjs.map +1 -1
- package/dist/cjs/components/ui/carousel.cjs.map +1 -1
- package/dist/cjs/components/ui/chart.cjs.map +1 -1
- package/dist/cjs/components/ui/checkbox.cjs.map +1 -1
- package/dist/cjs/components/ui/collapsible.cjs.map +1 -1
- package/dist/cjs/components/ui/command.cjs.map +1 -1
- package/dist/cjs/components/ui/context-menu.cjs.map +1 -1
- package/dist/cjs/components/ui/drawer.cjs.map +1 -1
- package/dist/cjs/components/ui/dropdown-menu.cjs.map +1 -1
- package/dist/cjs/components/ui/form.cjs.map +1 -1
- package/dist/cjs/components/ui/hover-card.cjs.map +1 -1
- package/dist/cjs/components/ui/input-otp.cjs.map +1 -1
- package/dist/cjs/components/ui/input.cjs.map +1 -1
- package/dist/cjs/components/ui/label.cjs.map +1 -1
- package/dist/cjs/components/ui/menubar.cjs.map +1 -1
- package/dist/cjs/components/ui/navigation-menu.cjs.map +1 -1
- package/dist/cjs/components/ui/pagination.cjs.map +1 -1
- package/dist/cjs/components/ui/popover.cjs.map +1 -1
- package/dist/cjs/components/ui/progress.cjs.map +1 -1
- package/dist/cjs/components/ui/radio-group.cjs.map +1 -1
- package/dist/cjs/components/ui/resizable.cjs.map +1 -1
- package/dist/cjs/components/ui/scroll-area.cjs.map +1 -1
- package/dist/cjs/components/ui/select.cjs.map +1 -1
- package/dist/cjs/components/ui/separator.cjs.map +1 -1
- package/dist/cjs/components/ui/sheet.cjs.map +1 -1
- package/dist/cjs/components/ui/sidebar.cjs.map +1 -1
- package/dist/cjs/components/ui/skeleton.cjs.map +1 -1
- package/dist/cjs/components/ui/slider.cjs.map +1 -1
- package/dist/cjs/components/ui/sonner.cjs +1 -1
- package/dist/cjs/components/ui/sonner.cjs.map +1 -1
- package/dist/cjs/components/ui/switch.cjs.map +1 -1
- package/dist/cjs/components/ui/table.cjs.map +1 -1
- package/dist/cjs/components/ui/tabs.cjs.map +1 -1
- package/dist/cjs/components/ui/textarea.cjs.map +1 -1
- package/dist/cjs/components/ui/toggle-group.cjs.map +1 -1
- package/dist/cjs/components/ui/toggle.cjs.map +1 -1
- package/dist/cjs/components/ui/tooltip.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.css +1 -0
- package/dist/cjs/node_modules/sonner/dist/index.cjs +1 -1
- package/dist/cjs/node_modules/sonner/dist/index.cjs.map +1 -1
- package/dist/esm/components/ui/alert-dialog.js.map +1 -1
- package/dist/esm/components/ui/alert.js +8 -8
- package/dist/esm/components/ui/alert.js.map +1 -1
- package/dist/esm/components/ui/aspect-ratio.js.map +1 -1
- package/dist/esm/components/ui/avatar.js.map +1 -1
- package/dist/esm/components/ui/badge.js.map +1 -1
- package/dist/esm/components/ui/breadcrumb.js.map +1 -1
- package/dist/esm/components/ui/button.js.map +1 -1
- package/dist/esm/components/ui/calendar.js.map +1 -1
- package/dist/esm/components/ui/card.js.map +1 -1
- package/dist/esm/components/ui/carousel.js.map +1 -1
- package/dist/esm/components/ui/chart.js.map +1 -1
- package/dist/esm/components/ui/checkbox.js.map +1 -1
- package/dist/esm/components/ui/collapsible.js.map +1 -1
- package/dist/esm/components/ui/command.js.map +1 -1
- package/dist/esm/components/ui/context-menu.js.map +1 -1
- package/dist/esm/components/ui/drawer.js.map +1 -1
- package/dist/esm/components/ui/dropdown-menu.js.map +1 -1
- package/dist/esm/components/ui/form.js.map +1 -1
- package/dist/esm/components/ui/hover-card.js.map +1 -1
- package/dist/esm/components/ui/input-otp.js.map +1 -1
- package/dist/esm/components/ui/input.js.map +1 -1
- package/dist/esm/components/ui/label.js.map +1 -1
- package/dist/esm/components/ui/menubar.js.map +1 -1
- package/dist/esm/components/ui/navigation-menu.js.map +1 -1
- package/dist/esm/components/ui/pagination.js.map +1 -1
- package/dist/esm/components/ui/popover.js.map +1 -1
- package/dist/esm/components/ui/progress.js.map +1 -1
- package/dist/esm/components/ui/radio-group.js.map +1 -1
- package/dist/esm/components/ui/resizable.js.map +1 -1
- package/dist/esm/components/ui/scroll-area.js.map +1 -1
- package/dist/esm/components/ui/select.js.map +1 -1
- package/dist/esm/components/ui/separator.js.map +1 -1
- package/dist/esm/components/ui/sheet.js.map +1 -1
- package/dist/esm/components/ui/sidebar.js.map +1 -1
- package/dist/esm/components/ui/skeleton.js.map +1 -1
- package/dist/esm/components/ui/slider.js.map +1 -1
- package/dist/esm/components/ui/sonner.js +3 -1
- package/dist/esm/components/ui/sonner.js.map +1 -1
- package/dist/esm/components/ui/switch.js.map +1 -1
- package/dist/esm/components/ui/table.js.map +1 -1
- package/dist/esm/components/ui/tabs.js.map +1 -1
- package/dist/esm/components/ui/textarea.js.map +1 -1
- package/dist/esm/components/ui/toggle-group.js.map +1 -1
- package/dist/esm/components/ui/toggle.js.map +1 -1
- package/dist/esm/components/ui/tooltip.js.map +1 -1
- package/dist/esm/index.css +1 -0
- package/dist/esm/index.js +296 -293
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/node_modules/sonner/dist/index.js +4 -4
- package/dist/esm/node_modules/sonner/dist/index.js.map +1 -1
- package/dist/index.css +1 -0
- package/dist/index.js +300 -0
- package/dist/types/components/ui/alert.d.ts.map +1 -1
- package/dist/types/components/ui/form.d.ts.map +1 -1
- package/dist/types/components/ui/sonner.d.ts +2 -2
- package/dist/types/components/ui/sonner.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -0
- package/package.json +77 -45
- package/src/components/ui/alert-dialog.tsx +160 -160
- package/src/components/ui/alert.tsx +2 -0
- package/src/components/ui/aspect-ratio.tsx +12 -12
- package/src/components/ui/avatar.tsx +52 -52
- package/src/components/ui/badge.tsx +47 -47
- package/src/components/ui/breadcrumb.tsx +116 -116
- package/src/components/ui/button.tsx +60 -60
- package/src/components/ui/calendar.tsx +75 -75
- package/src/components/ui/card.tsx +79 -79
- package/src/components/ui/carousel.tsx +240 -240
- package/src/components/ui/chart.tsx +352 -352
- package/src/components/ui/checkbox.tsx +31 -31
- package/src/components/ui/collapsible.tsx +34 -34
- package/src/components/ui/command.tsx +176 -176
- package/src/components/ui/context-menu.tsx +254 -254
- package/src/components/ui/drawer.tsx +137 -137
- package/src/components/ui/dropdown-menu.tsx +259 -259
- package/src/components/ui/form.tsx +173 -173
- package/src/components/ui/hover-card.tsx +41 -41
- package/src/components/ui/input-otp.tsx +77 -77
- package/src/components/ui/input.tsx +22 -22
- package/src/components/ui/label.tsx +23 -23
- package/src/components/ui/menubar.tsx +278 -278
- package/src/components/ui/navigation-menu.tsx +170 -170
- package/src/components/ui/pagination.tsx +128 -128
- package/src/components/ui/popover.tsx +47 -47
- package/src/components/ui/progress.tsx +30 -30
- package/src/components/ui/radio-group.tsx +44 -44
- package/src/components/ui/resizable.tsx +55 -55
- package/src/components/ui/scroll-area.tsx +57 -57
- package/src/components/ui/select.tsx +183 -183
- package/src/components/ui/separator.tsx +27 -27
- package/src/components/ui/sheet.tsx +144 -144
- package/src/components/ui/sidebar.tsx +725 -725
- package/src/components/ui/skeleton.tsx +17 -17
- package/src/components/ui/slider.tsx +62 -62
- package/src/components/ui/sonner.tsx +2 -2
- package/src/components/ui/switch.tsx +30 -30
- package/src/components/ui/table.tsx +118 -118
- package/src/components/ui/tabs.tsx +65 -65
- package/src/components/ui/textarea.tsx +19 -19
- package/src/components/ui/toggle-group.tsx +72 -72
- package/src/components/ui/toggle.tsx +46 -46
- package/src/components/ui/tooltip.tsx +60 -60
- package/src/index.css +3 -107
- package/src/index.ts +3 -1
- package/tailwind.config.mjs +67 -0
- package/tsconfig.json +4 -1
|
@@ -1,183 +1,183 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
5
|
-
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
6
|
-
import { cn } from "./../../lib/utils";
|
|
7
|
-
|
|
8
|
-
function Select({
|
|
9
|
-
...props
|
|
10
|
-
}: React.ComponentProps<typeof SelectPrimitive.Root>) {
|
|
11
|
-
return <SelectPrimitive.Root data-slot="select" {...props} />;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function SelectGroup({
|
|
15
|
-
...props
|
|
16
|
-
}: React.ComponentProps<typeof SelectPrimitive.Group>) {
|
|
17
|
-
return <SelectPrimitive.Group data-slot="select-group" {...props} />;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function SelectValue({
|
|
21
|
-
...props
|
|
22
|
-
}: React.ComponentProps<typeof SelectPrimitive.Value>) {
|
|
23
|
-
return <SelectPrimitive.Value data-slot="select-value" {...props} />;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function SelectTrigger({
|
|
27
|
-
className,
|
|
28
|
-
children,
|
|
29
|
-
...props
|
|
30
|
-
}: React.ComponentProps<typeof SelectPrimitive.Trigger>) {
|
|
31
|
-
return (
|
|
32
|
-
<SelectPrimitive.Trigger
|
|
33
|
-
data-slot="select-trigger"
|
|
34
|
-
className={cn(
|
|
35
|
-
"border-neutral-200 data-[placeholder]:text-neutral-500 [&_svg:not([class*='text-'])]:text-neutral-500 focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 flex h-9 w-full items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:border-neutral-800 dark:data-[placeholder]:text-neutral-400 dark:[&_svg:not([class*='text-'])]:text-neutral-400 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",
|
|
36
|
-
className
|
|
37
|
-
)}
|
|
38
|
-
{...props}
|
|
39
|
-
>
|
|
40
|
-
{children}
|
|
41
|
-
<SelectPrimitive.Icon asChild>
|
|
42
|
-
<ChevronDownIcon className="size-4 opacity-50" />
|
|
43
|
-
</SelectPrimitive.Icon>
|
|
44
|
-
</SelectPrimitive.Trigger>
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function SelectContent({
|
|
49
|
-
className,
|
|
50
|
-
children,
|
|
51
|
-
position = "popper",
|
|
52
|
-
...props
|
|
53
|
-
}: React.ComponentProps<typeof SelectPrimitive.Content>) {
|
|
54
|
-
return (
|
|
55
|
-
<SelectPrimitive.Portal>
|
|
56
|
-
<SelectPrimitive.Content
|
|
57
|
-
data-slot="select-content"
|
|
58
|
-
className={cn(
|
|
59
|
-
"bg-white text-neutral-950 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 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 shadow-md dark:bg-neutral-950 dark:text-neutral-50 dark:border-neutral-800",
|
|
60
|
-
position === "popper" &&
|
|
61
|
-
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
62
|
-
className
|
|
63
|
-
)}
|
|
64
|
-
position={position}
|
|
65
|
-
{...props}
|
|
66
|
-
>
|
|
67
|
-
<SelectScrollUpButton />
|
|
68
|
-
<SelectPrimitive.Viewport
|
|
69
|
-
className={cn(
|
|
70
|
-
"p-1",
|
|
71
|
-
position === "popper" &&
|
|
72
|
-
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
73
|
-
)}
|
|
74
|
-
>
|
|
75
|
-
{children}
|
|
76
|
-
</SelectPrimitive.Viewport>
|
|
77
|
-
<SelectScrollDownButton />
|
|
78
|
-
</SelectPrimitive.Content>
|
|
79
|
-
</SelectPrimitive.Portal>
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function SelectLabel({
|
|
84
|
-
className,
|
|
85
|
-
...props
|
|
86
|
-
}: React.ComponentProps<typeof SelectPrimitive.Label>) {
|
|
87
|
-
return (
|
|
88
|
-
<SelectPrimitive.Label
|
|
89
|
-
data-slot="select-label"
|
|
90
|
-
className={cn("px-2 py-1.5 text-sm font-medium", className)}
|
|
91
|
-
{...props}
|
|
92
|
-
/>
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function SelectItem({
|
|
97
|
-
className,
|
|
98
|
-
children,
|
|
99
|
-
...props
|
|
100
|
-
}: React.ComponentProps<typeof SelectPrimitive.Item>) {
|
|
101
|
-
return (
|
|
102
|
-
<SelectPrimitive.Item
|
|
103
|
-
data-slot="select-item"
|
|
104
|
-
className={cn(
|
|
105
|
-
"focus:bg-neutral-100 focus:text-neutral-900 [&_svg:not([class*='text-'])]:text-neutral-500 relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:[&_svg:not([class*='text-'])]:text-neutral-400",
|
|
106
|
-
className
|
|
107
|
-
)}
|
|
108
|
-
{...props}
|
|
109
|
-
>
|
|
110
|
-
<span className="absolute right-2 flex size-3.5 items-center justify-center">
|
|
111
|
-
<SelectPrimitive.ItemIndicator>
|
|
112
|
-
<CheckIcon className="size-4" />
|
|
113
|
-
</SelectPrimitive.ItemIndicator>
|
|
114
|
-
</span>
|
|
115
|
-
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
116
|
-
</SelectPrimitive.Item>
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
function SelectSeparator({
|
|
121
|
-
className,
|
|
122
|
-
...props
|
|
123
|
-
}: React.ComponentProps<typeof SelectPrimitive.Separator>) {
|
|
124
|
-
return (
|
|
125
|
-
<SelectPrimitive.Separator
|
|
126
|
-
data-slot="select-separator"
|
|
127
|
-
className={cn(
|
|
128
|
-
"bg-neutral-200 pointer-events-none -mx-1 my-1 h-px dark:bg-neutral-800",
|
|
129
|
-
className
|
|
130
|
-
)}
|
|
131
|
-
{...props}
|
|
132
|
-
/>
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function SelectScrollUpButton({
|
|
137
|
-
className,
|
|
138
|
-
...props
|
|
139
|
-
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
|
|
140
|
-
return (
|
|
141
|
-
<SelectPrimitive.ScrollUpButton
|
|
142
|
-
data-slot="select-scroll-up-button"
|
|
143
|
-
className={cn(
|
|
144
|
-
"flex cursor-default items-center justify-center py-1",
|
|
145
|
-
className
|
|
146
|
-
)}
|
|
147
|
-
{...props}
|
|
148
|
-
>
|
|
149
|
-
<ChevronUpIcon className="size-4" />
|
|
150
|
-
</SelectPrimitive.ScrollUpButton>
|
|
151
|
-
);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
function SelectScrollDownButton({
|
|
155
|
-
className,
|
|
156
|
-
...props
|
|
157
|
-
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
|
|
158
|
-
return (
|
|
159
|
-
<SelectPrimitive.ScrollDownButton
|
|
160
|
-
data-slot="select-scroll-down-button"
|
|
161
|
-
className={cn(
|
|
162
|
-
"flex cursor-default items-center justify-center py-1",
|
|
163
|
-
className
|
|
164
|
-
)}
|
|
165
|
-
{...props}
|
|
166
|
-
>
|
|
167
|
-
<ChevronDownIcon className="size-4" />
|
|
168
|
-
</SelectPrimitive.ScrollDownButton>
|
|
169
|
-
);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export {
|
|
173
|
-
Select,
|
|
174
|
-
SelectContent,
|
|
175
|
-
SelectGroup,
|
|
176
|
-
SelectItem,
|
|
177
|
-
SelectLabel,
|
|
178
|
-
SelectScrollDownButton,
|
|
179
|
-
SelectScrollUpButton,
|
|
180
|
-
SelectSeparator,
|
|
181
|
-
SelectTrigger,
|
|
182
|
-
SelectValue,
|
|
183
|
-
};
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
5
|
+
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
6
|
+
import { cn } from "./../../lib/utils";
|
|
7
|
+
|
|
8
|
+
function Select({
|
|
9
|
+
...props
|
|
10
|
+
}: React.ComponentProps<typeof SelectPrimitive.Root>) {
|
|
11
|
+
return <SelectPrimitive.Root data-slot="select" {...props} />;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function SelectGroup({
|
|
15
|
+
...props
|
|
16
|
+
}: React.ComponentProps<typeof SelectPrimitive.Group>) {
|
|
17
|
+
return <SelectPrimitive.Group data-slot="select-group" {...props} />;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function SelectValue({
|
|
21
|
+
...props
|
|
22
|
+
}: React.ComponentProps<typeof SelectPrimitive.Value>) {
|
|
23
|
+
return <SelectPrimitive.Value data-slot="select-value" {...props} />;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function SelectTrigger({
|
|
27
|
+
className,
|
|
28
|
+
children,
|
|
29
|
+
...props
|
|
30
|
+
}: React.ComponentProps<typeof SelectPrimitive.Trigger>) {
|
|
31
|
+
return (
|
|
32
|
+
<SelectPrimitive.Trigger
|
|
33
|
+
data-slot="select-trigger"
|
|
34
|
+
className={cn(
|
|
35
|
+
"border-neutral-200 data-[placeholder]:text-neutral-500 [&_svg:not([class*='text-'])]:text-neutral-500 focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 flex h-9 w-full items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:border-neutral-800 dark:data-[placeholder]:text-neutral-400 dark:[&_svg:not([class*='text-'])]:text-neutral-400 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",
|
|
36
|
+
className
|
|
37
|
+
)}
|
|
38
|
+
{...props}
|
|
39
|
+
>
|
|
40
|
+
{children}
|
|
41
|
+
<SelectPrimitive.Icon asChild>
|
|
42
|
+
<ChevronDownIcon className="size-4 opacity-50" />
|
|
43
|
+
</SelectPrimitive.Icon>
|
|
44
|
+
</SelectPrimitive.Trigger>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function SelectContent({
|
|
49
|
+
className,
|
|
50
|
+
children,
|
|
51
|
+
position = "popper",
|
|
52
|
+
...props
|
|
53
|
+
}: React.ComponentProps<typeof SelectPrimitive.Content>) {
|
|
54
|
+
return (
|
|
55
|
+
<SelectPrimitive.Portal>
|
|
56
|
+
<SelectPrimitive.Content
|
|
57
|
+
data-slot="select-content"
|
|
58
|
+
className={cn(
|
|
59
|
+
"bg-white text-neutral-950 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 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 shadow-md dark:bg-neutral-950 dark:text-neutral-50 dark:border-neutral-800",
|
|
60
|
+
position === "popper" &&
|
|
61
|
+
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
62
|
+
className
|
|
63
|
+
)}
|
|
64
|
+
position={position}
|
|
65
|
+
{...props}
|
|
66
|
+
>
|
|
67
|
+
<SelectScrollUpButton />
|
|
68
|
+
<SelectPrimitive.Viewport
|
|
69
|
+
className={cn(
|
|
70
|
+
"p-1",
|
|
71
|
+
position === "popper" &&
|
|
72
|
+
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
73
|
+
)}
|
|
74
|
+
>
|
|
75
|
+
{children}
|
|
76
|
+
</SelectPrimitive.Viewport>
|
|
77
|
+
<SelectScrollDownButton />
|
|
78
|
+
</SelectPrimitive.Content>
|
|
79
|
+
</SelectPrimitive.Portal>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function SelectLabel({
|
|
84
|
+
className,
|
|
85
|
+
...props
|
|
86
|
+
}: React.ComponentProps<typeof SelectPrimitive.Label>) {
|
|
87
|
+
return (
|
|
88
|
+
<SelectPrimitive.Label
|
|
89
|
+
data-slot="select-label"
|
|
90
|
+
className={cn("px-2 py-1.5 text-sm font-medium", className)}
|
|
91
|
+
{...props}
|
|
92
|
+
/>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function SelectItem({
|
|
97
|
+
className,
|
|
98
|
+
children,
|
|
99
|
+
...props
|
|
100
|
+
}: React.ComponentProps<typeof SelectPrimitive.Item>) {
|
|
101
|
+
return (
|
|
102
|
+
<SelectPrimitive.Item
|
|
103
|
+
data-slot="select-item"
|
|
104
|
+
className={cn(
|
|
105
|
+
"focus:bg-neutral-100 focus:text-neutral-900 [&_svg:not([class*='text-'])]:text-neutral-500 relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:[&_svg:not([class*='text-'])]:text-neutral-400",
|
|
106
|
+
className
|
|
107
|
+
)}
|
|
108
|
+
{...props}
|
|
109
|
+
>
|
|
110
|
+
<span className="absolute right-2 flex size-3.5 items-center justify-center">
|
|
111
|
+
<SelectPrimitive.ItemIndicator>
|
|
112
|
+
<CheckIcon className="size-4" />
|
|
113
|
+
</SelectPrimitive.ItemIndicator>
|
|
114
|
+
</span>
|
|
115
|
+
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
116
|
+
</SelectPrimitive.Item>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function SelectSeparator({
|
|
121
|
+
className,
|
|
122
|
+
...props
|
|
123
|
+
}: React.ComponentProps<typeof SelectPrimitive.Separator>) {
|
|
124
|
+
return (
|
|
125
|
+
<SelectPrimitive.Separator
|
|
126
|
+
data-slot="select-separator"
|
|
127
|
+
className={cn(
|
|
128
|
+
"bg-neutral-200 pointer-events-none -mx-1 my-1 h-px dark:bg-neutral-800",
|
|
129
|
+
className
|
|
130
|
+
)}
|
|
131
|
+
{...props}
|
|
132
|
+
/>
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function SelectScrollUpButton({
|
|
137
|
+
className,
|
|
138
|
+
...props
|
|
139
|
+
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
|
|
140
|
+
return (
|
|
141
|
+
<SelectPrimitive.ScrollUpButton
|
|
142
|
+
data-slot="select-scroll-up-button"
|
|
143
|
+
className={cn(
|
|
144
|
+
"flex cursor-default items-center justify-center py-1",
|
|
145
|
+
className
|
|
146
|
+
)}
|
|
147
|
+
{...props}
|
|
148
|
+
>
|
|
149
|
+
<ChevronUpIcon className="size-4" />
|
|
150
|
+
</SelectPrimitive.ScrollUpButton>
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function SelectScrollDownButton({
|
|
155
|
+
className,
|
|
156
|
+
...props
|
|
157
|
+
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
|
|
158
|
+
return (
|
|
159
|
+
<SelectPrimitive.ScrollDownButton
|
|
160
|
+
data-slot="select-scroll-down-button"
|
|
161
|
+
className={cn(
|
|
162
|
+
"flex cursor-default items-center justify-center py-1",
|
|
163
|
+
className
|
|
164
|
+
)}
|
|
165
|
+
{...props}
|
|
166
|
+
>
|
|
167
|
+
<ChevronDownIcon className="size-4" />
|
|
168
|
+
</SelectPrimitive.ScrollDownButton>
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export {
|
|
173
|
+
Select,
|
|
174
|
+
SelectContent,
|
|
175
|
+
SelectGroup,
|
|
176
|
+
SelectItem,
|
|
177
|
+
SelectLabel,
|
|
178
|
+
SelectScrollDownButton,
|
|
179
|
+
SelectScrollUpButton,
|
|
180
|
+
SelectSeparator,
|
|
181
|
+
SelectTrigger,
|
|
182
|
+
SelectValue,
|
|
183
|
+
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
5
|
-
import { cn } from "./../../lib/utils";
|
|
6
|
-
|
|
7
|
-
function Separator({
|
|
8
|
-
className,
|
|
9
|
-
orientation = "horizontal",
|
|
10
|
-
decorative = true,
|
|
11
|
-
...props
|
|
12
|
-
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
|
|
13
|
-
return (
|
|
14
|
-
<SeparatorPrimitive.Root
|
|
15
|
-
data-slot="separator-root"
|
|
16
|
-
decorative={decorative}
|
|
17
|
-
orientation={orientation}
|
|
18
|
-
className={cn(
|
|
19
|
-
"bg-neutral-200 shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px dark:bg-neutral-800",
|
|
20
|
-
className
|
|
21
|
-
)}
|
|
22
|
-
{...props}
|
|
23
|
-
/>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export { Separator };
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
5
|
+
import { cn } from "./../../lib/utils";
|
|
6
|
+
|
|
7
|
+
function Separator({
|
|
8
|
+
className,
|
|
9
|
+
orientation = "horizontal",
|
|
10
|
+
decorative = true,
|
|
11
|
+
...props
|
|
12
|
+
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
|
|
13
|
+
return (
|
|
14
|
+
<SeparatorPrimitive.Root
|
|
15
|
+
data-slot="separator-root"
|
|
16
|
+
decorative={decorative}
|
|
17
|
+
orientation={orientation}
|
|
18
|
+
className={cn(
|
|
19
|
+
"bg-neutral-200 shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px dark:bg-neutral-800",
|
|
20
|
+
className
|
|
21
|
+
)}
|
|
22
|
+
{...props}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { Separator };
|