@arc-ui/components 12.0.0-beta.16 → 12.0.0-beta.18

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 (251) hide show
  1. package/lib/Alert/Alert.cjs +1 -1
  2. package/lib/Alert/Alert.mjs +1 -1
  3. package/lib/Alert/styles.css +1 -1
  4. package/lib/Align/styles.css +1 -1
  5. package/lib/AppButton/styles.css +1 -1
  6. package/lib/Avatar/styles.css +1 -1
  7. package/lib/AvatarGroup/styles.css +1 -1
  8. package/lib/Badge/styles.css +1 -1
  9. package/lib/Banner/Banner.cjs +6 -6
  10. package/lib/Banner/Banner.mjs +6 -6
  11. package/lib/Box/styles.css +1 -1
  12. package/lib/BrandLogo/styles.css +1 -1
  13. package/lib/Breadcrumbs/Breadcrumbs.cjs +2 -2
  14. package/lib/Breadcrumbs/Breadcrumbs.mjs +2 -2
  15. package/lib/Breadcrumbs/styles.css +1 -1
  16. package/lib/Button/Button.cjs +2 -2
  17. package/lib/Button/Button.mjs +2 -2
  18. package/lib/Button/styles.css +1 -1
  19. package/lib/ButtonGroup/ButtonGroup.cjs +3 -3
  20. package/lib/ButtonGroup/ButtonGroup.mjs +3 -3
  21. package/lib/ButtonGroup/styles.css +1 -1
  22. package/lib/ButtonV2/ButtonV2.cjs +2 -2
  23. package/lib/ButtonV2/ButtonV2.mjs +2 -2
  24. package/lib/ButtonV2/styles.css +1 -1
  25. package/lib/Calendar/Calendar.cjs +4 -4
  26. package/lib/Calendar/Calendar.mjs +4 -4
  27. package/lib/Calendar/styles.css +1 -1
  28. package/lib/CardFooter/CardFooter.cjs +2 -4
  29. package/lib/CardFooter/CardFooter.mjs +2 -4
  30. package/lib/CardFooter/styles.css +1 -1
  31. package/lib/CardHeading/styles.css +1 -1
  32. package/lib/Carousel/Carousel.cjs +1 -1
  33. package/lib/Carousel/Carousel.mjs +1 -1
  34. package/lib/Carousel/styles.css +1 -1
  35. package/lib/Checkbox/styles.css +1 -1
  36. package/lib/Columns/styles.css +1 -1
  37. package/lib/ComboBox/ComboBox.cjs +6 -6
  38. package/lib/ComboBox/ComboBox.mjs +6 -6
  39. package/lib/ComboBox/styles.css +1 -1
  40. package/lib/ContentSwitcher/styles.css +1 -1
  41. package/lib/ContentSwitcherDropdown/ContentSwitcherDropdown.cjs +6 -4
  42. package/lib/ContentSwitcherDropdown/ContentSwitcherDropdown.mjs +6 -4
  43. package/lib/ContentSwitcherDropdown/styles.css +1 -1
  44. package/lib/DatePicker/DatePicker.cjs +9 -9
  45. package/lib/DatePicker/DatePicker.mjs +9 -9
  46. package/lib/DatePicker/styles.css +1 -1
  47. package/lib/Disclosure/styles.css +1 -1
  48. package/lib/DisclosureMini/styles.css +1 -1
  49. package/lib/Download/styles.css +1 -1
  50. package/lib/Drawer/Drawer.cjs +3 -3
  51. package/lib/Drawer/Drawer.mjs +3 -3
  52. package/lib/Drawer/styles.css +1 -1
  53. package/lib/Elevation/styles.css +1 -1
  54. package/lib/Filter/styles.css +1 -1
  55. package/lib/FormControl/styles.css +1 -1
  56. package/lib/GhostedHeroBanner/GhostedHeroBanner.cjs +31 -0
  57. package/lib/GhostedHeroBanner/GhostedHeroBanner.mjs +29 -0
  58. package/lib/GhostedHeroBanner/styles.css +1 -0
  59. package/lib/GradientBackground/GradientBackground.cjs +19 -0
  60. package/lib/GradientBackground/GradientBackground.mjs +17 -0
  61. package/lib/GradientBackground/styles.css +1 -0
  62. package/lib/Grid/styles.css +1 -1
  63. package/lib/Group/styles.css +1 -1
  64. package/lib/Heading/styles.css +1 -1
  65. package/lib/HeroBanner/HeroBanner.cjs +6 -6
  66. package/lib/HeroBanner/HeroBanner.mjs +6 -6
  67. package/lib/HeroBanner/styles.css +1 -1
  68. package/lib/HeroButton/HeroButton.cjs +2 -2
  69. package/lib/HeroButton/HeroButton.mjs +2 -2
  70. package/lib/HeroButton/styles.css +1 -1
  71. package/lib/Hidden/styles.css +1 -1
  72. package/lib/HorizontalCard/HorizontalCard.cjs +2 -4
  73. package/lib/HorizontalCard/HorizontalCard.mjs +2 -4
  74. package/lib/HorizontalCard/styles.css +1 -1
  75. package/lib/Icon/Icon.cjs +1 -1
  76. package/lib/Icon/Icon.mjs +1 -1
  77. package/lib/Icon/styles.css +1 -1
  78. package/lib/Image/styles.css +1 -1
  79. package/lib/ImpactCard/ImpactCard.cjs +2 -4
  80. package/lib/ImpactCard/ImpactCard.mjs +2 -4
  81. package/lib/ImpactCard/styles.css +1 -1
  82. package/lib/InformationCard/InformationCard.cjs +4 -4
  83. package/lib/InformationCard/InformationCard.mjs +4 -4
  84. package/lib/InformationCard/styles.css +1 -1
  85. package/lib/Link/Link.cjs +9 -22
  86. package/lib/Link/Link.mjs +9 -22
  87. package/lib/Link/styles.css +1 -1
  88. package/lib/Markup/styles.css +1 -1
  89. package/lib/MediaCard/MediaCard.cjs +4 -6
  90. package/lib/MediaCard/MediaCard.mjs +4 -6
  91. package/lib/MediaCard/styles.css +1 -1
  92. package/lib/Menu/Menu.cjs +261 -0
  93. package/lib/Menu/Menu.mjs +243 -0
  94. package/lib/Menu/styles.css +1 -0
  95. package/lib/Modal/Modal.cjs +18 -12
  96. package/lib/Modal/Modal.mjs +18 -12
  97. package/lib/Modal/styles.css +1 -1
  98. package/lib/Pagination/styles.css +1 -1
  99. package/lib/PaginationSimple/PaginationSimple.cjs +15 -49
  100. package/lib/PaginationSimple/PaginationSimple.mjs +15 -49
  101. package/lib/PaginationSimple/styles.css +1 -1
  102. package/lib/Popover/Popover.cjs +7 -7
  103. package/lib/Popover/Popover.mjs +7 -7
  104. package/lib/Popover/styles.css +1 -1
  105. package/lib/Poster/styles.css +1 -1
  106. package/lib/ProgressBar/styles.css +1 -1
  107. package/lib/ProgressStepper/ProgressStepper.cjs +8 -23
  108. package/lib/ProgressStepper/ProgressStepper.mjs +8 -23
  109. package/lib/ProgressStepper/styles.css +1 -1
  110. package/lib/RadioCardGroup/RadioCardGroup.cjs +2 -2
  111. package/lib/RadioCardGroup/RadioCardGroup.mjs +3 -3
  112. package/lib/RadioCardGroup/styles.css +1 -1
  113. package/lib/RadioGroup/styles.css +1 -1
  114. package/lib/Rule/styles.css +1 -1
  115. package/lib/ScrollToTop/ScrollToTop.cjs +8 -17
  116. package/lib/ScrollToTop/ScrollToTop.mjs +8 -17
  117. package/lib/ScrollToTop/styles.css +1 -1
  118. package/lib/Section/styles.css +1 -1
  119. package/lib/Select/Select.cjs +4 -3
  120. package/lib/Select/Select.mjs +4 -3
  121. package/lib/Select/styles.css +1 -1
  122. package/lib/SiteFooter/SiteFooter.cjs +1 -1
  123. package/lib/SiteFooter/SiteFooter.mjs +1 -1
  124. package/lib/SiteFooter/styles.css +1 -1
  125. package/lib/SiteFooterV2/SiteFooterV2.cjs +5 -5
  126. package/lib/SiteFooterV2/SiteFooterV2.mjs +5 -5
  127. package/lib/SiteFooterV2/styles.css +1 -1
  128. package/lib/SiteHeaderV2/SiteHeaderV2.cjs +11 -11
  129. package/lib/SiteHeaderV2/SiteHeaderV2.mjs +12 -12
  130. package/lib/SiteHeaderV2/styles.css +1 -1
  131. package/lib/Skeleton/styles.css +1 -1
  132. package/lib/SkipLink/styles.css +1 -1
  133. package/lib/Spinner/styles.css +1 -1
  134. package/lib/Surface/styles.css +1 -1
  135. package/lib/Switch/Switch.cjs +3 -2
  136. package/lib/Switch/Switch.mjs +3 -2
  137. package/lib/Switch/styles.css +1 -1
  138. package/lib/TabbedBanner/TabbedBanner.cjs +13 -10
  139. package/lib/TabbedBanner/TabbedBanner.mjs +13 -10
  140. package/lib/TabbedBanner/styles.css +1 -1
  141. package/lib/Tabs/Tabs.cjs +1 -1
  142. package/lib/Tabs/Tabs.mjs +1 -1
  143. package/lib/Tabs/styles.css +1 -1
  144. package/lib/Tag/Tag.cjs +15 -37
  145. package/lib/Tag/Tag.mjs +15 -37
  146. package/lib/Tag/styles.css +1 -1
  147. package/lib/TemplateBanner/TemplateBanner.cjs +6 -6
  148. package/lib/TemplateBanner/TemplateBanner.mjs +6 -6
  149. package/lib/TemplateBanner/styles.css +1 -1
  150. package/lib/Text/styles.css +1 -1
  151. package/lib/TextArea/TextArea.cjs +34 -26
  152. package/lib/TextArea/TextArea.mjs +34 -26
  153. package/lib/TextArea/styles.css +1 -1
  154. package/lib/TextInput/styles.css +1 -1
  155. package/lib/Theme/Theme.cjs +1 -1
  156. package/lib/Theme/Theme.mjs +1 -1
  157. package/lib/Theme/styles.css +1 -1
  158. package/lib/ThemeIcon/styles.css +1 -1
  159. package/lib/ThumbnailSignpost/ThumbnailSignpost.cjs +4 -4
  160. package/lib/ThumbnailSignpost/ThumbnailSignpost.mjs +4 -4
  161. package/lib/ThumbnailSignpost/styles.css +1 -1
  162. package/lib/Toast/styles.css +1 -1
  163. package/lib/Tooltip/Tooltip.cjs +1 -1
  164. package/lib/Tooltip/Tooltip.mjs +1 -1
  165. package/lib/Tooltip/styles.css +1 -1
  166. package/lib/Truncate/styles.css +1 -1
  167. package/lib/TypographyCard/TypographyCard.cjs +2 -4
  168. package/lib/TypographyCard/TypographyCard.mjs +2 -4
  169. package/lib/TypographyCard/styles.css +1 -1
  170. package/lib/UniversalHeader/styles.css +1 -1
  171. package/lib/VerticalSpace/styles.css +1 -1
  172. package/lib/VideoPlayer/VideoPlayer.cjs +12 -5
  173. package/lib/VideoPlayer/VideoPlayer.mjs +12 -5
  174. package/lib/VideoPlayer/styles.css +1 -1
  175. package/lib/Visible/styles.css +1 -1
  176. package/lib/VisuallyHidden/styles.css +1 -1
  177. package/lib/_shared/cjs/BannerImage-kdAKagG-.cjs +13 -0
  178. package/lib/_shared/cjs/BtIconArrowRight-Bm5PIn_6.cjs +11 -0
  179. package/lib/_shared/cjs/BtIconChevronRight2Px-CIRaur2B.cjs +20 -0
  180. package/lib/_shared/cjs/BtIconChevronRightMid-eGxk3ae6.cjs +11 -0
  181. package/lib/_shared/cjs/{Button-b36K7-Cf.cjs → Button-CKTa6bQL.cjs} +1 -1
  182. package/lib/_shared/cjs/{ButtonV2-s8OF4enU.cjs → ButtonV2-CRNNZ_nd.cjs} +15 -4
  183. package/lib/_shared/cjs/{Calendar-D58QIWQz.cjs → Calendar-C5C0evEy.cjs} +17 -40
  184. package/lib/_shared/cjs/{CardFooter-B2ljCf25.cjs → CardFooter-DwE-u0Om.cjs} +9 -45
  185. package/lib/_shared/cjs/{Combination-iNPq-pNP.cjs → Combination-B-rSVLfT.cjs} +2 -0
  186. package/lib/_shared/cjs/{ComboBox-CmVMpsxn.cjs → ComboBox-BIMxZhJp.cjs} +10 -20
  187. package/lib/_shared/cjs/{ContentSwitcherDropdown-CWP2-zun.cjs → ContentSwitcherDropdown-CAWaAMZN.cjs} +4 -2
  188. package/lib/_shared/cjs/{DatePicker-Cx5VZpwJ.cjs → DatePicker-BgU6iidG.cjs} +2 -2
  189. package/lib/_shared/cjs/HeroButton-CiIygZ16.cjs +82 -0
  190. package/lib/_shared/cjs/Icon-KMACQ1i3.cjs +39 -0
  191. package/lib/_shared/cjs/{MediaCard-DkTTTQNz.cjs → MediaCard-kcqfmeue.cjs} +2 -2
  192. package/lib/_shared/cjs/MenuSubContent-Bs2_ebS3.cjs +1330 -0
  193. package/lib/_shared/cjs/{RadioCardGroupInput-DT0Xce4L.cjs → RadioCardGroupInput-BmntgyWB.cjs} +1 -1
  194. package/lib/_shared/cjs/{SiteHeaderV2NavItemWithSubNav-XnnzUfOs.cjs → SiteHeaderV2NavItemWithSubNav-DgoCW2W3.cjs} +8 -7
  195. package/lib/_shared/cjs/{TemplateBanner-BCbI7NLb.cjs → TemplateBanner-BMi77IGK.cjs} +10 -18
  196. package/lib/_shared/cjs/{index-DbQ2PCr3.cjs → index-Bt7hfZBc.cjs} +1 -1
  197. package/lib/_shared/cjs/{index-BcWpGxUd.cjs → index-C_Rl7v2g.cjs} +27 -94
  198. package/lib/_shared/cjs/{index-Cn7XSNle.cjs → index-CaO6cOF0.cjs} +3 -3
  199. package/lib/_shared/cjs/index-CqYNiqix.cjs +137 -0
  200. package/lib/_shared/cjs/{index-BMs6MHwq.cjs → index-DAr_oO4-.cjs} +2 -2
  201. package/lib/_shared/cjs/{index-DNgUhsBO.cjs → index-Dv1xvB_E.cjs} +1 -1
  202. package/lib/_shared/cjs/index-EFXw1jWg.cjs +97 -0
  203. package/lib/_shared/cjs/{index.es-CY6h69at.cjs → index.es-sqSQUWYg.cjs} +1 -1
  204. package/lib/_shared/esm/BannerImage-BTsixvUH.mjs +11 -0
  205. package/lib/_shared/esm/BtIconArrowRight-DpUmY3g3.mjs +9 -0
  206. package/lib/_shared/esm/BtIconChevronRight2Px-DzWb16fR.mjs +17 -0
  207. package/lib/_shared/esm/BtIconChevronRightMid-DE4lmVaG.mjs +9 -0
  208. package/lib/_shared/esm/{Button-DtmI3xYm.mjs → Button-9L4AksQP.mjs} +1 -1
  209. package/lib/_shared/esm/{ButtonV2-CkFdHviV.mjs → ButtonV2-2U4PvnpS.mjs} +15 -4
  210. package/lib/_shared/esm/{Calendar-C_b271wl.mjs → Calendar-L6u3D8xb.mjs} +17 -40
  211. package/lib/_shared/esm/{CardFooter-6APGUbK4.mjs → CardFooter-CgDDDI7Z.mjs} +9 -45
  212. package/lib/_shared/esm/{Combination-CFD0IA8r.mjs → Combination-BpO6XTeS.mjs} +1 -1
  213. package/lib/_shared/esm/{ComboBox-CTx_umV_.mjs → ComboBox-DUTrEu0N.mjs} +10 -20
  214. package/lib/_shared/esm/{ContentSwitcherDropdown-DuN_n1jh.mjs → ContentSwitcherDropdown-dktkyAjY.mjs} +4 -2
  215. package/lib/_shared/esm/{DatePicker-CIdfpUqM.mjs → DatePicker-CccSfg17.mjs} +2 -2
  216. package/lib/_shared/esm/HeroButton-HYskwyvn.mjs +80 -0
  217. package/lib/_shared/esm/Icon-MZfaoOo9.mjs +36 -0
  218. package/lib/_shared/esm/{MediaCard-_6xVVmiF.mjs → MediaCard-CjTDOvmx.mjs} +2 -2
  219. package/lib/_shared/esm/MenuSubContent-Cv9mSn58.mjs +1297 -0
  220. package/lib/_shared/esm/{RadioCardGroupInput-CwYJBtmO.mjs → RadioCardGroupInput-Cy1r7M8l.mjs} +1 -1
  221. package/lib/_shared/esm/{SiteHeaderV2NavItemWithSubNav-C_rohQhn.mjs → SiteHeaderV2NavItemWithSubNav-BLqiSeEC.mjs} +8 -7
  222. package/lib/_shared/esm/{TemplateBanner-Cckao4N8.mjs → TemplateBanner-zc4VmeeW.mjs} +10 -18
  223. package/lib/_shared/esm/index-BbAu4d3T.mjs +76 -0
  224. package/lib/_shared/esm/index-CL6dwOYV.mjs +135 -0
  225. package/lib/_shared/esm/{index-CpOcAL8k.mjs → index-CYUcQl4W.mjs} +3 -71
  226. package/lib/_shared/esm/{index-ZYyu0Vjh.mjs → index-CxrL7jIX.mjs} +3 -3
  227. package/lib/_shared/esm/{index-DNxTGgc1.mjs → index-DLovItWo.mjs} +1 -1
  228. package/lib/_shared/esm/{index-BUp5JjoD.mjs → index-DXTwueLZ.mjs} +1 -1
  229. package/lib/_shared/esm/{index-pkbjTTz_.mjs → index-J5IHetgg.mjs} +2 -2
  230. package/lib/_shared/esm/{index.es-JItYKukj.mjs → index.es-C3WGtwrW.mjs} +2 -2
  231. package/lib/index.cjs +2457 -1014
  232. package/lib/index.cjs.map +1 -1
  233. package/lib/index.d.cts +800 -431
  234. package/lib/index.d.mts +800 -431
  235. package/lib/index.js.map +1 -1
  236. package/lib/index.mjs +2437 -1014
  237. package/lib/index.mjs.map +1 -1
  238. package/lib/styles.css +22 -8
  239. package/package.json +11 -8
  240. package/lib/_shared/cjs/BtIconArrowRight-BX-bj8Y6.cjs +0 -27
  241. package/lib/_shared/cjs/BtIconChevronRight2Px-CnplmEFZ.cjs +0 -41
  242. package/lib/_shared/cjs/BtIconChevronRightMid-C6zjDEMv.cjs +0 -25
  243. package/lib/_shared/cjs/BtIconPlayFill-WUt-9eLl.cjs +0 -27
  244. package/lib/_shared/cjs/HeroButton-CrsC6Q7A.cjs +0 -124
  245. package/lib/_shared/cjs/Icon-DdqFr6bT.cjs +0 -52
  246. package/lib/_shared/esm/BtIconArrowRight-CTjAzV9X.mjs +0 -25
  247. package/lib/_shared/esm/BtIconChevronRight2Px-CWIIvs1E.mjs +0 -38
  248. package/lib/_shared/esm/BtIconChevronRightMid-DB68JQ0u.mjs +0 -23
  249. package/lib/_shared/esm/BtIconPlayFill-DEoVOrOQ.mjs +0 -25
  250. package/lib/_shared/esm/HeroButton-x7krReay.mjs +0 -122
  251. package/lib/_shared/esm/Icon-B626JGP1.mjs +0 -49
