@burtson-labs/ui 0.13.1 → 0.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (460) hide show
  1. package/LICENSES/DEPENDENCIES.txt +2745 -0
  2. package/LICENSES/Radix-MIT.txt +21 -0
  3. package/LICENSES/cmdk-MIT.txt +21 -0
  4. package/LICENSES/overrides/react-remove-scroll-bar.txt +26 -0
  5. package/LICENSES/shadcn-MIT.txt +21 -0
  6. package/README.md +20 -12
  7. package/THIRD_PARTY_NOTICES.md +15 -3
  8. package/dist/components/accordion.d.ts +4 -4
  9. package/dist/components/accordion.js +22 -18
  10. package/dist/components/accordion.js.map +1 -1
  11. package/dist/components/alert-dialog.d.ts +13 -11
  12. package/dist/components/alert-dialog.js +41 -31
  13. package/dist/components/alert-dialog.js.map +1 -1
  14. package/dist/components/alert.d.ts +5 -3
  15. package/dist/components/alert.js +12 -7
  16. package/dist/components/alert.js.map +1 -1
  17. package/dist/components/app-shell.d.ts +7 -6
  18. package/dist/components/app-shell.js +22 -14
  19. package/dist/components/app-shell.js.map +1 -1
  20. package/dist/components/attachment.d.ts +3 -3
  21. package/dist/components/attachment.js +11 -7
  22. package/dist/components/attachment.js.map +1 -1
  23. package/dist/components/audio-player.d.ts +2 -2
  24. package/dist/components/audio-player.js +9 -6
  25. package/dist/components/audio-player.js.map +1 -1
  26. package/dist/components/avatar.d.ts +4 -4
  27. package/dist/components/avatar.js +16 -12
  28. package/dist/components/avatar.js.map +1 -1
  29. package/dist/components/badge.d.ts +1 -1
  30. package/dist/components/badge.js +15 -13
  31. package/dist/components/badge.js.map +1 -1
  32. package/dist/components/breadcrumb.d.ts +8 -8
  33. package/dist/components/breadcrumb.js +27 -20
  34. package/dist/components/breadcrumb.js.map +1 -1
  35. package/dist/components/button.d.ts +9 -2
  36. package/dist/components/button.js +15 -6
  37. package/dist/components/button.js.map +1 -1
  38. package/dist/components/card.d.ts +9 -9
  39. package/dist/components/card.js +33 -23
  40. package/dist/components/card.js.map +1 -1
  41. package/dist/components/chat-history.d.ts +1 -1
  42. package/dist/components/chat-history.js +11 -9
  43. package/dist/components/chat-history.js.map +1 -1
  44. package/dist/components/chat-layout.d.ts +1 -1
  45. package/dist/components/chat-layout.js +8 -3
  46. package/dist/components/chat-layout.js.map +1 -1
  47. package/dist/components/checkbox-card.d.ts +3 -3
  48. package/dist/components/checkbox-card.js +12 -10
  49. package/dist/components/checkbox-card.js.map +1 -1
  50. package/dist/components/checkbox.d.ts +24 -3
  51. package/dist/components/checkbox.js +52 -9
  52. package/dist/components/checkbox.js.map +1 -1
  53. package/dist/components/collapsible.d.ts +3 -3
  54. package/dist/components/collapsible.js +14 -11
  55. package/dist/components/collapsible.js.map +1 -1
  56. package/dist/components/combobox.d.ts +14 -4
  57. package/dist/components/combobox.js +19 -8
  58. package/dist/components/combobox.js.map +1 -1
  59. package/dist/components/command.d.ts +68 -12
  60. package/dist/components/command.js +48 -34
  61. package/dist/components/command.js.map +1 -1
  62. package/dist/components/composer.d.ts +2 -2
  63. package/dist/components/composer.js +10 -7
  64. package/dist/components/composer.js.map +1 -1
  65. package/dist/components/connection-status.d.ts +3 -3
  66. package/dist/components/connection-status.js +19 -14
  67. package/dist/components/connection-status.js.map +1 -1
  68. package/dist/components/context-menu.d.ts +15 -14
  69. package/dist/components/context-menu.js +52 -41
  70. package/dist/components/context-menu.js.map +1 -1
  71. package/dist/components/conversation.d.ts +1 -1
  72. package/dist/components/conversation.js +7 -5
  73. package/dist/components/conversation.js.map +1 -1
  74. package/dist/components/copy-button.d.ts +1 -1
  75. package/dist/components/copy-button.js +4 -2
  76. package/dist/components/copy-button.js.map +1 -1
  77. package/dist/components/data-table.d.ts +7 -2
  78. package/dist/components/data-table.js +17 -42
  79. package/dist/components/data-table.js.map +1 -1
  80. package/dist/components/dialog.d.ts +19 -10
  81. package/dist/components/dialog.js +50 -33
  82. package/dist/components/dialog.js.map +1 -1
  83. package/dist/components/dropdown-menu.d.ts +15 -14
  84. package/dist/components/dropdown-menu.js +52 -41
  85. package/dist/components/dropdown-menu.js.map +1 -1
  86. package/dist/components/editor-tabs.d.ts +1 -1
  87. package/dist/components/editor-tabs.js +7 -5
  88. package/dist/components/editor-tabs.js.map +1 -1
  89. package/dist/components/empty-state.d.ts +5 -5
  90. package/dist/components/empty-state.js +17 -11
  91. package/dist/components/empty-state.js.map +1 -1
  92. package/dist/components/error-summary.d.ts +21 -0
  93. package/dist/components/error-summary.js +62 -0
  94. package/dist/components/error-summary.js.map +1 -0
  95. package/dist/components/field.d.ts +66 -7
  96. package/dist/components/field.js +152 -20
  97. package/dist/components/field.js.map +1 -1
  98. package/dist/components/form-actions.d.ts +18 -0
  99. package/dist/components/form-actions.js +30 -0
  100. package/dist/components/form-actions.js.map +1 -0
  101. package/dist/components/icon-button.d.ts +3 -1
  102. package/dist/components/icon-button.js +6 -3
  103. package/dist/components/icon-button.js.map +1 -1
  104. package/dist/components/input.d.ts +42 -7
  105. package/dist/components/input.js +54 -10
  106. package/dist/components/input.js.map +1 -1
  107. package/dist/components/kbd.d.ts +2 -2
  108. package/dist/components/kbd.js +8 -5
  109. package/dist/components/kbd.js.map +1 -1
  110. package/dist/components/label.d.ts +7 -2
  111. package/dist/components/label.js +14 -7
  112. package/dist/components/label.js.map +1 -1
  113. package/dist/components/markdown.d.ts +4 -3
  114. package/dist/components/markdown.js +8 -6
  115. package/dist/components/markdown.js.map +1 -1
  116. package/dist/components/menubar.d.ts +17 -15
  117. package/dist/components/menubar.js +58 -45
  118. package/dist/components/menubar.js.map +1 -1
  119. package/dist/components/message-actions.d.ts +3 -3
  120. package/dist/components/message-actions.js +16 -12
  121. package/dist/components/message-actions.js.map +1 -1
  122. package/dist/components/message.d.ts +1 -1
  123. package/dist/components/message.js +6 -3
  124. package/dist/components/message.js.map +1 -1
  125. package/dist/components/mobile-nav.d.ts +1 -1
  126. package/dist/components/mobile-nav.js +7 -5
  127. package/dist/components/mobile-nav.js.map +1 -1
  128. package/dist/components/native-select.d.ts +16 -0
  129. package/dist/components/native-select.js +33 -0
  130. package/dist/components/native-select.js.map +1 -0
  131. package/dist/components/navigation-menu.d.ts +13 -12
  132. package/dist/components/navigation-menu.js +43 -33
  133. package/dist/components/navigation-menu.js.map +1 -1
  134. package/dist/components/number-input.d.ts +23 -0
  135. package/dist/components/number-input.js +45 -0
  136. package/dist/components/number-input.js.map +1 -0
  137. package/dist/components/onboarding-checklist.d.ts +1 -1
  138. package/dist/components/onboarding-checklist.js +5 -3
  139. package/dist/components/onboarding-checklist.js.map +1 -1
  140. package/dist/components/page-header.d.ts +7 -6
  141. package/dist/components/page-header.js +23 -15
  142. package/dist/components/page-header.js.map +1 -1
  143. package/dist/components/pagination.d.ts +1 -1
  144. package/dist/components/pagination.js +4 -2
  145. package/dist/components/pagination.js.map +1 -1
  146. package/dist/components/popover.d.ts +14 -11
  147. package/dist/components/popover.js +30 -23
  148. package/dist/components/popover.js.map +1 -1
  149. package/dist/components/progress.d.ts +2 -2
  150. package/dist/components/progress.js +11 -9
  151. package/dist/components/progress.js.map +1 -1
  152. package/dist/components/radio-group.d.ts +23 -4
  153. package/dist/components/radio-group.js +56 -14
  154. package/dist/components/radio-group.js.map +1 -1
  155. package/dist/components/reasoning.d.ts +3 -3
  156. package/dist/components/reasoning.js +14 -11
  157. package/dist/components/reasoning.js.map +1 -1
  158. package/dist/components/resizable.js +1 -0
  159. package/dist/components/resizable.js.map +1 -1
  160. package/dist/components/scroll-area.d.ts +4 -3
  161. package/dist/components/scroll-area.js +18 -14
  162. package/dist/components/scroll-area.js.map +1 -1
  163. package/dist/components/secret-input.d.ts +3 -2
  164. package/dist/components/secret-input.js +7 -4
  165. package/dist/components/secret-input.js.map +1 -1
  166. package/dist/components/select.d.ts +12 -7
  167. package/dist/components/select.js +42 -35
  168. package/dist/components/select.js.map +1 -1
  169. package/dist/components/separator.d.ts +2 -2
  170. package/dist/components/separator.js +8 -6
  171. package/dist/components/separator.js.map +1 -1
  172. package/dist/components/sheet.d.ts +11 -9
  173. package/dist/components/sheet.js +41 -29
  174. package/dist/components/sheet.js.map +1 -1
  175. package/dist/components/skeleton.d.ts +2 -1
  176. package/dist/components/skeleton.js +7 -4
  177. package/dist/components/skeleton.js.map +1 -1
  178. package/dist/components/slider.d.ts +10 -6
  179. package/dist/components/slider.js +16 -7
  180. package/dist/components/slider.js.map +1 -1
  181. package/dist/components/source.d.ts +2 -2
  182. package/dist/components/source.js +10 -7
  183. package/dist/components/source.js.map +1 -1
  184. package/dist/components/spinner.d.ts +4 -2
  185. package/dist/components/spinner.js +5 -3
  186. package/dist/components/spinner.js.map +1 -1
  187. package/dist/components/stat-card.d.ts +27 -2
  188. package/dist/components/stat-card.js +70 -9
  189. package/dist/components/stat-card.js.map +1 -1
  190. package/dist/components/status.d.ts +7 -6
  191. package/dist/components/status.js +12 -5
  192. package/dist/components/status.js.map +1 -1
  193. package/dist/components/steps.d.ts +1 -1
  194. package/dist/components/steps.js +5 -3
  195. package/dist/components/steps.js.map +1 -1
  196. package/dist/components/switch.d.ts +47 -3
  197. package/dist/components/switch.js +89 -11
  198. package/dist/components/switch.js.map +1 -1
  199. package/dist/components/table.d.ts +29 -12
  200. package/dist/components/table.js +80 -34
  201. package/dist/components/table.js.map +1 -1
  202. package/dist/components/tabs.d.ts +10 -5
  203. package/dist/components/tabs.js +29 -19
  204. package/dist/components/tabs.js.map +1 -1
  205. package/dist/components/textarea.d.ts +6 -1
  206. package/dist/components/textarea.js +4 -3
  207. package/dist/components/textarea.js.map +1 -1
  208. package/dist/components/toast.d.ts +11 -7
  209. package/dist/components/toast.js +37 -27
  210. package/dist/components/toast.js.map +1 -1
  211. package/dist/components/toaster.d.ts +4 -2
  212. package/dist/components/toaster.js +7 -2
  213. package/dist/components/toaster.js.map +1 -1
  214. package/dist/components/tool-call.d.ts +2 -2
  215. package/dist/components/tool-call.js +15 -12
  216. package/dist/components/tool-call.js.map +1 -1
  217. package/dist/components/toolbar.d.ts +9 -4
  218. package/dist/components/toolbar.js +15 -9
  219. package/dist/components/toolbar.js.map +1 -1
  220. package/dist/components/tooltip.d.ts +4 -3
  221. package/dist/components/tooltip.js +17 -13
  222. package/dist/components/tooltip.js.map +1 -1
  223. package/dist/components/tour.js +10 -8
  224. package/dist/components/tour.js.map +1 -1
  225. package/dist/components/tree-view.d.ts +1 -1
  226. package/dist/components/tree-view.js +10 -5
  227. package/dist/components/tree-view.js.map +1 -1
  228. package/dist/components/voice-recorder.d.ts +1 -1
  229. package/dist/components/voice-recorder.js +5 -2
  230. package/dist/components/voice-recorder.js.map +1 -1
  231. package/dist/index.d.ts +6 -1
  232. package/dist/index.js +17 -12
  233. package/dist/lib/media.d.ts +18 -0
  234. package/dist/lib/media.js +34 -0
  235. package/dist/lib/media.js.map +1 -0
  236. package/dist/lib/utils.d.ts +32 -0
  237. package/dist/lib/utils.js +33 -1
  238. package/dist/lib/utils.js.map +1 -1
  239. package/dist/mui/index.js +20 -8
  240. package/dist/mui/index.js.map +1 -1
  241. package/dist/primitives/vendor/cmdk/command-score.d.ts +1 -0
  242. package/dist/primitives/vendor/cmdk/command-score.js +64 -0
  243. package/dist/primitives/vendor/cmdk/command-score.js.map +1 -0
  244. package/dist/primitives/vendor/cmdk/index.d.ts +384 -0
  245. package/dist/primitives/vendor/cmdk/index.js +687 -0
  246. package/dist/primitives/vendor/cmdk/index.js.map +1 -0
  247. package/dist/primitives/vendor/radix/number/index.d.ts +1 -0
  248. package/dist/primitives/vendor/radix/number/number.d.ts +2 -0
  249. package/dist/primitives/vendor/radix/number/number.js +9 -0
  250. package/dist/primitives/vendor/radix/number/number.js.map +1 -0
  251. package/dist/primitives/vendor/radix/primitive/index.d.ts +2 -0
  252. package/dist/primitives/vendor/radix/primitive/is-development.d.ts +1 -0
  253. package/dist/primitives/vendor/radix/primitive/is-development.js +7 -0
  254. package/dist/primitives/vendor/radix/primitive/is-development.js.map +1 -0
  255. package/dist/primitives/vendor/radix/primitive/primitive.d.ts +14 -0
  256. package/dist/primitives/vendor/radix/primitive/primitive.js +12 -0
  257. package/dist/primitives/vendor/radix/primitive/primitive.js.map +1 -0
  258. package/dist/primitives/vendor/radix/primitive/types.d.ts +5 -0
  259. package/dist/primitives/vendor/radix/react-accordion/accordion.d.ts +112 -0
  260. package/dist/primitives/vendor/radix/react-accordion/accordion.js +266 -0
  261. package/dist/primitives/vendor/radix/react-accordion/accordion.js.map +1 -0
  262. package/dist/primitives/vendor/radix/react-accordion/index.d.ts +2 -0
  263. package/dist/primitives/vendor/radix/react-alert-dialog/alert-dialog.d.ts +49 -0
  264. package/dist/primitives/vendor/radix/react-alert-dialog/alert-dialog.js +122 -0
  265. package/dist/primitives/vendor/radix/react-alert-dialog/alert-dialog.js.map +1 -0
  266. package/dist/primitives/vendor/radix/react-alert-dialog/index.d.ts +2 -0
  267. package/dist/primitives/vendor/radix/react-arrow/arrow.d.ts +9 -0
  268. package/dist/primitives/vendor/radix/react-arrow/arrow.js +22 -0
  269. package/dist/primitives/vendor/radix/react-arrow/arrow.js.map +1 -0
  270. package/dist/primitives/vendor/radix/react-arrow/index.d.ts +2 -0
  271. package/dist/primitives/vendor/radix/react-avatar/avatar.d.ts +19 -0
  272. package/dist/primitives/vendor/radix/react-avatar/avatar.js +132 -0
  273. package/dist/primitives/vendor/radix/react-avatar/avatar.js.map +1 -0
  274. package/dist/primitives/vendor/radix/react-avatar/index.d.ts +2 -0
  275. package/dist/primitives/vendor/radix/react-checkbox/checkbox.d.ts +47 -0
  276. package/dist/primitives/vendor/radix/react-checkbox/checkbox.js +197 -0
  277. package/dist/primitives/vendor/radix/react-checkbox/checkbox.js.map +1 -0
  278. package/dist/primitives/vendor/radix/react-checkbox/index.d.ts +2 -0
  279. package/dist/primitives/vendor/radix/react-collapsible/collapsible.d.ts +31 -0
  280. package/dist/primitives/vendor/radix/react-collapsible/collapsible.js +133 -0
  281. package/dist/primitives/vendor/radix/react-collapsible/collapsible.js.map +1 -0
  282. package/dist/primitives/vendor/radix/react-collapsible/index.d.ts +2 -0
  283. package/dist/primitives/vendor/radix/react-collection/collection-legacy.d.ts +21 -0
  284. package/dist/primitives/vendor/radix/react-collection/collection-legacy.js +84 -0
  285. package/dist/primitives/vendor/radix/react-collection/collection-legacy.js.map +1 -0
  286. package/dist/primitives/vendor/radix/react-collection/collection.d.ts +32 -0
  287. package/dist/primitives/vendor/radix/react-collection/index.d.ts +4 -0
  288. package/dist/primitives/vendor/radix/react-collection/ordered-dictionary.d.ts +51 -0
  289. package/dist/primitives/vendor/radix/react-compose-refs/compose-refs.d.ts +13 -0
  290. package/dist/primitives/vendor/radix/react-compose-refs/compose-refs.js +43 -0
  291. package/dist/primitives/vendor/radix/react-compose-refs/compose-refs.js.map +1 -0
  292. package/dist/primitives/vendor/radix/react-compose-refs/index.d.ts +1 -0
  293. package/dist/primitives/vendor/radix/react-context/create-context.d.ts +45 -0
  294. package/dist/primitives/vendor/radix/react-context/create-context.js +74 -0
  295. package/dist/primitives/vendor/radix/react-context/create-context.js.map +1 -0
  296. package/dist/primitives/vendor/radix/react-context/index.d.ts +2 -0
  297. package/dist/primitives/vendor/radix/react-context-menu/context-menu.d.ts +95 -0
  298. package/dist/primitives/vendor/radix/react-context-menu/context-menu.js +279 -0
  299. package/dist/primitives/vendor/radix/react-context-menu/context-menu.js.map +1 -0
  300. package/dist/primitives/vendor/radix/react-context-menu/index.d.ts +2 -0
  301. package/dist/primitives/vendor/radix/react-dialog/dialog.d.ts +97 -0
  302. package/dist/primitives/vendor/radix/react-dialog/dialog.js +262 -0
  303. package/dist/primitives/vendor/radix/react-dialog/dialog.js.map +1 -0
  304. package/dist/primitives/vendor/radix/react-dialog/index.d.ts +4 -0
  305. package/dist/primitives/vendor/radix/react-direction/direction.d.ts +10 -0
  306. package/dist/primitives/vendor/radix/react-direction/direction.js +13 -0
  307. package/dist/primitives/vendor/radix/react-direction/direction.js.map +1 -0
  308. package/dist/primitives/vendor/radix/react-direction/index.d.ts +1 -0
  309. package/dist/primitives/vendor/radix/react-dismissable-layer/dismissable-layer.d.ts +61 -0
  310. package/dist/primitives/vendor/radix/react-dismissable-layer/dismissable-layer.js +336 -0
  311. package/dist/primitives/vendor/radix/react-dismissable-layer/dismissable-layer.js.map +1 -0
  312. package/dist/primitives/vendor/radix/react-dismissable-layer/index.d.ts +4 -0
  313. package/dist/primitives/vendor/radix/react-dropdown-menu/dropdown-menu.d.ts +95 -0
  314. package/dist/primitives/vendor/radix/react-dropdown-menu/dropdown-menu.js +257 -0
  315. package/dist/primitives/vendor/radix/react-dropdown-menu/dropdown-menu.js.map +1 -0
  316. package/dist/primitives/vendor/radix/react-dropdown-menu/index.d.ts +2 -0
  317. package/dist/primitives/vendor/radix/react-focus-guards/focus-guards.d.ts +11 -0
  318. package/dist/primitives/vendor/radix/react-focus-guards/focus-guards.js +49 -0
  319. package/dist/primitives/vendor/radix/react-focus-guards/focus-guards.js.map +1 -0
  320. package/dist/primitives/vendor/radix/react-focus-guards/index.d.ts +1 -0
  321. package/dist/primitives/vendor/radix/react-focus-scope/focus-scope.d.ts +31 -0
  322. package/dist/primitives/vendor/radix/react-focus-scope/focus-scope.js +221 -0
  323. package/dist/primitives/vendor/radix/react-focus-scope/focus-scope.js.map +1 -0
  324. package/dist/primitives/vendor/radix/react-focus-scope/index.d.ts +1 -0
  325. package/dist/primitives/vendor/radix/react-id/id.d.ts +2 -0
  326. package/dist/primitives/vendor/radix/react-id/id.js +17 -0
  327. package/dist/primitives/vendor/radix/react-id/id.js.map +1 -0
  328. package/dist/primitives/vendor/radix/react-id/index.d.ts +1 -0
  329. package/dist/primitives/vendor/radix/react-label/index.d.ts +2 -0
  330. package/dist/primitives/vendor/radix/react-label/label.d.ts +9 -0
  331. package/dist/primitives/vendor/radix/react-label/label.js +21 -0
  332. package/dist/primitives/vendor/radix/react-label/label.js.map +1 -0
  333. package/dist/primitives/vendor/radix/react-menu/index.d.ts +2 -0
  334. package/dist/primitives/vendor/radix/react-menu/menu.d.ts +173 -0
  335. package/dist/primitives/vendor/radix/react-menu/menu.js +806 -0
  336. package/dist/primitives/vendor/radix/react-menu/menu.js.map +1 -0
  337. package/dist/primitives/vendor/radix/react-menubar/index.d.ts +2 -0
  338. package/dist/primitives/vendor/radix/react-menubar/menubar.d.ts +106 -0
  339. package/dist/primitives/vendor/radix/react-menubar/menubar.js +377 -0
  340. package/dist/primitives/vendor/radix/react-menubar/menubar.js.map +1 -0
  341. package/dist/primitives/vendor/radix/react-navigation-menu/index.d.ts +2 -0
  342. package/dist/primitives/vendor/radix/react-navigation-menu/navigation-menu.d.ts +124 -0
  343. package/dist/primitives/vendor/radix/react-navigation-menu/navigation-menu.js +743 -0
  344. package/dist/primitives/vendor/radix/react-navigation-menu/navigation-menu.js.map +1 -0
  345. package/dist/primitives/vendor/radix/react-popover/index.d.ts +1 -0
  346. package/dist/primitives/vendor/radix/react-popover/popover.d.ts +83 -0
  347. package/dist/primitives/vendor/radix/react-popover/popover.js +236 -0
  348. package/dist/primitives/vendor/radix/react-popover/popover.js.map +1 -0
  349. package/dist/primitives/vendor/radix/react-popper/index.d.ts +2 -0
  350. package/dist/primitives/vendor/radix/react-popper/popper.d.ts +44 -0
  351. package/dist/primitives/vendor/radix/react-popper/popper.js +276 -0
  352. package/dist/primitives/vendor/radix/react-popper/popper.js.map +1 -0
  353. package/dist/primitives/vendor/radix/react-portal/index.d.ts +2 -0
  354. package/dist/primitives/vendor/radix/react-portal/portal.d.ts +13 -0
  355. package/dist/primitives/vendor/radix/react-portal/portal.js +21 -0
  356. package/dist/primitives/vendor/radix/react-portal/portal.js.map +1 -0
  357. package/dist/primitives/vendor/radix/react-presence/index.d.ts +2 -0
  358. package/dist/primitives/vendor/radix/react-presence/presence.d.ts +11 -0
  359. package/dist/primitives/vendor/radix/react-presence/presence.js +152 -0
  360. package/dist/primitives/vendor/radix/react-presence/presence.js.map +1 -0
  361. package/dist/primitives/vendor/radix/react-presence/use-state-machine.d.ts +10 -0
  362. package/dist/primitives/vendor/radix/react-presence/use-state-machine.js +12 -0
  363. package/dist/primitives/vendor/radix/react-presence/use-state-machine.js.map +1 -0
  364. package/dist/primitives/vendor/radix/react-primitive/index.d.ts +2 -0
  365. package/dist/primitives/vendor/radix/react-primitive/primitive.d.ts +56 -0
  366. package/dist/primitives/vendor/radix/react-primitive/primitive.js +84 -0
  367. package/dist/primitives/vendor/radix/react-primitive/primitive.js.map +1 -0
  368. package/dist/primitives/vendor/radix/react-progress/index.d.ts +2 -0
  369. package/dist/primitives/vendor/radix/react-progress/progress.d.ts +17 -0
  370. package/dist/primitives/vendor/radix/react-progress/progress.js +79 -0
  371. package/dist/primitives/vendor/radix/react-progress/progress.js.map +1 -0
  372. package/dist/primitives/vendor/radix/react-radio-group/index.d.ts +2 -0
  373. package/dist/primitives/vendor/radix/react-radio-group/radio-group.d.ts +55 -0
  374. package/dist/primitives/vendor/radix/react-radio-group/radio-group.js +173 -0
  375. package/dist/primitives/vendor/radix/react-radio-group/radio-group.js.map +1 -0
  376. package/dist/primitives/vendor/radix/react-radio-group/radio.d.ts +62 -0
  377. package/dist/primitives/vendor/radix/react-radio-group/radio.js +150 -0
  378. package/dist/primitives/vendor/radix/react-radio-group/radio.js.map +1 -0
  379. package/dist/primitives/vendor/radix/react-roving-focus/index.d.ts +2 -0
  380. package/dist/primitives/vendor/radix/react-roving-focus/roving-focus-group.d.ts +47 -0
  381. package/dist/primitives/vendor/radix/react-roving-focus/roving-focus-group.js +218 -0
  382. package/dist/primitives/vendor/radix/react-roving-focus/roving-focus-group.js.map +1 -0
  383. package/dist/primitives/vendor/radix/react-scroll-area/index.d.ts +2 -0
  384. package/dist/primitives/vendor/radix/react-scroll-area/scroll-area.d.ts +121 -0
  385. package/dist/primitives/vendor/radix/react-scroll-area/scroll-area.js +713 -0
  386. package/dist/primitives/vendor/radix/react-scroll-area/scroll-area.js.map +1 -0
  387. package/dist/primitives/vendor/radix/react-scroll-area/use-state-machine.d.ts +10 -0
  388. package/dist/primitives/vendor/radix/react-scroll-area/use-state-machine.js +12 -0
  389. package/dist/primitives/vendor/radix/react-scroll-area/use-state-machine.js.map +1 -0
  390. package/dist/primitives/vendor/radix/react-select/index.d.ts +2 -0
  391. package/dist/primitives/vendor/radix/react-select/select.d.ts +163 -0
  392. package/dist/primitives/vendor/radix/react-select/select.js +1040 -0
  393. package/dist/primitives/vendor/radix/react-select/select.js.map +1 -0
  394. package/dist/primitives/vendor/radix/react-separator/index.d.ts +2 -0
  395. package/dist/primitives/vendor/radix/react-separator/separator.d.ts +20 -0
  396. package/dist/primitives/vendor/radix/react-separator/separator.js +29 -0
  397. package/dist/primitives/vendor/radix/react-separator/separator.js.map +1 -0
  398. package/dist/primitives/vendor/radix/react-slot/index.d.ts +1 -0
  399. package/dist/primitives/vendor/radix/react-slot/slot.d.ts +29 -0
  400. package/dist/primitives/vendor/radix/react-slot/slot.js +107 -0
  401. package/dist/primitives/vendor/radix/react-slot/slot.js.map +1 -0
  402. package/dist/primitives/vendor/radix/react-switch/index.d.ts +2 -0
  403. package/dist/primitives/vendor/radix/react-switch/switch.d.ts +41 -0
  404. package/dist/primitives/vendor/radix/react-switch/switch.js +185 -0
  405. package/dist/primitives/vendor/radix/react-switch/switch.js.map +1 -0
  406. package/dist/primitives/vendor/radix/react-tabs/index.d.ts +2 -0
  407. package/dist/primitives/vendor/radix/react-tabs/tabs.d.ts +54 -0
  408. package/dist/primitives/vendor/radix/react-tabs/tabs.js +145 -0
  409. package/dist/primitives/vendor/radix/react-tabs/tabs.js.map +1 -0
  410. package/dist/primitives/vendor/radix/react-toast/index.d.ts +2 -0
  411. package/dist/primitives/vendor/radix/react-toast/toast.d.ts +125 -0
  412. package/dist/primitives/vendor/radix/react-toast/toast.js +557 -0
  413. package/dist/primitives/vendor/radix/react-toast/toast.js.map +1 -0
  414. package/dist/primitives/vendor/radix/react-tooltip/index.d.ts +2 -0
  415. package/dist/primitives/vendor/radix/react-tooltip/tooltip.d.ts +99 -0
  416. package/dist/primitives/vendor/radix/react-tooltip/tooltip.js +503 -0
  417. package/dist/primitives/vendor/radix/react-tooltip/tooltip.js.map +1 -0
  418. package/dist/primitives/vendor/radix/react-use-callback-ref/index.d.ts +1 -0
  419. package/dist/primitives/vendor/radix/react-use-callback-ref/use-callback-ref.d.ts +6 -0
  420. package/dist/primitives/vendor/radix/react-use-callback-ref/use-callback-ref.js +18 -0
  421. package/dist/primitives/vendor/radix/react-use-callback-ref/use-callback-ref.js.map +1 -0
  422. package/dist/primitives/vendor/radix/react-use-controllable-state/index.d.ts +2 -0
  423. package/dist/primitives/vendor/radix/react-use-controllable-state/use-controllable-state-reducer.d.ts +28 -0
  424. package/dist/primitives/vendor/radix/react-use-controllable-state/use-controllable-state.d.ts +11 -0
  425. package/dist/primitives/vendor/radix/react-use-controllable-state/use-controllable-state.js +59 -0
  426. package/dist/primitives/vendor/radix/react-use-controllable-state/use-controllable-state.js.map +1 -0
  427. package/dist/primitives/vendor/radix/react-use-effect-event/index.d.ts +1 -0
  428. package/dist/primitives/vendor/radix/react-use-effect-event/use-effect-event.d.ts +7 -0
  429. package/dist/primitives/vendor/radix/react-use-is-hydrated/index.d.ts +1 -0
  430. package/dist/primitives/vendor/radix/react-use-is-hydrated/use-is-hydrated-legacy.d.ts +1 -0
  431. package/dist/primitives/vendor/radix/react-use-is-hydrated/use-is-hydrated-legacy.js +18 -0
  432. package/dist/primitives/vendor/radix/react-use-is-hydrated/use-is-hydrated-legacy.js.map +1 -0
  433. package/dist/primitives/vendor/radix/react-use-is-hydrated/use-is-hydrated.d.ts +6 -0
  434. package/dist/primitives/vendor/radix/react-use-is-hydrated/use-is-hydrated.js +19 -0
  435. package/dist/primitives/vendor/radix/react-use-is-hydrated/use-is-hydrated.js.map +1 -0
  436. package/dist/primitives/vendor/radix/react-use-layout-effect/index.d.ts +1 -0
  437. package/dist/primitives/vendor/radix/react-use-layout-effect/use-layout-effect.d.ts +10 -0
  438. package/dist/primitives/vendor/radix/react-use-layout-effect/use-layout-effect.js +15 -0
  439. package/dist/primitives/vendor/radix/react-use-layout-effect/use-layout-effect.js.map +1 -0
  440. package/dist/primitives/vendor/radix/react-use-previous/index.d.ts +1 -0
  441. package/dist/primitives/vendor/radix/react-use-previous/use-previous.d.ts +2 -0
  442. package/dist/primitives/vendor/radix/react-use-previous/use-previous.js +20 -0
  443. package/dist/primitives/vendor/radix/react-use-previous/use-previous.js.map +1 -0
  444. package/dist/primitives/vendor/radix/react-use-size/index.d.ts +1 -0
  445. package/dist/primitives/vendor/radix/react-use-size/use-size.d.ts +5 -0
  446. package/dist/primitives/vendor/radix/react-use-size/use-size.js +42 -0
  447. package/dist/primitives/vendor/radix/react-use-size/use-size.js.map +1 -0
  448. package/dist/primitives/vendor/radix/react-visually-hidden/index.d.ts +2 -0
  449. package/dist/primitives/vendor/radix/react-visually-hidden/visually-hidden.d.ts +21 -0
  450. package/dist/primitives/vendor/radix/react-visually-hidden/visually-hidden.js +32 -0
  451. package/dist/primitives/vendor/radix/react-visually-hidden/visually-hidden.js.map +1 -0
  452. package/dist/primitives/vendor/radix/rect/index.d.ts +2 -0
  453. package/dist/primitives/vendor/radix/rect/observe-element-rect.d.ts +16 -0
  454. package/dist/styles.css +1 -1
  455. package/dist/theme.css +36 -17
  456. package/dist/tokens.d.ts +78 -36
  457. package/dist/tokens.js +63 -32
  458. package/dist/tokens.js.map +1 -1
  459. package/package.json +25 -13
  460. package/vendor-manifest.json +1101 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu.js","names":["PopperPrimitive.Root","PopperPrimitive.Anchor","PortalPrimitive","RovingFocusGroup.Root","PopperPrimitive.Content","RovingFocusGroup.Item"],"sources":["../../../../../src/primitives/vendor/radix/react-menu/menu.tsx"],"sourcesContent":["// Vendored from Radix Primitives (c) 2022 WorkOS, MIT. See vendor/LICENSE.radix.\n// Local modification: package imports resolve to the pinned local source.\nimport * as React from 'react';\nimport { composeEventHandlers } from '../primitive';\nimport { createCollection } from '../react-collection';\nimport { useComposedRefs } from '../react-compose-refs';\nimport { createContextScope } from '../react-context';\nimport { useDirection } from '../react-direction';\nimport { DismissableLayer } from '../react-dismissable-layer';\nimport { useFocusGuards } from '../react-focus-guards';\nimport { FocusScope } from '../react-focus-scope';\nimport { useId } from '../react-id';\nimport * as PopperPrimitive from '../react-popper';\nimport { createPopperScope } from '../react-popper';\nimport { Portal as PortalPrimitive } from '../react-portal';\nimport { Presence } from '../react-presence';\nimport { Primitive, dispatchDiscreteCustomEvent } from '../react-primitive';\nimport * as RovingFocusGroup from '../react-roving-focus';\nimport { createRovingFocusGroupScope } from '../react-roving-focus';\nimport { createSlot } from '../react-slot';\nimport { useCallbackRef } from '../react-use-callback-ref';\nimport { hideOthers } from 'aria-hidden';\nimport { RemoveScroll } from 'react-remove-scroll';\n\nimport type { Scope } from '../react-context';\n\ntype Direction = 'ltr' | 'rtl';\n\nconst SELECTION_KEYS = ['Enter', ' '];\nconst FIRST_KEYS = ['ArrowDown', 'PageUp', 'Home'];\nconst LAST_KEYS = ['ArrowUp', 'PageDown', 'End'];\nconst FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];\nconst SUB_OPEN_KEYS: Record<Direction, string[]> = {\n ltr: [...SELECTION_KEYS, 'ArrowRight'],\n rtl: [...SELECTION_KEYS, 'ArrowLeft'],\n};\nconst SUB_CLOSE_KEYS: Record<Direction, string[]> = {\n ltr: ['ArrowLeft'],\n rtl: ['ArrowRight'],\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Menu\n * -----------------------------------------------------------------------------------------------*/\n\nconst MENU_NAME = 'Menu';\n\ntype ItemData = { disabled: boolean; textValue: string };\nconst [Collection, useCollection, createCollectionScope] = createCollection<\n MenuItemElement,\n ItemData\n>(MENU_NAME);\n\ntype ScopedProps<P> = P & { __scopeMenu?: Scope };\nconst [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [\n createCollectionScope,\n createPopperScope,\n createRovingFocusGroupScope,\n]);\nconst usePopperScope = createPopperScope();\nconst useRovingFocusGroupScope = createRovingFocusGroupScope();\n\ntype MenuContextValue = {\n open: boolean;\n onOpenChange(open: boolean): void;\n content: MenuContentElement | null;\n onContentChange(content: MenuContentElement | null): void;\n};\n\nconst [MenuProvider, useMenuContext] = createMenuContext<MenuContextValue>(MENU_NAME);\n\ntype MenuRootContextValue = {\n onClose(): void;\n isUsingKeyboardRef: React.RefObject<boolean>;\n dir: Direction;\n modal: boolean;\n};\n\nconst [MenuRootProvider, useMenuRootContext] = createMenuContext<MenuRootContextValue>(MENU_NAME);\n\ninterface MenuProps {\n children?: React.ReactNode;\n open?: boolean;\n onOpenChange?(open: boolean): void;\n dir?: Direction;\n modal?: boolean;\n}\n\nconst Menu: React.FC<MenuProps> = (props: ScopedProps<MenuProps>) => {\n const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;\n const popperScope = usePopperScope(__scopeMenu);\n const [content, setContent] = React.useState<MenuContentElement | null>(null);\n const isUsingKeyboardRef = React.useRef(false);\n const handleOpenChange = useCallbackRef(onOpenChange);\n const direction = useDirection(dir);\n\n React.useEffect(() => {\n // Capture phase ensures we set the boolean before any side effects execute\n // in response to the key or pointer event as they might depend on this value.\n const handleKeyDown = () => {\n isUsingKeyboardRef.current = true;\n document.addEventListener('pointerdown', handlePointer, { capture: true, once: true });\n document.addEventListener('pointermove', handlePointer, { capture: true, once: true });\n };\n const handlePointer = () => (isUsingKeyboardRef.current = false);\n document.addEventListener('keydown', handleKeyDown, { capture: true });\n return () => {\n document.removeEventListener('keydown', handleKeyDown, { capture: true });\n document.removeEventListener('pointerdown', handlePointer, { capture: true });\n document.removeEventListener('pointermove', handlePointer, { capture: true });\n };\n }, []);\n\n // Close the menu (and any open submenus) when the window loses focus, e.g. when\n // switching to another browser tab or application. Without this, submenus would\n // remain open when the page is re-focused, leaving the menu in an inconsistent state.\n // See: https://github.com/radix-ui/primitives/issues/3257\n React.useEffect(() => {\n if (!open) {\n return;\n }\n const handleBlur = () => handleOpenChange(false);\n window.addEventListener('blur', handleBlur);\n return () => window.removeEventListener('blur', handleBlur);\n }, [open, handleOpenChange]);\n\n return (\n <PopperPrimitive.Root {...popperScope}>\n <MenuProvider\n scope={__scopeMenu}\n open={open}\n onOpenChange={handleOpenChange}\n content={content}\n onContentChange={setContent}\n >\n <MenuRootProvider\n scope={__scopeMenu}\n onClose={React.useCallback(() => handleOpenChange(false), [handleOpenChange])}\n isUsingKeyboardRef={isUsingKeyboardRef}\n dir={direction}\n modal={modal}\n >\n {children}\n </MenuRootProvider>\n </MenuProvider>\n </PopperPrimitive.Root>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * MenuAnchor\n * -----------------------------------------------------------------------------------------------*/\n\ntype MenuAnchorElement = React.ComponentRef<typeof PopperPrimitive.Anchor>;\ntype PopperAnchorProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Anchor>;\ninterface MenuAnchorProps extends PopperAnchorProps {}\n\nconst MenuAnchor = /* @__PURE__ */ React.forwardRef<MenuAnchorElement, MenuAnchorProps>(\n function MenuAnchor(props: ScopedProps<MenuAnchorProps>, forwardedRef) {\n const { __scopeMenu, ...anchorProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return <PopperPrimitive.Anchor {...popperScope} {...anchorProps} ref={forwardedRef} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * MenuPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'MenuPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createMenuContext<PortalContextValue>(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef<typeof PortalPrimitive>;\ninterface MenuPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst MenuPortal: React.FC<MenuPortalProps> = (props: ScopedProps<MenuPortalProps>) => {\n const { __scopeMenu, forceMount, children, container } = props;\n const context = useMenuContext(PORTAL_NAME, __scopeMenu);\n return (\n <PortalProvider scope={__scopeMenu} forceMount={forceMount}>\n <Presence present={forceMount || context.open}>\n <PortalPrimitive asChild container={container}>\n {children}\n </PortalPrimitive>\n </Presence>\n </PortalProvider>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * MenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'MenuContent';\n\ntype MenuContentContextValue = {\n onItemEnter(event: React.PointerEvent): void;\n onItemLeave(event: React.PointerEvent): void;\n onTriggerLeave(event: React.PointerEvent): void;\n searchRef: React.RefObject<string>;\n pointerGraceTimerRef: React.MutableRefObject<number>;\n onPointerGraceIntentChange(intent: GraceIntent | null): void;\n};\nconst [MenuContentProvider, useMenuContentContext] =\n createMenuContext<MenuContentContextValue>(CONTENT_NAME);\n\ntype MenuContentElement = MenuRootContentTypeElement;\n/**\n * We purposefully don't union MenuRootContent and MenuSubContent props here because\n * they have conflicting prop types. We agreed that we would allow MenuSubContent to\n * accept props that it would just ignore.\n */\ninterface MenuContentProps extends MenuRootContentTypeProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst MenuContent = /* @__PURE__ */ React.forwardRef<MenuContentElement, MenuContentProps>(\n function MenuContent(props: ScopedProps<MenuContentProps>, forwardedRef) {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n\n return (\n <Collection.Provider scope={props.__scopeMenu}>\n <Presence present={forceMount || context.open}>\n <Collection.Slot scope={props.__scopeMenu}>\n {rootContext.modal ? (\n <MenuRootContentModal {...contentProps} ref={forwardedRef} />\n ) : (\n <MenuRootContentNonModal {...contentProps} ref={forwardedRef} />\n )}\n </Collection.Slot>\n </Presence>\n </Collection.Provider>\n );\n },\n);\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype MenuRootContentTypeElement = MenuContentImplElement;\ninterface MenuRootContentTypeProps extends Omit<\n MenuContentImplProps,\n keyof MenuContentImplPrivateProps\n> {}\n\nconst MenuRootContentModal = /* @__PURE__ */ React.forwardRef<\n MenuRootContentTypeElement,\n MenuRootContentTypeProps\n>(\n // blank line to reduce diff noise\n function MenuRootContentModal(props: ScopedProps<MenuRootContentTypeProps>, forwardedRef) {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef<MenuRootContentTypeElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n\n // Hide everything from ARIA except the `MenuContent`\n React.useEffect(() => {\n const content = ref.current;\n if (content) return hideOthers(content);\n }, []);\n\n return (\n <MenuContentImpl\n {...props}\n ref={composedRefs}\n // we make sure we're not trapping once it's been closed\n // (closed !== unmounted when animating out)\n trapFocus={context.open}\n // make sure to only disable pointer events when open\n // this avoids blocking interactions while animating out\n disableOutsidePointerEvents={context.open}\n disableOutsideScroll\n // When focus is trapped, a `focusout` event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false },\n )}\n onDismiss={() => context.onOpenChange(false)}\n />\n );\n },\n);\n\nconst MenuRootContentNonModal = /* @__PURE__ */ React.forwardRef<\n MenuRootContentTypeElement,\n MenuRootContentTypeProps\n>(function MenuRootContentNonModal(props: ScopedProps<MenuRootContentTypeProps>, forwardedRef) {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n return (\n <MenuContentImpl\n {...props}\n ref={forwardedRef}\n trapFocus={false}\n disableOutsidePointerEvents={false}\n disableOutsideScroll={false}\n onDismiss={() => context.onOpenChange(false)}\n />\n );\n});\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype MenuContentImplElement = React.ComponentRef<typeof PopperPrimitive.Content>;\ntype FocusScopeProps = React.ComponentPropsWithoutRef<typeof FocusScope>;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;\ntype RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;\ntype PopperContentProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;\ntype MenuContentImplPrivateProps = {\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n onDismiss?: DismissableLayerProps['onDismiss'];\n disableOutsidePointerEvents?: DismissableLayerProps['disableOutsidePointerEvents'];\n\n /**\n * Whether scrolling outside the `MenuContent` should be prevented\n * (default: `false`)\n */\n disableOutsideScroll?: boolean;\n\n /**\n * Whether focus should be trapped within the `MenuContent`\n * (default: false)\n */\n trapFocus?: FocusScopeProps['trapped'];\n};\ninterface MenuContentImplProps\n extends MenuContentImplPrivateProps, Omit<PopperContentProps, 'dir' | 'onPlaced'> {\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n\n /**\n * Whether keyboard navigation should loop around\n * @defaultValue false\n */\n loop?: RovingFocusGroupProps['loop'];\n\n onEntryFocus?: RovingFocusGroupProps['onEntryFocus'];\n onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];\n onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];\n onFocusOutside?: DismissableLayerProps['onFocusOutside'];\n onInteractOutside?: DismissableLayerProps['onInteractOutside'];\n}\n\nconst Slot = createSlot('MenuContent.ScrollLock');\n\nconst MenuContentImpl = /* @__PURE__ */ React.forwardRef<\n MenuContentImplElement,\n MenuContentImplProps\n>(\n // blank line to reduce diff noise\n function MenuContentImpl(props: ScopedProps<MenuContentImplProps>, forwardedRef) {\n const {\n __scopeMenu,\n loop = false,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEntryFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n disableOutsideScroll,\n ...contentProps\n } = props;\n const context = useMenuContext(CONTENT_NAME, __scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const getItems = useCollection(__scopeMenu);\n const [currentItemId, setCurrentItemId] = React.useState<string | null>(null);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef, context.onContentChange);\n const timerRef = React.useRef(0);\n const searchRef = React.useRef('');\n const pointerGraceTimerRef = React.useRef(0);\n const pointerGraceIntentRef = React.useRef<GraceIntent | null>(null);\n const pointerDirRef = React.useRef<Side>('right');\n const lastPointerXRef = React.useRef(0);\n\n const ScrollLockWrapper = disableOutsideScroll ? RemoveScroll : React.Fragment;\n const scrollLockWrapperProps = disableOutsideScroll\n ? { as: Slot, allowPinchZoom: true }\n : undefined;\n\n const handleTypeaheadSearch = (key: string) => {\n const search = searchRef.current + key;\n const items = getItems().filter((item) => !item.disabled);\n const currentItem = document.activeElement;\n const currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue;\n const values = items.map((item) => item.textValue);\n const nextMatch = getNextMatch(values, search, currentMatch);\n const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current;\n\n // Reset `searchRef` 1 second after it was last updated\n (function updateSearch(value: string) {\n searchRef.current = value;\n window.clearTimeout(timerRef.current);\n if (value !== '') timerRef.current = window.setTimeout(() => updateSearch(''), 1000);\n })(search);\n\n if (newItem) {\n /**\n * Imperative focus during keydown is risky so we prevent React's batching updates\n * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332\n */\n setTimeout(() => (newItem as HTMLElement).focus());\n }\n };\n\n React.useEffect(() => {\n return () => window.clearTimeout(timerRef.current);\n }, []);\n\n // Make sure the whole tree has focus guards as our `MenuContent` may be\n // the last element in the DOM (because of the `Portal`)\n useFocusGuards();\n\n const isPointerMovingToSubmenu = React.useCallback((event: React.PointerEvent) => {\n const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;\n return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);\n }, []);\n\n return (\n <MenuContentProvider\n scope={__scopeMenu}\n searchRef={searchRef}\n onItemEnter={React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu],\n )}\n onItemLeave={React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) return;\n contentRef.current?.focus();\n setCurrentItemId(null);\n },\n [isPointerMovingToSubmenu],\n )}\n onTriggerLeave={React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu],\n )}\n pointerGraceTimerRef={pointerGraceTimerRef}\n onPointerGraceIntentChange={React.useCallback((intent) => {\n pointerGraceIntentRef.current = intent;\n }, [])}\n >\n <ScrollLockWrapper {...scrollLockWrapperProps}>\n <FocusScope\n asChild\n trapped={trapFocus}\n onMountAutoFocus={composeEventHandlers(onOpenAutoFocus, (event) => {\n // when opening, explicitly focus the content area only and leave\n // `onEntryFocus` in control of focusing first item\n event.preventDefault();\n contentRef.current?.focus({ preventScroll: true });\n })}\n onUnmountAutoFocus={onCloseAutoFocus}\n >\n <DismissableLayer\n asChild\n disableOutsidePointerEvents={disableOutsidePointerEvents}\n onEscapeKeyDown={onEscapeKeyDown}\n onPointerDownOutside={onPointerDownOutside}\n onFocusOutside={onFocusOutside}\n onInteractOutside={onInteractOutside}\n onDismiss={onDismiss}\n >\n <RovingFocusGroup.Root\n asChild\n {...rovingFocusGroupScope}\n dir={rootContext.dir}\n orientation=\"vertical\"\n loop={loop}\n currentTabStopId={currentItemId}\n onCurrentTabStopIdChange={setCurrentItemId}\n onEntryFocus={composeEventHandlers(onEntryFocus, (event) => {\n // only focus first item when using keyboard\n if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();\n })}\n preventScrollOnEntryFocus\n >\n <PopperPrimitive.Content\n role=\"menu\"\n aria-orientation=\"vertical\"\n data-state={getOpenState(context.open)}\n data-radix-menu-content=\"\"\n dir={rootContext.dir}\n {...popperScope}\n {...contentProps}\n ref={composedRefs}\n style={{ outline: 'none', ...contentProps.style }}\n onKeyDown={composeEventHandlers(contentProps.onKeyDown, (event) => {\n // submenu key events bubble through portals. We only care about keys in this menu.\n const target = event.target as HTMLElement;\n const isKeyDownInside =\n target.closest('[data-radix-menu-content]') === event.currentTarget;\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n const isCharacterKey = event.key.length === 1;\n if (isKeyDownInside) {\n // menus should not be navigated using tab key so we prevent it\n if (event.key === 'Tab') event.preventDefault();\n if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);\n }\n // focus first/last item based on key pressed\n const content = contentRef.current;\n if (event.target !== content) return;\n if (!FIRST_LAST_KEYS.includes(event.key)) return;\n event.preventDefault();\n const items = getItems().filter((item) => !item.disabled);\n const candidateNodes = items.map((item) => item.ref.current!);\n if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();\n focusFirst(candidateNodes);\n })}\n onBlur={composeEventHandlers(props.onBlur, (event) => {\n // clear search buffer when leaving the menu\n if (!event.currentTarget.contains(event.target)) {\n window.clearTimeout(timerRef.current);\n searchRef.current = '';\n }\n })}\n onPointerMove={composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n const target = event.target as HTMLElement;\n const pointerXHasChanged = lastPointerXRef.current !== event.clientX;\n\n // We don't use `event.movementX` for this check because Safari will\n // always return `0` on a pointer event.\n if (event.currentTarget.contains(target) && pointerXHasChanged) {\n const newDir = event.clientX > lastPointerXRef.current ? 'right' : 'left';\n pointerDirRef.current = newDir;\n lastPointerXRef.current = event.clientX;\n }\n }),\n )}\n />\n </RovingFocusGroup.Root>\n </DismissableLayer>\n </FocusScope>\n </ScrollLockWrapper>\n </MenuContentProvider>\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * MenuGroup\n * -----------------------------------------------------------------------------------------------*/\n\ntype MenuGroupElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface MenuGroupProps extends PrimitiveDivProps {}\n\nconst MenuGroup = /* @__PURE__ */ React.forwardRef<MenuGroupElement, MenuGroupProps>(\n function MenuGroup(props: ScopedProps<MenuGroupProps>, forwardedRef) {\n const { __scopeMenu, ...groupProps } = props;\n return <Primitive.div role=\"group\" {...groupProps} ref={forwardedRef} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * MenuLabel\n * -----------------------------------------------------------------------------------------------*/\n\ntype MenuLabelElement = React.ComponentRef<typeof Primitive.div>;\ninterface MenuLabelProps extends PrimitiveDivProps {}\n\nconst MenuLabel = /* @__PURE__ */ React.forwardRef<MenuLabelElement, MenuLabelProps>(\n function MenuLabel(props: ScopedProps<MenuLabelProps>, forwardedRef) {\n const { __scopeMenu, ...labelProps } = props;\n return <Primitive.div {...labelProps} ref={forwardedRef} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * MenuItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'MenuItem';\nconst ITEM_SELECT = 'menu.itemSelect';\n\ntype MenuItemElement = MenuItemImplElement;\ninterface MenuItemProps extends Omit<MenuItemImplProps, 'onSelect'> {\n onSelect?: (event: Event) => void;\n}\n\nconst MenuItem = /* @__PURE__ */ React.forwardRef<MenuItemElement, MenuItemProps>(\n // blank line to reduce diff noise\n function MenuItem(props: ScopedProps<MenuItemProps>, forwardedRef) {\n const { disabled = false, onSelect, ...itemProps } = props;\n const ref = React.useRef<HTMLDivElement>(null);\n const rootContext = useMenuRootContext(ITEM_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(ITEM_NAME, props.__scopeMenu);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const isPointerDownRef = React.useRef(false);\n\n const handleSelect = () => {\n const menuItem = ref.current;\n if (!disabled && menuItem) {\n const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true });\n menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: true });\n dispatchDiscreteCustomEvent(menuItem, itemSelectEvent);\n if (itemSelectEvent.defaultPrevented) {\n isPointerDownRef.current = false;\n } else {\n rootContext.onClose();\n }\n }\n };\n\n return (\n <MenuItemImpl\n {...itemProps}\n ref={composedRefs}\n disabled={disabled}\n onClick={composeEventHandlers(props.onClick, handleSelect)}\n onPointerDown={(event) => {\n props.onPointerDown?.(event);\n isPointerDownRef.current = true;\n }}\n onPointerUp={composeEventHandlers(props.onPointerUp, (event) => {\n // Pointer down can move to a different menu item which should activate it on pointer up.\n // We dispatch a click for selection to allow composition with click based triggers and to\n // prevent Firefox from getting stuck in text selection mode when the menu closes.\n if (!isPointerDownRef.current) event.currentTarget?.click();\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n // Only react to keys originating from the item itself. Focusable\n // descendants (eg. an `input` inside a `Dialog` rendered within the\n // item) bubble their key events here through React's event system\n // even when portaled out of the item's DOM subtree, which would\n // otherwise let the item swallow selection keys.\n // See: https://github.com/radix-ui/primitives/issues/3232\n if (disabled || event.target !== event.currentTarget) {\n return;\n }\n\n const isTypingAhead = contentContext.searchRef.current !== '';\n if (isTypingAhead && event.key === ' ') {\n return;\n }\n\n if (SELECTION_KEYS.includes(event.key)) {\n event.currentTarget.click();\n /**\n * We prevent default browser behaviour for selection keys as they should trigger\n * a selection only:\n * - prevents space from scrolling the page.\n * - if keydown causes focus to move, prevents keydown from firing on the new target.\n */\n event.preventDefault();\n }\n })}\n />\n );\n },\n);\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype MenuItemImplElement = React.ComponentRef<typeof Primitive.div>;\ninterface MenuItemImplProps extends PrimitiveDivProps {\n disabled?: boolean;\n textValue?: string;\n}\n\nconst MenuItemImpl = /* @__PURE__ */ React.forwardRef<MenuItemImplElement, MenuItemImplProps>(\n function MenuItemImpl(props: ScopedProps<MenuItemImplProps>, forwardedRef) {\n const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;\n const contentContext = useMenuContentContext(ITEM_NAME, __scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const ref = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [isFocused, setIsFocused] = React.useState(false);\n\n // get the item's `.textContent` as default strategy for typeahead `textValue`\n const [textContent, setTextContent] = React.useState('');\n React.useEffect(() => {\n const menuItem = ref.current;\n if (menuItem) {\n setTextContent((menuItem.textContent ?? '').trim());\n }\n }, [itemProps.children]);\n\n return (\n <Collection.ItemSlot\n scope={__scopeMenu}\n disabled={disabled}\n textValue={textValue ?? textContent}\n >\n <RovingFocusGroup.Item asChild {...rovingFocusGroupScope} focusable={!disabled}>\n <Primitive.div\n role=\"menuitem\"\n data-highlighted={isFocused ? '' : undefined}\n aria-disabled={disabled || undefined}\n data-disabled={disabled ? '' : undefined}\n {...itemProps}\n ref={composedRefs}\n /**\n * We focus items on `pointerMove` to achieve the following:\n *\n * - Mouse over an item (it focuses)\n * - Leave mouse where it is and use keyboard to focus a different item\n * - Wiggle mouse without it leaving previously focused item\n * - Previously focused item should re-focus\n *\n * If we used `mouseOver`/`mouseEnter` it would not re-focus when the mouse\n * wiggles. This is to match native menu implementation.\n */\n onPointerMove={composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n if (disabled) {\n contentContext.onItemLeave(event);\n } else {\n contentContext.onItemEnter(event);\n if (!event.defaultPrevented) {\n const item = event.currentTarget;\n item.focus({ preventScroll: true });\n }\n }\n }),\n )}\n onPointerLeave={composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => contentContext.onItemLeave(event)),\n )}\n onFocus={composeEventHandlers(props.onFocus, () => setIsFocused(true))}\n onBlur={composeEventHandlers(props.onBlur, () => setIsFocused(false))}\n />\n </RovingFocusGroup.Item>\n </Collection.ItemSlot>\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * MenuCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\ntype MenuCheckboxItemElement = MenuItemElement;\n\ntype CheckedState = boolean | 'indeterminate';\n\ninterface MenuCheckboxItemProps extends MenuItemProps {\n checked?: CheckedState;\n // `onCheckedChange` can never be called with `\"indeterminate\"` from the inside\n onCheckedChange?: (checked: boolean) => void;\n}\n\nconst MenuCheckboxItem = /* @__PURE__ */ React.forwardRef<\n MenuCheckboxItemElement,\n MenuCheckboxItemProps\n>(\n // blank line to reduce diff noise\n function MenuCheckboxItem(props: ScopedProps<MenuCheckboxItemProps>, forwardedRef) {\n const { checked = false, onCheckedChange, ...checkboxItemProps } = props;\n return (\n <ItemIndicatorProvider scope={props.__scopeMenu} checked={checked}>\n <MenuItem\n role=\"menuitemcheckbox\"\n aria-checked={isIndeterminate(checked) ? 'mixed' : checked}\n {...checkboxItemProps}\n ref={forwardedRef}\n data-state={getCheckedState(checked)}\n onSelect={composeEventHandlers(\n checkboxItemProps.onSelect,\n () => onCheckedChange?.(isIndeterminate(checked) ? true : !checked),\n { checkForDefaultPrevented: false },\n )}\n />\n </ItemIndicatorProvider>\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * MenuRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'MenuRadioGroup';\n\nconst [RadioGroupProvider, useRadioGroupContext] = createMenuContext<MenuRadioGroupProps>(\n RADIO_GROUP_NAME,\n { value: undefined, onValueChange: () => {} },\n);\n\ntype MenuRadioGroupElement = React.ComponentRef<typeof MenuGroup>;\ninterface MenuRadioGroupProps extends MenuGroupProps {\n value?: string;\n onValueChange?: (value: string) => void;\n}\n\nconst MenuRadioGroup = /* @__PURE__ */ React.forwardRef<MenuRadioGroupElement, MenuRadioGroupProps>(\n function MenuRadioGroup(props: ScopedProps<MenuRadioGroupProps>, forwardedRef) {\n const { value, onValueChange, ...groupProps } = props;\n const handleValueChange = useCallbackRef(onValueChange);\n return (\n <RadioGroupProvider scope={props.__scopeMenu} value={value} onValueChange={handleValueChange}>\n <MenuGroup {...groupProps} ref={forwardedRef} />\n </RadioGroupProvider>\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * MenuRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'MenuRadioItem';\n\ntype MenuRadioItemElement = React.ComponentRef<typeof MenuItem>;\ninterface MenuRadioItemProps extends MenuItemProps {\n value: string;\n}\n\nconst MenuRadioItem = /* @__PURE__ */ React.forwardRef<MenuRadioItemElement, MenuRadioItemProps>(\n function MenuRadioItem(props: ScopedProps<MenuRadioItemProps>, forwardedRef) {\n const { value, ...radioItemProps } = props;\n const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu);\n const checked = value === context.value;\n return (\n <ItemIndicatorProvider scope={props.__scopeMenu} checked={checked}>\n <MenuItem\n role=\"menuitemradio\"\n aria-checked={checked}\n {...radioItemProps}\n ref={forwardedRef}\n data-state={getCheckedState(checked)}\n onSelect={composeEventHandlers(\n radioItemProps.onSelect,\n () => context.onValueChange?.(value),\n { checkForDefaultPrevented: false },\n )}\n />\n </ItemIndicatorProvider>\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * MenuItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_INDICATOR_NAME = 'MenuItemIndicator';\n\ntype CheckboxContextValue = { checked: CheckedState };\n\nconst [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext<CheckboxContextValue>(\n ITEM_INDICATOR_NAME,\n { checked: false },\n);\n\ntype MenuItemIndicatorElement = React.ComponentRef<typeof Primitive.span>;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;\ninterface MenuItemIndicatorProps extends PrimitiveSpanProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst MenuItemIndicator = /* @__PURE__ */ React.forwardRef<\n MenuItemIndicatorElement,\n MenuItemIndicatorProps\n>(\n // blank line to reduce diff noise\n function MenuItemIndicator(props: ScopedProps<MenuItemIndicatorProps>, forwardedRef) {\n const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;\n const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);\n return (\n <Presence\n present={\n forceMount ||\n isIndeterminate(indicatorContext.checked) ||\n indicatorContext.checked === true\n }\n >\n <Primitive.span\n {...itemIndicatorProps}\n ref={forwardedRef}\n data-state={getCheckedState(indicatorContext.checked)}\n />\n </Presence>\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * MenuSeparator\n * -----------------------------------------------------------------------------------------------*/\n\ntype MenuSeparatorElement = React.ComponentRef<typeof Primitive.div>;\ninterface MenuSeparatorProps extends PrimitiveDivProps {}\n\nconst MenuSeparator = /* @__PURE__ */ React.forwardRef<MenuSeparatorElement, MenuSeparatorProps>(\n function MenuSeparator(props: ScopedProps<MenuSeparatorProps>, forwardedRef) {\n const { __scopeMenu, ...separatorProps } = props;\n return (\n <Primitive.div\n role=\"separator\"\n aria-orientation=\"horizontal\"\n {...separatorProps}\n ref={forwardedRef}\n />\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * MenuArrow\n * -----------------------------------------------------------------------------------------------*/\n\ntype MenuArrowElement = React.ComponentRef<typeof PopperPrimitive.Arrow>;\ntype PopperArrowProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;\ninterface MenuArrowProps extends PopperArrowProps {}\n\nconst MenuArrow = /* @__PURE__ */ React.forwardRef<MenuArrowElement, MenuArrowProps>(\n function MenuArrow(props: ScopedProps<MenuArrowProps>, forwardedRef) {\n const { __scopeMenu, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return <PopperPrimitive.Arrow {...popperScope} {...arrowProps} ref={forwardedRef} />;\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * MenuSub\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_NAME = 'MenuSub';\n\ntype MenuSubContextValue = {\n contentId: string;\n triggerId: string;\n trigger: MenuSubTriggerElement | null;\n onTriggerChange(trigger: MenuSubTriggerElement | null): void;\n};\n\nconst [MenuSubProvider, useMenuSubContext] = createMenuContext<MenuSubContextValue>(SUB_NAME);\n\ninterface MenuSubProps {\n children?: React.ReactNode;\n open?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst MenuSub: React.FC<MenuSubProps> = (props: ScopedProps<MenuSubProps>) => {\n const { __scopeMenu, children, open = false, onOpenChange } = props;\n const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const [trigger, setTrigger] = React.useState<MenuSubTriggerElement | null>(null);\n const [content, setContent] = React.useState<MenuContentElement | null>(null);\n const handleOpenChange = useCallbackRef(onOpenChange);\n\n // Prevent the parent menu from reopening with open submenus.\n React.useEffect(() => {\n if (parentMenuContext.open === false) handleOpenChange(false);\n return () => handleOpenChange(false);\n }, [parentMenuContext.open, handleOpenChange]);\n\n return (\n <PopperPrimitive.Root {...popperScope}>\n <MenuProvider\n scope={__scopeMenu}\n open={open}\n onOpenChange={handleOpenChange}\n content={content}\n onContentChange={setContent}\n >\n <MenuSubProvider\n scope={__scopeMenu}\n contentId={useId()}\n triggerId={useId()}\n trigger={trigger}\n onTriggerChange={setTrigger}\n >\n {children}\n </MenuSubProvider>\n </MenuProvider>\n </PopperPrimitive.Root>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * MenuSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_TRIGGER_NAME = 'MenuSubTrigger';\n\ntype MenuSubTriggerElement = MenuItemImplElement;\ninterface MenuSubTriggerProps extends MenuItemImplProps {}\n\nconst MenuSubTrigger = /* @__PURE__ */ React.forwardRef<MenuSubTriggerElement, MenuSubTriggerProps>(\n function MenuSubTrigger(props: ScopedProps<MenuSubTriggerProps>, forwardedRef) {\n const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const openTimerRef = React.useRef<number | null>(null);\n const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;\n const scope = { __scopeMenu: props.__scopeMenu };\n\n const clearOpenTimer = React.useCallback(() => {\n if (openTimerRef.current) window.clearTimeout(openTimerRef.current);\n openTimerRef.current = null;\n }, []);\n\n React.useEffect(() => clearOpenTimer, [clearOpenTimer]);\n\n React.useEffect(() => {\n const pointerGraceTimer = pointerGraceTimerRef.current;\n return () => {\n window.clearTimeout(pointerGraceTimer);\n onPointerGraceIntentChange(null);\n };\n }, [pointerGraceTimerRef, onPointerGraceIntentChange]);\n\n const composedRefs = useComposedRefs(forwardedRef, subContext.onTriggerChange);\n\n return (\n <MenuAnchor asChild {...scope}>\n <MenuItemImpl\n id={subContext.triggerId}\n aria-haspopup=\"menu\"\n aria-expanded={context.open}\n aria-controls={context.open ? subContext.contentId : undefined}\n data-state={getOpenState(context.open)}\n {...props}\n ref={composedRefs}\n // This is redundant for mouse users but we cannot determine pointer type from\n // click event and we cannot use pointerup event (see git history for reasons why)\n onClick={(event) => {\n props.onClick?.(event);\n if (props.disabled || event.defaultPrevented) return;\n /**\n * We manually focus because iOS Safari doesn't always focus on click (e.g. buttons)\n * and we rely heavily on `onFocusOutside` for submenus to close when switching\n * between separate submenus.\n */\n event.currentTarget.focus();\n if (!context.open) context.onOpenChange(true);\n }}\n onPointerMove={composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n contentContext.onItemEnter(event);\n if (event.defaultPrevented) return;\n if (!props.disabled && !context.open && !openTimerRef.current) {\n contentContext.onPointerGraceIntentChange(null);\n openTimerRef.current = window.setTimeout(() => {\n context.onOpenChange(true);\n clearOpenTimer();\n }, 100);\n }\n }),\n )}\n onPointerLeave={composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => {\n clearOpenTimer();\n\n const contentRect = context.content?.getBoundingClientRect();\n if (contentRect) {\n // TODO: make sure to update this when we change positioning logic\n const side = context.content?.dataset.side as Side;\n const rightSide = side === 'right';\n const bleed = rightSide ? -5 : +5;\n const contentNearEdge = contentRect[rightSide ? 'left' : 'right'];\n const contentFarEdge = contentRect[rightSide ? 'right' : 'left'];\n\n contentContext.onPointerGraceIntentChange({\n area: [\n // Apply a bleed on clientX to ensure that our exit point is\n // consistently within polygon bounds\n { x: event.clientX + bleed, y: event.clientY },\n { x: contentNearEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.bottom },\n { x: contentNearEdge, y: contentRect.bottom },\n ],\n side,\n });\n\n window.clearTimeout(pointerGraceTimerRef.current);\n pointerGraceTimerRef.current = window.setTimeout(\n () => contentContext.onPointerGraceIntentChange(null),\n 300,\n );\n } else {\n contentContext.onTriggerLeave(event);\n if (event.defaultPrevented) return;\n\n // There's 100ms where the user may leave an item before the submenu was opened.\n contentContext.onPointerGraceIntentChange(null);\n }\n }),\n )}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n // Only react to keys originating from the trigger itself. Focusable descendants\n // (eg. content rendered within the trigger) bubble their key events here through\n // React's event system even when portaled, which would otherwise let the trigger\n // swallow them. See: https://github.com/radix-ui/primitives/issues/3232\n if (props.disabled || event.target !== event.currentTarget) {\n return;\n }\n\n const isTypingAhead = contentContext.searchRef.current !== '';\n if (isTypingAhead && event.key === ' ') {\n return;\n }\n\n if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {\n context.onOpenChange(true);\n // The trigger may hold focus if opened via pointer interaction\n // so we ensure content is given focus again when switching to keyboard.\n context.content?.focus();\n // prevent window from scrolling\n event.preventDefault();\n }\n })}\n />\n </MenuAnchor>\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * MenuSubContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_CONTENT_NAME = 'MenuSubContent';\n\ntype AlignSubContent = Exclude<(typeof PopperPrimitive.ALIGN_OPTIONS)[number], 'center'>;\n\ntype MenuSubContentElement = MenuContentImplElement;\ninterface MenuSubContentProps extends Omit<\n MenuContentImplProps,\n keyof MenuContentImplPrivateProps | 'onCloseAutoFocus' | 'onEntryFocus' | 'side' | 'align'\n> {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n\n /**\n * Controls the direction the subcontent appears from its anchor menu item\n * Default: start\n */\n align?: AlignSubContent;\n}\n\nconst MenuSubContent = /* @__PURE__ */ React.forwardRef<MenuSubContentElement, MenuSubContentProps>(\n function MenuSubContent(props: ScopedProps<MenuSubContentProps>, forwardedRef) {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, align = 'start', ...subContentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef<MenuSubContentElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n return (\n <Collection.Provider scope={props.__scopeMenu}>\n <Presence present={forceMount || context.open}>\n <Collection.Slot scope={props.__scopeMenu}>\n <MenuContentImpl\n id={subContext.contentId}\n aria-labelledby={subContext.triggerId}\n {...subContentProps}\n ref={composedRefs}\n align={align}\n side={rootContext.dir === 'rtl' ? 'left' : 'right'}\n disableOutsidePointerEvents={false}\n disableOutsideScroll={false}\n trapFocus={false}\n onOpenAutoFocus={(event) => {\n // when opening a submenu, focus content for keyboard users only\n if (rootContext.isUsingKeyboardRef.current) ref.current?.focus();\n event.preventDefault();\n }}\n // The menu might close because of focusing another menu item in the parent menu. We\n // don't want it to refocus the trigger in that case so we handle trigger focus ourselves.\n onCloseAutoFocus={(event) => event.preventDefault()}\n onFocusOutside={composeEventHandlers(props.onFocusOutside, (event) => {\n // We prevent closing when the trigger is focused to avoid triggering a re-open animation\n // on pointer interaction.\n if (event.target !== subContext.trigger) context.onOpenChange(false);\n })}\n onEscapeKeyDown={composeEventHandlers(props.onEscapeKeyDown, (event) => {\n rootContext.onClose();\n // ensure pressing escape in submenu doesn't escape full screen mode\n event.preventDefault();\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n // Submenu key events bubble through portals. We only care about keys in this menu.\n const isKeyDownInside = event.currentTarget.contains(event.target as HTMLElement);\n const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);\n if (isKeyDownInside && isCloseKey) {\n context.onOpenChange(false);\n // We focus manually because we prevented it in `onCloseAutoFocus`\n subContext.trigger?.focus();\n // prevent window from scrolling\n event.preventDefault();\n }\n })}\n />\n </Collection.Slot>\n </Presence>\n </Collection.Provider>\n );\n },\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getOpenState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nfunction isIndeterminate(checked?: CheckedState): checked is 'indeterminate' {\n return checked === 'indeterminate';\n}\n\nfunction getCheckedState(checked: CheckedState) {\n return isIndeterminate(checked) ? 'indeterminate' : checked ? 'checked' : 'unchecked';\n}\n\nfunction focusFirst(candidates: HTMLElement[]) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n // if focus is already where we want to go, we don't want to keep going through the candidates\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus();\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\n\n/**\n * Wraps an array around itself at a given start index\n * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`\n */\nfunction wrapArray<T>(array: T[], startIndex: number) {\n return array.map<T>((_, index) => array[(startIndex + index) % array.length]!);\n}\n\n/**\n * This is the \"meat\" of the typeahead matching logic. It takes in all the values,\n * the search and the current match, and returns the next match (or `undefined`).\n *\n * We normalize the search because if a user has repeatedly pressed a character,\n * we want the exact same behavior as if we only had that one character\n * (ie. cycle through options starting with that character)\n *\n * We also reorder the values by wrapping the array around the current match.\n * This is so we always look forward from the current match, and picking the first\n * match will always be the correct one.\n *\n * Finally, if the normalized search is exactly one character, we exclude the\n * current match from the values because otherwise it would be the first to match always\n * and focus would never move. This is as opposed to the regular case, where we\n * don't want focus to move if the current match still matches.\n */\nfunction getNextMatch(values: string[], search: string, currentMatch?: string) {\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const normalizedSearch = isRepeated ? search[0]! : search;\n const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;\n let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0));\n const excludeCurrentMatch = normalizedSearch.length === 1;\n if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch);\n const nextMatch = wrappedValues.find((value) =>\n value.toLowerCase().startsWith(normalizedSearch.toLowerCase()),\n );\n return nextMatch !== currentMatch ? nextMatch : undefined;\n}\n\ntype Point = { x: number; y: number };\ntype Polygon = Point[];\ntype Side = 'left' | 'right';\ntype GraceIntent = { area: Polygon; side: Side };\n\n// Determine if a point is inside of a polygon.\n// Based on https://github.com/substack/point-in-polygon\nfunction isPointInPolygon(point: Point, polygon: Polygon) {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const ii = polygon[i]!;\n const jj = polygon[j]!;\n const xi = ii.x;\n const yi = ii.y;\n const xj = jj.x;\n const yj = jj.y;\n\n // oxfmt-ignore\n const intersect = ((yi > y) !== (yj > y)) && (x < (xj - xi) * (y - yi) / (yj - yi) + xi);\n if (intersect) inside = !inside;\n }\n\n return inside;\n}\n\nfunction isPointerInGraceArea(event: React.PointerEvent, area?: Polygon) {\n if (!area) return false;\n const cursorPos = { x: event.clientX, y: event.clientY };\n return isPointInPolygon(cursorPos, area);\n}\n\nfunction whenMouse<E>(handler: React.PointerEventHandler<E>): React.PointerEventHandler<E> {\n return (event) => (event.pointerType === 'mouse' ? handler(event) : undefined);\n}\n\nconst Root = Menu;\nconst Anchor = MenuAnchor;\nconst Portal = MenuPortal;\nconst Content = MenuContent;\nconst Group = MenuGroup;\nconst Label = MenuLabel;\nconst Item = MenuItem;\nconst CheckboxItem = MenuCheckboxItem;\nconst RadioGroup = MenuRadioGroup;\nconst RadioItem = MenuRadioItem;\nconst ItemIndicator = MenuItemIndicator;\nconst Separator = MenuSeparator;\nconst Arrow = MenuArrow;\nconst Sub = MenuSub;\nconst SubTrigger = MenuSubTrigger;\nconst SubContent = MenuSubContent;\n\nexport {\n createMenuScope,\n //\n Menu,\n MenuAnchor,\n MenuPortal,\n MenuContent,\n MenuGroup,\n MenuLabel,\n MenuItem,\n MenuCheckboxItem,\n MenuRadioGroup,\n MenuRadioItem,\n MenuItemIndicator,\n MenuSeparator,\n MenuArrow,\n MenuSub,\n MenuSubTrigger,\n MenuSubContent,\n //\n Root,\n Anchor,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n};\nexport type {\n MenuProps,\n MenuAnchorProps,\n MenuPortalProps,\n MenuContentProps,\n MenuGroupProps,\n MenuLabelProps,\n MenuItemProps,\n MenuCheckboxItemProps,\n MenuRadioGroupProps,\n MenuRadioItemProps,\n MenuItemIndicatorProps,\n MenuSeparatorProps,\n MenuArrowProps,\n MenuSubProps,\n MenuSubTriggerProps,\n MenuSubContentProps,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA4BA,IAAM,iBAAiB,CAAC,SAAS,GAAG;AACpC,IAAM,aAAa;CAAC;CAAa;CAAU;AAAM;AACjD,IAAM,YAAY;CAAC;CAAW;CAAY;AAAK;AAC/C,IAAM,kBAAkB,CAA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Q;EACnB,MAAM,KAAK,QAAQ;EACnB,MAAM,KAAK,GAAG;EACd,MAAM,KAAK,GAAG;EACd,MAAM,KAAK,GAAG;EACd,MAAM,KAAK,GAAG;EAId,IADoB,KAAK,MAAQ,KAAK,KAAQ,KAAK,KAAK,OAAO,IAAI,OAAO,KAAK,MAAM,IACtE,SAAS,CAAC;CAC3B;CAEA,OAAO;AACT;AAEA,SAAS,qBAAqB,OAA2B,MAAgB;CACvE,IAAI,CAAC,MAAM,OAAO;CAElB,OAAO,iBAAiB;EADJ,GAAG,MAAM;EAAS,GAAG,MAAM;CACvB,GAAW,IAAI;AACzC;AAEA,SAAS,UAAa,SAAqE;CACzF,QAAQ,UAAW,MAAM,gBAAgB,UAAU,QAAQ,KAAK,IAAI,KAAA;AACtE;AAEA,IAAM,OAAO;AACb,IAAM,SAAS;AACf,IAAM,SAAS;AACf,IAAM,UAAU;AAChB,IAAM,QAAQ;AACd,IAAM,QAAQ;AACd,IAAM,OAAO;AACb,IAAM,eAAe;AACrB,IAAM,aAAa;AACnB,IAAM,YAAY;AAClB,IAAM,gBAAgB;AACtB,IAAM,YAAY;AAElB,IAAM,MAAM;AACZ,IAAM,aAAa;AACnB,IAAM,aAAa"}
