@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/menubar.tsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
3
|
import * as React from "react"
|
|
4
|
-
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react"
|
|
5
4
|
import { Menubar as MenubarPrimitive } from "radix-ui"
|
|
6
5
|
|
|
7
6
|
import { cn } from "@/lib/utils"
|
|
7
|
+
import { CheckIcon, ChevronRightIcon } from "lucide-react"
|
|
8
8
|
|
|
9
9
|
function Menubar({
|
|
10
10
|
className,
|
|
@@ -14,7 +14,7 @@ function Menubar({
|
|
|
14
14
|
<MenubarPrimitive.Root
|
|
15
15
|
data-slot="menubar"
|
|
16
16
|
className={cn(
|
|
17
|
-
"flex h-
|
|
17
|
+
"flex h-8 items-center gap-0.5 rounded-lg border p-[3px]",
|
|
18
18
|
className
|
|
19
19
|
)}
|
|
20
20
|
{...props}
|
|
@@ -56,7 +56,7 @@ function MenubarTrigger({
|
|
|
56
56
|
<MenubarPrimitive.Trigger
|
|
57
57
|
data-slot="menubar-trigger"
|
|
58
58
|
className={cn(
|
|
59
|
-
"flex items-center rounded-sm px-
|
|
59
|
+
"flex items-center rounded-sm px-1.5 py-[2px] text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted",
|
|
60
60
|
className
|
|
61
61
|
)}
|
|
62
62
|
{...props}
|
|
@@ -78,10 +78,7 @@ function MenubarContent({
|
|
|
78
78
|
align={align}
|
|
79
79
|
alignOffset={alignOffset}
|
|
80
80
|
sideOffset={sideOffset}
|
|
81
|
-
className={cn(
|
|
82
|
-
"z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
83
|
-
className
|
|
84
|
-
)}
|
|
81
|
+
className={cn("z-50 min-w-36 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 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", className )}
|
|
85
82
|
{...props}
|
|
86
83
|
/>
|
|
87
84
|
</MenubarPortal>
|
|
@@ -103,7 +100,7 @@ function MenubarItem({
|
|
|
103
100
|
data-inset={inset}
|
|
104
101
|
data-variant={variant}
|
|
105
102
|
className={cn(
|
|
106
|
-
"relative flex cursor-default items-center gap-
|
|
103
|
+
"group/menubar-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!",
|
|
107
104
|
className
|
|
108
105
|
)}
|
|
109
106
|
{...props}
|
|
@@ -115,21 +112,26 @@ function MenubarCheckboxItem({
|
|
|
115
112
|
className,
|
|
116
113
|
children,
|
|
117
114
|
checked,
|
|
115
|
+
inset,
|
|
118
116
|
...props
|
|
119
|
-
}: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem>
|
|
117
|
+
}: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem> & {
|
|
118
|
+
inset?: boolean
|
|
119
|
+
}) {
|
|
120
120
|
return (
|
|
121
121
|
<MenubarPrimitive.CheckboxItem
|
|
122
122
|
data-slot="menubar-checkbox-item"
|
|
123
|
+
data-inset={inset}
|
|
123
124
|
className={cn(
|
|
124
|
-
"relative flex cursor-default items-center gap-
|
|
125
|
+
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
125
126
|
className
|
|
126
127
|
)}
|
|
127
128
|
checked={checked}
|
|
128
129
|
{...props}
|
|
129
130
|
>
|
|
130
|
-
<span className="pointer-events-none absolute left-
|
|
131
|
+
<span className="pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4">
|
|
131
132
|
<MenubarPrimitive.ItemIndicator>
|
|
132
|
-
<CheckIcon
|
|
133
|
+
<CheckIcon
|
|
134
|
+
/>
|
|
133
135
|
</MenubarPrimitive.ItemIndicator>
|
|
134
136
|
</span>
|
|
135
137
|
{children}
|
|
@@ -140,20 +142,25 @@ function MenubarCheckboxItem({
|
|
|
140
142
|
function MenubarRadioItem({
|
|
141
143
|
className,
|
|
142
144
|
children,
|
|
145
|
+
inset,
|
|
143
146
|
...props
|
|
144
|
-
}: React.ComponentProps<typeof MenubarPrimitive.RadioItem>
|
|
147
|
+
}: React.ComponentProps<typeof MenubarPrimitive.RadioItem> & {
|
|
148
|
+
inset?: boolean
|
|
149
|
+
}) {
|
|
145
150
|
return (
|
|
146
151
|
<MenubarPrimitive.RadioItem
|
|
147
152
|
data-slot="menubar-radio-item"
|
|
153
|
+
data-inset={inset}
|
|
148
154
|
className={cn(
|
|
149
|
-
"relative flex cursor-default items-center gap-
|
|
155
|
+
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
150
156
|
className
|
|
151
157
|
)}
|
|
152
158
|
{...props}
|
|
153
159
|
>
|
|
154
|
-
<span className="pointer-events-none absolute left-
|
|
160
|
+
<span className="pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4">
|
|
155
161
|
<MenubarPrimitive.ItemIndicator>
|
|
156
|
-
<
|
|
162
|
+
<CheckIcon
|
|
163
|
+
/>
|
|
157
164
|
</MenubarPrimitive.ItemIndicator>
|
|
158
165
|
</span>
|
|
159
166
|
{children}
|
|
@@ -173,7 +180,7 @@ function MenubarLabel({
|
|
|
173
180
|
data-slot="menubar-label"
|
|
174
181
|
data-inset={inset}
|
|
175
182
|
className={cn(
|
|
176
|
-
"px-
|
|
183
|
+
"px-1.5 py-1 text-sm font-medium data-inset:pl-7",
|
|
177
184
|
className
|
|
178
185
|
)}
|
|
179
186
|
{...props}
|
|
@@ -202,7 +209,7 @@ function MenubarShortcut({
|
|
|
202
209
|
<span
|
|
203
210
|
data-slot="menubar-shortcut"
|
|
204
211
|
className={cn(
|
|
205
|
-
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
212
|
+
"ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground",
|
|
206
213
|
className
|
|
207
214
|
)}
|
|
208
215
|
{...props}
|
|
@@ -229,13 +236,13 @@ function MenubarSubTrigger({
|
|
|
229
236
|
data-slot="menubar-sub-trigger"
|
|
230
237
|
data-inset={inset}
|
|
231
238
|
className={cn(
|
|
232
|
-
"flex cursor-default items-center rounded-
|
|
239
|
+
"flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4",
|
|
233
240
|
className
|
|
234
241
|
)}
|
|
235
242
|
{...props}
|
|
236
243
|
>
|
|
237
244
|
{children}
|
|
238
|
-
<ChevronRightIcon className="ml-auto
|
|
245
|
+
<ChevronRightIcon className="ml-auto size-4" />
|
|
239
246
|
</MenubarPrimitive.SubTrigger>
|
|
240
247
|
)
|
|
241
248
|
}
|
|
@@ -247,10 +254,7 @@ function MenubarSubContent({
|
|
|
247
254
|
return (
|
|
248
255
|
<MenubarPrimitive.SubContent
|
|
249
256
|
data-slot="menubar-sub-content"
|
|
250
|
-
className={cn(
|
|
251
|
-
"z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
252
|
-
className
|
|
253
|
-
)}
|
|
257
|
+
className={cn("z-50 min-w-32 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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", className )}
|
|
254
258
|
{...props}
|
|
255
259
|
/>
|
|
256
260
|
)
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
useMessageScrollerScrollable,
|
|
6
6
|
useMessageScrollerVisibility,
|
|
7
7
|
} from "@shadcn/react/message-scroller"
|
|
8
|
-
import { ArrowDownIcon } from "lucide-react"
|
|
9
8
|
|
|
10
9
|
import { cn } from "@/lib/utils"
|
|
11
10
|
import { Button } from "@/ui/button"
|
|
11
|
+
import { ArrowDownIcon } from "lucide-react"
|
|
12
12
|
|
|
13
13
|
function MessageScrollerProvider(
|
|
14
14
|
props: React.ComponentProps<typeof MessageScrollerPrimitive.Provider>
|
|
@@ -40,7 +40,7 @@ function MessageScrollerViewport({
|
|
|
40
40
|
<MessageScrollerPrimitive.Viewport
|
|
41
41
|
data-slot="message-scroller-viewport"
|
|
42
42
|
className={cn(
|
|
43
|
-
"size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-
|
|
43
|
+
"size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent",
|
|
44
44
|
className
|
|
45
45
|
)}
|
|
46
46
|
{...props}
|
|
@@ -55,7 +55,7 @@ function MessageScrollerContent({
|
|
|
55
55
|
return (
|
|
56
56
|
<MessageScrollerPrimitive.Content
|
|
57
57
|
data-slot="message-scroller-content"
|
|
58
|
-
className={cn("flex h-max min-h-full flex-col gap-
|
|
58
|
+
className={cn("flex h-max min-h-full flex-col gap-6", className)}
|
|
59
59
|
{...props}
|
|
60
60
|
/>
|
|
61
61
|
)
|
|
@@ -105,7 +105,8 @@ function MessageScrollerButton({
|
|
|
105
105
|
>
|
|
106
106
|
{children ?? (
|
|
107
107
|
<>
|
|
108
|
-
<ArrowDownIcon
|
|
108
|
+
<ArrowDownIcon
|
|
109
|
+
/>
|
|
109
110
|
<span className="sr-only">
|
|
110
111
|
{direction === "end" ? "Scroll to end" : "Scroll to start"}
|
|
111
112
|
</span>
|
|
@@ -1,34 +1,33 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
|
-
import { ChevronDownIcon } from "lucide-react"
|
|
3
2
|
|
|
4
3
|
import { cn } from "@/lib/utils"
|
|
4
|
+
import { ChevronDownIcon } from "lucide-react"
|
|
5
|
+
|
|
6
|
+
type NativeSelectProps = Omit<React.ComponentProps<"select">, "size"> & {
|
|
7
|
+
size?: "sm" | "default"
|
|
8
|
+
}
|
|
5
9
|
|
|
6
10
|
function NativeSelect({
|
|
7
11
|
className,
|
|
8
12
|
size = "default",
|
|
9
13
|
...props
|
|
10
|
-
}:
|
|
14
|
+
}: NativeSelectProps) {
|
|
11
15
|
return (
|
|
12
16
|
<div
|
|
13
|
-
className=
|
|
17
|
+
className={cn(
|
|
18
|
+
"group/native-select relative w-fit has-[select:disabled]:opacity-50",
|
|
19
|
+
className
|
|
20
|
+
)}
|
|
14
21
|
data-slot="native-select-wrapper"
|
|
22
|
+
data-size={size}
|
|
15
23
|
>
|
|
16
24
|
<select
|
|
17
25
|
data-slot="native-select"
|
|
18
26
|
data-size={size}
|
|
19
|
-
className=
|
|
20
|
-
"h-9 w-full min-w-0 appearance-none rounded-md border border-input bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed data-[size=sm]:h-8 data-[size=sm]:py-1 dark:bg-input/30 dark:hover:bg-input/50",
|
|
21
|
-
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
22
|
-
"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
|
|
23
|
-
className
|
|
24
|
-
)}
|
|
27
|
+
className="h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40"
|
|
25
28
|
{...props}
|
|
26
29
|
/>
|
|
27
|
-
<ChevronDownIcon
|
|
28
|
-
className="pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-muted-foreground opacity-50 select-none"
|
|
29
|
-
aria-hidden="true"
|
|
30
|
-
data-slot="native-select-icon"
|
|
31
|
-
/>
|
|
30
|
+
<ChevronDownIcon className="pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none" aria-hidden="true" data-slot="native-select-icon" />
|
|
32
31
|
</div>
|
|
33
32
|
)
|
|
34
33
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
import { cva } from "class-variance-authority"
|
|
3
|
-
import { ChevronDownIcon } from "lucide-react"
|
|
4
3
|
import { NavigationMenu as NavigationMenuPrimitive } from "radix-ui"
|
|
5
4
|
|
|
6
5
|
import { cn } from "@/lib/utils"
|
|
6
|
+
import { ChevronDownIcon } from "lucide-react"
|
|
7
7
|
|
|
8
8
|
function NavigationMenu({
|
|
9
9
|
className,
|
|
@@ -37,7 +37,7 @@ function NavigationMenuList({
|
|
|
37
37
|
<NavigationMenuPrimitive.List
|
|
38
38
|
data-slot="navigation-menu-list"
|
|
39
39
|
className={cn(
|
|
40
|
-
"group flex flex-1 list-none items-center justify-center gap-
|
|
40
|
+
"group flex flex-1 list-none items-center justify-center gap-0",
|
|
41
41
|
className
|
|
42
42
|
)}
|
|
43
43
|
{...props}
|
|
@@ -59,7 +59,7 @@ function NavigationMenuItem({
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
const navigationMenuTriggerStyle = cva(
|
|
62
|
-
"group inline-flex h-9 w-max items-center justify-center rounded-
|
|
62
|
+
"group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted"
|
|
63
63
|
)
|
|
64
64
|
|
|
65
65
|
function NavigationMenuTrigger({
|
|
@@ -74,10 +74,7 @@ function NavigationMenuTrigger({
|
|
|
74
74
|
{...props}
|
|
75
75
|
>
|
|
76
76
|
{children}{" "}
|
|
77
|
-
<ChevronDownIcon
|
|
78
|
-
className="relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180"
|
|
79
|
-
aria-hidden="true"
|
|
80
|
-
/>
|
|
77
|
+
<ChevronDownIcon className="relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180" aria-hidden="true" />
|
|
81
78
|
</NavigationMenuPrimitive.Trigger>
|
|
82
79
|
)
|
|
83
80
|
}
|
|
@@ -90,8 +87,7 @@ function NavigationMenuContent({
|
|
|
90
87
|
<NavigationMenuPrimitive.Content
|
|
91
88
|
data-slot="navigation-menu-content"
|
|
92
89
|
className={cn(
|
|
93
|
-
"top-0 left-0 w-full p-
|
|
94
|
-
"group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95",
|
|
90
|
+
"top-0 left-0 w-full p-1 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none md:absolute md:w-auto group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95",
|
|
95
91
|
className
|
|
96
92
|
)}
|
|
97
93
|
{...props}
|
|
@@ -112,7 +108,7 @@ function NavigationMenuViewport({
|
|
|
112
108
|
<NavigationMenuPrimitive.Viewport
|
|
113
109
|
data-slot="navigation-menu-viewport"
|
|
114
110
|
className={cn(
|
|
115
|
-
"origin-top-center relative mt-1.5 h-
|
|
111
|
+
"origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 duration-100 md:w-(--radix-navigation-menu-viewport-width) data-open:animate-in data-open:zoom-in-90 data-closed:animate-out data-closed:zoom-out-90",
|
|
116
112
|
className
|
|
117
113
|
)}
|
|
118
114
|
{...props}
|
|
@@ -129,7 +125,7 @@ function NavigationMenuLink({
|
|
|
129
125
|
<NavigationMenuPrimitive.Link
|
|
130
126
|
data-slot="navigation-menu-link"
|
|
131
127
|
className={cn(
|
|
132
|
-
"flex
|
|
128
|
+
"flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4",
|
|
133
129
|
className
|
|
134
130
|
)}
|
|
135
131
|
{...props}
|
|
@@ -145,7 +141,7 @@ function NavigationMenuIndicator({
|
|
|
145
141
|
<NavigationMenuPrimitive.Indicator
|
|
146
142
|
data-slot="navigation-menu-indicator"
|
|
147
143
|
className={cn(
|
|
148
|
-
"top-full z-
|
|
144
|
+
"top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in",
|
|
149
145
|
className
|
|
150
146
|
)}
|
|
151
147
|
{...props}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
|
-
import {
|
|
3
|
-
ChevronLeftIcon,
|
|
4
|
-
ChevronRightIcon,
|
|
5
|
-
MoreHorizontalIcon,
|
|
6
|
-
} from "lucide-react"
|
|
7
2
|
|
|
8
3
|
import { cn } from "@/lib/utils"
|
|
9
|
-
import {
|
|
4
|
+
import { Button } from "@/ui/button"
|
|
5
|
+
import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react"
|
|
10
6
|
|
|
11
7
|
function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
|
|
12
8
|
return (
|
|
@@ -27,7 +23,7 @@ function PaginationContent({
|
|
|
27
23
|
return (
|
|
28
24
|
<ul
|
|
29
25
|
data-slot="pagination-content"
|
|
30
|
-
className={cn("flex
|
|
26
|
+
className={cn("flex items-center gap-0.5", className)}
|
|
31
27
|
{...props}
|
|
32
28
|
/>
|
|
33
29
|
)
|
|
@@ -49,52 +45,54 @@ function PaginationLink({
|
|
|
49
45
|
...props
|
|
50
46
|
}: PaginationLinkProps) {
|
|
51
47
|
return (
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
className={cn(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
48
|
+
<Button
|
|
49
|
+
asChild
|
|
50
|
+
variant={isActive ? "outline" : "ghost"}
|
|
51
|
+
size={size}
|
|
52
|
+
className={cn(className)}
|
|
53
|
+
>
|
|
54
|
+
<a
|
|
55
|
+
aria-current={isActive ? "page" : undefined}
|
|
56
|
+
data-slot="pagination-link"
|
|
57
|
+
data-active={isActive}
|
|
58
|
+
{...props}
|
|
59
|
+
/>
|
|
60
|
+
</Button>
|
|
65
61
|
)
|
|
66
62
|
}
|
|
67
63
|
|
|
68
64
|
function PaginationPrevious({
|
|
69
65
|
className,
|
|
66
|
+
text = "Previous",
|
|
70
67
|
...props
|
|
71
|
-
}: React.ComponentProps<typeof PaginationLink>) {
|
|
68
|
+
}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
|
|
72
69
|
return (
|
|
73
70
|
<PaginationLink
|
|
74
71
|
aria-label="Go to previous page"
|
|
75
72
|
size="default"
|
|
76
|
-
className={cn("
|
|
73
|
+
className={cn("pl-1.5!", className)}
|
|
77
74
|
{...props}
|
|
78
75
|
>
|
|
79
|
-
<ChevronLeftIcon />
|
|
80
|
-
<span className="hidden sm:block">
|
|
76
|
+
<ChevronLeftIcon data-icon="inline-start" />
|
|
77
|
+
<span className="hidden sm:block">{text}</span>
|
|
81
78
|
</PaginationLink>
|
|
82
79
|
)
|
|
83
80
|
}
|
|
84
81
|
|
|
85
82
|
function PaginationNext({
|
|
86
83
|
className,
|
|
84
|
+
text = "Next",
|
|
87
85
|
...props
|
|
88
|
-
}: React.ComponentProps<typeof PaginationLink>) {
|
|
86
|
+
}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
|
|
89
87
|
return (
|
|
90
88
|
<PaginationLink
|
|
91
89
|
aria-label="Go to next page"
|
|
92
90
|
size="default"
|
|
93
|
-
className={cn("
|
|
91
|
+
className={cn("pr-1.5!", className)}
|
|
94
92
|
{...props}
|
|
95
93
|
>
|
|
96
|
-
<span className="hidden sm:block">
|
|
97
|
-
<ChevronRightIcon />
|
|
94
|
+
<span className="hidden sm:block">{text}</span>
|
|
95
|
+
<ChevronRightIcon data-icon="inline-end" />
|
|
98
96
|
</PaginationLink>
|
|
99
97
|
)
|
|
100
98
|
}
|
|
@@ -107,10 +105,14 @@ function PaginationEllipsis({
|
|
|
107
105
|
<span
|
|
108
106
|
aria-hidden
|
|
109
107
|
data-slot="pagination-ellipsis"
|
|
110
|
-
className={cn(
|
|
108
|
+
className={cn(
|
|
109
|
+
"flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
|
|
110
|
+
className
|
|
111
|
+
)}
|
|
111
112
|
{...props}
|
|
112
113
|
>
|
|
113
|
-
<MoreHorizontalIcon
|
|
114
|
+
<MoreHorizontalIcon
|
|
115
|
+
/>
|
|
114
116
|
<span className="sr-only">More pages</span>
|
|
115
117
|
</span>
|
|
116
118
|
)
|
|
@@ -119,9 +121,9 @@ function PaginationEllipsis({
|
|
|
119
121
|
export {
|
|
120
122
|
Pagination,
|
|
121
123
|
PaginationContent,
|
|
122
|
-
|
|
124
|
+
PaginationEllipsis,
|
|
123
125
|
PaginationItem,
|
|
124
|
-
|
|
126
|
+
PaginationLink,
|
|
125
127
|
PaginationNext,
|
|
126
|
-
|
|
128
|
+
PaginationPrevious,
|
|
127
129
|
}
|
package/template/ui/popover.tsx
CHANGED
|
@@ -28,7 +28,7 @@ function PopoverContent({
|
|
|
28
28
|
align={align}
|
|
29
29
|
sideOffset={sideOffset}
|
|
30
30
|
className={cn(
|
|
31
|
-
"z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-
|
|
31
|
+
"z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 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",
|
|
32
32
|
className
|
|
33
33
|
)}
|
|
34
34
|
{...props}
|
|
@@ -47,7 +47,7 @@ function PopoverHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
47
47
|
return (
|
|
48
48
|
<div
|
|
49
49
|
data-slot="popover-header"
|
|
50
|
-
className={cn("flex flex-col gap-
|
|
50
|
+
className={cn("flex flex-col gap-0.5 text-sm", className)}
|
|
51
51
|
{...props}
|
|
52
52
|
/>
|
|
53
53
|
)
|
|
@@ -78,10 +78,10 @@ function PopoverDescription({
|
|
|
78
78
|
|
|
79
79
|
export {
|
|
80
80
|
Popover,
|
|
81
|
-
PopoverTrigger,
|
|
82
|
-
PopoverContent,
|
|
83
81
|
PopoverAnchor,
|
|
82
|
+
PopoverContent,
|
|
83
|
+
PopoverDescription,
|
|
84
84
|
PopoverHeader,
|
|
85
85
|
PopoverTitle,
|
|
86
|
-
|
|
86
|
+
PopoverTrigger,
|
|
87
87
|
}
|
package/template/ui/progress.tsx
CHANGED
|
@@ -14,14 +14,14 @@ function Progress({
|
|
|
14
14
|
<ProgressPrimitive.Root
|
|
15
15
|
data-slot="progress"
|
|
16
16
|
className={cn(
|
|
17
|
-
"relative h-
|
|
17
|
+
"relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",
|
|
18
18
|
className
|
|
19
19
|
)}
|
|
20
20
|
{...props}
|
|
21
21
|
>
|
|
22
22
|
<ProgressPrimitive.Indicator
|
|
23
23
|
data-slot="progress-indicator"
|
|
24
|
-
className="
|
|
24
|
+
className="size-full flex-1 bg-primary transition-all"
|
|
25
25
|
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
|
26
26
|
/>
|
|
27
27
|
</ProgressPrimitive.Root>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
|
-
import { CircleIcon } from "lucide-react"
|
|
3
2
|
import { RadioGroup as RadioGroupPrimitive } from "radix-ui"
|
|
4
3
|
|
|
5
4
|
import { cn } from "@/lib/utils"
|
|
@@ -11,7 +10,7 @@ function RadioGroup({
|
|
|
11
10
|
return (
|
|
12
11
|
<RadioGroupPrimitive.Root
|
|
13
12
|
data-slot="radio-group"
|
|
14
|
-
className={cn("grid gap-
|
|
13
|
+
className={cn("grid w-full gap-2", className)}
|
|
15
14
|
{...props}
|
|
16
15
|
/>
|
|
17
16
|
)
|
|
@@ -25,16 +24,16 @@ function RadioGroupItem({
|
|
|
25
24
|
<RadioGroupPrimitive.Item
|
|
26
25
|
data-slot="radio-group-item"
|
|
27
26
|
className={cn(
|
|
28
|
-
"aspect-square size-4 shrink-0 rounded-full border border-input
|
|
27
|
+
"group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 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 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",
|
|
29
28
|
className
|
|
30
29
|
)}
|
|
31
30
|
{...props}
|
|
32
31
|
>
|
|
33
32
|
<RadioGroupPrimitive.Indicator
|
|
34
33
|
data-slot="radio-group-indicator"
|
|
35
|
-
className="
|
|
34
|
+
className="flex size-4 items-center justify-center"
|
|
36
35
|
>
|
|
37
|
-
<
|
|
36
|
+
<span className="absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" />
|
|
38
37
|
</RadioGroupPrimitive.Indicator>
|
|
39
38
|
</RadioGroupPrimitive.Item>
|
|
40
39
|
)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import { GripVerticalIcon } from "lucide-react"
|
|
4
3
|
import * as ResizablePrimitive from "react-resizable-panels"
|
|
5
4
|
|
|
6
5
|
import { cn } from "@/lib/utils"
|
|
@@ -36,15 +35,13 @@ function ResizableHandle({
|
|
|
36
35
|
<ResizablePrimitive.Separator
|
|
37
36
|
data-slot="resizable-handle"
|
|
38
37
|
className={cn(
|
|
39
|
-
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:
|
|
38
|
+
"relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring 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",
|
|
40
39
|
className
|
|
41
40
|
)}
|
|
42
41
|
{...props}
|
|
43
42
|
>
|
|
44
43
|
{withHandle && (
|
|
45
|
-
<div className="z-10 flex h-
|
|
46
|
-
<GripVerticalIcon className="size-2.5" />
|
|
47
|
-
</div>
|
|
44
|
+
<div className="z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border" />
|
|
48
45
|
)}
|
|
49
46
|
</ResizablePrimitive.Separator>
|
|
50
47
|
)
|
|
@@ -34,13 +34,10 @@ function ScrollBar({
|
|
|
34
34
|
return (
|
|
35
35
|
<ScrollAreaPrimitive.ScrollAreaScrollbar
|
|
36
36
|
data-slot="scroll-area-scrollbar"
|
|
37
|
+
data-orientation={orientation}
|
|
37
38
|
orientation={orientation}
|
|
38
39
|
className={cn(
|
|
39
|
-
"flex touch-none p-px transition-colors select-none",
|
|
40
|
-
orientation === "vertical" &&
|
|
41
|
-
"h-full w-2.5 border-l border-l-transparent",
|
|
42
|
-
orientation === "horizontal" &&
|
|
43
|
-
"h-2.5 flex-col border-t border-t-transparent",
|
|
40
|
+
"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",
|
|
44
41
|
className
|
|
45
42
|
)}
|
|
46
43
|
{...props}
|