@lark-apaas/coding-templates 0.1.5 → 0.1.7
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/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/components.json +2 -6
- package/template-vite-react/eslint.config.js +11 -0
- package/template-vite-react/package.json +29 -2
- 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,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
|
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { GripVerticalIcon } from "lucide-react"
|
|
1
5
|
import * as ResizablePrimitive from "react-resizable-panels"
|
|
2
6
|
|
|
3
7
|
import { cn } from "@/lib/utils"
|
|
@@ -5,12 +9,12 @@ import { cn } from "@/lib/utils"
|
|
|
5
9
|
function ResizablePanelGroup({
|
|
6
10
|
className,
|
|
7
11
|
...props
|
|
8
|
-
}: ResizablePrimitive.
|
|
12
|
+
}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {
|
|
9
13
|
return (
|
|
10
|
-
<ResizablePrimitive.
|
|
14
|
+
<ResizablePrimitive.PanelGroup
|
|
11
15
|
data-slot="resizable-panel-group"
|
|
12
16
|
className={cn(
|
|
13
|
-
"flex h-full w-full
|
|
17
|
+
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
14
18
|
className
|
|
15
19
|
)}
|
|
16
20
|
{...props}
|
|
@@ -18,7 +22,9 @@ function ResizablePanelGroup({
|
|
|
18
22
|
)
|
|
19
23
|
}
|
|
20
24
|
|
|
21
|
-
function ResizablePanel({
|
|
25
|
+
function ResizablePanel({
|
|
26
|
+
...props
|
|
27
|
+
}: React.ComponentProps<typeof ResizablePrimitive.Panel>) {
|
|
22
28
|
return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />
|
|
23
29
|
}
|
|
24
30
|
|
|
@@ -26,23 +32,25 @@ function ResizableHandle({
|
|
|
26
32
|
withHandle,
|
|
27
33
|
className,
|
|
28
34
|
...props
|
|
29
|
-
}: ResizablePrimitive.
|
|
35
|
+
}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
|
30
36
|
withHandle?: boolean
|
|
31
37
|
}) {
|
|
32
38
|
return (
|
|
33
|
-
<ResizablePrimitive.
|
|
39
|
+
<ResizablePrimitive.PanelResizeHandle
|
|
34
40
|
data-slot="resizable-handle"
|
|
35
41
|
className={cn(
|
|
36
|
-
"relative flex w-px items-center justify-center
|
|
42
|
+
"bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
37
43
|
className
|
|
38
44
|
)}
|
|
39
45
|
{...props}
|
|
40
46
|
>
|
|
41
47
|
{withHandle && (
|
|
42
|
-
<div className="z-10 flex h-
|
|
48
|
+
<div className="bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border">
|
|
49
|
+
<GripVerticalIcon className="size-2.5" />
|
|
50
|
+
</div>
|
|
43
51
|
)}
|
|
44
|
-
</ResizablePrimitive.
|
|
52
|
+
</ResizablePrimitive.PanelResizeHandle>
|
|
45
53
|
)
|
|
46
54
|
}
|
|
47
55
|
|
|
48
|
-
export {
|
|
56
|
+
export { ResizablePanelGroup, ResizablePanel, ResizableHandle }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
3
|
import * as React from "react"
|
|
4
|
-
import
|
|
4
|
+
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"
|
|
5
5
|
|
|
6
6
|
import { cn } from "@/lib/utils"
|
|
7
7
|
|
|
@@ -9,7 +9,7 @@ function ScrollArea({
|
|
|
9
9
|
className,
|
|
10
10
|
children,
|
|
11
11
|
...props
|
|
12
|
-
}: ScrollAreaPrimitive.Root
|
|
12
|
+
}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
|
|
13
13
|
return (
|
|
14
14
|
<ScrollAreaPrimitive.Root
|
|
15
15
|
data-slot="scroll-area"
|
|
@@ -18,7 +18,7 @@ function ScrollArea({
|
|
|
18
18
|
>
|
|
19
19
|
<ScrollAreaPrimitive.Viewport
|
|
20
20
|
data-slot="scroll-area-viewport"
|
|
21
|
-
className="size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:
|
|
21
|
+
className="focus-visible:ring-ring/20 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
|
|
22
22
|
>
|
|
23
23
|
{children}
|
|
24
24
|
</ScrollAreaPrimitive.Viewport>
|
|
@@ -32,23 +32,26 @@ function ScrollBar({
|
|
|
32
32
|
className,
|
|
33
33
|
orientation = "vertical",
|
|
34
34
|
...props
|
|
35
|
-
}: ScrollAreaPrimitive.
|
|
35
|
+
}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
|
|
36
36
|
return (
|
|
37
|
-
<ScrollAreaPrimitive.
|
|
37
|
+
<ScrollAreaPrimitive.ScrollAreaScrollbar
|
|
38
38
|
data-slot="scroll-area-scrollbar"
|
|
39
|
-
data-orientation={orientation}
|
|
40
39
|
orientation={orientation}
|
|
41
40
|
className={cn(
|
|
42
|
-
"flex touch-none p-px transition-colors select-none
|
|
41
|
+
"flex touch-none p-px transition-colors select-none",
|
|
42
|
+
orientation === "vertical" &&
|
|
43
|
+
"h-full w-2.5 border-l border-l-transparent",
|
|
44
|
+
orientation === "horizontal" &&
|
|
45
|
+
"h-2.5 flex-col border-t border-t-transparent",
|
|
43
46
|
className
|
|
44
47
|
)}
|
|
45
48
|
{...props}
|
|
46
49
|
>
|
|
47
|
-
<ScrollAreaPrimitive.
|
|
50
|
+
<ScrollAreaPrimitive.ScrollAreaThumb
|
|
48
51
|
data-slot="scroll-area-thumb"
|
|
49
|
-
className="relative flex-1 rounded-full
|
|
52
|
+
className="bg-border relative flex-1 rounded-full"
|
|
50
53
|
/>
|
|
51
|
-
</ScrollAreaPrimitive.
|
|
54
|
+
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
52
55
|
)
|
|
53
56
|
}
|
|
54
57
|
|