@betterstart/cli 0.1.28 → 0.1.30
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/{chunk-SAPJG4NO.js → chunk-6JCWMKSY.js} +7 -4
- package/dist/{chunk-SAPJG4NO.js.map → chunk-6JCWMKSY.js.map} +1 -1
- package/dist/cli.js +749 -866
- package/dist/cli.js.map +1 -1
- package/dist/drizzle-config-EDKOEZ6G.js +7 -0
- package/package.json +1 -1
- package/templates/ui/accordion.tsx +73 -42
- package/templates/ui/alert-dialog.tsx +155 -90
- package/templates/ui/alert.tsx +46 -26
- package/templates/ui/aspect-ratio.tsx +4 -2
- package/templates/ui/avatar.tsx +92 -43
- package/templates/ui/badge.tsx +27 -12
- package/templates/ui/breadcrumb.tsx +63 -60
- package/templates/ui/button-group.tsx +8 -8
- package/templates/ui/button.tsx +44 -26
- package/templates/ui/calendar.tsx +43 -34
- package/templates/ui/card.tsx +71 -34
- package/templates/ui/carousel.tsx +111 -115
- package/templates/ui/chart.tsx +197 -207
- package/templates/ui/checkbox.tsx +21 -20
- package/templates/ui/collapsible.tsx +14 -4
- package/templates/ui/combobox.tsx +272 -0
- package/templates/ui/command.tsx +139 -101
- package/templates/ui/context-menu.tsx +214 -156
- package/templates/ui/dialog.tsx +118 -77
- package/templates/ui/direction.tsx +20 -0
- package/templates/ui/drawer.tsx +89 -69
- package/templates/ui/dropdown-menu.tsx +228 -164
- package/templates/ui/empty.tsx +8 -5
- package/templates/ui/field.tsx +25 -32
- package/templates/ui/hover-card.tsx +29 -20
- package/templates/ui/input-group.tsx +20 -37
- package/templates/ui/input-otp.tsx +57 -42
- package/templates/ui/input.tsx +14 -17
- package/templates/ui/item.tsx +27 -17
- package/templates/ui/kbd.tsx +1 -3
- package/templates/ui/label.tsx +14 -14
- package/templates/ui/markdown-editor.tsx +1 -1
- package/templates/ui/menubar.tsx +220 -188
- package/templates/ui/native-select.tsx +42 -0
- package/templates/ui/navigation-menu.tsx +130 -90
- package/templates/ui/pagination.tsx +88 -73
- package/templates/ui/popover.tsx +67 -26
- package/templates/ui/progress.tsx +24 -18
- package/templates/ui/radio-group.tsx +26 -20
- package/templates/ui/resizable.tsx +29 -29
- package/templates/ui/scroll-area.tsx +47 -38
- package/templates/ui/select.tsx +158 -125
- package/templates/ui/separator.tsx +21 -19
- package/templates/ui/sheet.tsx +104 -95
- package/templates/ui/sidebar.tsx +77 -183
- package/templates/ui/skeleton.tsx +8 -2
- package/templates/ui/slider.tsx +46 -17
- package/templates/ui/sonner.tsx +19 -9
- package/templates/ui/spinner.tsx +2 -2
- package/templates/ui/switch.tsx +24 -20
- package/templates/ui/table.tsx +68 -73
- package/templates/ui/tabs.tsx +71 -46
- package/templates/ui/textarea.tsx +13 -16
- package/templates/ui/toggle-group.tsx +57 -28
- package/templates/ui/toggle.tsx +21 -20
- package/templates/ui/tooltip.tsx +44 -23
- package/dist/drizzle-config-KISB26BA.js +0 -7
- package/templates/ui/use-mobile.tsx +0 -19
- /package/dist/{drizzle-config-KISB26BA.js.map → drizzle-config-EDKOEZ6G.js.map} +0 -0
|
@@ -1,37 +1,43 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
3
|
import { cn } from '@cms/utils/cn'
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import * as React from 'react'
|
|
4
|
+
import { RadioGroup as RadioGroupPrimitive } from 'radix-ui'
|
|
5
|
+
import type * as React from 'react'
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
function RadioGroup({
|
|
8
|
+
className,
|
|
9
|
+
...props
|
|
10
|
+
}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {
|
|
11
|
+
return (
|
|
12
|
+
<RadioGroupPrimitive.Root
|
|
13
|
+
data-slot="radio-group"
|
|
14
|
+
className={cn('grid w-full gap-2', className)}
|
|
15
|
+
{...props}
|
|
16
|
+
/>
|
|
17
|
+
)
|
|
18
|
+
}
|
|
15
19
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
function RadioGroupItem({
|
|
21
|
+
className,
|
|
22
|
+
...props
|
|
23
|
+
}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {
|
|
20
24
|
return (
|
|
21
25
|
<RadioGroupPrimitive.Item
|
|
22
|
-
|
|
26
|
+
data-slot="radio-group-item"
|
|
23
27
|
className={cn(
|
|
24
|
-
'
|
|
28
|
+
'border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 dark:aria-invalid:border-destructive/50 group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3',
|
|
25
29
|
className
|
|
26
30
|
)}
|
|
27
31
|
{...props}
|
|
28
32
|
>
|
|
29
|
-
<RadioGroupPrimitive.Indicator
|
|
30
|
-
|
|
33
|
+
<RadioGroupPrimitive.Indicator
|
|
34
|
+
data-slot="radio-group-indicator"
|
|
35
|
+
className="flex size-4 items-center justify-center"
|
|
36
|
+
>
|
|
37
|
+
<span className="bg-primary-foreground absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full" />
|
|
31
38
|
</RadioGroupPrimitive.Indicator>
|
|
32
39
|
</RadioGroupPrimitive.Item>
|
|
33
40
|
)
|
|
34
|
-
}
|
|
35
|
-
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName
|
|
41
|
+
}
|
|
36
42
|
|
|
37
43
|
export { RadioGroup, RadioGroupItem }
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
3
|
import { cn } from '@cms/utils/cn'
|
|
4
|
-
import { GripVertical } from 'lucide-react'
|
|
5
4
|
import * as ResizablePrimitive from 'react-resizable-panels'
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
function ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps) {
|
|
7
|
+
return (
|
|
8
|
+
<ResizablePrimitive.Group
|
|
9
|
+
data-slot="resizable-panel-group"
|
|
10
|
+
className={cn('flex h-full w-full aria-[orientation=vertical]:flex-col', className)}
|
|
11
|
+
{...props}
|
|
12
|
+
/>
|
|
13
|
+
)
|
|
14
|
+
}
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {
|
|
17
|
+
return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />
|
|
18
|
+
}
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
function ResizableHandle({
|
|
20
21
|
withHandle,
|
|
21
22
|
className,
|
|
22
23
|
...props
|
|
23
|
-
}:
|
|
24
|
+
}: ResizablePrimitive.SeparatorProps & {
|
|
24
25
|
withHandle?: boolean
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
className
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
)
|
|
26
|
+
}) {
|
|
27
|
+
return (
|
|
28
|
+
<ResizablePrimitive.Separator
|
|
29
|
+
data-slot="resizable-handle"
|
|
30
|
+
className={cn(
|
|
31
|
+
'bg-border focus-visible:ring-ring ring-offset-background relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90',
|
|
32
|
+
className
|
|
33
|
+
)}
|
|
34
|
+
{...props}
|
|
35
|
+
>
|
|
36
|
+
{withHandle && <div className="bg-border z-10 flex h-6 w-1 shrink-0 rounded-lg" />}
|
|
37
|
+
</ResizablePrimitive.Separator>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
40
|
|
|
41
|
-
export {
|
|
41
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup }
|
|
@@ -1,45 +1,54 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
3
|
import { cn } from '@cms/utils/cn'
|
|
4
|
-
import
|
|
5
|
-
import * as React from 'react'
|
|
4
|
+
import { ScrollArea as ScrollAreaPrimitive } from 'radix-ui'
|
|
5
|
+
import type * as React from 'react'
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
7
|
+
function ScrollArea({
|
|
8
|
+
className,
|
|
9
|
+
children,
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
|
|
12
|
+
return (
|
|
13
|
+
<ScrollAreaPrimitive.Root
|
|
14
|
+
data-slot="scroll-area"
|
|
15
|
+
className={cn('relative', className)}
|
|
16
|
+
{...props}
|
|
17
|
+
>
|
|
18
|
+
<ScrollAreaPrimitive.Viewport
|
|
19
|
+
data-slot="scroll-area-viewport"
|
|
20
|
+
className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
|
|
21
|
+
>
|
|
22
|
+
{children}
|
|
23
|
+
</ScrollAreaPrimitive.Viewport>
|
|
24
|
+
<ScrollBar />
|
|
25
|
+
<ScrollAreaPrimitive.Corner />
|
|
26
|
+
</ScrollAreaPrimitive.Root>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
24
29
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
orientation
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
30
|
+
function ScrollBar({
|
|
31
|
+
className,
|
|
32
|
+
orientation = 'vertical',
|
|
33
|
+
...props
|
|
34
|
+
}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
|
|
35
|
+
return (
|
|
36
|
+
<ScrollAreaPrimitive.ScrollAreaScrollbar
|
|
37
|
+
data-slot="scroll-area-scrollbar"
|
|
38
|
+
data-orientation={orientation}
|
|
39
|
+
orientation={orientation}
|
|
40
|
+
className={cn(
|
|
41
|
+
'flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent',
|
|
42
|
+
className
|
|
43
|
+
)}
|
|
44
|
+
{...props}
|
|
45
|
+
>
|
|
46
|
+
<ScrollAreaPrimitive.ScrollAreaThumb
|
|
47
|
+
data-slot="scroll-area-thumb"
|
|
48
|
+
className="bg-border relative flex-1 rounded-full"
|
|
49
|
+
/>
|
|
50
|
+
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
44
53
|
|
|
45
54
|
export { ScrollArea, ScrollBar }
|
package/templates/ui/select.tsx
CHANGED
|
@@ -1,151 +1,184 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
3
|
import { cn } from '@cms/utils/cn'
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import * as React from 'react'
|
|
4
|
+
import { Check, ChevronDown, ChevronsUpDown, ChevronUp } from 'lucide-react'
|
|
5
|
+
import { Select as SelectPrimitive } from 'radix-ui'
|
|
6
|
+
import type * as React from 'react'
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const SelectValue = SelectPrimitive.Value
|
|
13
|
-
|
|
14
|
-
const SelectTrigger = React.forwardRef<
|
|
15
|
-
React.ElementRef<typeof SelectPrimitive.Trigger>,
|
|
16
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
|
|
17
|
-
>(({ className, children, ...props }, ref) => (
|
|
18
|
-
<SelectPrimitive.Trigger
|
|
19
|
-
ref={ref}
|
|
20
|
-
className={cn(
|
|
21
|
-
'flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input-border bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',
|
|
22
|
-
className
|
|
23
|
-
)}
|
|
24
|
-
{...props}
|
|
25
|
-
>
|
|
26
|
-
{children}
|
|
27
|
-
<SelectPrimitive.Icon asChild>
|
|
28
|
-
<ChevronDown className="size-4 opacity-50" />
|
|
29
|
-
</SelectPrimitive.Icon>
|
|
30
|
-
</SelectPrimitive.Trigger>
|
|
31
|
-
))
|
|
32
|
-
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName
|
|
8
|
+
function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {
|
|
9
|
+
return <SelectPrimitive.Root data-slot="select" {...props} />
|
|
10
|
+
}
|
|
33
11
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
<ChevronUp className="size-4" />
|
|
44
|
-
</SelectPrimitive.ScrollUpButton>
|
|
45
|
-
))
|
|
46
|
-
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName
|
|
12
|
+
function SelectGroup({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {
|
|
13
|
+
return (
|
|
14
|
+
<SelectPrimitive.Group
|
|
15
|
+
data-slot="select-group"
|
|
16
|
+
className={cn('scroll-my-1 p-1', className)}
|
|
17
|
+
{...props}
|
|
18
|
+
/>
|
|
19
|
+
)
|
|
20
|
+
}
|
|
47
21
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
>(({ className, ...props }, ref) => (
|
|
52
|
-
<SelectPrimitive.ScrollDownButton
|
|
53
|
-
ref={ref}
|
|
54
|
-
className={cn('flex cursor-default items-center justify-center py-1', className)}
|
|
55
|
-
{...props}
|
|
56
|
-
>
|
|
57
|
-
<ChevronDown className="size-4" />
|
|
58
|
-
</SelectPrimitive.ScrollDownButton>
|
|
59
|
-
))
|
|
60
|
-
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName
|
|
22
|
+
function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {
|
|
23
|
+
return <SelectPrimitive.Value data-slot="select-value" {...props} />
|
|
24
|
+
}
|
|
61
25
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
26
|
+
function SelectTrigger({
|
|
27
|
+
className,
|
|
28
|
+
size = 'default',
|
|
29
|
+
children,
|
|
30
|
+
...props
|
|
31
|
+
}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
32
|
+
size?: 'sm' | 'default'
|
|
33
|
+
}) {
|
|
34
|
+
return (
|
|
35
|
+
<SelectPrimitive.Trigger
|
|
36
|
+
data-slot="select-trigger"
|
|
37
|
+
data-size={size}
|
|
69
38
|
className={cn(
|
|
70
|
-
|
|
71
|
-
position === 'popper' &&
|
|
72
|
-
'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
|
|
39
|
+
"border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 flex w-fit items-center justify-between gap-1.5 rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *: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 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
73
40
|
className
|
|
74
41
|
)}
|
|
75
|
-
position={position}
|
|
76
42
|
{...props}
|
|
77
43
|
>
|
|
78
|
-
|
|
79
|
-
<SelectPrimitive.
|
|
44
|
+
{children}
|
|
45
|
+
<SelectPrimitive.Icon asChild>
|
|
46
|
+
<ChevronsUpDown className="text-muted-foreground pointer-events-none size-4" />
|
|
47
|
+
</SelectPrimitive.Icon>
|
|
48
|
+
</SelectPrimitive.Trigger>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function SelectContent({
|
|
53
|
+
className,
|
|
54
|
+
children,
|
|
55
|
+
position = 'item-aligned',
|
|
56
|
+
align = 'center',
|
|
57
|
+
...props
|
|
58
|
+
}: React.ComponentProps<typeof SelectPrimitive.Content>) {
|
|
59
|
+
return (
|
|
60
|
+
<SelectPrimitive.Portal>
|
|
61
|
+
<SelectPrimitive.Content
|
|
62
|
+
data-slot="select-content"
|
|
63
|
+
data-align-trigger={position === 'item-aligned'}
|
|
80
64
|
className={cn(
|
|
81
|
-
'
|
|
65
|
+
'bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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 ring-foreground/10 relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg shadow-md ring-1 duration-100 data-[align-trigger=true]:animate-none',
|
|
82
66
|
position === 'popper' &&
|
|
83
|
-
'
|
|
67
|
+
'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
|
|
68
|
+
className
|
|
84
69
|
)}
|
|
70
|
+
position={position}
|
|
71
|
+
align={align}
|
|
72
|
+
{...props}
|
|
85
73
|
>
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
74
|
+
<SelectScrollUpButton />
|
|
75
|
+
<SelectPrimitive.Viewport
|
|
76
|
+
data-position={position}
|
|
77
|
+
className={cn(
|
|
78
|
+
'data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)',
|
|
79
|
+
position === 'popper' && ''
|
|
80
|
+
)}
|
|
81
|
+
>
|
|
82
|
+
{children}
|
|
83
|
+
</SelectPrimitive.Viewport>
|
|
84
|
+
<SelectScrollDownButton />
|
|
85
|
+
</SelectPrimitive.Content>
|
|
86
|
+
</SelectPrimitive.Portal>
|
|
87
|
+
)
|
|
88
|
+
}
|
|
93
89
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
90
|
+
function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {
|
|
91
|
+
return (
|
|
92
|
+
<SelectPrimitive.Label
|
|
93
|
+
data-slot="select-label"
|
|
94
|
+
className={cn('text-muted-foreground px-1.5 py-1 text-xs', className)}
|
|
95
|
+
{...props}
|
|
96
|
+
/>
|
|
97
|
+
)
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function SelectItem({
|
|
101
|
+
className,
|
|
102
|
+
children,
|
|
103
|
+
...props
|
|
104
|
+
}: React.ComponentProps<typeof SelectPrimitive.Item>) {
|
|
105
|
+
return (
|
|
106
|
+
<SelectPrimitive.Item
|
|
107
|
+
data-slot="select-item"
|
|
108
|
+
className={cn(
|
|
109
|
+
"focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 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",
|
|
110
|
+
className
|
|
111
|
+
)}
|
|
112
|
+
{...props}
|
|
113
|
+
>
|
|
114
|
+
<span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center">
|
|
115
|
+
<SelectPrimitive.ItemIndicator>
|
|
116
|
+
<Check className="pointer-events-none" />
|
|
117
|
+
</SelectPrimitive.ItemIndicator>
|
|
118
|
+
</span>
|
|
119
|
+
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
120
|
+
</SelectPrimitive.Item>
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function SelectSeparator({
|
|
125
|
+
className,
|
|
126
|
+
...props
|
|
127
|
+
}: React.ComponentProps<typeof SelectPrimitive.Separator>) {
|
|
128
|
+
return (
|
|
129
|
+
<SelectPrimitive.Separator
|
|
130
|
+
data-slot="select-separator"
|
|
131
|
+
className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}
|
|
132
|
+
{...props}
|
|
133
|
+
/>
|
|
134
|
+
)
|
|
135
|
+
}
|
|
105
136
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
<
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
124
|
-
</SelectPrimitive.Item>
|
|
125
|
-
))
|
|
126
|
-
SelectItem.displayName = SelectPrimitive.Item.displayName
|
|
137
|
+
function SelectScrollUpButton({
|
|
138
|
+
className,
|
|
139
|
+
...props
|
|
140
|
+
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
|
|
141
|
+
return (
|
|
142
|
+
<SelectPrimitive.ScrollUpButton
|
|
143
|
+
data-slot="select-scroll-up-button"
|
|
144
|
+
className={cn(
|
|
145
|
+
"bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
146
|
+
className
|
|
147
|
+
)}
|
|
148
|
+
{...props}
|
|
149
|
+
>
|
|
150
|
+
<ChevronUp />
|
|
151
|
+
</SelectPrimitive.ScrollUpButton>
|
|
152
|
+
)
|
|
153
|
+
}
|
|
127
154
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
155
|
+
function SelectScrollDownButton({
|
|
156
|
+
className,
|
|
157
|
+
...props
|
|
158
|
+
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
|
|
159
|
+
return (
|
|
160
|
+
<SelectPrimitive.ScrollDownButton
|
|
161
|
+
data-slot="select-scroll-down-button"
|
|
162
|
+
className={cn(
|
|
163
|
+
"bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
164
|
+
className
|
|
165
|
+
)}
|
|
166
|
+
{...props}
|
|
167
|
+
>
|
|
168
|
+
<ChevronDown />
|
|
169
|
+
</SelectPrimitive.ScrollDownButton>
|
|
170
|
+
)
|
|
171
|
+
}
|
|
139
172
|
|
|
140
173
|
export {
|
|
141
174
|
Select,
|
|
142
|
-
SelectGroup,
|
|
143
|
-
SelectValue,
|
|
144
|
-
SelectTrigger,
|
|
145
175
|
SelectContent,
|
|
146
|
-
|
|
176
|
+
SelectGroup,
|
|
147
177
|
SelectItem,
|
|
148
|
-
|
|
178
|
+
SelectLabel,
|
|
179
|
+
SelectScrollDownButton,
|
|
149
180
|
SelectScrollUpButton,
|
|
150
|
-
|
|
181
|
+
SelectSeparator,
|
|
182
|
+
SelectTrigger,
|
|
183
|
+
SelectValue
|
|
151
184
|
}
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
3
|
import { cn } from '@cms/utils/cn'
|
|
4
|
-
import
|
|
5
|
-
import * as React from 'react'
|
|
4
|
+
import { Separator as SeparatorPrimitive } from 'radix-ui'
|
|
5
|
+
import type * as React from 'react'
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
orientation
|
|
18
|
-
className
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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"
|
|
16
|
+
decorative={decorative}
|
|
17
|
+
orientation={orientation}
|
|
18
|
+
className={cn(
|
|
19
|
+
'bg-border shrink-0 data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch',
|
|
20
|
+
className
|
|
21
|
+
)}
|
|
22
|
+
{...props}
|
|
23
|
+
/>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
24
26
|
|
|
25
27
|
export { Separator }
|