@adea-ai/ui 0.11.0 → 0.12.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.
Files changed (90) hide show
  1. package/dist/components/account-drawer.d.ts +1 -1
  2. package/dist/components/account-drawer.js +12 -12
  3. package/dist/components/on-screen-controls.js +12 -12
  4. package/dist/components/scene-settings.d.ts +3 -3
  5. package/dist/components/scene-settings.js +11 -11
  6. package/dist/components/theme-provider.d.ts +1 -1
  7. package/dist/components/theme-provider.js +2 -2
  8. package/dist/components/theme-toggle.js +8 -8
  9. package/dist/components/ui/badge.d.ts +3 -3
  10. package/dist/components/ui/badge.js +15 -15
  11. package/dist/components/ui/button.d.ts +2 -2
  12. package/dist/components/ui/button.js +19 -19
  13. package/dist/components/ui/card.d.ts +1 -1
  14. package/dist/components/ui/card.js +3 -3
  15. package/dist/components/ui/dialog.d.ts +4 -4
  16. package/dist/components/ui/dialog.js +10 -10
  17. package/dist/components/ui/drawer.d.ts +5 -5
  18. package/dist/components/ui/drawer.js +26 -26
  19. package/dist/components/ui/dropdown-menu.d.ts +5 -5
  20. package/dist/components/ui/dropdown-menu.js +12 -12
  21. package/dist/components/ui/empty.d.ts +7 -7
  22. package/dist/components/ui/empty.js +11 -11
  23. package/dist/components/ui/field.d.ts +12 -12
  24. package/dist/components/ui/field.js +22 -22
  25. package/dist/components/ui/input.d.ts +2 -2
  26. package/dist/components/ui/input.js +3 -3
  27. package/dist/components/ui/label.d.ts +2 -2
  28. package/dist/components/ui/label.js +3 -3
  29. package/dist/components/ui/radio-group.d.ts +2 -2
  30. package/dist/components/ui/radio-group.js +6 -6
  31. package/dist/components/ui/separator.d.ts +1 -1
  32. package/dist/components/ui/separator.js +5 -5
  33. package/dist/components/ui/skeleton.d.ts +1 -1
  34. package/dist/components/ui/skeleton.js +2 -2
  35. package/dist/components/ui/spinner.d.ts +2 -2
  36. package/dist/components/ui/spinner.js +3 -3
  37. package/dist/components/ui/switch.d.ts +2 -2
  38. package/dist/components/ui/switch.js +5 -5
  39. package/dist/components/ui/tabs.d.ts +2 -2
  40. package/dist/components/ui/tabs.js +13 -13
  41. package/dist/components/ui/toggle-group.d.ts +6 -6
  42. package/dist/components/ui/toggle-group.js +13 -13
  43. package/dist/components/ui/toggle.d.ts +2 -2
  44. package/dist/components/ui/toggle.js +11 -11
  45. package/dist/components/ui/tooltip.d.ts +3 -3
  46. package/dist/components/ui/tooltip.js +5 -5
  47. package/dist/components/version-dialog.d.ts +1 -1
  48. package/dist/components/version-dialog.js +33 -33
  49. package/dist/components/workspace-brand.js +1 -1
  50. package/dist/components/workspace-logo.d.ts +1 -1
  51. package/dist/index.d.ts +19 -19
  52. package/dist/index.js +19 -19
  53. package/dist/lib/utils.d.ts +1 -1
  54. package/dist/lib/utils.js +2 -2
  55. package/dist/lib/version-notes.js +18 -18
  56. package/package.json +9 -9
  57. package/src/components/account-drawer.tsx +27 -27
  58. package/src/components/on-screen-controls.tsx +45 -45
  59. package/src/components/scene-settings.tsx +55 -55
  60. package/src/components/theme-provider.tsx +7 -7
  61. package/src/components/theme-toggle.tsx +20 -20
  62. package/src/components/ui/badge.tsx +20 -20
  63. package/src/components/ui/button.tsx +24 -24
  64. package/src/components/ui/card.tsx +6 -6
  65. package/src/components/ui/dialog.tsx +24 -24
  66. package/src/components/ui/drawer.tsx +55 -55
  67. package/src/components/ui/dropdown-menu.tsx +39 -39
  68. package/src/components/ui/empty.tsx +25 -25
  69. package/src/components/ui/field.tsx +55 -55
  70. package/src/components/ui/input.tsx +7 -7
  71. package/src/components/ui/label.tsx +7 -7
  72. package/src/components/ui/radio-group.tsx +9 -9
  73. package/src/components/ui/separator.tsx +7 -7
  74. package/src/components/ui/skeleton.tsx +5 -5
  75. package/src/components/ui/spinner.tsx +6 -6
  76. package/src/components/ui/switch.tsx +8 -8
  77. package/src/components/ui/tabs.tsx +21 -21
  78. package/src/components/ui/toggle-group.tsx +25 -25
  79. package/src/components/ui/toggle.tsx +15 -15
  80. package/src/components/ui/tooltip.tsx +13 -13
  81. package/src/components/version-dialog.tsx +113 -113
  82. package/src/components/workspace-brand.tsx +4 -4
  83. package/src/components/workspace-logo.tsx +2 -2
  84. package/src/index.tsx +19 -19
  85. package/src/lib/utils.ts +3 -3
  86. package/src/lib/version-notes.ts +23 -23
  87. package/src/styles/conventional-workspace.css +26 -26
  88. package/src/styles/globals.css +2 -2
  89. package/src/styles/theme.css +1 -1
  90. package/src/styles/workspace-shell.css +2 -2
