@arolariu/components 1.0.0 → 1.1.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 (218) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/EXAMPLES.md +2510 -0
  3. package/dist/components/ui/alert-dialog.d.ts +4 -16
  4. package/dist/components/ui/alert-dialog.d.ts.map +1 -1
  5. package/dist/components/ui/alert-dialog.js +18 -14
  6. package/dist/components/ui/alert-dialog.js.map +1 -1
  7. package/dist/components/ui/avatar.d.ts +3 -12
  8. package/dist/components/ui/avatar.d.ts.map +1 -1
  9. package/dist/components/ui/avatar.js +18 -15
  10. package/dist/components/ui/avatar.js.map +1 -1
  11. package/dist/components/ui/button-group.d.ts +1 -1
  12. package/dist/components/ui/button-group.d.ts.map +1 -1
  13. package/dist/components/ui/calendar.d.ts +1 -4
  14. package/dist/components/ui/calendar.d.ts.map +1 -1
  15. package/dist/components/ui/calendar.js +7 -7
  16. package/dist/components/ui/calendar.js.map +1 -1
  17. package/dist/components/ui/carousel.d.ts.map +1 -1
  18. package/dist/components/ui/carousel.js.map +1 -1
  19. package/dist/components/ui/chart.d.ts.map +1 -1
  20. package/dist/components/ui/chart.js +125 -59
  21. package/dist/components/ui/chart.js.map +1 -1
  22. package/dist/components/ui/checkbox-group.d.ts +2 -6
  23. package/dist/components/ui/checkbox-group.d.ts.map +1 -1
  24. package/dist/components/ui/checkbox-group.js +8 -7
  25. package/dist/components/ui/checkbox-group.js.map +1 -1
  26. package/dist/components/ui/checkbox.d.ts +3 -1
  27. package/dist/components/ui/checkbox.d.ts.map +1 -1
  28. package/dist/components/ui/checkbox.js +4 -1
  29. package/dist/components/ui/checkbox.js.map +1 -1
  30. package/dist/components/ui/collapsible.d.ts.map +1 -1
  31. package/dist/components/ui/collapsible.js.map +1 -1
  32. package/dist/components/ui/combobox.d.ts +335 -0
  33. package/dist/components/ui/combobox.d.ts.map +1 -0
  34. package/dist/components/ui/combobox.js +206 -0
  35. package/dist/components/ui/combobox.js.map +1 -0
  36. package/dist/components/ui/combobox.module.js +23 -0
  37. package/dist/components/ui/combobox.module.js.map +1 -0
  38. package/dist/components/ui/combobox_module.css +142 -0
  39. package/dist/components/ui/combobox_module.css.map +1 -0
  40. package/dist/components/ui/command.d.ts.map +1 -1
  41. package/dist/components/ui/command.js +25 -16
  42. package/dist/components/ui/command.js.map +1 -1
  43. package/dist/components/ui/context-menu.d.ts.map +1 -1
  44. package/dist/components/ui/context-menu.js.map +1 -1
  45. package/dist/components/ui/drawer.d.ts.map +1 -1
  46. package/dist/components/ui/drawer.js.map +1 -1
  47. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  48. package/dist/components/ui/dropdown-menu.js.map +1 -1
  49. package/dist/components/ui/dropdrawer.d.ts +10 -16
  50. package/dist/components/ui/dropdrawer.d.ts.map +1 -1
  51. package/dist/components/ui/dropdrawer.js +28 -20
  52. package/dist/components/ui/dropdrawer.js.map +1 -1
  53. package/dist/components/ui/item.d.ts +1 -1
  54. package/dist/components/ui/item.d.ts.map +1 -1
  55. package/dist/components/ui/menubar.d.ts +11 -13
  56. package/dist/components/ui/menubar.d.ts.map +1 -1
  57. package/dist/components/ui/menubar.js.map +1 -1
  58. package/dist/components/ui/meter.d.ts +8 -24
  59. package/dist/components/ui/meter.d.ts.map +1 -1
  60. package/dist/components/ui/meter.js +23 -19
  61. package/dist/components/ui/meter.js.map +1 -1
  62. package/dist/components/ui/navigation-menu.d.ts +3 -12
  63. package/dist/components/ui/navigation-menu.d.ts.map +1 -1
  64. package/dist/components/ui/navigation-menu.js +14 -11
  65. package/dist/components/ui/navigation-menu.js.map +1 -1
  66. package/dist/components/ui/number-field.d.ts +6 -12
  67. package/dist/components/ui/number-field.d.ts.map +1 -1
  68. package/dist/components/ui/number-field.js.map +1 -1
  69. package/dist/components/ui/progress.d.ts +1 -4
  70. package/dist/components/ui/progress.d.ts.map +1 -1
  71. package/dist/components/ui/progress.js +10 -9
  72. package/dist/components/ui/progress.js.map +1 -1
  73. package/dist/components/ui/radio-group.d.ts +2 -4
  74. package/dist/components/ui/radio-group.d.ts.map +1 -1
  75. package/dist/components/ui/radio-group.js.map +1 -1
  76. package/dist/components/ui/resizable.d.ts +3 -3
  77. package/dist/components/ui/resizable.d.ts.map +1 -1
  78. package/dist/components/ui/resizable.js.map +1 -1
  79. package/dist/components/ui/scratcher.d.ts +1 -1
  80. package/dist/components/ui/scratcher.d.ts.map +1 -1
  81. package/dist/components/ui/scratcher.js +5 -4
  82. package/dist/components/ui/scratcher.js.map +1 -1
  83. package/dist/components/ui/scroll-area.d.ts +2 -4
  84. package/dist/components/ui/scroll-area.d.ts.map +1 -1
  85. package/dist/components/ui/scroll-area.js.map +1 -1
  86. package/dist/components/ui/separator.d.ts +1 -4
  87. package/dist/components/ui/separator.d.ts.map +1 -1
  88. package/dist/components/ui/separator.js +9 -8
  89. package/dist/components/ui/separator.js.map +1 -1
  90. package/dist/components/ui/sheet.d.ts.map +1 -1
  91. package/dist/components/ui/sheet.js.map +1 -1
  92. package/dist/components/ui/sidebar.d.ts +1 -1
  93. package/dist/components/ui/sidebar.d.ts.map +1 -1
  94. package/dist/components/ui/sidebar.js.map +1 -1
  95. package/dist/components/ui/sonner.d.ts +5 -4
  96. package/dist/components/ui/sonner.d.ts.map +1 -1
  97. package/dist/components/ui/sonner.js +7 -6
  98. package/dist/components/ui/sonner.js.map +1 -1
  99. package/dist/components/ui/toggle-group.d.ts +2 -8
  100. package/dist/components/ui/toggle-group.d.ts.map +1 -1
  101. package/dist/components/ui/toggle-group.js +12 -10
  102. package/dist/components/ui/toggle-group.js.map +1 -1
  103. package/dist/components/ui/toolbar.d.ts +10 -30
  104. package/dist/components/ui/toolbar.d.ts.map +1 -1
  105. package/dist/components/ui/toolbar.js +28 -23
  106. package/dist/components/ui/toolbar.js.map +1 -1
  107. package/dist/hooks/useClipboard.d.ts +77 -0
  108. package/dist/hooks/useClipboard.d.ts.map +1 -0
  109. package/dist/hooks/useClipboard.js +42 -0
  110. package/dist/hooks/useClipboard.js.map +1 -0
  111. package/dist/hooks/useControllableState.d.ts +54 -0
  112. package/dist/hooks/useControllableState.d.ts.map +1 -0
  113. package/dist/hooks/useControllableState.js +29 -0
  114. package/dist/hooks/useControllableState.js.map +1 -0
  115. package/dist/hooks/useDebounce.d.ts +33 -0
  116. package/dist/hooks/useDebounce.d.ts.map +1 -0
  117. package/dist/hooks/useDebounce.js +20 -0
  118. package/dist/hooks/useDebounce.js.map +1 -0
  119. package/dist/hooks/useEventCallback.d.ts +34 -0
  120. package/dist/hooks/useEventCallback.d.ts.map +1 -0
  121. package/dist/hooks/useEventCallback.js +12 -0
  122. package/dist/hooks/useEventCallback.js.map +1 -0
  123. package/dist/hooks/useId.d.ts +30 -0
  124. package/dist/hooks/useId.d.ts.map +1 -0
  125. package/dist/hooks/useId.js +9 -0
  126. package/dist/hooks/useId.js.map +1 -0
  127. package/dist/hooks/useIntersectionObserver.d.ts +51 -0
  128. package/dist/hooks/useIntersectionObserver.d.ts.map +1 -0
  129. package/dist/hooks/useIntersectionObserver.js +25 -0
  130. package/dist/hooks/useIntersectionObserver.js.map +1 -0
  131. package/dist/hooks/useInterval.d.ts +55 -0
  132. package/dist/hooks/useInterval.d.ts.map +1 -0
  133. package/dist/hooks/useInterval.js +24 -0
  134. package/dist/hooks/useInterval.js.map +1 -0
  135. package/dist/hooks/useLocalStorage.d.ts +43 -0
  136. package/dist/hooks/useLocalStorage.d.ts.map +1 -0
  137. package/dist/hooks/useLocalStorage.js +53 -0
  138. package/dist/hooks/useLocalStorage.js.map +1 -0
  139. package/dist/hooks/useMergedRefs.d.ts +27 -0
  140. package/dist/hooks/useMergedRefs.d.ts.map +1 -0
  141. package/dist/hooks/useMergedRefs.js +11 -0
  142. package/dist/hooks/useMergedRefs.js.map +1 -0
  143. package/dist/hooks/useOnClickOutside.d.ts +32 -0
  144. package/dist/hooks/useOnClickOutside.d.ts.map +1 -0
  145. package/dist/hooks/useOnClickOutside.js +23 -0
  146. package/dist/hooks/useOnClickOutside.js.map +1 -0
  147. package/dist/hooks/usePrevious.d.ts +33 -0
  148. package/dist/hooks/usePrevious.d.ts.map +1 -0
  149. package/dist/hooks/usePrevious.js +14 -0
  150. package/dist/hooks/usePrevious.js.map +1 -0
  151. package/dist/hooks/useThrottle.d.ts +37 -0
  152. package/dist/hooks/useThrottle.d.ts.map +1 -0
  153. package/dist/hooks/useThrottle.js +34 -0
  154. package/dist/hooks/useThrottle.js.map +1 -0
  155. package/dist/hooks/useTimeout.d.ts +28 -0
  156. package/dist/hooks/useTimeout.d.ts.map +1 -0
  157. package/dist/hooks/useTimeout.js +24 -0
  158. package/dist/hooks/useTimeout.js.map +1 -0
  159. package/dist/index.d.ts +14 -0
  160. package/dist/index.d.ts.map +1 -1
  161. package/dist/index.js +14 -0
  162. package/dist/lib/utilities.d.ts +2 -3
  163. package/dist/lib/utilities.d.ts.map +1 -1
  164. package/dist/lib/utilities.js.map +1 -1
  165. package/dist/motion/tokens.js +5 -5
  166. package/dist/motion/tokens.js.map +1 -1
  167. package/dist/rslib-runtime.js +39 -0
  168. package/dist/rslib-runtime.js.map +1 -0
  169. package/package.json +82 -3
  170. package/src/components/ui/alert-dialog.tsx +15 -8
  171. package/src/components/ui/avatar.tsx +9 -6
  172. package/src/components/ui/calendar.tsx +7 -13
  173. package/src/components/ui/carousel.tsx +2 -0
  174. package/src/components/ui/chart.tsx +63 -60
  175. package/src/components/ui/checkbox-group.tsx +4 -5
  176. package/src/components/ui/checkbox.tsx +10 -2
  177. package/src/components/ui/collapsible.tsx +1 -0
  178. package/src/components/ui/combobox.module.css +158 -0
  179. package/src/components/ui/combobox.tsx +569 -0
  180. package/src/components/ui/command.tsx +31 -15
  181. package/src/components/ui/context-menu.tsx +3 -0
  182. package/src/components/ui/drawer.tsx +2 -0
  183. package/src/components/ui/dropdown-menu.tsx +3 -0
  184. package/src/components/ui/dropdrawer.tsx +80 -62
  185. package/src/components/ui/menubar.tsx +9 -10
  186. package/src/components/ui/meter.tsx +16 -17
  187. package/src/components/ui/navigation-menu.tsx +41 -33
  188. package/src/components/ui/number-field.tsx +6 -13
  189. package/src/components/ui/progress.tsx +3 -2
  190. package/src/components/ui/radio-group.tsx +2 -5
  191. package/src/components/ui/resizable.tsx +2 -2
  192. package/src/components/ui/scratcher.tsx +6 -10
  193. package/src/components/ui/scroll-area.tsx +2 -5
  194. package/src/components/ui/separator.tsx +4 -3
  195. package/src/components/ui/sheet.tsx +3 -0
  196. package/src/components/ui/sidebar.tsx +1 -0
  197. package/src/components/ui/sonner.tsx +20 -12
  198. package/src/components/ui/toggle-group.tsx +6 -4
  199. package/src/components/ui/toolbar.tsx +20 -21
  200. package/src/hooks/useClipboard.tsx +137 -0
  201. package/src/hooks/useControllableState.tsx +81 -0
  202. package/src/hooks/useDebounce.tsx +50 -0
  203. package/src/hooks/useEventCallback.tsx +47 -0
  204. package/src/hooks/useId.tsx +36 -0
  205. package/src/hooks/useIntersectionObserver.tsx +81 -0
  206. package/src/hooks/useInterval.tsx +80 -0
  207. package/src/hooks/useLocalStorage.tsx +111 -0
  208. package/src/hooks/useMergedRefs.tsx +48 -0
  209. package/src/hooks/useOnClickOutside.tsx +55 -0
  210. package/src/hooks/usePrevious.tsx +44 -0
  211. package/src/hooks/useThrottle.tsx +78 -0
  212. package/src/hooks/useTimeout.tsx +51 -0
  213. package/src/index.ts +23 -0
  214. package/src/lib/utilities.ts +4 -4
  215. package/src/motion/tokens.ts +4 -4
  216. package/src/stories/DesignPrinciples.mdx +48 -0
  217. package/src/stories/GettingStarted.mdx +92 -0
  218. package/src/stories/Welcome.mdx +44 -0
@@ -6,7 +6,7 @@ import { mergeProps } from "@base-ui/react/merge-props";
6
6
  import { useRender } from "@base-ui/react/use-render";
7
7
  import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
8
8
  import { AnimatePresence, motion } from "motion/react";
