From 412e625c4a8bf78cf223eb4e2adc52a3d8ea6bd8 Mon Sep 17 00:00:00 2001 From: Kristof Csillag Date: Mon, 26 May 2025 18:37:31 +0200 Subject: [PATCH] Get rid of the @ path alias Just use relative imports everywhere, it's easier to resolve in an environment when we want to include multiple modules side by side in the same workspace. --- src/components/ui/accordion.tsx | 2 +- src/components/ui/alert-dialog.tsx | 4 +- src/components/ui/alert.tsx | 2 +- src/components/ui/avatar.tsx | 2 +- src/components/ui/badge.tsx | 2 +- src/components/ui/breadcrumb.tsx | 2 +- src/components/ui/button.tsx | 2 +- src/components/ui/calendar.tsx | 4 +- src/components/ui/card.tsx | 2 +- src/components/ui/carousel.tsx | 4 +- src/components/ui/chart.tsx | 2 +- src/components/ui/checkbox.tsx | 2 +- src/components/ui/command.tsx | 4 +- src/components/ui/context-menu.tsx | 2 +- src/components/ui/dialog.tsx | 2 +- src/components/ui/drawer.tsx | 2 +- src/components/ui/dropdown-menu.tsx | 2 +- src/components/ui/form.tsx | 4 +- src/components/ui/hover-card.tsx | 2 +- src/components/ui/input-otp.tsx | 2 +- src/components/ui/input.tsx | 2 +- src/components/ui/label.tsx | 2 +- src/components/ui/menubar.tsx | 2 +- src/components/ui/navigation-menu.tsx | 2 +- src/components/ui/pagination.tsx | 4 +- src/components/ui/popover.tsx | 2 +- src/components/ui/progress.tsx | 2 +- src/components/ui/radio-group.tsx | 2 +- src/components/ui/resizable.tsx | 2 +- src/components/ui/scroll-area.tsx | 2 +- src/components/ui/select.tsx | 2 +- src/components/ui/separator.tsx | 2 +- src/components/ui/sheet.tsx | 2 +- src/components/ui/sidebar.tsx | 16 ++-- src/components/ui/skeleton.tsx | 2 +- src/components/ui/slider.tsx | 2 +- src/components/ui/switch.tsx | 2 +- src/components/ui/table.tsx | 2 +- src/components/ui/tabs.tsx | 2 +- src/components/ui/textarea.tsx | 2 +- src/components/ui/toggle-group.tsx | 4 +- src/components/ui/toggle.tsx | 2 +- src/components/ui/tooltip.tsx | 2 +- src/index.ts | 92 +++++++++---------- src/stories/Accordion/Accordion.stories.tsx | 2 +- src/stories/Alert/Alert.stories.tsx | 2 +- .../AlertDialog/AlertDialog.stories.tsx | 4 +- .../AspectRatio/AspectRatio.stories.tsx | 2 +- src/stories/Avatar/Avatar.stories.tsx | 2 +- src/stories/Badge/Badge.stories.tsx | 2 +- src/stories/Breadcrumb/Breadcrumb.stories.tsx | 2 +- src/stories/Button/Button.stories.tsx | 2 +- src/stories/Calendar/Calendar.stories.tsx | 2 +- src/stories/Card/Card.stories.tsx | 4 +- src/stories/Carousel/Carousel.stories.tsx | 4 +- src/stories/Checkbox/Checkbox.stories.tsx | 4 +- .../Collapsible/Collapsible.stories.tsx | 4 +- src/stories/Command/Command.stories.tsx | 2 +- .../ContextMenu/ContextMenu.stories.tsx | 2 +- src/stories/Dialog/Dialog.stories.tsx | 4 +- src/stories/Drawer/Drawer.stories.tsx | 4 +- .../DropdownMenu/DropdownMenu.stories.tsx | 4 +- src/stories/Form/Form.stories.tsx | 8 +- src/stories/HoverCard/HoverCard.stories.tsx | 2 +- src/stories/Input/Input.stories.tsx | 4 +- src/stories/InputOTP/InputOTP.stories.tsx | 2 +- src/stories/Label/Label.stories.tsx | 4 +- src/stories/Menubar/Menubar.stories.tsx | 2 +- .../NavigationMenu/NavigationMenu.stories.tsx | 2 +- src/stories/Pagination/Pagination.stories.tsx | 2 +- src/stories/Popover/Popover.stories.tsx | 8 +- src/stories/Progress/Progress.stories.tsx | 2 +- src/stories/RadioGroup/RadioGroup.stories.tsx | 4 +- src/stories/Resizable/Resizable.stories.tsx | 2 +- src/stories/ScrollArea/ScrollArea.stories.tsx | 2 +- src/stories/Select/Select.stories.tsx | 2 +- src/stories/Separator/Separator.stories.tsx | 2 +- src/stories/Sheet/Sheet.stories.tsx | 8 +- src/stories/Sidebar/Sidebar.stories.tsx | 2 +- src/stories/Skeleton/Skeleton.stories.tsx | 2 +- src/stories/Slider/Slider.stories.tsx | 2 +- src/stories/Switch/Switch.stories.tsx | 4 +- src/stories/Table/Table.stories.tsx | 2 +- src/stories/Tabs/Tabs.stories.tsx | 2 +- src/stories/Textarea/Textarea.stories.tsx | 2 +- src/stories/Toast/Toast.stories.tsx | 4 +- src/stories/Toggle/Toggle.stories.tsx | 2 +- .../ToggleGroup/ToggleGroup.stories.tsx | 2 +- src/stories/Tooltip/Tooltip.stories.tsx | 4 +- tsconfig.json | 3 - 90 files changed, 171 insertions(+), 174 deletions(-) diff --git a/src/components/ui/accordion.tsx b/src/components/ui/accordion.tsx index da2391b0..19972d03 100644 --- a/src/components/ui/accordion.tsx +++ b/src/components/ui/accordion.tsx @@ -2,7 +2,7 @@ import * as React from 'react' import * as AccordionPrimitive from '@radix-ui/react-accordion' import { ChevronDownIcon } from 'lucide-react' -import { cn } from '@/lib/utils' +import { cn } from '../../lib/utils' function Accordion({ ...props }: React.ComponentProps) { return diff --git a/src/components/ui/alert-dialog.tsx b/src/components/ui/alert-dialog.tsx index ca8f7291..563bf5a4 100644 --- a/src/components/ui/alert-dialog.tsx +++ b/src/components/ui/alert-dialog.tsx @@ -1,8 +1,8 @@ import * as React from 'react' import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog' -import { cn } from '@/lib/utils' -import { buttonVariants } from '@/components/ui/button' +import { cn } from '../../lib/utils' +import { buttonVariants } from './button' function AlertDialog({ ...props }: React.ComponentProps) { return diff --git a/src/components/ui/alert.tsx b/src/components/ui/alert.tsx index 2303e29e..8b9ffe63 100644 --- a/src/components/ui/alert.tsx +++ b/src/components/ui/alert.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import { cva, type VariantProps } from 'class-variance-authority' -import { cn } from '@/lib/utils' +import { cn } from '../../lib/utils' const alertVariants = cva( 'relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current', diff --git a/src/components/ui/avatar.tsx b/src/components/ui/avatar.tsx index ea084041..264629e3 100644 --- a/src/components/ui/avatar.tsx +++ b/src/components/ui/avatar.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import * as AvatarPrimitive from '@radix-ui/react-avatar' -import { cn } from '@/lib/utils' +import { cn } from '../../lib/utils' function Avatar({ className, ...props }: React.ComponentProps) { return ( diff --git a/src/components/ui/badge.tsx b/src/components/ui/badge.tsx index 4046d4d7..6a8a2994 100644 --- a/src/components/ui/badge.tsx +++ b/src/components/ui/badge.tsx @@ -2,7 +2,7 @@ import * as React from 'react' import { Slot } from '@radix-ui/react-slot' import { cva, type VariantProps } from 'class-variance-authority' -import { cn } from '@/lib/utils' +import { cn } from '../../lib/utils' const badgeVariants = cva( 'inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden', diff --git a/src/components/ui/breadcrumb.tsx b/src/components/ui/breadcrumb.tsx index 97d2a4d2..4d6c5892 100644 --- a/src/components/ui/breadcrumb.tsx +++ b/src/components/ui/breadcrumb.tsx @@ -2,7 +2,7 @@ import * as React from 'react' import { Slot } from '@radix-ui/react-slot' import { ChevronRight, MoreHorizontal } from 'lucide-react' -import { cn } from '@/lib/utils' +import { cn } from '../..//lib/utils' function Breadcrumb({ ...props }: React.ComponentProps<'nav'>) { return