@@ -1,18 +1,18 @@
1
- import type { HTMLAttributes } from "react";
2
- import { cn } from "#lib/utils";
1
+ import type { HTMLAttributes } from 'react'
2
+ import { cn } from '#lib/utils'
3
3
 
4
4
  function Card({ className, ...props }: HTMLAttributes<HTMLDivElement>) {
5
5
  return (
6
6
  <div
7
7
  data-slot="card"
8
- className={cn("rounded-xl border bg-card text-card-foreground shadow-sm", className)}
8
+ className={cn('rounded-xl border bg-card text-card-foreground shadow-sm', className)}
9
9
  {...props}
10
10
  />
11
- );
11
+ )
12
12
  }
13
13
 
14
14
  function CardContent({ className, ...props }: HTMLAttributes<HTMLDivElement>) {
15
- return <div data-slot="card-content" className={cn("p-4", className)} {...props} />;
15
+ return <div data-slot="card-content" className={cn('p-4', className)} {...props} />
16
16
  }
17
17
 
18
- export { Card, CardContent };
18
+ export { Card, CardContent }
@@ -1,25 +1,25 @@
1
- "use client";
1
+ 'use client'
2
2
 
3
- import * as React from "react";
4
- import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
5
- import { X } from "lucide-react";
3
+ import * as React from 'react'
4
+ import { Dialog as DialogPrimitive } from '@base-ui/react/dialog'
5
+ import { X } from 'lucide-react'
6
6
 
7
- import { cn } from "#lib/utils";
7
+ import { cn } from '#lib/utils'
8
8
 
9
9
  function Dialog({ ...props }: DialogPrimitive.Root.Props) {
10
- return <DialogPrimitive.Root data-slot="dialog" {...props} />;
10
+ return <DialogPrimitive.Root data-slot="dialog" {...props} />
11
11
  }
12
12
 
13
13
  function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) {
14
- return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />;
14
+ return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />
15
15
  }
16
16
 
17
17
  function DialogPortal({ ...props }: DialogPrimitive.Portal.Props) {
18
- return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />;
18
+ return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />
19
19
  }
20
20
 
21
21
  function DialogClose({ ...props }: DialogPrimitive.Close.Props) {
22
- return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
22
+ return <DialogPrimitive.Close data-slot="dialog-close" {...props} />
23
23
  }
24
24
 
25
25
  function DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props) {
@@ -27,12 +27,12 @@ function DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props)
27
27
  <DialogPrimitive.Backdrop
28
28
  data-slot="dialog-overlay"
29
29
  className={cn(
30
- "fixed inset-0 z-[120] bg-slate-950/55 backdrop-blur-[2px] transition-opacity duration-200 data-ending-style:opacity-0 data-starting-style:opacity-0",
30
+ 'fixed inset-0 z-[120] bg-slate-950/55 backdrop-blur-[2px] transition-opacity duration-200 data-ending-style:opacity-0 data-starting-style:opacity-0',
31
31
  className
32
32
  )}
33
33
  {...props}
34
34
  />
35
- );
35
+ )
36
36
  }
37
37
 
38
38
  function DialogContent({
@@ -51,7 +51,7 @@ function DialogContent({
51
51
  <DialogPrimitive.Popup
52
52
  data-slot="dialog-content"
53
53
  className={cn(
54
- "relative grid max-h-[min(44rem,calc(100dvh-2rem))] w-full max-w-2xl gap-0 overflow-hidden rounded-2xl border bg-card text-card-foreground shadow-2xl outline-none transition-[opacity,transform] duration-200 data-ending-style:scale-[0.98] data-ending-style:opacity-0 data-starting-style:scale-[0.98] data-starting-style:opacity-0",
54
+ 'relative grid max-h-[min(44rem,calc(100dvh-2rem))] w-full max-w-2xl gap-0 overflow-hidden rounded-2xl border bg-card text-card-foreground shadow-2xl outline-none transition-[opacity,transform] duration-200 data-ending-style:scale-[0.98] data-ending-style:opacity-0 data-starting-style:scale-[0.98] data-starting-style:opacity-0',
55
55
  className
56
56
  )}
57
57
  {...props}
@@ -69,50 +69,50 @@ function DialogContent({
69
69
  </DialogPrimitive.Popup>
70
70
  </DialogPrimitive.Viewport>
71
71
  </DialogPortal>
72
- );
72
+ )
73
73
  }
74
74
 
75
- function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
75
+ function DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {
76
76
  return (
77
77
  <div
78
78
  data-slot="dialog-header"
79
- className={cn("flex flex-col gap-1.5 border-b px-6 py-5 pr-14", className)}
79
+ className={cn('flex flex-col gap-1.5 border-b px-6 py-5 pr-14', className)}
80
80
  {...props}
81
81
  />
82
- );
82
+ )
83
83
  }
84
84
 
85
- function DialogFooter({ className, ...props }: React.ComponentProps<"div">) {
85
+ function DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {
86
86
  return (
87
87
  <div
88
88
  data-slot="dialog-footer"
89
89
  className={cn(
90
- "flex flex-col-reverse gap-2 border-t px-6 py-4 sm:flex-row sm:justify-end",
90
+ 'flex flex-col-reverse gap-2 border-t px-6 py-4 sm:flex-row sm:justify-end',
91
91
  className
92
92
  )}
93
93
  {...props}
94
94
  />
95
- );
95
+ )
96
96
  }
97
97
 
98
98
  function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {
99
99
  return (
100
100
  <DialogPrimitive.Title
101
101
  data-slot="dialog-title"
102
- className={cn("text-base font-semibold tracking-tight", className)}
102
+ className={cn('text-base font-semibold tracking-tight', className)}
103
103
  {...props}
104
104
  />
105
- );
105
+ )
106
106
  }
107
107
 
108
108
  function DialogDescription({ className, ...props }: DialogPrimitive.Description.Props) {
109
109
  return (
110
110
  <DialogPrimitive.Description
111
111
  data-slot="dialog-description"
112
- className={cn("text-sm leading-5 text-muted-foreground", className)}
112
+ className={cn('text-sm leading-5 text-muted-foreground', className)}
113
113
  {...props}
114
114
  />
115
- );
115
+ )
116
116
  }