9
- import { Children, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useId, useMemo, useRef, useState } from "react";
9
+ import { Children, cloneElement, createContext, forwardRef, isValidElement, useCallback, useContext, useEffect, useId, useMemo, useRef, useState } from "react";
10
10
  import { useIsMobile } from "../../hooks/useIsMobile.js";
11
11
  import { cn } from "../../lib/utilities.js";
12
12
  import dropdrawer_module from "./dropdrawer.module.js";
@@ -21,11 +21,12 @@ const useDropDrawerContext = ()=>{
21
21
  };
22
22
  const dropdrawer_Drawer = Drawer.Root;
23
23
  const DrawerPortal = Drawer.Portal;
24
- function DrawerTrigger(props) {
24
+ const dropdrawer_DrawerTrigger = /*#__PURE__*/ forwardRef(function(props, forwardedRef) {
25
25
  const { asChild = false, children, className, render, ...otherProps } = props;
26
26
  const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
27
27
  return /*#__PURE__*/ jsx(Drawer.Trigger, {
28
28
  ...otherProps,
29
+ ref: forwardedRef,
29
30
  render: useRender({
30
31
  defaultTagName: "button",
31
32
  render: renderProp,
@@ -35,7 +36,7 @@ function DrawerTrigger(props) {
35
36
  }),
36
37
  children: renderProp ? void 0 : children
37
38
  });
38
- }
39
+ });
39
40
  function DrawerOverlay(props) {
40
41
  const { className, render, ...otherProps } = props;
41
42
  return /*#__PURE__*/ jsx(Drawer.Backdrop, {
@@ -49,7 +50,7 @@ function DrawerOverlay(props) {
49
50
  })
50
51
  });
51
52
  }
