feat: refactor UI components and introduce new ones

- Updated toggle component to use new radix-ui import and improved styles.
- Refactored tooltip component to align with new radix-ui structure and enhanced styles.
- Added button group component for better button organization.
- Introduced chart component with responsive design and tooltip functionality.
- Created empty state components for better user experience.
- Developed field components for form handling with improved accessibility.
- Added input group component for better input management.
- Introduced item components for structured content display.
- Created keyboard shortcut components for better user interaction.
- Added spinner component for loading states.
This commit is contained in:
암냥 2026-01-18 14:19:08 +09:00
commit 4f7b579fac
No known key found for this signature in database
55 changed files with 2036 additions and 718 deletions

View file

@ -1,26 +1,24 @@
"use client"
import * as React from "react"
import * as LabelPrimitive from "@radix-ui/react-label"
import { cva, type VariantProps } from "class-variance-authority"
import { Label as LabelPrimitive } from "radix-ui"
import { cn } from "@/lib/utils"
const labelVariants = cva(
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
)
const Label = React.forwardRef<
React.ElementRef<typeof LabelPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
VariantProps<typeof labelVariants>
>(({ className, ...props }, ref) => (
<LabelPrimitive.Root
ref={ref}
className={cn(labelVariants(), className)}
{...props}
/>
))
Label.displayName = LabelPrimitive.Root.displayName
function Label({
className,
...props
}: React.ComponentProps<typeof LabelPrimitive.Root>) {
return (
<LabelPrimitive.Root
data-slot="label"
className={cn(
"gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",
className
)}
{...props}
/>
)
}
export { Label }