117
117
 
118
118
  export {
@@ -126,4 +126,4 @@ export {
126
126
  DialogPortal,
127
127
  DialogTitle,
128
128
  DialogTrigger,
129
- };
129
+ }
@@ -1,43 +1,43 @@
1
- "use client";
1
+ 'use client'
2
2
 
3
- import * as React from "react";
4
- import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
3
+ import * as React from 'react'
4
+ import { Drawer as DrawerPrimitive } from '@base-ui/react/drawer'
5
5
 
6
- import { cn } from "#lib/utils";
6
+ import { cn } from '#lib/utils'
7
7
 
8
8
  type DrawerContextProps = {
9
- hasSnapPoints: boolean;
10
- modal: DrawerPrimitive.Root.Props["modal"];
11
- showSwipeHandle: boolean;
12
- swipeDirection: NonNullable<DrawerPrimitive.Root.Props["swipeDirection"]>;
13
- };
9
+ hasSnapPoints: boolean
10
+ modal: DrawerPrimitive.Root.Props['modal']
11
+ showSwipeHandle: boolean
12
+ swipeDirection: NonNullable<DrawerPrimitive.Root.Props['swipeDirection']>
13
+ }
14
14
 
15
- const DrawerContext = React.createContext<DrawerContextProps | null>(null);
15
+ const DrawerContext = React.createContext<DrawerContextProps | null>(null)
16
16
 
17
17
  function useDrawer() {
18
- const context = React.useContext(DrawerContext);
18
+ const context = React.useContext(DrawerContext)
19
19
 
20
20
  if (!context) {
21
- throw new Error("useDrawer must be used within a Drawer.");
21
+ throw new Error('useDrawer must be used within a Drawer.')
22
22
  }
23
23
 
24
- return context;
24
+ return context
25
25
  }
26
26
 
27
27
  function Drawer({
28
28
  modal = true,
29
29
  showSwipeHandle = false,
30
30
  snapPoints,
31
- swipeDirection = "down",
31
+ swipeDirection = 'down',
32
32
  ...props
33
33
  }: DrawerPrimitive.Root.Props & {
34
- showSwipeHandle?: boolean;
34
+ showSwipeHandle?: boolean
35
35
  }) {
36
- const hasSnapPoints = snapPoints != null && snapPoints.length > 0;
36
+ const hasSnapPoints = snapPoints != null && snapPoints.length > 0
37
37
  const contextValue = React.useMemo(
38
38
  () => ({ hasSnapPoints, modal, showSwipeHandle, swipeDirection }),
39
39
  [hasSnapPoints, modal, showSwipeHandle, swipeDirection]
40
- );
40
+ )
41
41
 
42
42
  return (
43
43
  <DrawerContext.Provider value={contextValue}>
@@ -49,19 +49,19 @@ function Drawer({
49
49
  {...props}
50
50
  />
51
51
  </DrawerContext.Provider>
52
- );
52
+ )
53
53
  }
54
54
 
55
55
  function DrawerTrigger({ ...props }: DrawerPrimitive.Trigger.Props) {
56
- return <DrawerPrimitive.Trigger data-slot="drawer-trigger" {...props} />;
56
+ return <DrawerPrimitive.Trigger data-slot="drawer-trigger" {...props} />
57
57
  }
58
58
 
59
59
  function DrawerPortal({ ...props }: DrawerPrimitive.Portal.Props) {
60
- return <DrawerPrimitive.Portal data-slot="drawer-portal" {...props} />;
60
+ return <DrawerPrimitive.Portal data-slot="drawer-portal" {...props} />
61
61
  }
62
62
 
63
63
  function DrawerClose({ ...props }: DrawerPrimitive.Close.Props) {
64
- return <DrawerPrimitive.Close data-slot="drawer-close" {...props} />;
64
+ return <DrawerPrimitive.Close data-slot="drawer-close" {...props} />
65
65
  }
66
66
 
