Skip to content

Commit

Permalink
Update ui package exports, move components to individual folders
Browse files Browse the repository at this point in the history
- prepares for adding stories files and new component generators
  • Loading branch information
solomonhawk committed Nov 21, 2024
1 parent 5246c06 commit 3345218
Show file tree
Hide file tree
Showing 138 changed files with 292 additions and 231 deletions.
4 changes: 2 additions & 2 deletions apps/web/src/app.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
14 changes: 9 additions & 5 deletions apps/web/src/features/dashboard/components/table-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/features/dashboard/pages/root/page.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/features/engine/components/editor/index.tsx
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions apps/web/src/features/landing/pages/root/page.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/features/made-with/pages/root/page.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { getRandomElement } from "@manifold/lib/utils/array";
import { TableIdentifier } from "@manifold/ui/components/table-identifier";
import {
Form,
FormControl,
Expand All @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/features/routing/components/launcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions apps/web/src/features/routing/pages/root/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
8 changes: 4 additions & 4 deletions apps/web/src/features/routing/pages/root/layout.tsx
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/features/routing/pages/root/not-found.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
Loading

0 comments on commit 3345218

Please sign in to comment.