@open-slide/core 1.14.0 → 1.15.1
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/dist/{build-Dx-qTg82.js → build-DrkaQpAq.js} +1 -1
- package/dist/cli/bin.js +3 -3
- package/dist/{config-DvRA48y9.js → config-DKSETejG.js} +4 -1
- package/dist/{dev-BGXWqVUZ.js → dev-BxOIqyXR.js} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/{preview-CdQnIB39.js → preview-CazS8gpR.js} +1 -1
- package/dist/vite/index.js +1 -1
- package/package.json +2 -2
- package/src/app/components/asset-view.tsx +29 -10
- package/src/app/components/inspector/image-crop-dialog.tsx +3 -3
- package/src/app/components/inspector/inspect-overlay.tsx +44 -32
- package/src/app/components/inspector/inspector-panel.tsx +31 -26
- package/src/app/components/language-toggle.tsx +1 -1
- package/src/app/components/overview-grid.tsx +14 -12
- package/src/app/components/present/control-bar.tsx +24 -21
- package/src/app/components/present/progress-bar.tsx +1 -1
- package/src/app/components/sidebar/folder-item.tsx +26 -22
- package/src/app/components/sidebar/icon-picker.tsx +8 -8
- package/src/app/components/sidebar/sidebar-footer.tsx +2 -2
- package/src/app/components/sidebar/sidebar.tsx +22 -18
- package/src/app/components/style-panel/style-panel.tsx +8 -4
- package/src/app/components/theme-toggle.tsx +3 -3
- package/src/app/components/themes/theme-detail.tsx +2 -2
- package/src/app/components/themes/themes-gallery.tsx +1 -1
- package/src/app/components/thumbnail-rail.tsx +67 -63
- package/src/app/components/ui/badge.tsx +16 -13
- package/src/app/components/ui/button.tsx +4 -10
- package/src/app/components/ui/context-menu.tsx +46 -36
- package/src/app/components/ui/dialog.tsx +11 -13
- package/src/app/components/ui/dropdown-menu.tsx +59 -37
- package/src/app/components/ui/label.tsx +2 -5
- package/src/app/components/ui/popover.tsx +25 -18
- package/src/app/components/ui/progress.tsx +8 -6
- package/src/app/components/ui/scroll-area.tsx +5 -5
- package/src/app/components/ui/select.tsx +40 -41
- package/src/app/components/ui/separator.tsx +3 -5
- package/src/app/components/ui/slider.tsx +25 -18
- package/src/app/components/ui/tabs.tsx +8 -8
- package/src/app/components/ui/toggle-group.tsx +8 -7
- package/src/app/components/ui/toggle.tsx +5 -5
- package/src/app/components/ui/tooltip.tsx +39 -22
- package/src/app/routes/home-shell.tsx +24 -20
- package/src/app/routes/home.tsx +48 -42
- package/src/app/routes/presenter.tsx +1 -1
- package/src/app/routes/slide.tsx +54 -47
- package/src/app/styles.css +86 -110
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';
|
|
5
|
-
import { ContextMenu as ContextMenuPrimitive } from '
|
|
5
|
+
import { ContextMenu as ContextMenuPrimitive } from '@base-ui/react/context-menu';
|
|
6
6
|
|
|
7
7
|
import { cn } from '@/lib/utils';
|
|
8
8
|
|
|
@@ -24,8 +24,8 @@ function ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenu
|
|
|
24
24
|
return <ContextMenuPrimitive.Portal data-slot="context-menu-portal" {...props} />;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.
|
|
28
|
-
return <ContextMenuPrimitive.
|
|
27
|
+
function ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubmenuRoot>) {
|
|
28
|
+
return <ContextMenuPrimitive.SubmenuRoot data-slot="context-menu-sub" {...props} />;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
function ContextMenuRadioGroup({
|
|
@@ -39,60 +39,70 @@ function ContextMenuSubTrigger({
|
|
|
39
39
|
inset,
|
|
40
40
|
children,
|
|
41
41
|
...props
|
|
42
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.
|
|
42
|
+
}: React.ComponentProps<typeof ContextMenuPrimitive.SubmenuTrigger> & {
|
|
43
43
|
inset?: boolean;
|
|
44
44
|
}) {
|
|
45
45
|
return (
|
|
46
|
-
<ContextMenuPrimitive.
|
|
46
|
+
<ContextMenuPrimitive.SubmenuTrigger
|
|
47
47
|
data-slot="context-menu-sub-trigger"
|
|
48
48
|
data-inset={inset}
|
|
49
49
|
className={cn(
|
|
50
|
-
'flex cursor-default items-center gap-2 rounded-[5px] px-2 py-1.5 text-[12.5px] outline-hidden select-none focus:bg-foreground focus:text-background data-[inset]:pl-8 data-
|
|
50
|
+
'flex cursor-default items-center gap-2 rounded-[5px] px-2 py-1.5 text-[12.5px] outline-hidden select-none focus:bg-foreground focus:text-background data-[inset]:pl-8 data-popup-open:bg-muted',
|
|
51
51
|
className,
|
|
52
52
|
)}
|
|
53
53
|
{...props}
|
|
54
54
|
>
|
|
55
55
|
{children}
|
|
56
56
|
<ChevronRightIcon className="ml-auto size-3.5 opacity-60" />
|
|
57
|
-
</ContextMenuPrimitive.
|
|
57
|
+
</ContextMenuPrimitive.SubmenuTrigger>
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
function ContextMenuSubContent({
|
|
62
62
|
className,
|
|
63
63
|
...props
|
|
64
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.
|
|
64
|
+
}: React.ComponentProps<typeof ContextMenuPrimitive.Popup>) {
|
|
65
65
|
return (
|
|
66
|
-
<ContextMenuPrimitive.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
className
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
<ContextMenuPrimitive.Portal>
|
|
67
|
+
<ContextMenuPrimitive.Positioner
|
|
68
|
+
align="start"
|
|
69
|
+
alignOffset={4}
|
|
70
|
+
side="right"
|
|
71
|
+
sideOffset={0}
|
|
72
|
+
className="isolate z-50 outline-none"
|
|
73
|
+
>
|
|
74
|
+
<ContextMenuPrimitive.Popup
|
|
75
|
+
data-slot="context-menu-sub-content"
|
|
76
|
+
className={cn(
|
|
77
|
+
'z-50 min-w-[9rem] overflow-hidden rounded-[8px] border border-border bg-popover p-1 text-popover-foreground shadow-floating outline-none',
|
|
78
|
+
'transition-[transform,scale,opacity] data-starting-style:scale-95 data-starting-style:opacity-0 data-ending-style:scale-95 data-ending-style:opacity-0',
|
|
79
|
+
className,
|
|
80
|
+
)}
|
|
81
|
+
{...props}
|
|
82
|
+
/>
|
|
83
|
+
</ContextMenuPrimitive.Positioner>
|
|
84
|
+
</ContextMenuPrimitive.Portal>
|
|
76
85
|
);
|
|
77
86
|
}
|
|
78
87
|
|
|
79
88
|
function ContextMenuContent({
|
|
80
89
|
className,
|
|
81
90
|
...props
|
|
82
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.
|
|
91
|
+
}: React.ComponentProps<typeof ContextMenuPrimitive.Popup>) {
|
|
83
92
|
return (
|
|
84
93
|
<ContextMenuPrimitive.Portal>
|
|
85
|
-
<ContextMenuPrimitive.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
<ContextMenuPrimitive.Positioner className="isolate z-50 outline-none">
|
|
95
|
+
<ContextMenuPrimitive.Popup
|
|
96
|
+
data-slot="context-menu-content"
|
|
97
|
+
className={cn(
|
|
98
|
+
'z-50 max-h-(--available-height) min-w-[9rem] origin-(--transform-origin)',
|
|
99
|
+
'overflow-x-hidden overflow-y-auto rounded-[8px] border border-border bg-popover p-1 text-popover-foreground shadow-floating outline-none',
|
|
100
|
+
'transition-[transform,scale,opacity] data-starting-style:scale-95 data-starting-style:opacity-0 data-ending-style:scale-95 data-ending-style:opacity-0',
|
|
101
|
+
className,
|
|
102
|
+
)}
|
|
103
|
+
{...props}
|
|
104
|
+
/>
|
|
105
|
+
</ContextMenuPrimitive.Positioner>
|
|
96
106
|
</ContextMenuPrimitive.Portal>
|
|
97
107
|
);
|
|
98
108
|
}
|
|
@@ -142,9 +152,9 @@ function ContextMenuCheckboxItem({
|
|
|
142
152
|
{...props}
|
|
143
153
|
>
|
|
144
154
|
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
145
|
-
<ContextMenuPrimitive.
|
|
155
|
+
<ContextMenuPrimitive.CheckboxItemIndicator>
|
|
146
156
|
<CheckIcon className="size-3.5" />
|
|
147
|
-
</ContextMenuPrimitive.
|
|
157
|
+
</ContextMenuPrimitive.CheckboxItemIndicator>
|
|
148
158
|
</span>
|
|
149
159
|
{children}
|
|
150
160
|
</ContextMenuPrimitive.CheckboxItem>
|
|
@@ -166,9 +176,9 @@ function ContextMenuRadioItem({
|
|
|
166
176
|
{...props}
|
|
167
177
|
>
|
|
168
178
|
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
169
|
-
<ContextMenuPrimitive.
|
|
179
|
+
<ContextMenuPrimitive.RadioItemIndicator>
|
|
170
180
|
<CircleIcon className="size-2 fill-current" />
|
|
171
|
-
</ContextMenuPrimitive.
|
|
181
|
+
</ContextMenuPrimitive.RadioItemIndicator>
|
|
172
182
|
</span>
|
|
173
183
|
{children}
|
|
174
184
|
</ContextMenuPrimitive.RadioItem>
|
|
@@ -179,11 +189,11 @@ function ContextMenuLabel({
|
|
|
179
189
|
className,
|
|
180
190
|
inset,
|
|
181
191
|
...props
|
|
182
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.
|
|
192
|
+
}: React.ComponentProps<typeof ContextMenuPrimitive.GroupLabel> & {
|
|
183
193
|
inset?: boolean;
|
|
184
194
|
}) {
|
|
185
195
|
return (
|
|
186
|
-
<ContextMenuPrimitive.
|
|
196
|
+
<ContextMenuPrimitive.GroupLabel
|
|
187
197
|
data-slot="context-menu-label"
|
|
188
198
|
data-inset={inset}
|
|
189
199
|
className={cn('eyebrow px-2 py-1.5 data-[inset]:pl-8', className)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { XIcon } from 'lucide-react';
|
|
2
|
-
import { Dialog as DialogPrimitive } from '
|
|
2
|
+
import { Dialog as DialogPrimitive } from '@base-ui/react/dialog';
|
|
3
3
|
import type * as React from 'react';
|
|
4
4
|
import { Button } from '@/components/ui/button';
|
|
5
5
|
import { cn } from '@/lib/utils';
|
|
@@ -23,12 +23,12 @@ function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.C
|
|
|
23
23
|
function DialogOverlay({
|
|
24
24
|
className,
|
|
25
25
|
...props
|
|
26
|
-
}: React.ComponentProps<typeof DialogPrimitive.
|
|
26
|
+
}: React.ComponentProps<typeof DialogPrimitive.Backdrop>) {
|
|
27
27
|
return (
|
|
28
|
-
<DialogPrimitive.
|
|
28
|
+
<DialogPrimitive.Backdrop
|
|
29
29
|
data-slot="dialog-overlay"
|
|
30
30
|
className={cn(
|
|
31
|
-
'fixed inset-0 z-50 bg-foreground/35 backdrop-blur-[2px]
|
|
31
|
+
'fixed inset-0 z-50 bg-foreground/35 backdrop-blur-[2px] transition-opacity data-starting-style:opacity-0 data-ending-style:opacity-0',
|
|
32
32
|
className,
|
|
33
33
|
)}
|
|
34
34
|
{...props}
|
|
@@ -42,14 +42,14 @@ function DialogContent({
|
|
|
42
42
|
showCloseButton = true,
|
|
43
43
|
container,
|
|
44
44
|
...props
|
|
45
|
-
}: React.ComponentProps<typeof DialogPrimitive.
|
|
45
|
+
}: React.ComponentProps<typeof DialogPrimitive.Popup> & {
|
|
46
46
|
showCloseButton?: boolean;
|
|
47
47
|
container?: React.ComponentProps<typeof DialogPrimitive.Portal>['container'];
|
|
48
48
|
}) {
|
|
49
49
|
return (
|
|
50
50
|
<DialogPortal data-slot="dialog-portal" container={container}>
|
|
51
51
|
<DialogOverlay />
|
|
52
|
-
<DialogPrimitive.
|
|
52
|
+
<DialogPrimitive.Popup
|
|
53
53
|
data-slot="dialog-content"
|
|
54
54
|
className={cn(
|
|
55
55
|
// Crisp paper card with hairline edge + soft drop. No oversized
|
|
@@ -57,9 +57,9 @@ function DialogContent({
|
|
|
57
57
|
'fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-5',
|
|
58
58
|
'rounded-[10px] border border-border bg-card p-6 text-card-foreground',
|
|
59
59
|
'shadow-overlay outline-none',
|
|
60
|
-
'
|
|
61
|
-
'data-
|
|
62
|
-
'
|
|
60
|
+
'transition-[transform,scale,opacity] duration-200',
|
|
61
|
+
'data-starting-style:scale-95 data-starting-style:opacity-0 data-ending-style:scale-95 data-ending-style:opacity-0',
|
|
62
|
+
'sm:max-w-md',
|
|
63
63
|
className,
|
|
64
64
|
)}
|
|
65
65
|
{...props}
|
|
@@ -75,7 +75,7 @@ function DialogContent({
|
|
|
75
75
|
<span className="sr-only">Close</span>
|
|
76
76
|
</DialogPrimitive.Close>
|
|
77
77
|
)}
|
|
78
|
-
</DialogPrimitive.
|
|
78
|
+
</DialogPrimitive.Popup>
|
|
79
79
|
</DialogPortal>
|
|
80
80
|
);
|
|
81
81
|
}
|
|
@@ -109,9 +109,7 @@ function DialogFooter({
|
|
|
109
109
|
>
|
|
110
110
|
{children}
|
|
111
111
|
{showCloseButton && (
|
|
112
|
-
<DialogPrimitive.Close
|
|
113
|
-
<Button variant="outline">Close</Button>
|
|
114
|
-
</DialogPrimitive.Close>
|
|
112
|
+
<DialogPrimitive.Close render={<Button variant="outline">Close</Button>} />
|
|
115
113
|
)}
|
|
116
114
|
</div>
|
|
117
115
|
);
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';
|
|
5
|
-
import {
|
|
5
|
+
import { Menu as DropdownMenuPrimitive } from '@base-ui/react/menu';
|
|
6
6
|
|
|
7
7
|
import { cn } from '@/lib/utils';
|
|
8
8
|
|
|
9
|
+
type DropdownMenuPositionerProps = Pick<
|
|
10
|
+
React.ComponentProps<typeof DropdownMenuPrimitive.Positioner>,
|
|
11
|
+
'side' | 'sideOffset' | 'align' | 'alignOffset'
|
|
12
|
+
>;
|
|
13
|
+
|
|
9
14
|
function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
|
|
10
15
|
return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />;
|
|
11
16
|
}
|
|
@@ -24,24 +29,32 @@ function DropdownMenuTrigger({
|
|
|
24
29
|
|
|
25
30
|
function DropdownMenuContent({
|
|
26
31
|
className,
|
|
32
|
+
side,
|
|
27
33
|
sideOffset = 6,
|
|
34
|
+
align,
|
|
35
|
+
alignOffset,
|
|
28
36
|
...props
|
|
29
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.
|
|
37
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Popup> & DropdownMenuPositionerProps) {
|
|
30
38
|
return (
|
|
31
39
|
<DropdownMenuPrimitive.Portal>
|
|
32
|
-
<DropdownMenuPrimitive.
|
|
33
|
-
|
|
40
|
+
<DropdownMenuPrimitive.Positioner
|
|
41
|
+
side={side}
|
|
34
42
|
sideOffset={sideOffset}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
className
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
align={align}
|
|
44
|
+
alignOffset={alignOffset}
|
|
45
|
+
className="isolate z-50 outline-none"
|
|
46
|
+
>
|
|
47
|
+
<DropdownMenuPrimitive.Popup
|
|
48
|
+
data-slot="dropdown-menu-content"
|
|
49
|
+
className={cn(
|
|
50
|
+
'z-50 max-h-(--available-height) min-w-[9rem] origin-(--transform-origin)',
|
|
51
|
+
'overflow-x-hidden overflow-y-auto rounded-[8px] border border-border bg-popover p-1 text-popover-foreground shadow-floating outline-none',
|
|
52
|
+
'transition-[transform,scale,opacity] data-starting-style:scale-95 data-starting-style:opacity-0 data-ending-style:scale-95 data-ending-style:opacity-0',
|
|
53
|
+
className,
|
|
54
|
+
)}
|
|
55
|
+
{...props}
|
|
56
|
+
/>
|
|
57
|
+
</DropdownMenuPrimitive.Positioner>
|
|
45
58
|
</DropdownMenuPrimitive.Portal>
|
|
46
59
|
);
|
|
47
60
|
}
|
|
@@ -95,9 +108,9 @@ function DropdownMenuCheckboxItem({
|
|
|
95
108
|
{...props}
|
|
96
109
|
>
|
|
97
110
|
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
98
|
-
<DropdownMenuPrimitive.
|
|
111
|
+
<DropdownMenuPrimitive.CheckboxItemIndicator>
|
|
99
112
|
<CheckIcon className="size-3.5" />
|
|
100
|
-
</DropdownMenuPrimitive.
|
|
113
|
+
</DropdownMenuPrimitive.CheckboxItemIndicator>
|
|
101
114
|
</span>
|
|
102
115
|
{children}
|
|
103
116
|
</DropdownMenuPrimitive.CheckboxItem>
|
|
@@ -125,9 +138,9 @@ function DropdownMenuRadioItem({
|
|
|
125
138
|
{...props}
|
|
126
139
|
>
|
|
127
140
|
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
128
|
-
<DropdownMenuPrimitive.
|
|
141
|
+
<DropdownMenuPrimitive.RadioItemIndicator>
|
|
129
142
|
<CircleIcon className="size-2 fill-current" />
|
|
130
|
-
</DropdownMenuPrimitive.
|
|
143
|
+
</DropdownMenuPrimitive.RadioItemIndicator>
|
|
131
144
|
</span>
|
|
132
145
|
{children}
|
|
133
146
|
</DropdownMenuPrimitive.RadioItem>
|
|
@@ -138,11 +151,11 @@ function DropdownMenuLabel({
|
|
|
138
151
|
className,
|
|
139
152
|
inset,
|
|
140
153
|
...props
|
|
141
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.
|
|
154
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.GroupLabel> & {
|
|
142
155
|
inset?: boolean;
|
|
143
156
|
}) {
|
|
144
157
|
return (
|
|
145
|
-
<DropdownMenuPrimitive.
|
|
158
|
+
<DropdownMenuPrimitive.GroupLabel
|
|
146
159
|
data-slot="dropdown-menu-label"
|
|
147
160
|
data-inset={inset}
|
|
148
161
|
className={cn(
|
|
@@ -180,8 +193,8 @@ function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'spa
|
|
|
180
193
|
);
|
|
181
194
|
}
|
|
182
195
|
|
|
183
|
-
function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.
|
|
184
|
-
return <DropdownMenuPrimitive.
|
|
196
|
+
function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubmenuRoot>) {
|
|
197
|
+
return <DropdownMenuPrimitive.SubmenuRoot data-slot="dropdown-menu-sub" {...props} />;
|
|
185
198
|
}
|
|
186
199
|
|
|
187
200
|
function DropdownMenuSubTrigger({
|
|
@@ -189,40 +202,49 @@ function DropdownMenuSubTrigger({
|
|
|
189
202
|
inset,
|
|
190
203
|
children,
|
|
191
204
|
...props
|
|
192
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.
|
|
205
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubmenuTrigger> & {
|
|
193
206
|
inset?: boolean;
|
|
194
207
|
}) {
|
|
195
208
|
return (
|
|
196
|
-
<DropdownMenuPrimitive.
|
|
209
|
+
<DropdownMenuPrimitive.SubmenuTrigger
|
|
197
210
|
data-slot="dropdown-menu-sub-trigger"
|
|
198
211
|
data-inset={inset}
|
|
199
212
|
className={cn(
|
|
200
|
-
'flex cursor-default items-center gap-2 rounded-[5px] px-2 py-1.5 text-[12.5px] outline-hidden select-none focus:bg-foreground focus:text-background data-[inset]:pl-8 data-
|
|
213
|
+
'flex cursor-default items-center gap-2 rounded-[5px] px-2 py-1.5 text-[12.5px] outline-hidden select-none focus:bg-foreground focus:text-background data-[inset]:pl-8 data-popup-open:bg-muted',
|
|
201
214
|
className,
|
|
202
215
|
)}
|
|
203
216
|
{...props}
|
|
204
217
|
>
|
|
205
218
|
{children}
|
|
206
219
|
<ChevronRightIcon className="ml-auto size-3.5 opacity-60" />
|
|
207
|
-
</DropdownMenuPrimitive.
|
|
220
|
+
</DropdownMenuPrimitive.SubmenuTrigger>
|
|
208
221
|
);
|
|
209
222
|
}
|
|
210
223
|
|
|
211
224
|
function DropdownMenuSubContent({
|
|
212
225
|
className,
|
|
213
226
|
...props
|
|
214
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.
|
|
227
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Popup>) {
|
|
215
228
|
return (
|
|
216
|
-
<DropdownMenuPrimitive.
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
className
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
229
|
+
<DropdownMenuPrimitive.Portal>
|
|
230
|
+
<DropdownMenuPrimitive.Positioner
|
|
231
|
+
align="start"
|
|
232
|
+
alignOffset={-3}
|
|
233
|
+
side="right"
|
|
234
|
+
sideOffset={0}
|
|
235
|
+
className="isolate z-50 outline-none"
|
|
236
|
+
>
|
|
237
|
+
<DropdownMenuPrimitive.Popup
|
|
238
|
+
data-slot="dropdown-menu-sub-content"
|
|
239
|
+
className={cn(
|
|
240
|
+
'z-50 min-w-[9rem] overflow-hidden rounded-[8px] border border-border bg-popover p-1 text-popover-foreground shadow-floating outline-none',
|
|
241
|
+
'transition-[transform,scale,opacity] data-starting-style:scale-95 data-starting-style:opacity-0 data-ending-style:scale-95 data-ending-style:opacity-0',
|
|
242
|
+
className,
|
|
243
|
+
)}
|
|
244
|
+
{...props}
|
|
245
|
+
/>
|
|
246
|
+
</DropdownMenuPrimitive.Positioner>
|
|
247
|
+
</DropdownMenuPrimitive.Portal>
|
|
226
248
|
);
|
|
227
249
|
}
|
|
228
250
|
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
1
|
import * as React from "react"
|
|
4
|
-
import { Label as LabelPrimitive } from "radix-ui"
|
|
5
2
|
|
|
6
3
|
import { cn } from "@/lib/utils"
|
|
7
4
|
|
|
8
5
|
function Label({
|
|
9
6
|
className,
|
|
10
7
|
...props
|
|
11
|
-
}: React.ComponentProps<
|
|
8
|
+
}: React.ComponentProps<"label">) {
|
|
12
9
|
return (
|
|
13
|
-
<
|
|
10
|
+
<label
|
|
14
11
|
data-slot="label"
|
|
15
12
|
className={cn(
|
|
16
13
|
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Popover as PopoverPrimitive } from '
|
|
2
|
+
import { Popover as PopoverPrimitive } from '@base-ui/react/popover';
|
|
3
3
|
|
|
4
4
|
import { cn } from '@/lib/utils';
|
|
5
5
|
|
|
@@ -13,33 +13,41 @@ function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimiti
|
|
|
13
13
|
|
|
14
14
|
function PopoverContent({
|
|
15
15
|
className,
|
|
16
|
+
side,
|
|
16
17
|
align = 'center',
|
|
17
18
|
sideOffset = 6,
|
|
19
|
+
alignOffset,
|
|
20
|
+
collisionPadding,
|
|
18
21
|
...props
|
|
19
|
-
}: React.ComponentProps<typeof PopoverPrimitive.
|
|
22
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Popup> &
|
|
23
|
+
Pick<
|
|
24
|
+
React.ComponentProps<typeof PopoverPrimitive.Positioner>,
|
|
25
|
+
'side' | 'sideOffset' | 'align' | 'alignOffset' | 'collisionPadding'
|
|
26
|
+
>) {
|
|
20
27
|
return (
|
|
21
28
|
<PopoverPrimitive.Portal>
|
|
22
|
-
<PopoverPrimitive.
|
|
23
|
-
|
|
29
|
+
<PopoverPrimitive.Positioner
|
|
30
|
+
side={side}
|
|
24
31
|
align={align}
|
|
25
32
|
sideOffset={sideOffset}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
alignOffset={alignOffset}
|
|
34
|
+
collisionPadding={collisionPadding}
|
|
35
|
+
className="isolate z-50"
|
|
36
|
+
>
|
|
37
|
+
<PopoverPrimitive.Popup
|
|
38
|
+
data-slot="popover-content"
|
|
39
|
+
className={cn(
|
|
40
|
+
'w-72 origin-(--transform-origin) rounded-[8px] border border-border bg-popover p-3 text-popover-foreground shadow-floating outline-hidden',
|
|
41
|
+
'transition-[transform,scale,opacity] data-starting-style:scale-95 data-starting-style:opacity-0 data-ending-style:scale-95 data-ending-style:opacity-0',
|
|
42
|
+
className,
|
|
43
|
+
)}
|
|
44
|
+
{...props}
|
|
45
|
+
/>
|
|
46
|
+
</PopoverPrimitive.Positioner>
|
|
35
47
|
</PopoverPrimitive.Portal>
|
|
36
48
|
);
|
|
37
49
|
}
|
|
38
50
|
|
|
39
|
-
function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
|
|
40
|
-
return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
51
|
function PopoverHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
44
52
|
return (
|
|
45
53
|
<div
|
|
@@ -68,7 +76,6 @@ export {
|
|
|
68
76
|
Popover,
|
|
69
77
|
PopoverTrigger,
|
|
70
78
|
PopoverContent,
|
|
71
|
-
PopoverAnchor,
|
|
72
79
|
PopoverHeader,
|
|
73
80
|
PopoverTitle,
|
|
74
81
|
PopoverDescription,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
3
|
import * as React from "react"
|
|
4
|
-
import { Progress as ProgressPrimitive } from "
|
|
4
|
+
import { Progress as ProgressPrimitive } from "@base-ui/react/progress"
|
|
5
5
|
|
|
6
6
|
import { cn } from "@/lib/utils"
|
|
7
7
|
|
|
@@ -13,17 +13,19 @@ function Progress({
|
|
|
13
13
|
return (
|
|
14
14
|
<ProgressPrimitive.Root
|
|
15
15
|
data-slot="progress"
|
|
16
|
+
value={value}
|
|
16
17
|
className={cn(
|
|
17
18
|
"relative h-[3px] w-full overflow-hidden rounded-full bg-muted",
|
|
18
19
|
className
|
|
19
20
|
)}
|
|
20
21
|
{...props}
|
|
21
22
|
>
|
|
22
|
-
<ProgressPrimitive.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
<ProgressPrimitive.Track className="h-full w-full">
|
|
24
|
+
<ProgressPrimitive.Indicator
|
|
25
|
+
data-slot="progress-indicator"
|
|
26
|
+
className="h-full bg-brand transition-all"
|
|
27
|
+
/>
|
|
28
|
+
</ProgressPrimitive.Track>
|
|
27
29
|
</ProgressPrimitive.Root>
|
|
28
30
|
)
|
|
29
31
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ScrollArea as ScrollAreaPrimitive } from '
|
|
2
|
+
import { ScrollArea as ScrollAreaPrimitive } from '@base-ui/react/scroll-area';
|
|
3
3
|
|
|
4
4
|
import { cn } from '@/lib/utils';
|
|
5
5
|
|
|
@@ -30,9 +30,9 @@ function ScrollBar({
|
|
|
30
30
|
className,
|
|
31
31
|
orientation = 'vertical',
|
|
32
32
|
...props
|
|
33
|
-
}: React.ComponentProps<typeof ScrollAreaPrimitive.
|
|
33
|
+
}: React.ComponentProps<typeof ScrollAreaPrimitive.Scrollbar>) {
|
|
34
34
|
return (
|
|
35
|
-
<ScrollAreaPrimitive.
|
|
35
|
+
<ScrollAreaPrimitive.Scrollbar
|
|
36
36
|
data-slot="scroll-area-scrollbar"
|
|
37
37
|
data-orientation={orientation}
|
|
38
38
|
orientation={orientation}
|
|
@@ -42,11 +42,11 @@ function ScrollBar({
|
|
|
42
42
|
)}
|
|
43
43
|
{...props}
|
|
44
44
|
>
|
|
45
|
-
<ScrollAreaPrimitive.
|
|
45
|
+
<ScrollAreaPrimitive.Thumb
|
|
46
46
|
data-slot="scroll-area-thumb"
|
|
47
47
|
className="relative flex-1 rounded-full bg-border"
|
|
48
48
|
/>
|
|
49
|
-
</ScrollAreaPrimitive.
|
|
49
|
+
</ScrollAreaPrimitive.Scrollbar>
|
|
50
50
|
);
|
|
51
51
|
}
|
|
52
52
|
|