@lark-apaas/coding-templates 0.1.5 → 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.
Files changed (82) hide show
  1. package/package.json +1 -1
  2. package/template-vite-react/README.md +175 -0
  3. package/template-vite-react/client/index.html +2 -1
  4. package/template-vite-react/client/src/components/layout.tsx +0 -2
  5. package/template-vite-react/client/src/components/ui/README.md +134 -0
  6. package/template-vite-react/client/src/components/ui/accordion.tsx +22 -28
  7. package/template-vite-react/client/src/components/ui/alert-dialog.tsx +34 -64
  8. package/template-vite-react/client/src/components/ui/alert.tsx +10 -15
  9. package/template-vite-react/client/src/components/ui/aspect-ratio.tsx +5 -16
  10. package/template-vite-react/client/src/components/ui/avatar.tsx +11 -67
  11. package/template-vite-react/client/src/components/ui/badge.tsx +21 -31
  12. package/template-vite-react/client/src/components/ui/breadcrumb.tsx +23 -39
  13. package/template-vite-react/client/src/components/ui/button.tsx +36 -25
  14. package/template-vite-react/client/src/components/ui/calendar.tsx +37 -43
  15. package/template-vite-react/client/src/components/ui/card.tsx +73 -94
  16. package/template-vite-react/client/src/components/ui/carousel.tsx +7 -8
  17. package/template-vite-react/client/src/components/ui/chart.tsx +35 -49
  18. package/template-vite-react/client/src/components/ui/checkbox.tsx +10 -7
  19. package/template-vite-react/client/src/components/ui/collapsible.tsx +20 -6
  20. package/template-vite-react/client/src/components/ui/command.tsx +52 -40
  21. package/template-vite-react/client/src/components/ui/context-menu.tsx +170 -117
  22. package/template-vite-react/client/src/components/ui/dialog.tsx +37 -52
  23. package/template-vite-react/client/src/components/ui/drawer.tsx +12 -9
  24. package/template-vite-react/client/src/components/ui/dropdown-menu.tsx +194 -133
  25. package/template-vite-react/client/src/components/ui/hover-card.tsx +24 -29
  26. package/template-vite-react/client/src/components/ui/input-group.tsx +39 -29
  27. package/template-vite-react/client/src/components/ui/input-otp.tsx +7 -17
  28. package/template-vite-react/client/src/components/ui/input.tsx +4 -3
  29. package/template-vite-react/client/src/components/ui/label.tsx +9 -3
  30. package/template-vite-react/client/src/components/ui/menubar.tsx +160 -92
  31. package/template-vite-react/client/src/components/ui/navigation-menu.tsx +45 -45
  32. package/template-vite-react/client/src/components/ui/pagination.tsx +32 -35
  33. package/template-vite-react/client/src/components/ui/popover.tsx +20 -62
  34. package/template-vite-react/client/src/components/ui/progress.tsx +14 -64
  35. package/template-vite-react/client/src/components/ui/radio-group.tsx +20 -13
  36. package/template-vite-react/client/src/components/ui/resizable.tsx +18 -10
  37. package/template-vite-react/client/src/components/ui/scroll-area.tsx +13 -10
  38. package/template-vite-react/client/src/components/ui/select.tsx +122 -78
  39. package/template-vite-react/client/src/components/ui/separator.tsx +7 -4
  40. package/template-vite-react/client/src/components/ui/sheet.tsx +42 -41
  41. package/template-vite-react/client/src/components/ui/sidebar.tsx +162 -156
  42. package/template-vite-react/client/src/components/ui/skeleton.tsx +1 -1
  43. package/template-vite-react/client/src/components/ui/slider.tsx +52 -22
  44. package/template-vite-react/client/src/components/ui/sonner.tsx +44 -26
  45. package/template-vite-react/client/src/components/ui/switch.tsx +9 -8
  46. package/template-vite-react/client/src/components/ui/table.tsx +5 -5
  47. package/template-vite-react/client/src/components/ui/tabs.tsx +24 -38
  48. package/template-vite-react/client/src/components/ui/textarea.tsx +1 -1
  49. package/template-vite-react/client/src/components/ui/toggle-group.tsx +14 -20
  50. package/template-vite-react/client/src/components/ui/toggle.tsx +13 -10
  51. package/template-vite-react/client/src/components/ui/tooltip.tsx +30 -33
  52. package/template-vite-react/client/src/index.css +130 -0
  53. package/template-vite-react/client/src/main.tsx +1 -4
  54. package/template-vite-react/components.json +2 -6
  55. package/template-vite-react/eslint.config.js +11 -0
  56. package/template-vite-react/package.json +27 -2
  57. package/template-vite-react/client/src/components/header.tsx +0 -22
  58. package/template-vite-react/client/src/components/theme-provider.tsx +0 -45
  59. package/template-vite-react/client/src/components/ui/icons/file-ae-colorful-icon.tsx +0 -21
  60. package/template-vite-react/client/src/components/ui/icons/file-ai-colorful-icon.tsx +0 -36
  61. package/template-vite-react/client/src/components/ui/icons/file-android-colorful-icon.tsx +0 -33
  62. package/template-vite-react/client/src/components/ui/icons/file-audio-colorful-icon.tsx +0 -21
  63. package/template-vite-react/client/src/components/ui/icons/file-code-colorful-icon.tsx +0 -28
  64. package/template-vite-react/client/src/components/ui/icons/file-csv-colorful-icon.tsx +0 -21
  65. package/template-vite-react/client/src/components/ui/icons/file-eml-colorful-icon.tsx +0 -29
  66. package/template-vite-react/client/src/components/ui/icons/file-ios-colorful-icon.tsx +0 -25
  67. package/template-vite-react/client/src/components/ui/icons/file-keynote-colorful-icon.tsx +0 -29
  68. package/template-vite-react/client/src/components/ui/icons/file-pages-colorful-icon.tsx +0 -29
  69. package/template-vite-react/client/src/components/ui/icons/file-ps-colorful-icon.tsx +0 -21
  70. package/template-vite-react/client/src/components/ui/icons/file-sketch-colorful-icon.tsx +0 -21
  71. package/template-vite-react/client/src/components/ui/icons/file-slide-colorful-icon.tsx +0 -21
  72. package/template-vite-react/client/src/components/ui/icons/file-vcf-colorful-icon.tsx +0 -29
  73. package/template-vite-react/client/src/components/ui/icons/file-wiki-excel-colorful-icon.tsx +0 -23
  74. package/template-vite-react/client/src/components/ui/icons/file-wiki-image-colorful-icon.tsx +0 -27
  75. package/template-vite-react/client/src/components/ui/icons/file-wiki-pdf-colorful-icon.tsx +0 -20
  76. package/template-vite-react/client/src/components/ui/icons/file-wiki-ppt-colorful-icon.tsx +0 -21
  77. package/template-vite-react/client/src/components/ui/icons/file-wiki-text-colorful-icon.tsx +0 -12
  78. package/template-vite-react/client/src/components/ui/icons/file-wiki-unknown-colorful-icon.tsx +0 -14
  79. package/template-vite-react/client/src/components/ui/icons/file-wiki-video-colorful-icon.tsx +0 -23
  80. package/template-vite-react/client/src/components/ui/icons/file-wiki-word-colorful-icon.tsx +0 -38
  81. package/template-vite-react/client/src/components/ui/icons/file-wiki-zip-colorful-icon.tsx +0 -21
  82. package/template-vite-react/client/src/types/index.ts +0 -1