67
67
  function DrawerOverlay({ className, ...props }: DrawerPrimitive.Backdrop.Props) {
@@ -69,35 +69,35 @@ function DrawerOverlay({ className, ...props }: DrawerPrimitive.Backdrop.Props)
69
69
  <DrawerPrimitive.Backdrop
70
70
  data-slot="drawer-overlay"
71
71
  className={cn(
72
- "fixed inset-0 z-[110] min-h-dvh bg-black/10 opacity-[max(var(--drawer-overlay-min-opacity,0),calc(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] select-none data-ending-style:pointer-events-none data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-snap-points:[--drawer-overlay-min-opacity:0.5] data-starting-style:opacity-0 data-swiping:duration-0 supports-backdrop-filter:backdrop-blur-xs supports-[-webkit-touch-callout:none]:absolute",
72
+ 'fixed inset-0 z-[110] min-h-dvh bg-black/10 opacity-[max(var(--drawer-overlay-min-opacity,0),calc(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] select-none data-ending-style:pointer-events-none data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-snap-points:[--drawer-overlay-min-opacity:0.5] data-starting-style:opacity-0 data-swiping:duration-0 supports-backdrop-filter:backdrop-blur-xs supports-[-webkit-touch-callout:none]:absolute',
73
73
  className
74
74
  )}
75
75
  {...props}
76
76
  />
77
- );
77
+ )
78
78
  }
79
79
 
80
- function DrawerSwipeHandle({ className, ...props }: React.ComponentProps<"div">) {
80
+ function DrawerSwipeHandle({ className, ...props }: React.ComponentProps<'div'>) {
81
81
  return (
82
82
  <div
83
83
  data-slot="drawer-swipe-handle"
84
84
  aria-hidden="true"
85
85
  className={cn(
86
- "relative z-10 flex shrink-0 cursor-grab transition-opacity duration-200 group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-[swipe-axis=x]/drawer-popup:h-full group-data-[swipe-axis=x]/drawer-popup:w-3 group-data-[swipe-axis=x]/drawer-popup:items-center group-data-[swipe-axis=y]/drawer-popup:h-3 group-data-[swipe-axis=y]/drawer-popup:w-full group-data-[swipe-axis=y]/drawer-popup:justify-center group-data-[swipe-direction=down]/drawer-popup:items-end group-data-[swipe-direction=left]/drawer-popup:order-last group-data-[swipe-direction=left]/drawer-popup:justify-start group-data-[swipe-direction=right]/drawer-popup:justify-end group-data-[swipe-direction=up]/drawer-popup:order-last group-data-[swipe-direction=up]/drawer-popup:items-start after:block after:shrink-0 after:rounded-full after:bg-muted group-data-[swipe-axis=x]/drawer-popup:after:h-24 group-data-[swipe-axis=x]/drawer-popup:after:w-1 group-data-[swipe-axis=y]/drawer-popup:after:h-1 group-data-[swipe-axis=y]/drawer-popup:after:w-24 active:cursor-grabbing",
86
+ 'relative z-10 flex shrink-0 cursor-grab transition-opacity duration-200 group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-[swipe-axis=x]/drawer-popup:h-full group-data-[swipe-axis=x]/drawer-popup:w-3 group-data-[swipe-axis=x]/drawer-popup:items-center group-data-[swipe-axis=y]/drawer-popup:h-3 group-data-[swipe-axis=y]/drawer-popup:w-full group-data-[swipe-axis=y]/drawer-popup:justify-center group-data-[swipe-direction=down]/drawer-popup:items-end group-data-[swipe-direction=left]/drawer-popup:order-last group-data-[swipe-direction=left]/drawer-popup:justify-start group-data-[swipe-direction=right]/drawer-popup:justify-end group-data-[swipe-direction=up]/drawer-popup:order-last group-data-[swipe-direction=up]/drawer-popup:items-start after:block after:shrink-0 after:rounded-full after:bg-muted group-data-[swipe-axis=x]/drawer-popup:after:h-24 group-data-[swipe-axis=x]/drawer-popup:after:w-1 group-data-[swipe-axis=y]/drawer-popup:after:h-1 group-data-[swipe-axis=y]/drawer-popup:after:w-24 active:cursor-grabbing',
87
87
  className
88
88
  )}
89
89
  {...props}
90
90
  />
91
- );
91
+ )
92
92
  }
93
93
 
