@open-slide/core 1.13.6 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/{build-OAZ8maw5.js → build-BsaslS8C.js} +1 -1
  2. package/dist/cli/bin.js +3 -3
  3. package/dist/{config-CU_NISD6.js → config-BOc3-oDV.js} +38 -3
  4. package/dist/{config-CvzwK0tq.d.ts → config-CE2sKgqH.d.ts} +1 -1
  5. package/dist/dev-BU7OY0ai.js +94 -0
  6. package/dist/{format-CXtO6ORA.js → format-afijk371.js} +140 -8
  7. package/dist/index.d.ts +7 -7
  8. package/dist/index.js +4 -2
  9. package/dist/locale/index.d.ts +1 -1
  10. package/dist/locale/index.js +1 -1
  11. package/dist/{preview-DZLZ3L9v.js → preview-DbL7Wt77.js} +1 -1
  12. package/dist/{types-DucrShh9.d.ts → types-GA4ekcYB.d.ts} +37 -0
  13. package/dist/vite/index.d.ts +2 -2
  14. package/dist/vite/index.js +1 -1
  15. package/package.json +2 -2
  16. package/src/app/components/asset-view.tsx +762 -63
  17. package/src/app/components/inspector/image-crop-dialog.tsx +3 -3
  18. package/src/app/components/inspector/inspect-overlay.tsx +44 -32
  19. package/src/app/components/inspector/inspector-panel.tsx +31 -26
  20. package/src/app/components/language-toggle.tsx +1 -1
  21. package/src/app/components/overview-grid.tsx +14 -12
  22. package/src/app/components/present/control-bar.tsx +24 -21
  23. package/src/app/components/present/progress-bar.tsx +1 -1
  24. package/src/app/components/sidebar/folder-item.tsx +26 -22
  25. package/src/app/components/sidebar/icon-picker.tsx +8 -8
  26. package/src/app/components/sidebar/sidebar-footer.tsx +100 -31
  27. package/src/app/components/sidebar/sidebar.tsx +22 -18
  28. package/src/app/components/style-panel/style-panel.tsx +8 -4
  29. package/src/app/components/theme-toggle.tsx +3 -3
  30. package/src/app/components/themes/theme-detail.tsx +2 -2
  31. package/src/app/components/themes/themes-gallery.tsx +1 -1
  32. package/src/app/components/thumbnail-rail-scroll.test.ts +60 -0
  33. package/src/app/components/thumbnail-rail-scroll.ts +33 -0
  34. package/src/app/components/thumbnail-rail.tsx +235 -66
  35. package/src/app/components/ui/badge.tsx +16 -13
  36. package/src/app/components/ui/button.tsx +4 -10
  37. package/src/app/components/ui/context-menu.tsx +46 -36
  38. package/src/app/components/ui/dialog.tsx +11 -13
  39. package/src/app/components/ui/dropdown-menu.tsx +59 -37
  40. package/src/app/components/ui/label.tsx +2 -5
  41. package/src/app/components/ui/popover.tsx +25 -18
  42. package/src/app/components/ui/progress.tsx +8 -6
  43. package/src/app/components/ui/scroll-area.tsx +5 -5
  44. package/src/app/components/ui/select.tsx +40 -41
  45. package/src/app/components/ui/separator.tsx +3 -5
  46. package/src/app/components/ui/slider.tsx +25 -18
  47. package/src/app/components/ui/tabs.tsx +8 -8
  48. package/src/app/components/ui/toggle-group.tsx +8 -7
  49. package/src/app/components/ui/toggle.tsx +5 -5
  50. package/src/app/components/ui/tooltip.tsx +39 -22
  51. package/src/app/lib/asset-filter.test.ts +176 -0
  52. package/src/app/lib/asset-filter.ts +80 -0
  53. package/src/app/lib/assets.ts +19 -4
  54. package/src/app/routes/home-shell.tsx +24 -20
  55. package/src/app/routes/home.tsx +48 -42
  56. package/src/app/routes/presenter.tsx +1 -1
  57. package/src/app/routes/slide.tsx +54 -47
  58. package/src/app/styles.css +86 -110
  59. package/src/locale/en.ts +34 -1
  60. package/src/locale/ja.ts +34 -2
  61. package/src/locale/types.ts +37 -0
  62. package/src/locale/zh-cn.ts +34 -1
  63. package/src/locale/zh-tw.ts +34 -1
  64. package/dist/dev-C78J1TLR.js +0 -20
@@ -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 'radix-ui';
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.Sub>) {
28
- return <ContextMenuPrimitive.Sub data-slot="context-menu-sub" {...props} />;
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.SubTrigger> & {
42
+ }: React.ComponentProps<typeof ContextMenuPrimitive.SubmenuTrigger> & {
43
43
  inset?: boolean;
44
44
  }) {
45
45
  return (
46
- <ContextMenuPrimitive.SubTrigger
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-[state=open]:bg-muted',
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.SubTrigger>
57
+ </ContextMenuPrimitive.SubmenuTrigger>
58
58
  );
59
59
  }
60
60
 
