orbital-ds 0.1.1 → 0.3.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 (110) hide show
  1. package/AGENTS.md +57 -0
  2. package/README.md +22 -14
  3. package/components.manifest.json +1255 -0
  4. package/contract.json +82 -0
  5. package/dist/styles.css +486 -347
  6. package/dist/themes/qratia.css +14 -14
  7. package/dist/themes/qratia.fonts.css +2 -0
  8. package/dist/themes/qratia.scoped.css +247 -0
  9. package/dist/themes/zyro.css +343 -0
  10. package/dist/themes/zyro.fonts.css +2 -0
  11. package/dist/themes/zyro.scoped.css +343 -0
  12. package/dist/ui/accordion.d.ts +9 -0
  13. package/dist/ui/accordion.js +79 -0
  14. package/dist/ui/alert-dialog.d.ts +23 -0
  15. package/dist/ui/alert-dialog.js +173 -0
  16. package/dist/ui/alert.d.ts +13 -0
  17. package/dist/ui/alert.js +77 -0
  18. package/dist/ui/aspect-ratio.d.ts +7 -0
  19. package/dist/ui/aspect-ratio.js +22 -0
  20. package/dist/ui/attachment.d.ts +26 -0
  21. package/dist/ui/attachment.js +197 -0
  22. package/dist/ui/avatar.js +1 -1
  23. package/dist/ui/badge.d.ts +1 -1
  24. package/dist/ui/badge.js +1 -1
  25. package/dist/ui/bubble.d.ts +19 -0
  26. package/dist/ui/bubble.js +115 -0
  27. package/dist/ui/button-group.d.ts +15 -0
  28. package/dist/ui/button-group.js +82 -0
  29. package/dist/ui/button.d.ts +5 -3
  30. package/dist/ui/button.js +9 -6
  31. package/dist/ui/calendar.d.ts +15 -0
  32. package/dist/ui/calendar.js +190 -0
  33. package/dist/ui/card.js +4 -4
  34. package/dist/ui/carousel.d.ts +33 -0
  35. package/dist/ui/carousel.js +199 -0
  36. package/dist/ui/checkbox.js +1 -1
  37. package/dist/ui/combobox.d.ts +26 -0
  38. package/dist/ui/combobox.js +281 -0
  39. package/dist/ui/command.d.ts +22 -0
  40. package/dist/ui/command.js +183 -0
  41. package/dist/ui/context-menu.d.ts +31 -0
  42. package/dist/ui/context-menu.js +242 -0
  43. package/dist/ui/dialog.js +2 -2
  44. package/dist/ui/direction.d.ts +1 -0
  45. package/dist/ui/direction.js +8 -0
  46. package/dist/ui/drawer.d.ts +18 -0
  47. package/dist/ui/drawer.js +208 -0
  48. package/dist/ui/dropdown-menu.d.ts +1 -1
  49. package/dist/ui/dropdown-menu.js +13 -9
  50. package/dist/ui/empty.d.ts +15 -0
  51. package/dist/ui/empty.js +102 -0
  52. package/dist/ui/field.d.ts +28 -0
  53. package/dist/ui/field.js +217 -0
  54. package/dist/ui/hover-card.d.ts +8 -0
  55. package/dist/ui/hover-card.js +45 -0
  56. package/dist/ui/input-group.d.ts +22 -0
  57. package/dist/ui/input-group.js +145 -0
  58. package/dist/ui/input-otp.d.ts +13 -0
  59. package/dist/ui/input-otp.js +82 -0
  60. package/dist/ui/input.js +1 -1
  61. package/dist/ui/item.d.ts +26 -0
  62. package/dist/ui/item.js +195 -0
  63. package/dist/ui/kbd.d.ts +6 -0
  64. package/dist/ui/kbd.js +29 -0
  65. package/dist/ui/marker.d.ts +13 -0
  66. package/dist/ui/marker.js +71 -0
  67. package/dist/ui/menubar.d.ts +31 -0
  68. package/dist/ui/menubar.js +259 -0
  69. package/dist/ui/message-scroller.d.ts +16 -0
  70. package/dist/ui/message-scroller.js +120 -0
  71. package/dist/ui/message.d.ts +12 -0
  72. package/dist/ui/message.js +90 -0
  73. package/dist/ui/native-select.d.ts +10 -0
  74. package/dist/ui/native-select.js +63 -0
  75. package/dist/ui/navigation-menu.d.ts +15 -0
  76. package/dist/ui/navigation-menu.js +162 -0
  77. package/dist/ui/pagination.d.ts +22 -0
  78. package/dist/ui/pagination.js +128 -0
  79. package/dist/ui/popover.js +2 -2
  80. package/dist/ui/questionnaire.d.ts +24 -0
  81. package/dist/ui/questionnaire.js +331 -0
  82. package/dist/ui/radio-group.d.ts +8 -0
  83. package/dist/ui/radio-group.js +39 -0
  84. package/dist/ui/resizable.d.ts +10 -0
  85. package/dist/ui/resizable.js +46 -0
  86. package/dist/ui/scroll-area.js +1 -1
  87. package/dist/ui/select.js +5 -5
  88. package/dist/ui/sheet.js +4 -4
  89. package/dist/ui/sidebar.js +8 -8
  90. package/dist/ui/slider.d.ts +6 -0
  91. package/dist/ui/slider.js +53 -0
  92. package/dist/ui/spinner.d.ts +5 -0
  93. package/dist/ui/spinner.js +9 -0
  94. package/dist/ui/switch.d.ts +8 -0
  95. package/dist/ui/switch.js +32 -0
  96. package/dist/ui/table.js +2 -2
  97. package/dist/ui/tabs.d.ts +1 -1
  98. package/dist/ui/tabs.js +1 -1
  99. package/dist/ui/textarea.js +1 -1
  100. package/dist/ui/toast.d.ts +19 -0
  101. package/dist/ui/toast.js +193 -0
  102. package/dist/ui/toggle-group.d.ts +14 -0
  103. package/dist/ui/toggle-group.js +77 -0
  104. package/dist/ui/toggle.d.ts +12 -0
  105. package/dist/ui/toggle.js +43 -0
  106. package/dist/ui/tooltip.js +3 -3
  107. package/docs/CONTRACT.md +123 -0
  108. package/package.json +138 -95
  109. package/scripts/doctor.mjs +202 -0
  110. package/scripts/manifest.mjs +79 -0