94
94
  function DrawerContent({ className, children, ...props }: DrawerPrimitive.Popup.Props) {
95
- const { hasSnapPoints, modal, showSwipeHandle, swipeDirection } = useDrawer();
96
- const swipeAxis = swipeDirection === "down" || swipeDirection === "up" ? "y" : "x";
95
+ const { hasSnapPoints, modal, showSwipeHandle, swipeDirection } = useDrawer()
96
+ const swipeAxis = swipeDirection === 'down' || swipeDirection === 'up' ? 'y' : 'x'
97
97
 
98
98
  return (
99
99
  <DrawerPortal data-slot="drawer-portal">
100
- {modal === true && <DrawerOverlay data-snap-points={hasSnapPoints ? "" : undefined} />}
100
+ {modal === true && <DrawerOverlay data-snap-points={hasSnapPoints ? '' : undefined} />}
101
101
  <DrawerPrimitive.Viewport
102
102
  data-slot="drawer-viewport"
103
103
  data-modal={modal}
@@ -106,32 +106,32 @@ function DrawerContent({ className, children, ...props }: DrawerPrimitive.Popup.
106
106
  <DrawerPrimitive.Popup
107
107
  data-slot="drawer-popup"
108
108
  data-swipe-axis={swipeAxis}
109
- data-snap-points={hasSnapPoints ? "" : undefined}
109
+ data-snap-points={hasSnapPoints ? '' : undefined}
110
110
  className={cn(
111
111
  // Base.
112
- "group/drawer-popup pointer-events-auto fixed z-[110] m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col bg-popover text-sm text-popover-foreground transition-[transform,height,opacity,filter] duration-450 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform outline-none select-none [interpolate-size:allow-keywords] data-[swipe-direction=down]:rounded-t-xl data-[swipe-direction=down]:border-t data-[swipe-direction=left]:rounded-r-xl data-[swipe-direction=left]:border-r data-[swipe-direction=right]:rounded-l-xl data-[swipe-direction=right]:border-l data-[swipe-direction=up]:rounded-b-xl data-[swipe-direction=up]:border-b",
112
+ 'group/drawer-popup pointer-events-auto fixed z-[110] m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col bg-popover text-sm text-popover-foreground transition-[transform,height,opacity,filter] duration-450 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform outline-none select-none [interpolate-size:allow-keywords] data-[swipe-direction=down]:rounded-t-xl data-[swipe-direction=down]:border-t data-[swipe-direction=left]:rounded-r-xl data-[swipe-direction=left]:border-r data-[swipe-direction=right]:rounded-l-xl data-[swipe-direction=right]:border-l data-[swipe-direction=up]:rounded-b-xl data-[swipe-direction=up]:border-b',
113
113
  // Nested.
114
- "data-nested-drawer-open:overflow-hidden data-nested-drawer-open:brightness-95",
114
+ 'data-nested-drawer-open:overflow-hidden data-nested-drawer-open:brightness-95',
115
115
  // Bleed.
116
- "after:pointer-events-none after:absolute after:bg-(--drawer-bleed-background,var(--color-popover)) data-[swipe-axis=x]:after:inset-y-0 data-[swipe-axis=x]:after:w-(--bleed) data-[swipe-axis=y]:after:inset-x-0 data-[swipe-axis=y]:after:h-(--bleed) data-[swipe-direction=down]:after:top-full data-[swipe-direction=left]:after:right-full data-[swipe-direction=right]:after:left-full data-[swipe-direction=up]:after:bottom-full",
116
+ 'after:pointer-events-none after:absolute after:bg-(--drawer-bleed-background,var(--color-popover)) data-[swipe-axis=x]:after:inset-y-0 data-[swipe-axis=x]:after:w-(--bleed) data-[swipe-axis=y]:after:inset-x-0 data-[swipe-axis=y]:after:h-(--bleed) data-[swipe-direction=down]:after:top-full data-[swipe-direction=left]:after:right-full data-[swipe-direction=right]:after:left-full data-[swipe-direction=up]:after:bottom-full',
117
117
  // Sizing.
118
- "[--drawer-content-height:var(--drawer-height,auto)] data-[swipe-axis=x]:[--drawer-content-width:75%] data-[swipe-axis=y]:[--drawer-content-max-height:calc(100dvh-6rem)] data-[swipe-axis=y]:data-snap-points:[--drawer-content-height:100dvh] data-[swipe-axis=x]:sm:[--drawer-content-width:24rem]",
118
+ '[--drawer-content-height:var(--drawer-height,auto)] data-[swipe-axis=x]:[--drawer-content-width:75%] data-[swipe-axis=y]:[--drawer-content-max-height:calc(100dvh-6rem)] data-[swipe-axis=y]:data-snap-points:[--drawer-content-height:100dvh] data-[swipe-axis=x]:sm:[--drawer-content-width:24rem]',
119
119
  // Stack.
120
- "[--bleed:3rem] [--peek:1rem] [--stack-height:var(--drawer-frontmost-height,var(--drawer-height,0px))] [--stack-peek-offset:max(0px,calc((var(--nested-drawers)-var(--stack-progress))*var(--peek)))] [--stack-progress:clamp(0,var(--drawer-swipe-progress),1)] [--stack-scale-base:max(0,calc(1-(var(--nested-drawers)*var(--stack-step))))] [--stack-scale:clamp(0,calc(var(--stack-scale-base)+(var(--stack-step)*var(--stack-progress))),1)] [--stack-shrink:calc(1-var(--stack-scale))] [--stack-step:0.05]",
120
+ '[--bleed:3rem] [--peek:1rem] [--stack-height:var(--drawer-frontmost-height,var(--drawer-height,0px))] [--stack-peek-offset:max(0px,calc((var(--nested-drawers)-var(--stack-progress))*var(--peek)))] [--stack-progress:clamp(0,var(--drawer-swipe-progress),1)] [--stack-scale-base:max(0,calc(1-(var(--nested-drawers)*var(--stack-step))))] [--stack-scale:clamp(0,calc(var(--stack-scale-base)+(var(--stack-step)*var(--stack-progress))),1)] [--stack-shrink:calc(1-var(--stack-scale))] [--stack-step:0.05]',
121
121
  // Transitions.
122
- "data-ending-style:transform-(--closed-transform) data-ending-style:opacity-[0.9999] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-nested-drawer-swiping:duration-0 data-ending-style:data-nested-drawer-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-starting-style:transform-(--closed-transform) data-swiping:duration-0 data-ending-style:data-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)]",
122
+ 'data-ending-style:transform-(--closed-transform) data-ending-style:opacity-[0.9999] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-nested-drawer-swiping:duration-0 data-ending-style:data-nested-drawer-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-starting-style:transform-(--closed-transform) data-swiping:duration-0 data-ending-style:data-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)]',
123
123
  // Axis: y.
124
- "data-[swipe-axis=y]:inset-x-0 data-[swipe-axis=y]:data-nested-drawer-open:h-(--stack-height)",
124
+ 'data-[swipe-axis=y]:inset-x-0 data-[swipe-axis=y]:data-nested-drawer-open:h-(--stack-height)',
125
125
  // Axis: x.
126
- "data-[swipe-axis=x]:inset-y-0 data-[swipe-axis=x]:flex-row",
126
+ 'data-[swipe-axis=x]:inset-y-0 data-[swipe-axis=x]:flex-row',
127
127
  // Direction: down.
128
- "data-[swipe-direction=down]:bottom-0 data-[swipe-direction=down]:origin-bottom data-[swipe-direction=down]:[--closed-transform:translate3d(0,calc(100%+var(--drawer-inset,0px)+2px),0)] data-[swipe-direction=down]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)-var(--stack-peek-offset)-(var(--stack-shrink)*var(--stack-height)))]",
128
+ 'data-[swipe-direction=down]:bottom-0 data-[swipe-direction=down]:origin-bottom data-[swipe-direction=down]:[--closed-transform:translate3d(0,calc(100%+var(--drawer-inset,0px)+2px),0)] data-[swipe-direction=down]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)-var(--stack-peek-offset)-(var(--stack-shrink)*var(--stack-height)))]',
129
129
  // Direction: up.
130
- "data-[swipe-direction=up]:top-0 data-[swipe-direction=up]:origin-top data-[swipe-direction=up]:[--closed-transform:translate3d(0,calc(-100%-var(--drawer-inset,0px)-2px),0)] data-[swipe-direction=up]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)+var(--stack-peek-offset)+(var(--stack-shrink)*var(--stack-height)))]",
130
+ 'data-[swipe-direction=up]:top-0 data-[swipe-direction=up]:origin-top data-[swipe-direction=up]:[--closed-transform:translate3d(0,calc(-100%-var(--drawer-inset,0px)-2px),0)] data-[swipe-direction=up]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)+var(--stack-peek-offset)+(var(--stack-shrink)*var(--stack-height)))]',
131
131
  // Direction: left.
132
- "data-[swipe-direction=left]:left-0 data-[swipe-direction=left]:origin-left data-[swipe-direction=left]:[--closed-transform:translate3d(calc(-100%-var(--drawer-inset,0px)-2px),0,0)] data-[swipe-direction=left]:[--translate-x:calc(var(--drawer-swipe-movement-x)+var(--stack-peek-offset)+(var(--stack-shrink)*100%))]",
132
+ 'data-[swipe-direction=left]:left-0 data-[swipe-direction=left]:origin-left data-[swipe-direction=left]:[--closed-transform:translate3d(calc(-100%-var(--drawer-inset,0px)-2px),0,0)] data-[swipe-direction=left]:[--translate-x:calc(var(--drawer-swipe-movement-x)+var(--stack-peek-offset)+(var(--stack-shrink)*100%))]',
133
133
  // Direction: right.
134
- "data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:origin-right data-[swipe-direction=right]:[--closed-transform:translate3d(calc(100%+var(--drawer-inset,0px)+2px),0,0)] data-[swipe-direction=right]:[--translate-x:calc(var(--drawer-swipe-movement-x)-var(--stack-peek-offset)-(var(--stack-shrink)*100%))]",
134
+ 'data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:origin-right data-[swipe-direction=right]:[--closed-transform:translate3d(calc(100%+var(--drawer-inset,0px)+2px),0,0)] data-[swipe-direction=right]:[--translate-x:calc(var(--drawer-swipe-movement-x)-var(--stack-peek-offset)-(var(--stack-shrink)*100%))]',
135
135
  className
136
136
  )}
137
137
  {...props}
@@ -140,7 +140,7 @@ function DrawerContent({ className, children, ...props }: DrawerPrimitive.Popup.
140
140
  <DrawerPrimitive.Content
141
141
  data-slot="drawer-content"
142
142
  className={cn(
143
- "flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-300 ease-[cubic-bezier(0.45,1.005,0,1.005)] select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none"
143
+ 'flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-300 ease-[cubic-bezier(0.45,1.005,0,1.005)] select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none'
144
144
  )}
145
145
  >
146
146
  {children}
@@ -148,50 +148,50 @@ function DrawerContent({ className, children, ...props }: DrawerPrimitive.Popup.
148
148
  </DrawerPrimitive.Popup>
149
149
  </DrawerPrimitive.Viewport>
150
150
  </DrawerPortal>
151
- );
151
+ )
152
152
  }
153
153
 
154
- function DrawerHeader({ className, ...props }: React.ComponentProps<"div">) {
154
+ function DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {
155
155
  return (
156
156
  <div
157
157
  data-slot="drawer-header"
158
158
  className={cn(
159
- "flex shrink-0 flex-col gap-0.5 p-4 pb-0 group-data-[swipe-axis=y]/drawer-popup:text-center md:gap-0.5 md:text-left",
159
+ 'flex shrink-0 flex-col gap-0.5 p-4 pb-0 group-data-[swipe-axis=y]/drawer-popup:text-center md:gap-0.5 md:text-left',
160
160
  className
161
161
  )}
162
162
  {...props}
163
163
  />
164
- );
164
+ )
165
165
  }
166
166
 
167
- function DrawerFooter({ className, ...props }: React.ComponentProps<"div">) {
167
+ function DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {
168
168
  return (
169
169
  <div
170
170
  data-slot="drawer-footer"
171
- className={cn("mt-auto flex shrink-0 flex-col gap-2 p-4 pt-0", className)}
171
+ className={cn('mt-auto flex shrink-0 flex-col gap-2 p-4 pt-0', className)}
172
172
  {...props}
173
173
  />
174
- );
174
+ )
175
175
  }
176
176
 
177
177
  function DrawerTitle({ className, ...props }: DrawerPrimitive.Title.Props) {
178
178
  return (
179
179
  <DrawerPrimitive.Title
180
180
  data-slot="drawer-title"
181
- className={cn("text-base font-medium text-foreground", className)}
181
+ className={cn('text-base font-medium text-foreground', className)}
182
182
  {...props}
183
183
  />
184
- );
184
+ )
185
185
  }
186
186
 
187
187
  function DrawerDescription({ className, ...props }: DrawerPrimitive.Description.Props) {
188
188
  return (
189
189
  <DrawerPrimitive.Description
190
190
  data-slot="drawer-description"
191
- className={cn("text-sm text-balance text-muted-foreground", className)}
191
+ className={cn('text-sm text-balance text-muted-foreground', className)}
192
192
  {...props}
193
193
  />
194
- );
194
+ )
195
195
  }
