@vendure-io/ui 1.0.0 → 1.0.2
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.
- package/README.md +36 -0
- package/package.json +12 -3
- package/src/components/ui/accordion.tsx +1 -1
- package/src/components/ui/alert-dialog.tsx +2 -2
- package/src/components/ui/alert.tsx +1 -1
- package/src/components/ui/aspect-ratio.tsx +1 -1
- package/src/components/ui/avatar.tsx +1 -1
- package/src/components/ui/badge.tsx +1 -1
- package/src/components/ui/breadcrumb.tsx +1 -1
- package/src/components/ui/button-group.tsx +2 -2
- package/src/components/ui/button.tsx +1 -1
- package/src/components/ui/calendar.tsx +2 -2
- package/src/components/ui/card.tsx +1 -1
- package/src/components/ui/carousel.tsx +2 -2
- package/src/components/ui/chart.tsx +1 -1
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/combobox.tsx +3 -3
- package/src/components/ui/command.tsx +3 -3
- package/src/components/ui/context-menu.tsx +1 -1
- package/src/components/ui/dialog.tsx +2 -2
- package/src/components/ui/drawer.tsx +1 -1
- package/src/components/ui/dropdown-menu.tsx +1 -1
- package/src/components/ui/empty.tsx +1 -1
- package/src/components/ui/field.tsx +3 -3
- package/src/components/ui/hover-card.tsx +1 -1
- package/src/components/ui/input-group.tsx +4 -4
- package/src/components/ui/input-otp.tsx +1 -1
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/item.tsx +2 -2
- package/src/components/ui/kbd.tsx +1 -1
- package/src/components/ui/label.tsx +1 -1
- package/src/components/ui/menubar.tsx +2 -2
- package/src/components/ui/native-select.tsx +1 -1
- package/src/components/ui/navigation-menu.tsx +1 -1
- package/src/components/ui/pagination.tsx +2 -2
- package/src/components/ui/popover.tsx +1 -1
- package/src/components/ui/progress.tsx +1 -1
- package/src/components/ui/radio-group.tsx +1 -1
- package/src/components/ui/resizable.tsx +1 -1
- package/src/components/ui/scroll-area.tsx +1 -1
- package/src/components/ui/select.tsx +1 -1
- package/src/components/ui/separator.tsx +1 -1
- package/src/components/ui/sheet.tsx +2 -2
- package/src/components/ui/sidebar.tsx +10 -10
- package/src/components/ui/skeleton.tsx +1 -1
- package/src/components/ui/slider.tsx +1 -1
- package/src/components/ui/spinner.tsx +1 -1
- package/src/components/ui/switch.tsx +1 -1
- package/src/components/ui/table.tsx +1 -1
- package/src/components/ui/tabs.tsx +1 -1
- package/src/components/ui/textarea.tsx +1 -1
- package/src/components/ui/toggle-group.tsx +2 -2
- package/src/components/ui/toggle.tsx +1 -1
- package/src/components/ui/tooltip.tsx +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# @vendure-io/ui
|
|
2
|
+
|
|
3
|
+
React component library for Vendure, built on [shadcn/ui](https://ui.shadcn.com/) and [Tailwind CSS v4](https://tailwindcss.com/).
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @vendure-io/ui
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Peer dependencies
|
|
12
|
+
|
|
13
|
+
- `react` >= 19
|
|
14
|
+
- `react-dom` >= 19
|
|
15
|
+
|
|
16
|
+
Optional peers: `next`, `next-themes`, `react-hook-form`
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { Button } from "@vendure-io/ui/components/ui/button";
|
|
22
|
+
import { cn } from "@vendure-io/ui/lib/utils";
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Exports
|
|
26
|
+
|
|
27
|
+
| Export | Description |
|
|
28
|
+
|--------|-------------|
|
|
29
|
+
| `@vendure-io/ui/components/ui/*` | shadcn/ui primitives (button, dialog, input, etc.) |
|
|
30
|
+
| `@vendure-io/ui/components/custom/*` | Vendure-specific components |
|
|
31
|
+
| `@vendure-io/ui/lib/*` | Utilities (`cn`, etc.) |
|
|
32
|
+
| `@vendure-io/ui/hooks/*` | Shared React hooks |
|
|
33
|
+
|
|
34
|
+
## License
|
|
35
|
+
|
|
36
|
+
See [LICENSE.md](../../LICENSE.md) for details.
|
package/package.json
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vendure-io/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "React component library for Vendure, built on shadcn/ui and Tailwind v4",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
|
+
"homepage": "https://github.com/vendurehq/design/tree/main/packages/ui",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/vendurehq/design.git",
|
|
10
|
+
"directory": "packages/ui"
|
|
11
|
+
},
|
|
4
12
|
"type": "module",
|
|
5
13
|
"exports": {
|
|
6
14
|
"./components/ui/*": "./src/components/ui/*.tsx",
|
|
@@ -9,7 +17,8 @@
|
|
|
9
17
|
"./hooks/*": "./src/hooks/*.ts"
|
|
10
18
|
},
|
|
11
19
|
"files": [
|
|
12
|
-
"src"
|
|
20
|
+
"src",
|
|
21
|
+
"README.md"
|
|
13
22
|
],
|
|
14
23
|
"scripts": {
|
|
15
24
|
"lint": "biome check src/",
|
|
@@ -35,7 +44,7 @@
|
|
|
35
44
|
},
|
|
36
45
|
"dependencies": {
|
|
37
46
|
"@base-ui/react": "^1.2.0",
|
|
38
|
-
"@vendure-io/design-tokens": "
|
|
47
|
+
"@vendure-io/design-tokens": "^1.0.1",
|
|
39
48
|
"class-variance-authority": "^0.7.1",
|
|
40
49
|
"clsx": "^2.1.1",
|
|
41
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 "
|
|
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 "
|
|
7
|
-
import { Button } from "
|
|
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 "
|
|
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",
|
|
@@ -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 "
|
|
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 "
|
|
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 "
|
|
6
|
-
import { Separator } from "
|
|
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 "
|
|
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 "
|
|
12
|
-
import { Button, buttonVariants } from "
|
|
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({
|
|
@@ -5,8 +5,8 @@ import useEmblaCarousel, {
|
|
|
5
5
|
type UseEmblaCarouselType,
|
|
6
6
|
} from "embla-carousel-react"
|
|
7
7
|
|
|
8
|
-
import { cn } from "
|
|
9
|
-
import { Button } from "
|
|
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]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox"
|
|
4
4
|
|
|
5
|
-
import { cn } from "
|
|
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 "
|
|
7
|
-
import { Button } from "
|
|
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 "
|
|
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 "
|
|
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 "
|
|
13
|
+
} from "@vendure-io/ui/components/ui/dialog"
|
|
14
14
|
import {
|
|
15
15
|
InputGroup,
|
|
16
16
|
InputGroupAddon,
|
|
17
|
-
} from "
|
|
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 "
|
|
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 "
|
|
7
|
-
import { Button } from "
|
|
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 { Menu as MenuPrimitive } from "@base-ui/react/menu"
|
|
5
5
|
|
|
6
|
-
import { cn } from "
|
|
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) {
|
|
@@ -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 "
|
|
7
|
-
import { Label } from "
|
|
8
|
-
import { Separator } from "
|
|
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 "
|
|
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 "
|
|
7
|
-
import { Button } from "
|
|
8
|
-
import { Input } from "
|
|
9
|
-
import { Textarea } from "
|
|
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 (
|
|
@@ -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 "
|
|
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 "
|
|
7
|
-
import { Separator } from "
|
|
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 (
|
|
@@ -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 "
|
|
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 "
|
|
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,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 "
|
|
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 "
|
|
4
|
-
import { Button } from "
|
|
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 "
|
|
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} />
|
|
@@ -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 "
|
|
6
|
+
import { cn } from "@vendure-io/ui/lib/utils"
|
|
7
7
|
|
|
8
8
|
function RadioGroup({ className, ...props }: RadioGroupPrimitive.Props) {
|
|
9
9
|
return (
|
|
@@ -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 "
|
|
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
|
|
@@ -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 "
|
|
7
|
-
import { Button } from "
|
|
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 "
|
|
9
|
-
import { cn } from "
|
|
10
|
-
import { Button } from "
|
|
11
|
-
import { Input } from "
|
|
12
|
-
import { Separator } from "
|
|
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 "
|
|
20
|
-
import { Skeleton } from "
|
|
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 "
|
|
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-[
|
|
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",
|
|
@@ -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 "
|
|
9
|
-
import { toggleVariants } from "
|
|
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 "
|
|
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",
|