52
- function DrawerContent(props) {
53
+ const dropdrawer_DrawerContent = /*#__PURE__*/ forwardRef(function(props, forwardedRef) {
53
54
  const { className, children, render, ...otherProps } = props;
54
55
  return /*#__PURE__*/ jsxs(DrawerPortal, {
55
56
  children: [
@@ -58,6 +59,7 @@ function DrawerContent(props) {
58
59
  className: dropdrawer_module.drawerViewport,
59
60
  children: /*#__PURE__*/ jsxs(Drawer.Popup, {
60
61
  ...otherProps,
62
+ ref: forwardedRef,
61
63
  render: useRender({
62
64
  defaultTagName: "div",
63
65
  render: render,
@@ -78,7 +80,7 @@ function DrawerContent(props) {
78
80
  })
79
81
  ]
80
82
  });
81
- }
83
+ });
82
84
  function DrawerHeader(props) {
83
85
  const { className, children, render, ...otherProps } = props;
84
86
  return useRender({
@@ -119,11 +121,12 @@ function DrawerTitle(props) {
119
121
  }
120
122
  const DropdownMenu = Menu.Root;
121
123
  const DropdownMenuSub = Menu.SubmenuRoot;
122
- function DropdownMenuTrigger(props) {
124
+ const dropdrawer_DropdownMenuTrigger = /*#__PURE__*/ forwardRef(function(props, forwardedRef) {
123
125
  const { asChild = false, children, className, render, ...otherProps } = props;
124
126
  const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
125
127
  return /*#__PURE__*/ jsx(Menu.Trigger, {
126
128
  ...otherProps,
129
+ ref: forwardedRef,
127
130
  render: useRender({
128
131
  defaultTagName: "button",
129
132
  render: renderProp,
@@ -133,12 +136,13 @@ function DropdownMenuTrigger(props) {
133
136
  }),
134
137
  children: renderProp ? void 0 : children
135
138
  });
136
- }
137
- function DropdownMenuContent(props) {
139
+ });
140
+ const dropdrawer_DropdownMenuContent = /*#__PURE__*/ forwardRef(function(props, forwardedRef) {
138
141
  const { className, children, render, ...otherProps } = props;
139
142
  return /*#__PURE__*/ jsx(Menu.Portal, {
140
143
  children: /*#__PURE__*/ jsx(Menu.Positioner, {
141
144
  ...otherProps,
145
+ ref: forwardedRef,
142
146
  render: useRender({
143
147
  defaultTagName: "div",
144
148
  props: mergeProps({
@@ -157,7 +161,7 @@ function DropdownMenuContent(props) {
157
161
  })
158
162
  })
159
163
  });
160
- }
164
+ });
161
165
  function DropdownMenuItem(props) {
162
166
  const { asChild = false, children, className, inset = false, render, ...otherProps } = props;
163
167
  const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
@@ -266,21 +270,23 @@ function DropDrawer({ children, ...props }) {
266
270
  })
267
271
  });
268
272
  }
269
- function DropDrawerTrigger({ className, children, ...props }) {
273
+ const dropdrawer_DropDrawerTrigger = /*#__PURE__*/ forwardRef(function({ className, children, ...props }, forwardedRef) {
270
274
  const { isMobile } = useDropDrawerContext();
271
- return isMobile ? /*#__PURE__*/ jsx(DrawerTrigger, {
275
+ return isMobile ? /*#__PURE__*/ jsx(dropdrawer_DrawerTrigger, {
276
+ ref: forwardedRef,
272
277
  "data-slot": "drop-drawer-trigger",
273
278
  className: className,
274
279
  ...props,
275
280
  children: children
276
- }) : /*#__PURE__*/ jsx(DropdownMenuTrigger, {
281
+ }) : /*#__PURE__*/ jsx(dropdrawer_DropdownMenuTrigger, {
282
+ ref: forwardedRef,
277
283
  "data-slot": "drop-drawer-trigger",
278
284
  className: className,
279
285
  ...props,
280
286
  children: children
281
287
  });
282
- }
283
- function DropDrawerContent({ className, children, ...props }) {
288
+ });
289
+ const dropdrawer_DropDrawerContent = /*#__PURE__*/ forwardRef(function({ className, children, ...props }, forwardedRef) {
284
290
  const { isMobile } = useDropDrawerContext();
285
291
  const [activeSubmenu, setActiveSubmenu] = useState(null);
286
292
  const [submenuTitle, setSubmenuTitle] = useState(null);
@@ -405,7 +411,8 @@ function DropDrawerContent({ className, children, ...props }) {
405
411
  setSubmenuTitle,
406
412
  submenuTitle
407
413
  },
408
- children: /*#__PURE__*/ jsx(DrawerContent, {
414
+ children: /*#__PURE__*/ jsx(dropdrawer_DrawerContent, {
415
+ ref: forwardedRef,
409
416
  "data-slot": "drop-drawer-content",
410
417
  className: cn(dropdrawer_module.mobileContent, className),
411
418
  ...props,
@@ -487,7 +494,8 @@ function DropDrawerContent({ className, children, ...props }) {
487
494
  setSubmenuTitle,
488
495
  submenuTitle
489
496
  },
490
- children: /*#__PURE__*/ jsx(DropdownMenuContent, {
497
+ children: /*#__PURE__*/ jsx(dropdrawer_DropdownMenuContent, {
498
+ ref: forwardedRef,
491
499
  "data-slot": "drop-drawer-content",
492
500
  align: "end",
493
501
  sideOffset: 4,
@@ -496,7 +504,7 @@ function DropDrawerContent({ className, children, ...props }) {
496
504
  children: children
497
505
  })
498
506
  });
499
- }
507
+ });
500
508
  function DropDrawerItem({ className, children, closeOnClick, disabled, icon, inset, onClick, onSelect, ...props }) {
501
509
  const { isMobile } = useDropDrawerContext();
502
510
  const isInGroup = useCallback((element)=>{
@@ -809,8 +817,8 @@ function DropDrawerSubContent({ className, sideOffset = 4, children, ...props })
809
817
  });
810
818
  }
811
819
  DropDrawer.displayName = "DropDrawer";
812
- DropDrawerTrigger.displayName = "DropDrawerTrigger";
813
- DropDrawerContent.displayName = "DropDrawerContent";
820
+ dropdrawer_DropDrawerTrigger.displayName = "DropDrawerTrigger";
821
+ dropdrawer_DropDrawerContent.displayName = "DropDrawerContent";
814
822
  DropDrawerItem.displayName = "DropDrawerItem";
815
823
  DropDrawerSeparator.displayName = "DropDrawerSeparator";
816
824
  DropDrawerLabel.displayName = "DropDrawerLabel";
@@ -819,6 +827,6 @@ DropDrawerGroup.displayName = "DropDrawerGroup";
819
827
  DropDrawerSub.displayName = "DropDrawerSub";
820
828
  DropDrawerSubTrigger.displayName = "DropDrawerSubTrigger";
821
829
  DropDrawerSubContent.displayName = "DropDrawerSubContent";
822
- export { DropDrawer, DropDrawerContent, DropDrawerFooter, DropDrawerGroup, DropDrawerItem, DropDrawerLabel, DropDrawerSeparator, DropDrawerSub, DropDrawerSubContent, DropDrawerSubTrigger, DropDrawerTrigger };
830
+ export { DropDrawer, DropDrawerFooter, DropDrawerGroup, DropDrawerItem, DropDrawerLabel, DropDrawerSeparator, DropDrawerSub, DropDrawerSubContent, DropDrawerSubTrigger, dropdrawer_DropDrawerContent as DropDrawerContent, dropdrawer_DropDrawerTrigger as DropDrawerTrigger };
823
831
 
824
832
  //# sourceMappingURL=dropdrawer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/ui/dropdrawer.js","sources":["../../../src/components/ui/dropdrawer.tsx"],"sourcesContent":["\"use client\";\r\n\r\n/* eslint-disable react/no-children-prop, react-x/no-children-for-each, react-x/no-children-map, react-x/no-children-to-array, react-x/no-clone-element, sonarjs/function-return-type, sonarjs/no-identical-functions, sonarjs/no-unused-vars, max-lines, unicorn/no-array-callback-reference, unicorn/no-useless-undefined, unicorn/prefer-at, unicorn/prefer-dom-node-dataset, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */\r\n\r\nimport {Drawer as BaseDrawer} from \"@base-ui/react/drawer\";\r\nimport {Menu as BaseMenu} from \"@base-ui/react/menu\";\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport {ChevronLeftIcon, ChevronRightIcon} from \"lucide-react\";\r\nimport {AnimatePresence, motion, type Transition} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {useIsMobile} from \"@/hooks/useIsMobile\";\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./dropdrawer.module.css\";\r\n\r\nconst MOBILE_MENU_TITLE = \"Menu\";\r\nconst MOBILE_SUBMENU_TITLE = \"Submenu\";\r\nconst MOBILE_BACK_LABEL = \"Go back\";\r\n\r\ninterface DropDrawerContextValue {\r\n isMobile: boolean;\r\n}\r\n\r\nconst DropDrawerContext = React.createContext<DropDrawerContextValue | null>(null);\r\n\r\nconst useDropDrawerContext = (): DropDrawerContextValue => {\r\n const context = React.useContext(DropDrawerContext);\r\n\r\n if (context === null) {\r\n throw new Error(\"DropDrawer components cannot be rendered outside the Context\");\r\n }\r\n\r\n return context;\r\n};\r\n\r\nconst Drawer = BaseDrawer.Root;\r\nconst DrawerPortal = BaseDrawer.Portal;\r\n\r\nfunction DrawerTrigger(props: Readonly<React.ComponentPropsWithRef<typeof BaseDrawer.Trigger> & {asChild?: boolean}>): React.ReactElement {\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return (\r\n <BaseDrawer.Trigger\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: renderProp as never,\r\n props: mergeProps({className}, {}),\r\n })}>\r\n {renderProp ? undefined : children}\r\n </BaseDrawer.Trigger>\r\n );\r\n}\r\n\r\nfunction DrawerOverlay(props: Readonly<React.ComponentPropsWithRef<typeof BaseDrawer.Backdrop>>): React.ReactElement {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDrawer.Backdrop\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.drawerOverlay, className)}, {}),\r\n })}\r\n />\r\n );\r\n}\r\n\r\nfunction DrawerContent(\r\n props: Readonly<React.ComponentPropsWithRef<typeof BaseDrawer.Popup> & {children?: React.ReactNode}>,\r\n): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <DrawerPortal>\r\n <DrawerOverlay />\r\n <BaseDrawer.Viewport className={styles.drawerViewport}>\r\n <BaseDrawer.Popup\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.drawerContent, className)}, {}),\r\n })}>\r\n <div className={styles.drawerHandle} />\r\n <BaseDrawer.Content className={styles.drawerInnerContent}>{children}</BaseDrawer.Content>\r\n </BaseDrawer.Popup>\r\n </BaseDrawer.Viewport>\r\n </DrawerPortal>\r\n );\r\n}\r\n\r\nfunction DrawerHeader(\r\n props: Readonly<React.ComponentPropsWithRef<\"div\"> & {render?: useRender.RenderProp<Record<string, never>>}>,\r\n): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.drawerHeader, className)}, otherProps, {children}),\r\n });\r\n}\r\n\r\nfunction DrawerFooter(\r\n props: Readonly<React.ComponentPropsWithRef<\"div\"> & {render?: useRender.RenderProp<Record<string, never>>}>,\r\n): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.drawerFooter, className)}, otherProps, {children}),\r\n });\r\n}\r\n\r\nfunction DrawerTitle(props: Readonly<React.ComponentPropsWithRef<typeof BaseDrawer.Title>>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDrawer.Title\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"h2\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.drawerTitle, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseDrawer.Title>\r\n );\r\n}\r\n\r\nconst DropdownMenu = BaseMenu.Root;\r\nconst DropdownMenuSub = BaseMenu.SubmenuRoot;\r\n\r\nfunction DropdownMenuTrigger(\r\n props: Readonly<React.ComponentPropsWithRef<typeof BaseMenu.Trigger> & {asChild?: boolean}>,\r\n): React.ReactElement {\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return (\r\n <BaseMenu.Trigger\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: renderProp as never,\r\n props: mergeProps({className}, {}),\r\n })}>\r\n {renderProp ? undefined : children}\r\n </BaseMenu.Trigger>\r\n );\r\n}\r\n\r\nfunction DropdownMenuContent(\r\n props: Readonly<React.ComponentPropsWithRef<typeof BaseMenu.Positioner> & {children?: React.ReactNode}>,\r\n): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseMenu.Portal>\r\n <BaseMenu.Positioner\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n props: mergeProps({className: styles.dropdownPositioner}, {}),\r\n })}>\r\n <BaseMenu.Popup\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.dropdownContent, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseMenu.Popup>\r\n </BaseMenu.Positioner>\r\n </BaseMenu.Portal>\r\n );\r\n}\r\n\r\ninterface DropdownMenuItemProps extends React.ComponentPropsWithRef<typeof BaseMenu.Item> {\r\n /** @deprecated Prefer Base UI's `render` prop. */\r\n asChild?: boolean;\r\n /**\r\n * Whether to apply inset spacing to align with grouped menu content.\r\n * @default false\r\n */\r\n inset?: boolean;\r\n}\r\n\r\nfunction DropdownMenuItem(props: Readonly<DropdownMenuItemProps>): React.ReactElement {\r\n const {asChild = false, children, className, inset = false, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return (\r\n <BaseMenu.Item\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.desktopItem, inset && styles.inset, className)}, {}),\r\n })}>\r\n {renderProp ? undefined : children}\r\n </BaseMenu.Item>\r\n );\r\n}\r\n\r\nfunction DropdownMenuLabel(props: Readonly<React.ComponentPropsWithRef<typeof BaseMenu.GroupLabel>>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseMenu.GroupLabel\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.desktopLabel, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseMenu.GroupLabel>\r\n );\r\n}\r\n\r\nfunction DropdownMenuSeparator(props: Readonly<React.ComponentPropsWithRef<typeof BaseMenu.Separator>>): React.ReactElement {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseMenu.Separator\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.desktopSeparator, className)}, {}),\r\n })}\r\n />\r\n );\r\n}\r\n\r\nfunction DropdownMenuSubTrigger(\r\n props: Readonly<React.ComponentPropsWithRef<typeof BaseMenu.SubmenuTrigger> & {inset?: boolean}>,\r\n): React.ReactElement {\r\n const {className, children, inset = false, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseMenu.SubmenuTrigger\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.desktopSubTrigger, inset && styles.inset, className)}, {}),\r\n })}>\r\n {children}\r\n <ChevronRightIcon className={styles.chevron} />\r\n </BaseMenu.SubmenuTrigger>\r\n );\r\n}\r\n\r\nfunction DropdownMenuSubContent(\r\n props: Readonly<React.ComponentPropsWithRef<typeof BaseMenu.Positioner> & {children?: React.ReactNode}>,\r\n): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseMenu.Positioner\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n props: mergeProps({className: styles.dropdownPositioner}, {}),\r\n })}>\r\n <BaseMenu.Popup\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.dropdownSubContent, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseMenu.Popup>\r\n </BaseMenu.Positioner>\r\n );\r\n}\r\n\r\ntype DropDrawerRootProps = React.ComponentProps<typeof Drawer> | React.ComponentProps<typeof DropdownMenu>;\r\ntype DropDrawerTriggerProps =\r\n | React.ComponentPropsWithoutRef<typeof DrawerTrigger>\r\n | React.ComponentPropsWithoutRef<typeof DropdownMenuTrigger>;\r\ntype DropDrawerContentProps =\r\n | React.ComponentPropsWithoutRef<typeof DrawerContent>\r\n | React.ComponentPropsWithoutRef<typeof DropdownMenuContent>;\r\n\r\ninterface MobileSubmenuDataAttributes {\r\n \"data-parent-submenu-id\"?: string;\r\n \"data-parent-submenu\"?: string;\r\n \"data-submenu-id\"?: string;\r\n}\r\n\r\ninterface SharedDropDrawerItemProps\r\n extends Omit<React.ComponentPropsWithoutRef<typeof BaseMenu.Item>, \"children\" | \"onClick\" | \"onSelect\">, MobileSubmenuDataAttributes {\r\n /**\r\n * Item contents.\r\n * @default undefined\r\n */\r\n children?: React.ReactNode;\r\n /**\r\n * Additional CSS classes merged with the item styles.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Whether the desktop dropdown should close after the item is activated.\r\n * @default undefined\r\n */\r\n closeOnClick?: boolean;\r\n /**\r\n * Optional trailing icon or affordance rendered alongside the item content.\r\n * @default undefined\r\n */\r\n icon?: React.ReactNode;\r\n /**\r\n * Whether to apply inset spacing to align the item with grouped content.\r\n * @default undefined\r\n */\r\n inset?: boolean;\r\n /**\r\n * Mouse click handler invoked when the item is activated.\r\n * @default undefined\r\n */\r\n onClick?: React.MouseEventHandler<HTMLElement>;\r\n /**\r\n * Selection callback invoked with the native event when the item is activated.\r\n * @default undefined\r\n */\r\n onSelect?: (event: Event) => void;\r\n}\r\n\r\ninterface SubmenuContextType {\r\n activeSubmenu: string | null;\r\n navigateToSubmenu?: (id: string, title: string) => void;\r\n registerSubmenuContent?: (id: string, content: ReadonlyArray<React.ReactNode>) => void;\r\n setActiveSubmenu: (id: string | null) => void;\r\n setSubmenuTitle: (title: string | null) => void;\r\n submenuTitle: string | null;\r\n}\r\n\r\nconst SubmenuContext = React.createContext<SubmenuContextType>({\r\n activeSubmenu: null,\r\n navigateToSubmenu: undefined,\r\n registerSubmenuContent: undefined,\r\n setActiveSubmenu: () => undefined,\r\n setSubmenuTitle: () => undefined,\r\n submenuTitle: null,\r\n});\r\n\r\n/**\r\n * Provides a responsive dropdown-on-desktop, drawer-on-mobile navigation surface.\r\n *\r\n * @remarks\r\n * - Renders either Base UI `Menu.Root` or `Drawer.Root` depending on viewport size\r\n * - Built on Base UI Menu and Drawer primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawer>\r\n * <DropDrawerTrigger>Open menu</DropDrawerTrigger>\r\n * <DropDrawerContent>\r\n * <DropDrawerItem>Profile</DropDrawerItem>\r\n * </DropDrawerContent>\r\n * </DropDrawer>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/menu | Base UI Menu Docs}\r\n */\r\nfunction DropDrawer({children, ...props}: DropDrawerRootProps): React.JSX.Element {\r\n const isMobile = useIsMobile();\r\n\r\n return (\r\n <DropDrawerContext.Provider value={{isMobile}}>\r\n {isMobile ? (\r\n <Drawer\r\n data-slot='drop-drawer'\r\n {...(props as React.ComponentProps<typeof Drawer>)}>\r\n {children}\r\n </Drawer>\r\n ) : (\r\n <DropdownMenu\r\n data-slot='drop-drawer'\r\n {...(props as React.ComponentProps<typeof DropdownMenu>)}>\r\n {children}\r\n </DropdownMenu>\r\n )}\r\n </DropDrawerContext.Provider>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the control that opens the dropdown or drawer surface.\r\n *\r\n * @remarks\r\n * - Renders either a Base UI menu trigger or drawer trigger\r\n * - Built on Base UI Menu and Drawer primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawerTrigger>Open menu</DropDrawerTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Drawer Docs}\r\n */\r\nfunction DropDrawerTrigger({className, children, ...props}: DropDrawerTriggerProps): React.JSX.Element {\r\n const {isMobile} = useDropDrawerContext();\r\n\r\n return isMobile ? (\r\n <DrawerTrigger\r\n data-slot='drop-drawer-trigger'\r\n className={className}\r\n {...(props as React.ComponentProps<typeof DrawerTrigger>)}>\r\n {children}\r\n </DrawerTrigger>\r\n ) : (\r\n <DropdownMenuTrigger\r\n data-slot='drop-drawer-trigger'\r\n className={className}\r\n {...(props as React.ComponentProps<typeof DropdownMenuTrigger>)}>\r\n {children}\r\n </DropdownMenuTrigger>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the responsive dropdown or drawer content surface.\r\n *\r\n * @remarks\r\n * - Renders a Base UI popup on desktop and drawer content on mobile\r\n * - Built on Base UI Menu and Drawer primitives with animated mobile submenu navigation\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawerContent>\r\n * <DropDrawerItem>Settings</DropDrawerItem>\r\n * </DropDrawerContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/menu | Base UI Menu Docs}\r\n */\r\nfunction DropDrawerContent({className, children, ...props}: DropDrawerContentProps): React.JSX.Element {\r\n const {isMobile} = useDropDrawerContext();\r\n const [activeSubmenu, setActiveSubmenu] = React.useState<string | null>(null);\r\n const [submenuTitle, setSubmenuTitle] = React.useState<string | null>(null);\r\n const [submenuStack, setSubmenuStack] = React.useState<ReadonlyArray<{id: string; title: string}>>([]);\r\n const [animationDirection, setAnimationDirection] = React.useState<\"forward\" | \"backward\">(\"forward\");\r\n const submenuContentRef = React.useRef(new Map<string, ReadonlyArray<React.ReactNode>>());\r\n\r\n React.useEffect(() => {\r\n submenuContentRef.current.clear();\r\n }, [children]);\r\n\r\n const navigateToSubmenu = React.useCallback((id: string, title: string): void => {\r\n setAnimationDirection(\"forward\");\r\n setActiveSubmenu(id);\r\n setSubmenuTitle(title);\r\n setSubmenuStack((previousStack) => [...previousStack, {id, title}]);\r\n }, []);\r\n\r\n const goBack = React.useCallback((): void => {\r\n setAnimationDirection(\"backward\");\r\n\r\n if (submenuStack.length <= 1) {\r\n setActiveSubmenu(null);\r\n setSubmenuTitle(null);\r\n setSubmenuStack([]);\r\n return;\r\n }\r\n\r\n const newStack = [...submenuStack];\r\n newStack.pop();\r\n const previousSubmenu = newStack[newStack.length - 1];\r\n\r\n if (!previousSubmenu) {\r\n setActiveSubmenu(null);\r\n setSubmenuTitle(null);\r\n setSubmenuStack([]);\r\n return;\r\n }\r\n\r\n setActiveSubmenu(previousSubmenu.id);\r\n setSubmenuTitle(previousSubmenu.title);\r\n setSubmenuStack(newStack);\r\n }, [submenuStack]);\r\n\r\n const registerSubmenuContent = React.useCallback((id: string, content: ReadonlyArray<React.ReactNode>): void => {\r\n submenuContentRef.current.set(id, content);\r\n }, []);\r\n\r\n const extractSubmenuContent = React.useCallback((elements: React.ReactNode, targetId: string): ReadonlyArray<React.ReactNode> => {\r\n const result: Array<React.ReactNode> = [];\r\n\r\n const findSubmenuContent = (node: React.ReactNode): void => {\r\n if (!React.isValidElement(node)) {\r\n return;\r\n }\r\n\r\n const element = node as React.ReactElement<{\r\n \"data-submenu-id\"?: string;\r\n children?: React.ReactNode;\r\n id?: string;\r\n }>;\r\n\r\n if (element.type === DropDrawerSub) {\r\n const elementId = element.props.id;\r\n const dataSubmenuId = element.props[\"data-submenu-id\"];\r\n\r\n if (elementId === targetId || dataSubmenuId === targetId) {\r\n if (element.props.children) {\r\n React.Children.forEach(element.props.children, (child) => {\r\n if (React.isValidElement(child) && child.type === DropDrawerSubContent) {\r\n const subContentElement = child as React.ReactElement<{children?: React.ReactNode}>;\r\n\r\n React.Children.forEach(subContentElement.props.children, (contentChild) => {\r\n result.push(contentChild);\r\n });\r\n }\r\n });\r\n }\r\n\r\n return;\r\n }\r\n }\r\n\r\n if (element.props.children) {\r\n React.Children.forEach(element.props.children, findSubmenuContent);\r\n }\r\n };\r\n\r\n React.Children.forEach(elements, findSubmenuContent);\r\n return result;\r\n }, []);\r\n\r\n const getSubmenuContent = React.useCallback(\r\n (id: string): ReadonlyArray<React.ReactNode> => {\r\n const cachedContent = submenuContentRef.current.get(id);\r\n\r\n if (cachedContent && cachedContent.length > 0) {\r\n return cachedContent;\r\n }\r\n\r\n const submenuContent = extractSubmenuContent(children, id);\r\n\r\n if (submenuContent.length > 0) {\r\n submenuContentRef.current.set(id, submenuContent);\r\n }\r\n\r\n return submenuContent;\r\n },\r\n [children, extractSubmenuContent],\r\n );\r\n\r\n const variants = {\r\n center: {\r\n opacity: 1,\r\n x: 0,\r\n },\r\n enter: (direction: \"forward\" | \"backward\") => ({\r\n opacity: 0,\r\n x: direction === \"forward\" ? \"100%\" : \"-100%\",\r\n }),\r\n exit: (direction: \"forward\" | \"backward\") => ({\r\n opacity: 0,\r\n x: direction === \"forward\" ? \"-100%\" : \"100%\",\r\n }),\r\n };\r\n\r\n const transition = {\r\n duration: 0.3,\r\n ease: [0.25, 0.1, 0.25, 1],\r\n } satisfies Transition;\r\n\r\n if (isMobile) {\r\n return (\r\n <SubmenuContext.Provider\r\n value={{\r\n activeSubmenu,\r\n navigateToSubmenu,\r\n registerSubmenuContent,\r\n setActiveSubmenu: (id) => {\r\n if (id === null) {\r\n setActiveSubmenu(null);\r\n setSubmenuTitle(null);\r\n setSubmenuStack([]);\r\n }\r\n },\r\n setSubmenuTitle,\r\n submenuTitle,\r\n }}>\r\n <DrawerContent\r\n data-slot='drop-drawer-content'\r\n className={cn(styles.mobileContent, className)}\r\n {...(props as React.ComponentProps<typeof DrawerContent>)}>\r\n {activeSubmenu ? (\r\n <>\r\n <DrawerHeader>\r\n <div className={styles.mobileHeaderRow}>\r\n <button\r\n type='button'\r\n aria-label={MOBILE_BACK_LABEL}\r\n onClick={goBack}\r\n className={styles.backButton}>\r\n <ChevronLeftIcon className={styles.chevron} />\r\n </button>\r\n <DrawerTitle>{submenuTitle || MOBILE_SUBMENU_TITLE}</DrawerTitle>\r\n </div>\r\n </DrawerHeader>\r\n <div className={styles.mobileViewport}>\r\n <AnimatePresence\r\n initial={false}\r\n mode='wait'\r\n custom={animationDirection}>\r\n <motion.div\r\n key={activeSubmenu}\r\n custom={animationDirection}\r\n variants={variants}\r\n initial='enter'\r\n animate='center'\r\n exit='exit'\r\n transition={transition}\r\n className={styles.mobileMotionPanel}>\r\n {getSubmenuContent(activeSubmenu)}\r\n </motion.div>\r\n </AnimatePresence>\r\n </div>\r\n </>\r\n ) : (\r\n <>\r\n <DrawerHeader className={styles.screenReaderOnlyHeader}>\r\n <DrawerTitle>{MOBILE_MENU_TITLE}</DrawerTitle>\r\n </DrawerHeader>\r\n <div className={styles.mobileMainViewport}>\r\n <AnimatePresence\r\n initial={false}\r\n mode='wait'\r\n custom={animationDirection}>\r\n <motion.div\r\n key='main-menu'\r\n custom={animationDirection}\r\n variants={variants}\r\n initial='enter'\r\n animate='center'\r\n exit='exit'\r\n transition={transition}\r\n className={styles.mobileMotionPanel}>\r\n {children}\r\n </motion.div>\r\n </AnimatePresence>\r\n </div>\r\n </>\r\n )}\r\n </DrawerContent>\r\n </SubmenuContext.Provider>\r\n );\r\n }\r\n\r\n return (\r\n <SubmenuContext.Provider\r\n value={{\r\n activeSubmenu,\r\n registerSubmenuContent,\r\n setActiveSubmenu,\r\n setSubmenuTitle,\r\n submenuTitle,\r\n }}>\r\n <DropdownMenuContent\r\n data-slot='drop-drawer-content'\r\n align='end'\r\n sideOffset={4}\r\n className={cn(styles.desktopContent, className)}\r\n {...(props as React.ComponentProps<typeof DropdownMenuContent>)}>\r\n {children}\r\n </DropdownMenuContent>\r\n </SubmenuContext.Provider>\r\n );\r\n}\r\n\r\n/**\r\n * Renders an actionable item inside the drop drawer surface.\r\n *\r\n * @remarks\r\n * - Renders a Base UI menu item on desktop and a keyboard-accessible `<div>` on mobile\r\n * - Built on Base UI Menu and Drawer close primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawerItem icon={<ChevronRightIcon />}>Account</DropDrawerItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/menu | Base UI Menu Docs}\r\n */\r\nfunction DropDrawerItem({\r\n className,\r\n children,\r\n closeOnClick,\r\n disabled,\r\n icon,\r\n inset,\r\n onClick,\r\n onSelect,\r\n ...props\r\n}: SharedDropDrawerItemProps): React.JSX.Element {\r\n const {isMobile} = useDropDrawerContext();\r\n\r\n const isInGroup = React.useCallback((element: HTMLElement | null): boolean => {\r\n if (!element) {\r\n return false;\r\n }\r\n\r\n let parent = element.parentElement;\r\n\r\n while (parent) {\r\n if (parent.hasAttribute(\"data-drop-drawer-group\")) {\r\n return true;\r\n }\r\n\r\n parent = parent.parentElement;\r\n }\r\n\r\n return false;\r\n }, []);\r\n\r\n const itemRef = React.useRef<HTMLDivElement>(null);\r\n const [isInsideGroup, setIsInsideGroup] = React.useState(false);\r\n\r\n React.useEffect(() => {\r\n if (!isMobile) {\r\n return;\r\n }\r\n\r\n const timer = globalThis.window.setTimeout(() => {\r\n if (itemRef.current) {\r\n setIsInsideGroup(isInGroup(itemRef.current));\r\n }\r\n }, 0);\r\n\r\n return () => globalThis.window.clearTimeout(timer);\r\n }, [isInGroup, isMobile]);\r\n\r\n const handleSelect = React.useCallback(\r\n (event: Event): void => {\r\n if (!disabled) {\r\n onSelect?.(event);\r\n }\r\n },\r\n [disabled, onSelect],\r\n );\r\n\r\n if (isMobile) {\r\n const handleClick: React.MouseEventHandler<HTMLDivElement> = (event): void => {\r\n if (disabled) {\r\n return;\r\n }\r\n\r\n onClick?.(event);\r\n handleSelect(event.nativeEvent);\r\n };\r\n\r\n const handleKeyDown: React.KeyboardEventHandler<HTMLDivElement> = (event): void => {\r\n if (event.key !== \"Enter\" && event.key !== \" \") {\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n event.currentTarget.click();\r\n };\r\n\r\n const content = (\r\n <div\r\n ref={itemRef}\r\n data-slot='drop-drawer-item'\r\n data-disabled={disabled}\r\n data-inset={inset}\r\n role='menuitem'\r\n tabIndex={disabled ? -1 : 0}\r\n className={cn(\r\n styles.mobileItem,\r\n !isInsideGroup && styles.mobileStandaloneItem,\r\n isInsideGroup && styles.mobileGroupedItem,\r\n inset && styles.inset,\r\n className,\r\n )}\r\n onClick={handleClick}\r\n onKeyDown={handleKeyDown}\r\n aria-disabled={disabled}\r\n {...props}>\r\n <div className={styles.itemChildren}>{children}</div>\r\n {icon ? <div className={styles.itemIcon}>{icon}</div> : null}\r\n </div>\r\n );\r\n\r\n const parentSubmenuId = props[\"data-parent-submenu-id\"] ?? props[\"data-parent-submenu\"];\r\n\r\n if (parentSubmenuId) {\r\n return content;\r\n }\r\n\r\n return (\r\n <BaseDrawer.Close\r\n nativeButton={false}\r\n render={content}\r\n />\r\n );\r\n }\r\n\r\n const handleDesktopClick: React.MouseEventHandler<HTMLElement> = (event): void => {\r\n if (disabled) {\r\n return;\r\n }\r\n\r\n onClick?.(event);\r\n handleSelect(event.nativeEvent);\r\n };\r\n\r\n return (\r\n <DropdownMenuItem\r\n data-slot='drop-drawer-item'\r\n data-inset={inset}\r\n className={cn(styles.desktopItem, className)}\r\n closeOnClick={closeOnClick}\r\n disabled={disabled}\r\n inset={inset}\r\n onClick={handleDesktopClick}\r\n {...props}>\r\n <div className={styles.itemRow}>\r\n <div className={styles.itemChildren}>{children}</div>\r\n {icon ? <div className={styles.itemIcon}>{icon}</div> : null}\r\n </div>\r\n </DropdownMenuItem>\r\n );\r\n}\r\n\r\n/**\r\n * Renders a visual separator between desktop drop drawer sections.\r\n *\r\n * @remarks\r\n * - Renders a separator only in desktop dropdown mode\r\n * - Built on Base UI Menu separator primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawerSeparator />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/menu | Base UI Menu Docs}\r\n */\r\nfunction DropDrawerSeparator({\r\n className,\r\n ...props\r\n}: React.ComponentPropsWithoutRef<typeof DropdownMenuSeparator>): React.JSX.Element | null {\r\n const {isMobile} = useDropDrawerContext();\r\n\r\n if (isMobile) {\r\n return null;\r\n }\r\n\r\n return (\r\n <DropdownMenuSeparator\r\n data-slot='drop-drawer-separator'\r\n className={className}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\n/**\r\n * Renders a section label for the drop drawer surface.\r\n *\r\n * @remarks\r\n * - Renders a drawer title on mobile and a menu label on desktop\r\n * - Built on Base UI Drawer and Menu primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawerLabel>Actions</DropDrawerLabel>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/menu | Base UI Menu Docs}\r\n */\r\nfunction DropDrawerLabel({\r\n className,\r\n children,\r\n ...props\r\n}: React.ComponentProps<typeof DropdownMenuLabel> | React.ComponentProps<typeof DrawerTitle>): React.JSX.Element {\r\n const {isMobile} = useDropDrawerContext();\r\n\r\n return isMobile ? (\r\n <DrawerHeader className={styles.mobileLabelWrapper}>\r\n <DrawerTitle\r\n data-slot='drop-drawer-label'\r\n className={cn(styles.mobileLabel, className)}\r\n {...(props as React.ComponentProps<typeof DrawerTitle>)}>\r\n {children}\r\n </DrawerTitle>\r\n </DrawerHeader>\r\n ) : (\r\n <DropdownMenuLabel\r\n data-slot='drop-drawer-label'\r\n className={className}\r\n {...(props as React.ComponentProps<typeof DropdownMenuLabel>)}>\r\n {children}\r\n </DropdownMenuLabel>\r\n );\r\n}\r\n\r\n/**\r\n * Renders footer content aligned to the bottom of the responsive surface.\r\n *\r\n * @remarks\r\n * - Renders a drawer footer on mobile and a styled `<div>` on desktop\r\n * - Built on Base UI Drawer primitives for mobile layouts\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawerFooter>Signed in as Alex</DropDrawerFooter>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Drawer Docs}\r\n */\r\nfunction DropDrawerFooter({\r\n className,\r\n children,\r\n ...props\r\n}: React.ComponentProps<typeof DrawerFooter> | React.ComponentProps<\"div\">): React.JSX.Element {\r\n const {isMobile} = useDropDrawerContext();\r\n\r\n return isMobile ? (\r\n <DrawerFooter\r\n data-slot='drop-drawer-footer'\r\n className={cn(styles.mobileFooter, className)}\r\n {...(props as React.ComponentProps<typeof DrawerFooter>)}>\r\n {children}\r\n </DrawerFooter>\r\n ) : (\r\n <div\r\n data-slot='drop-drawer-footer'\r\n className={cn(styles.desktopFooter, className)}\r\n {...props}>\r\n {children}\r\n </div>\r\n );\r\n}\r\n\r\n/**\r\n * Renders a grouped collection of drop drawer items.\r\n *\r\n * @remarks\r\n * - Renders a Base UI menu group on desktop and a `<div role=\"group\">` on mobile\r\n * - Inserts mobile-only separators between adjacent children\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawerGroup>\r\n * <DropDrawerItem>Profile</DropDrawerItem>\r\n * <DropDrawerItem>Billing</DropDrawerItem>\r\n * </DropDrawerGroup>\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/group_role | ARIA Group Role}\r\n */\r\nfunction DropDrawerGroup({className, children, ...props}: React.ComponentProps<\"div\"> & {children: React.ReactNode}): React.JSX.Element {\r\n const {isMobile} = useDropDrawerContext();\r\n\r\n const childrenWithSeparators = React.useMemo(() => {\r\n if (!isMobile) {\r\n return children;\r\n }\r\n\r\n const childArray = React.Children.toArray(children);\r\n const filteredChildren = childArray.filter((child) => !(React.isValidElement(child) && child.type === DropDrawerSeparator));\r\n\r\n return filteredChildren.flatMap((child, index) => {\r\n if (index === filteredChildren.length - 1) {\r\n return [child];\r\n }\r\n\r\n return [\r\n child,\r\n <div\r\n key={`separator-${index}`}\r\n className={styles.mobileGroupSeparator}\r\n aria-hidden='true'\r\n />,\r\n ];\r\n });\r\n }, [children, isMobile]);\r\n\r\n return isMobile ? (\r\n <div\r\n data-drop-drawer-group\r\n data-slot='drop-drawer-group'\r\n role='group'\r\n className={cn(styles.mobileGroup, className)}\r\n {...props}>\r\n {childrenWithSeparators}\r\n </div>\r\n ) : (\r\n <BaseMenu.Group\r\n data-drop-drawer-group\r\n data-slot='drop-drawer-group'\r\n className={className}\r\n {...(props as React.ComponentPropsWithoutRef<typeof BaseMenu.Group>)}>\r\n {children}\r\n </BaseMenu.Group>\r\n );\r\n}\r\n\r\n/**\r\n * Renders a submenu root within the drop drawer surface.\r\n *\r\n * @remarks\r\n * - Renders a Base UI submenu on desktop and a mobile-aware container on small screens\r\n * - Registers submenu content for animated mobile drill-down navigation\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawerSub>\r\n * <DropDrawerSubTrigger>More</DropDrawerSubTrigger>\r\n * <DropDrawerSubContent>\r\n * <DropDrawerItem>Sub item</DropDrawerItem>\r\n * </DropDrawerSubContent>\r\n * </DropDrawerSub>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/menu | Base UI Menu Docs}\r\n */\r\nfunction DropDrawerSub({\r\n children,\r\n id,\r\n ...props\r\n}: React.ComponentPropsWithoutRef<typeof DropdownMenuSub> & {children?: React.ReactNode; id?: string}): React.JSX.Element {\r\n const {isMobile} = useDropDrawerContext();\r\n const {registerSubmenuContent} = React.useContext(SubmenuContext);\r\n const generatedId = React.useId();\r\n const submenuId = id || generatedId;\r\n\r\n React.useEffect(() => {\r\n if (!registerSubmenuContent) {\r\n return;\r\n }\r\n\r\n const contentItems: Array<React.ReactNode> = [];\r\n\r\n React.Children.forEach(children, (child) => {\r\n if (React.isValidElement(child) && child.type === DropDrawerSubContent) {\r\n const childElement = child as React.ReactElement<{children?: React.ReactNode}>;\r\n\r\n React.Children.forEach(childElement.props.children, (contentChild) => {\r\n contentItems.push(contentChild);\r\n });\r\n }\r\n });\r\n\r\n if (contentItems.length > 0) {\r\n registerSubmenuContent(submenuId, contentItems);\r\n }\r\n }, [children, registerSubmenuContent, submenuId]);\r\n\r\n if (isMobile) {\r\n const processedChildren = React.Children.map(children, (child) => {\r\n if (!React.isValidElement(child)) {\r\n return child;\r\n }\r\n\r\n if (child.type === DropDrawerSubTrigger || child.type === DropDrawerSubContent) {\r\n return React.cloneElement(child as React.ReactElement<MobileSubmenuDataAttributes>, {\r\n \"data-parent-submenu\": submenuId,\r\n \"data-parent-submenu-id\": submenuId,\r\n \"data-submenu-id\": submenuId,\r\n });\r\n }\r\n\r\n return child;\r\n });\r\n\r\n return (\r\n <div\r\n data-slot='drop-drawer-sub'\r\n data-submenu-id={submenuId}\r\n id={submenuId}>\r\n {processedChildren}\r\n </div>\r\n );\r\n }\r\n\r\n return (\r\n <DropdownMenuSub\r\n data-slot='drop-drawer-sub'\r\n data-submenu-id={submenuId}\r\n {...props}>\r\n {children}\r\n </DropdownMenuSub>\r\n );\r\n}\r\n\r\ninterface DropDrawerSubTriggerProps\r\n extends Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuSubTrigger>, \"children\" | \"onClick\">, MobileSubmenuDataAttributes {\r\n /**\r\n * Trigger contents.\r\n * @default undefined\r\n */\r\n children?: React.ReactNode;\r\n /**\r\n * Additional CSS classes merged with the trigger styles.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Whether to apply inset spacing to align the trigger with grouped content.\r\n * @default undefined\r\n */\r\n inset?: boolean;\r\n /**\r\n * Mouse click handler invoked before submenu navigation occurs.\r\n * @default undefined\r\n */\r\n onClick?: React.MouseEventHandler<HTMLElement>;\r\n}\r\n\r\n/**\r\n * Renders the trigger that opens a nested submenu.\r\n *\r\n * @remarks\r\n * - Renders a Base UI submenu trigger on desktop and a keyboard-accessible `<div>` on mobile\r\n * - Built on Base UI Menu submenu primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawerSubTrigger>Advanced</DropDrawerSubTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/menu | Base UI Menu Docs}\r\n */\r\nfunction DropDrawerSubTrigger({className, inset, children, onClick, ...props}: DropDrawerSubTriggerProps): React.JSX.Element {\r\n const {isMobile} = useDropDrawerContext();\r\n const {navigateToSubmenu} = React.useContext(SubmenuContext);\r\n\r\n const isInGroup = React.useCallback((element: HTMLElement | null): boolean => {\r\n if (!element) {\r\n return false;\r\n }\r\n\r\n let parent = element.parentElement;\r\n\r\n while (parent) {\r\n if (parent.hasAttribute(\"data-drop-drawer-group\")) {\r\n return true;\r\n }\r\n\r\n parent = parent.parentElement;\r\n }\r\n\r\n return false;\r\n }, []);\r\n\r\n const itemRef = React.useRef<HTMLDivElement>(null);\r\n const [isInsideGroup, setIsInsideGroup] = React.useState(false);\r\n\r\n React.useEffect(() => {\r\n if (!isMobile) {\r\n return;\r\n }\r\n\r\n const timer = globalThis.window.setTimeout(() => {\r\n if (itemRef.current) {\r\n setIsInsideGroup(isInGroup(itemRef.current));\r\n }\r\n }, 0);\r\n\r\n return () => globalThis.window.clearTimeout(timer);\r\n }, [isInGroup, isMobile]);\r\n\r\n if (isMobile) {\r\n const navigate = (eventTarget: HTMLElement): void => {\r\n let submenuId: string | null = null;\r\n const closestElement = eventTarget.closest(\"[data-submenu-id]\");\r\n const closestId = closestElement?.getAttribute(\"data-submenu-id\");\r\n\r\n if (closestId) {\r\n submenuId = closestId;\r\n }\r\n\r\n if (!submenuId) {\r\n submenuId = props[\"data-parent-submenu-id\"] ?? props[\"data-parent-submenu\"] ?? null;\r\n }\r\n\r\n if (!submenuId) {\r\n return;\r\n }\r\n\r\n const title = typeof children === \"string\" ? children : MOBILE_SUBMENU_TITLE;\r\n navigateToSubmenu?.(submenuId, title);\r\n };\r\n\r\n const handleClick: React.MouseEventHandler<HTMLDivElement> = (event): void => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n onClick?.(event);\r\n navigate(event.currentTarget);\r\n };\r\n\r\n const handleKeyDown: React.KeyboardEventHandler<HTMLDivElement> = (event): void => {\r\n if (event.key !== \"Enter\" && event.key !== \" \") {\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n event.stopPropagation();\r\n event.currentTarget.click();\r\n };\r\n\r\n return (\r\n <div\r\n ref={itemRef}\r\n data-slot='drop-drawer-sub-trigger'\r\n data-inset={inset}\r\n role='menuitem'\r\n tabIndex={0}\r\n className={cn(\r\n styles.mobileItem,\r\n !isInsideGroup && styles.mobileStandaloneItem,\r\n isInsideGroup && styles.mobileGroupedItem,\r\n inset && styles.inset,\r\n className,\r\n )}\r\n onClick={handleClick}\r\n onKeyDown={handleKeyDown}\r\n {...props}>\r\n <div className={styles.itemChildren}>{children}</div>\r\n <ChevronRightIcon className={styles.chevron} />\r\n </div>\r\n );\r\n }\r\n\r\n return (\r\n <DropdownMenuSubTrigger\r\n data-slot='drop-drawer-sub-trigger'\r\n data-inset={inset}\r\n className={className}\r\n inset={inset}\r\n onClick={onClick}\r\n {...props}>\r\n {children}\r\n </DropdownMenuSubTrigger>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the content region for a nested submenu.\r\n *\r\n * @remarks\r\n * - Renders only in desktop dropdown mode\r\n * - Built on Base UI Menu submenu popup primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawerSubContent>\r\n * <DropDrawerItem>Details</DropDrawerItem>\r\n * </DropDrawerSubContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/menu | Base UI Menu Docs}\r\n */\r\nfunction DropDrawerSubContent({\r\n className,\r\n sideOffset = 4,\r\n children,\r\n ...props\r\n}: React.ComponentProps<typeof DropdownMenuSubContent>): React.JSX.Element | null {\r\n const {isMobile} = useDropDrawerContext();\r\n\r\n if (isMobile) {\r\n return null;\r\n }\r\n\r\n return (\r\n <DropdownMenuSubContent\r\n data-slot='drop-drawer-sub-content'\r\n sideOffset={sideOffset}\r\n className={cn(styles.dropdownSubContent, className)}\r\n {...props}>\r\n {children}\r\n </DropdownMenuSubContent>\r\n );\r\n}\r\n\r\nDropDrawer.displayName = \"DropDrawer\";\r\nDropDrawerTrigger.displayName = \"DropDrawerTrigger\";\r\nDropDrawerContent.displayName = \"DropDrawerContent\";\r\nDropDrawerItem.displayName = \"DropDrawerItem\";\r\nDropDrawerSeparator.displayName = \"DropDrawerSeparator\";\r\nDropDrawerLabel.displayName = \"DropDrawerLabel\";\r\nDropDrawerFooter.displayName = \"DropDrawerFooter\";\r\nDropDrawerGroup.displayName = \"DropDrawerGroup\";\r\nDropDrawerSub.displayName = \"DropDrawerSub\";\r\nDropDrawerSubTrigger.displayName = \"DropDrawerSubTrigger\";\r\nDropDrawerSubContent.displayName = \"DropDrawerSubContent\";\r\n\r\nexport {\r\n DropDrawer,\r\n DropDrawerContent,\r\n DropDrawerFooter,\r\n DropDrawerGroup,\r\n DropDrawerItem,\r\n DropDrawerLabel,\r\n DropDrawerSeparator,\r\n DropDrawerSub,\r\n DropDrawerSubContent,\r\n DropDrawerSubTrigger,\r\n DropDrawerTrigger,\r\n};\r\n"],"names":["MOBILE_MENU_TITLE","MOBILE_SUBMENU_TITLE","MOBILE_BACK_LABEL","DropDrawerContext","React","useDropDrawerContext","context","Error","Drawer","BaseDrawer","DrawerPortal","DrawerTrigger","props","asChild","children","className","render","otherProps","renderProp","useRender","mergeProps","undefined","DrawerOverlay","cn","styles","DrawerContent","DrawerHeader","DrawerFooter","DrawerTitle","DropdownMenu","BaseMenu","DropdownMenuSub","DropdownMenuTrigger","DropdownMenuContent","DropdownMenuItem","inset","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuSubTrigger","ChevronRightIcon","DropdownMenuSubContent","SubmenuContext","DropDrawer","isMobile","useIsMobile","DropDrawerTrigger","DropDrawerContent","activeSubmenu","setActiveSubmenu","submenuTitle","setSubmenuTitle","submenuStack","setSubmenuStack","animationDirection","setAnimationDirection","submenuContentRef","Map","navigateToSubmenu","id","title","previousStack","goBack","newStack","previousSubmenu","registerSubmenuContent","content","extractSubmenuContent","elements","targetId","result","findSubmenuContent","node","element","DropDrawerSub","elementId","dataSubmenuId","child","DropDrawerSubContent","subContentElement","contentChild","getSubmenuContent","cachedContent","submenuContent","variants","direction","transition","ChevronLeftIcon","AnimatePresence","motion","DropDrawerItem","closeOnClick","disabled","icon","onClick","onSelect","isInGroup","parent","itemRef","isInsideGroup","setIsInsideGroup","timer","globalThis","handleSelect","event","handleClick","handleKeyDown","parentSubmenuId","handleDesktopClick","DropDrawerSeparator","DropDrawerLabel","DropDrawerFooter","DropDrawerGroup","childrenWithSeparators","childArray","filteredChildren","index","generatedId","submenuId","contentItems","childElement","processedChildren","DropDrawerSubTrigger","navigate","eventTarget","closestElement","closestId","sideOffset"],"mappings":";;;;;;;;;;;;AAgBA,MAAMA,oBAAoB;AAC1B,MAAMC,uBAAuB;AAC7B,MAAMC,oBAAoB;AAM1B,MAAMC,oBAAoB,WAAHA,GAAGC,cAAmD;AAE7E,MAAMC,uBAAuB;IAC3B,MAAMC,UAAUF,WAAiBD;IAEjC,IAAIG,AAAY,SAAZA,SACF,MAAM,IAAIC,MAAM;IAGlB,OAAOD;AACT;AAEA,MAAME,oBAASC,OAAAA,IAAe;AAC9B,MAAMC,eAAeD,OAAAA,MAAiB;AAEtC,SAASE,cAAcC,KAA6F;IAClH,MAAM,EAACC,UAAU,KAAK,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGL;IACtE,MAAMM,aAAaL,WAAW,WAAXA,GAAWT,eAAqBU,YAAYA,WAAWE;IAE1E,OAAO,WAAP,GACE,IAACP,OAAAA,OAAkB;QAChB,GAAGQ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WAAW,GAAG;AAC9BC,iBAAiB,WAAW,GAAG;AAC/BC,gBAAgB,WAAW,GAAG;AAC9BtC,cAAc,WAAW,GAAG;AAC5BgD,qBAAqB,WAAW,GAAG;AACnC5C,qBAAqB,WAAW,GAAG"}
1
+ {"version":3,"file":"components/ui/dropdrawer.js","sources":["../../../src/components/ui/dropdrawer.tsx"],"sourcesContent":["\"use client\";\r\n\r\n/* eslint-disable react/no-children-prop, react-x/no-children-for-each, react-x/no-children-map, react-x/no-children-to-array, react-x/no-clone-element, sonarjs/function-return-type, sonarjs/no-identical-functions, sonarjs/no-unused-vars, max-lines, unicorn/no-array-callback-reference, unicorn/no-useless-undefined, unicorn/prefer-at, unicorn/prefer-dom-node-dataset, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */\r\n\r\nimport {Drawer as BaseDrawer} from \"@base-ui/react/drawer\";\r\nimport {Menu as BaseMenu} from \"@base-ui/react/menu\";\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport {ChevronLeftIcon, ChevronRightIcon} from \"lucide-react\";\r\nimport {AnimatePresence, motion, type Transition} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {useIsMobile} from \"@/hooks/useIsMobile\";\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./dropdrawer.module.css\";\r\n\r\nconst MOBILE_MENU_TITLE = \"Menu\";\r\nconst MOBILE_SUBMENU_TITLE = \"Submenu\";\r\nconst MOBILE_BACK_LABEL = \"Go back\";\r\n\r\ninterface DropDrawerContextValue {\r\n isMobile: boolean;\r\n}\r\n\r\nconst DropDrawerContext = React.createContext<DropDrawerContextValue | null>(null);\r\n\r\nconst useDropDrawerContext = (): DropDrawerContextValue => {\r\n const context = React.useContext(DropDrawerContext);\r\n\r\n if (context === null) {\r\n throw new Error(\"DropDrawer components cannot be rendered outside the Context\");\r\n }\r\n\r\n return context;\r\n};\r\n\r\nconst Drawer = BaseDrawer.Root;\r\nconst DrawerPortal = BaseDrawer.Portal;\r\n\r\nconst DrawerTrigger = React.forwardRef<HTMLButtonElement, React.ComponentPropsWithRef<typeof BaseDrawer.Trigger> & {asChild?: boolean}>(\r\n function DrawerTrigger(props, forwardedRef) {\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return (\r\n <BaseDrawer.Trigger\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: renderProp as never,\r\n props: mergeProps({className}, {}),\r\n })}>\r\n {renderProp ? undefined : children}\r\n </BaseDrawer.Trigger>\r\n );\r\n },\r\n);\r\n\r\nfunction DrawerOverlay(props: Readonly<React.ComponentPropsWithRef<typeof BaseDrawer.Backdrop>>): React.ReactElement {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDrawer.Backdrop\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.drawerOverlay, className)}, {}),\r\n })}\r\n />\r\n );\r\n}\r\n\r\nconst DrawerContent = React.forwardRef<HTMLDivElement, React.ComponentPropsWithRef<typeof BaseDrawer.Popup> & {children?: React.ReactNode}>(\r\n function DrawerContent(props, forwardedRef) {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <DrawerPortal>\r\n <DrawerOverlay />\r\n <BaseDrawer.Viewport className={styles.drawerViewport}>\r\n <BaseDrawer.Popup\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.drawerContent, className)}, {}),\r\n })}>\r\n <div className={styles.drawerHandle} />\r\n <BaseDrawer.Content className={styles.drawerInnerContent}>{children}</BaseDrawer.Content>\r\n </BaseDrawer.Popup>\r\n </BaseDrawer.Viewport>\r\n </DrawerPortal>\r\n );\r\n },\r\n);\r\n\r\nfunction DrawerHeader(\r\n props: Readonly<React.ComponentPropsWithRef<\"div\"> & {render?: useRender.RenderProp<Record<string, never>>}>,\r\n): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.drawerHeader, className)}, otherProps, {children}),\r\n });\r\n}\r\n\r\nfunction DrawerFooter(\r\n props: Readonly<React.ComponentPropsWithRef<\"div\"> & {render?: useRender.RenderProp<Record<string, never>>}>,\r\n): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.drawerFooter, className)}, otherProps, {children}),\r\n });\r\n}\r\n\r\nfunction DrawerTitle(props: Readonly<React.ComponentPropsWithRef<typeof BaseDrawer.Title>>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDrawer.Title\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"h2\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.drawerTitle, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseDrawer.Title>\r\n );\r\n}\r\n\r\nconst DropdownMenu = BaseMenu.Root;\r\nconst DropdownMenuSub = BaseMenu.SubmenuRoot;\r\n\r\nconst DropdownMenuTrigger = React.forwardRef<HTMLButtonElement, React.ComponentPropsWithRef<typeof BaseMenu.Trigger> & {asChild?: boolean}>(\r\n function DropdownMenuTrigger(props, forwardedRef) {\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return (\r\n <BaseMenu.Trigger\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: renderProp as never,\r\n props: mergeProps({className}, {}),\r\n })}>\r\n {renderProp ? undefined : children}\r\n </BaseMenu.Trigger>\r\n );\r\n },\r\n);\r\n\r\nconst DropdownMenuContent = React.forwardRef<\r\n HTMLDivElement,\r\n React.ComponentPropsWithRef<typeof BaseMenu.Positioner> & {children?: React.ReactNode}\r\n>(function DropdownMenuContent(props, forwardedRef) {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseMenu.Portal>\r\n <BaseMenu.Positioner\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n props: mergeProps({className: styles.dropdownPositioner}, {}),\r\n })}>\r\n <BaseMenu.Popup\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.dropdownContent, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseMenu.Popup>\r\n </BaseMenu.Positioner>\r\n </BaseMenu.Portal>\r\n );\r\n});\r\n\r\ninterface DropdownMenuItemProps extends React.ComponentPropsWithRef<typeof BaseMenu.Item> {\r\n /** @deprecated Prefer Base UI's `render` prop. */\r\n asChild?: boolean;\r\n /**\r\n * Whether to apply inset spacing to align with grouped menu content.\r\n * @default false\r\n */\r\n inset?: boolean;\r\n}\r\n\r\nfunction DropdownMenuItem(props: Readonly<DropdownMenuItemProps>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API\r\n const {asChild = false, children, className, inset = false, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return (\r\n <BaseMenu.Item\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.desktopItem, inset && styles.inset, className)}, {}),\r\n })}>\r\n {renderProp ? undefined : children}\r\n </BaseMenu.Item>\r\n );\r\n}\r\n\r\nfunction DropdownMenuLabel(props: Readonly<React.ComponentPropsWithRef<typeof BaseMenu.GroupLabel>>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseMenu.GroupLabel\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.desktopLabel, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseMenu.GroupLabel>\r\n );\r\n}\r\n\r\nfunction DropdownMenuSeparator(props: Readonly<React.ComponentPropsWithRef<typeof BaseMenu.Separator>>): React.ReactElement {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseMenu.Separator\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.desktopSeparator, className)}, {}),\r\n })}\r\n />\r\n );\r\n}\r\n\r\nfunction DropdownMenuSubTrigger(\r\n props: Readonly<React.ComponentPropsWithRef<typeof BaseMenu.SubmenuTrigger> & {inset?: boolean}>,\r\n): React.ReactElement {\r\n const {className, children, inset = false, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseMenu.SubmenuTrigger\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.desktopSubTrigger, inset && styles.inset, className)}, {}),\r\n })}>\r\n {children}\r\n <ChevronRightIcon className={styles.chevron} />\r\n </BaseMenu.SubmenuTrigger>\r\n );\r\n}\r\n\r\nfunction DropdownMenuSubContent(\r\n props: Readonly<React.ComponentPropsWithRef<typeof BaseMenu.Positioner> & {children?: React.ReactNode}>,\r\n): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseMenu.Positioner\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n props: mergeProps({className: styles.dropdownPositioner}, {}),\r\n })}>\r\n <BaseMenu.Popup\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.dropdownSubContent, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseMenu.Popup>\r\n </BaseMenu.Positioner>\r\n );\r\n}\r\n\r\ntype DropDrawerRootProps = React.ComponentProps<typeof Drawer> | React.ComponentProps<typeof DropdownMenu>;\r\ntype DropDrawerTriggerProps =\r\n | React.ComponentPropsWithoutRef<typeof DrawerTrigger>\r\n | React.ComponentPropsWithoutRef<typeof DropdownMenuTrigger>;\r\ntype DropDrawerContentProps =\r\n | React.ComponentPropsWithoutRef<typeof DrawerContent>\r\n | React.ComponentPropsWithoutRef<typeof DropdownMenuContent>;\r\n\r\ninterface MobileSubmenuDataAttributes {\r\n \"data-parent-submenu-id\"?: string;\r\n \"data-parent-submenu\"?: string;\r\n \"data-submenu-id\"?: string;\r\n}\r\n\r\ninterface SharedDropDrawerItemProps\r\n extends Omit<React.ComponentPropsWithoutRef<typeof BaseMenu.Item>, \"children\" | \"onClick\" | \"onSelect\">, MobileSubmenuDataAttributes {\r\n /**\r\n * Item contents.\r\n * @default undefined\r\n */\r\n children?: React.ReactNode;\r\n /**\r\n * Additional CSS classes merged with the item styles.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Whether the desktop dropdown should close after the item is activated.\r\n * @default undefined\r\n */\r\n closeOnClick?: boolean;\r\n /**\r\n * Optional trailing icon or affordance rendered alongside the item content.\r\n * @default undefined\r\n */\r\n icon?: React.ReactNode;\r\n /**\r\n * Whether to apply inset spacing to align the item with grouped content.\r\n * @default undefined\r\n */\r\n inset?: boolean;\r\n /**\r\n * Mouse click handler invoked when the item is activated.\r\n * @default undefined\r\n */\r\n onClick?: React.MouseEventHandler<HTMLElement>;\r\n /**\r\n * Selection callback invoked with the native event when the item is activated.\r\n * @default undefined\r\n */\r\n onSelect?: (event: Event) => void;\r\n}\r\n\r\ninterface SubmenuContextType {\r\n activeSubmenu: string | null;\r\n navigateToSubmenu?: (id: string, title: string) => void;\r\n registerSubmenuContent?: (id: string, content: ReadonlyArray<React.ReactNode>) => void;\r\n setActiveSubmenu: (id: string | null) => void;\r\n setSubmenuTitle: (title: string | null) => void;\r\n submenuTitle: string | null;\r\n}\r\n\r\nconst SubmenuContext = React.createContext<SubmenuContextType>({\r\n activeSubmenu: null,\r\n navigateToSubmenu: undefined,\r\n registerSubmenuContent: undefined,\r\n setActiveSubmenu: () => undefined,\r\n setSubmenuTitle: () => undefined,\r\n submenuTitle: null,\r\n});\r\n\r\n/**\r\n * Provides a responsive dropdown-on-desktop, drawer-on-mobile navigation surface.\r\n *\r\n * @remarks\r\n * - Renders either Base UI `Menu.Root` or `Drawer.Root` depending on viewport size\r\n * - Built on Base UI Menu and Drawer primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawer>\r\n * <DropDrawerTrigger>Open menu</DropDrawerTrigger>\r\n * <DropDrawerContent>\r\n * <DropDrawerItem>Profile</DropDrawerItem>\r\n * </DropDrawerContent>\r\n * </DropDrawer>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/menu | Base UI Menu Docs}\r\n */\r\nfunction DropDrawer({children, ...props}: DropDrawerRootProps): React.JSX.Element {\r\n const isMobile = useIsMobile();\r\n\r\n return (\r\n <DropDrawerContext.Provider value={{isMobile}}>\r\n {isMobile ? (\r\n <Drawer\r\n data-slot='drop-drawer'\r\n {...(props as React.ComponentProps<typeof Drawer>)}>\r\n {children}\r\n </Drawer>\r\n ) : (\r\n <DropdownMenu\r\n data-slot='drop-drawer'\r\n {...(props as React.ComponentProps<typeof DropdownMenu>)}>\r\n {children}\r\n </DropdownMenu>\r\n )}\r\n </DropDrawerContext.Provider>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the control that opens the dropdown or drawer surface.\r\n *\r\n * @remarks\r\n * - Renders either a Base UI menu trigger or drawer trigger\r\n * - Built on Base UI Menu and Drawer primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawerTrigger>Open menu</DropDrawerTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Drawer Docs}\r\n */\r\nconst DropDrawerTrigger = React.forwardRef<HTMLButtonElement, DropDrawerTriggerProps>(function DropDrawerTrigger(\r\n {className, children, ...props},\r\n forwardedRef,\r\n) {\r\n const {isMobile} = useDropDrawerContext();\r\n\r\n return isMobile ? (\r\n <DrawerTrigger\r\n ref={forwardedRef}\r\n data-slot='drop-drawer-trigger'\r\n className={className}\r\n {...(props as React.ComponentProps<typeof DrawerTrigger>)}>\r\n {children}\r\n </DrawerTrigger>\r\n ) : (\r\n <DropdownMenuTrigger\r\n ref={forwardedRef}\r\n data-slot='drop-drawer-trigger'\r\n className={className}\r\n {...(props as React.ComponentProps<typeof DropdownMenuTrigger>)}>\r\n {children}\r\n </DropdownMenuTrigger>\r\n );\r\n});\r\n\r\n/**\r\n * Renders the responsive dropdown or drawer content surface.\r\n *\r\n * @remarks\r\n * - Renders a Base UI popup on desktop and drawer content on mobile\r\n * - Built on Base UI Menu and Drawer primitives with animated mobile submenu navigation\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawerContent>\r\n * <DropDrawerItem>Settings</DropDrawerItem>\r\n * </DropDrawerContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/menu | Base UI Menu Docs}\r\n */\r\nconst DropDrawerContent = React.forwardRef<HTMLDivElement, DropDrawerContentProps>(function DropDrawerContent(\r\n {className, children, ...props},\r\n forwardedRef,\r\n) {\r\n const {isMobile} = useDropDrawerContext();\r\n const [activeSubmenu, setActiveSubmenu] = React.useState<string | null>(null);\r\n const [submenuTitle, setSubmenuTitle] = React.useState<string | null>(null);\r\n const [submenuStack, setSubmenuStack] = React.useState<ReadonlyArray<{id: string; title: string}>>([]);\r\n const [animationDirection, setAnimationDirection] = React.useState<\"forward\" | \"backward\">(\"forward\");\r\n const submenuContentRef = React.useRef(new Map<string, ReadonlyArray<React.ReactNode>>());\r\n\r\n React.useEffect(() => {\r\n submenuContentRef.current.clear();\r\n }, [children]);\r\n\r\n const navigateToSubmenu = React.useCallback((id: string, title: string): void => {\r\n setAnimationDirection(\"forward\");\r\n setActiveSubmenu(id);\r\n setSubmenuTitle(title);\r\n setSubmenuStack((previousStack) => [...previousStack, {id, title}]);\r\n }, []);\r\n\r\n const goBack = React.useCallback((): void => {\r\n setAnimationDirection(\"backward\");\r\n\r\n if (submenuStack.length <= 1) {\r\n setActiveSubmenu(null);\r\n setSubmenuTitle(null);\r\n setSubmenuStack([]);\r\n return;\r\n }\r\n\r\n const newStack = [...submenuStack];\r\n newStack.pop();\r\n const previousSubmenu = newStack[newStack.length - 1];\r\n\r\n if (!previousSubmenu) {\r\n setActiveSubmenu(null);\r\n setSubmenuTitle(null);\r\n setSubmenuStack([]);\r\n return;\r\n }\r\n\r\n setActiveSubmenu(previousSubmenu.id);\r\n setSubmenuTitle(previousSubmenu.title);\r\n setSubmenuStack(newStack);\r\n }, [submenuStack]);\r\n\r\n const registerSubmenuContent = React.useCallback((id: string, content: ReadonlyArray<React.ReactNode>): void => {\r\n submenuContentRef.current.set(id, content);\r\n }, []);\r\n\r\n const extractSubmenuContent = React.useCallback((elements: React.ReactNode, targetId: string): ReadonlyArray<React.ReactNode> => {\r\n const result: Array<React.ReactNode> = [];\r\n\r\n const findSubmenuContent = (node: React.ReactNode): void => {\r\n if (!React.isValidElement(node)) {\r\n return;\r\n }\r\n\r\n const element = node as React.ReactElement<{\r\n \"data-submenu-id\"?: string;\r\n children?: React.ReactNode;\r\n id?: string;\r\n }>;\r\n\r\n if (element.type === DropDrawerSub) {\r\n const elementId = element.props.id;\r\n const dataSubmenuId = element.props[\"data-submenu-id\"];\r\n\r\n if (elementId === targetId || dataSubmenuId === targetId) {\r\n if (element.props.children) {\r\n React.Children.forEach(element.props.children, (child) => {\r\n if (React.isValidElement(child) && child.type === DropDrawerSubContent) {\r\n const subContentElement = child as React.ReactElement<{children?: React.ReactNode}>;\r\n\r\n React.Children.forEach(subContentElement.props.children, (contentChild) => {\r\n result.push(contentChild);\r\n });\r\n }\r\n });\r\n }\r\n\r\n return;\r\n }\r\n }\r\n\r\n if (element.props.children) {\r\n React.Children.forEach(element.props.children, findSubmenuContent);\r\n }\r\n };\r\n\r\n React.Children.forEach(elements, findSubmenuContent);\r\n return result;\r\n }, []);\r\n\r\n const getSubmenuContent = React.useCallback(\r\n (id: string): ReadonlyArray<React.ReactNode> => {\r\n const cachedContent = submenuContentRef.current.get(id);\r\n\r\n if (cachedContent && cachedContent.length > 0) {\r\n return cachedContent;\r\n }\r\n\r\n const submenuContent = extractSubmenuContent(children, id);\r\n\r\n if (submenuContent.length > 0) {\r\n submenuContentRef.current.set(id, submenuContent);\r\n }\r\n\r\n return submenuContent;\r\n },\r\n [children, extractSubmenuContent],\r\n );\r\n\r\n const variants = {\r\n center: {\r\n opacity: 1,\r\n x: 0,\r\n },\r\n enter: (direction: \"forward\" | \"backward\") => ({\r\n opacity: 0,\r\n x: direction === \"forward\" ? \"100%\" : \"-100%\",\r\n }),\r\n exit: (direction: \"forward\" | \"backward\") => ({\r\n opacity: 0,\r\n x: direction === \"forward\" ? \"-100%\" : \"100%\",\r\n }),\r\n };\r\n\r\n const transition = {\r\n duration: 0.3,\r\n ease: [0.25, 0.1, 0.25, 1],\r\n } satisfies Transition;\r\n\r\n if (isMobile) {\r\n return (\r\n <SubmenuContext.Provider\r\n value={{\r\n activeSubmenu,\r\n navigateToSubmenu,\r\n registerSubmenuContent,\r\n setActiveSubmenu: (id) => {\r\n if (id === null) {\r\n setActiveSubmenu(null);\r\n setSubmenuTitle(null);\r\n setSubmenuStack([]);\r\n }\r\n },\r\n setSubmenuTitle,\r\n submenuTitle,\r\n }}>\r\n <DrawerContent\r\n ref={forwardedRef}\r\n data-slot='drop-drawer-content'\r\n className={cn(styles.mobileContent, className)}\r\n {...(props as React.ComponentProps<typeof DrawerContent>)}>\r\n {activeSubmenu ? (\r\n <>\r\n <DrawerHeader>\r\n <div className={styles.mobileHeaderRow}>\r\n <button\r\n type='button'\r\n aria-label={MOBILE_BACK_LABEL}\r\n onClick={goBack}\r\n className={styles.backButton}>\r\n <ChevronLeftIcon className={styles.chevron} />\r\n </button>\r\n <DrawerTitle>{submenuTitle || MOBILE_SUBMENU_TITLE}</DrawerTitle>\r\n </div>\r\n </DrawerHeader>\r\n <div className={styles.mobileViewport}>\r\n <AnimatePresence\r\n initial={false}\r\n mode='wait'\r\n custom={animationDirection}>\r\n <motion.div\r\n key={activeSubmenu}\r\n custom={animationDirection}\r\n variants={variants}\r\n initial='enter'\r\n animate='center'\r\n exit='exit'\r\n transition={transition}\r\n className={styles.mobileMotionPanel}>\r\n {getSubmenuContent(activeSubmenu)}\r\n </motion.div>\r\n </AnimatePresence>\r\n </div>\r\n </>\r\n ) : (\r\n <>\r\n <DrawerHeader className={styles.screenReaderOnlyHeader}>\r\n <DrawerTitle>{MOBILE_MENU_TITLE}</DrawerTitle>\r\n </DrawerHeader>\r\n <div className={styles.mobileMainViewport}>\r\n <AnimatePresence\r\n initial={false}\r\n mode='wait'\r\n custom={animationDirection}>\r\n <motion.div\r\n key='main-menu'\r\n custom={animationDirection}\r\n variants={variants}\r\n initial='enter'\r\n animate='center'\r\n exit='exit'\r\n transition={transition}\r\n className={styles.mobileMotionPanel}>\r\n {children}\r\n </motion.div>\r\n </AnimatePresence>\r\n </div>\r\n </>\r\n )}\r\n </DrawerContent>\r\n </SubmenuContext.Provider>\r\n );\r\n }\r\n\r\n return (\r\n <SubmenuContext.Provider\r\n value={{\r\n activeSubmenu,\r\n registerSubmenuContent,\r\n setActiveSubmenu,\r\n setSubmenuTitle,\r\n submenuTitle,\r\n }}>\r\n <DropdownMenuContent\r\n ref={forwardedRef}\r\n data-slot='drop-drawer-content'\r\n align='end'\r\n sideOffset={4}\r\n className={cn(styles.desktopContent, className)}\r\n {...(props as React.ComponentProps<typeof DropdownMenuContent>)}>\r\n {children}\r\n </DropdownMenuContent>\r\n </SubmenuContext.Provider>\r\n );\r\n});\r\n\r\n/**\r\n * Renders an actionable item inside the drop drawer surface.\r\n *\r\n * @remarks\r\n * - Renders a Base UI menu item on desktop and a keyboard-accessible `<div>` on mobile\r\n * - Built on Base UI Menu and Drawer close primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawerItem icon={<ChevronRightIcon />}>Account</DropDrawerItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/menu | Base UI Menu Docs}\r\n */\r\nfunction DropDrawerItem({\r\n className,\r\n children,\r\n closeOnClick,\r\n disabled,\r\n icon,\r\n inset,\r\n onClick,\r\n onSelect,\r\n ...props\r\n}: SharedDropDrawerItemProps): React.JSX.Element {\r\n const {isMobile} = useDropDrawerContext();\r\n\r\n const isInGroup = React.useCallback((element: HTMLElement | null): boolean => {\r\n if (!element) {\r\n return false;\r\n }\r\n\r\n let parent = element.parentElement;\r\n\r\n while (parent) {\r\n if (parent.hasAttribute(\"data-drop-drawer-group\")) {\r\n return true;\r\n }\r\n\r\n parent = parent.parentElement;\r\n }\r\n\r\n return false;\r\n }, []);\r\n\r\n const itemRef = React.useRef<HTMLDivElement>(null);\r\n const [isInsideGroup, setIsInsideGroup] = React.useState(false);\r\n\r\n React.useEffect(() => {\r\n if (!isMobile) {\r\n return;\r\n }\r\n\r\n const timer = globalThis.window.setTimeout(() => {\r\n if (itemRef.current) {\r\n setIsInsideGroup(isInGroup(itemRef.current));\r\n }\r\n }, 0);\r\n\r\n return () => globalThis.window.clearTimeout(timer);\r\n }, [isInGroup, isMobile]);\r\n\r\n const handleSelect = React.useCallback(\r\n (event: Event): void => {\r\n if (!disabled) {\r\n onSelect?.(event);\r\n }\r\n },\r\n [disabled, onSelect],\r\n );\r\n\r\n if (isMobile) {\r\n const handleClick: React.MouseEventHandler<HTMLDivElement> = (event): void => {\r\n if (disabled) {\r\n return;\r\n }\r\n\r\n onClick?.(event);\r\n handleSelect(event.nativeEvent);\r\n };\r\n\r\n const handleKeyDown: React.KeyboardEventHandler<HTMLDivElement> = (event): void => {\r\n if (event.key !== \"Enter\" && event.key !== \" \") {\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n event.currentTarget.click();\r\n };\r\n\r\n const content = (\r\n <div\r\n ref={itemRef}\r\n data-slot='drop-drawer-item'\r\n data-disabled={disabled}\r\n data-inset={inset}\r\n role='menuitem'\r\n tabIndex={disabled ? -1 : 0}\r\n className={cn(\r\n styles.mobileItem,\r\n !isInsideGroup && styles.mobileStandaloneItem,\r\n isInsideGroup && styles.mobileGroupedItem,\r\n inset && styles.inset,\r\n className,\r\n )}\r\n onClick={handleClick}\r\n onKeyDown={handleKeyDown}\r\n aria-disabled={disabled}\r\n {...props}>\r\n <div className={styles.itemChildren}>{children}</div>\r\n {icon ? <div className={styles.itemIcon}>{icon}</div> : null}\r\n </div>\r\n );\r\n\r\n const parentSubmenuId = props[\"data-parent-submenu-id\"] ?? props[\"data-parent-submenu\"];\r\n\r\n if (parentSubmenuId) {\r\n return content;\r\n }\r\n\r\n return (\r\n <BaseDrawer.Close\r\n nativeButton={false}\r\n render={content}\r\n />\r\n );\r\n }\r\n\r\n const handleDesktopClick: React.MouseEventHandler<HTMLElement> = (event): void => {\r\n if (disabled) {\r\n return;\r\n }\r\n\r\n onClick?.(event);\r\n handleSelect(event.nativeEvent);\r\n };\r\n\r\n return (\r\n <DropdownMenuItem\r\n data-slot='drop-drawer-item'\r\n data-inset={inset}\r\n className={cn(styles.desktopItem, className)}\r\n closeOnClick={closeOnClick}\r\n disabled={disabled}\r\n inset={inset}\r\n onClick={handleDesktopClick}\r\n {...props}>\r\n <div className={styles.itemRow}>\r\n <div className={styles.itemChildren}>{children}</div>\r\n {icon ? <div className={styles.itemIcon}>{icon}</div> : null}\r\n </div>\r\n </DropdownMenuItem>\r\n );\r\n}\r\n\r\n/**\r\n * Renders a visual separator between desktop drop drawer sections.\r\n *\r\n * @remarks\r\n * - Renders a separator only in desktop dropdown mode\r\n * - Built on Base UI Menu separator primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawerSeparator />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/menu | Base UI Menu Docs}\r\n */\r\nfunction DropDrawerSeparator({\r\n className,\r\n ...props\r\n}: React.ComponentPropsWithoutRef<typeof DropdownMenuSeparator>): React.JSX.Element | null {\r\n const {isMobile} = useDropDrawerContext();\r\n\r\n if (isMobile) {\r\n return null;\r\n }\r\n\r\n return (\r\n <DropdownMenuSeparator\r\n data-slot='drop-drawer-separator'\r\n className={className}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\n/**\r\n * Renders a section label for the drop drawer surface.\r\n *\r\n * @remarks\r\n * - Renders a drawer title on mobile and a menu label on desktop\r\n * - Built on Base UI Drawer and Menu primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawerLabel>Actions</DropDrawerLabel>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/menu | Base UI Menu Docs}\r\n */\r\nfunction DropDrawerLabel({\r\n className,\r\n children,\r\n ...props\r\n}: React.ComponentProps<typeof DropdownMenuLabel> | React.ComponentProps<typeof DrawerTitle>): React.JSX.Element {\r\n const {isMobile} = useDropDrawerContext();\r\n\r\n return isMobile ? (\r\n <DrawerHeader className={styles.mobileLabelWrapper}>\r\n <DrawerTitle\r\n data-slot='drop-drawer-label'\r\n className={cn(styles.mobileLabel, className)}\r\n {...(props as React.ComponentProps<typeof DrawerTitle>)}>\r\n {children}\r\n </DrawerTitle>\r\n </DrawerHeader>\r\n ) : (\r\n <DropdownMenuLabel\r\n data-slot='drop-drawer-label'\r\n className={className}\r\n {...(props as React.ComponentProps<typeof DropdownMenuLabel>)}>\r\n {children}\r\n </DropdownMenuLabel>\r\n );\r\n}\r\n\r\n/**\r\n * Renders footer content aligned to the bottom of the responsive surface.\r\n *\r\n * @remarks\r\n * - Renders a drawer footer on mobile and a styled `<div>` on desktop\r\n * - Built on Base UI Drawer primitives for mobile layouts\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawerFooter>Signed in as Alex</DropDrawerFooter>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/drawer | Base UI Drawer Docs}\r\n */\r\nfunction DropDrawerFooter({\r\n className,\r\n children,\r\n ...props\r\n}: React.ComponentProps<typeof DrawerFooter> | React.ComponentProps<\"div\">): React.JSX.Element {\r\n const {isMobile} = useDropDrawerContext();\r\n\r\n return isMobile ? (\r\n <DrawerFooter\r\n data-slot='drop-drawer-footer'\r\n className={cn(styles.mobileFooter, className)}\r\n {...(props as React.ComponentProps<typeof DrawerFooter>)}>\r\n {children}\r\n </DrawerFooter>\r\n ) : (\r\n <div\r\n data-slot='drop-drawer-footer'\r\n className={cn(styles.desktopFooter, className)}\r\n {...props}>\r\n {children}\r\n </div>\r\n );\r\n}\r\n\r\n/**\r\n * Renders a grouped collection of drop drawer items.\r\n *\r\n * @remarks\r\n * - Renders a Base UI menu group on desktop and a `<div role=\"group\">` on mobile\r\n * - Inserts mobile-only separators between adjacent children\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawerGroup>\r\n * <DropDrawerItem>Profile</DropDrawerItem>\r\n * <DropDrawerItem>Billing</DropDrawerItem>\r\n * </DropDrawerGroup>\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/group_role | ARIA Group Role}\r\n */\r\nfunction DropDrawerGroup({className, children, ...props}: React.ComponentProps<\"div\"> & {children: React.ReactNode}): React.JSX.Element {\r\n const {isMobile} = useDropDrawerContext();\r\n\r\n const childrenWithSeparators = React.useMemo(() => {\r\n if (!isMobile) {\r\n return children;\r\n }\r\n\r\n const childArray = React.Children.toArray(children);\r\n const filteredChildren = childArray.filter((child) => !(React.isValidElement(child) && child.type === DropDrawerSeparator));\r\n\r\n return filteredChildren.flatMap((child, index) => {\r\n if (index === filteredChildren.length - 1) {\r\n return [child];\r\n }\r\n\r\n return [\r\n child,\r\n <div\r\n key={`separator-${index}`}\r\n className={styles.mobileGroupSeparator}\r\n aria-hidden='true'\r\n />,\r\n ];\r\n });\r\n }, [children, isMobile]);\r\n\r\n return isMobile ? (\r\n <div\r\n data-drop-drawer-group\r\n data-slot='drop-drawer-group'\r\n role='group'\r\n className={cn(styles.mobileGroup, className)}\r\n {...props}>\r\n {childrenWithSeparators}\r\n </div>\r\n ) : (\r\n <BaseMenu.Group\r\n data-drop-drawer-group\r\n data-slot='drop-drawer-group'\r\n className={className}\r\n {...(props as React.ComponentPropsWithoutRef<typeof BaseMenu.Group>)}>\r\n {children}\r\n </BaseMenu.Group>\r\n );\r\n}\r\n\r\n/**\r\n * Renders a submenu root within the drop drawer surface.\r\n *\r\n * @remarks\r\n * - Renders a Base UI submenu on desktop and a mobile-aware container on small screens\r\n * - Registers submenu content for animated mobile drill-down navigation\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawerSub>\r\n * <DropDrawerSubTrigger>More</DropDrawerSubTrigger>\r\n * <DropDrawerSubContent>\r\n * <DropDrawerItem>Sub item</DropDrawerItem>\r\n * </DropDrawerSubContent>\r\n * </DropDrawerSub>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/menu | Base UI Menu Docs}\r\n */\r\nfunction DropDrawerSub({\r\n children,\r\n id,\r\n ...props\r\n}: React.ComponentPropsWithoutRef<typeof DropdownMenuSub> & {children?: React.ReactNode; id?: string}): React.JSX.Element {\r\n const {isMobile} = useDropDrawerContext();\r\n const {registerSubmenuContent} = React.useContext(SubmenuContext);\r\n const generatedId = React.useId();\r\n const submenuId = id || generatedId;\r\n\r\n React.useEffect(() => {\r\n if (!registerSubmenuContent) {\r\n return;\r\n }\r\n\r\n const contentItems: Array<React.ReactNode> = [];\r\n\r\n React.Children.forEach(children, (child) => {\r\n if (React.isValidElement(child) && child.type === DropDrawerSubContent) {\r\n const childElement = child as React.ReactElement<{children?: React.ReactNode}>;\r\n\r\n React.Children.forEach(childElement.props.children, (contentChild) => {\r\n contentItems.push(contentChild);\r\n });\r\n }\r\n });\r\n\r\n if (contentItems.length > 0) {\r\n registerSubmenuContent(submenuId, contentItems);\r\n }\r\n }, [children, registerSubmenuContent, submenuId]);\r\n\r\n if (isMobile) {\r\n const processedChildren = React.Children.map(children, (child) => {\r\n if (!React.isValidElement(child)) {\r\n return child;\r\n }\r\n\r\n if (child.type === DropDrawerSubTrigger || child.type === DropDrawerSubContent) {\r\n return React.cloneElement(child as React.ReactElement<MobileSubmenuDataAttributes>, {\r\n \"data-parent-submenu\": submenuId,\r\n \"data-parent-submenu-id\": submenuId,\r\n \"data-submenu-id\": submenuId,\r\n });\r\n }\r\n\r\n return child;\r\n });\r\n\r\n return (\r\n <div\r\n data-slot='drop-drawer-sub'\r\n data-submenu-id={submenuId}\r\n id={submenuId}>\r\n {processedChildren}\r\n </div>\r\n );\r\n }\r\n\r\n return (\r\n <DropdownMenuSub\r\n data-slot='drop-drawer-sub'\r\n data-submenu-id={submenuId}\r\n {...props}>\r\n {children}\r\n </DropdownMenuSub>\r\n );\r\n}\r\n\r\ninterface DropDrawerSubTriggerProps\r\n extends Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuSubTrigger>, \"children\" | \"onClick\">, MobileSubmenuDataAttributes {\r\n /**\r\n * Trigger contents.\r\n * @default undefined\r\n */\r\n children?: React.ReactNode;\r\n /**\r\n * Additional CSS classes merged with the trigger styles.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Whether to apply inset spacing to align the trigger with grouped content.\r\n * @default undefined\r\n */\r\n inset?: boolean;\r\n /**\r\n * Mouse click handler invoked before submenu navigation occurs.\r\n * @default undefined\r\n */\r\n onClick?: React.MouseEventHandler<HTMLElement>;\r\n}\r\n\r\n/**\r\n * Renders the trigger that opens a nested submenu.\r\n *\r\n * @remarks\r\n * - Renders a Base UI submenu trigger on desktop and a keyboard-accessible `<div>` on mobile\r\n * - Built on Base UI Menu submenu primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawerSubTrigger>Advanced</DropDrawerSubTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/menu | Base UI Menu Docs}\r\n */\r\nfunction DropDrawerSubTrigger({className, inset, children, onClick, ...props}: DropDrawerSubTriggerProps): React.JSX.Element {\r\n const {isMobile} = useDropDrawerContext();\r\n const {navigateToSubmenu} = React.useContext(SubmenuContext);\r\n\r\n const isInGroup = React.useCallback((element: HTMLElement | null): boolean => {\r\n if (!element) {\r\n return false;\r\n }\r\n\r\n let parent = element.parentElement;\r\n\r\n while (parent) {\r\n if (parent.hasAttribute(\"data-drop-drawer-group\")) {\r\n return true;\r\n }\r\n\r\n parent = parent.parentElement;\r\n }\r\n\r\n return false;\r\n }, []);\r\n\r\n const itemRef = React.useRef<HTMLDivElement>(null);\r\n const [isInsideGroup, setIsInsideGroup] = React.useState(false);\r\n\r\n React.useEffect(() => {\r\n if (!isMobile) {\r\n return;\r\n }\r\n\r\n const timer = globalThis.window.setTimeout(() => {\r\n if (itemRef.current) {\r\n setIsInsideGroup(isInGroup(itemRef.current));\r\n }\r\n }, 0);\r\n\r\n return () => globalThis.window.clearTimeout(timer);\r\n }, [isInGroup, isMobile]);\r\n\r\n if (isMobile) {\r\n const navigate = (eventTarget: HTMLElement): void => {\r\n let submenuId: string | null = null;\r\n const closestElement = eventTarget.closest(\"[data-submenu-id]\");\r\n const closestId = closestElement?.getAttribute(\"data-submenu-id\");\r\n\r\n if (closestId) {\r\n submenuId = closestId;\r\n }\r\n\r\n if (!submenuId) {\r\n submenuId = props[\"data-parent-submenu-id\"] ?? props[\"data-parent-submenu\"] ?? null;\r\n }\r\n\r\n if (!submenuId) {\r\n return;\r\n }\r\n\r\n const title = typeof children === \"string\" ? children : MOBILE_SUBMENU_TITLE;\r\n navigateToSubmenu?.(submenuId, title);\r\n };\r\n\r\n const handleClick: React.MouseEventHandler<HTMLDivElement> = (event): void => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n onClick?.(event);\r\n navigate(event.currentTarget);\r\n };\r\n\r\n const handleKeyDown: React.KeyboardEventHandler<HTMLDivElement> = (event): void => {\r\n if (event.key !== \"Enter\" && event.key !== \" \") {\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n event.stopPropagation();\r\n event.currentTarget.click();\r\n };\r\n\r\n return (\r\n <div\r\n ref={itemRef}\r\n data-slot='drop-drawer-sub-trigger'\r\n data-inset={inset}\r\n role='menuitem'\r\n tabIndex={0}\r\n className={cn(\r\n styles.mobileItem,\r\n !isInsideGroup && styles.mobileStandaloneItem,\r\n isInsideGroup && styles.mobileGroupedItem,\r\n inset && styles.inset,\r\n className,\r\n )}\r\n onClick={handleClick}\r\n onKeyDown={handleKeyDown}\r\n {...props}>\r\n <div className={styles.itemChildren}>{children}</div>\r\n <ChevronRightIcon className={styles.chevron} />\r\n </div>\r\n );\r\n }\r\n\r\n return (\r\n <DropdownMenuSubTrigger\r\n data-slot='drop-drawer-sub-trigger'\r\n data-inset={inset}\r\n className={className}\r\n inset={inset}\r\n onClick={onClick}\r\n {...props}>\r\n {children}\r\n </DropdownMenuSubTrigger>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the content region for a nested submenu.\r\n *\r\n * @remarks\r\n * - Renders only in desktop dropdown mode\r\n * - Built on Base UI Menu submenu popup primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <DropDrawerSubContent>\r\n * <DropDrawerItem>Details</DropDrawerItem>\r\n * </DropDrawerSubContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/menu | Base UI Menu Docs}\r\n */\r\nfunction DropDrawerSubContent({\r\n className,\r\n sideOffset = 4,\r\n children,\r\n ...props\r\n}: React.ComponentProps<typeof DropdownMenuSubContent>): React.JSX.Element | null {\r\n const {isMobile} = useDropDrawerContext();\r\n\r\n if (isMobile) {\r\n return null;\r\n }\r\n\r\n return (\r\n <DropdownMenuSubContent\r\n data-slot='drop-drawer-sub-content'\r\n sideOffset={sideOffset}\r\n className={cn(styles.dropdownSubContent, className)}\r\n {...props}>\r\n {children}\r\n </DropdownMenuSubContent>\r\n );\r\n}\r\n\r\nDropDrawer.displayName = \"DropDrawer\";\r\nDropDrawerTrigger.displayName = \"DropDrawerTrigger\";\r\nDropDrawerContent.displayName = \"DropDrawerContent\";\r\nDropDrawerItem.displayName = \"DropDrawerItem\";\r\nDropDrawerSeparator.displayName = \"DropDrawerSeparator\";\r\nDropDrawerLabel.displayName = \"DropDrawerLabel\";\r\nDropDrawerFooter.displayName = \"DropDrawerFooter\";\r\nDropDrawerGroup.displayName = \"DropDrawerGroup\";\r\nDropDrawerSub.displayName = \"DropDrawerSub\";\r\nDropDrawerSubTrigger.displayName = \"DropDrawerSubTrigger\";\r\nDropDrawerSubContent.displayName = \"DropDrawerSubContent\";\r\n\r\nexport {\r\n DropDrawer,\r\n DropDrawerContent,\r\n DropDrawerFooter,\r\n DropDrawerGroup,\r\n DropDrawerItem,\r\n DropDrawerLabel,\r\n DropDrawerSeparator,\r\n DropDrawerSub,\r\n DropDrawerSubContent,\r\n DropDrawerSubTrigger,\r\n DropDrawerTrigger,\r\n};\r\n"],"names":["MOBILE_MENU_TITLE","MOBILE_SUBMENU_TITLE","MOBILE_BACK_LABEL","DropDrawerContext","React","useDropDrawerContext","context","Error","Drawer","BaseDrawer","DrawerPortal","DrawerTrigger","props","forwardedRef","asChild","children","className","render","otherProps","renderProp","useRender","mergeProps","undefined","DrawerOverlay","cn","styles","DrawerContent","DrawerHeader","DrawerFooter","DrawerTitle","DropdownMenu","BaseMenu","DropdownMenuSub","DropdownMenuTrigger","DropdownMenuContent","DropdownMenuItem","inset","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuSubTrigger","ChevronRightIcon","DropdownMenuSubContent","SubmenuContext","DropDrawer","isMobile","useIsMobile","DropDrawerTrigger","DropDrawerContent","activeSubmenu","setActiveSubmenu","submenuTitle","setSubmenuTitle","submenuStack","setSubmenuStack","animationDirection","setAnimationDirection","submenuContentRef","Map","navigateToSubmenu","id","title","previousStack","goBack","newStack","previousSubmenu","registerSubmenuContent","content","extractSubmenuContent","elements","targetId","result","findSubmenuContent","node","element","DropDrawerSub","elementId","dataSubmenuId","child","DropDrawerSubContent","subContentElement","contentChild","getSubmenuContent","cachedContent","submenuContent","variants","direction","transition","ChevronLeftIcon","AnimatePresence","motion","DropDrawerItem","closeOnClick","disabled","icon","onClick","onSelect","isInGroup","parent","itemRef","isInsideGroup","setIsInsideGroup","timer","globalThis","handleSelect","event","handleClick","handleKeyDown","parentSubmenuId","handleDesktopClick","DropDrawerSeparator","DropDrawerLabel","DropDrawerFooter","DropDrawerGroup","childrenWithSeparators","childArray","filteredChildren","index","generatedId","submenuId","contentItems","childElement","processedChildren","DropDrawerSubTrigger","navigate","eventTarget","closestElement","closestId","sideOffset"],"mappings":";;;;;;;;;;;;AAgBA,MAAMA,oBAAoB;AAC1B,MAAMC,uBAAuB;AAC7B,MAAMC,oBAAoB;AAM1B,MAAMC,oBAAoB,WAAHA,GAAGC,cAAmD;AAE7E,MAAMC,uBAAuB;IAC3B,MAAMC,UAAUF,WAAiBD;IAEjC,IAAIG,AAAY,SAAZA,SACF,MAAM,IAAIC,MAAM;IAGlB,OAAOD;AACT;AAEA,MAAME,oBAASC,OAAAA,IAAe;AAC9B,MAAMC,eAAeD,OAAAA,MAAiB;AAEtC,MAAME,2BAAgB,WAAHA,GAAGP,WACpB,SAAuBQ,KAAK,EAAEC,YAAY;IACxC,MAAM,EAACC,UAAU,KAAK,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGN;IACtE,MAAMO,aAAaL,WAAW,WAAXA,GAAWV,eAAqBW,YAAYA,WAAWE;IAE1E,OAAO,WAAP,GACE,IAACR,OAAAA,OAAkB;QAChB,GAAGS,UAAU;QACd,KAAKL;QACL,QAAQO,UAAU;YAChB,gBAAgB;YAChB,QAAQD;YACR,OAAOE,WAAW;gBAACL;YAAS,GAAG,CAAC;QAClC;kBACCG,aAAaG,SAAYP;;AAGhC;AAGF,SAASQ,cAAcX,KAAwE;IAC7F,MAAM,EAACI,SAAS,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGN;IAE3C,OAAO,WAAP,GACE,IAACH,OAAAA,QAAmB;QACjB,GAAGS,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAW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AgB,WAAW,GAAG;AAC9BtC,cAAc,WAAW,GAAG;AAC5BgD,qBAAqB,WAAW,GAAG;AACnC5C,qBAAqB,WAAW,GAAG"}
@@ -89,7 +89,7 @@ declare const ItemGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTML
89
89
  *
