gladvn 0.2.18 → 0.2.20
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/bin/cli.js +15 -5
- package/dist/components/macro/accordion-preset.d.ts.map +1 -1
- package/dist/components/macro/alert-dialog-preset.d.ts.map +1 -1
- package/dist/components/macro/alert-preset.d.ts.map +1 -1
- package/dist/components/macro/avatar-preset.d.ts.map +1 -1
- package/dist/components/macro/breadcrumb-preset.d.ts.map +1 -1
- package/dist/components/macro/card-preset.d.ts.map +1 -1
- package/dist/components/macro/carousel-preset.d.ts.map +1 -1
- package/dist/components/macro/checkbox-preset.d.ts.map +1 -1
- package/dist/components/macro/combobox-preset.d.ts.map +1 -1
- package/dist/components/macro/command-preset.d.ts +1 -1
- package/dist/components/macro/command-preset.d.ts.map +1 -1
- package/dist/components/macro/date-picker.d.ts.map +1 -1
- package/dist/components/macro/dialog-preset.d.ts.map +1 -1
- package/dist/components/macro/empty-preset.d.ts +1 -1
- package/dist/components/macro/empty-preset.d.ts.map +1 -1
- package/dist/components/macro/field-preset.d.ts.map +1 -1
- package/dist/components/macro/input-otp-preset.d.ts.map +1 -1
- package/dist/components/macro/input-preset.d.ts.map +1 -1
- package/dist/components/macro/pagination-preset.d.ts.map +1 -1
- package/dist/components/macro/progress-preset.d.ts.map +1 -1
- package/dist/components/macro/radio-group-preset.d.ts.map +1 -1
- package/dist/components/macro/select-preset.d.ts.map +1 -1
- package/dist/components/macro/slider-preset.d.ts.map +1 -1
- package/dist/components/macro/switch-preset.d.ts.map +1 -1
- package/dist/components/macro/tabs-preset.d.ts.map +1 -1
- package/dist/components/micro/alert-dialog.d.ts +4 -4
- package/dist/components/micro/alert-dialog.d.ts.map +1 -1
- package/dist/components/micro/combobox.d.ts +4 -3
- package/dist/components/micro/combobox.d.ts.map +1 -1
- package/dist/components/micro/context-menu.d.ts +4 -6
- package/dist/components/micro/context-menu.d.ts.map +1 -1
- package/dist/components/micro/dialog.d.ts +4 -3
- package/dist/components/micro/dialog.d.ts.map +1 -1
- package/dist/components/micro/drawer.d.ts +4 -3
- package/dist/components/micro/drawer.d.ts.map +1 -1
- package/dist/components/micro/dropdown-menu.d.ts +7 -4
- package/dist/components/micro/dropdown-menu.d.ts.map +1 -1
- package/dist/components/micro/hover-card.d.ts +4 -3
- package/dist/components/micro/hover-card.d.ts.map +1 -1
- package/dist/components/micro/menubar.d.ts +2 -3
- package/dist/components/micro/menubar.d.ts.map +1 -1
- package/dist/components/micro/navigation-menu.d.ts +4 -3
- package/dist/components/micro/navigation-menu.d.ts.map +1 -1
- package/dist/components/micro/popover.d.ts +4 -3
- package/dist/components/micro/popover.d.ts.map +1 -1
- package/dist/components/micro/select.d.ts +4 -3
- package/dist/components/micro/select.d.ts.map +1 -1
- package/dist/components/micro/sheet.d.ts +3 -3
- package/dist/components/micro/sheet.d.ts.map +1 -1
- package/dist/components/micro/tooltip.d.ts +4 -3
- package/dist/components/micro/tooltip.d.ts.map +1 -1
- package/dist/dev/showcase/accordion.d.ts.map +1 -1
- package/dist/dev/showcase/alert-dialog.d.ts.map +1 -1
- package/dist/dev/showcase/alert.d.ts.map +1 -1
- package/dist/dev/showcase/aspect-ratio.d.ts.map +1 -1
- package/dist/dev/showcase/avatar.d.ts.map +1 -1
- package/dist/dev/showcase/badge.d.ts.map +1 -1
- package/dist/dev/showcase/breadcrumb.d.ts.map +1 -1
- package/dist/dev/showcase/button.d.ts.map +1 -1
- package/dist/dev/showcase/calendar.d.ts.map +1 -1
- package/dist/dev/showcase/card.d.ts.map +1 -1
- package/dist/dev/showcase/carousel.d.ts.map +1 -1
- package/dist/dev/showcase/chart.d.ts.map +1 -1
- package/dist/dev/showcase/checkbox.d.ts.map +1 -1
- package/dist/dev/showcase/collapsible.d.ts.map +1 -1
- package/dist/dev/showcase/combobox.d.ts.map +1 -1
- package/dist/dev/showcase/command.d.ts.map +1 -1
- package/dist/dev/showcase/context-menu.d.ts.map +1 -1
- package/dist/dev/showcase/dialog.d.ts.map +1 -1
- package/dist/dev/showcase/drawer.d.ts.map +1 -1
- package/dist/dev/showcase/dropdown-menu.d.ts.map +1 -1
- package/dist/dev/showcase/empty.d.ts.map +1 -1
- package/dist/dev/showcase/hover-card.d.ts.map +1 -1
- package/dist/dev/showcase/input-group.d.ts.map +1 -1
- package/dist/dev/showcase/input-otp.d.ts.map +1 -1
- package/dist/dev/showcase/input.d.ts.map +1 -1
- package/dist/dev/showcase/item.d.ts.map +1 -1
- package/dist/dev/showcase/kbd.d.ts.map +1 -1
- package/dist/dev/showcase/label.d.ts.map +1 -1
- package/dist/dev/showcase/menubar.d.ts.map +1 -1
- package/dist/dev/showcase/navigation-menu.d.ts.map +1 -1
- package/dist/dev/showcase/overview.d.ts.map +1 -1
- package/dist/dev/showcase/pagination.d.ts.map +1 -1
- package/dist/dev/showcase/popover.d.ts.map +1 -1
- package/dist/dev/showcase/progress.d.ts.map +1 -1
- package/dist/dev/showcase/radio-group.d.ts.map +1 -1
- package/dist/dev/showcase/resizable.d.ts.map +1 -1
- package/dist/dev/showcase/scroll-area.d.ts.map +1 -1
- package/dist/dev/showcase/select.d.ts.map +1 -1
- package/dist/dev/showcase/separator.d.ts.map +1 -1
- package/dist/dev/showcase/sheet.d.ts.map +1 -1
- package/dist/dev/showcase/sidebar.d.ts.map +1 -1
- package/dist/dev/showcase/skeleton.d.ts.map +1 -1
- package/dist/dev/showcase/slider.d.ts.map +1 -1
- package/dist/dev/showcase/sonner.d.ts.map +1 -1
- package/dist/dev/showcase/spinner.d.ts.map +1 -1
- package/dist/dev/showcase/switch.d.ts.map +1 -1
- package/dist/dev/showcase/table.d.ts.map +1 -1
- package/dist/dev/showcase/tabs.d.ts.map +1 -1
- package/dist/dev/showcase/textarea.d.ts.map +1 -1
- package/dist/dev/showcase/theme-provider.d.ts.map +1 -1
- package/dist/dev/showcase/toast.d.ts.map +1 -1
- package/dist/dev/showcase/toggle-group.d.ts.map +1 -1
- package/dist/dev/showcase/toggle.d.ts.map +1 -1
- package/dist/dev/showcase/tooltip.d.ts.map +1 -1
- package/dist/index.cjs +256 -256
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +257 -244
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/macro/accordion-preset.test.tsx +1 -2
- package/src/components/macro/accordion-preset.tsx +1 -2
- package/src/components/macro/alert-dialog-preset.tsx +7 -12
- package/src/components/macro/alert-preset.tsx +1 -2
- package/src/components/macro/avatar-preset.tsx +2 -4
- package/src/components/macro/breadcrumb-preset.tsx +1 -2
- package/src/components/macro/card-preset.tsx +1 -2
- package/src/components/macro/carousel-preset.tsx +1 -2
- package/src/components/macro/checkbox-preset.tsx +1 -2
- package/src/components/macro/combobox-preset.tsx +8 -14
- package/src/components/macro/command-preset.tsx +18 -24
- package/src/components/macro/date-picker.tsx +14 -23
- package/src/components/macro/dialog-preset.tsx +45 -49
- package/src/components/macro/empty-preset.tsx +2 -4
- package/src/components/macro/field-preset.tsx +1 -2
- package/src/components/macro/input-otp-preset.tsx +1 -2
- package/src/components/macro/input-preset.tsx +1 -2
- package/src/components/macro/pagination-preset.tsx +3 -6
- package/src/components/macro/progress-preset.tsx +1 -2
- package/src/components/macro/radio-group-preset.tsx +2 -4
- package/src/components/macro/select-preset.tsx +7 -12
- package/src/components/macro/slider-preset.tsx +1 -2
- package/src/components/macro/switch-preset.tsx +1 -2
- package/src/components/macro/tabs-preset.tsx +1 -2
- package/src/components/micro/alert-dialog.tsx +16 -14
- package/src/components/micro/combobox.tsx +28 -22
- package/src/components/micro/context-menu.tsx +52 -36
- package/src/components/micro/dialog.tsx +23 -19
- package/src/components/micro/drawer.tsx +23 -19
- package/src/components/micro/dropdown-menu.tsx +23 -18
- package/src/components/micro/hover-card.tsx +31 -23
- package/src/components/micro/menubar.tsx +0 -8
- package/src/components/micro/navigation-menu.tsx +26 -19
- package/src/components/micro/popover.tsx +31 -25
- package/src/components/micro/select.tsx +36 -29
- package/src/components/micro/sheet.tsx +36 -31
- package/src/components/micro/tooltip.tsx +28 -23
- package/src/dev/showcase/accordion.tsx +47 -94
- package/src/dev/showcase/alert-dialog.tsx +27 -39
- package/src/dev/showcase/alert.tsx +5 -10
- package/src/dev/showcase/aspect-ratio.tsx +1 -2
- package/src/dev/showcase/avatar.tsx +5 -10
- package/src/dev/showcase/badge.tsx +2 -4
- package/src/dev/showcase/breadcrumb.tsx +8 -11
- package/src/dev/showcase/button.tsx +2 -4
- package/src/dev/showcase/calendar.tsx +5 -10
- package/src/dev/showcase/card.tsx +4 -8
- package/src/dev/showcase/carousel.tsx +40 -80
- package/src/dev/showcase/chart.tsx +7 -16
- package/src/dev/showcase/checkbox.tsx +7 -14
- package/src/dev/showcase/collapsible.tsx +3 -6
- package/src/dev/showcase/combobox.tsx +27 -43
- package/src/dev/showcase/command.tsx +4 -8
- package/src/dev/showcase/context-menu.tsx +13 -19
- package/src/dev/showcase/dialog.tsx +19 -33
- package/src/dev/showcase/drawer.tsx +19 -27
- package/src/dev/showcase/dropdown-menu.tsx +19 -29
- package/src/dev/showcase/empty.tsx +3 -6
- package/src/dev/showcase/hover-card.tsx +24 -36
- package/src/dev/showcase/input-group.tsx +4 -8
- package/src/dev/showcase/input-otp.tsx +5 -10
- package/src/dev/showcase/input.tsx +5 -10
- package/src/dev/showcase/item.tsx +3 -6
- package/src/dev/showcase/kbd.tsx +12 -16
- package/src/dev/showcase/label.tsx +2 -4
- package/src/dev/showcase/menubar.tsx +17 -19
- package/src/dev/showcase/navigation-menu.tsx +12 -15
- package/src/dev/showcase/overview.tsx +14 -27
- package/src/dev/showcase/pagination.tsx +4 -8
- package/src/dev/showcase/popover.tsx +21 -27
- package/src/dev/showcase/progress.tsx +4 -8
- package/src/dev/showcase/radio-group.tsx +8 -16
- package/src/dev/showcase/resizable.tsx +2 -4
- package/src/dev/showcase/scroll-area.tsx +1 -2
- package/src/dev/showcase/select.tsx +27 -39
- package/src/dev/showcase/separator.tsx +1 -2
- package/src/dev/showcase/sheet.tsx +22 -33
- package/src/dev/showcase/sidebar.tsx +2 -4
- package/src/dev/showcase/skeleton.tsx +1 -2
- package/src/dev/showcase/slider.tsx +5 -10
- package/src/dev/showcase/sonner.tsx +18 -38
- package/src/dev/showcase/spinner.tsx +2 -4
- package/src/dev/showcase/switch.tsx +6 -12
- package/src/dev/showcase/table.tsx +3 -6
- package/src/dev/showcase/tabs.tsx +20 -40
- package/src/dev/showcase/textarea.tsx +5 -10
- package/src/dev/showcase/theme-provider.tsx +384 -545
- package/src/dev/showcase/toast.tsx +4 -10
- package/src/dev/showcase/toggle-group.tsx +4 -8
- package/src/dev/showcase/toggle.tsx +2 -4
- package/src/dev/showcase/tooltip.tsx +34 -43
- package/src/styles/gladvn.css +1 -2
|
@@ -7,6 +7,7 @@ import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog
|
|
|
7
7
|
import { Button } from "../../components/micro/button";
|
|
8
8
|
import { type Size } from "../../lib/types";
|
|
9
9
|
import { cn } from "../../lib/utils";
|
|
10
|
+
import { ThemeWrapper } from "./theme-provider";
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* @description A modal dialog that interrupts the user with important content and expects a response.
|
|
@@ -36,7 +37,7 @@ function AlertDialogClose({ ...props }: AlertDialogPrimitive.Close.Props) {
|
|
|
36
37
|
);
|
|
37
38
|
}
|
|
38
39
|
|
|
39
|
-
|
|
40
|
+
|
|
40
41
|
|
|
41
42
|
function AlertDialogOverlay({
|
|
42
43
|
className,
|
|
@@ -54,17 +55,18 @@ function AlertDialogOverlay({
|
|
|
54
55
|
);
|
|
55
56
|
}
|
|
56
57
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
const AlertDialogContent = React.forwardRef<
|
|
59
|
+
HTMLDivElement,
|
|
60
|
+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Popup> & {
|
|
61
|
+
container?: React.ComponentProps<typeof AlertDialogPrimitive.Portal>["container"];
|
|
62
|
+
size?: Size;
|
|
63
|
+
}
|
|
64
|
+
>(({ className, container, size = "md", ...props }, ref) => (
|
|
65
|
+
<AlertDialogPrimitive.Portal container={container}>
|
|
66
|
+
<ThemeWrapper>
|
|
66
67
|
<AlertDialogOverlay />
|
|
67
68
|
<AlertDialogPrimitive.Popup
|
|
69
|
+
ref={ref}
|
|
68
70
|
data-slot="alert-dialog-content"
|
|
69
71
|
data-size={size}
|
|
70
72
|
className={cn(
|
|
@@ -77,9 +79,10 @@ function AlertDialogContent({
|
|
|
77
79
|
)}
|
|
78
80
|
{...props}
|
|
79
81
|
/>
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
</ThemeWrapper>
|
|
83
|
+
</AlertDialogPrimitive.Portal>
|
|
84
|
+
));
|
|
85
|
+
AlertDialogContent.displayName = "AlertDialogContent";
|
|
83
86
|
|
|
84
87
|
function AlertDialogHeader({
|
|
85
88
|
className,
|
|
@@ -208,7 +211,6 @@ export {
|
|
|
208
211
|
AlertDialogHeader,
|
|
209
212
|
AlertDialogMedia,
|
|
210
213
|
AlertDialogOverlay,
|
|
211
|
-
AlertDialogPortal,
|
|
212
214
|
AlertDialogTitle,
|
|
213
215
|
AlertDialogTrigger,
|
|
214
216
|
};
|
|
@@ -22,6 +22,7 @@ import { CheckIcon, ChevronDownIcon, XIcon } from "lucide-react";
|
|
|
22
22
|
|
|
23
23
|
import { InputGroupButton } from "../../components/micro/input-group";
|
|
24
24
|
import { cn } from "../../lib/utils";
|
|
25
|
+
import { ThemeWrapper } from "./theme-provider";
|
|
25
26
|
|
|
26
27
|
const ComboboxContext = React.createContext<{
|
|
27
28
|
anchor: Element | null;
|
|
@@ -98,7 +99,9 @@ const ComboboxContent = React.forwardRef<
|
|
|
98
99
|
Pick<
|
|
99
100
|
ComboboxPrimitive.Positioner.Props,
|
|
100
101
|
"side" | "align" | "sideOffset" | "alignOffset" | "anchor"
|
|
101
|
-
>
|
|
102
|
+
> & {
|
|
103
|
+
container?: React.ComponentProps<typeof ComboboxPrimitive.Portal>["container"];
|
|
104
|
+
}
|
|
102
105
|
>(
|
|
103
106
|
(
|
|
104
107
|
{
|
|
@@ -108,31 +111,35 @@ const ComboboxContent = React.forwardRef<
|
|
|
108
111
|
align = "start",
|
|
109
112
|
alignOffset = 0,
|
|
110
113
|
anchor,
|
|
114
|
+
container,
|
|
111
115
|
...props
|
|
112
116
|
},
|
|
113
117
|
ref,
|
|
114
118
|
) => {
|
|
115
119
|
const { anchor: contextAnchor } = React.useContext(ComboboxContext);
|
|
116
120
|
return (
|
|
117
|
-
<ComboboxPrimitive.
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
121
|
+
<ComboboxPrimitive.Portal container={container}>
|
|
122
|
+
<ThemeWrapper>
|
|
123
|
+
<ComboboxPrimitive.Positioner
|
|
124
|
+
side={side}
|
|
125
|
+
sideOffset={sideOffset}
|
|
126
|
+
align={align}
|
|
127
|
+
alignOffset={alignOffset}
|
|
128
|
+
anchor={anchor || contextAnchor}
|
|
129
|
+
className="isolate z-50"
|
|
130
|
+
>
|
|
131
|
+
<ComboboxPrimitive.Popup
|
|
132
|
+
ref={ref}
|
|
133
|
+
data-slot="combobox-content"
|
|
134
|
+
className={cn(
|
|
135
|
+
"group/combobox-content relative max-h-(--available-height) min-w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 p-1 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 [&_[data-slot=input-group]]:mb-1 [&_[data-slot=input-group]]:w-full [&_[data-slot=input-group]]:border-input/30 [&_[data-slot=input-group]]:bg-input/30 [&_[data-slot=input-group]]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
136
|
+
className,
|
|
137
|
+
)}
|
|
138
|
+
{...props}
|
|
139
|
+
/>
|
|
140
|
+
</ComboboxPrimitive.Positioner>
|
|
141
|
+
</ThemeWrapper>
|
|
142
|
+
</ComboboxPrimitive.Portal>
|
|
136
143
|
);
|
|
137
144
|
},
|
|
138
145
|
);
|
|
@@ -232,7 +239,7 @@ function ComboboxSeparator({
|
|
|
232
239
|
);
|
|
233
240
|
}
|
|
234
241
|
|
|
235
|
-
|
|
242
|
+
|
|
236
243
|
|
|
237
244
|
const comboboxChipsVariants = cva(
|
|
238
245
|
"group/combobox-chips flex flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:focus-within:ring-3 has-aria-invalid:focus-within:ring-destructive/20 has-[[data-slot=combobox-chip]]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:focus-within:ring-destructive/40 has-disabled:opacity-50 has-disabled:cursor-not-allowed has-disabled:pointer-events-none",
|
|
@@ -359,7 +366,6 @@ export {
|
|
|
359
366
|
ComboboxItem,
|
|
360
367
|
ComboboxLabel,
|
|
361
368
|
ComboboxList,
|
|
362
|
-
ComboboxPortal,
|
|
363
369
|
ComboboxSeparator,
|
|
364
370
|
ComboboxTrigger,
|
|
365
371
|
ComboboxValue,
|
|
@@ -13,6 +13,7 @@ import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu
|
|
|
13
13
|
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
14
14
|
|
|
15
15
|
import { cn } from "../../lib/utils";
|
|
16
|
+
import { ThemeWrapper } from "./theme-provider";
|
|
16
17
|
|
|
17
18
|
type ContextMenuVariant = "destructive";
|
|
18
19
|
|
|
@@ -32,8 +33,7 @@ function ContextMenu({ ...props }: ContextMenuPrimitive.Root.Props) {
|
|
|
32
33
|
}
|
|
33
34
|
ContextMenu.displayName = "ContextMenu";
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
ContextMenuPortal.displayName = "ContextMenuPortal";
|
|
36
|
+
|
|
37
37
|
|
|
38
38
|
const ContextMenuTrigger = React.forwardRef<
|
|
39
39
|
React.ElementRef<typeof ContextMenuPrimitive.Trigger>,
|
|
@@ -48,39 +48,56 @@ const ContextMenuTrigger = React.forwardRef<
|
|
|
48
48
|
));
|
|
49
49
|
ContextMenuTrigger.displayName = "ContextMenuTrigger";
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
51
|
+
const ContextMenuContent = React.forwardRef<
|
|
52
|
+
HTMLDivElement,
|
|
53
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Popup> &
|
|
54
|
+
Pick<
|
|
55
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Positioner>,
|
|
56
|
+
"align" | "alignOffset" | "side" | "sideOffset"
|
|
57
|
+
> & {
|
|
58
|
+
container?: React.ComponentProps<typeof ContextMenuPrimitive.Portal>["container"];
|
|
59
|
+
}
|
|
60
|
+
>(
|
|
61
|
+
(
|
|
62
|
+
{
|
|
63
|
+
className,
|
|
64
|
+
align = "start",
|
|
65
|
+
alignOffset = 0,
|
|
66
|
+
side = "right",
|
|
67
|
+
sideOffset = 4,
|
|
68
|
+
container,
|
|
69
|
+
children,
|
|
70
|
+
...props
|
|
71
|
+
},
|
|
72
|
+
ref,
|
|
73
|
+
) => {
|
|
74
|
+
return (
|
|
75
|
+
<ContextMenuPrimitive.Portal container={container}>
|
|
76
|
+
<ThemeWrapper>
|
|
77
|
+
<ContextMenuPrimitive.Positioner
|
|
78
|
+
align={align}
|
|
79
|
+
alignOffset={alignOffset}
|
|
80
|
+
side={side}
|
|
81
|
+
sideOffset={sideOffset}
|
|
82
|
+
className="isolate z-50 outline-none"
|
|
83
|
+
>
|
|
84
|
+
<ContextMenuPrimitive.Popup
|
|
85
|
+
ref={ref}
|
|
86
|
+
data-slot="context-menu-content"
|
|
87
|
+
className={cn(
|
|
88
|
+
"z-50 min-w-[8rem] origin-(--transform-origin) overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-md duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
89
|
+
className,
|
|
90
|
+
)}
|
|
91
|
+
{...props}
|
|
92
|
+
>
|
|
93
|
+
{children}
|
|
94
|
+
</ContextMenuPrimitive.Popup>
|
|
95
|
+
</ContextMenuPrimitive.Positioner>
|
|
96
|
+
</ThemeWrapper>
|
|
97
|
+
</ContextMenuPrimitive.Portal>
|
|
98
|
+
);
|
|
99
|
+
},
|
|
100
|
+
);
|
|
84
101
|
ContextMenuContent.displayName = "ContextMenuContent";
|
|
85
102
|
|
|
86
103
|
function ContextMenuGroup({ ...props }: ContextMenuPrimitive.Group.Props) {
|
|
@@ -274,7 +291,6 @@ export {
|
|
|
274
291
|
ContextMenuGroup,
|
|
275
292
|
ContextMenuItem,
|
|
276
293
|
ContextMenuLabel,
|
|
277
|
-
ContextMenuPortal,
|
|
278
294
|
ContextMenuRadioGroup,
|
|
279
295
|
ContextMenuRadioItem,
|
|
280
296
|
ContextMenuSeparator,
|
|
@@ -12,6 +12,7 @@ import * as React from "react";
|
|
|
12
12
|
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
13
13
|
|
|
14
14
|
import { cn } from "../../lib/utils";
|
|
15
|
+
import { ThemeWrapper } from "./theme-provider";
|
|
15
16
|
|
|
16
17
|
function Dialog({ ...props }: DialogPrimitive.Root.Props) {
|
|
17
18
|
return <DialogPrimitive.Root data-slot="dialog" {...props} />;
|
|
@@ -25,7 +26,7 @@ const DialogTrigger = React.forwardRef<
|
|
|
25
26
|
));
|
|
26
27
|
DialogTrigger.displayName = "DialogTrigger";
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
|
|
29
30
|
|
|
30
31
|
const DialogClose = React.forwardRef<
|
|
31
32
|
HTMLButtonElement,
|
|
@@ -53,23 +54,27 @@ DialogOverlay.displayName = "DialogOverlay";
|
|
|
53
54
|
|
|
54
55
|
const DialogContent = React.forwardRef<
|
|
55
56
|
HTMLDivElement,
|
|
56
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Popup>
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
className
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
57
|
+
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Popup> & {
|
|
58
|
+
container?: React.ComponentProps<typeof DialogPrimitive.Portal>["container"];
|
|
59
|
+
}
|
|
60
|
+
>(({ className, children, container, ...props }, ref) => (
|
|
61
|
+
<DialogPrimitive.Portal container={container}>
|
|
62
|
+
<ThemeWrapper>
|
|
63
|
+
<DialogOverlay />
|
|
64
|
+
<DialogPrimitive.Popup
|
|
65
|
+
ref={ref}
|
|
66
|
+
data-slot="dialog-content"
|
|
67
|
+
className={cn(
|
|
68
|
+
"group/dialog-content fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none max-h-[calc(100dvh-2rem)] sm:max-h-[calc(100dvh-4rem)] overflow-y-auto",
|
|
69
|
+
"data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
70
|
+
className,
|
|
71
|
+
)}
|
|
72
|
+
{...props}
|
|
73
|
+
>
|
|
74
|
+
{children}
|
|
75
|
+
</DialogPrimitive.Popup>
|
|
76
|
+
</ThemeWrapper>
|
|
77
|
+
</DialogPrimitive.Portal>
|
|
73
78
|
));
|
|
74
79
|
DialogContent.displayName = "DialogContent";
|
|
75
80
|
|
|
@@ -138,7 +143,6 @@ export {
|
|
|
138
143
|
DialogFooter,
|
|
139
144
|
DialogHeader,
|
|
140
145
|
DialogOverlay,
|
|
141
|
-
DialogPortal,
|
|
142
146
|
DialogTitle,
|
|
143
147
|
DialogTrigger,
|
|
144
148
|
};
|
|
@@ -14,6 +14,7 @@ import type {} from "@radix-ui/react-dialog";
|
|
|
14
14
|
import { Drawer as DrawerPrimitive } from "vaul";
|
|
15
15
|
|
|
16
16
|
import { cn } from "../../lib/utils";
|
|
17
|
+
import { ThemeWrapper } from "./theme-provider";
|
|
17
18
|
|
|
18
19
|
function Drawer({
|
|
19
20
|
...props
|
|
@@ -30,7 +31,7 @@ const DrawerTrigger = React.forwardRef<
|
|
|
30
31
|
));
|
|
31
32
|
DrawerTrigger.displayName = "DrawerTrigger";
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
|
|
34
35
|
|
|
35
36
|
const DrawerClose = React.forwardRef<
|
|
36
37
|
React.ElementRef<typeof DrawerPrimitive.Close>,
|
|
@@ -58,23 +59,27 @@ DrawerOverlay.displayName = "DrawerOverlay";
|
|
|
58
59
|
|
|
59
60
|
const DrawerContent = React.forwardRef<
|
|
60
61
|
React.ElementRef<typeof DrawerPrimitive.Content>,
|
|
61
|
-
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
62
|
+
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content> & {
|
|
63
|
+
container?: React.ComponentProps<typeof DrawerPrimitive.Portal>["container"];
|
|
64
|
+
}
|
|
65
|
+
>(({ className, children, container, ...props }, ref) => (
|
|
66
|
+
<DrawerPrimitive.Portal container={container}>
|
|
67
|
+
<ThemeWrapper>
|
|
68
|
+
<DrawerOverlay />
|
|
69
|
+
<DrawerPrimitive.Content
|
|
70
|
+
ref={ref}
|
|
71
|
+
data-slot="drawer-content"
|
|
72
|
+
className={cn(
|
|
73
|
+
"group/drawer-content fixed z-50 flex h-auto flex-col bg-popover text-sm text-popover-foreground data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-r-xl data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-l-xl data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm",
|
|
74
|
+
className,
|
|
75
|
+
)}
|
|
76
|
+
{...props}
|
|
77
|
+
>
|
|
78
|
+
<div className="mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" />
|
|
79
|
+
{children}
|
|
80
|
+
</DrawerPrimitive.Content>
|
|
81
|
+
</ThemeWrapper>
|
|
82
|
+
</DrawerPrimitive.Portal>
|
|
78
83
|
));
|
|
79
84
|
DrawerContent.displayName = "DrawerContent";
|
|
80
85
|
|
|
@@ -144,7 +149,6 @@ export {
|
|
|
144
149
|
DrawerFooter,
|
|
145
150
|
DrawerHeader,
|
|
146
151
|
DrawerOverlay,
|
|
147
|
-
DrawerPortal,
|
|
148
152
|
DrawerTitle,
|
|
149
153
|
DrawerTrigger,
|
|
150
154
|
};
|
|
@@ -13,6 +13,7 @@ import { Menu as MenuPrimitive } from "@base-ui/react/menu";
|
|
|
13
13
|
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
14
14
|
|
|
15
15
|
import { cn } from "../../lib/utils";
|
|
16
|
+
import { ThemeWrapper } from "./theme-provider";
|
|
16
17
|
|
|
17
18
|
export type DropdownMenuVariant = "destructive";
|
|
18
19
|
|
|
@@ -21,8 +22,7 @@ function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {
|
|
|
21
22
|
}
|
|
22
23
|
DropdownMenu.displayName = "DropdownMenu";
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
DropdownMenuPortal.displayName = "DropdownMenuPortal";
|
|
25
|
+
|
|
26
26
|
|
|
27
27
|
const DropdownMenuTrigger = React.forwardRef<
|
|
28
28
|
HTMLButtonElement,
|
|
@@ -37,32 +37,36 @@ const DropdownMenuTrigger = React.forwardRef<
|
|
|
37
37
|
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
38
38
|
|
|
39
39
|
const DropdownMenuContent = React.forwardRef<
|
|
40
|
-
|
|
41
|
-
MenuPrimitive.Popup
|
|
40
|
+
HTMLDivElement,
|
|
41
|
+
React.ComponentPropsWithoutRef<typeof MenuPrimitive.Popup> &
|
|
42
42
|
Pick<
|
|
43
|
-
MenuPrimitive.Positioner
|
|
43
|
+
React.ComponentPropsWithoutRef<typeof MenuPrimitive.Positioner>,
|
|
44
44
|
"align" | "alignOffset" | "side" | "sideOffset"
|
|
45
|
-
>
|
|
45
|
+
> & {
|
|
46
|
+
container?: React.ComponentProps<typeof MenuPrimitive.Portal>["container"];
|
|
47
|
+
}
|
|
46
48
|
>(
|
|
47
49
|
(
|
|
48
50
|
{
|
|
51
|
+
className,
|
|
52
|
+
sideOffset = 4,
|
|
53
|
+
side = "bottom",
|
|
49
54
|
align = "start",
|
|
50
55
|
alignOffset = 0,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
className,
|
|
56
|
+
container,
|
|
57
|
+
children,
|
|
54
58
|
...props
|
|
55
59
|
},
|
|
56
60
|
ref,
|
|
57
|
-
) =>
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
) => (
|
|
62
|
+
<MenuPrimitive.Portal container={container}>
|
|
63
|
+
<ThemeWrapper>
|
|
60
64
|
<MenuPrimitive.Positioner
|
|
61
|
-
className="isolate z-50 outline-none"
|
|
62
65
|
align={align}
|
|
63
66
|
alignOffset={alignOffset}
|
|
64
67
|
side={side}
|
|
65
68
|
sideOffset={sideOffset}
|
|
69
|
+
className="isolate z-50 outline-none"
|
|
66
70
|
>
|
|
67
71
|
<MenuPrimitive.Popup
|
|
68
72
|
ref={ref}
|
|
@@ -72,11 +76,13 @@ const DropdownMenuContent = React.forwardRef<
|
|
|
72
76
|
className,
|
|
73
77
|
)}
|
|
74
78
|
{...props}
|
|
75
|
-
|
|
79
|
+
>
|
|
80
|
+
{children}
|
|
81
|
+
</MenuPrimitive.Popup>
|
|
76
82
|
</MenuPrimitive.Positioner>
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
83
|
+
</ThemeWrapper>
|
|
84
|
+
</MenuPrimitive.Portal>
|
|
85
|
+
),
|
|
80
86
|
);
|
|
81
87
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
82
88
|
|
|
@@ -294,7 +300,6 @@ export {
|
|
|
294
300
|
DropdownMenuGroup,
|
|
295
301
|
DropdownMenuItem,
|
|
296
302
|
DropdownMenuLabel,
|
|
297
|
-
DropdownMenuPortal,
|
|
298
303
|
DropdownMenuRadioGroup,
|
|
299
304
|
DropdownMenuRadioItem,
|
|
300
305
|
DropdownMenuSeparator,
|
|
@@ -12,6 +12,7 @@ import * as React from "react";
|
|
|
12
12
|
import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card";
|
|
13
13
|
|
|
14
14
|
import { cn } from "../../lib/utils";
|
|
15
|
+
import { ThemeWrapper } from "./theme-provider";
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* @description For sighted users to preview content available behind a link.
|
|
@@ -38,15 +39,17 @@ const HoverCardTrigger = React.forwardRef<
|
|
|
38
39
|
));
|
|
39
40
|
HoverCardTrigger.displayName = "HoverCardTrigger";
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
|
|
42
43
|
|
|
43
44
|
const HoverCardContent = React.forwardRef<
|
|
44
|
-
|
|
45
|
+
HTMLDivElement,
|
|
45
46
|
React.ComponentPropsWithoutRef<typeof PreviewCardPrimitive.Popup> &
|
|
46
47
|
Pick<
|
|
47
48
|
React.ComponentPropsWithoutRef<typeof PreviewCardPrimitive.Positioner>,
|
|
48
49
|
"align" | "alignOffset" | "side" | "sideOffset"
|
|
49
|
-
>
|
|
50
|
+
> & {
|
|
51
|
+
container?: React.ComponentProps<typeof PreviewCardPrimitive.Portal>["container"];
|
|
52
|
+
}
|
|
50
53
|
>(
|
|
51
54
|
(
|
|
52
55
|
{
|
|
@@ -55,33 +58,38 @@ const HoverCardContent = React.forwardRef<
|
|
|
55
58
|
sideOffset = 4,
|
|
56
59
|
align = "center",
|
|
57
60
|
alignOffset = 4,
|
|
61
|
+
container,
|
|
58
62
|
...props
|
|
59
63
|
},
|
|
60
64
|
ref,
|
|
61
65
|
) => {
|
|
62
66
|
return (
|
|
63
|
-
<PreviewCardPrimitive.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
67
|
+
<PreviewCardPrimitive.Portal container={container}>
|
|
68
|
+
<ThemeWrapper>
|
|
69
|
+
<PreviewCardPrimitive.Positioner
|
|
70
|
+
align={align}
|
|
71
|
+
alignOffset={alignOffset}
|
|
72
|
+
side={side}
|
|
73
|
+
sideOffset={sideOffset}
|
|
74
|
+
className="isolate"
|
|
75
|
+
>
|
|
76
|
+
<PreviewCardPrimitive.Popup
|
|
77
|
+
ref={ref}
|
|
78
|
+
data-slot="hover-card-content"
|
|
79
|
+
className={cn(
|
|
80
|
+
"z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100",
|
|
81
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
82
|
+
"data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none motion-reduce:transition-none",
|
|
83
|
+
className,
|
|
84
|
+
)}
|
|
85
|
+
{...props}
|
|
86
|
+
/>
|
|
87
|
+
</PreviewCardPrimitive.Positioner>
|
|
88
|
+
</ThemeWrapper>
|
|
89
|
+
</PreviewCardPrimitive.Portal>
|
|
82
90
|
);
|
|
83
91
|
},
|
|
84
92
|
);
|
|
85
93
|
HoverCardContent.displayName = "HoverCardContent";
|
|
86
94
|
|
|
87
|
-
export { HoverCard, HoverCardContent,
|
|
95
|
+
export { HoverCard, HoverCardContent, HoverCardTrigger };
|
|
@@ -19,7 +19,6 @@ import {
|
|
|
19
19
|
DropdownMenuGroup,
|
|
20
20
|
DropdownMenuItem,
|
|
21
21
|
DropdownMenuLabel,
|
|
22
|
-
DropdownMenuPortal,
|
|
23
22
|
DropdownMenuRadioGroup,
|
|
24
23
|
DropdownMenuSeparator,
|
|
25
24
|
DropdownMenuShortcut,
|
|
@@ -64,12 +63,6 @@ function MenubarGroup({
|
|
|
64
63
|
return <DropdownMenuGroup data-slot="menubar-group" {...props} />;
|
|
65
64
|
}
|
|
66
65
|
|
|
67
|
-
function MenubarPortal({
|
|
68
|
-
...props
|
|
69
|
-
}: React.ComponentProps<typeof DropdownMenuPortal>) {
|
|
70
|
-
return <DropdownMenuPortal data-slot="menubar-portal" {...props} />;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
66
|
function MenubarTrigger({
|
|
74
67
|
className,
|
|
75
68
|
...props
|
|
@@ -291,7 +284,6 @@ export {
|
|
|
291
284
|
MenubarItem,
|
|
292
285
|
MenubarLabel,
|
|
293
286
|
MenubarMenu,
|
|
294
|
-
MenubarPortal,
|
|
295
287
|
MenubarRadioGroup,
|
|
296
288
|
MenubarRadioItem,
|
|
297
289
|
MenubarSeparator,
|