61
61
  function ContextMenuSubContent({
62
62
  className,
63
63
  ...props
64
- }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {
64
+ }: React.ComponentProps<typeof ContextMenuPrimitive.Popup>) {
65
65
  return (
66
- <ContextMenuPrimitive.SubContent
67
- data-slot="context-menu-sub-content"
68
- className={cn(
69
- 'z-50 min-w-[9rem] overflow-hidden rounded-[8px] border border-border bg-popover p-1 text-popover-foreground shadow-floating',
70
- 'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95',
71
- 'data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
72
- className,
73
- )}
74
- {...props}
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.Content>) {
91
+ }: React.ComponentProps<typeof ContextMenuPrimitive.Popup>) {
83
92
  return (
84
93
  <ContextMenuPrimitive.Portal>
85
- <ContextMenuPrimitive.Content
86
- data-slot="context-menu-content"
87
- className={cn(
88
- 'z-50 max-h-(--radix-context-menu-content-available-height) min-w-[9rem] origin-(--radix-context-menu-content-transform-origin)',
89
- 'overflow-x-hidden overflow-y-auto rounded-[8px] border border-border bg-popover p-1 text-popover-foreground shadow-floating',
90
- 'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95',
91
- 'data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
92
- className,
93
- )}
94
- {...props}
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.ItemIndicator>
155
+ <ContextMenuPrimitive.CheckboxItemIndicator>
146
156
  <CheckIcon className="size-3.5" />
147
- </ContextMenuPrimitive.ItemIndicator>
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.ItemIndicator>
179
+ <ContextMenuPrimitive.RadioItemIndicator>
170
180
  <CircleIcon className="size-2 fill-current" />
171
- </ContextMenuPrimitive.ItemIndicator>
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.Label> & {
192
+ }: React.ComponentProps<typeof ContextMenuPrimitive.GroupLabel> & {
183
193
  inset?: boolean;
184
194
  }) {
185
195
  return (
186
- <ContextMenuPrimitive.Label
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 'radix-ui';
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.Overlay>) {
26
+ }: React.ComponentProps<typeof DialogPrimitive.Backdrop>) {
27
27
  return (
28
- <DialogPrimitive.Overlay
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] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0',
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.Content> & {
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.Content
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
- 'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95',
61
- 'data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
62
- 'duration-200 sm:max-w-md',
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.Content>
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 asChild>
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 { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';
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.Content>) {
37
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.Popup> & DropdownMenuPositionerProps) {
30
38
  return (
31
39
  <DropdownMenuPrimitive.Portal>
32
- <DropdownMenuPrimitive.Content
33
- data-slot="dropdown-menu-content"
40
+ <DropdownMenuPrimitive.Positioner
41
+ side={side}
34
42
  sideOffset={sideOffset}
35
- className={cn(
36
- 'z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[9rem] origin-(--radix-dropdown-menu-content-transform-origin)',
37
- 'overflow-x-hidden overflow-y-auto rounded-[8px] border border-border bg-popover p-1 text-popover-foreground shadow-floating',
38
- 'data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1',
39
- 'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95',
40
- 'data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
41
- className,
42
- )}
43
- {...props}
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.ItemIndicator>
111
+ <DropdownMenuPrimitive.CheckboxItemIndicator>
99
112
  <CheckIcon className="size-3.5" />
100
- </DropdownMenuPrimitive.ItemIndicator>
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.ItemIndicator>
141
+ <DropdownMenuPrimitive.RadioItemIndicator>
129
142
  <CircleIcon className="size-2 fill-current" />
130
- </DropdownMenuPrimitive.ItemIndicator>
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.Label> & {
154
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.GroupLabel> & {
142
155
  inset?: boolean;
143
156
  }) {
144
157
  return (
145
- <DropdownMenuPrimitive.Label
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.Sub>) {
184
- return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />;
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.SubTrigger> & {
205
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.SubmenuTrigger> & {
193
206
  inset?: boolean;
194
207
  }) {
195
208
  return (
196
- <DropdownMenuPrimitive.SubTrigger
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-[state=open]:bg-muted',
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.SubTrigger>
220
+ </DropdownMenuPrimitive.SubmenuTrigger>
208
221
  );
209
222
  }
210
223
 
211
224
  function DropdownMenuSubContent({
212
225
  className,
213
226
  ...props
214
- }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {
227
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.Popup>) {
215
228
  return (
216
- <DropdownMenuPrimitive.SubContent
217
- data-slot="dropdown-menu-sub-content"
218
- className={cn(
219
- 'z-50 min-w-[9rem] overflow-hidden rounded-[8px] border border-border bg-popover p-1 text-popover-foreground shadow-floating',
220
- 'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95',
221
- 'data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
222
- className,
223
- )}
224
- {...props}
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<typeof LabelPrimitive.Root>) {
8
+ }: React.ComponentProps<"label">) {
12
9
  return (
13
- <LabelPrimitive.Root
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 'radix-ui';
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.Content>) {
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.Content
23
- data-slot="popover-content"
29
+ <PopoverPrimitive.Positioner
30
+ side={side}
24
31
  align={align}
25
32
  sideOffset={sideOffset}
26
- className={cn(
27
- 'z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-[8px] border border-border bg-popover p-3 text-popover-foreground shadow-floating outline-hidden',
28
- 'data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1',
29
- 'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95',
30
- 'data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
31
- className,
32
- )}
33
- {...props}
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 "radix-ui"
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.Indicator
23
- data-slot="progress-indicator"
24
- className="h-full w-full flex-1 bg-brand transition-all"
25
- style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
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 'radix-ui';
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.ScrollAreaScrollbar>) {
33
+ }: React.ComponentProps<typeof ScrollAreaPrimitive.Scrollbar>) {
34
34
  return (
35
- <ScrollAreaPrimitive.ScrollAreaScrollbar
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.ScrollAreaThumb
45
+ <ScrollAreaPrimitive.Thumb
46
46
  data-slot="scroll-area-thumb"
47
47
  className="relative flex-1 rounded-full bg-border"
48
48
  />
49
- </ScrollAreaPrimitive.ScrollAreaScrollbar>
49
+ </ScrollAreaPrimitive.Scrollbar>
50
50
  );
51
51
  }
52
52