@arc-ui/components 12.0.0-beta.22 → 12.0.0-beta.24

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 (425) hide show
  1. package/lib/Alert/Alert.cjs +38 -37
  2. package/lib/Alert/Alert.mjs +38 -37
  3. package/lib/Alert/styles.css +1 -1
  4. package/lib/Align/Align.cjs +4 -3
  5. package/lib/Align/Align.mjs +2 -1
  6. package/lib/Align/styles.css +1 -1
  7. package/lib/AppButton/AppButton.cjs +5 -4
  8. package/lib/AppButton/AppButton.mjs +3 -2
  9. package/lib/AppButton/styles.css +1 -1
  10. package/lib/Avatar/Avatar.cjs +9 -7
  11. package/lib/Avatar/Avatar.mjs +9 -7
  12. package/lib/Avatar/styles.css +1 -1
  13. package/lib/AvatarGroup/AvatarGroup.cjs +14 -12
  14. package/lib/AvatarGroup/AvatarGroup.mjs +9 -7
  15. package/lib/AvatarGroup/styles.css +1 -1
  16. package/lib/Badge/Badge.cjs +3 -2
  17. package/lib/Badge/Badge.mjs +3 -2
  18. package/lib/Badge/styles.css +1 -1
  19. package/lib/Banner/Banner.cjs +14 -12
  20. package/lib/Banner/Banner.mjs +12 -10
  21. package/lib/Box/Box.cjs +4 -3
  22. package/lib/Box/Box.mjs +4 -3
  23. package/lib/Box/styles.css +1 -1
  24. package/lib/BrandLogo/BrandLogo.cjs +4 -3
  25. package/lib/BrandLogo/BrandLogo.mjs +4 -3
  26. package/lib/BrandLogo/styles.css +1 -1
  27. package/lib/Breadcrumbs/Breadcrumbs.cjs +18 -8
  28. package/lib/Breadcrumbs/Breadcrumbs.mjs +16 -6
  29. package/lib/Breadcrumbs/styles.css +1 -1
  30. package/lib/Button/Button.cjs +6 -5
  31. package/lib/Button/Button.mjs +6 -5
  32. package/lib/Button/styles.css +1 -1
  33. package/lib/ButtonGroup/ButtonGroup.cjs +11 -10
  34. package/lib/ButtonGroup/ButtonGroup.mjs +8 -7
  35. package/lib/ButtonGroup/styles.css +1 -1
  36. package/lib/ButtonV2/ButtonV2.cjs +6 -5
  37. package/lib/ButtonV2/ButtonV2.mjs +6 -5
  38. package/lib/ButtonV2/styles.css +1 -1
  39. package/lib/Calendar/Calendar.cjs +12 -10
  40. package/lib/Calendar/Calendar.mjs +12 -10
  41. package/lib/Calendar/styles.css +1 -1
  42. package/lib/CardFooter/CardFooter.cjs +5 -4
  43. package/lib/CardFooter/CardFooter.mjs +5 -4
  44. package/lib/CardFooter/styles.css +1 -1
  45. package/lib/CardHeading/CardHeading.cjs +6 -4
  46. package/lib/CardHeading/CardHeading.mjs +6 -4
  47. package/lib/CardHeading/styles.css +1 -1
  48. package/lib/Carousel/Carousel.cjs +17 -10
  49. package/lib/Carousel/Carousel.mjs +13 -6
  50. package/lib/Carousel/styles.css +1 -1
  51. package/lib/Checkbox/Checkbox.cjs +54 -13
  52. package/lib/Checkbox/Checkbox.mjs +56 -11
  53. package/lib/Checkbox/styles.css +1 -1
  54. package/lib/CheckboxIcon/CheckboxIcon.cjs +19 -0
  55. package/lib/CheckboxIcon/CheckboxIcon.mjs +13 -0
  56. package/lib/CheckboxIcon/styles.css +1 -0
  57. package/lib/ClientSideVisible/ClientSideVisible.cjs +8 -0
  58. package/lib/ClientSideVisible/ClientSideVisible.mjs +2 -0
  59. package/lib/Columns/Columns.cjs +7 -6
  60. package/lib/Columns/Columns.mjs +3 -2
  61. package/lib/Columns/styles.css +1 -1
  62. package/lib/ComboBox/ComboBox.cjs +284 -18
  63. package/lib/ComboBox/ComboBox.mjs +287 -17
  64. package/lib/ComboBox/styles.css +1 -1
  65. package/lib/ContentSwitcher/ContentSwitcher.cjs +8 -8
  66. package/lib/ContentSwitcher/ContentSwitcher.mjs +8 -8
  67. package/lib/ContentSwitcher/styles.css +1 -1
  68. package/lib/ContentSwitcherDropdown/ContentSwitcherDropdown.cjs +10 -9
  69. package/lib/ContentSwitcherDropdown/ContentSwitcherDropdown.mjs +10 -9
  70. package/lib/ContentSwitcherDropdown/styles.css +1 -1
  71. package/lib/DatePicker/DatePicker.cjs +365 -51
  72. package/lib/DatePicker/DatePicker.mjs +339 -26
  73. package/lib/DatePicker/styles.css +1 -1
  74. package/lib/Disclosure/Disclosure.cjs +8 -6
  75. package/lib/Disclosure/Disclosure.mjs +6 -4
  76. package/lib/Disclosure/styles.css +1 -1
  77. package/lib/DisclosureMini/DisclosureMini.cjs +6 -5
  78. package/lib/DisclosureMini/DisclosureMini.mjs +6 -5
  79. package/lib/DisclosureMini/styles.css +1 -1
  80. package/lib/Download/Download.cjs +7 -6
  81. package/lib/Download/Download.mjs +7 -6
  82. package/lib/Download/styles.css +1 -1
  83. package/lib/Drawer/Drawer.cjs +154 -18
  84. package/lib/Drawer/Drawer.mjs +154 -18
  85. package/lib/Drawer/styles.css +1 -1
  86. package/lib/Elevation/Elevation.cjs +9 -5
  87. package/lib/Elevation/Elevation.mjs +8 -4
  88. package/lib/Elevation/styles.css +1 -1
  89. package/lib/Filter/Filter.cjs +7 -6
  90. package/lib/Filter/Filter.mjs +4 -3
  91. package/lib/Filter/styles.css +1 -1
  92. package/lib/FormControl/FormControl.cjs +8 -7
  93. package/lib/FormControl/FormControl.mjs +8 -7
  94. package/lib/FormControl/styles.css +1 -1
  95. package/lib/GhostedHeroBanner/GhostedHeroBanner.cjs +12 -10
  96. package/lib/GhostedHeroBanner/GhostedHeroBanner.mjs +10 -8
  97. package/lib/GhostedHeroBanner/styles.css +1 -1
  98. package/lib/GradientPageBackground/GradientPageBackground.cjs +96 -197
  99. package/lib/GradientPageBackground/GradientPageBackground.mjs +96 -197
  100. package/lib/GradientPageBackground/styles.css +1 -1
  101. package/lib/Grid/Grid.cjs +3 -2
  102. package/lib/Grid/Grid.mjs +3 -2
  103. package/lib/Grid/styles.css +1 -1
  104. package/lib/Group/Group.cjs +7 -6
  105. package/lib/Group/Group.mjs +3 -2
  106. package/lib/Group/styles.css +1 -1
  107. package/lib/Heading/Heading.cjs +5 -3
  108. package/lib/Heading/Heading.mjs +5 -3
  109. package/lib/Heading/styles.css +1 -1
  110. package/lib/HeroBanner/HeroBanner.cjs +14 -12
  111. package/lib/HeroBanner/HeroBanner.mjs +14 -12
  112. package/lib/HeroBanner/styles.css +1 -1
  113. package/lib/HeroButton/HeroButton.cjs +78 -9
  114. package/lib/HeroButton/HeroButton.mjs +81 -8
  115. package/lib/HeroButton/styles.css +1 -1
  116. package/lib/Hidden/Hidden.cjs +3 -2
  117. package/lib/Hidden/Hidden.mjs +3 -2
  118. package/lib/Hidden/styles.css +1 -1
  119. package/lib/HorizontalCard/HorizontalCard.cjs +14 -12
  120. package/lib/HorizontalCard/HorizontalCard.mjs +11 -9
  121. package/lib/HorizontalCard/styles.css +1 -1
  122. package/lib/Icon/Icon.cjs +4 -3
  123. package/lib/Icon/Icon.mjs +4 -3
  124. package/lib/Icon/styles.css +1 -1
  125. package/lib/Image/Image.cjs +3 -2
  126. package/lib/Image/Image.mjs +3 -2
  127. package/lib/Image/styles.css +1 -1
  128. package/lib/ImpactCard/ImpactCard.cjs +15 -13
  129. package/lib/ImpactCard/ImpactCard.mjs +13 -11
  130. package/lib/ImpactCard/styles.css +1 -1
  131. package/lib/InformationCard/InformationCard.cjs +32 -22
  132. package/lib/InformationCard/InformationCard.mjs +27 -17
  133. package/lib/InformationCard/styles.css +1 -1
  134. package/lib/Link/Link.cjs +6 -5
  135. package/lib/Link/Link.mjs +6 -5
  136. package/lib/Link/styles.css +1 -1
  137. package/lib/Markup/Markup.cjs +5 -4
  138. package/lib/Markup/Markup.mjs +3 -2
  139. package/lib/Markup/styles.css +1 -1
  140. package/lib/MediaCard/MediaCard.cjs +56 -15
  141. package/lib/MediaCard/MediaCard.mjs +58 -13
  142. package/lib/MediaCard/styles.css +1 -1
  143. package/lib/Menu/Menu.cjs +1513 -73
  144. package/lib/Menu/Menu.mjs +1480 -59
  145. package/lib/Menu/styles.css +1 -1
  146. package/lib/Modal/Modal.cjs +22 -20
  147. package/lib/Modal/Modal.mjs +18 -16
  148. package/lib/Modal/styles.css +1 -1
  149. package/lib/NavigationHeader/NavigationHeader.cjs +859 -114
  150. package/lib/NavigationHeader/NavigationHeader.mjs +836 -91
  151. package/lib/NavigationHeader/styles.css +1 -1
  152. package/lib/Pagination/Pagination.cjs +10 -9
  153. package/lib/Pagination/Pagination.mjs +6 -5
  154. package/lib/Pagination/styles.css +1 -1
  155. package/lib/PaginationSimple/PaginationSimple.cjs +7 -6
  156. package/lib/PaginationSimple/PaginationSimple.mjs +5 -4
  157. package/lib/PaginationSimple/styles.css +1 -1
  158. package/lib/Popover/Popover.cjs +8 -7
  159. package/lib/Popover/Popover.mjs +8 -7
  160. package/lib/Popover/styles.css +1 -1
  161. package/lib/Poster/Poster.cjs +10 -9
  162. package/lib/Poster/Poster.mjs +4 -3
  163. package/lib/Poster/styles.css +1 -1
  164. package/lib/ProgressBar/ProgressBar.cjs +15 -13
  165. package/lib/ProgressBar/ProgressBar.mjs +10 -8
  166. package/lib/ProgressBar/styles.css +1 -1
  167. package/lib/ProgressStepper/ProgressStepper.cjs +6 -6
  168. package/lib/ProgressStepper/ProgressStepper.mjs +6 -6
  169. package/lib/ProgressStepper/styles.css +1 -1
  170. package/lib/ProgressStepperOverflow/ProgressStepperOverflow.cjs +142 -11
  171. package/lib/ProgressStepperOverflow/ProgressStepperOverflow.mjs +144 -9
  172. package/lib/ProgressStepperOverflow/styles.css +1 -1
  173. package/lib/RadioCardGroup/RadioCardGroup.cjs +57 -15
  174. package/lib/RadioCardGroup/RadioCardGroup.mjs +55 -14
  175. package/lib/RadioCardGroup/styles.css +1 -1
  176. package/lib/RadioGroup/RadioGroup.cjs +59 -15
  177. package/lib/RadioGroup/RadioGroup.mjs +56 -13
  178. package/lib/RadioGroup/styles.css +1 -1
  179. package/lib/Rule/Rule.cjs +4 -3
  180. package/lib/Rule/Rule.mjs +4 -3
  181. package/lib/Rule/styles.css +1 -1
  182. package/lib/ScrollToTop/ScrollToTop.cjs +11 -18
  183. package/lib/ScrollToTop/ScrollToTop.mjs +11 -18
  184. package/lib/ScrollToTop/styles.css +1 -1
  185. package/lib/Section/Section.cjs +3 -2
  186. package/lib/Section/Section.mjs +3 -2
  187. package/lib/Section/styles.css +1 -1
  188. package/lib/Select/Select.cjs +25 -17
  189. package/lib/Select/Select.mjs +25 -17
  190. package/lib/Select/styles.css +1 -1
  191. package/lib/SemanticHeading/SemanticHeading.cjs +10 -0
  192. package/lib/SemanticHeading/SemanticHeading.mjs +4 -0
  193. package/lib/SemanticHeading/styles.css +1 -0
  194. package/lib/SiteFooter/SiteFooter.cjs +13 -12
  195. package/lib/SiteFooter/SiteFooter.mjs +7 -6
  196. package/lib/SiteFooter/styles.css +1 -1
  197. package/lib/SiteFooterV2/SiteFooterV2.cjs +28 -26
  198. package/lib/SiteFooterV2/SiteFooterV2.mjs +15 -13
  199. package/lib/SiteFooterV2/styles.css +1 -1
  200. package/lib/SiteHeaderV2/SiteHeaderV2.cjs +457 -31
  201. package/lib/SiteHeaderV2/SiteHeaderV2.mjs +440 -15
  202. package/lib/SiteHeaderV2/styles.css +1 -1
  203. package/lib/Skeleton/Skeleton.cjs +4 -3
  204. package/lib/Skeleton/Skeleton.mjs +2 -1
  205. package/lib/Skeleton/styles.css +1 -1
  206. package/lib/SkipLink/SkipLink.cjs +5 -4
  207. package/lib/SkipLink/SkipLink.mjs +4 -3
  208. package/lib/SkipLink/styles.css +1 -1
  209. package/lib/Spinner/Spinner.cjs +3 -2
  210. package/lib/Spinner/Spinner.mjs +3 -2
  211. package/lib/Spinner/styles.css +1 -1
  212. package/lib/Surface/Surface.cjs +3 -2
  213. package/lib/Surface/Surface.mjs +3 -2
  214. package/lib/Surface/styles.css +1 -1
  215. package/lib/Switch/Switch.cjs +14 -13
  216. package/lib/Switch/Switch.mjs +12 -11
  217. package/lib/Switch/styles.css +1 -1
  218. package/lib/TabbedBanner/TabbedBanner.cjs +27 -26
  219. package/lib/TabbedBanner/TabbedBanner.mjs +23 -22
  220. package/lib/TabbedBanner/styles.css +1 -1
  221. package/lib/Tabs/Tabs.cjs +12 -11
  222. package/lib/Tabs/Tabs.mjs +6 -5
  223. package/lib/Tabs/styles.css +1 -1
  224. package/lib/Tag/Tag.cjs +18 -15
  225. package/lib/Tag/Tag.mjs +17 -14
  226. package/lib/Tag/styles.css +1 -1
  227. package/lib/TemplateBanner/TemplateBanner.cjs +12 -10
  228. package/lib/TemplateBanner/TemplateBanner.mjs +12 -10
  229. package/lib/TemplateBanner/styles.css +1 -1
  230. package/lib/Text/Text.cjs +4 -3
  231. package/lib/Text/Text.mjs +4 -3
  232. package/lib/Text/styles.css +1 -1
  233. package/lib/TextArea/TextArea.cjs +12 -62
  234. package/lib/TextArea/TextArea.mjs +10 -60
  235. package/lib/TextArea/styles.css +1 -1
  236. package/lib/TextInput/TextInput.cjs +10 -9
  237. package/lib/TextInput/TextInput.mjs +10 -9
  238. package/lib/TextInput/styles.css +1 -1
  239. package/lib/Theme/Theme.cjs +5 -4
  240. package/lib/Theme/Theme.mjs +3 -2
  241. package/lib/Theme/styles.css +1 -1
  242. package/lib/ThemeIcon/ThemeIcon.cjs +4 -3
  243. package/lib/ThemeIcon/ThemeIcon.mjs +4 -3
  244. package/lib/ThemeIcon/styles.css +1 -1
  245. package/lib/ThumbnailSignpost/ThumbnailSignpost.cjs +12 -11
  246. package/lib/ThumbnailSignpost/ThumbnailSignpost.mjs +8 -7
  247. package/lib/ThumbnailSignpost/styles.css +1 -1
  248. package/lib/Toast/Toast.cjs +12 -9
  249. package/lib/Toast/Toast.mjs +9 -6
  250. package/lib/Toast/styles.css +1 -1
  251. package/lib/Tooltip/Tooltip.cjs +6 -5
  252. package/lib/Tooltip/Tooltip.mjs +6 -5
  253. package/lib/Tooltip/styles.css +1 -1
  254. package/lib/Truncate/Truncate.cjs +4 -3
  255. package/lib/Truncate/Truncate.mjs +2 -1
  256. package/lib/Truncate/styles.css +1 -1
  257. package/lib/TypographyCard/TypographyCard.cjs +13 -11
  258. package/lib/TypographyCard/TypographyCard.mjs +12 -10
  259. package/lib/TypographyCard/styles.css +1 -1
  260. package/lib/UniversalHeader/UniversalHeader.cjs +7 -6
  261. package/lib/UniversalHeader/UniversalHeader.mjs +3 -2
  262. package/lib/UniversalHeader/styles.css +1 -1
  263. package/lib/VerticalSpace/VerticalSpace.cjs +3 -2
  264. package/lib/VerticalSpace/VerticalSpace.mjs +3 -2
  265. package/lib/VerticalSpace/styles.css +1 -1
  266. package/lib/VideoPlayer/VideoPlayer.cjs +27 -26
  267. package/lib/VideoPlayer/VideoPlayer.mjs +26 -25
  268. package/lib/VideoPlayer/styles.css +1 -1
  269. package/lib/Visible/Visible.cjs +3 -2
  270. package/lib/Visible/Visible.mjs +3 -2
  271. package/lib/Visible/styles.css +1 -1
  272. package/lib/VisuallyHidden/VisuallyHidden.cjs +3 -2
  273. package/lib/VisuallyHidden/VisuallyHidden.mjs +3 -2
  274. package/lib/VisuallyHidden/styles.css +1 -1
  275. package/lib/_shared/cjs/{Avatar-CrUioj_6.cjs → Avatar-CecZTQdk.cjs} +11 -10
  276. package/lib/_shared/cjs/Badge-DX5PjtiZ.cjs +15 -0
  277. package/lib/_shared/cjs/BannerImage-qK8-w9rt.cjs +13 -0
  278. package/lib/_shared/cjs/{Box-COPXU1Jf.cjs → Box-Va2g7Gdp.cjs} +5 -4
  279. package/lib/_shared/cjs/{BrandLogo-D5wlIFmm.cjs → BrandLogo-coNfTwRv.cjs} +5 -4
  280. package/lib/_shared/cjs/{Button-uD9mR8w-.cjs → Button-MXE2zSmS.cjs} +9 -8
  281. package/lib/_shared/cjs/ButtonV2-BJlwsXlN.cjs +58 -0
  282. package/lib/_shared/cjs/{Calendar-B-va25n2.cjs → Calendar-CFUNKEyb.cjs} +35 -41
  283. package/lib/_shared/cjs/{CardFooter-ChphRFHe.cjs → CardFooter-BPtRFaCy.cjs} +5 -16
  284. package/lib/_shared/cjs/{CardHeading-Cl0D1Khp.cjs → CardHeading-1-dcxBUr.cjs} +4 -3
  285. package/lib/_shared/cjs/CheckboxIcon-B94mtYCX.cjs +52 -0
  286. package/lib/_shared/cjs/ClientSideVisible-BhW-T6kb.cjs +16 -0
  287. package/lib/_shared/cjs/{Combination-B-rSVLfT.cjs → Combination-6m6aOXZq.cjs} +9 -9
  288. package/lib/_shared/cjs/{ContentSwitcherDropdown-U5ZTbJTe.cjs → ContentSwitcherDropdown-BtEnzdMw.cjs} +23 -12
  289. package/lib/_shared/cjs/{ContentSwitcherList-bCEzIPN2.cjs → ContentSwitcherList-BgAW2IhJ.cjs} +19 -7
  290. package/lib/_shared/cjs/{DisclosureMini-CtvDxVaG.cjs → DisclosureMini-KEuIc8tE.cjs} +7 -6
  291. package/lib/_shared/cjs/{Download-CrIytI74.cjs → Download-NY3tbv9Q.cjs} +8 -5
  292. package/lib/_shared/cjs/{FormControl-BPnKQrCm.cjs → FormControl-DiERJpGW.cjs} +16 -13
  293. package/lib/_shared/cjs/GridRow-l_SePUqV.cjs +45 -0
  294. package/lib/_shared/cjs/{Heading-BEMSkLYR.cjs → Heading-CoiZ2EmD.cjs} +7 -8
  295. package/lib/_shared/cjs/{Hidden-Vsv1-xWO.cjs → Hidden-BN0Q0NpZ.cjs} +4 -3
  296. package/lib/_shared/cjs/{Icon-CzhyKqMd.cjs → Icon-Dk2XHa7V.cjs} +5 -4
  297. package/lib/_shared/cjs/{Image-C1pcrfnN.cjs → Image-CSe0KpDN.cjs} +8 -7
  298. package/lib/_shared/cjs/{Link-7xUgVf1I.cjs → Link-PWpx-rRO.cjs} +13 -10
  299. package/lib/_shared/cjs/{Popover-C5mmMkYU.cjs → Popover-hpvmhKV8.cjs} +9 -7
  300. package/lib/_shared/cjs/{ProgressStepper-BL9Y5c4X.cjs → ProgressStepper-DTZQabiV.cjs} +142 -10
  301. package/lib/_shared/cjs/{Rule-DMQsi2L6.cjs → Rule-jmvOpci7.cjs} +4 -3
  302. package/lib/_shared/cjs/{Section-wUVdzmGA.cjs → Section-BorWFfNe.cjs} +4 -3
  303. package/lib/_shared/cjs/SemanticHeading-BPXN_z49.cjs +12 -0
  304. package/lib/_shared/cjs/Spinner-427lpnHI.cjs +17 -0
  305. package/lib/_shared/cjs/{Surface-BFx1yNsq.cjs → Surface-DIU5ciDT.cjs} +6 -5
  306. package/lib/_shared/cjs/{TemplateBanner-CImrJ9ON.cjs → TemplateBanner-BlmWfDQD.cjs} +15 -14
  307. package/lib/_shared/cjs/{Text-Cr5nmYmx.cjs → Text-jwsn80lQ.cjs} +5 -4
  308. package/lib/_shared/cjs/{TextInput-ByySubi5.cjs → TextInput-B0JrZhOo.cjs} +13 -12
  309. package/lib/_shared/cjs/{ThemeIcon-BoxbjTaQ.cjs → ThemeIcon-Def4RZfK.cjs} +5 -4
  310. package/lib/_shared/cjs/{Tooltip-BPHL0ELI.cjs → Tooltip-CEb7YEP2.cjs} +10 -9
  311. package/lib/_shared/cjs/{VerticalSpace-BJvST6WP.cjs → VerticalSpace-DLQUYsvc.cjs} +5 -3
  312. package/lib/_shared/cjs/{Visible-vchtZSfm.cjs → Visible-DZWtZ5qG.cjs} +4 -3
  313. package/lib/_shared/cjs/VisuallyHidden-CQg3cOVK.cjs +15 -0
  314. package/lib/_shared/cjs/{arc-breakpoints-DWUgmeLA.cjs → arc-breakpoints-BDA1EnFK.cjs} +11 -1
  315. package/lib/_shared/cjs/filter-attrs-D19P2s1V.cjs +15 -0
  316. package/lib/_shared/cjs/{index-Dv1xvB_E.cjs → index-BGGFOAAx.cjs} +1 -1
  317. package/lib/_shared/cjs/{index-CaO6cOF0.cjs → index-BWfgSvRQ.cjs} +3 -3
  318. package/lib/_shared/cjs/{index-C_Rl7v2g.cjs → index-CDVpHNP8.cjs} +3 -3
  319. package/lib/_shared/cjs/{index-EFXw1jWg.cjs → index-CklPiHsS.cjs} +1 -1
  320. package/lib/_shared/cjs/{index-DAr_oO4-.cjs → index-D9onmVh5.cjs} +2 -2
  321. package/lib/_shared/cjs/{index-Bt7hfZBc.cjs → index-KrMgv4q_.cjs} +1 -1
  322. package/lib/_shared/cjs/{index.es-DlNskPlN.cjs → index.es-VcVPUNjD.cjs} +1 -1
  323. package/lib/_shared/cjs/{filter-attrs-eK6E_34o.cjs → tslib.es6-CCZ3TN_7.cjs} +0 -13
  324. package/lib/_shared/cjs/use-media-query-DqZqShGX.cjs +58 -0
  325. package/lib/_shared/esm/{Avatar-Fb1E5MA9.mjs → Avatar-Cyqjgj85.mjs} +6 -5
  326. package/lib/_shared/esm/{Badge-BZ7E0zcQ.mjs → Badge-C_3PBa0p.mjs} +2 -1
  327. package/lib/_shared/esm/{BannerImage-BTsixvUH.mjs → BannerImage-CgjgaYkJ.mjs} +2 -2
  328. package/lib/_shared/esm/{Box-BYm_GTct.mjs → Box-C8iK8x5c.mjs} +3 -2
  329. package/lib/_shared/esm/{BrandLogo-_2Z_8I2Y.mjs → BrandLogo-Dc-d_8ZN.mjs} +3 -2
  330. package/lib/_shared/esm/{Button-BxuM3_gz.mjs → Button-BpQQut8P.mjs} +5 -4
  331. package/lib/_shared/esm/{ButtonV2-DwYBAojW.mjs → ButtonV2-C4a_kkhh.mjs} +16 -13
  332. package/lib/_shared/esm/{Calendar-Bd2_eT1Y.mjs → Calendar-CFdUlPXh.mjs} +14 -20
  333. package/lib/_shared/esm/{CardFooter-fsAY4cc6.mjs → CardFooter-BpVSztgE.mjs} +5 -16
  334. package/lib/_shared/esm/{CardHeading-_setRRjq.mjs → CardHeading-q6k7obu0.mjs} +4 -3
  335. package/lib/_shared/esm/CheckboxIcon-Bzto2Tke.mjs +50 -0
  336. package/lib/_shared/esm/ClientSideVisible-D_iBE-3U.mjs +14 -0
  337. package/lib/_shared/esm/{Combination-BpO6XTeS.mjs → Combination-BQ4XBtF-.mjs} +1 -1
  338. package/lib/_shared/esm/{ContentSwitcherDropdown-BCkuAfwC.mjs → ContentSwitcherDropdown-DgrN4Bdb.mjs} +21 -10
  339. package/lib/_shared/esm/{ContentSwitcherList-bCQz0qkU.mjs → ContentSwitcherList-i4m4nAzP.mjs} +15 -4
  340. package/lib/_shared/esm/{DisclosureMini-B9LzsQC2.mjs → DisclosureMini-ClSe9sSt.mjs} +5 -4
  341. package/lib/_shared/esm/{Download-DFz_1HCG.mjs → Download-BD8Bigeq.mjs} +8 -5
  342. package/lib/_shared/esm/{FormControl-CWyrVi1u.mjs → FormControl-Pc1aHUNM.mjs} +13 -10
  343. package/lib/_shared/esm/{GridRow-Ddt5CtFn.mjs → GridRow-vjacXnq0.mjs} +3 -2
  344. package/lib/_shared/esm/{Heading-CxHWefi7.mjs → Heading-B9cbwfoz.mjs} +7 -8
  345. package/lib/_shared/esm/{Hidden-DsrAaC0z.mjs → Hidden-CGRhG3dU.mjs} +2 -1
  346. package/lib/_shared/esm/{Icon-CcPOJcQm.mjs → Icon-CCUbr_AO.mjs} +3 -2
  347. package/lib/_shared/esm/{Image-Dl8oH1Rn.mjs → Image-LemsonUX.mjs} +4 -3
  348. package/lib/_shared/esm/{Link-Biyg9qBH.mjs → Link-ogbR4K3O.mjs} +8 -5
  349. package/lib/_shared/esm/{Popover-8FfvgL4c.mjs → Popover-D0ePWPz_.mjs} +8 -6
  350. package/lib/_shared/esm/{ProgressStepper-CLBtBNy2.mjs → ProgressStepper-CujHLQsm.mjs} +137 -5
  351. package/lib/_shared/esm/{Rule-3gdMHH-R.mjs → Rule-I1w3EaZi.mjs} +3 -2
  352. package/lib/_shared/esm/{Section-DDygQ5Az.mjs → Section-COc1l3mp.mjs} +4 -3
  353. package/lib/_shared/esm/SemanticHeading-1tLcSJYD.mjs +10 -0
  354. package/lib/_shared/esm/{Spinner-Cd7LiPTy.mjs → Spinner-DvngCIwx.mjs} +2 -1
  355. package/lib/_shared/esm/{Surface-Colbp3Zx.mjs → Surface-C69KVzkY.mjs} +2 -1
  356. package/lib/_shared/esm/{TemplateBanner-DeHjliNP.mjs → TemplateBanner-DEYOSosH.mjs} +12 -11
  357. package/lib/_shared/esm/{Text-CBlnm5CT.mjs → Text-BAzOkkzN.mjs} +3 -2
  358. package/lib/_shared/esm/{TextInput-Dk7qNGoh.mjs → TextInput-CjDG2cIX.mjs} +8 -7
  359. package/lib/_shared/esm/{ThemeIcon-CN_Ed5b1.mjs → ThemeIcon-B0SruPZC.mjs} +3 -2
  360. package/lib/_shared/esm/{Tooltip-Dc82Ht7G.mjs → Tooltip-BpSzN3Tx.mjs} +7 -6
  361. package/lib/_shared/esm/{VerticalSpace-Duhm0zXP.mjs → VerticalSpace-BLWB02I7.mjs} +4 -2
  362. package/lib/_shared/esm/{Visible-B13QJn7R.mjs → Visible-B0d79VWZ.mjs} +2 -1
  363. package/lib/_shared/esm/{VisuallyHidden-DqAgoqJo.mjs → VisuallyHidden-aSQ4RA1o.mjs} +2 -1
  364. package/lib/_shared/esm/arc-breakpoints-Bs-at7wk.mjs +26 -0
  365. package/lib/_shared/esm/filter-attrs-v_SweZXP.mjs +13 -0
  366. package/lib/_shared/esm/{index-DLovItWo.mjs → index-BFKdmv_g.mjs} +1 -1
  367. package/lib/_shared/esm/{index-BDWwJ5x2.mjs → index-BWkI4Dwz.mjs} +1 -1
  368. package/lib/_shared/esm/{index-J5IHetgg.mjs → index-CN4hP3Wu.mjs} +2 -2
  369. package/lib/_shared/esm/{index-CxrL7jIX.mjs → index-Do2wfP-X.mjs} +3 -3
  370. package/lib/_shared/esm/{index-DXTwueLZ.mjs → index-GCEHSsY8.mjs} +1 -1
  371. package/lib/_shared/esm/{index-BbAu4d3T.mjs → index-u47CK8Y0.mjs} +1 -1
  372. package/lib/_shared/esm/{index-CYUcQl4W.mjs → index-vnVJe9rH.mjs} +3 -3
  373. package/lib/_shared/esm/{index.es-C3WqfFKH.mjs → index.es-tyrXzvpp.mjs} +2 -2
  374. package/lib/_shared/esm/{filter-attrs-B6CM-NUr.mjs → tslib.es6-w7hdJ3oZ.mjs} +1 -13
  375. package/lib/_shared/esm/use-media-query-BmsMeo2M.mjs +56 -0
  376. package/lib/index.cjs +1244 -999
  377. package/lib/index.cjs.map +1 -1
  378. package/lib/index.d.cts +349 -142
  379. package/lib/index.d.mts +349 -142
  380. package/lib/index.js.map +1 -1
  381. package/lib/index.mjs +1244 -1001
  382. package/lib/index.mjs.map +1 -1
  383. package/lib/styles.css +6 -14
  384. package/lib/use-media-query/use-media-query.cjs +1 -1
  385. package/lib/use-media-query/use-media-query.mjs +1 -1
  386. package/package.json +9 -8
  387. package/lib/_shared/cjs/Badge-CQVEPH9v.cjs +0 -14
  388. package/lib/_shared/cjs/BannerImage-kdAKagG-.cjs +0 -13
  389. package/lib/_shared/cjs/BreadcrumbsLink-CDmk3Y3m.cjs +0 -18
  390. package/lib/_shared/cjs/ButtonV2-Bta5SVVY.cjs +0 -55
  391. package/lib/_shared/cjs/Checkbox-DfZMjO1Y.cjs +0 -88
  392. package/lib/_shared/cjs/ComboBox-BGUhlqx1.cjs +0 -281
  393. package/lib/_shared/cjs/ContentSwitcherTab-B387Qs3I.cjs +0 -14
  394. package/lib/_shared/cjs/DatePicker-Dt4faA_N.cjs +0 -334
  395. package/lib/_shared/cjs/GridRow-BW2ZGtND.cjs +0 -44
  396. package/lib/_shared/cjs/HeroButton-CrzkTUwP.cjs +0 -82
  397. package/lib/_shared/cjs/MediaCard-BEZFbiYO.cjs +0 -57
  398. package/lib/_shared/cjs/MenuItemMultiLevelContent-vLr6hSBm.cjs +0 -1328
  399. package/lib/_shared/cjs/ProgressStepperOverflow-BAGZNC26.cjs +0 -142
  400. package/lib/_shared/cjs/RadioCardGroupInput-CeUM3yPS.cjs +0 -53
  401. package/lib/_shared/cjs/RadioGroupInput-w2qkfsnG.cjs +0 -54
  402. package/lib/_shared/cjs/SiteHeaderV2NavItemWithSubNav-CagFKPEa.cjs +0 -445
  403. package/lib/_shared/cjs/Spinner-bbrOwxv2.cjs +0 -16
  404. package/lib/_shared/cjs/VisuallyHidden-B4XCvPYP.cjs +0 -14
  405. package/lib/_shared/cjs/index-CqYNiqix.cjs +0 -137
  406. package/lib/_shared/cjs/kebabCase-D5yA6u-V.cjs +0 -743
  407. package/lib/_shared/cjs/keynames-Cx13-hWr.cjs +0 -8
  408. package/lib/_shared/cjs/use-media-query-BsUfHjPZ.cjs +0 -41
  409. package/lib/_shared/esm/BreadcrumbsLink-BxTurGNa.mjs +0 -16
  410. package/lib/_shared/esm/Checkbox-CwOHzlQF.mjs +0 -86
  411. package/lib/_shared/esm/ComboBox-CRlJjeev.mjs +0 -279
  412. package/lib/_shared/esm/ContentSwitcherTab-CfC3PGeZ.mjs +0 -12
  413. package/lib/_shared/esm/DatePicker-DT4OEzxP.mjs +0 -324
  414. package/lib/_shared/esm/HeroButton-jdjjV_Gf.mjs +0 -80
  415. package/lib/_shared/esm/MediaCard-DqMaNWsE.mjs +0 -55
  416. package/lib/_shared/esm/MenuItemMultiLevelContent-JTOHqpzg.mjs +0 -1296
  417. package/lib/_shared/esm/ProgressStepperOverflow-fPkLltVO.mjs +0 -140
  418. package/lib/_shared/esm/RadioCardGroupInput-D7W28geB.mjs +0 -50
  419. package/lib/_shared/esm/RadioGroupInput-zAWSV29m.mjs +0 -50
  420. package/lib/_shared/esm/SiteHeaderV2NavItemWithSubNav-CxGwdV6u.mjs +0 -439
  421. package/lib/_shared/esm/arc-breakpoints-D5hR5m3t.mjs +0 -21
  422. package/lib/_shared/esm/index-CL6dwOYV.mjs +0 -135
  423. package/lib/_shared/esm/kebabCase-CCEMRBfd.mjs +0 -737
  424. package/lib/_shared/esm/keynames-B5whqsjh.mjs +0 -8
  425. package/lib/_shared/esm/use-media-query-DmKuIDEM.mjs +0 -39
