@vendure-io/ui 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/package.json +2 -2
  2. package/src/components/ui/accordion.tsx +1 -1
  3. package/src/components/ui/alert-dialog.tsx +2 -2
  4. package/src/components/ui/alert.tsx +1 -1
  5. package/src/components/ui/aspect-ratio.tsx +1 -1
  6. package/src/components/ui/avatar.tsx +1 -1
  7. package/src/components/ui/badge.tsx +1 -1
  8. package/src/components/ui/breadcrumb.tsx +1 -1
  9. package/src/components/ui/button-group.tsx +2 -2
  10. package/src/components/ui/button.tsx +1 -1
  11. package/src/components/ui/calendar.tsx +2 -2
  12. package/src/components/ui/card.tsx +1 -1
  13. package/src/components/ui/carousel.tsx +2 -2
  14. package/src/components/ui/chart.tsx +1 -1
  15. package/src/components/ui/checkbox.tsx +1 -1
  16. package/src/components/ui/combobox.tsx +3 -3
  17. package/src/components/ui/command.tsx +3 -3
  18. package/src/components/ui/context-menu.tsx +1 -1
  19. package/src/components/ui/dialog.tsx +2 -2
  20. package/src/components/ui/drawer.tsx +1 -1
  21. package/src/components/ui/dropdown-menu.tsx +1 -1
  22. package/src/components/ui/empty.tsx +1 -1
  23. package/src/components/ui/field.tsx +3 -3
  24. package/src/components/ui/hover-card.tsx +1 -1
  25. package/src/components/ui/input-group.tsx +4 -4
  26. package/src/components/ui/input-otp.tsx +1 -1
  27. package/src/components/ui/input.tsx +1 -1
  28. package/src/components/ui/item.tsx +2 -2
  29. package/src/components/ui/kbd.tsx +1 -1
  30. package/src/components/ui/label.tsx +1 -1
  31. package/src/components/ui/menubar.tsx +2 -2
  32. package/src/components/ui/native-select.tsx +1 -1
  33. package/src/components/ui/navigation-menu.tsx +1 -1
  34. package/src/components/ui/pagination.tsx +2 -2
  35. package/src/components/ui/popover.tsx +1 -1
  36. package/src/components/ui/progress.tsx +1 -1
  37. package/src/components/ui/radio-group.tsx +1 -1
  38. package/src/components/ui/resizable.tsx +1 -1
  39. package/src/components/ui/scroll-area.tsx +1 -1
  40. package/src/components/ui/select.tsx +1 -1
  41. package/src/components/ui/separator.tsx +1 -1
  42. package/src/components/ui/sheet.tsx +2 -2
  43. package/src/components/ui/sidebar.tsx +10 -10
  44. package/src/components/ui/skeleton.tsx +1 -1
  45. package/src/components/ui/slider.tsx +1 -1
  46. package/src/components/ui/sonner.tsx +4 -0
  47. package/src/components/ui/spinner.tsx +1 -1
  48. package/src/components/ui/switch.tsx +1 -1
  49. package/src/components/ui/table.tsx +1 -1
  50. package/src/components/ui/tabs.tsx +1 -1
  51. package/src/components/ui/textarea.tsx +1 -1
  52. package/src/components/ui/toggle-group.tsx +2 -2
  53. package/src/components/ui/toggle.tsx +1 -1
  54. package/src/components/ui/tooltip.tsx +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendure-io/ui",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "React component library for Vendure, built on shadcn/ui and Tailwind v4",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "homepage": "https://github.com/vendurehq/design/tree/main/packages/ui",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@base-ui/react": "^1.2.0",
47
- "@vendure-io/design-tokens": "^1.0.1",
47
+ "@vendure-io/design-tokens": "^1.1.0",
48
48
  "class-variance-authority": "^0.7.1",
49
49
  "clsx": "^2.1.1",
50
50
  "cmdk": "^1.1.1",
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion"
4
4
 