90
90
  * @see {@link ItemSeparatorProps} for available props
91
91
  */
92
- declare const ItemSeparator: React.ForwardRefExoticComponent<Omit<Readonly<import("./separator").SeparatorProps>, "ref"> & React.RefAttributes<HTMLDivElement>>;
92
+ declare const ItemSeparator: React.ForwardRefExoticComponent<Omit<Omit<import("./separator").SeparatorProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
93
93
  /**
94
94
  * Creates a flexible data-display row with optional media and actions.
95
95
  *
@@ -1 +1 @@
1
- {"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../src/components/ui/item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AAIpD,mDAAmD;AACnD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAE1D,gDAAgD;AAChD,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC;AAExC,wDAAwD;AACxD,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAI5D;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,SAAS,CAAC,CAAC;AAElF;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACtE,iFAAiF;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,o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AAM,UAAU,mKASf,CAAC;AAaF,OAAO,EAAC,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAC,CAAC"}
@@ -2,16 +2,6 @@ import { Menu as BaseMenu } from "@base-ui/react/menu";
2
2
  import { Menubar as BaseMenubar } from "@base-ui/react/menubar";
3
3
  import { useRender } from "@base-ui/react/use-render";
4
4
  import * as React from "react";
5
- type MenubarProps = Omit<React.ComponentPropsWithRef<typeof BaseMenubar>, "className"> & {
6
- className?: string;
7
- };
8
- interface MenubarTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseMenu.Trigger>, "className"> {
9
- /**
10
- * Applies additional CSS classes to the component root element.
11
- * @default undefined
12
- */
13
- className?: string;
14
- }
15
5
  interface MenubarSubTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseMenu.SubmenuTrigger>, "className"> {
16
6
  /**
17
7
  * Applies additional CSS classes to the component root element.
@@ -212,7 +202,7 @@ declare namespace Menubar {
212
202
  *
213
203
  * @see {@link https://base-ui.com/react/components/menubar | Base UI Documentation}
214
204
  */
215
- declare const MenubarTrigger: React.ForwardRefExoticComponent<Omit<MenubarTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
205
+ declare const MenubarTrigger: React.ForwardRefExoticComponent<Omit<MenubarTrigger.Props, "ref"> & React.RefAttributes<HTMLButtonElement>>;
216
206
  /**
217
207
  * Renders the menubar sub trigger.
218
208
  *
@@ -382,11 +372,19 @@ declare namespace MenubarShortcut {
382
372
  var displayName: string;
383
373
  }
384
374
  declare namespace Menubar {
385
- type Props = MenubarProps;
375
+ type Props = Omit<React.ComponentPropsWithRef<typeof BaseMenubar>, "className"> & {
376
+ className?: string;
377
+ };
386
378
  type State = BaseMenubar.State;
387
379
  }
388
380
  declare namespace MenubarTrigger {
389
- type Props = MenubarTriggerProps;
381
+ type Props = Omit<React.ComponentPropsWithRef<typeof BaseMenu.Trigger>, "className"> & {
382
+ /**
383
+ * Applies additional CSS classes to the component root element.
384
+ * @default undefined
385
+ */
386
+ className?: string;
387
+ };
390
388
  type State = BaseMenu.Trigger.State;
391
389
  }
392
390
  declare namespace MenubarSubTrigger {
@@ -1 +1 @@
1
- {"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/menubar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,IAAI,IAAI,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AAEpD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,KAAK,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,WAAW,CAAC,EAAE,WAAW,CAAC,GAAG;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC;AAC9G,UAAU,mBAAoB,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC;IAC3G;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD,UAAU,sBAAuB,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,QAAQ,CAAC,cAAc,CAAC,EAAE,WAAW,CAAC;IACrH;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AACD,UAAU,mBAAoB,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,QAAQ,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC;IAC9G;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD,UAAU,gBAAiB,SAAQ,IAAI,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