From 59877d0a0d2fabb0fec2e1ac7847c8c2cb06ef11 Mon Sep 17 00:00:00 2001 From: Josep Jaume Rey Peroy Date: Sat, 25 May 2024 19:39:11 +0200 Subject: [PATCH] Rename components folder to UI --- components.json | 2 +- lib/components/Actions/Button/index.tsx | 2 +- lib/components/Blocks/Card/index.stories.tsx | 2 +- lib/components/Blocks/Card/index.tsx | 2 +- lib/components/Forms/Calendar/index.tsx | 2 +- lib/components/Forms/Input/index.tsx | 2 +- lib/components/Forms/Select/index.tsx | 2 +- lib/components/Information/Avatar/index.stories.tsx | 2 +- lib/components/Information/Avatar/index.tsx | 2 +- lib/components/Information/Badge/index.tsx | 2 +- lib/components/Navigation/Tabs/index.tsx | 2 +- lib/components/Overlays/Dialog/index.stories.tsx | 6 +++--- lib/components/Overlays/Dialog/index.tsx | 2 +- lib/{shadcn => ui}/avatar.tsx | 0 lib/{shadcn => ui}/badge.tsx | 0 lib/{shadcn => ui}/button.tsx | 0 lib/{shadcn => ui}/calendar.tsx | 2 +- lib/{shadcn => ui}/card.tsx | 0 lib/{shadcn => ui}/checkbox.tsx | 0 lib/{shadcn => ui}/dialog.tsx | 0 lib/{shadcn => ui}/dropdown-menu.tsx | 0 lib/{shadcn => ui}/form.tsx | 2 +- lib/{shadcn => ui}/input.tsx | 0 lib/{shadcn => ui}/label.tsx | 0 lib/{shadcn => ui}/popover.tsx | 0 lib/{shadcn => ui}/scrollarea.tsx | 0 lib/{shadcn => ui}/select.tsx | 0 lib/{shadcn => ui}/skeleton.tsx | 0 lib/{shadcn => ui}/table.tsx | 0 lib/{shadcn => ui}/tabs.tsx | 0 lib/{shadcn => ui}/tooltip.tsx | 0 src/examples/layout/application.tsx | 6 +++--- src/examples/themes/theme-switcher.tsx | 4 ++-- src/experiments/application/new/employees.tsx | 6 +++--- src/experiments/application/new/index.tsx | 8 ++++---- src/experiments/application/new/pages.tsx | 2 +- 36 files changed, 30 insertions(+), 30 deletions(-) rename lib/{shadcn => ui}/avatar.tsx (100%) rename lib/{shadcn => ui}/badge.tsx (100%) rename lib/{shadcn => ui}/button.tsx (100%) rename lib/{shadcn => ui}/calendar.tsx (98%) rename lib/{shadcn => ui}/card.tsx (100%) rename lib/{shadcn => ui}/checkbox.tsx (100%) rename lib/{shadcn => ui}/dialog.tsx (100%) rename lib/{shadcn => ui}/dropdown-menu.tsx (100%) rename lib/{shadcn => ui}/form.tsx (99%) rename lib/{shadcn => ui}/input.tsx (100%) rename lib/{shadcn => ui}/label.tsx (100%) rename lib/{shadcn => ui}/popover.tsx (100%) rename lib/{shadcn => ui}/scrollarea.tsx (100%) rename lib/{shadcn => ui}/select.tsx (100%) rename lib/{shadcn => ui}/skeleton.tsx (100%) rename lib/{shadcn => ui}/table.tsx (100%) rename lib/{shadcn => ui}/tabs.tsx (100%) rename lib/{shadcn => ui}/tooltip.tsx (100%) diff --git a/components.json b/components.json index 2d0d19074..0d52712f2 100644 --- a/components.json +++ b/components.json @@ -12,7 +12,7 @@ }, "aliases": { "components": "@/components", - "ui": "@/shadcn", + "ui": "@/ui", "utils": "@/lib/utils" } } \ No newline at end of file diff --git a/lib/components/Actions/Button/index.tsx b/lib/components/Actions/Button/index.tsx index c41e7378c..a9364d9a7 100644 --- a/lib/components/Actions/Button/index.tsx +++ b/lib/components/Actions/Button/index.tsx @@ -1,4 +1,4 @@ -import { Button as ShadcnButton } from "@/shadcn/button" +import { Button as ShadcnButton } from "@/ui/button" import { ComponentProps } from "react" const Button: React.FC< diff --git a/lib/components/Blocks/Card/index.stories.tsx b/lib/components/Blocks/Card/index.stories.tsx index fa9bce438..d80045d41 100644 --- a/lib/components/Blocks/Card/index.stories.tsx +++ b/lib/components/Blocks/Card/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from "@storybook/react" -import { Button } from "@/shadcn/button" +import { Button } from "@/ui/button" import { Card, diff --git a/lib/components/Blocks/Card/index.tsx b/lib/components/Blocks/Card/index.tsx index 10801fef2..f9e03da34 100644 --- a/lib/components/Blocks/Card/index.tsx +++ b/lib/components/Blocks/Card/index.tsx @@ -1 +1 @@ -export * from "@/shadcn/card" +export * from "@/ui/card" diff --git a/lib/components/Forms/Calendar/index.tsx b/lib/components/Forms/Calendar/index.tsx index aba774076..56e984b4d 100644 --- a/lib/components/Forms/Calendar/index.tsx +++ b/lib/components/Forms/Calendar/index.tsx @@ -1 +1 @@ -export * from "@/shadcn/calendar" +export * from "@/ui/calendar" diff --git a/lib/components/Forms/Input/index.tsx b/lib/components/Forms/Input/index.tsx index f45d1dbf3..620ad956b 100644 --- a/lib/components/Forms/Input/index.tsx +++ b/lib/components/Forms/Input/index.tsx @@ -1 +1 @@ -export * from "@/shadcn/input" +export * from "@/ui/input" diff --git a/lib/components/Forms/Select/index.tsx b/lib/components/Forms/Select/index.tsx index 60a54b91b..08703eb1c 100644 --- a/lib/components/Forms/Select/index.tsx +++ b/lib/components/Forms/Select/index.tsx @@ -1 +1 @@ -export * from "@/shadcn/select" +export * from "@/ui/select" diff --git a/lib/components/Information/Avatar/index.stories.tsx b/lib/components/Information/Avatar/index.stories.tsx index c860d755f..edf97b543 100644 --- a/lib/components/Information/Avatar/index.stories.tsx +++ b/lib/components/Information/Avatar/index.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from "@storybook/react" -import { Avatar, AvatarFallback, AvatarImage, sizes } from "@/shadcn/avatar" +import { Avatar, AvatarFallback, AvatarImage, sizes } from "@/ui/avatar" const meta = { component: Avatar, diff --git a/lib/components/Information/Avatar/index.tsx b/lib/components/Information/Avatar/index.tsx index 2a88bbdf2..a9a945162 100644 --- a/lib/components/Information/Avatar/index.tsx +++ b/lib/components/Information/Avatar/index.tsx @@ -1 +1 @@ -export * from "@/shadcn/avatar" +export * from "@/ui/avatar" diff --git a/lib/components/Information/Badge/index.tsx b/lib/components/Information/Badge/index.tsx index 2a0142c77..5c03334aa 100644 --- a/lib/components/Information/Badge/index.tsx +++ b/lib/components/Information/Badge/index.tsx @@ -1 +1 @@ -export * from "@/shadcn/badge" +export * from "@/ui/badge" diff --git a/lib/components/Navigation/Tabs/index.tsx b/lib/components/Navigation/Tabs/index.tsx index fb81dfcbe..33aba034f 100644 --- a/lib/components/Navigation/Tabs/index.tsx +++ b/lib/components/Navigation/Tabs/index.tsx @@ -1 +1 @@ -export * from "@/shadcn/tabs" +export * from "@/ui/tabs" diff --git a/lib/components/Overlays/Dialog/index.stories.tsx b/lib/components/Overlays/Dialog/index.stories.tsx index 6806ebb49..b04ad9b50 100644 --- a/lib/components/Overlays/Dialog/index.stories.tsx +++ b/lib/components/Overlays/Dialog/index.stories.tsx @@ -1,9 +1,9 @@ import type { Meta, StoryObj } from "@storybook/react" import { Folder } from "lucide-react" -import { Button } from "@/shadcn/button" -import { Input } from "@/shadcn/input" -import { Label } from "@/shadcn/label" +import { Button } from "@/ui/button" +import { Input } from "@/ui/input" +import { Label } from "@/ui/label" import { Dialog, DialogClose, diff --git a/lib/components/Overlays/Dialog/index.tsx b/lib/components/Overlays/Dialog/index.tsx index a0b45266c..074495323 100644 --- a/lib/components/Overlays/Dialog/index.tsx +++ b/lib/components/Overlays/Dialog/index.tsx @@ -1 +1 @@ -export * from "@/shadcn/dialog" +export * from "@/ui/dialog" diff --git a/lib/shadcn/avatar.tsx b/lib/ui/avatar.tsx similarity index 100% rename from lib/shadcn/avatar.tsx rename to lib/ui/avatar.tsx diff --git a/lib/shadcn/badge.tsx b/lib/ui/badge.tsx similarity index 100% rename from lib/shadcn/badge.tsx rename to lib/ui/badge.tsx diff --git a/lib/shadcn/button.tsx b/lib/ui/button.tsx similarity index 100% rename from lib/shadcn/button.tsx rename to lib/ui/button.tsx diff --git a/lib/shadcn/calendar.tsx b/lib/ui/calendar.tsx similarity index 98% rename from lib/shadcn/calendar.tsx rename to lib/ui/calendar.tsx index ab5f7d8ad..c2f798325 100644 --- a/lib/shadcn/calendar.tsx +++ b/lib/ui/calendar.tsx @@ -3,7 +3,7 @@ import { ChevronLeft, ChevronRight } from "lucide-react" import * as React from "react" import { DayPicker } from "react-day-picker" -import { buttonVariants } from "@/shadcn/button" +import { buttonVariants } from "@/ui/button" export type CalendarProps = React.ComponentProps diff --git a/lib/shadcn/card.tsx b/lib/ui/card.tsx similarity index 100% rename from lib/shadcn/card.tsx rename to lib/ui/card.tsx diff --git a/lib/shadcn/checkbox.tsx b/lib/ui/checkbox.tsx similarity index 100% rename from lib/shadcn/checkbox.tsx rename to lib/ui/checkbox.tsx diff --git a/lib/shadcn/dialog.tsx b/lib/ui/dialog.tsx similarity index 100% rename from lib/shadcn/dialog.tsx rename to lib/ui/dialog.tsx diff --git a/lib/shadcn/dropdown-menu.tsx b/lib/ui/dropdown-menu.tsx similarity index 100% rename from lib/shadcn/dropdown-menu.tsx rename to lib/ui/dropdown-menu.tsx diff --git a/lib/shadcn/form.tsx b/lib/ui/form.tsx similarity index 99% rename from lib/shadcn/form.tsx rename to lib/ui/form.tsx index 84612454a..4c155ffab 100644 --- a/lib/shadcn/form.tsx +++ b/lib/ui/form.tsx @@ -11,7 +11,7 @@ import { useFormContext, } from "react-hook-form" -import { Label } from "@/shadcn/label" +import { Label } from "@/ui/label" const Form = FormProvider diff --git a/lib/shadcn/input.tsx b/lib/ui/input.tsx similarity index 100% rename from lib/shadcn/input.tsx rename to lib/ui/input.tsx diff --git a/lib/shadcn/label.tsx b/lib/ui/label.tsx similarity index 100% rename from lib/shadcn/label.tsx rename to lib/ui/label.tsx diff --git a/lib/shadcn/popover.tsx b/lib/ui/popover.tsx similarity index 100% rename from lib/shadcn/popover.tsx rename to lib/ui/popover.tsx diff --git a/lib/shadcn/scrollarea.tsx b/lib/ui/scrollarea.tsx similarity index 100% rename from lib/shadcn/scrollarea.tsx rename to lib/ui/scrollarea.tsx diff --git a/lib/shadcn/select.tsx b/lib/ui/select.tsx similarity index 100% rename from lib/shadcn/select.tsx rename to lib/ui/select.tsx diff --git a/lib/shadcn/skeleton.tsx b/lib/ui/skeleton.tsx similarity index 100% rename from lib/shadcn/skeleton.tsx rename to lib/ui/skeleton.tsx diff --git a/lib/shadcn/table.tsx b/lib/ui/table.tsx similarity index 100% rename from lib/shadcn/table.tsx rename to lib/ui/table.tsx diff --git a/lib/shadcn/tabs.tsx b/lib/ui/tabs.tsx similarity index 100% rename from lib/shadcn/tabs.tsx rename to lib/ui/tabs.tsx diff --git a/lib/shadcn/tooltip.tsx b/lib/ui/tooltip.tsx similarity index 100% rename from lib/shadcn/tooltip.tsx rename to lib/ui/tooltip.tsx diff --git a/src/examples/layout/application.tsx b/src/examples/layout/application.tsx index e426fc9ac..41e872205 100644 --- a/src/examples/layout/application.tsx +++ b/src/examples/layout/application.tsx @@ -21,9 +21,9 @@ import React from "react" import { Card, CardContent, CardHeader, CardTitle } from "@/components" import { AutoGrid } from "@/primitives" -import { Button } from "@/shadcn/button" -import { Popover, PopoverContent, PopoverTrigger } from "@/shadcn/popover" -import { ScrollArea } from "@/shadcn/scrollarea" +import { Button } from "@/ui/button" +import { Popover, PopoverContent, PopoverTrigger } from "@/ui/popover" +import { ScrollArea } from "@/ui/scrollarea" const Title: React.FC<{ title: string }> = ({ title }) => (
diff --git a/src/examples/themes/theme-switcher.tsx b/src/examples/themes/theme-switcher.tsx index 66fdb2dc9..5e80a9709 100644 --- a/src/examples/themes/theme-switcher.tsx +++ b/src/examples/themes/theme-switcher.tsx @@ -1,13 +1,13 @@ import { useTheme } from "@/lib/theme-provider" import { Moon, Sun } from "lucide-react" -import { Button } from "@/shadcn/button" +import { Button } from "@/ui/button" import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, -} from "@/shadcn/dropdown-menu" +} from "@/ui/dropdown-menu" export function ThemeSwitcher() { const { setTheme } = useTheme() diff --git a/src/experiments/application/new/employees.tsx b/src/experiments/application/new/employees.tsx index 2c987acc3..3b1de342e 100644 --- a/src/experiments/application/new/employees.tsx +++ b/src/experiments/application/new/employees.tsx @@ -3,9 +3,9 @@ import { useLayoutType } from "./layout-type" import { cn } from "@/lib/utils" import { useState } from "react" -import { Badge } from "@/shadcn/badge" +import { Badge } from "@/ui/badge" -import { Avatar, AvatarFallback, AvatarImage } from "@/shadcn/avatar" +import { Avatar, AvatarFallback, AvatarImage } from "@/ui/avatar" import { Table, TableBody, @@ -13,7 +13,7 @@ import { TableHead, TableHeader, TableRow, -} from "@/shadcn/table" +} from "@/ui/table" export const Employees = [ { diff --git a/src/experiments/application/new/index.tsx b/src/experiments/application/new/index.tsx index 518a1a591..cd0842bfb 100644 --- a/src/experiments/application/new/index.tsx +++ b/src/experiments/application/new/index.tsx @@ -2,11 +2,11 @@ import { useState } from "react" import { LayoutTypeContext } from "./layout-type" -import { ScrollArea, ScrollBar } from "@/shadcn/scrollarea" +import { ScrollArea, ScrollBar } from "@/ui/scrollarea" -import { Avatar, AvatarFallback, AvatarImage } from "@/shadcn/avatar" +import { Avatar, AvatarFallback, AvatarImage } from "@/ui/avatar" -import { Skeleton } from "@/shadcn/skeleton" +import { Skeleton } from "@/ui/skeleton" import { Employees } from "./employees" @@ -16,7 +16,7 @@ import { TooltipContent, TooltipProvider, TooltipTrigger, -} from "@/shadcn/tooltip" +} from "@/ui/tooltip" import { Page, Pages, SubItem } from "./pages" diff --git a/src/experiments/application/new/pages.tsx b/src/experiments/application/new/pages.tsx index 7d39b4911..d5c52eee6 100644 --- a/src/experiments/application/new/pages.tsx +++ b/src/experiments/application/new/pages.tsx @@ -9,7 +9,7 @@ import { import { PageEmployees } from "./employees" -import { Skeleton } from "@/shadcn/skeleton" +import { Skeleton } from "@/ui/skeleton" const PageDummy: React.FC = () => { return (