@@ -1,1296 +0,0 @@
1
- 'use client';
2
- import { _ as __rest, a as __assign, f as filterAttrs } from './filter-attrs-B6CM-NUr.mjs';
3
- import * as React from 'react';
4
- import React__default from 'react';
5
- import { u as useComposedRefs, P as Primitive, c as composeEventHandlers, h as hideOthers, a as useFocusGuards, F as FocusScope, D as DismissableLayer, d as composeRefs, R as ReactRemoveScroll, S as Slot, e as dispatchDiscreteCustomEvent, b as Portal$1 } from './Combination-BpO6XTeS.mjs';
6
- import { c as createContextScope, u as useControllableState, f as useCallbackRef, a as useId } from './index-Bz2JQq34.mjs';
7
- import { c as createCollection, u as useDirection } from './index-BbAu4d3T.mjs';
8
- import { c as createPopperScope, A as Anchor, C as Content, a as Arrow, R as Root2$1 } from './index-DLovItWo.mjs';
9
- import { P as Presence } from './index-DXTwueLZ.mjs';
10
- import { jsx } from 'react/jsx-runtime';
11
-
12
- var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
13
- var EVENT_OPTIONS = { bubbles: false, cancelable: true };
14
- var GROUP_NAME$2 = "RovingFocusGroup";
15
- var [Collection$1, useCollection$1, createCollectionScope$1] = createCollection(GROUP_NAME$2);
16
- var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
17
- GROUP_NAME$2,
18
- [createCollectionScope$1]
19
- );
20
- var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME$2);
21
- var RovingFocusGroup = React.forwardRef(
22
- (props, forwardedRef) => {
23
- return /* @__PURE__ */ jsx(Collection$1.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection$1.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
24
- }
25
- );
26
- RovingFocusGroup.displayName = GROUP_NAME$2;
27
- var RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {
28
- const {
29
- __scopeRovingFocusGroup,
30
- orientation,
31
- loop = false,
32
- dir,
33
- currentTabStopId: currentTabStopIdProp,
34
- defaultCurrentTabStopId,
35
- onCurrentTabStopIdChange,
36
- onEntryFocus,
37
- preventScrollOnEntryFocus = false,
38
- ...groupProps
39
- } = props;
40
- const ref = React.useRef(null);
41
- const composedRefs = useComposedRefs(forwardedRef, ref);
42
- const direction = useDirection(dir);
43
- const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({
44
- prop: currentTabStopIdProp,
45
- defaultProp: defaultCurrentTabStopId,
46
- onChange: onCurrentTabStopIdChange
47
- });
48
- const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);
49
- const handleEntryFocus = useCallbackRef(onEntryFocus);
50
- const getItems = useCollection$1(__scopeRovingFocusGroup);
51
- const isClickFocusRef = React.useRef(false);
52
- const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);
53
- React.useEffect(() => {
54
- const node = ref.current;
55
- if (node) {
56
- node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
57
- return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
58
- }
59
- }, [handleEntryFocus]);
60
- return /* @__PURE__ */ jsx(
61
- RovingFocusProvider,
62
- {
63
- scope: __scopeRovingFocusGroup,
64
- orientation,
65
- dir: direction,
66
- loop,
67
- currentTabStopId,
68
- onItemFocus: React.useCallback(
69
- (tabStopId) => setCurrentTabStopId(tabStopId),
70
- [setCurrentTabStopId]
71
- ),
72
- onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),
73
- onFocusableItemAdd: React.useCallback(
74
- () => setFocusableItemsCount((prevCount) => prevCount + 1),
75
- []
76
- ),
77
- onFocusableItemRemove: React.useCallback(
78
- () => setFocusableItemsCount((prevCount) => prevCount - 1),
79
- []
80
- ),
81
- children: /* @__PURE__ */ jsx(
82
- Primitive.div,
83
- {
84
- tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
85
- "data-orientation": orientation,
86
- ...groupProps,
87
- ref: composedRefs,
88
- style: { outline: "none", ...props.style },
89
- onMouseDown: composeEventHandlers(props.onMouseDown, () => {
90
- isClickFocusRef.current = true;
91
- }),
92
- onFocus: composeEventHandlers(props.onFocus, (event) => {
93
- const isKeyboardFocus = !isClickFocusRef.current;
94
- if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
95
- const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
96
- event.currentTarget.dispatchEvent(entryFocusEvent);
97
- if (!entryFocusEvent.defaultPrevented) {
98
- const items = getItems().filter((item) => item.focusable);
99
- const activeItem = items.find((item) => item.active);
100
- const currentItem = items.find((item) => item.id === currentTabStopId);
101
- const candidateItems = [activeItem, currentItem, ...items].filter(
102
- Boolean
103
- );
104
- const candidateNodes = candidateItems.map((item) => item.ref.current);
105
- focusFirst$1(candidateNodes, preventScrollOnEntryFocus);
106
- }
107
- }
108
- isClickFocusRef.current = false;
109
- }),
110
- onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))
111
- }
112
- )
113
- }
114
- );
115
- });
116
- var ITEM_NAME$2 = "RovingFocusGroupItem";
117
- var RovingFocusGroupItem = React.forwardRef(
118
- (props, forwardedRef) => {
119
- const {
120
- __scopeRovingFocusGroup,
121
- focusable = true,
122
- active = false,
123
- tabStopId,
124
- ...itemProps
125
- } = props;
126
- const autoId = useId();
127
- const id = tabStopId || autoId;
128
- const context = useRovingFocusContext(ITEM_NAME$2, __scopeRovingFocusGroup);
129
- const isCurrentTabStop = context.currentTabStopId === id;
130
- const getItems = useCollection$1(__scopeRovingFocusGroup);
131
- const { onFocusableItemAdd, onFocusableItemRemove } = context;
132
- React.useEffect(() => {
133
- if (focusable) {
134
- onFocusableItemAdd();
135
- return () => onFocusableItemRemove();
136
- }
137
- }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
138
- return /* @__PURE__ */ jsx(
139
- Collection$1.ItemSlot,
140
- {
141
- scope: __scopeRovingFocusGroup,
142
- id,
143
- focusable,
144
- active,
145
- children: /* @__PURE__ */ jsx(
146
- Primitive.span,
147
- {
148
- tabIndex: isCurrentTabStop ? 0 : -1,
149
- "data-orientation": context.orientation,
150
- ...itemProps,
151
- ref: forwardedRef,
152
- onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
153
- if (!focusable) event.preventDefault();
154
- else context.onItemFocus(id);
155
- }),
156
- onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
157
- onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
158
- if (event.key === "Tab" && event.shiftKey) {
159
- context.onItemShiftTab();
160
- return;
161
- }
162
- if (event.target !== event.currentTarget) return;
163
- const focusIntent = getFocusIntent(event, context.orientation, context.dir);
164
- if (focusIntent !== void 0) {
165
- if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;
166
- event.preventDefault();
167
- const items = getItems().filter((item) => item.focusable);
168
- let candidateNodes = items.map((item) => item.ref.current);
169
- if (focusIntent === "last") candidateNodes.reverse();
170
- else if (focusIntent === "prev" || focusIntent === "next") {
171
- if (focusIntent === "prev") candidateNodes.reverse();
172
- const currentIndex = candidateNodes.indexOf(event.currentTarget);
173
- candidateNodes = context.loop ? wrapArray$1(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
174
- }
175
- setTimeout(() => focusFirst$1(candidateNodes));
176
- }
177
- })
178
- }
179
- )
180
- }
181
- );
182
- }
183
- );
184
- RovingFocusGroupItem.displayName = ITEM_NAME$2;
185
- var MAP_KEY_TO_FOCUS_INTENT = {
186
- ArrowLeft: "prev",
187
- ArrowUp: "prev",
188
- ArrowRight: "next",
189
- ArrowDown: "next",
190
- PageUp: "first",
191
- Home: "first",
192
- PageDown: "last",
193
- End: "last"
194
- };
195
- function getDirectionAwareKey(key, dir) {
196
- if (dir !== "rtl") return key;
197
- return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
198
- }
199
- function getFocusIntent(event, orientation, dir) {
200
- const key = getDirectionAwareKey(event.key, dir);
201
- if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) return void 0;
202
- if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)) return void 0;
203
- return MAP_KEY_TO_FOCUS_INTENT[key];
204
- }
205
- function focusFirst$1(candidates, preventScroll = false) {
206
- const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
207
- for (const candidate of candidates) {
208
- if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
209
- candidate.focus({ preventScroll });
210
- if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
211
- }
212
- }
213
- function wrapArray$1(array, startIndex) {
214
- return array.map((_, index) => array[(startIndex + index) % array.length]);
215
- }
216
- var Root = RovingFocusGroup;
217
- var Item = RovingFocusGroupItem;
218
-
219
- var SELECTION_KEYS = ["Enter", " "];
220
- var FIRST_KEYS = ["ArrowDown", "PageUp", "Home"];
221
- var LAST_KEYS = ["ArrowUp", "PageDown", "End"];
222
- var FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];
223
- var SUB_OPEN_KEYS = {
224
- ltr: [...SELECTION_KEYS, "ArrowRight"],
225
- rtl: [...SELECTION_KEYS, "ArrowLeft"]
226
- };
227
- var SUB_CLOSE_KEYS = {
228
- ltr: ["ArrowLeft"],
229
- rtl: ["ArrowRight"]
230
- };
231
- var MENU_NAME = "Menu";
232
- var [Collection, useCollection, createCollectionScope] = createCollection(MENU_NAME);
233
- var [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [
234
- createCollectionScope,
235
- createPopperScope,
236
- createRovingFocusGroupScope
237
- ]);
238
- var usePopperScope = createPopperScope();
239
- var useRovingFocusGroupScope = createRovingFocusGroupScope();
240
- var [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME);
241
- var [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);
242
- var Menu = (props) => {
243
- const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;
244
- const popperScope = usePopperScope(__scopeMenu);
245
- const [content, setContent] = React.useState(null);
246
- const isUsingKeyboardRef = React.useRef(false);
247
- const handleOpenChange = useCallbackRef(onOpenChange);
248
- const direction = useDirection(dir);
249
- React.useEffect(() => {
250
- const handleKeyDown = () => {
251
- isUsingKeyboardRef.current = true;
252
- document.addEventListener("pointerdown", handlePointer, { capture: true, once: true });
253
- document.addEventListener("pointermove", handlePointer, { capture: true, once: true });
254
- };
255
- const handlePointer = () => isUsingKeyboardRef.current = false;
256
- document.addEventListener("keydown", handleKeyDown, { capture: true });
257
- return () => {
258
- document.removeEventListener("keydown", handleKeyDown, { capture: true });
259
- document.removeEventListener("pointerdown", handlePointer, { capture: true });
260
- document.removeEventListener("pointermove", handlePointer, { capture: true });
261
- };
262
- }, []);
263
- return /* @__PURE__ */ jsx(Root2$1, { ...popperScope, children: /* @__PURE__ */ jsx(
264
- MenuProvider,
265
- {
266
- scope: __scopeMenu,
267
- open,
268
- onOpenChange: handleOpenChange,
269
- content,
270
- onContentChange: setContent,
271
- children: /* @__PURE__ */ jsx(
272
- MenuRootProvider,
273
- {
274
- scope: __scopeMenu,
275
- onClose: React.useCallback(() => handleOpenChange(false), [handleOpenChange]),
276
- isUsingKeyboardRef,
277
- dir: direction,
278
- modal,
279
- children
280
- }
281
- )
282
- }
283
- ) });
284
- };
285
- Menu.displayName = MENU_NAME;
286
- var ANCHOR_NAME = "MenuAnchor";
287
- var MenuAnchor = React.forwardRef(
288
- (props, forwardedRef) => {
289
- const { __scopeMenu, ...anchorProps } = props;
290
- const popperScope = usePopperScope(__scopeMenu);
291
- return /* @__PURE__ */ jsx(Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
292
- }
293
- );
294
- MenuAnchor.displayName = ANCHOR_NAME;
295
- var PORTAL_NAME$1 = "MenuPortal";
296
- var [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME$1, {
297
- forceMount: void 0
298
- });
299
- var MenuPortal = (props) => {
300
- const { __scopeMenu, forceMount, children, container } = props;
301
- const context = useMenuContext(PORTAL_NAME$1, __scopeMenu);
302
- return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$1, { asChild: true, container, children }) }) });
303
- };
304
- MenuPortal.displayName = PORTAL_NAME$1;
305
- var CONTENT_NAME$1 = "MenuContent";
306
- var [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME$1);
307
- var MenuContent$1 = React.forwardRef(
308
- (props, forwardedRef) => {
309
- const portalContext = usePortalContext(CONTENT_NAME$1, props.__scopeMenu);
310
- const { forceMount = portalContext.forceMount, ...contentProps } = props;
311
- const context = useMenuContext(CONTENT_NAME$1, props.__scopeMenu);
312
- const rootContext = useMenuRootContext(CONTENT_NAME$1, props.__scopeMenu);
313
- return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ jsx(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });
314
- }
315
- );
316
- var MenuRootContentModal = React.forwardRef(
317
- (props, forwardedRef) => {
318
- const context = useMenuContext(CONTENT_NAME$1, props.__scopeMenu);
319
- const ref = React.useRef(null);
320
- const composedRefs = useComposedRefs(forwardedRef, ref);
321
- React.useEffect(() => {
322
- const content = ref.current;
323
- if (content) return hideOthers(content);
324
- }, []);
325
- return /* @__PURE__ */ jsx(
326
- MenuContentImpl,
327
- {
328
- ...props,
329
- ref: composedRefs,
330
- trapFocus: context.open,
331
- disableOutsidePointerEvents: context.open,
332
- disableOutsideScroll: true,
333
- onFocusOutside: composeEventHandlers(
334
- props.onFocusOutside,
335
- (event) => event.preventDefault(),
336
- { checkForDefaultPrevented: false }
337
- ),
338
- onDismiss: () => context.onOpenChange(false)
339
- }
340
- );
341
- }
342
- );
343
- var MenuRootContentNonModal = React.forwardRef((props, forwardedRef) => {
344
- const context = useMenuContext(CONTENT_NAME$1, props.__scopeMenu);
345
- return /* @__PURE__ */ jsx(
346
- MenuContentImpl,
347
- {
348
- ...props,
349
- ref: forwardedRef,
350
- trapFocus: false,
351
- disableOutsidePointerEvents: false,
352
- disableOutsideScroll: false,
353
- onDismiss: () => context.onOpenChange(false)
354
- }
355
- );
356
- });
357
- var MenuContentImpl = React.forwardRef(
358
- (props, forwardedRef) => {
359
- const {
360
- __scopeMenu,
361
- loop = false,
362
- trapFocus,
363
- onOpenAutoFocus,
364
- onCloseAutoFocus,
365
- disableOutsidePointerEvents,
366
- onEntryFocus,
367
- onEscapeKeyDown,
368
- onPointerDownOutside,
369
- onFocusOutside,
370
- onInteractOutside,
371
- onDismiss,
372
- disableOutsideScroll,
373
- ...contentProps
374
- } = props;
375
- const context = useMenuContext(CONTENT_NAME$1, __scopeMenu);
376
- const rootContext = useMenuRootContext(CONTENT_NAME$1, __scopeMenu);
377
- const popperScope = usePopperScope(__scopeMenu);
378
- const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);
379
- const getItems = useCollection(__scopeMenu);
380
- const [currentItemId, setCurrentItemId] = React.useState(null);
381
- const contentRef = React.useRef(null);
382
- const composedRefs = useComposedRefs(forwardedRef, contentRef, context.onContentChange);
383
- const timerRef = React.useRef(0);
384
- const searchRef = React.useRef("");
385
- const pointerGraceTimerRef = React.useRef(0);
386
- const pointerGraceIntentRef = React.useRef(null);
387
- const pointerDirRef = React.useRef("right");
388
- const lastPointerXRef = React.useRef(0);
389
- const ScrollLockWrapper = disableOutsideScroll ? ReactRemoveScroll : React.Fragment;
390
- const scrollLockWrapperProps = disableOutsideScroll ? { as: Slot, allowPinchZoom: true } : void 0;
391
- const handleTypeaheadSearch = (key) => {
392
- const search = searchRef.current + key;
393
- const items = getItems().filter((item) => !item.disabled);
394
- const currentItem = document.activeElement;
395
- const currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue;
396
- const values = items.map((item) => item.textValue);
397
- const nextMatch = getNextMatch(values, search, currentMatch);
398
- const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current;
399
- (function updateSearch(value) {
400
- searchRef.current = value;
401
- window.clearTimeout(timerRef.current);
402
- if (value !== "") timerRef.current = window.setTimeout(() => updateSearch(""), 1e3);
403
- })(search);
404
- if (newItem) {
405
- setTimeout(() => newItem.focus());
406
- }
407
- };
408
- React.useEffect(() => {
409
- return () => window.clearTimeout(timerRef.current);
410
- }, []);
411
- useFocusGuards();
412
- const isPointerMovingToSubmenu = React.useCallback((event) => {
413
- const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;
414
- return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);
415
- }, []);
416
- return /* @__PURE__ */ jsx(
417
- MenuContentProvider,
418
- {
419
- scope: __scopeMenu,
420
- searchRef,
421
- onItemEnter: React.useCallback(
422
- (event) => {
423
- if (isPointerMovingToSubmenu(event)) event.preventDefault();
424
- },
425
- [isPointerMovingToSubmenu]
426
- ),
427
- onItemLeave: React.useCallback(
428
- (event) => {
429
- if (isPointerMovingToSubmenu(event)) return;
430
- contentRef.current?.focus();
431
- setCurrentItemId(null);
432
- },
433
- [isPointerMovingToSubmenu]
434
- ),
435
- onTriggerLeave: React.useCallback(
436
- (event) => {
437
- if (isPointerMovingToSubmenu(event)) event.preventDefault();
438
- },
439
- [isPointerMovingToSubmenu]
440
- ),
441
- pointerGraceTimerRef,
442
- onPointerGraceIntentChange: React.useCallback((intent) => {
443
- pointerGraceIntentRef.current = intent;
444
- }, []),
445
- children: /* @__PURE__ */ jsx(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ jsx(
446
- FocusScope,
447
- {
448
- asChild: true,
449
- trapped: trapFocus,
450
- onMountAutoFocus: composeEventHandlers(onOpenAutoFocus, (event) => {
451
- event.preventDefault();
452
- contentRef.current?.focus({ preventScroll: true });
453
- }),
454
- onUnmountAutoFocus: onCloseAutoFocus,
455
- children: /* @__PURE__ */ jsx(
456
- DismissableLayer,
457
- {
458
- asChild: true,
459
- disableOutsidePointerEvents,
460
- onEscapeKeyDown,
461
- onPointerDownOutside,
462
- onFocusOutside,
463
- onInteractOutside,
464
- onDismiss,
465
- children: /* @__PURE__ */ jsx(
466
- Root,
467
- {
468
- asChild: true,
469
- ...rovingFocusGroupScope,
470
- dir: rootContext.dir,
471
- orientation: "vertical",
472
- loop,
473
- currentTabStopId: currentItemId,
474
- onCurrentTabStopIdChange: setCurrentItemId,
475
- onEntryFocus: composeEventHandlers(onEntryFocus, (event) => {
476
- if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();
477
- }),
478
- preventScrollOnEntryFocus: true,
479
- children: /* @__PURE__ */ jsx(
480
- Content,
481
- {
482
- role: "menu",
483
- "aria-orientation": "vertical",
484
- "data-state": getOpenState(context.open),
485
- "data-radix-menu-content": "",
486
- dir: rootContext.dir,
487
- ...popperScope,
488
- ...contentProps,
489
- ref: composedRefs,
490
- style: { outline: "none", ...contentProps.style },
491
- onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event) => {
492
- const target = event.target;
493
- const isKeyDownInside = target.closest("[data-radix-menu-content]") === event.currentTarget;
494
- const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
495
- const isCharacterKey = event.key.length === 1;
496
- if (isKeyDownInside) {
497
- if (event.key === "Tab") event.preventDefault();
498
- if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);
499
- }
500
- const content = contentRef.current;
501
- if (event.target !== content) return;
502
- if (!FIRST_LAST_KEYS.includes(event.key)) return;
503
- event.preventDefault();
504
- const items = getItems().filter((item) => !item.disabled);
505
- const candidateNodes = items.map((item) => item.ref.current);
506
- if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();
507
- focusFirst(candidateNodes);
508
- }),
509
- onBlur: composeEventHandlers(props.onBlur, (event) => {
510
- if (!event.currentTarget.contains(event.target)) {
511
- window.clearTimeout(timerRef.current);
512
- searchRef.current = "";
513
- }
514
- }),
515
- onPointerMove: composeEventHandlers(
516
- props.onPointerMove,
517
- whenMouse((event) => {
518
- const target = event.target;
519
- const pointerXHasChanged = lastPointerXRef.current !== event.clientX;
520
- if (event.currentTarget.contains(target) && pointerXHasChanged) {
521
- const newDir = event.clientX > lastPointerXRef.current ? "right" : "left";
522
- pointerDirRef.current = newDir;
523
- lastPointerXRef.current = event.clientX;
524
- }
525
- })
526
- )
527
- }
528
- )
529
- }
530
- )
531
- }
532
- )
533
- }
534
- ) })
535
- }
536
- );
537
- }
538
- );
539
- MenuContent$1.displayName = CONTENT_NAME$1;
540
- var GROUP_NAME$1 = "MenuGroup";
541
- var MenuGroup = React.forwardRef(
542
- (props, forwardedRef) => {
543
- const { __scopeMenu, ...groupProps } = props;
544
- return /* @__PURE__ */ jsx(Primitive.div, { role: "group", ...groupProps, ref: forwardedRef });
545
- }
546
- );
547
- MenuGroup.displayName = GROUP_NAME$1;
548
- var LABEL_NAME$1 = "MenuLabel";
549
- var MenuLabel = React.forwardRef(
550
- (props, forwardedRef) => {
551
- const { __scopeMenu, ...labelProps } = props;
552
- return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });
553
- }
554
- );
555
- MenuLabel.displayName = LABEL_NAME$1;
556
- var ITEM_NAME$1 = "MenuItem";
557
- var ITEM_SELECT = "menu.itemSelect";
558
- var MenuItem = React.forwardRef(
559
- (props, forwardedRef) => {
560
- const { disabled = false, onSelect, ...itemProps } = props;
561
- const ref = React.useRef(null);
562
- const rootContext = useMenuRootContext(ITEM_NAME$1, props.__scopeMenu);
563
- const contentContext = useMenuContentContext(ITEM_NAME$1, props.__scopeMenu);
564
- const composedRefs = useComposedRefs(forwardedRef, ref);
565
- const isPointerDownRef = React.useRef(false);
566
- const handleSelect = () => {
567
- const menuItem = ref.current;
568
- if (!disabled && menuItem) {
569
- const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true });
570
- menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: true });
571
- dispatchDiscreteCustomEvent(menuItem, itemSelectEvent);
572
- if (itemSelectEvent.defaultPrevented) {
573
- isPointerDownRef.current = false;
574
- } else {
575
- rootContext.onClose();
576
- }
577
- }
578
- };
579
- return /* @__PURE__ */ jsx(
580
- MenuItemImpl,
581
- {
582
- ...itemProps,
583
- ref: composedRefs,
584
- disabled,
585
- onClick: composeEventHandlers(props.onClick, handleSelect),
586
- onPointerDown: (event) => {
587
- props.onPointerDown?.(event);
588
- isPointerDownRef.current = true;
589
- },
590
- onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {
591
- if (!isPointerDownRef.current) event.currentTarget?.click();
592
- }),
593
- onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
594
- const isTypingAhead = contentContext.searchRef.current !== "";
595
- if (disabled || isTypingAhead && event.key === " ") return;
596
- if (SELECTION_KEYS.includes(event.key)) {
597
- event.currentTarget.click();
598
- event.preventDefault();
599
- }
600
- })
601
- }
602
- );
603
- }
604
- );
605
- MenuItem.displayName = ITEM_NAME$1;
606
- var MenuItemImpl = React.forwardRef(
607
- (props, forwardedRef) => {
608
- const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;
609
- const contentContext = useMenuContentContext(ITEM_NAME$1, __scopeMenu);
610
- const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);
611
- const ref = React.useRef(null);
612
- const composedRefs = useComposedRefs(forwardedRef, ref);
613
- const [isFocused, setIsFocused] = React.useState(false);
614
- const [textContent, setTextContent] = React.useState("");
615
- React.useEffect(() => {
616
- const menuItem = ref.current;
617
- if (menuItem) {
618
- setTextContent((menuItem.textContent ?? "").trim());
619
- }
620
- }, [itemProps.children]);
621
- return /* @__PURE__ */ jsx(
622
- Collection.ItemSlot,
623
- {
624
- scope: __scopeMenu,
625
- disabled,
626
- textValue: textValue ?? textContent,
627
- children: /* @__PURE__ */ jsx(Item, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(
628
- Primitive.div,
629
- {
630
- role: "menuitem",
631
- "data-highlighted": isFocused ? "" : void 0,
632
- "aria-disabled": disabled || void 0,
633
- "data-disabled": disabled ? "" : void 0,
634
- ...itemProps,
635
- ref: composedRefs,
636
- onPointerMove: composeEventHandlers(
637
- props.onPointerMove,
638
- whenMouse((event) => {
639
- if (disabled) {
640
- contentContext.onItemLeave(event);
641
- } else {
642
- contentContext.onItemEnter(event);
643
- if (!event.defaultPrevented) {
644
- const item = event.currentTarget;
645
- item.focus({ preventScroll: true });
646
- }
647
- }
648
- })
649
- ),
650
- onPointerLeave: composeEventHandlers(
651
- props.onPointerLeave,
652
- whenMouse((event) => contentContext.onItemLeave(event))
653
- ),
654
- onFocus: composeEventHandlers(props.onFocus, () => setIsFocused(true)),
655
- onBlur: composeEventHandlers(props.onBlur, () => setIsFocused(false))
656
- }
657
- ) })
658
- }
659
- );
660
- }
661
- );
662
- var CHECKBOX_ITEM_NAME$1 = "MenuCheckboxItem";
663
- var MenuCheckboxItem = React.forwardRef(
664
- (props, forwardedRef) => {
665
- const { checked = false, onCheckedChange, ...checkboxItemProps } = props;
666
- return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(
667
- MenuItem,
668
- {
669
- role: "menuitemcheckbox",
670
- "aria-checked": isIndeterminate(checked) ? "mixed" : checked,
671
- ...checkboxItemProps,
672
- ref: forwardedRef,
673
- "data-state": getCheckedState(checked),
674
- onSelect: composeEventHandlers(
675
- checkboxItemProps.onSelect,
676
- () => onCheckedChange?.(isIndeterminate(checked) ? true : !checked),
677
- { checkForDefaultPrevented: false }
678
- )
679
- }
680
- ) });
681
- }
682
- );
683
- MenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME$1;
684
- var RADIO_GROUP_NAME$1 = "MenuRadioGroup";
685
- var [RadioGroupProvider, useRadioGroupContext] = createMenuContext(
686
- RADIO_GROUP_NAME$1,
687
- { value: void 0, onValueChange: () => {
688
- } }
689
- );
690
- var MenuRadioGroup = React.forwardRef(
691
- (props, forwardedRef) => {
692
- const { value, onValueChange, ...groupProps } = props;
693
- const handleValueChange = useCallbackRef(onValueChange);
694
- return /* @__PURE__ */ jsx(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) });
695
- }
696
- );
697
- MenuRadioGroup.displayName = RADIO_GROUP_NAME$1;
698
- var RADIO_ITEM_NAME$1 = "MenuRadioItem";
699
- var MenuRadioItem = React.forwardRef(
700
- (props, forwardedRef) => {
701
- const { value, ...radioItemProps } = props;
702
- const context = useRadioGroupContext(RADIO_ITEM_NAME$1, props.__scopeMenu);
703
- const checked = value === context.value;
704
- return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(
705
- MenuItem,
706
- {
707
- role: "menuitemradio",
708
- "aria-checked": checked,
709
- ...radioItemProps,
710
- ref: forwardedRef,
711
- "data-state": getCheckedState(checked),
712
- onSelect: composeEventHandlers(
713
- radioItemProps.onSelect,
714
- () => context.onValueChange?.(value),
715
- { checkForDefaultPrevented: false }
716
- )
717
- }
718
- ) });
719
- }
720
- );
721
- MenuRadioItem.displayName = RADIO_ITEM_NAME$1;
722
- var ITEM_INDICATOR_NAME = "MenuItemIndicator";
723
- var [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(
724
- ITEM_INDICATOR_NAME,
725
- { checked: false }
726
- );
727
- var MenuItemIndicator = React.forwardRef(
728
- (props, forwardedRef) => {
729
- const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;
730
- const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);
731
- return /* @__PURE__ */ jsx(
732
- Presence,
733
- {
734
- present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,
735
- children: /* @__PURE__ */ jsx(
736
- Primitive.span,
737
- {
738
- ...itemIndicatorProps,
739
- ref: forwardedRef,
740
- "data-state": getCheckedState(indicatorContext.checked)
741
- }
742
- )
743
- }
744
- );
745
- }
746
- );
747
- MenuItemIndicator.displayName = ITEM_INDICATOR_NAME;
748
- var SEPARATOR_NAME$1 = "MenuSeparator";
749
- var MenuSeparator = React.forwardRef(
750
- (props, forwardedRef) => {
751
- const { __scopeMenu, ...separatorProps } = props;
752
- return /* @__PURE__ */ jsx(
753
- Primitive.div,
754
- {
755
- role: "separator",
756
- "aria-orientation": "horizontal",
757
- ...separatorProps,
758
- ref: forwardedRef
759
- }
760
- );
761
- }
762
- );
763
- MenuSeparator.displayName = SEPARATOR_NAME$1;
764
- var ARROW_NAME$1 = "MenuArrow";
765
- var MenuArrow = React.forwardRef(
766
- (props, forwardedRef) => {
767
- const { __scopeMenu, ...arrowProps } = props;
768
- const popperScope = usePopperScope(__scopeMenu);
769
- return /* @__PURE__ */ jsx(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
770
- }
771
- );
772
- MenuArrow.displayName = ARROW_NAME$1;
773
- var SUB_NAME = "MenuSub";
774
- var [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME);
775
- var MenuSub = (props) => {
776
- const { __scopeMenu, children, open = false, onOpenChange } = props;
777
- const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu);
778
- const popperScope = usePopperScope(__scopeMenu);
779
- const [trigger, setTrigger] = React.useState(null);
780
- const [content, setContent] = React.useState(null);
781
- const handleOpenChange = useCallbackRef(onOpenChange);
782
- React.useEffect(() => {
783
- if (parentMenuContext.open === false) handleOpenChange(false);
784
- return () => handleOpenChange(false);
785
- }, [parentMenuContext.open, handleOpenChange]);
786
- return /* @__PURE__ */ jsx(Root2$1, { ...popperScope, children: /* @__PURE__ */ jsx(
787
- MenuProvider,
788
- {
789
- scope: __scopeMenu,
790
- open,
791
- onOpenChange: handleOpenChange,
792
- content,
793
- onContentChange: setContent,
794
- children: /* @__PURE__ */ jsx(
795
- MenuSubProvider,
796
- {
797
- scope: __scopeMenu,
798
- contentId: useId(),
799
- triggerId: useId(),
800
- trigger,
801
- onTriggerChange: setTrigger,
802
- children
803
- }
804
- )
805
- }
806
- ) });
807
- };
808
- MenuSub.displayName = SUB_NAME;
809
- var SUB_TRIGGER_NAME$1 = "MenuSubTrigger";
810
- var MenuSubTrigger = React.forwardRef(
811
- (props, forwardedRef) => {
812
- const context = useMenuContext(SUB_TRIGGER_NAME$1, props.__scopeMenu);
813
- const rootContext = useMenuRootContext(SUB_TRIGGER_NAME$1, props.__scopeMenu);
814
- const subContext = useMenuSubContext(SUB_TRIGGER_NAME$1, props.__scopeMenu);
815
- const contentContext = useMenuContentContext(SUB_TRIGGER_NAME$1, props.__scopeMenu);
816
- const openTimerRef = React.useRef(null);
817
- const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;
818
- const scope = { __scopeMenu: props.__scopeMenu };
819
- const clearOpenTimer = React.useCallback(() => {
820
- if (openTimerRef.current) window.clearTimeout(openTimerRef.current);
821
- openTimerRef.current = null;
822
- }, []);
823
- React.useEffect(() => clearOpenTimer, [clearOpenTimer]);
824
- React.useEffect(() => {
825
- const pointerGraceTimer = pointerGraceTimerRef.current;
826
- return () => {
827
- window.clearTimeout(pointerGraceTimer);
828
- onPointerGraceIntentChange(null);
829
- };
830
- }, [pointerGraceTimerRef, onPointerGraceIntentChange]);
831
- return /* @__PURE__ */ jsx(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ jsx(
832
- MenuItemImpl,
833
- {
834
- id: subContext.triggerId,
835
- "aria-haspopup": "menu",
836
- "aria-expanded": context.open,
837
- "aria-controls": subContext.contentId,
838
- "data-state": getOpenState(context.open),
839
- ...props,
840
- ref: composeRefs(forwardedRef, subContext.onTriggerChange),
841
- onClick: (event) => {
842
- props.onClick?.(event);
843
- if (props.disabled || event.defaultPrevented) return;
844
- event.currentTarget.focus();
845
- if (!context.open) context.onOpenChange(true);
846
- },
847
- onPointerMove: composeEventHandlers(
848
- props.onPointerMove,
849
- whenMouse((event) => {
850
- contentContext.onItemEnter(event);
851
- if (event.defaultPrevented) return;
852
- if (!props.disabled && !context.open && !openTimerRef.current) {
853
- contentContext.onPointerGraceIntentChange(null);
854
- openTimerRef.current = window.setTimeout(() => {
855
- context.onOpenChange(true);
856
- clearOpenTimer();
857
- }, 100);
858
- }
859
- })
860
- ),
861
- onPointerLeave: composeEventHandlers(
862
- props.onPointerLeave,
863
- whenMouse((event) => {
864
- clearOpenTimer();
865
- const contentRect = context.content?.getBoundingClientRect();
866
- if (contentRect) {
867
- const side = context.content?.dataset.side;
868
- const rightSide = side === "right";
869
- const bleed = rightSide ? -5 : 5;
870
- const contentNearEdge = contentRect[rightSide ? "left" : "right"];
871
- const contentFarEdge = contentRect[rightSide ? "right" : "left"];
872
- contentContext.onPointerGraceIntentChange({
873
- area: [
874
- // Apply a bleed on clientX to ensure that our exit point is
875
- // consistently within polygon bounds
876
- { x: event.clientX + bleed, y: event.clientY },
877
- { x: contentNearEdge, y: contentRect.top },
878
- { x: contentFarEdge, y: contentRect.top },
879
- { x: contentFarEdge, y: contentRect.bottom },
880
- { x: contentNearEdge, y: contentRect.bottom }
881
- ],
882
- side
883
- });
884
- window.clearTimeout(pointerGraceTimerRef.current);
885
- pointerGraceTimerRef.current = window.setTimeout(
886
- () => contentContext.onPointerGraceIntentChange(null),
887
- 300
888
- );
889
- } else {
890
- contentContext.onTriggerLeave(event);
891
- if (event.defaultPrevented) return;
892
- contentContext.onPointerGraceIntentChange(null);
893
- }
894
- })
895
- ),
896
- onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
897
- const isTypingAhead = contentContext.searchRef.current !== "";
898
- if (props.disabled || isTypingAhead && event.key === " ") return;
899
- if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {
900
- context.onOpenChange(true);
901
- context.content?.focus();
902
- event.preventDefault();
903
- }
904
- })
905
- }
906
- ) });
907
- }
908
- );
909
- MenuSubTrigger.displayName = SUB_TRIGGER_NAME$1;
910
- var SUB_CONTENT_NAME$1 = "MenuSubContent";
911
- var MenuSubContent = React.forwardRef(
912
- (props, forwardedRef) => {
913
- const portalContext = usePortalContext(CONTENT_NAME$1, props.__scopeMenu);
914
- const { forceMount = portalContext.forceMount, ...subContentProps } = props;
915
- const context = useMenuContext(CONTENT_NAME$1, props.__scopeMenu);
916
- const rootContext = useMenuRootContext(CONTENT_NAME$1, props.__scopeMenu);
917
- const subContext = useMenuSubContext(SUB_CONTENT_NAME$1, props.__scopeMenu);
918
- const ref = React.useRef(null);
919
- const composedRefs = useComposedRefs(forwardedRef, ref);
920
- return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(
921
- MenuContentImpl,
922
- {
923
- id: subContext.contentId,
924
- "aria-labelledby": subContext.triggerId,
925
- ...subContentProps,
926
- ref: composedRefs,
927
- align: "start",
928
- side: rootContext.dir === "rtl" ? "left" : "right",
929
- disableOutsidePointerEvents: false,
930
- disableOutsideScroll: false,
931
- trapFocus: false,
932
- onOpenAutoFocus: (event) => {
933
- if (rootContext.isUsingKeyboardRef.current) ref.current?.focus();
934
- event.preventDefault();
935
- },
936
- onCloseAutoFocus: (event) => event.preventDefault(),
937
- onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => {
938
- if (event.target !== subContext.trigger) context.onOpenChange(false);
939
- }),
940
- onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (event) => {
941
- rootContext.onClose();
942
- event.preventDefault();
943
- }),
944
- onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
945
- const isKeyDownInside = event.currentTarget.contains(event.target);
946
- const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);
947
- if (isKeyDownInside && isCloseKey) {
948
- context.onOpenChange(false);
949
- subContext.trigger?.focus();
950
- event.preventDefault();
951
- }
952
- })
953
- }
954
- ) }) }) });
955
- }
956
- );
957
- MenuSubContent.displayName = SUB_CONTENT_NAME$1;
958
- function getOpenState(open) {
959
- return open ? "open" : "closed";
960
- }
961
- function isIndeterminate(checked) {
962
- return checked === "indeterminate";
963
- }
964
- function getCheckedState(checked) {
965
- return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
966
- }
967
- function focusFirst(candidates) {
968
- const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
969
- for (const candidate of candidates) {
970
- if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
971
- candidate.focus();
972
- if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
973
- }
974
- }
975
- function wrapArray(array, startIndex) {
976
- return array.map((_, index) => array[(startIndex + index) % array.length]);
977
- }
978
- function getNextMatch(values, search, currentMatch) {
979
- const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);
980
- const normalizedSearch = isRepeated ? search[0] : search;
981
- const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;
982
- let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0));
983
- const excludeCurrentMatch = normalizedSearch.length === 1;
984
- if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch);
985
- const nextMatch = wrappedValues.find(
986
- (value) => value.toLowerCase().startsWith(normalizedSearch.toLowerCase())
987
- );
988
- return nextMatch !== currentMatch ? nextMatch : void 0;
989
- }
990
- function isPointInPolygon(point, polygon) {
991
- const { x, y } = point;
992
- let inside = false;
993
- for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
994
- const xi = polygon[i].x;
995
- const yi = polygon[i].y;
996
- const xj = polygon[j].x;
997
- const yj = polygon[j].y;
998
- const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;
999
- if (intersect) inside = !inside;
1000
- }
1001
- return inside;
1002
- }
1003
- function isPointerInGraceArea(event, area) {
1004
- if (!area) return false;
1005
- const cursorPos = { x: event.clientX, y: event.clientY };
1006
- return isPointInPolygon(cursorPos, area);
1007
- }
1008
- function whenMouse(handler) {
1009
- return (event) => event.pointerType === "mouse" ? handler(event) : void 0;
1010
- }
1011
- var Root3 = Menu;
1012
- var Anchor2 = MenuAnchor;
1013
- var Portal = MenuPortal;
1014
- var Content2$1 = MenuContent$1;
1015
- var Group = MenuGroup;
1016
- var Label = MenuLabel;
1017
- var Item2$1 = MenuItem;
1018
- var CheckboxItem = MenuCheckboxItem;
1019
- var RadioGroup = MenuRadioGroup;
1020
- var RadioItem = MenuRadioItem;
1021
- var ItemIndicator = MenuItemIndicator;
1022
- var Separator = MenuSeparator;
1023
- var Arrow2 = MenuArrow;
1024
- var Sub = MenuSub;
1025
- var SubTrigger = MenuSubTrigger;
1026
- var SubContent = MenuSubContent;
1027
-
1028
- var DROPDOWN_MENU_NAME = "DropdownMenu";
1029
- var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(
1030
- DROPDOWN_MENU_NAME,
1031
- [createMenuScope]
1032
- );
1033
- var useMenuScope = createMenuScope();
1034
- var [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME);
1035
- var DropdownMenu = (props) => {
1036
- const {
1037
- __scopeDropdownMenu,
1038
- children,
1039
- dir,
1040
- open: openProp,
1041
- defaultOpen,
1042
- onOpenChange,
1043
- modal = true
1044
- } = props;
1045
- const menuScope = useMenuScope(__scopeDropdownMenu);
1046
- const triggerRef = React.useRef(null);
1047
- const [open = false, setOpen] = useControllableState({
1048
- prop: openProp,
1049
- defaultProp: defaultOpen,
1050
- onChange: onOpenChange
1051
- });
1052
- return /* @__PURE__ */ jsx(
1053
- DropdownMenuProvider,
1054
- {
1055
- scope: __scopeDropdownMenu,
1056
- triggerId: useId(),
1057
- triggerRef,
1058
- contentId: useId(),
1059
- open,
1060
- onOpenChange: setOpen,
1061
- onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
1062
- modal,
1063
- children: /* @__PURE__ */ jsx(Root3, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })
1064
- }
1065
- );
1066
- };
1067
- DropdownMenu.displayName = DROPDOWN_MENU_NAME;
1068
- var TRIGGER_NAME = "DropdownMenuTrigger";
1069
- var DropdownMenuTrigger = React.forwardRef(
1070
- (props, forwardedRef) => {
1071
- const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;
1072
- const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);
1073
- const menuScope = useMenuScope(__scopeDropdownMenu);
1074
- return /* @__PURE__ */ jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(
1075
- Primitive.button,
1076
- {
1077
- type: "button",
1078
- id: context.triggerId,
1079
- "aria-haspopup": "menu",
1080
- "aria-expanded": context.open,
1081
- "aria-controls": context.open ? context.contentId : void 0,
1082
- "data-state": context.open ? "open" : "closed",
1083
- "data-disabled": disabled ? "" : void 0,
1084
- disabled,
1085
- ...triggerProps,
1086
- ref: composeRefs(forwardedRef, context.triggerRef),
1087
- onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {
1088
- if (!disabled && event.button === 0 && event.ctrlKey === false) {
1089
- context.onOpenToggle();
1090
- if (!context.open) event.preventDefault();
1091
- }
1092
- }),
1093
- onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
1094
- if (disabled) return;
1095
- if (["Enter", " "].includes(event.key)) context.onOpenToggle();
1096
- if (event.key === "ArrowDown") context.onOpenChange(true);
1097
- if (["Enter", " ", "ArrowDown"].includes(event.key)) event.preventDefault();
1098
- })
1099
- }
1100
- ) });
1101
- }
1102
- );
1103
- DropdownMenuTrigger.displayName = TRIGGER_NAME;
1104
- var PORTAL_NAME = "DropdownMenuPortal";
1105
- var DropdownMenuPortal = (props) => {
1106
- const { __scopeDropdownMenu, ...portalProps } = props;
1107
- const menuScope = useMenuScope(__scopeDropdownMenu);
1108
- return /* @__PURE__ */ jsx(Portal, { ...menuScope, ...portalProps });
1109
- };
1110
- DropdownMenuPortal.displayName = PORTAL_NAME;
1111
- var CONTENT_NAME = "DropdownMenuContent";
1112
- var DropdownMenuContent = React.forwardRef(
1113
- (props, forwardedRef) => {
1114
- const { __scopeDropdownMenu, ...contentProps } = props;
1115
- const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);
1116
- const menuScope = useMenuScope(__scopeDropdownMenu);
1117
- const hasInteractedOutsideRef = React.useRef(false);
1118
- return /* @__PURE__ */ jsx(
1119
- Content2$1,
1120
- {
1121
- id: context.contentId,
1122
- "aria-labelledby": context.triggerId,
1123
- ...menuScope,
1124
- ...contentProps,
1125
- ref: forwardedRef,
1126
- onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
1127
- if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
1128
- hasInteractedOutsideRef.current = false;
1129
- event.preventDefault();
1130
- }),
1131
- onInteractOutside: composeEventHandlers(props.onInteractOutside, (event) => {
1132
- const originalEvent = event.detail.originalEvent;
1133
- const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
1134
- const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
1135
- if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;
1136
- }),
1137
- style: {
1138
- ...props.style,
1139
- // re-namespace exposed content custom properties
1140
- ...{
1141
- "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
1142
- "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
1143
- "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
1144
- "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
1145
- "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
1146
- }
1147
- }
1148
- }
1149
- );
1150
- }
1151
- );
1152
- DropdownMenuContent.displayName = CONTENT_NAME;
1153
- var GROUP_NAME = "DropdownMenuGroup";
1154
- var DropdownMenuGroup = React.forwardRef(
1155
- (props, forwardedRef) => {
1156
- const { __scopeDropdownMenu, ...groupProps } = props;
1157
- const menuScope = useMenuScope(__scopeDropdownMenu);
1158
- return /* @__PURE__ */ jsx(Group, { ...menuScope, ...groupProps, ref: forwardedRef });
1159
- }
1160
- );
1161
- DropdownMenuGroup.displayName = GROUP_NAME;
1162
- var LABEL_NAME = "DropdownMenuLabel";
1163
- var DropdownMenuLabel = React.forwardRef(
1164
- (props, forwardedRef) => {
1165
- const { __scopeDropdownMenu, ...labelProps } = props;
1166
- const menuScope = useMenuScope(__scopeDropdownMenu);
1167
- return /* @__PURE__ */ jsx(Label, { ...menuScope, ...labelProps, ref: forwardedRef });
1168
- }
1169
- );
1170
- DropdownMenuLabel.displayName = LABEL_NAME;
1171
- var ITEM_NAME = "DropdownMenuItem";
1172
- var DropdownMenuItem = React.forwardRef(
1173
- (props, forwardedRef) => {
1174
- const { __scopeDropdownMenu, ...itemProps } = props;
1175
- const menuScope = useMenuScope(__scopeDropdownMenu);
1176
- return /* @__PURE__ */ jsx(Item2$1, { ...menuScope, ...itemProps, ref: forwardedRef });
1177
- }
1178
- );
1179
- DropdownMenuItem.displayName = ITEM_NAME;
1180
- var CHECKBOX_ITEM_NAME = "DropdownMenuCheckboxItem";
1181
- var DropdownMenuCheckboxItem = React.forwardRef((props, forwardedRef) => {
1182
- const { __scopeDropdownMenu, ...checkboxItemProps } = props;
1183
- const menuScope = useMenuScope(__scopeDropdownMenu);
1184
- return /* @__PURE__ */ jsx(CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });
1185
- });
1186
- DropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;
1187
- var RADIO_GROUP_NAME = "DropdownMenuRadioGroup";
1188
- var DropdownMenuRadioGroup = React.forwardRef((props, forwardedRef) => {
1189
- const { __scopeDropdownMenu, ...radioGroupProps } = props;
1190
- const menuScope = useMenuScope(__scopeDropdownMenu);
1191
- return /* @__PURE__ */ jsx(RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });
1192
- });
1193
- DropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;
1194
- var RADIO_ITEM_NAME = "DropdownMenuRadioItem";
1195
- var DropdownMenuRadioItem = React.forwardRef((props, forwardedRef) => {
1196
- const { __scopeDropdownMenu, ...radioItemProps } = props;
1197
- const menuScope = useMenuScope(__scopeDropdownMenu);
1198
- return /* @__PURE__ */ jsx(RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });
1199
- });
1200
- DropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;
1201
- var INDICATOR_NAME = "DropdownMenuItemIndicator";
1202
- var DropdownMenuItemIndicator = React.forwardRef((props, forwardedRef) => {
1203
- const { __scopeDropdownMenu, ...itemIndicatorProps } = props;
1204
- const menuScope = useMenuScope(__scopeDropdownMenu);
1205
- return /* @__PURE__ */ jsx(ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });
1206
- });
1207
- DropdownMenuItemIndicator.displayName = INDICATOR_NAME;
1208
- var SEPARATOR_NAME = "DropdownMenuSeparator";
1209
- var DropdownMenuSeparator = React.forwardRef((props, forwardedRef) => {
1210
- const { __scopeDropdownMenu, ...separatorProps } = props;
1211
- const menuScope = useMenuScope(__scopeDropdownMenu);
1212
- return /* @__PURE__ */ jsx(Separator, { ...menuScope, ...separatorProps, ref: forwardedRef });
1213
- });
1214
- DropdownMenuSeparator.displayName = SEPARATOR_NAME;
1215
- var ARROW_NAME = "DropdownMenuArrow";
1216
- var DropdownMenuArrow = React.forwardRef(
1217
- (props, forwardedRef) => {
1218
- const { __scopeDropdownMenu, ...arrowProps } = props;
1219
- const menuScope = useMenuScope(__scopeDropdownMenu);
1220
- return /* @__PURE__ */ jsx(Arrow2, { ...menuScope, ...arrowProps, ref: forwardedRef });
1221
- }
1222
- );
1223
- DropdownMenuArrow.displayName = ARROW_NAME;
1224
- var DropdownMenuSub = (props) => {
1225
- const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;
1226
- const menuScope = useMenuScope(__scopeDropdownMenu);
1227
- const [open = false, setOpen] = useControllableState({
1228
- prop: openProp,
1229
- defaultProp: defaultOpen,
1230
- onChange: onOpenChange
1231
- });
1232
- return /* @__PURE__ */ jsx(Sub, { ...menuScope, open, onOpenChange: setOpen, children });
1233
- };
1234
- var SUB_TRIGGER_NAME = "DropdownMenuSubTrigger";
1235
- var DropdownMenuSubTrigger = React.forwardRef((props, forwardedRef) => {
1236
- const { __scopeDropdownMenu, ...subTriggerProps } = props;
1237
- const menuScope = useMenuScope(__scopeDropdownMenu);
1238
- return /* @__PURE__ */ jsx(SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });
1239
- });
1240
- DropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;
1241
- var SUB_CONTENT_NAME = "DropdownMenuSubContent";
1242
- var DropdownMenuSubContent = React.forwardRef((props, forwardedRef) => {
1243
- const { __scopeDropdownMenu, ...subContentProps } = props;
1244
- const menuScope = useMenuScope(__scopeDropdownMenu);
1245
- return /* @__PURE__ */ jsx(
1246
- SubContent,
1247
- {
1248
- ...menuScope,
1249
- ...subContentProps,
1250
- ref: forwardedRef,
1251
- style: {
1252
- ...props.style,
1253
- // re-namespace exposed content custom properties
1254
- ...{
1255
- "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
1256
- "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
1257
- "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
1258
- "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
1259
- "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
1260
- }
1261
- }
1262
- }
1263
- );
1264
- });
1265
- DropdownMenuSubContent.displayName = SUB_CONTENT_NAME;
1266
- var Root2 = DropdownMenu;
1267
- var Trigger = DropdownMenuTrigger;
1268
- var Portal2 = DropdownMenuPortal;
1269
- var Content2 = DropdownMenuContent;
1270
- var Group2 = DropdownMenuGroup;
1271
- var Item2 = DropdownMenuItem;
1272
- var CheckboxItem2 = DropdownMenuCheckboxItem;
1273
- var RadioGroup2 = DropdownMenuRadioGroup;
1274
- var RadioItem2 = DropdownMenuRadioItem;
1275
- var Separator2 = DropdownMenuSeparator;
1276
- var Sub2 = DropdownMenuSub;
1277
- var SubTrigger2 = DropdownMenuSubTrigger;
1278
- var SubContent2 = DropdownMenuSubContent;
1279
-
1280
- /**
1281
- * The component that pops out when the dropdown menu is open.
1282
- */
1283
- var MenuContent = React__default.forwardRef(function (_a, ref) {
1284
- var children = _a.children, width = _a.width, minWidth = _a.minWidth, maxWidth = _a.maxWidth, _b = _a.align, align = _b === void 0 ? "start" : _b, alignOffset = _a.alignOffset, side = _a.side, props = __rest(_a, ["children", "width", "minWidth", "maxWidth", "align", "alignOffset", "side"]);
1285
- return (React__default.createElement(Content2, __assign({ ref: ref, style: { width: width, minWidth: minWidth, maxWidth: maxWidth }, className: "arc-MenuContent", sideOffset: 12, loop: true, collisionPadding: 12, forceMount: true, align: align, alignOffset: alignOffset, side: side }, filterAttrs(props)), children));
1286
- });
1287
-
1288
- /**
1289
- * The multi-level menu content that pops out when a menu item with children is hovered or clicked.
1290
- */
1291
- var MenuItemMultiLevelContent = React__default.forwardRef(function (_a, ref) {
1292
- var children = _a.children, width = _a.width, minWidth = _a.minWidth, maxWidth = _a.maxWidth, alignOffset = _a.alignOffset, props = __rest(_a, ["children", "width", "minWidth", "maxWidth", "alignOffset"]);
1293
- return (React__default.createElement(SubContent2, __assign({ ref: ref, style: { width: width, minWidth: minWidth, maxWidth: maxWidth }, className: "arc-MenuContent", sideOffset: 24, collisionPadding: 12, avoidCollisions: true, alignOffset: alignOffset }, filterAttrs(props)), children));
1294
- });
1295
-
1296
- export { CheckboxItem2 as C, Group2 as G, Item2 as I, MenuContent as M, Portal2 as P, Root2 as R, Separator2 as S, Trigger as T, RadioGroup2 as a, RadioItem2 as b, Sub2 as c, SubTrigger2 as d, MenuItemMultiLevelContent as e };