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

@ -4,10 +4,10 @@ import * as React from "react"
import useEmblaCarousel, {
type UseEmblaCarouselType,
} from "embla-carousel-react"
import { ArrowLeft, ArrowRight } from "lucide-react"
import { cn } from "@/lib/utils"
import { Button } from "@/components/ui/button"
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react"
type CarouselApi = UseEmblaCarouselType[1]
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>
@ -174,7 +174,7 @@ function CarouselItem({ className, ...props }: React.ComponentProps<"div">) {
function CarouselPrevious({
className,
variant = "outline",
size = "icon",
size = "icon-sm",
...props
}: React.ComponentProps<typeof Button>) {
const { orientation, scrollPrev, canScrollPrev } = useCarousel()
@ -185,7 +185,7 @@ function CarouselPrevious({
variant={variant}
size={size}
className={cn(
"absolute size-8 rounded-full",
"rounded-full absolute touch-manipulation",
orientation === "horizontal"
? "top-1/2 -left-12 -translate-y-1/2"
: "-top-12 left-1/2 -translate-x-1/2 rotate-90",
@ -195,7 +195,8 @@ function CarouselPrevious({
onClick={scrollPrev}
{...props}
>
<ArrowLeft />
<ChevronLeftIcon
/>
<span className="sr-only">Previous slide</span>
</Button>
)
@ -204,7 +205,7 @@ function CarouselPrevious({
function CarouselNext({
className,
variant = "outline",
size = "icon",
size = "icon-sm",
...props
}: React.ComponentProps<typeof Button>) {
const { orientation, scrollNext, canScrollNext } = useCarousel()
@ -215,7 +216,7 @@ function CarouselNext({
variant={variant}
size={size}
className={cn(
"absolute size-8 rounded-full",
"rounded-full absolute touch-manipulation",
orientation === "horizontal"
? "top-1/2 -right-12 -translate-y-1/2"
: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
@ -225,7 +226,8 @@ function CarouselNext({
onClick={scrollNext}
{...props}
>
<ArrowRight />
<ChevronRightIcon
/>
<span className="sr-only">Next slide</span>
</Button>
)
@ -238,4 +240,5 @@ export {
CarouselItem,
CarouselPrevious,
CarouselNext,
useCarousel,
}