@autono/create-open-pages 0.4.0 → 0.6.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/dist/cli.js +30 -2
- package/package.json +1 -1
- package/template/.agents/skills/create-page/SKILL.md +1 -1
- package/template/.agents/skills/page-authoring/SKILL.md +2 -2
- package/template/.agents/skills/page-authoring/references/interactivity.md +13 -21
- package/template/README.md +2 -1
- package/template/components.json +19 -3
- package/template/package.json +7 -7
- package/template/styles/globals.css +83 -66
- package/template/ui/accordion.tsx +22 -7
- package/template/ui/alert-dialog.tsx +22 -21
- package/template/ui/alert.tsx +15 -5
- package/template/ui/avatar.tsx +7 -4
- package/template/ui/badge.tsx +8 -7
- package/template/ui/breadcrumb.tsx +21 -8
- package/template/ui/button-group.tsx +5 -5
- package/template/ui/button.tsx +18 -15
- package/template/ui/calendar.tsx +28 -24
- package/template/ui/card.tsx +17 -6
- package/template/ui/carousel.tsx +10 -11
- package/template/ui/chart.tsx +1 -2
- package/template/ui/checkbox.tsx +5 -6
- package/template/ui/collapsible.tsx +2 -0
- package/template/ui/combobox.tsx +9 -20
- package/template/ui/command.tsx +39 -26
- package/template/ui/context-menu.tsx +69 -60
- package/template/ui/dialog.tsx +26 -14
- package/template/ui/drawer.tsx +8 -9
- package/template/ui/dropdown-menu.tsx +34 -22
- package/template/ui/empty.tsx +8 -8
- package/template/ui/field.tsx +15 -25
- package/template/ui/hover-card.tsx +1 -1
- package/template/ui/input-group.tsx +10 -24
- package/template/ui/input-otp.tsx +16 -6
- package/template/ui/input.tsx +1 -3
- package/template/ui/item.tsx +17 -14
- package/template/ui/kbd.tsx +1 -3
- package/template/ui/menubar.tsx +28 -24
- package/template/ui/message-scroller.tsx +5 -4
- package/template/ui/native-select.tsx +13 -14
- package/template/ui/navigation-menu.tsx +8 -12
- package/template/ui/pagination.tsx +35 -33
- package/template/ui/popover.tsx +5 -5
- package/template/ui/progress.tsx +2 -2
- package/template/ui/radio-group.tsx +4 -5
- package/template/ui/resizable.tsx +2 -5
- package/template/ui/scroll-area.tsx +2 -5
- package/template/ui/select.tsx +26 -24
- package/template/ui/separator.tsx +1 -1
- package/template/ui/sheet.tsx +20 -16
- package/template/ui/sidebar.tsx +39 -63
- package/template/ui/skeleton.tsx +1 -1
- package/template/ui/slider.tsx +6 -8
- package/template/ui/sonner.tsx +21 -14
- package/template/ui/spinner.tsx +2 -8
- package/template/ui/switch.tsx +4 -4
- package/template/ui/table.tsx +2 -4
- package/template/ui/tabs.tsx +9 -8
- package/template/ui/textarea.tsx +1 -1
- package/template/ui/toggle-group.tsx +14 -8
- package/template/ui/toggle.tsx +8 -10
- package/template/ui/tooltip.tsx +4 -2
- package/template/ui/form.tsx +0 -167
package/template/ui/select.tsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
3
|
import * as React from "react"
|
|
4
|
-
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"
|
|
5
4
|
import { Select as SelectPrimitive } from "radix-ui"
|
|
6
5
|
|
|
7
6
|
import { cn } from "@/lib/utils"
|
|
7
|
+
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react"
|
|
8
8
|
|
|
9
9
|
function Select({
|
|
10
10
|
...props
|
|
@@ -13,9 +13,16 @@ function Select({
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
function SelectGroup({
|
|
16
|
+
className,
|
|
16
17
|
...props
|
|
17
18
|
}: React.ComponentProps<typeof SelectPrimitive.Group>) {
|
|
18
|
-
return
|
|
19
|
+
return (
|
|
20
|
+
<SelectPrimitive.Group
|
|
21
|
+
data-slot="select-group"
|
|
22
|
+
className={cn("scroll-my-1 p-1", className)}
|
|
23
|
+
{...props}
|
|
24
|
+
/>
|
|
25
|
+
)
|
|
19
26
|
}
|
|
20
27
|
|
|
21
28
|
function SelectValue({
|
|
@@ -37,14 +44,14 @@ function SelectTrigger({
|
|
|
37
44
|
data-slot="select-trigger"
|
|
38
45
|
data-size={size}
|
|
39
46
|
className={cn(
|
|
40
|
-
"flex w-fit items-center justify-between gap-
|
|
47
|
+
"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 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-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 dark:bg-input/30 dark:hover:bg-input/50 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",
|
|
41
48
|
className
|
|
42
49
|
)}
|
|
43
50
|
{...props}
|
|
44
51
|
>
|
|
45
52
|
{children}
|
|
46
53
|
<SelectPrimitive.Icon asChild>
|
|
47
|
-
<ChevronDownIcon className="size-4
|
|
54
|
+
<ChevronDownIcon className="pointer-events-none size-4 text-muted-foreground" />
|
|
48
55
|
</SelectPrimitive.Icon>
|
|
49
56
|
</SelectPrimitive.Trigger>
|
|
50
57
|
)
|
|
@@ -61,22 +68,18 @@ function SelectContent({
|
|
|
61
68
|
<SelectPrimitive.Portal>
|
|
62
69
|
<SelectPrimitive.Content
|
|
63
70
|
data-slot="select-content"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
position === "popper" &&
|
|
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
|
|
69
|
-
)}
|
|
71
|
+
data-align-trigger={position === "item-aligned"}
|
|
72
|
+
className={cn("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 bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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 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", position ==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className )}
|
|
70
73
|
position={position}
|
|
71
74
|
align={align}
|
|
72
75
|
{...props}
|
|
73
76
|
>
|
|
74
77
|
<SelectScrollUpButton />
|
|
75
78
|
<SelectPrimitive.Viewport
|
|
79
|
+
data-position={position}
|
|
76
80
|
className={cn(
|
|
77
|
-
"
|
|
78
|
-
position === "popper" &&
|
|
79
|
-
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
81
|
+
"data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",
|
|
82
|
+
position === "popper" && ""
|
|
80
83
|
)}
|
|
81
84
|
>
|
|
82
85
|
{children}
|
|
@@ -94,7 +97,7 @@ function SelectLabel({
|
|
|
94
97
|
return (
|
|
95
98
|
<SelectPrimitive.Label
|
|
96
99
|
data-slot="select-label"
|
|
97
|
-
className={cn("px-
|
|
100
|
+
className={cn("px-1.5 py-1 text-xs text-muted-foreground", className)}
|
|
98
101
|
{...props}
|
|
99
102
|
/>
|
|
100
103
|
)
|
|
@@ -109,17 +112,14 @@ function SelectItem({
|
|
|
109
112
|
<SelectPrimitive.Item
|
|
110
113
|
data-slot="select-item"
|
|
111
114
|
className={cn(
|
|
112
|
-
"relative flex w-full cursor-default items-center gap-
|
|
115
|
+
"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 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",
|
|
113
116
|
className
|
|
114
117
|
)}
|
|
115
118
|
{...props}
|
|
116
119
|
>
|
|
117
|
-
<span
|
|
118
|
-
data-slot="select-item-indicator"
|
|
119
|
-
className="absolute right-2 flex size-3.5 items-center justify-center"
|
|
120
|
-
>
|
|
120
|
+
<span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center">
|
|
121
121
|
<SelectPrimitive.ItemIndicator>
|
|
122
|
-
<CheckIcon className="
|
|
122
|
+
<CheckIcon className="pointer-events-none" />
|
|
123
123
|
</SelectPrimitive.ItemIndicator>
|
|
124
124
|
</span>
|
|
125
125
|
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
@@ -148,12 +148,13 @@ function SelectScrollUpButton({
|
|
|
148
148
|
<SelectPrimitive.ScrollUpButton
|
|
149
149
|
data-slot="select-scroll-up-button"
|
|
150
150
|
className={cn(
|
|
151
|
-
"flex cursor-default items-center justify-center py-1",
|
|
151
|
+
"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
152
152
|
className
|
|
153
153
|
)}
|
|
154
154
|
{...props}
|
|
155
155
|
>
|
|
156
|
-
<ChevronUpIcon
|
|
156
|
+
<ChevronUpIcon
|
|
157
|
+
/>
|
|
157
158
|
</SelectPrimitive.ScrollUpButton>
|
|
158
159
|
)
|
|
159
160
|
}
|
|
@@ -166,12 +167,13 @@ function SelectScrollDownButton({
|
|
|
166
167
|
<SelectPrimitive.ScrollDownButton
|
|
167
168
|
data-slot="select-scroll-down-button"
|
|
168
169
|
className={cn(
|
|
169
|
-
"flex cursor-default items-center justify-center py-1",
|
|
170
|
+
"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
170
171
|
className
|
|
171
172
|
)}
|
|
172
173
|
{...props}
|
|
173
174
|
>
|
|
174
|
-
<ChevronDownIcon
|
|
175
|
+
<ChevronDownIcon
|
|
176
|
+
/>
|
|
175
177
|
</SelectPrimitive.ScrollDownButton>
|
|
176
178
|
)
|
|
177
179
|
}
|
|
@@ -15,7 +15,7 @@ function Separator({
|
|
|
15
15
|
decorative={decorative}
|
|
16
16
|
orientation={orientation}
|
|
17
17
|
className={cn(
|
|
18
|
-
"shrink-0 bg-border data-
|
|
18
|
+
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
|
|
19
19
|
className
|
|
20
20
|
)}
|
|
21
21
|
{...props}
|
package/template/ui/sheet.tsx
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
3
|
import * as React from "react"
|
|
4
|
-
import { XIcon } from "lucide-react"
|
|
5
4
|
import { Dialog as SheetPrimitive } from "radix-ui"
|
|
6
5
|
|
|
7
6
|
import { cn } from "@/lib/utils"
|
|
7
|
+
import { Button } from "@/ui/button"
|
|
8
|
+
import { XIcon } from "lucide-react"
|
|
8
9
|
|
|
9
10
|
function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
|
|
10
11
|
return <SheetPrimitive.Root data-slot="sheet" {...props} />
|
|
@@ -36,7 +37,7 @@ function SheetOverlay({
|
|
|
36
37
|
<SheetPrimitive.Overlay
|
|
37
38
|
data-slot="sheet-overlay"
|
|
38
39
|
className={cn(
|
|
39
|
-
"fixed inset-0 z-50 bg-black/
|
|
40
|
+
"fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
40
41
|
className
|
|
41
42
|
)}
|
|
42
43
|
{...props}
|
|
@@ -59,25 +60,25 @@ function SheetContent({
|
|
|
59
60
|
<SheetOverlay />
|
|
60
61
|
<SheetPrimitive.Content
|
|
61
62
|
data-slot="sheet-content"
|
|
63
|
+
data-side={side}
|
|
62
64
|
className={cn(
|
|
63
|
-
"fixed z-50 flex flex-col gap-4 bg-
|
|
64
|
-
side === "right" &&
|
|
65
|
-
"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
|
|
66
|
-
side === "left" &&
|
|
67
|
-
"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
68
|
-
side === "top" &&
|
|
69
|
-
"inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
70
|
-
side === "bottom" &&
|
|
71
|
-
"inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
65
|
+
"fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",
|
|
72
66
|
className
|
|
73
67
|
)}
|
|
74
68
|
{...props}
|
|
75
69
|
>
|
|
76
70
|
{children}
|
|
77
71
|
{showCloseButton && (
|
|
78
|
-
<SheetPrimitive.Close
|
|
79
|
-
<
|
|
80
|
-
|
|
72
|
+
<SheetPrimitive.Close data-slot="sheet-close" asChild>
|
|
73
|
+
<Button
|
|
74
|
+
variant="ghost"
|
|
75
|
+
className="absolute top-3 right-3"
|
|
76
|
+
size="icon-sm"
|
|
77
|
+
>
|
|
78
|
+
<XIcon
|
|
79
|
+
/>
|
|
80
|
+
<span className="sr-only">Close</span>
|
|
81
|
+
</Button>
|
|
81
82
|
</SheetPrimitive.Close>
|
|
82
83
|
)}
|
|
83
84
|
</SheetPrimitive.Content>
|
|
@@ -89,7 +90,7 @@ function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
89
90
|
return (
|
|
90
91
|
<div
|
|
91
92
|
data-slot="sheet-header"
|
|
92
|
-
className={cn("flex flex-col gap-
|
|
93
|
+
className={cn("flex flex-col gap-0.5 p-4", className)}
|
|
93
94
|
{...props}
|
|
94
95
|
/>
|
|
95
96
|
)
|
|
@@ -112,7 +113,10 @@ function SheetTitle({
|
|
|
112
113
|
return (
|
|
113
114
|
<SheetPrimitive.Title
|
|
114
115
|
data-slot="sheet-title"
|
|
115
|
-
className={cn(
|
|
116
|
+
className={cn(
|
|
117
|
+
"font-heading text-base font-medium text-foreground",
|
|
118
|
+
className
|
|
119
|
+
)}
|
|
116
120
|
{...props}
|
|
117
121
|
/>
|
|
118
122
|
)
|
package/template/ui/sidebar.tsx
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from "react"
|
|
4
4
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
5
|
-
import { PanelLeftIcon } from "lucide-react"
|
|
6
5
|
import { Slot } from "radix-ui"
|
|
7
6
|
|
|
8
7
|
import { useIsMobile } from "@/hooks/use-mobile"
|
|
@@ -21,9 +20,9 @@ import { Skeleton } from "@/ui/skeleton"
|
|
|
21
20
|
import {
|
|
22
21
|
Tooltip,
|
|
23
22
|
TooltipContent,
|
|
24
|
-
TooltipProvider,
|
|
25
23
|
TooltipTrigger,
|
|
26
24
|
} from "@/ui/tooltip"
|
|
25
|
+
import { PanelLeftIcon } from "lucide-react"
|
|
27
26
|
|
|
28
27
|
const SIDEBAR_COOKIE_NAME = "sidebar_state"
|
|
29
28
|
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7
|
|
@@ -128,25 +127,23 @@ function SidebarProvider({
|
|
|
128
127
|
|
|
129
128
|
return (
|
|
130
129
|
<SidebarContext.Provider value={contextValue}>
|
|
131
|
-
<
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
</div>
|
|
149
|
-
</TooltipProvider>
|
|
130
|
+
<div
|
|
131
|
+
data-slot="sidebar-wrapper"
|
|
132
|
+
style={
|
|
133
|
+
{
|
|
134
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
135
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
136
|
+
...style,
|
|
137
|
+
} as React.CSSProperties
|
|
138
|
+
}
|
|
139
|
+
className={cn(
|
|
140
|
+
"group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",
|
|
141
|
+
className
|
|
142
|
+
)}
|
|
143
|
+
{...props}
|
|
144
|
+
>
|
|
145
|
+
{children}
|
|
146
|
+
</div>
|
|
150
147
|
</SidebarContext.Provider>
|
|
151
148
|
)
|
|
152
149
|
}
|
|
@@ -157,6 +154,7 @@ function Sidebar({
|
|
|
157
154
|
collapsible = "offcanvas",
|
|
158
155
|
className,
|
|
159
156
|
children,
|
|
157
|
+
dir,
|
|
160
158
|
...props
|
|
161
159
|
}: React.ComponentProps<"div"> & {
|
|
162
160
|
side?: "left" | "right"
|
|
@@ -184,6 +182,7 @@ function Sidebar({
|
|
|
184
182
|
return (
|
|
185
183
|
<Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>
|
|
186
184
|
<SheetContent
|
|
185
|
+
dir={dir}
|
|
187
186
|
data-sidebar="sidebar"
|
|
188
187
|
data-slot="sidebar"
|
|
189
188
|
data-mobile="true"
|
|
@@ -228,11 +227,9 @@ function Sidebar({
|
|
|
228
227
|
/>
|
|
229
228
|
<div
|
|
230
229
|
data-slot="sidebar-container"
|
|
230
|
+
data-side={side}
|
|
231
231
|
className={cn(
|
|
232
|
-
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
233
|
-
side === "left"
|
|
234
|
-
? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]"
|
|
235
|
-
: "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
232
|
+
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",
|
|
236
233
|
// Adjust the padding for floating and inset variants.
|
|
237
234
|
variant === "floating" || variant === "inset"
|
|
238
235
|
? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]"
|
|
@@ -244,7 +241,7 @@ function Sidebar({
|
|
|
244
241
|
<div
|
|
245
242
|
data-sidebar="sidebar"
|
|
246
243
|
data-slot="sidebar-inner"
|
|
247
|
-
className="flex
|
|
244
|
+
className="flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border"
|
|
248
245
|
>
|
|
249
246
|
{children}
|
|
250
247
|
</div>
|
|
@@ -265,8 +262,8 @@ function SidebarTrigger({
|
|
|
265
262
|
data-sidebar="trigger"
|
|
266
263
|
data-slot="sidebar-trigger"
|
|
267
264
|
variant="ghost"
|
|
268
|
-
size="icon"
|
|
269
|
-
className={cn(
|
|
265
|
+
size="icon-sm"
|
|
266
|
+
className={cn(className)}
|
|
270
267
|
onClick={(event) => {
|
|
271
268
|
onClick?.(event)
|
|
272
269
|
toggleSidebar()
|
|
@@ -291,7 +288,7 @@ function SidebarRail({ className, ...props }: React.ComponentProps<"button">) {
|
|
|
291
288
|
onClick={toggleSidebar}
|
|
292
289
|
title="Toggle Sidebar"
|
|
293
290
|
className={cn(
|
|
294
|
-
"absolute inset-y-0 z-20 hidden w-4
|
|
291
|
+
"absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2",
|
|
295
292
|
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
296
293
|
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
297
294
|
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar",
|
|
@@ -309,8 +306,7 @@ function SidebarInset({ className, ...props }: React.ComponentProps<"main">) {
|
|
|
309
306
|
<main
|
|
310
307
|
data-slot="sidebar-inset"
|
|
311
308
|
className={cn(
|
|
312
|
-
"relative flex w-full flex-1 flex-col bg-background",
|
|
313
|
-
"md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
|
|
309
|
+
"relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
|
|
314
310
|
className
|
|
315
311
|
)}
|
|
316
312
|
{...props}
|
|
@@ -374,7 +370,7 @@ function SidebarContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
374
370
|
data-slot="sidebar-content"
|
|
375
371
|
data-sidebar="content"
|
|
376
372
|
className={cn(
|
|
377
|
-
"flex min-h-0 flex-1 flex-col gap-
|
|
373
|
+
"no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
378
374
|
className
|
|
379
375
|
)}
|
|
380
376
|
{...props}
|
|
@@ -405,8 +401,7 @@ function SidebarGroupLabel({
|
|
|
405
401
|
data-slot="sidebar-group-label"
|
|
406
402
|
data-sidebar="group-label"
|
|
407
403
|
className={cn(
|
|
408
|
-
"flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
409
|
-
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
404
|
+
"flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
410
405
|
className
|
|
411
406
|
)}
|
|
412
407
|
{...props}
|
|
@@ -426,10 +421,7 @@ function SidebarGroupAction({
|
|
|
426
421
|
data-slot="sidebar-group-action"
|
|
427
422
|
data-sidebar="group-action"
|
|
428
423
|
className={cn(
|
|
429
|
-
"absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
430
|
-
// Increases the hit area of the button on mobile.
|
|
431
|
-
"after:absolute after:-inset-2 md:after:hidden",
|
|
432
|
-
"group-data-[collapsible=icon]:hidden",
|
|
424
|
+
"absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",
|
|
433
425
|
className
|
|
434
426
|
)}
|
|
435
427
|
{...props}
|
|
@@ -456,7 +448,7 @@ function SidebarMenu({ className, ...props }: React.ComponentProps<"ul">) {
|
|
|
456
448
|
<ul
|
|
457
449
|
data-slot="sidebar-menu"
|
|
458
450
|
data-sidebar="menu"
|
|
459
|
-
className={cn("flex w-full min-w-0 flex-col gap-
|
|
451
|
+
className={cn("flex w-full min-w-0 flex-col gap-0", className)}
|
|
460
452
|
{...props}
|
|
461
453
|
/>
|
|
462
454
|
)
|
|
@@ -474,7 +466,7 @@ function SidebarMenuItem({ className, ...props }: React.ComponentProps<"li">) {
|
|
|
474
466
|
}
|
|
475
467
|
|
|
476
468
|
const sidebarMenuButtonVariants = cva(
|
|
477
|
-
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-
|
|
469
|
+
"peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",
|
|
478
470
|
{
|
|
479
471
|
variants: {
|
|
480
472
|
variant: {
|
|
@@ -561,15 +553,9 @@ function SidebarMenuAction({
|
|
|
561
553
|
data-slot="sidebar-menu-action"
|
|
562
554
|
data-sidebar="menu-action"
|
|
563
555
|
className={cn(
|
|
564
|
-
"absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
565
|
-
// Increases the hit area of the button on mobile.
|
|
566
|
-
"after:absolute after:-inset-2 md:after:hidden",
|
|
567
|
-
"peer-data-[size=sm]/menu-button:top-1",
|
|
568
|
-
"peer-data-[size=default]/menu-button:top-1.5",
|
|
569
|
-
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
570
|
-
"group-data-[collapsible=icon]:hidden",
|
|
556
|
+
"absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",
|
|
571
557
|
showOnHover &&
|
|
572
|
-
"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-
|
|
558
|
+
"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0",
|
|
573
559
|
className
|
|
574
560
|
)}
|
|
575
561
|
{...props}
|
|
@@ -586,12 +572,7 @@ function SidebarMenuBadge({
|
|
|
586
572
|
data-slot="sidebar-menu-badge"
|
|
587
573
|
data-sidebar="menu-badge"
|
|
588
574
|
className={cn(
|
|
589
|
-
"pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none",
|
|
590
|
-
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
591
|
-
"peer-data-[size=sm]/menu-button:top-1",
|
|
592
|
-
"peer-data-[size=default]/menu-button:top-1.5",
|
|
593
|
-
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
594
|
-
"group-data-[collapsible=icon]:hidden",
|
|
575
|
+
"pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground",
|
|
595
576
|
className
|
|
596
577
|
)}
|
|
597
578
|
{...props}
|
|
@@ -607,9 +588,9 @@ function SidebarMenuSkeleton({
|
|
|
607
588
|
showIcon?: boolean
|
|
608
589
|
}) {
|
|
609
590
|
// Random width between 50 to 90%.
|
|
610
|
-
const width = React.
|
|
591
|
+
const [width] = React.useState(() => {
|
|
611
592
|
return `${Math.floor(Math.random() * 40) + 50}%`
|
|
612
|
-
}
|
|
593
|
+
})
|
|
613
594
|
|
|
614
595
|
return (
|
|
615
596
|
<div
|
|
@@ -643,8 +624,7 @@ function SidebarMenuSub({ className, ...props }: React.ComponentProps<"ul">) {
|
|
|
643
624
|
data-slot="sidebar-menu-sub"
|
|
644
625
|
data-sidebar="menu-sub"
|
|
645
626
|
className={cn(
|
|
646
|
-
"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5",
|
|
647
|
-
"group-data-[collapsible=icon]:hidden",
|
|
627
|
+
"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",
|
|
648
628
|
className
|
|
649
629
|
)}
|
|
650
630
|
{...props}
|
|
@@ -686,11 +666,7 @@ function SidebarMenuSubButton({
|
|
|
686
666
|
data-size={size}
|
|
687
667
|
data-active={isActive}
|
|
688
668
|
className={cn(
|
|
689
|
-
"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
|
|
690
|
-
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
691
|
-
size === "sm" && "text-xs",
|
|
692
|
-
size === "md" && "text-sm",
|
|
693
|
-
"group-data-[collapsible=icon]:hidden",
|
|
669
|
+
"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
|
|
694
670
|
className
|
|
695
671
|
)}
|
|
696
672
|
{...props}
|
package/template/ui/skeleton.tsx
CHANGED
|
@@ -4,7 +4,7 @@ function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
4
4
|
return (
|
|
5
5
|
<div
|
|
6
6
|
data-slot="skeleton"
|
|
7
|
-
className={cn("animate-pulse rounded-md bg-
|
|
7
|
+
className={cn("animate-pulse rounded-md bg-muted", className)}
|
|
8
8
|
{...props}
|
|
9
9
|
/>
|
|
10
10
|
)
|
package/template/ui/slider.tsx
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
1
3
|
import * as React from "react"
|
|
2
4
|
import { Slider as SliderPrimitive } from "radix-ui"
|
|
3
5
|
|
|
@@ -29,29 +31,25 @@ function Slider({
|
|
|
29
31
|
min={min}
|
|
30
32
|
max={max}
|
|
31
33
|
className={cn(
|
|
32
|
-
"relative flex w-full touch-none items-center select-none data-
|
|
34
|
+
"relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col",
|
|
33
35
|
className
|
|
34
36
|
)}
|
|
35
37
|
{...props}
|
|
36
38
|
>
|
|
37
39
|
<SliderPrimitive.Track
|
|
38
40
|
data-slot="slider-track"
|
|
39
|
-
className=
|
|
40
|
-
"relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
41
|
-
)}
|
|
41
|
+
className="relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1"
|
|
42
42
|
>
|
|
43
43
|
<SliderPrimitive.Range
|
|
44
44
|
data-slot="slider-range"
|
|
45
|
-
className=
|
|
46
|
-
"absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
|
|
47
|
-
)}
|
|
45
|
+
className="absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full"
|
|
48
46
|
/>
|
|
49
47
|
</SliderPrimitive.Track>
|
|
50
48
|
{Array.from({ length: _values.length }, (_, index) => (
|
|
51
49
|
<SliderPrimitive.Thumb
|
|
52
50
|
data-slot="slider-thumb"
|
|
53
51
|
key={index}
|
|
54
|
-
className="block size-
|
|
52
|
+
className="relative block size-3 shrink-0 rounded-full border border-ring bg-white ring-ring/50 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden active:ring-3 disabled:pointer-events-none disabled:opacity-50"
|
|
55
53
|
/>
|
|
56
54
|
))}
|
|
57
55
|
</SliderPrimitive.Root>
|
package/template/ui/sonner.tsx
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
CircleCheckIcon,
|
|
5
|
-
InfoIcon,
|
|
6
|
-
Loader2Icon,
|
|
7
|
-
OctagonXIcon,
|
|
8
|
-
TriangleAlertIcon,
|
|
9
|
-
} from "lucide-react"
|
|
10
1
|
import { useTheme } from "next-themes"
|
|
11
2
|
import { Toaster as Sonner, type ToasterProps } from "sonner"
|
|
3
|
+
import { CircleCheckIcon, InfoIcon, TriangleAlertIcon, OctagonXIcon, Loader2Icon } from "lucide-react"
|
|
12
4
|
|
|
13
5
|
const Toaster = ({ ...props }: ToasterProps) => {
|
|
14
6
|
const { theme = "system" } = useTheme()
|
|
@@ -18,11 +10,21 @@ const Toaster = ({ ...props }: ToasterProps) => {
|
|
|
18
10
|
theme={theme as ToasterProps["theme"]}
|
|
19
11
|
className="toaster group"
|
|
20
12
|
icons={{
|
|
21
|
-
success:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
success: (
|
|
14
|
+
<CircleCheckIcon className="size-4" />
|
|
15
|
+
),
|
|
16
|
+
info: (
|
|
17
|
+
<InfoIcon className="size-4" />
|
|
18
|
+
),
|
|
19
|
+
warning: (
|
|
20
|
+
<TriangleAlertIcon className="size-4" />
|
|
21
|
+
),
|
|
22
|
+
error: (
|
|
23
|
+
<OctagonXIcon className="size-4" />
|
|
24
|
+
),
|
|
25
|
+
loading: (
|
|
26
|
+
<Loader2Icon className="size-4 animate-spin" />
|
|
27
|
+
),
|
|
26
28
|
}}
|
|
27
29
|
style={
|
|
28
30
|
{
|
|
@@ -32,6 +34,11 @@ const Toaster = ({ ...props }: ToasterProps) => {
|
|
|
32
34
|
"--border-radius": "var(--radius)",
|
|
33
35
|
} as React.CSSProperties
|
|
34
36
|
}
|
|
37
|
+
toastOptions={{
|
|
38
|
+
classNames: {
|
|
39
|
+
toast: "cn-toast",
|
|
40
|
+
},
|
|
41
|
+
}}
|
|
35
42
|
{...props}
|
|
36
43
|
/>
|
|
37
44
|
)
|
package/template/ui/spinner.tsx
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import { Loader2Icon } from "lucide-react"
|
|
2
|
-
|
|
3
1
|
import { cn } from "@/lib/utils"
|
|
2
|
+
import { Loader2Icon } from "lucide-react"
|
|
4
3
|
|
|
5
4
|
function Spinner({ className, ...props }: React.ComponentProps<"svg">) {
|
|
6
5
|
return (
|
|
7
|
-
<Loader2Icon
|
|
8
|
-
role="status"
|
|
9
|
-
aria-label="Loading"
|
|
10
|
-
className={cn("size-4 animate-spin", className)}
|
|
11
|
-
{...props}
|
|
12
|
-
/>
|
|
6
|
+
<Loader2Icon data-slot="spinner" role="status" aria-label="Loading" className={cn("size-4 animate-spin", className)} {...props} />
|
|
13
7
|
)
|
|
14
8
|
}
|
|
15
9
|
|
package/template/ui/switch.tsx
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
1
3
|
import * as React from "react"
|
|
2
4
|
import { Switch as SwitchPrimitive } from "radix-ui"
|
|
3
5
|
|
|
@@ -15,16 +17,14 @@ function Switch({
|
|
|
15
17
|
data-slot="switch"
|
|
16
18
|
data-size={size}
|
|
17
19
|
className={cn(
|
|
18
|
-
"peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent
|
|
20
|
+
"peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
19
21
|
className
|
|
20
22
|
)}
|
|
21
23
|
{...props}
|
|
22
24
|
>
|
|
23
25
|
<SwitchPrimitive.Thumb
|
|
24
26
|
data-slot="switch-thumb"
|
|
25
|
-
className=
|
|
26
|
-
"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground"
|
|
27
|
-
)}
|
|
27
|
+
className="pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
|
|
28
28
|
/>
|
|
29
29
|
</SwitchPrimitive.Root>
|
|
30
30
|
)
|