@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,48 +1,43 @@
|
|
|
1
|
-
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as HoverCardPrimitive from "@radix-ui/react-hover-card"
|
|
2
5
|
|
|
3
6
|
import { cn } from "@/lib/utils"
|
|
4
7
|
|
|
5
|
-
function HoverCard({
|
|
6
|
-
|
|
8
|
+
function HoverCard({
|
|
9
|
+
...props
|
|
10
|
+
}: React.ComponentProps<typeof HoverCardPrimitive.Root>) {
|
|
11
|
+
return <HoverCardPrimitive.Root data-slot="hover-card" {...props} />
|
|
7
12
|
}
|
|
8
13
|
|
|
9
|
-
function HoverCardTrigger({
|
|
14
|
+
function HoverCardTrigger({
|
|
15
|
+
...props
|
|
16
|
+
}: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {
|
|
10
17
|
return (
|
|
11
|
-
<
|
|
18
|
+
<HoverCardPrimitive.Trigger data-slot="hover-card-trigger" {...props} />
|
|
12
19
|
)
|
|
13
20
|
}
|
|
14
21
|
|
|
15
22
|
function HoverCardContent({
|
|
16
23
|
className,
|
|
17
|
-
side = "bottom",
|
|
18
|
-
sideOffset = 4,
|
|
19
24
|
align = "center",
|
|
20
|
-
|
|
25
|
+
sideOffset = 4,
|
|
21
26
|
...props
|
|
22
|
-
}:
|
|
23
|
-
Pick<
|
|
24
|
-
PreviewCardPrimitive.Positioner.Props,
|
|
25
|
-
"align" | "alignOffset" | "side" | "sideOffset"
|
|
26
|
-
>) {
|
|
27
|
+
}: React.ComponentProps<typeof HoverCardPrimitive.Content>) {
|
|
27
28
|
return (
|
|
28
|
-
<
|
|
29
|
-
<
|
|
29
|
+
<HoverCardPrimitive.Portal data-slot="hover-card-portal">
|
|
30
|
+
<HoverCardPrimitive.Content
|
|
31
|
+
data-slot="hover-card-content"
|
|
30
32
|
align={align}
|
|
31
|
-
alignOffset={alignOffset}
|
|
32
|
-
side={side}
|
|
33
33
|
sideOffset={sideOffset}
|
|
34
|
-
className=
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
)}
|
|
42
|
-
{...props}
|
|
43
|
-
/>
|
|
44
|
-
</PreviewCardPrimitive.Positioner>
|
|
45
|
-
</PreviewCardPrimitive.Portal>
|
|
34
|
+
className={cn(
|
|
35
|
+
"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-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
36
|
+
className
|
|
37
|
+
)}
|
|
38
|
+
{...props}
|
|
39
|
+
/>
|
|
40
|
+
</HoverCardPrimitive.Portal>
|
|
46
41
|
)
|
|
47
42
|
}
|
|
48
43
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
1
3
|
import * as React from "react"
|
|
2
4
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
3
5
|
|
|
@@ -12,7 +14,21 @@ function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
12
14
|
data-slot="input-group"
|
|
13
15
|
role="group"
|
|
14
16
|
className={cn(
|
|
15
|
-
"group/input-group
|
|
17
|
+
"group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border transition-[color,box-shadow] outline-none",
|
|
18
|
+
"h-9 min-w-0 has-[>textarea]:h-auto",
|
|
19
|
+
|
|
20
|
+
// Variants based on alignment.
|
|
21
|
+
"has-[>[data-align=inline-start]]:[&>input]:pl-2",
|
|
22
|
+
"has-[>[data-align=inline-end]]:[&>input]:pr-2",
|
|
23
|
+
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
24
|
+
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
|
|
25
|
+
|
|
26
|
+
// Focus state.
|
|
27
|
+
"has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/20 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]",
|
|
28
|
+
|
|
29
|
+
// Error state.
|
|
30
|
+
"has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",
|
|
31
|
+
|
|
16
32
|
className
|
|
17
33
|
)}
|
|
18
34
|
{...props}
|
|
@@ -21,18 +37,18 @@ function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
21
37
|
}
|
|
22
38
|
|
|
23
39
|
const inputGroupAddonVariants = cva(
|
|
24
|
-
"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium
|
|
40
|
+
"text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",
|
|
25
41
|
{
|
|
26
42
|
variants: {
|
|
27
43
|
align: {
|
|
28
44
|
"inline-start":
|
|
29
|
-
"order-first pl-
|
|
45
|
+
"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
|
|
30
46
|
"inline-end":
|
|
31
|
-
"order-last pr-
|
|
47
|
+
"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
|
|
32
48
|
"block-start":
|
|
33
|
-
"order-first w-full justify-start px-
|
|
49
|
+
"order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5",
|
|
34
50
|
"block-end":
|
|
35
|
-
"order-last w-full justify-start px-
|
|
51
|
+
"order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5",
|
|
36
52
|
},
|
|
37
53
|
},
|
|
38
54
|
defaultVariants: {
|
|
@@ -63,23 +79,19 @@ function InputGroupAddon({
|
|
|
63
79
|
)
|
|
64
80
|
}
|
|
65
81
|
|
|
66
|
-
const inputGroupButtonVariants = cva(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"icon-xs":
|
|
74
|
-
"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
|
|
75
|
-
"icon-sm": "size-8 p-0 has-[>svg]:p-0",
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
defaultVariants: {
|
|
79
|
-
size: "xs",
|
|
82
|
+
const inputGroupButtonVariants = cva("text-sm flex gap-2 items-center", {
|
|
83
|
+
variants: {
|
|
84
|
+
size: {
|
|
85
|
+
xs: "h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
|
|
86
|
+
sm: "h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5",
|
|
87
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
|
|
88
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0",
|
|
80
89
|
},
|
|
81
|
-
}
|
|
82
|
-
|
|
90
|
+
},
|
|
91
|
+
defaultVariants: {
|
|
92
|
+
size: "xs",
|
|
93
|
+
},
|
|
94
|
+
})
|
|
83
95
|
|
|
84
96
|
function InputGroupButton({
|
|
85
97
|
className,
|
|
@@ -87,10 +99,8 @@ function InputGroupButton({
|
|
|
87
99
|
variant = "ghost",
|
|
88
100
|
size = "xs",
|
|
89
101
|
...props
|
|
90
|
-
}: Omit<React.ComponentProps<typeof Button>, "size"
|
|
91
|
-
VariantProps<typeof inputGroupButtonVariants>
|
|
92
|
-
type?: "button" | "submit" | "reset"
|
|
93
|
-
}) {
|
|
102
|
+
}: Omit<React.ComponentProps<typeof Button>, "size"> &
|
|
103
|
+
VariantProps<typeof inputGroupButtonVariants>) {
|
|
94
104
|
return (
|
|
95
105
|
<Button
|
|
96
106
|
type={type}
|
|
@@ -106,7 +116,7 @@ function InputGroupText({ className, ...props }: React.ComponentProps<"span">) {
|
|
|
106
116
|
return (
|
|
107
117
|
<span
|
|
108
118
|
className={cn(
|
|
109
|
-
"flex items-center gap-2 text-sm
|
|
119
|
+
"text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
110
120
|
className
|
|
111
121
|
)}
|
|
112
122
|
{...props}
|
|
@@ -122,7 +132,7 @@ function InputGroupInput({
|
|
|
122
132
|
<Input
|
|
123
133
|
data-slot="input-group-control"
|
|
124
134
|
className={cn(
|
|
125
|
-
"flex-1 rounded-none border-0 bg-transparent
|
|
135
|
+
"flex-1 rounded-none border-0 bg-transparent focus-visible:ring-0 dark:bg-transparent",
|
|
126
136
|
className
|
|
127
137
|
)}
|
|
128
138
|
{...props}
|
|
@@ -138,7 +148,7 @@ function InputGroupTextarea({
|
|
|
138
148
|
<Textarea
|
|
139
149
|
data-slot="input-group-control"
|
|
140
150
|
className={cn(
|
|
141
|
-
"flex-1 resize-none rounded-none border-0 bg-transparent py-
|
|
151
|
+
"flex-1 resize-none rounded-none border-0 bg-transparent py-3 focus-visible:ring-0 dark:bg-transparent",
|
|
142
152
|
className
|
|
143
153
|
)}
|
|
144
154
|
{...props}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from "react"
|
|
4
4
|
import { OTPInput, OTPInputContext } from "input-otp"
|
|
5
|
+
import { MinusIcon } from "lucide-react"
|
|
5
6
|
|
|
6
7
|
import { cn } from "@/lib/utils"
|
|
7
|
-
import { MinusIcon } from "lucide-react"
|
|
8
8
|
|
|
9
9
|
function InputOTP({
|
|
10
10
|
className,
|
|
@@ -17,10 +17,9 @@ function InputOTP({
|
|
|
17
17
|
<OTPInput
|
|
18
18
|
data-slot="input-otp"
|
|
19
19
|
containerClassName={cn(
|
|
20
|
-
"
|
|
20
|
+
"flex items-center gap-2 has-disabled:opacity-50",
|
|
21
21
|
containerClassName
|
|
22
22
|
)}
|
|
23
|
-
spellCheck={false}
|
|
24
23
|
className={cn("disabled:cursor-not-allowed", className)}
|
|
25
24
|
{...props}
|
|
26
25
|
/>
|
|
@@ -31,10 +30,7 @@ function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
31
30
|
return (
|
|
32
31
|
<div
|
|
33
32
|
data-slot="input-otp-group"
|
|
34
|
-
className={cn(
|
|
35
|
-
"flex items-center rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40",
|
|
36
|
-
className
|
|
37
|
-
)}
|
|
33
|
+
className={cn("flex items-center", className)}
|
|
38
34
|
{...props}
|
|
39
35
|
/>
|
|
40
36
|
)
|
|
@@ -55,7 +51,7 @@ function InputOTPSlot({
|
|
|
55
51
|
data-slot="input-otp-slot"
|
|
56
52
|
data-active={isActive}
|
|
57
53
|
className={cn(
|
|
58
|
-
"
|
|
54
|
+
"data-[active=true]:border-ring data-[active=true]:ring-ring/20 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",
|
|
59
55
|
className
|
|
60
56
|
)}
|
|
61
57
|
{...props}
|
|
@@ -63,7 +59,7 @@ function InputOTPSlot({
|
|
|
63
59
|
{char}
|
|
64
60
|
{hasFakeCaret && (
|
|
65
61
|
<div className="pointer-events-none absolute inset-0 flex items-center justify-center">
|
|
66
|
-
<div className="
|
|
62
|
+
<div className="animate-caret-blink bg-foreground h-4 w-px duration-1000" />
|
|
67
63
|
</div>
|
|
68
64
|
)}
|
|
69
65
|
</div>
|
|
@@ -72,14 +68,8 @@ function InputOTPSlot({
|
|
|
72
68
|
|
|
73
69
|
function InputOTPSeparator({ ...props }: React.ComponentProps<"div">) {
|
|
74
70
|
return (
|
|
75
|
-
<div
|
|
76
|
-
|
|
77
|
-
className="flex items-center [&_svg:not([class*='size-'])]:size-4"
|
|
78
|
-
role="separator"
|
|
79
|
-
{...props}
|
|
80
|
-
>
|
|
81
|
-
<MinusIcon
|
|
82
|
-
/>
|
|
71
|
+
<div data-slot="input-otp-separator" role="separator" {...props}>
|
|
72
|
+
<MinusIcon />
|
|
83
73
|
</div>
|
|
84
74
|
)
|
|
85
75
|
}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
|
-
import { Input as InputPrimitive } from "@base-ui/react/input"
|
|
3
2
|
|
|
4
3
|
import { cn } from "@/lib/utils"
|
|
5
4
|
|
|
6
5
|
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
7
6
|
return (
|
|
8
|
-
<
|
|
7
|
+
<input
|
|
9
8
|
type={type}
|
|
10
9
|
data-slot="input"
|
|
11
10
|
className={cn(
|
|
12
|
-
"h-
|
|
11
|
+
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
12
|
+
"enabled:hover:border-ring focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[3px]",
|
|
13
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
13
14
|
className
|
|
14
15
|
)}
|
|
15
16
|
{...props}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
1
3
|
import * as React from "react"
|
|
4
|
+
import * as LabelPrimitive from "@radix-ui/react-label"
|
|
2
5
|
|
|
3
6
|
import { cn } from "@/lib/utils"
|
|
4
7
|
|
|
5
|
-
function Label({
|
|
8
|
+
function Label({
|
|
9
|
+
className,
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof LabelPrimitive.Root>) {
|
|
6
12
|
return (
|
|
7
|
-
<
|
|
13
|
+
<LabelPrimitive.Root
|
|
8
14
|
data-slot="label"
|
|
9
15
|
className={cn(
|
|
10
|
-
"flex items-center gap-2 text-sm leading-none font-
|
|
16
|
+
"flex items-center gap-2 text-sm leading-none font-normal select-none group-data-[disabled=true]:cursor-not-allowed group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
11
17
|
className
|
|
12
18
|
)}
|
|
13
19
|
{...props}
|