@@ -1,48 +1,43 @@
1
- import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card"
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({ ...props }: PreviewCardPrimitive.Root.Props) {
6
- return <PreviewCardPrimitive.Root data-slot="hover-card" {...props} />
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({ ...props }: PreviewCardPrimitive.Trigger.Props) {
14
+ function HoverCardTrigger({
15
+ ...props
16
+ }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {
10
17
  return (
11
- <PreviewCardPrimitive.Trigger data-slot="hover-card-trigger" {...props} />
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
- alignOffset = 4,
25
+ sideOffset = 4,
21
26
  ...props
22
- }: PreviewCardPrimitive.Popup.Props &
23
- Pick<
24
- PreviewCardPrimitive.Positioner.Props,
25
- "align" | "alignOffset" | "side" | "sideOffset"
26
- >) {
27
+ }: React.ComponentProps<typeof HoverCardPrimitive.Content>) {
27
28
  return (
28
- <PreviewCardPrimitive.Portal data-slot="hover-card-portal">
29
- <PreviewCardPrimitive.Positioner
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="isolate z-50"
35
- >
36
- <PreviewCardPrimitive.Popup
37
- data-slot="hover-card-content"
38
- className={cn(
39
- "z-50 w-64 origin-(--transform-origin) 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=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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",
40
- className
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 relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
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 text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
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-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
45
+ "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
30
46
  "inline-end":
31
- "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
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-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
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-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2",
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
- "flex items-center gap-2 text-sm shadow-none",
68
- {
69
- variants: {
70
- size: {
71
- xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
72
- sm: "",
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" | "type"> &
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 text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
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 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled: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-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
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
- "cn-input-otp flex items-center has-disabled:opacity-50",
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
- "relative flex size-8 items-center justify-center border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40",
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="h-4 w-px animate-caret-blink bg-foreground duration-1000" />
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
- data-slot="input-otp-separator"
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
- <InputPrimitive
7
+ <input
9
8
  type={type}
10
9
  data-slot="input"
11
10
  className={cn(
12
- "h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-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 disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
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({ className, ...props }: React.ComponentProps<"label">) {
8
+ function Label({
9
+ className,
10
+ ...props
11
+ }: React.ComponentProps<typeof LabelPrimitive.Root>) {
6
12
  return (
7
- <label
13
+ <LabelPrimitive.Root
8
14
  data-slot="label"
9
15
  className={cn(
10
- "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
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}