196
196
 
197
197
  export {
@@ -206,4 +206,4 @@ export {
206
206
  DrawerFooter,
207
207
  DrawerTitle,
208
208
  DrawerDescription,
209
- };
209
+ }
@@ -1,32 +1,32 @@
1
- "use client";
1
+ 'use client'
2
2
 
3
- import * as React from "react";
4
- import { Menu as MenuPrimitive } from "@base-ui/react/menu";
3
+ import * as React from 'react'
4
+ import { Menu as MenuPrimitive } from '@base-ui/react/menu'
5
5
 
6
- import { cn } from "#lib/utils";
7
- import { ChevronRightIcon, CheckIcon } from "lucide-react";
6
+ import { cn } from '#lib/utils'
7
+ import { ChevronRightIcon, CheckIcon } from 'lucide-react'
8
8
 
9
9
  function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {
10
- return <MenuPrimitive.Root data-slot="dropdown-menu" {...props} />;
10
+ return <MenuPrimitive.Root data-slot="dropdown-menu" {...props} />
11
11
  }
12
12
 
13
13
  function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) {
14
- return <MenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />;
14
+ return <MenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
15
15
  }
16
16
 
17
17
  function DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props) {
18
- return <MenuPrimitive.Trigger data-slot="dropdown-menu-trigger" {...props} />;
18
+ return <MenuPrimitive.Trigger data-slot="dropdown-menu-trigger" {...props} />
19
19
  }
