@majapisoftwares/ui 6.1.0 → 6.1.2
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/AGENTS.md +27 -27
- package/README.md +79 -79
- package/THIRD_PARTY_NOTICES.md +39 -39
- package/components.json +25 -25
- package/docs/MIGRATION-0.2.md +20 -20
- package/docs/MIGRATION-6.0.md +33 -33
- package/docs/NEXT-STARTER-VALIDATION.md +14 -14
- package/docs/STANDARDS.md +41 -41
- package/docs/VALIDATION.md +11 -11
- package/docs/VERSIONING.md +28 -28
- package/docs/validation/preference-titles.md +22 -0
- package/package.json +88 -84
- package/scripts/check-standards.mjs +41 -41
- package/src/components/ui/accordion.tsx +82 -82
- package/src/components/ui/alert-dialog.tsx +187 -187
- package/src/components/ui/alert.tsx +77 -77
- package/src/components/ui/avatar.tsx +108 -108
- package/src/components/ui/badge.tsx +55 -55
- package/src/components/ui/breadcrumb.tsx +125 -125
- package/src/components/ui/button-group.tsx +89 -89
- package/src/components/ui/button.tsx +59 -59
- package/src/components/ui/card.tsx +101 -101
- package/src/components/ui/checkbox.tsx +27 -27
- package/src/components/ui/collapsible.tsx +21 -21
- package/src/components/ui/context-menu.tsx +271 -271
- package/src/components/ui/dialog.tsx +161 -161
- package/src/components/ui/dropdown-menu.tsx +271 -271
- package/src/components/ui/empty.tsx +105 -105
- package/src/components/ui/field.tsx +238 -238
- package/src/components/ui/hover-card.tsx +50 -50
- package/src/components/ui/input-group.tsx +155 -155
- package/src/components/ui/input.tsx +21 -21
- package/src/components/ui/kbd.tsx +28 -28
- package/src/components/ui/label.tsx +19 -19
- package/src/components/ui/orb.css +1002 -1002
- package/src/components/ui/orb.tsx +752 -752
- package/src/components/ui/popover.tsx +89 -89
- package/src/components/ui/progress.tsx +82 -82
- package/src/components/ui/radio-group.tsx +37 -37
- package/src/components/ui/scroll-area.tsx +54 -54
- package/src/components/ui/select.tsx +204 -204
- package/src/components/ui/separator.tsx +24 -24
- package/src/components/ui/sheet.tsx +139 -139
- package/src/components/ui/sidebar.tsx +1039 -1035
- package/src/components/ui/skeleton.tsx +15 -15
- package/src/components/ui/slider.tsx +53 -53
- package/src/components/ui/sonner.tsx +44 -44
- package/src/components/ui/spinner.tsx +32 -32
- package/src/components/ui/switch.tsx +31 -31
- package/src/components/ui/table.tsx +121 -121
- package/src/components/ui/tabs.tsx +81 -81
- package/src/components/ui/textarea.tsx +19 -19
- package/src/components/ui/toggle-group.tsx +89 -89
- package/src/components/ui/toggle.tsx +44 -44
- package/src/components/ui/tooltip.tsx +65 -65
- package/src/hooks/use-mobile.ts +20 -20
- package/src/lib/i18n.tsx +109 -109
- package/src/lib/utils.ts +1 -1
- package/src/patterns/app-shell.tsx +177 -179
- package/src/patterns/data-table.tsx +2486 -2486
- package/src/patterns/details-sheet.tsx +54 -54
- package/src/patterns/filter-tabs.tsx +53 -53
- package/src/patterns/majapi-logo.tsx +32 -32
- package/src/patterns/page-header.tsx +62 -62
- package/src/patterns/preferences.tsx +15 -7
- package/src/patterns/status-badge.tsx +24 -24
- package/src/patterns/user-menu.tsx +218 -218
- package/src/patterns/workspace-switcher.tsx +176 -173
- package/src/styles.css +165 -165
- package/src/templates/admin-dashboard.tsx +44 -44
- package/src/templates/auth-layout.tsx +30 -30
- package/src/templates/login-form.tsx +129 -129
- package/src/templates/signup-form.tsx +177 -177
|
@@ -1,204 +1,204 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
5
|
-
import { cn } from "cn";
|
|
6
|
-
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
|
|
7
|
-
|
|
8
|
-
const Select = SelectPrimitive.Root;
|
|
9
|
-
|
|
10
|
-
function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {
|
|
11
|
-
return (
|
|
12
|
-
<SelectPrimitive.Group
|
|
13
|
-
data-slot="select-group"
|
|
14
|
-
className={cn("scroll-my-1.5 p-1.5", className)}
|
|
15
|
-
{...props}
|
|
16
|
-
/>
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {
|
|
21
|
-
return (
|
|
22
|
-
<SelectPrimitive.Value
|
|
23
|
-
data-slot="select-value"
|
|
24
|
-
className={cn("flex flex-1 text-left", className)}
|
|
25
|
-
{...props}
|
|
26
|
-
/>
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function SelectTrigger({
|
|
31
|
-
className,
|
|
32
|
-
size = "default",
|
|
33
|
-
children,
|
|
34
|
-
...props
|
|
35
|
-
}: SelectPrimitive.Trigger.Props & {
|
|
36
|
-
size?: "sm" | "default";
|
|
37
|
-
}) {
|
|
38
|
-
return (
|
|
39
|
-
<SelectPrimitive.Trigger
|
|
40
|
-
data-slot="select-trigger"
|
|
41
|
-
data-size={size}
|
|
42
|
-
className={cn(
|
|
43
|
-
"flex w-fit items-center justify-between gap-1.5 rounded-3xl border border-transparent bg-input/50 px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow,background-color] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
44
|
-
className,
|
|
45
|
-
)}
|
|
46
|
-
{...props}
|
|
47
|
-
>
|
|
48
|
-
{children}
|
|
49
|
-
<SelectPrimitive.Icon
|
|
50
|
-
render={
|
|
51
|
-
<ChevronDownIcon className="pointer-events-none size-4 text-muted-foreground" />
|
|
52
|
-
}
|
|
53
|
-
/>
|
|
54
|
-
</SelectPrimitive.Trigger>
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function SelectContent({
|
|
59
|
-
className,
|
|
60
|
-
children,
|
|
61
|
-
side = "bottom",
|
|
62
|
-
sideOffset = 4,
|
|
63
|
-
align = "center",
|
|
64
|
-
alignOffset = 0,
|
|
65
|
-
alignItemWithTrigger = true,
|
|
66
|
-
...props
|
|
67
|
-
}: SelectPrimitive.Popup.Props &
|
|
68
|
-
Pick<
|
|
69
|
-
SelectPrimitive.Positioner.Props,
|
|
70
|
-
"align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger"
|
|
71
|
-
>) {
|
|
72
|
-
return (
|
|
73
|
-
<SelectPrimitive.Portal>
|
|
74
|
-
<SelectPrimitive.Positioner
|
|
75
|
-
side={side}
|
|
76
|
-
sideOffset={sideOffset}
|
|
77
|
-
align={align}
|
|
78
|
-
alignOffset={alignOffset}
|
|
79
|
-
alignItemWithTrigger={alignItemWithTrigger}
|
|
80
|
-
className="isolate z-50"
|
|
81
|
-
>
|
|
82
|
-
<SelectPrimitive.Popup
|
|
83
|
-
data-slot="select-content"
|
|
84
|
-
data-align-trigger={alignItemWithTrigger}
|
|
85
|
-
className={cn(
|
|
86
|
-
"relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-3xl bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/5 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
87
|
-
className,
|
|
88
|
-
)}
|
|
89
|
-
{...props}
|
|
90
|
-
>
|
|
91
|
-
<SelectScrollUpButton />
|
|
92
|
-
<SelectPrimitive.List>{children}</SelectPrimitive.List>
|
|
93
|
-
<SelectScrollDownButton />
|
|
94
|
-
</SelectPrimitive.Popup>
|
|
95
|
-
</SelectPrimitive.Positioner>
|
|
96
|
-
</SelectPrimitive.Portal>
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function SelectLabel({
|
|
101
|
-
className,
|
|
102
|
-
...props
|
|
103
|
-
}: SelectPrimitive.GroupLabel.Props) {
|
|
104
|
-
return (
|
|
105
|
-
<SelectPrimitive.GroupLabel
|
|
106
|
-
data-slot="select-label"
|
|
107
|
-
className={cn("px-3 py-2.5 text-xs text-muted-foreground", className)}
|
|
108
|
-
{...props}
|
|
109
|
-
/>
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function SelectItem({
|
|
114
|
-
className,
|
|
115
|
-
children,
|
|
116
|
-
...props
|
|
117
|
-
}: SelectPrimitive.Item.Props) {
|
|
118
|
-
return (
|
|
119
|
-
<SelectPrimitive.Item
|
|
120
|
-
data-slot="select-item"
|
|
121
|
-
className={cn(
|
|
122
|
-
"relative flex w-full cursor-default items-center gap-2.5 rounded-2xl py-2 pr-8 pl-3 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground 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",
|
|
123
|
-
className,
|
|
124
|
-
)}
|
|
125
|
-
{...props}
|
|
126
|
-
>
|
|
127
|
-
<SelectPrimitive.ItemText className="flex flex-1 shrink-0 gap-2 whitespace-nowrap">
|
|
128
|
-
{children}
|
|
129
|
-
</SelectPrimitive.ItemText>
|
|
130
|
-
<SelectPrimitive.ItemIndicator
|
|
131
|
-
render={
|
|
132
|
-
<span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center" />
|
|
133
|
-
}
|
|
134
|
-
>
|
|
135
|
-
<CheckIcon className="pointer-events-none" />
|
|
136
|
-
</SelectPrimitive.ItemIndicator>
|
|
137
|
-
</SelectPrimitive.Item>
|
|
138
|
-
);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
function SelectSeparator({
|
|
142
|
-
className,
|
|
143
|
-
...props
|
|
144
|
-
}: SelectPrimitive.Separator.Props) {
|
|
145
|
-
return (
|
|
146
|
-
<SelectPrimitive.Separator
|
|
147
|
-
data-slot="select-separator"
|
|
148
|
-
className={cn(
|
|
149
|
-
"pointer-events-none -mx-1.5 my-1.5 h-px bg-border",
|
|
150
|
-
className,
|
|
151
|
-
)}
|
|
152
|
-
{...props}
|
|
153
|
-
/>
|
|
154
|
-
);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
function SelectScrollUpButton({
|
|
158
|
-
className,
|
|
159
|
-
...props
|
|
160
|
-
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {
|
|
161
|
-
return (
|
|
162
|
-
<SelectPrimitive.ScrollUpArrow
|
|
163
|
-
data-slot="select-scroll-up-button"
|
|
164
|
-
className={cn(
|
|
165
|
-
"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
166
|
-
className,
|
|
167
|
-
)}
|
|
168
|
-
{...props}
|
|
169
|
-
>
|
|
170
|
-
<ChevronUpIcon />
|
|
171
|
-
</SelectPrimitive.ScrollUpArrow>
|
|
172
|
-
);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
function SelectScrollDownButton({
|
|
176
|
-
className,
|
|
177
|
-
...props
|
|
178
|
-
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {
|
|
179
|
-
return (
|
|
180
|
-
<SelectPrimitive.ScrollDownArrow
|
|
181
|
-
data-slot="select-scroll-down-button"
|
|
182
|
-
className={cn(
|
|
183
|
-
"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
184
|
-
className,
|
|
185
|
-
)}
|
|
186
|
-
{...props}
|
|
187
|
-
>
|
|
188
|
-
<ChevronDownIcon />
|
|
189
|
-
</SelectPrimitive.ScrollDownArrow>
|
|
190
|
-
);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export {
|
|
194
|
-
Select,
|
|
195
|
-
SelectContent,
|
|
196
|
-
SelectGroup,
|
|
197
|
-
SelectItem,
|
|
198
|
-
SelectLabel,
|
|
199
|
-
SelectScrollDownButton,
|
|
200
|
-
SelectScrollUpButton,
|
|
201
|
-
SelectSeparator,
|
|
202
|
-
SelectTrigger,
|
|
203
|
-
SelectValue,
|
|
204
|
-
};
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
5
|
+
import { cn } from "cn";
|
|
6
|
+
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
|
|
7
|
+
|
|
8
|
+
const Select = SelectPrimitive.Root;
|
|
9
|
+
|
|
10
|
+
function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {
|
|
11
|
+
return (
|
|
12
|
+
<SelectPrimitive.Group
|
|
13
|
+
data-slot="select-group"
|
|
14
|
+
className={cn("scroll-my-1.5 p-1.5", className)}
|
|
15
|
+
{...props}
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {
|
|
21
|
+
return (
|
|
22
|
+
<SelectPrimitive.Value
|
|
23
|
+
data-slot="select-value"
|
|
24
|
+
className={cn("flex flex-1 text-left", className)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function SelectTrigger({
|
|
31
|
+
className,
|
|
32
|
+
size = "default",
|
|
33
|
+
children,
|
|
34
|
+
...props
|
|
35
|
+
}: SelectPrimitive.Trigger.Props & {
|
|
36
|
+
size?: "sm" | "default";
|
|
37
|
+
}) {
|
|
38
|
+
return (
|
|
39
|
+
<SelectPrimitive.Trigger
|
|
40
|
+
data-slot="select-trigger"
|
|
41
|
+
data-size={size}
|
|
42
|
+
className={cn(
|
|
43
|
+
"flex w-fit items-center justify-between gap-1.5 rounded-3xl border border-transparent bg-input/50 px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow,background-color] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
44
|
+
className,
|
|
45
|
+
)}
|
|
46
|
+
{...props}
|
|
47
|
+
>
|
|
48
|
+
{children}
|
|
49
|
+
<SelectPrimitive.Icon
|
|
50
|
+
render={
|
|
51
|
+
<ChevronDownIcon className="pointer-events-none size-4 text-muted-foreground" />
|
|
52
|
+
}
|
|
53
|
+
/>
|
|
54
|
+
</SelectPrimitive.Trigger>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function SelectContent({
|
|
59
|
+
className,
|
|
60
|
+
children,
|
|
61
|
+
side = "bottom",
|
|
62
|
+
sideOffset = 4,
|
|
63
|
+
align = "center",
|
|
64
|
+
alignOffset = 0,
|
|
65
|
+
alignItemWithTrigger = true,
|
|
66
|
+
...props
|
|
67
|
+
}: SelectPrimitive.Popup.Props &
|
|
68
|
+
Pick<
|
|
69
|
+
SelectPrimitive.Positioner.Props,
|
|
70
|
+
"align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger"
|
|
71
|
+
>) {
|
|
72
|
+
return (
|
|
73
|
+
<SelectPrimitive.Portal>
|
|
74
|
+
<SelectPrimitive.Positioner
|
|
75
|
+
side={side}
|
|
76
|
+
sideOffset={sideOffset}
|
|
77
|
+
align={align}
|
|
78
|
+
alignOffset={alignOffset}
|
|
79
|
+
alignItemWithTrigger={alignItemWithTrigger}
|
|
80
|
+
className="isolate z-50"
|
|
81
|
+
>
|
|
82
|
+
<SelectPrimitive.Popup
|
|
83
|
+
data-slot="select-content"
|
|
84
|
+
data-align-trigger={alignItemWithTrigger}
|
|
85
|
+
className={cn(
|
|
86
|
+
"relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-3xl bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/5 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
87
|
+
className,
|
|
88
|
+
)}
|
|
89
|
+
{...props}
|
|
90
|
+
>
|
|
91
|
+
<SelectScrollUpButton />
|
|
92
|
+
<SelectPrimitive.List>{children}</SelectPrimitive.List>
|
|
93
|
+
<SelectScrollDownButton />
|
|
94
|
+
</SelectPrimitive.Popup>
|
|
95
|
+
</SelectPrimitive.Positioner>
|
|
96
|
+
</SelectPrimitive.Portal>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function SelectLabel({
|
|
101
|
+
className,
|
|
102
|
+
...props
|
|
103
|
+
}: SelectPrimitive.GroupLabel.Props) {
|
|
104
|
+
return (
|
|
105
|
+
<SelectPrimitive.GroupLabel
|
|
106
|
+
data-slot="select-label"
|
|
107
|
+
className={cn("px-3 py-2.5 text-xs text-muted-foreground", className)}
|
|
108
|
+
{...props}
|
|
109
|
+
/>
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function SelectItem({
|
|
114
|
+
className,
|
|
115
|
+
children,
|
|
116
|
+
...props
|
|
117
|
+
}: SelectPrimitive.Item.Props) {
|
|
118
|
+
return (
|
|
119
|
+
<SelectPrimitive.Item
|
|
120
|
+
data-slot="select-item"
|
|
121
|
+
className={cn(
|
|
122
|
+
"relative flex w-full cursor-default items-center gap-2.5 rounded-2xl py-2 pr-8 pl-3 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground 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",
|
|
123
|
+
className,
|
|
124
|
+
)}
|
|
125
|
+
{...props}
|
|
126
|
+
>
|
|
127
|
+
<SelectPrimitive.ItemText className="flex flex-1 shrink-0 gap-2 whitespace-nowrap">
|
|
128
|
+
{children}
|
|
129
|
+
</SelectPrimitive.ItemText>
|
|
130
|
+
<SelectPrimitive.ItemIndicator
|
|
131
|
+
render={
|
|
132
|
+
<span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center" />
|
|
133
|
+
}
|
|
134
|
+
>
|
|
135
|
+
<CheckIcon className="pointer-events-none" />
|
|
136
|
+
</SelectPrimitive.ItemIndicator>
|
|
137
|
+
</SelectPrimitive.Item>
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function SelectSeparator({
|
|
142
|
+
className,
|
|
143
|
+
...props
|
|
144
|
+
}: SelectPrimitive.Separator.Props) {
|
|
145
|
+
return (
|
|
146
|
+
<SelectPrimitive.Separator
|
|
147
|
+
data-slot="select-separator"
|
|
148
|
+
className={cn(
|
|
149
|
+
"pointer-events-none -mx-1.5 my-1.5 h-px bg-border",
|
|
150
|
+
className,
|
|
151
|
+
)}
|
|
152
|
+
{...props}
|
|
153
|
+
/>
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function SelectScrollUpButton({
|
|
158
|
+
className,
|
|
159
|
+
...props
|
|
160
|
+
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {
|
|
161
|
+
return (
|
|
162
|
+
<SelectPrimitive.ScrollUpArrow
|
|
163
|
+
data-slot="select-scroll-up-button"
|
|
164
|
+
className={cn(
|
|
165
|
+
"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
166
|
+
className,
|
|
167
|
+
)}
|
|
168
|
+
{...props}
|
|
169
|
+
>
|
|
170
|
+
<ChevronUpIcon />
|
|
171
|
+
</SelectPrimitive.ScrollUpArrow>
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function SelectScrollDownButton({
|
|
176
|
+
className,
|
|
177
|
+
...props
|
|
178
|
+
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {
|
|
179
|
+
return (
|
|
180
|
+
<SelectPrimitive.ScrollDownArrow
|
|
181
|
+
data-slot="select-scroll-down-button"
|
|
182
|
+
className={cn(
|
|
183
|
+
"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
184
|
+
className,
|
|
185
|
+
)}
|
|
186
|
+
{...props}
|
|
187
|
+
>
|
|
188
|
+
<ChevronDownIcon />
|
|
189
|
+
</SelectPrimitive.ScrollDownArrow>
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export {
|
|
194
|
+
Select,
|
|
195
|
+
SelectContent,
|
|
196
|
+
SelectGroup,
|
|
197
|
+
SelectItem,
|
|
198
|
+
SelectLabel,
|
|
199
|
+
SelectScrollDownButton,
|
|
200
|
+
SelectScrollUpButton,
|
|
201
|
+
SelectSeparator,
|
|
202
|
+
SelectTrigger,
|
|
203
|
+
SelectValue,
|
|
204
|
+
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
4
|
-
import { cn } from "cn";
|
|
5
|
-
|
|
6
|
-
function Separator({
|
|
7
|
-
className,
|
|
8
|
-
orientation = "horizontal",
|
|
9
|
-
...props
|
|
10
|
-
}: SeparatorPrimitive.Props) {
|
|
11
|
-
return (
|
|
12
|
-
<SeparatorPrimitive
|
|
13
|
-
data-slot="separator"
|
|
14
|
-
orientation={orientation}
|
|
15
|
-
className={cn(
|
|
16
|
-
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
|
|
17
|
-
className,
|
|
18
|
-
)}
|
|
19
|
-
{...props}
|
|
20
|
-
/>
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export { Separator };
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
4
|
+
import { cn } from "cn";
|
|
5
|
+
|
|
6
|
+
function Separator({
|
|
7
|
+
className,
|
|
8
|
+
orientation = "horizontal",
|
|
9
|
+
...props
|
|
10
|
+
}: SeparatorPrimitive.Props) {
|
|
11
|
+
return (
|
|
12
|
+
<SeparatorPrimitive
|
|
13
|
+
data-slot="separator"
|
|
14
|
+
orientation={orientation}
|
|
15
|
+
className={cn(
|
|
16
|
+
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
|
|
17
|
+
className,
|
|
18
|
+
)}
|
|
19
|
+
{...props}
|
|
20
|
+
/>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { Separator };
|