@@ -0,0 +1,242 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu";
4
+ import { cn } from "../lib/utils";
5
+ import { ChevronRightIcon, CheckIcon } from "lucide-react";
6
+ function ContextMenu({ ...props }) {
7
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
8
+ }
9
+ function ContextMenuPortal({ ...props }) {
10
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { "data-slot": "context-menu-portal", ...props });
11
+ }
12
+ function ContextMenuTrigger({
13
+ className,
14
+ ...props
15
+ }) {
16
+ return /* @__PURE__ */ jsx(
17
+ ContextMenuPrimitive.Trigger,
18
+ {
19
+ "data-slot": "context-menu-trigger",
20
+ className: cn("select-none", className),
21
+ ...props
22
+ }
23
+ );
24
+ }
25
+ function ContextMenuContent({
26
+ className,
27
+ align = "start",
28
+ alignOffset = 4,
29
+ side = "right",
30
+ sideOffset = 0,
31
+ ...props
32
+ }) {
33
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
34
+ ContextMenuPrimitive.Positioner,
35
+ {
36
+ className: "isolate z-(--ds-z-overlay) outline-none",
37
+ align,
38
+ alignOffset,
39
+ side,
40
+ sideOffset,
41
+ children: /* @__PURE__ */ jsx(
42
+ ContextMenuPrimitive.Popup,
43
+ {
44
+ "data-slot": "context-menu-content",
45
+ className: cn("z-(--ds-z-overlay) max-h-(--available-height) min-w-48 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-2xl bg-popover p-1 text-popover-foreground shadow-popover ring-1 ring-foreground/5 duration-(--ds-motion-fast) 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:fade-out-0 data-closed:zoom-out-95", className),
46
+ ...props
47
+ }
48
+ )
49
+ }
50
+ ) });
51
+ }
52
+ function ContextMenuGroup({ ...props }) {
53
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props });
54
+ }
55
+ function ContextMenuLabel({
56
+ className,
57
+ inset,
58
+ ...props
59
+ }) {
60
+ return /* @__PURE__ */ jsx(
61
+ ContextMenuPrimitive.GroupLabel,
62
+ {
63
+ "data-slot": "context-menu-label",
64
+ "data-inset": inset,
65
+ className: cn(
66
+ "px-3 py-2.5 text-xs text-muted-foreground data-inset:pl-9.5",
67
+ className
68
+ ),
69
+ ...props
70
+ }
71
+ );
72
+ }
73
+ function ContextMenuItem({
74
+ className,
75
+ inset,
76
+ variant = "default",
77
+ ...props
78
+ }) {
79
+ return /* @__PURE__ */ jsx(
80
+ ContextMenuPrimitive.Item,
81
+ {
82
+ "data-slot": "context-menu-item",
83
+ "data-inset": inset,
84
+ "data-variant": variant,
85
+ className: cn(
86
+ "group/context-menu-item relative flex cursor-default items-center gap-2.5 rounded-xl px-3 py-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive",
87
+ className
88
+ ),
89
+ ...props
90
+ }
91
+ );
92
+ }
93
+ function ContextMenuSub({ ...props }) {
94
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.SubmenuRoot, { "data-slot": "context-menu-sub", ...props });
95
+ }
96
+ function ContextMenuSubTrigger({
97
+ className,
98
+ inset,
99
+ children,
100
+ ...props
101
+ }) {
102
+ return /* @__PURE__ */ jsxs(
103
+ ContextMenuPrimitive.SubmenuTrigger,
104
+ {
105
+ "data-slot": "context-menu-sub-trigger",
106
+ "data-inset": inset,
107
+ className: cn(
108
+ "flex cursor-default items-center rounded-xl px-3 py-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
109
+ className
110
+ ),
111
+ ...props,
112
+ children: [
113
+ children,
114
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })
115
+ ]
116
+ }
117
+ );
118
+ }
119
+ function ContextMenuSubContent({
120
+ ...props
121
+ }) {
122
+ return /* @__PURE__ */ jsx(
123
+ ContextMenuContent,
124
+ {
125
+ "data-slot": "context-menu-sub-content",
126
+ className: "shadow-overlay",
127
+ side: "right",
128
+ ...props
129
+ }
130
+ );
131
+ }
132
+ function ContextMenuCheckboxItem({
133
+ className,
134
+ children,
135
+ checked,
136
+ inset,
137
+ ...props
138
+ }) {
139
+ return /* @__PURE__ */ jsxs(
140
+ ContextMenuPrimitive.CheckboxItem,
141
+ {
142
+ "data-slot": "context-menu-checkbox-item",
143
+ "data-inset": inset,
144
+ className: cn(
145
+ "relative flex cursor-default items-center gap-2 rounded-xl py-2 pr-8 pl-3 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
146
+ className
147
+ ),
148
+ checked,
149
+ ...props,
150
+ children: [
151
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(
152
+ CheckIcon,
153
+ {}
154
+ ) }) }),
155
+ children
156
+ ]
157
+ }
158
+ );
159
+ }
160
+ function ContextMenuRadioGroup({
161
+ ...props
162
+ }) {
163
+ return /* @__PURE__ */ jsx(
164
+ ContextMenuPrimitive.RadioGroup,
165
+ {
166
+ "data-slot": "context-menu-radio-group",
167
+ ...props
168
+ }
169
+ );
170
+ }
171
+ function ContextMenuRadioItem({
172
+ className,
173
+ children,
174
+ inset,
175
+ ...props
176
+ }) {
177
+ return /* @__PURE__ */ jsxs(
178
+ ContextMenuPrimitive.RadioItem,
179
+ {
180
+ "data-slot": "context-menu-radio-item",
181
+ "data-inset": inset,
182
+ className: cn(
183
+ "relative flex cursor-default items-center gap-2 rounded-xl py-2 pr-8 pl-3 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
184
+ className
185
+ ),
186
+ ...props,
187
+ children: [
188
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.RadioItemIndicator, { children: /* @__PURE__ */ jsx(
189
+ CheckIcon,
190
+ {}
191
+ ) }) }),
192
+ children
193
+ ]
194
+ }
195
+ );
196
+ }
197
+ function ContextMenuSeparator({
198
+ className,
199
+ ...props
200
+ }) {
201
+ return /* @__PURE__ */ jsx(
202
+ ContextMenuPrimitive.Separator,
203
+ {
204
+ "data-slot": "context-menu-separator",
205
+ className: cn("-mx-1 my-1 h-px bg-border/50", className),
206
+ ...props
207
+ }
208
+ );
209
+ }
210
+ function ContextMenuShortcut({
211
+ className,
212
+ ...props
213
+ }) {
214
+ return /* @__PURE__ */ jsx(
215
+ "span",
216
+ {
217
+ "data-slot": "context-menu-shortcut",
218
+ className: cn(
219
+ "ml-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground",
220
+ className
221
+ ),
222
+ ...props
223
+ }
224
+ );
225
+ }
226
+ export {
227
+ ContextMenu,
228
+ ContextMenuCheckboxItem,
229
+ ContextMenuContent,
230
+ ContextMenuGroup,
231
+ ContextMenuItem,
232
+ ContextMenuLabel,
233
+ ContextMenuPortal,
234
+ ContextMenuRadioGroup,
235
+ ContextMenuRadioItem,
236
+ ContextMenuSeparator,
237
+ ContextMenuShortcut,
238
+ ContextMenuSub,
239
+ ContextMenuSubContent,
240
+ ContextMenuSubTrigger,
241
+ ContextMenuTrigger
242
+ };
package/dist/ui/dialog.js CHANGED
@@ -24,7 +24,7 @@ function DialogOverlay({
24
24
  {
25
25
  "data-slot": "dialog-overlay",
26
26
  className: cn(
27
- "fixed inset-0 isolate z-(--z-overlay) bg-scrim duration-(--motion-fast) supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
27
+ "fixed inset-0 isolate z-(--ds-z-overlay) bg-scrim duration-(--ds-motion-fast) supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
28
28
  className
29
29
  ),
30
30
  ...props
@@ -44,7 +44,7 @@ function DialogContent({
44
44
  {
45
45
  "data-slot": "dialog-content",
46
46
  className: cn(
47
- "fixed top-1/2 left-1/2 z-(--z-overlay) grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-overlay bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/5 duration-(--motion-fast) outline-none sm:max-w-md 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",
47
+ "fixed top-1/2 left-1/2 z-(--ds-z-overlay) grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-(--ds-overlay-gap) rounded-overlay bg-popover p-(--ds-overlay-p) text-sm text-popover-foreground ring-1 ring-foreground/5 duration-(--ds-motion-fast) outline-none sm:max-w-md 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",
48
48
  className
49
49
  ),
50
50
  ...props,
@@ -0,0 +1 @@
1
+ export { DirectionProvider, useDirection } from '@base-ui/react/direction-provider';
@@ -0,0 +1,8 @@
1
+ import {
2
+ DirectionProvider,
3
+ useDirection
4
+ } from "@base-ui/react/direction-provider";
5
+ export {
6
+ DirectionProvider,
7
+ useDirection
8
+ };
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { Drawer as Drawer$1 } from '@base-ui/react/drawer';
3
+
4
+ declare function Drawer({ modal, showSwipeHandle, snapPoints, swipeDirection, ...props }: Drawer$1.Root.Props & {
5
+ showSwipeHandle?: boolean;
6
+ }): React.JSX.Element;
7
+ declare function DrawerTrigger({ ...props }: Drawer$1.Trigger.Props): React.JSX.Element;
8
+ declare function DrawerPortal({ ...props }: Drawer$1.Portal.Props): React.JSX.Element;
9
+ declare function DrawerClose({ ...props }: Drawer$1.Close.Props): React.JSX.Element;
10
+ declare function DrawerOverlay({ className, ...props }: Drawer$1.Backdrop.Props): React.JSX.Element;
11
+ declare function DrawerSwipeHandle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
12
+ declare function DrawerContent({ className, children, ...props }: Drawer$1.Popup.Props): React.JSX.Element;
13
+ declare function DrawerHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
14
+ declare function DrawerFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
15
+ declare function DrawerTitle({ className, ...props }: Drawer$1.Title.Props): React.JSX.Element;
16
+ declare function DrawerDescription({ className, ...props }: Drawer$1.Description.Props): React.JSX.Element;
17
+
18
+ export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerSwipeHandle, DrawerTitle, DrawerTrigger };
@@ -0,0 +1,208 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
5
+ import { cn } from "../lib/utils";
6
+ const DrawerContext = React.createContext(null);
7
+ function useDrawer() {
8
+ const context = React.useContext(DrawerContext);
9
+ if (!context) {
10
+ throw new Error("useDrawer must be used within a Drawer.");
11
+ }
12
+ return context;
13
+ }
14
+ function Drawer({
15
+ modal = true,
16
+ showSwipeHandle = false,
17
+ snapPoints,
18
+ swipeDirection = "down",
19
+ ...props
20
+ }) {
21
+ const hasSnapPoints = snapPoints != null && snapPoints.length > 0;
22
+ const contextValue = React.useMemo(
23
+ () => ({ hasSnapPoints, modal, showSwipeHandle, swipeDirection }),
24
+ [hasSnapPoints, modal, showSwipeHandle, swipeDirection]
25
+ );
26
+ return /* @__PURE__ */ jsx(DrawerContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
27
+ DrawerPrimitive.Root,
28
+ {
29
+ "data-slot": "drawer",
30
+ modal,
31
+ snapPoints,
32
+ swipeDirection,
33
+ ...props
34
+ }
35
+ ) });
36
+ }
37
+ function DrawerTrigger({ ...props }) {
38
+ return /* @__PURE__ */ jsx(DrawerPrimitive.Trigger, { "data-slot": "drawer-trigger", ...props });
39
+ }
40
+ function DrawerPortal({ ...props }) {
41
+ return /* @__PURE__ */ jsx(DrawerPrimitive.Portal, { "data-slot": "drawer-portal", ...props });
42
+ }
43
+ function DrawerClose({ ...props }) {
44
+ return /* @__PURE__ */ jsx(DrawerPrimitive.Close, { "data-slot": "drawer-close", ...props });
45
+ }
46
+ function DrawerOverlay({
47
+ className,
48
+ ...props
49
+ }) {
50
+ return /* @__PURE__ */ jsx(
51
+ DrawerPrimitive.Backdrop,
52
+ {
53
+ "data-slot": "drawer-overlay",
54
+ className: cn(
55
+ "fixed inset-0 z-(--ds-z-overlay) min-h-dvh bg-scrim opacity-[max(var(--drawer-overlay-min-opacity,0),calc(1-var(--drawer-swipe-progress)))] transition-opacity duration-(--ds-motion-slow) 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",
56
+ className
57
+ ),
58
+ ...props
59
+ }
60
+ );
61
+ }
62
+ function DrawerSwipeHandle({
63
+ className,
64
+ ...props
65
+ }) {
66
+ return /* @__PURE__ */ jsx(
67
+ "div",
68
+ {
69
+ "data-slot": "drawer-swipe-handle",
70
+ "aria-hidden": "true",
71
+ className: cn(
72
+ "relative z-(--ds-z-raised) flex shrink-0 cursor-grab transition-opacity duration-(--ds-motion-base) 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-[100px] group-data-[swipe-axis=x]/drawer-popup:after:w-1.5 group-data-[swipe-axis=y]/drawer-popup:after:h-1.5 group-data-[swipe-axis=y]/drawer-popup:after:w-[100px] active:cursor-grabbing",
73
+ className
74
+ ),
75
+ ...props
76
+ }
77
+ );
78
+ }
79
+ function DrawerContent({
80
+ className,
81
+ children,
82
+ ...props
83
+ }) {
84
+ const { hasSnapPoints, modal, showSwipeHandle, swipeDirection } = useDrawer();
85
+ const swipeAxis = swipeDirection === "down" || swipeDirection === "up" ? "y" : "x";
86
+ return /* @__PURE__ */ jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [
87
+ modal === true && /* @__PURE__ */ jsx(DrawerOverlay, { "data-snap-points": hasSnapPoints ? "" : void 0 }),
88
+ /* @__PURE__ */ jsx(
89
+ DrawerPrimitive.Viewport,
90
+ {
91
+ "data-slot": "drawer-viewport",
92
+ "data-modal": modal,
93
+ className: "pointer-events-none fixed inset-0 z-(--ds-z-overlay) select-none data-[modal=true]:pointer-events-auto",
94
+ children: /* @__PURE__ */ jsxs(
95
+ DrawerPrimitive.Popup,
96
+ {
97
+ "data-slot": "drawer-popup",
98
+ "data-swipe-axis": swipeAxis,
99
+ "data-snap-points": hasSnapPoints ? "" : void 0,
100
+ className: cn(
101
+ // Base.
102
+ "group/drawer-popup pointer-events-auto fixed z-(--ds-z-overlay) 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 rounded-control border border-popover bg-popover text-sm text-popover-foreground transition-[transform,height,opacity,filter] duration-(--ds-motion-slow) ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform outline-none select-none [--drawer-bleed-background:transparent] [--drawer-inset:--spacing(2)] [interpolate-size:allow-keywords] dark:border-border",
103
+ // Nested.
104
+ "data-nested-drawer-open:overflow-hidden data-nested-drawer-open:brightness-95",
105
+ // Bleed.
106
+ "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",
107
+ // Sizing.
108
+ "[--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]",
109
+ // Stack.
110
+ "[--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]",
111
+ // Transitions.
112
+ "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)]",
113
+ // Axis: y.
114
+ "data-[swipe-axis=y]:inset-x-0 data-[swipe-axis=y]:data-nested-drawer-open:h-(--stack-height)",
115
+ // Axis: x.
116
+ "data-[swipe-axis=x]:inset-y-0 data-[swipe-axis=x]:flex-row",
117
+ // Direction: down.
118
+ "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)))]",
119
+ // Direction: up.
120
+ "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)))]",
121
+ // Direction: left.
122
+ "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%))]",
123
+ // Direction: right.
124
+ "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%))]",
125
+ className
126
+ ),
127
+ ...props,
128
+ children: [
129
+ showSwipeHandle && /* @__PURE__ */ jsx(DrawerSwipeHandle, {}),
130
+ /* @__PURE__ */ jsx(
131
+ DrawerPrimitive.Content,
132
+ {
133
+ "data-slot": "drawer-content",
134
+ className: cn(
135
+ "flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-(--ds-motion-slow) 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"
136
+ ),
137
+ children
138
+ }
139
+ )
140
+ ]
141
+ }
142
+ )
143
+ }
144
+ )
145
+ ] });
146
+ }
147
+ function DrawerHeader({ className, ...props }) {
148
+ return /* @__PURE__ */ jsx(
149
+ "div",
150
+ {
151
+ "data-slot": "drawer-header",
152
+ className: cn(
153
+ "flex shrink-0 flex-col gap-0.5 p-4 pb-0 group-data-[swipe-axis=y]/drawer-popup:text-center md:gap-1.5 md:text-left",
154
+ className
155
+ ),
156
+ ...props
157
+ }
158
+ );
159
+ }
160
+ function DrawerFooter({ className, ...props }) {
161
+ return /* @__PURE__ */ jsx(
162
+ "div",
163
+ {
164
+ "data-slot": "drawer-footer",
165
+ className: cn("mt-auto flex shrink-0 flex-col gap-2 p-4 pt-0", className),
166
+ ...props
167
+ }
168
+ );
169
+ }
170
+ function DrawerTitle({ className, ...props }) {
171
+ return /* @__PURE__ */ jsx(
172
+ DrawerPrimitive.Title,
173
+ {
174
+ "data-slot": "drawer-title",
175
+ className: cn(
176
+ "text-base font-medium text-foreground",
177
+ className
178
+ ),
179
+ ...props
180
+ }
181
+ );
182
+ }
183
+ function DrawerDescription({
184
+ className,
185
+ ...props
186
+ }) {
187
+ return /* @__PURE__ */ jsx(
188
+ DrawerPrimitive.Description,
189
+ {
190
+ "data-slot": "drawer-description",
191
+ className: cn("text-sm text-balance text-muted-foreground", className),
192
+ ...props
193
+ }
194
+ );
195
+ }
196
+ export {
197
+ Drawer,
198
+ DrawerClose,
199
+ DrawerContent,
200
+ DrawerDescription,
201
+ DrawerFooter,
202
+ DrawerHeader,
203
+ DrawerOverlay,
204
+ DrawerPortal,
205
+ DrawerSwipeHandle,
206
+ DrawerTitle,
207
+ DrawerTrigger
208
+ };
@@ -4,7 +4,7 @@ import { Menu } from '@base-ui/react/menu';
4
4
  declare function DropdownMenu({ ...props }: Menu.Root.Props): React.JSX.Element;
5
5
  declare function DropdownMenuPortal({ ...props }: Menu.Portal.Props): React.JSX.Element;
6
6
  declare function DropdownMenuTrigger({ ...props }: Menu.Trigger.Props): React.JSX.Element;
7
- declare function DropdownMenuContent({ className, align, sideOffset, ...props }: Menu.Popup.Props & Pick<Menu.Positioner.Props, "align" | "sideOffset">): React.JSX.Element;
7
+ declare function DropdownMenuContent({ className, align, alignOffset, side, sideOffset, ...props }: Menu.Popup.Props & Pick<Menu.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): React.JSX.Element;
8
8
  declare function DropdownMenuGroup({ ...props }: Menu.Group.Props): React.JSX.Element;
9
9
  declare function DropdownMenuItem({ className, inset, variant, ...props }: Menu.Item.Props & {
10
10
  inset?: boolean;
@@ -23,6 +23,8 @@ function DropdownMenuTrigger({
23
23
  function DropdownMenuContent({
24
24
  className,
25
25
  align = "start",
26
+ alignOffset = 0,
27
+ side = "bottom",
26
28
  sideOffset = 4,
27
29
  ...props
28
30
  }) {
@@ -31,13 +33,15 @@ function DropdownMenuContent({
31
33
  {
32
34
  sideOffset,
33
35
  align,
34
- className: "z-(--z-overlay)",
36
+ alignOffset,
37
+ side,
38
+ className: "z-(--ds-z-overlay)",
35
39
  children: /* @__PURE__ */ jsx(
36
40
  DropdownMenuPrimitive.Popup,
37
41
  {
38
42
  "data-slot": "dropdown-menu-content",
39
43
  className: cn(
40
- "max-h-(--available-height) w-(--anchor-width) min-w-48 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-2xl bg-popover p-1 text-popover-foreground shadow-popover ring-1 ring-foreground/5 duration-(--motion-fast) 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-closed:overflow-hidden dark:ring-foreground/10 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",
44
+ "max-h-(--available-height) w-(--anchor-width) min-w-48 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-2xl bg-popover p-(--ds-menu-p) text-popover-foreground shadow-popover ring-1 ring-foreground/5 duration-(--ds-motion-fast) 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-closed:overflow-hidden dark:ring-foreground/10 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",
41
45
  className
42
46
  ),
43
47
  ...props
@@ -62,7 +66,7 @@ function DropdownMenuItem({
62
66
  "data-inset": inset,
63
67
  "data-variant": variant,
64
68
  className: cn(
65
- "group/dropdown-menu-item relative flex cursor-default items-center gap-2.5 rounded-xl px-3 py-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
69
+ "group/dropdown-menu-item relative flex cursor-default items-center gap-2.5 rounded-xl px-(--ds-menu-item-px) py-(--ds-menu-item-py) text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
66
70
  className
67
71
  ),
68
72
  ...props
@@ -82,7 +86,7 @@ function DropdownMenuCheckboxItem({
82
86
  "data-slot": "dropdown-menu-checkbox-item",
83
87
  "data-inset": inset,
84
88
  className: cn(
85
- "relative flex cursor-default items-center gap-2.5 rounded-xl py-2 pr-8 pl-3 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
89
+ "relative flex cursor-default items-center gap-2.5 rounded-xl py-(--ds-menu-item-py) pr-8 pl-3 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
86
90
  className
87
91
  ),
88
92
  checked,
@@ -124,7 +128,7 @@ function DropdownMenuRadioItem({
124
128
  "data-slot": "dropdown-menu-radio-item",
125
129
  "data-inset": inset,
126
130
  className: cn(
127
- "relative flex cursor-default items-center gap-2.5 rounded-xl py-2 pr-8 pl-3 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
131
+ "relative flex cursor-default items-center gap-2.5 rounded-xl py-(--ds-menu-item-py) pr-8 pl-3 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
128
132
  className
129
133
  ),
130
134
  ...props,
@@ -153,7 +157,7 @@ function DropdownMenuLabel({
153
157
  "data-slot": "dropdown-menu-label",
154
158
  "data-inset": inset,
155
159
  className: cn(
156
- "px-3 py-2.5 text-xs text-muted-foreground data-inset:pl-9.5",
160
+ "px-(--ds-menu-item-px) py-(--ds-menu-item-py).5 text-xs text-muted-foreground data-inset:pl-9.5",
157
161
  className
158
162
  ),
159
163
  ...props
@@ -212,7 +216,7 @@ function DropdownMenuSubTrigger({
212
216
  "data-slot": "dropdown-menu-sub-trigger",
213
217
  "data-inset": inset,
214
218
  className: cn(
215
- "flex cursor-default items-center gap-2 rounded-xl px-3 py-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-9.5 data-popup-open:bg-accent data-popup-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
219
+ "flex cursor-default items-center gap-2 rounded-xl px-(--ds-menu-item-px) py-(--ds-menu-item-py) text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-9.5 data-popup-open:bg-accent data-popup-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
216
220
  className
217
221
  ),
218
222
  ...props,
@@ -227,12 +231,12 @@ function DropdownMenuSubContent({
227
231
  className,
228
232
  ...props
229
233
  }) {
230
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Positioner, { className: "z-(--z-overlay)", children: /* @__PURE__ */ jsx(
234
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Positioner, { className: "z-(--ds-z-overlay)", children: /* @__PURE__ */ jsx(
231
235
  DropdownMenuPrimitive.Popup,
232
236
  {
233
237
  "data-slot": "dropdown-menu-sub-content",
234
238
  className: cn(
235
- "z-(--z-overlay) min-w-36 origin-(--transform-origin) overflow-hidden rounded-2xl bg-popover p-1 text-popover-foreground shadow-popover ring-1 ring-foreground/5 duration-(--motion-fast) 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",
239
+ "z-(--ds-z-overlay) min-w-36 origin-(--transform-origin) overflow-hidden rounded-2xl bg-popover p-(--ds-menu-p) text-popover-foreground shadow-popover ring-1 ring-foreground/5 duration-(--ds-motion-fast) 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",
236
240
  className
237
241
  ),
238
242
  ...props
@@ -0,0 +1,15 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React$1 from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare function Empty({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
6
+ declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
7
+ declare const emptyMediaVariants: (props?: ({
8
+ variant?: "default" | "icon" | null | undefined;
9
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
10
+ declare function EmptyMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>): React$1.JSX.Element;
11
+ declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
12
+ declare function EmptyDescription({ className, ...props }: React.ComponentProps<"p">): React$1.JSX.Element;
13
+ declare function EmptyContent({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
14
+
15
+ export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };