@lark-apaas/coding-templates 0.1.4 → 0.1.6
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/package.json +1 -1
- package/template-vite-react/README.md +175 -0
- package/template-vite-react/client/index.html +2 -1
- package/template-vite-react/client/src/app.tsx +3 -1
- package/template-vite-react/client/src/components/layout.tsx +0 -2
- package/template-vite-react/client/src/components/ui/README.md +134 -0
- package/template-vite-react/client/src/components/ui/accordion.tsx +22 -28
- package/template-vite-react/client/src/components/ui/alert-dialog.tsx +34 -64
- package/template-vite-react/client/src/components/ui/alert.tsx +10 -15
- package/template-vite-react/client/src/components/ui/aspect-ratio.tsx +5 -16
- package/template-vite-react/client/src/components/ui/avatar.tsx +11 -67
- package/template-vite-react/client/src/components/ui/badge.tsx +21 -31
- package/template-vite-react/client/src/components/ui/breadcrumb.tsx +23 -39
- package/template-vite-react/client/src/components/ui/button.tsx +36 -25
- package/template-vite-react/client/src/components/ui/calendar.tsx +37 -43
- package/template-vite-react/client/src/components/ui/card.tsx +73 -94
- package/template-vite-react/client/src/components/ui/carousel.tsx +7 -8
- package/template-vite-react/client/src/components/ui/chart.tsx +35 -49
- package/template-vite-react/client/src/components/ui/checkbox.tsx +10 -7
- package/template-vite-react/client/src/components/ui/collapsible.tsx +20 -6
- package/template-vite-react/client/src/components/ui/command.tsx +52 -40
- package/template-vite-react/client/src/components/ui/context-menu.tsx +170 -117
- package/template-vite-react/client/src/components/ui/dialog.tsx +37 -52
- package/template-vite-react/client/src/components/ui/drawer.tsx +12 -9
- package/template-vite-react/client/src/components/ui/dropdown-menu.tsx +194 -133
- package/template-vite-react/client/src/components/ui/hover-card.tsx +24 -29
- package/template-vite-react/client/src/components/ui/input-group.tsx +39 -29
- package/template-vite-react/client/src/components/ui/input-otp.tsx +7 -17
- package/template-vite-react/client/src/components/ui/input.tsx +4 -3
- package/template-vite-react/client/src/components/ui/label.tsx +9 -3
- package/template-vite-react/client/src/components/ui/menubar.tsx +160 -92
- package/template-vite-react/client/src/components/ui/navigation-menu.tsx +45 -45
- package/template-vite-react/client/src/components/ui/pagination.tsx +32 -35
- package/template-vite-react/client/src/components/ui/popover.tsx +20 -62
- package/template-vite-react/client/src/components/ui/progress.tsx +14 -64
- package/template-vite-react/client/src/components/ui/radio-group.tsx +20 -13
- package/template-vite-react/client/src/components/ui/resizable.tsx +18 -10
- package/template-vite-react/client/src/components/ui/scroll-area.tsx +13 -10
- package/template-vite-react/client/src/components/ui/select.tsx +122 -78
- package/template-vite-react/client/src/components/ui/separator.tsx +7 -4
- package/template-vite-react/client/src/components/ui/sheet.tsx +42 -41
- package/template-vite-react/client/src/components/ui/sidebar.tsx +162 -156
- package/template-vite-react/client/src/components/ui/skeleton.tsx +1 -1
- package/template-vite-react/client/src/components/ui/slider.tsx +52 -22
- package/template-vite-react/client/src/components/ui/sonner.tsx +44 -26
- package/template-vite-react/client/src/components/ui/switch.tsx +9 -8
- package/template-vite-react/client/src/components/ui/table.tsx +5 -5
- package/template-vite-react/client/src/components/ui/tabs.tsx +24 -38
- package/template-vite-react/client/src/components/ui/textarea.tsx +1 -1
- package/template-vite-react/client/src/components/ui/toggle-group.tsx +14 -20
- package/template-vite-react/client/src/components/ui/toggle.tsx +13 -10
- package/template-vite-react/client/src/components/ui/tooltip.tsx +30 -33
- package/template-vite-react/client/src/index.css +130 -0
- package/template-vite-react/client/src/main.tsx +1 -4
- package/template-vite-react/client/src/pages/home/index.tsx +5 -5
- package/template-vite-react/components.json +2 -6
- package/template-vite-react/eslint.config.js +11 -0
- package/template-vite-react/package.json +27 -2
- package/template-vite-react/vite.config.ts +5 -0
- package/template-vite-react/client/src/components/header.tsx +0 -22
- package/template-vite-react/client/src/components/theme-provider.tsx +0 -45
- package/template-vite-react/client/src/components/ui/icons/file-ae-colorful-icon.tsx +0 -21
- package/template-vite-react/client/src/components/ui/icons/file-ai-colorful-icon.tsx +0 -36
- package/template-vite-react/client/src/components/ui/icons/file-android-colorful-icon.tsx +0 -33
- package/template-vite-react/client/src/components/ui/icons/file-audio-colorful-icon.tsx +0 -21
- package/template-vite-react/client/src/components/ui/icons/file-code-colorful-icon.tsx +0 -28
- package/template-vite-react/client/src/components/ui/icons/file-csv-colorful-icon.tsx +0 -21
- package/template-vite-react/client/src/components/ui/icons/file-eml-colorful-icon.tsx +0 -29
- package/template-vite-react/client/src/components/ui/icons/file-ios-colorful-icon.tsx +0 -25
- package/template-vite-react/client/src/components/ui/icons/file-keynote-colorful-icon.tsx +0 -29
- package/template-vite-react/client/src/components/ui/icons/file-pages-colorful-icon.tsx +0 -29
- package/template-vite-react/client/src/components/ui/icons/file-ps-colorful-icon.tsx +0 -21
- package/template-vite-react/client/src/components/ui/icons/file-sketch-colorful-icon.tsx +0 -21
- package/template-vite-react/client/src/components/ui/icons/file-slide-colorful-icon.tsx +0 -21
- package/template-vite-react/client/src/components/ui/icons/file-vcf-colorful-icon.tsx +0 -29
- package/template-vite-react/client/src/components/ui/icons/file-wiki-excel-colorful-icon.tsx +0 -23
- package/template-vite-react/client/src/components/ui/icons/file-wiki-image-colorful-icon.tsx +0 -27
- package/template-vite-react/client/src/components/ui/icons/file-wiki-pdf-colorful-icon.tsx +0 -20
- package/template-vite-react/client/src/components/ui/icons/file-wiki-ppt-colorful-icon.tsx +0 -21
- package/template-vite-react/client/src/components/ui/icons/file-wiki-text-colorful-icon.tsx +0 -12
- package/template-vite-react/client/src/components/ui/icons/file-wiki-unknown-colorful-icon.tsx +0 -14
- package/template-vite-react/client/src/components/ui/icons/file-wiki-video-colorful-icon.tsx +0 -23
- package/template-vite-react/client/src/components/ui/icons/file-wiki-word-colorful-icon.tsx +0 -38
- package/template-vite-react/client/src/components/ui/icons/file-wiki-zip-colorful-icon.tsx +0 -21
- package/template-vite-react/client/src/types/index.ts +0 -1
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu"
|
|
2
3
|
import { cva } from "class-variance-authority"
|
|
4
|
+
import { ChevronDownIcon } from "lucide-react"
|
|
3
5
|
|
|
4
6
|
import { cn } from "@/lib/utils"
|
|
5
|
-
import { ChevronDownIcon } from "lucide-react"
|
|
6
7
|
|
|
7
8
|
function NavigationMenu({
|
|
8
|
-
align = "start",
|
|
9
9
|
className,
|
|
10
10
|
children,
|
|
11
|
+
viewport = true,
|
|
11
12
|
...props
|
|
12
|
-
}: NavigationMenuPrimitive.Root
|
|
13
|
-
|
|
13
|
+
}: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
|
|
14
|
+
viewport?: boolean
|
|
15
|
+
}) {
|
|
14
16
|
return (
|
|
15
17
|
<NavigationMenuPrimitive.Root
|
|
16
18
|
data-slot="navigation-menu"
|
|
19
|
+
data-viewport={viewport}
|
|
17
20
|
className={cn(
|
|
18
21
|
"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
|
|
19
22
|
className
|
|
@@ -21,7 +24,7 @@ function NavigationMenu({
|
|
|
21
24
|
{...props}
|
|
22
25
|
>
|
|
23
26
|
{children}
|
|
24
|
-
<
|
|
27
|
+
{viewport && <NavigationMenuViewport />}
|
|
25
28
|
</NavigationMenuPrimitive.Root>
|
|
26
29
|
)
|
|
27
30
|
}
|
|
@@ -29,12 +32,12 @@ function NavigationMenu({
|
|
|
29
32
|
function NavigationMenuList({
|
|
30
33
|
className,
|
|
31
34
|
...props
|
|
32
|
-
}: React.
|
|
35
|
+
}: React.ComponentProps<typeof NavigationMenuPrimitive.List>) {
|
|
33
36
|
return (
|
|
34
37
|
<NavigationMenuPrimitive.List
|
|
35
38
|
data-slot="navigation-menu-list"
|
|
36
39
|
className={cn(
|
|
37
|
-
"group flex flex-1 list-none items-center justify-center gap-
|
|
40
|
+
"group flex flex-1 list-none items-center justify-center gap-1",
|
|
38
41
|
className
|
|
39
42
|
)}
|
|
40
43
|
{...props}
|
|
@@ -45,7 +48,7 @@ function NavigationMenuList({
|
|
|
45
48
|
function NavigationMenuItem({
|
|
46
49
|
className,
|
|
47
50
|
...props
|
|
48
|
-
}: React.
|
|
51
|
+
}: React.ComponentProps<typeof NavigationMenuPrimitive.Item>) {
|
|
49
52
|
return (
|
|
50
53
|
<NavigationMenuPrimitive.Item
|
|
51
54
|
data-slot="navigation-menu-item"
|
|
@@ -56,14 +59,14 @@ function NavigationMenuItem({
|
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
const navigationMenuTriggerStyle = cva(
|
|
59
|
-
"group
|
|
62
|
+
"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium enabled:hover:bg-accent enabled:hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:cursor-not-allowed disabled:opacity-50 enabled:data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/20 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1"
|
|
60
63
|
)
|
|
61
64
|
|
|
62
65
|
function NavigationMenuTrigger({
|
|
63
66
|
className,
|
|
64
67
|
children,
|
|
65
68
|
...props
|
|
66
|
-
}: NavigationMenuPrimitive.Trigger
|
|
69
|
+
}: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>) {
|
|
67
70
|
return (
|
|
68
71
|
<NavigationMenuPrimitive.Trigger
|
|
69
72
|
data-slot="navigation-menu-trigger"
|
|
@@ -71,7 +74,10 @@ function NavigationMenuTrigger({
|
|
|
71
74
|
{...props}
|
|
72
75
|
>
|
|
73
76
|
{children}{" "}
|
|
74
|
-
<ChevronDownIcon
|
|
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
|
+
/>
|
|
75
81
|
</NavigationMenuPrimitive.Trigger>
|
|
76
82
|
)
|
|
77
83
|
}
|
|
@@ -79,12 +85,13 @@ function NavigationMenuTrigger({
|
|
|
79
85
|
function NavigationMenuContent({
|
|
80
86
|
className,
|
|
81
87
|
...props
|
|
82
|
-
}: NavigationMenuPrimitive.Content
|
|
88
|
+
}: React.ComponentProps<typeof NavigationMenuPrimitive.Content>) {
|
|
83
89
|
return (
|
|
84
90
|
<NavigationMenuPrimitive.Content
|
|
85
91
|
data-slot="navigation-menu-content"
|
|
86
92
|
className={cn(
|
|
87
|
-
"data-
|
|
93
|
+
"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out 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 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto",
|
|
94
|
+
"group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 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: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",
|
|
88
95
|
className
|
|
89
96
|
)}
|
|
90
97
|
{...props}
|
|
@@ -92,44 +99,37 @@ function NavigationMenuContent({
|
|
|
92
99
|
)
|
|
93
100
|
}
|
|
94
101
|
|
|
95
|
-
function
|
|
102
|
+
function NavigationMenuViewport({
|
|
96
103
|
className,
|
|
97
|
-
side = "bottom",
|
|
98
|
-
sideOffset = 8,
|
|
99
|
-
align = "start",
|
|
100
|
-
alignOffset = 0,
|
|
101
104
|
...props
|
|
102
|
-
}: NavigationMenuPrimitive.
|
|
105
|
+
}: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>) {
|
|
103
106
|
return (
|
|
104
|
-
<
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
<div
|
|
108
|
+
className={cn(
|
|
109
|
+
"absolute top-full left-0 isolate z-50 flex justify-center"
|
|
110
|
+
)}
|
|
111
|
+
>
|
|
112
|
+
<NavigationMenuPrimitive.Viewport
|
|
113
|
+
data-slot="navigation-menu-viewport"
|
|
110
114
|
className={cn(
|
|
111
|
-
"
|
|
115
|
+
"origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
112
116
|
className
|
|
113
117
|
)}
|
|
114
118
|
{...props}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
<NavigationMenuPrimitive.Viewport className="relative size-full overflow-hidden" />
|
|
118
|
-
</NavigationMenuPrimitive.Popup>
|
|
119
|
-
</NavigationMenuPrimitive.Positioner>
|
|
120
|
-
</NavigationMenuPrimitive.Portal>
|
|
119
|
+
/>
|
|
120
|
+
</div>
|
|
121
121
|
)
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
function NavigationMenuLink({
|
|
125
125
|
className,
|
|
126
126
|
...props
|
|
127
|
-
}: NavigationMenuPrimitive.Link
|
|
127
|
+
}: React.ComponentProps<typeof NavigationMenuPrimitive.Link>) {
|
|
128
128
|
return (
|
|
129
129
|
<NavigationMenuPrimitive.Link
|
|
130
130
|
data-slot="navigation-menu-link"
|
|
131
131
|
className={cn(
|
|
132
|
-
"
|
|
132
|
+
"data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/20 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",
|
|
133
133
|
className
|
|
134
134
|
)}
|
|
135
135
|
{...props}
|
|
@@ -140,29 +140,29 @@ function NavigationMenuLink({
|
|
|
140
140
|
function NavigationMenuIndicator({
|
|
141
141
|
className,
|
|
142
142
|
...props
|
|
143
|
-
}: React.
|
|
143
|
+
}: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>) {
|
|
144
144
|
return (
|
|
145
|
-
<NavigationMenuPrimitive.
|
|
145
|
+
<NavigationMenuPrimitive.Indicator
|
|
146
146
|
data-slot="navigation-menu-indicator"
|
|
147
147
|
className={cn(
|
|
148
|
-
"
|
|
148
|
+
"data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
|
|
149
149
|
className
|
|
150
150
|
)}
|
|
151
151
|
{...props}
|
|
152
152
|
>
|
|
153
|
-
<div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm
|
|
154
|
-
</NavigationMenuPrimitive.
|
|
153
|
+
<div className="bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" />
|
|
154
|
+
</NavigationMenuPrimitive.Indicator>
|
|
155
155
|
)
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
export {
|
|
159
159
|
NavigationMenu,
|
|
160
|
-
NavigationMenuContent,
|
|
161
|
-
NavigationMenuIndicator,
|
|
162
|
-
NavigationMenuItem,
|
|
163
|
-
NavigationMenuLink,
|
|
164
160
|
NavigationMenuList,
|
|
161
|
+
NavigationMenuItem,
|
|
162
|
+
NavigationMenuContent,
|
|
165
163
|
NavigationMenuTrigger,
|
|
164
|
+
NavigationMenuLink,
|
|
165
|
+
NavigationMenuIndicator,
|
|
166
|
+
NavigationMenuViewport,
|
|
166
167
|
navigationMenuTriggerStyle,
|
|
167
|
-
NavigationMenuPositioner,
|
|
168
168
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
|
+
import {
|
|
3
|
+
ChevronLeftIcon,
|
|
4
|
+
ChevronRightIcon,
|
|
5
|
+
MoreHorizontalIcon,
|
|
6
|
+
} from "lucide-react"
|
|
2
7
|
|
|
3
8
|
import { cn } from "@/lib/utils"
|
|
4
|
-
import { Button } from "@/components/ui/button"
|
|
5
|
-
import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react"
|
|
9
|
+
import { Button, buttonVariants } from "@/components/ui/button"
|
|
6
10
|
|
|
7
11
|
function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
|
|
8
12
|
return (
|
|
@@ -23,7 +27,7 @@ function PaginationContent({
|
|
|
23
27
|
return (
|
|
24
28
|
<ul
|
|
25
29
|
data-slot="pagination-content"
|
|
26
|
-
className={cn("flex items-center gap-
|
|
30
|
+
className={cn("flex flex-row items-center gap-1", className)}
|
|
27
31
|
{...props}
|
|
28
32
|
/>
|
|
29
33
|
)
|
|
@@ -45,55 +49,52 @@ function PaginationLink({
|
|
|
45
49
|
...props
|
|
46
50
|
}: PaginationLinkProps) {
|
|
47
51
|
return (
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
52
|
+
<a
|
|
53
|
+
aria-current={isActive ? "page" : undefined}
|
|
54
|
+
data-slot="pagination-link"
|
|
55
|
+
data-active={isActive}
|
|
56
|
+
className={cn(
|
|
57
|
+
buttonVariants({
|
|
58
|
+
variant: isActive ? "outline" : "ghost",
|
|
59
|
+
size,
|
|
60
|
+
}),
|
|
61
|
+
className
|
|
62
|
+
)}
|
|
63
|
+
{...props}
|
|
61
64
|
/>
|
|
62
65
|
)
|
|
63
66
|
}
|
|
64
67
|
|
|
65
68
|
function PaginationPrevious({
|
|
66
69
|
className,
|
|
67
|
-
text = "Previous",
|
|
68
70
|
...props
|
|
69
|
-
}: React.ComponentProps<typeof PaginationLink>
|
|
71
|
+
}: React.ComponentProps<typeof PaginationLink>) {
|
|
70
72
|
return (
|
|
71
73
|
<PaginationLink
|
|
72
74
|
aria-label="Go to previous page"
|
|
73
75
|
size="default"
|
|
74
|
-
className={cn("
|
|
76
|
+
className={cn("gap-1 px-2.5 sm:pl-2.5", className)}
|
|
75
77
|
{...props}
|
|
76
78
|
>
|
|
77
|
-
<ChevronLeftIcon
|
|
78
|
-
<span className="hidden
|
|
79
|
+
<ChevronLeftIcon />
|
|
80
|
+
<span className="hidden">Previous</span>
|
|
79
81
|
</PaginationLink>
|
|
80
82
|
)
|
|
81
83
|
}
|
|
82
84
|
|
|
83
85
|
function PaginationNext({
|
|
84
86
|
className,
|
|
85
|
-
text = "Next",
|
|
86
87
|
...props
|
|
87
|
-
}: React.ComponentProps<typeof PaginationLink>
|
|
88
|
+
}: React.ComponentProps<typeof PaginationLink>) {
|
|
88
89
|
return (
|
|
89
90
|
<PaginationLink
|
|
90
91
|
aria-label="Go to next page"
|
|
91
92
|
size="default"
|
|
92
|
-
className={cn("
|
|
93
|
+
className={cn("gap-1 px-2.5 sm:pr-2.5", className)}
|
|
93
94
|
{...props}
|
|
94
95
|
>
|
|
95
|
-
<span className="hidden
|
|
96
|
-
<ChevronRightIcon
|
|
96
|
+
<span className="hidden">Next</span>
|
|
97
|
+
<ChevronRightIcon />
|
|
97
98
|
</PaginationLink>
|
|
98
99
|
)
|
|
99
100
|
}
|
|
@@ -106,14 +107,10 @@ function PaginationEllipsis({
|
|
|
106
107
|
<span
|
|
107
108
|
aria-hidden
|
|
108
109
|
data-slot="pagination-ellipsis"
|
|
109
|
-
className={cn(
|
|
110
|
-
"flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
|
|
111
|
-
className
|
|
112
|
-
)}
|
|
110
|
+
className={cn("flex size-9 items-center justify-center", className)}
|
|
113
111
|
{...props}
|
|
114
112
|
>
|
|
115
|
-
<MoreHorizontalIcon
|
|
116
|
-
/>
|
|
113
|
+
<MoreHorizontalIcon className="size-4" />
|
|
117
114
|
<span className="sr-only">More pages</span>
|
|
118
115
|
</span>
|
|
119
116
|
)
|
|
@@ -122,9 +119,9 @@ function PaginationEllipsis({
|
|
|
122
119
|
export {
|
|
123
120
|
Pagination,
|
|
124
121
|
PaginationContent,
|
|
125
|
-
PaginationEllipsis,
|
|
126
|
-
PaginationItem,
|
|
127
122
|
PaginationLink,
|
|
128
|
-
|
|
123
|
+
PaginationItem,
|
|
129
124
|
PaginationPrevious,
|
|
125
|
+
PaginationNext,
|
|
126
|
+
PaginationEllipsis,
|
|
130
127
|
}
|
|
@@ -1,90 +1,48 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
3
|
import * as React from "react"
|
|
4
|
-
import
|
|
4
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover"
|
|
5
5
|
|
|
6
6
|
import { cn } from "@/lib/utils"
|
|
7
7
|
|
|
8
|
-
function Popover({
|
|
8
|
+
function Popover({
|
|
9
|
+
...props
|
|
10
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Root>) {
|
|
9
11
|
return <PopoverPrimitive.Root data-slot="popover" {...props} />
|
|
10
12
|
}
|
|
11
13
|
|
|
12
|
-
function PopoverTrigger({
|
|
14
|
+
function PopoverTrigger({
|
|
15
|
+
...props
|
|
16
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
|
|
13
17
|
return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />
|
|
14
18
|
}
|
|
15
19
|
|
|
16
20
|
function PopoverContent({
|
|
17
21
|
className,
|
|
18
22
|
align = "center",
|
|
19
|
-
alignOffset = 0,
|
|
20
|
-
side = "bottom",
|
|
21
23
|
sideOffset = 4,
|
|
22
24
|
...props
|
|
23
|
-
}: PopoverPrimitive.
|
|
24
|
-
Pick<
|
|
25
|
-
PopoverPrimitive.Positioner.Props,
|
|
26
|
-
"align" | "alignOffset" | "side" | "sideOffset"
|
|
27
|
-
>) {
|
|
25
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Content>) {
|
|
28
26
|
return (
|
|
29
27
|
<PopoverPrimitive.Portal>
|
|
30
|
-
<PopoverPrimitive.
|
|
28
|
+
<PopoverPrimitive.Content
|
|
29
|
+
data-slot="popover-content"
|
|
31
30
|
align={align}
|
|
32
|
-
alignOffset={alignOffset}
|
|
33
|
-
side={side}
|
|
34
31
|
sideOffset={sideOffset}
|
|
35
|
-
className=
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
className
|
|
42
|
-
)}
|
|
43
|
-
{...props}
|
|
44
|
-
/>
|
|
45
|
-
</PopoverPrimitive.Positioner>
|
|
32
|
+
className={cn(
|
|
33
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
34
|
+
className
|
|
35
|
+
)}
|
|
36
|
+
{...props}
|
|
37
|
+
/>
|
|
46
38
|
</PopoverPrimitive.Portal>
|
|
47
39
|
)
|
|
48
40
|
}
|
|
49
41
|
|
|
50
|
-
function
|
|
51
|
-
return (
|
|
52
|
-
<div
|
|
53
|
-
data-slot="popover-header"
|
|
54
|
-
className={cn("flex flex-col gap-0.5 text-sm", className)}
|
|
55
|
-
{...props}
|
|
56
|
-
/>
|
|
57
|
-
)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {
|
|
61
|
-
return (
|
|
62
|
-
<PopoverPrimitive.Title
|
|
63
|
-
data-slot="popover-title"
|
|
64
|
-
className={cn("font-medium", className)}
|
|
65
|
-
{...props}
|
|
66
|
-
/>
|
|
67
|
-
)
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function PopoverDescription({
|
|
71
|
-
className,
|
|
42
|
+
function PopoverAnchor({
|
|
72
43
|
...props
|
|
73
|
-
}: PopoverPrimitive.
|
|
74
|
-
return
|
|
75
|
-
<PopoverPrimitive.Description
|
|
76
|
-
data-slot="popover-description"
|
|
77
|
-
className={cn("text-muted-foreground", className)}
|
|
78
|
-
{...props}
|
|
79
|
-
/>
|
|
80
|
-
)
|
|
44
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
|
|
45
|
+
return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />
|
|
81
46
|
}
|
|
82
47
|
|
|
83
|
-
export {
|
|
84
|
-
Popover,
|
|
85
|
-
PopoverContent,
|
|
86
|
-
PopoverDescription,
|
|
87
|
-
PopoverHeader,
|
|
88
|
-
PopoverTitle,
|
|
89
|
-
PopoverTrigger,
|
|
90
|
-
}
|
|
48
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }
|
|
@@ -1,81 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress"
|
|
2
5
|
|
|
3
6
|
import { cn } from "@/lib/utils"
|
|
4
7
|
|
|
5
8
|
function Progress({
|
|
6
9
|
className,
|
|
7
|
-
children,
|
|
8
10
|
value,
|
|
9
11
|
...props
|
|
10
|
-
}: ProgressPrimitive.Root
|
|
12
|
+
}: React.ComponentProps<typeof ProgressPrimitive.Root>) {
|
|
11
13
|
return (
|
|
12
14
|
<ProgressPrimitive.Root
|
|
13
|
-
value={value}
|
|
14
15
|
data-slot="progress"
|
|
15
|
-
className={cn("flex flex-wrap gap-3", className)}
|
|
16
|
-
{...props}
|
|
17
|
-
>
|
|
18
|
-
{children}
|
|
19
|
-
<ProgressTrack>
|
|
20
|
-
<ProgressIndicator />
|
|
21
|
-
</ProgressTrack>
|
|
22
|
-
</ProgressPrimitive.Root>
|
|
23
|
-
)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {
|
|
27
|
-
return (
|
|
28
|
-
<ProgressPrimitive.Track
|
|
29
16
|
className={cn(
|
|
30
|
-
"relative
|
|
17
|
+
"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
|
|
31
18
|
className
|
|
32
19
|
)}
|
|
33
|
-
data-slot="progress-track"
|
|
34
20
|
{...props}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}: ProgressPrimitive.Indicator.Props) {
|
|
43
|
-
return (
|
|
44
|
-
<ProgressPrimitive.Indicator
|
|
45
|
-
data-slot="progress-indicator"
|
|
46
|
-
className={cn("h-full bg-primary transition-all", className)}
|
|
47
|
-
{...props}
|
|
48
|
-
/>
|
|
49
|
-
)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {
|
|
53
|
-
return (
|
|
54
|
-
<ProgressPrimitive.Label
|
|
55
|
-
className={cn("text-sm font-medium", className)}
|
|
56
|
-
data-slot="progress-label"
|
|
57
|
-
{...props}
|
|
58
|
-
/>
|
|
59
|
-
)
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {
|
|
63
|
-
return (
|
|
64
|
-
<ProgressPrimitive.Value
|
|
65
|
-
className={cn(
|
|
66
|
-
"ml-auto text-sm text-muted-foreground tabular-nums",
|
|
67
|
-
className
|
|
68
|
-
)}
|
|
69
|
-
data-slot="progress-value"
|
|
70
|
-
{...props}
|
|
71
|
-
/>
|
|
21
|
+
>
|
|
22
|
+
<ProgressPrimitive.Indicator
|
|
23
|
+
data-slot="progress-indicator"
|
|
24
|
+
className="bg-primary h-full w-full flex-1 transition-all"
|
|
25
|
+
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
|
26
|
+
/>
|
|
27
|
+
</ProgressPrimitive.Root>
|
|
72
28
|
)
|
|
73
29
|
}
|
|
74
30
|
|
|
75
|
-
export {
|
|
76
|
-
Progress,
|
|
77
|
-
ProgressTrack,
|
|
78
|
-
ProgressIndicator,
|
|
79
|
-
ProgressLabel,
|
|
80
|
-
ProgressValue,
|
|
81
|
-
}
|
|
31
|
+
export { Progress }
|
|
@@ -1,37 +1,44 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group"
|
|
5
|
+
import { CircleIcon } from "lucide-react"
|
|
5
6
|
|
|
6
7
|
import { cn } from "@/lib/utils"
|
|
7
8
|
|
|
8
|
-
function RadioGroup({
|
|
9
|
+
function RadioGroup({
|
|
10
|
+
className,
|
|
11
|
+
...props
|
|
12
|
+
}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {
|
|
9
13
|
return (
|
|
10
|
-
<RadioGroupPrimitive
|
|
14
|
+
<RadioGroupPrimitive.Root
|
|
11
15
|
data-slot="radio-group"
|
|
12
|
-
className={cn("grid
|
|
16
|
+
className={cn("grid gap-3", className)}
|
|
13
17
|
{...props}
|
|
14
18
|
/>
|
|
15
19
|
)
|
|
16
20
|
}
|
|
17
21
|
|
|
18
|
-
function RadioGroupItem({
|
|
22
|
+
function RadioGroupItem({
|
|
23
|
+
className,
|
|
24
|
+
...props
|
|
25
|
+
}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {
|
|
19
26
|
return (
|
|
20
|
-
<
|
|
27
|
+
<RadioGroupPrimitive.Item
|
|
21
28
|
data-slot="radio-group-item"
|
|
22
29
|
className={cn(
|
|
23
|
-
"
|
|
30
|
+
"border-input text-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
24
31
|
className
|
|
25
32
|
)}
|
|
26
33
|
{...props}
|
|
27
34
|
>
|
|
28
|
-
<
|
|
35
|
+
<RadioGroupPrimitive.Indicator
|
|
29
36
|
data-slot="radio-group-indicator"
|
|
30
|
-
className="flex
|
|
37
|
+
className="relative flex items-center justify-center"
|
|
31
38
|
>
|
|
32
|
-
<
|
|
33
|
-
</
|
|
34
|
-
</
|
|
39
|
+
<CircleIcon className="fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" />
|
|
40
|
+
</RadioGroupPrimitive.Indicator>
|
|
41
|
+
</RadioGroupPrimitive.Item>
|
|
35
42
|
)
|
|
36
43
|
}
|
|
37
44
|
|