refactor(ui): use relative internal imports
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { ChevronDownIcon, ChevronUpIcon } from "@workspace/ui/components/icon"
|
||||
import { cn } from "../lib/utils"
|
||||
import { ChevronDownIcon, ChevronUpIcon } from "./icon"
|
||||
|
||||
function Accordion({ className, ...props }: AccordionPrimitive.Root.Props) {
|
||||
return (
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import * as React from "react"
|
||||
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { Button } from "@workspace/ui/components/button"
|
||||
import { cn } from "../lib/utils"
|
||||
import { Button } from "./button"
|
||||
|
||||
function AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {
|
||||
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from "react"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
const alertVariants = cva(
|
||||
"group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-start text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pe-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
|
||||
|
||||
@@ -4,7 +4,7 @@ import * as React from "react"
|
||||
import { useRender } from "@base-ui/react/use-render"
|
||||
import { useMergedRefs } from "@base-ui/utils/useMergedRefs"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
const QUARTER_CIRCLE_BEZIER = 0.5522847498
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function AspectRatio({
|
||||
ratio,
|
||||
|
||||
@@ -3,8 +3,8 @@ import { mergeProps } from "@base-ui/react/merge-props"
|
||||
import { useRender } from "@base-ui/react/use-render"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { Button } from "@workspace/ui/components/button"
|
||||
import { cn } from "../lib/utils"
|
||||
import { Button } from "./button"
|
||||
|
||||
const attachmentVariants = cva(
|
||||
"group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from "react"
|
||||
import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function Avatar({
|
||||
className,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { mergeProps } from "@base-ui/react/merge-props"
|
||||
import { useRender } from "@base-ui/react/use-render"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
const badgeVariants = cva(
|
||||
"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
|
||||
|
||||
@@ -2,11 +2,8 @@ import * as React from "react"
|
||||
import { mergeProps } from "@base-ui/react/merge-props"
|
||||
import { useRender } from "@base-ui/react/use-render"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import {
|
||||
ChevronRightIcon,
|
||||
MoreHorizontalIcon,
|
||||
} from "@workspace/ui/components/icon"
|
||||
import { cn } from "../lib/utils"
|
||||
import { ChevronRightIcon, MoreHorizontalIcon } from "./icon"
|
||||
import { LocalizedText, uiMessages, useMessage } from "./i18n"
|
||||
|
||||
function Breadcrumb({
|
||||
@@ -57,9 +54,7 @@ function BreadcrumbLink({
|
||||
return useRender({
|
||||
defaultTagName: "a",
|
||||
props: mergeProps<"a">(
|
||||
{
|
||||
className: cn("transition-colors hover:text-foreground", className),
|
||||
},
|
||||
{ className: cn("transition-colors hover:text-foreground", className) },
|
||||
props
|
||||
),
|
||||
render,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { mergeProps } from "@base-ui/react/merge-props"
|
||||
import { useRender } from "@base-ui/react/use-render"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function BubbleGroup({ className, ...props }: React.ComponentProps<"div">) {
|
||||
return (
|
||||
|
||||
@@ -2,8 +2,8 @@ import { mergeProps } from "@base-ui/react/merge-props"
|
||||
import { useRender } from "@base-ui/react/use-render"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { Separator } from "@workspace/ui/components/separator"
|
||||
import { cn } from "../lib/utils"
|
||||
import { Separator } from "./separator"
|
||||
|
||||
const buttonGroupVariants = cva(
|
||||
"flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-e-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Button as ButtonPrimitive } from "@base-ui/react/button"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
import { useRippleRef } from "@workspace/ui/hooks/use-ripple"
|
||||
|
||||
const buttonVariants = cva(
|
||||
|
||||
@@ -7,14 +7,10 @@ import {
|
||||
type DayButton,
|
||||
} from "react-day-picker"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { Button, buttonVariants } from "@workspace/ui/components/button"
|
||||
import { useCalendarLocale, useLocale } from "@workspace/ui/components/i18n"
|
||||
import {
|
||||
ChevronLeftIcon,
|
||||
ChevronRightIcon,
|
||||
ChevronDownIcon,
|
||||
} from "@workspace/ui/components/icon"
|
||||
import { cn } from "../lib/utils"
|
||||
import { Button, buttonVariants } from "./button"
|
||||
import { useCalendarLocale, useLocale } from "./i18n"
|
||||
import { ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon } from "./icon"
|
||||
|
||||
type CalendarComponents = NonNullable<
|
||||
React.ComponentProps<typeof DayPicker>["components"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function Card({
|
||||
className,
|
||||
|
||||
@@ -3,12 +3,9 @@ import useEmblaCarousel, {
|
||||
type UseEmblaCarouselType,
|
||||
} from "embla-carousel-react"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { Button } from "@workspace/ui/components/button"
|
||||
import {
|
||||
ChevronLeftIcon,
|
||||
ChevronRightIcon,
|
||||
} from "@workspace/ui/components/icon"
|
||||
import { cn } from "../lib/utils"
|
||||
import { Button } from "./button"
|
||||
import { ChevronLeftIcon, ChevronRightIcon } from "./icon"
|
||||
import { LocalizedText, uiMessages } from "./i18n"
|
||||
|
||||
type CarouselApi = UseEmblaCarouselType[1]
|
||||
|
||||
@@ -4,7 +4,7 @@ import * as React from "react"
|
||||
import * as RechartsPrimitive from "recharts"
|
||||
import type { TooltipValueType } from "recharts"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
// Format: { THEME_NAME: CSS_SELECTOR }
|
||||
const THEMES = { light: "", dark: ".dark" } as const
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { CheckIcon } from "@workspace/ui/components/icon"
|
||||
import { cn } from "../lib/utils"
|
||||
import { CheckIcon } from "./icon"
|
||||
|
||||
function Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {
|
||||
return (
|
||||
|
||||
@@ -3,19 +3,15 @@
|
||||
import * as React from "react"
|
||||
import { Combobox as ComboboxPrimitive } from "@base-ui/react"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { Button } from "@workspace/ui/components/button"
|
||||
import { cn } from "../lib/utils"
|
||||
import { Button } from "./button"
|
||||
import {
|
||||
InputGroup,
|
||||
InputGroupAddon,
|
||||
InputGroupButton,
|
||||
InputGroupInput,
|
||||
} from "@workspace/ui/components/input-group"
|
||||
import {
|
||||
ChevronDownIcon,
|
||||
XIcon,
|
||||
CheckIcon,
|
||||
} from "@workspace/ui/components/icon"
|
||||
} from "./input-group"
|
||||
import { ChevronDownIcon, XIcon, CheckIcon } from "./icon"
|
||||
|
||||
const Combobox = ComboboxPrimitive.Root
|
||||
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
import * as React from "react"
|
||||
import { Command as CommandPrimitive } from "cmdk"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogDescription,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from "@workspace/ui/components/dialog"
|
||||
import {
|
||||
InputGroup,
|
||||
InputGroupAddon,
|
||||
} from "@workspace/ui/components/input-group"
|
||||
import { SearchIcon, CheckIcon } from "@workspace/ui/components/icon"
|
||||
} from "./dialog"
|
||||
import { InputGroup, InputGroupAddon } from "./input-group"
|
||||
import { SearchIcon, CheckIcon } from "./icon"
|
||||
|
||||
function Command({
|
||||
className,
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
import * as React from "react"
|
||||
import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { ChevronRightIcon, CheckIcon } from "@workspace/ui/components/icon"
|
||||
import { cn } from "../lib/utils"
|
||||
import { ChevronRightIcon, CheckIcon } from "./icon"
|
||||
|
||||
function ContextMenu({ ...props }: ContextMenuPrimitive.Root.Props) {
|
||||
return <ContextMenuPrimitive.Root data-slot="context-menu" {...props} />
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
import * as React from "react"
|
||||
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { Button } from "@workspace/ui/components/button"
|
||||
import { XIcon } from "@workspace/ui/components/icon"
|
||||
import { cn } from "../lib/utils"
|
||||
import { Button } from "./button"
|
||||
import { XIcon } from "./icon"
|
||||
import { LocalizedText, uiMessages } from "./i18n"
|
||||
|
||||
type DialogHandle<Payload> = DialogPrimitive.Handle<Payload>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import * as React from "react"
|
||||
import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
type DrawerContextProps = {
|
||||
hasSnapPoints: boolean
|
||||
|
||||
@@ -7,9 +7,9 @@ import {
|
||||
AnchoredSurfaceArrow,
|
||||
type AnchoredSurfaceProps,
|
||||
getAnchoredSurfaceSideOffset,
|
||||
} from "@workspace/ui/components/anchored-surface"
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { ChevronRightIcon, CheckIcon } from "@workspace/ui/components/icon"
|
||||
} from "./anchored-surface"
|
||||
import { cn } from "../lib/utils"
|
||||
import { ChevronRightIcon, CheckIcon } from "./icon"
|
||||
import { useRippleRef } from "../hooks/use-ripple"
|
||||
|
||||
function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function Empty({ className, ...props }: React.ComponentProps<"div">) {
|
||||
return (
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
import { useMemo } from "react"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { Label } from "@workspace/ui/components/label"
|
||||
import { Separator } from "@workspace/ui/components/separator"
|
||||
import { cn } from "../lib/utils"
|
||||
import { Label } from "./label"
|
||||
import { Separator } from "./separator"
|
||||
|
||||
function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">) {
|
||||
return (
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function HoverCard({ ...props }: PreviewCardPrimitive.Root.Props) {
|
||||
return <PreviewCardPrimitive.Root data-slot="hover-card" {...props} />
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import * as React from "react"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { Button } from "@workspace/ui/components/button"
|
||||
import { Input } from "@workspace/ui/components/input"
|
||||
import { Textarea } from "@workspace/ui/components/textarea"
|
||||
import { cn } from "../lib/utils"
|
||||
import { Button } from "./button"
|
||||
import { Input } from "./input"
|
||||
import { Textarea } from "./textarea"
|
||||
|
||||
function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
|
||||
return (
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import * as React from "react"
|
||||
import { OTPInput, OTPInputContext } from "input-otp"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { MinusIcon } from "@workspace/ui/components/icon"
|
||||
import { cn } from "../lib/utils"
|
||||
import { MinusIcon } from "./icon"
|
||||
|
||||
function InputOTP({
|
||||
className,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from "react"
|
||||
import { Input as InputPrimitive } from "@base-ui/react/input"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
||||
return (
|
||||
|
||||
@@ -3,8 +3,8 @@ import { mergeProps } from "@base-ui/react/merge-props"
|
||||
import { useRender } from "@base-ui/react/use-render"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { Separator } from "@workspace/ui/components/separator"
|
||||
import { cn } from "../lib/utils"
|
||||
import { Separator } from "./separator"
|
||||
|
||||
function ItemGroup({ className, ...props }: React.ComponentProps<"div">) {
|
||||
return (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function Kbd({ className, ...props }: React.ComponentProps<"kbd">) {
|
||||
return (
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function Label({ className, ...props }: React.ComponentProps<"label">) {
|
||||
return (
|
||||
|
||||
@@ -3,7 +3,7 @@ import { mergeProps } from "@base-ui/react/merge-props"
|
||||
import { useRender } from "@base-ui/react/use-render"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
const markerVariants = cva(
|
||||
"group/marker relative flex min-h-4 w-full items-center gap-2 text-start text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground",
|
||||
@@ -28,9 +28,7 @@ function Marker({
|
||||
return useRender({
|
||||
defaultTagName: "div",
|
||||
props: mergeProps<"div">(
|
||||
{
|
||||
className: cn(markerVariants({ variant, className })),
|
||||
},
|
||||
{ className: cn(markerVariants({ variant, className })) },
|
||||
props
|
||||
),
|
||||
render,
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as React from "react"
|
||||
import { Menu as MenuPrimitive } from "@base-ui/react/menu"
|
||||
import { Menubar as MenubarPrimitive } from "@base-ui/react/menubar"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
@@ -17,8 +17,8 @@ import {
|
||||
DropdownMenuSubContent,
|
||||
DropdownMenuSubTrigger,
|
||||
DropdownMenuTrigger,
|
||||
} from "@workspace/ui/components/dropdown-menu"
|
||||
import { CheckIcon } from "@workspace/ui/components/icon"
|
||||
} from "./dropdown-menu"
|
||||
import { CheckIcon } from "./icon"
|
||||
|
||||
function Menubar({ className, ...props }: MenubarPrimitive.Props) {
|
||||
return (
|
||||
|
||||
@@ -6,9 +6,9 @@ import {
|
||||
useMessageScrollerVisibility,
|
||||
} from "@shadcn/react/message-scroller"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { Button } from "@workspace/ui/components/button"
|
||||
import { ArrowDownIcon } from "@workspace/ui/components/icon"
|
||||
import { cn } from "../lib/utils"
|
||||
import { Button } from "./button"
|
||||
import { ArrowDownIcon } from "./icon"
|
||||
|
||||
function MessageScrollerProvider(
|
||||
props: React.ComponentProps<typeof MessageScrollerPrimitive.Provider>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function MessageGroup({ className, ...props }: React.ComponentProps<"div">) {
|
||||
return (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { ChevronDownIcon } from "@workspace/ui/components/icon"
|
||||
import { cn } from "../lib/utils"
|
||||
import { ChevronDownIcon } from "./icon"
|
||||
|
||||
type NativeSelectProps = Omit<React.ComponentProps<"select">, "size"> & {
|
||||
size?: "sm" | "default"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { NavigationMenu as NavigationMenuPrimitive } from "@base-ui/react/navigation-menu"
|
||||
import { cva } from "class-variance-authority"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { ChevronDownIcon } from "@workspace/ui/components/icon"
|
||||
import { cn } from "../lib/utils"
|
||||
import { ChevronDownIcon } from "./icon"
|
||||
|
||||
function NavigationMenu({
|
||||
align = "start",
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { Button } from "@workspace/ui/components/button"
|
||||
import {
|
||||
ChevronLeftIcon,
|
||||
ChevronRightIcon,
|
||||
MoreHorizontalIcon,
|
||||
} from "@workspace/ui/components/icon"
|
||||
import { cn } from "../lib/utils"
|
||||
import { Button } from "./button"
|
||||
import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "./icon"
|
||||
import { LocalizedText, uiMessages, useMessage } from "./i18n"
|
||||
|
||||
function Pagination({
|
||||
|
||||
@@ -7,8 +7,8 @@ import {
|
||||
AnchoredSurfaceArrow,
|
||||
type AnchoredSurfaceProps,
|
||||
getAnchoredSurfaceSideOffset,
|
||||
} from "@workspace/ui/components/anchored-surface"
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
} from "./anchored-surface"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
type PopoverHandle<Payload> = PopoverPrimitive.Handle<Payload>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { Progress as ProgressPrimitive } from "@base-ui/react/progress"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function Progress({
|
||||
className,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Radio as RadioPrimitive } from "@base-ui/react/radio"
|
||||
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function RadioGroup({ className, ...props }: RadioGroupPrimitive.Props) {
|
||||
return (
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import * as ResizablePrimitive from "react-resizable-panels"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function ResizablePanelGroup({
|
||||
className,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function ScrollArea({
|
||||
className,
|
||||
|
||||
@@ -3,12 +3,8 @@
|
||||
import * as React from "react"
|
||||
import { Select as SelectPrimitive } from "@base-ui/react/select"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import {
|
||||
ChevronDownIcon,
|
||||
CheckIcon,
|
||||
ChevronUpIcon,
|
||||
} from "@workspace/ui/components/icon"
|
||||
import { cn } from "../lib/utils"
|
||||
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "./icon"
|
||||
|
||||
const Select = SelectPrimitive.Root
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function Separator({
|
||||
className,
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
import * as React from "react"
|
||||
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { Button } from "@workspace/ui/components/button"
|
||||
import { XIcon } from "@workspace/ui/components/icon"
|
||||
import { cn } from "../lib/utils"
|
||||
import { Button } from "./button"
|
||||
import { XIcon } from "./icon"
|
||||
import { LocalizedText, uiMessages } from "./i18n"
|
||||
|
||||
function createSheetHandle<Payload>(): SheetPrimitive.Handle<Payload> {
|
||||
|
||||
@@ -4,24 +4,20 @@ import { useRender } from "@base-ui/react/use-render"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
|
||||
import { useIsMobile } from "@workspace/ui/hooks/use-mobile"
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { Button } from "@workspace/ui/components/button"
|
||||
import { Input } from "@workspace/ui/components/input"
|
||||
import { Separator } from "@workspace/ui/components/separator"
|
||||
import { cn } from "../lib/utils"
|
||||
import { Button } from "./button"
|
||||
import { Input } from "./input"
|
||||
import { Separator } from "./separator"
|
||||
import {
|
||||
Sheet,
|
||||
SheetContent,
|
||||
SheetDescription,
|
||||
SheetHeader,
|
||||
SheetTitle,
|
||||
} from "@workspace/ui/components/sheet"
|
||||
import { Skeleton } from "@workspace/ui/components/skeleton"
|
||||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
TooltipTrigger,
|
||||
} from "@workspace/ui/components/tooltip"
|
||||
import { PanelLeftIcon } from "@workspace/ui/components/icon"
|
||||
} from "./sheet"
|
||||
import { Skeleton } from "./skeleton"
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip"
|
||||
import { PanelLeftIcon } from "./icon"
|
||||
import { LocalizedText, uiMessages, useMessage } from "./i18n"
|
||||
|
||||
const SIDEBAR_COOKIE_NAME = "sidebar_state"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Slider as SliderPrimitive } from "@base-ui/react/slider"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function Slider({
|
||||
className,
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import {
|
||||
Loader2Icon,
|
||||
type IconComponentProps,
|
||||
} from "@workspace/ui/components/icon"
|
||||
import { cn } from "../lib/utils"
|
||||
import { Loader2Icon, type IconComponentProps } from "./icon"
|
||||
import { uiMessages, useMessage } from "./i18n"
|
||||
|
||||
function Spinner({ className, ...props }: IconComponentProps) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { Switch as SwitchPrimitive } from "@base-ui/react/switch"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function Switch({
|
||||
className,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function Table({ className, ...props }: React.ComponentProps<"table">) {
|
||||
return (
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { Tabs as TabsPrimitive } from "@base-ui/react/tabs"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function Tabs({
|
||||
className,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
|
||||
return (
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import * as React from "react"
|
||||
import { Toast as ToastPrimitive } from "@base-ui/react/toast"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { Button } from "@workspace/ui/components/button"
|
||||
import { cn } from "../lib/utils"
|
||||
import { Button } from "./button"
|
||||
import {
|
||||
XIcon,
|
||||
CircleCheckIcon,
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
TriangleAlertIcon,
|
||||
OctagonXIcon,
|
||||
Loader2Icon,
|
||||
} from "@workspace/ui/components/icon"
|
||||
} from "./icon"
|
||||
import { uiMessages, useMessage } from "./i18n"
|
||||
|
||||
const toast = ToastPrimitive.createToastManager()
|
||||
|
||||
@@ -5,8 +5,8 @@ import { Toggle as TogglePrimitive } from "@base-ui/react/toggle"
|
||||
import { ToggleGroup as ToggleGroupPrimitive } from "@base-ui/react/toggle-group"
|
||||
import { type VariantProps } from "class-variance-authority"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { toggleVariants } from "@workspace/ui/components/toggle"
|
||||
import { cn } from "../lib/utils"
|
||||
import { toggleVariants } from "./toggle"
|
||||
|
||||
const ToggleGroupContext = React.createContext<
|
||||
VariantProps<typeof toggleVariants> & {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Toggle as TogglePrimitive } from "@base-ui/react/toggle"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
const toggleVariants = cva(
|
||||
"group/toggle inline-flex items-center justify-center gap-1 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
||||
|
||||
@@ -8,8 +8,8 @@ import {
|
||||
AnchoredSurfaceArrow,
|
||||
type AnchoredSurfaceProps,
|
||||
getAnchoredSurfaceSideOffset,
|
||||
} from "@workspace/ui/components/anchored-surface"
|
||||
import { cn } from "@workspace/ui/lib/utils"
|
||||
} from "./anchored-surface"
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
function TooltipProvider({
|
||||
delay = 0,
|
||||
|
||||
Reference in New Issue
Block a user