@@ -0,0 +1,261 @@
1
+ 'use strict';
2
+
3
+ var filterAttrs = require('../_shared/cjs/filter-attrs-eK6E_34o.cjs');
4
+ var React = require('react');
5
+ var MenuSubContent = require('../_shared/cjs/MenuSubContent-Bs2_ebS3.cjs');
6
+ var index = require('../_shared/cjs/index-CTlXMLug.cjs');
7
+ var Icon = require('../_shared/cjs/Icon-KMACQ1i3.cjs');
8
+ var Text = require('../_shared/cjs/Text-Cr5nmYmx.cjs');
9
+ var Rule = require('../_shared/cjs/Rule-DMQsi2L6.cjs');
10
+ var index$1 = require('../_shared/cjs/index-DXNM3D1d.cjs');
11
+ var BtIconChevronRightMid = require('../_shared/cjs/BtIconChevronRightMid-eGxk3ae6.cjs');
12
+ require('../_shared/cjs/Combination-B-rSVLfT.cjs');
13
+ require('react/jsx-runtime');
14
+ require('react-dom');
15
+ require('../_shared/cjs/index-EFXw1jWg.cjs');
16
+ require('../_shared/cjs/index-Bt7hfZBc.cjs');
17
+ require('../_shared/cjs/index-B11wQrRa.cjs');
18
+ require('../_shared/cjs/index-Dv1xvB_E.cjs');
19
+ require('../_shared/cjs/suffix-modifier-DLUGR-yG.cjs');
20
+ require('../_shared/cjs/index-DR8Rkav9.cjs');
21
+ require('../_shared/cjs/Surface-BFx1yNsq.cjs');
22
+
23
+ /**
24
+ * Contains all the parts of a dropdown menu.
25
+ */
26
+ var Menu = function (_a) {
27
+ var defaultOpen = _a.defaultOpen, open = _a.open, onOpenChange = _a.onOpenChange, _b = _a.modal, modal = _b === void 0 ? false : _b, children = _a.children, props = filterAttrs.__rest(_a, ["defaultOpen", "open", "onOpenChange", "modal", "children"]);
28
+ return (React.createElement(MenuSubContent.Root2, filterAttrs.__assign({ defaultOpen: defaultOpen, open: open, onOpenChange: onOpenChange, modal: modal }, filterAttrs.filterAttrs(props)), children));
29
+ };
30
+
31
+ var MenuItemContentTemplate = function (_a) {
32
+ var leadingIcon = _a.leadingIcon, supportingText = _a.supportingText, keyCommands = _a.keyCommands, trailingIcon = _a.trailingIcon, children = _a.children;
33
+ return (React.createElement(React.Fragment, null,
34
+ React.createElement("div", { className: "arc-MenuItem-content" },
35
+ leadingIcon && (React.createElement("div", { className: "arc-MenuItem-leadingIcon" },
36
+ React.createElement(Icon.Icon, { icon: leadingIcon, size: 24 }))),
37
+ React.createElement("div", { className: "arc-MenuItem-text" },
38
+ React.createElement(Text.Text, { size: "m" }, children),
39
+ supportingText && React.createElement(Text.Text, { size: "xs" }, supportingText))),
40
+ keyCommands || trailingIcon ? (React.createElement("div", { className: "arc-MenuItem-actions" },
41
+ keyCommands && (React.createElement("div", { className: "arc-MenuItem-keyCommands" }, keyCommands)),
42
+ trailingIcon && (React.createElement("div", { className: "arc-MenuItem-trailingIcon" },
43
+ React.createElement(Icon.Icon, { icon: trailingIcon, size: 24 }))))) : null));
44
+ };
45
+
46
+ var MenuCheckboxItem = function (_a) {
47
+ var children = _a.children, checked = _a.checked, onCheckedChange = _a.onCheckedChange, isDisabled = _a.isDisabled, onSelect = _a.onSelect, id = _a.id, _b = _a.shouldKeepOpen, shouldKeepOpen = _b === void 0 ? true : _b, props = filterAttrs.__rest(_a, ["children", "checked", "onCheckedChange", "isDisabled", "onSelect", "id", "shouldKeepOpen"]);
48
+ return (React.createElement(MenuSubContent.CheckboxItem2, filterAttrs.__assign({ className: "arc-MenuItem arc-MenuCheckboxItem", checked: checked, onCheckedChange: onCheckedChange, disabled: isDisabled, onSelect: function (event) {
49
+ if (shouldKeepOpen) {
50
+ event.preventDefault();
51
+ onCheckedChange === null || onCheckedChange === void 0 ? void 0 : onCheckedChange(!checked);
52
+ }
53
+ onSelect === null || onSelect === void 0 ? void 0 : onSelect(event);
54
+ }, id: id }, filterAttrs.filterAttrs(props)),
55
+ React.createElement("div", { className: index.classNames("arc-MenuCheckboxItem-box", {
56
+ "arc-MenuCheckboxItem-box--checked": checked,
57
+ }) }, checked && (React.createElement("svg", { style: { width: 14, height: 11 }, viewBox: "0 0 18 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
58
+ React.createElement("path", { d: "M5.99459 14L0.350576 8.23277C0.126079 8.00285 0 7.69132 0 7.36653C0 7.04173 0.126079 6.7302 0.350576 6.50028C0.578979 6.27752 0.88258 6.15324 1.19832 6.15324C1.51405 6.15324 1.81765 6.27752 2.04606 6.50028L5.99459 10.535L15.9385 0.374054C16.0491 0.25703 16.1814 0.163688 16.3277 0.0994738C16.474 0.0352599 16.6313 0.00145997 16.7905 4.626e-05C16.9497 -0.00136745 17.1076 0.0296342 17.255 0.0912406C17.4023 0.152847 17.5362 0.243825 17.6488 0.358867C17.7614 0.473908 17.8504 0.610709 17.9107 0.761287C17.971 0.911865 18.0013 1.0732 18 1.23589C17.9986 1.39858 17.9655 1.55936 17.9026 1.70884C17.8398 1.85833 17.7485 1.99352 17.6339 2.10655L5.99459 14Z", fill: "currentColor" })))),
59
+ React.createElement(MenuItemContentTemplate, null, children)));
60
+ };
61
+
62
+ /**
63
+ * Displays footer content at the bottom of the menu.
64
+ */
65
+ var MenuFooter = function (_a) {
66
+ var leadingIcon = _a.leadingIcon, trailingIcon = _a.trailingIcon, supportingText = _a.supportingText, keyCommands = _a.keyCommands, children = _a.children, onClick = _a.onClick, isDisabled = _a.isDisabled, ariaLabel = _a.ariaLabel;
67
+ return (React.createElement("div", { className: "arc-MenuFooter", style: {
68
+ position: "relative",
69
+ } },
70
+ React.createElement("div", { style: {
71
+ height: "12px",
72
+ background: "linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))",
73
+ position: "absolute",
74
+ width: "100%",
75
+ zIndex: 3,
76
+ top: -12,
77
+ } }),
78
+ React.createElement("div", { className: "arc-MenuSeparator", style: { paddingTop: 0 } },
79
+ React.createElement(Rule.Rule, null)),
80
+ React.createElement(MenuSubContent.Item2, { className: "arc-MenuItem", "aria-label": ariaLabel, onClick: onClick, disabled: isDisabled },
81
+ React.createElement(MenuItemContentTemplate, { leadingIcon: leadingIcon, trailingIcon: trailingIcon, supportingText: supportingText, keyCommands: keyCommands }, children))));
82
+ };
83
+
84
+ /**
85
+ * Groups related menu items together within a dropdown menu.
86
+ */
87
+ var MenuGroup = function (_a) {
88
+ var children = _a.children, props = filterAttrs.__rest(_a, ["children"]);
89
+ return (React.createElement(MenuSubContent.Group2, filterAttrs.__assign({ className: "arc-MenuGroup" }, filterAttrs.filterAttrs(props)), children));
90
+ };
91
+
92
+ /**
93
+ * Displays a header within the dropdown menu.
94
+ */
95
+ var MenuHeader = function (_a) {
96
+ var leadingIcon = _a.leadingIcon, trailingIcon = _a.trailingIcon, supportingText = _a.supportingText, keyCommands = _a.keyCommands, children = _a.children, onClick = _a.onClick, isDisabled = _a.isDisabled, ariaLabel = _a.ariaLabel;
97
+ return (React.createElement("div", { className: "arc-MenuHeader" },
98
+ React.createElement(MenuSubContent.Item2, { className: "arc-MenuItem ", style: { marginBottom: 0 }, "aria-label": ariaLabel, onClick: onClick, disabled: isDisabled },
99
+ React.createElement(MenuItemContentTemplate, { leadingIcon: leadingIcon, trailingIcon: trailingIcon, supportingText: supportingText, keyCommands: keyCommands }, children)),
100
+ React.createElement("div", { className: "arc-MenuSeparator", style: {
101
+ paddingBottom: 0,
102
+ } },
103
+ React.createElement(Rule.Rule, null),
104
+ React.createElement("div", { style: {
105
+ height: "12px",
106
+ background: "linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))",
107
+ position: "absolute",
108
+ width: "100%",
109
+ zIndex: 3,
110
+ } }))));
111
+ };
112
+
113
+ /**
114
+ * Renders a menu item, optionally as a link if `href` is provided.
115
+ */
116
+ var MenuItem = function (_a) {
117
+ var leadingIcon = _a.leadingIcon, supportingText = _a.supportingText, keyCommands = _a.keyCommands, trailingIcon = _a.trailingIcon, children = _a.children, onClick = _a.onClick, _b = _a.shouldKeepOpen, shouldKeepOpen = _b === void 0 ? true : _b, isDisabled = _a.isDisabled, href = _a.href, ariaLabel = _a.ariaLabel, props = filterAttrs.__rest(_a, ["leadingIcon", "supportingText", "keyCommands", "trailingIcon", "children", "onClick", "shouldKeepOpen", "isDisabled", "href", "ariaLabel"]);
118
+ var Component = href ? "a" : "div";
119
+ return (React.createElement(MenuSubContent.Item2, filterAttrs.__assign({ className: "arc-MenuItem", asChild: true, "aria-label": ariaLabel, onClick: onClick, onSelect: function (event) {
120
+ if (shouldKeepOpen) {
121
+ event.preventDefault();
122
+ }
123
+ }, disabled: isDisabled }, filterAttrs.filterAttrs(props)),
124
+ React.createElement(Component, filterAttrs.__assign({ className: href && "arc-MenuItem--link", href: href }, props),
125
+ React.createElement(MenuItemContentTemplate, { leadingIcon: leadingIcon, trailingIcon: trailingIcon, supportingText: supportingText, keyCommands: keyCommands }, children))));
126
+ };
127
+
128
+ /**
129
+ * Provides a label to group related menu items.
130
+ */
131
+ var MenuLabel = function (_a) {
132
+ var children = _a.children, props = filterAttrs.__rest(_a, ["children"]);
133
+ return (React.createElement(MenuSubContent.Label2, filterAttrs.__assign({ className: "arc-MenuLabel" }, filterAttrs.filterAttrs(props)), children));
134
+ };
135
+
136
+ /**
137
+ * When used, portals the content part into the body. By default it's arc's theme element
138
+ */
139
+ var MenuPortal = function (_a) {
140
+ var children = _a.children, props = filterAttrs.__rest(_a, ["children"]);
141
+ var _b = index$1.useThemeElement(), themeElement = _b[0], setThemeElement = _b[1];
142
+ return (React.createElement("span", { ref: setThemeElement, style: { display: "none" } },
143
+ React.createElement(MenuSubContent.Portal2, filterAttrs.__assign({ container: themeElement }, filterAttrs.filterAttrs(props)), children)));
144
+ };
145
+
146
+ /**
147
+ * Groups menu items allowing single selection from multiple options.
148
+ */
149
+ var MenuRadioGroup = function (_a) {
150
+ var children = _a.children, value = _a.value, onValueChange = _a.onValueChange, props = filterAttrs.__rest(_a, ["children", "value", "onValueChange"]);
151
+ return (React.createElement(MenuSubContent.RadioGroup2, filterAttrs.__assign({ className: "arc-MenuRadioGroup", value: value, onValueChange: onValueChange }, filterAttrs.filterAttrs(props)), children));
152
+ };
153
+
154
+ /**
155
+ * Do not edit directly
156
+ * Generated file
157
+ */
158
+
159
+ const BtIconTickAlt2Px =
160
+ "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3e%3cpath fill='currentColor' d='m13.5 21.914-4.707-4.707a1 1 0 0 1 0-1.414 1.024 1.024 0 0 1 1.414 0l3.293 3.293 8.293-8.293a1 1 0 1 1 1.414 1.414Z'/%3e%3c/svg%3e";
161
+
162
+ /**
163
+ * A selectable menu item used within a radio group.
164
+ */
165
+ var MenuRadioItem = function (_a) {
166
+ var children = _a.children, value = _a.value, _b = _a.disabled, disabled = _b === void 0 ? false : _b, onSelect = _a.onSelect, leadingIcon = _a.leadingIcon, supportingText = _a.supportingText, _c = _a.shouldKeepOpen, shouldKeepOpen = _c === void 0 ? true : _c, props = filterAttrs.__rest(_a, ["children", "value", "disabled", "onSelect", "leadingIcon", "supportingText", "shouldKeepOpen"]);
167
+ return (React.createElement(MenuSubContent.RadioItem2, filterAttrs.__assign({ className: "arc-MenuItem arc-MenuRadioItem", value: value, disabled: disabled, onSelect: function (event) {
168
+ if (shouldKeepOpen) {
169
+ event.preventDefault();
170
+ }
171
+ onSelect === null || onSelect === void 0 ? void 0 : onSelect();
172
+ } }, filterAttrs.filterAttrs(props)),
173
+ React.createElement(MenuItemContentTemplate, { leadingIcon: leadingIcon, supportingText: supportingText, trailingIcon: BtIconTickAlt2Px }, children)));
174
+ };
175
+
176
+ /**
177
+ * Scrollable container that adjusts height based on surrounding menu content.
178
+ */
179
+ var MenuScrollable = function (_a) {
180
+ var children = _a.children;
181
+ var scrollableRefFunc = function (el) {
182
+ var totalSiblingHeight = 0;
183
+ // get the closest Menu.Content element this will always exist within the menu component
184
+ var contentContainer = el === null || el === void 0 ? void 0 : el.closest(".arc-MenuContent");
185
+ if (!contentContainer || !el)
186
+ return;
187
+ // loop over all children in Menu.Content children to get height of each non scrollable element (excluding the scroll element itself)
188
+ Array.from(contentContainer.children).forEach(function (child) {
189
+ if (child !== el) {
190
+ totalSiblingHeight += child.offsetHeight + 6;
191
+ }
192
+ });
193
+ var availableHeight = "calc(var(--radix-dropdown-menu-content-available-height) - ".concat(totalSiblingHeight, "px - 25px)");
194
+ el.style.height = "".concat(el.scrollHeight, "px");
195
+ el.style.maxHeight = availableHeight;
196
+ };
197
+ return (React.createElement("div", { ref: scrollableRefFunc, className: "arc-MenuScrollable" }, children));
198
+ };
199
+
200
+ /**
201
+ * Visual separator used to divide groups of menu items.
202
+ */
203
+ var MenuSeparator = function (props) {
204
+ return (React.createElement(MenuSubContent.Separator2, filterAttrs.__assign({ className: "arc-MenuSeparator" }, filterAttrs.filterAttrs(props)),
205
+ React.createElement(Rule.Rule, null)));
206
+ };
207
+
208
+ /**
209
+ * Container for submenu content within a dropdown menu.
210
+ */
211
+ var MenuSub = function (_a) {
212
+ var children = _a.children, props = filterAttrs.__rest(_a, ["children"]);
213
+ return React.createElement(MenuSubContent.Sub2, filterAttrs.__assign({}, filterAttrs.filterAttrs(props)),
214
+ " ",
215
+ children);
216
+ };
217
+
218
+ /**
219
+ * Trigger element that opens a submenu when selected.
220
+ */
221
+ var MenuSubTrigger = function (_a) {
222
+ var children = _a.children, isDisabled = _a.isDisabled, leadingIcon = _a.leadingIcon, supportingText = _a.supportingText, keyCommands = _a.keyCommands, ariaLabel = _a.ariaLabel, props = filterAttrs.__rest(_a, ["children", "isDisabled", "leadingIcon", "supportingText", "keyCommands", "ariaLabel"]);
223
+ return (React.createElement(MenuSubContent.SubTrigger2, filterAttrs.__assign({ className: "arc-MenuItem arc-MenuItem--trigger", disabled: isDisabled, "aria-label": ariaLabel }, filterAttrs.filterAttrs(props)),
224
+ React.createElement("div", { className: "arc-MenuItem-content" },
225
+ leadingIcon && (React.createElement("div", { className: "arc-MenuItem-leadingIcon" },
226
+ React.createElement(Icon.Icon, { icon: leadingIcon, size: 24 }))),
227
+ React.createElement("div", { className: "arc-MenuItem-text" },
228
+ React.createElement(Text.Text, { size: "m" }, children),
229
+ supportingText && React.createElement(Text.Text, { size: "xs" }, supportingText))),
230
+ React.createElement("div", { className: "arc-MenuItem-actions" },
231
+ keyCommands && (React.createElement("div", { className: "arc-MenuItem-keyCommands" }, keyCommands)),
232
+ React.createElement("div", { className: "arc-MenuItem-trailingIcon" },
233
+ React.createElement(Icon.Icon, { icon: BtIconChevronRightMid.BtIconChevronRightMid, size: 24 })))));
234
+ };
235
+
236
+ /**
237
+ * The element that toggles the menu.
238
+ */
239
+ var MenuTrigger = function (_a) {
240
+ var children = _a.children, asChild = _a.asChild, props = filterAttrs.__rest(_a, ["children", "asChild"]);
241
+ return (React.createElement(MenuSubContent.Trigger, filterAttrs.__assign({ className: ".arc-MenuItem arc-MenuTrigger", asChild: asChild }, filterAttrs.filterAttrs(props)), children));
242
+ };
243
+
244
+ exports.MenuContent = MenuSubContent.MenuContent;
245
+ exports.MenuSubContent = MenuSubContent.MenuSubContent;
246
+ exports.Menu = Menu;
247
+ exports.MenuCheckboxItem = MenuCheckboxItem;
248
+ exports.MenuFooter = MenuFooter;
249
+ exports.MenuGroup = MenuGroup;
250
+ exports.MenuHeader = MenuHeader;
251
+ exports.MenuItem = MenuItem;
252
+ exports.MenuItemContentTemplate = MenuItemContentTemplate;
253
+ exports.MenuLabel = MenuLabel;
254
+ exports.MenuPortal = MenuPortal;
255
+ exports.MenuRadioGroup = MenuRadioGroup;
256
+ exports.MenuRadioItem = MenuRadioItem;
257
+ exports.MenuScrollable = MenuScrollable;
258
+ exports.MenuSeparator = MenuSeparator;
259
+ exports.MenuSub = MenuSub;
260
+ exports.MenuSubTrigger = MenuSubTrigger;
261
+ exports.MenuTrigger = MenuTrigger;
@@ -0,0 +1,243 @@
1
+ import { _ as __rest, a as __assign, f as filterAttrs } from '../_shared/esm/filter-attrs-B6CM-NUr.mjs';
2
+ import React__default from 'react';
3
+ import { R as Root2, C as CheckboxItem2, I as Item2, G as Group2, L as Label2, P as Portal2, a as RadioGroup2, b as RadioItem2, S as Separator2, c as Sub2, d as SubTrigger2, T as Trigger } from '../_shared/esm/MenuSubContent-Cv9mSn58.mjs';
4
+ export { M as MenuContent, e as MenuSubContent } from '../_shared/esm/MenuSubContent-Cv9mSn58.mjs';
5
+ import { c as classNames } from '../_shared/esm/index-5C0-U8cc.mjs';
6
+ import { I as Icon } from '../_shared/esm/Icon-MZfaoOo9.mjs';
7
+ import { T as Text } from '../_shared/esm/Text-CBlnm5CT.mjs';
8
+ import { R as Rule } from '../_shared/esm/Rule-3gdMHH-R.mjs';
9
+ import { e as useThemeElement } from '../_shared/esm/index-Bz2JQq34.mjs';
10
+ import { B as BtIconChevronRightMid } from '../_shared/esm/BtIconChevronRightMid-DE4lmVaG.mjs';
11
+ import '../_shared/esm/Combination-BpO6XTeS.mjs';
12
+ import 'react/jsx-runtime';
13
+ import 'react-dom';
14
+ import '../_shared/esm/index-BbAu4d3T.mjs';
15
+ import '../_shared/esm/index-DLovItWo.mjs';
16
+ import '../_shared/esm/index-CWHcEz3_.mjs';
17
+ import '../_shared/esm/index-DXTwueLZ.mjs';
18
+ import '../_shared/esm/suffix-modifier-B_pO0UkF.mjs';
19
+ import '../_shared/esm/index-Spae4j7j.mjs';
20
+ import '../_shared/esm/Surface-Colbp3Zx.mjs';
21
+
22
+ /**
23
+ * Contains all the parts of a dropdown menu.
24
+ */
25
+ var Menu = function (_a) {
26
+ var defaultOpen = _a.defaultOpen, open = _a.open, onOpenChange = _a.onOpenChange, _b = _a.modal, modal = _b === void 0 ? false : _b, children = _a.children, props = __rest(_a, ["defaultOpen", "open", "onOpenChange", "modal", "children"]);
27
+ return (React__default.createElement(Root2, __assign({ defaultOpen: defaultOpen, open: open, onOpenChange: onOpenChange, modal: modal }, filterAttrs(props)), children));
28
+ };
29
+
30
+ var MenuItemContentTemplate = function (_a) {
31
+ var leadingIcon = _a.leadingIcon, supportingText = _a.supportingText, keyCommands = _a.keyCommands, trailingIcon = _a.trailingIcon, children = _a.children;
32
+ return (React__default.createElement(React__default.Fragment, null,
33
+ React__default.createElement("div", { className: "arc-MenuItem-content" },
34
+ leadingIcon && (React__default.createElement("div", { className: "arc-MenuItem-leadingIcon" },
35
+ React__default.createElement(Icon, { icon: leadingIcon, size: 24 }))),
36
+ React__default.createElement("div", { className: "arc-MenuItem-text" },
37
+ React__default.createElement(Text, { size: "m" }, children),
38
+ supportingText && React__default.createElement(Text, { size: "xs" }, supportingText))),
39
+ keyCommands || trailingIcon ? (React__default.createElement("div", { className: "arc-MenuItem-actions" },
40
+ keyCommands && (React__default.createElement("div", { className: "arc-MenuItem-keyCommands" }, keyCommands)),
41
+ trailingIcon && (React__default.createElement("div", { className: "arc-MenuItem-trailingIcon" },
42
+ React__default.createElement(Icon, { icon: trailingIcon, size: 24 }))))) : null));
43
+ };
44
+
45
+ var MenuCheckboxItem = function (_a) {
46
+ var children = _a.children, checked = _a.checked, onCheckedChange = _a.onCheckedChange, isDisabled = _a.isDisabled, onSelect = _a.onSelect, id = _a.id, _b = _a.shouldKeepOpen, shouldKeepOpen = _b === void 0 ? true : _b, props = __rest(_a, ["children", "checked", "onCheckedChange", "isDisabled", "onSelect", "id", "shouldKeepOpen"]);
47
+ return (React__default.createElement(CheckboxItem2, __assign({ className: "arc-MenuItem arc-MenuCheckboxItem", checked: checked, onCheckedChange: onCheckedChange, disabled: isDisabled, onSelect: function (event) {
48
+ if (shouldKeepOpen) {
49
+ event.preventDefault();
50
+ onCheckedChange === null || onCheckedChange === void 0 ? void 0 : onCheckedChange(!checked);
51
+ }
52
+ onSelect === null || onSelect === void 0 ? void 0 : onSelect(event);
53
+ }, id: id }, filterAttrs(props)),
54
+ React__default.createElement("div", { className: classNames("arc-MenuCheckboxItem-box", {
55
+ "arc-MenuCheckboxItem-box--checked": checked,
56
+ }) }, checked && (React__default.createElement("svg", { style: { width: 14, height: 11 }, viewBox: "0 0 18 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
57
+ React__default.createElement("path", { d: "M5.99459 14L0.350576 8.23277C0.126079 8.00285 0 7.69132 0 7.36653C0 7.04173 0.126079 6.7302 0.350576 6.50028C0.578979 6.27752 0.88258 6.15324 1.19832 6.15324C1.51405 6.15324 1.81765 6.27752 2.04606 6.50028L5.99459 10.535L15.9385 0.374054C16.0491 0.25703 16.1814 0.163688 16.3277 0.0994738C16.474 0.0352599 16.6313 0.00145997 16.7905 4.626e-05C16.9497 -0.00136745 17.1076 0.0296342 17.255 0.0912406C17.4023 0.152847 17.5362 0.243825 17.6488 0.358867C17.7614 0.473908 17.8504 0.610709 17.9107 0.761287C17.971 0.911865 18.0013 1.0732 18 1.23589C17.9986 1.39858 17.9655 1.55936 17.9026 1.70884C17.8398 1.85833 17.7485 1.99352 17.6339 2.10655L5.99459 14Z", fill: "currentColor" })))),
58
+ React__default.createElement(MenuItemContentTemplate, null, children)));
59
+ };
60
+
61
+ /**
62
+ * Displays footer content at the bottom of the menu.
63
+ */
64
+ var MenuFooter = function (_a) {
65
+ var leadingIcon = _a.leadingIcon, trailingIcon = _a.trailingIcon, supportingText = _a.supportingText, keyCommands = _a.keyCommands, children = _a.children, onClick = _a.onClick, isDisabled = _a.isDisabled, ariaLabel = _a.ariaLabel;
66
+ return (React__default.createElement("div", { className: "arc-MenuFooter", style: {
67
+ position: "relative",
68
+ } },
69
+ React__default.createElement("div", { style: {
70
+ height: "12px",
71
+ background: "linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))",
72
+ position: "absolute",
73
+ width: "100%",
74
+ zIndex: 3,
75
+ top: -12,
76
+ } }),
77
+ React__default.createElement("div", { className: "arc-MenuSeparator", style: { paddingTop: 0 } },
78
+ React__default.createElement(Rule, null)),
79
+ React__default.createElement(Item2, { className: "arc-MenuItem", "aria-label": ariaLabel, onClick: onClick, disabled: isDisabled },
80
+ React__default.createElement(MenuItemContentTemplate, { leadingIcon: leadingIcon, trailingIcon: trailingIcon, supportingText: supportingText, keyCommands: keyCommands }, children))));
81
+ };
82
+
83
+ /**
84
+ * Groups related menu items together within a dropdown menu.
85
+ */
86
+ var MenuGroup = function (_a) {
87
+ var children = _a.children, props = __rest(_a, ["children"]);
88
+ return (React__default.createElement(Group2, __assign({ className: "arc-MenuGroup" }, filterAttrs(props)), children));
89
+ };
90
+
91
+ /**
92
+ * Displays a header within the dropdown menu.
93
+ */
94
+ var MenuHeader = function (_a) {
95
+ var leadingIcon = _a.leadingIcon, trailingIcon = _a.trailingIcon, supportingText = _a.supportingText, keyCommands = _a.keyCommands, children = _a.children, onClick = _a.onClick, isDisabled = _a.isDisabled, ariaLabel = _a.ariaLabel;
96
+ return (React__default.createElement("div", { className: "arc-MenuHeader" },
97
+ React__default.createElement(Item2, { className: "arc-MenuItem ", style: { marginBottom: 0 }, "aria-label": ariaLabel, onClick: onClick, disabled: isDisabled },
98
+ React__default.createElement(MenuItemContentTemplate, { leadingIcon: leadingIcon, trailingIcon: trailingIcon, supportingText: supportingText, keyCommands: keyCommands }, children)),
99
+ React__default.createElement("div", { className: "arc-MenuSeparator", style: {
100
+ paddingBottom: 0,
101
+ } },
102
+ React__default.createElement(Rule, null),
103
+ React__default.createElement("div", { style: {
104
+ height: "12px",
105
+ background: "linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))",
106
+ position: "absolute",
107
+ width: "100%",
108
+ zIndex: 3,
109
+ } }))));
110
+ };
111
+
112
+ /**
113
+ * Renders a menu item, optionally as a link if `href` is provided.
114
+ */
115
+ var MenuItem = function (_a) {
116
+ var leadingIcon = _a.leadingIcon, supportingText = _a.supportingText, keyCommands = _a.keyCommands, trailingIcon = _a.trailingIcon, children = _a.children, onClick = _a.onClick, _b = _a.shouldKeepOpen, shouldKeepOpen = _b === void 0 ? true : _b, isDisabled = _a.isDisabled, href = _a.href, ariaLabel = _a.ariaLabel, props = __rest(_a, ["leadingIcon", "supportingText", "keyCommands", "trailingIcon", "children", "onClick", "shouldKeepOpen", "isDisabled", "href", "ariaLabel"]);
117
+ var Component = href ? "a" : "div";
118
+ return (React__default.createElement(Item2, __assign({ className: "arc-MenuItem", asChild: true, "aria-label": ariaLabel, onClick: onClick, onSelect: function (event) {
119
+ if (shouldKeepOpen) {
120
+ event.preventDefault();
121
+ }
122
+ }, disabled: isDisabled }, filterAttrs(props)),
123
+ React__default.createElement(Component, __assign({ className: href && "arc-MenuItem--link", href: href }, props),
124
+ React__default.createElement(MenuItemContentTemplate, { leadingIcon: leadingIcon, trailingIcon: trailingIcon, supportingText: supportingText, keyCommands: keyCommands }, children))));
125
+ };
126
+
127
+ /**
128
+ * Provides a label to group related menu items.
129
+ */
130
+ var MenuLabel = function (_a) {
131
+ var children = _a.children, props = __rest(_a, ["children"]);
132
+ return (React__default.createElement(Label2, __assign({ className: "arc-MenuLabel" }, filterAttrs(props)), children));
133
+ };
134
+
135
+ /**
136
+ * When used, portals the content part into the body. By default it's arc's theme element
137
+ */
138
+ var MenuPortal = function (_a) {
139
+ var children = _a.children, props = __rest(_a, ["children"]);
140
+ var _b = useThemeElement(), themeElement = _b[0], setThemeElement = _b[1];
141
+ return (React__default.createElement("span", { ref: setThemeElement, style: { display: "none" } },
142
+ React__default.createElement(Portal2, __assign({ container: themeElement }, filterAttrs(props)), children)));
143
+ };
144
+
145
+ /**
146
+ * Groups menu items allowing single selection from multiple options.
147
+ */
148
+ var MenuRadioGroup = function (_a) {
149
+ var children = _a.children, value = _a.value, onValueChange = _a.onValueChange, props = __rest(_a, ["children", "value", "onValueChange"]);
150
+ return (React__default.createElement(RadioGroup2, __assign({ className: "arc-MenuRadioGroup", value: value, onValueChange: onValueChange }, filterAttrs(props)), children));
151
+ };
152
+
153
+ /**
154
+ * Do not edit directly
155
+ * Generated file
156
+ */
157
+
158
+ const BtIconTickAlt2Px =
159
+ "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3e%3cpath fill='currentColor' d='m13.5 21.914-4.707-4.707a1 1 0 0 1 0-1.414 1.024 1.024 0 0 1 1.414 0l3.293 3.293 8.293-8.293a1 1 0 1 1 1.414 1.414Z'/%3e%3c/svg%3e";
160
+
161
+ /**
162
+ * A selectable menu item used within a radio group.
163
+ */
164
+ var MenuRadioItem = function (_a) {
165
+ var children = _a.children, value = _a.value, _b = _a.disabled, disabled = _b === void 0 ? false : _b, onSelect = _a.onSelect, leadingIcon = _a.leadingIcon, supportingText = _a.supportingText, _c = _a.shouldKeepOpen, shouldKeepOpen = _c === void 0 ? true : _c, props = __rest(_a, ["children", "value", "disabled", "onSelect", "leadingIcon", "supportingText", "shouldKeepOpen"]);
166
+ return (React__default.createElement(RadioItem2, __assign({ className: "arc-MenuItem arc-MenuRadioItem", value: value, disabled: disabled, onSelect: function (event) {
167
+ if (shouldKeepOpen) {
168
+ event.preventDefault();
169
+ }
170
+ onSelect === null || onSelect === void 0 ? void 0 : onSelect();
171
+ } }, filterAttrs(props)),
172
+ React__default.createElement(MenuItemContentTemplate, { leadingIcon: leadingIcon, supportingText: supportingText, trailingIcon: BtIconTickAlt2Px }, children)));
173
+ };
174
+
175
+ /**
176
+ * Scrollable container that adjusts height based on surrounding menu content.
177
+ */
178
+ var MenuScrollable = function (_a) {
179
+ var children = _a.children;
180
+ var scrollableRefFunc = function (el) {
181
+ var totalSiblingHeight = 0;
182
+ // get the closest Menu.Content element this will always exist within the menu component
183
+ var contentContainer = el === null || el === void 0 ? void 0 : el.closest(".arc-MenuContent");
184
+ if (!contentContainer || !el)
185
+ return;
186
+ // loop over all children in Menu.Content children to get height of each non scrollable element (excluding the scroll element itself)
187
+ Array.from(contentContainer.children).forEach(function (child) {
188
+ if (child !== el) {
189
+ totalSiblingHeight += child.offsetHeight + 6;
190
+ }
191
+ });
192
+ var availableHeight = "calc(var(--radix-dropdown-menu-content-available-height) - ".concat(totalSiblingHeight, "px - 25px)");
193
+ el.style.height = "".concat(el.scrollHeight, "px");
194
+ el.style.maxHeight = availableHeight;
195
+ };
196
+ return (React__default.createElement("div", { ref: scrollableRefFunc, className: "arc-MenuScrollable" }, children));
197
+ };
198
+
199
+ /**
200
+ * Visual separator used to divide groups of menu items.
201
+ */
202
+ var MenuSeparator = function (props) {
203
+ return (React__default.createElement(Separator2, __assign({ className: "arc-MenuSeparator" }, filterAttrs(props)),
204
+ React__default.createElement(Rule, null)));
205
+ };
206
+
207
+ /**
208
+ * Container for submenu content within a dropdown menu.
209
+ */
210
+ var MenuSub = function (_a) {
211
+ var children = _a.children, props = __rest(_a, ["children"]);
212
+ return React__default.createElement(Sub2, __assign({}, filterAttrs(props)),
213
+ " ",
214
+ children);
215
+ };
216
+
217
+ /**
218
+ * Trigger element that opens a submenu when selected.
219
+ */
220
+ var MenuSubTrigger = function (_a) {
221
+ var children = _a.children, isDisabled = _a.isDisabled, leadingIcon = _a.leadingIcon, supportingText = _a.supportingText, keyCommands = _a.keyCommands, ariaLabel = _a.ariaLabel, props = __rest(_a, ["children", "isDisabled", "leadingIcon", "supportingText", "keyCommands", "ariaLabel"]);
222
+ return (React__default.createElement(SubTrigger2, __assign({ className: "arc-MenuItem arc-MenuItem--trigger", disabled: isDisabled, "aria-label": ariaLabel }, filterAttrs(props)),
223
+ React__default.createElement("div", { className: "arc-MenuItem-content" },
224
+ leadingIcon && (React__default.createElement("div", { className: "arc-MenuItem-leadingIcon" },
225
+ React__default.createElement(Icon, { icon: leadingIcon, size: 24 }))),
226
+ React__default.createElement("div", { className: "arc-MenuItem-text" },
227
+ React__default.createElement(Text, { size: "m" }, children),
228
+ supportingText && React__default.createElement(Text, { size: "xs" }, supportingText))),
229
+ React__default.createElement("div", { className: "arc-MenuItem-actions" },
230
+ keyCommands && (React__default.createElement("div", { className: "arc-MenuItem-keyCommands" }, keyCommands)),
231
+ React__default.createElement("div", { className: "arc-MenuItem-trailingIcon" },
232
+ React__default.createElement(Icon, { icon: BtIconChevronRightMid, size: 24 })))));
233
+ };
234
+
235
+ /**
236
+ * The element that toggles the menu.
237
+ */
238
+ var MenuTrigger = function (_a) {
239
+ var children = _a.children, asChild = _a.asChild, props = __rest(_a, ["children", "asChild"]);
240
+ return (React__default.createElement(Trigger, __assign({ className: ".arc-MenuItem arc-MenuTrigger", asChild: asChild }, filterAttrs(props)), children));
241
+ };
242
+
243
+ export { Menu, MenuCheckboxItem, MenuFooter, MenuGroup, MenuHeader, MenuItem, MenuItemContentTemplate, MenuLabel, MenuPortal, MenuRadioGroup, MenuRadioItem, MenuScrollable, MenuSeparator, MenuSub, MenuSubTrigger, MenuTrigger };
@@ -0,0 +1 @@
1
+ .arc-v12-0-0-beta-18 .arc .arc-MenuContent{background:#ffffff;border-radius:12px;box-shadow:0 0 1px 0 rgba(0,0,0,0.2),0 4px 12px 0 rgba(0,0,0,0.1);display:flex;flex-direction:column;padding:12px;width:-moz-fit-content;width:fit-content}.arc-v12-0-0-beta-18 .arc .arc-MenuItem{border-radius:var(--menu-card-border-radius-s);display:flex;flex-direction:row;gap:var(--menu-card-gap-m);outline:none;padding:var(--menu-card-padding-m);position:relative}.arc-v12-0-0-beta-18 .arc .arc-MenuItem--link,.arc-v12-0-0-beta-18 .arc .arc-MenuItem--link[data-highlighted]{color:var(--menu-card-text-primary);text-decoration:none}.arc-v12-0-0-beta-18 .arc .arc-MenuItem[data-highlighted]{background-color:var(--menu-card-bg-hover);border-radius:var(--menu-card-border-radius-s);border-bottom-left-radius:4px;border-top-left-radius:4px;cursor:pointer;z-index:4}.arc-v12-0-0-beta-18 .arc .arc-MenuItem[data-highlighted]::before{background-color:var(--menu-card-foreground-hover);border-bottom-left-radius:var(--menu-card-border-radius-s);border-top-left-radius:var(--menu-card-border-radius-s);content:"";height:100%;left:0;position:absolute;top:0;transition:background-color 0.3s ease;width:3px}.arc-v12-0-0-beta-18 .arc .arc-MenuItem[data-disabled]{color:var(--menu-card-text-disabled);cursor:not-allowed}.arc-v12-0-0-beta-18 .arc .arc-MenuItem-content{display:flex;gap:var(--menu-card-gap-m)}.arc-v12-0-0-beta-18 .arc .arc-MenuItem-actions{display:flex;flex-direction:row;flex-wrap:nowrap;gap:var(--menu-card-gap-m);margin-left:auto;text-wrap:nowrap}.arc-v12-0-0-beta-18 .arc .arc-MenuItem[data-state="checked"],.arc-v12-0-0-beta-18 .arc .arc-MenuItem[aria-expanded="true"]{background:var(--menu-card-bg-active)}.arc-v12-0-0-beta-18 .arc .arc-MenuItem-text{display:flex;flex-direction:column;flex-wrap:nowrap;gap:var(--menu-card-gap-xs);text-wrap:wrap}.arc-v12-0-0-beta-18 .arc .arc-MenuSeparator{margin-left:-12px;margin-right:-12px;padding:var(--menu-card-padding-m) 0}.arc-v12-0-0-beta-18 .arc .arc-MenuLabel{overflow:auto;padding:12px;text-overflow:ellipsis;text-wrap:nowrap;color:#2a2a2a;font-size:14px;font-style:normal;font-weight:500;letter-spacing:1.4px;line-height:112%;text-transform:uppercase}.arc-v12-0-0-beta-18 .arc .arc-MenuTrigger{background:transparent;border:none}.arc-v12-0-0-beta-18 .arc .arc-MenuCheckboxItem-box{align-items:center;background:var(--checkbox-colors-light-bg-default-alt);border:var(--checkbox-border-weight-s) solid var(--checkbox-colors-light-border-default);border-radius:var(--checkbox-border-radius-s);color:var(--checkbox-colors-light-fg-default);display:inline-flex;flex-shrink:0;height:var(--checkbox-size-s);justify-content:center;margin-right:var(--checkbox-gap-s);width:var(--checkbox-size-s)}.arc-v12-0-0-beta-18 .arc .arc-MenuCheckboxItem-box--checked{background:var(--checkbox-colors-light-bg-default);border-color:transparent}.arc-v12-0-0-beta-18 .arc .arc-MenuCheckboxItem[data-state="checked"]{background:var(--menu-card-bg-default)}.arc-v12-0-0-beta-18 .arc .arc-MenuCheckboxItem[data-state="checked"]:hover{background-color:var(--menu-card-bg-hover)}.arc-v12-0-0-beta-18 .arc .arc-MenuRadioItem[data-state="unchecked"] .arc-MenuItem-actions{visibility:hidden}.arc-v12-0-0-beta-18 .arc .arc-MenuScrollable{margin-left:-12px;margin-right:-12px;overflow-x:hidden;overflow-y:scroll;padding:4px 12px;scrollbar-width:thin}.arc-v12-0-0-beta-18 .arc .arc-MenuGroup{display:flex;flex-direction:column;gap:var(--menu-card-gap-xs)}.arc-v12-0-0-beta-18 .arc div[data-radix-popper-content-wrapper][\:has\(.arc-MenuContent\)]{min-width:auto !important}.arc-v12-0-0-beta-18 .arc div[data-radix-popper-content-wrapper]:has(.arc-MenuContent){min-width:auto !important}
@@ -4,27 +4,28 @@
4
4
  var filterAttrs = require('../_shared/cjs/filter-attrs-eK6E_34o.cjs');
5
5
  var React = require('react');
6
6
  var index$2 = require('../_shared/cjs/index-CTlXMLug.cjs');
7
- var index$1 = require('../_shared/cjs/index-BMs6MHwq.cjs');
8
- var index = require('../_shared/cjs/index-DXNM3D1d.cjs');
7
+ var index$1 = require('../_shared/cjs/index-DAr_oO4-.cjs');
9
8
  var Heading = require('../_shared/cjs/Heading-BEMSkLYR.cjs');
10
- var ButtonV2 = require('../_shared/cjs/ButtonV2-s8OF4enU.cjs');
9
+ var ButtonV2 = require('../_shared/cjs/ButtonV2-CRNNZ_nd.cjs');
11
10
  var Text = require('../_shared/cjs/Text-Cr5nmYmx.cjs');
12
11
  var VerticalSpace = require('../_shared/cjs/VerticalSpace-BJvST6WP.cjs');
13
12
  var ThemeIcon = require('../_shared/cjs/ThemeIcon-BoxbjTaQ.cjs');
14
13
  var Surface = require('../_shared/cjs/Surface-BFx1yNsq.cjs');
15
- require('../_shared/cjs/Combination-iNPq-pNP.cjs');
14
+ var index = require('../_shared/cjs/index-DXNM3D1d.cjs');
15
+ require('../_shared/cjs/Combination-B-rSVLfT.cjs');
16
16
  require('react/jsx-runtime');
17
17
  require('react-dom');
18
- require('../_shared/cjs/index-DNgUhsBO.cjs');
18
+ require('../_shared/cjs/index-Dv1xvB_E.cjs');
19
19
  require('../_shared/cjs/index-DR8Rkav9.cjs');
20
20
  require('../_shared/cjs/suffix-modifier-DLUGR-yG.cjs');
21
- require('../_shared/cjs/Icon-DdqFr6bT.cjs');
21
+ require('../_shared/cjs/Icon-KMACQ1i3.cjs');
22
22
  require('../_shared/cjs/Spinner-bbrOwxv2.cjs');
23
23
 
24
24
  /** Use `Modal` to display information that needs immediate action from a user. */
25
25
  var Modal = function (_a) {
26
- var title = _a.title, description = _a.description, ariaDescribedBy = _a.ariaDescribedBy, isOpen = _a.isOpen, actions = _a.actions, onRequestClose = _a.onRequestClose, children = _a.children, _b = _a.role, role = _b === void 0 ? "dialog" : _b, _c = _a.shouldReturnFocus, shouldReturnFocus = _c === void 0 ? true : _c, _d = _a.isContentScrollable, isContentScrollable = _d === void 0 ? false : _d, _e = _a.size, size = _e === void 0 ? "l" : _e, _f = _a.fullBleed, fullBleed = _f === void 0 ? false : _f, customWidth = _a.customWidth, props = filterAttrs.__rest(_a, ["title", "description", "ariaDescribedBy", "isOpen", "actions", "onRequestClose", "children", "role", "shouldReturnFocus", "isContentScrollable", "size", "fullBleed", "customWidth"]);
27
- var _g = index.useThemeElement(), themeElement = _g[0], setThemeElement = _g[1];
26
+ var _b;
27
+ var title = _a.title, description = _a.description, ariaDescribedBy = _a.ariaDescribedBy, isOpen = _a.isOpen, actions = _a.actions, onRequestClose = _a.onRequestClose, children = _a.children, _c = _a.role, role = _c === void 0 ? "dialog" : _c, _d = _a.shouldReturnFocus, shouldReturnFocus = _d === void 0 ? true : _d, _e = _a.isContentScrollable, isContentScrollable = _e === void 0 ? false : _e, _f = _a.size, size = _f === void 0 ? "l" : _f, _g = _a.fullBleed, fullBleed = _g === void 0 ? false : _g, customWidths = _a.customWidths, props = filterAttrs.__rest(_a, ["title", "description", "ariaDescribedBy", "isOpen", "actions", "onRequestClose", "children", "role", "shouldReturnFocus", "isContentScrollable", "size", "fullBleed", "customWidths"]);
28
+ var _h = index.useThemeElement(), themeElement = _h[0], setThemeElement = _h[1];
28
29
  var triggerRef = React.useRef(null);
29
30
  var setTriggerElement = function () {
30
31
  return shouldReturnFocus &&
@@ -46,10 +47,15 @@ var Modal = function (_a) {
46
47
  React.createElement(index$1.Root, { open: isOpen },
47
48
  React.createElement(index$1.Portal, { container: themeElement },
48
49
  React.createElement(index$1.Overlay, { className: "arc-Modal-overlay" },
49
- React.createElement(index$1.Content, filterAttrs.__assign({}, ariaProps, { role: role, onOpenAutoFocus: setTriggerElement, onCloseAutoFocus: focusTriggerElement, onEscapeKeyDown: closeModal, onInteractOutside: closeModal, "aria-modal": "true", className: index$2.classNames("arc-Modal-dialog", "arc-Modal-dialog--".concat(size), {
50
- "arc-Modal-dialog--maxHeightWindow": isContentScrollable,
51
- "arc-Modal-dialog--fullBleed": fullBleed,
52
- }) }, filterAttrs.filterAttrs(props), { style: { maxWidth: customWidth } }),
50
+ React.createElement(index$1.Content, filterAttrs.__assign({}, ariaProps, { role: role, onOpenAutoFocus: setTriggerElement, onCloseAutoFocus: focusTriggerElement, onEscapeKeyDown: closeModal, onInteractOutside: closeModal, "aria-modal": "true", className: index$2.classNames("arc-Modal-dialog", (_b = {},
51
+ _b["arc-Modal-dialog--".concat(size)] = !customWidths,
52
+ _b["arc-Modal-dialog--xs-span-".concat(customWidths === null || customWidths === void 0 ? void 0 : customWidths.xs)] = customWidths === null || customWidths === void 0 ? void 0 : customWidths.xs,
53
+ _b["arc-Modal-dialog--s-span-".concat(customWidths === null || customWidths === void 0 ? void 0 : customWidths.s)] = customWidths === null || customWidths === void 0 ? void 0 : customWidths.s,
54
+ _b["arc-Modal-dialog--m-span-".concat(customWidths === null || customWidths === void 0 ? void 0 : customWidths.m)] = customWidths === null || customWidths === void 0 ? void 0 : customWidths.m,
55
+ _b["arc-Modal-dialog--l-span-".concat(customWidths === null || customWidths === void 0 ? void 0 : customWidths.l)] = customWidths === null || customWidths === void 0 ? void 0 : customWidths.l,
56
+ _b["arc-Modal-dialog--maxHeightWindow"] = isContentScrollable,
57
+ _b["arc-Modal-dialog--fullBleed"] = fullBleed,
58
+ _b)) }, filterAttrs.filterAttrs(props)),
53
59
  React.createElement(React.Fragment, null,
54
60
  title && (React.createElement(React.Fragment, null,
55
61
  React.createElement("div", { className: "arc-Modal-section" },