20
20
 
21
21
  function DropdownMenuContent({
22
- align = "start",
22
+ align = 'start',
23
23
  alignOffset = 0,
24
- side = "bottom",
24
+ side = 'bottom',
25
25
  sideOffset = 4,
26
26
  className,
27
27
  ...props
28
28
  }: MenuPrimitive.Popup.Props &
29
- Pick<MenuPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">) {
29
+ Pick<MenuPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>) {
30
30
  return (
31
31
  <MenuPrimitive.Portal>
32
32
  <MenuPrimitive.Positioner
@@ -39,18 +39,18 @@ function DropdownMenuContent({
39
39
  <MenuPrimitive.Popup
40
40
  data-slot="dropdown-menu-content"
41
41
  className={cn(
42
- "z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none 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:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",
42
+ 'z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none 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:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95',
43
43
  className
44
44
  )}
45
45
  {...props}
46
46
  />
47
47
  </MenuPrimitive.Positioner>
48
48
  </MenuPrimitive.Portal>
49
- );
49
+ )
50
50
  }
51
51
 
52
52
  function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props) {
53
- return <MenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />;
53
+ return <MenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
54
54
  }
55
55
 
56
56
  function DropdownMenuLabel({
@@ -58,29 +58,29 @@ function DropdownMenuLabel({
58
58
  inset,
59
59
  ...props
60
60
  }: MenuPrimitive.GroupLabel.Props & {
61
- inset?: boolean;
61
+ inset?: boolean
62
62
  }) {
63
63
  return (
64
64
  <MenuPrimitive.GroupLabel
65
65
  data-slot="dropdown-menu-label"
66
66
  data-inset={inset}
67
67
  className={cn(
68
- "px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
68
+ 'px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7',
69
69
  className
70
70
  )}
71
71
  {...props}
72
72
  />
73
- );
73
+ )
74
74
  }
75
75
 
76
76
  function DropdownMenuItem({
77
77
  className,
78
78
  inset,
79
- variant = "default",
79
+ variant = 'default',
80
80
  ...props
81
81
  }: MenuPrimitive.Item.Props & {
82
- inset?: boolean;
83
- variant?: "default" | "destructive";
82
+ inset?: boolean
83
+ variant?: 'default' | 'destructive'
84
84
  }) {
85
85
  return (
86
86
  <MenuPrimitive.Item
@@ -93,11 +93,11 @@ function DropdownMenuItem({
93
93
  )}
94
94
  {...props}
95
95
  />
96
- );
96
+ )
97
97
  }
