@alto-avios/alto-ui 5.2.0 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/dist/assets/BannerSectionContent.css +1 -0
  2. package/dist/assets/BannerSectionPlectrum.css +1 -0
  3. package/dist/assets/Box.css +1 -1
  4. package/dist/assets/BoxLink.css +1 -0
  5. package/dist/assets/CalloutBanner.css +1 -1
  6. package/dist/assets/Carousel.css +1 -1
  7. package/dist/assets/CarouselButton.css +1 -1
  8. package/dist/assets/CategoryTileGroup.css +1 -0
  9. package/dist/assets/Input.css +1 -1
  10. package/dist/assets/IntroSection.css +1 -0
  11. package/dist/assets/Link.css +1 -1
  12. package/dist/assets/ProductTile.css +1 -0
  13. package/dist/assets/SelectCard.css +1 -1
  14. package/dist/assets/margin.css +1 -0
  15. package/dist/components/BannerSectionContent/BannerSectionContent.d.ts +31 -0
  16. package/dist/components/BannerSectionContent/BannerSectionContent.js +5 -0
  17. package/dist/components/BannerSectionContent/BannerSectionContent.js.map +1 -0
  18. package/dist/components/BannerSectionContent/index.d.ts +2 -0
  19. package/dist/components/BannerSectionContent/index.js +2 -0
  20. package/dist/components/BannerSectionContent/index.js.map +1 -0
  21. package/dist/components/BannerSectionPlectrum/BannerSectionPlectrum.d.ts +39 -0
  22. package/dist/components/BannerSectionPlectrum/BannerSectionPlectrum.js +9 -0
  23. package/dist/components/BannerSectionPlectrum/BannerSectionPlectrum.js.map +1 -0
  24. package/dist/components/BannerSectionPlectrum/index.d.ts +2 -0
  25. package/dist/components/BannerSectionPlectrum/index.js +2 -0
  26. package/dist/components/BannerSectionPlectrum/index.js.map +1 -0
  27. package/dist/components/Box/Box.d.ts +17 -6
  28. package/dist/components/Box/Box.js +2 -2
  29. package/dist/components/Box/Box.js.map +1 -1
  30. package/dist/components/BoxLink/BoxLink.d.ts +59 -0
  31. package/dist/components/BoxLink/BoxLink.js +3 -0
  32. package/dist/components/BoxLink/BoxLink.js.map +1 -0
  33. package/dist/components/BoxLink/BoxLinkContext.d.ts +24 -0
  34. package/dist/components/BoxLink/BoxLinkContext.js +2 -0
  35. package/dist/components/BoxLink/BoxLinkContext.js.map +1 -0
  36. package/dist/components/BoxLink/index.d.ts +4 -0
  37. package/dist/components/BoxLink/index.js +2 -0
  38. package/dist/components/BoxLink/index.js.map +1 -0
  39. package/dist/components/Button/Button.d.ts +1 -1
  40. package/dist/components/CalloutBanner/CalloutBanner.d.ts +2 -1
  41. package/dist/components/CalloutBanner/CalloutBanner.js +9 -9
  42. package/dist/components/CalloutBanner/CalloutBanner.js.map +1 -1
  43. package/dist/components/Carousel/Carousel.d.ts +29 -1
  44. package/dist/components/Carousel/Carousel.js +8 -8
  45. package/dist/components/Carousel/Carousel.js.map +1 -1
  46. package/dist/components/Carousel/CarouselButton/CarouselButton.d.ts +6 -0
  47. package/dist/components/Carousel/CarouselButton/CarouselButton.js +1 -1
  48. package/dist/components/Carousel/CarouselButton/CarouselButton.js.map +1 -1
  49. package/dist/components/Carousel/CarouselControls.js +1 -1
  50. package/dist/components/Carousel/CarouselControls.js.map +1 -1
  51. package/dist/components/Carousel/index.d.ts +2 -0
  52. package/dist/components/Carousel/index.js +1 -1
  53. package/dist/components/CategoryTileGroup/CategoryTileGroup.d.ts +52 -0
  54. package/dist/components/CategoryTileGroup/CategoryTileGroup.js +8 -0
  55. package/dist/components/CategoryTileGroup/CategoryTileGroup.js.map +1 -0
  56. package/dist/components/CategoryTileGroup/index.d.ts +2 -0
  57. package/dist/components/CategoryTileGroup/index.js +2 -0
  58. package/dist/components/CategoryTileGroup/index.js.map +1 -0
  59. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  60. package/dist/components/Checkbox/Checkbox.js +5 -5
  61. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  62. package/dist/components/CreditCardNumberField/CreditCardNumberField.d.ts +2 -1
  63. package/dist/components/CreditCardNumberField/CreditCardNumberField.js +4 -4
  64. package/dist/components/CreditCardNumberField/CreditCardNumberField.js.map +1 -1
  65. package/dist/components/CreditCardSecurityCodeField/CreditCardSecurityCodeField.d.ts +1 -1
  66. package/dist/components/CreditCardSecurityCodeField/CreditCardSecurityCodeField.js +6 -6
  67. package/dist/components/CreditCardSecurityCodeField/CreditCardSecurityCodeField.js.map +1 -1
  68. package/dist/components/DatePicker/DatePicker.d.ts +1 -1
  69. package/dist/components/DatePicker/DatePicker.js +3 -3
  70. package/dist/components/DatePicker/DatePicker.js.map +1 -1
  71. package/dist/components/DateRangePicker/DateRangePicker.d.ts +1 -1
  72. package/dist/components/DateRangePicker/DateRangePicker.js +6 -6
  73. package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -1
  74. package/dist/components/FieldHeader/FieldHeader.d.ts +1 -1
  75. package/dist/components/FieldHeader/FieldHeader.js +2 -2
  76. package/dist/components/FieldHeader/FieldHeader.js.map +1 -1
  77. package/dist/components/Form/Form.d.ts +1 -1
  78. package/dist/components/Form/Form.js +1 -1
  79. package/dist/components/Form/Form.js.map +1 -1
  80. package/dist/components/Heading/Heading.js +2 -2
  81. package/dist/components/Heading/Heading.js.map +1 -1
  82. package/dist/components/IntroSection/IntroSection.d.ts +42 -0
  83. package/dist/components/IntroSection/IntroSection.js +4 -0
  84. package/dist/components/IntroSection/IntroSection.js.map +1 -0
  85. package/dist/components/IntroSection/index.d.ts +2 -0
  86. package/dist/components/IntroSection/index.js +2 -0
  87. package/dist/components/IntroSection/index.js.map +1 -0
  88. package/dist/components/Label/Label.js +1 -1
  89. package/dist/components/Label/Label.js.map +1 -1
  90. package/dist/components/Link/Link.js +2 -3
  91. package/dist/components/Link/Link.js.map +1 -1
  92. package/dist/components/Menu/Menu.d.ts +4 -4
  93. package/dist/components/Menu/Menu.js +1 -1
  94. package/dist/components/Menu/Menu.js.map +1 -1
  95. package/dist/components/Paragraph/Paragraph.js +1 -1
  96. package/dist/components/Paragraph/Paragraph.js.map +1 -1
  97. package/dist/components/Popover/Popover.d.ts +1 -1
  98. package/dist/components/Popover/Popover.js.map +1 -1
  99. package/dist/components/ProductTile/ProductTile.d.ts +51 -0
  100. package/dist/components/ProductTile/ProductTile.js +7 -0
  101. package/dist/components/ProductTile/ProductTile.js.map +1 -0
  102. package/dist/components/ProductTile/index.d.ts +2 -0
  103. package/dist/components/ProductTile/index.js +2 -0
  104. package/dist/components/ProductTile/index.js.map +1 -0
  105. package/dist/components/Radio/Radio.d.ts +1 -1
  106. package/dist/components/Radio/Radio.js +1 -1
  107. package/dist/components/Radio/Radio.js.map +1 -1
  108. package/dist/components/SearchField/SearchField.d.ts +2 -1
  109. package/dist/components/SearchField/SearchField.js +4 -4
  110. package/dist/components/SearchField/SearchField.js.map +1 -1
  111. package/dist/components/Section/Section.d.ts +9 -1
  112. package/dist/components/Section/Section.js +3 -3
  113. package/dist/components/Section/Section.js.map +1 -1
  114. package/dist/components/SelectCard/SelectCard.d.ts +18 -9
  115. package/dist/components/SelectCard/SelectCard.js +5 -5
  116. package/dist/components/SelectCard/SelectCard.js.map +1 -1
  117. package/dist/components/Slider/Slider.d.ts +1 -1
  118. package/dist/components/Slider/Slider.js +12 -12
  119. package/dist/components/Slider/Slider.js.map +1 -1
  120. package/dist/components/SubHeading/SubHeading.js +1 -1
  121. package/dist/components/SubHeading/SubHeading.js.map +1 -1
  122. package/dist/components/_base/Input/Input.js +8 -8
  123. package/dist/components/index.d.ts +16 -2
  124. package/dist/components/index.js +1 -1
  125. package/dist/{flex-BJOhaXnU.js → flex-BfhdHBb6.js} +2 -2
  126. package/dist/flex-BfhdHBb6.js.map +1 -0
  127. package/dist/index.js +1 -1
  128. package/dist/margin-CCJx_ENX.js +2 -0
  129. package/dist/margin-CCJx_ENX.js.map +1 -0
  130. package/dist/useObjectRef-DIiuqtNU.js +2 -0
  131. package/dist/useObjectRef-DIiuqtNU.js.map +1 -0
  132. package/dist/utils/flex/flex.d.ts +20 -6
  133. package/dist/utils/flex/flex.js +1 -1
  134. package/dist/utils/index.d.ts +2 -0
  135. package/dist/utils/index.js +1 -1
  136. package/dist/utils/layout/hooks/useFitCount.d.ts +74 -0
  137. package/dist/utils/layout/hooks/useFitCount.js +2 -0
  138. package/dist/utils/layout/hooks/useFitCount.js.map +1 -0
  139. package/dist/utils/margin/margin.d.ts +13 -0
  140. package/dist/utils/margin/margin.js +2 -0
  141. package/dist/utils/margin/margin.js.map +1 -0
  142. package/dist/utils/margin/margin.test.d.ts +1 -0
  143. package/dist/utils/position/position.d.ts +1 -1
  144. package/dist/utils/stories/DraggableContainer.js +7 -7
  145. package/dist/utils/stories/DraggableContainer.js.map +1 -1
  146. package/dist/utils/stories/IntroSectionWithCategoryTileGroup.d.ts +3 -0
  147. package/dist/utils/stories/IntroSectionWithCategoryTileGroup.js +5 -0
  148. package/dist/utils/stories/IntroSectionWithCategoryTileGroup.js.map +1 -0
  149. package/package.json +4 -2
  150. package/dist/assets/truncate.css +0 -1
  151. package/dist/flex-BJOhaXnU.js.map +0 -1
  152. package/dist/utils/truncate/truncate.d.ts +0 -6
  153. package/dist/utils/truncate/truncate.js +0 -2
  154. package/dist/utils/truncate/truncate.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.js","sources":["../../../node_modules/react-aria/dist/private/interactions/textSelection.mjs","../../../node_modules/react-aria/dist/private/utils/getNonce.mjs","../../../node_modules/react-aria/dist/private/interactions/context.mjs","../../../node_modules/react-aria/dist/private/interactions/usePress.mjs","../../../src/components/Menu/Menu.tsx","../../../node_modules/react-aria/dist/private/utils/useObjectRef.mjs","../../../node_modules/react-aria/dist/private/button/useButton.mjs"],"sourcesContent":["import {getOwnerDocument as $d447af545b77c9f1$export$b204af158042fbac} from \"../utils/domHelpers.mjs\";\nimport {isIOS as $2add3ce32c6007eb$export$fedb369cb70207f1} from \"../utils/platform.mjs\";\nimport {runAfterTransition as $081cb5757e08788e$export$24490316f764c430} from \"../utils/runAfterTransition.mjs\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n// Note that state only matters here for iOS. Non-iOS gets user-select: none applied to the target element\n// rather than at the document level so we just need to apply/remove user-select: none for each pressed element individually\nlet $cbf007e418543821$var$state = 'default';\nlet $cbf007e418543821$var$savedUserSelect = '';\nlet $cbf007e418543821$var$modifiedElementMap = new WeakMap();\nfunction $cbf007e418543821$export$16a4697467175487(target) {\n if ((0, $2add3ce32c6007eb$export$fedb369cb70207f1)()) {\n if ($cbf007e418543821$var$state === 'default') {\n const documentObject = (0, $d447af545b77c9f1$export$b204af158042fbac)(target);\n $cbf007e418543821$var$savedUserSelect = documentObject.documentElement.style.webkitUserSelect;\n documentObject.documentElement.style.webkitUserSelect = 'none';\n }\n $cbf007e418543821$var$state = 'disabled';\n } else if (target instanceof HTMLElement || target instanceof SVGElement) {\n // If not iOS, store the target's original user-select and change to user-select: none\n // Ignore state since it doesn't apply for non iOS\n let property = 'userSelect' in target.style ? 'userSelect' : 'webkitUserSelect';\n $cbf007e418543821$var$modifiedElementMap.set(target, target.style[property]);\n target.style[property] = 'none';\n }\n}\nfunction $cbf007e418543821$export$b0d6fa1ab32e3295(target) {\n if ((0, $2add3ce32c6007eb$export$fedb369cb70207f1)()) {\n // If the state is already default, there's nothing to do.\n // If it is restoring, then there's no need to queue a second restore.\n if ($cbf007e418543821$var$state !== 'disabled') return;\n $cbf007e418543821$var$state = 'restoring';\n // There appears to be a delay on iOS where selection still might occur\n // after pointer up, so wait a bit before removing user-select.\n setTimeout(()=>{\n // Wait for any CSS transitions to complete so we don't recompute style\n // for the whole page in the middle of the animation and cause jank.\n (0, $081cb5757e08788e$export$24490316f764c430)(()=>{\n // Avoid race conditions\n if ($cbf007e418543821$var$state === 'restoring') {\n const documentObject = (0, $d447af545b77c9f1$export$b204af158042fbac)(target);\n if (documentObject.documentElement.style.webkitUserSelect === 'none') documentObject.documentElement.style.webkitUserSelect = $cbf007e418543821$var$savedUserSelect || '';\n $cbf007e418543821$var$savedUserSelect = '';\n $cbf007e418543821$var$state = 'default';\n }\n });\n }, 300);\n } else if (target instanceof HTMLElement || target instanceof SVGElement) // If not iOS, restore the target's original user-select if any\n // Ignore state since it doesn't apply for non iOS\n {\n if (target && $cbf007e418543821$var$modifiedElementMap.has(target)) {\n let targetOldUserSelect = $cbf007e418543821$var$modifiedElementMap.get(target);\n let property = 'userSelect' in target.style ? 'userSelect' : 'webkitUserSelect';\n if (target.style[property] === 'none') target.style[property] = targetOldUserSelect;\n if (target.getAttribute('style') === '') target.removeAttribute('style');\n $cbf007e418543821$var$modifiedElementMap.delete(target);\n }\n }\n}\n\n\nexport {$cbf007e418543821$export$16a4697467175487 as disableTextSelection, $cbf007e418543821$export$b0d6fa1ab32e3295 as restoreTextSelection};\n//# sourceMappingURL=textSelection.mjs.map\n","import {getOwnerWindow as $d447af545b77c9f1$export$f21a1ffae260145a} from \"./domHelpers.mjs\";\n\n/*\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nfunction $2b2d34ff061957fb$var$getWebpackNonce(doc) {\n let ownerWindow = doc?.defaultView;\n return ownerWindow?.__webpack_nonce__ || globalThis['__webpack_nonce__'] || undefined;\n}\nlet $2b2d34ff061957fb$var$nonceCache = new WeakMap();\nfunction $2b2d34ff061957fb$export$88b319273f3705b4() {\n $2b2d34ff061957fb$var$nonceCache = new WeakMap();\n}\nfunction $2b2d34ff061957fb$export$2b85b721e524d74b(doc) {\n let d = doc ?? (typeof document !== 'undefined' ? document : undefined);\n if (!d) return $2b2d34ff061957fb$var$getWebpackNonce(d);\n if ($2b2d34ff061957fb$var$nonceCache.has(d)) return $2b2d34ff061957fb$var$nonceCache.get(d);\n let meta = d.querySelector('meta[property=\"csp-nonce\"]');\n let nonce = meta && meta instanceof (0, $d447af545b77c9f1$export$f21a1ffae260145a)(meta).HTMLMetaElement && (meta.nonce || meta.content) || $2b2d34ff061957fb$var$getWebpackNonce(d) || undefined;\n if (nonce !== undefined) $2b2d34ff061957fb$var$nonceCache.set(d, nonce);\n return nonce;\n}\n\n\nexport {$2b2d34ff061957fb$export$88b319273f3705b4 as resetNonceCache, $2b2d34ff061957fb$export$2b85b721e524d74b as getNonce};\n//# sourceMappingURL=getNonce.mjs.map\n","import $kV9Vy$react from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nconst $24f9a20f226ad820$export$5165eccb35aaadb5 = (0, $kV9Vy$react).createContext({\n register: ()=>{}\n});\n$24f9a20f226ad820$export$5165eccb35aaadb5.displayName = 'PressResponderContext';\n\n\nexport {$24f9a20f226ad820$export$5165eccb35aaadb5 as PressResponderContext};\n//# sourceMappingURL=context.mjs.map\n","import {chain as $a4e76a5424781910$export$e08e3b67e392101e} from \"../utils/chain.mjs\";\nimport {createSyntheticEvent as $a92dc41f639950be$export$525bc4921d56d4a, preventFocus as $a92dc41f639950be$export$cabe61c495ee3649, setEventTarget as $a92dc41f639950be$export$c2b7abe5d61ec696} from \"./utils.mjs\";\nimport {disableTextSelection as $cbf007e418543821$export$16a4697467175487, restoreTextSelection as $cbf007e418543821$export$b0d6fa1ab32e3295} from \"./textSelection.mjs\";\nimport {focusWithoutScrolling as $1969ac565cfec8d0$export$de79e2c695e052f3} from \"../utils/focusWithoutScrolling.mjs\";\nimport {getEventTarget as $23f2114a1b82827e$export$e58f029f0fbfdb29, nodeContains as $23f2114a1b82827e$export$4282f70798064fe0} from \"../utils/shadowdom/DOMFunctions.mjs\";\nimport {getNonce as $2b2d34ff061957fb$export$2b85b721e524d74b} from \"../utils/getNonce.mjs\";\nimport {getOwnerDocument as $d447af545b77c9f1$export$b204af158042fbac, getOwnerWindow as $d447af545b77c9f1$export$f21a1ffae260145a} from \"../utils/domHelpers.mjs\";\nimport {isMac as $2add3ce32c6007eb$export$9ac100e40613ea10} from \"../utils/platform.mjs\";\nimport {isVirtualClick as $b5c62b033c25b96d$export$60278871457622de, isVirtualPointerEvent as $b5c62b033c25b96d$export$29bf1b5f2c56cf63} from \"../utils/isVirtualEvent.mjs\";\nimport {mergeProps as $bbaa08b3cd72f041$export$9d1611c77c2fe928} from \"../utils/mergeProps.mjs\";\nimport {openLink as $caaf0dd3060ed57c$export$95185d699e05d4d7} from \"../utils/openLink.mjs\";\nimport {PressResponderContext as $24f9a20f226ad820$export$5165eccb35aaadb5} from \"./context.mjs\";\nimport {useEffectEvent as $fe16bffc7a557bf0$export$7f54fc3180508a52} from \"../utils/useEffectEvent.mjs\";\nimport {useGlobalListeners as $48a7d519b337145d$export$4eaf04e54aa8eed6} from \"../utils/useGlobalListeners.mjs\";\nimport {useSyncRef as $b7115c395c64f7b5$export$4debdb1a3f0fa79e} from \"../utils/useSyncRef.mjs\";\nimport {flushSync as $fL2C6$flushSync} from \"react-dom\";\nimport {useContext as $fL2C6$useContext, useState as $fL2C6$useState, useRef as $fL2C6$useRef, useCallback as $fL2C6$useCallback, useMemo as $fL2C6$useMemo, useEffect as $fL2C6$useEffect} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ // Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction $d27d541f9569d26d$var$usePressResponderContext(props) {\n // Consume context from <PressResponder> and merge with props.\n let context = (0, $fL2C6$useContext)((0, $24f9a20f226ad820$export$5165eccb35aaadb5));\n if (context) {\n // Prevent mergeProps from merging ref.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let { register: register, ref: ref, ...contextProps } = context;\n props = (0, $bbaa08b3cd72f041$export$9d1611c77c2fe928)(contextProps, props);\n register();\n }\n (0, $b7115c395c64f7b5$export$4debdb1a3f0fa79e)(context, props.ref);\n return props;\n}\nclass $d27d541f9569d26d$var$PressEvent {\n #shouldStopPropagation;\n constructor(type, pointerType, originalEvent, state){\n this.#shouldStopPropagation = true;\n let currentTarget = state?.target ?? originalEvent.currentTarget;\n const rect = currentTarget?.getBoundingClientRect();\n let x, y = 0;\n let clientX, clientY = null;\n if (originalEvent.clientX != null && originalEvent.clientY != null) {\n clientX = originalEvent.clientX;\n clientY = originalEvent.clientY;\n }\n if (rect) {\n if (clientX != null && clientY != null) {\n x = clientX - rect.left;\n y = clientY - rect.top;\n } else {\n x = rect.width / 2;\n y = rect.height / 2;\n }\n }\n this.type = type;\n this.pointerType = pointerType;\n this.target = originalEvent.currentTarget;\n this.shiftKey = originalEvent.shiftKey;\n this.metaKey = originalEvent.metaKey;\n this.ctrlKey = originalEvent.ctrlKey;\n this.altKey = originalEvent.altKey;\n this.x = x;\n this.y = y;\n this.key = originalEvent.key;\n }\n continuePropagation() {\n this.#shouldStopPropagation = false;\n }\n get shouldStopPropagation() {\n return this.#shouldStopPropagation;\n }\n}\nconst $d27d541f9569d26d$var$LINK_CLICKED = Symbol('linkClicked');\nconst $d27d541f9569d26d$var$STYLE_ID = 'react-aria-pressable-style';\nconst $d27d541f9569d26d$var$PRESSABLE_ATTRIBUTE = 'data-react-aria-pressable';\nfunction $d27d541f9569d26d$export$45712eceda6fad21(props) {\n let { onPress: onPress, onPressChange: onPressChange, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressUp: onPressUp, onClick: onClick, isDisabled: isDisabled, isPressed: isPressedProp, preventFocusOnPress: preventFocusOnPress, shouldCancelOnPointerExit: shouldCancelOnPointerExit, allowTextSelectionOnPress: allowTextSelectionOnPress, ref: domRef, ...domProps } = $d27d541f9569d26d$var$usePressResponderContext(props);\n let [isPressed, setPressed] = (0, $fL2C6$useState)(false);\n let ref = (0, $fL2C6$useRef)({\n isPressed: false,\n ignoreEmulatedMouseEvents: false,\n didFirePressStart: false,\n isTriggeringEvent: false,\n activePointerId: null,\n target: null,\n isOverTarget: false,\n pointerType: null,\n disposables: []\n });\n let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = (0, $48a7d519b337145d$export$4eaf04e54aa8eed6)();\n let triggerPressStart = (0, $fL2C6$useCallback)((originalEvent, pointerType)=>{\n let state = ref.current;\n if (isDisabled || state.didFirePressStart) return false;\n let shouldStopPropagation = true;\n state.isTriggeringEvent = true;\n if (onPressStart) {\n let event = new $d27d541f9569d26d$var$PressEvent('pressstart', pointerType, originalEvent);\n onPressStart(event);\n shouldStopPropagation = event.shouldStopPropagation;\n }\n if (onPressChange) onPressChange(true);\n state.isTriggeringEvent = false;\n state.didFirePressStart = true;\n setPressed(true);\n return shouldStopPropagation;\n }, [\n isDisabled,\n onPressStart,\n onPressChange\n ]);\n let triggerPressEnd = (0, $fL2C6$useCallback)((originalEvent, pointerType, wasPressed = true)=>{\n let state = ref.current;\n if (!state.didFirePressStart) return false;\n state.didFirePressStart = false;\n state.isTriggeringEvent = true;\n let shouldStopPropagation = true;\n if (onPressEnd) {\n let event = new $d27d541f9569d26d$var$PressEvent('pressend', pointerType, originalEvent);\n onPressEnd(event);\n shouldStopPropagation = event.shouldStopPropagation;\n }\n if (onPressChange) onPressChange(false);\n setPressed(false);\n if (onPress && wasPressed && !isDisabled) {\n let event = new $d27d541f9569d26d$var$PressEvent('press', pointerType, originalEvent);\n onPress(event);\n shouldStopPropagation &&= event.shouldStopPropagation;\n }\n state.isTriggeringEvent = false;\n return shouldStopPropagation;\n }, [\n isDisabled,\n onPressEnd,\n onPressChange,\n onPress\n ]);\n let triggerPressEndEvent = (0, $fe16bffc7a557bf0$export$7f54fc3180508a52)(triggerPressEnd);\n let triggerPressUp = (0, $fL2C6$useCallback)((originalEvent, pointerType)=>{\n let state = ref.current;\n if (isDisabled) return false;\n if (onPressUp) {\n state.isTriggeringEvent = true;\n let event = new $d27d541f9569d26d$var$PressEvent('pressup', pointerType, originalEvent);\n onPressUp(event);\n state.isTriggeringEvent = false;\n return event.shouldStopPropagation;\n }\n return true;\n }, [\n isDisabled,\n onPressUp\n ]);\n let triggerPressUpEvent = (0, $fe16bffc7a557bf0$export$7f54fc3180508a52)(triggerPressUp);\n let cancel = (0, $fL2C6$useCallback)((e)=>{\n let state = ref.current;\n if (state.isPressed && state.target) {\n if (state.didFirePressStart && state.pointerType != null) triggerPressEnd($d27d541f9569d26d$var$createEvent(state.target, e), state.pointerType, false);\n state.isPressed = false;\n state.isOverTarget = false;\n state.activePointerId = null;\n state.pointerType = null;\n removeAllGlobalListeners();\n if (!allowTextSelectionOnPress) (0, $cbf007e418543821$export$b0d6fa1ab32e3295)(state.target);\n for (let dispose of state.disposables)dispose();\n state.disposables = [];\n }\n }, [\n allowTextSelectionOnPress,\n removeAllGlobalListeners,\n triggerPressEnd\n ]);\n let cancelEvent = (0, $fe16bffc7a557bf0$export$7f54fc3180508a52)(cancel);\n let cancelOnPointerExit = (0, $fL2C6$useCallback)((e)=>{\n if (shouldCancelOnPointerExit) cancel(e);\n }, [\n shouldCancelOnPointerExit,\n cancel\n ]);\n let triggerClick = (0, $fL2C6$useCallback)((e)=>{\n if (isDisabled) return;\n onClick?.(e);\n }, [\n isDisabled,\n onClick\n ]);\n let triggerSyntheticClick = (0, $fL2C6$useCallback)((e, target)=>{\n if (isDisabled) return;\n // Some third-party libraries pass in onClick instead of onPress.\n // Create a fake mouse event and trigger onClick as well.\n // This matches the browser's native activation behavior for certain elements (e.g. button).\n // https://html.spec.whatwg.org/#activation\n // https://html.spec.whatwg.org/#fire-a-synthetic-pointer-event\n if (onClick) {\n let event = new MouseEvent('click', e);\n (0, $a92dc41f639950be$export$c2b7abe5d61ec696)(event, target);\n onClick((0, $a92dc41f639950be$export$525bc4921d56d4a)(event));\n }\n }, [\n isDisabled,\n onClick\n ]);\n let pressProps = (0, $fL2C6$useMemo)(()=>{\n let state = ref.current;\n let pressProps = {\n onKeyDown (e) {\n if ($d27d541f9569d26d$var$isValidKeyboardEvent(e.nativeEvent, e.currentTarget) && (0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) {\n if ($d27d541f9569d26d$var$shouldPreventDefaultKeyboard((0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e), e.key)) e.preventDefault();\n // If the event is repeating, it may have started on a different element\n // after which focus moved to the current element. Ignore these events and\n // only handle the first key down event.\n let shouldStopPropagation = true;\n if (!state.isPressed && !e.repeat) {\n state.target = e.currentTarget;\n state.isPressed = true;\n state.pointerType = 'keyboard';\n shouldStopPropagation = triggerPressStart(e, 'keyboard');\n }\n // Focus may move before the key up event, so register the event on the document\n // instead of the same element where the key down event occurred. Make it capturing so that it will trigger\n // before stopPropagation from useKeyboard on a child element may happen and thus we can still call triggerPress for the parent element.\n let originalTarget = e.currentTarget;\n let pressUp = (e)=>{\n if ($d27d541f9569d26d$var$isValidKeyboardEvent(e, originalTarget) && !e.repeat && (0, $23f2114a1b82827e$export$4282f70798064fe0)(originalTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e)) && state.target) // eslint-disable-next-line react-hooks/rules-of-hooks\n triggerPressUpEvent($d27d541f9569d26d$var$createEvent(state.target, e), 'keyboard');\n };\n addGlobalListener((0, $d447af545b77c9f1$export$b204af158042fbac)(e.currentTarget), 'keyup', (0, $a4e76a5424781910$export$e08e3b67e392101e)(pressUp, onKeyUp), true);\n if (shouldStopPropagation) e.stopPropagation();\n // Keep track of the keydown events that occur while the Meta (e.g. Command) key is held.\n // macOS has a bug where keyup events are not fired while the Meta key is down.\n // When the Meta key itself is released we will get an event for that, and we'll act as if\n // all of these other keys were released as well.\n // https://bugs.chromium.org/p/chromium/issues/detail?id=1393524\n // https://bugs.webkit.org/show_bug.cgi?id=55291\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1299553\n if (e.metaKey && (0, $2add3ce32c6007eb$export$9ac100e40613ea10)()) state.metaKeyEvents?.set(e.key, e.nativeEvent);\n } else if (e.key === 'Meta') state.metaKeyEvents = new Map();\n },\n onClick (e) {\n if (e && !(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n if (e && e.button === 0 && !state.isTriggeringEvent && !(0, $caaf0dd3060ed57c$export$95185d699e05d4d7).isOpening) {\n let shouldStopPropagation = true;\n if (isDisabled) e.preventDefault();\n // If triggered from a screen reader or by using element.click(),\n // trigger as if it were a keyboard click.\n if (!state.ignoreEmulatedMouseEvents && !state.isPressed && (state.pointerType === 'virtual' || (0, $b5c62b033c25b96d$export$60278871457622de)(e.nativeEvent))) {\n let stopPressStart = triggerPressStart(e, 'virtual');\n // eslint-disable-next-line react-hooks/rules-of-hooks\n let stopPressUp = triggerPressUpEvent(e, 'virtual');\n // eslint-disable-next-line react-hooks/rules-of-hooks\n let stopPressEnd = triggerPressEndEvent(e, 'virtual');\n triggerClick(e);\n shouldStopPropagation = stopPressStart && stopPressUp && stopPressEnd;\n } else if (state.isPressed && state.pointerType !== 'keyboard') {\n let pointerType = state.pointerType || e.nativeEvent.pointerType || 'virtual';\n // eslint-disable-next-line react-hooks/rules-of-hooks\n let stopPressUp = triggerPressUpEvent($d27d541f9569d26d$var$createEvent(e.currentTarget, e), pointerType);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n let stopPressEnd = triggerPressEndEvent($d27d541f9569d26d$var$createEvent(e.currentTarget, e), pointerType, true);\n shouldStopPropagation = stopPressUp && stopPressEnd;\n state.isOverTarget = false;\n triggerClick(e);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n cancelEvent(e);\n }\n state.ignoreEmulatedMouseEvents = false;\n if (shouldStopPropagation) e.stopPropagation();\n }\n }\n };\n let onKeyUp = (e)=>{\n if (state.isPressed && state.target && $d27d541f9569d26d$var$isValidKeyboardEvent(e, state.target)) {\n if ($d27d541f9569d26d$var$shouldPreventDefaultKeyboard((0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e), e.key)) e.preventDefault();\n let target = (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e);\n let wasPressed = (0, $23f2114a1b82827e$export$4282f70798064fe0)(state.target, target);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n triggerPressEndEvent($d27d541f9569d26d$var$createEvent(state.target, e), 'keyboard', wasPressed);\n if (wasPressed) triggerSyntheticClick(e, state.target);\n removeAllGlobalListeners();\n // If a link was triggered with a key other than Enter, open the URL ourselves.\n // This means the link has a role override, and the default browser behavior\n // only applies when using the Enter key.\n if (e.key !== 'Enter' && $d27d541f9569d26d$var$isHTMLAnchorLink(state.target) && (0, $23f2114a1b82827e$export$4282f70798064fe0)(state.target, target) && !e[$d27d541f9569d26d$var$LINK_CLICKED]) {\n // Store a hidden property on the event so we only trigger link click once,\n // even if there are multiple usePress instances attached to the element.\n e[$d27d541f9569d26d$var$LINK_CLICKED] = true;\n (0, $caaf0dd3060ed57c$export$95185d699e05d4d7)(state.target, e, false);\n }\n state.isPressed = false;\n state.metaKeyEvents?.delete(e.key);\n } else if (e.key === 'Meta' && state.metaKeyEvents?.size) {\n // If we recorded keydown events that occurred while the Meta key was pressed,\n // and those haven't received keyup events already, fire keyup events ourselves.\n // See comment above for more info about the macOS bug causing this.\n let events = state.metaKeyEvents;\n state.metaKeyEvents = undefined;\n for (let event of events.values())state.target?.dispatchEvent(new KeyboardEvent('keyup', event));\n }\n };\n if (typeof PointerEvent !== 'undefined') {\n pressProps.onPointerDown = (e)=>{\n // Only handle left clicks, and ignore events that bubbled through portals.\n if (e.button !== 0 || !(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n // iOS safari fires pointer events from VoiceOver with incorrect coordinates/target.\n // Ignore and let the onClick handler take care of it instead.\n // https://bugs.webkit.org/show_bug.cgi?id=222627\n // https://bugs.webkit.org/show_bug.cgi?id=223202\n if ((0, $b5c62b033c25b96d$export$29bf1b5f2c56cf63)(e.nativeEvent)) {\n state.pointerType = 'virtual';\n return;\n }\n state.pointerType = e.pointerType;\n let shouldStopPropagation = true;\n if (!state.isPressed) {\n state.isPressed = true;\n state.isOverTarget = true;\n state.activePointerId = e.pointerId;\n state.target = e.currentTarget;\n if (!allowTextSelectionOnPress) (0, $cbf007e418543821$export$16a4697467175487)(state.target);\n shouldStopPropagation = triggerPressStart(e, state.pointerType);\n // Release pointer capture so that touch interactions can leave the original target.\n // This enables onPointerLeave and onPointerEnter to fire.\n let target = (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e);\n if ('releasePointerCapture' in target) {\n if ('hasPointerCapture' in target) {\n if (target.hasPointerCapture(e.pointerId)) target.releasePointerCapture(e.pointerId);\n } else target.releasePointerCapture(e.pointerId);\n }\n addGlobalListener((0, $d447af545b77c9f1$export$b204af158042fbac)(e.currentTarget), 'pointerup', onPointerUp, false);\n addGlobalListener((0, $d447af545b77c9f1$export$b204af158042fbac)(e.currentTarget), 'pointercancel', onPointerCancel, false);\n }\n if (shouldStopPropagation) e.stopPropagation();\n };\n pressProps.onMouseDown = (e)=>{\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n if (e.button === 0) {\n if (preventFocusOnPress) {\n let dispose = (0, $a92dc41f639950be$export$cabe61c495ee3649)(e.target);\n if (dispose) state.disposables.push(dispose);\n }\n e.stopPropagation();\n }\n };\n pressProps.onPointerUp = (e)=>{\n // iOS fires pointerup with zero width and height, so check the pointerType recorded during pointerdown.\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e)) || state.pointerType === 'virtual') return;\n // Only handle left clicks. If isPressed is true, delay until onClick.\n if (e.button === 0 && !state.isPressed) // eslint-disable-next-line react-hooks/rules-of-hooks\n triggerPressUpEvent(e, state.pointerType || e.pointerType);\n };\n pressProps.onPointerEnter = (e)=>{\n if (e.pointerId === state.activePointerId && state.target && !state.isOverTarget && state.pointerType != null) {\n state.isOverTarget = true;\n triggerPressStart($d27d541f9569d26d$var$createEvent(state.target, e), state.pointerType);\n }\n };\n pressProps.onPointerLeave = (e)=>{\n if (e.pointerId === state.activePointerId && state.target && state.isOverTarget && state.pointerType != null) {\n state.isOverTarget = false;\n // eslint-disable-next-line react-hooks/rules-of-hooks\n triggerPressEndEvent($d27d541f9569d26d$var$createEvent(state.target, e), state.pointerType, false);\n cancelOnPointerExit(e);\n }\n };\n let onPointerUp = (e)=>{\n if (e.pointerId === state.activePointerId && state.isPressed && e.button === 0 && state.target) {\n if ((0, $23f2114a1b82827e$export$4282f70798064fe0)(state.target, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e)) && state.pointerType != null) {\n // Wait for onClick to fire onPress. This avoids browser issues when the DOM\n // is mutated between onPointerUp and onClick, and is more compatible with third party libraries.\n // https://github.com/adobe/react-spectrum/issues/1513\n // https://issues.chromium.org/issues/40732224\n // However, iOS and Android do not focus or fire onClick after a long press.\n // We work around this by triggering a click ourselves after a timeout.\n // This timeout is canceled during the click event in case the real one fires first.\n // The timeout must be at least 32ms, because Safari on iOS delays the click event on\n // non-form elements without certain ARIA roles (for hover emulation).\n // https://github.com/WebKit/WebKit/blob/dccfae42bb29bd4bdef052e469f604a9387241c0/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm#L875-L892\n let clicked = false;\n let timeout = setTimeout(()=>{\n if (state.isPressed && state.target instanceof HTMLElement) {\n if (clicked) // eslint-disable-next-line react-hooks/rules-of-hooks\n cancelEvent(e);\n else {\n (0, $1969ac565cfec8d0$export$de79e2c695e052f3)(state.target);\n state.target.click();\n }\n }\n }, 80);\n // Use a capturing listener to track if a click occurred.\n // If stopPropagation is called it may never reach our handler.\n addGlobalListener(e.currentTarget, 'click', ()=>clicked = true, true);\n state.disposables.push(()=>clearTimeout(timeout));\n } else // eslint-disable-next-line react-hooks/rules-of-hooks\n cancelEvent(e);\n // Ignore subsequent onPointerLeave event before onClick on touch devices.\n state.isOverTarget = false;\n }\n };\n let onPointerCancel = (e)=>{\n // eslint-disable-next-line react-hooks/rules-of-hooks\n cancelEvent(e);\n };\n pressProps.onDragStart = (e)=>{\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n // Safari does not call onPointerCancel when a drag starts, whereas Chrome and Firefox do.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n cancelEvent(e);\n };\n } else if (process.env.NODE_ENV === 'test') {\n // NOTE: this fallback branch is entirely used by unit tests.\n // All browsers now support pointer events, but JSDOM still does not.\n pressProps.onMouseDown = (e)=>{\n // Only handle left clicks\n if (e.button !== 0 || !(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n if (state.ignoreEmulatedMouseEvents) {\n e.stopPropagation();\n return;\n }\n state.isPressed = true;\n state.isOverTarget = true;\n state.target = e.currentTarget;\n state.pointerType = (0, $b5c62b033c25b96d$export$60278871457622de)(e.nativeEvent) ? 'virtual' : 'mouse';\n // Flush sync so that focus moved during react re-renders occurs before we yield back to the browser.\n let shouldStopPropagation = (0, $fL2C6$flushSync)(()=>triggerPressStart(e, state.pointerType));\n if (shouldStopPropagation) e.stopPropagation();\n if (preventFocusOnPress) {\n let dispose = (0, $a92dc41f639950be$export$cabe61c495ee3649)(e.target);\n if (dispose) state.disposables.push(dispose);\n }\n addGlobalListener((0, $d447af545b77c9f1$export$b204af158042fbac)(e.currentTarget), 'mouseup', onMouseUp, false);\n };\n pressProps.onMouseEnter = (e)=>{\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n let shouldStopPropagation = true;\n if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {\n state.isOverTarget = true;\n shouldStopPropagation = triggerPressStart(e, state.pointerType);\n }\n if (shouldStopPropagation) e.stopPropagation();\n };\n pressProps.onMouseLeave = (e)=>{\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n let shouldStopPropagation = true;\n if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {\n state.isOverTarget = false;\n // eslint-disable-next-line react-hooks/rules-of-hooks\n shouldStopPropagation = triggerPressEndEvent(e, state.pointerType, false);\n cancelOnPointerExit(e);\n }\n if (shouldStopPropagation) e.stopPropagation();\n };\n pressProps.onMouseUp = (e)=>{\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n if (!state.ignoreEmulatedMouseEvents && e.button === 0 && !state.isPressed) // eslint-disable-next-line react-hooks/rules-of-hooks\n triggerPressUpEvent(e, state.pointerType || 'mouse');\n };\n let onMouseUp = (e)=>{\n // Only handle left clicks\n if (e.button !== 0) return;\n if (state.ignoreEmulatedMouseEvents) {\n state.ignoreEmulatedMouseEvents = false;\n return;\n }\n if (state.target && (0, $23f2114a1b82827e$export$4282f70798064fe0)(state.target, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e)) && state.pointerType != null) ;\n else // eslint-disable-next-line react-hooks/rules-of-hooks\n cancelEvent(e);\n state.isOverTarget = false;\n };\n pressProps.onTouchStart = (e)=>{\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n let touch = $d27d541f9569d26d$var$getTouchFromEvent(e.nativeEvent);\n if (!touch) return;\n state.activePointerId = touch.identifier;\n state.ignoreEmulatedMouseEvents = true;\n state.isOverTarget = true;\n state.isPressed = true;\n state.target = e.currentTarget;\n state.pointerType = 'touch';\n if (!allowTextSelectionOnPress) (0, $cbf007e418543821$export$16a4697467175487)(state.target);\n let shouldStopPropagation = triggerPressStart($d27d541f9569d26d$var$createTouchEvent(state.target, e), state.pointerType);\n if (shouldStopPropagation) e.stopPropagation();\n addGlobalListener((0, $d447af545b77c9f1$export$f21a1ffae260145a)(e.currentTarget), 'scroll', onScroll, true);\n };\n pressProps.onTouchMove = (e)=>{\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n if (!state.isPressed) {\n e.stopPropagation();\n return;\n }\n let touch = $d27d541f9569d26d$var$getTouchById(e.nativeEvent, state.activePointerId);\n let shouldStopPropagation = true;\n if (touch && $d27d541f9569d26d$var$isOverTarget(touch, e.currentTarget)) {\n if (!state.isOverTarget && state.pointerType != null) {\n state.isOverTarget = true;\n shouldStopPropagation = triggerPressStart($d27d541f9569d26d$var$createTouchEvent(state.target, e), state.pointerType);\n }\n } else if (state.isOverTarget && state.pointerType != null) {\n state.isOverTarget = false;\n // eslint-disable-next-line react-hooks/rules-of-hooks\n shouldStopPropagation = triggerPressEndEvent($d27d541f9569d26d$var$createTouchEvent(state.target, e), state.pointerType, false);\n cancelOnPointerExit($d27d541f9569d26d$var$createTouchEvent(state.target, e));\n }\n if (shouldStopPropagation) e.stopPropagation();\n };\n pressProps.onTouchEnd = (e)=>{\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n if (!state.isPressed) {\n e.stopPropagation();\n return;\n }\n let touch = $d27d541f9569d26d$var$getTouchById(e.nativeEvent, state.activePointerId);\n let shouldStopPropagation = true;\n if (touch && $d27d541f9569d26d$var$isOverTarget(touch, e.currentTarget) && state.pointerType != null) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n triggerPressUpEvent($d27d541f9569d26d$var$createTouchEvent(state.target, e), state.pointerType);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n shouldStopPropagation = triggerPressEndEvent($d27d541f9569d26d$var$createTouchEvent(state.target, e), state.pointerType);\n triggerSyntheticClick(e.nativeEvent, state.target);\n } else if (state.isOverTarget && state.pointerType != null) // eslint-disable-next-line react-hooks/rules-of-hooks\n shouldStopPropagation = triggerPressEndEvent($d27d541f9569d26d$var$createTouchEvent(state.target, e), state.pointerType, false);\n if (shouldStopPropagation) e.stopPropagation();\n state.isPressed = false;\n state.activePointerId = null;\n state.isOverTarget = false;\n state.ignoreEmulatedMouseEvents = true;\n if (state.target && !allowTextSelectionOnPress) (0, $cbf007e418543821$export$b0d6fa1ab32e3295)(state.target);\n removeAllGlobalListeners();\n };\n pressProps.onTouchCancel = (e)=>{\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n e.stopPropagation();\n if (state.isPressed) // eslint-disable-next-line react-hooks/rules-of-hooks\n cancelEvent($d27d541f9569d26d$var$createTouchEvent(state.target, e));\n };\n let onScroll = (e)=>{\n if (state.isPressed && (0, $23f2114a1b82827e$export$4282f70798064fe0)((0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e), state.target)) // eslint-disable-next-line react-hooks/rules-of-hooks\n cancelEvent({\n currentTarget: state.target,\n shiftKey: false,\n ctrlKey: false,\n metaKey: false,\n altKey: false\n });\n };\n pressProps.onDragStart = (e)=>{\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n // eslint-disable-next-line react-hooks/rules-of-hooks\n cancelEvent(e);\n };\n }\n return pressProps;\n }, [\n addGlobalListener,\n isDisabled,\n preventFocusOnPress,\n removeAllGlobalListeners,\n allowTextSelectionOnPress,\n cancelOnPointerExit,\n triggerPressStart,\n triggerClick,\n triggerSyntheticClick\n ]);\n // Avoid onClick delay for double tap to zoom by default.\n (0, $fL2C6$useEffect)(()=>{\n if (!domRef || process.env.NODE_ENV === 'test') return;\n const ownerDocument = (0, $d447af545b77c9f1$export$b204af158042fbac)(domRef.current);\n if (!ownerDocument || !ownerDocument.head || ownerDocument.getElementById($d27d541f9569d26d$var$STYLE_ID)) return;\n const style = ownerDocument.createElement('style');\n style.id = $d27d541f9569d26d$var$STYLE_ID;\n let nonce = (0, $2b2d34ff061957fb$export$2b85b721e524d74b)(ownerDocument);\n if (nonce) style.nonce = nonce;\n // touchAction: 'manipulation' is supposed to be equivalent, but in\n // Safari it causes onPointerCancel not to fire on scroll.\n // https://bugs.webkit.org/show_bug.cgi?id=240917\n style.textContent = `\n@layer {\n [${$d27d541f9569d26d$var$PRESSABLE_ATTRIBUTE}] {\n touch-action: pan-x pan-y pinch-zoom;\n }\n}\n `.trim();\n ownerDocument.head.prepend(style);\n }, [\n domRef\n ]);\n // Remove user-select: none in case component unmounts immediately after pressStart\n (0, $fL2C6$useEffect)(()=>{\n let state = ref.current;\n return ()=>{\n if (!allowTextSelectionOnPress) (0, $cbf007e418543821$export$b0d6fa1ab32e3295)(state.target ?? undefined);\n for (let dispose of state.disposables)dispose();\n state.disposables = [];\n };\n }, [\n allowTextSelectionOnPress\n ]);\n return {\n isPressed: isPressedProp || isPressed,\n pressProps: (0, $bbaa08b3cd72f041$export$9d1611c77c2fe928)(domProps, pressProps, {\n [$d27d541f9569d26d$var$PRESSABLE_ATTRIBUTE]: true\n })\n };\n}\nfunction $d27d541f9569d26d$var$isHTMLAnchorLink(target) {\n return target.tagName === 'A' && target.hasAttribute('href');\n}\nfunction $d27d541f9569d26d$var$isValidKeyboardEvent(event, currentTarget) {\n const { key: key, code: code } = event;\n const element = currentTarget;\n const role = element.getAttribute('role');\n // Accessibility for keyboards. Space and Enter only.\n // \"Spacebar\" is for IE 11\n return (key === 'Enter' || key === ' ' || key === 'Spacebar' || code === 'Space') && !(element instanceof (0, $d447af545b77c9f1$export$f21a1ffae260145a)(element).HTMLInputElement && !$d27d541f9569d26d$var$isValidInputKey(element, key) || element instanceof (0, $d447af545b77c9f1$export$f21a1ffae260145a)(element).HTMLTextAreaElement || element.isContentEditable) && // Links should only trigger with Enter key\n !((role === 'link' || !role && $d27d541f9569d26d$var$isHTMLAnchorLink(element)) && key !== 'Enter');\n}\nfunction $d27d541f9569d26d$var$getTouchFromEvent(event) {\n const { targetTouches: targetTouches } = event;\n if (targetTouches.length > 0) return targetTouches[0];\n return null;\n}\nfunction $d27d541f9569d26d$var$getTouchById(event, pointerId) {\n const changedTouches = event.changedTouches;\n for(let i = 0; i < changedTouches.length; i++){\n const touch = changedTouches[i];\n if (touch.identifier === pointerId) return touch;\n }\n return null;\n}\nfunction $d27d541f9569d26d$var$createTouchEvent(target, e) {\n let clientX = 0;\n let clientY = 0;\n if (e.targetTouches && e.targetTouches.length === 1) {\n clientX = e.targetTouches[0].clientX;\n clientY = e.targetTouches[0].clientY;\n }\n return {\n currentTarget: target,\n shiftKey: e.shiftKey,\n ctrlKey: e.ctrlKey,\n metaKey: e.metaKey,\n altKey: e.altKey,\n clientX: clientX,\n clientY: clientY\n };\n}\nfunction $d27d541f9569d26d$var$createEvent(target, e) {\n let clientX = e.clientX;\n let clientY = e.clientY;\n return {\n currentTarget: target,\n shiftKey: e.shiftKey,\n ctrlKey: e.ctrlKey,\n metaKey: e.metaKey,\n altKey: e.altKey,\n clientX: clientX,\n clientY: clientY,\n key: e.key\n };\n}\nfunction $d27d541f9569d26d$var$getPointClientRect(point) {\n let offsetX = 0;\n let offsetY = 0;\n if (point.width !== undefined) offsetX = point.width / 2;\n else if (point.radiusX !== undefined) offsetX = point.radiusX;\n if (point.height !== undefined) offsetY = point.height / 2;\n else if (point.radiusY !== undefined) offsetY = point.radiusY;\n return {\n top: point.clientY - offsetY,\n right: point.clientX + offsetX,\n bottom: point.clientY + offsetY,\n left: point.clientX - offsetX\n };\n}\nfunction $d27d541f9569d26d$var$areRectanglesOverlapping(a, b) {\n // check if they cannot overlap on x axis\n if (a.left > b.right || b.left > a.right) return false;\n // check if they cannot overlap on y axis\n if (a.top > b.bottom || b.top > a.bottom) return false;\n return true;\n}\nfunction $d27d541f9569d26d$var$isOverTarget(point, target) {\n let rect = target.getBoundingClientRect();\n let pointRect = $d27d541f9569d26d$var$getPointClientRect(point);\n return $d27d541f9569d26d$var$areRectanglesOverlapping(rect, pointRect);\n}\nfunction $d27d541f9569d26d$var$shouldPreventDefaultUp(target) {\n if (target instanceof HTMLInputElement) return false;\n if (target instanceof HTMLButtonElement) return target.type !== 'submit' && target.type !== 'reset';\n if ($d27d541f9569d26d$var$isHTMLAnchorLink(target)) return false;\n return true;\n}\nfunction $d27d541f9569d26d$var$shouldPreventDefaultKeyboard(target, key) {\n if (target instanceof HTMLInputElement) return !$d27d541f9569d26d$var$isValidInputKey(target, key);\n return $d27d541f9569d26d$var$shouldPreventDefaultUp(target);\n}\nconst $d27d541f9569d26d$var$nonTextInputTypes = new Set([\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset'\n]);\nfunction $d27d541f9569d26d$var$isValidInputKey(target, key) {\n // Only space should toggle checkboxes and radios, not enter.\n return target.type === 'checkbox' || target.type === 'radio' ? key === ' ' : $d27d541f9569d26d$var$nonTextInputTypes.has(target.type);\n}\n\n\nexport {$d27d541f9569d26d$export$45712eceda6fad21 as usePress};\n//# sourceMappingURL=usePress.mjs.map\n","import React, { useState, useRef, useEffect, useId, forwardRef } from 'react';\nimport { Button, ButtonProps } from '../Button/Button';\nimport { Popover } from '../Popover/Popover';\nimport styles from './Menu.module.css';\nimport IconButton from '../IconButton';\nimport { useButton, useObjectRef } from 'react-aria';\n\n// Create a static registry to track the currently open menu\nconst menuRegistry = {\n activeMenuId: null as string | null,\n setActiveMenu: (id: string | null) => {\n menuRegistry.activeMenuId = id;\n },\n getActiveMenu: () => menuRegistry.activeMenuId,\n};\n\n// Define placement types for the Menu component\ntype PlacementType =\n | 'top'\n | 'top start'\n | 'top end'\n | 'right'\n | 'right top'\n | 'right bottom'\n | 'bottom'\n | 'bottom start'\n | 'bottom end'\n | 'left'\n | 'left top'\n | 'left bottom';\n\n// Props for the Menu component\nexport interface MenuProps {\n /**\n * The label text for the menu button\n */\n label?: string;\n\n /**\n * Accessible label for the menu (for screen readers)\n * Defaults to the button label if not provided\n * @default props.label\n */\n 'aria-label'?: string;\n\n /**\n * Whether the menu is disabled\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * The placement of the menu relative to the button\n * @default 'bottom start'\n */\n placement?: PlacementType;\n\n /**\n * The button emphasis\n * @default 'tertiary'\n */\n buttonEmphasis?: ButtonProps['emphasis'];\n\n /**\n * The button style variant\n * @default 'neutral'\n */\n buttonStyleVariant?: ButtonProps['styleVariant'];\n\n /**\n * The button style variant when menu is open\n * @default buttonStyleVariant value\n */\n buttonOpenVariant?: ButtonProps['styleVariant'];\n\n /**\n * ID of an element to position the menu against instead of the button\n * When provided, the menu will be positioned relative to this element\n */\n alignToElementId?: string;\n\n /**\n * Whether the menu should flip to fit in the viewport\n * @default false\n */\n shouldFlip?: boolean;\n\n /**\n * Whether the menu should open on hover and focus\n * @default false\n */\n openOnHoverAndFocus?: boolean;\n\n /**\n * Whether to allow tabbing out of the menu\n * @default true\n */\n allowTabOut?: boolean;\n\n /**\n * Whether the menu should close when mouse leaves the menu area\n * @default true\n */\n closeOnHover?: boolean;\n\n /**\n * The content to display inside the menu (as JSX children)\n * Can be custom HTML content. Interactive elements work normally.\n * Add data-menu-close=\"true\" to elements that should close the menu when clicked.\n */\n children: React.ReactNode;\n\n /**\n * Icon props for the start of the button\n */\n iconStartProps?: ButtonProps['iconStartProps'];\n\n /**\n * Icon props for the end of the button\n */\n iconEndProps?: ButtonProps['iconEndProps'];\n\n /**\n * Callback function that is called when the open state of the menu changes\n */\n onOpenChange?: (isOpen: boolean) => void;\n}\n\n// Custom hook for menu state management\nconst useMenuState = (\n menuId: string,\n onOpenChange: MenuProps['onOpenChange'],\n) => {\n const isMounted = useRef(false);\n const [isOpen, setIsOpen] = useState(false);\n const [preventFocusOpen, setPreventFocusOpen] = useState(false);\n const [openedViaKeyboard, setOpenedViaKeyboard] = useState(false);\n\n const closeMenu = () => {\n menuRegistry.setActiveMenu(null);\n setIsOpen(false);\n setPreventFocusOpen(true);\n\n setTimeout(() => {\n setPreventFocusOpen(false);\n }, 300);\n };\n\n const openMenu = (viaKeyboard = false) => {\n // Close any other open menu first\n if (\n menuRegistry.getActiveMenu() &&\n menuRegistry.getActiveMenu() !== menuId\n ) {\n document.dispatchEvent(\n new CustomEvent('menu:closeAll', {\n detail: { exceptMenuId: menuId },\n }),\n );\n }\n\n menuRegistry.setActiveMenu(menuId);\n setIsOpen(true);\n setOpenedViaKeyboard(viaKeyboard);\n };\n\n const toggleMenu = () => {\n if (isOpen) {\n closeMenu();\n } else {\n const isKeyboardFocused = document.activeElement?.tagName === 'BUTTON';\n openMenu(isKeyboardFocused);\n }\n };\n\n useEffect(() => {\n if (onOpenChange && isMounted.current) onOpenChange(isOpen);\n // Leave `onOpenChange` out of dependency array to avoid multiple calls if callback is not memoised\n }, [isOpen]);\n\n // Avoid running onOpenChange effect on first render\n useEffect(() => {\n isMounted.current = true;\n }, []);\n\n return {\n isOpen,\n setIsOpen,\n preventFocusOpen,\n setPreventFocusOpen,\n openedViaKeyboard,\n setOpenedViaKeyboard,\n closeMenu,\n openMenu,\n toggleMenu,\n };\n};\n\n// Custom hook for keyboard navigation within the menu\nconst useMenuNavigation = (\n menuRef: React.RefObject<HTMLDivElement | null>,\n allowTabOut: boolean,\n closeMenu: () => void,\n buttonRef: React.RefObject<HTMLButtonElement | null>,\n) => {\n const findNextFocusableElement = (\n startElement: HTMLElement,\n ): HTMLElement | null => {\n const focusableElements = Array.from(\n document.querySelectorAll(\n 'a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])',\n ),\n ) as HTMLElement[];\n\n const startIndex = focusableElements.indexOf(startElement);\n return startIndex !== -1 && startIndex < focusableElements.length - 1\n ? focusableElements[startIndex + 1]\n : focusableElements[0];\n };\n\n const handleTabNavigation = () => {\n const triggerElement = buttonRef.current;\n if (triggerElement) {\n const nextElement = findNextFocusableElement(triggerElement);\n closeMenu();\n setTimeout(() => {\n if (nextElement) {\n nextElement.focus();\n }\n }, 10);\n } else {\n closeMenu();\n }\n };\n\n const getFocusableElements = (): HTMLElement[] => {\n if (!menuRef.current) return [];\n\n return Array.from(\n menuRef.current.querySelectorAll(\n 'a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])',\n ),\n ) as HTMLElement[];\n };\n\n const handleArrowNavigation = (\n e: React.KeyboardEvent,\n focusableElements: HTMLElement[],\n ) => {\n if (focusableElements.length === 0) return;\n\n const focusedElement = document.activeElement as HTMLElement;\n const currentIndex = focusableElements.indexOf(focusedElement);\n\n if (e.key === 'ArrowDown') {\n e.preventDefault();\n const nextIndex =\n currentIndex < focusableElements.length - 1 ? currentIndex + 1 : 0;\n focusableElements[nextIndex].focus();\n } else if (e.key === 'ArrowUp') {\n e.preventDefault();\n const prevIndex =\n currentIndex > 0 ? currentIndex - 1 : focusableElements.length - 1;\n focusableElements[prevIndex].focus();\n } else if (e.key === 'Home') {\n e.preventDefault();\n focusableElements[0].focus();\n } else if (e.key === 'End') {\n e.preventDefault();\n focusableElements[focusableElements.length - 1].focus();\n }\n };\n\n const handleMenuKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n closeMenu();\n if (buttonRef.current) {\n buttonRef.current.focus();\n }\n return;\n }\n\n if (e.key === 'Tab' && allowTabOut) {\n e.preventDefault();\n handleTabNavigation();\n return;\n }\n\n // Handle arrow key navigation for focusable elements\n const focusableElements = getFocusableElements();\n handleArrowNavigation(e, focusableElements);\n };\n\n return { handleMenuKeyDown, getFocusableElements };\n};\n\n// Custom hook for hover and focus behavior with improved reliability\nconst useHoverAndFocus = (\n openOnHoverAndFocus: boolean,\n isDisabled: boolean,\n preventFocusOpen: boolean,\n menuId: string,\n buttonRef: React.RefObject<HTMLButtonElement | null>,\n containerRef: React.RefObject<HTMLDivElement | null>,\n menuRef: React.RefObject<HTMLDivElement | null>,\n isOpen: boolean,\n openMenu: (viaKeyboard?: boolean) => void,\n closeMenu: () => void,\n) => {\n useEffect(() => {\n if (!openOnHoverAndFocus || isDisabled) return;\n\n let hoverTimeout: NodeJS.Timeout | null = null;\n let isHovering = false;\n\n const clearHoverTimeout = () => {\n if (hoverTimeout) {\n clearTimeout(hoverTimeout);\n hoverTimeout = null;\n }\n };\n\n // Helper to handle hover check logic\n const handleHoverCheck = () => {\n const button = buttonRef.current;\n const menu = menuRef.current;\n\n if (!button) return;\n\n // Check if mouse is over button or menu\n const isOverButton = button.matches(':hover');\n const isOverMenu = menu?.matches(':hover') || false;\n\n if (!isOverButton && !isOverMenu && isHovering) {\n isHovering = false;\n hoverTimeout = setTimeout(handleCloseMenuIfActive, 300);\n }\n };\n\n // Helper to close menu if active\n const handleCloseMenuIfActive = () => {\n if (menuRegistry.getActiveMenu() === menuId) {\n closeMenu();\n }\n };\n\n const checkIfStillHovering = () => {\n // Use a small delay to check if we're still hovering\n setTimeout(handleHoverCheck, 50);\n };\n\n const handleMouseEnter = () => {\n clearHoverTimeout();\n if (!isHovering) {\n isHovering = true;\n if (!isOpen) {\n hoverTimeout = setTimeout(() => {\n openMenu(false);\n }, 300);\n }\n }\n };\n\n const handleMouseLeave = () => {\n checkIfStillHovering();\n };\n\n const handleMenuMouseEnter = () => {\n clearHoverTimeout();\n isHovering = true;\n };\n\n const handleMenuMouseLeave = () => {\n checkIfStillHovering();\n };\n\n const buttonElement = buttonRef.current;\n const menuElement = menuRef.current;\n\n if (buttonElement) {\n buttonElement.addEventListener('mouseenter', handleMouseEnter);\n buttonElement.addEventListener('mouseleave', handleMouseLeave);\n }\n\n // Set up menu listeners when menu is open\n if (isOpen && menuElement) {\n menuElement.addEventListener('mouseenter', handleMenuMouseEnter);\n menuElement.addEventListener('mouseleave', handleMenuMouseLeave);\n }\n\n return () => {\n if (buttonElement) {\n buttonElement.removeEventListener('mouseenter', handleMouseEnter);\n buttonElement.removeEventListener('mouseleave', handleMouseLeave);\n }\n if (menuElement) {\n menuElement.removeEventListener('mouseenter', handleMenuMouseEnter);\n menuElement.removeEventListener('mouseleave', handleMenuMouseLeave);\n }\n clearHoverTimeout();\n };\n }, [\n openOnHoverAndFocus,\n isDisabled,\n menuId,\n isOpen,\n openMenu,\n closeMenu,\n buttonRef,\n menuRef,\n ]);\n\n useEffect(() => {\n if (!openOnHoverAndFocus || isDisabled) return;\n\n const buttonElement = buttonRef.current;\n if (!buttonElement) return;\n\n let focusTimeout: NodeJS.Timeout | null = null;\n let isMenuOpening = false;\n\n const handleFocus = () => {\n if (preventFocusOpen) return;\n\n if (focusTimeout) {\n clearTimeout(focusTimeout);\n }\n\n isMenuOpening = true;\n\n focusTimeout = setTimeout(() => {\n const activeElement = document.activeElement;\n const wasFocusedByKeyboard =\n activeElement === buttonElement &&\n document.activeElement !== document.body;\n\n openMenu(wasFocusedByKeyboard);\n setTimeout(() => {\n isMenuOpening = false;\n }, 500);\n }, 300);\n };\n\n const handleBlur = (e: FocusEvent) => {\n if (isMenuOpening) return;\n\n if (focusTimeout) {\n clearTimeout(focusTimeout);\n }\n\n const containerElement = containerRef.current;\n const relatedTarget = e.relatedTarget as Node;\n\n if (containerElement && !containerElement.contains(relatedTarget)) {\n focusTimeout = setTimeout(() => {\n if (menuRegistry.getActiveMenu() === menuId) {\n closeMenu();\n }\n }, 200);\n }\n };\n\n buttonElement.addEventListener('focus', handleFocus);\n buttonElement.addEventListener('blur', handleBlur);\n\n return () => {\n buttonElement.removeEventListener('focus', handleFocus);\n buttonElement.removeEventListener('blur', handleBlur);\n if (focusTimeout) {\n clearTimeout(focusTimeout);\n }\n };\n }, [\n openOnHoverAndFocus,\n isDisabled,\n preventFocusOpen,\n menuId,\n openMenu,\n closeMenu,\n containerRef,\n buttonRef,\n ]);\n};\n\n// Simplified menu hover behavior for closeOnHover\nconst useMenuHover = (\n menuRef: React.RefObject<HTMLDivElement | null>,\n isOpen: boolean,\n closeOnHover: boolean,\n openOnHoverAndFocus: boolean,\n menuId: string,\n closeMenu: () => void,\n) => {\n useEffect(() => {\n // Skip if openOnHoverAndFocus is handling the hover behavior\n if (!isOpen || !closeOnHover || openOnHoverAndFocus) return;\n\n let hoverTimeout: NodeJS.Timeout | null = null;\n\n const clearHoverTimeout = () => {\n if (hoverTimeout) {\n clearTimeout(hoverTimeout);\n hoverTimeout = null;\n }\n };\n\n const handleMenuMouseLeave = () => {\n clearHoverTimeout();\n hoverTimeout = setTimeout(() => {\n closeMenu();\n }, 200);\n };\n\n const handleMenuMouseEnter = () => {\n clearHoverTimeout();\n };\n\n const menuElement = menuRef.current;\n if (menuElement) {\n menuElement.addEventListener('mouseenter', handleMenuMouseEnter);\n menuElement.addEventListener('mouseleave', handleMenuMouseLeave);\n }\n\n return () => {\n if (menuElement) {\n menuElement.removeEventListener('mouseenter', handleMenuMouseEnter);\n menuElement.removeEventListener('mouseleave', handleMenuMouseLeave);\n }\n clearHoverTimeout();\n };\n }, [isOpen, closeOnHover, openOnHoverAndFocus, menuId, closeMenu, menuRef]);\n};\n\n// Custom hook to handle menu closing behavior\nconst useMenuCloseHandling = (\n menuRef: React.RefObject<HTMLDivElement | null>,\n containerRef: React.RefObject<HTMLDivElement | null>,\n isOpen: boolean,\n menuId: string,\n closeMenu: () => void,\n) => {\n useEffect(() => {\n if (!isOpen) return;\n\n const handleDocumentClick = (e: Event) => {\n const target = e.target as HTMLElement;\n const container = containerRef.current;\n const menu = menuRef.current;\n\n // Check if click is on the trigger button (inside container but outside menu)\n const isOnTriggerButton =\n container?.contains(target) && !menu?.contains(target);\n\n // If click is inside the menu content, only close if element has data-menu-close=\"true\"\n if (menu && menu.contains(target)) {\n const shouldClose = target.closest('[data-menu-close=\"true\"]');\n if (shouldClose) {\n closeMenu();\n }\n return;\n }\n\n // If click is on the trigger button, let the button handle it (don't close here)\n if (isOnTriggerButton) {\n return;\n }\n\n // If we get here, it's a click outside both the menu and the trigger button\n closeMenu();\n };\n\n // Use capture phase to handle clicks before they bubble\n document.addEventListener('click', handleDocumentClick, true);\n\n return () => {\n document.removeEventListener('click', handleDocumentClick, true);\n };\n }, [isOpen, menuId, closeMenu, menuRef, containerRef]);\n};\n\n/**\n * Component to replace default Button with another button-like component/element\n */\nexport const Trigger = forwardRef<HTMLButtonElement, ButtonProps>(\n function Trigger({ children, ...triggerProps }, forwardedRef) {\n const element = React.Children.only(children) as React.ReactElement;\n const ref = useObjectRef(forwardedRef);\n\n const elementProps = { ...triggerProps, ...element.props };\n const { buttonProps } = useButton(elementProps, ref); // Get accessible button props for non-Alto components\n\n // Use React ARIA `buttonProps` if the trigger element is a non-Alto components\n const props =\n element.type !== Button && element.type !== IconButton\n ? buttonProps\n : elementProps;\n\n return React.cloneElement(element, {\n ...props,\n ref,\n });\n },\n);\n\nexport const Menu = ({\n label,\n 'aria-label': ariaLabel,\n isDisabled = false,\n placement = 'bottom start',\n buttonEmphasis = 'tertiary',\n buttonStyleVariant = 'neutral',\n buttonOpenVariant = buttonStyleVariant,\n alignToElementId,\n shouldFlip = true,\n openOnHoverAndFocus = false,\n allowTabOut = true,\n closeOnHover = true,\n children,\n iconStartProps,\n iconEndProps,\n onOpenChange,\n}: MenuProps) => {\n // Generate a unique ID for this menu instance\n const uniqueId = useId();\n const menuId = `menu-${uniqueId}`;\n\n // References\n const buttonRef = useRef<HTMLButtonElement>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const menuRef = useRef<HTMLDivElement>(null);\n\n // State management\n const {\n isOpen,\n setIsOpen,\n preventFocusOpen,\n setPreventFocusOpen,\n openedViaKeyboard,\n setOpenedViaKeyboard,\n closeMenu,\n openMenu,\n toggleMenu,\n } = useMenuState(menuId, onOpenChange);\n\n // Navigation handling\n const { handleMenuKeyDown, getFocusableElements } = useMenuNavigation(\n menuRef,\n allowTabOut,\n closeMenu,\n buttonRef,\n );\n\n // Hover and focus handling\n useHoverAndFocus(\n openOnHoverAndFocus,\n isDisabled,\n preventFocusOpen,\n menuId,\n buttonRef,\n containerRef,\n menuRef,\n isOpen,\n openMenu,\n closeMenu,\n );\n\n // Menu hover handling (controlled by closeOnHover prop)\n useMenuHover(\n menuRef,\n isOpen,\n closeOnHover,\n openOnHoverAndFocus,\n menuId,\n closeMenu,\n );\n\n // Menu close handling\n useMenuCloseHandling(menuRef, containerRef, isOpen, menuId, closeMenu);\n\n // Determine which style variant to use based on state\n const currentStyleVariant = isOpen ? buttonOpenVariant : buttonStyleVariant;\n\n // Function to create a ref to the alignment target\n const getAlignmentTarget = () => {\n if (alignToElementId) {\n const targetElement = document.getElementById(alignToElementId);\n if (targetElement) {\n return { current: targetElement };\n }\n }\n return buttonRef;\n };\n\n // Handle keyboard events on the trigger button\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Escape' && isOpen) {\n e.preventDefault();\n closeMenu();\n setPreventFocusOpen(true);\n\n setTimeout(() => {\n setPreventFocusOpen(false);\n }, 300);\n } else if (e.key === 'ArrowDown' && !isOpen) {\n e.preventDefault();\n openMenu(true);\n }\n };\n\n // Listen for global menu close events\n useEffect(() => {\n const handleCloseAll = (e: CustomEvent) => {\n const { exceptMenuId } = e.detail || {};\n\n if (exceptMenuId && exceptMenuId === menuId) {\n return;\n }\n\n if (isOpen) {\n setIsOpen(false);\n }\n };\n\n document.addEventListener('menu:closeAll', handleCloseAll as EventListener);\n\n return () => {\n document.removeEventListener(\n 'menu:closeAll',\n handleCloseAll as EventListener,\n );\n };\n }, [menuId, isOpen, setIsOpen]);\n\n // Update state when global registry changes\n useEffect(() => {\n const isActive = menuRegistry.getActiveMenu() === menuId;\n if (isActive !== isOpen) {\n setIsOpen(isActive);\n }\n }, [menuId, isOpen, setIsOpen]);\n\n // Focus first menu item when opened via keyboard\n useEffect(() => {\n if (isOpen && openedViaKeyboard && menuRef.current) {\n const focusableElements = getFocusableElements();\n\n if (focusableElements.length > 0) {\n setTimeout(() => {\n focusableElements[0].focus();\n }, 50);\n }\n }\n }, [isOpen, openedViaKeyboard, getFocusableElements]);\n\n // Reset openedViaKeyboard when menu closes\n useEffect(() => {\n if (!isOpen) {\n setOpenedViaKeyboard(false);\n }\n }, [isOpen, setOpenedViaKeyboard]);\n\n // Popover state object\n const menuTriggerState = {\n isOpen,\n open: () => openMenu(),\n close: closeMenu,\n toggle: () => toggleMenu(),\n setOpen: (open: boolean) => {\n if (open) {\n openMenu();\n } else {\n closeMenu();\n }\n },\n };\n\n const handleButtonPress = () => {\n setPreventFocusOpen(false);\n\n // Set keyboard flag based on current focus\n const isKeyboardFocused = document.activeElement === buttonRef.current;\n setOpenedViaKeyboard(isKeyboardFocused);\n\n toggleMenu();\n };\n\n /** Custom trigger logic */\n const defaultTriggerProps = {\n ref: buttonRef,\n 'aria-haspopup': true,\n 'aria-expanded': isOpen,\n onPress: handleButtonPress,\n onKeyDown: handleKeyDown,\n };\n\n const menuChildren = React.Children.toArray(children);\n let menuItems = children;\n let trigger = (\n <Button\n emphasis={buttonEmphasis}\n styleVariant={currentStyleVariant}\n isDisabled={isDisabled}\n iconStartProps={iconStartProps}\n iconEndProps={iconEndProps}\n {...defaultTriggerProps}\n >\n {label}\n </Button>\n );\n\n // Get custom trigger from menu children\n const triggerIndex = menuChildren.findIndex(\n (child) => (child as React.ReactElement)?.type === Trigger,\n );\n const customTrigger = menuChildren[triggerIndex];\n\n if (React.isValidElement(customTrigger)) {\n trigger = React.cloneElement(customTrigger, defaultTriggerProps);\n // Remove custom trigger from children\n menuItems = menuChildren.filter((_, index) => index !== triggerIndex);\n }\n\n return (\n <div className={styles.menuContainer} ref={containerRef}>\n {trigger}\n {isOpen && (\n <Popover\n state={menuTriggerState}\n triggerRef={getAlignmentTarget()}\n hasArrow={false}\n placement={placement}\n shouldFlip={shouldFlip}\n isNonModal={true}\n allowTabOut={allowTabOut}\n autoFocus={openedViaKeyboard}\n >\n <div\n className={styles.menuContent}\n ref={menuRef}\n onKeyDown={handleMenuKeyDown}\n role=\"menu\"\n aria-label={ariaLabel || label}\n tabIndex={-1}\n >\n {menuItems}\n </div>\n </Popover>\n )}\n </div>\n );\n};\n\nMenu.Trigger = Trigger;\n\nexport default Menu;\n","import {useRef as $i6EpZ$useRef, useCallback as $i6EpZ$useCallback, useMemo as $i6EpZ$useMemo} from \"react\";\n\n/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nfunction $03e8ab2d84d7657a$export$4338b53315abf666(ref) {\n const objRef = (0, $i6EpZ$useRef)(null);\n const cleanupRef = (0, $i6EpZ$useRef)(undefined);\n const refEffect = (0, $i6EpZ$useCallback)((instance)=>{\n if (typeof ref === 'function') {\n const refCallback = ref;\n const refCleanup = refCallback(instance);\n return ()=>{\n if (typeof refCleanup === 'function') refCleanup();\n else refCallback(null);\n };\n } else if (ref) {\n ref.current = instance;\n return ()=>{\n ref.current = null;\n };\n }\n }, [\n ref\n ]);\n return (0, $i6EpZ$useMemo)(()=>({\n get current () {\n return objRef.current;\n },\n set current (value){\n objRef.current = value;\n if (cleanupRef.current) {\n cleanupRef.current();\n cleanupRef.current = undefined;\n }\n if (value != null) cleanupRef.current = refEffect(value);\n }\n }), [\n refEffect\n ]);\n}\n\n\nexport {$03e8ab2d84d7657a$export$4338b53315abf666 as useObjectRef};\n//# sourceMappingURL=useObjectRef.mjs.map\n","import {filterDOMProps as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f} from \"../utils/filterDOMProps.mjs\";\nimport {mergeProps as $bbaa08b3cd72f041$export$9d1611c77c2fe928} from \"../utils/mergeProps.mjs\";\nimport {useFocusable as $d1116acdf220c2da$export$4c014de7c8940b4c} from \"../interactions/useFocusable.mjs\";\nimport {usePress as $d27d541f9569d26d$export$45712eceda6fad21} from \"../interactions/usePress.mjs\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nfunction $ac4318a9c075bb9f$export$ea18c227d4417cc3(props, ref) {\n let { elementType: elementType = 'button', isDisabled: isDisabled, onPress: onPress, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressUp: onPressUp, onPressChange: onPressChange, preventFocusOnPress: preventFocusOnPress, allowFocusWhenDisabled: // @ts-ignore - undocumented\n allowFocusWhenDisabled, onClick: onClick, href: href, target: target, rel: rel, type: type = 'button' } = props;\n let additionalProps;\n if (elementType === 'button') additionalProps = {\n type: type,\n disabled: isDisabled,\n form: props.form,\n formAction: props.formAction,\n formEncType: props.formEncType,\n formMethod: props.formMethod,\n formNoValidate: props.formNoValidate,\n formTarget: props.formTarget,\n name: props.name,\n value: props.value\n };\n else additionalProps = {\n role: 'button',\n href: elementType === 'a' && !isDisabled ? href : undefined,\n target: elementType === 'a' ? target : undefined,\n type: elementType === 'input' ? type : undefined,\n disabled: elementType === 'input' ? isDisabled : undefined,\n 'aria-disabled': !isDisabled || elementType === 'input' ? undefined : isDisabled,\n rel: elementType === 'a' ? rel : undefined\n };\n let { pressProps: pressProps, isPressed: isPressed } = (0, $d27d541f9569d26d$export$45712eceda6fad21)({\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onPressChange: onPressChange,\n onPress: onPress,\n onPressUp: onPressUp,\n onClick: onClick,\n isDisabled: isDisabled,\n preventFocusOnPress: preventFocusOnPress,\n ref: ref\n });\n let { focusableProps: focusableProps } = (0, $d1116acdf220c2da$export$4c014de7c8940b4c)(props, ref);\n if (allowFocusWhenDisabled) focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;\n let buttonProps = (0, $bbaa08b3cd72f041$export$9d1611c77c2fe928)(focusableProps, pressProps, (0, $8e9d2fae0ecb9001$export$457c3d6518dd4c6f)(props, {\n labelable: true\n }));\n return {\n isPressed: isPressed,\n buttonProps: (0, $bbaa08b3cd72f041$export$9d1611c77c2fe928)(additionalProps, buttonProps, {\n 'aria-haspopup': props['aria-haspopup'],\n 'aria-expanded': props['aria-expanded'],\n 'aria-controls': props['aria-controls'],\n 'aria-pressed': props['aria-pressed'],\n 'aria-current': props['aria-current'],\n 'aria-disabled': props['aria-disabled']\n })\n };\n}\n\n\nexport {$ac4318a9c075bb9f$export$ea18c227d4417cc3 as useButton};\n//# sourceMappingURL=useButton.mjs.map\n"],"names":["$cbf007e418543821$var$state","$cbf007e418543821$var$savedUserSelect","$cbf007e418543821$var$modifiedElementMap","WeakMap","$cbf007e418543821$export$16a4697467175487","target","$2add3ce32c6007eb$export$fedb369cb70207f1","documentObject","$d447af545b77c9f1$export$b204af158042fbac","documentElement","style","webkitUserSelect","HTMLElement","SVGElement","property","set","$cbf007e418543821$export$b0d6fa1ab32e3295","setTimeout","$081cb5757e08788e$export$24490316f764c430","has","targetOldUserSelect","get","getAttribute","removeAttribute","delete","$2b2d34ff061957fb$var$getWebpackNonce","doc","ownerWindow","defaultView","__webpack_nonce__","globalThis","$2b2d34ff061957fb$var$nonceCache","$24f9a20f226ad820$export$5165eccb35aaadb5","$kV9Vy$react","createContext","register","displayName","$d27d541f9569d26d$var$PressEvent","shouldStopPropagation","constructor","type","pointerType","originalEvent","state","this","currentTarget","rect","getBoundingClientRect","x","clientX","y","clientY","left","top","width","height","shiftKey","metaKey","ctrlKey","altKey","key","continuePropagation","$d27d541f9569d26d$var$LINK_CLICKED","$d27d541f9569d26d$var$STYLE_ID","$d27d541f9569d26d$var$PRESSABLE_ATTRIBUTE","$d27d541f9569d26d$export$45712eceda6fad21","props","onPress","onPressChange","onPressStart","onPressEnd","onPressUp","onClick","isDisabled","isPressed","isPressedProp","preventFocusOnPress","shouldCancelOnPointerExit","allowTextSelectionOnPress","ref","domRef","domProps","context","$fL2C6$useContext","contextProps","$bbaa08b3cd72f041$export$9d1611c77c2fe928","$b7115c395c64f7b5$export$4debdb1a3f0fa79e","$d27d541f9569d26d$var$usePressResponderContext","setPressed","$fL2C6$useState","$fL2C6$useRef","ignoreEmulatedMouseEvents","didFirePressStart","isTriggeringEvent","activePointerId","isOverTarget","disposables","addGlobalListener","removeAllGlobalListeners","$48a7d519b337145d$export$4eaf04e54aa8eed6","triggerPressStart","$fL2C6$useCallback","current","event","triggerPressEnd","wasPressed","triggerPressEndEvent","$fe16bffc7a557bf0$export$7f54fc3180508a52","triggerPressUp","triggerPressUpEvent","cancel","e","$d27d541f9569d26d$var$createEvent","dispose","cancelEvent","cancelOnPointerExit","triggerClick","triggerSyntheticClick","MouseEvent","$a92dc41f639950be$export$c2b7abe5d61ec696","$a92dc41f639950be$export$525bc4921d56d4a","pressProps","$fL2C6$useMemo","onKeyDown","$d27d541f9569d26d$var$isValidKeyboardEvent","nativeEvent","$23f2114a1b82827e$export$4282f70798064fe0","$23f2114a1b82827e$export$e58f029f0fbfdb29","$d27d541f9569d26d$var$shouldPreventDefaultKeyboard","preventDefault","repeat","originalTarget","pressUp","$a4e76a5424781910$export$e08e3b67e392101e","onKeyUp","stopPropagation","$2add3ce32c6007eb$export$9ac100e40613ea10","metaKeyEvents","Map","button","$caaf0dd3060ed57c$export$95185d699e05d4d7","isOpening","$b5c62b033c25b96d$export$60278871457622de","stopPressUp","stopPressEnd","stopPressStart","$d27d541f9569d26d$var$isHTMLAnchorLink","size","events","values","dispatchEvent","KeyboardEvent","PointerEvent","onPointerDown","$b5c62b033c25b96d$export$29bf1b5f2c56cf63","pointerId","hasPointerCapture","releasePointerCapture","onPointerUp","onPointerCancel","onMouseDown","$a92dc41f639950be$export$cabe61c495ee3649","push","onPointerEnter","onPointerLeave","clicked","timeout","$1969ac565cfec8d0$export$de79e2c695e052f3","click","clearTimeout","onDragStart","process","env","NODE_ENV","$fL2C6$flushSync","onMouseUp","onMouseEnter","onMouseLeave","onTouchStart","touch","targetTouches","length","$d27d541f9569d26d$var$getTouchFromEvent","identifier","$d27d541f9569d26d$var$createTouchEvent","$d447af545b77c9f1$export$f21a1ffae260145a","onScroll","onTouchMove","$d27d541f9569d26d$var$getTouchById","$d27d541f9569d26d$var$isOverTarget","onTouchEnd","onTouchCancel","$fL2C6$useEffect","ownerDocument","head","getElementById","createElement","id","nonce","d","document","meta","querySelector","HTMLMetaElement","content","$2b2d34ff061957fb$export$2b85b721e524d74b","textContent","trim","prepend","tagName","hasAttribute","code","element","role","HTMLInputElement","$d27d541f9569d26d$var$isValidInputKey","HTMLTextAreaElement","isContentEditable","changedTouches","i","point","pointRect","offsetX","offsetY","radiusX","radiusY","right","bottom","$d27d541f9569d26d$var$getPointClientRect","b","a","HTMLButtonElement","$d27d541f9569d26d$var$shouldPreventDefaultUp","$d27d541f9569d26d$var$nonTextInputTypes","Set","menuRegistry","activeMenuId","setActiveMenu","getActiveMenu","useMenuNavigation","menuRef","allowTabOut","closeMenu","buttonRef","handleTabNavigation","triggerElement","nextElement","startElement","focusableElements","Array","from","querySelectorAll","startIndex","indexOf","findNextFocusableElement","focus","getFocusableElements","handleMenuKeyDown","focusedElement","activeElement","currentIndex","handleArrowNavigation","Trigger","forwardRef","children","triggerProps","forwardedRef","React","Children","only","objRef","$i6EpZ$useRef","cleanupRef","refEffect","$i6EpZ$useCallback","instance","refCallback","refCleanup","$i6EpZ$useMemo","value","useObjectRef","elementProps","buttonProps","additionalProps","elementType","allowFocusWhenDisabled","href","rel","disabled","form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","focusableProps","$d1116acdf220c2da$export$4c014de7c8940b4c","tabIndex","$8e9d2fae0ecb9001$export$457c3d6518dd4c6f","labelable","useButton","Button","IconButton","cloneElement","Menu","label","ariaLabel","placement","buttonEmphasis","buttonStyleVariant","buttonOpenVariant","alignToElementId","shouldFlip","openOnHoverAndFocus","closeOnHover","iconStartProps","iconEndProps","onOpenChange","menuId","useId","useRef","containerRef","isOpen","setIsOpen","preventFocusOpen","setPreventFocusOpen","openedViaKeyboard","setOpenedViaKeyboard","openMenu","toggleMenu","isMounted","useState","viaKeyboard","CustomEvent","detail","exceptMenuId","useEffect","isKeyboardFocused","useMenuState","hoverTimeout","isHovering","clearHoverTimeout","handleHoverCheck","menu","isOverButton","matches","isOverMenu","handleCloseMenuIfActive","checkIfStillHovering","handleMouseEnter","handleMouseLeave","handleMenuMouseEnter","handleMenuMouseLeave","buttonElement","menuElement","addEventListener","removeEventListener","focusTimeout","isMenuOpening","handleFocus","wasFocusedByKeyboard","body","handleBlur","containerElement","relatedTarget","contains","useHoverAndFocus","useMenuHover","handleDocumentClick","container","isOnTriggerButton","closest","useMenuCloseHandling","currentStyleVariant","handleCloseAll","isActive","menuTriggerState","open","close","toggle","setOpen","defaultTriggerProps","menuChildren","toArray","menuItems","trigger","jsx","emphasis","styleVariant","triggerIndex","findIndex","child","customTrigger","isValidElement","filter","_","index","className","styles","Popover","triggerRef","targetElement","getAlignmentTarget","hasArrow","isNonModal","autoFocus"],"mappings":"qnBAmBA,IAAIA,EAA8B,UAC9BC,EAAwC,GACxCC,qBAA+CC,QACnD,SAASC,EAA0CC,GAC/C,GAAQC,IAA8C,CAClD,GAAoC,YAAhCN,EAA2C,CAC3C,MAAMO,EAAqBC,EAA2CH,GACtEJ,EAAwCM,EAAeE,gBAAgBC,MAAMC,iBAC7EJ,EAAeE,gBAAgBC,MAAMC,iBAAmB,MAC5D,CACAX,EAA8B,UAClC,MAAA,GAAWK,aAAkBO,aAAeP,aAAkBQ,WAAY,CAGtE,IAAIC,EAAW,eAAgBT,EAAOK,MAAQ,aAAe,mBAC7DR,EAAyCa,IAAIV,EAAQA,EAAOK,MAAMI,IAClET,EAAOK,MAAMI,GAAY,MAC7B,CACJ,CACA,SAASE,EAA0CX,GAC/C,GAAQC,IAA8C,CAGlD,GAAoC,aAAhCN,EAA4C,OAChDA,EAA8B,YAG9BiB,WAAW,KAGHC,EAA2C,KAE3C,GAAoC,cAAhClB,EAA6C,CAC7C,MAAMO,EAAqBC,EAA2CH,GACR,SAA1DE,EAAeE,gBAAgBC,MAAMC,mBAA6BJ,EAAeE,gBAAgBC,MAAMC,iBAAmBV,GAAyC,IACvKA,EAAwC,GACxCD,EAA8B,SAClC,KAEL,IACP,MAAA,IAAWK,a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B,MAAMY,EAAoB1I,SAAS2D,gBAAkBhB,EAAU7I,QAC/DkO,EAAqBU,GAErBR,KASA/M,UAlGqBZ,IACP,WAAVA,EAAEnD,KAAoBuQ,GACxBpN,EAAEkB,iBACFiH,IACAoF,GAAoB,GAEpBrT,WAAW,KACTqT,GAAoB,IACnB,MACgB,cAAVvN,EAAEnD,KAAwBuQ,IACnCpN,EAAEkB,iBACFwM,GAAS,MA0FPsD,EAAepH,EAAMC,SAASoH,QAAQxH,GAC5C,IAAIyH,EAAYzH,EACZ0H,iBACFC,EAACrF,EAAA,CACCsF,SAAU/E,EACVgF,aAAcf,EACd7S,aACAmP,iBACAC,kBACIiE,EAEHtH,SAAA0C,IAKL,MAAMoF,EAAeP,EAAaQ,UAC/BC,GAAWA,GAA8BhW,OAAS8N,IAE/CmI,EAAgBV,EAAaO,GAQnC,OANI3H,EAAM+H,eAAeD,KACvBP,EAAUvH,EAAMqC,aAAayF,EAAeX,GAE5CG,EAAYF,EAAaY,OAAO,CAACC,EAAGC,IAAUA,IAAUP,qBAIvD,MAAA,CAAIQ,UAAWC,EAAsBhU,IAAKmP,EACxC1D,SAAA,CAAA0H,EACA/D,kBACCgE,EAACa,EAAA,CACCrW,MAAO8U,EACPwB,WAjJmB,MACzB,GAAIzF,EAAkB,CACpB,MAAM0F,EAAgB1M,SAASL,eAAeqH,GAC9C,GAAI0F,EACF,MAAO,CAAE5S,QAAS4S,EAEtB,CACA,OAAO/J,GA0IWgK,GACZC,UAAU,EACVhG,YACAK,aACA4F,YAAY,EACZpK,cACAqK,UAAW/E,EAEX/D,wBAAA2H,EAAC,MAAA,CACCW,UAAWC,EACXhU,IAAKiK,EACLrH,UAAWsI,EACX5C,KAAK,OACL,aAAY8F,GAAaD,EACzBR,UAAU,EAETlC,SAAAyH,UAQbhF,GAAK3C,QAAUA","x_google_ignoreList":[0,1,2,3,5,6]}
