From 33452187ea96c0bf4f0ef27daf2c246b28320056 Mon Sep 17 00:00:00 2001 From: Solomon Hawk Date: Thu, 21 Nov 2024 01:29:52 -0500 Subject: [PATCH] Update ui package exports, move components to individual folders - prepares for adding stories files and new component generators --- apps/web/src/app.tsx | 4 +-- .../components/dashboard-header/index.tsx | 2 +- .../components/quick-launcher/index.tsx | 4 +-- .../dashboard/components/table-list/index.tsx | 14 ++++++---- .../features/dashboard/pages/root/page.tsx | 2 +- .../components/confirmation-dialog.tsx | 2 +- .../engine/components/editor/index.tsx | 4 +-- .../engine/components/editor/input-panel.tsx | 6 ++--- .../components/editor/results-panel/index.tsx | 2 +- .../find-dependency-dialog.tsx | 16 ++++++------ .../find-dependency-dialog/index.tsx | 2 +- .../preview-dependency-dialog/index.tsx | 2 +- .../preview-dependency-dialog.tsx | 8 +++--- .../engine/components/roll-preview/index.tsx | 8 +++--- .../pages/root/components/headline.tsx | 6 ++--- .../src/features/landing/pages/root/page.tsx | 8 +++--- .../pages/root/components/section.tsx | 4 +-- .../features/made-with/pages/root/page.tsx | 2 +- .../onboarding/api/create-user-profile.ts | 2 +- .../user-profile-create-form/index.tsx | 8 +++--- .../onboarding/pages/create-profile/page.tsx | 6 ++--- .../features/routing/components/launcher.tsx | 4 +-- .../src/features/routing/pages/root/error.tsx | 8 +++--- .../features/routing/pages/root/layout.tsx | 8 +++--- .../features/routing/pages/root/not-found.tsx | 4 +-- .../compare-versions-dialog.tsx | 10 +++---- .../compare-versions-dialog/index.tsx | 2 +- .../table-version/pages/detail/layout.tsx | 8 +++--- .../table-version/pages/detail/page.tsx | 4 +-- .../pages/search-browse/page.tsx | 14 +++++----- .../src/features/table/components/header.tsx | 8 +++--- .../components/table-copy-dialog/index.tsx | 2 +- .../table-copy-dialog/table-copy-dialog.tsx | 16 ++++++------ .../components/table-create-form/index.tsx | 12 ++++----- .../components/table-delete-dialog/index.tsx | 2 +- .../table-delete-dialog.tsx | 8 +++--- .../table-edit-metadata-dialog/index.tsx | 2 +- .../table-edit-metadata-dialog.tsx | 12 ++++----- .../components/table-publish-dialog/index.tsx | 2 +- .../table-publish-dialog.tsx | 16 ++++++------ .../table-update-form/delete-button.tsx | 2 +- .../table-update-form/download-button.tsx | 2 +- .../table-update-form/edit-button.tsx | 2 +- .../table-update-form/favorite-button.tsx | 6 ++--- .../components/table-update-form/index.tsx | 4 +-- .../table-update-form/publish-button.tsx | 6 ++--- .../table-update-form/restore-button.tsx | 2 +- .../view-dependencies-button.tsx | 4 +-- .../table-view-dependencies-dialog/index.tsx | 2 +- .../table-view-dependencies-dialog.tsx | 6 ++--- .../src/features/table/pages/detail/page.tsx | 12 ++++----- .../src/features/table/pages/edit/page.tsx | 2 +- .../web/src/features/table/pages/new/page.tsx | 4 +-- apps/web/src/utils/toast.ts | 5 +++- packages/ui/components.json | 2 +- packages/ui/package.json | 5 ++-- .../{ => animated-list}/animated-list.tsx | 0 .../ui/src/components/animated-list/index.ts | 1 + .../{ => clipboard-copy}/clipboard-copy.tsx | 0 .../ui/src/components/clipboard-copy/index.ts | 1 + .../{ => command-palette}/command-palette.tsx | 7 +++-- .../src/components/command-palette/index.ts | 1 + .../{ui => core/accordion}/accordion.tsx | 2 +- .../ui/src/components/core/accordion/index.ts | 1 + .../alert-dialog}/alert-dialog.tsx | 6 ++--- .../src/components/core/alert-dialog/index.ts | 1 + .../components/{ui => core/avatar}/avatar.tsx | 2 +- .../ui/src/components/core/avatar/index.ts | 1 + .../components/{ui => core/badge}/badge.tsx | 2 +- .../ui/src/components/core/badge/index.ts | 1 + .../{ui => core}/button/button.stories.tsx | 0 .../components/{ui => core}/button/button.tsx | 2 +- .../components/{ui => core}/button/index.ts | 0 .../src/components/{ui => core/card}/card.tsx | 2 +- packages/ui/src/components/core/card/index.ts | 1 + .../{ui => core/checkbox}/checkbox.tsx | 2 +- .../ui/src/components/core/checkbox/index.ts | 1 + .../{ui => core/command}/command.tsx | 4 +-- .../ui/src/components/core/command/index.ts | 1 + .../components/{ui => core/dialog}/dialog.tsx | 4 +-- .../ui/src/components/core/dialog/index.ts | 1 + .../components/{ui => core/drawer}/drawer.tsx | 4 +-- .../ui/src/components/core/drawer/index.ts | 1 + .../dropdown-menu}/dropdown-menu.tsx | 2 +- .../components/core/dropdown-menu/index.ts | 1 + .../src/components/{ui => core/flex}/flex.tsx | 2 +- packages/ui/src/components/core/flex/index.ts | 1 + .../src/components/{ui => core/form}/form.tsx | 8 +++--- packages/ui/src/components/core/form/index.ts | 1 + .../ui/src/components/core/input/index.ts | 1 + .../components/{ui => core/input}/input.tsx | 2 +- .../ui/src/components/core/label/index.ts | 1 + .../components/{ui => core/label}/label.tsx | 2 +- .../ui/src/components/core/notice/index.ts | 1 + .../components/{ui => core/notice}/notice.tsx | 2 +- .../{ui => core}/pagination/context.ts | 0 .../{ui => core}/pagination/index.ts | 0 .../{ui => core}/pagination/pagination.tsx | 8 +++--- .../{ui => core}/pagination/types.ts | 0 .../ui/src/components/core/resizable/index.ts | 1 + .../{ui => core/resizable}/resizable.tsx | 2 +- .../ui/src/components/core/select/index.ts | 1 + .../components/{ui => core/select}/select.tsx | 2 +- .../ui/src/components/core/separator/index.ts | 1 + .../{ui => core/separator}/separator.tsx | 2 +- .../ui/src/components/core/skeleton/index.ts | 1 + .../{ui => core/skeleton}/skeleton.tsx | 2 +- .../ui/src/components/core/textarea/index.ts | 1 + .../{ui => core/textarea}/textarea.tsx | 2 +- .../ui/src/components/core/toaster/index.ts | 1 + .../{ui => core/toaster}/toaster.tsx | 2 +- .../ui/src/components/core/tooltip/index.ts | 1 + .../{ui => core/tooltip}/tooltip.tsx | 2 +- .../full-screen-loader.tsx | 6 ++--- .../components/full-screen-loader/index.ts | 1 + .../{ => global-header}/global-header.tsx | 10 ++++--- .../ui/src/components/global-header/index.ts | 1 + .../{ => global-progress}/global-progress.tsx | 2 +- .../src/components/global-progress/index.ts | 1 + .../src/components/loading-indicator/index.ts | 1 + .../loading-indicator.tsx | 2 +- .../src/components/reactive-button/index.ts | 1 + .../{ => reactive-button}/reactive-button.tsx | 4 +-- .../src/components/roll-results-list/index.ts | 1 + .../roll-results-list.tsx | 17 +++++++----- .../components/roll-table-buttons/index.ts | 1 + .../roll-table-buttons.tsx | 26 +++++++++---------- .../table-identifier-input/index.ts | 1 + .../table-identifier-input.tsx | 2 +- .../table-identifier-preview/index.ts | 1 + .../table-identifier-preview.tsx | 4 +-- .../src/components/table-identifier/index.ts | 1 + .../table-identifier.tsx | 2 +- .../ui/src/components/typewriter/index.ts | 1 + .../{ => typewriter}/typewriter.tsx | 0 packages/ui/src/hooks/use-clipboard.ts | 2 +- packages/ui/src/hooks/use-singleton-toast.ts | 2 +- packages/ui/tsconfig.json | 11 +++++++- 138 files changed, 292 insertions(+), 231 deletions(-) rename packages/ui/src/components/{ => animated-list}/animated-list.tsx (100%) create mode 100644 packages/ui/src/components/animated-list/index.ts rename packages/ui/src/components/{ => clipboard-copy}/clipboard-copy.tsx (100%) create mode 100644 packages/ui/src/components/clipboard-copy/index.ts rename packages/ui/src/components/{ => command-palette}/command-palette.tsx (86%) create mode 100644 packages/ui/src/components/command-palette/index.ts rename packages/ui/src/components/{ui => core/accordion}/accordion.tsx (98%) create mode 100644 packages/ui/src/components/core/accordion/index.ts rename packages/ui/src/components/{ui => core/alert-dialog}/alert-dialog.tsx (96%) create mode 100644 packages/ui/src/components/core/alert-dialog/index.ts rename packages/ui/src/components/{ui => core/avatar}/avatar.tsx (97%) create mode 100644 packages/ui/src/components/core/avatar/index.ts rename packages/ui/src/components/{ui => core/badge}/badge.tsx (97%) create mode 100644 packages/ui/src/components/core/badge/index.ts rename packages/ui/src/components/{ui => core}/button/button.stories.tsx (100%) rename packages/ui/src/components/{ui => core}/button/button.tsx (99%) rename packages/ui/src/components/{ui => core}/button/index.ts (100%) rename packages/ui/src/components/{ui => core/card}/card.tsx (98%) create mode 100644 packages/ui/src/components/core/card/index.ts rename packages/ui/src/components/{ui => core/checkbox}/checkbox.tsx (96%) create mode 100644 packages/ui/src/components/core/checkbox/index.ts rename packages/ui/src/components/{ui => core/command}/command.tsx (97%) create mode 100644 packages/ui/src/components/core/command/index.ts rename packages/ui/src/components/{ui => core/dialog}/dialog.tsx (97%) create mode 100644 packages/ui/src/components/core/dialog/index.ts rename packages/ui/src/components/{ui => core/drawer}/drawer.tsx (96%) create mode 100644 packages/ui/src/components/core/drawer/index.ts rename packages/ui/src/components/{ui => core/dropdown-menu}/dropdown-menu.tsx (99%) create mode 100644 packages/ui/src/components/core/dropdown-menu/index.ts rename packages/ui/src/components/{ui => core/flex}/flex.tsx (93%) create mode 100644 packages/ui/src/components/core/flex/index.ts rename packages/ui/src/components/{ui => core/form}/form.tsx (96%) create mode 100644 packages/ui/src/components/core/form/index.ts create mode 100644 packages/ui/src/components/core/input/index.ts rename packages/ui/src/components/{ui => core/input}/input.tsx (98%) create mode 100644 packages/ui/src/components/core/label/index.ts rename packages/ui/src/components/{ui => core/label}/label.tsx (95%) create mode 100644 packages/ui/src/components/core/notice/index.ts rename packages/ui/src/components/{ui => core/notice}/notice.tsx (98%) rename packages/ui/src/components/{ui => core}/pagination/context.ts (100%) rename packages/ui/src/components/{ui => core}/pagination/index.ts (100%) rename packages/ui/src/components/{ui => core}/pagination/pagination.tsx (95%) rename packages/ui/src/components/{ui => core}/pagination/types.ts (100%) create mode 100644 packages/ui/src/components/core/resizable/index.ts rename packages/ui/src/components/{ui => core/resizable}/resizable.tsx (98%) create mode 100644 packages/ui/src/components/core/select/index.ts rename packages/ui/src/components/{ui => core/select}/select.tsx (99%) create mode 100644 packages/ui/src/components/core/separator/index.ts rename packages/ui/src/components/{ui => core/separator}/separator.tsx (95%) create mode 100644 packages/ui/src/components/core/skeleton/index.ts rename packages/ui/src/components/{ui => core/skeleton}/skeleton.tsx (86%) create mode 100644 packages/ui/src/components/core/textarea/index.ts rename packages/ui/src/components/{ui => core/textarea}/textarea.tsx (97%) create mode 100644 packages/ui/src/components/core/toaster/index.ts rename packages/ui/src/components/{ui => core/toaster}/toaster.tsx (97%) create mode 100644 packages/ui/src/components/core/tooltip/index.ts rename packages/ui/src/components/{ui => core/tooltip}/tooltip.tsx (97%) rename packages/ui/src/components/{ => full-screen-loader}/full-screen-loader.tsx (53%) create mode 100644 packages/ui/src/components/full-screen-loader/index.ts rename packages/ui/src/components/{ => global-header}/global-header.tsx (87%) create mode 100644 packages/ui/src/components/global-header/index.ts rename packages/ui/src/components/{ => global-progress}/global-progress.tsx (97%) create mode 100644 packages/ui/src/components/global-progress/index.ts create mode 100644 packages/ui/src/components/loading-indicator/index.ts rename packages/ui/src/components/{ => loading-indicator}/loading-indicator.tsx (95%) create mode 100644 packages/ui/src/components/reactive-button/index.ts rename packages/ui/src/components/{ => reactive-button}/reactive-button.tsx (89%) create mode 100644 packages/ui/src/components/roll-results-list/index.ts rename packages/ui/src/components/{ => roll-results-list}/roll-results-list.tsx (92%) create mode 100644 packages/ui/src/components/roll-table-buttons/index.ts rename packages/ui/src/components/{ => roll-table-buttons}/roll-table-buttons.tsx (93%) create mode 100644 packages/ui/src/components/table-identifier-input/index.ts rename packages/ui/src/components/{ => table-identifier-input}/table-identifier-input.tsx (93%) create mode 100644 packages/ui/src/components/table-identifier-preview/index.ts rename packages/ui/src/components/{ => table-identifier-preview}/table-identifier-preview.tsx (90%) create mode 100644 packages/ui/src/components/table-identifier/index.ts rename packages/ui/src/components/{ => table-identifier}/table-identifier.tsx (94%) create mode 100644 packages/ui/src/components/typewriter/index.ts rename packages/ui/src/components/{ => typewriter}/typewriter.tsx (100%) diff --git a/apps/web/src/app.tsx b/apps/web/src/app.tsx index dcf8dda..b1641ee 100644 --- a/apps/web/src/app.tsx +++ b/apps/web/src/app.tsx @@ -1,6 +1,6 @@ import { SessionProvider } from "@manifold/auth/client"; -import { Toaster } from "@manifold/ui/components/ui/toaster"; -import { TooltipProvider } from "@manifold/ui/components/ui/tooltip"; +import { Toaster } from "@manifold/ui/components/core/toaster"; +import { TooltipProvider } from "@manifold/ui/components/core/tooltip"; import { cn } from "@manifold/ui/lib/utils"; import { QueryClient } from "@tanstack/react-query"; import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; diff --git a/apps/web/src/features/dashboard/components/dashboard-header/index.tsx b/apps/web/src/features/dashboard/components/dashboard-header/index.tsx index 5460b77..40ddd2a 100644 --- a/apps/web/src/features/dashboard/components/dashboard-header/index.tsx +++ b/apps/web/src/features/dashboard/components/dashboard-header/index.tsx @@ -4,7 +4,7 @@ import { CardDescription, CardHeader, CardTitle, -} from "@manifold/ui/components/ui/card"; +} from "@manifold/ui/components/core/card"; import { cn } from "@manifold/ui/lib/utils"; import { useRequiredAuth } from "~features/auth/hooks/use-auth"; diff --git a/apps/web/src/features/dashboard/components/quick-launcher/index.tsx b/apps/web/src/features/dashboard/components/quick-launcher/index.tsx index 162980e..d21ce26 100644 --- a/apps/web/src/features/dashboard/components/quick-launcher/index.tsx +++ b/apps/web/src/features/dashboard/components/quick-launcher/index.tsx @@ -1,5 +1,5 @@ -import { Button } from "@manifold/ui/components/ui/button"; -import { Card, CardContent } from "@manifold/ui/components/ui/card"; +import { Button } from "@manifold/ui/components/core/button"; +import { Card, CardContent } from "@manifold/ui/components/core/card"; import { transitionAlpha } from "@manifold/ui/lib/animation"; import { AnimatePresence, motion } from "motion/react"; diff --git a/apps/web/src/features/dashboard/components/table-list/index.tsx b/apps/web/src/features/dashboard/components/table-list/index.tsx index 934500e..278af60 100644 --- a/apps/web/src/features/dashboard/components/table-list/index.tsx +++ b/apps/web/src/features/dashboard/components/table-list/index.tsx @@ -3,20 +3,24 @@ import { AnimatedList, AnimatedListItem, } from "@manifold/ui/components/animated-list"; -import { ReactiveButton } from "@manifold/ui/components/reactive-button"; -import { Button } from "@manifold/ui/components/ui/button"; -import { Card, CardContent, CardHeader } from "@manifold/ui/components/ui/card"; +import { Button } from "@manifold/ui/components/core/button"; +import { + Card, + CardContent, + CardHeader, +} from "@manifold/ui/components/core/card"; import { Select, SelectContent, SelectItem, SelectTrigger, -} from "@manifold/ui/components/ui/select"; +} from "@manifold/ui/components/core/select"; import { Tooltip, TooltipContent, TooltipTrigger, -} from "@manifold/ui/components/ui/tooltip"; +} from "@manifold/ui/components/core/tooltip"; +import { ReactiveButton } from "@manifold/ui/components/reactive-button"; import { useStateGuard } from "@manifold/ui/hooks/use-state-guard"; import { transitionGamma } from "@manifold/ui/lib/animation"; import { cn } from "@manifold/ui/lib/utils"; diff --git a/apps/web/src/features/dashboard/pages/root/page.tsx b/apps/web/src/features/dashboard/pages/root/page.tsx index f9a783f..87801cc 100644 --- a/apps/web/src/features/dashboard/pages/root/page.tsx +++ b/apps/web/src/features/dashboard/pages/root/page.tsx @@ -1,4 +1,4 @@ -import { FlexCol } from "@manifold/ui/components/ui/flex"; +import { FlexCol } from "@manifold/ui/components/core/flex"; import { useLoaderData } from "react-router-dom"; import { DashboardHeader } from "~features/dashboard/components/dashboard-header"; diff --git a/apps/web/src/features/dialog-manager/components/confirmation-dialog.tsx b/apps/web/src/features/dialog-manager/components/confirmation-dialog.tsx index 7e2b591..32649a4 100644 --- a/apps/web/src/features/dialog-manager/components/confirmation-dialog.tsx +++ b/apps/web/src/features/dialog-manager/components/confirmation-dialog.tsx @@ -8,7 +8,7 @@ import { AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, -} from "@manifold/ui/components/ui/alert-dialog"; +} from "@manifold/ui/components/core/alert-dialog"; type Props = { title?: string; diff --git a/apps/web/src/features/engine/components/editor/index.tsx b/apps/web/src/features/engine/components/editor/index.tsx index 123ea12..9dfb548 100644 --- a/apps/web/src/features/engine/components/editor/index.tsx +++ b/apps/web/src/features/engine/components/editor/index.tsx @@ -1,10 +1,10 @@ import type { RouterOutput } from "@manifold/router"; -import { FlexCol } from "@manifold/ui/components/ui/flex"; +import { FlexCol } from "@manifold/ui/components/core/flex"; import { ResizableHandle, ResizablePanel, ResizablePanelGroup, -} from "@manifold/ui/components/ui/resizable"; +} from "@manifold/ui/components/core/resizable"; import { type MutableRefObject, useCallback, useRef } from "react"; import type { RefCallBack } from "react-hook-form"; diff --git a/apps/web/src/features/engine/components/editor/input-panel.tsx b/apps/web/src/features/engine/components/editor/input-panel.tsx index ccad355..ac54d82 100644 --- a/apps/web/src/features/engine/components/editor/input-panel.tsx +++ b/apps/web/src/features/engine/components/editor/input-panel.tsx @@ -7,9 +7,9 @@ import { CommandInput, CommandItem, CommandList, -} from "@manifold/ui/components/ui/command"; -import { FlexCol } from "@manifold/ui/components/ui/flex"; -import { Textarea } from "@manifold/ui/components/ui/textarea"; +} from "@manifold/ui/components/core/command"; +import { FlexCol } from "@manifold/ui/components/core/flex"; +import { Textarea } from "@manifold/ui/components/core/textarea"; import { FloatingFocusManager, FloatingPortal, diff --git a/apps/web/src/features/engine/components/editor/results-panel/index.tsx b/apps/web/src/features/engine/components/editor/results-panel/index.tsx index 5412d6f..665f2ae 100644 --- a/apps/web/src/features/engine/components/editor/results-panel/index.tsx +++ b/apps/web/src/features/engine/components/editor/results-panel/index.tsx @@ -1,4 +1,4 @@ -import { FlexCol } from "@manifold/ui/components/ui/flex"; +import { FlexCol } from "@manifold/ui/components/core/flex"; import { LayoutGroup } from "motion/react"; import { type RefObject } from "react"; diff --git a/apps/web/src/features/engine/components/find-dependency-dialog/find-dependency-dialog.tsx b/apps/web/src/features/engine/components/find-dependency-dialog/find-dependency-dialog.tsx index d7626a2..1014ddb 100644 --- a/apps/web/src/features/engine/components/find-dependency-dialog/find-dependency-dialog.tsx +++ b/apps/web/src/features/engine/components/find-dependency-dialog/find-dependency-dialog.tsx @@ -1,15 +1,13 @@ import { pluralize } from "@manifold/lib/utils/string"; -import { LoadingIndicator } from "@manifold/ui/components/loading-indicator"; -import { TableIdentifier } from "@manifold/ui/components/table-identifier"; -import { Button } from "@manifold/ui/components/ui/button"; -import { CommandShortcut } from "@manifold/ui/components/ui/command"; +import { Button } from "@manifold/ui/components/core/button"; +import { CommandShortcut } from "@manifold/ui/components/core/command"; import { DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogTitle, -} from "@manifold/ui/components/ui/dialog"; +} from "@manifold/ui/components/core/dialog"; import { Form, FormControl, @@ -18,14 +16,16 @@ import { FormLabel, FormMessage, FormSubmitButton, -} from "@manifold/ui/components/ui/form"; -import { Input, InputAdornment } from "@manifold/ui/components/ui/input"; +} from "@manifold/ui/components/core/form"; +import { Input, InputAdornment } from "@manifold/ui/components/core/input"; import { Tooltip, TooltipArrow, TooltipContent, TooltipTrigger, -} from "@manifold/ui/components/ui/tooltip"; +} from "@manifold/ui/components/core/tooltip"; +import { LoadingIndicator } from "@manifold/ui/components/loading-indicator"; +import { TableIdentifier } from "@manifold/ui/components/table-identifier"; import { useZodForm } from "@manifold/ui/hooks/use-zod-form"; import { cn } from "@manifold/ui/lib/utils"; import { diff --git a/apps/web/src/features/engine/components/find-dependency-dialog/index.tsx b/apps/web/src/features/engine/components/find-dependency-dialog/index.tsx index c528ecd..5ed7c7a 100644 --- a/apps/web/src/features/engine/components/find-dependency-dialog/index.tsx +++ b/apps/web/src/features/engine/components/find-dependency-dialog/index.tsx @@ -3,7 +3,7 @@ import { Dialog, DialogContent, DialogLoader, -} from "@manifold/ui/components/ui/dialog"; +} from "@manifold/ui/components/core/dialog"; import { useReturnFocus } from "@manifold/ui/hooks/use-return-focus"; import { Suspense } from "react"; diff --git a/apps/web/src/features/engine/components/preview-dependency-dialog/index.tsx b/apps/web/src/features/engine/components/preview-dependency-dialog/index.tsx index 0386ecf..36326b5 100644 --- a/apps/web/src/features/engine/components/preview-dependency-dialog/index.tsx +++ b/apps/web/src/features/engine/components/preview-dependency-dialog/index.tsx @@ -3,7 +3,7 @@ import { Drawer, DrawerContent, DrawerLoader, -} from "@manifold/ui/components/ui/drawer"; +} from "@manifold/ui/components/core/drawer"; import { useReturnFocus } from "@manifold/ui/hooks/use-return-focus"; import { Suspense } from "react"; diff --git a/apps/web/src/features/engine/components/preview-dependency-dialog/preview-dependency-dialog.tsx b/apps/web/src/features/engine/components/preview-dependency-dialog/preview-dependency-dialog.tsx index c36f6d1..5229a71 100644 --- a/apps/web/src/features/engine/components/preview-dependency-dialog/preview-dependency-dialog.tsx +++ b/apps/web/src/features/engine/components/preview-dependency-dialog/preview-dependency-dialog.tsx @@ -1,14 +1,14 @@ import { injectNamespacePragmasWorkaround } from "@manifold/lib/utils/engine"; -import { ReactiveButton } from "@manifold/ui/components/reactive-button"; -import { TableIdentifier } from "@manifold/ui/components/table-identifier"; -import { Button } from "@manifold/ui/components/ui/button"; +import { Button } from "@manifold/ui/components/core/button"; import { DrawerClose, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, -} from "@manifold/ui/components/ui/drawer"; +} from "@manifold/ui/components/core/drawer"; +import { ReactiveButton } from "@manifold/ui/components/reactive-button"; +import { TableIdentifier } from "@manifold/ui/components/table-identifier"; import { useCallback } from "react"; import { GoX } from "react-icons/go"; import { useBlocker } from "react-router-dom"; diff --git a/apps/web/src/features/engine/components/roll-preview/index.tsx b/apps/web/src/features/engine/components/roll-preview/index.tsx index a46d3d3..ab5889d 100644 --- a/apps/web/src/features/engine/components/roll-preview/index.tsx +++ b/apps/web/src/features/engine/components/roll-preview/index.tsx @@ -1,12 +1,12 @@ import type { RollResult, TableMetadata } from "@manifold/lib/models/roll"; -import { RollResultsList } from "@manifold/ui/components/roll-results-list"; -import { RollTableButtons } from "@manifold/ui/components/roll-table-buttons"; -import { Button } from "@manifold/ui/components/ui/button"; +import { Button } from "@manifold/ui/components/core/button"; import { Notice, NoticeContent, NoticeIcon, -} from "@manifold/ui/components/ui/notice"; +} from "@manifold/ui/components/core/notice"; +import { RollResultsList } from "@manifold/ui/components/roll-results-list"; +import { RollTableButtons } from "@manifold/ui/components/roll-table-buttons"; import { transitionAlpha } from "@manifold/ui/lib/animation"; import { motion, type MotionProps } from "motion/react"; import { useCallback, useLayoutEffect, useMemo, useState } from "react"; diff --git a/apps/web/src/features/landing/pages/root/components/headline.tsx b/apps/web/src/features/landing/pages/root/components/headline.tsx index 1b7d3d1..ce64d23 100644 --- a/apps/web/src/features/landing/pages/root/components/headline.tsx +++ b/apps/web/src/features/landing/pages/root/components/headline.tsx @@ -3,13 +3,13 @@ import { AnimatedList, AnimatedListItem, } from "@manifold/ui/components/animated-list"; -import { Typewriter } from "@manifold/ui/components/typewriter"; -import { Button } from "@manifold/ui/components/ui/button"; +import { Button } from "@manifold/ui/components/core/button"; import { Tooltip, TooltipContent, TooltipTrigger, -} from "@manifold/ui/components/ui/tooltip"; +} from "@manifold/ui/components/core/tooltip"; +import { Typewriter } from "@manifold/ui/components/typewriter"; import { transitionAlpha, transitionBeta } from "@manifold/ui/lib/animation"; import { LayoutGroup, motion, useReducedMotion } from "motion/react"; import { diff --git a/apps/web/src/features/landing/pages/root/page.tsx b/apps/web/src/features/landing/pages/root/page.tsx index f83be87..24c8b0d 100644 --- a/apps/web/src/features/landing/pages/root/page.tsx +++ b/apps/web/src/features/landing/pages/root/page.tsx @@ -1,14 +1,14 @@ import { signIn } from "@manifold/auth/client"; -import { LoadingIndicator } from "@manifold/ui/components/loading-indicator"; -import { ReactiveButton } from "@manifold/ui/components/reactive-button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, -} from "@manifold/ui/components/ui/card"; -import { FlexCol } from "@manifold/ui/components/ui/flex"; +} from "@manifold/ui/components/core/card"; +import { FlexCol } from "@manifold/ui/components/core/flex"; +import { LoadingIndicator } from "@manifold/ui/components/loading-indicator"; +import { ReactiveButton } from "@manifold/ui/components/reactive-button"; import { useState } from "react"; import { GiHobbitDoor } from "react-icons/gi"; import { useSearchParams } from "react-router-dom"; diff --git a/apps/web/src/features/made-with/pages/root/components/section.tsx b/apps/web/src/features/made-with/pages/root/components/section.tsx index 67cbe06..7a6b428 100644 --- a/apps/web/src/features/made-with/pages/root/components/section.tsx +++ b/apps/web/src/features/made-with/pages/root/components/section.tsx @@ -3,8 +3,8 @@ import { CardContent, CardHeader, CardTitle, -} from "@manifold/ui/components/ui/card"; -import { Separator } from "@manifold/ui/components/ui/separator"; +} from "@manifold/ui/components/core/card"; +import { Separator } from "@manifold/ui/components/core/separator"; import { motion, type Variants } from "motion/react"; import type { MadeWithSection } from "~features/made-with/pages/root/page"; diff --git a/apps/web/src/features/made-with/pages/root/page.tsx b/apps/web/src/features/made-with/pages/root/page.tsx index 870dfac..d08c1b8 100644 --- a/apps/web/src/features/made-with/pages/root/page.tsx +++ b/apps/web/src/features/made-with/pages/root/page.tsx @@ -1,4 +1,4 @@ -import { FlexCol } from "@manifold/ui/components/ui/flex"; +import { FlexCol } from "@manifold/ui/components/core/flex"; import { transitionAlpha } from "@manifold/ui/lib/animation"; import { AnimatePresence, motion, type Variants } from "motion/react"; import { GiPaintRoller } from "react-icons/gi"; diff --git a/apps/web/src/features/onboarding/api/create-user-profile.ts b/apps/web/src/features/onboarding/api/create-user-profile.ts index f6bf756..8dd5729 100644 --- a/apps/web/src/features/onboarding/api/create-user-profile.ts +++ b/apps/web/src/features/onboarding/api/create-user-profile.ts @@ -1,5 +1,5 @@ import { getSession } from "@manifold/auth/client"; -import { toast } from "@manifold/ui/components/ui/toaster"; +import { toast } from "@manifold/ui/components/core/toaster"; import { useRef } from "react"; import { useAuth } from "~features/auth/hooks/use-auth"; diff --git a/apps/web/src/features/onboarding/components/user-profile-create-form/index.tsx b/apps/web/src/features/onboarding/components/user-profile-create-form/index.tsx index 7d45e35..b2d4a14 100644 --- a/apps/web/src/features/onboarding/components/user-profile-create-form/index.tsx +++ b/apps/web/src/features/onboarding/components/user-profile-create-form/index.tsx @@ -1,5 +1,4 @@ import { getRandomElement } from "@manifold/lib/utils/array"; -import { TableIdentifier } from "@manifold/ui/components/table-identifier"; import { Form, FormControl, @@ -9,9 +8,10 @@ import { FormLabel, FormMessage, FormSubmitButton, -} from "@manifold/ui/components/ui/form"; -import { Input } from "@manifold/ui/components/ui/input"; -import { Textarea } from "@manifold/ui/components/ui/textarea"; +} from "@manifold/ui/components/core/form"; +import { Input } from "@manifold/ui/components/core/input"; +import { Textarea } from "@manifold/ui/components/core/textarea"; +import { TableIdentifier } from "@manifold/ui/components/table-identifier"; import { useZodForm } from "@manifold/ui/hooks/use-zod-form"; import { userProfileCreateInput, type z } from "@manifold/validators"; import { useMemo } from "react"; diff --git a/apps/web/src/features/onboarding/pages/create-profile/page.tsx b/apps/web/src/features/onboarding/pages/create-profile/page.tsx index e34f4cd..8220f50 100644 --- a/apps/web/src/features/onboarding/pages/create-profile/page.tsx +++ b/apps/web/src/features/onboarding/pages/create-profile/page.tsx @@ -4,13 +4,13 @@ import { CardDescription, CardHeader, CardTitle, -} from "@manifold/ui/components/ui/card"; -import { FlexCol } from "@manifold/ui/components/ui/flex"; +} from "@manifold/ui/components/core/card"; +import { FlexCol } from "@manifold/ui/components/core/flex"; import { Notice, NoticeContent, NoticeIcon, -} from "@manifold/ui/components/ui/notice"; +} from "@manifold/ui/components/core/notice"; import { GoQuestion } from "react-icons/go"; import { UserProfileCreateForm } from "~features/onboarding/components/user-profile-create-form"; diff --git a/apps/web/src/features/routing/components/launcher.tsx b/apps/web/src/features/routing/components/launcher.tsx index 1b15cef..5ca9795 100644 --- a/apps/web/src/features/routing/components/launcher.tsx +++ b/apps/web/src/features/routing/components/launcher.tsx @@ -3,8 +3,8 @@ import { CommandGroup, CommandItem, CommandSeparator, -} from "@manifold/ui/components/ui/command"; -import { Skeleton } from "@manifold/ui/components/ui/skeleton"; +} from "@manifold/ui/components/core/command"; +import { Skeleton } from "@manifold/ui/components/core/skeleton"; import { useCommandPalette } from "@manifold/ui/hooks/use-command-palette"; import { GoFile, GoHome, GoListUnordered, GoSearch } from "react-icons/go"; import { diff --git a/apps/web/src/features/routing/pages/root/error.tsx b/apps/web/src/features/routing/pages/root/error.tsx index 88d8ed0..4c2f24b 100644 --- a/apps/web/src/features/routing/pages/root/error.tsx +++ b/apps/web/src/features/routing/pages/root/error.tsx @@ -3,16 +3,16 @@ import { AccordionContent, AccordionItem, AccordionTrigger, -} from "@manifold/ui/components/ui/accordion"; -import { Button } from "@manifold/ui/components/ui/button"; +} from "@manifold/ui/components/core/accordion"; +import { Button } from "@manifold/ui/components/core/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, -} from "@manifold/ui/components/ui/card"; -import { FlexCol } from "@manifold/ui/components/ui/flex"; +} from "@manifold/ui/components/core/card"; +import { FlexCol } from "@manifold/ui/components/core/flex"; import { isError } from "@tanstack/react-query"; import { GiDiceTwentyFacesOne } from "react-icons/gi"; import { GoChevronRight } from "react-icons/go"; diff --git a/apps/web/src/features/routing/pages/root/layout.tsx b/apps/web/src/features/routing/pages/root/layout.tsx index e3a8f29..a576d13 100644 --- a/apps/web/src/features/routing/pages/root/layout.tsx +++ b/apps/web/src/features/routing/pages/root/layout.tsx @@ -1,9 +1,9 @@ import { signIn, signOut } from "@manifold/auth/client"; +import { Badge } from "@manifold/ui/components/core/badge"; +import { Button } from "@manifold/ui/components/core/button"; +import { Separator } from "@manifold/ui/components/core/separator"; +import { Skeleton } from "@manifold/ui/components/core/skeleton"; import { GlobalHeader } from "@manifold/ui/components/global-header"; -import { Badge } from "@manifold/ui/components/ui/badge"; -import { Button } from "@manifold/ui/components/ui/button"; -import { Separator } from "@manifold/ui/components/ui/separator"; -import { Skeleton } from "@manifold/ui/components/ui/skeleton"; import { Outlet, ScrollRestoration } from "react-router-dom"; import { match } from "ts-pattern"; diff --git a/apps/web/src/features/routing/pages/root/not-found.tsx b/apps/web/src/features/routing/pages/root/not-found.tsx index e8d712b..87efd35 100644 --- a/apps/web/src/features/routing/pages/root/not-found.tsx +++ b/apps/web/src/features/routing/pages/root/not-found.tsx @@ -1,11 +1,11 @@ -import { Button } from "@manifold/ui/components/ui/button"; +import { Button } from "@manifold/ui/components/core/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, -} from "@manifold/ui/components/ui/card"; +} from "@manifold/ui/components/core/card"; import { GiSuspicious } from "react-icons/gi"; import { GoChevronRight } from "react-icons/go"; import { Link } from "react-router-dom"; diff --git a/apps/web/src/features/table-version/components/compare-versions-dialog/compare-versions-dialog.tsx b/apps/web/src/features/table-version/components/compare-versions-dialog/compare-versions-dialog.tsx index e4d616a..a53b85f 100644 --- a/apps/web/src/features/table-version/components/compare-versions-dialog/compare-versions-dialog.tsx +++ b/apps/web/src/features/table-version/components/compare-versions-dialog/compare-versions-dialog.tsx @@ -1,20 +1,20 @@ import type { RouterOutput } from "@manifold/router"; -import { FullScreenLoader } from "@manifold/ui/components/full-screen-loader"; -import { TableIdentifier } from "@manifold/ui/components/table-identifier"; -import { Button } from "@manifold/ui/components/ui/button"; +import { Button } from "@manifold/ui/components/core/button"; import { DrawerClose, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, -} from "@manifold/ui/components/ui/drawer"; +} from "@manifold/ui/components/core/drawer"; import { Select, SelectContent, SelectItem, SelectTrigger, -} from "@manifold/ui/components/ui/select"; +} from "@manifold/ui/components/core/select"; +import { FullScreenLoader } from "@manifold/ui/components/full-screen-loader"; +import { TableIdentifier } from "@manifold/ui/components/table-identifier"; import type { Change, WordsOptions } from "diff"; import { Fragment, useCallback, useEffect, useMemo, useState } from "react"; import { GoArrowSwitch, GoDash, GoGitCompare, GoX } from "react-icons/go"; diff --git a/apps/web/src/features/table-version/components/compare-versions-dialog/index.tsx b/apps/web/src/features/table-version/components/compare-versions-dialog/index.tsx index b280227..e525734 100644 --- a/apps/web/src/features/table-version/components/compare-versions-dialog/index.tsx +++ b/apps/web/src/features/table-version/components/compare-versions-dialog/index.tsx @@ -3,7 +3,7 @@ import { Drawer, DrawerContent, DrawerLoader, -} from "@manifold/ui/components/ui/drawer"; +} from "@manifold/ui/components/core/drawer"; import { useReturnFocus } from "@manifold/ui/hooks/use-return-focus"; import { Suspense } from "react"; diff --git a/apps/web/src/features/table-version/pages/detail/layout.tsx b/apps/web/src/features/table-version/pages/detail/layout.tsx index c92059a..c8eaa19 100644 --- a/apps/web/src/features/table-version/pages/detail/layout.tsx +++ b/apps/web/src/features/table-version/pages/detail/layout.tsx @@ -1,14 +1,14 @@ import type { RouterOutput } from "@manifold/router"; import { ClipboardCopy } from "@manifold/ui/components/clipboard-copy"; -import { TableIdentifier } from "@manifold/ui/components/table-identifier"; -import { Button } from "@manifold/ui/components/ui/button"; -import { FlexCol } from "@manifold/ui/components/ui/flex"; +import { Button } from "@manifold/ui/components/core/button"; +import { FlexCol } from "@manifold/ui/components/core/flex"; import { Tooltip, TooltipArrow, TooltipContent, TooltipTrigger, -} from "@manifold/ui/components/ui/tooltip"; +} from "@manifold/ui/components/core/tooltip"; +import { TableIdentifier } from "@manifold/ui/components/table-identifier"; import { transitionAlpha } from "@manifold/ui/lib/animation"; import { AnimatePresence, motion } from "motion/react"; import { diff --git a/apps/web/src/features/table-version/pages/detail/page.tsx b/apps/web/src/features/table-version/pages/detail/page.tsx index aa1ca93..d78561d 100644 --- a/apps/web/src/features/table-version/pages/detail/page.tsx +++ b/apps/web/src/features/table-version/pages/detail/page.tsx @@ -1,6 +1,6 @@ import { injectNamespacePragmasWorkaround } from "@manifold/lib/utils/engine"; -import { Badge } from "@manifold/ui/components/ui/badge"; -import { Button } from "@manifold/ui/components/ui/button"; +import { Badge } from "@manifold/ui/components/core/badge"; +import { Button } from "@manifold/ui/components/core/button"; import { transitionAlpha } from "@manifold/ui/lib/animation"; import { cn } from "@manifold/ui/lib/utils"; import { LayoutGroup, motion } from "motion/react"; diff --git a/apps/web/src/features/table-version/pages/search-browse/page.tsx b/apps/web/src/features/table-version/pages/search-browse/page.tsx index bc29eb1..3d55c13 100644 --- a/apps/web/src/features/table-version/pages/search-browse/page.tsx +++ b/apps/web/src/features/table-version/pages/search-browse/page.tsx @@ -3,18 +3,18 @@ import { AnimatedList, AnimatedListItem, } from "@manifold/ui/components/animated-list"; -import { TableIdentifier } from "@manifold/ui/components/table-identifier"; -import { Button } from "@manifold/ui/components/ui/button"; -import { FlexCol } from "@manifold/ui/components/ui/flex"; -import { Input, InputAdornment } from "@manifold/ui/components/ui/input"; -import { Pagination } from "@manifold/ui/components/ui/pagination"; +import { Button } from "@manifold/ui/components/core/button"; +import { FlexCol } from "@manifold/ui/components/core/flex"; +import { Input, InputAdornment } from "@manifold/ui/components/core/input"; +import { Pagination } from "@manifold/ui/components/core/pagination"; import { Select, SelectContent, SelectItem, SelectTrigger, -} from "@manifold/ui/components/ui/select"; -import { Separator } from "@manifold/ui/components/ui/separator"; +} from "@manifold/ui/components/core/select"; +import { Separator } from "@manifold/ui/components/core/separator"; +import { TableIdentifier } from "@manifold/ui/components/table-identifier"; import { usePaginationURLState } from "@manifold/ui/hooks/pagination/use-pagination-url-state"; import { transitionAlpha } from "@manifold/ui/lib/animation"; import { tableListOrderByMapping } from "@manifold/validators"; diff --git a/apps/web/src/features/table/components/header.tsx b/apps/web/src/features/table/components/header.tsx index 017cf95..c351fcd 100644 --- a/apps/web/src/features/table/components/header.tsx +++ b/apps/web/src/features/table/components/header.tsx @@ -1,24 +1,24 @@ import { isEmpty } from "@manifold/lib/utils/object"; import { capitalize } from "@manifold/lib/utils/string"; import type { RouterOutput } from "@manifold/router"; -import { Button } from "@manifold/ui/components/ui/button"; +import { Button } from "@manifold/ui/components/core/button"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItemNaked, DropdownMenuSeparator, DropdownMenuTrigger, -} from "@manifold/ui/components/ui/dropdown-menu"; +} from "@manifold/ui/components/core/dropdown-menu"; import { FormSubmitButton, FormSubmitStatus, -} from "@manifold/ui/components/ui/form"; +} from "@manifold/ui/components/core/form"; import { Tooltip, TooltipArrow, TooltipContent, TooltipTrigger, -} from "@manifold/ui/components/ui/tooltip"; +} from "@manifold/ui/components/core/tooltip"; import { transitionAlpha } from "@manifold/ui/lib/animation"; import { formatRelative } from "date-fns"; import { useAtomValue } from "jotai"; diff --git a/apps/web/src/features/table/components/table-copy-dialog/index.tsx b/apps/web/src/features/table/components/table-copy-dialog/index.tsx index 9d797ba..4df92a5 100644 --- a/apps/web/src/features/table/components/table-copy-dialog/index.tsx +++ b/apps/web/src/features/table/components/table-copy-dialog/index.tsx @@ -3,7 +3,7 @@ import { Dialog, DialogContent, DialogLoader, -} from "@manifold/ui/components/ui/dialog"; +} from "@manifold/ui/components/core/dialog"; import { useReturnFocus } from "@manifold/ui/hooks/use-return-focus"; import { Suspense } from "react"; diff --git a/apps/web/src/features/table/components/table-copy-dialog/table-copy-dialog.tsx b/apps/web/src/features/table/components/table-copy-dialog/table-copy-dialog.tsx index 528e9a1..063245f 100644 --- a/apps/web/src/features/table/components/table-copy-dialog/table-copy-dialog.tsx +++ b/apps/web/src/features/table/components/table-copy-dialog/table-copy-dialog.tsx @@ -1,13 +1,11 @@ -import { TableIdentifierInput } from "@manifold/ui/components/table-identifier-input"; -import { TableIdentifierPreview } from "@manifold/ui/components/table-identifier-preview"; -import { Button } from "@manifold/ui/components/ui/button"; +import { Button } from "@manifold/ui/components/core/button"; import { DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogTitle, -} from "@manifold/ui/components/ui/dialog"; +} from "@manifold/ui/components/core/dialog"; import { Form, FormControl, @@ -16,15 +14,17 @@ import { FormLabel, FormMessage, FormSubmitButton, -} from "@manifold/ui/components/ui/form"; -import { Input } from "@manifold/ui/components/ui/input"; -import { Textarea } from "@manifold/ui/components/ui/textarea"; +} from "@manifold/ui/components/core/form"; +import { Input } from "@manifold/ui/components/core/input"; +import { Textarea } from "@manifold/ui/components/core/textarea"; import { Tooltip, TooltipArrow, TooltipContent, TooltipTrigger, -} from "@manifold/ui/components/ui/tooltip"; +} from "@manifold/ui/components/core/tooltip"; +import { TableIdentifierInput } from "@manifold/ui/components/table-identifier-input"; +import { TableIdentifierPreview } from "@manifold/ui/components/table-identifier-preview"; import { useZodForm } from "@manifold/ui/hooks/use-zod-form"; import { type TableCopyInput, tableCopyInput } from "@manifold/validators"; import type { SubmitHandler } from "react-hook-form"; diff --git a/apps/web/src/features/table/components/table-create-form/index.tsx b/apps/web/src/features/table/components/table-create-form/index.tsx index a9e7c10..0cdeed9 100644 --- a/apps/web/src/features/table/components/table-create-form/index.tsx +++ b/apps/web/src/features/table/components/table-create-form/index.tsx @@ -1,6 +1,4 @@ import type { RouterOutput } from "@manifold/router"; -import { TableIdentifierInput } from "@manifold/ui/components/table-identifier-input"; -import { TableIdentifierPreview } from "@manifold/ui/components/table-identifier-preview"; import { Form, FormControl, @@ -10,15 +8,17 @@ import { FormLabel, FormMessage, FormSubmitButton, -} from "@manifold/ui/components/ui/form"; -import { Input } from "@manifold/ui/components/ui/input"; -import { Textarea } from "@manifold/ui/components/ui/textarea"; +} from "@manifold/ui/components/core/form"; +import { Input } from "@manifold/ui/components/core/input"; +import { Textarea } from "@manifold/ui/components/core/textarea"; import { Tooltip, TooltipArrow, TooltipContent, TooltipTrigger, -} from "@manifold/ui/components/ui/tooltip"; +} from "@manifold/ui/components/core/tooltip"; +import { TableIdentifierInput } from "@manifold/ui/components/table-identifier-input"; +import { TableIdentifierPreview } from "@manifold/ui/components/table-identifier-preview"; import { useZodForm } from "@manifold/ui/hooks/use-zod-form"; import { tableCreateInput, type z } from "@manifold/validators"; import { type SubmitHandler } from "react-hook-form"; diff --git a/apps/web/src/features/table/components/table-delete-dialog/index.tsx b/apps/web/src/features/table/components/table-delete-dialog/index.tsx index 6116f4b..e03e4ff 100644 --- a/apps/web/src/features/table/components/table-delete-dialog/index.tsx +++ b/apps/web/src/features/table/components/table-delete-dialog/index.tsx @@ -3,7 +3,7 @@ import { AlertDialog, AlertDialogContent, AlertDialogLoader, -} from "@manifold/ui/components/ui/alert-dialog"; +} from "@manifold/ui/components/core/alert-dialog"; import { useReturnFocus } from "@manifold/ui/hooks/use-return-focus"; import { Suspense } from "react"; diff --git a/apps/web/src/features/table/components/table-delete-dialog/table-delete-dialog.tsx b/apps/web/src/features/table/components/table-delete-dialog/table-delete-dialog.tsx index ad69088..1e62a54 100644 --- a/apps/web/src/features/table/components/table-delete-dialog/table-delete-dialog.tsx +++ b/apps/web/src/features/table/components/table-delete-dialog/table-delete-dialog.tsx @@ -1,5 +1,3 @@ -import { LoadingIndicator } from "@manifold/ui/components/loading-indicator"; -import { TableIdentifier } from "@manifold/ui/components/table-identifier"; import { AlertDialogAction, AlertDialogCancel, @@ -7,12 +5,14 @@ import { AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, -} from "@manifold/ui/components/ui/alert-dialog"; +} from "@manifold/ui/components/core/alert-dialog"; import { Notice, NoticeContent, NoticeIcon, -} from "@manifold/ui/components/ui/notice"; +} from "@manifold/ui/components/core/notice"; +import { LoadingIndicator } from "@manifold/ui/components/loading-indicator"; +import { TableIdentifier } from "@manifold/ui/components/table-identifier"; import { useStateGuard } from "@manifold/ui/hooks/use-state-guard"; import { type MouseEvent } from "react"; import { GoInfo } from "react-icons/go"; diff --git a/apps/web/src/features/table/components/table-edit-metadata-dialog/index.tsx b/apps/web/src/features/table/components/table-edit-metadata-dialog/index.tsx index 6d52fb0..8a78066 100644 --- a/apps/web/src/features/table/components/table-edit-metadata-dialog/index.tsx +++ b/apps/web/src/features/table/components/table-edit-metadata-dialog/index.tsx @@ -3,7 +3,7 @@ import { Dialog, DialogContent, DialogLoader, -} from "@manifold/ui/components/ui/dialog"; +} from "@manifold/ui/components/core/dialog"; import { useReturnFocus } from "@manifold/ui/hooks/use-return-focus"; import { Suspense } from "react"; diff --git a/apps/web/src/features/table/components/table-edit-metadata-dialog/table-edit-metadata-dialog.tsx b/apps/web/src/features/table/components/table-edit-metadata-dialog/table-edit-metadata-dialog.tsx index 23dd9b8..e244b1e 100644 --- a/apps/web/src/features/table/components/table-edit-metadata-dialog/table-edit-metadata-dialog.tsx +++ b/apps/web/src/features/table/components/table-edit-metadata-dialog/table-edit-metadata-dialog.tsx @@ -1,12 +1,11 @@ -import { TableIdentifier } from "@manifold/ui/components/table-identifier"; -import { Button } from "@manifold/ui/components/ui/button"; +import { Button } from "@manifold/ui/components/core/button"; import { DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogTitle, -} from "@manifold/ui/components/ui/dialog"; +} from "@manifold/ui/components/core/dialog"; import { Form, FormControl, @@ -15,9 +14,10 @@ import { FormLabel, FormMessage, FormSubmitButton, -} from "@manifold/ui/components/ui/form"; -import { Input } from "@manifold/ui/components/ui/input"; -import { Textarea } from "@manifold/ui/components/ui/textarea"; +} from "@manifold/ui/components/core/form"; +import { Input } from "@manifold/ui/components/core/input"; +import { Textarea } from "@manifold/ui/components/core/textarea"; +import { TableIdentifier } from "@manifold/ui/components/table-identifier"; import { useStateGuard } from "@manifold/ui/hooks/use-state-guard"; import { useZodForm } from "@manifold/ui/hooks/use-zod-form"; import { type TableUpdateInput, tableUpdateInput } from "@manifold/validators"; diff --git a/apps/web/src/features/table/components/table-publish-dialog/index.tsx b/apps/web/src/features/table/components/table-publish-dialog/index.tsx index 8c7b6c3..d81884b 100644 --- a/apps/web/src/features/table/components/table-publish-dialog/index.tsx +++ b/apps/web/src/features/table/components/table-publish-dialog/index.tsx @@ -3,7 +3,7 @@ import { Dialog, DialogContent, DialogLoader, -} from "@manifold/ui/components/ui/dialog"; +} from "@manifold/ui/components/core/dialog"; import { useReturnFocus } from "@manifold/ui/hooks/use-return-focus"; import { Suspense } from "react"; diff --git a/apps/web/src/features/table/components/table-publish-dialog/table-publish-dialog.tsx b/apps/web/src/features/table/components/table-publish-dialog/table-publish-dialog.tsx index 97bd53d..b0ee859 100644 --- a/apps/web/src/features/table/components/table-publish-dialog/table-publish-dialog.tsx +++ b/apps/web/src/features/table/components/table-publish-dialog/table-publish-dialog.tsx @@ -1,20 +1,19 @@ import { pluralize } from "@manifold/lib/utils/string"; -import { TableIdentifier } from "@manifold/ui/components/table-identifier"; -import { Button } from "@manifold/ui/components/ui/button"; +import { Button } from "@manifold/ui/components/core/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, -} from "@manifold/ui/components/ui/card"; +} from "@manifold/ui/components/core/card"; import { DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogTitle, -} from "@manifold/ui/components/ui/dialog"; +} from "@manifold/ui/components/core/dialog"; import { Form, FormControl, @@ -23,14 +22,15 @@ import { FormLabel, FormMessage, FormSubmitButton, -} from "@manifold/ui/components/ui/form"; +} from "@manifold/ui/components/core/form"; import { Notice, NoticeContent, NoticeIcon, -} from "@manifold/ui/components/ui/notice"; -import { Separator } from "@manifold/ui/components/ui/separator"; -import { Textarea } from "@manifold/ui/components/ui/textarea"; +} from "@manifold/ui/components/core/notice"; +import { Separator } from "@manifold/ui/components/core/separator"; +import { Textarea } from "@manifold/ui/components/core/textarea"; +import { TableIdentifier } from "@manifold/ui/components/table-identifier"; import { useStateGuard } from "@manifold/ui/hooks/use-state-guard"; import { useZodForm } from "@manifold/ui/hooks/use-zod-form"; import { z } from "@manifold/validators"; diff --git a/apps/web/src/features/table/components/table-update-form/delete-button.tsx b/apps/web/src/features/table/components/table-update-form/delete-button.tsx index 4b280fc..1c34119 100644 --- a/apps/web/src/features/table/components/table-update-form/delete-button.tsx +++ b/apps/web/src/features/table/components/table-update-form/delete-button.tsx @@ -1,6 +1,6 @@ import { compose } from "@manifold/lib/utils/fn"; +import { Button } from "@manifold/ui/components/core/button"; import { LoadingIndicator } from "@manifold/ui/components/loading-indicator"; -import { Button } from "@manifold/ui/components/ui/button"; import { useStateGuard } from "@manifold/ui/hooks/use-state-guard"; import { cn } from "@manifold/ui/lib/utils"; import { forwardRef } from "react"; diff --git a/apps/web/src/features/table/components/table-update-form/download-button.tsx b/apps/web/src/features/table/components/table-update-form/download-button.tsx index 7ad5e56..96b0167 100644 --- a/apps/web/src/features/table/components/table-update-form/download-button.tsx +++ b/apps/web/src/features/table/components/table-update-form/download-button.tsx @@ -1,5 +1,5 @@ import { isEmpty } from "@manifold/lib/utils/object"; -import { Button } from "@manifold/ui/components/ui/button"; +import { Button } from "@manifold/ui/components/core/button"; import { cn } from "@manifold/ui/lib/utils"; import { forwardRef } from "react"; import { useFormContext, useWatch } from "react-hook-form"; diff --git a/apps/web/src/features/table/components/table-update-form/edit-button.tsx b/apps/web/src/features/table/components/table-update-form/edit-button.tsx index c8ea7e5..9ca8019 100644 --- a/apps/web/src/features/table/components/table-update-form/edit-button.tsx +++ b/apps/web/src/features/table/components/table-update-form/edit-button.tsx @@ -1,6 +1,6 @@ import { compose } from "@manifold/lib/utils/fn"; +import { Button } from "@manifold/ui/components/core/button"; import { LoadingIndicator } from "@manifold/ui/components/loading-indicator"; -import { Button } from "@manifold/ui/components/ui/button"; import { useStateGuard } from "@manifold/ui/hooks/use-state-guard"; import { cn } from "@manifold/ui/lib/utils"; import { forwardRef } from "react"; diff --git a/apps/web/src/features/table/components/table-update-form/favorite-button.tsx b/apps/web/src/features/table/components/table-update-form/favorite-button.tsx index 96f6528..df298f8 100644 --- a/apps/web/src/features/table/components/table-update-form/favorite-button.tsx +++ b/apps/web/src/features/table/components/table-update-form/favorite-button.tsx @@ -1,11 +1,11 @@ -import { LoadingIndicator } from "@manifold/ui/components/loading-indicator"; -import { Button } from "@manifold/ui/components/ui/button"; +import { Button } from "@manifold/ui/components/core/button"; import { Tooltip, TooltipArrow, TooltipContent, TooltipTrigger, -} from "@manifold/ui/components/ui/tooltip"; +} from "@manifold/ui/components/core/tooltip"; +import { LoadingIndicator } from "@manifold/ui/components/loading-indicator"; import { useStateGuard } from "@manifold/ui/hooks/use-state-guard"; import { type MouseEvent, useEffect, useRef } from "react"; import { GoHeart, GoHeartFill } from "react-icons/go"; diff --git a/apps/web/src/features/table/components/table-update-form/index.tsx b/apps/web/src/features/table/components/table-update-form/index.tsx index ebfffd3..cc4753b 100644 --- a/apps/web/src/features/table/components/table-update-form/index.tsx +++ b/apps/web/src/features/table/components/table-update-form/index.tsx @@ -1,13 +1,13 @@ import { isEmpty } from "@manifold/lib/utils/object"; import type { RouterOutput } from "@manifold/router"; -import { FlexCol } from "@manifold/ui/components/ui/flex"; +import { FlexCol } from "@manifold/ui/components/core/flex"; import { Form, FormControl, FormField, FormItem, FormMessage, -} from "@manifold/ui/components/ui/form"; +} from "@manifold/ui/components/core/form"; import { useZodForm } from "@manifold/ui/hooks/use-zod-form"; import { tableUpdateInput, z } from "@manifold/validators"; import { useAtomValue } from "jotai"; diff --git a/apps/web/src/features/table/components/table-update-form/publish-button.tsx b/apps/web/src/features/table/components/table-update-form/publish-button.tsx index 91acb1f..6d74bf5 100644 --- a/apps/web/src/features/table/components/table-update-form/publish-button.tsx +++ b/apps/web/src/features/table/components/table-update-form/publish-button.tsx @@ -1,12 +1,12 @@ import type { TableVersionSummary } from "@manifold/db"; -import { LoadingIndicator } from "@manifold/ui/components/loading-indicator"; -import { ReactiveButton } from "@manifold/ui/components/reactive-button"; import { Tooltip, TooltipArrow, TooltipContent, TooltipTrigger, -} from "@manifold/ui/components/ui/tooltip"; +} from "@manifold/ui/components/core/tooltip"; +import { LoadingIndicator } from "@manifold/ui/components/loading-indicator"; +import { ReactiveButton } from "@manifold/ui/components/reactive-button"; import { useStateGuard } from "@manifold/ui/hooks/use-state-guard"; import { useAtomValue } from "jotai"; import { GoGitBranch } from "react-icons/go"; diff --git a/apps/web/src/features/table/components/table-update-form/restore-button.tsx b/apps/web/src/features/table/components/table-update-form/restore-button.tsx index 2c9ac79..d2fd097 100644 --- a/apps/web/src/features/table/components/table-update-form/restore-button.tsx +++ b/apps/web/src/features/table/components/table-update-form/restore-button.tsx @@ -1,5 +1,5 @@ +import { Button } from "@manifold/ui/components/core/button"; import { LoadingIndicator } from "@manifold/ui/components/loading-indicator"; -import { Button } from "@manifold/ui/components/ui/button"; import { useStateGuard } from "@manifold/ui/hooks/use-state-guard"; import { type MouseEvent } from "react"; import { GoIterations } from "react-icons/go"; diff --git a/apps/web/src/features/table/components/table-update-form/view-dependencies-button.tsx b/apps/web/src/features/table/components/table-update-form/view-dependencies-button.tsx index e1c0f89..6d81671 100644 --- a/apps/web/src/features/table/components/table-update-form/view-dependencies-button.tsx +++ b/apps/web/src/features/table/components/table-update-form/view-dependencies-button.tsx @@ -1,11 +1,11 @@ import type { RouterOutput } from "@manifold/router"; -import { Button } from "@manifold/ui/components/ui/button"; +import { Button } from "@manifold/ui/components/core/button"; import { Tooltip, TooltipArrow, TooltipContent, TooltipTrigger, -} from "@manifold/ui/components/ui/tooltip"; +} from "@manifold/ui/components/core/tooltip"; import { GoPackageDependencies } from "react-icons/go"; import { DialogManager, DIALOGS } from "~features/dialog-manager"; diff --git a/apps/web/src/features/table/components/table-view-dependencies-dialog/index.tsx b/apps/web/src/features/table/components/table-view-dependencies-dialog/index.tsx index ed288bb..ed6d60d 100644 --- a/apps/web/src/features/table/components/table-view-dependencies-dialog/index.tsx +++ b/apps/web/src/features/table/components/table-view-dependencies-dialog/index.tsx @@ -3,7 +3,7 @@ import { Drawer, DrawerContent, DrawerLoader, -} from "@manifold/ui/components/ui/drawer"; +} from "@manifold/ui/components/core/drawer"; import { useReturnFocus } from "@manifold/ui/hooks/use-return-focus"; import { Suspense } from "react"; diff --git a/apps/web/src/features/table/components/table-view-dependencies-dialog/table-view-dependencies-dialog.tsx b/apps/web/src/features/table/components/table-view-dependencies-dialog/table-view-dependencies-dialog.tsx index 2f1f439..07c9c3f 100644 --- a/apps/web/src/features/table/components/table-view-dependencies-dialog/table-view-dependencies-dialog.tsx +++ b/apps/web/src/features/table/components/table-view-dependencies-dialog/table-view-dependencies-dialog.tsx @@ -1,12 +1,12 @@ -import { TableIdentifier } from "@manifold/ui/components/table-identifier"; -import { Button } from "@manifold/ui/components/ui/button"; +import { Button } from "@manifold/ui/components/core/button"; import { DrawerClose, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, -} from "@manifold/ui/components/ui/drawer"; +} from "@manifold/ui/components/core/drawer"; +import { TableIdentifier } from "@manifold/ui/components/table-identifier"; import { useCallback } from "react"; import { GoLinkExternal, GoX } from "react-icons/go"; import { useBlocker } from "react-router-dom"; diff --git a/apps/web/src/features/table/pages/detail/page.tsx b/apps/web/src/features/table/pages/detail/page.tsx index f68b30b..bf91b71 100644 --- a/apps/web/src/features/table/pages/detail/page.tsx +++ b/apps/web/src/features/table/pages/detail/page.tsx @@ -1,21 +1,21 @@ import { injectNamespacePragmasWorkaround } from "@manifold/lib/utils/engine"; import { buildTableIdentifier } from "@manifold/lib/utils/table-identifier"; import { ClipboardCopy } from "@manifold/ui/components/clipboard-copy"; -import { TableIdentifier } from "@manifold/ui/components/table-identifier"; -import { Badge } from "@manifold/ui/components/ui/badge"; -import { Button } from "@manifold/ui/components/ui/button"; -import { FlexCol } from "@manifold/ui/components/ui/flex"; +import { Badge } from "@manifold/ui/components/core/badge"; +import { Button } from "@manifold/ui/components/core/button"; +import { FlexCol } from "@manifold/ui/components/core/flex"; import { Notice, NoticeContent, NoticeIcon, -} from "@manifold/ui/components/ui/notice"; +} from "@manifold/ui/components/core/notice"; import { Tooltip, TooltipArrow, TooltipContent, TooltipTrigger, -} from "@manifold/ui/components/ui/tooltip"; +} from "@manifold/ui/components/core/tooltip"; +import { TableIdentifier } from "@manifold/ui/components/table-identifier"; import { transitionAlpha } from "@manifold/ui/lib/animation"; import { motion } from "motion/react"; import { diff --git a/apps/web/src/features/table/pages/edit/page.tsx b/apps/web/src/features/table/pages/edit/page.tsx index 5468e92..42ec9b3 100644 --- a/apps/web/src/features/table/pages/edit/page.tsx +++ b/apps/web/src/features/table/pages/edit/page.tsx @@ -1,5 +1,5 @@ import { buildTableIdentifier } from "@manifold/lib/utils/table-identifier"; -import { FlexCol } from "@manifold/ui/components/ui/flex"; +import { FlexCol } from "@manifold/ui/components/core/flex"; import { useRouteParams } from "~features/routing/hooks/use-route-params"; import { useGetTable } from "~features/table/api/get"; diff --git a/apps/web/src/features/table/pages/new/page.tsx b/apps/web/src/features/table/pages/new/page.tsx index 39bd7a6..77afddd 100644 --- a/apps/web/src/features/table/pages/new/page.tsx +++ b/apps/web/src/features/table/pages/new/page.tsx @@ -3,8 +3,8 @@ import { CardContent, CardHeader, CardTitle, -} from "@manifold/ui/components/ui/card"; -import { FlexCol } from "@manifold/ui/components/ui/flex"; +} from "@manifold/ui/components/core/card"; +import { FlexCol } from "@manifold/ui/components/core/flex"; import { GoPackage } from "react-icons/go"; import { useNavigate } from "react-router-dom"; diff --git a/apps/web/src/utils/toast.ts b/apps/web/src/utils/toast.ts index 14c478f..fa66653 100644 --- a/apps/web/src/utils/toast.ts +++ b/apps/web/src/utils/toast.ts @@ -1,4 +1,7 @@ -import { type ExternalToast, toast } from "@manifold/ui/components/ui/toaster"; +import { + type ExternalToast, + toast, +} from "@manifold/ui/components/core/toaster"; export function toastSuccess(message: string, options?: ExternalToast) { return toast.success(message, { diff --git a/packages/ui/components.json b/packages/ui/components.json index 8861b28..ea51def 100644 --- a/packages/ui/components.json +++ b/packages/ui/components.json @@ -12,7 +12,7 @@ }, "aliases": { "components": "#components", - "ui": "#components/ui", + "ui": "#components/core", "utils": "#lib/utils.ts", "lib": "#lib", "hooks": "#hooks" diff --git a/packages/ui/package.json b/packages/ui/package.json index 728e26a..22f6665 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -19,9 +19,8 @@ "./tailwind.config": "./tailwind.config.ts", "./lib/*": "./src/lib/*.ts", "./hooks/*": "./src/hooks/*.ts", - "./components/*": "./src/components/*.tsx", - "./components/ui/button": "./src/components/ui/button/index.ts", - "./components/ui/pagination": "./src/components/ui/pagination/index.ts" + "./components/*": "./src/components/*/index.ts", + "./components/core/*": "./src/components/core/*/index.ts" }, "devDependencies": { "@manifold/eslint-config": "*", diff --git a/packages/ui/src/components/animated-list.tsx b/packages/ui/src/components/animated-list/animated-list.tsx similarity index 100% rename from packages/ui/src/components/animated-list.tsx rename to packages/ui/src/components/animated-list/animated-list.tsx diff --git a/packages/ui/src/components/animated-list/index.ts b/packages/ui/src/components/animated-list/index.ts new file mode 100644 index 0000000..c5aed64 --- /dev/null +++ b/packages/ui/src/components/animated-list/index.ts @@ -0,0 +1 @@ +export * from "./animated-list"; diff --git a/packages/ui/src/components/clipboard-copy.tsx b/packages/ui/src/components/clipboard-copy/clipboard-copy.tsx similarity index 100% rename from packages/ui/src/components/clipboard-copy.tsx rename to packages/ui/src/components/clipboard-copy/clipboard-copy.tsx diff --git a/packages/ui/src/components/clipboard-copy/index.ts b/packages/ui/src/components/clipboard-copy/index.ts new file mode 100644 index 0000000..5495bed --- /dev/null +++ b/packages/ui/src/components/clipboard-copy/index.ts @@ -0,0 +1 @@ +export * from "./clipboard-copy"; diff --git a/packages/ui/src/components/command-palette.tsx b/packages/ui/src/components/command-palette/command-palette.tsx similarity index 86% rename from packages/ui/src/components/command-palette.tsx rename to packages/ui/src/components/command-palette/command-palette.tsx index 98bb223..4c81a1a 100644 --- a/packages/ui/src/components/command-palette.tsx +++ b/packages/ui/src/components/command-palette/command-palette.tsx @@ -3,8 +3,11 @@ import { CommandEmpty, CommandInput, CommandList, -} from "#components/ui/command.tsx"; -import { DialogDescription, DialogTitle } from "#components/ui/dialog.tsx"; +} from "#components/core/command/command.js"; +import { + DialogDescription, + DialogTitle, +} from "#components/core/dialog/dialog.js"; import { useReturnFocus } from "#hooks/use-return-focus.ts"; export function CommandPalette({ diff --git a/packages/ui/src/components/command-palette/index.ts b/packages/ui/src/components/command-palette/index.ts new file mode 100644 index 0000000..3c7408b --- /dev/null +++ b/packages/ui/src/components/command-palette/index.ts @@ -0,0 +1 @@ +export * from "./command-palette"; diff --git a/packages/ui/src/components/ui/accordion.tsx b/packages/ui/src/components/core/accordion/accordion.tsx similarity index 98% rename from packages/ui/src/components/ui/accordion.tsx rename to packages/ui/src/components/core/accordion/accordion.tsx index 22e6bb9..2f5211f 100644 --- a/packages/ui/src/components/ui/accordion.tsx +++ b/packages/ui/src/components/core/accordion/accordion.tsx @@ -2,7 +2,7 @@ import * as AccordionPrimitive from "@radix-ui/react-accordion"; import { ChevronDownIcon } from "@radix-ui/react-icons"; import * as React from "react"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; const Accordion = AccordionPrimitive.Root; diff --git a/packages/ui/src/components/core/accordion/index.ts b/packages/ui/src/components/core/accordion/index.ts new file mode 100644 index 0000000..d236f3b --- /dev/null +++ b/packages/ui/src/components/core/accordion/index.ts @@ -0,0 +1 @@ +export * from "./accordion"; diff --git a/packages/ui/src/components/ui/alert-dialog.tsx b/packages/ui/src/components/core/alert-dialog/alert-dialog.tsx similarity index 96% rename from packages/ui/src/components/ui/alert-dialog.tsx rename to packages/ui/src/components/core/alert-dialog/alert-dialog.tsx index 00fc4c4..4948cb9 100644 --- a/packages/ui/src/components/ui/alert-dialog.tsx +++ b/packages/ui/src/components/core/alert-dialog/alert-dialog.tsx @@ -2,9 +2,9 @@ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"; import type { VariantProps } from "class-variance-authority"; import * as React from "react"; -import { LoadingIndicator } from "#components/loading-indicator.tsx"; -import { buttonVariants } from "#components/ui/button/button.tsx"; -import { cn } from "#lib/utils.ts"; +import { buttonVariants } from "#components/core/button/button.tsx"; +import { LoadingIndicator } from "#components/loading-indicator/loading-indicator.js"; +import { cn } from "#lib/utils.js"; const AlertDialog = AlertDialogPrimitive.Root; diff --git a/packages/ui/src/components/core/alert-dialog/index.ts b/packages/ui/src/components/core/alert-dialog/index.ts new file mode 100644 index 0000000..28569ba --- /dev/null +++ b/packages/ui/src/components/core/alert-dialog/index.ts @@ -0,0 +1 @@ +export * from "./alert-dialog"; diff --git a/packages/ui/src/components/ui/avatar.tsx b/packages/ui/src/components/core/avatar/avatar.tsx similarity index 97% rename from packages/ui/src/components/ui/avatar.tsx rename to packages/ui/src/components/core/avatar/avatar.tsx index 63d0380..d3aa524 100644 --- a/packages/ui/src/components/ui/avatar.tsx +++ b/packages/ui/src/components/core/avatar/avatar.tsx @@ -1,7 +1,7 @@ import * as AvatarPrimitive from "@radix-ui/react-avatar"; import * as React from "react"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; const Avatar = React.forwardRef< React.ElementRef, diff --git a/packages/ui/src/components/core/avatar/index.ts b/packages/ui/src/components/core/avatar/index.ts new file mode 100644 index 0000000..90fdb22 --- /dev/null +++ b/packages/ui/src/components/core/avatar/index.ts @@ -0,0 +1 @@ +export * from "./avatar"; diff --git a/packages/ui/src/components/ui/badge.tsx b/packages/ui/src/components/core/badge/badge.tsx similarity index 97% rename from packages/ui/src/components/ui/badge.tsx rename to packages/ui/src/components/core/badge/badge.tsx index 235a757..5995ef4 100644 --- a/packages/ui/src/components/ui/badge.tsx +++ b/packages/ui/src/components/core/badge/badge.tsx @@ -1,7 +1,7 @@ import { cva, type VariantProps } from "class-variance-authority"; import * as React from "react"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; const badgeVariants = cva( "inline-flex items-center rounded-md border px-10 py-2 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", diff --git a/packages/ui/src/components/core/badge/index.ts b/packages/ui/src/components/core/badge/index.ts new file mode 100644 index 0000000..80844a4 --- /dev/null +++ b/packages/ui/src/components/core/badge/index.ts @@ -0,0 +1 @@ +export * from "./badge"; diff --git a/packages/ui/src/components/ui/button/button.stories.tsx b/packages/ui/src/components/core/button/button.stories.tsx similarity index 100% rename from packages/ui/src/components/ui/button/button.stories.tsx rename to packages/ui/src/components/core/button/button.stories.tsx diff --git a/packages/ui/src/components/ui/button/button.tsx b/packages/ui/src/components/core/button/button.tsx similarity index 99% rename from packages/ui/src/components/ui/button/button.tsx rename to packages/ui/src/components/core/button/button.tsx index d2e3435..2025262 100644 --- a/packages/ui/src/components/ui/button/button.tsx +++ b/packages/ui/src/components/core/button/button.tsx @@ -2,7 +2,7 @@ import { Slot } from "@radix-ui/react-slot"; import { cva, type VariantProps } from "class-variance-authority"; import * as React from "react"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; const buttonVariants = cva( "inline-flex shrink-0 items-center justify-center gap-8 whitespace-nowrap rounded-sm text-sm ring-0 ring-offset-0 ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", diff --git a/packages/ui/src/components/ui/button/index.ts b/packages/ui/src/components/core/button/index.ts similarity index 100% rename from packages/ui/src/components/ui/button/index.ts rename to packages/ui/src/components/core/button/index.ts diff --git a/packages/ui/src/components/ui/card.tsx b/packages/ui/src/components/core/card/card.tsx similarity index 98% rename from packages/ui/src/components/ui/card.tsx rename to packages/ui/src/components/core/card/card.tsx index 8743a31..b7612d7 100644 --- a/packages/ui/src/components/ui/card.tsx +++ b/packages/ui/src/components/core/card/card.tsx @@ -1,7 +1,7 @@ import { Slot } from "@radix-ui/react-slot"; import * as React from "react"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; const Card = React.forwardRef< HTMLDivElement, diff --git a/packages/ui/src/components/core/card/index.ts b/packages/ui/src/components/core/card/index.ts new file mode 100644 index 0000000..1d243e7 --- /dev/null +++ b/packages/ui/src/components/core/card/index.ts @@ -0,0 +1 @@ +export * from "./card"; diff --git a/packages/ui/src/components/ui/checkbox.tsx b/packages/ui/src/components/core/checkbox/checkbox.tsx similarity index 96% rename from packages/ui/src/components/ui/checkbox.tsx rename to packages/ui/src/components/core/checkbox/checkbox.tsx index d038629..eb5131a 100644 --- a/packages/ui/src/components/ui/checkbox.tsx +++ b/packages/ui/src/components/core/checkbox/checkbox.tsx @@ -2,7 +2,7 @@ import * as CheckboxPrimitive from "@radix-ui/react-checkbox"; import { CheckIcon } from "@radix-ui/react-icons"; import * as React from "react"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; const Checkbox = React.forwardRef< React.ElementRef, diff --git a/packages/ui/src/components/core/checkbox/index.ts b/packages/ui/src/components/core/checkbox/index.ts new file mode 100644 index 0000000..057f167 --- /dev/null +++ b/packages/ui/src/components/core/checkbox/index.ts @@ -0,0 +1 @@ +export * from "./checkbox"; diff --git a/packages/ui/src/components/ui/command.tsx b/packages/ui/src/components/core/command/command.tsx similarity index 97% rename from packages/ui/src/components/ui/command.tsx rename to packages/ui/src/components/core/command/command.tsx index 743af0a..b44fff4 100644 --- a/packages/ui/src/components/ui/command.tsx +++ b/packages/ui/src/components/core/command/command.tsx @@ -3,8 +3,8 @@ import { MagnifyingGlassIcon } from "@radix-ui/react-icons"; import { Command as CommandPrimitive } from "cmdk"; import * as React from "react"; -import { Dialog, DialogContent } from "#components/ui/dialog.tsx"; -import { cn } from "#lib/utils.ts"; +import { Dialog, DialogContent } from "#components/core/dialog/dialog.js"; +import { cn } from "#lib/utils.js"; const Command = React.forwardRef< React.ElementRef, diff --git a/packages/ui/src/components/core/command/index.ts b/packages/ui/src/components/core/command/index.ts new file mode 100644 index 0000000..f4c8ea9 --- /dev/null +++ b/packages/ui/src/components/core/command/index.ts @@ -0,0 +1 @@ +export * from "./command"; diff --git a/packages/ui/src/components/ui/dialog.tsx b/packages/ui/src/components/core/dialog/dialog.tsx similarity index 97% rename from packages/ui/src/components/ui/dialog.tsx rename to packages/ui/src/components/core/dialog/dialog.tsx index 5ef3274..0d3d0fc 100644 --- a/packages/ui/src/components/ui/dialog.tsx +++ b/packages/ui/src/components/core/dialog/dialog.tsx @@ -2,8 +2,8 @@ import * as DialogPrimitive from "@radix-ui/react-dialog"; import { Cross2Icon } from "@radix-ui/react-icons"; import * as React from "react"; -import { LoadingIndicator } from "#components/loading-indicator.tsx"; -import { cn } from "#lib/utils.ts"; +import { LoadingIndicator } from "#components/loading-indicator/loading-indicator.js"; +import { cn } from "#lib/utils.js"; const Dialog = DialogPrimitive.Root; diff --git a/packages/ui/src/components/core/dialog/index.ts b/packages/ui/src/components/core/dialog/index.ts new file mode 100644 index 0000000..e5c2874 --- /dev/null +++ b/packages/ui/src/components/core/dialog/index.ts @@ -0,0 +1 @@ +export * from "./dialog"; diff --git a/packages/ui/src/components/ui/drawer.tsx b/packages/ui/src/components/core/drawer/drawer.tsx similarity index 96% rename from packages/ui/src/components/ui/drawer.tsx rename to packages/ui/src/components/core/drawer/drawer.tsx index 9ab14a5..c314cee 100644 --- a/packages/ui/src/components/ui/drawer.tsx +++ b/packages/ui/src/components/core/drawer/drawer.tsx @@ -1,8 +1,8 @@ import * as React from "react"; import { Drawer as DrawerPrimitive } from "vaul"; -import { LoadingIndicator } from "#components/loading-indicator.js"; -import { cn } from "#lib/utils.ts"; +import { LoadingIndicator } from "#components/loading-indicator/loading-indicator.js"; +import { cn } from "#lib/utils.js"; const Drawer = ({ shouldScaleBackground = true, diff --git a/packages/ui/src/components/core/drawer/index.ts b/packages/ui/src/components/core/drawer/index.ts new file mode 100644 index 0000000..29c090d --- /dev/null +++ b/packages/ui/src/components/core/drawer/index.ts @@ -0,0 +1 @@ +export * from "./drawer"; diff --git a/packages/ui/src/components/ui/dropdown-menu.tsx b/packages/ui/src/components/core/dropdown-menu/dropdown-menu.tsx similarity index 99% rename from packages/ui/src/components/ui/dropdown-menu.tsx rename to packages/ui/src/components/core/dropdown-menu/dropdown-menu.tsx index 54e8f7d..055537b 100644 --- a/packages/ui/src/components/ui/dropdown-menu.tsx +++ b/packages/ui/src/components/core/dropdown-menu/dropdown-menu.tsx @@ -6,7 +6,7 @@ import { } from "@radix-ui/react-icons"; import * as React from "react"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; const DropdownMenu = DropdownMenuPrimitive.Root; diff --git a/packages/ui/src/components/core/dropdown-menu/index.ts b/packages/ui/src/components/core/dropdown-menu/index.ts new file mode 100644 index 0000000..10ff970 --- /dev/null +++ b/packages/ui/src/components/core/dropdown-menu/index.ts @@ -0,0 +1 @@ +export * from "./dropdown-menu"; diff --git a/packages/ui/src/components/ui/flex.tsx b/packages/ui/src/components/core/flex/flex.tsx similarity index 93% rename from packages/ui/src/components/ui/flex.tsx rename to packages/ui/src/components/core/flex/flex.tsx index 933ea4f..34e075f 100644 --- a/packages/ui/src/components/ui/flex.tsx +++ b/packages/ui/src/components/core/flex/flex.tsx @@ -1,7 +1,7 @@ import { Slot } from "@radix-ui/react-slot"; import React from "react"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; export interface FlexColProps extends React.HTMLAttributes { asChild?: boolean; diff --git a/packages/ui/src/components/core/flex/index.ts b/packages/ui/src/components/core/flex/index.ts new file mode 100644 index 0000000..1dc0e95 --- /dev/null +++ b/packages/ui/src/components/core/flex/index.ts @@ -0,0 +1 @@ +export * from "./flex"; diff --git a/packages/ui/src/components/ui/form.tsx b/packages/ui/src/components/core/form/form.tsx similarity index 96% rename from packages/ui/src/components/ui/form.tsx rename to packages/ui/src/components/core/form/form.tsx index 06c0ea9..4146392 100644 --- a/packages/ui/src/components/ui/form.tsx +++ b/packages/ui/src/components/core/form/form.tsx @@ -11,11 +11,11 @@ import { useFormContext, } from "react-hook-form"; -import { LoadingIndicator } from "#components/loading-indicator.tsx"; -import { Button } from "#components/ui/button/button.tsx"; -import { Label } from "#components/ui/label.tsx"; +import { Button } from "#components/core/button/button.tsx"; +import { Label } from "#components/core/label/label.js"; +import { LoadingIndicator } from "#components/loading-indicator/loading-indicator.js"; import { useStateGuard } from "#hooks/use-state-guard.ts"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; const Form = FormProvider; diff --git a/packages/ui/src/components/core/form/index.ts b/packages/ui/src/components/core/form/index.ts new file mode 100644 index 0000000..c4a75a7 --- /dev/null +++ b/packages/ui/src/components/core/form/index.ts @@ -0,0 +1 @@ +export * from "./form"; diff --git a/packages/ui/src/components/core/input/index.ts b/packages/ui/src/components/core/input/index.ts new file mode 100644 index 0000000..4ce4a88 --- /dev/null +++ b/packages/ui/src/components/core/input/index.ts @@ -0,0 +1 @@ +export * from "./input"; diff --git a/packages/ui/src/components/ui/input.tsx b/packages/ui/src/components/core/input/input.tsx similarity index 98% rename from packages/ui/src/components/ui/input.tsx rename to packages/ui/src/components/core/input/input.tsx index a15bd11..9f5cf26 100644 --- a/packages/ui/src/components/ui/input.tsx +++ b/packages/ui/src/components/core/input/input.tsx @@ -1,6 +1,6 @@ import * as React from "react"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; export interface InputProps extends React.HTMLAttributes { inputProps?: React.InputHTMLAttributes; diff --git a/packages/ui/src/components/core/label/index.ts b/packages/ui/src/components/core/label/index.ts new file mode 100644 index 0000000..c8a3baf --- /dev/null +++ b/packages/ui/src/components/core/label/index.ts @@ -0,0 +1 @@ +export * from "./label"; diff --git a/packages/ui/src/components/ui/label.tsx b/packages/ui/src/components/core/label/label.tsx similarity index 95% rename from packages/ui/src/components/ui/label.tsx rename to packages/ui/src/components/core/label/label.tsx index e7ef39b..46822a0 100644 --- a/packages/ui/src/components/ui/label.tsx +++ b/packages/ui/src/components/core/label/label.tsx @@ -2,7 +2,7 @@ import * as LabelPrimitive from "@radix-ui/react-label"; import { cva, type VariantProps } from "class-variance-authority"; import * as React from "react"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; const labelVariants = cva( "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", diff --git a/packages/ui/src/components/core/notice/index.ts b/packages/ui/src/components/core/notice/index.ts new file mode 100644 index 0000000..a8df810 --- /dev/null +++ b/packages/ui/src/components/core/notice/index.ts @@ -0,0 +1 @@ +export * from "./notice"; diff --git a/packages/ui/src/components/ui/notice.tsx b/packages/ui/src/components/core/notice/notice.tsx similarity index 98% rename from packages/ui/src/components/ui/notice.tsx rename to packages/ui/src/components/core/notice/notice.tsx index d4d30e7..217e171 100644 --- a/packages/ui/src/components/ui/notice.tsx +++ b/packages/ui/src/components/core/notice/notice.tsx @@ -2,7 +2,7 @@ import { Slot } from "@radix-ui/react-slot"; import { cva, type VariantProps } from "class-variance-authority"; import * as React from "react"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; const noticeVariants = cva( "flex gap-12 rounded border p-12 text-sm sm:gap-16 sm:p-16", diff --git a/packages/ui/src/components/ui/pagination/context.ts b/packages/ui/src/components/core/pagination/context.ts similarity index 100% rename from packages/ui/src/components/ui/pagination/context.ts rename to packages/ui/src/components/core/pagination/context.ts diff --git a/packages/ui/src/components/ui/pagination/index.ts b/packages/ui/src/components/core/pagination/index.ts similarity index 100% rename from packages/ui/src/components/ui/pagination/index.ts rename to packages/ui/src/components/core/pagination/index.ts diff --git a/packages/ui/src/components/ui/pagination/pagination.tsx b/packages/ui/src/components/core/pagination/pagination.tsx similarity index 95% rename from packages/ui/src/components/ui/pagination/pagination.tsx rename to packages/ui/src/components/core/pagination/pagination.tsx index a1731f1..8be9884 100644 --- a/packages/ui/src/components/ui/pagination/pagination.tsx +++ b/packages/ui/src/components/core/pagination/pagination.tsx @@ -4,19 +4,19 @@ import { GoChevronLeft, GoChevronRight } from "react-icons/go"; import { Link } from "react-router-dom"; import { v4 as uuidv4 } from "uuid"; -import { Button, type ButtonProps } from "#components/ui/button/button.tsx"; -import { FormControl, FormLabel } from "#components/ui/form.js"; +import { Button, type ButtonProps } from "#components/core/button/index.ts"; +import { FormControl, FormLabel } from "#components/core/form/index.ts"; import { Select, SelectContent, SelectItem, SelectTrigger, -} from "#components/ui/select.js"; +} from "#components/core/select/index.ts"; import { isUrlPaginator, usePaginationController, } from "#hooks/pagination/index.ts"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; import { PaginationCtx, usePaginationContext } from "./context"; import type { PaginationProps } from "./types"; diff --git a/packages/ui/src/components/ui/pagination/types.ts b/packages/ui/src/components/core/pagination/types.ts similarity index 100% rename from packages/ui/src/components/ui/pagination/types.ts rename to packages/ui/src/components/core/pagination/types.ts diff --git a/packages/ui/src/components/core/resizable/index.ts b/packages/ui/src/components/core/resizable/index.ts new file mode 100644 index 0000000..806a2d5 --- /dev/null +++ b/packages/ui/src/components/core/resizable/index.ts @@ -0,0 +1 @@ +export * from "./resizable"; diff --git a/packages/ui/src/components/ui/resizable.tsx b/packages/ui/src/components/core/resizable/resizable.tsx similarity index 98% rename from packages/ui/src/components/ui/resizable.tsx rename to packages/ui/src/components/core/resizable/resizable.tsx index 3b0c0ec..bbddd0e 100644 --- a/packages/ui/src/components/ui/resizable.tsx +++ b/packages/ui/src/components/core/resizable/resizable.tsx @@ -1,7 +1,7 @@ import { DragHandleDots2Icon } from "@radix-ui/react-icons"; import * as ResizablePrimitive from "react-resizable-panels"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; const ResizablePanelGroup = ({ className, diff --git a/packages/ui/src/components/core/select/index.ts b/packages/ui/src/components/core/select/index.ts new file mode 100644 index 0000000..e1856bb --- /dev/null +++ b/packages/ui/src/components/core/select/index.ts @@ -0,0 +1 @@ +export * from "./select"; diff --git a/packages/ui/src/components/ui/select.tsx b/packages/ui/src/components/core/select/select.tsx similarity index 99% rename from packages/ui/src/components/ui/select.tsx rename to packages/ui/src/components/core/select/select.tsx index 3d5f23a..2d77701 100644 --- a/packages/ui/src/components/ui/select.tsx +++ b/packages/ui/src/components/core/select/select.tsx @@ -7,7 +7,7 @@ import { import * as SelectPrimitive from "@radix-ui/react-select"; import * as React from "react"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; const Select = SelectPrimitive.Root; diff --git a/packages/ui/src/components/core/separator/index.ts b/packages/ui/src/components/core/separator/index.ts new file mode 100644 index 0000000..8cb65e0 --- /dev/null +++ b/packages/ui/src/components/core/separator/index.ts @@ -0,0 +1 @@ +export * from "./separator"; diff --git a/packages/ui/src/components/ui/separator.tsx b/packages/ui/src/components/core/separator/separator.tsx similarity index 95% rename from packages/ui/src/components/ui/separator.tsx rename to packages/ui/src/components/core/separator/separator.tsx index 5438092..a7e8a19 100644 --- a/packages/ui/src/components/ui/separator.tsx +++ b/packages/ui/src/components/core/separator/separator.tsx @@ -1,7 +1,7 @@ import * as SeparatorPrimitive from "@radix-ui/react-separator"; import * as React from "react"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; const Separator = React.forwardRef< React.ElementRef, diff --git a/packages/ui/src/components/core/skeleton/index.ts b/packages/ui/src/components/core/skeleton/index.ts new file mode 100644 index 0000000..8e713ba --- /dev/null +++ b/packages/ui/src/components/core/skeleton/index.ts @@ -0,0 +1 @@ +export * from "./skeleton"; diff --git a/packages/ui/src/components/ui/skeleton.tsx b/packages/ui/src/components/core/skeleton/skeleton.tsx similarity index 86% rename from packages/ui/src/components/ui/skeleton.tsx rename to packages/ui/src/components/core/skeleton/skeleton.tsx index 163254d..38622f7 100644 --- a/packages/ui/src/components/ui/skeleton.tsx +++ b/packages/ui/src/components/core/skeleton/skeleton.tsx @@ -1,4 +1,4 @@ -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; function Skeleton({ className, diff --git a/packages/ui/src/components/core/textarea/index.ts b/packages/ui/src/components/core/textarea/index.ts new file mode 100644 index 0000000..23f3d74 --- /dev/null +++ b/packages/ui/src/components/core/textarea/index.ts @@ -0,0 +1 @@ +export * from "./textarea"; diff --git a/packages/ui/src/components/ui/textarea.tsx b/packages/ui/src/components/core/textarea/textarea.tsx similarity index 97% rename from packages/ui/src/components/ui/textarea.tsx rename to packages/ui/src/components/core/textarea/textarea.tsx index 698c540..0eff1ae 100644 --- a/packages/ui/src/components/ui/textarea.tsx +++ b/packages/ui/src/components/core/textarea/textarea.tsx @@ -2,7 +2,7 @@ import { useComposedRefs } from "@radix-ui/react-compose-refs"; import autosize from "autosize"; import React, { forwardRef, useEffect, useRef } from "react"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; export interface TextareaProps extends React.TextareaHTMLAttributes { diff --git a/packages/ui/src/components/core/toaster/index.ts b/packages/ui/src/components/core/toaster/index.ts new file mode 100644 index 0000000..ab9d19f --- /dev/null +++ b/packages/ui/src/components/core/toaster/index.ts @@ -0,0 +1 @@ +export * from "./toaster"; diff --git a/packages/ui/src/components/ui/toaster.tsx b/packages/ui/src/components/core/toaster/toaster.tsx similarity index 97% rename from packages/ui/src/components/ui/toaster.tsx rename to packages/ui/src/components/core/toaster/toaster.tsx index 6dbd83f..b13e85d 100644 --- a/packages/ui/src/components/ui/toaster.tsx +++ b/packages/ui/src/components/core/toaster/toaster.tsx @@ -1,6 +1,6 @@ import { type ExternalToast, toast, Toaster as Sonner } from "sonner"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; type ToasterProps = React.ComponentProps; diff --git a/packages/ui/src/components/core/tooltip/index.ts b/packages/ui/src/components/core/tooltip/index.ts new file mode 100644 index 0000000..3c61782 --- /dev/null +++ b/packages/ui/src/components/core/tooltip/index.ts @@ -0,0 +1 @@ +export * from "./tooltip"; diff --git a/packages/ui/src/components/ui/tooltip.tsx b/packages/ui/src/components/core/tooltip/tooltip.tsx similarity index 97% rename from packages/ui/src/components/ui/tooltip.tsx rename to packages/ui/src/components/core/tooltip/tooltip.tsx index b8924f0..e210c6b 100644 --- a/packages/ui/src/components/ui/tooltip.tsx +++ b/packages/ui/src/components/core/tooltip/tooltip.tsx @@ -1,7 +1,7 @@ import * as TooltipPrimitive from "@radix-ui/react-tooltip"; import * as React from "react"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; const TooltipProvider = TooltipPrimitive.Provider; diff --git a/packages/ui/src/components/full-screen-loader.tsx b/packages/ui/src/components/full-screen-loader/full-screen-loader.tsx similarity index 53% rename from packages/ui/src/components/full-screen-loader.tsx rename to packages/ui/src/components/full-screen-loader/full-screen-loader.tsx index 3409dce..0886d72 100644 --- a/packages/ui/src/components/full-screen-loader.tsx +++ b/packages/ui/src/components/full-screen-loader/full-screen-loader.tsx @@ -1,6 +1,6 @@ -import { LoadingIndicator } from "#components/loading-indicator.tsx"; -import { FlexCol } from "#components/ui/flex.tsx"; -import { cn } from "#lib/utils.ts"; +import { FlexCol } from "#components/core/flex/flex.js"; +import { LoadingIndicator } from "#components/loading-indicator/loading-indicator.js"; +import { cn } from "#lib/utils.js"; export function FullScreenLoader({ className }: { className?: string }) { return ( diff --git a/packages/ui/src/components/full-screen-loader/index.ts b/packages/ui/src/components/full-screen-loader/index.ts new file mode 100644 index 0000000..0a287a8 --- /dev/null +++ b/packages/ui/src/components/full-screen-loader/index.ts @@ -0,0 +1 @@ +export * from "./full-screen-loader"; diff --git a/packages/ui/src/components/global-header.tsx b/packages/ui/src/components/global-header/global-header.tsx similarity index 87% rename from packages/ui/src/components/global-header.tsx rename to packages/ui/src/components/global-header/global-header.tsx index 027050d..c7e1fcb 100644 --- a/packages/ui/src/components/global-header.tsx +++ b/packages/ui/src/components/global-header/global-header.tsx @@ -1,8 +1,12 @@ import { GiPlatform, GiSecretDoor } from "react-icons/gi"; -import { ReactiveButton } from "#components/reactive-button.js"; -import { Avatar, AvatarFallback, AvatarImage } from "#components/ui/avatar.tsx"; -import { Button } from "#components/ui/button/button.tsx"; +import { + Avatar, + AvatarFallback, + AvatarImage, +} from "#components/core/avatar/avatar.js"; +import { Button } from "#components/core/button/button.js"; +import { ReactiveButton } from "#components/reactive-button/reactive-button.js"; import { cn, initials } from "#lib/utils.ts"; type Props = { diff --git a/packages/ui/src/components/global-header/index.ts b/packages/ui/src/components/global-header/index.ts new file mode 100644 index 0000000..dec262e --- /dev/null +++ b/packages/ui/src/components/global-header/index.ts @@ -0,0 +1 @@ +export * from "./global-header"; diff --git a/packages/ui/src/components/global-progress.tsx b/packages/ui/src/components/global-progress/global-progress.tsx similarity index 97% rename from packages/ui/src/components/global-progress.tsx rename to packages/ui/src/components/global-progress/global-progress.tsx index 7a593de..6360efe 100644 --- a/packages/ui/src/components/global-progress.tsx +++ b/packages/ui/src/components/global-progress/global-progress.tsx @@ -1,6 +1,6 @@ import { useNProgress } from "@tanem/react-nprogress"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; type Props = { isAnimating: boolean; diff --git a/packages/ui/src/components/global-progress/index.ts b/packages/ui/src/components/global-progress/index.ts new file mode 100644 index 0000000..56f071e --- /dev/null +++ b/packages/ui/src/components/global-progress/index.ts @@ -0,0 +1 @@ +export * from "./global-progress"; diff --git a/packages/ui/src/components/loading-indicator/index.ts b/packages/ui/src/components/loading-indicator/index.ts new file mode 100644 index 0000000..d3188b5 --- /dev/null +++ b/packages/ui/src/components/loading-indicator/index.ts @@ -0,0 +1 @@ +export * from "./loading-indicator"; diff --git a/packages/ui/src/components/loading-indicator.tsx b/packages/ui/src/components/loading-indicator/loading-indicator.tsx similarity index 95% rename from packages/ui/src/components/loading-indicator.tsx rename to packages/ui/src/components/loading-indicator/loading-indicator.tsx index a43884d..614f5a8 100644 --- a/packages/ui/src/components/loading-indicator.tsx +++ b/packages/ui/src/components/loading-indicator/loading-indicator.tsx @@ -1,7 +1,7 @@ import { cva, type VariantProps } from "class-variance-authority"; import { RiLoader3Line } from "react-icons/ri"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; const loadingIndicatorVariants = cva(undefined, { variants: { diff --git a/packages/ui/src/components/reactive-button/index.ts b/packages/ui/src/components/reactive-button/index.ts new file mode 100644 index 0000000..8342c33 --- /dev/null +++ b/packages/ui/src/components/reactive-button/index.ts @@ -0,0 +1 @@ +export * from "./reactive-button"; diff --git a/packages/ui/src/components/reactive-button.tsx b/packages/ui/src/components/reactive-button/reactive-button.tsx similarity index 89% rename from packages/ui/src/components/reactive-button.tsx rename to packages/ui/src/components/reactive-button/reactive-button.tsx index 42cf5bc..f4c3045 100644 --- a/packages/ui/src/components/reactive-button.tsx +++ b/packages/ui/src/components/reactive-button/reactive-button.tsx @@ -1,7 +1,7 @@ import { forwardRef, type MouseEvent } from "react"; -import { Button, type ButtonProps } from "#components/ui/button/button.tsx"; -import { cn } from "#lib/utils.ts"; +import { Button, type ButtonProps } from "#components/core/button/button.js"; +import { cn } from "#lib/utils.js"; type ReactiveButtonProps = Omit & { reactive?: boolean; diff --git a/packages/ui/src/components/roll-results-list/index.ts b/packages/ui/src/components/roll-results-list/index.ts new file mode 100644 index 0000000..ef4fe85 --- /dev/null +++ b/packages/ui/src/components/roll-results-list/index.ts @@ -0,0 +1 @@ +export * from "./roll-results-list"; diff --git a/packages/ui/src/components/roll-results-list.tsx b/packages/ui/src/components/roll-results-list/roll-results-list.tsx similarity index 92% rename from packages/ui/src/components/roll-results-list.tsx rename to packages/ui/src/components/roll-results-list/roll-results-list.tsx index 8d8d8e7..001ccbf 100644 --- a/packages/ui/src/components/roll-results-list.tsx +++ b/packages/ui/src/components/roll-results-list/roll-results-list.tsx @@ -4,14 +4,17 @@ import { AnimatePresence, motion } from "motion/react"; import { memo, type RefObject, useCallback, useRef, useState } from "react"; import { GoCheck, GoCopy, GoX } from "react-icons/go"; -import { AnimatedList, AnimatedListItem } from "#components/animated-list.tsx"; -import { ClipboardCopy } from "#components/clipboard-copy.tsx"; -import { Typewriter } from "#components/typewriter.tsx"; -import { Badge } from "#components/ui/badge.tsx"; -import { Button } from "#components/ui/button/button.tsx"; -import { Card, CardContent } from "#components/ui/card.tsx"; +import { + AnimatedList, + AnimatedListItem, +} from "#components/animated-list/animated-list.js"; +import { ClipboardCopy } from "#components/clipboard-copy/clipboard-copy.js"; +import { Badge } from "#components/core/badge/badge.js"; +import { Button } from "#components/core/button/button.js"; +import { Card, CardContent } from "#components/core/card/card.js"; +import { Typewriter } from "#components/typewriter/typewriter.js"; import { transitionAlpha } from "#lib/animation.ts"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; type Props = { className?: string; diff --git a/packages/ui/src/components/roll-table-buttons/index.ts b/packages/ui/src/components/roll-table-buttons/index.ts new file mode 100644 index 0000000..e194e03 --- /dev/null +++ b/packages/ui/src/components/roll-table-buttons/index.ts @@ -0,0 +1 @@ +export * from "./roll-table-buttons"; diff --git a/packages/ui/src/components/roll-table-buttons.tsx b/packages/ui/src/components/roll-table-buttons/roll-table-buttons.tsx similarity index 93% rename from packages/ui/src/components/roll-table-buttons.tsx rename to packages/ui/src/components/roll-table-buttons/roll-table-buttons.tsx index 023dbdd..d94030c 100644 --- a/packages/ui/src/components/roll-table-buttons.tsx +++ b/packages/ui/src/components/roll-table-buttons/roll-table-buttons.tsx @@ -1,15 +1,4 @@ import type { RollResult, TableMetadata } from "@manifold/lib/models/roll"; -import { - AnimatedList, - AnimatedListItem, -} from "@manifold/ui/components/animated-list"; -import { ClipboardCopy } from "@manifold/ui/components/clipboard-copy"; -import { - Tooltip, - TooltipContent, - TooltipTrigger, -} from "@manifold/ui/components/ui/tooltip"; -import { transitionAlpha } from "@manifold/ui/lib/animation"; import { motion } from "motion/react"; import { memo, useCallback } from "react"; import { @@ -19,8 +8,19 @@ import { GoListUnordered, } from "react-icons/go"; -import { Button } from "#components/ui/button/button.tsx"; -import { cn } from "#lib/utils.ts"; +import { + AnimatedList, + AnimatedListItem, +} from "#components/animated-list/animated-list.js"; +import { ClipboardCopy } from "#components/clipboard-copy/clipboard-copy.js"; +import { Button } from "#components/core/button/button.js"; +import { + Tooltip, + TooltipContent, + TooltipTrigger, +} from "#components/core/tooltip/tooltip.js"; +import { transitionAlpha } from "#lib/animation.js"; +import { cn } from "#lib/utils.js"; type Props = { className?: string; diff --git a/packages/ui/src/components/table-identifier-input/index.ts b/packages/ui/src/components/table-identifier-input/index.ts new file mode 100644 index 0000000..bd3964b --- /dev/null +++ b/packages/ui/src/components/table-identifier-input/index.ts @@ -0,0 +1 @@ +export * from "./table-identifier-input"; diff --git a/packages/ui/src/components/table-identifier-input.tsx b/packages/ui/src/components/table-identifier-input/table-identifier-input.tsx similarity index 93% rename from packages/ui/src/components/table-identifier-input.tsx rename to packages/ui/src/components/table-identifier-input/table-identifier-input.tsx index ae7945a..7cc550e 100644 --- a/packages/ui/src/components/table-identifier-input.tsx +++ b/packages/ui/src/components/table-identifier-input/table-identifier-input.tsx @@ -8,7 +8,7 @@ import { useWatch, } from "react-hook-form"; -import { Input } from "#components/ui/input.tsx"; +import { Input } from "#components/core/input/input.js"; interface RequiredFieldValues extends FieldValues { title: string; diff --git a/packages/ui/src/components/table-identifier-preview/index.ts b/packages/ui/src/components/table-identifier-preview/index.ts new file mode 100644 index 0000000..d5e5b63 --- /dev/null +++ b/packages/ui/src/components/table-identifier-preview/index.ts @@ -0,0 +1 @@ +export * from "./table-identifier-preview"; diff --git a/packages/ui/src/components/table-identifier-preview.tsx b/packages/ui/src/components/table-identifier-preview/table-identifier-preview.tsx similarity index 90% rename from packages/ui/src/components/table-identifier-preview.tsx rename to packages/ui/src/components/table-identifier-preview/table-identifier-preview.tsx index ad883ae..507598c 100644 --- a/packages/ui/src/components/table-identifier-preview.tsx +++ b/packages/ui/src/components/table-identifier-preview/table-identifier-preview.tsx @@ -8,8 +8,8 @@ import { useWatch, } from "react-hook-form"; -import { TableIdentifier } from "#components/table-identifier.tsx"; -import { FormDescription } from "#components/ui/form.tsx"; +import { FormDescription } from "#components/core/form/form.js"; +import { TableIdentifier } from "#components/table-identifier/table-identifier.js"; interface RequiredFieldValues extends FieldValues { title: string; diff --git a/packages/ui/src/components/table-identifier/index.ts b/packages/ui/src/components/table-identifier/index.ts new file mode 100644 index 0000000..767f8f8 --- /dev/null +++ b/packages/ui/src/components/table-identifier/index.ts @@ -0,0 +1 @@ +export * from "./table-identifier"; diff --git a/packages/ui/src/components/table-identifier.tsx b/packages/ui/src/components/table-identifier/table-identifier.tsx similarity index 94% rename from packages/ui/src/components/table-identifier.tsx rename to packages/ui/src/components/table-identifier/table-identifier.tsx index a203833..3ab3863 100644 --- a/packages/ui/src/components/table-identifier.tsx +++ b/packages/ui/src/components/table-identifier/table-identifier.tsx @@ -1,6 +1,6 @@ import { buildTableIdentifier } from "@manifold/lib/utils/table-identifier"; -import { cn } from "#lib/utils.ts"; +import { cn } from "#lib/utils.js"; type Props = { className?: string } & ( | { diff --git a/packages/ui/src/components/typewriter/index.ts b/packages/ui/src/components/typewriter/index.ts new file mode 100644 index 0000000..a4a6029 --- /dev/null +++ b/packages/ui/src/components/typewriter/index.ts @@ -0,0 +1 @@ +export * from "./typewriter"; diff --git a/packages/ui/src/components/typewriter.tsx b/packages/ui/src/components/typewriter/typewriter.tsx similarity index 100% rename from packages/ui/src/components/typewriter.tsx rename to packages/ui/src/components/typewriter/typewriter.tsx diff --git a/packages/ui/src/hooks/use-clipboard.ts b/packages/ui/src/hooks/use-clipboard.ts index cc91cef..b1cc1db 100644 --- a/packages/ui/src/hooks/use-clipboard.ts +++ b/packages/ui/src/hooks/use-clipboard.ts @@ -1,6 +1,6 @@ import { useCallback, useState } from "react"; -import { toast } from "#components/ui/toaster.tsx"; +import { toast } from "#components/core/toaster/toaster.js"; function fallbackCopy(text: string) { const tempTextArea = document.createElement("textarea"); diff --git a/packages/ui/src/hooks/use-singleton-toast.ts b/packages/ui/src/hooks/use-singleton-toast.ts index f4f7b23..8b8492b 100644 --- a/packages/ui/src/hooks/use-singleton-toast.ts +++ b/packages/ui/src/hooks/use-singleton-toast.ts @@ -1,6 +1,6 @@ import { useCallback, useMemo, useRef } from "react"; -import { toast } from "#components/ui/toaster.tsx"; +import { toast } from "#components/core/toaster/toaster.js"; type ToastId = string | number | undefined; diff --git a/packages/ui/tsconfig.json b/packages/ui/tsconfig.json index 382ffd3..18a8323 100644 --- a/packages/ui/tsconfig.json +++ b/packages/ui/tsconfig.json @@ -1,5 +1,14 @@ { "$schema": "https://json.schemastore.org/tsconfig", "extends": "@manifold/typescript-config/base.json", - "include": ["src"] + "include": ["src"], + "compilerOptions": { + // workaround to help VS Code TS auto-complete node subpath imports + "paths": { + "#lib/*": ["./src/lib/*.ts"], + "#hooks/*": ["./src/hooks/*.ts"], + "#components/*": ["./src/components/*/index.ts"], + "#components/core/*": ["./src/components/core/*/index.ts"] + } + } }