@vendure/dashboard 3.3.8-master-202507220240 → 3.3.8-master-202507231129
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/package.json +39 -26
- package/src/lib/components/ui/aspect-ratio.tsx +9 -0
- package/src/lib/components/ui/avatar.tsx +53 -0
- package/src/lib/components/ui/carousel.tsx +241 -0
- package/src/lib/components/ui/chart.tsx +351 -0
- package/src/lib/components/ui/context-menu.tsx +252 -0
- package/src/lib/components/ui/drawer.tsx +133 -0
- package/src/lib/components/ui/input-otp.tsx +77 -0
- package/src/lib/components/ui/menubar.tsx +274 -0
- package/src/lib/components/ui/navigation-menu.tsx +168 -0
- package/src/lib/components/ui/progress.tsx +29 -0
- package/src/lib/components/ui/radio-group.tsx +45 -0
- package/src/lib/components/ui/resizable.tsx +54 -0
- package/src/lib/components/ui/slider.tsx +63 -0
- package/src/lib/components/ui/toggle-group.tsx +73 -0
- package/src/lib/components/ui/toggle.tsx +45 -0
- package/src/lib/index.ts +19 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group"
|
|
5
|
+
import { CircleIcon } from "lucide-react"
|
|
6
|
+
|
|
7
|
+
import { cn } from "@/vdb/lib/utils"
|
|
8
|
+
|
|
9
|
+
function RadioGroup({
|
|
10
|
+
className,
|
|
11
|
+
...props
|
|
12
|
+
}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {
|
|
13
|
+
return (
|
|
14
|
+
<RadioGroupPrimitive.Root
|
|
15
|
+
data-slot="radio-group"
|
|
16
|
+
className={cn("grid gap-3", className)}
|
|
17
|
+
{...props}
|
|
18
|
+
/>
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function RadioGroupItem({
|
|
23
|
+
className,
|
|
24
|
+
...props
|
|
25
|
+
}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {
|
|
26
|
+
return (
|
|
27
|
+
<RadioGroupPrimitive.Item
|
|
28
|
+
data-slot="radio-group-item"
|
|
29
|
+
className={cn(
|
|
30
|
+
"border-input text-primary 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:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
31
|
+
className
|
|
32
|
+
)}
|
|
33
|
+
{...props}
|
|
34
|
+
>
|
|
35
|
+
<RadioGroupPrimitive.Indicator
|
|
36
|
+
data-slot="radio-group-indicator"
|
|
37
|
+
className="relative flex items-center justify-center"
|
|
38
|
+
>
|
|
39
|
+
<CircleIcon className="fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" />
|
|
40
|
+
</RadioGroupPrimitive.Indicator>
|
|
41
|
+
</RadioGroupPrimitive.Item>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { RadioGroup, RadioGroupItem }
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { GripVerticalIcon } from "lucide-react"
|
|
3
|
+
import * as ResizablePrimitive from "react-resizable-panels"
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/vdb/lib/utils"
|
|
6
|
+
|
|
7
|
+
function ResizablePanelGroup({
|
|
8
|
+
className,
|
|
9
|
+
...props
|
|
10
|
+
}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {
|
|
11
|
+
return (
|
|
12
|
+
<ResizablePrimitive.PanelGroup
|
|
13
|
+
data-slot="resizable-panel-group"
|
|
14
|
+
className={cn(
|
|
15
|
+
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
16
|
+
className
|
|
17
|
+
)}
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function ResizablePanel({
|
|
24
|
+
...props
|
|
25
|
+
}: React.ComponentProps<typeof ResizablePrimitive.Panel>) {
|
|
26
|
+
return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function ResizableHandle({
|
|
30
|
+
withHandle,
|
|
31
|
+
className,
|
|
32
|
+
...props
|
|
33
|
+
}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
|
34
|
+
withHandle?: boolean
|
|
35
|
+
}) {
|
|
36
|
+
return (
|
|
37
|
+
<ResizablePrimitive.PanelResizeHandle
|
|
38
|
+
data-slot="resizable-handle"
|
|
39
|
+
className={cn(
|
|
40
|
+
"bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
41
|
+
className
|
|
42
|
+
)}
|
|
43
|
+
{...props}
|
|
44
|
+
>
|
|
45
|
+
{withHandle && (
|
|
46
|
+
<div className="bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border">
|
|
47
|
+
<GripVerticalIcon className="size-2.5" />
|
|
48
|
+
</div>
|
|
49
|
+
)}
|
|
50
|
+
</ResizablePrimitive.PanelResizeHandle>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { ResizablePanelGroup, ResizablePanel, ResizableHandle }
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as SliderPrimitive from "@radix-ui/react-slider"
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/vdb/lib/utils"
|
|
7
|
+
|
|
8
|
+
function Slider({
|
|
9
|
+
className,
|
|
10
|
+
defaultValue,
|
|
11
|
+
value,
|
|
12
|
+
min = 0,
|
|
13
|
+
max = 100,
|
|
14
|
+
...props
|
|
15
|
+
}: React.ComponentProps<typeof SliderPrimitive.Root>) {
|
|
16
|
+
const _values = React.useMemo(
|
|
17
|
+
() =>
|
|
18
|
+
Array.isArray(value)
|
|
19
|
+
? value
|
|
20
|
+
: Array.isArray(defaultValue)
|
|
21
|
+
? defaultValue
|
|
22
|
+
: [min, max],
|
|
23
|
+
[value, defaultValue, min, max]
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<SliderPrimitive.Root
|
|
28
|
+
data-slot="slider"
|
|
29
|
+
defaultValue={defaultValue}
|
|
30
|
+
value={value}
|
|
31
|
+
min={min}
|
|
32
|
+
max={max}
|
|
33
|
+
className={cn(
|
|
34
|
+
"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
35
|
+
className
|
|
36
|
+
)}
|
|
37
|
+
{...props}
|
|
38
|
+
>
|
|
39
|
+
<SliderPrimitive.Track
|
|
40
|
+
data-slot="slider-track"
|
|
41
|
+
className={cn(
|
|
42
|
+
"bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
43
|
+
)}
|
|
44
|
+
>
|
|
45
|
+
<SliderPrimitive.Range
|
|
46
|
+
data-slot="slider-range"
|
|
47
|
+
className={cn(
|
|
48
|
+
"bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
|
|
49
|
+
)}
|
|
50
|
+
/>
|
|
51
|
+
</SliderPrimitive.Track>
|
|
52
|
+
{Array.from({ length: _values.length }, (_, index) => (
|
|
53
|
+
<SliderPrimitive.Thumb
|
|
54
|
+
data-slot="slider-thumb"
|
|
55
|
+
key={index}
|
|
56
|
+
className="border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
57
|
+
/>
|
|
58
|
+
))}
|
|
59
|
+
</SliderPrimitive.Root>
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export { Slider }
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group"
|
|
5
|
+
import { type VariantProps } from "class-variance-authority"
|
|
6
|
+
|
|
7
|
+
import { cn } from "@/vdb/lib/utils"
|
|
8
|
+
import { toggleVariants } from "@/vdb/components/ui/toggle"
|
|
9
|
+
|
|
10
|
+
const ToggleGroupContext = React.createContext<
|
|
11
|
+
VariantProps<typeof toggleVariants>
|
|
12
|
+
>({
|
|
13
|
+
size: "default",
|
|
14
|
+
variant: "default",
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
function ToggleGroup({
|
|
18
|
+
className,
|
|
19
|
+
variant,
|
|
20
|
+
size,
|
|
21
|
+
children,
|
|
22
|
+
...props
|
|
23
|
+
}: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &
|
|
24
|
+
VariantProps<typeof toggleVariants>) {
|
|
25
|
+
return (
|
|
26
|
+
<ToggleGroupPrimitive.Root
|
|
27
|
+
data-slot="toggle-group"
|
|
28
|
+
data-variant={variant}
|
|
29
|
+
data-size={size}
|
|
30
|
+
className={cn(
|
|
31
|
+
"group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
|
|
32
|
+
className
|
|
33
|
+
)}
|
|
34
|
+
{...props}
|
|
35
|
+
>
|
|
36
|
+
<ToggleGroupContext.Provider value={{ variant, size }}>
|
|
37
|
+
{children}
|
|
38
|
+
</ToggleGroupContext.Provider>
|
|
39
|
+
</ToggleGroupPrimitive.Root>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function ToggleGroupItem({
|
|
44
|
+
className,
|
|
45
|
+
children,
|
|
46
|
+
variant,
|
|
47
|
+
size,
|
|
48
|
+
...props
|
|
49
|
+
}: React.ComponentProps<typeof ToggleGroupPrimitive.Item> &
|
|
50
|
+
VariantProps<typeof toggleVariants>) {
|
|
51
|
+
const context = React.useContext(ToggleGroupContext)
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<ToggleGroupPrimitive.Item
|
|
55
|
+
data-slot="toggle-group-item"
|
|
56
|
+
data-variant={context.variant || variant}
|
|
57
|
+
data-size={context.size || size}
|
|
58
|
+
className={cn(
|
|
59
|
+
toggleVariants({
|
|
60
|
+
variant: context.variant || variant,
|
|
61
|
+
size: context.size || size,
|
|
62
|
+
}),
|
|
63
|
+
"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",
|
|
64
|
+
className
|
|
65
|
+
)}
|
|
66
|
+
{...props}
|
|
67
|
+
>
|
|
68
|
+
{children}
|
|
69
|
+
</ToggleGroupPrimitive.Item>
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export { ToggleGroup, ToggleGroupItem }
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle"
|
|
3
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/vdb/lib/utils"
|
|
6
|
+
|
|
7
|
+
const toggleVariants = cva(
|
|
8
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default: "bg-transparent",
|
|
13
|
+
outline:
|
|
14
|
+
"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground",
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
default: "h-9 px-2 min-w-9",
|
|
18
|
+
sm: "h-8 px-1.5 min-w-8",
|
|
19
|
+
lg: "h-10 px-2.5 min-w-10",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
variant: "default",
|
|
24
|
+
size: "default",
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
function Toggle({
|
|
30
|
+
className,
|
|
31
|
+
variant,
|
|
32
|
+
size,
|
|
33
|
+
...props
|
|
34
|
+
}: React.ComponentProps<typeof TogglePrimitive.Root> &
|
|
35
|
+
VariantProps<typeof toggleVariants>) {
|
|
36
|
+
return (
|
|
37
|
+
<TogglePrimitive.Root
|
|
38
|
+
data-slot="toggle"
|
|
39
|
+
className={cn(toggleVariants({ variant, size, className }))}
|
|
40
|
+
{...props}
|
|
41
|
+
/>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { Toggle, toggleVariants }
|
package/src/lib/index.ts
CHANGED
|
@@ -20,6 +20,7 @@ export * from './components/data-table/data-table-faceted-filter.js';
|
|
|
20
20
|
export * from './components/data-table/data-table-filter-badge.js';
|
|
21
21
|
export * from './components/data-table/data-table-filter-dialog.js';
|
|
22
22
|
export * from './components/data-table/data-table-pagination.js';
|
|
23
|
+
export * from './components/data-table/data-table-utils.js';
|
|
23
24
|
export * from './components/data-table/data-table-view-options.js';
|
|
24
25
|
export * from './components/data-table/data-table.js';
|
|
25
26
|
export * from './components/data-table/filters/data-table-boolean-filter.js';
|
|
@@ -30,6 +31,8 @@ export * from './components/data-table/filters/data-table-string-filter.js';
|
|
|
30
31
|
export * from './components/data-table/human-readable-operator.js';
|
|
31
32
|
export * from './components/data-table/refresh-button.js';
|
|
32
33
|
export * from './components/data-table/types.js';
|
|
34
|
+
export * from './components/data-table/use-generated-columns.js';
|
|
35
|
+
export * from './components/labeled-data.js';
|
|
33
36
|
export * from './components/layout/app-layout.js';
|
|
34
37
|
export * from './components/layout/app-sidebar.js';
|
|
35
38
|
export * from './components/layout/channel-switcher.js';
|
|
@@ -101,33 +104,48 @@ export * from './components/shared/zone-selector.js';
|
|
|
101
104
|
export * from './components/ui/accordion.js';
|
|
102
105
|
export * from './components/ui/alert-dialog.js';
|
|
103
106
|
export * from './components/ui/alert.js';
|
|
107
|
+
export * from './components/ui/aspect-ratio.js';
|
|
108
|
+
export * from './components/ui/avatar.js';
|
|
104
109
|
export * from './components/ui/badge.js';
|
|
105
110
|
export * from './components/ui/breadcrumb.js';
|
|
106
111
|
export * from './components/ui/button.js';
|
|
107
112
|
export * from './components/ui/calendar.js';
|
|
108
113
|
export * from './components/ui/card.js';
|
|
114
|
+
export * from './components/ui/carousel.js';
|
|
115
|
+
export * from './components/ui/chart.js';
|
|
109
116
|
export * from './components/ui/checkbox.js';
|
|
110
117
|
export * from './components/ui/collapsible.js';
|
|
111
118
|
export * from './components/ui/command.js';
|
|
119
|
+
export * from './components/ui/context-menu.js';
|
|
112
120
|
export * from './components/ui/dialog.js';
|
|
121
|
+
export * from './components/ui/drawer.js';
|
|
113
122
|
export * from './components/ui/dropdown-menu.js';
|
|
114
123
|
export * from './components/ui/form.js';
|
|
115
124
|
export * from './components/ui/hover-card.js';
|
|
125
|
+
export * from './components/ui/input-otp.js';
|
|
116
126
|
export * from './components/ui/input.js';
|
|
117
127
|
export * from './components/ui/label.js';
|
|
128
|
+
export * from './components/ui/menubar.js';
|
|
129
|
+
export * from './components/ui/navigation-menu.js';
|
|
118
130
|
export * from './components/ui/pagination.js';
|
|
119
131
|
export * from './components/ui/popover.js';
|
|
132
|
+
export * from './components/ui/progress.js';
|
|
133
|
+
export * from './components/ui/radio-group.js';
|
|
134
|
+
export * from './components/ui/resizable.js';
|
|
120
135
|
export * from './components/ui/scroll-area.js';
|
|
121
136
|
export * from './components/ui/select.js';
|
|
122
137
|
export * from './components/ui/separator.js';
|
|
123
138
|
export * from './components/ui/sheet.js';
|
|
124
139
|
export * from './components/ui/sidebar.js';
|
|
125
140
|
export * from './components/ui/skeleton.js';
|
|
141
|
+
export * from './components/ui/slider.js';
|
|
126
142
|
export * from './components/ui/sonner.js';
|
|
127
143
|
export * from './components/ui/switch.js';
|
|
128
144
|
export * from './components/ui/table.js';
|
|
129
145
|
export * from './components/ui/tabs.js';
|
|
130
146
|
export * from './components/ui/textarea.js';
|
|
147
|
+
export * from './components/ui/toggle-group.js';
|
|
148
|
+
export * from './components/ui/toggle.js';
|
|
131
149
|
export * from './components/ui/tooltip.js';
|
|
132
150
|
export * from './framework/alert/alert-extensions.js';
|
|
133
151
|
export * from './framework/alert/alert-item.js';
|
|
@@ -169,6 +187,7 @@ export * from './framework/extension-api/use-dashboard-extensions.js';
|
|
|
169
187
|
export * from './framework/form-engine/custom-form-component-extensions.js';
|
|
170
188
|
export * from './framework/form-engine/custom-form-component.js';
|
|
171
189
|
export * from './framework/form-engine/form-schema-tools.js';
|
|
190
|
+
export * from './framework/form-engine/overridden-form-component.js';
|
|
172
191
|
export * from './framework/form-engine/use-generated-form.js';
|
|
173
192
|
export * from './framework/form-engine/utils.js';
|
|
174
193
|
export * from './framework/layout-engine/layout-extensions.js';
|