@protonradio/proton-ui 0.11.15 → 0.11.16

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 (243) hide show
  1. package/README.md +148 -148
  2. package/dist/assets/svg/icons.svg.cjs.js.map +1 -1
  3. package/dist/assets/svg/icons.svg.es.js.map +1 -1
  4. package/dist/components/ActionMenu/ActionMenu.cjs.js.map +1 -1
  5. package/dist/components/ActionMenu/ActionMenu.es.js.map +1 -1
  6. package/dist/components/Badge/Badge.cjs.js.map +1 -1
  7. package/dist/components/Badge/Badge.es.js.map +1 -1
  8. package/dist/components/Banner/Banner.cjs.js.map +1 -1
  9. package/dist/components/Banner/Banner.es.js.map +1 -1
  10. package/dist/components/Button/Button.cjs.js.map +1 -1
  11. package/dist/components/Button/Button.es.js.map +1 -1
  12. package/dist/components/ButtonGroup/ButtonGroup.cjs.js.map +1 -1
  13. package/dist/components/ButtonGroup/ButtonGroup.es.js.map +1 -1
  14. package/dist/components/ButtonWithSelect/ButtonWithSelect.cjs.js +1 -1
  15. package/dist/components/ButtonWithSelect/ButtonWithSelect.cjs.js.map +1 -1
  16. package/dist/components/ButtonWithSelect/ButtonWithSelect.es.js +29 -27
  17. package/dist/components/ButtonWithSelect/ButtonWithSelect.es.js.map +1 -1
  18. package/dist/components/DataTable/DataTable.cjs.js.map +1 -1
  19. package/dist/components/DataTable/DataTable.es.js.map +1 -1
  20. package/dist/components/Dialog/Dialog.cjs.js.map +1 -1
  21. package/dist/components/Dialog/Dialog.es.js.map +1 -1
  22. package/dist/components/Elevation/Elevation.cjs.js.map +1 -1
  23. package/dist/components/Elevation/Elevation.es.js.map +1 -1
  24. package/dist/components/Icon/Icon.cjs.js.map +1 -1
  25. package/dist/components/Icon/Icon.es.js.map +1 -1
  26. package/dist/components/ImageBackground/ImageBackground.cjs.js.map +1 -1
  27. package/dist/components/ImageBackground/ImageBackground.es.js.map +1 -1
  28. package/dist/components/Input/BaseInput/Input.cjs.js.map +1 -1
  29. package/dist/components/Input/BaseInput/Input.es.js.map +1 -1
  30. package/dist/components/Input/CopyInput/CopyInput.cjs.js.map +1 -1
  31. package/dist/components/Input/CopyInput/CopyInput.es.js.map +1 -1
  32. package/dist/components/Input/SearchInput/SearchInput.cjs.js.map +1 -1
  33. package/dist/components/Input/SearchInput/SearchInput.es.js.map +1 -1
  34. package/dist/components/Menu/MenuTrigger.cjs.js.map +1 -1
  35. package/dist/components/Menu/MenuTrigger.es.js.map +1 -1
  36. package/dist/components/Menu/PopoverMenu.cjs.js +1 -1
  37. package/dist/components/Menu/PopoverMenu.cjs.js.map +1 -1
  38. package/dist/components/Menu/PopoverMenu.es.js +28 -32
  39. package/dist/components/Menu/PopoverMenu.es.js.map +1 -1
  40. package/dist/components/Modal/Modal.cjs.js.map +1 -1
  41. package/dist/components/Modal/Modal.es.js.map +1 -1
  42. package/dist/components/Popover/Popover.cjs.js.map +1 -1
  43. package/dist/components/Popover/Popover.es.js.map +1 -1
  44. package/dist/components/ScreenOverlay/ScreenOverlay.cjs.js.map +1 -1
  45. package/dist/components/ScreenOverlay/ScreenOverlay.es.js.map +1 -1
  46. package/dist/components/Select/Select.cjs.js.map +1 -1
  47. package/dist/components/Select/Select.es.js +3 -3
  48. package/dist/components/Select/Select.es.js.map +1 -1
  49. package/dist/components/Switch/Switch.cjs.js.map +1 -1
  50. package/dist/components/Switch/Switch.es.js.map +1 -1
  51. package/dist/components/Table/Collection/CompoundComponents.cjs.js.map +1 -1
  52. package/dist/components/Table/Collection/CompoundComponents.es.js.map +1 -1
  53. package/dist/components/Table/Collection/collectionParser.cjs.js.map +1 -1
  54. package/dist/components/Table/Collection/collectionParser.es.js.map +1 -1
  55. package/dist/components/Table/Collection/useTableCollection.cjs.js.map +1 -1
  56. package/dist/components/Table/Collection/useTableCollection.es.js.map +1 -1
  57. package/dist/components/Table/Table.cjs.js.map +1 -1
  58. package/dist/components/Table/Table.es.js +5 -5
  59. package/dist/components/Table/Table.es.js.map +1 -1
  60. package/dist/components/Text/TextEllipsis/TextEllipsis.cjs.js.map +1 -1
  61. package/dist/components/Text/TextEllipsis/TextEllipsis.es.js.map +1 -1
  62. package/dist/components/Text/TextEmphasis/TextEmphasis.cjs.js.map +1 -1
  63. package/dist/components/Text/TextEmphasis/TextEmphasis.es.js.map +1 -1
  64. package/dist/components/ThemeProvider.cjs.js.map +1 -1
  65. package/dist/components/ThemeProvider.es.js +4 -4
  66. package/dist/components/ThemeProvider.es.js.map +1 -1
  67. package/dist/components/Tombstone/Tombstone.cjs.js.map +1 -1
  68. package/dist/components/Tombstone/Tombstone.es.js.map +1 -1
  69. package/dist/components/Tooltip/Tooltip.cjs.js.map +1 -1
  70. package/dist/components/Tooltip/Tooltip.es.js.map +1 -1
  71. package/dist/components/Waveform/Waveform.cjs.js.map +1 -1
  72. package/dist/components/Waveform/Waveform.es.js.map +1 -1
  73. package/dist/components/Waveform/WaveformBar.cjs.js.map +1 -1
  74. package/dist/components/Waveform/WaveformBar.es.js.map +1 -1
  75. package/dist/constants/breakpoint.cjs.js.map +1 -1
  76. package/dist/constants/breakpoint.es.js.map +1 -1
  77. package/dist/constants/placement.cjs.js.map +1 -1
  78. package/dist/constants/placement.es.js.map +1 -1
  79. package/dist/design/colors.cjs.js.map +1 -1
  80. package/dist/design/colors.es.js.map +1 -1
  81. package/dist/design/darkTheme/colors.cjs.js.map +1 -1
  82. package/dist/design/darkTheme/colors.es.js +3 -3
  83. package/dist/design/darkTheme/colors.es.js.map +1 -1
  84. package/dist/design/darkTheme/stylesheet.cjs.js.map +1 -1
  85. package/dist/design/darkTheme/stylesheet.es.js +12 -12
  86. package/dist/design/darkTheme/stylesheet.es.js.map +1 -1
  87. package/dist/design/generateStylesheet.cjs.js.map +1 -1
  88. package/dist/design/generateStylesheet.es.js.map +1 -1
  89. package/dist/design/lightTheme/colors.cjs.js.map +1 -1
  90. package/dist/design/lightTheme/colors.es.js +3 -3
  91. package/dist/design/lightTheme/colors.es.js.map +1 -1
  92. package/dist/design/lightTheme/stylesheet.cjs.js.map +1 -1
  93. package/dist/design/lightTheme/stylesheet.es.js +12 -12
  94. package/dist/design/lightTheme/stylesheet.es.js.map +1 -1
  95. package/dist/design/theme.cjs.js.map +1 -1
  96. package/dist/design/theme.es.js.map +1 -1
  97. package/dist/hooks/useBreakpoint.cjs.js.map +1 -1
  98. package/dist/hooks/useBreakpoint.es.js.map +1 -1
  99. package/dist/hooks/useIsClosing.cjs.js.map +1 -1
  100. package/dist/hooks/useIsClosing.es.js.map +1 -1
  101. package/dist/hooks/useLockBodyScroll.cjs.js.map +1 -1
  102. package/dist/hooks/useLockBodyScroll.es.js.map +1 -1
  103. package/dist/hooks/usePalette.cjs.js.map +1 -1
  104. package/dist/hooks/usePalette.es.js.map +1 -1
  105. package/dist/icons.svg +10 -10
  106. package/dist/index.d.ts +38 -38
  107. package/dist/node_modules/@react-aria/button/dist/useButton.cjs.js +1 -1
  108. package/dist/node_modules/@react-aria/button/dist/useButton.cjs.js.map +1 -1
  109. package/dist/node_modules/@react-aria/button/dist/useButton.es.js +13 -12
  110. package/dist/node_modules/@react-aria/button/dist/useButton.es.js.map +1 -1
  111. package/dist/node_modules/@react-aria/dialog/dist/useDialog.cjs.js.map +1 -1
  112. package/dist/node_modules/@react-aria/dialog/dist/useDialog.es.js.map +1 -1
  113. package/dist/node_modules/@react-aria/focus/dist/FocusScope.cjs.js.map +1 -1
  114. package/dist/node_modules/@react-aria/focus/dist/FocusScope.es.js +3 -3
  115. package/dist/node_modules/@react-aria/focus/dist/FocusScope.es.js.map +1 -1
  116. package/dist/node_modules/@react-aria/form/dist/useFormValidation.cjs.js.map +1 -1
  117. package/dist/node_modules/@react-aria/form/dist/useFormValidation.es.js.map +1 -1
  118. package/dist/node_modules/@react-aria/i18n/dist/context.cjs.js.map +1 -1
  119. package/dist/node_modules/@react-aria/i18n/dist/context.es.js.map +1 -1
  120. package/dist/node_modules/@react-aria/i18n/dist/useDefaultLocale.cjs.js.map +1 -1
  121. package/dist/node_modules/@react-aria/i18n/dist/useDefaultLocale.es.js.map +1 -1
  122. package/dist/node_modules/@react-aria/i18n/dist/utils.cjs.js.map +1 -1
  123. package/dist/node_modules/@react-aria/i18n/dist/utils.es.js.map +1 -1
  124. package/dist/node_modules/@react-aria/interactions/dist/context.cjs.js.map +1 -1
  125. package/dist/node_modules/@react-aria/interactions/dist/context.es.js.map +1 -1
  126. package/dist/node_modules/@react-aria/interactions/dist/createEventHandler.cjs.js.map +1 -1
  127. package/dist/node_modules/@react-aria/interactions/dist/createEventHandler.es.js.map +1 -1
  128. package/dist/node_modules/@react-aria/interactions/dist/focusSafely.cjs.js.map +1 -1
  129. package/dist/node_modules/@react-aria/interactions/dist/focusSafely.es.js.map +1 -1
  130. package/dist/node_modules/@react-aria/interactions/dist/textSelection.cjs.js.map +1 -1
  131. package/dist/node_modules/@react-aria/interactions/dist/textSelection.es.js.map +1 -1
  132. package/dist/node_modules/@react-aria/interactions/dist/useFocus.cjs.js.map +1 -1
  133. package/dist/node_modules/@react-aria/interactions/dist/useFocus.es.js.map +1 -1
  134. package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.cjs.js.map +1 -1
  135. package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.es.js.map +1 -1
  136. package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.cjs.js.map +1 -1
  137. package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.es.js.map +1 -1
  138. package/dist/node_modules/@react-aria/interactions/dist/useFocusable.cjs.js.map +1 -1
  139. package/dist/node_modules/@react-aria/interactions/dist/useFocusable.es.js.map +1 -1
  140. package/dist/node_modules/@react-aria/interactions/dist/useInteractOutside.cjs.js.map +1 -1
  141. package/dist/node_modules/@react-aria/interactions/dist/useInteractOutside.es.js.map +1 -1
  142. package/dist/node_modules/@react-aria/interactions/dist/useKeyboard.cjs.js.map +1 -1
  143. package/dist/node_modules/@react-aria/interactions/dist/useKeyboard.es.js.map +1 -1
  144. package/dist/node_modules/@react-aria/interactions/dist/usePress.cjs.js +2 -2
  145. package/dist/node_modules/@react-aria/interactions/dist/usePress.cjs.js.map +1 -1
  146. package/dist/node_modules/@react-aria/interactions/dist/usePress.es.js +23 -23
  147. package/dist/node_modules/@react-aria/interactions/dist/usePress.es.js.map +1 -1
  148. package/dist/node_modules/@react-aria/interactions/dist/utils.cjs.js.map +1 -1
  149. package/dist/node_modules/@react-aria/interactions/dist/utils.es.js.map +1 -1
  150. package/dist/node_modules/@react-aria/label/dist/useField.cjs.js.map +1 -1
  151. package/dist/node_modules/@react-aria/label/dist/useField.es.js.map +1 -1
  152. package/dist/node_modules/@react-aria/label/dist/useLabel.cjs.js.map +1 -1
  153. package/dist/node_modules/@react-aria/label/dist/useLabel.es.js.map +1 -1
  154. package/dist/node_modules/@react-aria/overlays/dist/Overlay.cjs.js.map +1 -1
  155. package/dist/node_modules/@react-aria/overlays/dist/Overlay.es.js.map +1 -1
  156. package/dist/node_modules/@react-aria/overlays/dist/ariaHideOutside.cjs.js +1 -1
  157. package/dist/node_modules/@react-aria/overlays/dist/ariaHideOutside.cjs.js.map +1 -1
  158. package/dist/node_modules/@react-aria/overlays/dist/ariaHideOutside.es.js +18 -18
  159. package/dist/node_modules/@react-aria/overlays/dist/ariaHideOutside.es.js.map +1 -1
  160. package/dist/node_modules/@react-aria/overlays/dist/useModalOverlay.cjs.js.map +1 -1
  161. package/dist/node_modules/@react-aria/overlays/dist/useModalOverlay.es.js.map +1 -1
  162. package/dist/node_modules/@react-aria/overlays/dist/useOverlay.cjs.js.map +1 -1
  163. package/dist/node_modules/@react-aria/overlays/dist/useOverlay.es.js.map +1 -1
  164. package/dist/node_modules/@react-aria/overlays/dist/usePreventScroll.cjs.js.map +1 -1
  165. package/dist/node_modules/@react-aria/overlays/dist/usePreventScroll.es.js.map +1 -1
  166. package/dist/node_modules/@react-aria/radio/dist/useRadio.cjs.js.map +1 -1
  167. package/dist/node_modules/@react-aria/radio/dist/useRadio.es.js.map +1 -1
  168. package/dist/node_modules/@react-aria/radio/dist/useRadioGroup.cjs.js.map +1 -1
  169. package/dist/node_modules/@react-aria/radio/dist/useRadioGroup.es.js.map +1 -1
  170. package/dist/node_modules/@react-aria/ssr/dist/SSRProvider.cjs.js.map +1 -1
  171. package/dist/node_modules/@react-aria/ssr/dist/SSRProvider.es.js.map +1 -1
  172. package/dist/node_modules/@react-aria/switch/dist/useSwitch.cjs.js.map +1 -1
  173. package/dist/node_modules/@react-aria/switch/dist/useSwitch.es.js.map +1 -1
  174. package/dist/node_modules/@react-aria/toggle/dist/useToggle.cjs.js.map +1 -1
  175. package/dist/node_modules/@react-aria/toggle/dist/useToggle.es.js.map +1 -1
  176. package/dist/node_modules/@react-aria/visually-hidden/dist/VisuallyHidden.cjs.js.map +1 -1
  177. package/dist/node_modules/@react-aria/visually-hidden/dist/VisuallyHidden.es.js.map +1 -1
  178. package/dist/node_modules/@react-stately/form/dist/useFormValidationState.cjs.js.map +1 -1
  179. package/dist/node_modules/@react-stately/form/dist/useFormValidationState.es.js +3 -3
  180. package/dist/node_modules/@react-stately/form/dist/useFormValidationState.es.js.map +1 -1
  181. package/dist/node_modules/@react-stately/overlays/dist/useOverlayTriggerState.cjs.js.map +1 -1
  182. package/dist/node_modules/@react-stately/overlays/dist/useOverlayTriggerState.es.js.map +1 -1
  183. package/dist/node_modules/@react-stately/radio/dist/useRadioGroupState.cjs.js.map +1 -1
  184. package/dist/node_modules/@react-stately/radio/dist/useRadioGroupState.es.js.map +1 -1
  185. package/dist/node_modules/@react-stately/toggle/dist/useToggleState.cjs.js.map +1 -1
  186. package/dist/node_modules/@react-stately/toggle/dist/useToggleState.es.js.map +1 -1
  187. package/dist/node_modules/@react-stately/utils/dist/useControlledState.cjs.js.map +1 -1
  188. package/dist/node_modules/@react-stately/utils/dist/useControlledState.es.js.map +1 -1
  189. package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.cjs.js +1 -1
  190. package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.cjs.js.map +1 -1
  191. package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.es.js +1 -2
  192. package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.es.js.map +1 -1
  193. package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.cjs.js +1 -1
  194. package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.cjs.js.map +1 -1
  195. package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.es.js +1 -2
  196. package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.es.js.map +1 -1
  197. package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.cjs.js +1 -1
  198. package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.cjs.js.map +1 -1
  199. package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.es.js +1 -2
  200. package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.es.js.map +1 -1
  201. package/dist/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.cjs.js +1 -1
  202. package/dist/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.cjs.js.map +1 -1
  203. package/dist/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.es.js +1 -2
  204. package/dist/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.es.js.map +1 -1
  205. package/dist/node_modules/@swc/helpers/esm/_class_private_field_get.cjs.js +1 -1
  206. package/dist/node_modules/@swc/helpers/esm/_class_private_field_get.cjs.js.map +1 -1
  207. package/dist/node_modules/@swc/helpers/esm/_class_private_field_get.es.js +6 -7
  208. package/dist/node_modules/@swc/helpers/esm/_class_private_field_get.es.js.map +1 -1
  209. package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.cjs.js +1 -1
  210. package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.cjs.js.map +1 -1
  211. package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.es.js +3 -4
  212. package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.es.js.map +1 -1
  213. package/dist/node_modules/@swc/helpers/esm/_class_private_field_set.cjs.js +1 -1
  214. package/dist/node_modules/@swc/helpers/esm/_class_private_field_set.cjs.js.map +1 -1
  215. package/dist/node_modules/@swc/helpers/esm/_class_private_field_set.es.js +6 -7
  216. package/dist/node_modules/@swc/helpers/esm/_class_private_field_set.es.js.map +1 -1
  217. package/dist/node_modules/color2k/dist/index.exports.import.es.cjs.js.map +1 -1
  218. package/dist/node_modules/color2k/dist/index.exports.import.es.es.js.map +1 -1
  219. package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs.js +7 -7
  220. package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs.js.map +1 -1
  221. package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js +167 -174
  222. package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js.map +1 -1
  223. package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.cjs.js +1 -1
  224. package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.cjs.js.map +1 -1
  225. package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.es.js +3 -3
  226. package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.es.js.map +1 -1
  227. package/dist/node_modules/react/jsx-runtime.cjs.js.map +1 -1
  228. package/dist/node_modules/react/jsx-runtime.es.js.map +1 -1
  229. package/dist/style.css +1 -1
  230. package/dist/utils/color2k.cjs.js.map +1 -1
  231. package/dist/utils/color2k.es.js.map +1 -1
  232. package/dist/utils/copy.cjs.js.map +1 -1
  233. package/dist/utils/copy.es.js.map +1 -1
  234. package/dist/utils/image.cjs.js.map +1 -1
  235. package/dist/utils/image.es.js.map +1 -1
  236. package/dist/utils/navigation.cjs.js.map +1 -1
  237. package/dist/utils/navigation.es.js.map +1 -1
  238. package/dist/utils/palette.cjs.js.map +1 -1
  239. package/dist/utils/palette.es.js +1 -1
  240. package/dist/utils/palette.es.js.map +1 -1
  241. package/dist/utils/string.cjs.js.map +1 -1
  242. package/dist/utils/string.es.js.map +1 -1
  243. package/package.json +140 -140