5
- import { cn } from "@/lib/utils"
5
+ import { cn } from "@vendure-io/ui/lib/utils"
6
6
  import { ChevronDownIcon, ChevronUpIcon } from "lucide-react"
7
7
 
8
8
  function Accordion({ className, ...props }: AccordionPrimitive.Root.Props) {
@@ -3,8 +3,8 @@
3
3
  import * as React from "react"
4
4
  import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog"
5
5
 
6
- import { cn } from "@/lib/utils"
7
- import { Button } from "@/components/ui/button"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
+ import { Button } from "@vendure-io/ui/components/ui/button"
8
8
 
9
9
  function AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {
10
10
  return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />
@@ -1,7 +1,7 @@
1
1
  import * as React from "react"
2
2
  import { cva, type VariantProps } from "class-variance-authority"
3
3
 
4
- import { cn } from "@/lib/utils"
4
+ import { cn } from "@vendure-io/ui/lib/utils"
5
5
 
6
6
  const alertVariants = cva(
7
7
  "grid gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-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 w-full relative group/alert",
@@ -1,4 +1,4 @@
1
- import { cn } from "@/lib/utils"
1
+ import { cn } from "@vendure-io/ui/lib/utils"
2
2
 
3
3
  function AspectRatio({
4
4
  ratio,
@@ -3,7 +3,7 @@
3
3
  import * as React from "react"
4
4
  import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar"
5
5
 
6
- import { cn } from "@/lib/utils"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
7
 
8
8
  function Avatar({
9
9
  className,
@@ -2,7 +2,7 @@ import { mergeProps } from "@base-ui/react/merge-props"
2
2
  import { useRender } from "@base-ui/react/use-render"
3
3
  import { cva, type VariantProps } from "class-variance-authority"
4
4
 
5
- import { cn } from "@/lib/utils"
5
+ import { cn } from "@vendure-io/ui/lib/utils"
6
6
 
7
7
  const badgeVariants = cva(
8
8
  "h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! inline-flex items-center justify-center w-fit whitespace-nowrap shrink-0 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive overflow-hidden group/badge",
@@ -2,7 +2,7 @@ import * as React from "react"
2
2
  import { mergeProps } from "@base-ui/react/merge-props"
3
3
  import { useRender } from "@base-ui/react/use-render"
4
4
 
5
- import { cn } from "@/lib/utils"
5
+ import { cn } from "@vendure-io/ui/lib/utils"
6
6
  import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react"
7
7
 
8
8
  function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">) {
@@ -2,8 +2,8 @@ import { mergeProps } from "@base-ui/react/merge-props"
2
2
  import { useRender } from "@base-ui/react/use-render"
3
3
  import { cva, type VariantProps } from "class-variance-authority"
4
4
 
5
- import { cn } from "@/lib/utils"
6
- import { Separator } from "@/components/ui/separator"
5
+ import { cn } from "@vendure-io/ui/lib/utils"
6
+ import { Separator } from "@vendure-io/ui/components/ui/separator"
7
7
 
8
8
  const buttonGroupVariants = cva(
9
9
  "has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md flex w-fit items-stretch *:focus-visible:z-10 *:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
@@ -3,7 +3,7 @@
3
3
  import { Button as ButtonPrimitive } from "@base-ui/react/button"
4
4
  import { cva, type VariantProps } from "class-variance-authority"
5
5
 
6
- import { cn } from "@/lib/utils"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
7
 
8
8
  const buttonVariants = cva(
9
9
  "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",
@@ -8,8 +8,8 @@ import {
8
8
  type Locale,
9
9
  } from "react-day-picker"
10
10
 
11
- import { cn } from "@/lib/utils"
12
- import { Button, buttonVariants } from "@/components/ui/button"
11
+ import { cn } from "@vendure-io/ui/lib/utils"
12
+ import { Button, buttonVariants } from "@vendure-io/ui/components/ui/button"
13
13
  import { ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon } from "lucide-react"
14
14
 
15
15
  function Calendar({
@@ -1,6 +1,6 @@
1
1
  import * as React from "react"
2
2
 
3
- import { cn } from "@/lib/utils"
3
+ import { cn } from "@vendure-io/ui/lib/utils"
4
4
 
5
5
  function Card({
6
6
  className,
@@ -5,8 +5,8 @@ import useEmblaCarousel, {
5
5
  type UseEmblaCarouselType,
6
6
  } from "embla-carousel-react"
7
7
 
8
- import { cn } from "@/lib/utils"
9
- import { Button } from "@/components/ui/button"
8
+ import { cn } from "@vendure-io/ui/lib/utils"
9
+ import { Button } from "@vendure-io/ui/components/ui/button"
10
10
  import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react"
11
11
 
12
12
  type CarouselApi = UseEmblaCarouselType[1]
@@ -3,7 +3,7 @@
3
3
  import * as React from "react"
4
4
  import * as RechartsPrimitive from "recharts"
5
5
 
6
- import { cn } from "@/lib/utils"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
7
 
8
8
  // Format: { THEME_NAME: CSS_SELECTOR }
9
9
  const THEMES = { light: "", dark: ".dark" } as const
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox"
4
4
 
5
- import { cn } from "@/lib/utils"
5
+ import { cn } from "@vendure-io/ui/lib/utils"
6
6
  import { CheckIcon } from "lucide-react"
7
7
 
8
8
  function Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {
@@ -3,14 +3,14 @@
3
3
  import * as React from "react"
4
4
  import { Combobox as ComboboxPrimitive } from "@base-ui/react"
5
5
 
6
- import { cn } from "@/lib/utils"
7
- import { Button } from "@/components/ui/button"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
+ import { Button } from "@vendure-io/ui/components/ui/button"
8
8
  import {
9
9
  InputGroup,
10
10
  InputGroupAddon,
11
11
  InputGroupButton,
12
12
  InputGroupInput,
13
- } from "@/components/ui/input-group"
13
+ } from "@vendure-io/ui/components/ui/input-group"
14
14
  import { ChevronDownIcon, XIcon, CheckIcon } from "lucide-react"
15
15
 
16
16
  const Combobox = ComboboxPrimitive.Root
@@ -3,18 +3,18 @@
3
3
  import * as React from "react"
4
4
  import { Command as CommandPrimitive } from "cmdk"
5
5
 
6
- import { cn } from "@/lib/utils"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
7
  import {
8
8
  Dialog,
9
9
  DialogContent,
10
10
  DialogDescription,
11
11
  DialogHeader,
12
12
  DialogTitle,
13
- } from "@/components/ui/dialog"
13
+ } from "@vendure-io/ui/components/ui/dialog"
14
14
  import {
15
15
  InputGroup,
16
16
  InputGroupAddon,
17
- } from "@/components/ui/input-group"
17
+ } from "@vendure-io/ui/components/ui/input-group"
18
18
  import { SearchIcon, CheckIcon } from "lucide-react"
19
19
 
20
20
  function Command({
@@ -3,7 +3,7 @@
3
3
  import * as React from "react"
4
4
  import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu"
5
5
 
6
- import { cn } from "@/lib/utils"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
7
  import { ChevronRightIcon, CheckIcon } from "lucide-react"
8
8
 
9
9
  function ContextMenu({ ...props }: ContextMenuPrimitive.Root.Props) {
@@ -3,8 +3,8 @@
3
3
  import * as React from "react"
4
4
  import { Dialog as DialogPrimitive } from "@base-ui/react/dialog"
5
5
 
6
- import { cn } from "@/lib/utils"
7
- import { Button } from "@/components/ui/button"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
+ import { Button } from "@vendure-io/ui/components/ui/button"
8
8
  import { XIcon } from "lucide-react"
9
9
 
10
10
  function Dialog({ ...props }: DialogPrimitive.Root.Props) {
@@ -3,7 +3,7 @@
3
3
  import * as React from "react"
4
4
  import { Drawer as DrawerPrimitive } from "vaul"
5
5
 
6
- import { cn } from "@/lib/utils"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
7
 
8
8
  function Drawer({
9
9
  ...props
@@ -3,7 +3,7 @@
3
3
  import * as React from "react"
4
4
  import { Menu as MenuPrimitive } from "@base-ui/react/menu"
5
5
 
6
- import { cn } from "@/lib/utils"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
7
  import { ChevronRightIcon, CheckIcon } from "lucide-react"
8
8
 
9
9
  function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {
@@ -1,6 +1,6 @@
1
1
  import { cva, type VariantProps } from "class-variance-authority"
2
2
 
3
- import { cn } from "@/lib/utils"
3
+ import { cn } from "@vendure-io/ui/lib/utils"
4
4
 
5
5
  function Empty({ className, ...props }: React.ComponentProps<"div">) {
6
6
  return (
@@ -3,9 +3,9 @@
3
3
  import { useMemo } from "react"
4
4
  import { cva, type VariantProps } from "class-variance-authority"
5
5
 
6
- import { cn } from "@/lib/utils"
7
- import { Label } from "@/components/ui/label"
8
- import { Separator } from "@/components/ui/separator"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
+ import { Label } from "@vendure-io/ui/components/ui/label"
8
+ import { Separator } from "@vendure-io/ui/components/ui/separator"
9
9
 
10
10
  function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">) {
11
11
  return (
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card"
4
4
 
5
- import { cn } from "@/lib/utils"
5
+ import { cn } from "@vendure-io/ui/lib/utils"
6
6
 
7
7
  function HoverCard({ ...props }: PreviewCardPrimitive.Root.Props) {
8
8
  return <PreviewCardPrimitive.Root data-slot="hover-card" {...props} />
@@ -3,10 +3,10 @@
3
3
  import * as React from "react"
4
4
  import { cva, type VariantProps } from "class-variance-authority"
5
5
 
6
- import { cn } from "@/lib/utils"
7
- import { Button } from "@/components/ui/button"
8
- import { Input } from "@/components/ui/input"
9
- import { Textarea } from "@/components/ui/textarea"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
+ import { Button } from "@vendure-io/ui/components/ui/button"
8
+ import { Input } from "@vendure-io/ui/components/ui/input"
9
+ import { Textarea } from "@vendure-io/ui/components/ui/textarea"
10
10
 
11
11
  function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
12
12
  return (
@@ -3,7 +3,7 @@
3
3
  import * as React from "react"
4
4
  import { OTPInput, OTPInputContext } from "input-otp"
5
5
 
6
- import { cn } from "@/lib/utils"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
7
  import { MinusIcon } from "lucide-react"
8
8
 
9
9
  function InputOTP({
@@ -1,7 +1,7 @@
1
1
  import * as React from "react"
2
2
  import { Input as InputPrimitive } from "@base-ui/react/input"
3
3
 
4
- import { cn } from "@/lib/utils"
4
+ import { cn } from "@vendure-io/ui/lib/utils"
5
5
 
6
6
  function Input({ className, type, ...props }: React.ComponentProps<"input">) {
7
7
  return (
@@ -3,8 +3,8 @@ import { mergeProps } from "@base-ui/react/merge-props"
3
3
  import { useRender } from "@base-ui/react/use-render"
4
4
  import { cva, type VariantProps } from "class-variance-authority"
5
5
 
6
- import { cn } from "@/lib/utils"
7
- import { Separator } from "@/components/ui/separator"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
+ import { Separator } from "@vendure-io/ui/components/ui/separator"
8
8
 
9
9
  function ItemGroup({ className, ...props }: React.ComponentProps<"div">) {
10
10
  return (
@@ -1,4 +1,4 @@
1
- import { cn } from "@/lib/utils"
1
+ import { cn } from "@vendure-io/ui/lib/utils"
2
2
 
3
3
  function Kbd({ className, ...props }: React.ComponentProps<"kbd">) {
4
4
  return (
@@ -2,7 +2,7 @@
2
2
 
3
3
  import * as React from "react"
4
4
 
5
- import { cn } from "@/lib/utils"
5
+ import { cn } from "@vendure-io/ui/lib/utils"
6
6
 
7
7
  function Label({ className, ...props }: React.ComponentProps<"label">) {
8
8
  return (
@@ -4,7 +4,7 @@ import * as React from "react"
4
4
  import { Menu as MenuPrimitive } from "@base-ui/react/menu"
5
5
  import { Menubar as MenubarPrimitive } from "@base-ui/react/menubar"
6
6
 
7
- import { cn } from "@/lib/utils"
7
+ import { cn } from "@vendure-io/ui/lib/utils"
8
8
  import {
9
9
  DropdownMenu,
10
10
  DropdownMenuContent,
@@ -19,7 +19,7 @@ import {
19
19
  DropdownMenuSubContent,
20
20
  DropdownMenuSubTrigger,
21
21
  DropdownMenuTrigger,
22
- } from "@/components/ui/dropdown-menu"
22
+ } from "@vendure-io/ui/components/ui/dropdown-menu"
23
23
  import { CheckIcon } from "lucide-react"
24
24
 
25
25
  function Menubar({ className, ...props }: MenubarPrimitive.Props) {
@@ -1,6 +1,6 @@
1
1
  import * as React from "react"
2
2
 
3
- import { cn } from "@/lib/utils"
3
+ import { cn } from "@vendure-io/ui/lib/utils"
4
4
  import { ChevronDownIcon } from "lucide-react"
5
5
 
6
6
  type NativeSelectProps = Omit<React.ComponentProps<"select">, "size"> & {
@@ -1,7 +1,7 @@
1
1
  import { NavigationMenu as NavigationMenuPrimitive } from "@base-ui/react/navigation-menu"
2
2
  import { cva } from "class-variance-authority"
3
3
 
4
- import { cn } from "@/lib/utils"
4
+ import { cn } from "@vendure-io/ui/lib/utils"
5
5
  import { ChevronDownIcon } from "lucide-react"
6
6
 
7
7
  function NavigationMenu({
@@ -1,7 +1,7 @@
1
1
  import * as React from "react"
2
2
 
3
- import { cn } from "@/lib/utils"
4
- import { Button } from "@/components/ui/button"
3
+ import { cn } from "@vendure-io/ui/lib/utils"
4
+ import { Button } from "@vendure-io/ui/components/ui/button"
5
5
  import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react"
6
6
 
7
7
  function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
@@ -3,7 +3,7 @@
3
3
  import * as React from "react"
4
4
  import { Popover as PopoverPrimitive } from "@base-ui/react/popover"
5
5
 
6
- import { cn } from "@/lib/utils"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
7
 
8
8
  function Popover({ ...props }: PopoverPrimitive.Root.Props) {
9
9
  return <PopoverPrimitive.Root data-slot="popover" {...props} />
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { Progress as ProgressPrimitive } from "@base-ui/react/progress"
4
4
 
5
- import { cn } from "@/lib/utils"
5
+ import { cn } from "@vendure-io/ui/lib/utils"
6
6
 
7
7
  function Progress({
8
8
  className,
@@ -3,7 +3,7 @@
3
3
  import { Radio as RadioPrimitive } from "@base-ui/react/radio"
4
4
  import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group"
5
5
 
6
- import { cn } from "@/lib/utils"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
7
 
8
8
  function RadioGroup({ className, ...props }: RadioGroupPrimitive.Props) {
9
9
  return (
@@ -2,7 +2,7 @@
2
2
 
3
3
  import * as ResizablePrimitive from "react-resizable-panels"
4
4
 
5
- import { cn } from "@/lib/utils"
5
+ import { cn } from "@vendure-io/ui/lib/utils"
6
6
 
7
7
  function ResizablePanelGroup({
8
8
  className,
@@ -3,7 +3,7 @@
3
3
  import * as React from "react"
4
4
  import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area"
5
5
 
6
- import { cn } from "@/lib/utils"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
7
 
8
8
  function ScrollArea({
9
9
  className,
@@ -3,7 +3,7 @@
3
3
  import * as React from "react"
4
4
  import { Select as SelectPrimitive } from "@base-ui/react/select"
5
5
 
6
- import { cn } from "@/lib/utils"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
7
  import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react"
8
8
 
9
9
  const Select = SelectPrimitive.Root
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { Separator as SeparatorPrimitive } from "@base-ui/react/separator"
4
4
 
5
- import { cn } from "@/lib/utils"
5
+ import { cn } from "@vendure-io/ui/lib/utils"
6
6
 
7
7
  function Separator({
8
8
  className,
@@ -3,8 +3,8 @@
3
3
  import * as React from "react"
4
4
  import { Dialog as SheetPrimitive } from "@base-ui/react/dialog"
5
5
 
6
- import { cn } from "@/lib/utils"
7
- import { Button } from "@/components/ui/button"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
+ import { Button } from "@vendure-io/ui/components/ui/button"
8
8
  import { XIcon } from "lucide-react"
9
9
 
10
10
  function Sheet({ ...props }: SheetPrimitive.Root.Props) {
@@ -5,24 +5,24 @@ import { mergeProps } from "@base-ui/react/merge-props"
5
5
  import { useRender } from "@base-ui/react/use-render"
6
6
  import { cva, type VariantProps } from "class-variance-authority"
7
7
 
8
- import { useIsMobile } from "@/hooks/use-mobile"
9
- import { cn } from "@/lib/utils"
10
- import { Button } from "@/components/ui/button"
11
- import { Input } from "@/components/ui/input"
12
- import { Separator } from "@/components/ui/separator"
8
+ import { useIsMobile } from "@vendure-io/ui/hooks/use-mobile"
9
+ import { cn } from "@vendure-io/ui/lib/utils"
10
+ import { Button } from "@vendure-io/ui/components/ui/button"
11
+ import { Input } from "@vendure-io/ui/components/ui/input"
12
+ import { Separator } from "@vendure-io/ui/components/ui/separator"
13
13
  import {
14
14
  Sheet,
15
15
  SheetContent,
16
16
  SheetDescription,
17
17
  SheetHeader,
18
18
  SheetTitle,
19
- } from "@/components/ui/sheet"
20
- import { Skeleton } from "@/components/ui/skeleton"
19
+ } from "@vendure-io/ui/components/ui/sheet"
20
+ import { Skeleton } from "@vendure-io/ui/components/ui/skeleton"
21
21
  import {
22
22
  Tooltip,
23
23
  TooltipContent,
24
24
  TooltipTrigger,
25
- } from "@/components/ui/tooltip"
25
+ } from "@vendure-io/ui/components/ui/tooltip"
26
26
  import { PanelLeftIcon } from "lucide-react"
27
27
 
28
28
  const SIDEBAR_COOKIE_NAME = "sidebar_state"
@@ -481,7 +481,7 @@ const sidebarMenuButtonVariants = cva(
481
481
  variant: {
482
482
  default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
483
483
  outline:
484
- "bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)]",
484
+ "bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]",
485
485
  },
486
486
  size: {
487
487
  default: "h-8 text-sm",
@@ -518,7 +518,7 @@ function SidebarMenuButton({
518
518
  },
519
519
  props
520
520
  ),
521
- render: !tooltip ? render : TooltipTrigger,
521
+ render: !tooltip ? render : <TooltipTrigger render={render} />,
522
522
  state: {
523
523
  slot: "sidebar-menu-button",
524
524
  sidebar: "menu-button",
@@ -1,4 +1,4 @@
1
- import { cn } from "@/lib/utils"
1
+ import { cn } from "@vendure-io/ui/lib/utils"
2
2
 
3
3
  function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
4
4
  return (
@@ -3,7 +3,7 @@
3
3
  import * as React from "react"
4
4
  import { Slider as SliderPrimitive } from "@base-ui/react/slider"
5
5
 
6
- import { cn } from "@/lib/utils"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
7
 
8
8
  function Slider({
9
9
  className,
@@ -39,6 +39,10 @@ const Toaster = ({ ...props }: ToasterProps) => {
39
39
  toastOptions={{
40
40
  classNames: {
41
41
  toast: "cn-toast",
42
+ // [vendure] Override Sonner's hardcoded #3f3f3f description colour
43
+ // with our semantic muted-foreground token for consistent contrast.
44
+ // See: https://github.com/vendurehq/design/issues/5
45
+ description: "!text-muted-foreground",
42
46
  },
43
47
  }}
44
48
  {...props}
@@ -1,4 +1,4 @@
1
- import { cn } from "@/lib/utils"
1
+ import { cn } from "@vendure-io/ui/lib/utils"
2
2
  import { Loader2Icon } from "lucide-react"
3
3
 
4
4
  function Spinner({ className, ...props }: React.ComponentProps<"svg">) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { Switch as SwitchPrimitive } from "@base-ui/react/switch"
4
4
 
5
- import { cn } from "@/lib/utils"
5
+ import { cn } from "@vendure-io/ui/lib/utils"
6
6
 
7
7
  function Switch({
8
8
  className,
@@ -2,7 +2,7 @@
2
2
 
3
3
  import * as React from "react"
4
4
 
5
- import { cn } from "@/lib/utils"
5
+ import { cn } from "@vendure-io/ui/lib/utils"
6
6
 
7
7
  function Table({ className, ...props }: React.ComponentProps<"table">) {
8
8
  return (
@@ -3,7 +3,7 @@
3
3
  import { Tabs as TabsPrimitive } from "@base-ui/react/tabs"
4
4
  import { cva, type VariantProps } from "class-variance-authority"
5
5
 
6
- import { cn } from "@/lib/utils"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
7
 
8
8
  function Tabs({
9
9
  className,
@@ -1,6 +1,6 @@
1
1
  import * as React from "react"
2
2
 
3
- import { cn } from "@/lib/utils"
3
+ import { cn } from "@vendure-io/ui/lib/utils"
4
4
 
5
5
  function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
6
6
  return (
@@ -5,8 +5,8 @@ import { Toggle as TogglePrimitive } from "@base-ui/react/toggle"
5
5
  import { ToggleGroup as ToggleGroupPrimitive } from "@base-ui/react/toggle-group"
6
6
  import { type VariantProps } from "class-variance-authority"
7
7
 
8
- import { cn } from "@/lib/utils"
9
- import { toggleVariants } from "@/components/ui/toggle"
8
+ import { cn } from "@vendure-io/ui/lib/utils"
9
+ import { toggleVariants } from "@vendure-io/ui/components/ui/toggle"
10
10
 
11
11
  const ToggleGroupContext = React.createContext<
12
12
  VariantProps<typeof toggleVariants> & {
@@ -3,7 +3,7 @@
3
3
  import { Toggle as TogglePrimitive } from "@base-ui/react/toggle"
4
4
  import { cva, type VariantProps } from "class-variance-authority"
5
5
 
6
- import { cn } from "@/lib/utils"
6
+ import { cn } from "@vendure-io/ui/lib/utils"
7
7
 
8
8
  const toggleVariants = cva(
9
9
  "hover:text-foreground aria-pressed:bg-muted focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive gap-1 rounded-md text-sm font-medium transition-[color,box-shadow] [&_svg:not([class*='size-'])]:size-4 group/toggle hover:bg-muted inline-flex items-center justify-center whitespace-nowrap outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip"
4
4
 
5
- import { cn } from "@/lib/utils"
5
+ import { cn } from "@vendure-io/ui/lib/utils"
6
6
 
7
7
  function TooltipProvider({
8
8
  delay = 0,