98
98
 
99
99
  function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props) {
100
- return <MenuPrimitive.SubmenuRoot data-slot="dropdown-menu-sub" {...props} />;
100
+ return <MenuPrimitive.SubmenuRoot data-slot="dropdown-menu-sub" {...props} />
101
101
  }
102
102
 
103
103
  function DropdownMenuSubTrigger({
@@ -106,7 +106,7 @@ function DropdownMenuSubTrigger({
106
106
  children,
107
107
  ...props
108
108
  }: MenuPrimitive.SubmenuTrigger.Props & {
109
- inset?: boolean;
109
+ inset?: boolean
110
110
  }) {
111
111
  return (
112
112
  <MenuPrimitive.SubmenuTrigger
@@ -121,13 +121,13 @@ function DropdownMenuSubTrigger({
121
121
  {children}
122
122
  <ChevronRightIcon className="ml-auto" />
123
123
  </MenuPrimitive.SubmenuTrigger>
124
- );
124
+ )
125
125
  }
126
126
 
127
127
  function DropdownMenuSubContent({
128
- align = "start",
128
+ align = 'start',
129
129
  alignOffset = -3,
130
- side = "right",
130
+ side = 'right',
131
131
  sideOffset = 0,
132
132
  className,
133
133
  ...props
@@ -136,7 +136,7 @@ function DropdownMenuSubContent({
136
136
  <DropdownMenuContent
137
137
  data-slot="dropdown-menu-sub-content"
138
138
  className={cn(
139
- "w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-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",
139
+ 'w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-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',
140
140
  className
141
141
  )}
142
142
  align={align}
@@ -145,7 +145,7 @@ function DropdownMenuSubContent({
145
145
  sideOffset={sideOffset}
146
146
  {...props}
147
147
  />
148
- );
148
+ )
149
149
  }
150
150
 
151
151
  function DropdownMenuCheckboxItem({
@@ -155,7 +155,7 @@ function DropdownMenuCheckboxItem({
155
155
  inset,
156
156
  ...props
157
157
  }: MenuPrimitive.CheckboxItem.Props & {
158
- inset?: boolean;
158
+ inset?: boolean
159
159
  }) {
160
160
  return (
161
161
  <MenuPrimitive.CheckboxItem
@@ -178,11 +178,11 @@ function DropdownMenuCheckboxItem({
178
178
  </span>
179
179
  {children}
180
180
  </MenuPrimitive.CheckboxItem>
181
- );
181
+ )
182
182
  }
183
183
 
184
184
  function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props) {
185
- return <MenuPrimitive.RadioGroup data-slot="dropdown-menu-radio-group" {...props} />;
185
+ return <MenuPrimitive.RadioGroup data-slot="dropdown-menu-radio-group" {...props} />
186
186
  }
187
187
 
188
188
  function DropdownMenuRadioItem({
@@ -191,7 +191,7 @@ function DropdownMenuRadioItem({
191
191
  inset,
192
192
  ...props
193
193
  }: MenuPrimitive.RadioItem.Props & {
194
- inset?: boolean;
194
+ inset?: boolean
195
195
  }) {
196
196
  return (
197
197
  <MenuPrimitive.RadioItem
@@ -213,30 +213,30 @@ function DropdownMenuRadioItem({
213
213
  </span>
214
214
  {children}
215
215
  </MenuPrimitive.RadioItem>
216
- );
216
+ )
217
217
  }
218
218
 
219
219
  function DropdownMenuSeparator({ className, ...props }: MenuPrimitive.Separator.Props) {
220
220
  return (
221
221
  <MenuPrimitive.Separator
222
222
  data-slot="dropdown-menu-separator"
223
- className={cn("-mx-1 my-1 h-px bg-border", className)}
223
+ className={cn('-mx-1 my-1 h-px bg-border', className)}
224
224
  {...props}
225
225
  />
226
- );
226
+ )
227
227
  }
228
228
 
229
- function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">) {
229
+ function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {
230
230
  return (
231
231
  <span
232
232
  data-slot="dropdown-menu-shortcut"
233
233
  className={cn(
234
- "ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
234
+ 'ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground',
235
235
  className
236
236
  )}
237
237
  {...props}
238
238
  />
239
- );
239
+ )
240
240
  }
241
241
 
242
242
  export {
@@ -255,4 +255,4 @@ export {
255
255
  DropdownMenuSub,
256
256
  DropdownMenuSubTrigger,
257
257
  DropdownMenuSubContent,
258
- };
258
+ }