@@ -1 +1 @@
1
- {"version":3,"file":"createEventHandler.es.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/createEventHandler.mjs"],"sourcesContent":["/*\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 */ function $93925083ecbb358c$export$48d1ea6320830260(handler) {\n if (!handler) return undefined;\n let shouldStopPropagation = true;\n return (e)=>{\n let event = {\n ...e,\n preventDefault () {\n e.preventDefault();\n },\n isDefaultPrevented () {\n return e.isDefaultPrevented();\n },\n stopPropagation () {\n if (shouldStopPropagation && process.env.NODE_ENV !== 'production') console.error('stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.');\n else shouldStopPropagation = true;\n },\n continuePropagation () {\n shouldStopPropagation = false;\n },\n isPropagationStopped () {\n return shouldStopPropagation;\n }\n };\n handler(event);\n if (shouldStopPropagation) e.stopPropagation();\n };\n}\n\n\nexport {$93925083ecbb358c$export$48d1ea6320830260 as createEventHandler};\n//# sourceMappingURL=createEventHandler.module.js.map\n"],"names":["$93925083ecbb358c$export$48d1ea6320830260","handler","shouldStopPropagation","e","event"],"mappings":"AAUI,SAASA,EAA0CC,GAAS;AAC5D,MAAI,CAACA,EAAS;AACd,MAAIC,IAAwB;AAC5B,SAAO,CAACC,MAAI;AACR,QAAIC,IAAQ;AAAA,MACR,GAAGD;AAAA,MACH,iBAAkB;AACd,QAAAA,EAAE,eAAc;AAAA,MACnB;AAAA,MACD,qBAAsB;AAClB,eAAOA,EAAE;MACZ;AAAA,MACD,kBAAmB;AACf,QAAID,KAAyB,QAAQ,IAAI,aAAa,eAAc,QAAQ,MAAM,sIAAsI,IACnNA,IAAwB;AAAA,MAChC;AAAA,MACD,sBAAuB;AACnB,QAAAA,IAAwB;AAAA,MAC3B;AAAA,MACD,uBAAwB;AACpB,eAAOA;AAAA,MACV;AAAA,IACb;AACQ,IAAAD,EAAQG,CAAK,GACTF,KAAuBC,EAAE;EACrC;AACA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"createEventHandler.es.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/createEventHandler.mjs"],"sourcesContent":["/*\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 */ function $93925083ecbb358c$export$48d1ea6320830260(handler) {\n if (!handler) return undefined;\n let shouldStopPropagation = true;\n return (e)=>{\n let event = {\n ...e,\n preventDefault () {\n e.preventDefault();\n },\n isDefaultPrevented () {\n return e.isDefaultPrevented();\n },\n stopPropagation () {\n if (shouldStopPropagation && process.env.NODE_ENV !== 'production') console.error('stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.');\n else shouldStopPropagation = true;\n },\n continuePropagation () {\n shouldStopPropagation = false;\n },\n isPropagationStopped () {\n return shouldStopPropagation;\n }\n };\n handler(event);\n if (shouldStopPropagation) e.stopPropagation();\n };\n}\n\n\nexport {$93925083ecbb358c$export$48d1ea6320830260 as createEventHandler};\n//# sourceMappingURL=createEventHandler.module.js.map\n"],"names":["$93925083ecbb358c$export$48d1ea6320830260","handler","shouldStopPropagation","e","event"],"mappings":"AAUI,SAASA,EAA0CC,GAAS;AAC5D,MAAI,CAACA,EAAS;AACd,MAAIC,IAAwB;AAC5B,SAAO,CAACC,MAAI;AACR,QAAIC,IAAQ;AAAA,MACR,GAAGD;AAAA,MACH,iBAAkB;AACd,QAAAA,EAAE,eAAc;AAAA,MACpB;AAAA,MACA,qBAAsB;AAClB,eAAOA,EAAE,mBAAkB;AAAA,MAC/B;AAAA,MACA,kBAAmB;AACf,QAAID,KAAyB,QAAQ,IAAI,aAAa,eAAc,QAAQ,MAAM,sIAAsI,IACnNA,IAAwB;AAAA,MACjC;AAAA,MACA,sBAAuB;AACnB,QAAAA,IAAwB;AAAA,MAC5B;AAAA,MACA,uBAAwB;AACpB,eAAOA;AAAA,MACX;AAAA,IACZ;AACQ,IAAAD,EAAQG,CAAK,GACTF,KAAuBC,EAAE,gBAAe;AAAA,EAChD;AACJ;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"focusSafely.cjs.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/focusSafely.mjs"],"sourcesContent":["import {getInteractionModality as $507fabe10e71c6fb$export$630ff653c5ada6a9} from \"./useFocusVisible.mjs\";\nimport {getOwnerDocument as $k50bp$getOwnerDocument, getActiveElement as $k50bp$getActiveElement, runAfterTransition as $k50bp$runAfterTransition, focusWithoutScrolling as $k50bp$focusWithoutScrolling} from \"@react-aria/utils\";\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\nfunction $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {\n // If the user is interacting with a virtual cursor, e.g. screen reader, then\n // wait until after any animated transitions that are currently occurring on\n // the page before shifting focus. This avoids issues with VoiceOver on iOS\n // causing the page to scroll when moving focus if the element is transitioning\n // from off the screen.\n const ownerDocument = (0, $k50bp$getOwnerDocument)(element);\n const activeElement = (0, $k50bp$getActiveElement)(ownerDocument);\n if ((0, $507fabe10e71c6fb$export$630ff653c5ada6a9)() === 'virtual') {\n let lastFocusedElement = activeElement;\n (0, $k50bp$runAfterTransition)(()=>{\n // If focus did not move and the element is still in the document, focus it.\n if ((0, $k50bp$getActiveElement)(ownerDocument) === lastFocusedElement && element.isConnected) (0, $k50bp$focusWithoutScrolling)(element);\n });\n } else (0, $k50bp$focusWithoutScrolling)(element);\n}\n\n\nexport {$3ad3f6e1647bc98d$export$80f3e147d781571c as focusSafely};\n//# sourceMappingURL=focusSafely.module.js.map\n"],"names":["$3ad3f6e1647bc98d$export$80f3e147d781571c","element","ownerDocument","$k50bp$getOwnerDocument","activeElement","$k50bp$getActiveElement","$507fabe10e71c6fb$export$630ff653c5ada6a9","lastFocusedElement","$k50bp$runAfterTransition","$k50bp$focusWithoutScrolling"],"mappings":"2JAeA,SAASA,EAA0CC,EAAS,CAMxD,MAAMC,EAAoBC,mBAAyBF,CAAO,EACpDG,EAAoBC,mBAAyBH,CAAa,EAChE,GAAQI,EAAAA,uBAA4C,IAAK,UAAW,CAChE,IAAIC,EAAqBH,EACrBI,EAAyB,mBAAE,IAAI,CAEvBH,EAAAA,iBAAyBH,CAAa,IAAMK,GAAsBN,EAAQ,aAAiBQ,wBAA8BR,CAAO,CACpJ,CAAS,CACT,MAAeQ,EAAAA,sBAA8BR,CAAO,CACpD","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"focusSafely.cjs.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/focusSafely.mjs"],"sourcesContent":["import {getInteractionModality as $507fabe10e71c6fb$export$630ff653c5ada6a9} from \"./useFocusVisible.mjs\";\nimport {getOwnerDocument as $k50bp$getOwnerDocument, getActiveElement as $k50bp$getActiveElement, runAfterTransition as $k50bp$runAfterTransition, focusWithoutScrolling as $k50bp$focusWithoutScrolling} from \"@react-aria/utils\";\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\nfunction $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {\n // If the user is interacting with a virtual cursor, e.g. screen reader, then\n // wait until after any animated transitions that are currently occurring on\n // the page before shifting focus. This avoids issues with VoiceOver on iOS\n // causing the page to scroll when moving focus if the element is transitioning\n // from off the screen.\n const ownerDocument = (0, $k50bp$getOwnerDocument)(element);\n const activeElement = (0, $k50bp$getActiveElement)(ownerDocument);\n if ((0, $507fabe10e71c6fb$export$630ff653c5ada6a9)() === 'virtual') {\n let lastFocusedElement = activeElement;\n (0, $k50bp$runAfterTransition)(()=>{\n // If focus did not move and the element is still in the document, focus it.\n if ((0, $k50bp$getActiveElement)(ownerDocument) === lastFocusedElement && element.isConnected) (0, $k50bp$focusWithoutScrolling)(element);\n });\n } else (0, $k50bp$focusWithoutScrolling)(element);\n}\n\n\nexport {$3ad3f6e1647bc98d$export$80f3e147d781571c as focusSafely};\n//# sourceMappingURL=focusSafely.module.js.map\n"],"names":["$3ad3f6e1647bc98d$export$80f3e147d781571c","element","ownerDocument","$k50bp$getOwnerDocument","activeElement","$k50bp$getActiveElement","$507fabe10e71c6fb$export$630ff653c5ada6a9","lastFocusedElement","$k50bp$runAfterTransition","$k50bp$focusWithoutScrolling"],"mappings":"2JAeA,SAASA,EAA0CC,EAAS,CAMxD,MAAMC,EAAoBC,EAAAA,iBAAyBF,CAAO,EACpDG,EAAoBC,EAAAA,iBAAyBH,CAAa,EAChE,GAAQI,EAAAA,uBAAyC,IAAQ,UAAW,CAChE,IAAIC,EAAqBH,EACrBI,EAAAA,mBAA2B,IAAI,CAEvBH,EAAAA,iBAAyBH,CAAa,IAAMK,GAAsBN,EAAQ,aAAiBQ,EAAAA,sBAA8BR,CAAO,CAC5I,CAAC,CACL,MAAWQ,EAAAA,sBAA8BR,CAAO,CACpD","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"focusSafely.es.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/focusSafely.mjs"],"sourcesContent":["import {getInteractionModality as $507fabe10e71c6fb$export$630ff653c5ada6a9} from \"./useFocusVisible.mjs\";\nimport {getOwnerDocument as $k50bp$getOwnerDocument, getActiveElement as $k50bp$getActiveElement, runAfterTransition as $k50bp$runAfterTransition, focusWithoutScrolling as $k50bp$focusWithoutScrolling} from \"@react-aria/utils\";\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\nfunction $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {\n // If the user is interacting with a virtual cursor, e.g. screen reader, then\n // wait until after any animated transitions that are currently occurring on\n // the page before shifting focus. This avoids issues with VoiceOver on iOS\n // causing the page to scroll when moving focus if the element is transitioning\n // from off the screen.\n const ownerDocument = (0, $k50bp$getOwnerDocument)(element);\n const activeElement = (0, $k50bp$getActiveElement)(ownerDocument);\n if ((0, $507fabe10e71c6fb$export$630ff653c5ada6a9)() === 'virtual') {\n let lastFocusedElement = activeElement;\n (0, $k50bp$runAfterTransition)(()=>{\n // If focus did not move and the element is still in the document, focus it.\n if ((0, $k50bp$getActiveElement)(ownerDocument) === lastFocusedElement && element.isConnected) (0, $k50bp$focusWithoutScrolling)(element);\n });\n } else (0, $k50bp$focusWithoutScrolling)(element);\n}\n\n\nexport {$3ad3f6e1647bc98d$export$80f3e147d781571c as focusSafely};\n//# sourceMappingURL=focusSafely.module.js.map\n"],"names":["$3ad3f6e1647bc98d$export$80f3e147d781571c","element","ownerDocument","$k50bp$getOwnerDocument","activeElement","$k50bp$getActiveElement","$507fabe10e71c6fb$export$630ff653c5ada6a9","lastFocusedElement","$k50bp$runAfterTransition","$k50bp$focusWithoutScrolling"],"mappings":";;AAeA,SAASA,EAA0CC,GAAS;AAMxD,QAAMC,IAAoBC,EAAyBF,CAAO,GACpDG,IAAoBC,EAAyBH,CAAa;AAChE,MAAQI,EAA4C,MAAK,WAAW;AAChE,QAAIC,IAAqBH;AACzB,IAAII,EAA2B,MAAI;AAE/B,MAAQH,EAAyBH,CAAa,MAAMK,KAAsBN,EAAQ,eAAiBQ,EAA8BR,CAAO;AAAA,IACpJ,CAAS;AAAA,EACT,MAAW,CAAIQ,EAA8BR,CAAO;AACpD;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"focusSafely.es.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/focusSafely.mjs"],"sourcesContent":["import {getInteractionModality as $507fabe10e71c6fb$export$630ff653c5ada6a9} from \"./useFocusVisible.mjs\";\nimport {getOwnerDocument as $k50bp$getOwnerDocument, getActiveElement as $k50bp$getActiveElement, runAfterTransition as $k50bp$runAfterTransition, focusWithoutScrolling as $k50bp$focusWithoutScrolling} from \"@react-aria/utils\";\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\nfunction $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {\n // If the user is interacting with a virtual cursor, e.g. screen reader, then\n // wait until after any animated transitions that are currently occurring on\n // the page before shifting focus. This avoids issues with VoiceOver on iOS\n // causing the page to scroll when moving focus if the element is transitioning\n // from off the screen.\n const ownerDocument = (0, $k50bp$getOwnerDocument)(element);\n const activeElement = (0, $k50bp$getActiveElement)(ownerDocument);\n if ((0, $507fabe10e71c6fb$export$630ff653c5ada6a9)() === 'virtual') {\n let lastFocusedElement = activeElement;\n (0, $k50bp$runAfterTransition)(()=>{\n // If focus did not move and the element is still in the document, focus it.\n if ((0, $k50bp$getActiveElement)(ownerDocument) === lastFocusedElement && element.isConnected) (0, $k50bp$focusWithoutScrolling)(element);\n });\n } else (0, $k50bp$focusWithoutScrolling)(element);\n}\n\n\nexport {$3ad3f6e1647bc98d$export$80f3e147d781571c as focusSafely};\n//# sourceMappingURL=focusSafely.module.js.map\n"],"names":["$3ad3f6e1647bc98d$export$80f3e147d781571c","element","ownerDocument","$k50bp$getOwnerDocument","activeElement","$k50bp$getActiveElement","$507fabe10e71c6fb$export$630ff653c5ada6a9","lastFocusedElement","$k50bp$runAfterTransition","$k50bp$focusWithoutScrolling"],"mappings":";;AAeA,SAASA,EAA0CC,GAAS;AAMxD,QAAMC,IAAoBC,EAAyBF,CAAO,GACpDG,IAAoBC,EAAyBH,CAAa;AAChE,MAAQI,EAAyC,MAAQ,WAAW;AAChE,QAAIC,IAAqBH;AACzB,IAAII,EAA2B,MAAI;AAE/B,MAAQH,EAAyBH,CAAa,MAAMK,KAAsBN,EAAQ,eAAiBQ,EAA8BR,CAAO;AAAA,IAC5I,CAAC;AAAA,EACL,MAAO,CAAIQ,EAA8BR,CAAO;AACpD;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"textSelection.cjs.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/textSelection.mjs"],"sourcesContent":["import {isIOS as $7R18e$isIOS, getOwnerDocument as $7R18e$getOwnerDocument, runAfterTransition as $7R18e$runAfterTransition} from \"@react-aria/utils\";\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// 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 $14c0b72509d70225$var$state = 'default';\nlet $14c0b72509d70225$var$savedUserSelect = '';\nlet $14c0b72509d70225$var$modifiedElementMap = new WeakMap();\nfunction $14c0b72509d70225$export$16a4697467175487(target) {\n if ((0, $7R18e$isIOS)()) {\n if ($14c0b72509d70225$var$state === 'default') {\n const documentObject = (0, $7R18e$getOwnerDocument)(target);\n $14c0b72509d70225$var$savedUserSelect = documentObject.documentElement.style.webkitUserSelect;\n documentObject.documentElement.style.webkitUserSelect = 'none';\n }\n $14c0b72509d70225$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 $14c0b72509d70225$var$modifiedElementMap.set(target, target.style[property]);\n target.style[property] = 'none';\n }\n}\nfunction $14c0b72509d70225$export$b0d6fa1ab32e3295(target) {\n if ((0, $7R18e$isIOS)()) {\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 ($14c0b72509d70225$var$state !== 'disabled') return;\n $14c0b72509d70225$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, $7R18e$runAfterTransition)(()=>{\n // Avoid race conditions\n if ($14c0b72509d70225$var$state === 'restoring') {\n const documentObject = (0, $7R18e$getOwnerDocument)(target);\n if (documentObject.documentElement.style.webkitUserSelect === 'none') documentObject.documentElement.style.webkitUserSelect = $14c0b72509d70225$var$savedUserSelect || '';\n $14c0b72509d70225$var$savedUserSelect = '';\n $14c0b72509d70225$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 && $14c0b72509d70225$var$modifiedElementMap.has(target)) {\n let targetOldUserSelect = $14c0b72509d70225$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 $14c0b72509d70225$var$modifiedElementMap.delete(target);\n }\n }\n}\n\n\nexport {$14c0b72509d70225$export$16a4697467175487 as disableTextSelection, $14c0b72509d70225$export$b0d6fa1ab32e3295 as restoreTextSelection};\n//# sourceMappingURL=textSelection.module.js.map\n"],"names":["$14c0b72509d70225$var$state","$14c0b72509d70225$var$savedUserSelect","$14c0b72509d70225$var$modifiedElementMap","$14c0b72509d70225$export$16a4697467175487","target","$7R18e$isIOS","documentObject","$7R18e$getOwnerDocument","property","$14c0b72509d70225$export$b0d6fa1ab32e3295","$7R18e$runAfterTransition","targetOldUserSelect"],"mappings":"qHAeA,IAAIA,EAA8B,UAC9BC,EAAwC,GACxCC,EAA2C,IAAI,QACnD,SAASC,EAA0CC,EAAQ,CACvD,GAAQC,EAAY,MAAA,EAAK,CACrB,GAAIL,IAAgC,UAAW,CAC3C,MAAMM,EAAqBC,mBAAyBH,CAAM,EAC1DH,EAAwCK,EAAe,gBAAgB,MAAM,iBAC7EA,EAAe,gBAAgB,MAAM,iBAAmB,MAC3D,CACDN,EAA8B,UACjC,SAAUI,aAAkB,aAAeA,aAAkB,WAAY,CAGtE,IAAII,EAAW,eAAgBJ,EAAO,MAAQ,aAAe,mBAC7DF,EAAyC,IAAIE,EAAQA,EAAO,MAAMI,CAAQ,CAAC,EAC3EJ,EAAO,MAAMI,CAAQ,EAAI,MAC5B,CACL,CACA,SAASC,EAA0CL,EAAQ,CACvD,GAAQC,EAAY,MAAA,EAAK,CAGrB,GAAIL,IAAgC,WAAY,OAChDA,EAA8B,YAG9B,WAAW,IAAI,CAGPU,EAAyB,mBAAE,IAAI,CAE/B,GAAIV,IAAgC,YAAa,CAC7C,MAAMM,EAAqBC,mBAAyBH,CAAM,EACtDE,EAAe,gBAAgB,MAAM,mBAAqB,SAAQA,EAAe,gBAAgB,MAAM,iBAAmBL,GAAyC,IACvKA,EAAwC,GACxCD,EAA8B,SACjC,CACjB,CAAa,CACJ,EAAE,GAAG,CACT,UAAUI,aAAkB,aAAeA,aAAkB,aAGtDA,GAAUF,EAAyC,IAAIE,CAAM,EAAG,CAChE,IAAIO,EAAsBT,EAAyC,IAAIE,CAAM,EACzEI,EAAW,eAAgBJ,EAAO,MAAQ,aAAe,mBACzDA,EAAO,MAAMI,CAAQ,IAAM,SAAQJ,EAAO,MAAMI,CAAQ,EAAIG,GAC5DP,EAAO,aAAa,OAAO,IAAM,IAAIA,EAAO,gBAAgB,OAAO,EACvEF,EAAyC,OAAOE,CAAM,CACzD,CAET","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"textSelection.cjs.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/textSelection.mjs"],"sourcesContent":["import {isIOS as $7R18e$isIOS, getOwnerDocument as $7R18e$getOwnerDocument, runAfterTransition as $7R18e$runAfterTransition} from \"@react-aria/utils\";\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// 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 $14c0b72509d70225$var$state = 'default';\nlet $14c0b72509d70225$var$savedUserSelect = '';\nlet $14c0b72509d70225$var$modifiedElementMap = new WeakMap();\nfunction $14c0b72509d70225$export$16a4697467175487(target) {\n if ((0, $7R18e$isIOS)()) {\n if ($14c0b72509d70225$var$state === 'default') {\n const documentObject = (0, $7R18e$getOwnerDocument)(target);\n $14c0b72509d70225$var$savedUserSelect = documentObject.documentElement.style.webkitUserSelect;\n documentObject.documentElement.style.webkitUserSelect = 'none';\n }\n $14c0b72509d70225$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 $14c0b72509d70225$var$modifiedElementMap.set(target, target.style[property]);\n target.style[property] = 'none';\n }\n}\nfunction $14c0b72509d70225$export$b0d6fa1ab32e3295(target) {\n if ((0, $7R18e$isIOS)()) {\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 ($14c0b72509d70225$var$state !== 'disabled') return;\n $14c0b72509d70225$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, $7R18e$runAfterTransition)(()=>{\n // Avoid race conditions\n if ($14c0b72509d70225$var$state === 'restoring') {\n const documentObject = (0, $7R18e$getOwnerDocument)(target);\n if (documentObject.documentElement.style.webkitUserSelect === 'none') documentObject.documentElement.style.webkitUserSelect = $14c0b72509d70225$var$savedUserSelect || '';\n $14c0b72509d70225$var$savedUserSelect = '';\n $14c0b72509d70225$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 && $14c0b72509d70225$var$modifiedElementMap.has(target)) {\n let targetOldUserSelect = $14c0b72509d70225$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 $14c0b72509d70225$var$modifiedElementMap.delete(target);\n }\n }\n}\n\n\nexport {$14c0b72509d70225$export$16a4697467175487 as disableTextSelection, $14c0b72509d70225$export$b0d6fa1ab32e3295 as restoreTextSelection};\n//# sourceMappingURL=textSelection.module.js.map\n"],"names":["$14c0b72509d70225$var$state","$14c0b72509d70225$var$savedUserSelect","$14c0b72509d70225$var$modifiedElementMap","$14c0b72509d70225$export$16a4697467175487","target","$7R18e$isIOS","documentObject","$7R18e$getOwnerDocument","property","$14c0b72509d70225$export$b0d6fa1ab32e3295","$7R18e$runAfterTransition","targetOldUserSelect"],"mappings":"qHAeA,IAAIA,EAA8B,UAC9BC,EAAwC,GACxCC,EAA2C,IAAI,QACnD,SAASC,EAA0CC,EAAQ,CACvD,GAAQC,EAAAA,MAAY,EAAK,CACrB,GAAIL,IAAgC,UAAW,CAC3C,MAAMM,EAAqBC,EAAAA,iBAAyBH,CAAM,EAC1DH,EAAwCK,EAAe,gBAAgB,MAAM,iBAC7EA,EAAe,gBAAgB,MAAM,iBAAmB,MAC5D,CACAN,EAA8B,UAClC,SAAWI,aAAkB,aAAeA,aAAkB,WAAY,CAGtE,IAAII,EAAW,eAAgBJ,EAAO,MAAQ,aAAe,mBAC7DF,EAAyC,IAAIE,EAAQA,EAAO,MAAMI,CAAQ,CAAC,EAC3EJ,EAAO,MAAMI,CAAQ,EAAI,MAC7B,CACJ,CACA,SAASC,EAA0CL,EAAQ,CACvD,GAAQC,EAAAA,MAAY,EAAK,CAGrB,GAAIL,IAAgC,WAAY,OAChDA,EAA8B,YAG9B,WAAW,IAAI,CAGPU,EAAAA,mBAA2B,IAAI,CAE/B,GAAIV,IAAgC,YAAa,CAC7C,MAAMM,EAAqBC,EAAAA,iBAAyBH,CAAM,EACtDE,EAAe,gBAAgB,MAAM,mBAAqB,SAAQA,EAAe,gBAAgB,MAAM,iBAAmBL,GAAyC,IACvKA,EAAwC,GACxCD,EAA8B,SAClC,CACJ,CAAC,CACL,EAAG,GAAG,CACV,UAAWI,aAAkB,aAAeA,aAAkB,aAGtDA,GAAUF,EAAyC,IAAIE,CAAM,EAAG,CAChE,IAAIO,EAAsBT,EAAyC,IAAIE,CAAM,EACzEI,EAAW,eAAgBJ,EAAO,MAAQ,aAAe,mBACzDA,EAAO,MAAMI,CAAQ,IAAM,SAAQJ,EAAO,MAAMI,CAAQ,EAAIG,GAC5DP,EAAO,aAAa,OAAO,IAAM,IAAIA,EAAO,gBAAgB,OAAO,EACvEF,EAAyC,OAAOE,CAAM,CAC1D,CAER","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"textSelection.es.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/textSelection.mjs"],"sourcesContent":["import {isIOS as $7R18e$isIOS, getOwnerDocument as $7R18e$getOwnerDocument, runAfterTransition as $7R18e$runAfterTransition} from \"@react-aria/utils\";\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// 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 $14c0b72509d70225$var$state = 'default';\nlet $14c0b72509d70225$var$savedUserSelect = '';\nlet $14c0b72509d70225$var$modifiedElementMap = new WeakMap();\nfunction $14c0b72509d70225$export$16a4697467175487(target) {\n if ((0, $7R18e$isIOS)()) {\n if ($14c0b72509d70225$var$state === 'default') {\n const documentObject = (0, $7R18e$getOwnerDocument)(target);\n $14c0b72509d70225$var$savedUserSelect = documentObject.documentElement.style.webkitUserSelect;\n documentObject.documentElement.style.webkitUserSelect = 'none';\n }\n $14c0b72509d70225$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 $14c0b72509d70225$var$modifiedElementMap.set(target, target.style[property]);\n target.style[property] = 'none';\n }\n}\nfunction $14c0b72509d70225$export$b0d6fa1ab32e3295(target) {\n if ((0, $7R18e$isIOS)()) {\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 ($14c0b72509d70225$var$state !== 'disabled') return;\n $14c0b72509d70225$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, $7R18e$runAfterTransition)(()=>{\n // Avoid race conditions\n if ($14c0b72509d70225$var$state === 'restoring') {\n const documentObject = (0, $7R18e$getOwnerDocument)(target);\n if (documentObject.documentElement.style.webkitUserSelect === 'none') documentObject.documentElement.style.webkitUserSelect = $14c0b72509d70225$var$savedUserSelect || '';\n $14c0b72509d70225$var$savedUserSelect = '';\n $14c0b72509d70225$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 && $14c0b72509d70225$var$modifiedElementMap.has(target)) {\n let targetOldUserSelect = $14c0b72509d70225$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 $14c0b72509d70225$var$modifiedElementMap.delete(target);\n }\n }\n}\n\n\nexport {$14c0b72509d70225$export$16a4697467175487 as disableTextSelection, $14c0b72509d70225$export$b0d6fa1ab32e3295 as restoreTextSelection};\n//# sourceMappingURL=textSelection.module.js.map\n"],"names":["$14c0b72509d70225$var$state","$14c0b72509d70225$var$savedUserSelect","$14c0b72509d70225$var$modifiedElementMap","$14c0b72509d70225$export$16a4697467175487","target","$7R18e$isIOS","documentObject","$7R18e$getOwnerDocument","property","$14c0b72509d70225$export$b0d6fa1ab32e3295","$7R18e$runAfterTransition","targetOldUserSelect"],"mappings":";AAeA,IAAIA,IAA8B,WAC9BC,IAAwC,IACxCC,IAA2C,oBAAI;AACnD,SAASC,EAA0CC,GAAQ;AACvD,MAAQC,EAAY,GAAK;AACrB,QAAIL,MAAgC,WAAW;AAC3C,YAAMM,IAAqBC,EAAyBH,CAAM;AAC1D,MAAAH,IAAwCK,EAAe,gBAAgB,MAAM,kBAC7EA,EAAe,gBAAgB,MAAM,mBAAmB;AAAA,IAC3D;AACD,IAAAN,IAA8B;AAAA,EACjC,WAAUI,aAAkB,eAAeA,aAAkB,YAAY;AAGtE,QAAII,IAAW,gBAAgBJ,EAAO,QAAQ,eAAe;AAC7D,IAAAF,EAAyC,IAAIE,GAAQA,EAAO,MAAMI,CAAQ,CAAC,GAC3EJ,EAAO,MAAMI,CAAQ,IAAI;AAAA,EAC5B;AACL;AACA,SAASC,EAA0CL,GAAQ;AACvD,MAAQC,EAAY,GAAK;AAGrB,QAAIL,MAAgC,WAAY;AAChD,IAAAA,IAA8B,aAG9B,WAAW,MAAI;AAGX,MAAIU,EAA2B,MAAI;AAE/B,YAAIV,MAAgC,aAAa;AAC7C,gBAAMM,IAAqBC,EAAyBH,CAAM;AAC1D,UAAIE,EAAe,gBAAgB,MAAM,qBAAqB,WAAQA,EAAe,gBAAgB,MAAM,mBAAmBL,KAAyC,KACvKA,IAAwC,IACxCD,IAA8B;AAAA,QACjC;AAAA,MACjB,CAAa;AAAA,IACJ,GAAE,GAAG;AAAA,EACT,YAAUI,aAAkB,eAAeA,aAAkB,eAGtDA,KAAUF,EAAyC,IAAIE,CAAM,GAAG;AAChE,QAAIO,IAAsBT,EAAyC,IAAIE,CAAM,GACzEI,IAAW,gBAAgBJ,EAAO,QAAQ,eAAe;AAC7D,IAAIA,EAAO,MAAMI,CAAQ,MAAM,WAAQJ,EAAO,MAAMI,CAAQ,IAAIG,IAC5DP,EAAO,aAAa,OAAO,MAAM,MAAIA,EAAO,gBAAgB,OAAO,GACvEF,EAAyC,OAAOE,CAAM;AAAA,EACzD;AAET;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"textSelection.es.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/textSelection.mjs"],"sourcesContent":["import {isIOS as $7R18e$isIOS, getOwnerDocument as $7R18e$getOwnerDocument, runAfterTransition as $7R18e$runAfterTransition} from \"@react-aria/utils\";\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// 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 $14c0b72509d70225$var$state = 'default';\nlet $14c0b72509d70225$var$savedUserSelect = '';\nlet $14c0b72509d70225$var$modifiedElementMap = new WeakMap();\nfunction $14c0b72509d70225$export$16a4697467175487(target) {\n if ((0, $7R18e$isIOS)()) {\n if ($14c0b72509d70225$var$state === 'default') {\n const documentObject = (0, $7R18e$getOwnerDocument)(target);\n $14c0b72509d70225$var$savedUserSelect = documentObject.documentElement.style.webkitUserSelect;\n documentObject.documentElement.style.webkitUserSelect = 'none';\n }\n $14c0b72509d70225$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 $14c0b72509d70225$var$modifiedElementMap.set(target, target.style[property]);\n target.style[property] = 'none';\n }\n}\nfunction $14c0b72509d70225$export$b0d6fa1ab32e3295(target) {\n if ((0, $7R18e$isIOS)()) {\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 ($14c0b72509d70225$var$state !== 'disabled') return;\n $14c0b72509d70225$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, $7R18e$runAfterTransition)(()=>{\n // Avoid race conditions\n if ($14c0b72509d70225$var$state === 'restoring') {\n const documentObject = (0, $7R18e$getOwnerDocument)(target);\n if (documentObject.documentElement.style.webkitUserSelect === 'none') documentObject.documentElement.style.webkitUserSelect = $14c0b72509d70225$var$savedUserSelect || '';\n $14c0b72509d70225$var$savedUserSelect = '';\n $14c0b72509d70225$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 && $14c0b72509d70225$var$modifiedElementMap.has(target)) {\n let targetOldUserSelect = $14c0b72509d70225$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 $14c0b72509d70225$var$modifiedElementMap.delete(target);\n }\n }\n}\n\n\nexport {$14c0b72509d70225$export$16a4697467175487 as disableTextSelection, $14c0b72509d70225$export$b0d6fa1ab32e3295 as restoreTextSelection};\n//# sourceMappingURL=textSelection.module.js.map\n"],"names":["$14c0b72509d70225$var$state","$14c0b72509d70225$var$savedUserSelect","$14c0b72509d70225$var$modifiedElementMap","$14c0b72509d70225$export$16a4697467175487","target","$7R18e$isIOS","documentObject","$7R18e$getOwnerDocument","property","$14c0b72509d70225$export$b0d6fa1ab32e3295","$7R18e$runAfterTransition","targetOldUserSelect"],"mappings":";AAeA,IAAIA,IAA8B,WAC9BC,IAAwC,IACxCC,IAA2C,oBAAI,QAAO;AAC1D,SAASC,EAA0CC,GAAQ;AACvD,MAAQC,EAAY,GAAK;AACrB,QAAIL,MAAgC,WAAW;AAC3C,YAAMM,IAAqBC,EAAyBH,CAAM;AAC1D,MAAAH,IAAwCK,EAAe,gBAAgB,MAAM,kBAC7EA,EAAe,gBAAgB,MAAM,mBAAmB;AAAA,IAC5D;AACA,IAAAN,IAA8B;AAAA,EAClC,WAAWI,aAAkB,eAAeA,aAAkB,YAAY;AAGtE,QAAII,IAAW,gBAAgBJ,EAAO,QAAQ,eAAe;AAC7D,IAAAF,EAAyC,IAAIE,GAAQA,EAAO,MAAMI,CAAQ,CAAC,GAC3EJ,EAAO,MAAMI,CAAQ,IAAI;AAAA,EAC7B;AACJ;AACA,SAASC,EAA0CL,GAAQ;AACvD,MAAQC,EAAY,GAAK;AAGrB,QAAIL,MAAgC,WAAY;AAChD,IAAAA,IAA8B,aAG9B,WAAW,MAAI;AAGX,MAAIU,EAA2B,MAAI;AAE/B,YAAIV,MAAgC,aAAa;AAC7C,gBAAMM,IAAqBC,EAAyBH,CAAM;AAC1D,UAAIE,EAAe,gBAAgB,MAAM,qBAAqB,WAAQA,EAAe,gBAAgB,MAAM,mBAAmBL,KAAyC,KACvKA,IAAwC,IACxCD,IAA8B;AAAA,QAClC;AAAA,MACJ,CAAC;AAAA,IACL,GAAG,GAAG;AAAA,EACV,YAAWI,aAAkB,eAAeA,aAAkB,eAGtDA,KAAUF,EAAyC,IAAIE,CAAM,GAAG;AAChE,QAAIO,IAAsBT,EAAyC,IAAIE,CAAM,GACzEI,IAAW,gBAAgBJ,EAAO,QAAQ,eAAe;AAC7D,IAAIA,EAAO,MAAMI,CAAQ,MAAM,WAAQJ,EAAO,MAAMI,CAAQ,IAAIG,IAC5DP,EAAO,aAAa,OAAO,MAAM,MAAIA,EAAO,gBAAgB,OAAO,GACvEF,EAAyC,OAAOE,CAAM;AAAA,EAC1D;AAER;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"useFocus.cjs.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useFocus.mjs"],"sourcesContent":["import {useSyntheticBlurEvent as $8a9cb279dc87e130$export$715c682d09d639cc} from \"./utils.mjs\";\nimport {useCallback as $hf0lj$useCallback} from \"react\";\nimport {getOwnerDocument as $hf0lj$getOwnerDocument, getActiveElement as $hf0lj$getActiveElement, getEventTarget as $hf0lj$getEventTarget} from \"@react-aria/utils\";\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\nfunction $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {\n let { isDisabled: isDisabled, onFocus: onFocusProp, onBlur: onBlurProp, onFocusChange: onFocusChange } = props;\n const onBlur = (0, $hf0lj$useCallback)((e)=>{\n if (e.target === e.currentTarget) {\n if (onBlurProp) onBlurProp(e);\n if (onFocusChange) onFocusChange(false);\n return true;\n }\n }, [\n onBlurProp,\n onFocusChange\n ]);\n const onSyntheticFocus = (0, $8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);\n const onFocus = (0, $hf0lj$useCallback)((e)=>{\n // Double check that document.activeElement actually matches e.target in case a previously chained\n // focus handler already moved focus somewhere else.\n const ownerDocument = (0, $hf0lj$getOwnerDocument)(e.target);\n const activeElement = ownerDocument ? (0, $hf0lj$getActiveElement)(ownerDocument) : (0, $hf0lj$getActiveElement)();\n if (e.target === e.currentTarget && activeElement === (0, $hf0lj$getEventTarget)(e.nativeEvent)) {\n if (onFocusProp) onFocusProp(e);\n if (onFocusChange) onFocusChange(true);\n onSyntheticFocus(e);\n }\n }, [\n onFocusChange,\n onFocusProp,\n onSyntheticFocus\n ]);\n return {\n focusProps: {\n onFocus: !isDisabled && (onFocusProp || onFocusChange || onBlurProp) ? onFocus : undefined,\n onBlur: !isDisabled && (onBlurProp || onFocusChange) ? onBlur : undefined\n }\n };\n}\n\n\nexport {$a1ea59d68270f0dd$export$f8168d8dd8fd66e6 as useFocus};\n//# sourceMappingURL=useFocus.module.js.map\n"],"names":["$a1ea59d68270f0dd$export$f8168d8dd8fd66e6","props","isDisabled","onFocusProp","onBlurProp","onFocusChange","onBlur","$hf0lj$useCallback","onSyntheticFocus","$8a9cb279dc87e130$export$715c682d09d639cc","onFocus","ownerDocument","$hf0lj$getOwnerDocument","activeElement","$hf0lj$getActiveElement","$hf0lj$getEventTarget"],"mappings":"oKAqBA,SAASA,EAA0CC,EAAO,CACtD,GAAI,CAAE,WAAYC,EAAY,QAASC,EAAa,OAAQC,EAAY,cAAeC,CAAe,EAAGJ,EACzG,MAAMK,EAAaC,cAAqB,GAAI,CACxC,GAAI,EAAE,SAAW,EAAE,cACf,OAAIH,GAAYA,EAAW,CAAC,EACxBC,GAAeA,EAAc,EAAK,EAC/B,EAEnB,EAAO,CACCD,EACAC,CACR,CAAK,EACKG,EAAuBC,wBAA2CH,CAAM,EACxEI,EAAcH,cAAqB,GAAI,CAGzC,MAAMI,EAAoBC,EAAAA,iBAAyB,EAAE,MAAM,EACrDC,EAAgBF,EAAoBG,EAAAA,iBAAyBH,CAAa,EAAQG,EAAAA,mBACpF,EAAE,SAAW,EAAE,eAAiBD,IAAsBE,EAAqB,eAAE,EAAE,WAAW,IACtFZ,GAAaA,EAAY,CAAC,EAC1BE,GAAeA,EAAc,EAAI,EACrCG,EAAiB,CAAC,EAE9B,EAAO,CACCH,EACAF,EACAK,CACR,CAAK,EACD,MAAO,CACH,WAAY,CACR,QAAS,CAACN,IAAeC,GAAeE,GAAiBD,GAAcM,EAAU,OACjF,OAAQ,CAACR,IAAeE,GAAcC,GAAiBC,EAAS,MACnE,CACT,CACA","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useFocus.cjs.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useFocus.mjs"],"sourcesContent":["import {useSyntheticBlurEvent as $8a9cb279dc87e130$export$715c682d09d639cc} from \"./utils.mjs\";\nimport {useCallback as $hf0lj$useCallback} from \"react\";\nimport {getOwnerDocument as $hf0lj$getOwnerDocument, getActiveElement as $hf0lj$getActiveElement, getEventTarget as $hf0lj$getEventTarget} from \"@react-aria/utils\";\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\nfunction $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {\n let { isDisabled: isDisabled, onFocus: onFocusProp, onBlur: onBlurProp, onFocusChange: onFocusChange } = props;\n const onBlur = (0, $hf0lj$useCallback)((e)=>{\n if (e.target === e.currentTarget) {\n if (onBlurProp) onBlurProp(e);\n if (onFocusChange) onFocusChange(false);\n return true;\n }\n }, [\n onBlurProp,\n onFocusChange\n ]);\n const onSyntheticFocus = (0, $8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);\n const onFocus = (0, $hf0lj$useCallback)((e)=>{\n // Double check that document.activeElement actually matches e.target in case a previously chained\n // focus handler already moved focus somewhere else.\n const ownerDocument = (0, $hf0lj$getOwnerDocument)(e.target);\n const activeElement = ownerDocument ? (0, $hf0lj$getActiveElement)(ownerDocument) : (0, $hf0lj$getActiveElement)();\n if (e.target === e.currentTarget && activeElement === (0, $hf0lj$getEventTarget)(e.nativeEvent)) {\n if (onFocusProp) onFocusProp(e);\n if (onFocusChange) onFocusChange(true);\n onSyntheticFocus(e);\n }\n }, [\n onFocusChange,\n onFocusProp,\n onSyntheticFocus\n ]);\n return {\n focusProps: {\n onFocus: !isDisabled && (onFocusProp || onFocusChange || onBlurProp) ? onFocus : undefined,\n onBlur: !isDisabled && (onBlurProp || onFocusChange) ? onBlur : undefined\n }\n };\n}\n\n\nexport {$a1ea59d68270f0dd$export$f8168d8dd8fd66e6 as useFocus};\n//# sourceMappingURL=useFocus.module.js.map\n"],"names":["$a1ea59d68270f0dd$export$f8168d8dd8fd66e6","props","isDisabled","onFocusProp","onBlurProp","onFocusChange","onBlur","$hf0lj$useCallback","onSyntheticFocus","$8a9cb279dc87e130$export$715c682d09d639cc","onFocus","ownerDocument","$hf0lj$getOwnerDocument","activeElement","$hf0lj$getActiveElement","$hf0lj$getEventTarget"],"mappings":"oKAqBA,SAASA,EAA0CC,EAAO,CACtD,GAAI,CAAE,WAAYC,EAAY,QAASC,EAAa,OAAQC,EAAY,cAAeC,CAAa,EAAKJ,EACzG,MAAMK,EAAaC,cAAqB,GAAI,CACxC,GAAI,EAAE,SAAW,EAAE,cACf,OAAIH,GAAYA,EAAW,CAAC,EACxBC,GAAeA,EAAc,EAAK,EAC/B,EAEf,EAAG,CACCD,EACAC,CACR,CAAK,EACKG,EAAuBC,EAAAA,sBAA2CH,CAAM,EACxEI,EAAcH,cAAqB,GAAI,CAGzC,MAAMI,EAAoBC,mBAAyB,EAAE,MAAM,EACrDC,EAAgBF,EAAoBG,EAAAA,iBAAyBH,CAAa,EAAQG,mBAAuB,EAC3G,EAAE,SAAW,EAAE,eAAiBD,IAAsBE,EAAAA,eAAuB,EAAE,WAAW,IACtFZ,GAAaA,EAAY,CAAC,EAC1BE,GAAeA,EAAc,EAAI,EACrCG,EAAiB,CAAC,EAE1B,EAAG,CACCH,EACAF,EACAK,CACR,CAAK,EACD,MAAO,CACH,WAAY,CACR,QAAS,CAACN,IAAeC,GAAeE,GAAiBD,GAAcM,EAAU,OACjF,OAAQ,CAACR,IAAeE,GAAcC,GAAiBC,EAAS,MAC5E,CACA,CACA","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"useFocus.es.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useFocus.mjs"],"sourcesContent":["import {useSyntheticBlurEvent as $8a9cb279dc87e130$export$715c682d09d639cc} from \"./utils.mjs\";\nimport {useCallback as $hf0lj$useCallback} from \"react\";\nimport {getOwnerDocument as $hf0lj$getOwnerDocument, getActiveElement as $hf0lj$getActiveElement, getEventTarget as $hf0lj$getEventTarget} from \"@react-aria/utils\";\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\nfunction $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {\n let { isDisabled: isDisabled, onFocus: onFocusProp, onBlur: onBlurProp, onFocusChange: onFocusChange } = props;\n const onBlur = (0, $hf0lj$useCallback)((e)=>{\n if (e.target === e.currentTarget) {\n if (onBlurProp) onBlurProp(e);\n if (onFocusChange) onFocusChange(false);\n return true;\n }\n }, [\n onBlurProp,\n onFocusChange\n ]);\n const onSyntheticFocus = (0, $8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);\n const onFocus = (0, $hf0lj$useCallback)((e)=>{\n // Double check that document.activeElement actually matches e.target in case a previously chained\n // focus handler already moved focus somewhere else.\n const ownerDocument = (0, $hf0lj$getOwnerDocument)(e.target);\n const activeElement = ownerDocument ? (0, $hf0lj$getActiveElement)(ownerDocument) : (0, $hf0lj$getActiveElement)();\n if (e.target === e.currentTarget && activeElement === (0, $hf0lj$getEventTarget)(e.nativeEvent)) {\n if (onFocusProp) onFocusProp(e);\n if (onFocusChange) onFocusChange(true);\n onSyntheticFocus(e);\n }\n }, [\n onFocusChange,\n onFocusProp,\n onSyntheticFocus\n ]);\n return {\n focusProps: {\n onFocus: !isDisabled && (onFocusProp || onFocusChange || onBlurProp) ? onFocus : undefined,\n onBlur: !isDisabled && (onBlurProp || onFocusChange) ? onBlur : undefined\n }\n };\n}\n\n\nexport {$a1ea59d68270f0dd$export$f8168d8dd8fd66e6 as useFocus};\n//# sourceMappingURL=useFocus.module.js.map\n"],"names":["$a1ea59d68270f0dd$export$f8168d8dd8fd66e6","props","isDisabled","onFocusProp","onBlurProp","onFocusChange","onBlur","$hf0lj$useCallback","e","onSyntheticFocus","$8a9cb279dc87e130$export$715c682d09d639cc","onFocus","ownerDocument","$hf0lj$getOwnerDocument","activeElement","$hf0lj$getActiveElement","$hf0lj$getEventTarget"],"mappings":";;;AAqBA,SAASA,EAA0CC,GAAO;AACtD,MAAI,EAAE,YAAYC,GAAY,SAASC,GAAa,QAAQC,GAAY,eAAeC,EAAe,IAAGJ;AACzG,QAAMK,IAAaC,EAAoB,CAACC,MAAI;AACxC,QAAIA,EAAE,WAAWA,EAAE;AACf,aAAIJ,KAAYA,EAAWI,CAAC,GACxBH,KAAeA,EAAc,EAAK,GAC/B;AAAA,EAEnB,GAAO;AAAA,IACCD;AAAA,IACAC;AAAA,EACR,CAAK,GACKI,IAAuBC,EAA2CJ,CAAM,GACxEK,IAAcJ,EAAoB,CAACC,MAAI;AAGzC,UAAMI,IAAoBC,EAAyBL,EAAE,MAAM,GACrDM,IAAgBF,IAAoBG,EAAyBH,CAAa,IAAQG;AACxF,IAAIP,EAAE,WAAWA,EAAE,iBAAiBM,MAAsBE,EAAuBR,EAAE,WAAW,MACtFL,KAAaA,EAAYK,CAAC,GAC1BH,KAAeA,EAAc,EAAI,GACrCI,EAAiBD,CAAC;AAAA,EAE9B,GAAO;AAAA,IACCH;AAAA,IACAF;AAAA,IACAM;AAAA,EACR,CAAK;AACD,SAAO;AAAA,IACH,YAAY;AAAA,MACR,SAAS,CAACP,MAAeC,KAAeE,KAAiBD,KAAcO,IAAU;AAAA,MACjF,QAAQ,CAACT,MAAeE,KAAcC,KAAiBC,IAAS;AAAA,IACnE;AAAA,EACT;AACA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useFocus.es.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useFocus.mjs"],"sourcesContent":["import {useSyntheticBlurEvent as $8a9cb279dc87e130$export$715c682d09d639cc} from \"./utils.mjs\";\nimport {useCallback as $hf0lj$useCallback} from \"react\";\nimport {getOwnerDocument as $hf0lj$getOwnerDocument, getActiveElement as $hf0lj$getActiveElement, getEventTarget as $hf0lj$getEventTarget} from \"@react-aria/utils\";\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\nfunction $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {\n let { isDisabled: isDisabled, onFocus: onFocusProp, onBlur: onBlurProp, onFocusChange: onFocusChange } = props;\n const onBlur = (0, $hf0lj$useCallback)((e)=>{\n if (e.target === e.currentTarget) {\n if (onBlurProp) onBlurProp(e);\n if (onFocusChange) onFocusChange(false);\n return true;\n }\n }, [\n onBlurProp,\n onFocusChange\n ]);\n const onSyntheticFocus = (0, $8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);\n const onFocus = (0, $hf0lj$useCallback)((e)=>{\n // Double check that document.activeElement actually matches e.target in case a previously chained\n // focus handler already moved focus somewhere else.\n const ownerDocument = (0, $hf0lj$getOwnerDocument)(e.target);\n const activeElement = ownerDocument ? (0, $hf0lj$getActiveElement)(ownerDocument) : (0, $hf0lj$getActiveElement)();\n if (e.target === e.currentTarget && activeElement === (0, $hf0lj$getEventTarget)(e.nativeEvent)) {\n if (onFocusProp) onFocusProp(e);\n if (onFocusChange) onFocusChange(true);\n onSyntheticFocus(e);\n }\n }, [\n onFocusChange,\n onFocusProp,\n onSyntheticFocus\n ]);\n return {\n focusProps: {\n onFocus: !isDisabled && (onFocusProp || onFocusChange || onBlurProp) ? onFocus : undefined,\n onBlur: !isDisabled && (onBlurProp || onFocusChange) ? onBlur : undefined\n }\n };\n}\n\n\nexport {$a1ea59d68270f0dd$export$f8168d8dd8fd66e6 as useFocus};\n//# sourceMappingURL=useFocus.module.js.map\n"],"names":["$a1ea59d68270f0dd$export$f8168d8dd8fd66e6","props","isDisabled","onFocusProp","onBlurProp","onFocusChange","onBlur","$hf0lj$useCallback","e","onSyntheticFocus","$8a9cb279dc87e130$export$715c682d09d639cc","onFocus","ownerDocument","$hf0lj$getOwnerDocument","activeElement","$hf0lj$getActiveElement","$hf0lj$getEventTarget"],"mappings":";;;AAqBA,SAASA,EAA0CC,GAAO;AACtD,MAAI,EAAE,YAAYC,GAAY,SAASC,GAAa,QAAQC,GAAY,eAAeC,EAAa,IAAKJ;AACzG,QAAMK,IAAaC,EAAoB,CAACC,MAAI;AACxC,QAAIA,EAAE,WAAWA,EAAE;AACf,aAAIJ,KAAYA,EAAWI,CAAC,GACxBH,KAAeA,EAAc,EAAK,GAC/B;AAAA,EAEf,GAAG;AAAA,IACCD;AAAA,IACAC;AAAA,EACR,CAAK,GACKI,IAAuBC,EAA2CJ,CAAM,GACxEK,IAAcJ,EAAoB,CAACC,MAAI;AAGzC,UAAMI,IAAoBC,EAAyBL,EAAE,MAAM,GACrDM,IAAgBF,IAAoBG,EAAyBH,CAAa,IAAQG,EAAuB;AAC/G,IAAIP,EAAE,WAAWA,EAAE,iBAAiBM,MAAsBE,EAAuBR,EAAE,WAAW,MACtFL,KAAaA,EAAYK,CAAC,GAC1BH,KAAeA,EAAc,EAAI,GACrCI,EAAiBD,CAAC;AAAA,EAE1B,GAAG;AAAA,IACCH;AAAA,IACAF;AAAA,IACAM;AAAA,EACR,CAAK;AACD,SAAO;AAAA,IACH,YAAY;AAAA,MACR,SAAS,CAACP,MAAeC,KAAeE,KAAiBD,KAAcO,IAAU;AAAA,MACjF,QAAQ,CAACT,MAAeE,KAAcC,KAAiBC,IAAS;AAAA,IAC5E;AAAA,EACA;AACA;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusVisible.cjs.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useFocusVisible.mjs"],"sourcesContent":["import {ignoreFocusEvent as $8a9cb279dc87e130$export$fda7da73ab5d4c48} from \"./utils.mjs\";\nimport {isMac as $28AnR$isMac, isVirtualClick as $28AnR$isVirtualClick, getOwnerWindow as $28AnR$getOwnerWindow, getOwnerDocument as $28AnR$getOwnerDocument} from \"@react-aria/utils\";\nimport {useState as $28AnR$useState, useEffect as $28AnR$useEffect} from \"react\";\nimport {useIsSSR as $28AnR$useIsSSR} from \"@react-aria/ssr\";\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\nlet $507fabe10e71c6fb$var$currentModality = null;\nlet $507fabe10e71c6fb$var$changeHandlers = new Set();\nlet $507fabe10e71c6fb$export$d90243b58daecda7 = new Map(); // We use a map here to support setting event listeners across multiple document objects.\nlet $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\nlet $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;\n// Only Tab or Esc keys will make focus visible on text input elements\nconst $507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS = {\n Tab: true,\n Escape: true\n};\nfunction $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {\n for (let handler of $507fabe10e71c6fb$var$changeHandlers)handler(modality, e);\n}\n/**\n * Helper function to determine if a KeyboardEvent is unmodified and could make keyboard focus styles visible.\n */ function $507fabe10e71c6fb$var$isValidKey(e) {\n // Control and Shift keys trigger when navigating back to the tab with keyboard.\n return !(e.metaKey || !(0, $28AnR$isMac)() && e.altKey || e.ctrlKey || e.key === 'Control' || e.key === 'Shift' || e.key === 'Meta');\n}\nfunction $507fabe10e71c6fb$var$handleKeyboardEvent(e) {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n if ($507fabe10e71c6fb$var$isValidKey(e)) {\n $507fabe10e71c6fb$var$currentModality = 'keyboard';\n $507fabe10e71c6fb$var$triggerChangeHandlers('keyboard', e);\n }\n}\nfunction $507fabe10e71c6fb$var$handlePointerEvent(e) {\n $507fabe10e71c6fb$var$currentModality = 'pointer';\n if (e.type === 'mousedown' || e.type === 'pointerdown') {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n $507fabe10e71c6fb$var$triggerChangeHandlers('pointer', e);\n }\n}\nfunction $507fabe10e71c6fb$var$handleClickEvent(e) {\n if ((0, $28AnR$isVirtualClick)(e)) {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n $507fabe10e71c6fb$var$currentModality = 'virtual';\n }\n}\nfunction $507fabe10e71c6fb$var$handleFocusEvent(e) {\n // Firefox fires two extra focus events when the user first clicks into an iframe:\n // first on the window, then on the document. We ignore these events so they don't\n // cause keyboard focus rings to appear.\n if (e.target === window || e.target === document || (0, $8a9cb279dc87e130$export$fda7da73ab5d4c48) || !e.isTrusted) return;\n // If a focus event occurs without a preceding keyboard or pointer event, switch to virtual modality.\n // This occurs, for example, when navigating a form with the next/previous buttons on iOS.\n if (!$507fabe10e71c6fb$var$hasEventBeforeFocus && !$507fabe10e71c6fb$var$hasBlurredWindowRecently) {\n $507fabe10e71c6fb$var$currentModality = 'virtual';\n $507fabe10e71c6fb$var$triggerChangeHandlers('virtual', e);\n }\n $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\n $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;\n}\nfunction $507fabe10e71c6fb$var$handleWindowBlur() {\n if (0, $8a9cb279dc87e130$export$fda7da73ab5d4c48) return;\n // When the window is blurred, reset state. This is necessary when tabbing out of the window,\n // for example, since a subsequent focus event won't be fired.\n $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\n $507fabe10e71c6fb$var$hasBlurredWindowRecently = true;\n}\n/**\n * Setup global event listeners to control when keyboard focus style should be visible.\n */ function $507fabe10e71c6fb$var$setupGlobalFocusEvents(element) {\n if (typeof window === 'undefined' || typeof document === 'undefined' || $507fabe10e71c6fb$export$d90243b58daecda7.get((0, $28AnR$getOwnerWindow)(element))) return;\n const windowObject = (0, $28AnR$getOwnerWindow)(element);\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n // Programmatic focus() calls shouldn't affect the current input modality.\n // However, we need to detect other cases when a focus event occurs without\n // a preceding user event (e.g. screen reader focus). Overriding the focus\n // method on HTMLElement.prototype is a bit hacky, but works.\n let focus = windowObject.HTMLElement.prototype.focus;\n windowObject.HTMLElement.prototype.focus = function() {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n focus.apply(this, arguments);\n };\n documentObject.addEventListener('keydown', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.addEventListener('keyup', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.addEventListener('click', $507fabe10e71c6fb$var$handleClickEvent, true);\n // Register focus events on the window so they are sure to happen\n // before React's event listeners (registered on the document).\n windowObject.addEventListener('focus', $507fabe10e71c6fb$var$handleFocusEvent, true);\n windowObject.addEventListener('blur', $507fabe10e71c6fb$var$handleWindowBlur, false);\n if (typeof PointerEvent !== 'undefined') {\n documentObject.addEventListener('pointerdown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('pointermove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('pointerup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n } else if (process.env.NODE_ENV === 'test') {\n documentObject.addEventListener('mousedown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('mousemove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('mouseup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n }\n // Add unmount handler\n windowObject.addEventListener('beforeunload', ()=>{\n $507fabe10e71c6fb$var$tearDownWindowFocusTracking(element);\n }, {\n once: true\n });\n $507fabe10e71c6fb$export$d90243b58daecda7.set(windowObject, {\n focus: focus\n });\n}\nconst $507fabe10e71c6fb$var$tearDownWindowFocusTracking = (element, loadListener)=>{\n const windowObject = (0, $28AnR$getOwnerWindow)(element);\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n if (loadListener) documentObject.removeEventListener('DOMContentLoaded', loadListener);\n if (!$507fabe10e71c6fb$export$d90243b58daecda7.has(windowObject)) return;\n windowObject.HTMLElement.prototype.focus = $507fabe10e71c6fb$export$d90243b58daecda7.get(windowObject).focus;\n documentObject.removeEventListener('keydown', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.removeEventListener('keyup', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.removeEventListener('click', $507fabe10e71c6fb$var$handleClickEvent, true);\n windowObject.removeEventListener('focus', $507fabe10e71c6fb$var$handleFocusEvent, true);\n windowObject.removeEventListener('blur', $507fabe10e71c6fb$var$handleWindowBlur, false);\n if (typeof PointerEvent !== 'undefined') {\n documentObject.removeEventListener('pointerdown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('pointermove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('pointerup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n } else if (process.env.NODE_ENV === 'test') {\n documentObject.removeEventListener('mousedown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('mousemove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('mouseup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n }\n $507fabe10e71c6fb$export$d90243b58daecda7.delete(windowObject);\n};\nfunction $507fabe10e71c6fb$export$2f1888112f558a7d(element) {\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n let loadListener;\n if (documentObject.readyState !== 'loading') $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);\n else {\n loadListener = ()=>{\n $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);\n };\n documentObject.addEventListener('DOMContentLoaded', loadListener);\n }\n return ()=>$507fabe10e71c6fb$var$tearDownWindowFocusTracking(element, loadListener);\n}\n// Server-side rendering does not have the document object defined\n// eslint-disable-next-line no-restricted-globals\nif (typeof document !== 'undefined') $507fabe10e71c6fb$export$2f1888112f558a7d();\nfunction $507fabe10e71c6fb$export$b9b3dfddab17db27() {\n return $507fabe10e71c6fb$var$currentModality !== 'pointer';\n}\nfunction $507fabe10e71c6fb$export$630ff653c5ada6a9() {\n return $507fabe10e71c6fb$var$currentModality;\n}\nfunction $507fabe10e71c6fb$export$8397ddfc504fdb9a(modality) {\n $507fabe10e71c6fb$var$currentModality = modality;\n $507fabe10e71c6fb$var$triggerChangeHandlers(modality, null);\n}\nfunction $507fabe10e71c6fb$export$98e20ec92f614cfe() {\n $507fabe10e71c6fb$var$setupGlobalFocusEvents();\n let [modality, setModality] = (0, $28AnR$useState)($507fabe10e71c6fb$var$currentModality);\n (0, $28AnR$useEffect)(()=>{\n let handler = ()=>{\n setModality($507fabe10e71c6fb$var$currentModality);\n };\n $507fabe10e71c6fb$var$changeHandlers.add(handler);\n return ()=>{\n $507fabe10e71c6fb$var$changeHandlers.delete(handler);\n };\n }, []);\n return (0, $28AnR$useIsSSR)() ? null : modality;\n}\nconst $507fabe10e71c6fb$var$nonTextInputTypes = new Set([\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset'\n]);\n/**\n * If this is attached to text input component, return if the event is a focus event (Tab/Escape keys pressed) so that\n * focus visible style can be properly set.\n */ function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {\n let document1 = (0, $28AnR$getOwnerDocument)(e === null || e === void 0 ? void 0 : e.target);\n const IHTMLInputElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLInputElement : HTMLInputElement;\n const IHTMLTextAreaElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLTextAreaElement : HTMLTextAreaElement;\n const IHTMLElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLElement : HTMLElement;\n const IKeyboardEvent = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).KeyboardEvent : KeyboardEvent;\n // For keyboard events that occur on a non-input element that will move focus into input element (aka ArrowLeft going from Datepicker button to the main input group)\n // we need to rely on the user passing isTextInput into here. This way we can skip toggling focus visiblity for said input element\n isTextInput = isTextInput || document1.activeElement instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(document1.activeElement.type) || document1.activeElement instanceof IHTMLTextAreaElement || document1.activeElement instanceof IHTMLElement && document1.activeElement.isContentEditable;\n return !(isTextInput && modality === 'keyboard' && e instanceof IKeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);\n}\nfunction $507fabe10e71c6fb$export$ffd9e5021c1fb2d6(props = {}) {\n let { isTextInput: isTextInput, autoFocus: autoFocus } = props;\n let [isFocusVisibleState, setFocusVisible] = (0, $28AnR$useState)(autoFocus || $507fabe10e71c6fb$export$b9b3dfddab17db27());\n $507fabe10e71c6fb$export$ec71b4b83ac08ec3((isFocusVisible)=>{\n setFocusVisible(isFocusVisible);\n }, [\n isTextInput\n ], {\n isTextInput: isTextInput\n });\n return {\n isFocusVisible: isFocusVisibleState\n };\n}\nfunction $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {\n $507fabe10e71c6fb$var$setupGlobalFocusEvents();\n (0, $28AnR$useEffect)(()=>{\n let handler = (modality, e)=>{\n // We want to early return for any keyboard events that occur inside text inputs EXCEPT for Tab and Escape\n if (!$507fabe10e71c6fb$var$isKeyboardFocusEvent(!!(opts === null || opts === void 0 ? void 0 : opts.isTextInput), modality, e)) return;\n fn($507fabe10e71c6fb$export$b9b3dfddab17db27());\n };\n $507fabe10e71c6fb$var$changeHandlers.add(handler);\n return ()=>{\n $507fabe10e71c6fb$var$changeHandlers.delete(handler);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n}\n\n\nexport {$507fabe10e71c6fb$export$d90243b58daecda7 as hasSetupGlobalListeners, $507fabe10e71c6fb$export$2f1888112f558a7d as addWindowFocusTracking, $507fabe10e71c6fb$export$b9b3dfddab17db27 as isFocusVisible, $507fabe10e71c6fb$export$630ff653c5ada6a9 as getInteractionModality, $507fabe10e71c6fb$export$8397ddfc504fdb9a as setInteractionModality, $507fabe10e71c6fb$export$98e20ec92f614cfe as useInteractionModality, $507fabe10e71c6fb$export$ffd9e5021c1fb2d6 as useFocusVisible, $507fabe10e71c6fb$export$ec71b4b83ac08ec3 as useFocusVisibleListener};\n//# sourceMappingURL=useFocusVisible.module.js.map\n"],"names":["$507fabe10e71c6fb$var$currentModality","$507fabe10e71c6fb$var$changeHandlers","$507fabe10e71c6fb$export$d90243b58daecda7","$507fabe10e71c6fb$var$hasEventBeforeFocus","$507fabe10e71c6fb$var$hasBlurredWindowRecently","$507fabe10e71c6fb$var$triggerChangeHandlers","modality","e","handler","$507fabe10e71c6fb$var$isValidKey","$28AnR$isMac","$507fabe10e71c6fb$var$handleKeyboardEvent","$507fabe10e71c6fb$var$handlePointerEvent","$507fabe10e71c6fb$var$handleClickEvent","$28AnR$isVirtualClick","$507fabe10e71c6fb$var$handleFocusEvent","$8a9cb279dc87e130$export$fda7da73ab5d4c48","$507fabe10e71c6fb$var$handleWindowBlur","$507fabe10e71c6fb$var$setupGlobalFocusEvents","element","$28AnR$getOwnerWindow","windowObject","documentObject","$28AnR$getOwnerDocument","focus","$507fabe10e71c6fb$var$tearDownWindowFocusTracking","loadListener","$507fabe10e71c6fb$export$2f1888112f558a7d","$507fabe10e71c6fb$export$630ff653c5ada6a9","$507fabe10e71c6fb$export$8397ddfc504fdb9a"],"mappings":"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","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useFocusVisible.cjs.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useFocusVisible.mjs"],"sourcesContent":["import {ignoreFocusEvent as $8a9cb279dc87e130$export$fda7da73ab5d4c48} from \"./utils.mjs\";\nimport {isMac as $28AnR$isMac, isVirtualClick as $28AnR$isVirtualClick, getOwnerWindow as $28AnR$getOwnerWindow, getOwnerDocument as $28AnR$getOwnerDocument} from \"@react-aria/utils\";\nimport {useState as $28AnR$useState, useEffect as $28AnR$useEffect} from \"react\";\nimport {useIsSSR as $28AnR$useIsSSR} from \"@react-aria/ssr\";\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\nlet $507fabe10e71c6fb$var$currentModality = null;\nlet $507fabe10e71c6fb$var$changeHandlers = new Set();\nlet $507fabe10e71c6fb$export$d90243b58daecda7 = new Map(); // We use a map here to support setting event listeners across multiple document objects.\nlet $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\nlet $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;\n// Only Tab or Esc keys will make focus visible on text input elements\nconst $507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS = {\n Tab: true,\n Escape: true\n};\nfunction $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {\n for (let handler of $507fabe10e71c6fb$var$changeHandlers)handler(modality, e);\n}\n/**\n * Helper function to determine if a KeyboardEvent is unmodified and could make keyboard focus styles visible.\n */ function $507fabe10e71c6fb$var$isValidKey(e) {\n // Control and Shift keys trigger when navigating back to the tab with keyboard.\n return !(e.metaKey || !(0, $28AnR$isMac)() && e.altKey || e.ctrlKey || e.key === 'Control' || e.key === 'Shift' || e.key === 'Meta');\n}\nfunction $507fabe10e71c6fb$var$handleKeyboardEvent(e) {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n if ($507fabe10e71c6fb$var$isValidKey(e)) {\n $507fabe10e71c6fb$var$currentModality = 'keyboard';\n $507fabe10e71c6fb$var$triggerChangeHandlers('keyboard', e);\n }\n}\nfunction $507fabe10e71c6fb$var$handlePointerEvent(e) {\n $507fabe10e71c6fb$var$currentModality = 'pointer';\n if (e.type === 'mousedown' || e.type === 'pointerdown') {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n $507fabe10e71c6fb$var$triggerChangeHandlers('pointer', e);\n }\n}\nfunction $507fabe10e71c6fb$var$handleClickEvent(e) {\n if ((0, $28AnR$isVirtualClick)(e)) {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n $507fabe10e71c6fb$var$currentModality = 'virtual';\n }\n}\nfunction $507fabe10e71c6fb$var$handleFocusEvent(e) {\n // Firefox fires two extra focus events when the user first clicks into an iframe:\n // first on the window, then on the document. We ignore these events so they don't\n // cause keyboard focus rings to appear.\n if (e.target === window || e.target === document || (0, $8a9cb279dc87e130$export$fda7da73ab5d4c48) || !e.isTrusted) return;\n // If a focus event occurs without a preceding keyboard or pointer event, switch to virtual modality.\n // This occurs, for example, when navigating a form with the next/previous buttons on iOS.\n if (!$507fabe10e71c6fb$var$hasEventBeforeFocus && !$507fabe10e71c6fb$var$hasBlurredWindowRecently) {\n $507fabe10e71c6fb$var$currentModality = 'virtual';\n $507fabe10e71c6fb$var$triggerChangeHandlers('virtual', e);\n }\n $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\n $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;\n}\nfunction $507fabe10e71c6fb$var$handleWindowBlur() {\n if (0, $8a9cb279dc87e130$export$fda7da73ab5d4c48) return;\n // When the window is blurred, reset state. This is necessary when tabbing out of the window,\n // for example, since a subsequent focus event won't be fired.\n $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\n $507fabe10e71c6fb$var$hasBlurredWindowRecently = true;\n}\n/**\n * Setup global event listeners to control when keyboard focus style should be visible.\n */ function $507fabe10e71c6fb$var$setupGlobalFocusEvents(element) {\n if (typeof window === 'undefined' || typeof document === 'undefined' || $507fabe10e71c6fb$export$d90243b58daecda7.get((0, $28AnR$getOwnerWindow)(element))) return;\n const windowObject = (0, $28AnR$getOwnerWindow)(element);\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n // Programmatic focus() calls shouldn't affect the current input modality.\n // However, we need to detect other cases when a focus event occurs without\n // a preceding user event (e.g. screen reader focus). Overriding the focus\n // method on HTMLElement.prototype is a bit hacky, but works.\n let focus = windowObject.HTMLElement.prototype.focus;\n windowObject.HTMLElement.prototype.focus = function() {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n focus.apply(this, arguments);\n };\n documentObject.addEventListener('keydown', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.addEventListener('keyup', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.addEventListener('click', $507fabe10e71c6fb$var$handleClickEvent, true);\n // Register focus events on the window so they are sure to happen\n // before React's event listeners (registered on the document).\n windowObject.addEventListener('focus', $507fabe10e71c6fb$var$handleFocusEvent, true);\n windowObject.addEventListener('blur', $507fabe10e71c6fb$var$handleWindowBlur, false);\n if (typeof PointerEvent !== 'undefined') {\n documentObject.addEventListener('pointerdown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('pointermove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('pointerup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n } else if (process.env.NODE_ENV === 'test') {\n documentObject.addEventListener('mousedown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('mousemove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('mouseup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n }\n // Add unmount handler\n windowObject.addEventListener('beforeunload', ()=>{\n $507fabe10e71c6fb$var$tearDownWindowFocusTracking(element);\n }, {\n once: true\n });\n $507fabe10e71c6fb$export$d90243b58daecda7.set(windowObject, {\n focus: focus\n });\n}\nconst $507fabe10e71c6fb$var$tearDownWindowFocusTracking = (element, loadListener)=>{\n const windowObject = (0, $28AnR$getOwnerWindow)(element);\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n if (loadListener) documentObject.removeEventListener('DOMContentLoaded', loadListener);\n if (!$507fabe10e71c6fb$export$d90243b58daecda7.has(windowObject)) return;\n windowObject.HTMLElement.prototype.focus = $507fabe10e71c6fb$export$d90243b58daecda7.get(windowObject).focus;\n documentObject.removeEventListener('keydown', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.removeEventListener('keyup', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.removeEventListener('click', $507fabe10e71c6fb$var$handleClickEvent, true);\n windowObject.removeEventListener('focus', $507fabe10e71c6fb$var$handleFocusEvent, true);\n windowObject.removeEventListener('blur', $507fabe10e71c6fb$var$handleWindowBlur, false);\n if (typeof PointerEvent !== 'undefined') {\n documentObject.removeEventListener('pointerdown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('pointermove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('pointerup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n } else if (process.env.NODE_ENV === 'test') {\n documentObject.removeEventListener('mousedown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('mousemove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('mouseup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n }\n $507fabe10e71c6fb$export$d90243b58daecda7.delete(windowObject);\n};\nfunction $507fabe10e71c6fb$export$2f1888112f558a7d(element) {\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n let loadListener;\n if (documentObject.readyState !== 'loading') $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);\n else {\n loadListener = ()=>{\n $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);\n };\n documentObject.addEventListener('DOMContentLoaded', loadListener);\n }\n return ()=>$507fabe10e71c6fb$var$tearDownWindowFocusTracking(element, loadListener);\n}\n// Server-side rendering does not have the document object defined\n// eslint-disable-next-line no-restricted-globals\nif (typeof document !== 'undefined') $507fabe10e71c6fb$export$2f1888112f558a7d();\nfunction $507fabe10e71c6fb$export$b9b3dfddab17db27() {\n return $507fabe10e71c6fb$var$currentModality !== 'pointer';\n}\nfunction $507fabe10e71c6fb$export$630ff653c5ada6a9() {\n return $507fabe10e71c6fb$var$currentModality;\n}\nfunction $507fabe10e71c6fb$export$8397ddfc504fdb9a(modality) {\n $507fabe10e71c6fb$var$currentModality = modality;\n $507fabe10e71c6fb$var$triggerChangeHandlers(modality, null);\n}\nfunction $507fabe10e71c6fb$export$98e20ec92f614cfe() {\n $507fabe10e71c6fb$var$setupGlobalFocusEvents();\n let [modality, setModality] = (0, $28AnR$useState)($507fabe10e71c6fb$var$currentModality);\n (0, $28AnR$useEffect)(()=>{\n let handler = ()=>{\n setModality($507fabe10e71c6fb$var$currentModality);\n };\n $507fabe10e71c6fb$var$changeHandlers.add(handler);\n return ()=>{\n $507fabe10e71c6fb$var$changeHandlers.delete(handler);\n };\n }, []);\n return (0, $28AnR$useIsSSR)() ? null : modality;\n}\nconst $507fabe10e71c6fb$var$nonTextInputTypes = new Set([\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset'\n]);\n/**\n * If this is attached to text input component, return if the event is a focus event (Tab/Escape keys pressed) so that\n * focus visible style can be properly set.\n */ function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {\n let document1 = (0, $28AnR$getOwnerDocument)(e === null || e === void 0 ? void 0 : e.target);\n const IHTMLInputElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLInputElement : HTMLInputElement;\n const IHTMLTextAreaElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLTextAreaElement : HTMLTextAreaElement;\n const IHTMLElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLElement : HTMLElement;\n const IKeyboardEvent = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).KeyboardEvent : KeyboardEvent;\n // For keyboard events that occur on a non-input element that will move focus into input element (aka ArrowLeft going from Datepicker button to the main input group)\n // we need to rely on the user passing isTextInput into here. This way we can skip toggling focus visiblity for said input element\n isTextInput = isTextInput || document1.activeElement instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(document1.activeElement.type) || document1.activeElement instanceof IHTMLTextAreaElement || document1.activeElement instanceof IHTMLElement && document1.activeElement.isContentEditable;\n return !(isTextInput && modality === 'keyboard' && e instanceof IKeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);\n}\nfunction $507fabe10e71c6fb$export$ffd9e5021c1fb2d6(props = {}) {\n let { isTextInput: isTextInput, autoFocus: autoFocus } = props;\n let [isFocusVisibleState, setFocusVisible] = (0, $28AnR$useState)(autoFocus || $507fabe10e71c6fb$export$b9b3dfddab17db27());\n $507fabe10e71c6fb$export$ec71b4b83ac08ec3((isFocusVisible)=>{\n setFocusVisible(isFocusVisible);\n }, [\n isTextInput\n ], {\n isTextInput: isTextInput\n });\n return {\n isFocusVisible: isFocusVisibleState\n };\n}\nfunction $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {\n $507fabe10e71c6fb$var$setupGlobalFocusEvents();\n (0, $28AnR$useEffect)(()=>{\n let handler = (modality, e)=>{\n // We want to early return for any keyboard events that occur inside text inputs EXCEPT for Tab and Escape\n if (!$507fabe10e71c6fb$var$isKeyboardFocusEvent(!!(opts === null || opts === void 0 ? void 0 : opts.isTextInput), modality, e)) return;\n fn($507fabe10e71c6fb$export$b9b3dfddab17db27());\n };\n $507fabe10e71c6fb$var$changeHandlers.add(handler);\n return ()=>{\n $507fabe10e71c6fb$var$changeHandlers.delete(handler);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n}\n\n\nexport {$507fabe10e71c6fb$export$d90243b58daecda7 as hasSetupGlobalListeners, $507fabe10e71c6fb$export$2f1888112f558a7d as addWindowFocusTracking, $507fabe10e71c6fb$export$b9b3dfddab17db27 as isFocusVisible, $507fabe10e71c6fb$export$630ff653c5ada6a9 as getInteractionModality, $507fabe10e71c6fb$export$8397ddfc504fdb9a as setInteractionModality, $507fabe10e71c6fb$export$98e20ec92f614cfe as useInteractionModality, $507fabe10e71c6fb$export$ffd9e5021c1fb2d6 as useFocusVisible, $507fabe10e71c6fb$export$ec71b4b83ac08ec3 as useFocusVisibleListener};\n//# sourceMappingURL=useFocusVisible.module.js.map\n"],"names":["$507fabe10e71c6fb$var$currentModality","$507fabe10e71c6fb$var$changeHandlers","$507fabe10e71c6fb$export$d90243b58daecda7","$507fabe10e71c6fb$var$hasEventBeforeFocus","$507fabe10e71c6fb$var$hasBlurredWindowRecently","$507fabe10e71c6fb$var$triggerChangeHandlers","modality","e","handler","$507fabe10e71c6fb$var$isValidKey","$28AnR$isMac","$507fabe10e71c6fb$var$handleKeyboardEvent","$507fabe10e71c6fb$var$handlePointerEvent","$507fabe10e71c6fb$var$handleClickEvent","$28AnR$isVirtualClick","$507fabe10e71c6fb$var$handleFocusEvent","$8a9cb279dc87e130$export$fda7da73ab5d4c48","$507fabe10e71c6fb$var$handleWindowBlur","$507fabe10e71c6fb$var$setupGlobalFocusEvents","element","$28AnR$getOwnerWindow","windowObject","documentObject","$28AnR$getOwnerDocument","focus","$507fabe10e71c6fb$var$tearDownWindowFocusTracking","loadListener","$507fabe10e71c6fb$export$2f1888112f558a7d","$507fabe10e71c6fb$export$630ff653c5ada6a9","$507fabe10e71c6fb$export$8397ddfc504fdb9a"],"mappings":"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","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusVisible.es.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useFocusVisible.mjs"],"sourcesContent":["import {ignoreFocusEvent as $8a9cb279dc87e130$export$fda7da73ab5d4c48} from \"./utils.mjs\";\nimport {isMac as $28AnR$isMac, isVirtualClick as $28AnR$isVirtualClick, getOwnerWindow as $28AnR$getOwnerWindow, getOwnerDocument as $28AnR$getOwnerDocument} from \"@react-aria/utils\";\nimport {useState as $28AnR$useState, useEffect as $28AnR$useEffect} from \"react\";\nimport {useIsSSR as $28AnR$useIsSSR} from \"@react-aria/ssr\";\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\nlet $507fabe10e71c6fb$var$currentModality = null;\nlet $507fabe10e71c6fb$var$changeHandlers = new Set();\nlet $507fabe10e71c6fb$export$d90243b58daecda7 = new Map(); // We use a map here to support setting event listeners across multiple document objects.\nlet $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\nlet $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;\n// Only Tab or Esc keys will make focus visible on text input elements\nconst $507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS = {\n Tab: true,\n Escape: true\n};\nfunction $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {\n for (let handler of $507fabe10e71c6fb$var$changeHandlers)handler(modality, e);\n}\n/**\n * Helper function to determine if a KeyboardEvent is unmodified and could make keyboard focus styles visible.\n */ function $507fabe10e71c6fb$var$isValidKey(e) {\n // Control and Shift keys trigger when navigating back to the tab with keyboard.\n return !(e.metaKey || !(0, $28AnR$isMac)() && e.altKey || e.ctrlKey || e.key === 'Control' || e.key === 'Shift' || e.key === 'Meta');\n}\nfunction $507fabe10e71c6fb$var$handleKeyboardEvent(e) {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n if ($507fabe10e71c6fb$var$isValidKey(e)) {\n $507fabe10e71c6fb$var$currentModality = 'keyboard';\n $507fabe10e71c6fb$var$triggerChangeHandlers('keyboard', e);\n }\n}\nfunction $507fabe10e71c6fb$var$handlePointerEvent(e) {\n $507fabe10e71c6fb$var$currentModality = 'pointer';\n if (e.type === 'mousedown' || e.type === 'pointerdown') {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n $507fabe10e71c6fb$var$triggerChangeHandlers('pointer', e);\n }\n}\nfunction $507fabe10e71c6fb$var$handleClickEvent(e) {\n if ((0, $28AnR$isVirtualClick)(e)) {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n $507fabe10e71c6fb$var$currentModality = 'virtual';\n }\n}\nfunction $507fabe10e71c6fb$var$handleFocusEvent(e) {\n // Firefox fires two extra focus events when the user first clicks into an iframe:\n // first on the window, then on the document. We ignore these events so they don't\n // cause keyboard focus rings to appear.\n if (e.target === window || e.target === document || (0, $8a9cb279dc87e130$export$fda7da73ab5d4c48) || !e.isTrusted) return;\n // If a focus event occurs without a preceding keyboard or pointer event, switch to virtual modality.\n // This occurs, for example, when navigating a form with the next/previous buttons on iOS.\n if (!$507fabe10e71c6fb$var$hasEventBeforeFocus && !$507fabe10e71c6fb$var$hasBlurredWindowRecently) {\n $507fabe10e71c6fb$var$currentModality = 'virtual';\n $507fabe10e71c6fb$var$triggerChangeHandlers('virtual', e);\n }\n $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\n $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;\n}\nfunction $507fabe10e71c6fb$var$handleWindowBlur() {\n if (0, $8a9cb279dc87e130$export$fda7da73ab5d4c48) return;\n // When the window is blurred, reset state. This is necessary when tabbing out of the window,\n // for example, since a subsequent focus event won't be fired.\n $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\n $507fabe10e71c6fb$var$hasBlurredWindowRecently = true;\n}\n/**\n * Setup global event listeners to control when keyboard focus style should be visible.\n */ function $507fabe10e71c6fb$var$setupGlobalFocusEvents(element) {\n if (typeof window === 'undefined' || typeof document === 'undefined' || $507fabe10e71c6fb$export$d90243b58daecda7.get((0, $28AnR$getOwnerWindow)(element))) return;\n const windowObject = (0, $28AnR$getOwnerWindow)(element);\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n // Programmatic focus() calls shouldn't affect the current input modality.\n // However, we need to detect other cases when a focus event occurs without\n // a preceding user event (e.g. screen reader focus). Overriding the focus\n // method on HTMLElement.prototype is a bit hacky, but works.\n let focus = windowObject.HTMLElement.prototype.focus;\n windowObject.HTMLElement.prototype.focus = function() {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n focus.apply(this, arguments);\n };\n documentObject.addEventListener('keydown', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.addEventListener('keyup', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.addEventListener('click', $507fabe10e71c6fb$var$handleClickEvent, true);\n // Register focus events on the window so they are sure to happen\n // before React's event listeners (registered on the document).\n windowObject.addEventListener('focus', $507fabe10e71c6fb$var$handleFocusEvent, true);\n windowObject.addEventListener('blur', $507fabe10e71c6fb$var$handleWindowBlur, false);\n if (typeof PointerEvent !== 'undefined') {\n documentObject.addEventListener('pointerdown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('pointermove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('pointerup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n } else if (process.env.NODE_ENV === 'test') {\n documentObject.addEventListener('mousedown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('mousemove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('mouseup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n }\n // Add unmount handler\n windowObject.addEventListener('beforeunload', ()=>{\n $507fabe10e71c6fb$var$tearDownWindowFocusTracking(element);\n }, {\n once: true\n });\n $507fabe10e71c6fb$export$d90243b58daecda7.set(windowObject, {\n focus: focus\n });\n}\nconst $507fabe10e71c6fb$var$tearDownWindowFocusTracking = (element, loadListener)=>{\n const windowObject = (0, $28AnR$getOwnerWindow)(element);\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n if (loadListener) documentObject.removeEventListener('DOMContentLoaded', loadListener);\n if (!$507fabe10e71c6fb$export$d90243b58daecda7.has(windowObject)) return;\n windowObject.HTMLElement.prototype.focus = $507fabe10e71c6fb$export$d90243b58daecda7.get(windowObject).focus;\n documentObject.removeEventListener('keydown', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.removeEventListener('keyup', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.removeEventListener('click', $507fabe10e71c6fb$var$handleClickEvent, true);\n windowObject.removeEventListener('focus', $507fabe10e71c6fb$var$handleFocusEvent, true);\n windowObject.removeEventListener('blur', $507fabe10e71c6fb$var$handleWindowBlur, false);\n if (typeof PointerEvent !== 'undefined') {\n documentObject.removeEventListener('pointerdown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('pointermove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('pointerup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n } else if (process.env.NODE_ENV === 'test') {\n documentObject.removeEventListener('mousedown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('mousemove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('mouseup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n }\n $507fabe10e71c6fb$export$d90243b58daecda7.delete(windowObject);\n};\nfunction $507fabe10e71c6fb$export$2f1888112f558a7d(element) {\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n let loadListener;\n if (documentObject.readyState !== 'loading') $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);\n else {\n loadListener = ()=>{\n $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);\n };\n documentObject.addEventListener('DOMContentLoaded', loadListener);\n }\n return ()=>$507fabe10e71c6fb$var$tearDownWindowFocusTracking(element, loadListener);\n}\n// Server-side rendering does not have the document object defined\n// eslint-disable-next-line no-restricted-globals\nif (typeof document !== 'undefined') $507fabe10e71c6fb$export$2f1888112f558a7d();\nfunction $507fabe10e71c6fb$export$b9b3dfddab17db27() {\n return $507fabe10e71c6fb$var$currentModality !== 'pointer';\n}\nfunction $507fabe10e71c6fb$export$630ff653c5ada6a9() {\n return $507fabe10e71c6fb$var$currentModality;\n}\nfunction $507fabe10e71c6fb$export$8397ddfc504fdb9a(modality) {\n $507fabe10e71c6fb$var$currentModality = modality;\n $507fabe10e71c6fb$var$triggerChangeHandlers(modality, null);\n}\nfunction $507fabe10e71c6fb$export$98e20ec92f614cfe() {\n $507fabe10e71c6fb$var$setupGlobalFocusEvents();\n let [modality, setModality] = (0, $28AnR$useState)($507fabe10e71c6fb$var$currentModality);\n (0, $28AnR$useEffect)(()=>{\n let handler = ()=>{\n setModality($507fabe10e71c6fb$var$currentModality);\n };\n $507fabe10e71c6fb$var$changeHandlers.add(handler);\n return ()=>{\n $507fabe10e71c6fb$var$changeHandlers.delete(handler);\n };\n }, []);\n return (0, $28AnR$useIsSSR)() ? null : modality;\n}\nconst $507fabe10e71c6fb$var$nonTextInputTypes = new Set([\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset'\n]);\n/**\n * If this is attached to text input component, return if the event is a focus event (Tab/Escape keys pressed) so that\n * focus visible style can be properly set.\n */ function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {\n let document1 = (0, $28AnR$getOwnerDocument)(e === null || e === void 0 ? void 0 : e.target);\n const IHTMLInputElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLInputElement : HTMLInputElement;\n const IHTMLTextAreaElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLTextAreaElement : HTMLTextAreaElement;\n const IHTMLElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLElement : HTMLElement;\n const IKeyboardEvent = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).KeyboardEvent : KeyboardEvent;\n // For keyboard events that occur on a non-input element that will move focus into input element (aka ArrowLeft going from Datepicker button to the main input group)\n // we need to rely on the user passing isTextInput into here. This way we can skip toggling focus visiblity for said input element\n isTextInput = isTextInput || document1.activeElement instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(document1.activeElement.type) || document1.activeElement instanceof IHTMLTextAreaElement || document1.activeElement instanceof IHTMLElement && document1.activeElement.isContentEditable;\n return !(isTextInput && modality === 'keyboard' && e instanceof IKeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);\n}\nfunction $507fabe10e71c6fb$export$ffd9e5021c1fb2d6(props = {}) {\n let { isTextInput: isTextInput, autoFocus: autoFocus } = props;\n let [isFocusVisibleState, setFocusVisible] = (0, $28AnR$useState)(autoFocus || $507fabe10e71c6fb$export$b9b3dfddab17db27());\n $507fabe10e71c6fb$export$ec71b4b83ac08ec3((isFocusVisible)=>{\n setFocusVisible(isFocusVisible);\n }, [\n isTextInput\n ], {\n isTextInput: isTextInput\n });\n return {\n isFocusVisible: isFocusVisibleState\n };\n}\nfunction $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {\n $507fabe10e71c6fb$var$setupGlobalFocusEvents();\n (0, $28AnR$useEffect)(()=>{\n let handler = (modality, e)=>{\n // We want to early return for any keyboard events that occur inside text inputs EXCEPT for Tab and Escape\n if (!$507fabe10e71c6fb$var$isKeyboardFocusEvent(!!(opts === null || opts === void 0 ? void 0 : opts.isTextInput), modality, e)) return;\n fn($507fabe10e71c6fb$export$b9b3dfddab17db27());\n };\n $507fabe10e71c6fb$var$changeHandlers.add(handler);\n return ()=>{\n $507fabe10e71c6fb$var$changeHandlers.delete(handler);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n}\n\n\nexport {$507fabe10e71c6fb$export$d90243b58daecda7 as hasSetupGlobalListeners, $507fabe10e71c6fb$export$2f1888112f558a7d as addWindowFocusTracking, $507fabe10e71c6fb$export$b9b3dfddab17db27 as isFocusVisible, $507fabe10e71c6fb$export$630ff653c5ada6a9 as getInteractionModality, $507fabe10e71c6fb$export$8397ddfc504fdb9a as setInteractionModality, $507fabe10e71c6fb$export$98e20ec92f614cfe as useInteractionModality, $507fabe10e71c6fb$export$ffd9e5021c1fb2d6 as useFocusVisible, $507fabe10e71c6fb$export$ec71b4b83ac08ec3 as useFocusVisibleListener};\n//# sourceMappingURL=useFocusVisible.module.js.map\n"],"names":["$507fabe10e71c6fb$var$currentModality","$507fabe10e71c6fb$var$changeHandlers","$507fabe10e71c6fb$export$d90243b58daecda7","$507fabe10e71c6fb$var$hasEventBeforeFocus","$507fabe10e71c6fb$var$hasBlurredWindowRecently","$507fabe10e71c6fb$var$triggerChangeHandlers","modality","e","handler","$507fabe10e71c6fb$var$isValidKey","$28AnR$isMac","$507fabe10e71c6fb$var$handleKeyboardEvent","$507fabe10e71c6fb$var$handlePointerEvent","$507fabe10e71c6fb$var$handleClickEvent","$28AnR$isVirtualClick","$507fabe10e71c6fb$var$handleFocusEvent","$8a9cb279dc87e130$export$fda7da73ab5d4c48","$507fabe10e71c6fb$var$handleWindowBlur","$507fabe10e71c6fb$var$setupGlobalFocusEvents","element","$28AnR$getOwnerWindow","windowObject","documentObject","$28AnR$getOwnerDocument","focus","$507fabe10e71c6fb$var$tearDownWindowFocusTracking","loadListener","$507fabe10e71c6fb$export$2f1888112f558a7d","$507fabe10e71c6fb$export$630ff653c5ada6a9","$507fabe10e71c6fb$export$8397ddfc504fdb9a"],"mappings":"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","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useFocusVisible.es.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useFocusVisible.mjs"],"sourcesContent":["import {ignoreFocusEvent as $8a9cb279dc87e130$export$fda7da73ab5d4c48} from \"./utils.mjs\";\nimport {isMac as $28AnR$isMac, isVirtualClick as $28AnR$isVirtualClick, getOwnerWindow as $28AnR$getOwnerWindow, getOwnerDocument as $28AnR$getOwnerDocument} from \"@react-aria/utils\";\nimport {useState as $28AnR$useState, useEffect as $28AnR$useEffect} from \"react\";\nimport {useIsSSR as $28AnR$useIsSSR} from \"@react-aria/ssr\";\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\nlet $507fabe10e71c6fb$var$currentModality = null;\nlet $507fabe10e71c6fb$var$changeHandlers = new Set();\nlet $507fabe10e71c6fb$export$d90243b58daecda7 = new Map(); // We use a map here to support setting event listeners across multiple document objects.\nlet $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\nlet $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;\n// Only Tab or Esc keys will make focus visible on text input elements\nconst $507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS = {\n Tab: true,\n Escape: true\n};\nfunction $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {\n for (let handler of $507fabe10e71c6fb$var$changeHandlers)handler(modality, e);\n}\n/**\n * Helper function to determine if a KeyboardEvent is unmodified and could make keyboard focus styles visible.\n */ function $507fabe10e71c6fb$var$isValidKey(e) {\n // Control and Shift keys trigger when navigating back to the tab with keyboard.\n return !(e.metaKey || !(0, $28AnR$isMac)() && e.altKey || e.ctrlKey || e.key === 'Control' || e.key === 'Shift' || e.key === 'Meta');\n}\nfunction $507fabe10e71c6fb$var$handleKeyboardEvent(e) {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n if ($507fabe10e71c6fb$var$isValidKey(e)) {\n $507fabe10e71c6fb$var$currentModality = 'keyboard';\n $507fabe10e71c6fb$var$triggerChangeHandlers('keyboard', e);\n }\n}\nfunction $507fabe10e71c6fb$var$handlePointerEvent(e) {\n $507fabe10e71c6fb$var$currentModality = 'pointer';\n if (e.type === 'mousedown' || e.type === 'pointerdown') {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n $507fabe10e71c6fb$var$triggerChangeHandlers('pointer', e);\n }\n}\nfunction $507fabe10e71c6fb$var$handleClickEvent(e) {\n if ((0, $28AnR$isVirtualClick)(e)) {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n $507fabe10e71c6fb$var$currentModality = 'virtual';\n }\n}\nfunction $507fabe10e71c6fb$var$handleFocusEvent(e) {\n // Firefox fires two extra focus events when the user first clicks into an iframe:\n // first on the window, then on the document. We ignore these events so they don't\n // cause keyboard focus rings to appear.\n if (e.target === window || e.target === document || (0, $8a9cb279dc87e130$export$fda7da73ab5d4c48) || !e.isTrusted) return;\n // If a focus event occurs without a preceding keyboard or pointer event, switch to virtual modality.\n // This occurs, for example, when navigating a form with the next/previous buttons on iOS.\n if (!$507fabe10e71c6fb$var$hasEventBeforeFocus && !$507fabe10e71c6fb$var$hasBlurredWindowRecently) {\n $507fabe10e71c6fb$var$currentModality = 'virtual';\n $507fabe10e71c6fb$var$triggerChangeHandlers('virtual', e);\n }\n $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\n $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;\n}\nfunction $507fabe10e71c6fb$var$handleWindowBlur() {\n if (0, $8a9cb279dc87e130$export$fda7da73ab5d4c48) return;\n // When the window is blurred, reset state. This is necessary when tabbing out of the window,\n // for example, since a subsequent focus event won't be fired.\n $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\n $507fabe10e71c6fb$var$hasBlurredWindowRecently = true;\n}\n/**\n * Setup global event listeners to control when keyboard focus style should be visible.\n */ function $507fabe10e71c6fb$var$setupGlobalFocusEvents(element) {\n if (typeof window === 'undefined' || typeof document === 'undefined' || $507fabe10e71c6fb$export$d90243b58daecda7.get((0, $28AnR$getOwnerWindow)(element))) return;\n const windowObject = (0, $28AnR$getOwnerWindow)(element);\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n // Programmatic focus() calls shouldn't affect the current input modality.\n // However, we need to detect other cases when a focus event occurs without\n // a preceding user event (e.g. screen reader focus). Overriding the focus\n // method on HTMLElement.prototype is a bit hacky, but works.\n let focus = windowObject.HTMLElement.prototype.focus;\n windowObject.HTMLElement.prototype.focus = function() {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n focus.apply(this, arguments);\n };\n documentObject.addEventListener('keydown', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.addEventListener('keyup', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.addEventListener('click', $507fabe10e71c6fb$var$handleClickEvent, true);\n // Register focus events on the window so they are sure to happen\n // before React's event listeners (registered on the document).\n windowObject.addEventListener('focus', $507fabe10e71c6fb$var$handleFocusEvent, true);\n windowObject.addEventListener('blur', $507fabe10e71c6fb$var$handleWindowBlur, false);\n if (typeof PointerEvent !== 'undefined') {\n documentObject.addEventListener('pointerdown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('pointermove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('pointerup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n } else if (process.env.NODE_ENV === 'test') {\n documentObject.addEventListener('mousedown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('mousemove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('mouseup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n }\n // Add unmount handler\n windowObject.addEventListener('beforeunload', ()=>{\n $507fabe10e71c6fb$var$tearDownWindowFocusTracking(element);\n }, {\n once: true\n });\n $507fabe10e71c6fb$export$d90243b58daecda7.set(windowObject, {\n focus: focus\n });\n}\nconst $507fabe10e71c6fb$var$tearDownWindowFocusTracking = (element, loadListener)=>{\n const windowObject = (0, $28AnR$getOwnerWindow)(element);\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n if (loadListener) documentObject.removeEventListener('DOMContentLoaded', loadListener);\n if (!$507fabe10e71c6fb$export$d90243b58daecda7.has(windowObject)) return;\n windowObject.HTMLElement.prototype.focus = $507fabe10e71c6fb$export$d90243b58daecda7.get(windowObject).focus;\n documentObject.removeEventListener('keydown', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.removeEventListener('keyup', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.removeEventListener('click', $507fabe10e71c6fb$var$handleClickEvent, true);\n windowObject.removeEventListener('focus', $507fabe10e71c6fb$var$handleFocusEvent, true);\n windowObject.removeEventListener('blur', $507fabe10e71c6fb$var$handleWindowBlur, false);\n if (typeof PointerEvent !== 'undefined') {\n documentObject.removeEventListener('pointerdown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('pointermove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('pointerup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n } else if (process.env.NODE_ENV === 'test') {\n documentObject.removeEventListener('mousedown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('mousemove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('mouseup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n }\n $507fabe10e71c6fb$export$d90243b58daecda7.delete(windowObject);\n};\nfunction $507fabe10e71c6fb$export$2f1888112f558a7d(element) {\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n let loadListener;\n if (documentObject.readyState !== 'loading') $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);\n else {\n loadListener = ()=>{\n $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);\n };\n documentObject.addEventListener('DOMContentLoaded', loadListener);\n }\n return ()=>$507fabe10e71c6fb$var$tearDownWindowFocusTracking(element, loadListener);\n}\n// Server-side rendering does not have the document object defined\n// eslint-disable-next-line no-restricted-globals\nif (typeof document !== 'undefined') $507fabe10e71c6fb$export$2f1888112f558a7d();\nfunction $507fabe10e71c6fb$export$b9b3dfddab17db27() {\n return $507fabe10e71c6fb$var$currentModality !== 'pointer';\n}\nfunction $507fabe10e71c6fb$export$630ff653c5ada6a9() {\n return $507fabe10e71c6fb$var$currentModality;\n}\nfunction $507fabe10e71c6fb$export$8397ddfc504fdb9a(modality) {\n $507fabe10e71c6fb$var$currentModality = modality;\n $507fabe10e71c6fb$var$triggerChangeHandlers(modality, null);\n}\nfunction $507fabe10e71c6fb$export$98e20ec92f614cfe() {\n $507fabe10e71c6fb$var$setupGlobalFocusEvents();\n let [modality, setModality] = (0, $28AnR$useState)($507fabe10e71c6fb$var$currentModality);\n (0, $28AnR$useEffect)(()=>{\n let handler = ()=>{\n setModality($507fabe10e71c6fb$var$currentModality);\n };\n $507fabe10e71c6fb$var$changeHandlers.add(handler);\n return ()=>{\n $507fabe10e71c6fb$var$changeHandlers.delete(handler);\n };\n }, []);\n return (0, $28AnR$useIsSSR)() ? null : modality;\n}\nconst $507fabe10e71c6fb$var$nonTextInputTypes = new Set([\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset'\n]);\n/**\n * If this is attached to text input component, return if the event is a focus event (Tab/Escape keys pressed) so that\n * focus visible style can be properly set.\n */ function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {\n let document1 = (0, $28AnR$getOwnerDocument)(e === null || e === void 0 ? void 0 : e.target);\n const IHTMLInputElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLInputElement : HTMLInputElement;\n const IHTMLTextAreaElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLTextAreaElement : HTMLTextAreaElement;\n const IHTMLElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).HTMLElement : HTMLElement;\n const IKeyboardEvent = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(e === null || e === void 0 ? void 0 : e.target).KeyboardEvent : KeyboardEvent;\n // For keyboard events that occur on a non-input element that will move focus into input element (aka ArrowLeft going from Datepicker button to the main input group)\n // we need to rely on the user passing isTextInput into here. This way we can skip toggling focus visiblity for said input element\n isTextInput = isTextInput || document1.activeElement instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(document1.activeElement.type) || document1.activeElement instanceof IHTMLTextAreaElement || document1.activeElement instanceof IHTMLElement && document1.activeElement.isContentEditable;\n return !(isTextInput && modality === 'keyboard' && e instanceof IKeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);\n}\nfunction $507fabe10e71c6fb$export$ffd9e5021c1fb2d6(props = {}) {\n let { isTextInput: isTextInput, autoFocus: autoFocus } = props;\n let [isFocusVisibleState, setFocusVisible] = (0, $28AnR$useState)(autoFocus || $507fabe10e71c6fb$export$b9b3dfddab17db27());\n $507fabe10e71c6fb$export$ec71b4b83ac08ec3((isFocusVisible)=>{\n setFocusVisible(isFocusVisible);\n }, [\n isTextInput\n ], {\n isTextInput: isTextInput\n });\n return {\n isFocusVisible: isFocusVisibleState\n };\n}\nfunction $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {\n $507fabe10e71c6fb$var$setupGlobalFocusEvents();\n (0, $28AnR$useEffect)(()=>{\n let handler = (modality, e)=>{\n // We want to early return for any keyboard events that occur inside text inputs EXCEPT for Tab and Escape\n if (!$507fabe10e71c6fb$var$isKeyboardFocusEvent(!!(opts === null || opts === void 0 ? void 0 : opts.isTextInput), modality, e)) return;\n fn($507fabe10e71c6fb$export$b9b3dfddab17db27());\n };\n $507fabe10e71c6fb$var$changeHandlers.add(handler);\n return ()=>{\n $507fabe10e71c6fb$var$changeHandlers.delete(handler);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n}\n\n\nexport {$507fabe10e71c6fb$export$d90243b58daecda7 as hasSetupGlobalListeners, $507fabe10e71c6fb$export$2f1888112f558a7d as addWindowFocusTracking, $507fabe10e71c6fb$export$b9b3dfddab17db27 as isFocusVisible, $507fabe10e71c6fb$export$630ff653c5ada6a9 as getInteractionModality, $507fabe10e71c6fb$export$8397ddfc504fdb9a as setInteractionModality, $507fabe10e71c6fb$export$98e20ec92f614cfe as useInteractionModality, $507fabe10e71c6fb$export$ffd9e5021c1fb2d6 as useFocusVisible, $507fabe10e71c6fb$export$ec71b4b83ac08ec3 as useFocusVisibleListener};\n//# sourceMappingURL=useFocusVisible.module.js.map\n"],"names":["$507fabe10e71c6fb$var$currentModality","$507fabe10e71c6fb$var$changeHandlers","$507fabe10e71c6fb$export$d90243b58daecda7","$507fabe10e71c6fb$var$hasEventBeforeFocus","$507fabe10e71c6fb$var$hasBlurredWindowRecently","$507fabe10e71c6fb$var$triggerChangeHandlers","modality","e","handler","$507fabe10e71c6fb$var$isValidKey","$28AnR$isMac","$507fabe10e71c6fb$var$handleKeyboardEvent","$507fabe10e71c6fb$var$handlePointerEvent","$507fabe10e71c6fb$var$handleClickEvent","$28AnR$isVirtualClick","$507fabe10e71c6fb$var$handleFocusEvent","$8a9cb279dc87e130$export$fda7da73ab5d4c48","$507fabe10e71c6fb$var$handleWindowBlur","$507fabe10e71c6fb$var$setupGlobalFocusEvents","element","$28AnR$getOwnerWindow","windowObject","documentObject","$28AnR$getOwnerDocument","focus","$507fabe10e71c6fb$var$tearDownWindowFocusTracking","loadListener","$507fabe10e71c6fb$export$2f1888112f558a7d","$507fabe10e71c6fb$export$630ff653c5ada6a9","$507fabe10e71c6fb$export$8397ddfc504fdb9a"],"mappings":"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","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusWithin.cjs.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useFocusWithin.mjs"],"sourcesContent":["import {createSyntheticEvent as $8a9cb279dc87e130$export$525bc4921d56d4a, setEventTarget as $8a9cb279dc87e130$export$c2b7abe5d61ec696, useSyntheticBlurEvent as $8a9cb279dc87e130$export$715c682d09d639cc} from \"./utils.mjs\";\nimport {useRef as $3b9Q0$useRef, useCallback as $3b9Q0$useCallback} from \"react\";\nimport {useGlobalListeners as $3b9Q0$useGlobalListeners, getOwnerDocument as $3b9Q0$getOwnerDocument, getActiveElement as $3b9Q0$getActiveElement, getEventTarget as $3b9Q0$getEventTarget, nodeContains as $3b9Q0$nodeContains} from \"@react-aria/utils\";\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\nfunction $9ab94262bd0047c7$export$420e68273165f4ec(props) {\n let { isDisabled: isDisabled, onBlurWithin: onBlurWithin, onFocusWithin: onFocusWithin, onFocusWithinChange: onFocusWithinChange } = props;\n let state = (0, $3b9Q0$useRef)({\n isFocusWithin: false\n });\n let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = (0, $3b9Q0$useGlobalListeners)();\n let onBlur = (0, $3b9Q0$useCallback)((e)=>{\n // Ignore events bubbling through portals.\n if (!e.currentTarget.contains(e.target)) return;\n // We don't want to trigger onBlurWithin and then immediately onFocusWithin again\n // when moving focus inside the element. Only trigger if the currentTarget doesn't\n // include the relatedTarget (where focus is moving).\n if (state.current.isFocusWithin && !e.currentTarget.contains(e.relatedTarget)) {\n state.current.isFocusWithin = false;\n removeAllGlobalListeners();\n if (onBlurWithin) onBlurWithin(e);\n if (onFocusWithinChange) onFocusWithinChange(false);\n }\n }, [\n onBlurWithin,\n onFocusWithinChange,\n state,\n removeAllGlobalListeners\n ]);\n let onSyntheticFocus = (0, $8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);\n let onFocus = (0, $3b9Q0$useCallback)((e)=>{\n // Ignore events bubbling through portals.\n if (!e.currentTarget.contains(e.target)) return;\n // Double check that document.activeElement actually matches e.target in case a previously chained\n // focus handler already moved focus somewhere else.\n const ownerDocument = (0, $3b9Q0$getOwnerDocument)(e.target);\n const activeElement = (0, $3b9Q0$getActiveElement)(ownerDocument);\n if (!state.current.isFocusWithin && activeElement === (0, $3b9Q0$getEventTarget)(e.nativeEvent)) {\n if (onFocusWithin) onFocusWithin(e);\n if (onFocusWithinChange) onFocusWithinChange(true);\n state.current.isFocusWithin = true;\n onSyntheticFocus(e);\n // Browsers don't fire blur events when elements are removed from the DOM.\n // However, if a focus event occurs outside the element we're tracking, we\n // can manually fire onBlur.\n let currentTarget = e.currentTarget;\n addGlobalListener(ownerDocument, 'focus', (e)=>{\n if (state.current.isFocusWithin && !(0, $3b9Q0$nodeContains)(currentTarget, e.target)) {\n let nativeEvent = new ownerDocument.defaultView.FocusEvent('blur', {\n relatedTarget: e.target\n });\n (0, $8a9cb279dc87e130$export$c2b7abe5d61ec696)(nativeEvent, currentTarget);\n let event = (0, $8a9cb279dc87e130$export$525bc4921d56d4a)(nativeEvent);\n onBlur(event);\n }\n }, {\n capture: true\n });\n }\n }, [\n onFocusWithin,\n onFocusWithinChange,\n onSyntheticFocus,\n addGlobalListener,\n onBlur\n ]);\n if (isDisabled) return {\n focusWithinProps: {\n // These cannot be null, that would conflict in mergeProps\n onFocus: undefined,\n onBlur: undefined\n }\n };\n return {\n focusWithinProps: {\n onFocus: onFocus,\n onBlur: onBlur\n }\n };\n}\n\n\nexport {$9ab94262bd0047c7$export$420e68273165f4ec as useFocusWithin};\n//# sourceMappingURL=useFocusWithin.module.js.map\n"],"names":["$9ab94262bd0047c7$export$420e68273165f4ec","props","isDisabled","onBlurWithin","onFocusWithin","onFocusWithinChange","state","$3b9Q0$useRef","addGlobalListener","removeAllGlobalListeners","$3b9Q0$useGlobalListeners","onBlur","$3b9Q0$useCallback","onSyntheticFocus","$8a9cb279dc87e130$export$715c682d09d639cc","onFocus","ownerDocument","$3b9Q0$getOwnerDocument","activeElement","$3b9Q0$getActiveElement","$3b9Q0$getEventTarget","currentTarget","e","$3b9Q0$nodeContains","nativeEvent","$8a9cb279dc87e130$export$c2b7abe5d61ec696","event","$8a9cb279dc87e130$export$525bc4921d56d4a"],"mappings":"oKAqBA,SAASA,EAA0CC,EAAO,CACtD,GAAI,CAAE,WAAYC,EAAY,aAAcC,EAAc,cAAeC,EAAe,oBAAqBC,CAAqB,EAAGJ,EACjIK,EAAYC,SAAe,CAC3B,cAAe,EACvB,CAAK,EACG,CAAE,kBAAmBC,EAAmB,yBAA0BC,CAA0B,EAAOC,EAAAA,qBACnGC,EAAaC,cAAqB,GAAI,CAEjC,EAAE,cAAc,SAAS,EAAE,MAAM,GAIlCN,EAAM,QAAQ,eAAiB,CAAC,EAAE,cAAc,SAAS,EAAE,aAAa,IACxEA,EAAM,QAAQ,cAAgB,GAC9BG,IACIN,GAAcA,EAAa,CAAC,EAC5BE,GAAqBA,EAAoB,EAAK,EAE9D,EAAO,CACCF,EACAE,EACAC,EACAG,CACR,CAAK,EACGI,EAAuBC,wBAA2CH,CAAM,EACxEI,EAAcH,cAAqB,GAAI,CAEvC,GAAI,CAAC,EAAE,cAAc,SAAS,EAAE,MAAM,EAAG,OAGzC,MAAMI,EAAoBC,EAAAA,iBAAyB,EAAE,MAAM,EACrDC,EAAoBC,mBAAyBH,CAAa,EAChE,GAAI,CAACV,EAAM,QAAQ,eAAiBY,IAAsBE,EAAqB,eAAE,EAAE,WAAW,EAAG,CACzFhB,GAAeA,EAAc,CAAC,EAC9BC,GAAqBA,EAAoB,EAAI,EACjDC,EAAM,QAAQ,cAAgB,GAC9BO,EAAiB,CAAC,EAIlB,IAAIQ,EAAgB,EAAE,cACtBb,EAAkBQ,EAAe,QAAUM,GAAI,CAC3C,GAAIhB,EAAM,QAAQ,eAAiB,CAAKiB,EAAAA,aAAqBF,EAAeC,EAAE,MAAM,EAAG,CACnF,IAAIE,EAAc,IAAIR,EAAc,YAAY,WAAW,OAAQ,CAC/D,cAAeM,EAAE,MACzC,CAAqB,EACGG,EAAyC,eAAED,EAAaH,CAAa,EACzE,IAAIK,EAAYC,uBAA0CH,CAAW,EACrEb,EAAOe,CAAK,CACf,CACjB,EAAe,CACC,QAAS,EACzB,CAAa,CACJ,CACT,EAAO,CACCtB,EACAC,EACAQ,EACAL,EACAG,CACR,CAAK,EACD,OAAIT,EAAmB,CACnB,iBAAkB,CAEd,QAAS,OACT,OAAQ,MACX,CACT,EACW,CACH,iBAAkB,CACd,QAASa,EACT,OAAQJ,CACX,CACT,CACA","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useFocusWithin.cjs.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useFocusWithin.mjs"],"sourcesContent":["import {createSyntheticEvent as $8a9cb279dc87e130$export$525bc4921d56d4a, setEventTarget as $8a9cb279dc87e130$export$c2b7abe5d61ec696, useSyntheticBlurEvent as $8a9cb279dc87e130$export$715c682d09d639cc} from \"./utils.mjs\";\nimport {useRef as $3b9Q0$useRef, useCallback as $3b9Q0$useCallback} from \"react\";\nimport {useGlobalListeners as $3b9Q0$useGlobalListeners, getOwnerDocument as $3b9Q0$getOwnerDocument, getActiveElement as $3b9Q0$getActiveElement, getEventTarget as $3b9Q0$getEventTarget, nodeContains as $3b9Q0$nodeContains} from \"@react-aria/utils\";\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\nfunction $9ab94262bd0047c7$export$420e68273165f4ec(props) {\n let { isDisabled: isDisabled, onBlurWithin: onBlurWithin, onFocusWithin: onFocusWithin, onFocusWithinChange: onFocusWithinChange } = props;\n let state = (0, $3b9Q0$useRef)({\n isFocusWithin: false\n });\n let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = (0, $3b9Q0$useGlobalListeners)();\n let onBlur = (0, $3b9Q0$useCallback)((e)=>{\n // Ignore events bubbling through portals.\n if (!e.currentTarget.contains(e.target)) return;\n // We don't want to trigger onBlurWithin and then immediately onFocusWithin again\n // when moving focus inside the element. Only trigger if the currentTarget doesn't\n // include the relatedTarget (where focus is moving).\n if (state.current.isFocusWithin && !e.currentTarget.contains(e.relatedTarget)) {\n state.current.isFocusWithin = false;\n removeAllGlobalListeners();\n if (onBlurWithin) onBlurWithin(e);\n if (onFocusWithinChange) onFocusWithinChange(false);\n }\n }, [\n onBlurWithin,\n onFocusWithinChange,\n state,\n removeAllGlobalListeners\n ]);\n let onSyntheticFocus = (0, $8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);\n let onFocus = (0, $3b9Q0$useCallback)((e)=>{\n // Ignore events bubbling through portals.\n if (!e.currentTarget.contains(e.target)) return;\n // Double check that document.activeElement actually matches e.target in case a previously chained\n // focus handler already moved focus somewhere else.\n const ownerDocument = (0, $3b9Q0$getOwnerDocument)(e.target);\n const activeElement = (0, $3b9Q0$getActiveElement)(ownerDocument);\n if (!state.current.isFocusWithin && activeElement === (0, $3b9Q0$getEventTarget)(e.nativeEvent)) {\n if (onFocusWithin) onFocusWithin(e);\n if (onFocusWithinChange) onFocusWithinChange(true);\n state.current.isFocusWithin = true;\n onSyntheticFocus(e);\n // Browsers don't fire blur events when elements are removed from the DOM.\n // However, if a focus event occurs outside the element we're tracking, we\n // can manually fire onBlur.\n let currentTarget = e.currentTarget;\n addGlobalListener(ownerDocument, 'focus', (e)=>{\n if (state.current.isFocusWithin && !(0, $3b9Q0$nodeContains)(currentTarget, e.target)) {\n let nativeEvent = new ownerDocument.defaultView.FocusEvent('blur', {\n relatedTarget: e.target\n });\n (0, $8a9cb279dc87e130$export$c2b7abe5d61ec696)(nativeEvent, currentTarget);\n let event = (0, $8a9cb279dc87e130$export$525bc4921d56d4a)(nativeEvent);\n onBlur(event);\n }\n }, {\n capture: true\n });\n }\n }, [\n onFocusWithin,\n onFocusWithinChange,\n onSyntheticFocus,\n addGlobalListener,\n onBlur\n ]);\n if (isDisabled) return {\n focusWithinProps: {\n // These cannot be null, that would conflict in mergeProps\n onFocus: undefined,\n onBlur: undefined\n }\n };\n return {\n focusWithinProps: {\n onFocus: onFocus,\n onBlur: onBlur\n }\n };\n}\n\n\nexport {$9ab94262bd0047c7$export$420e68273165f4ec as useFocusWithin};\n//# sourceMappingURL=useFocusWithin.module.js.map\n"],"names":["$9ab94262bd0047c7$export$420e68273165f4ec","props","isDisabled","onBlurWithin","onFocusWithin","onFocusWithinChange","state","$3b9Q0$useRef","addGlobalListener","removeAllGlobalListeners","$3b9Q0$useGlobalListeners","onBlur","$3b9Q0$useCallback","onSyntheticFocus","$8a9cb279dc87e130$export$715c682d09d639cc","onFocus","ownerDocument","$3b9Q0$getOwnerDocument","activeElement","$3b9Q0$getActiveElement","$3b9Q0$getEventTarget","currentTarget","e","$3b9Q0$nodeContains","nativeEvent","$8a9cb279dc87e130$export$c2b7abe5d61ec696","event","$8a9cb279dc87e130$export$525bc4921d56d4a"],"mappings":"oKAqBA,SAASA,EAA0CC,EAAO,CACtD,GAAI,CAAE,WAAYC,EAAY,aAAcC,EAAc,cAAeC,EAAe,oBAAqBC,CAAmB,EAAKJ,EACjIK,EAAYC,SAAe,CAC3B,cAAe,EACvB,CAAK,EACG,CAAE,kBAAmBC,EAAmB,yBAA0BC,CAAwB,EAASC,qBAAyB,EAC5HC,EAAaC,cAAqB,GAAI,CAEjC,EAAE,cAAc,SAAS,EAAE,MAAM,GAIlCN,EAAM,QAAQ,eAAiB,CAAC,EAAE,cAAc,SAAS,EAAE,aAAa,IACxEA,EAAM,QAAQ,cAAgB,GAC9BG,EAAwB,EACpBN,GAAcA,EAAa,CAAC,EAC5BE,GAAqBA,EAAoB,EAAK,EAE1D,EAAG,CACCF,EACAE,EACAC,EACAG,CACR,CAAK,EACGI,EAAuBC,EAAAA,sBAA2CH,CAAM,EACxEI,EAAcH,cAAqB,GAAI,CAEvC,GAAI,CAAC,EAAE,cAAc,SAAS,EAAE,MAAM,EAAG,OAGzC,MAAMI,EAAoBC,mBAAyB,EAAE,MAAM,EACrDC,EAAoBC,EAAAA,iBAAyBH,CAAa,EAChE,GAAI,CAACV,EAAM,QAAQ,eAAiBY,IAAsBE,EAAAA,eAAuB,EAAE,WAAW,EAAG,CACzFhB,GAAeA,EAAc,CAAC,EAC9BC,GAAqBA,EAAoB,EAAI,EACjDC,EAAM,QAAQ,cAAgB,GAC9BO,EAAiB,CAAC,EAIlB,IAAIQ,EAAgB,EAAE,cACtBb,EAAkBQ,EAAe,QAAUM,GAAI,CAC3C,GAAIhB,EAAM,QAAQ,eAAiB,CAAKiB,EAAAA,aAAqBF,EAAeC,EAAE,MAAM,EAAG,CACnF,IAAIE,EAAc,IAAIR,EAAc,YAAY,WAAW,OAAQ,CAC/D,cAAeM,EAAE,MACzC,CAAqB,EACGG,EAAAA,eAA2CD,EAAaH,CAAa,EACzE,IAAIK,EAAYC,EAAAA,qBAA0CH,CAAW,EACrEb,EAAOe,CAAK,CAChB,CACJ,EAAG,CACC,QAAS,EACzB,CAAa,CACL,CACJ,EAAG,CACCtB,EACAC,EACAQ,EACAL,EACAG,CACR,CAAK,EACD,OAAIT,EAAmB,CACnB,iBAAkB,CAEd,QAAS,OACT,OAAQ,MACpB,CACA,EACW,CACH,iBAAkB,CACd,QAASa,EACT,OAAQJ,CACpB,CACA,CACA","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusWithin.es.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useFocusWithin.mjs"],"sourcesContent":["import {createSyntheticEvent as $8a9cb279dc87e130$export$525bc4921d56d4a, setEventTarget as $8a9cb279dc87e130$export$c2b7abe5d61ec696, useSyntheticBlurEvent as $8a9cb279dc87e130$export$715c682d09d639cc} from \"./utils.mjs\";\nimport {useRef as $3b9Q0$useRef, useCallback as $3b9Q0$useCallback} from \"react\";\nimport {useGlobalListeners as $3b9Q0$useGlobalListeners, getOwnerDocument as $3b9Q0$getOwnerDocument, getActiveElement as $3b9Q0$getActiveElement, getEventTarget as $3b9Q0$getEventTarget, nodeContains as $3b9Q0$nodeContains} from \"@react-aria/utils\";\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\nfunction $9ab94262bd0047c7$export$420e68273165f4ec(props) {\n let { isDisabled: isDisabled, onBlurWithin: onBlurWithin, onFocusWithin: onFocusWithin, onFocusWithinChange: onFocusWithinChange } = props;\n let state = (0, $3b9Q0$useRef)({\n isFocusWithin: false\n });\n let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = (0, $3b9Q0$useGlobalListeners)();\n let onBlur = (0, $3b9Q0$useCallback)((e)=>{\n // Ignore events bubbling through portals.\n if (!e.currentTarget.contains(e.target)) return;\n // We don't want to trigger onBlurWithin and then immediately onFocusWithin again\n // when moving focus inside the element. Only trigger if the currentTarget doesn't\n // include the relatedTarget (where focus is moving).\n if (state.current.isFocusWithin && !e.currentTarget.contains(e.relatedTarget)) {\n state.current.isFocusWithin = false;\n removeAllGlobalListeners();\n if (onBlurWithin) onBlurWithin(e);\n if (onFocusWithinChange) onFocusWithinChange(false);\n }\n }, [\n onBlurWithin,\n onFocusWithinChange,\n state,\n removeAllGlobalListeners\n ]);\n let onSyntheticFocus = (0, $8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);\n let onFocus = (0, $3b9Q0$useCallback)((e)=>{\n // Ignore events bubbling through portals.\n if (!e.currentTarget.contains(e.target)) return;\n // Double check that document.activeElement actually matches e.target in case a previously chained\n // focus handler already moved focus somewhere else.\n const ownerDocument = (0, $3b9Q0$getOwnerDocument)(e.target);\n const activeElement = (0, $3b9Q0$getActiveElement)(ownerDocument);\n if (!state.current.isFocusWithin && activeElement === (0, $3b9Q0$getEventTarget)(e.nativeEvent)) {\n if (onFocusWithin) onFocusWithin(e);\n if (onFocusWithinChange) onFocusWithinChange(true);\n state.current.isFocusWithin = true;\n onSyntheticFocus(e);\n // Browsers don't fire blur events when elements are removed from the DOM.\n // However, if a focus event occurs outside the element we're tracking, we\n // can manually fire onBlur.\n let currentTarget = e.currentTarget;\n addGlobalListener(ownerDocument, 'focus', (e)=>{\n if (state.current.isFocusWithin && !(0, $3b9Q0$nodeContains)(currentTarget, e.target)) {\n let nativeEvent = new ownerDocument.defaultView.FocusEvent('blur', {\n relatedTarget: e.target\n });\n (0, $8a9cb279dc87e130$export$c2b7abe5d61ec696)(nativeEvent, currentTarget);\n let event = (0, $8a9cb279dc87e130$export$525bc4921d56d4a)(nativeEvent);\n onBlur(event);\n }\n }, {\n capture: true\n });\n }\n }, [\n onFocusWithin,\n onFocusWithinChange,\n onSyntheticFocus,\n addGlobalListener,\n onBlur\n ]);\n if (isDisabled) return {\n focusWithinProps: {\n // These cannot be null, that would conflict in mergeProps\n onFocus: undefined,\n onBlur: undefined\n }\n };\n return {\n focusWithinProps: {\n onFocus: onFocus,\n onBlur: onBlur\n }\n };\n}\n\n\nexport {$9ab94262bd0047c7$export$420e68273165f4ec as useFocusWithin};\n//# sourceMappingURL=useFocusWithin.module.js.map\n"],"names":["$9ab94262bd0047c7$export$420e68273165f4ec","props","isDisabled","onBlurWithin","onFocusWithin","onFocusWithinChange","state","$3b9Q0$useRef","addGlobalListener","removeAllGlobalListeners","$3b9Q0$useGlobalListeners","onBlur","$3b9Q0$useCallback","e","onSyntheticFocus","$8a9cb279dc87e130$export$715c682d09d639cc","onFocus","ownerDocument","$3b9Q0$getOwnerDocument","activeElement","$3b9Q0$getActiveElement","$3b9Q0$getEventTarget","currentTarget","$3b9Q0$nodeContains","nativeEvent","$8a9cb279dc87e130$export$c2b7abe5d61ec696","event","$8a9cb279dc87e130$export$525bc4921d56d4a"],"mappings":";;;AAqBA,SAASA,EAA0CC,GAAO;AACtD,MAAI,EAAE,YAAYC,GAAY,cAAcC,GAAc,eAAeC,GAAe,qBAAqBC,EAAqB,IAAGJ,GACjIK,IAAYC,EAAe;AAAA,IAC3B,eAAe;AAAA,EACvB,CAAK,GACG,EAAE,mBAAmBC,GAAmB,0BAA0BC,EAA0B,IAAOC,KACnGC,IAAaC,EAAoB,CAACC,MAAI;AAEtC,IAAKA,EAAE,cAAc,SAASA,EAAE,MAAM,KAIlCP,EAAM,QAAQ,iBAAiB,CAACO,EAAE,cAAc,SAASA,EAAE,aAAa,MACxEP,EAAM,QAAQ,gBAAgB,IAC9BG,KACIN,KAAcA,EAAaU,CAAC,GAC5BR,KAAqBA,EAAoB,EAAK;AAAA,EAE9D,GAAO;AAAA,IACCF;AAAA,IACAE;AAAA,IACAC;AAAA,IACAG;AAAA,EACR,CAAK,GACGK,IAAuBC,EAA2CJ,CAAM,GACxEK,IAAcJ,EAAoB,CAACC,MAAI;AAEvC,QAAI,CAACA,EAAE,cAAc,SAASA,EAAE,MAAM,EAAG;AAGzC,UAAMI,IAAoBC,EAAyBL,EAAE,MAAM,GACrDM,IAAoBC,EAAyBH,CAAa;AAChE,QAAI,CAACX,EAAM,QAAQ,iBAAiBa,MAAsBE,EAAuBR,EAAE,WAAW,GAAG;AAC7F,MAAIT,KAAeA,EAAcS,CAAC,GAC9BR,KAAqBA,EAAoB,EAAI,GACjDC,EAAM,QAAQ,gBAAgB,IAC9BQ,EAAiBD,CAAC;AAIlB,UAAIS,IAAgBT,EAAE;AACtB,MAAAL,EAAkBS,GAAe,SAAS,CAACJ,MAAI;AAC3C,YAAIP,EAAM,QAAQ,iBAAiB,CAAKiB,EAAqBD,GAAeT,EAAE,MAAM,GAAG;AACnF,cAAIW,IAAc,IAAIP,EAAc,YAAY,WAAW,QAAQ;AAAA,YAC/D,eAAeJ,EAAE;AAAA,UACzC,CAAqB;AACD,UAAIY,EAA2CD,GAAaF,CAAa;AACzE,cAAII,IAAYC,EAA0CH,CAAW;AACrE,UAAAb,EAAOe,CAAK;AAAA,QACf;AAAA,MACjB,GAAe;AAAA,QACC,SAAS;AAAA,MACzB,CAAa;AAAA,IACJ;AAAA,EACT,GAAO;AAAA,IACCtB;AAAA,IACAC;AAAA,IACAS;AAAA,IACAN;AAAA,IACAG;AAAA,EACR,CAAK;AACD,SAAIT,IAAmB;AAAA,IACnB,kBAAkB;AAAA;AAAA,MAEd,SAAS;AAAA,MACT,QAAQ;AAAA,IACX;AAAA,EACT,IACW;AAAA,IACH,kBAAkB;AAAA,MACd,SAASc;AAAA,MACT,QAAQL;AAAA,IACX;AAAA,EACT;AACA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useFocusWithin.es.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useFocusWithin.mjs"],"sourcesContent":["import {createSyntheticEvent as $8a9cb279dc87e130$export$525bc4921d56d4a, setEventTarget as $8a9cb279dc87e130$export$c2b7abe5d61ec696, useSyntheticBlurEvent as $8a9cb279dc87e130$export$715c682d09d639cc} from \"./utils.mjs\";\nimport {useRef as $3b9Q0$useRef, useCallback as $3b9Q0$useCallback} from \"react\";\nimport {useGlobalListeners as $3b9Q0$useGlobalListeners, getOwnerDocument as $3b9Q0$getOwnerDocument, getActiveElement as $3b9Q0$getActiveElement, getEventTarget as $3b9Q0$getEventTarget, nodeContains as $3b9Q0$nodeContains} from \"@react-aria/utils\";\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\nfunction $9ab94262bd0047c7$export$420e68273165f4ec(props) {\n let { isDisabled: isDisabled, onBlurWithin: onBlurWithin, onFocusWithin: onFocusWithin, onFocusWithinChange: onFocusWithinChange } = props;\n let state = (0, $3b9Q0$useRef)({\n isFocusWithin: false\n });\n let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = (0, $3b9Q0$useGlobalListeners)();\n let onBlur = (0, $3b9Q0$useCallback)((e)=>{\n // Ignore events bubbling through portals.\n if (!e.currentTarget.contains(e.target)) return;\n // We don't want to trigger onBlurWithin and then immediately onFocusWithin again\n // when moving focus inside the element. Only trigger if the currentTarget doesn't\n // include the relatedTarget (where focus is moving).\n if (state.current.isFocusWithin && !e.currentTarget.contains(e.relatedTarget)) {\n state.current.isFocusWithin = false;\n removeAllGlobalListeners();\n if (onBlurWithin) onBlurWithin(e);\n if (onFocusWithinChange) onFocusWithinChange(false);\n }\n }, [\n onBlurWithin,\n onFocusWithinChange,\n state,\n removeAllGlobalListeners\n ]);\n let onSyntheticFocus = (0, $8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);\n let onFocus = (0, $3b9Q0$useCallback)((e)=>{\n // Ignore events bubbling through portals.\n if (!e.currentTarget.contains(e.target)) return;\n // Double check that document.activeElement actually matches e.target in case a previously chained\n // focus handler already moved focus somewhere else.\n const ownerDocument = (0, $3b9Q0$getOwnerDocument)(e.target);\n const activeElement = (0, $3b9Q0$getActiveElement)(ownerDocument);\n if (!state.current.isFocusWithin && activeElement === (0, $3b9Q0$getEventTarget)(e.nativeEvent)) {\n if (onFocusWithin) onFocusWithin(e);\n if (onFocusWithinChange) onFocusWithinChange(true);\n state.current.isFocusWithin = true;\n onSyntheticFocus(e);\n // Browsers don't fire blur events when elements are removed from the DOM.\n // However, if a focus event occurs outside the element we're tracking, we\n // can manually fire onBlur.\n let currentTarget = e.currentTarget;\n addGlobalListener(ownerDocument, 'focus', (e)=>{\n if (state.current.isFocusWithin && !(0, $3b9Q0$nodeContains)(currentTarget, e.target)) {\n let nativeEvent = new ownerDocument.defaultView.FocusEvent('blur', {\n relatedTarget: e.target\n });\n (0, $8a9cb279dc87e130$export$c2b7abe5d61ec696)(nativeEvent, currentTarget);\n let event = (0, $8a9cb279dc87e130$export$525bc4921d56d4a)(nativeEvent);\n onBlur(event);\n }\n }, {\n capture: true\n });\n }\n }, [\n onFocusWithin,\n onFocusWithinChange,\n onSyntheticFocus,\n addGlobalListener,\n onBlur\n ]);\n if (isDisabled) return {\n focusWithinProps: {\n // These cannot be null, that would conflict in mergeProps\n onFocus: undefined,\n onBlur: undefined\n }\n };\n return {\n focusWithinProps: {\n onFocus: onFocus,\n onBlur: onBlur\n }\n };\n}\n\n\nexport {$9ab94262bd0047c7$export$420e68273165f4ec as useFocusWithin};\n//# sourceMappingURL=useFocusWithin.module.js.map\n"],"names":["$9ab94262bd0047c7$export$420e68273165f4ec","props","isDisabled","onBlurWithin","onFocusWithin","onFocusWithinChange","state","$3b9Q0$useRef","addGlobalListener","removeAllGlobalListeners","$3b9Q0$useGlobalListeners","onBlur","$3b9Q0$useCallback","e","onSyntheticFocus","$8a9cb279dc87e130$export$715c682d09d639cc","onFocus","ownerDocument","$3b9Q0$getOwnerDocument","activeElement","$3b9Q0$getActiveElement","$3b9Q0$getEventTarget","currentTarget","$3b9Q0$nodeContains","nativeEvent","$8a9cb279dc87e130$export$c2b7abe5d61ec696","event","$8a9cb279dc87e130$export$525bc4921d56d4a"],"mappings":";;;AAqBA,SAASA,EAA0CC,GAAO;AACtD,MAAI,EAAE,YAAYC,GAAY,cAAcC,GAAc,eAAeC,GAAe,qBAAqBC,EAAmB,IAAKJ,GACjIK,IAAYC,EAAe;AAAA,IAC3B,eAAe;AAAA,EACvB,CAAK,GACG,EAAE,mBAAmBC,GAAmB,0BAA0BC,EAAwB,IAASC,EAAyB,GAC5HC,IAAaC,EAAoB,CAACC,MAAI;AAEtC,IAAKA,EAAE,cAAc,SAASA,EAAE,MAAM,KAIlCP,EAAM,QAAQ,iBAAiB,CAACO,EAAE,cAAc,SAASA,EAAE,aAAa,MACxEP,EAAM,QAAQ,gBAAgB,IAC9BG,EAAwB,GACpBN,KAAcA,EAAaU,CAAC,GAC5BR,KAAqBA,EAAoB,EAAK;AAAA,EAE1D,GAAG;AAAA,IACCF;AAAA,IACAE;AAAA,IACAC;AAAA,IACAG;AAAA,EACR,CAAK,GACGK,IAAuBC,EAA2CJ,CAAM,GACxEK,IAAcJ,EAAoB,CAACC,MAAI;AAEvC,QAAI,CAACA,EAAE,cAAc,SAASA,EAAE,MAAM,EAAG;AAGzC,UAAMI,IAAoBC,EAAyBL,EAAE,MAAM,GACrDM,IAAoBC,EAAyBH,CAAa;AAChE,QAAI,CAACX,EAAM,QAAQ,iBAAiBa,MAAsBE,EAAuBR,EAAE,WAAW,GAAG;AAC7F,MAAIT,KAAeA,EAAcS,CAAC,GAC9BR,KAAqBA,EAAoB,EAAI,GACjDC,EAAM,QAAQ,gBAAgB,IAC9BQ,EAAiBD,CAAC;AAIlB,UAAIS,IAAgBT,EAAE;AACtB,MAAAL,EAAkBS,GAAe,SAAS,CAACJ,MAAI;AAC3C,YAAIP,EAAM,QAAQ,iBAAiB,CAAKiB,EAAqBD,GAAeT,EAAE,MAAM,GAAG;AACnF,cAAIW,IAAc,IAAIP,EAAc,YAAY,WAAW,QAAQ;AAAA,YAC/D,eAAeJ,EAAE;AAAA,UACzC,CAAqB;AACD,UAAIY,EAA2CD,GAAaF,CAAa;AACzE,cAAII,IAAYC,EAA0CH,CAAW;AACrE,UAAAb,EAAOe,CAAK;AAAA,QAChB;AAAA,MACJ,GAAG;AAAA,QACC,SAAS;AAAA,MACzB,CAAa;AAAA,IACL;AAAA,EACJ,GAAG;AAAA,IACCtB;AAAA,IACAC;AAAA,IACAS;AAAA,IACAN;AAAA,IACAG;AAAA,EACR,CAAK;AACD,SAAIT,IAAmB;AAAA,IACnB,kBAAkB;AAAA;AAAA,MAEd,SAAS;AAAA,MACT,QAAQ;AAAA,IACpB;AAAA,EACA,IACW;AAAA,IACH,kBAAkB;AAAA,MACd,SAASc;AAAA,MACT,QAAQL;AAAA,IACpB;AAAA,EACA;AACA;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusable.cjs.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useFocusable.mjs"],"sourcesContent":["import {focusSafely as $3ad3f6e1647bc98d$export$80f3e147d781571c} from \"./focusSafely.mjs\";\nimport {useFocus as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6} from \"./useFocus.mjs\";\nimport {useKeyboard as $46d819fcbaf35654$export$8f71654801c2f7cd} from \"./useKeyboard.mjs\";\nimport {useSyncRef as $fcPuG$useSyncRef, useObjectRef as $fcPuG$useObjectRef, mergeProps as $fcPuG$mergeProps, getOwnerWindow as $fcPuG$getOwnerWindow, isFocusable as $fcPuG$isFocusable, mergeRefs as $fcPuG$mergeRefs} from \"@react-aria/utils\";\nimport $fcPuG$react, {useContext as $fcPuG$useContext, useRef as $fcPuG$useRef, useEffect as $fcPuG$useEffect, forwardRef as $fcPuG$forwardRef} 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 */ \n\n\n\n\nlet $f645667febf57a63$export$f9762fab77588ecb = /*#__PURE__*/ (0, $fcPuG$react).createContext(null);\nfunction $f645667febf57a63$var$useFocusableContext(ref) {\n let context = (0, $fcPuG$useContext)($f645667febf57a63$export$f9762fab77588ecb) || {};\n (0, $fcPuG$useSyncRef)(context, ref);\n // eslint-disable-next-line\n let { ref: _, ...otherProps } = context;\n return otherProps;\n}\nconst $f645667febf57a63$export$13f3202a3e5ddd5 = /*#__PURE__*/ (0, $fcPuG$react).forwardRef(function FocusableProvider(props, ref) {\n let { children: children, ...otherProps } = props;\n let objRef = (0, $fcPuG$useObjectRef)(ref);\n let context = {\n ...otherProps,\n ref: objRef\n };\n return /*#__PURE__*/ (0, $fcPuG$react).createElement($f645667febf57a63$export$f9762fab77588ecb.Provider, {\n value: context\n }, children);\n});\nfunction $f645667febf57a63$export$4c014de7c8940b4c(props, domRef) {\n let { focusProps: focusProps } = (0, $a1ea59d68270f0dd$export$f8168d8dd8fd66e6)(props);\n let { keyboardProps: keyboardProps } = (0, $46d819fcbaf35654$export$8f71654801c2f7cd)(props);\n let interactions = (0, $fcPuG$mergeProps)(focusProps, keyboardProps);\n let domProps = $f645667febf57a63$var$useFocusableContext(domRef);\n let interactionProps = props.isDisabled ? {} : domProps;\n let autoFocusRef = (0, $fcPuG$useRef)(props.autoFocus);\n (0, $fcPuG$useEffect)(()=>{\n if (autoFocusRef.current && domRef.current) (0, $3ad3f6e1647bc98d$export$80f3e147d781571c)(domRef.current);\n autoFocusRef.current = false;\n }, [\n domRef\n ]);\n // Always set a tabIndex so that Safari allows focusing native buttons and inputs.\n let tabIndex = props.excludeFromTabOrder ? -1 : 0;\n if (props.isDisabled) tabIndex = undefined;\n return {\n focusableProps: (0, $fcPuG$mergeProps)({\n ...interactions,\n tabIndex: tabIndex\n }, interactionProps)\n };\n}\nconst $f645667febf57a63$export$35a3bebf7ef2d934 = /*#__PURE__*/ (0, $fcPuG$forwardRef)(({ children: children, ...props }, ref)=>{\n ref = (0, $fcPuG$useObjectRef)(ref);\n let { focusableProps: focusableProps } = $f645667febf57a63$export$4c014de7c8940b4c(props, ref);\n let child = (0, $fcPuG$react).Children.only(children);\n (0, $fcPuG$useEffect)(()=>{\n if (process.env.NODE_ENV === 'production') return;\n let el = ref.current;\n if (!el || !(el instanceof (0, $fcPuG$getOwnerWindow)(el).Element)) {\n console.error('<Focusable> child must forward its ref to a DOM element.');\n return;\n }\n if (!props.isDisabled && !(0, $fcPuG$isFocusable)(el)) {\n console.warn('<Focusable> child must be focusable. Please ensure the tabIndex prop is passed through.');\n return;\n }\n if (el.localName !== 'button' && el.localName !== 'input' && el.localName !== 'select' && el.localName !== 'textarea' && el.localName !== 'a' && el.localName !== 'area' && el.localName !== 'summary' && el.localName !== 'img' && el.localName !== 'svg') {\n let role = el.getAttribute('role');\n if (!role) console.warn('<Focusable> child must have an interactive ARIA role.');\n else if (// https://w3c.github.io/aria/#widget_roles\n role !== 'application' && role !== 'button' && role !== 'checkbox' && role !== 'combobox' && role !== 'gridcell' && role !== 'link' && role !== 'menuitem' && role !== 'menuitemcheckbox' && role !== 'menuitemradio' && role !== 'option' && role !== 'radio' && role !== 'searchbox' && role !== 'separator' && role !== 'slider' && role !== 'spinbutton' && role !== 'switch' && role !== 'tab' && role !== 'tabpanel' && role !== 'textbox' && role !== 'treeitem' && // aria-describedby is also announced on these roles\n role !== 'img' && role !== 'meter' && role !== 'progressbar') console.warn(`<Focusable> child must have an interactive ARIA role. Got \"${role}\".`);\n }\n }, [\n ref,\n props.isDisabled\n ]);\n // @ts-ignore\n let childRef = parseInt((0, $fcPuG$react).version, 10) < 19 ? child.ref : child.props.ref;\n return /*#__PURE__*/ (0, $fcPuG$react).cloneElement(child, {\n ...(0, $fcPuG$mergeProps)(focusableProps, child.props),\n // @ts-ignore\n ref: (0, $fcPuG$mergeRefs)(childRef, ref)\n });\n});\n\n\nexport {$f645667febf57a63$export$f9762fab77588ecb as FocusableContext, $f645667febf57a63$export$13f3202a3e5ddd5 as FocusableProvider, $f645667febf57a63$export$4c014de7c8940b4c as useFocusable, $f645667febf57a63$export$35a3bebf7ef2d934 as Focusable};\n//# sourceMappingURL=useFocusable.module.js.map\n"],"names":["$f645667febf57a63$export$f9762fab77588ecb","$fcPuG$react","$f645667febf57a63$var$useFocusableContext","ref","context","$fcPuG$useContext","$fcPuG$useSyncRef","_","otherProps","$f645667febf57a63$export$4c014de7c8940b4c","props","domRef","focusProps","$a1ea59d68270f0dd$export$f8168d8dd8fd66e6","keyboardProps","$46d819fcbaf35654$export$8f71654801c2f7cd","interactions","$fcPuG$mergeProps","domProps","interactionProps","autoFocusRef","$fcPuG$useRef","$fcPuG$useEffect","$3ad3f6e1647bc98d$export$80f3e147d781571c","tabIndex"],"mappings":"2OAqBG,IAACA,EAA8DC,EAAc,cAAc,IAAI,EAClG,SAASC,EAA0CC,EAAK,CACpD,IAAIC,EAAcC,EAAAA,WAAmBL,CAAyC,GAAK,CAAA,EAC/EM,EAAiB,WAAEF,EAASD,CAAG,EAEnC,GAAI,CAAE,IAAKI,EAAG,GAAGC,CAAU,EAAKJ,EAChC,OAAOI,CACX,CAYA,SAASC,EAA0CC,EAAOC,EAAQ,CAC9D,GAAI,CAAE,WAAYC,CAAU,EAASC,EAAyC,SAAEH,CAAK,EACjF,CAAE,cAAeI,CAAa,EAASC,EAAyC,YAAEL,CAAK,EACvFM,EAAmBC,EAAAA,WAAmBL,EAAYE,CAAa,EAC/DI,EAAWhB,EAA0CS,CAAM,EAC3DQ,EAAmBT,EAAM,WAAa,CAAA,EAAKQ,EAC3CE,EAAmBC,EAAAA,OAAeX,EAAM,SAAS,EACjDY,EAAgB,UAAE,IAAI,CAClBF,EAAa,SAAWT,EAAO,SAAaY,cAA2CZ,EAAO,OAAO,EACzGS,EAAa,QAAU,EAC/B,EAAO,CACCT,CACR,CAAK,EAED,IAAIa,EAAWd,EAAM,oBAAsB,GAAK,EAChD,OAAIA,EAAM,aAAYc,EAAW,QAC1B,CACH,eAAoBP,EAAAA,WAAmB,CACnC,GAAGD,EACH,SAAUQ,CACb,EAAEL,CAAgB,CAC3B,CACA","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useFocusable.cjs.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useFocusable.mjs"],"sourcesContent":["import {focusSafely as $3ad3f6e1647bc98d$export$80f3e147d781571c} from \"./focusSafely.mjs\";\nimport {useFocus as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6} from \"./useFocus.mjs\";\nimport {useKeyboard as $46d819fcbaf35654$export$8f71654801c2f7cd} from \"./useKeyboard.mjs\";\nimport {useSyncRef as $fcPuG$useSyncRef, useObjectRef as $fcPuG$useObjectRef, mergeProps as $fcPuG$mergeProps, getOwnerWindow as $fcPuG$getOwnerWindow, isFocusable as $fcPuG$isFocusable, mergeRefs as $fcPuG$mergeRefs} from \"@react-aria/utils\";\nimport $fcPuG$react, {useContext as $fcPuG$useContext, useRef as $fcPuG$useRef, useEffect as $fcPuG$useEffect, forwardRef as $fcPuG$forwardRef} 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 */ \n\n\n\n\nlet $f645667febf57a63$export$f9762fab77588ecb = /*#__PURE__*/ (0, $fcPuG$react).createContext(null);\nfunction $f645667febf57a63$var$useFocusableContext(ref) {\n let context = (0, $fcPuG$useContext)($f645667febf57a63$export$f9762fab77588ecb) || {};\n (0, $fcPuG$useSyncRef)(context, ref);\n // eslint-disable-next-line\n let { ref: _, ...otherProps } = context;\n return otherProps;\n}\nconst $f645667febf57a63$export$13f3202a3e5ddd5 = /*#__PURE__*/ (0, $fcPuG$react).forwardRef(function FocusableProvider(props, ref) {\n let { children: children, ...otherProps } = props;\n let objRef = (0, $fcPuG$useObjectRef)(ref);\n let context = {\n ...otherProps,\n ref: objRef\n };\n return /*#__PURE__*/ (0, $fcPuG$react).createElement($f645667febf57a63$export$f9762fab77588ecb.Provider, {\n value: context\n }, children);\n});\nfunction $f645667febf57a63$export$4c014de7c8940b4c(props, domRef) {\n let { focusProps: focusProps } = (0, $a1ea59d68270f0dd$export$f8168d8dd8fd66e6)(props);\n let { keyboardProps: keyboardProps } = (0, $46d819fcbaf35654$export$8f71654801c2f7cd)(props);\n let interactions = (0, $fcPuG$mergeProps)(focusProps, keyboardProps);\n let domProps = $f645667febf57a63$var$useFocusableContext(domRef);\n let interactionProps = props.isDisabled ? {} : domProps;\n let autoFocusRef = (0, $fcPuG$useRef)(props.autoFocus);\n (0, $fcPuG$useEffect)(()=>{\n if (autoFocusRef.current && domRef.current) (0, $3ad3f6e1647bc98d$export$80f3e147d781571c)(domRef.current);\n autoFocusRef.current = false;\n }, [\n domRef\n ]);\n // Always set a tabIndex so that Safari allows focusing native buttons and inputs.\n let tabIndex = props.excludeFromTabOrder ? -1 : 0;\n if (props.isDisabled) tabIndex = undefined;\n return {\n focusableProps: (0, $fcPuG$mergeProps)({\n ...interactions,\n tabIndex: tabIndex\n }, interactionProps)\n };\n}\nconst $f645667febf57a63$export$35a3bebf7ef2d934 = /*#__PURE__*/ (0, $fcPuG$forwardRef)(({ children: children, ...props }, ref)=>{\n ref = (0, $fcPuG$useObjectRef)(ref);\n let { focusableProps: focusableProps } = $f645667febf57a63$export$4c014de7c8940b4c(props, ref);\n let child = (0, $fcPuG$react).Children.only(children);\n (0, $fcPuG$useEffect)(()=>{\n if (process.env.NODE_ENV === 'production') return;\n let el = ref.current;\n if (!el || !(el instanceof (0, $fcPuG$getOwnerWindow)(el).Element)) {\n console.error('<Focusable> child must forward its ref to a DOM element.');\n return;\n }\n if (!props.isDisabled && !(0, $fcPuG$isFocusable)(el)) {\n console.warn('<Focusable> child must be focusable. Please ensure the tabIndex prop is passed through.');\n return;\n }\n if (el.localName !== 'button' && el.localName !== 'input' && el.localName !== 'select' && el.localName !== 'textarea' && el.localName !== 'a' && el.localName !== 'area' && el.localName !== 'summary' && el.localName !== 'img' && el.localName !== 'svg') {\n let role = el.getAttribute('role');\n if (!role) console.warn('<Focusable> child must have an interactive ARIA role.');\n else if (// https://w3c.github.io/aria/#widget_roles\n role !== 'application' && role !== 'button' && role !== 'checkbox' && role !== 'combobox' && role !== 'gridcell' && role !== 'link' && role !== 'menuitem' && role !== 'menuitemcheckbox' && role !== 'menuitemradio' && role !== 'option' && role !== 'radio' && role !== 'searchbox' && role !== 'separator' && role !== 'slider' && role !== 'spinbutton' && role !== 'switch' && role !== 'tab' && role !== 'tabpanel' && role !== 'textbox' && role !== 'treeitem' && // aria-describedby is also announced on these roles\n role !== 'img' && role !== 'meter' && role !== 'progressbar') console.warn(`<Focusable> child must have an interactive ARIA role. Got \"${role}\".`);\n }\n }, [\n ref,\n props.isDisabled\n ]);\n // @ts-ignore\n let childRef = parseInt((0, $fcPuG$react).version, 10) < 19 ? child.ref : child.props.ref;\n return /*#__PURE__*/ (0, $fcPuG$react).cloneElement(child, {\n ...(0, $fcPuG$mergeProps)(focusableProps, child.props),\n // @ts-ignore\n ref: (0, $fcPuG$mergeRefs)(childRef, ref)\n });\n});\n\n\nexport {$f645667febf57a63$export$f9762fab77588ecb as FocusableContext, $f645667febf57a63$export$13f3202a3e5ddd5 as FocusableProvider, $f645667febf57a63$export$4c014de7c8940b4c as useFocusable, $f645667febf57a63$export$35a3bebf7ef2d934 as Focusable};\n//# sourceMappingURL=useFocusable.module.js.map\n"],"names":["$f645667febf57a63$export$f9762fab77588ecb","$fcPuG$react","$f645667febf57a63$var$useFocusableContext","ref","context","$fcPuG$useContext","$fcPuG$useSyncRef","_","otherProps","$f645667febf57a63$export$4c014de7c8940b4c","props","domRef","focusProps","$a1ea59d68270f0dd$export$f8168d8dd8fd66e6","keyboardProps","$46d819fcbaf35654$export$8f71654801c2f7cd","interactions","$fcPuG$mergeProps","domProps","interactionProps","autoFocusRef","$fcPuG$useRef","$fcPuG$useEffect","$3ad3f6e1647bc98d$export$80f3e147d781571c","tabIndex"],"mappings":"2OAqBG,IAACA,EAA8DC,EAAc,cAAc,IAAI,EAClG,SAASC,EAA0CC,EAAK,CACpD,IAAIC,EAAcC,aAAmBL,CAAyC,GAAK,CAAA,EAC/EM,EAAAA,WAAmBF,EAASD,CAAG,EAEnC,GAAI,CAAE,IAAKI,EAAG,GAAGC,CAAU,EAAKJ,EAChC,OAAOI,CACX,CAYA,SAASC,EAA0CC,EAAOC,EAAQ,CAC9D,GAAI,CAAE,WAAYC,CAAU,EAASC,EAAAA,SAA2CH,CAAK,EACjF,CAAE,cAAeI,CAAa,EAASC,EAAAA,YAA2CL,CAAK,EACvFM,EAAmBC,aAAmBL,EAAYE,CAAa,EAC/DI,EAAWhB,EAA0CS,CAAM,EAC3DQ,EAAmBT,EAAM,WAAa,CAAA,EAAKQ,EAC3CE,EAAmBC,SAAeX,EAAM,SAAS,EACjDY,EAAAA,UAAkB,IAAI,CAClBF,EAAa,SAAWT,EAAO,SAAaY,EAAAA,YAA2CZ,EAAO,OAAO,EACzGS,EAAa,QAAU,EAC3B,EAAG,CACCT,CACR,CAAK,EAED,IAAIa,EAAWd,EAAM,oBAAsB,GAAK,EAChD,OAAIA,EAAM,aAAYc,EAAW,QAC1B,CACH,eAAoBP,EAAAA,WAAmB,CACnC,GAAGD,EACH,SAAUQ,CACtB,EAAWL,CAAgB,CAC3B,CACA","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusable.es.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useFocusable.mjs"],"sourcesContent":["import {focusSafely as $3ad3f6e1647bc98d$export$80f3e147d781571c} from \"./focusSafely.mjs\";\nimport {useFocus as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6} from \"./useFocus.mjs\";\nimport {useKeyboard as $46d819fcbaf35654$export$8f71654801c2f7cd} from \"./useKeyboard.mjs\";\nimport {useSyncRef as $fcPuG$useSyncRef, useObjectRef as $fcPuG$useObjectRef, mergeProps as $fcPuG$mergeProps, getOwnerWindow as $fcPuG$getOwnerWindow, isFocusable as $fcPuG$isFocusable, mergeRefs as $fcPuG$mergeRefs} from \"@react-aria/utils\";\nimport $fcPuG$react, {useContext as $fcPuG$useContext, useRef as $fcPuG$useRef, useEffect as $fcPuG$useEffect, forwardRef as $fcPuG$forwardRef} 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 */ \n\n\n\n\nlet $f645667febf57a63$export$f9762fab77588ecb = /*#__PURE__*/ (0, $fcPuG$react).createContext(null);\nfunction $f645667febf57a63$var$useFocusableContext(ref) {\n let context = (0, $fcPuG$useContext)($f645667febf57a63$export$f9762fab77588ecb) || {};\n (0, $fcPuG$useSyncRef)(context, ref);\n // eslint-disable-next-line\n let { ref: _, ...otherProps } = context;\n return otherProps;\n}\nconst $f645667febf57a63$export$13f3202a3e5ddd5 = /*#__PURE__*/ (0, $fcPuG$react).forwardRef(function FocusableProvider(props, ref) {\n let { children: children, ...otherProps } = props;\n let objRef = (0, $fcPuG$useObjectRef)(ref);\n let context = {\n ...otherProps,\n ref: objRef\n };\n return /*#__PURE__*/ (0, $fcPuG$react).createElement($f645667febf57a63$export$f9762fab77588ecb.Provider, {\n value: context\n }, children);\n});\nfunction $f645667febf57a63$export$4c014de7c8940b4c(props, domRef) {\n let { focusProps: focusProps } = (0, $a1ea59d68270f0dd$export$f8168d8dd8fd66e6)(props);\n let { keyboardProps: keyboardProps } = (0, $46d819fcbaf35654$export$8f71654801c2f7cd)(props);\n let interactions = (0, $fcPuG$mergeProps)(focusProps, keyboardProps);\n let domProps = $f645667febf57a63$var$useFocusableContext(domRef);\n let interactionProps = props.isDisabled ? {} : domProps;\n let autoFocusRef = (0, $fcPuG$useRef)(props.autoFocus);\n (0, $fcPuG$useEffect)(()=>{\n if (autoFocusRef.current && domRef.current) (0, $3ad3f6e1647bc98d$export$80f3e147d781571c)(domRef.current);\n autoFocusRef.current = false;\n }, [\n domRef\n ]);\n // Always set a tabIndex so that Safari allows focusing native buttons and inputs.\n let tabIndex = props.excludeFromTabOrder ? -1 : 0;\n if (props.isDisabled) tabIndex = undefined;\n return {\n focusableProps: (0, $fcPuG$mergeProps)({\n ...interactions,\n tabIndex: tabIndex\n }, interactionProps)\n };\n}\nconst $f645667febf57a63$export$35a3bebf7ef2d934 = /*#__PURE__*/ (0, $fcPuG$forwardRef)(({ children: children, ...props }, ref)=>{\n ref = (0, $fcPuG$useObjectRef)(ref);\n let { focusableProps: focusableProps } = $f645667febf57a63$export$4c014de7c8940b4c(props, ref);\n let child = (0, $fcPuG$react).Children.only(children);\n (0, $fcPuG$useEffect)(()=>{\n if (process.env.NODE_ENV === 'production') return;\n let el = ref.current;\n if (!el || !(el instanceof (0, $fcPuG$getOwnerWindow)(el).Element)) {\n console.error('<Focusable> child must forward its ref to a DOM element.');\n return;\n }\n if (!props.isDisabled && !(0, $fcPuG$isFocusable)(el)) {\n console.warn('<Focusable> child must be focusable. Please ensure the tabIndex prop is passed through.');\n return;\n }\n if (el.localName !== 'button' && el.localName !== 'input' && el.localName !== 'select' && el.localName !== 'textarea' && el.localName !== 'a' && el.localName !== 'area' && el.localName !== 'summary' && el.localName !== 'img' && el.localName !== 'svg') {\n let role = el.getAttribute('role');\n if (!role) console.warn('<Focusable> child must have an interactive ARIA role.');\n else if (// https://w3c.github.io/aria/#widget_roles\n role !== 'application' && role !== 'button' && role !== 'checkbox' && role !== 'combobox' && role !== 'gridcell' && role !== 'link' && role !== 'menuitem' && role !== 'menuitemcheckbox' && role !== 'menuitemradio' && role !== 'option' && role !== 'radio' && role !== 'searchbox' && role !== 'separator' && role !== 'slider' && role !== 'spinbutton' && role !== 'switch' && role !== 'tab' && role !== 'tabpanel' && role !== 'textbox' && role !== 'treeitem' && // aria-describedby is also announced on these roles\n role !== 'img' && role !== 'meter' && role !== 'progressbar') console.warn(`<Focusable> child must have an interactive ARIA role. Got \"${role}\".`);\n }\n }, [\n ref,\n props.isDisabled\n ]);\n // @ts-ignore\n let childRef = parseInt((0, $fcPuG$react).version, 10) < 19 ? child.ref : child.props.ref;\n return /*#__PURE__*/ (0, $fcPuG$react).cloneElement(child, {\n ...(0, $fcPuG$mergeProps)(focusableProps, child.props),\n // @ts-ignore\n ref: (0, $fcPuG$mergeRefs)(childRef, ref)\n });\n});\n\n\nexport {$f645667febf57a63$export$f9762fab77588ecb as FocusableContext, $f645667febf57a63$export$13f3202a3e5ddd5 as FocusableProvider, $f645667febf57a63$export$4c014de7c8940b4c as useFocusable, $f645667febf57a63$export$35a3bebf7ef2d934 as Focusable};\n//# sourceMappingURL=useFocusable.module.js.map\n"],"names":["$f645667febf57a63$export$f9762fab77588ecb","$fcPuG$react","$f645667febf57a63$var$useFocusableContext","ref","context","$fcPuG$useContext","$fcPuG$useSyncRef","_","otherProps","$f645667febf57a63$export$4c014de7c8940b4c","props","domRef","focusProps","$a1ea59d68270f0dd$export$f8168d8dd8fd66e6","keyboardProps","$46d819fcbaf35654$export$8f71654801c2f7cd","interactions","$fcPuG$mergeProps","domProps","interactionProps","autoFocusRef","$fcPuG$useRef","$fcPuG$useEffect","$3ad3f6e1647bc98d$export$80f3e147d781571c","tabIndex"],"mappings":";;;;;AAqBG,IAACA,IAA8DC,gBAAAA,EAAc,cAAc,IAAI;AAClG,SAASC,EAA0CC,GAAK;AACpD,MAAIC,IAAcC,EAAmBL,CAAyC,KAAK,CAAA;AACnF,EAAIM,EAAmBF,GAASD,CAAG;AAEnC,MAAI,EAAE,KAAKI,GAAG,GAAGC,EAAU,IAAKJ;AAChC,SAAOI;AACX;AAYA,SAASC,EAA0CC,GAAOC,GAAQ;AAC9D,MAAI,EAAE,YAAYC,EAAU,IAASC,EAA2CH,CAAK,GACjF,EAAE,eAAeI,EAAa,IAASC,EAA2CL,CAAK,GACvFM,IAAmBC,EAAmBL,GAAYE,CAAa,GAC/DI,IAAWhB,EAA0CS,CAAM,GAC3DQ,IAAmBT,EAAM,aAAa,CAAA,IAAKQ,GAC3CE,IAAmBC,EAAeX,EAAM,SAAS;AACrD,EAAIY,EAAkB,MAAI;AACtB,IAAIF,EAAa,WAAWT,EAAO,WAAaY,EAA2CZ,EAAO,OAAO,GACzGS,EAAa,UAAU;AAAA,EAC/B,GAAO;AAAA,IACCT;AAAA,EACR,CAAK;AAED,MAAIa,IAAWd,EAAM,sBAAsB,KAAK;AAChD,SAAIA,EAAM,eAAYc,IAAW,SAC1B;AAAA,IACH,gBAAoBP,EAAmB;AAAA,MACnC,GAAGD;AAAA,MACH,UAAUQ;AAAA,IACb,GAAEL,CAAgB;AAAA,EAC3B;AACA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useFocusable.es.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useFocusable.mjs"],"sourcesContent":["import {focusSafely as $3ad3f6e1647bc98d$export$80f3e147d781571c} from \"./focusSafely.mjs\";\nimport {useFocus as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6} from \"./useFocus.mjs\";\nimport {useKeyboard as $46d819fcbaf35654$export$8f71654801c2f7cd} from \"./useKeyboard.mjs\";\nimport {useSyncRef as $fcPuG$useSyncRef, useObjectRef as $fcPuG$useObjectRef, mergeProps as $fcPuG$mergeProps, getOwnerWindow as $fcPuG$getOwnerWindow, isFocusable as $fcPuG$isFocusable, mergeRefs as $fcPuG$mergeRefs} from \"@react-aria/utils\";\nimport $fcPuG$react, {useContext as $fcPuG$useContext, useRef as $fcPuG$useRef, useEffect as $fcPuG$useEffect, forwardRef as $fcPuG$forwardRef} 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 */ \n\n\n\n\nlet $f645667febf57a63$export$f9762fab77588ecb = /*#__PURE__*/ (0, $fcPuG$react).createContext(null);\nfunction $f645667febf57a63$var$useFocusableContext(ref) {\n let context = (0, $fcPuG$useContext)($f645667febf57a63$export$f9762fab77588ecb) || {};\n (0, $fcPuG$useSyncRef)(context, ref);\n // eslint-disable-next-line\n let { ref: _, ...otherProps } = context;\n return otherProps;\n}\nconst $f645667febf57a63$export$13f3202a3e5ddd5 = /*#__PURE__*/ (0, $fcPuG$react).forwardRef(function FocusableProvider(props, ref) {\n let { children: children, ...otherProps } = props;\n let objRef = (0, $fcPuG$useObjectRef)(ref);\n let context = {\n ...otherProps,\n ref: objRef\n };\n return /*#__PURE__*/ (0, $fcPuG$react).createElement($f645667febf57a63$export$f9762fab77588ecb.Provider, {\n value: context\n }, children);\n});\nfunction $f645667febf57a63$export$4c014de7c8940b4c(props, domRef) {\n let { focusProps: focusProps } = (0, $a1ea59d68270f0dd$export$f8168d8dd8fd66e6)(props);\n let { keyboardProps: keyboardProps } = (0, $46d819fcbaf35654$export$8f71654801c2f7cd)(props);\n let interactions = (0, $fcPuG$mergeProps)(focusProps, keyboardProps);\n let domProps = $f645667febf57a63$var$useFocusableContext(domRef);\n let interactionProps = props.isDisabled ? {} : domProps;\n let autoFocusRef = (0, $fcPuG$useRef)(props.autoFocus);\n (0, $fcPuG$useEffect)(()=>{\n if (autoFocusRef.current && domRef.current) (0, $3ad3f6e1647bc98d$export$80f3e147d781571c)(domRef.current);\n autoFocusRef.current = false;\n }, [\n domRef\n ]);\n // Always set a tabIndex so that Safari allows focusing native buttons and inputs.\n let tabIndex = props.excludeFromTabOrder ? -1 : 0;\n if (props.isDisabled) tabIndex = undefined;\n return {\n focusableProps: (0, $fcPuG$mergeProps)({\n ...interactions,\n tabIndex: tabIndex\n }, interactionProps)\n };\n}\nconst $f645667febf57a63$export$35a3bebf7ef2d934 = /*#__PURE__*/ (0, $fcPuG$forwardRef)(({ children: children, ...props }, ref)=>{\n ref = (0, $fcPuG$useObjectRef)(ref);\n let { focusableProps: focusableProps } = $f645667febf57a63$export$4c014de7c8940b4c(props, ref);\n let child = (0, $fcPuG$react).Children.only(children);\n (0, $fcPuG$useEffect)(()=>{\n if (process.env.NODE_ENV === 'production') return;\n let el = ref.current;\n if (!el || !(el instanceof (0, $fcPuG$getOwnerWindow)(el).Element)) {\n console.error('<Focusable> child must forward its ref to a DOM element.');\n return;\n }\n if (!props.isDisabled && !(0, $fcPuG$isFocusable)(el)) {\n console.warn('<Focusable> child must be focusable. Please ensure the tabIndex prop is passed through.');\n return;\n }\n if (el.localName !== 'button' && el.localName !== 'input' && el.localName !== 'select' && el.localName !== 'textarea' && el.localName !== 'a' && el.localName !== 'area' && el.localName !== 'summary' && el.localName !== 'img' && el.localName !== 'svg') {\n let role = el.getAttribute('role');\n if (!role) console.warn('<Focusable> child must have an interactive ARIA role.');\n else if (// https://w3c.github.io/aria/#widget_roles\n role !== 'application' && role !== 'button' && role !== 'checkbox' && role !== 'combobox' && role !== 'gridcell' && role !== 'link' && role !== 'menuitem' && role !== 'menuitemcheckbox' && role !== 'menuitemradio' && role !== 'option' && role !== 'radio' && role !== 'searchbox' && role !== 'separator' && role !== 'slider' && role !== 'spinbutton' && role !== 'switch' && role !== 'tab' && role !== 'tabpanel' && role !== 'textbox' && role !== 'treeitem' && // aria-describedby is also announced on these roles\n role !== 'img' && role !== 'meter' && role !== 'progressbar') console.warn(`<Focusable> child must have an interactive ARIA role. Got \"${role}\".`);\n }\n }, [\n ref,\n props.isDisabled\n ]);\n // @ts-ignore\n let childRef = parseInt((0, $fcPuG$react).version, 10) < 19 ? child.ref : child.props.ref;\n return /*#__PURE__*/ (0, $fcPuG$react).cloneElement(child, {\n ...(0, $fcPuG$mergeProps)(focusableProps, child.props),\n // @ts-ignore\n ref: (0, $fcPuG$mergeRefs)(childRef, ref)\n });\n});\n\n\nexport {$f645667febf57a63$export$f9762fab77588ecb as FocusableContext, $f645667febf57a63$export$13f3202a3e5ddd5 as FocusableProvider, $f645667febf57a63$export$4c014de7c8940b4c as useFocusable, $f645667febf57a63$export$35a3bebf7ef2d934 as Focusable};\n//# sourceMappingURL=useFocusable.module.js.map\n"],"names":["$f645667febf57a63$export$f9762fab77588ecb","$fcPuG$react","$f645667febf57a63$var$useFocusableContext","ref","context","$fcPuG$useContext","$fcPuG$useSyncRef","_","otherProps","$f645667febf57a63$export$4c014de7c8940b4c","props","domRef","focusProps","$a1ea59d68270f0dd$export$f8168d8dd8fd66e6","keyboardProps","$46d819fcbaf35654$export$8f71654801c2f7cd","interactions","$fcPuG$mergeProps","domProps","interactionProps","autoFocusRef","$fcPuG$useRef","$fcPuG$useEffect","$3ad3f6e1647bc98d$export$80f3e147d781571c","tabIndex"],"mappings":";;;;;AAqBG,IAACA,IAA8DC,gBAAAA,EAAc,cAAc,IAAI;AAClG,SAASC,EAA0CC,GAAK;AACpD,MAAIC,IAAcC,EAAmBL,CAAyC,KAAK,CAAA;AACnF,EAAIM,EAAmBF,GAASD,CAAG;AAEnC,MAAI,EAAE,KAAKI,GAAG,GAAGC,EAAU,IAAKJ;AAChC,SAAOI;AACX;AAYA,SAASC,EAA0CC,GAAOC,GAAQ;AAC9D,MAAI,EAAE,YAAYC,EAAU,IAASC,EAA2CH,CAAK,GACjF,EAAE,eAAeI,EAAa,IAASC,EAA2CL,CAAK,GACvFM,IAAmBC,EAAmBL,GAAYE,CAAa,GAC/DI,IAAWhB,EAA0CS,CAAM,GAC3DQ,IAAmBT,EAAM,aAAa,CAAA,IAAKQ,GAC3CE,IAAmBC,EAAeX,EAAM,SAAS;AACrD,EAAIY,EAAkB,MAAI;AACtB,IAAIF,EAAa,WAAWT,EAAO,WAAaY,EAA2CZ,EAAO,OAAO,GACzGS,EAAa,UAAU;AAAA,EAC3B,GAAG;AAAA,IACCT;AAAA,EACR,CAAK;AAED,MAAIa,IAAWd,EAAM,sBAAsB,KAAK;AAChD,SAAIA,EAAM,eAAYc,IAAW,SAC1B;AAAA,IACH,gBAAoBP,EAAmB;AAAA,MACnC,GAAGD;AAAA,MACH,UAAUQ;AAAA,IACtB,GAAWL,CAAgB;AAAA,EAC3B;AACA;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"useInteractOutside.cjs.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useInteractOutside.mjs"],"sourcesContent":["import {useEffectEvent as $ispOf$useEffectEvent, getOwnerDocument as $ispOf$getOwnerDocument} from \"@react-aria/utils\";\nimport {useRef as $ispOf$useRef, useEffect as $ispOf$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\nfunction $e0b6e0b68ec7f50f$export$872b660ac5a1ff98(props) {\n let { ref: ref, onInteractOutside: onInteractOutside, isDisabled: isDisabled, onInteractOutsideStart: onInteractOutsideStart } = props;\n let stateRef = (0, $ispOf$useRef)({\n isPointerDown: false,\n ignoreEmulatedMouseEvents: false\n });\n let onPointerDown = (0, $ispOf$useEffectEvent)((e)=>{\n if (onInteractOutside && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref)) {\n if (onInteractOutsideStart) onInteractOutsideStart(e);\n stateRef.current.isPointerDown = true;\n }\n });\n let triggerInteractOutside = (0, $ispOf$useEffectEvent)((e)=>{\n if (onInteractOutside) onInteractOutside(e);\n });\n (0, $ispOf$useEffect)(()=>{\n let state = stateRef.current;\n if (isDisabled) return;\n const element = ref.current;\n const documentObject = (0, $ispOf$getOwnerDocument)(element);\n // Use pointer events if available. Otherwise, fall back to mouse and touch events.\n if (typeof PointerEvent !== 'undefined') {\n let onClick = (e)=>{\n if (state.isPointerDown && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref)) triggerInteractOutside(e);\n state.isPointerDown = false;\n };\n // changing these to capture phase fixed combobox\n // Use click instead of pointerup to avoid Android Chrome issue\n // https://issues.chromium.org/issues/40732224\n documentObject.addEventListener('pointerdown', onPointerDown, true);\n documentObject.addEventListener('click', onClick, true);\n return ()=>{\n documentObject.removeEventListener('pointerdown', onPointerDown, true);\n documentObject.removeEventListener('click', onClick, true);\n };\n } else if (process.env.NODE_ENV === 'test') {\n let onMouseUp = (e)=>{\n if (state.ignoreEmulatedMouseEvents) state.ignoreEmulatedMouseEvents = false;\n else if (state.isPointerDown && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref)) triggerInteractOutside(e);\n state.isPointerDown = false;\n };\n let onTouchEnd = (e)=>{\n state.ignoreEmulatedMouseEvents = true;\n if (state.isPointerDown && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref)) triggerInteractOutside(e);\n state.isPointerDown = false;\n };\n documentObject.addEventListener('mousedown', onPointerDown, true);\n documentObject.addEventListener('mouseup', onMouseUp, true);\n documentObject.addEventListener('touchstart', onPointerDown, true);\n documentObject.addEventListener('touchend', onTouchEnd, true);\n return ()=>{\n documentObject.removeEventListener('mousedown', onPointerDown, true);\n documentObject.removeEventListener('mouseup', onMouseUp, true);\n documentObject.removeEventListener('touchstart', onPointerDown, true);\n documentObject.removeEventListener('touchend', onTouchEnd, true);\n };\n }\n }, [\n ref,\n isDisabled,\n onPointerDown,\n triggerInteractOutside\n ]);\n}\nfunction $e0b6e0b68ec7f50f$var$isValidEvent(event, ref) {\n if (event.button > 0) return false;\n if (event.target) {\n // if the event target is no longer in the document, ignore\n const ownerDocument = event.target.ownerDocument;\n if (!ownerDocument || !ownerDocument.documentElement.contains(event.target)) return false;\n // If the target is within a top layer element (e.g. toasts), ignore.\n if (event.target.closest('[data-react-aria-top-layer]')) return false;\n }\n if (!ref.current) return false;\n // When the event source is inside a Shadow DOM, event.target is just the shadow root.\n // Using event.composedPath instead means we can get the actual element inside the shadow root.\n // This only works if the shadow root is open, there is no way to detect if it is closed.\n // If the event composed path contains the ref, interaction is inside.\n return !event.composedPath().includes(ref.current);\n}\n\n\nexport {$e0b6e0b68ec7f50f$export$872b660ac5a1ff98 as useInteractOutside};\n//# sourceMappingURL=useInteractOutside.module.js.map\n"],"names":["$e0b6e0b68ec7f50f$export$872b660ac5a1ff98","props","ref","onInteractOutside","isDisabled","onInteractOutsideStart","stateRef","$ispOf$useRef","onPointerDown","$ispOf$useEffectEvent","$e0b6e0b68ec7f50f$var$isValidEvent","triggerInteractOutside","$ispOf$useEffect","state","element","documentObject","$ispOf$getOwnerDocument","onClick","e","onMouseUp","onTouchEnd","event","ownerDocument"],"mappings":"wIAmBA,SAASA,EAA0CC,EAAO,CACtD,GAAI,CAAE,IAAKC,EAAK,kBAAmBC,EAAmB,WAAYC,EAAY,uBAAwBC,CAAwB,EAAGJ,EAC7HK,EAAeC,SAAe,CAC9B,cAAe,GACf,0BAA2B,EACnC,CAAK,EACGC,EAAoBC,iBAAwB,GAAI,CAC5CN,GAAqBO,EAAmC,EAAGR,CAAG,IAC1DG,GAAwBA,EAAuB,CAAC,EACpDC,EAAS,QAAQ,cAAgB,GAE7C,CAAK,EACGK,EAA6BF,iBAAwB,GAAI,CACrDN,GAAmBA,EAAkB,CAAC,CAClD,CAAK,EACGS,EAAgB,UAAE,IAAI,CACtB,IAAIC,EAAQP,EAAS,QACrB,GAAIF,EAAY,OAChB,MAAMU,EAAUZ,EAAI,QACda,EAAqBC,mBAAyBF,CAAO,EAE3D,GAAI,OAAO,aAAiB,IAAa,CACrC,IAAIG,EAAWC,GAAI,CACXL,EAAM,eAAiBH,EAAmCQ,EAAGhB,CAAG,GAAGS,EAAuBO,CAAC,EAC/FL,EAAM,cAAgB,EACtC,EAIY,OAAAE,EAAe,iBAAiB,cAAeP,EAAe,EAAI,EAClEO,EAAe,iBAAiB,QAASE,EAAS,EAAI,EAC/C,IAAI,CACPF,EAAe,oBAAoB,cAAeP,EAAe,EAAI,EACrEO,EAAe,oBAAoB,QAASE,EAAS,EAAI,CACzE,CACS,SAAU,QAAQ,IAAI,WAAa,OAAQ,CACxC,IAAIE,EAAaD,GAAI,CACbL,EAAM,0BAA2BA,EAAM,0BAA4B,GAC9DA,EAAM,eAAiBH,EAAmCQ,EAAGhB,CAAG,GAAGS,EAAuBO,CAAC,EACpGL,EAAM,cAAgB,EACtC,EACgBO,EAAcF,GAAI,CAClBL,EAAM,0BAA4B,GAC9BA,EAAM,eAAiBH,EAAmCQ,EAAGhB,CAAG,GAAGS,EAAuBO,CAAC,EAC/FL,EAAM,cAAgB,EACtC,EACY,OAAAE,EAAe,iBAAiB,YAAaP,EAAe,EAAI,EAChEO,EAAe,iBAAiB,UAAWI,EAAW,EAAI,EAC1DJ,EAAe,iBAAiB,aAAcP,EAAe,EAAI,EACjEO,EAAe,iBAAiB,WAAYK,EAAY,EAAI,EACrD,IAAI,CACPL,EAAe,oBAAoB,YAAaP,EAAe,EAAI,EACnEO,EAAe,oBAAoB,UAAWI,EAAW,EAAI,EAC7DJ,EAAe,oBAAoB,aAAcP,EAAe,EAAI,EACpEO,EAAe,oBAAoB,WAAYK,EAAY,EAAI,CAC/E,CACS,CACT,EAAO,CACClB,EACAE,EACAI,EACAG,CACR,CAAK,CACL,CACA,SAASD,EAAmCW,EAAOnB,EAAK,CACpD,GAAImB,EAAM,OAAS,EAAG,MAAO,GAC7B,GAAIA,EAAM,OAAQ,CAEd,MAAMC,EAAgBD,EAAM,OAAO,cAGnC,GAFI,CAACC,GAAiB,CAACA,EAAc,gBAAgB,SAASD,EAAM,MAAM,GAEtEA,EAAM,OAAO,QAAQ,6BAA6B,EAAG,MAAO,EACnE,CACD,OAAKnB,EAAI,QAKF,CAACmB,EAAM,aAAY,EAAG,SAASnB,EAAI,OAAO,EALxB,EAM7B","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useInteractOutside.cjs.js","sources":["../../../../../node_modules/@react-aria/interactions/dist/useInteractOutside.mjs"],"sourcesContent":["import {useEffectEvent as $ispOf$useEffectEvent, getOwnerDocument as $ispOf$getOwnerDocument} from \"@react-aria/utils\";\nimport {useRef as $ispOf$useRef, useEffect as $ispOf$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\nfunction $e0b6e0b68ec7f50f$export$872b660ac5a1ff98(props) {\n let { ref: ref, onInteractOutside: onInteractOutside, isDisabled: isDisabled, onInteractOutsideStart: onInteractOutsideStart } = props;\n let stateRef = (0, $ispOf$useRef)({\n isPointerDown: false,\n ignoreEmulatedMouseEvents: false\n });\n let onPointerDown = (0, $ispOf$useEffectEvent)((e)=>{\n if (onInteractOutside && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref)) {\n if (onInteractOutsideStart) onInteractOutsideStart(e);\n stateRef.current.isPointerDown = true;\n }\n });\n let triggerInteractOutside = (0, $ispOf$useEffectEvent)((e)=>{\n if (onInteractOutside) onInteractOutside(e);\n });\n (0, $ispOf$useEffect)(()=>{\n let state = stateRef.current;\n if (isDisabled) return;\n const element = ref.current;\n const documentObject = (0, $ispOf$getOwnerDocument)(element);\n // Use pointer events if available. Otherwise, fall back to mouse and touch events.\n if (typeof PointerEvent !== 'undefined') {\n let onClick = (e)=>{\n if (state.isPointerDown && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref)) triggerInteractOutside(e);\n state.isPointerDown = false;\n };\n // changing these to capture phase fixed combobox\n // Use click instead of pointerup to avoid Android Chrome issue\n // https://issues.chromium.org/issues/40732224\n documentObject.addEventListener('pointerdown', onPointerDown, true);\n documentObject.addEventListener('click', onClick, true);\n return ()=>{\n documentObject.removeEventListener('pointerdown', onPointerDown, true);\n documentObject.removeEventListener('click', onClick, true);\n };\n } else if (process.env.NODE_ENV === 'test') {\n let onMouseUp = (e)=>{\n if (state.ignoreEmulatedMouseEvents) state.ignoreEmulatedMouseEvents = false;\n else if (state.isPointerDown && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref)) triggerInteractOutside(e);\n state.isPointerDown = false;\n };\n let onTouchEnd = (e)=>{\n state.ignoreEmulatedMouseEvents = true;\n if (state.isPointerDown && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref)) triggerInteractOutside(e);\n state.isPointerDown = false;\n };\n documentObject.addEventListener('mousedown', onPointerDown, true);\n documentObject.addEventListener('mouseup', onMouseUp, true);\n documentObject.addEventListener('touchstart', onPointerDown, true);\n documentObject.addEventListener('touchend', onTouchEnd, true);\n return ()=>{\n documentObject.removeEventListener('mousedown', onPointerDown, true);\n documentObject.removeEventListener('mouseup', onMouseUp, true);\n documentObject.removeEventListener('touchstart', onPointerDown, true);\n documentObject.removeEventListener('touchend', onTouchEnd, true);\n };\n }\n }, [\n ref,\n isDisabled,\n onPointerDown,\n triggerInteractOutside\n ]);\n}\nfunction $e0b6e0b68ec7f50f$var$isValidEvent(event, ref) {\n if (event.button > 0) return false;\n if (event.target) {\n // if the event target is no longer in the document, ignore\n const ownerDocument = event.target.ownerDocument;\n if (!ownerDocument || !ownerDocument.documentElement.contains(event.target)) return false;\n // If the target is within a top layer element (e.g. toasts), ignore.\n if (event.target.closest('[data-react-aria-top-layer]')) return false;\n }\n if (!ref.current) return false;\n // When the event source is inside a Shadow DOM, event.target is just the shadow root.\n // Using event.composedPath instead means we can get the actual element inside the shadow root.\n // This only works if the shadow root is open, there is no way to detect if it is closed.\n // If the event composed path contains the ref, interaction is inside.\n return !event.composedPath().includes(ref.current);\n}\n\n\nexport {$e0b6e0b68ec7f50f$export$872b660ac5a1ff98 as useInteractOutside};\n//# sourceMappingURL=useInteractOutside.module.js.map\n"],"names":["$e0b6e0b68ec7f50f$export$872b660ac5a1ff98","props","ref","onInteractOutside","isDisabled","onInteractOutsideStart","stateRef","$ispOf$useRef","onPointerDown","$ispOf$useEffectEvent","$e0b6e0b68ec7f50f$var$isValidEvent","triggerInteractOutside","$ispOf$useEffect","state","element","documentObject","$ispOf$getOwnerDocument","onClick","e","onMouseUp","onTouchEnd","event","ownerDocument"],"mappings":"wIAmBA,SAASA,EAA0CC,EAAO,CACtD,GAAI,CAAE,IAAKC,EAAK,kBAAmBC,EAAmB,WAAYC,EAAY,uBAAwBC,CAAsB,EAAKJ,EAC7HK,EAAeC,SAAe,CAC9B,cAAe,GACf,0BAA2B,EACnC,CAAK,EACGC,EAAoBC,iBAAwB,GAAI,CAC5CN,GAAqBO,EAAmC,EAAGR,CAAG,IAC1DG,GAAwBA,EAAuB,CAAC,EACpDC,EAAS,QAAQ,cAAgB,GAEzC,CAAC,EACGK,EAA6BF,iBAAwB,GAAI,CACrDN,GAAmBA,EAAkB,CAAC,CAC9C,CAAC,EACGS,EAAAA,UAAkB,IAAI,CACtB,IAAIC,EAAQP,EAAS,QACrB,GAAIF,EAAY,OAChB,MAAMU,EAAUZ,EAAI,QACda,EAAqBC,EAAAA,iBAAyBF,CAAO,EAE3D,GAAI,OAAO,aAAiB,IAAa,CACrC,IAAIG,EAAWC,GAAI,CACXL,EAAM,eAAiBH,EAAmCQ,EAAGhB,CAAG,GAAGS,EAAuBO,CAAC,EAC/FL,EAAM,cAAgB,EAC1B,EAIA,OAAAE,EAAe,iBAAiB,cAAeP,EAAe,EAAI,EAClEO,EAAe,iBAAiB,QAASE,EAAS,EAAI,EAC/C,IAAI,CACPF,EAAe,oBAAoB,cAAeP,EAAe,EAAI,EACrEO,EAAe,oBAAoB,QAASE,EAAS,EAAI,CAC7D,CACJ,SAAW,QAAQ,IAAI,WAAa,OAAQ,CACxC,IAAIE,EAAaD,GAAI,CACbL,EAAM,0BAA2BA,EAAM,0BAA4B,GAC9DA,EAAM,eAAiBH,EAAmCQ,EAAGhB,CAAG,GAAGS,EAAuBO,CAAC,EACpGL,EAAM,cAAgB,EAC1B,EACIO,EAAcF,GAAI,CAClBL,EAAM,0BAA4B,GAC9BA,EAAM,eAAiBH,EAAmCQ,EAAGhB,CAAG,GAAGS,EAAuBO,CAAC,EAC/FL,EAAM,cAAgB,EAC1B,EACA,OAAAE,EAAe,iBAAiB,YAAaP,EAAe,EAAI,EAChEO,EAAe,iBAAiB,UAAWI,EAAW,EAAI,EAC1DJ,EAAe,iBAAiB,aAAcP,EAAe,EAAI,EACjEO,EAAe,iBAAiB,WAAYK,EAAY,EAAI,EACrD,IAAI,CACPL,EAAe,oBAAoB,YAAaP,EAAe,EAAI,EACnEO,EAAe,oBAAoB,UAAWI,EAAW,EAAI,EAC7DJ,EAAe,oBAAoB,aAAcP,EAAe,EAAI,EACpEO,EAAe,oBAAoB,WAAYK,EAAY,EAAI,CACnE,CACJ,CACJ,EAAG,CACClB,EACAE,EACAI,EACAG,CACR,CAAK,CACL,CACA,SAASD,EAAmCW,EAAOnB,EAAK,CACpD,GAAImB,EAAM,OAAS,EAAG,MAAO,GAC7B,GAAIA,EAAM,OAAQ,CAEd,MAAMC,EAAgBD,EAAM,OAAO,cAGnC,GAFI,CAACC,GAAiB,CAACA,EAAc,gBAAgB,SAASD,EAAM,MAAM,GAEtEA,EAAM,OAAO,QAAQ,6BAA6B,EAAG,MAAO,EACpE,CACA,OAAKnB,EAAI,QAKF,CAACmB,EAAM,aAAY,EAAG,SAASnB,EAAI,OAAO,EALxB,EAM7B","x_google_ignoreList":[0]}