1
+ {"version":3,"file":"Menu.js","sources":["../../../node_modules/react-aria/dist/private/interactions/textSelection.mjs","../../../node_modules/react-aria/dist/private/utils/getNonce.mjs","../../../node_modules/react-aria/dist/private/interactions/context.mjs","../../../node_modules/react-aria/dist/private/interactions/usePress.mjs","../../../src/components/Menu/Menu.tsx","../../../node_modules/react-aria/dist/private/button/useButton.mjs"],"sourcesContent":["import {getOwnerDocument as $d447af545b77c9f1$export$b204af158042fbac} from \"../utils/domHelpers.mjs\";\nimport {isIOS as $2add3ce32c6007eb$export$fedb369cb70207f1} from \"../utils/platform.mjs\";\nimport {runAfterTransition as $081cb5757e08788e$export$24490316f764c430} from \"../utils/runAfterTransition.mjs\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n// Note that state only matters here for iOS. Non-iOS gets user-select: none applied to the target element\n// rather than at the document level so we just need to apply/remove user-select: none for each pressed element individually\nlet $cbf007e418543821$var$state = 'default';\nlet $cbf007e418543821$var$savedUserSelect = '';\nlet $cbf007e418543821$var$modifiedElementMap = new WeakMap();\nfunction $cbf007e418543821$export$16a4697467175487(target) {\n if ((0, $2add3ce32c6007eb$export$fedb369cb70207f1)()) {\n if ($cbf007e418543821$var$state === 'default') {\n const documentObject = (0, $d447af545b77c9f1$export$b204af158042fbac)(target);\n $cbf007e418543821$var$savedUserSelect = documentObject.documentElement.style.webkitUserSelect;\n documentObject.documentElement.style.webkitUserSelect = 'none';\n }\n $cbf007e418543821$var$state = 'disabled';\n } else if (target instanceof HTMLElement || target instanceof SVGElement) {\n // If not iOS, store the target's original user-select and change to user-select: none\n // Ignore state since it doesn't apply for non iOS\n let property = 'userSelect' in target.style ? 'userSelect' : 'webkitUserSelect';\n $cbf007e418543821$var$modifiedElementMap.set(target, target.style[property]);\n target.style[property] = 'none';\n }\n}\nfunction $cbf007e418543821$export$b0d6fa1ab32e3295(target) {\n if ((0, $2add3ce32c6007eb$export$fedb369cb70207f1)()) {\n // If the state is already default, there's nothing to do.\n // If it is restoring, then there's no need to queue a second restore.\n if ($cbf007e418543821$var$state !== 'disabled') return;\n $cbf007e418543821$var$state = 'restoring';\n // There appears to be a delay on iOS where selection still might occur\n // after pointer up, so wait a bit before removing user-select.\n setTimeout(()=>{\n // Wait for any CSS transitions to complete so we don't recompute style\n // for the whole page in the middle of the animation and cause jank.\n (0, $081cb5757e08788e$export$24490316f764c430)(()=>{\n // Avoid race conditions\n if ($cbf007e418543821$var$state === 'restoring') {\n const documentObject = (0, $d447af545b77c9f1$export$b204af158042fbac)(target);\n if (documentObject.documentElement.style.webkitUserSelect === 'none') documentObject.documentElement.style.webkitUserSelect = $cbf007e418543821$var$savedUserSelect || '';\n $cbf007e418543821$var$savedUserSelect = '';\n $cbf007e418543821$var$state = 'default';\n }\n });\n }, 300);\n } else if (target instanceof HTMLElement || target instanceof SVGElement) // If not iOS, restore the target's original user-select if any\n // Ignore state since it doesn't apply for non iOS\n {\n if (target && $cbf007e418543821$var$modifiedElementMap.has(target)) {\n let targetOldUserSelect = $cbf007e418543821$var$modifiedElementMap.get(target);\n let property = 'userSelect' in target.style ? 'userSelect' : 'webkitUserSelect';\n if (target.style[property] === 'none') target.style[property] = targetOldUserSelect;\n if (target.getAttribute('style') === '') target.removeAttribute('style');\n $cbf007e418543821$var$modifiedElementMap.delete(target);\n }\n }\n}\n\n\nexport {$cbf007e418543821$export$16a4697467175487 as disableTextSelection, $cbf007e418543821$export$b0d6fa1ab32e3295 as restoreTextSelection};\n//# sourceMappingURL=textSelection.mjs.map\n","import {getOwnerWindow as $d447af545b77c9f1$export$f21a1ffae260145a} from \"./domHelpers.mjs\";\n\n/*\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nfunction $2b2d34ff061957fb$var$getWebpackNonce(doc) {\n let ownerWindow = doc?.defaultView;\n return ownerWindow?.__webpack_nonce__ || globalThis['__webpack_nonce__'] || undefined;\n}\nlet $2b2d34ff061957fb$var$nonceCache = new WeakMap();\nfunction $2b2d34ff061957fb$export$88b319273f3705b4() {\n $2b2d34ff061957fb$var$nonceCache = new WeakMap();\n}\nfunction $2b2d34ff061957fb$export$2b85b721e524d74b(doc) {\n let d = doc ?? (typeof document !== 'undefined' ? document : undefined);\n if (!d) return $2b2d34ff061957fb$var$getWebpackNonce(d);\n if ($2b2d34ff061957fb$var$nonceCache.has(d)) return $2b2d34ff061957fb$var$nonceCache.get(d);\n let meta = d.querySelector('meta[property=\"csp-nonce\"]');\n let nonce = meta && meta instanceof (0, $d447af545b77c9f1$export$f21a1ffae260145a)(meta).HTMLMetaElement && (meta.nonce || meta.content) || $2b2d34ff061957fb$var$getWebpackNonce(d) || undefined;\n if (nonce !== undefined) $2b2d34ff061957fb$var$nonceCache.set(d, nonce);\n return nonce;\n}\n\n\nexport {$2b2d34ff061957fb$export$88b319273f3705b4 as resetNonceCache, $2b2d34ff061957fb$export$2b85b721e524d74b as getNonce};\n//# sourceMappingURL=getNonce.mjs.map\n","import $kV9Vy$react from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nconst $24f9a20f226ad820$export$5165eccb35aaadb5 = (0, $kV9Vy$react).createContext({\n register: ()=>{}\n});\n$24f9a20f226ad820$export$5165eccb35aaadb5.displayName = 'PressResponderContext';\n\n\nexport {$24f9a20f226ad820$export$5165eccb35aaadb5 as PressResponderContext};\n//# sourceMappingURL=context.mjs.map\n","import {chain as $a4e76a5424781910$export$e08e3b67e392101e} from \"../utils/chain.mjs\";\nimport {createSyntheticEvent as $a92dc41f639950be$export$525bc4921d56d4a, preventFocus as $a92dc41f639950be$export$cabe61c495ee3649, setEventTarget as $a92dc41f639950be$export$c2b7abe5d61ec696} from \"./utils.mjs\";\nimport {disableTextSelection as $cbf007e418543821$export$16a4697467175487, restoreTextSelection as $cbf007e418543821$export$b0d6fa1ab32e3295} from \"./textSelection.mjs\";\nimport {focusWithoutScrolling as $1969ac565cfec8d0$export$de79e2c695e052f3} from \"../utils/focusWithoutScrolling.mjs\";\nimport {getEventTarget as $23f2114a1b82827e$export$e58f029f0fbfdb29, nodeContains as $23f2114a1b82827e$export$4282f70798064fe0} from \"../utils/shadowdom/DOMFunctions.mjs\";\nimport {getNonce as $2b2d34ff061957fb$export$2b85b721e524d74b} from \"../utils/getNonce.mjs\";\nimport {getOwnerDocument as $d447af545b77c9f1$export$b204af158042fbac, getOwnerWindow as $d447af545b77c9f1$export$f21a1ffae260145a} from \"../utils/domHelpers.mjs\";\nimport {isMac as $2add3ce32c6007eb$export$9ac100e40613ea10} from \"../utils/platform.mjs\";\nimport {isVirtualClick as $b5c62b033c25b96d$export$60278871457622de, isVirtualPointerEvent as $b5c62b033c25b96d$export$29bf1b5f2c56cf63} from \"../utils/isVirtualEvent.mjs\";\nimport {mergeProps as $bbaa08b3cd72f041$export$9d1611c77c2fe928} from \"../utils/mergeProps.mjs\";\nimport {openLink as $caaf0dd3060ed57c$export$95185d699e05d4d7} from \"../utils/openLink.mjs\";\nimport {PressResponderContext as $24f9a20f226ad820$export$5165eccb35aaadb5} from \"./context.mjs\";\nimport {useEffectEvent as $fe16bffc7a557bf0$export$7f54fc3180508a52} from \"../utils/useEffectEvent.mjs\";\nimport {useGlobalListeners as $48a7d519b337145d$export$4eaf04e54aa8eed6} from \"../utils/useGlobalListeners.mjs\";\nimport {useSyncRef as $b7115c395c64f7b5$export$4debdb1a3f0fa79e} from \"../utils/useSyncRef.mjs\";\nimport {flushSync as $fL2C6$flushSync} from \"react-dom\";\nimport {useContext as $fL2C6$useContext, useState as $fL2C6$useState, useRef as $fL2C6$useRef, useCallback as $fL2C6$useCallback, useMemo as $fL2C6$useMemo, useEffect as $fL2C6$useEffect} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ // Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction $d27d541f9569d26d$var$usePressResponderContext(props) {\n // Consume context from <PressResponder> and merge with props.\n let context = (0, $fL2C6$useContext)((0, $24f9a20f226ad820$export$5165eccb35aaadb5));\n if (context) {\n // Prevent mergeProps from merging ref.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let { register: register, ref: ref, ...contextProps } = context;\n props = (0, $bbaa08b3cd72f041$export$9d1611c77c2fe928)(contextProps, props);\n register();\n }\n (0, $b7115c395c64f7b5$export$4debdb1a3f0fa79e)(context, props.ref);\n return props;\n}\nclass $d27d541f9569d26d$var$PressEvent {\n #shouldStopPropagation;\n constructor(type, pointerType, originalEvent, state){\n this.#shouldStopPropagation = true;\n let currentTarget = state?.target ?? originalEvent.currentTarget;\n const rect = currentTarget?.getBoundingClientRect();\n let x, y = 0;\n let clientX, clientY = null;\n if (originalEvent.clientX != null && originalEvent.clientY != null) {\n clientX = originalEvent.clientX;\n clientY = originalEvent.clientY;\n }\n if (rect) {\n if (clientX != null && clientY != null) {\n x = clientX - rect.left;\n y = clientY - rect.top;\n } else {\n x = rect.width / 2;\n y = rect.height / 2;\n }\n }\n this.type = type;\n this.pointerType = pointerType;\n this.target = originalEvent.currentTarget;\n this.shiftKey = originalEvent.shiftKey;\n this.metaKey = originalEvent.metaKey;\n this.ctrlKey = originalEvent.ctrlKey;\n this.altKey = originalEvent.altKey;\n this.x = x;\n this.y = y;\n this.key = originalEvent.key;\n }\n continuePropagation() {\n this.#shouldStopPropagation = false;\n }\n get shouldStopPropagation() {\n return this.#shouldStopPropagation;\n }\n}\nconst $d27d541f9569d26d$var$LINK_CLICKED = Symbol('linkClicked');\nconst $d27d541f9569d26d$var$STYLE_ID = 'react-aria-pressable-style';\nconst $d27d541f9569d26d$var$PRESSABLE_ATTRIBUTE = 'data-react-aria-pressable';\nfunction $d27d541f9569d26d$export$45712eceda6fad21(props) {\n let { onPress: onPress, onPressChange: onPressChange, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressUp: onPressUp, onClick: onClick, isDisabled: isDisabled, isPressed: isPressedProp, preventFocusOnPress: preventFocusOnPress, shouldCancelOnPointerExit: shouldCancelOnPointerExit, allowTextSelectionOnPress: allowTextSelectionOnPress, ref: domRef, ...domProps } = $d27d541f9569d26d$var$usePressResponderContext(props);\n let [isPressed, setPressed] = (0, $fL2C6$useState)(false);\n let ref = (0, $fL2C6$useRef)({\n isPressed: false,\n ignoreEmulatedMouseEvents: false,\n didFirePressStart: false,\n isTriggeringEvent: false,\n activePointerId: null,\n target: null,\n isOverTarget: false,\n pointerType: null,\n disposables: []\n });\n let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = (0, $48a7d519b337145d$export$4eaf04e54aa8eed6)();\n let triggerPressStart = (0, $fL2C6$useCallback)((originalEvent, pointerType)=>{\n let state = ref.current;\n if (isDisabled || state.didFirePressStart) return false;\n let shouldStopPropagation = true;\n state.isTriggeringEvent = true;\n if (onPressStart) {\n let event = new $d27d541f9569d26d$var$PressEvent('pressstart', pointerType, originalEvent);\n onPressStart(event);\n shouldStopPropagation = event.shouldStopPropagation;\n }\n if (onPressChange) onPressChange(true);\n state.isTriggeringEvent = false;\n state.didFirePressStart = true;\n setPressed(true);\n return shouldStopPropagation;\n }, [\n isDisabled,\n onPressStart,\n onPressChange\n ]);\n let triggerPressEnd = (0, $fL2C6$useCallback)((originalEvent, pointerType, wasPressed = true)=>{\n let state = ref.current;\n if (!state.didFirePressStart) return false;\n state.didFirePressStart = false;\n state.isTriggeringEvent = true;\n let shouldStopPropagation = true;\n if (onPressEnd) {\n let event = new $d27d541f9569d26d$var$PressEvent('pressend', pointerType, originalEvent);\n onPressEnd(event);\n shouldStopPropagation = event.shouldStopPropagation;\n }\n if (onPressChange) onPressChange(false);\n setPressed(false);\n if (onPress && wasPressed && !isDisabled) {\n let event = new $d27d541f9569d26d$var$PressEvent('press', pointerType, originalEvent);\n onPress(event);\n shouldStopPropagation &&= event.shouldStopPropagation;\n }\n state.isTriggeringEvent = false;\n return shouldStopPropagation;\n }, [\n isDisabled,\n onPressEnd,\n onPressChange,\n onPress\n ]);\n let triggerPressEndEvent = (0, $fe16bffc7a557bf0$export$7f54fc3180508a52)(triggerPressEnd);\n let triggerPressUp = (0, $fL2C6$useCallback)((originalEvent, pointerType)=>{\n let state = ref.current;\n if (isDisabled) return false;\n if (onPressUp) {\n state.isTriggeringEvent = true;\n let event = new $d27d541f9569d26d$var$PressEvent('pressup', pointerType, originalEvent);\n onPressUp(event);\n state.isTriggeringEvent = false;\n return event.shouldStopPropagation;\n }\n return true;\n }, [\n isDisabled,\n onPressUp\n ]);\n let triggerPressUpEvent = (0, $fe16bffc7a557bf0$export$7f54fc3180508a52)(triggerPressUp);\n let cancel = (0, $fL2C6$useCallback)((e)=>{\n let state = ref.current;\n if (state.isPressed && state.target) {\n if (state.didFirePressStart && state.pointerType != null) triggerPressEnd($d27d541f9569d26d$var$createEvent(state.target, e), state.pointerType, false);\n state.isPressed = false;\n state.isOverTarget = false;\n state.activePointerId = null;\n state.pointerType = null;\n removeAllGlobalListeners();\n if (!allowTextSelectionOnPress) (0, $cbf007e418543821$export$b0d6fa1ab32e3295)(state.target);\n for (let dispose of state.disposables)dispose();\n state.disposables = [];\n }\n }, [\n allowTextSelectionOnPress,\n removeAllGlobalListeners,\n triggerPressEnd\n ]);\n let cancelEvent = (0, $fe16bffc7a557bf0$export$7f54fc3180508a52)(cancel);\n let cancelOnPointerExit = (0, $fL2C6$useCallback)((e)=>{\n if (shouldCancelOnPointerExit) cancel(e);\n }, [\n shouldCancelOnPointerExit,\n cancel\n ]);\n let triggerClick = (0, $fL2C6$useCallback)((e)=>{\n if (isDisabled) return;\n onClick?.(e);\n }, [\n isDisabled,\n onClick\n ]);\n let triggerSyntheticClick = (0, $fL2C6$useCallback)((e, target)=>{\n if (isDisabled) return;\n // Some third-party libraries pass in onClick instead of onPress.\n // Create a fake mouse event and trigger onClick as well.\n // This matches the browser's native activation behavior for certain elements (e.g. button).\n // https://html.spec.whatwg.org/#activation\n // https://html.spec.whatwg.org/#fire-a-synthetic-pointer-event\n if (onClick) {\n let event = new MouseEvent('click', e);\n (0, $a92dc41f639950be$export$c2b7abe5d61ec696)(event, target);\n onClick((0, $a92dc41f639950be$export$525bc4921d56d4a)(event));\n }\n }, [\n isDisabled,\n onClick\n ]);\n let pressProps = (0, $fL2C6$useMemo)(()=>{\n let state = ref.current;\n let pressProps = {\n onKeyDown (e) {\n if ($d27d541f9569d26d$var$isValidKeyboardEvent(e.nativeEvent, e.currentTarget) && (0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) {\n if ($d27d541f9569d26d$var$shouldPreventDefaultKeyboard((0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e), e.key)) e.preventDefault();\n // If the event is repeating, it may have started on a different element\n // after which focus moved to the current element. Ignore these events and\n // only handle the first key down event.\n let shouldStopPropagation = true;\n if (!state.isPressed && !e.repeat) {\n state.target = e.currentTarget;\n state.isPressed = true;\n state.pointerType = 'keyboard';\n shouldStopPropagation = triggerPressStart(e, 'keyboard');\n }\n // Focus may move before the key up event, so register the event on the document\n // instead of the same element where the key down event occurred. Make it capturing so that it will trigger\n // before stopPropagation from useKeyboard on a child element may happen and thus we can still call triggerPress for the parent element.\n let originalTarget = e.currentTarget;\n let pressUp = (e)=>{\n if ($d27d541f9569d26d$var$isValidKeyboardEvent(e, originalTarget) && !e.repeat && (0, $23f2114a1b82827e$export$4282f70798064fe0)(originalTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e)) && state.target) // eslint-disable-next-line react-hooks/rules-of-hooks\n triggerPressUpEvent($d27d541f9569d26d$var$createEvent(state.target, e), 'keyboard');\n };\n addGlobalListener((0, $d447af545b77c9f1$export$b204af158042fbac)(e.currentTarget), 'keyup', (0, $a4e76a5424781910$export$e08e3b67e392101e)(pressUp, onKeyUp), true);\n if (shouldStopPropagation) e.stopPropagation();\n // Keep track of the keydown events that occur while the Meta (e.g. Command) key is held.\n // macOS has a bug where keyup events are not fired while the Meta key is down.\n // When the Meta key itself is released we will get an event for that, and we'll act as if\n // all of these other keys were released as well.\n // https://bugs.chromium.org/p/chromium/issues/detail?id=1393524\n // https://bugs.webkit.org/show_bug.cgi?id=55291\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1299553\n if (e.metaKey && (0, $2add3ce32c6007eb$export$9ac100e40613ea10)()) state.metaKeyEvents?.set(e.key, e.nativeEvent);\n } else if (e.key === 'Meta') state.metaKeyEvents = new Map();\n },\n onClick (e) {\n if (e && !(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n if (e && e.button === 0 && !state.isTriggeringEvent && !(0, $caaf0dd3060ed57c$export$95185d699e05d4d7).isOpening) {\n let shouldStopPropagation = true;\n if (isDisabled) e.preventDefault();\n // If triggered from a screen reader or by using element.click(),\n // trigger as if it were a keyboard click.\n if (!state.ignoreEmulatedMouseEvents && !state.isPressed && (state.pointerType === 'virtual' || (0, $b5c62b033c25b96d$export$60278871457622de)(e.nativeEvent))) {\n let stopPressStart = triggerPressStart(e, 'virtual');\n // eslint-disable-next-line react-hooks/rules-of-hooks\n let stopPressUp = triggerPressUpEvent(e, 'virtual');\n // eslint-disable-next-line react-hooks/rules-of-hooks\n let stopPressEnd = triggerPressEndEvent(e, 'virtual');\n triggerClick(e);\n shouldStopPropagation = stopPressStart && stopPressUp && stopPressEnd;\n } else if (state.isPressed && state.pointerType !== 'keyboard') {\n let pointerType = state.pointerType || e.nativeEvent.pointerType || 'virtual';\n // eslint-disable-next-line react-hooks/rules-of-hooks\n let stopPressUp = triggerPressUpEvent($d27d541f9569d26d$var$createEvent(e.currentTarget, e), pointerType);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n let stopPressEnd = triggerPressEndEvent($d27d541f9569d26d$var$createEvent(e.currentTarget, e), pointerType, true);\n shouldStopPropagation = stopPressUp && stopPressEnd;\n state.isOverTarget = false;\n triggerClick(e);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n cancelEvent(e);\n }\n state.ignoreEmulatedMouseEvents = false;\n if (shouldStopPropagation) e.stopPropagation();\n }\n }\n };\n let onKeyUp = (e)=>{\n if (state.isPressed && state.target && $d27d541f9569d26d$var$isValidKeyboardEvent(e, state.target)) {\n if ($d27d541f9569d26d$var$shouldPreventDefaultKeyboard((0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e), e.key)) e.preventDefault();\n let target = (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e);\n let wasPressed = (0, $23f2114a1b82827e$export$4282f70798064fe0)(state.target, target);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n triggerPressEndEvent($d27d541f9569d26d$var$createEvent(state.target, e), 'keyboard', wasPressed);\n if (wasPressed) triggerSyntheticClick(e, state.target);\n removeAllGlobalListeners();\n // If a link was triggered with a key other than Enter, open the URL ourselves.\n // This means the link has a role override, and the default browser behavior\n // only applies when using the Enter key.\n if (e.key !== 'Enter' && $d27d541f9569d26d$var$isHTMLAnchorLink(state.target) && (0, $23f2114a1b82827e$export$4282f70798064fe0)(state.target, target) && !e[$d27d541f9569d26d$var$LINK_CLICKED]) {\n // Store a hidden property on the event so we only trigger link click once,\n // even if there are multiple usePress instances attached to the element.\n e[$d27d541f9569d26d$var$LINK_CLICKED] = true;\n (0, $caaf0dd3060ed57c$export$95185d699e05d4d7)(state.target, e, false);\n }\n state.isPressed = false;\n state.metaKeyEvents?.delete(e.key);\n } else if (e.key === 'Meta' && state.metaKeyEvents?.size) {\n // If we recorded keydown events that occurred while the Meta key was pressed,\n // and those haven't received keyup events already, fire keyup events ourselves.\n // See comment above for more info about the macOS bug causing this.\n let events = state.metaKeyEvents;\n state.metaKeyEvents = undefined;\n for (let event of events.values())state.target?.dispatchEvent(new KeyboardEvent('keyup', event));\n }\n };\n if (typeof PointerEvent !== 'undefined') {\n pressProps.onPointerDown = (e)=>{\n // Only handle left clicks, and ignore events that bubbled through portals.\n if (e.button !== 0 || !(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n // iOS safari fires pointer events from VoiceOver with incorrect coordinates/target.\n // Ignore and let the onClick handler take care of it instead.\n // https://bugs.webkit.org/show_bug.cgi?id=222627\n // https://bugs.webkit.org/show_bug.cgi?id=223202\n if ((0, $b5c62b033c25b96d$export$29bf1b5f2c56cf63)(e.nativeEvent)) {\n state.pointerType = 'virtual';\n return;\n }\n state.pointerType = e.pointerType;\n let shouldStopPropagation = true;\n if (!state.isPressed) {\n state.isPressed = true;\n state.isOverTarget = true;\n state.activePointerId = e.pointerId;\n state.target = e.currentTarget;\n if (!allowTextSelectionOnPress) (0, $cbf007e418543821$export$16a4697467175487)(state.target);\n shouldStopPropagation = triggerPressStart(e, state.pointerType);\n // Release pointer capture so that touch interactions can leave the original target.\n // This enables onPointerLeave and onPointerEnter to fire.\n let target = (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e);\n if ('releasePointerCapture' in target) {\n if ('hasPointerCapture' in target) {\n if (target.hasPointerCapture(e.pointerId)) target.releasePointerCapture(e.pointerId);\n } else target.releasePointerCapture(e.pointerId);\n }\n addGlobalListener((0, $d447af545b77c9f1$export$b204af158042fbac)(e.currentTarget), 'pointerup', onPointerUp, false);\n addGlobalListener((0, $d447af545b77c9f1$export$b204af158042fbac)(e.currentTarget), 'pointercancel', onPointerCancel, false);\n }\n if (shouldStopPropagation) e.stopPropagation();\n };\n pressProps.onMouseDown = (e)=>{\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n if (e.button === 0) {\n if (preventFocusOnPress) {\n let dispose = (0, $a92dc41f639950be$export$cabe61c495ee3649)(e.target);\n if (dispose) state.disposables.push(dispose);\n }\n e.stopPropagation();\n }\n };\n pressProps.onPointerUp = (e)=>{\n // iOS fires pointerup with zero width and height, so check the pointerType recorded during pointerdown.\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e)) || state.pointerType === 'virtual') return;\n // Only handle left clicks. If isPressed is true, delay until onClick.\n if (e.button === 0 && !state.isPressed) // eslint-disable-next-line react-hooks/rules-of-hooks\n triggerPressUpEvent(e, state.pointerType || e.pointerType);\n };\n pressProps.onPointerEnter = (e)=>{\n if (e.pointerId === state.activePointerId && state.target && !state.isOverTarget && state.pointerType != null) {\n state.isOverTarget = true;\n triggerPressStart($d27d541f9569d26d$var$createEvent(state.target, e), state.pointerType);\n }\n };\n pressProps.onPointerLeave = (e)=>{\n if (e.pointerId === state.activePointerId && state.target && state.isOverTarget && state.pointerType != null) {\n state.isOverTarget = false;\n // eslint-disable-next-line react-hooks/rules-of-hooks\n triggerPressEndEvent($d27d541f9569d26d$var$createEvent(state.target, e), state.pointerType, false);\n cancelOnPointerExit(e);\n }\n };\n let onPointerUp = (e)=>{\n if (e.pointerId === state.activePointerId && state.isPressed && e.button === 0 && state.target) {\n if ((0, $23f2114a1b82827e$export$4282f70798064fe0)(state.target, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e)) && state.pointerType != null) {\n // Wait for onClick to fire onPress. This avoids browser issues when the DOM\n // is mutated between onPointerUp and onClick, and is more compatible with third party libraries.\n // https://github.com/adobe/react-spectrum/issues/1513\n // https://issues.chromium.org/issues/40732224\n // However, iOS and Android do not focus or fire onClick after a long press.\n // We work around this by triggering a click ourselves after a timeout.\n // This timeout is canceled during the click event in case the real one fires first.\n // The timeout must be at least 32ms, because Safari on iOS delays the click event on\n // non-form elements without certain ARIA roles (for hover emulation).\n // https://github.com/WebKit/WebKit/blob/dccfae42bb29bd4bdef052e469f604a9387241c0/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm#L875-L892\n let clicked = false;\n let timeout = setTimeout(()=>{\n if (state.isPressed && state.target instanceof HTMLElement) {\n if (clicked) // eslint-disable-next-line react-hooks/rules-of-hooks\n cancelEvent(e);\n else {\n (0, $1969ac565cfec8d0$export$de79e2c695e052f3)(state.target);\n state.target.click();\n }\n }\n }, 80);\n // Use a capturing listener to track if a click occurred.\n // If stopPropagation is called it may never reach our handler.\n addGlobalListener(e.currentTarget, 'click', ()=>clicked = true, true);\n state.disposables.push(()=>clearTimeout(timeout));\n } else // eslint-disable-next-line react-hooks/rules-of-hooks\n cancelEvent(e);\n // Ignore subsequent onPointerLeave event before onClick on touch devices.\n state.isOverTarget = false;\n }\n };\n let onPointerCancel = (e)=>{\n // eslint-disable-next-line react-hooks/rules-of-hooks\n cancelEvent(e);\n };\n pressProps.onDragStart = (e)=>{\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n // Safari does not call onPointerCancel when a drag starts, whereas Chrome and Firefox do.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n cancelEvent(e);\n };\n } else if (process.env.NODE_ENV === 'test') {\n // NOTE: this fallback branch is entirely used by unit tests.\n // All browsers now support pointer events, but JSDOM still does not.\n pressProps.onMouseDown = (e)=>{\n // Only handle left clicks\n if (e.button !== 0 || !(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n if (state.ignoreEmulatedMouseEvents) {\n e.stopPropagation();\n return;\n }\n state.isPressed = true;\n state.isOverTarget = true;\n state.target = e.currentTarget;\n state.pointerType = (0, $b5c62b033c25b96d$export$60278871457622de)(e.nativeEvent) ? 'virtual' : 'mouse';\n // Flush sync so that focus moved during react re-renders occurs before we yield back to the browser.\n let shouldStopPropagation = (0, $fL2C6$flushSync)(()=>triggerPressStart(e, state.pointerType));\n if (shouldStopPropagation) e.stopPropagation();\n if (preventFocusOnPress) {\n let dispose = (0, $a92dc41f639950be$export$cabe61c495ee3649)(e.target);\n if (dispose) state.disposables.push(dispose);\n }\n addGlobalListener((0, $d447af545b77c9f1$export$b204af158042fbac)(e.currentTarget), 'mouseup', onMouseUp, false);\n };\n pressProps.onMouseEnter = (e)=>{\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n let shouldStopPropagation = true;\n if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {\n state.isOverTarget = true;\n shouldStopPropagation = triggerPressStart(e, state.pointerType);\n }\n if (shouldStopPropagation) e.stopPropagation();\n };\n pressProps.onMouseLeave = (e)=>{\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n let shouldStopPropagation = true;\n if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {\n state.isOverTarget = false;\n // eslint-disable-next-line react-hooks/rules-of-hooks\n shouldStopPropagation = triggerPressEndEvent(e, state.pointerType, false);\n cancelOnPointerExit(e);\n }\n if (shouldStopPropagation) e.stopPropagation();\n };\n pressProps.onMouseUp = (e)=>{\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n if (!state.ignoreEmulatedMouseEvents && e.button === 0 && !state.isPressed) // eslint-disable-next-line react-hooks/rules-of-hooks\n triggerPressUpEvent(e, state.pointerType || 'mouse');\n };\n let onMouseUp = (e)=>{\n // Only handle left clicks\n if (e.button !== 0) return;\n if (state.ignoreEmulatedMouseEvents) {\n state.ignoreEmulatedMouseEvents = false;\n return;\n }\n if (state.target && (0, $23f2114a1b82827e$export$4282f70798064fe0)(state.target, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e)) && state.pointerType != null) ;\n else // eslint-disable-next-line react-hooks/rules-of-hooks\n cancelEvent(e);\n state.isOverTarget = false;\n };\n pressProps.onTouchStart = (e)=>{\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n let touch = $d27d541f9569d26d$var$getTouchFromEvent(e.nativeEvent);\n if (!touch) return;\n state.activePointerId = touch.identifier;\n state.ignoreEmulatedMouseEvents = true;\n state.isOverTarget = true;\n state.isPressed = true;\n state.target = e.currentTarget;\n state.pointerType = 'touch';\n if (!allowTextSelectionOnPress) (0, $cbf007e418543821$export$16a4697467175487)(state.target);\n let shouldStopPropagation = triggerPressStart($d27d541f9569d26d$var$createTouchEvent(state.target, e), state.pointerType);\n if (shouldStopPropagation) e.stopPropagation();\n addGlobalListener((0, $d447af545b77c9f1$export$f21a1ffae260145a)(e.currentTarget), 'scroll', onScroll, true);\n };\n pressProps.onTouchMove = (e)=>{\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n if (!state.isPressed) {\n e.stopPropagation();\n return;\n }\n let touch = $d27d541f9569d26d$var$getTouchById(e.nativeEvent, state.activePointerId);\n let shouldStopPropagation = true;\n if (touch && $d27d541f9569d26d$var$isOverTarget(touch, e.currentTarget)) {\n if (!state.isOverTarget && state.pointerType != null) {\n state.isOverTarget = true;\n shouldStopPropagation = triggerPressStart($d27d541f9569d26d$var$createTouchEvent(state.target, e), state.pointerType);\n }\n } else if (state.isOverTarget && state.pointerType != null) {\n state.isOverTarget = false;\n // eslint-disable-next-line react-hooks/rules-of-hooks\n shouldStopPropagation = triggerPressEndEvent($d27d541f9569d26d$var$createTouchEvent(state.target, e), state.pointerType, false);\n cancelOnPointerExit($d27d541f9569d26d$var$createTouchEvent(state.target, e));\n }\n if (shouldStopPropagation) e.stopPropagation();\n };\n pressProps.onTouchEnd = (e)=>{\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n if (!state.isPressed) {\n e.stopPropagation();\n return;\n }\n let touch = $d27d541f9569d26d$var$getTouchById(e.nativeEvent, state.activePointerId);\n let shouldStopPropagation = true;\n if (touch && $d27d541f9569d26d$var$isOverTarget(touch, e.currentTarget) && state.pointerType != null) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n triggerPressUpEvent($d27d541f9569d26d$var$createTouchEvent(state.target, e), state.pointerType);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n shouldStopPropagation = triggerPressEndEvent($d27d541f9569d26d$var$createTouchEvent(state.target, e), state.pointerType);\n triggerSyntheticClick(e.nativeEvent, state.target);\n } else if (state.isOverTarget && state.pointerType != null) // eslint-disable-next-line react-hooks/rules-of-hooks\n shouldStopPropagation = triggerPressEndEvent($d27d541f9569d26d$var$createTouchEvent(state.target, e), state.pointerType, false);\n if (shouldStopPropagation) e.stopPropagation();\n state.isPressed = false;\n state.activePointerId = null;\n state.isOverTarget = false;\n state.ignoreEmulatedMouseEvents = true;\n if (state.target && !allowTextSelectionOnPress) (0, $cbf007e418543821$export$b0d6fa1ab32e3295)(state.target);\n removeAllGlobalListeners();\n };\n pressProps.onTouchCancel = (e)=>{\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n e.stopPropagation();\n if (state.isPressed) // eslint-disable-next-line react-hooks/rules-of-hooks\n cancelEvent($d27d541f9569d26d$var$createTouchEvent(state.target, e));\n };\n let onScroll = (e)=>{\n if (state.isPressed && (0, $23f2114a1b82827e$export$4282f70798064fe0)((0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e), state.target)) // eslint-disable-next-line react-hooks/rules-of-hooks\n cancelEvent({\n currentTarget: state.target,\n shiftKey: false,\n ctrlKey: false,\n metaKey: false,\n altKey: false\n });\n };\n pressProps.onDragStart = (e)=>{\n if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;\n // eslint-disable-next-line react-hooks/rules-of-hooks\n cancelEvent(e);\n };\n }\n return pressProps;\n }, [\n addGlobalListener,\n isDisabled,\n preventFocusOnPress,\n removeAllGlobalListeners,\n allowTextSelectionOnPress,\n cancelOnPointerExit,\n triggerPressStart,\n triggerClick,\n triggerSyntheticClick\n ]);\n // Avoid onClick delay for double tap to zoom by default.\n (0, $fL2C6$useEffect)(()=>{\n if (!domRef || process.env.NODE_ENV === 'test') return;\n const ownerDocument = (0, $d447af545b77c9f1$export$b204af158042fbac)(domRef.current);\n if (!ownerDocument || !ownerDocument.head || ownerDocument.getElementById($d27d541f9569d26d$var$STYLE_ID)) return;\n const style = ownerDocument.createElement('style');\n style.id = $d27d541f9569d26d$var$STYLE_ID;\n let nonce = (0, $2b2d34ff061957fb$export$2b85b721e524d74b)(ownerDocument);\n if (nonce) style.nonce = nonce;\n // touchAction: 'manipulation' is supposed to be equivalent, but in\n // Safari it causes onPointerCancel not to fire on scroll.\n // https://bugs.webkit.org/show_bug.cgi?id=240917\n style.textContent = `\n@layer {\n [${$d27d541f9569d26d$var$PRESSABLE_ATTRIBUTE}] {\n touch-action: pan-x pan-y pinch-zoom;\n }\n}\n `.trim();\n ownerDocument.head.prepend(style);\n }, [\n domRef\n ]);\n // Remove user-select: none in case component unmounts immediately after pressStart\n (0, $fL2C6$useEffect)(()=>{\n let state = ref.current;\n return ()=>{\n if (!allowTextSelectionOnPress) (0, $cbf007e418543821$export$b0d6fa1ab32e3295)(state.target ?? undefined);\n for (let dispose of state.disposables)dispose();\n state.disposables = [];\n };\n }, [\n allowTextSelectionOnPress\n ]);\n return {\n isPressed: isPressedProp || isPressed,\n pressProps: (0, $bbaa08b3cd72f041$export$9d1611c77c2fe928)(domProps, pressProps, {\n [$d27d541f9569d26d$var$PRESSABLE_ATTRIBUTE]: true\n })\n };\n}\nfunction $d27d541f9569d26d$var$isHTMLAnchorLink(target) {\n return target.tagName === 'A' && target.hasAttribute('href');\n}\nfunction $d27d541f9569d26d$var$isValidKeyboardEvent(event, currentTarget) {\n const { key: key, code: code } = event;\n const element = currentTarget;\n const role = element.getAttribute('role');\n // Accessibility for keyboards. Space and Enter only.\n // \"Spacebar\" is for IE 11\n return (key === 'Enter' || key === ' ' || key === 'Spacebar' || code === 'Space') && !(element instanceof (0, $d447af545b77c9f1$export$f21a1ffae260145a)(element).HTMLInputElement && !$d27d541f9569d26d$var$isValidInputKey(element, key) || element instanceof (0, $d447af545b77c9f1$export$f21a1ffae260145a)(element).HTMLTextAreaElement || element.isContentEditable) && // Links should only trigger with Enter key\n !((role === 'link' || !role && $d27d541f9569d26d$var$isHTMLAnchorLink(element)) && key !== 'Enter');\n}\nfunction $d27d541f9569d26d$var$getTouchFromEvent(event) {\n const { targetTouches: targetTouches } = event;\n if (targetTouches.length > 0) return targetTouches[0];\n return null;\n}\nfunction $d27d541f9569d26d$var$getTouchById(event, pointerId) {\n const changedTouches = event.changedTouches;\n for(let i = 0; i < changedTouches.length; i++){\n const touch = changedTouches[i];\n if (touch.identifier === pointerId) return touch;\n }\n return null;\n}\nfunction $d27d541f9569d26d$var$createTouchEvent(target, e) {\n let clientX = 0;\n let clientY = 0;\n if (e.targetTouches && e.targetTouches.length === 1) {\n clientX = e.targetTouches[0].clientX;\n clientY = e.targetTouches[0].clientY;\n }\n return {\n currentTarget: target,\n shiftKey: e.shiftKey,\n ctrlKey: e.ctrlKey,\n metaKey: e.metaKey,\n altKey: e.altKey,\n clientX: clientX,\n clientY: clientY\n };\n}\nfunction $d27d541f9569d26d$var$createEvent(target, e) {\n let clientX = e.clientX;\n let clientY = e.clientY;\n return {\n currentTarget: target,\n shiftKey: e.shiftKey,\n ctrlKey: e.ctrlKey,\n metaKey: e.metaKey,\n altKey: e.altKey,\n clientX: clientX,\n clientY: clientY,\n key: e.key\n };\n}\nfunction $d27d541f9569d26d$var$getPointClientRect(point) {\n let offsetX = 0;\n let offsetY = 0;\n if (point.width !== undefined) offsetX = point.width / 2;\n else if (point.radiusX !== undefined) offsetX = point.radiusX;\n if (point.height !== undefined) offsetY = point.height / 2;\n else if (point.radiusY !== undefined) offsetY = point.radiusY;\n return {\n top: point.clientY - offsetY,\n right: point.clientX + offsetX,\n bottom: point.clientY + offsetY,\n left: point.clientX - offsetX\n };\n}\nfunction $d27d541f9569d26d$var$areRectanglesOverlapping(a, b) {\n // check if they cannot overlap on x axis\n if (a.left > b.right || b.left > a.right) return false;\n // check if they cannot overlap on y axis\n if (a.top > b.bottom || b.top > a.bottom) return false;\n return true;\n}\nfunction $d27d541f9569d26d$var$isOverTarget(point, target) {\n let rect = target.getBoundingClientRect();\n let pointRect = $d27d541f9569d26d$var$getPointClientRect(point);\n return $d27d541f9569d26d$var$areRectanglesOverlapping(rect, pointRect);\n}\nfunction $d27d541f9569d26d$var$shouldPreventDefaultUp(target) {\n if (target instanceof HTMLInputElement) return false;\n if (target instanceof HTMLButtonElement) return target.type !== 'submit' && target.type !== 'reset';\n if ($d27d541f9569d26d$var$isHTMLAnchorLink(target)) return false;\n return true;\n}\nfunction $d27d541f9569d26d$var$shouldPreventDefaultKeyboard(target, key) {\n if (target instanceof HTMLInputElement) return !$d27d541f9569d26d$var$isValidInputKey(target, key);\n return $d27d541f9569d26d$var$shouldPreventDefaultUp(target);\n}\nconst $d27d541f9569d26d$var$nonTextInputTypes = new Set([\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset'\n]);\nfunction $d27d541f9569d26d$var$isValidInputKey(target, key) {\n // Only space should toggle checkboxes and radios, not enter.\n return target.type === 'checkbox' || target.type === 'radio' ? key === ' ' : $d27d541f9569d26d$var$nonTextInputTypes.has(target.type);\n}\n\n\nexport {$d27d541f9569d26d$export$45712eceda6fad21 as usePress};\n//# sourceMappingURL=usePress.mjs.map\n","import React, { useState, useRef, useEffect, useId, forwardRef } from 'react';\nimport { Button, ButtonProps } from '../Button/Button';\nimport { Popover } from '../Popover/Popover';\nimport styles from './Menu.module.css';\nimport IconButton from '../IconButton';\nimport { useButton, useObjectRef } from 'react-aria';\n\n// Create a static registry to track the currently open menu\nconst menuRegistry = {\n activeMenuId: null as string | null,\n setActiveMenu: (id: string | null) => {\n menuRegistry.activeMenuId = id;\n },\n getActiveMenu: () => menuRegistry.activeMenuId,\n};\n\n// Define placement types for the Menu component\ntype PlacementType =\n | 'top'\n | 'top start'\n | 'top end'\n | 'right'\n | 'right top'\n | 'right bottom'\n | 'bottom'\n | 'bottom start'\n | 'bottom end'\n | 'left'\n | 'left top'\n | 'left bottom';\n\n// Props for the Menu component\nexport interface MenuProps {\n /**\n * The label text for the menu button\n */\n label?: string;\n\n /**\n * Accessible label for the menu (for screen readers)\n * Defaults to the button label if not provided\n * @default props.label\n */\n 'aria-label'?: string;\n\n /**\n * Whether the menu is disabled\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * The placement of the menu relative to the button\n * @default 'bottom start'\n */\n placement?: PlacementType;\n\n /**\n * The button emphasis\n * @default 'tertiary'\n */\n buttonEmphasis?: ButtonProps['emphasis'];\n\n /**\n * The button style variant\n * @default 'neutral'\n */\n buttonStyleVariant?: ButtonProps['styleVariant'];\n\n /**\n * The button style variant when menu is open\n * @default buttonStyleVariant value\n */\n buttonOpenVariant?: ButtonProps['styleVariant'];\n\n /**\n * ID of an element to position the menu against instead of the button\n * When provided, the menu will be positioned relative to this element\n */\n alignToElementId?: string;\n\n /**\n * Whether the menu should flip to fit in the viewport\n * @default false\n */\n shouldFlip?: boolean;\n\n /**\n * Whether the menu should open on hover and focus\n * @default false\n */\n openOnHoverAndFocus?: boolean;\n\n /**\n * Whether to allow tabbing out of the menu\n * @default true\n */\n allowTabOut?: boolean;\n\n /**\n * Whether the menu should close when mouse leaves the menu area\n * @default true\n */\n closeOnHover?: boolean;\n\n /**\n * The content to display inside the menu (as JSX children)\n * Can be custom HTML content. Interactive elements work normally.\n * Add data-menu-close=\"true\" to elements that should close the menu when clicked.\n */\n children: React.ReactNode;\n\n /**\n * Icon props for the start of the button\n */\n iconStartProps?: ButtonProps['iconStartProps'];\n\n /**\n * Icon props for the end of the button\n */\n iconEndProps?: ButtonProps['iconEndProps'];\n\n /**\n * Callback function that is called when the open state of the menu changes\n */\n onOpenChange?: (isOpen: boolean) => void;\n}\n\n// Custom hook for menu state management\nconst useMenuState = (\n menuId: string,\n onOpenChange: MenuProps['onOpenChange'],\n) => {\n const isMounted = useRef(false);\n const [isOpen, setIsOpen] = useState(false);\n const [preventFocusOpen, setPreventFocusOpen] = useState(false);\n const [openedViaKeyboard, setOpenedViaKeyboard] = useState(false);\n\n const closeMenu = () => {\n menuRegistry.setActiveMenu(null);\n setIsOpen(false);\n setPreventFocusOpen(true);\n\n setTimeout(() => {\n setPreventFocusOpen(false);\n }, 300);\n };\n\n const openMenu = (viaKeyboard = false) => {\n // Close any other open menu first\n if (\n menuRegistry.getActiveMenu() &&\n menuRegistry.getActiveMenu() !== menuId\n ) {\n document.dispatchEvent(\n new CustomEvent('menu:closeAll', {\n detail: { exceptMenuId: menuId },\n }),\n );\n }\n\n menuRegistry.setActiveMenu(menuId);\n setIsOpen(true);\n setOpenedViaKeyboard(viaKeyboard);\n };\n\n const toggleMenu = () => {\n if (isOpen) {\n closeMenu();\n } else {\n const isKeyboardFocused = document.activeElement?.tagName === 'BUTTON';\n openMenu(isKeyboardFocused);\n }\n };\n\n useEffect(() => {\n if (onOpenChange && isMounted.current) onOpenChange(isOpen);\n // Leave `onOpenChange` out of dependency array to avoid multiple calls if callback is not memoised\n }, [isOpen]);\n\n // Avoid running onOpenChange effect on first render\n useEffect(() => {\n isMounted.current = true;\n }, []);\n\n return {\n isOpen,\n setIsOpen,\n preventFocusOpen,\n setPreventFocusOpen,\n openedViaKeyboard,\n setOpenedViaKeyboard,\n closeMenu,\n openMenu,\n toggleMenu,\n };\n};\n\n// Custom hook for keyboard navigation within the menu\nconst useMenuNavigation = (\n menuRef: React.RefObject<HTMLDivElement | null>,\n allowTabOut: boolean,\n closeMenu: () => void,\n buttonRef: React.RefObject<HTMLButtonElement | null>,\n) => {\n const findNextFocusableElement = (\n startElement: HTMLElement,\n ): HTMLElement | null => {\n const focusableElements = Array.from(\n document.querySelectorAll(\n 'a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])',\n ),\n ) as HTMLElement[];\n\n const startIndex = focusableElements.indexOf(startElement);\n return startIndex !== -1 && startIndex < focusableElements.length - 1\n ? focusableElements[startIndex + 1]\n : focusableElements[0];\n };\n\n const handleTabNavigation = () => {\n const triggerElement = buttonRef.current;\n if (triggerElement) {\n const nextElement = findNextFocusableElement(triggerElement);\n closeMenu();\n setTimeout(() => {\n if (nextElement) {\n nextElement.focus();\n }\n }, 10);\n } else {\n closeMenu();\n }\n };\n\n const getFocusableElements = (): HTMLElement[] => {\n if (!menuRef.current) return [];\n\n return Array.from(\n menuRef.current.querySelectorAll(\n 'a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])',\n ),\n ) as HTMLElement[];\n };\n\n const handleArrowNavigation = (\n e: React.KeyboardEvent,\n focusableElements: HTMLElement[],\n ) => {\n if (focusableElements.length === 0) return;\n\n const focusedElement = document.activeElement as HTMLElement;\n const currentIndex = focusableElements.indexOf(focusedElement);\n\n if (e.key === 'ArrowDown') {\n e.preventDefault();\n const nextIndex =\n currentIndex < focusableElements.length - 1 ? currentIndex + 1 : 0;\n focusableElements[nextIndex].focus();\n } else if (e.key === 'ArrowUp') {\n e.preventDefault();\n const prevIndex =\n currentIndex > 0 ? currentIndex - 1 : focusableElements.length - 1;\n focusableElements[prevIndex].focus();\n } else if (e.key === 'Home') {\n e.preventDefault();\n focusableElements[0].focus();\n } else if (e.key === 'End') {\n e.preventDefault();\n focusableElements[focusableElements.length - 1].focus();\n }\n };\n\n const handleMenuKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n closeMenu();\n if (buttonRef.current) {\n buttonRef.current.focus();\n }\n return;\n }\n\n if (e.key === 'Tab' && allowTabOut) {\n e.preventDefault();\n handleTabNavigation();\n return;\n }\n\n // Handle arrow key navigation for focusable elements\n const focusableElements = getFocusableElements();\n handleArrowNavigation(e, focusableElements);\n };\n\n return { handleMenuKeyDown, getFocusableElements };\n};\n\n// Custom hook for hover and focus behavior with improved reliability\nconst useHoverAndFocus = (\n openOnHoverAndFocus: boolean,\n isDisabled: boolean,\n preventFocusOpen: boolean,\n menuId: string,\n buttonRef: React.RefObject<HTMLButtonElement | null>,\n containerRef: React.RefObject<HTMLDivElement | null>,\n menuRef: React.RefObject<HTMLDivElement | null>,\n isOpen: boolean,\n openMenu: (viaKeyboard?: boolean) => void,\n closeMenu: () => void,\n) => {\n useEffect(() => {\n if (!openOnHoverAndFocus || isDisabled) return;\n\n let hoverTimeout: NodeJS.Timeout | null = null;\n let isHovering = false;\n\n const clearHoverTimeout = () => {\n if (hoverTimeout) {\n clearTimeout(hoverTimeout);\n hoverTimeout = null;\n }\n };\n\n // Helper to handle hover check logic\n const handleHoverCheck = () => {\n const button = buttonRef.current;\n const menu = menuRef.current;\n\n if (!button) return;\n\n // Check if mouse is over button or menu\n const isOverButton = button.matches(':hover');\n const isOverMenu = menu?.matches(':hover') || false;\n\n if (!isOverButton && !isOverMenu && isHovering) {\n isHovering = false;\n hoverTimeout = setTimeout(handleCloseMenuIfActive, 300);\n }\n };\n\n // Helper to close menu if active\n const handleCloseMenuIfActive = () => {\n if (menuRegistry.getActiveMenu() === menuId) {\n closeMenu();\n }\n };\n\n const checkIfStillHovering = () => {\n // Use a small delay to check if we're still hovering\n setTimeout(handleHoverCheck, 50);\n };\n\n const handleMouseEnter = () => {\n clearHoverTimeout();\n if (!isHovering) {\n isHovering = true;\n if (!isOpen) {\n hoverTimeout = setTimeout(() => {\n openMenu(false);\n }, 300);\n }\n }\n };\n\n const handleMouseLeave = () => {\n checkIfStillHovering();\n };\n\n const handleMenuMouseEnter = () => {\n clearHoverTimeout();\n isHovering = true;\n };\n\n const handleMenuMouseLeave = () => {\n checkIfStillHovering();\n };\n\n const buttonElement = buttonRef.current;\n const menuElement = menuRef.current;\n\n if (buttonElement) {\n buttonElement.addEventListener('mouseenter', handleMouseEnter);\n buttonElement.addEventListener('mouseleave', handleMouseLeave);\n }\n\n // Set up menu listeners when menu is open\n if (isOpen && menuElement) {\n menuElement.addEventListener('mouseenter', handleMenuMouseEnter);\n menuElement.addEventListener('mouseleave', handleMenuMouseLeave);\n }\n\n return () => {\n if (buttonElement) {\n buttonElement.removeEventListener('mouseenter', handleMouseEnter);\n buttonElement.removeEventListener('mouseleave', handleMouseLeave);\n }\n if (menuElement) {\n menuElement.removeEventListener('mouseenter', handleMenuMouseEnter);\n menuElement.removeEventListener('mouseleave', handleMenuMouseLeave);\n }\n clearHoverTimeout();\n };\n }, [\n openOnHoverAndFocus,\n isDisabled,\n menuId,\n isOpen,\n openMenu,\n closeMenu,\n buttonRef,\n menuRef,\n ]);\n\n useEffect(() => {\n if (!openOnHoverAndFocus || isDisabled) return;\n\n const buttonElement = buttonRef.current;\n if (!buttonElement) return;\n\n let focusTimeout: NodeJS.Timeout | null = null;\n let isMenuOpening = false;\n\n const handleFocus = () => {\n if (preventFocusOpen) return;\n\n if (focusTimeout) {\n clearTimeout(focusTimeout);\n }\n\n isMenuOpening = true;\n\n focusTimeout = setTimeout(() => {\n const activeElement = document.activeElement;\n const wasFocusedByKeyboard =\n activeElement === buttonElement &&\n document.activeElement !== document.body;\n\n openMenu(wasFocusedByKeyboard);\n setTimeout(() => {\n isMenuOpening = false;\n }, 500);\n }, 300);\n };\n\n const handleBlur = (e: FocusEvent) => {\n if (isMenuOpening) return;\n\n if (focusTimeout) {\n clearTimeout(focusTimeout);\n }\n\n const containerElement = containerRef.current;\n const relatedTarget = e.relatedTarget as Node;\n\n if (containerElement && !containerElement.contains(relatedTarget)) {\n focusTimeout = setTimeout(() => {\n if (menuRegistry.getActiveMenu() === menuId) {\n closeMenu();\n }\n }, 200);\n }\n };\n\n buttonElement.addEventListener('focus', handleFocus);\n buttonElement.addEventListener('blur', handleBlur);\n\n return () => {\n buttonElement.removeEventListener('focus', handleFocus);\n buttonElement.removeEventListener('blur', handleBlur);\n if (focusTimeout) {\n clearTimeout(focusTimeout);\n }\n };\n }, [\n openOnHoverAndFocus,\n isDisabled,\n preventFocusOpen,\n menuId,\n openMenu,\n closeMenu,\n containerRef,\n buttonRef,\n ]);\n};\n\n// Simplified menu hover behavior for closeOnHover\nconst useMenuHover = (\n menuRef: React.RefObject<HTMLDivElement | null>,\n isOpen: boolean,\n closeOnHover: boolean,\n openOnHoverAndFocus: boolean,\n menuId: string,\n closeMenu: () => void,\n) => {\n useEffect(() => {\n // Skip if openOnHoverAndFocus is handling the hover behavior\n if (!isOpen || !closeOnHover || openOnHoverAndFocus) return;\n\n let hoverTimeout: NodeJS.Timeout | null = null;\n\n const clearHoverTimeout = () => {\n if (hoverTimeout) {\n clearTimeout(hoverTimeout);\n hoverTimeout = null;\n }\n };\n\n const handleMenuMouseLeave = () => {\n clearHoverTimeout();\n hoverTimeout = setTimeout(() => {\n closeMenu();\n }, 200);\n };\n\n const handleMenuMouseEnter = () => {\n clearHoverTimeout();\n };\n\n const menuElement = menuRef.current;\n if (menuElement) {\n menuElement.addEventListener('mouseenter', handleMenuMouseEnter);\n menuElement.addEventListener('mouseleave', handleMenuMouseLeave);\n }\n\n return () => {\n if (menuElement) {\n menuElement.removeEventListener('mouseenter', handleMenuMouseEnter);\n menuElement.removeEventListener('mouseleave', handleMenuMouseLeave);\n }\n clearHoverTimeout();\n };\n }, [isOpen, closeOnHover, openOnHoverAndFocus, menuId, closeMenu, menuRef]);\n};\n\n// Custom hook to handle menu closing behavior\nconst useMenuCloseHandling = (\n menuRef: React.RefObject<HTMLDivElement | null>,\n containerRef: React.RefObject<HTMLDivElement | null>,\n isOpen: boolean,\n menuId: string,\n closeMenu: () => void,\n) => {\n useEffect(() => {\n if (!isOpen) return;\n\n const handleDocumentClick = (e: Event) => {\n const target = e.target as HTMLElement;\n const container = containerRef.current;\n const menu = menuRef.current;\n\n // Check if click is on the trigger button (inside container but outside menu)\n const isOnTriggerButton =\n container?.contains(target) && !menu?.contains(target);\n\n // If click is inside the menu content, only close if element has data-menu-close=\"true\"\n if (menu && menu.contains(target)) {\n const shouldClose = target.closest('[data-menu-close=\"true\"]');\n if (shouldClose) {\n closeMenu();\n }\n return;\n }\n\n // If click is on the trigger button, let the button handle it (don't close here)\n if (isOnTriggerButton) {\n return;\n }\n\n // If we get here, it's a click outside both the menu and the trigger button\n closeMenu();\n };\n\n // Use capture phase to handle clicks before they bubble\n document.addEventListener('click', handleDocumentClick, true);\n\n return () => {\n document.removeEventListener('click', handleDocumentClick, true);\n };\n }, [isOpen, menuId, closeMenu, menuRef, containerRef]);\n};\n\n/**\n * Component to replace default Button with another button-like component/element\n */\nexport const Trigger = forwardRef<HTMLButtonElement, ButtonProps>(\n function Trigger({ children, ...triggerProps }, forwardedRef) {\n const element = React.Children.only(children) as React.ReactElement;\n const ref = useObjectRef(forwardedRef);\n\n const elementProps = { ...triggerProps, ...element.props };\n const { buttonProps } = useButton(elementProps, ref); // Get accessible button props for non-Alto components\n\n // Use React ARIA `buttonProps` if the trigger element is a non-Alto components\n const props =\n element.type !== Button && element.type !== IconButton\n ? buttonProps\n : elementProps;\n\n return React.cloneElement(element, {\n ...props,\n ref,\n });\n },\n);\n\nexport const Menu = ({\n label,\n 'aria-label': ariaLabel,\n isDisabled = false,\n placement = 'bottom start',\n buttonEmphasis = 'tertiary',\n buttonStyleVariant = 'neutral',\n buttonOpenVariant = buttonStyleVariant,\n alignToElementId,\n shouldFlip = true,\n openOnHoverAndFocus = false,\n allowTabOut = true,\n closeOnHover = true,\n children,\n iconStartProps,\n iconEndProps,\n onOpenChange,\n}: MenuProps) => {\n // Generate a unique ID for this menu instance\n const uniqueId = useId();\n const menuId = `menu-${uniqueId}`;\n\n // References\n const buttonRef = useRef<HTMLButtonElement>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const menuRef = useRef<HTMLDivElement>(null);\n\n // State management\n const {\n isOpen,\n setIsOpen,\n preventFocusOpen,\n setPreventFocusOpen,\n openedViaKeyboard,\n setOpenedViaKeyboard,\n closeMenu,\n openMenu,\n toggleMenu,\n } = useMenuState(menuId, onOpenChange);\n\n // Navigation handling\n const { handleMenuKeyDown, getFocusableElements } = useMenuNavigation(\n menuRef,\n allowTabOut,\n closeMenu,\n buttonRef,\n );\n\n // Hover and focus handling\n useHoverAndFocus(\n openOnHoverAndFocus,\n isDisabled,\n preventFocusOpen,\n menuId,\n buttonRef,\n containerRef,\n menuRef,\n isOpen,\n openMenu,\n closeMenu,\n );\n\n // Menu hover handling (controlled by closeOnHover prop)\n useMenuHover(\n menuRef,\n isOpen,\n closeOnHover,\n openOnHoverAndFocus,\n menuId,\n closeMenu,\n );\n\n // Menu close handling\n useMenuCloseHandling(menuRef, containerRef, isOpen, menuId, closeMenu);\n\n // Determine which style variant to use based on state\n const currentStyleVariant = isOpen ? buttonOpenVariant : buttonStyleVariant;\n\n // Function to create a ref to the alignment target\n const getAlignmentTarget = () => {\n if (alignToElementId) {\n const targetElement = document.getElementById(alignToElementId);\n if (targetElement) {\n return { current: targetElement };\n }\n }\n return buttonRef;\n };\n\n // Handle keyboard events on the trigger button\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Escape' && isOpen) {\n e.preventDefault();\n closeMenu();\n setPreventFocusOpen(true);\n\n setTimeout(() => {\n setPreventFocusOpen(false);\n }, 300);\n } else if (e.key === 'ArrowDown' && !isOpen) {\n e.preventDefault();\n openMenu(true);\n }\n };\n\n // Listen for global menu close events\n useEffect(() => {\n const handleCloseAll = (e: CustomEvent) => {\n const { exceptMenuId } = e.detail || {};\n\n if (exceptMenuId && exceptMenuId === menuId) {\n return;\n }\n\n if (isOpen) {\n setIsOpen(false);\n }\n };\n\n document.addEventListener('menu:closeAll', handleCloseAll as EventListener);\n\n return () => {\n document.removeEventListener(\n 'menu:closeAll',\n handleCloseAll as EventListener,\n );\n };\n }, [menuId, isOpen, setIsOpen]);\n\n // Update state when global registry changes\n useEffect(() => {\n const isActive = menuRegistry.getActiveMenu() === menuId;\n if (isActive !== isOpen) {\n setIsOpen(isActive);\n }\n }, [menuId, isOpen, setIsOpen]);\n\n // Focus first menu item when opened via keyboard\n useEffect(() => {\n if (isOpen && openedViaKeyboard && menuRef.current) {\n const focusableElements = getFocusableElements();\n\n if (focusableElements.length > 0) {\n setTimeout(() => {\n focusableElements[0].focus();\n }, 50);\n }\n }\n }, [isOpen, openedViaKeyboard, getFocusableElements]);\n\n // Reset openedViaKeyboard when menu closes\n useEffect(() => {\n if (!isOpen) {\n setOpenedViaKeyboard(false);\n }\n }, [isOpen, setOpenedViaKeyboard]);\n\n // Popover state object\n const menuTriggerState = {\n isOpen,\n open: () => openMenu(),\n close: closeMenu,\n toggle: () => toggleMenu(),\n setOpen: (open: boolean) => {\n if (open) {\n openMenu();\n } else {\n closeMenu();\n }\n },\n };\n\n const handleButtonPress = () => {\n setPreventFocusOpen(false);\n\n // Set keyboard flag based on current focus\n const isKeyboardFocused = document.activeElement === buttonRef.current;\n setOpenedViaKeyboard(isKeyboardFocused);\n\n toggleMenu();\n };\n\n /** Custom trigger logic */\n const defaultTriggerProps = {\n ref: buttonRef,\n 'aria-haspopup': true,\n 'aria-expanded': isOpen,\n onPress: handleButtonPress,\n onKeyDown: handleKeyDown,\n };\n\n const menuChildren = React.Children.toArray(children);\n let menuItems = children;\n let trigger = (\n <Button\n emphasis={buttonEmphasis}\n styleVariant={currentStyleVariant}\n isDisabled={isDisabled}\n iconStartProps={iconStartProps}\n iconEndProps={iconEndProps}\n {...defaultTriggerProps}\n >\n {label}\n </Button>\n );\n\n // Get custom trigger from menu children\n const triggerIndex = menuChildren.findIndex(\n (child) => (child as React.ReactElement)?.type === Trigger,\n );\n const customTrigger = menuChildren[triggerIndex];\n\n if (React.isValidElement(customTrigger)) {\n trigger = React.cloneElement(customTrigger, defaultTriggerProps);\n // Remove custom trigger from children\n menuItems = menuChildren.filter((_, index) => index !== triggerIndex);\n }\n\n return (\n <div className={styles.menuContainer} ref={containerRef}>\n {trigger}\n {isOpen && (\n <Popover\n state={menuTriggerState}\n triggerRef={getAlignmentTarget()}\n hasArrow={false}\n placement={placement}\n shouldFlip={shouldFlip}\n isNonModal={true}\n allowTabOut={allowTabOut}\n autoFocus={openedViaKeyboard}\n >\n <div\n className={styles.menuContent}\n ref={menuRef}\n onKeyDown={handleMenuKeyDown}\n role=\"menu\"\n aria-label={ariaLabel || label}\n tabIndex={-1}\n >\n {menuItems}\n </div>\n </Popover>\n )}\n </div>\n );\n};\n\nMenu.Trigger = Trigger;\n\nexport default Menu;\n","import {filterDOMProps as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f} from \"../utils/filterDOMProps.mjs\";\nimport {mergeProps as $bbaa08b3cd72f041$export$9d1611c77c2fe928} from \"../utils/mergeProps.mjs\";\nimport {useFocusable as $d1116acdf220c2da$export$4c014de7c8940b4c} from \"../interactions/useFocusable.mjs\";\nimport {usePress as $d27d541f9569d26d$export$45712eceda6fad21} from \"../interactions/usePress.mjs\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nfunction $ac4318a9c075bb9f$export$ea18c227d4417cc3(props, ref) {\n let { elementType: elementType = 'button', isDisabled: isDisabled, onPress: onPress, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressUp: onPressUp, onPressChange: onPressChange, preventFocusOnPress: preventFocusOnPress, allowFocusWhenDisabled: // @ts-ignore - undocumented\n allowFocusWhenDisabled, onClick: onClick, href: href, target: target, rel: rel, type: type = 'button' } = props;\n let additionalProps;\n if (elementType === 'button') additionalProps = {\n type: type,\n disabled: isDisabled,\n form: props.form,\n formAction: props.formAction,\n formEncType: props.formEncType,\n formMethod: props.formMethod,\n formNoValidate: props.formNoValidate,\n formTarget: props.formTarget,\n name: props.name,\n value: props.value\n };\n else additionalProps = {\n role: 'button',\n href: elementType === 'a' && !isDisabled ? href : undefined,\n target: elementType === 'a' ? target : undefined,\n type: elementType === 'input' ? type : undefined,\n disabled: elementType === 'input' ? isDisabled : undefined,\n 'aria-disabled': !isDisabled || elementType === 'input' ? undefined : isDisabled,\n rel: elementType === 'a' ? rel : undefined\n };\n let { pressProps: pressProps, isPressed: isPressed } = (0, $d27d541f9569d26d$export$45712eceda6fad21)({\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onPressChange: onPressChange,\n onPress: onPress,\n onPressUp: onPressUp,\n onClick: onClick,\n isDisabled: isDisabled,\n preventFocusOnPress: preventFocusOnPress,\n ref: ref\n });\n let { focusableProps: focusableProps } = (0, $d1116acdf220c2da$export$4c014de7c8940b4c)(props, ref);\n if (allowFocusWhenDisabled) focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;\n let buttonProps = (0, $bbaa08b3cd72f041$export$9d1611c77c2fe928)(focusableProps, pressProps, (0, $8e9d2fae0ecb9001$export$457c3d6518dd4c6f)(props, {\n labelable: true\n }));\n return {\n isPressed: isPressed,\n buttonProps: (0, $bbaa08b3cd72f041$export$9d1611c77c2fe928)(additionalProps, buttonProps, {\n 'aria-haspopup': props['aria-haspopup'],\n 'aria-expanded': props['aria-expanded'],\n 'aria-controls': props['aria-controls'],\n 'aria-pressed': props['aria-pressed'],\n 'aria-current': props['aria-current'],\n 'aria-disabled': props['aria-disabled']\n })\n };\n}\n\n\nexport {$ac4318a9c075bb9f$export$ea18c227d4417cc3 as useButton};\n//# sourceMappingURL=useButton.mjs.map\n"],"names":["$cbf007e418543821$var$state","$cbf007e418543821$var$savedUserSelect","$cbf007e418543821$var$modifiedElementMap","WeakMap","$cbf007e418543821$export$16a4697467175487","target","$2add3ce32c6007eb$export$fedb369cb70207f1","documentObject","$d447af545b77c9f1$export$b204af158042fbac","documentElement","style","webkitUserSelect","HTMLElement","SVGElement","property","set","$cbf007e418543821$export$b0d6fa1ab32e3295","setTimeout","$081cb5757e08788e$export$24490316f764c430","has","targetOldUserSelect","get","getAttribute","removeAttribute","delete","$2b2d34ff061957fb$var$getWebpackNonce","doc","ownerWindow","defaultView","__webpack_nonce__","globalThis","$2b2d34ff061957fb$var$nonceCache","$24f9a20f226ad820$export$5165eccb35aaadb5","$kV9Vy$react","createContext","register","displayName","$d27d541f9569d26d$var$PressEvent","shouldStopPropagation","constructor","type","pointerType","originalEvent","state","this","currentTarget","rect","getBoundingClientRect","x","clientX","y","clientY","left","top","width","height","shiftKey","metaKey","ctrlKey","altKey","key","continuePropagation","$d27d541f9569d26d$var$LINK_CLICKED","$d27d541f9569d26d$var$STYLE_ID","$d27d541f9569d26d$var$PRESSABLE_ATTRIBUTE","$d27d541f9569d26d$export$45712eceda6fad21","props","onPress","onPressChange","onPressStart","onPressEnd","onPressUp","onClick","isDisabled","isPressed","isPressedProp","preventFocusOnPress","shouldCancelOnPointerExit","allowTextSelectionOnPress","ref","domRef","domProps","context","$fL2C6$useContext","contextProps","$bbaa08b3cd72f041$export$9d1611c77c2fe928","$b7115c395c64f7b5$export$4debdb1a3f0fa79e","$d27d541f9569d26d$var$usePressResponderContext","setPressed","$fL2C6$useState","$fL2C6$useRef","ignoreEmulatedMouseEvents","didFirePressStart","isTriggeringEvent","activePointerId","isOverTarget","disposables","addGlobalListener","removeAllGlobalListeners","$48a7d519b337145d$export$4eaf04e54aa8eed6","triggerPressStart","$fL2C6$useCallback","current","event","triggerPressEnd","wasPressed","triggerPressEndEvent","$fe16bffc7a557bf0$export$7f54fc3180508a52","triggerPressUp","triggerPressUpEvent","cancel","e","$d27d541f9569d26d$var$createEvent","dispose","cancelEvent","cancelOnPointerExit","triggerClick","triggerSyntheticClick","MouseEvent","$a92dc41f639950be$export$c2b7abe5d61ec696","$a92dc41f639950be$export$525bc4921d56d4a","pressProps","$fL2C6$useMemo","onKeyDown","$d27d541f9569d26d$var$isValidKeyboardEvent","nativeEvent","$23f2114a1b82827e$export$4282f70798064fe0","$23f2114a1b82827e$export$e58f029f0fbfdb29","$d27d541f9569d26d$var$shouldPreventDefaultKeyboard","preventDefault","repeat","originalTarget","pressUp","$a4e76a5424781910$export$e08e3b67e392101e","onKeyUp","stopPropagation","$2add3ce32c6007eb$export$9ac100e40613ea10","metaKeyEvents","Map","button","$caaf0dd3060ed57c$export$95185d699e05d4d7","isOpening","$b5c62b033c25b96d$export$60278871457622de","stopPressUp","stopPressEnd","stopPressStart","$d27d541f9569d26d$var$isHTMLAnchorLink","size","events","values","dispatchEvent","KeyboardEvent","PointerEvent","onPointerDown","$b5c62b033c25b96d$export$29bf1b5f2c56cf63","pointerId","hasPointerCapture","releasePointerCapture","onPointerUp","onPointerCancel","onMouseDown","$a92dc41f639950be$export$cabe61c495ee3649","push","onPointerEnter","onPointerLeave","clicked","timeout","$1969ac565cfec8d0$export$de79e2c695e052f3","click","clearTimeout","onDragStart","process","env","NODE_ENV","$fL2C6$flushSync","onMouseUp","onMouseEnter","onMouseLeave","onTouchStart","touch","targetTouches","length","$d27d541f9569d26d$var$getTouchFromEvent","identifier","$d27d541f9569d26d$var$createTouchEvent","$d447af545b77c9f1$export$f21a1ffae260145a","onScroll","onTouchMove","$d27d541f9569d26d$var$getTouchById","$d27d541f9569d26d$var$isOverTarget","onTouchEnd","onTouchCancel","$fL2C6$useEffect","ownerDocument","head","getElementById","createElement","id","nonce","d","document","meta","querySelector","HTMLMetaElement","content","$2b2d34ff061957fb$export$2b85b721e524d74b","textContent","trim","prepend","tagName","hasAttribute","code","element","role","HTMLInputElement","$d27d541f9569d26d$var$isValidInputKey","HTMLTextAreaElement","isContentEditable","changedTouches","i","point","pointRect","offsetX","offsetY","radiusX","radiusY","right","bottom","$d27d541f9569d26d$var$getPointClientRect","b","a","HTMLButtonElement","$d27d541f9569d26d$var$shouldPreventDefaultUp","$d27d541f9569d26d$var$nonTextInputTypes","Set","menuRegistry","activeMenuId","setActiveMenu","getActiveMenu","useMenuNavigation","menuRef","allowTabOut","closeMenu","buttonRef","handleTabNavigation","triggerElement","nextElement","startElement","focusableElements","Array","from","querySelectorAll","startIndex","indexOf","findNextFocusableElement","focus","getFocusableElements","handleMenuKeyDown","focusedElement","activeElement","currentIndex","handleArrowNavigation","Trigger","forwardRef","children","triggerProps","forwardedRef","React","Children","only","useObjectRef","elementProps","buttonProps","additionalProps","elementType","allowFocusWhenDisabled","href","rel","disabled","form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value","focusableProps","$d1116acdf220c2da$export$4c014de7c8940b4c","tabIndex","$8e9d2fae0ecb9001$export$457c3d6518dd4c6f","labelable","useButton","Button","IconButton","cloneElement","Menu","label","ariaLabel","placement","buttonEmphasis","buttonStyleVariant","buttonOpenVariant","alignToElementId","shouldFlip","openOnHoverAndFocus","closeOnHover","iconStartProps","iconEndProps","onOpenChange","menuId","useId","useRef","containerRef","isOpen","setIsOpen","preventFocusOpen","setPreventFocusOpen","openedViaKeyboard","setOpenedViaKeyboard","openMenu","toggleMenu","isMounted","useState","viaKeyboard","CustomEvent","detail","exceptMenuId","useEffect","isKeyboardFocused","useMenuState","hoverTimeout","isHovering","clearHoverTimeout","handleHoverCheck","menu","isOverButton","matches","isOverMenu","handleCloseMenuIfActive","checkIfStillHovering","handleMouseEnter","handleMouseLeave","handleMenuMouseEnter","handleMenuMouseLeave","buttonElement","menuElement","addEventListener","removeEventListener","focusTimeout","isMenuOpening","handleFocus","wasFocusedByKeyboard","body","handleBlur","containerElement","relatedTarget","contains","useHoverAndFocus","useMenuHover","handleDocumentClick","container","isOnTriggerButton","closest","useMenuCloseHandling","currentStyleVariant","handleCloseAll","isActive","menuTriggerState","open","close","toggle","setOpen","defaultTriggerProps","menuChildren","toArray","menuItems","trigger","jsx","emphasis","styleVariant","triggerIndex","findIndex","child","customTrigger","isValidElement","filter","_","index","className","styles","Popover","triggerRef","targetElement","getAlignmentTarget","hasArrow","isNonModal","autoFocus"],"mappings":"wqBAmBA,IAAIA,EAA8B,UAC9BC,EAAwC,GACxCC,qBAA+CC,QACnD,SAASC,EAA0CC,GAC/C,GAAQC,IAA8C,CAClD,GAAoC,YAAhCN,EAA2C,CAC3C,MAAMO,EAAq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_ignoreList":[0,1,2,3,5]}
@@ -1,3 +1,3 @@
1
- import{jsx as e}from"react/jsx-runtime";import{c as _}from"../../index-CCUt_dAN.js";import{foregroundColorVariants as s}from"../../utils/foregroundColour/foregroundColor.js";import '../../assets/truncate.css';import '../../assets/Paragraph.css';/* empty css */import{getBaseValue as t,generateResponsiveClasses as l}from"../../utils/breakpoint/responsiveSSR.js";const a={paragraph:"_paragraph_1fw8b_4","size--xs":"_size--xs_1fw8b_39","size--sm":"_size--sm_1fw8b_42","size--md":"_size--md_1fw8b_45","size--lg":"_size--lg_1fw8b_48","align--start":"_align--start_1fw8b_65","align--center":"_align--center_1fw8b_68","align--end":"_align--end_1fw8b_71","truncate--true":"_truncate--true_1fw8b_91","truncate--false":"_truncate--false_1fw8b_95","sm:size--xs":"_sm:size--xs_1fw8b_1","sm:size--sm":"_sm:size--sm_1fw8b_1","sm:size--md":"_sm:size--md_1fw8b_1","sm:size--lg":"_sm:size--lg_1fw8b_1","sm:align--start":"_sm:align--start_1fw8b_1","sm:align--center":"_sm:align--center_1fw8b_1","sm:align--end":"_sm:align--end_1fw8b_1","sm:truncate--true":"_sm:truncate--true_1fw8b_1","sm:truncate--false":"_sm:truncate--false_1fw8b_1","md:size--xs":"_md:size--xs_1fw8b_1","md:size--sm":"_md:size--sm_1fw8b_1","md:size--md":"_md:size--md_1fw8b_1","md:size--lg":"_md:size--lg_1fw8b_1","md:align--start":"_md:align--start_1fw8b_1","md:align--center":"_md:align--center_1fw8b_1","md:align--end":"_md:align--end_1fw8b_1","md:truncate--true":"_md:truncate--true_1fw8b_1","md:truncate--false":"_md:truncate--false_1fw8b_1","lg:size--xs":"_lg:size--xs_1fw8b_1","lg:size--sm":"_lg:size--sm_1fw8b_1","lg:size--md":"_lg:size--md_1fw8b_1","lg:size--lg":"_lg:size--lg_1fw8b_1","lg:align--start":"_lg:align--start_1fw8b_1","lg:align--center":"_lg:align--center_1fw8b_1","lg:align--end":"_lg:align--end_1fw8b_1","lg:truncate--true":"_lg:truncate--true_1fw8b_1","lg:truncate--false":"_lg:truncate--false_1fw8b_1","xl:size--xs":"_xl:size--xs_1fw8b_1","xl:size--sm":"_xl:size--sm_1fw8b_1","xl:size--md":"_xl:size--md_1fw8b_1","xl:size--lg":"_xl:size--lg_1fw8b_1","xl:align--start":"_xl:align--start_1fw8b_1","xl:align--center":"_xl:align--center_1fw8b_1","xl:align--end":"_xl:align--end_1fw8b_1","xl:truncate--true":"_xl:truncate--true_1fw8b_1","xl:truncate--false":"_xl:truncate--false_1fw8b_1","xxl:size--xs":"_xxl:size--xs_1fw8b_1","xxl:size--sm":"_xxl:size--sm_1fw8b_1","xxl:size--md":"_xxl:size--md_1fw8b_1","xxl:size--lg":"_xxl:size--lg_1fw8b_1","xxl:align--start":"_xxl:align--start_1fw8b_1","xxl:align--center":"_xxl:align--center_1fw8b_1","xxl:align--end":"_xxl:align--end_1fw8b_1","xxl:truncate--true":"_xxl:truncate--true_1fw8b_1","xxl:truncate--false":"_xxl:truncate--false_1fw8b_1"},n=l(a),i=_(a.paragraph,{variants:{size:{xs:a["size--xs"],sm:a["size--sm"],md:a["size--md"],lg:a["size--lg"]},textAlign:{start:a["align--start"],center:a["align--center"],end:a["align--end"]},truncate:{true:a["truncate--true"],false:a["truncate--false"]}},defaultVariants:{size:"md",textAlign:"start"}}),r=({children:_,size:l="md",foregroundColor:a="secondary",textAlign:r="start",truncate:g=!1,...f})=>{const m=t(l,"md"),x=t(r,"start"),d=t(g,!1),z=n(l,"size"),b=n(r,"align"),u=n(g,"truncate");/* @__PURE__ */
1
+ import{jsx as e}from"react/jsx-runtime";import{c as _}from"../../index-CCUt_dAN.js";import{foregroundColorVariants as s}from"../../utils/foregroundColour/foregroundColor.js";import{getBaseValue as t,generateResponsiveClasses as l}from"../../utils/breakpoint/responsiveSSR.js";import '../../assets/Paragraph.css';const a={paragraph:"_paragraph_1fw8b_4","size--xs":"_size--xs_1fw8b_39","size--sm":"_size--sm_1fw8b_42","size--md":"_size--md_1fw8b_45","size--lg":"_size--lg_1fw8b_48","align--start":"_align--start_1fw8b_65","align--center":"_align--center_1fw8b_68","align--end":"_align--end_1fw8b_71","truncate--true":"_truncate--true_1fw8b_91","truncate--false":"_truncate--false_1fw8b_95","sm:size--xs":"_sm:size--xs_1fw8b_1","sm:size--sm":"_sm:size--sm_1fw8b_1","sm:size--md":"_sm:size--md_1fw8b_1","sm:size--lg":"_sm:size--lg_1fw8b_1","sm:align--start":"_sm:align--start_1fw8b_1","sm:align--center":"_sm:align--center_1fw8b_1","sm:align--end":"_sm:align--end_1fw8b_1","sm:truncate--true":"_sm:truncate--true_1fw8b_1","sm:truncate--false":"_sm:truncate--false_1fw8b_1","md:size--xs":"_md:size--xs_1fw8b_1","md:size--sm":"_md:size--sm_1fw8b_1","md:size--md":"_md:size--md_1fw8b_1","md:size--lg":"_md:size--lg_1fw8b_1","md:align--start":"_md:align--start_1fw8b_1","md:align--center":"_md:align--center_1fw8b_1","md:align--end":"_md:align--end_1fw8b_1","md:truncate--true":"_md:truncate--true_1fw8b_1","md:truncate--false":"_md:truncate--false_1fw8b_1","lg:size--xs":"_lg:size--xs_1fw8b_1","lg:size--sm":"_lg:size--sm_1fw8b_1","lg:size--md":"_lg:size--md_1fw8b_1","lg:size--lg":"_lg:size--lg_1fw8b_1","lg:align--start":"_lg:align--start_1fw8b_1","lg:align--center":"_lg:align--center_1fw8b_1","lg:align--end":"_lg:align--end_1fw8b_1","lg:truncate--true":"_lg:truncate--true_1fw8b_1","lg:truncate--false":"_lg:truncate--false_1fw8b_1","xl:size--xs":"_xl:size--xs_1fw8b_1","xl:size--sm":"_xl:size--sm_1fw8b_1","xl:size--md":"_xl:size--md_1fw8b_1","xl:size--lg":"_xl:size--lg_1fw8b_1","xl:align--start":"_xl:align--start_1fw8b_1","xl:align--center":"_xl:align--center_1fw8b_1","xl:align--end":"_xl:align--end_1fw8b_1","xl:truncate--true":"_xl:truncate--true_1fw8b_1","xl:truncate--false":"_xl:truncate--false_1fw8b_1","xxl:size--xs":"_xxl:size--xs_1fw8b_1","xxl:size--sm":"_xxl:size--sm_1fw8b_1","xxl:size--md":"_xxl:size--md_1fw8b_1","xxl:size--lg":"_xxl:size--lg_1fw8b_1","xxl:align--start":"_xxl:align--start_1fw8b_1","xxl:align--center":"_xxl:align--center_1fw8b_1","xxl:align--end":"_xxl:align--end_1fw8b_1","xxl:truncate--true":"_xxl:truncate--true_1fw8b_1","xxl:truncate--false":"_xxl:truncate--false_1fw8b_1"},n=l(a),i=_(a.paragraph,{variants:{size:{xs:a["size--xs"],sm:a["size--sm"],md:a["size--md"],lg:a["size--lg"]},textAlign:{start:a["align--start"],center:a["align--center"],end:a["align--end"]},truncate:{true:a["truncate--true"],false:a["truncate--false"]}},defaultVariants:{size:"md",textAlign:"start"}}),r=({children:_,size:l="md",foregroundColor:a="secondary",textAlign:r="start",truncate:g=!1,...f})=>{const m=t(l,"md"),x=t(r,"start"),d=t(g,!1),z=n(l,"size"),b=n(r,"align"),u=n(g,"truncate");/* @__PURE__ */
2
2
  return e("p",{className:[i({size:m,textAlign:x,truncate:d}),s({foregroundColor:a}),...z,...b,...u].filter(Boolean).join(" "),...f,children:_})};export{r as Paragraph,r as default};
3
3
  //# sourceMappingURL=Paragraph.js.map