@@ -0,0 +1,2 @@
1
+ export { createMenubarScope, Menubar, MenubarMenu, MenubarTrigger, MenubarPortal, MenubarContent, MenubarGroup, MenubarLabel, MenubarItem, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarItemIndicator, MenubarSeparator, MenubarArrow, MenubarSub, MenubarSubTrigger, MenubarSubContent, Root, Menu, Trigger, Portal, Content, Group, Label, Item, CheckboxItem, RadioGroup, RadioItem, ItemIndicator, Separator, Arrow, Sub, SubTrigger, SubContent, } from './menubar';
2
+ export type { MenubarProps, MenubarMenuProps, MenubarTriggerProps, MenubarPortalProps, MenubarContentProps, MenubarGroupProps, MenubarLabelProps, MenubarItemProps, MenubarCheckboxItemProps, MenubarRadioGroupProps, MenubarRadioItemProps, MenubarItemIndicatorProps, MenubarSeparatorProps, MenubarArrowProps, MenubarSubProps, MenubarSubTriggerProps, MenubarSubContentProps, } from './menubar';
@@ -0,0 +1,106 @@
1
+ import * as React from 'react';
2
+ import * as MenuPrimitive from '../react-menu';
3
+ import * as RovingFocusGroup from '../react-roving-focus';
4
+ import { Primitive } from '../react-primitive';
5
+ import type { Scope } from '../react-context';
6
+ type ScopedProps<P> = P & {
7
+ __scopeMenubar?: Scope;
8
+ };
9
+ declare const createMenubarScope: import("../react-context").CreateScope;
10
+ type RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
11
+ type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
12
+ interface MenubarProps extends PrimitiveDivProps {
13
+ value?: string;
14
+ defaultValue?: string;
15
+ onValueChange?: (value: string) => void;
16
+ loop?: RovingFocusGroupProps['loop'];
17
+ dir?: RovingFocusGroupProps['dir'];
18
+ }
19
+ declare const Menubar: React.ForwardRefExoticComponent<MenubarProps & React.RefAttributes<HTMLDivElement>>;
20
+ interface MenubarMenuProps {
21
+ value?: string;
22
+ children?: React.ReactNode;
23
+ }
24
+ declare const MenubarMenu: (props: ScopedProps<MenubarMenuProps>) => React.JSX.Element;
25
+ type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
26
+ interface MenubarTriggerProps extends PrimitiveButtonProps {
27
+ }
28
+ declare const MenubarTrigger: React.ForwardRefExoticComponent<MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>>;
29
+ type MenuPortalProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;
30
+ interface MenubarPortalProps extends MenuPortalProps {
31
+ }
32
+ declare const MenubarPortal: React.FC<MenubarPortalProps>;
33
+ type MenuContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;
34
+ interface MenubarContentProps extends Omit<MenuContentProps, 'onEntryFocus'> {
35
+ }
36
+ declare const MenubarContent: React.ForwardRefExoticComponent<MenubarContentProps & React.RefAttributes<HTMLDivElement>>;
37
+ type MenuGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;
38
+ interface MenubarGroupProps extends MenuGroupProps {
39
+ }
40
+ declare const MenubarGroup: React.ForwardRefExoticComponent<MenubarGroupProps & React.RefAttributes<HTMLDivElement>>;
41
+ type MenuLabelProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;
42
+ interface MenubarLabelProps extends MenuLabelProps {
43
+ }
44
+ declare const MenubarLabel: React.ForwardRefExoticComponent<MenubarLabelProps & React.RefAttributes<HTMLDivElement>>;
45
+ type MenuItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;
46
+ interface MenubarItemProps extends MenuItemProps {
47
+ }
48
+ declare const MenubarItem: React.ForwardRefExoticComponent<MenubarItemProps & React.RefAttributes<HTMLDivElement>>;
49
+ type MenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;
50
+ interface MenubarCheckboxItemProps extends MenuCheckboxItemProps {
51
+ }
52
+ declare const MenubarCheckboxItem: React.ForwardRefExoticComponent<MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
53
+ type MenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;
54
+ interface MenubarRadioGroupProps extends MenuRadioGroupProps {
55
+ }
56
+ declare const MenubarRadioGroup: React.ForwardRefExoticComponent<MenubarRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
57
+ type MenuRadioItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;
58
+ interface MenubarRadioItemProps extends MenuRadioItemProps {
59
+ }
60
+ declare const MenubarRadioItem: React.ForwardRefExoticComponent<MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>>;
61
+ type MenuItemIndicatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;
62
+ interface MenubarItemIndicatorProps extends MenuItemIndicatorProps {
63
+ }
64
+ declare const MenubarItemIndicator: React.ForwardRefExoticComponent<MenubarItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
65
+ type MenuSeparatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;
66
+ interface MenubarSeparatorProps extends MenuSeparatorProps {
67
+ }
68
+ declare const MenubarSeparator: React.ForwardRefExoticComponent<MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
69
+ type MenuArrowProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;
70
+ interface MenubarArrowProps extends MenuArrowProps {
71
+ }
72
+ declare const MenubarArrow: React.ForwardRefExoticComponent<MenubarArrowProps & React.RefAttributes<SVGSVGElement>>;
73
+ interface MenubarSubProps {
74
+ children?: React.ReactNode;
75
+ open?: boolean;
76
+ defaultOpen?: boolean;
77
+ onOpenChange?(open: boolean): void;
78
+ }
79
+ declare const MenubarSub: React.FC<MenubarSubProps>;
80
+ type MenuSubTriggerProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;
81
+ interface MenubarSubTriggerProps extends MenuSubTriggerProps {
82
+ }
83
+ declare const MenubarSubTrigger: React.ForwardRefExoticComponent<MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
84
+ type MenuSubContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;
85
+ interface MenubarSubContentProps extends MenuSubContentProps {
86
+ }
87
+ declare const MenubarSubContent: React.ForwardRefExoticComponent<MenubarSubContentProps & React.RefAttributes<HTMLDivElement>>;
88
+ declare const Root: React.ForwardRefExoticComponent<MenubarProps & React.RefAttributes<HTMLDivElement>>;
89
+ declare const Menu: (props: ScopedProps<MenubarMenuProps>) => React.JSX.Element;
90
+ declare const Trigger: React.ForwardRefExoticComponent<MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>>;
91
+ declare const Portal: React.FC<MenubarPortalProps>;
92
+ declare const Content: React.ForwardRefExoticComponent<MenubarContentProps & React.RefAttributes<HTMLDivElement>>;
93
+ declare const Group: React.ForwardRefExoticComponent<MenubarGroupProps & React.RefAttributes<HTMLDivElement>>;
94
+ declare const Label: React.ForwardRefExoticComponent<MenubarLabelProps & React.RefAttributes<HTMLDivElement>>;
95
+ declare const Item: React.ForwardRefExoticComponent<MenubarItemProps & React.RefAttributes<HTMLDivElement>>;
96
+ declare const CheckboxItem: React.ForwardRefExoticComponent<MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
97
+ declare const RadioGroup: React.ForwardRefExoticComponent<MenubarRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
98
+ declare const RadioItem: React.ForwardRefExoticComponent<MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>>;
99
+ declare const ItemIndicator: React.ForwardRefExoticComponent<MenubarItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
100
+ declare const Separator: React.ForwardRefExoticComponent<MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
101
+ declare const Arrow: React.ForwardRefExoticComponent<MenubarArrowProps & React.RefAttributes<SVGSVGElement>>;
102
+ declare const Sub: React.FC<MenubarSubProps>;
103
+ declare const SubTrigger: React.ForwardRefExoticComponent<MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
104
+ declare const SubContent: React.ForwardRefExoticComponent<MenubarSubContentProps & React.RefAttributes<HTMLDivElement>>;
105
+ export { createMenubarScope, Menubar, MenubarMenu, MenubarTrigger, MenubarPortal, MenubarContent, MenubarGroup, MenubarLabel, MenubarItem, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarItemIndicator, MenubarSeparator, MenubarArrow, MenubarSub, MenubarSubTrigger, MenubarSubContent, Root, Menu, Trigger, Portal, Content, Group, Label, Item, CheckboxItem, RadioGroup, RadioItem, ItemIndicator, Separator, Arrow, Sub, SubTrigger, SubContent, };
106
+ export type { MenubarProps, MenubarMenuProps, MenubarTriggerProps, MenubarPortalProps, MenubarContentProps, MenubarGroupProps, MenubarLabelProps, MenubarItemProps, MenubarCheckboxItemProps, MenubarRadioGroupProps, MenubarRadioItemProps, MenubarItemIndicatorProps, MenubarSeparatorProps, MenubarArrowProps, MenubarSubProps, MenubarSubTriggerProps, MenubarSubContentProps, };