@cruk/cruk-react-components 1.0.9 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/lib/cjs/node_modules/@babel/runtime/helpers/esm/extends.js +1 -1
  2. package/lib/cjs/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -1
  3. package/lib/cjs/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +1 -1
  4. package/lib/cjs/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +1 -1
  5. package/lib/cjs/node_modules/@fortawesome/free-solid-svg-icons/index.es.js +8 -0
  6. package/lib/cjs/node_modules/@fortawesome/free-solid-svg-icons/index.es.js.map +1 -0
  7. package/lib/cjs/node_modules/focus-lock/dist/es2015/constants.js +1 -1
  8. package/lib/cjs/node_modules/focus-lock/dist/es2015/constants.js.map +1 -1
  9. package/lib/cjs/node_modules/focus-lock/dist/es2015/focusInside.js +1 -1
  10. package/lib/cjs/node_modules/focus-lock/dist/es2015/focusInside.js.map +1 -1
  11. package/lib/cjs/node_modules/focus-lock/dist/es2015/focusIsHidden.js +1 -1
  12. package/lib/cjs/node_modules/focus-lock/dist/es2015/focusIsHidden.js.map +1 -1
  13. package/lib/cjs/node_modules/focus-lock/dist/es2015/focusMerge.js +1 -1
  14. package/lib/cjs/node_modules/focus-lock/dist/es2015/focusMerge.js.map +1 -1
  15. package/lib/cjs/node_modules/focus-lock/dist/es2015/focusables.js +1 -1
  16. package/lib/cjs/node_modules/focus-lock/dist/es2015/focusables.js.map +1 -1
  17. package/lib/cjs/node_modules/focus-lock/dist/es2015/index.js.map +1 -1
  18. package/lib/cjs/node_modules/focus-lock/dist/es2015/setFocus.js +1 -1
  19. package/lib/cjs/node_modules/focus-lock/dist/es2015/setFocus.js.map +1 -1
  20. package/lib/cjs/node_modules/focus-lock/dist/es2015/solver.js +1 -1
  21. package/lib/cjs/node_modules/focus-lock/dist/es2015/solver.js.map +1 -1
  22. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/DOMutils.js +1 -1
  23. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/DOMutils.js.map +1 -1
  24. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/all-affected.js +1 -1
  25. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/all-affected.js.map +1 -1
  26. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/array.js.map +1 -1
  27. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/correctFocus.js +1 -1
  28. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/correctFocus.js.map +1 -1
  29. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/firstFocus.js.map +1 -1
  30. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js +2 -0
  31. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js.map +1 -0
  32. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/is.js +1 -1
  33. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/is.js.map +1 -1
  34. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/parenting.js +1 -1
  35. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/parenting.js.map +1 -1
  36. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/tabOrder.js.map +1 -1
  37. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/tabUtils.js +1 -1
  38. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/tabUtils.js.map +1 -1
  39. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/tabbables.js.map +1 -1
  40. package/lib/cjs/node_modules/react-clientside-effect/lib/index.es.js.map +1 -1
  41. package/lib/cjs/node_modules/react-focus-lock/dist/es2015/Combination.js.map +1 -1
  42. package/lib/cjs/node_modules/react-focus-lock/dist/es2015/FocusGuard.js.map +1 -1
  43. package/lib/cjs/node_modules/react-focus-lock/dist/es2015/Lock.js +1 -1
  44. package/lib/cjs/node_modules/react-focus-lock/dist/es2015/Lock.js.map +1 -1
  45. package/lib/cjs/node_modules/react-focus-lock/dist/es2015/Trap.js +1 -1
  46. package/lib/cjs/node_modules/react-focus-lock/dist/es2015/Trap.js.map +1 -1
  47. package/lib/cjs/node_modules/react-focus-lock/dist/es2015/medium.js.map +1 -1
  48. package/lib/cjs/node_modules/react-intersection-observer/react-intersection-observer.modern.mjs.js +2 -0
  49. package/lib/cjs/node_modules/react-intersection-observer/react-intersection-observer.modern.mjs.js.map +1 -0
  50. package/lib/cjs/node_modules/tslib/tslib.es6.js +1 -16
  51. package/lib/cjs/node_modules/tslib/tslib.es6.js.map +1 -1
  52. package/lib/cjs/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +1 -1
  53. package/lib/cjs/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -1
  54. package/lib/cjs/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -1
  55. package/lib/cjs/node_modules/use-sidecar/dist/es2015/medium.js +1 -1
  56. package/lib/cjs/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -1
  57. package/lib/cjs/src/components/AddressLookup/index.js +1 -1
  58. package/lib/cjs/src/components/Avatar/index.js +1 -1
  59. package/lib/cjs/src/components/Button/index.js +1 -1
  60. package/lib/cjs/src/components/Carousel/index.js +1 -1
  61. package/lib/cjs/src/components/Checkbox/index.js +1 -1
  62. package/lib/cjs/src/components/Checkbox/styles.js +1 -1
  63. package/lib/cjs/src/components/Collapse/index.js +1 -1
  64. package/lib/cjs/src/components/Collapse/styles.js +1 -1
  65. package/lib/cjs/src/components/DateField/styles.js +1 -1
  66. package/lib/cjs/src/components/GlobalStyle.js +1 -1
  67. package/lib/cjs/src/components/Heading/styles.js +1 -1
  68. package/lib/cjs/src/components/Icon/README.md.js +1 -1
  69. package/lib/cjs/src/components/Icon/README.md.js.map +1 -1
  70. package/lib/cjs/src/components/IconFa/README.md.js +2 -0
  71. package/lib/cjs/src/components/IconFa/README.md.js.map +1 -0
  72. package/lib/cjs/src/components/IconFa/index.js +2 -0
  73. package/lib/cjs/src/components/IconFa/index.js.map +1 -0
  74. package/lib/cjs/src/components/IconFa/styles.js +2 -0
  75. package/lib/cjs/src/components/IconFa/styles.js.map +1 -0
  76. package/lib/cjs/src/components/LegendWrapper/styles.js +1 -1
  77. package/lib/cjs/src/components/Link/README.md.js +1 -1
  78. package/lib/cjs/src/components/Link/README.md.js.map +1 -1
  79. package/lib/cjs/src/components/Link/index.js +1 -1
  80. package/lib/cjs/src/components/Link/styles.js +1 -1
  81. package/lib/cjs/src/components/Modal/index.js +1 -1
  82. package/lib/cjs/src/components/Text/styles.js +1 -1
  83. package/lib/cjs/src/components/index.js +1 -1
  84. package/lib/cjs/src/themes/cruk.js +1 -1
  85. package/lib/cjs/src/themes/su2c.js +1 -1
  86. package/lib/components/AddressLookup/{test.cypress.d.ts → AddressLookUp.test.cypress.d.ts} +0 -0
  87. package/lib/components/Avatar/{test.cypress.d.ts → Avatar.test.cypress.d.ts} +0 -0
  88. package/lib/components/Badge/{test.cypress.d.ts → Badge.test.cypress.d.ts} +0 -0
  89. package/lib/components/Box/{test.cypress.d.ts → Box.test.cypress.d.ts} +0 -0
  90. package/lib/components/Button/{test.cypress.d.ts → Button.test.cypress.d.ts} +0 -0
  91. package/lib/components/Carousel/{test.cypress.d.ts → Carousel.test.cypress.d.ts} +0 -0
  92. package/lib/components/Checkbox/{test.cypress.d.ts → CheckBox.test.cypress.d.ts} +0 -0
  93. package/lib/components/Checkbox/styles.d.ts +0 -1
  94. package/lib/components/Collapse/{test.cypress.d.ts → Collapse.test.cypress.d.ts} +0 -0
  95. package/lib/components/Collapse/index.d.ts +4 -2
  96. package/lib/components/Collapse/styles.d.ts +1 -1
  97. package/lib/components/DateField/{test.cypress.d.ts → DateField.test.cypress.d.ts} +0 -0
  98. package/lib/components/DateField/index.d.ts +2 -2
  99. package/lib/components/ErrorText/{test.cypress.d.ts → ErrorText.test.cypress.d.ts} +0 -0
  100. package/lib/components/Footer/{test.cypress.d.ts → Footer.test.cypress.d.ts} +0 -0
  101. package/lib/components/Header/{test.cypress.d.ts → Header.test.cypress.d.ts} +0 -0
  102. package/lib/components/Heading/{test.cypress.d.ts → Heading.test.cypress.d.ts} +0 -0
  103. package/lib/components/Heading/index.d.ts +7 -1
  104. package/lib/components/Heading/styles.d.ts +6 -0
  105. package/lib/components/Icon/{test.cypress.d.ts → Icon.test.cypress.d.ts} +0 -0
  106. package/lib/components/Icon/index.d.ts +1 -1
  107. package/lib/components/IconFa/IconFa.stories.d.ts +6 -0
  108. package/lib/components/{LegendWrapper/test.cypress.d.ts → IconFa/IconFa.test.cypress.d.ts} +0 -0
  109. package/lib/components/IconFa/index.d.ts +17 -0
  110. package/lib/components/IconFa/styles.d.ts +5 -0
  111. package/lib/components/{Link/test.cypress.d.ts → LegendWrapper/LegendWrapper.test.cypress.d.ts} +0 -0
  112. package/lib/components/{Loader/test.cypress.d.ts → Link/Link.test.cypress.d.ts} +0 -0
  113. package/lib/components/Link/styles.d.ts +2 -1
  114. package/lib/components/{Modal/test.cypress.d.ts → Loader/Loader.test.cypress.d.ts} +0 -0
  115. package/lib/components/{Pagination/test.cypress.d.ts → Modal/Modal.test.cypress.d.ts} +0 -0
  116. package/lib/components/{PopOver/test.cypress.d.ts → Pagination/Pagination.test.cypress.d.ts} +0 -0
  117. package/lib/components/{ProgressBar/test.cypress.d.ts → PopOver/PopOver.test.cypress.d.ts} +0 -0
  118. package/lib/components/{Radio/test.cypress.d.ts → ProgressBar/ProgressBar.test.cypress.d.ts} +0 -0
  119. package/lib/components/{RadioConsent/test.cypress.d.ts → Radio/Radio.test.cypress.d.ts} +0 -0
  120. package/lib/components/{Select/test.cypress.d.ts → RadioConsent/RadioConsent.test.cypress.d.ts} +0 -0
  121. package/lib/components/{Step/test.cypress.d.ts → Select/Select.test.cypress.d.ts} +0 -0
  122. package/lib/components/{Text/test.cypress.d.ts → Step/Step.test.cypress.d.ts} +0 -0
  123. package/lib/components/{TextAreaField/test.cypress.d.ts → Text/Text.test.cypress.d.ts} +0 -0
  124. package/lib/components/Text/index.d.ts +5 -3
  125. package/lib/components/Text/styles.d.ts +3 -1
  126. package/lib/components/{TextField/test.cypress.d.ts → TextAreaField/TextAreaField.test.cypress.d.ts} +0 -0
  127. package/lib/components/{Totaliser/test.cypress.d.ts → TextField/TextField.test.cypress.d.ts} +0 -0
  128. package/lib/components/{UserBlock/test.cypress.d.ts → Totaliser/Totaliser.test.cypress.d.ts} +0 -0
  129. package/lib/components/UserBlock/UserBlock.test.cypress.d.ts +1 -0
  130. package/lib/components/index.d.ts +2 -0
  131. package/lib/es/node_modules/@babel/runtime/helpers/esm/extends.js +1 -1
  132. package/lib/es/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -1
  133. package/lib/es/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +1 -1
  134. package/lib/es/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +1 -1
  135. package/lib/es/node_modules/@fortawesome/free-solid-svg-icons/index.es.js +7 -0
  136. package/lib/es/node_modules/@fortawesome/free-solid-svg-icons/index.es.js.map +1 -0
  137. package/lib/es/node_modules/focus-lock/dist/es2015/constants.js +1 -1
  138. package/lib/es/node_modules/focus-lock/dist/es2015/constants.js.map +1 -1
  139. package/lib/es/node_modules/focus-lock/dist/es2015/focusInside.js +1 -1
  140. package/lib/es/node_modules/focus-lock/dist/es2015/focusInside.js.map +1 -1
  141. package/lib/es/node_modules/focus-lock/dist/es2015/focusIsHidden.js +1 -1
  142. package/lib/es/node_modules/focus-lock/dist/es2015/focusIsHidden.js.map +1 -1
  143. package/lib/es/node_modules/focus-lock/dist/es2015/focusMerge.js +1 -1
  144. package/lib/es/node_modules/focus-lock/dist/es2015/focusMerge.js.map +1 -1
  145. package/lib/es/node_modules/focus-lock/dist/es2015/focusables.js +1 -1
  146. package/lib/es/node_modules/focus-lock/dist/es2015/focusables.js.map +1 -1
  147. package/lib/es/node_modules/focus-lock/dist/es2015/index.js.map +1 -1
  148. package/lib/es/node_modules/focus-lock/dist/es2015/setFocus.js +1 -1
  149. package/lib/es/node_modules/focus-lock/dist/es2015/setFocus.js.map +1 -1
  150. package/lib/es/node_modules/focus-lock/dist/es2015/solver.js +1 -1
  151. package/lib/es/node_modules/focus-lock/dist/es2015/solver.js.map +1 -1
  152. package/lib/es/node_modules/focus-lock/dist/es2015/utils/DOMutils.js +1 -1
  153. package/lib/es/node_modules/focus-lock/dist/es2015/utils/DOMutils.js.map +1 -1
  154. package/lib/es/node_modules/focus-lock/dist/es2015/utils/all-affected.js +1 -1
  155. package/lib/es/node_modules/focus-lock/dist/es2015/utils/all-affected.js.map +1 -1
  156. package/lib/es/node_modules/focus-lock/dist/es2015/utils/array.js.map +1 -1
  157. package/lib/es/node_modules/focus-lock/dist/es2015/utils/correctFocus.js +1 -1
  158. package/lib/es/node_modules/focus-lock/dist/es2015/utils/correctFocus.js.map +1 -1
  159. package/lib/es/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js +2 -0
  160. package/lib/es/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js.map +1 -0
  161. package/lib/es/node_modules/focus-lock/dist/es2015/utils/is.js +1 -1
  162. package/lib/es/node_modules/focus-lock/dist/es2015/utils/is.js.map +1 -1
  163. package/lib/es/node_modules/focus-lock/dist/es2015/utils/parenting.js +1 -1
  164. package/lib/es/node_modules/focus-lock/dist/es2015/utils/parenting.js.map +1 -1
  165. package/lib/es/node_modules/focus-lock/dist/es2015/utils/tabOrder.js.map +1 -1
  166. package/lib/es/node_modules/focus-lock/dist/es2015/utils/tabUtils.js +1 -1
  167. package/lib/es/node_modules/focus-lock/dist/es2015/utils/tabUtils.js.map +1 -1
  168. package/lib/es/node_modules/focus-lock/dist/es2015/utils/tabbables.js.map +1 -1
  169. package/lib/es/node_modules/react-focus-lock/dist/es2015/Combination.js.map +1 -1
  170. package/lib/es/node_modules/react-focus-lock/dist/es2015/Lock.js +1 -1
  171. package/lib/es/node_modules/react-focus-lock/dist/es2015/Lock.js.map +1 -1
  172. package/lib/es/node_modules/react-focus-lock/dist/es2015/Trap.js +1 -1
  173. package/lib/es/node_modules/react-focus-lock/dist/es2015/Trap.js.map +1 -1
  174. package/lib/es/node_modules/react-intersection-observer/react-intersection-observer.modern.mjs.js +2 -0
  175. package/lib/es/node_modules/react-intersection-observer/react-intersection-observer.modern.mjs.js.map +1 -0
  176. package/lib/es/node_modules/tslib/tslib.es6.js +0 -14
  177. package/lib/es/node_modules/tslib/tslib.es6.js.map +1 -1
  178. package/lib/es/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +1 -1
  179. package/lib/es/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -1
  180. package/lib/es/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -1
  181. package/lib/es/node_modules/use-sidecar/dist/es2015/medium.js +1 -1
  182. package/lib/es/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -1
  183. package/lib/es/src/components/AddressLookup/README.md.js.map +1 -1
  184. package/lib/es/src/components/AddressLookup/index.js +1 -1
  185. package/lib/es/src/components/Avatar/README.md.js.map +1 -1
  186. package/lib/es/src/components/Avatar/index.js +1 -1
  187. package/lib/es/src/components/Badge/README.md.js.map +1 -1
  188. package/lib/es/src/components/Box/README.md.js.map +1 -1
  189. package/lib/es/src/components/Button/README.md.js.map +1 -1
  190. package/lib/es/src/components/Button/index.js +1 -1
  191. package/lib/es/src/components/Carousel/index.js +1 -1
  192. package/lib/es/src/components/Checkbox/README.md.js.map +1 -1
  193. package/lib/es/src/components/Checkbox/index.js +1 -1
  194. package/lib/es/src/components/Checkbox/styles.js +1 -1
  195. package/lib/es/src/components/Collapse/README.md.js.map +1 -1
  196. package/lib/es/src/components/Collapse/index.js +1 -1
  197. package/lib/es/src/components/Collapse/styles.js +1 -1
  198. package/lib/es/src/components/DateField/README.md.js.map +1 -1
  199. package/lib/es/src/components/DateField/styles.js +1 -1
  200. package/lib/es/src/components/ErrorText/README.md.js.map +1 -1
  201. package/lib/es/src/components/Footer/README.md.js.map +1 -1
  202. package/lib/es/src/components/GlobalStyle.js +1 -1
  203. package/lib/es/src/components/Header/README.md.js.map +1 -1
  204. package/lib/es/src/components/Heading/README.md.js.map +1 -1
  205. package/lib/es/src/components/Heading/styles.js +1 -1
  206. package/lib/es/src/components/Icon/README.md.js +1 -1
  207. package/lib/es/src/components/Icon/README.md.js.map +1 -1
  208. package/lib/es/src/components/IconFa/README.md.js +2 -0
  209. package/lib/es/src/components/IconFa/README.md.js.map +1 -0
  210. package/lib/es/src/components/IconFa/index.js +2 -0
  211. package/lib/es/src/components/IconFa/index.js.map +1 -0
  212. package/lib/es/src/components/IconFa/styles.js +2 -0
  213. package/lib/es/src/components/IconFa/styles.js.map +1 -0
  214. package/lib/es/src/components/LegendWrapper/README.md.js.map +1 -1
  215. package/lib/es/src/components/LegendWrapper/styles.js +1 -1
  216. package/lib/es/src/components/Link/README.md.js +1 -1
  217. package/lib/es/src/components/Link/README.md.js.map +1 -1
  218. package/lib/es/src/components/Link/index.js +1 -1
  219. package/lib/es/src/components/Link/styles.js +1 -1
  220. package/lib/es/src/components/Loader/README.md.js.map +1 -1
  221. package/lib/es/src/components/Modal/README.md.js.map +1 -1
  222. package/lib/es/src/components/Modal/index.js +1 -1
  223. package/lib/es/src/components/Pagination/README.md.js.map +1 -1
  224. package/lib/es/src/components/PopOver/README.md.js.map +1 -1
  225. package/lib/es/src/components/ProgressBar/README.md.js.map +1 -1
  226. package/lib/es/src/components/Radio/README.md.js.map +1 -1
  227. package/lib/es/src/components/RadioConsent/README.md.js.map +1 -1
  228. package/lib/es/src/components/Select/README.md.js.map +1 -1
  229. package/lib/es/src/components/Step/README.md.js.map +1 -1
  230. package/lib/es/src/components/Text/README.md.js.map +1 -1
  231. package/lib/es/src/components/Text/styles.js +1 -1
  232. package/lib/es/src/components/TextAreaField/README.md.js.map +1 -1
  233. package/lib/es/src/components/TextField/README.md.js.map +1 -1
  234. package/lib/es/src/components/Totaliser/README.md.js.map +1 -1
  235. package/lib/es/src/components/UserBlock/README.md.js.map +1 -1
  236. package/lib/es/src/components/index.js +1 -1
  237. package/lib/es/src/themes/cruk.js +1 -1
  238. package/lib/es/src/themes/su2c.js +1 -1
  239. package/lib/hooks/useKey.d.ts +1 -1
  240. package/lib/types.d.ts +2 -2
  241. package/lib/utils/Helper.d.ts +1 -1
  242. package/package.json +34 -32
  243. package/CHANGELOG.md +0 -169
  244. package/lib/cjs/node_modules/react-intersection-observer/react-intersection-observer.m.js +0 -2
  245. package/lib/cjs/node_modules/react-intersection-observer/react-intersection-observer.m.js.map +0 -1
  246. package/lib/cjs/node_modules/use-sidecar/node_modules/tslib/tslib.es6.js +0 -17
  247. package/lib/cjs/node_modules/use-sidecar/node_modules/tslib/tslib.es6.js.map +0 -1
  248. package/lib/es/node_modules/react-intersection-observer/react-intersection-observer.m.js +0 -2
  249. package/lib/es/node_modules/react-intersection-observer/react-intersection-observer.m.js.map +0 -1
  250. package/lib/es/node_modules/use-sidecar/node_modules/tslib/tslib.es6.js +0 -16
  251. package/lib/es/node_modules/use-sidecar/node_modules/tslib/tslib.es6.js.map +0 -1
@@ -1,2 +1,2 @@
1
- var a="data-focus-lock",o="data-focus-lock-disabled",c="data-no-focus-lock",d="data-autofocus-inside";export{c as FOCUS_ALLOW,d as FOCUS_AUTO,o as FOCUS_DISABLED,a as FOCUS_GROUP};
1
+ var a="data-focus-lock",o="data-focus-lock-disabled",c="data-no-focus-lock",d="data-autofocus-inside",t="data-no-autofocus";export{c as FOCUS_ALLOW,d as FOCUS_AUTO,o as FOCUS_DISABLED,a as FOCUS_GROUP,t as FOCUS_NO_AUTOFOCUS};
2
2
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/constants.js"],"sourcesContent":["export var FOCUS_GROUP = 'data-focus-lock';\nexport var FOCUS_DISABLED = 'data-focus-lock-disabled';\nexport var FOCUS_ALLOW = 'data-no-focus-lock';\nexport var FOCUS_AUTO = 'data-autofocus-inside';\n"],"names":["FOCUS_GROUP","FOCUS_DISABLED","FOCUS_ALLOW","FOCUS_AUTO"],"mappings":"AAAU,IAACA,EAAc,kBACdC,EAAiB,2BACjBC,EAAc,qBACdC,EAAa"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/constants.js"],"sourcesContent":["/**\n * defines a focus group\n */\nexport var FOCUS_GROUP = 'data-focus-lock';\n/**\n * disables element discovery inside a group marked by key\n */\nexport var FOCUS_DISABLED = 'data-focus-lock-disabled';\n/**\n * allows uncontrolled focus within the marked area, effectively disabling focus lock for it's content\n */\nexport var FOCUS_ALLOW = 'data-no-focus-lock';\n/**\n * instructs autofocus engine to pick default autofocus inside a given node\n * can be set on the element or container\n */\nexport var FOCUS_AUTO = 'data-autofocus-inside';\n/**\n * instructs autofocus to ignore elements within a given node\n * can be set on the element or container\n */\nexport var FOCUS_NO_AUTOFOCUS = 'data-no-autofocus';\n"],"names":["FOCUS_GROUP","FOCUS_DISABLED","FOCUS_ALLOW","FOCUS_AUTO","FOCUS_NO_AUTOFOCUS"],"mappings":"AAGU,IAACA,EAAc,kBAIdC,EAAiB,2BAIjBC,EAAc,qBAKdC,EAAa,wBAKbC,EAAqB"}
@@ -1,2 +1,2 @@
1
- import{getAllAffectedNodes as t}from"./utils/all-affected.js";import{toArray as e}from"./utils/array.js";var r=function(t){return Boolean(e(t.querySelectorAll("iframe")).some((function(t){return t===document.activeElement})))},n=function(e){var n=document&&document.activeElement;return!(!n||n.dataset&&n.dataset.focusGuard)&&t(e).reduce((function(t,e){return t||e.contains(n)||r(e)}),!1)};export{n as focusInside};
1
+ import{contains as t}from"./utils/DOMutils.js";import{getAllAffectedNodes as e}from"./utils/all-affected.js";import{toArray as r}from"./utils/array.js";import{getActiveElement as o}from"./utils/getActiveElement.js";var u=function(t){return Boolean(r(t.querySelectorAll("iframe")).some((function(t){return t===document.activeElement})))},n=function(r){var n=document&&o();return!(!n||n.dataset&&n.dataset.focusGuard)&&e(r).some((function(e){return t(e,n)||u(e)}))};export{n as focusInside};
2
2
  //# sourceMappingURL=focusInside.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"focusInside.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusInside.js"],"sourcesContent":["import { getAllAffectedNodes } from './utils/all-affected';\nimport { toArray } from './utils/array';\nvar focusInFrame = function (frame) { return frame === document.activeElement; };\nvar focusInsideIframe = function (topNode) {\n return Boolean(toArray(topNode.querySelectorAll('iframe')).some(function (node) { return focusInFrame(node); }));\n};\nexport var focusInside = function (topNode) {\n var activeElement = document && document.activeElement;\n if (!activeElement || (activeElement.dataset && activeElement.dataset.focusGuard)) {\n return false;\n }\n return getAllAffectedNodes(topNode).reduce(function (result, node) { return result || node.contains(activeElement) || focusInsideIframe(node); }, false);\n};\n"],"names":["focusInsideIframe","topNode","Boolean","toArray","querySelectorAll","some","node","document","activeElement","focusInside","dataset","focusGuard","getAllAffectedNodes","reduce","result","contains"],"mappings":"yGAEA,IACIA,EAAoB,SAAUC,GAC9B,OAAOC,QAAQC,EAAQF,EAAQG,iBAAiB,WAAWC,MAAK,SAAUC,GAAQ,OAAoBA,IAFnDC,SAASC,mBAIrDC,EAAc,SAAUR,GAC/B,IAAIO,EAAgBD,UAAYA,SAASC,cACzC,SAAKA,GAAkBA,EAAcE,SAAWF,EAAcE,QAAQC,aAG/DC,EAAoBX,GAASY,QAAO,SAAUC,EAAQR,GAAQ,OAAOQ,GAAUR,EAAKS,SAASP,IAAkBR,EAAkBM,MAAU"}
1
+ {"version":3,"file":"focusInside.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusInside.js"],"sourcesContent":["import { contains } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\nvar focusInFrame = function (frame) { return frame === document.activeElement; };\nvar focusInsideIframe = function (topNode) {\n return Boolean(toArray(topNode.querySelectorAll('iframe')).some(function (node) { return focusInFrame(node); }));\n};\n/**\n * @returns {Boolean} true, if the current focus is inside given node or nodes\n */\nexport var focusInside = function (topNode) {\n var activeElement = document && getActiveElement();\n if (!activeElement || (activeElement.dataset && activeElement.dataset.focusGuard)) {\n return false;\n }\n return getAllAffectedNodes(topNode).some(function (node) { return contains(node, activeElement) || focusInsideIframe(node); });\n};\n"],"names":["focusInsideIframe","topNode","Boolean","toArray","querySelectorAll","some","node","document","activeElement","focusInside","getActiveElement","dataset","focusGuard","getAllAffectedNodes","contains"],"mappings":"uNAIA,IACIA,EAAoB,SAAUC,GAC9B,OAAOC,QAAQC,EAAQF,EAAQG,iBAAiB,WAAWC,MAAK,SAAUC,GAAQ,OAAoBA,IAFnDC,SAASC,mBAOrDC,EAAc,SAAUR,GAC/B,IAAIO,EAAgBD,UAAYG,IAChC,SAAKF,GAAkBA,EAAcG,SAAWH,EAAcG,QAAQC,aAG/DC,EAAoBZ,GAASI,MAAK,SAAUC,GAAQ,OAAOQ,EAASR,EAAME,IAAkBR,EAAkBM"}
@@ -1,2 +1,2 @@
1
- import{FOCUS_ALLOW as t}from"./constants.js";import{toArray as n}from"./utils/array.js";var o=function(){return document&&n(document.querySelectorAll("["+t+"]")).some((function(t){return t.contains(document.activeElement)}))};export{o as focusIsHidden};
1
+ import{FOCUS_ALLOW as t}from"./constants.js";import{contains as r}from"./utils/DOMutils.js";import{toArray as o}from"./utils/array.js";import{getActiveElement as e}from"./utils/getActiveElement.js";var m=function(){var m=document&&e();return!!m&&o(document.querySelectorAll("[".concat(t,"]"))).some((function(t){return r(t,m)}))};export{m as focusIsHidden};
2
2
  //# sourceMappingURL=focusIsHidden.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"focusIsHidden.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusIsHidden.js"],"sourcesContent":["import { FOCUS_ALLOW } from './constants';\nimport { toArray } from './utils/array';\nexport var focusIsHidden = function () {\n return document &&\n toArray(document.querySelectorAll(\"[\" + FOCUS_ALLOW + \"]\")).some(function (node) { return node.contains(document.activeElement); });\n};\n"],"names":["focusIsHidden","document","toArray","querySelectorAll","FOCUS_ALLOW","some","node","contains","activeElement"],"mappings":"wFAEU,IAACA,EAAgB,WACvB,OAAOC,UACHC,EAAQD,SAASE,iBAAiB,IAAMC,EAAc,MAAMC,MAAK,SAAUC,GAAQ,OAAOA,EAAKC,SAASN,SAASO"}
1
+ {"version":3,"file":"focusIsHidden.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusIsHidden.js"],"sourcesContent":["import { FOCUS_ALLOW } from './constants';\nimport { contains } from './utils/DOMutils';\nimport { toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\n/**\n * focus is hidden FROM the focus-lock\n * ie contained inside a node focus-lock shall ignore\n * @returns {boolean} focus is currently is in \"allow\" area\n */\nexport var focusIsHidden = function () {\n var activeElement = document && getActiveElement();\n if (!activeElement) {\n return false;\n }\n // this does not support setting FOCUS_ALLOW within shadow dom\n return toArray(document.querySelectorAll(\"[\".concat(FOCUS_ALLOW, \"]\"))).some(function (node) { return contains(node, activeElement); });\n};\n"],"names":["focusIsHidden","activeElement","document","getActiveElement","toArray","querySelectorAll","concat","FOCUS_ALLOW","some","node","contains"],"mappings":"sMASU,IAACA,EAAgB,WACvB,IAAIC,EAAgBC,UAAYC,IAChC,QAAKF,GAIEG,EAAQF,SAASG,iBAAiB,IAAIC,OAAOC,EAAa,OAAOC,MAAK,SAAUC,GAAQ,OAAOC,EAASD,EAAMR"}
@@ -1,2 +1,2 @@
1
- import{newFocus as t,NEW_FOCUS as r}from"./solver.js";import{getAllAffectedNodes as n}from"./utils/all-affected.js";import{getAllTabbableNodes as e,getTabbableNodes as o}from"./utils/DOMutils.js";import{pickFirstFocus as i}from"./utils/firstFocus.js";import{isNotAGuard as u,isDefined as f}from"./utils/is.js";import{getTopCommonParent as a,allParentAutofocusables as s}from"./utils/parenting.js";var m=function(m,c){var l=document&&document.activeElement,p=n(m).filter(u),d=a(l||m,m,p),v=new Map,j=e(p,v),g=o(p,v).filter((function(t){var r=t.node;return u(r)}));if(g[0]||(g=j)[0]){var M,h,w,x,E=e([d],v).map((function(t){return t.node})),O=(M=E,h=g,w=new Map,h.forEach((function(t){return w.set(t.node,t)})),M.map((function(t){return w.get(t)})).filter(f)),D=O.map((function(t){return t.node})),F=t(D,E,l,c);if(F===r){var b=j.map((function(t){return t.node})).filter((x=s(p,v),function(t){return t.autofocus||t.dataset&&!!t.dataset.autofocus||x.indexOf(t)>=0}));return{node:b&&b.length?i(b):i(D)}}return void 0===F?F:O[F]}};export{m as getFocusMerge};
1
+ import{newFocus as t,NEW_FOCUS as r}from"./solver.js";import{getAllTabbableNodes as n,getTabbableNodes as o,filterAutoFocusable as i}from"./utils/DOMutils.js";import{getAllAffectedNodes as e}from"./utils/all-affected.js";import{pickFirstFocus as u}from"./utils/firstFocus.js";import{getActiveElement as f}from"./utils/getActiveElement.js";import{isNotAGuard as s,isDefined as m,getDataset as a}from"./utils/is.js";import{getTopCommonParent as l,allParentAutofocusables as c}from"./utils/parenting.js";var p=function(p,d){var v=document&&f(),j=e(p).filter(s),g=l(v||p,p,j),M=new Map,h=n(j,M),w=o(j,M).filter((function(t){var r=t.node;return s(r)}));if(w[0]||(w=h)[0]){var x,E,O,A,D=n([g],M).map((function(t){return t.node})),F=(x=D,E=w,O=new Map,E.forEach((function(t){return O.set(t.node,t)})),x.map((function(t){return O.get(t)})).filter(m)),b=F.map((function(t){return t.node})),k=t(b,D,v,d);if(k===r){var q=i(h.map((function(t){return t.node}))).filter((A=c(j,M),function(t){var r;return t.autofocus||!!(null===(r=a(t))||void 0===r?void 0:r.autofocus)||A.indexOf(t)>=0}));return{node:q&&q.length?u(q):u(i(b))}}return void 0===k?k:F[k]}};export{p as getFocusMerge};
2
2
  //# sourceMappingURL=focusMerge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"focusMerge.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusMerge.js"],"sourcesContent":["import { NEW_FOCUS, newFocus } from './solver';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { getAllTabbableNodes, getTabbableNodes } from './utils/DOMutils';\nimport { pickFirstFocus } from './utils/firstFocus';\nimport { isDefined, isNotAGuard } from './utils/is';\nimport { allParentAutofocusables, getTopCommonParent } from './utils/parenting';\nvar findAutoFocused = function (autoFocusables) { return function (node) {\n return node.autofocus || (node.dataset && !!node.dataset.autofocus) || autoFocusables.indexOf(node) >= 0;\n}; };\nvar reorderNodes = function (srcNodes, dstNodes) {\n var remap = new Map();\n dstNodes.forEach(function (entity) { return remap.set(entity.node, entity); });\n return srcNodes.map(function (node) { return remap.get(node); }).filter(isDefined);\n};\nexport var getFocusMerge = function (topNode, lastNode) {\n var activeElement = (document && document.activeElement);\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(activeElement || topNode, topNode, entries);\n var visibilityCache = new Map();\n var anyFocusable = getAllTabbableNodes(entries, visibilityCache);\n var innerElements = getTabbableNodes(entries, visibilityCache).filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n });\n if (!innerElements[0]) {\n innerElements = anyFocusable;\n if (!innerElements[0]) {\n return undefined;\n }\n }\n var outerNodes = getAllTabbableNodes([commonParent], visibilityCache).map(function (_a) {\n var node = _a.node;\n return node;\n });\n var orderedInnerElements = reorderNodes(outerNodes, innerElements);\n var innerNodes = orderedInnerElements.map(function (_a) {\n var node = _a.node;\n return node;\n });\n var newId = newFocus(innerNodes, outerNodes, activeElement, lastNode);\n if (newId === NEW_FOCUS) {\n var autoFocusable = anyFocusable\n .map(function (_a) {\n var node = _a.node;\n return node;\n })\n .filter(findAutoFocused(allParentAutofocusables(entries, visibilityCache)));\n return {\n node: autoFocusable && autoFocusable.length ? pickFirstFocus(autoFocusable) : pickFirstFocus(innerNodes),\n };\n }\n if (newId === undefined) {\n return newId;\n }\n return orderedInnerElements[newId];\n};\n"],"names":["getFocusMerge","topNode","lastNode","activeElement","document","entries","getAllAffectedNodes","filter","isNotAGuard","commonParent","getTopCommonParent","visibilityCache","Map","anyFocusable","getAllTabbableNodes","innerElements","getTabbableNodes","_a","node","srcNodes","dstNodes","remap","autoFocusables","outerNodes","map","orderedInnerElements","forEach","entity","set","get","isDefined","innerNodes","newId","newFocus","NEW_FOCUS","autoFocusable","allParentAutofocusables","autofocus","dataset","indexOf","length","pickFirstFocus","undefined"],"mappings":"6YAMA,IAQWA,EAAgB,SAAUC,EAASC,GAC1C,IAAIC,EAAiBC,UAAYA,SAASD,cACtCE,EAAUC,EAAoBL,GAASM,OAAOC,GAC9CC,EAAeC,EAAmBP,GAAiBF,EAASA,EAASI,GACrEM,EAAkB,IAAIC,IACtBC,EAAeC,EAAoBT,EAASM,GAC5CI,EAAgBC,EAAiBX,EAASM,GAAiBJ,QAAO,SAAUU,GAC5E,IAAIC,EAAOD,EAAGC,KACd,OAAOV,EAAYU,MAEvB,GAAKH,EAAc,KACfA,EAAgBF,GACG,GAFvB,CAMA,IArByBM,EAAUC,EAC/BC,EAJwBC,EAwBxBC,EAAaT,EAAoB,CAACL,GAAeE,GAAiBa,KAAI,SAAUP,GAEhF,OADWA,EAAGC,QAGdO,GAzBqBN,EAyBeI,EAzBLH,EAyBiBL,EAxBhDM,EAAQ,IAAIT,IAChBQ,EAASM,SAAQ,SAAUC,GAAU,OAAON,EAAMO,IAAID,EAAOT,KAAMS,MAC5DR,EAASK,KAAI,SAAUN,GAAQ,OAAOG,EAAMQ,IAAIX,MAAUX,OAAOuB,IAuBpEC,EAAaN,EAAqBD,KAAI,SAAUP,GAEhD,OADWA,EAAGC,QAGdc,EAAQC,EAASF,EAAYR,EAAYpB,EAAeD,GAC5D,GAAI8B,IAAUE,EAAW,CACrB,IAAIC,EAAgBtB,EACfW,KAAI,SAAUP,GAEf,OADWA,EAAGC,QAGbX,QAxCmBe,EAwCIc,EAAwB/B,EAASM,GAxCZ,SAAUO,GAC/D,OAAOA,EAAKmB,WAAcnB,EAAKoB,WAAapB,EAAKoB,QAAQD,WAAcf,EAAeiB,QAAQrB,IAAS,KAwCnG,MAAO,CACHA,KAAMiB,GAAiBA,EAAcK,OAASC,EAAeN,GAAiBM,EAAeV,IAGrG,YAAcW,IAAVV,EACOA,EAEJP,EAAqBO"}
1
+ {"version":3,"file":"focusMerge.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusMerge.js"],"sourcesContent":["import { NEW_FOCUS, newFocus } from './solver';\nimport { filterAutoFocusable, getAllTabbableNodes, getTabbableNodes } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { pickFirstFocus } from './utils/firstFocus';\nimport { getActiveElement } from './utils/getActiveElement';\nimport { getDataset, isDefined, isNotAGuard } from './utils/is';\nimport { allParentAutofocusables, getTopCommonParent } from './utils/parenting';\nvar findAutoFocused = function (autoFocusables) {\n return function (node) { var _a; \n // @ts-expect-error\n return node.autofocus || !!((_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.autofocus) || autoFocusables.indexOf(node) >= 0; };\n};\nvar reorderNodes = function (srcNodes, dstNodes) {\n var remap = new Map();\n // no Set(dstNodes) for IE11 :(\n dstNodes.forEach(function (entity) { return remap.set(entity.node, entity); });\n // remap to dstNodes\n return srcNodes.map(function (node) { return remap.get(node); }).filter(isDefined);\n};\n/**\n * given top node(s) and the last active element return the element to be focused next\n * @param topNode\n * @param lastNode\n */\nexport var getFocusMerge = function (topNode, lastNode) {\n var activeElement = document && getActiveElement();\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(activeElement || topNode, topNode, entries);\n var visibilityCache = new Map();\n var anyFocusable = getAllTabbableNodes(entries, visibilityCache);\n var innerElements = getTabbableNodes(entries, visibilityCache).filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n });\n if (!innerElements[0]) {\n innerElements = anyFocusable;\n if (!innerElements[0]) {\n return undefined;\n }\n }\n var outerNodes = getAllTabbableNodes([commonParent], visibilityCache).map(function (_a) {\n var node = _a.node;\n return node;\n });\n var orderedInnerElements = reorderNodes(outerNodes, innerElements);\n var innerNodes = orderedInnerElements.map(function (_a) {\n var node = _a.node;\n return node;\n });\n var newId = newFocus(innerNodes, outerNodes, activeElement, lastNode);\n if (newId === NEW_FOCUS) {\n var autoFocusable = filterAutoFocusable(anyFocusable.map(function (_a) {\n var node = _a.node;\n return node;\n })).filter(findAutoFocused(allParentAutofocusables(entries, visibilityCache)));\n return {\n node: autoFocusable && autoFocusable.length\n ? pickFirstFocus(autoFocusable)\n : pickFirstFocus(filterAutoFocusable(innerNodes)),\n };\n }\n if (newId === undefined) {\n return newId;\n }\n return orderedInnerElements[newId];\n};\n"],"names":["getFocusMerge","topNode","lastNode","activeElement","document","getActiveElement","entries","getAllAffectedNodes","filter","isNotAGuard","commonParent","getTopCommonParent","visibilityCache","Map","anyFocusable","getAllTabbableNodes","innerElements","getTabbableNodes","_a","node","srcNodes","dstNodes","remap","autoFocusables","outerNodes","map","orderedInnerElements","forEach","entity","set","get","isDefined","innerNodes","newId","newFocus","NEW_FOCUS","autoFocusable","filterAutoFocusable","allParentAutofocusables","autofocus","getDataset","indexOf","length","pickFirstFocus","undefined"],"mappings":"qfAOA,IAiBWA,EAAgB,SAAUC,EAASC,GAC1C,IAAIC,EAAgBC,UAAYC,IAC5BC,EAAUC,EAAoBN,GAASO,OAAOC,GAC9CC,EAAeC,EAAmBR,GAAiBF,EAASA,EAASK,GACrEM,EAAkB,IAAIC,IACtBC,EAAeC,EAAoBT,EAASM,GAC5CI,EAAgBC,EAAiBX,EAASM,GAAiBJ,QAAO,SAAUU,GAC5E,IAAIC,EAAOD,EAAGC,KACd,OAAOV,EAAYU,MAEvB,GAAKH,EAAc,KACfA,EAAgBF,GACG,GAFvB,CAMA,IA5ByBM,EAAUC,EAC/BC,EANwBC,EAiCxBC,EAAaT,EAAoB,CAACL,GAAeE,GAAiBa,KAAI,SAAUP,GAEhF,OADWA,EAAGC,QAGdO,GAhCqBN,EAgCeI,EAhCLH,EAgCiBL,EA/BhDM,EAAQ,IAAIT,IAEhBQ,EAASM,SAAQ,SAAUC,GAAU,OAAON,EAAMO,IAAID,EAAOT,KAAMS,MAE5DR,EAASK,KAAI,SAAUN,GAAQ,OAAOG,EAAMQ,IAAIX,MAAUX,OAAOuB,IA4BpEC,EAAaN,EAAqBD,KAAI,SAAUP,GAEhD,OADWA,EAAGC,QAGdc,EAAQC,EAASF,EAAYR,EAAYrB,EAAeD,GAC5D,GAAI+B,IAAUE,EAAW,CACrB,IAAIC,EAAgBC,EAAoBvB,EAAaW,KAAI,SAAUP,GAE/D,OADWA,EAAGC,SAEdX,QA/CoBe,EA+CGe,EAAwBhC,EAASM,GA9CzD,SAAUO,GAAQ,IAAID,EAE7B,OAAOC,EAAKoB,cAA4C,QAA3BrB,EAAKsB,EAAWrB,UAA0B,IAAPD,OAAgB,EAASA,EAAGqB,YAAchB,EAAekB,QAAQtB,IAAS,KA6CtI,MAAO,CACHA,KAAMiB,GAAiBA,EAAcM,OAC/BC,EAAeP,GACfO,EAAeN,EAAoBL,KAGjD,YAAcY,IAAVX,EACOA,EAEJP,EAAqBO"}
@@ -1,2 +1,2 @@
1
- import{getAllAffectedNodes as r}from"./utils/all-affected.js";import{getTabbableNodes as t}from"./utils/DOMutils.js";import{isNotAGuard as n,isGuard as i}from"./utils/is.js";import{getTopCommonParent as e}from"./utils/parenting.js";var o=function(o){var u=r(o).filter(n),f=e(o,o,u),a=new Map,m=t([f],a,!0),l=t(u,a).filter((function(r){var t=r.node;return n(t)})).map((function(r){return r.node}));return m.map((function(r){var t=r.node;return{node:t,index:r.index,lockItem:l.indexOf(t)>=0,guard:i(t)}}))};export{o as getFocusabledIn};
1
+ import{getTabbableNodes as r}from"./utils/DOMutils.js";import{getAllAffectedNodes as t}from"./utils/all-affected.js";import{isNotAGuard as n,isGuard as i}from"./utils/is.js";import{getTopCommonParent as e}from"./utils/parenting.js";var o=function(o){var u=t(o).filter(n),f=e(o,o,u),a=new Map,m=r([f],a,!0),l=r(u,a).filter((function(r){var t=r.node;return n(t)})).map((function(r){return r.node}));return m.map((function(r){var t=r.node;return{node:t,index:r.index,lockItem:l.indexOf(t)>=0,guard:i(t)}}))};export{o as getFocusabledIn};
2
2
  //# sourceMappingURL=focusables.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"focusables.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusables.js"],"sourcesContent":["import { getAllAffectedNodes } from './utils/all-affected';\nimport { getTabbableNodes } from './utils/DOMutils';\nimport { isGuard, isNotAGuard } from './utils/is';\nimport { getTopCommonParent } from './utils/parenting';\nexport var getFocusabledIn = function (topNode) {\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(topNode, topNode, entries);\n var visibilityCache = new Map();\n var outerNodes = getTabbableNodes([commonParent], visibilityCache, true);\n var innerElements = getTabbableNodes(entries, visibilityCache)\n .filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n })\n .map(function (_a) {\n var node = _a.node;\n return node;\n });\n return outerNodes.map(function (_a) {\n var node = _a.node, index = _a.index;\n return ({\n node: node,\n index: index,\n lockItem: innerElements.indexOf(node) >= 0,\n guard: isGuard(node),\n });\n });\n};\n"],"names":["getFocusabledIn","topNode","entries","getAllAffectedNodes","filter","isNotAGuard","commonParent","getTopCommonParent","visibilityCache","Map","outerNodes","getTabbableNodes","innerElements","_a","node","map","index","lockItem","indexOf","guard","isGuard"],"mappings":"wOAIU,IAACA,EAAkB,SAAUC,GACnC,IAAIC,EAAUC,EAAoBF,GAASG,OAAOC,GAC9CC,EAAeC,EAAmBN,EAASA,EAASC,GACpDM,EAAkB,IAAIC,IACtBC,EAAaC,EAAiB,CAACL,GAAeE,GAAiB,GAC/DI,EAAgBD,EAAiBT,EAASM,GACzCJ,QAAO,SAAUS,GAClB,IAAIC,EAAOD,EAAGC,KACd,OAAOT,EAAYS,MAElBC,KAAI,SAAUF,GAEf,OADWA,EAAGC,QAGlB,OAAOJ,EAAWK,KAAI,SAAUF,GAC5B,IAAIC,EAAOD,EAAGC,KACd,OACIA,KAAMA,EACNE,MAHwBH,EAAGG,MAI3BC,SAAUL,EAAcM,QAAQJ,IAAS,EACzCK,MAAOC,EAAQN"}
1
+ {"version":3,"file":"focusables.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusables.js"],"sourcesContent":["import { getTabbableNodes } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { isGuard, isNotAGuard } from './utils/is';\nimport { getTopCommonParent } from './utils/parenting';\n/**\n * return list of focusable elements inside a given top node\n * @deprecated use {@link getFocusableIn}. Yep, there is typo in the function name\n */\nexport var getFocusabledIn = function (topNode) {\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(topNode, topNode, entries);\n var visibilityCache = new Map();\n var outerNodes = getTabbableNodes([commonParent], visibilityCache, true);\n var innerElements = getTabbableNodes(entries, visibilityCache)\n .filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n })\n .map(function (_a) {\n var node = _a.node;\n return node;\n });\n return outerNodes.map(function (_a) {\n var node = _a.node, index = _a.index;\n return ({\n node: node,\n index: index,\n lockItem: innerElements.indexOf(node) >= 0,\n guard: isGuard(node),\n });\n });\n};\n/**\n * return list of focusable elements inside a given top node\n */\nexport var getFocusableIn = getFocusabledIn;\n"],"names":["getFocusabledIn","topNode","entries","getAllAffectedNodes","filter","isNotAGuard","commonParent","getTopCommonParent","visibilityCache","Map","outerNodes","getTabbableNodes","innerElements","_a","node","map","index","lockItem","indexOf","guard","isGuard"],"mappings":"wOAQU,IAACA,EAAkB,SAAUC,GACnC,IAAIC,EAAUC,EAAoBF,GAASG,OAAOC,GAC9CC,EAAeC,EAAmBN,EAASA,EAASC,GACpDM,EAAkB,IAAIC,IACtBC,EAAaC,EAAiB,CAACL,GAAeE,GAAiB,GAC/DI,EAAgBD,EAAiBT,EAASM,GACzCJ,QAAO,SAAUS,GAClB,IAAIC,EAAOD,EAAGC,KACd,OAAOT,EAAYS,MAElBC,KAAI,SAAUF,GAEf,OADWA,EAAGC,QAGlB,OAAOJ,EAAWK,KAAI,SAAUF,GAC5B,IAAIC,EAAOD,EAAGC,KACd,MAAQ,CACJA,KAAMA,EACNE,MAHwBH,EAAGG,MAI3BC,SAAUL,EAAcM,QAAQJ,IAAS,EACzCK,MAAOC,EAAQN"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/index.js"],"sourcesContent":["import * as constants from './constants';\nimport { getFocusabledIn } from './focusables';\nimport { focusInside } from './focusInside';\nimport { focusIsHidden } from './focusIsHidden';\nimport { getFocusMerge as focusMerge } from './focusMerge';\nimport { setFocus } from './setFocus';\nimport { focusNextElement, focusPrevElement } from './sibling';\nimport tabHook from './tabHook';\nimport { getAllAffectedNodes } from './utils/all-affected';\nexport { tabHook, focusInside, focusIsHidden, focusMerge, getFocusabledIn, constants, getAllAffectedNodes, focusNextElement, focusPrevElement, };\nexport default setFocus;\n"],"names":["setFocus"],"mappings":"yCAUA,MAAeA"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/index.js"],"sourcesContent":["import * as constants from './constants';\nimport { focusInside } from './focusInside';\nimport { focusIsHidden } from './focusIsHidden';\nimport { getFocusMerge as focusMerge } from './focusMerge';\nimport { getFocusabledIn, getFocusableIn } from './focusables';\nimport { setFocus } from './setFocus';\nimport { focusNextElement, focusPrevElement } from './sibling';\nimport tabHook from './tabHook';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { getActiveElement } from './utils/getActiveElement';\nexport { tabHook, focusInside, focusIsHidden, focusMerge, getFocusableIn, getFocusabledIn, constants, getAllAffectedNodes, focusNextElement, focusPrevElement, getActiveElement, };\nexport default setFocus;\n//\n"],"names":["moveFocusInside","setFocus"],"mappings":"yCAWA,IAAAA,EAAeC"}
@@ -1,2 +1,2 @@
1
- import{getFocusMerge as o}from"./focusMerge.js";var n=function(o,n){o.focus(n),"contentWindow"in o&&o.contentWindow&&o.contentWindow.focus()},t=0,e=!1,c=function(c,i,s){void 0===s&&(s={});var f=o(c,i);if(!e&&f){if(t>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),e=!0,void setTimeout((function(){e=!1}),1);t++,n(f.node,s.focusOptions),t--}};export{n as focusOn,c as setFocus};
1
+ import{getFocusMerge as o}from"./focusMerge.js";var n=function(o,n){"focus"in o&&o.focus(n),"contentWindow"in o&&o.contentWindow&&o.contentWindow.focus()},t=0,e=!1,c=function(c,i,s){void 0===s&&(s={});var f=o(c,i);if(!e&&f){if(t>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),e=!0,void setTimeout((function(){e=!1}),1);t++,n(f.node,s.focusOptions),t--}};export{n as focusOn,c as setFocus};
2
2
  //# sourceMappingURL=setFocus.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"setFocus.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/setFocus.js"],"sourcesContent":["import { getFocusMerge } from './focusMerge';\nexport var focusOn = function (target, focusOptions) {\n target.focus(focusOptions);\n if ('contentWindow' in target && target.contentWindow) {\n target.contentWindow.focus();\n }\n};\nvar guardCount = 0;\nvar lockDisabled = false;\nexport var setFocus = function (topNode, lastNode, options) {\n if (options === void 0) { options = {}; }\n var focusable = getFocusMerge(topNode, lastNode);\n if (lockDisabled) {\n return;\n }\n if (focusable) {\n if (guardCount > 2) {\n console.error('FocusLock: focus-fighting detected. Only one focus management system could be active. ' +\n 'See https://github.com/theKashey/focus-lock/#focus-fighting');\n lockDisabled = true;\n setTimeout(function () {\n lockDisabled = false;\n }, 1);\n return;\n }\n guardCount++;\n focusOn(focusable.node, options.focusOptions);\n guardCount--;\n }\n};\n"],"names":["focusOn","target","focusOptions","focus","contentWindow","guardCount","lockDisabled","setFocus","topNode","lastNode","options","focusable","getFocusMerge","console","error","setTimeout","node"],"mappings":"gDACU,IAACA,EAAU,SAAUC,EAAQC,GACnCD,EAAOE,MAAMD,GACT,kBAAmBD,GAAUA,EAAOG,eACpCH,EAAOG,cAAcD,SAGzBE,EAAa,EACbC,GAAe,EACRC,EAAW,SAAUC,EAASC,EAAUC,QAC/B,IAAZA,IAAsBA,EAAU,IACpC,IAAIC,EAAYC,EAAcJ,EAASC,GACvC,IAAIH,GAGAK,EAAW,CACX,GAAIN,EAAa,EAOb,OANAQ,QAAQC,MAAM,qJAEdR,GAAe,OACfS,YAAW,WACPT,GAAe,IAChB,GAGPD,IACAL,EAAQW,EAAUK,KAAMN,EAAQR,cAChCG"}
1
+ {"version":3,"file":"setFocus.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/setFocus.js"],"sourcesContent":["import { getFocusMerge } from './focusMerge';\nexport var focusOn = function (target, focusOptions) {\n if ('focus' in target) {\n target.focus(focusOptions);\n }\n if ('contentWindow' in target && target.contentWindow) {\n target.contentWindow.focus();\n }\n};\nvar guardCount = 0;\nvar lockDisabled = false;\n/**\n * Sets focus at a given node. The last focused element will help to determine which element(first or last) should be focused.\n * HTML markers (see {@link import('./constants').FOCUS_AUTO} constants) can control autofocus\n * @param topNode\n * @param lastNode\n * @param options\n */\nexport var setFocus = function (topNode, lastNode, options) {\n if (options === void 0) { options = {}; }\n var focusable = getFocusMerge(topNode, lastNode);\n if (lockDisabled) {\n return;\n }\n if (focusable) {\n if (guardCount > 2) {\n // tslint:disable-next-line:no-console\n console.error('FocusLock: focus-fighting detected. Only one focus management system could be active. ' +\n 'See https://github.com/theKashey/focus-lock/#focus-fighting');\n lockDisabled = true;\n setTimeout(function () {\n lockDisabled = false;\n }, 1);\n return;\n }\n guardCount++;\n focusOn(focusable.node, options.focusOptions);\n guardCount--;\n }\n};\n"],"names":["focusOn","target","focusOptions","focus","contentWindow","guardCount","lockDisabled","setFocus","topNode","lastNode","options","focusable","getFocusMerge","console","error","setTimeout","node"],"mappings":"gDACU,IAACA,EAAU,SAAUC,EAAQC,GAC/B,UAAWD,GACXA,EAAOE,MAAMD,GAEb,kBAAmBD,GAAUA,EAAOG,eACpCH,EAAOG,cAAcD,SAGzBE,EAAa,EACbC,GAAe,EAQRC,EAAW,SAAUC,EAASC,EAAUC,QAC/B,IAAZA,IAAsBA,EAAU,IACpC,IAAIC,EAAYC,EAAcJ,EAASC,GACvC,IAAIH,GAGAK,EAAW,CACX,GAAIN,EAAa,EAQb,OANAQ,QAAQC,MAAM,qJAEdR,GAAe,OACfS,YAAW,WACPT,GAAe,IAChB,GAGPD,IACAL,EAAQW,EAAUK,KAAMN,EAAQR,cAChCG"}
@@ -1,2 +1,2 @@
1
- import{correctNodes as i}from"./utils/correctFocus.js";import{pickFocusable as t}from"./utils/firstFocus.js";import{isGuard as r}from"./utils/is.js";var f="NEW_FOCUS",s=function(f,s,e,n){var o=f.length,a=f[0],O=f[o-1],d=r(e);if(!(f.indexOf(e)>=0)){var x=s.indexOf(e),u=n?s.indexOf(n):x,m=n?f.indexOf(n):-1,c=x-u,h=s.indexOf(a),b=s.indexOf(O),l=i(s),p=l.indexOf(e)-(n?l.indexOf(n):x),v=t(f,0),F=t(f,o-1);return-1===x||-1===m?"NEW_FOCUS":!c&&m>=0?m:x<=h&&d&&Math.abs(c)>1?F:x>=b&&d&&Math.abs(c)>1?v:c&&Math.abs(p)>1?m:x<=h?F:x>b?v:c?Math.abs(c)>1?m:(o+m+c)%o:void 0}};export{f as NEW_FOCUS,s as newFocus};
1
+ import{correctNodes as i}from"./utils/correctFocus.js";import{pickFocusable as t}from"./utils/firstFocus.js";import{isGuard as r}from"./utils/is.js";var f="NEW_FOCUS",o=function(f,o,s,e){var n=f.length,a=f[0],d=f[n-1],O=r(s);if(!(s&&f.indexOf(s)>=0)){var x=void 0!==s?o.indexOf(s):-1,u=e?o.indexOf(e):x,m=e?f.indexOf(e):-1,v=x-u,c=o.indexOf(a),h=o.indexOf(d),b=i(o),l=(void 0!==s?b.indexOf(s):-1)-(e?b.indexOf(e):x),p=t(f,0),F=t(f,n-1);return-1===x||-1===m?"NEW_FOCUS":!v&&m>=0?m:x<=c&&O&&Math.abs(v)>1?F:x>=h&&O&&Math.abs(v)>1?p:v&&Math.abs(l)>1?m:x<=c?F:x>h?p:v?Math.abs(v)>1?m:(n+m+v)%n:void 0}};export{f as NEW_FOCUS,o as newFocus};
2
2
  //# sourceMappingURL=solver.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"solver.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/solver.js"],"sourcesContent":["import { correctNodes } from './utils/correctFocus';\nimport { pickFocusable } from './utils/firstFocus';\nimport { isGuard } from './utils/is';\nexport var NEW_FOCUS = 'NEW_FOCUS';\nexport var newFocus = function (innerNodes, outerNodes, activeElement, lastNode) {\n var cnt = innerNodes.length;\n var firstFocus = innerNodes[0];\n var lastFocus = innerNodes[cnt - 1];\n var isOnGuard = isGuard(activeElement);\n if (innerNodes.indexOf(activeElement) >= 0) {\n return undefined;\n }\n var activeIndex = outerNodes.indexOf(activeElement);\n var lastIndex = lastNode ? outerNodes.indexOf(lastNode) : activeIndex;\n var lastNodeInside = lastNode ? innerNodes.indexOf(lastNode) : -1;\n var indexDiff = activeIndex - lastIndex;\n var firstNodeIndex = outerNodes.indexOf(firstFocus);\n var lastNodeIndex = outerNodes.indexOf(lastFocus);\n var correctedNodes = correctNodes(outerNodes);\n var correctedIndexDiff = correctedNodes.indexOf(activeElement) - (lastNode ? correctedNodes.indexOf(lastNode) : activeIndex);\n var returnFirstNode = pickFocusable(innerNodes, 0);\n var returnLastNode = pickFocusable(innerNodes, cnt - 1);\n if (activeIndex === -1 || lastNodeInside === -1) {\n return NEW_FOCUS;\n }\n if (!indexDiff && lastNodeInside >= 0) {\n return lastNodeInside;\n }\n if (activeIndex <= firstNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnLastNode;\n }\n if (activeIndex >= lastNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnFirstNode;\n }\n if (indexDiff && Math.abs(correctedIndexDiff) > 1) {\n return lastNodeInside;\n }\n if (activeIndex <= firstNodeIndex) {\n return returnLastNode;\n }\n if (activeIndex > lastNodeIndex) {\n return returnFirstNode;\n }\n if (indexDiff) {\n if (Math.abs(indexDiff) > 1) {\n return lastNodeInside;\n }\n return (cnt + lastNodeInside + indexDiff) % cnt;\n }\n return undefined;\n};\n"],"names":["NEW_FOCUS","newFocus","innerNodes","outerNodes","activeElement","lastNode","cnt","length","firstFocus","lastFocus","isOnGuard","isGuard","indexOf","activeIndex","lastIndex","lastNodeInside","indexDiff","firstNodeIndex","lastNodeIndex","correctedNodes","correctNodes","correctedIndexDiff","returnFirstNode","pickFocusable","returnLastNode","Math","abs"],"mappings":"qJAGU,IAACA,EAAY,YACZC,EAAW,SAAUC,EAAYC,EAAYC,EAAeC,GACnE,IAAIC,EAAMJ,EAAWK,OACjBC,EAAaN,EAAW,GACxBO,EAAYP,EAAWI,EAAM,GAC7BI,EAAYC,EAAQP,GACxB,KAAIF,EAAWU,QAAQR,IAAkB,GAAzC,CAGA,IAAIS,EAAcV,EAAWS,QAAQR,GACjCU,EAAYT,EAAWF,EAAWS,QAAQP,GAAYQ,EACtDE,EAAiBV,EAAWH,EAAWU,QAAQP,IAAa,EAC5DW,EAAYH,EAAcC,EAC1BG,EAAiBd,EAAWS,QAAQJ,GACpCU,EAAgBf,EAAWS,QAAQH,GACnCU,EAAiBC,EAAajB,GAC9BkB,EAAqBF,EAAeP,QAAQR,IAAkBC,EAAWc,EAAeP,QAAQP,GAAYQ,GAC5GS,EAAkBC,EAAcrB,EAAY,GAC5CsB,EAAiBD,EAAcrB,EAAYI,EAAM,GACrD,OAAqB,IAAjBO,IAA0C,IAApBE,EAnBP,aAsBdC,GAAaD,GAAkB,EACzBA,EAEPF,GAAeI,GAAkBP,GAAae,KAAKC,IAAIV,GAAa,EAC7DQ,EAEPX,GAAeK,GAAiBR,GAAae,KAAKC,IAAIV,GAAa,EAC5DM,EAEPN,GAAaS,KAAKC,IAAIL,GAAsB,EACrCN,EAEPF,GAAeI,EACRO,EAEPX,EAAcK,EACPI,EAEPN,EACIS,KAAKC,IAAIV,GAAa,EACfD,GAEHT,EAAMS,EAAiBC,GAAaV,OAJhD"}
1
+ {"version":3,"file":"solver.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/solver.js"],"sourcesContent":["import { correctNodes } from './utils/correctFocus';\nimport { pickFocusable } from './utils/firstFocus';\nimport { isGuard } from './utils/is';\nexport var NEW_FOCUS = 'NEW_FOCUS';\n/**\n * Main solver for the \"find next focus\" question\n * @param innerNodes\n * @param outerNodes\n * @param activeElement\n * @param lastNode\n * @returns {number|string|undefined|*}\n */\nexport var newFocus = function (innerNodes, outerNodes, activeElement, lastNode) {\n var cnt = innerNodes.length;\n var firstFocus = innerNodes[0];\n var lastFocus = innerNodes[cnt - 1];\n var isOnGuard = isGuard(activeElement);\n // focus is inside\n if (activeElement && innerNodes.indexOf(activeElement) >= 0) {\n return undefined;\n }\n var activeIndex = activeElement !== undefined ? outerNodes.indexOf(activeElement) : -1;\n var lastIndex = lastNode ? outerNodes.indexOf(lastNode) : activeIndex;\n var lastNodeInside = lastNode ? innerNodes.indexOf(lastNode) : -1;\n var indexDiff = activeIndex - lastIndex;\n var firstNodeIndex = outerNodes.indexOf(firstFocus);\n var lastNodeIndex = outerNodes.indexOf(lastFocus);\n var correctedNodes = correctNodes(outerNodes);\n var correctedIndex = activeElement !== undefined ? correctedNodes.indexOf(activeElement) : -1;\n var correctedIndexDiff = correctedIndex - (lastNode ? correctedNodes.indexOf(lastNode) : activeIndex);\n var returnFirstNode = pickFocusable(innerNodes, 0);\n var returnLastNode = pickFocusable(innerNodes, cnt - 1);\n // new focus\n if (activeIndex === -1 || lastNodeInside === -1) {\n return NEW_FOCUS;\n }\n // old focus\n if (!indexDiff && lastNodeInside >= 0) {\n return lastNodeInside;\n }\n // first element\n if (activeIndex <= firstNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnLastNode;\n }\n // last element\n if (activeIndex >= lastNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnFirstNode;\n }\n // jump out, but not on the guard\n if (indexDiff && Math.abs(correctedIndexDiff) > 1) {\n return lastNodeInside;\n }\n // focus above lock\n if (activeIndex <= firstNodeIndex) {\n return returnLastNode;\n }\n // focus below lock\n if (activeIndex > lastNodeIndex) {\n return returnFirstNode;\n }\n // index is inside tab order, but outside Lock\n if (indexDiff) {\n if (Math.abs(indexDiff) > 1) {\n return lastNodeInside;\n }\n return (cnt + lastNodeInside + indexDiff) % cnt;\n }\n // do nothing\n return undefined;\n};\n"],"names":["NEW_FOCUS","newFocus","innerNodes","outerNodes","activeElement","lastNode","cnt","length","firstFocus","lastFocus","isOnGuard","isGuard","indexOf","activeIndex","undefined","lastIndex","lastNodeInside","indexDiff","firstNodeIndex","lastNodeIndex","correctedNodes","correctNodes","correctedIndexDiff","returnFirstNode","pickFocusable","returnLastNode","Math","abs"],"mappings":"qJAGU,IAACA,EAAY,YASZC,EAAW,SAAUC,EAAYC,EAAYC,EAAeC,GACnE,IAAIC,EAAMJ,EAAWK,OACjBC,EAAaN,EAAW,GACxBO,EAAYP,EAAWI,EAAM,GAC7BI,EAAYC,EAAQP,GAExB,KAAIA,GAAiBF,EAAWU,QAAQR,IAAkB,GAA1D,CAGA,IAAIS,OAAgCC,IAAlBV,EAA8BD,EAAWS,QAAQR,IAAkB,EACjFW,EAAYV,EAAWF,EAAWS,QAAQP,GAAYQ,EACtDG,EAAiBX,EAAWH,EAAWU,QAAQP,IAAa,EAC5DY,EAAYJ,EAAcE,EAC1BG,EAAiBf,EAAWS,QAAQJ,GACpCW,EAAgBhB,EAAWS,QAAQH,GACnCW,EAAiBC,EAAalB,GAE9BmB,QADmCR,IAAlBV,EAA8BgB,EAAeR,QAAQR,IAAkB,IACjDC,EAAWe,EAAeR,QAAQP,GAAYQ,GACrFU,EAAkBC,EAActB,EAAY,GAC5CuB,EAAiBD,EAActB,EAAYI,EAAM,GAErD,OAAqB,IAAjBO,IAA0C,IAApBG,EA9BP,aAkCdC,GAAaD,GAAkB,EACzBA,EAGPH,GAAeK,GAAkBR,GAAagB,KAAKC,IAAIV,GAAa,EAC7DQ,EAGPZ,GAAeM,GAAiBT,GAAagB,KAAKC,IAAIV,GAAa,EAC5DM,EAGPN,GAAaS,KAAKC,IAAIL,GAAsB,EACrCN,EAGPH,GAAeK,EACRO,EAGPZ,EAAcM,EACPI,EAGPN,EACIS,KAAKC,IAAIV,GAAa,EACfD,GAEHV,EAAMU,EAAiBC,GAAaX,OAJhD"}
@@ -1,2 +1,2 @@
1
- import{toArray as r}from"./array.js";import{isVisibleCached as t,notHiddenInput as n}from"./is.js";import{orderByTabIndex as o}from"./tabOrder.js";import{getFocusables as i,getParentAutofocusables as f}from"./tabUtils.js";var u=function(o,i){return r(o).filter((function(r){return t(i,r)})).filter((function(r){return n(r)}))},e=function(r,t,n){return o(u(i(r,n),t),!0,n)},m=function(r,t){return o(u(i(r),t),!1)},c=function(r,t){return u(f(r),t)};export{u as filterFocusable,m as getAllTabbableNodes,e as getTabbableNodes,c as parentAutofocusables};
1
+ import{toArray as r}from"./array.js";import{isVisibleCached as t,notHiddenInput as n,isAutoFocusAllowedCached as o}from"./is.js";import{orderByTabIndex as i}from"./tabOrder.js";import{getFocusables as e,getParentAutofocusables as u}from"./tabUtils.js";var f=function(o,i){return r(o).filter((function(r){return t(i,r)})).filter((function(r){return n(r)}))},c=function(t,n){return void 0===n&&(n=new Map),r(t).filter((function(r){return o(n,r)}))},a=function(r,t,n){return i(f(e(r,n),t),!0,n)},s=function(r,t){return i(f(e(r),t),!1)},m=function(r,t){return f(u(r),t)},l=function(t,n){return(t.shadowRoot?l(t.shadowRoot,n):Object.getPrototypeOf(t).contains.call(t,n))||r(t.children).some((function(r){return l(r,n)}))};export{l as contains,c as filterAutoFocusable,f as filterFocusable,s as getAllTabbableNodes,a as getTabbableNodes,m as parentAutofocusables};
2
2
  //# sourceMappingURL=DOMutils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DOMutils.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/DOMutils.js"],"sourcesContent":["import { toArray } from './array';\nimport { isVisibleCached, notHiddenInput } from './is';\nimport { orderByTabIndex } from './tabOrder';\nimport { getFocusables, getParentAutofocusables } from './tabUtils';\nexport var filterFocusable = function (nodes, visibilityCache) {\n return toArray(nodes)\n .filter(function (node) { return isVisibleCached(visibilityCache, node); })\n .filter(function (node) { return notHiddenInput(node); });\n};\nexport var getTabbableNodes = function (topNodes, visibilityCache, withGuards) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards), visibilityCache), true, withGuards);\n};\nexport var getAllTabbableNodes = function (topNodes, visibilityCache) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes), visibilityCache), false);\n};\nexport var parentAutofocusables = function (topNode, visibilityCache) {\n return filterFocusable(getParentAutofocusables(topNode), visibilityCache);\n};\n"],"names":["filterFocusable","nodes","visibilityCache","toArray","filter","node","isVisibleCached","notHiddenInput","getTabbableNodes","topNodes","withGuards","orderByTabIndex","getFocusables","getAllTabbableNodes","parentAutofocusables","topNode","getParentAutofocusables"],"mappings":"8NAIU,IAACA,EAAkB,SAAUC,EAAOC,GAC1C,OAAOC,EAAQF,GACVG,QAAO,SAAUC,GAAQ,OAAOC,EAAgBJ,EAAiBG,MACjED,QAAO,SAAUC,GAAQ,OAAOE,EAAeF,OAE7CG,EAAmB,SAAUC,EAAUP,EAAiBQ,GAC/D,OAAOC,EAAgBX,EAAgBY,EAAcH,EAAUC,GAAaR,IAAkB,EAAMQ,IAE7FG,EAAsB,SAAUJ,EAAUP,GACjD,OAAOS,EAAgBX,EAAgBY,EAAcH,GAAWP,IAAkB,IAE3EY,EAAuB,SAAUC,EAASb,GACjD,OAAOF,EAAgBgB,EAAwBD,GAAUb"}
1
+ {"version":3,"file":"DOMutils.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/DOMutils.js"],"sourcesContent":["import { toArray } from './array';\nimport { isAutoFocusAllowedCached, isVisibleCached, notHiddenInput } from './is';\nimport { orderByTabIndex } from './tabOrder';\nimport { getFocusables, getParentAutofocusables } from './tabUtils';\n/**\n * given list of focusable elements keeps the ones user can interact with\n * @param nodes\n * @param visibilityCache\n */\nexport var filterFocusable = function (nodes, visibilityCache) {\n return toArray(nodes)\n .filter(function (node) { return isVisibleCached(visibilityCache, node); })\n .filter(function (node) { return notHiddenInput(node); });\n};\nexport var filterAutoFocusable = function (nodes, cache) {\n if (cache === void 0) { cache = new Map(); }\n return toArray(nodes).filter(function (node) { return isAutoFocusAllowedCached(cache, node); });\n};\n/**\n * only tabbable ones\n * (but with guards which would be ignored)\n */\nexport var getTabbableNodes = function (topNodes, visibilityCache, withGuards) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards), visibilityCache), true, withGuards);\n};\n/**\n * actually anything \"focusable\", not only tabbable\n * (without guards, as long as they are not expected to be focused)\n */\nexport var getAllTabbableNodes = function (topNodes, visibilityCache) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes), visibilityCache), false);\n};\n/**\n * return list of nodes which are expected to be auto-focused\n * @param topNode\n * @param visibilityCache\n */\nexport var parentAutofocusables = function (topNode, visibilityCache) {\n return filterFocusable(getParentAutofocusables(topNode), visibilityCache);\n};\n/*\n * Determines if element is contained in scope, including nested shadow DOMs\n */\nexport var contains = function (scope, element) {\n return ((scope.shadowRoot\n ? contains(scope.shadowRoot, element)\n : Object.getPrototypeOf(scope).contains.call(scope, element)) ||\n toArray(scope.children).some(function (child) { return contains(child, element); }));\n};\n"],"names":["filterFocusable","nodes","visibilityCache","toArray","filter","node","isVisibleCached","notHiddenInput","filterAutoFocusable","cache","Map","isAutoFocusAllowedCached","getTabbableNodes","topNodes","withGuards","orderByTabIndex","getFocusables","getAllTabbableNodes","parentAutofocusables","topNode","getParentAutofocusables","contains","scope","element","shadowRoot","Object","getPrototypeOf","call","children","some","child"],"mappings":"4PASU,IAACA,EAAkB,SAAUC,EAAOC,GAC1C,OAAOC,EAAQF,GACVG,QAAO,SAAUC,GAAQ,OAAOC,EAAgBJ,EAAiBG,MACjED,QAAO,SAAUC,GAAQ,OAAOE,EAAeF,OAE7CG,EAAsB,SAAUP,EAAOQ,GAE9C,YADc,IAAVA,IAAoBA,EAAQ,IAAIC,KAC7BP,EAAQF,GAAOG,QAAO,SAAUC,GAAQ,OAAOM,EAAyBF,EAAOJ,OAM/EO,EAAmB,SAAUC,EAAUX,EAAiBY,GAC/D,OAAOC,EAAgBf,EAAgBgB,EAAcH,EAAUC,GAAaZ,IAAkB,EAAMY,IAM7FG,EAAsB,SAAUJ,EAAUX,GACjD,OAAOa,EAAgBf,EAAgBgB,EAAcH,GAAWX,IAAkB,IAO3EgB,EAAuB,SAAUC,EAASjB,GACjD,OAAOF,EAAgBoB,EAAwBD,GAAUjB,IAKlDmB,EAAW,SAAUC,EAAOC,GACnC,OAASD,EAAME,WACTH,EAASC,EAAME,WAAYD,GAC3BE,OAAOC,eAAeJ,GAAOD,SAASM,KAAKL,EAAOC,KACpDpB,EAAQmB,EAAMM,UAAUC,MAAK,SAAUC,GAAS,OAAOT,EAASS,EAAOP"}
@@ -1,2 +1,2 @@
1
- import{FOCUS_GROUP as r,FOCUS_DISABLED as t}from"../constants.js";import{toArray as e,asArray as n}from"./array.js";var o=function(r){return r.parentNode?o(r.parentNode):r},a=function(a){return n(a).filter(Boolean).reduce((function(n,a){var u=a.getAttribute(r);return n.push.apply(n,u?function(r){for(var t=new Set,e=r.length,n=0;n<e;n+=1)for(var o=n+1;o<e;o+=1){var a=r[n].compareDocumentPosition(r[o]);(a&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(o),(a&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(n)}return r.filter((function(r,e){return!t.has(e)}))}(e(o(a).querySelectorAll("["+r+'="'+u+'"]:not(['+t+'="disabled"])'))):[a]),n}),[])};export{a as getAllAffectedNodes};
1
+ import{FOCUS_GROUP as r,FOCUS_DISABLED as t}from"../constants.js";import{toArray as e,asArray as n}from"./array.js";var o=function(r){return r.parentNode?o(r.parentNode):r},a=function(a){return n(a).filter(Boolean).reduce((function(n,a){var c=a.getAttribute(r);return n.push.apply(n,c?function(r){for(var t=new Set,e=r.length,n=0;n<e;n+=1)for(var o=n+1;o<e;o+=1){var a=r[n].compareDocumentPosition(r[o]);(a&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(o),(a&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(n)}return r.filter((function(r,e){return!t.has(e)}))}(e(o(a).querySelectorAll("[".concat(r,'="').concat(c,'"]:not([').concat(t,'="disabled"])')))):[a]),n}),[])};export{a as getAllAffectedNodes};
2
2
  //# sourceMappingURL=all-affected.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"all-affected.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/all-affected.js"],"sourcesContent":["import { FOCUS_DISABLED, FOCUS_GROUP } from '../constants';\nimport { asArray, toArray } from './array';\nvar filterNested = function (nodes) {\n var contained = new Set();\n var l = nodes.length;\n for (var i = 0; i < l; i += 1) {\n for (var j = i + 1; j < l; j += 1) {\n var position = nodes[i].compareDocumentPosition(nodes[j]);\n if ((position & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0) {\n contained.add(j);\n }\n if ((position & Node.DOCUMENT_POSITION_CONTAINS) > 0) {\n contained.add(i);\n }\n }\n }\n return nodes.filter(function (_, index) { return !contained.has(index); });\n};\nvar getTopParent = function (node) {\n return node.parentNode ? getTopParent(node.parentNode) : node;\n};\nexport var getAllAffectedNodes = function (node) {\n var nodes = asArray(node);\n return nodes.filter(Boolean).reduce(function (acc, currentNode) {\n var group = currentNode.getAttribute(FOCUS_GROUP);\n acc.push.apply(acc, (group\n ? filterNested(toArray(getTopParent(currentNode).querySelectorAll(\"[\" + FOCUS_GROUP + \"=\\\"\" + group + \"\\\"]:not([\" + FOCUS_DISABLED + \"=\\\"disabled\\\"])\")))\n : [currentNode]));\n return acc;\n }, []);\n};\n"],"names":["getTopParent","node","parentNode","getAllAffectedNodes","asArray","filter","Boolean","reduce","acc","currentNode","group","getAttribute","FOCUS_GROUP","push","apply","nodes","contained","Set","l","length","i","j","position","compareDocumentPosition","Node","DOCUMENT_POSITION_CONTAINED_BY","add","DOCUMENT_POSITION_CONTAINS","_","index","has","filterNested","toArray","querySelectorAll","FOCUS_DISABLED"],"mappings":"oHAEA,IAgBIA,EAAe,SAAUC,GACzB,OAAOA,EAAKC,WAAaF,EAAaC,EAAKC,YAAcD,GAElDE,EAAsB,SAAUF,GAEvC,OADYG,EAAQH,GACPI,OAAOC,SAASC,QAAO,SAAUC,EAAKC,GAC/C,IAAIC,EAAQD,EAAYE,aAAaC,GAIrC,OAHAJ,EAAIK,KAAKC,MAAMN,EAAME,EAvBV,SAAUK,GAGzB,IAFA,IAAIC,EAAY,IAAIC,IAChBC,EAAIH,EAAMI,OACLC,EAAI,EAAGA,EAAIF,EAAGE,GAAK,EACxB,IAAK,IAAIC,EAAID,EAAI,EAAGC,EAAIH,EAAGG,GAAK,EAAG,CAC/B,IAAIC,EAAWP,EAAMK,GAAGG,wBAAwBR,EAAMM,KACjDC,EAAWE,KAAKC,gCAAkC,GACnDT,EAAUU,IAAIL,IAEbC,EAAWE,KAAKG,4BAA8B,GAC/CX,EAAUU,IAAIN,GAI1B,OAAOL,EAAMV,QAAO,SAAUuB,EAAGC,GAAS,OAAQb,EAAUc,IAAID,MAUtDE,CAAaC,EAAQhC,EAAaS,GAAawB,iBAAiB,IAAMrB,EAAc,KAAQF,EAAQ,WAAcwB,EAAiB,mBACnI,CAACzB,IACAD,IACR"}
1
+ {"version":3,"file":"all-affected.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/all-affected.js"],"sourcesContent":["import { FOCUS_DISABLED, FOCUS_GROUP } from '../constants';\nimport { asArray, toArray } from './array';\n/**\n * in case of multiple nodes nested inside each other\n * keeps only top ones\n * this is O(nlogn)\n * @param nodes\n * @returns {*}\n */\nvar filterNested = function (nodes) {\n var contained = new Set();\n var l = nodes.length;\n for (var i = 0; i < l; i += 1) {\n for (var j = i + 1; j < l; j += 1) {\n var position = nodes[i].compareDocumentPosition(nodes[j]);\n /* eslint-disable no-bitwise */\n if ((position & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0) {\n contained.add(j);\n }\n if ((position & Node.DOCUMENT_POSITION_CONTAINS) > 0) {\n contained.add(i);\n }\n /* eslint-enable */\n }\n }\n return nodes.filter(function (_, index) { return !contained.has(index); });\n};\n/**\n * finds top most parent for a node\n * @param node\n * @returns {*}\n */\nvar getTopParent = function (node) {\n return node.parentNode ? getTopParent(node.parentNode) : node;\n};\n/**\n * returns all \"focus containers\" inside a given node\n * @param node\n * @returns {T}\n */\nexport var getAllAffectedNodes = function (node) {\n var nodes = asArray(node);\n return nodes.filter(Boolean).reduce(function (acc, currentNode) {\n var group = currentNode.getAttribute(FOCUS_GROUP);\n acc.push.apply(acc, (group\n ? filterNested(toArray(getTopParent(currentNode).querySelectorAll(\"[\".concat(FOCUS_GROUP, \"=\\\"\").concat(group, \"\\\"]:not([\").concat(FOCUS_DISABLED, \"=\\\"disabled\\\"])\"))))\n : [currentNode]));\n return acc;\n }, []);\n};\n"],"names":["getTopParent","node","parentNode","getAllAffectedNodes","asArray","filter","Boolean","reduce","acc","currentNode","group","getAttribute","FOCUS_GROUP","push","apply","nodes","contained","Set","l","length","i","j","position","compareDocumentPosition","Node","DOCUMENT_POSITION_CONTAINED_BY","add","DOCUMENT_POSITION_CONTAINS","_","index","has","filterNested","toArray","querySelectorAll","concat","FOCUS_DISABLED"],"mappings":"oHASA,IAuBIA,EAAe,SAAUC,GACzB,OAAOA,EAAKC,WAAaF,EAAaC,EAAKC,YAAcD,GAOlDE,EAAsB,SAAUF,GAEvC,OADYG,EAAQH,GACPI,OAAOC,SAASC,QAAO,SAAUC,EAAKC,GAC/C,IAAIC,EAAQD,EAAYE,aAAaC,GAIrC,OAHAJ,EAAIK,KAAKC,MAAMN,EAAME,EAnCV,SAAUK,GAGzB,IAFA,IAAIC,EAAY,IAAIC,IAChBC,EAAIH,EAAMI,OACLC,EAAI,EAAGA,EAAIF,EAAGE,GAAK,EACxB,IAAK,IAAIC,EAAID,EAAI,EAAGC,EAAIH,EAAGG,GAAK,EAAG,CAC/B,IAAIC,EAAWP,EAAMK,GAAGG,wBAAwBR,EAAMM,KAEjDC,EAAWE,KAAKC,gCAAkC,GACnDT,EAAUU,IAAIL,IAEbC,EAAWE,KAAKG,4BAA8B,GAC/CX,EAAUU,IAAIN,GAK1B,OAAOL,EAAMV,QAAO,SAAUuB,EAAGC,GAAS,OAAQb,EAAUc,IAAID,MAoBtDE,CAAaC,EAAQhC,EAAaS,GAAawB,iBAAiB,IAAIC,OAAOtB,EAAa,MAAOsB,OAAOxB,EAAO,YAAawB,OAAOC,EAAgB,oBACjJ,CAAC1B,IACAD,IACR"}
@@ -1 +1 @@
1
- {"version":3,"file":"array.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/array.js"],"sourcesContent":["export var toArray = function (a) {\n var ret = Array(a.length);\n for (var i = 0; i < a.length; ++i) {\n ret[i] = a[i];\n }\n return ret;\n};\nexport var asArray = function (a) { return (Array.isArray(a) ? a : [a]); };\n"],"names":["toArray","a","ret","Array","length","i","asArray","isArray"],"mappings":"AAAU,IAACA,EAAU,SAAUC,GAE3B,IADA,IAAIC,EAAMC,MAAMF,EAAEG,QACTC,EAAI,EAAGA,EAAIJ,EAAEG,SAAUC,EAC5BH,EAAIG,GAAKJ,EAAEI,GAEf,OAAOH,GAEAI,EAAU,SAAUL,GAAK,OAAQE,MAAMI,QAAQN,GAAKA,EAAI,CAACA"}
1
+ {"version":3,"file":"array.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/array.js"],"sourcesContent":["/*\nIE11 support\n */\nexport var toArray = function (a) {\n var ret = Array(a.length);\n for (var i = 0; i < a.length; ++i) {\n ret[i] = a[i];\n }\n return ret;\n};\nexport var asArray = function (a) { return (Array.isArray(a) ? a : [a]); };\n"],"names":["toArray","a","ret","Array","length","i","asArray","isArray"],"mappings":"AAGU,IAACA,EAAU,SAAUC,GAE3B,IADA,IAAIC,EAAMC,MAAMF,EAAEG,QACTC,EAAI,EAAGA,EAAIJ,EAAEG,SAAUC,EAC5BH,EAAIG,GAAKJ,EAAEI,GAEf,OAAOH,GAEAI,EAAU,SAAUL,GAAK,OAAQE,MAAMI,QAAQN,GAAKA,EAAI,CAACA"}
@@ -1,2 +1,2 @@
1
- var n=function(n){return"INPUT"===n.tagName&&"radio"===n.type},r=function(r,t){return n(r)&&r.name?function(r,t){return t.filter(n).filter((function(n){return n.name===r.name})).filter((function(n){return n.checked}))[0]||r}(r,t):r},t=function(n){var t=new Set;return n.forEach((function(e){return t.add(r(e,n))})),n.filter((function(n){return t.has(n)}))};export{r as correctNode,t as correctNodes};
1
+ import{isRadioElement as n}from"./is.js";var r=function(r,t){return n(r)&&r.name?function(r,t){return t.filter(n).filter((function(n){return n.name===r.name})).filter((function(n){return n.checked}))[0]||r}(r,t):r},t=function(n){var t=new Set;return n.forEach((function(e){return t.add(r(e,n))})),n.filter((function(n){return t.has(n)}))};export{r as correctNode,t as correctNodes};
2
2
  //# sourceMappingURL=correctFocus.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"correctFocus.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/correctFocus.js"],"sourcesContent":["var isRadio = function (node) { return node.tagName === 'INPUT' && node.type === 'radio'; };\nvar findSelectedRadio = function (node, nodes) {\n return nodes\n .filter(isRadio)\n .filter(function (el) { return el.name === node.name; })\n .filter(function (el) { return el.checked; })[0] || node;\n};\nexport var correctNode = function (node, nodes) {\n if (isRadio(node) && node.name) {\n return findSelectedRadio(node, nodes);\n }\n return node;\n};\nexport var correctNodes = function (nodes) {\n var resultSet = new Set();\n nodes.forEach(function (node) { return resultSet.add(correctNode(node, nodes)); });\n return nodes.filter(function (node) { return resultSet.has(node); });\n};\n"],"names":["isRadio","node","tagName","type","correctNode","nodes","name","filter","el","checked","findSelectedRadio","correctNodes","resultSet","Set","forEach","add","has"],"mappings":"AAAA,IAAIA,EAAU,SAAUC,GAAQ,MAAwB,UAAjBA,EAAKC,SAAqC,UAAdD,EAAKE,MAO7DC,EAAc,SAAUH,EAAMI,GACrC,OAAIL,EAAQC,IAASA,EAAKK,KAPN,SAAUL,EAAMI,GACpC,OAAOA,EACFE,OAAOP,GACPO,QAAO,SAAUC,GAAM,OAAOA,EAAGF,OAASL,EAAKK,QAC/CC,QAAO,SAAUC,GAAM,OAAOA,EAAGC,WAAY,IAAMR,EAI7CS,CAAkBT,EAAMI,GAE5BJ,GAEAU,EAAe,SAAUN,GAChC,IAAIO,EAAY,IAAIC,IAEpB,OADAR,EAAMS,SAAQ,SAAUb,GAAQ,OAAOW,EAAUG,IAAIX,EAAYH,EAAMI,OAChEA,EAAME,QAAO,SAAUN,GAAQ,OAAOW,EAAUI,IAAIf"}
1
+ {"version":3,"file":"correctFocus.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/correctFocus.js"],"sourcesContent":["import { isRadioElement } from './is';\nvar findSelectedRadio = function (node, nodes) {\n return nodes\n .filter(isRadioElement)\n .filter(function (el) { return el.name === node.name; })\n .filter(function (el) { return el.checked; })[0] || node;\n};\nexport var correctNode = function (node, nodes) {\n if (isRadioElement(node) && node.name) {\n return findSelectedRadio(node, nodes);\n }\n return node;\n};\n/**\n * giving a set of radio inputs keeps only selected (tabbable) ones\n * @param nodes\n */\nexport var correctNodes = function (nodes) {\n // IE11 has no Set(array) constructor\n var resultSet = new Set();\n nodes.forEach(function (node) { return resultSet.add(correctNode(node, nodes)); });\n // using filter to support IE11\n return nodes.filter(function (node) { return resultSet.has(node); });\n};\n"],"names":["correctNode","node","nodes","isRadioElement","name","filter","el","checked","findSelectedRadio","correctNodes","resultSet","Set","forEach","add","has"],"mappings":"yCACA,IAMWA,EAAc,SAAUC,EAAMC,GACrC,OAAIC,EAAeF,IAASA,EAAKG,KAPb,SAAUH,EAAMC,GACpC,OAAOA,EACFG,OAAOF,GACPE,QAAO,SAAUC,GAAM,OAAOA,EAAGF,OAASH,EAAKG,QAC/CC,QAAO,SAAUC,GAAM,OAAOA,EAAGC,WAAY,IAAMN,EAI7CO,CAAkBP,EAAMC,GAE5BD,GAMAQ,EAAe,SAAUP,GAEhC,IAAIQ,EAAY,IAAIC,IAGpB,OAFAT,EAAMU,SAAQ,SAAUX,GAAQ,OAAOS,EAAUG,IAAIb,EAAYC,EAAMC,OAEhEA,EAAMG,QAAO,SAAUJ,GAAQ,OAAOS,EAAUI,IAAIb"}
@@ -0,0 +1,2 @@
1
+ var e=function(t){return t.activeElement?t.activeElement.shadowRoot?e(t.activeElement.shadowRoot):t.activeElement:void 0},t=function(){return document.activeElement?document.activeElement.shadowRoot?e(document.activeElement.shadowRoot):document.activeElement:void 0};export{t as getActiveElement};
2
+ //# sourceMappingURL=getActiveElement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getActiveElement.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/getActiveElement.js"],"sourcesContent":["var getNestedShadowActiveElement = function (shadowRoot) {\n return shadowRoot.activeElement\n ? shadowRoot.activeElement.shadowRoot\n ? getNestedShadowActiveElement(shadowRoot.activeElement.shadowRoot)\n : shadowRoot.activeElement\n : undefined;\n};\n/**\n * returns active element from document or from nested shadowdoms\n */\nexport var getActiveElement = function () {\n return (document.activeElement\n ? document.activeElement.shadowRoot\n ? getNestedShadowActiveElement(document.activeElement.shadowRoot)\n : document.activeElement\n : undefined); // eslint-disable-next-line @typescript-eslint/no-explicit-any\n};\n"],"names":["getNestedShadowActiveElement","shadowRoot","activeElement","undefined","getActiveElement","document"],"mappings":"AAAA,IAAIA,EAA+B,SAAUC,GACzC,OAAOA,EAAWC,cACZD,EAAWC,cAAcD,WACrBD,EAA6BC,EAAWC,cAAcD,YACtDA,EAAWC,mBACfC,GAKCC,EAAmB,WAC1B,OAAQC,SAASH,cACXG,SAASH,cAAcD,WACnBD,EAA6BK,SAASH,cAAcD,YACpDI,SAASH,mBACbC"}
@@ -1,2 +1,2 @@
1
- var e=function(e,t){return!e||e===document||e&&e.nodeType===Node.DOCUMENT_NODE||!function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!(!t||!t.getPropertyValue||"none"!==t.getPropertyValue("display")&&"hidden"!==t.getPropertyValue("visibility"))}(e)&&t(e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode)},t=function(n,r){var o=n.get(r);if(void 0!==o)return o;var d=e(r,t.bind(void 0,n));return n.set(r,d),d},n=function(e){return!(("INPUT"===e.tagName||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))},r=function(e){return Boolean(e&&e.dataset&&e.dataset.focusGuard)},o=function(e){return!r(e)},d=function(e){return Boolean(e)};export{d as isDefined,r as isGuard,o as isNotAGuard,t as isVisibleCached,n as notHiddenInput};
1
+ import{FOCUS_NO_AUTOFOCUS as n}from"../constants.js";var t=function(n){return n.parentNode&&n.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?n.parentNode.host:n.parentNode},e=function(n){return n===document||n&&n.nodeType===Node.DOCUMENT_NODE},r=function(n,r){return!n||e(n)||!function(n){if(n.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(n,null);return!(!t||!t.getPropertyValue||"none"!==t.getPropertyValue("display")&&"hidden"!==t.getPropertyValue("visibility"))}(n)&&r(t(n))},o=function(n,t){var e=n.get(t);if(void 0!==e)return e;var u=r(t,o.bind(void 0,n));return n.set(t,u),u},u=function(n,r){var o=n.get(r);if(void 0!==o)return o;var i=function(n,r){return!(n&&!e(n))||!!N(n)&&r(t(n))}(r,u.bind(void 0,n));return n.set(r,i),i},i=function(n){return n.dataset},d=function(n){return"BUTTON"===n.tagName},a=function(n){return"INPUT"===n.tagName},f=function(n){return a(n)&&"radio"===n.type},c=function(n){return!((a(n)||d(n))&&("hidden"===n.type||n.disabled))},N=function(t){var e=t.getAttribute(n);return![!0,"true",""].includes(e)},p=function(n){var t;return Boolean(n&&(null===(t=i(n))||void 0===t?void 0:t.focusGuard))},v=function(n){return!p(n)},l=function(n){return Boolean(n)};export{i as getDataset,N as isAutoFocusAllowed,u as isAutoFocusAllowedCached,l as isDefined,p as isGuard,d as isHTMLButtonElement,a as isHTMLInputElement,v as isNotAGuard,f as isRadioElement,o as isVisibleCached,c as notHiddenInput};
2
2
  //# sourceMappingURL=is.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"is.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/is.js"],"sourcesContent":["var isElementHidden = function (node) {\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n var computedStyle = window.getComputedStyle(node, null);\n if (!computedStyle || !computedStyle.getPropertyValue) {\n return false;\n }\n return (computedStyle.getPropertyValue('display') === 'none' || computedStyle.getPropertyValue('visibility') === 'hidden');\n};\nvar isVisibleUncached = function (node, checkParent) {\n return !node ||\n node === document ||\n (node && node.nodeType === Node.DOCUMENT_NODE) ||\n (!isElementHidden(node) &&\n checkParent(node.parentNode && node.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE\n ? node.parentNode.host\n : node.parentNode));\n};\nexport var isVisibleCached = function (visibilityCache, node) {\n var cached = visibilityCache.get(node);\n if (cached !== undefined) {\n return cached;\n }\n var result = isVisibleUncached(node, isVisibleCached.bind(undefined, visibilityCache));\n visibilityCache.set(node, result);\n return result;\n};\nexport var notHiddenInput = function (node) {\n return !((node.tagName === 'INPUT' || node.tagName === 'BUTTON') && (node.type === 'hidden' || node.disabled));\n};\nexport var isGuard = function (node) { return Boolean(node && node.dataset && node.dataset.focusGuard); };\nexport var isNotAGuard = function (node) { return !isGuard(node); };\nexport var isDefined = function (x) { return Boolean(x); };\n"],"names":["isVisibleUncached","node","checkParent","document","nodeType","Node","DOCUMENT_NODE","ELEMENT_NODE","computedStyle","window","getComputedStyle","getPropertyValue","isElementHidden","parentNode","DOCUMENT_FRAGMENT_NODE","host","isVisibleCached","visibilityCache","cached","get","undefined","result","bind","set","notHiddenInput","tagName","type","disabled","isGuard","Boolean","dataset","focusGuard","isNotAGuard","isDefined","x"],"mappings":"AAAA,IAUIA,EAAoB,SAAUC,EAAMC,GACpC,OAAQD,GACJA,IAASE,UACRF,GAAQA,EAAKG,WAAaC,KAAKC,gBAblB,SAAUL,GAC5B,GAAIA,EAAKG,WAAaC,KAAKE,aACvB,OAAO,EAEX,IAAIC,EAAgBC,OAAOC,iBAAiBT,EAAM,MAClD,SAAKO,IAAkBA,EAAcG,kBAGiB,SAA9CH,EAAcG,iBAAiB,YAA0E,WAAjDH,EAAcG,iBAAiB,eAMzFC,CAAgBX,IACdC,EAAYD,EAAKY,YAAcZ,EAAKY,WAAWT,WAAaC,KAAKS,uBAC3Db,EAAKY,WAAWE,KAChBd,EAAKY,aAEZG,EAAkB,SAAUC,EAAiBhB,GACpD,IAAIiB,EAASD,EAAgBE,IAAIlB,GACjC,QAAemB,IAAXF,EACA,OAAOA,EAEX,IAAIG,EAASrB,EAAkBC,EAAMe,EAAgBM,UAAKF,EAAWH,IAErE,OADAA,EAAgBM,IAAItB,EAAMoB,GACnBA,GAEAG,EAAiB,SAAUvB,GAClC,SAA2B,UAAjBA,EAAKwB,SAAwC,WAAjBxB,EAAKwB,WAAwC,WAAdxB,EAAKyB,MAAqBzB,EAAK0B,YAE7FC,EAAU,SAAU3B,GAAQ,OAAO4B,QAAQ5B,GAAQA,EAAK6B,SAAW7B,EAAK6B,QAAQC,aAChFC,EAAc,SAAU/B,GAAQ,OAAQ2B,EAAQ3B,IAChDgC,EAAY,SAAUC,GAAK,OAAOL,QAAQK"}
1
+ {"version":3,"file":"is.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/is.js"],"sourcesContent":["import { FOCUS_NO_AUTOFOCUS } from '../constants';\nvar isElementHidden = function (node) {\n // we can measure only \"elements\"\n // consider others as \"visible\"\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n var computedStyle = window.getComputedStyle(node, null);\n if (!computedStyle || !computedStyle.getPropertyValue) {\n return false;\n }\n return (computedStyle.getPropertyValue('display') === 'none' || computedStyle.getPropertyValue('visibility') === 'hidden');\n};\nvar getParentNode = function (node) {\n // DOCUMENT_FRAGMENT_NODE can also point on ShadowRoot. In this case .host will point on the next node\n return node.parentNode && node.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n node.parentNode.host\n : node.parentNode;\n};\nvar isTopNode = function (node) {\n // @ts-ignore\n return node === document || (node && node.nodeType === Node.DOCUMENT_NODE);\n};\nvar isVisibleUncached = function (node, checkParent) {\n return !node || isTopNode(node) || (!isElementHidden(node) && checkParent(getParentNode(node)));\n};\nexport var isVisibleCached = function (visibilityCache, node) {\n var cached = visibilityCache.get(node);\n if (cached !== undefined) {\n return cached;\n }\n var result = isVisibleUncached(node, isVisibleCached.bind(undefined, visibilityCache));\n visibilityCache.set(node, result);\n return result;\n};\nvar isAutoFocusAllowedUncached = function (node, checkParent) {\n return node && !isTopNode(node) ? (isAutoFocusAllowed(node) ? checkParent(getParentNode(node)) : false) : true;\n};\nexport var isAutoFocusAllowedCached = function (cache, node) {\n var cached = cache.get(node);\n if (cached !== undefined) {\n return cached;\n }\n var result = isAutoFocusAllowedUncached(node, isAutoFocusAllowedCached.bind(undefined, cache));\n cache.set(node, result);\n return result;\n};\nexport var getDataset = function (node) {\n // @ts-ignore\n return node.dataset;\n};\nexport var isHTMLButtonElement = function (node) { return node.tagName === 'BUTTON'; };\nexport var isHTMLInputElement = function (node) { return node.tagName === 'INPUT'; };\nexport var isRadioElement = function (node) {\n return isHTMLInputElement(node) && node.type === 'radio';\n};\nexport var notHiddenInput = function (node) {\n return !((isHTMLInputElement(node) || isHTMLButtonElement(node)) && (node.type === 'hidden' || node.disabled));\n};\nexport var isAutoFocusAllowed = function (node) {\n var attribute = node.getAttribute(FOCUS_NO_AUTOFOCUS);\n return ![true, 'true', ''].includes(attribute);\n};\nexport var isGuard = function (node) { var _a; return Boolean(node && ((_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.focusGuard)); };\nexport var isNotAGuard = function (node) { return !isGuard(node); };\nexport var isDefined = function (x) { return Boolean(x); };\n"],"names":["getParentNode","node","parentNode","nodeType","Node","DOCUMENT_FRAGMENT_NODE","host","isTopNode","document","DOCUMENT_NODE","isVisibleUncached","checkParent","ELEMENT_NODE","computedStyle","window","getComputedStyle","getPropertyValue","isElementHidden","isVisibleCached","visibilityCache","cached","get","undefined","result","bind","set","isAutoFocusAllowedCached","cache","isAutoFocusAllowed","isAutoFocusAllowedUncached","getDataset","dataset","isHTMLButtonElement","tagName","isHTMLInputElement","isRadioElement","type","notHiddenInput","disabled","attribute","getAttribute","FOCUS_NO_AUTOFOCUS","includes","isGuard","_a","Boolean","focusGuard","isNotAGuard","isDefined","x"],"mappings":"qDACA,IAYIA,EAAgB,SAAUC,GAE1B,OAAOA,EAAKC,YAAcD,EAAKC,WAAWC,WAAaC,KAAKC,uBAEpDJ,EAAKC,WAAWI,KAClBL,EAAKC,YAEXK,EAAY,SAAUN,GAEtB,OAAOA,IAASO,UAAaP,GAAQA,EAAKE,WAAaC,KAAKK,eAE5DC,EAAoB,SAAUT,EAAMU,GACpC,OAAQV,GAAQM,EAAUN,KAxBR,SAAUA,GAG5B,GAAIA,EAAKE,WAAaC,KAAKQ,aACvB,OAAO,EAEX,IAAIC,EAAgBC,OAAOC,iBAAiBd,EAAM,MAClD,SAAKY,IAAkBA,EAAcG,kBAGiB,SAA9CH,EAAcG,iBAAiB,YAA0E,WAAjDH,EAAcG,iBAAiB,eAc1DC,CAAgBhB,IAASU,EAAYX,EAAcC,KAEjFiB,EAAkB,SAAUC,EAAiBlB,GACpD,IAAImB,EAASD,EAAgBE,IAAIpB,GACjC,QAAeqB,IAAXF,EACA,OAAOA,EAEX,IAAIG,EAASb,EAAkBT,EAAMiB,EAAgBM,UAAKF,EAAWH,IAErE,OADAA,EAAgBM,IAAIxB,EAAMsB,GACnBA,GAKAG,EAA2B,SAAUC,EAAO1B,GACnD,IAAImB,EAASO,EAAMN,IAAIpB,GACvB,QAAeqB,IAAXF,EACA,OAAOA,EAEX,IAAIG,EARyB,SAAUtB,EAAMU,GAC7C,QAAOV,IAASM,EAAUN,OAAS2B,EAAmB3B,IAAQU,EAAYX,EAAcC,IAO3E4B,CAA2B5B,EAAMyB,EAAyBF,UAAKF,EAAWK,IAEvF,OADAA,EAAMF,IAAIxB,EAAMsB,GACTA,GAEAO,EAAa,SAAU7B,GAE9B,OAAOA,EAAK8B,SAELC,EAAsB,SAAU/B,GAAQ,MAAwB,WAAjBA,EAAKgC,SACpDC,EAAqB,SAAUjC,GAAQ,MAAwB,UAAjBA,EAAKgC,SACnDE,EAAiB,SAAUlC,GAClC,OAAOiC,EAAmBjC,IAAuB,UAAdA,EAAKmC,MAEjCC,EAAiB,SAAUpC,GAClC,SAAUiC,EAAmBjC,IAAS+B,EAAoB/B,MAAyB,WAAdA,EAAKmC,MAAqBnC,EAAKqC,YAE7FV,EAAqB,SAAU3B,GACtC,IAAIsC,EAAYtC,EAAKuC,aAAaC,GAClC,OAAQ,EAAC,EAAM,OAAQ,IAAIC,SAASH,IAE7BI,EAAU,SAAU1C,GAAQ,IAAI2C,EAAI,OAAOC,QAAQ5C,IAAqC,QAA3B2C,EAAKd,EAAW7B,UAA0B,IAAP2C,OAAgB,EAASA,EAAGE,cAC5HC,EAAc,SAAU9C,GAAQ,OAAQ0C,EAAQ1C,IAChD+C,EAAY,SAAUC,GAAK,OAAOJ,QAAQI"}
@@ -1,2 +1,2 @@
1
- import{asArray as r}from"./array.js";import{parentAutofocusables as n}from"./DOMutils.js";var o=function(r,n){return void 0===n&&(n=[]),n.push(r),r.parentNode&&o(r.parentNode,n),n},t=function(r,n){for(var t=o(r),e=o(n),f=0;f<t.length;f+=1){var i=t[f];if(e.indexOf(i)>=0)return i}return!1},e=function(n,o,e){var f=r(n),i=r(o),u=f[0],a=!1;return i.filter(Boolean).forEach((function(r){a=t(a||r,r)||a,e.filter(Boolean).forEach((function(r){var n=t(u,r);n&&(a=!a||n.contains(a)?n:t(n,a))}))})),a},f=function(r,o){return r.reduce((function(r,t){return r.concat(n(t,o))}),[])};export{f as allParentAutofocusables,t as getCommonParent,e as getTopCommonParent};
1
+ import{contains as r,parentAutofocusables as n}from"./DOMutils.js";import{asArray as o}from"./array.js";var t=function(r,n){return void 0===n&&(n=[]),n.push(r),r.parentNode&&t(r.parentNode.host||r.parentNode,n),n},e=function(r,n){for(var o=t(r),e=t(n),f=0;f<o.length;f+=1){var u=o[f];if(e.indexOf(u)>=0)return u}return!1},f=function(n,t,f){var u=o(n),a=o(t),i=u[0],c=!1;return a.filter(Boolean).forEach((function(n){c=e(c||n,n)||c,f.filter(Boolean).forEach((function(n){var o=e(i,n);o&&(c=!c||r(o,c)?o:e(o,c))}))})),c},u=function(r,o){return r.reduce((function(r,t){return r.concat(n(t,o))}),[])};export{u as allParentAutofocusables,e as getCommonParent,f as getTopCommonParent};
2
2
  //# sourceMappingURL=parenting.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parenting.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/parenting.js"],"sourcesContent":["import { asArray } from './array';\nimport { parentAutofocusables } from './DOMutils';\nvar getParents = function (node, parents) {\n if (parents === void 0) { parents = []; }\n parents.push(node);\n if (node.parentNode) {\n getParents(node.parentNode, parents);\n }\n return parents;\n};\nexport var getCommonParent = function (nodeA, nodeB) {\n var parentsA = getParents(nodeA);\n var parentsB = getParents(nodeB);\n for (var i = 0; i < parentsA.length; i += 1) {\n var currentParent = parentsA[i];\n if (parentsB.indexOf(currentParent) >= 0) {\n return currentParent;\n }\n }\n return false;\n};\nexport var getTopCommonParent = function (baseActiveElement, leftEntry, rightEntries) {\n var activeElements = asArray(baseActiveElement);\n var leftEntries = asArray(leftEntry);\n var activeElement = activeElements[0];\n var topCommon = false;\n leftEntries.filter(Boolean).forEach(function (entry) {\n topCommon = getCommonParent(topCommon || entry, entry) || topCommon;\n rightEntries.filter(Boolean).forEach(function (subEntry) {\n var common = getCommonParent(activeElement, subEntry);\n if (common) {\n if (!topCommon || common.contains(topCommon)) {\n topCommon = common;\n }\n else {\n topCommon = getCommonParent(common, topCommon);\n }\n }\n });\n });\n return topCommon;\n};\nexport var allParentAutofocusables = function (entries, visibilityCache) {\n return entries.reduce(function (acc, node) { return acc.concat(parentAutofocusables(node, visibilityCache)); }, []);\n};\n"],"names":["getParents","node","parents","push","parentNode","getCommonParent","nodeA","nodeB","parentsA","parentsB","i","length","currentParent","indexOf","getTopCommonParent","baseActiveElement","leftEntry","rightEntries","activeElements","asArray","leftEntries","activeElement","topCommon","filter","Boolean","forEach","entry","subEntry","common","contains","allParentAutofocusables","entries","visibilityCache","reduce","acc","concat","parentAutofocusables"],"mappings":"0FAEA,IAAIA,EAAa,SAAUC,EAAMC,GAM7B,YALgB,IAAZA,IAAsBA,EAAU,IACpCA,EAAQC,KAAKF,GACTA,EAAKG,YACLJ,EAAWC,EAAKG,WAAYF,GAEzBA,GAEAG,EAAkB,SAAUC,EAAOC,GAG1C,IAFA,IAAIC,EAAWR,EAAWM,GACtBG,EAAWT,EAAWO,GACjBG,EAAI,EAAGA,EAAIF,EAASG,OAAQD,GAAK,EAAG,CACzC,IAAIE,EAAgBJ,EAASE,GAC7B,GAAID,EAASI,QAAQD,IAAkB,EACnC,OAAOA,EAGf,OAAO,GAEAE,EAAqB,SAAUC,EAAmBC,EAAWC,GACpE,IAAIC,EAAiBC,EAAQJ,GACzBK,EAAcD,EAAQH,GACtBK,EAAgBH,EAAe,GAC/BI,GAAY,EAehB,OAdAF,EAAYG,OAAOC,SAASC,SAAQ,SAAUC,GAC1CJ,EAAYjB,EAAgBiB,GAAaI,EAAOA,IAAUJ,EAC1DL,EAAaM,OAAOC,SAASC,SAAQ,SAAUE,GAC3C,IAAIC,EAASvB,EAAgBgB,EAAeM,GACxCC,IAEIN,GADCA,GAAaM,EAAOC,SAASP,GAClBM,EAGAvB,EAAgBuB,EAAQN,UAK7CA,GAEAQ,EAA0B,SAAUC,EAASC,GACpD,OAAOD,EAAQE,QAAO,SAAUC,EAAKjC,GAAQ,OAAOiC,EAAIC,OAAOC,EAAqBnC,EAAM+B,MAAsB"}
1
+ {"version":3,"file":"parenting.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/parenting.js"],"sourcesContent":["import { parentAutofocusables } from './DOMutils';\nimport { contains } from './DOMutils';\nimport { asArray } from './array';\nvar getParents = function (node, parents) {\n if (parents === void 0) { parents = []; }\n parents.push(node);\n if (node.parentNode) {\n getParents(node.parentNode.host || node.parentNode, parents);\n }\n return parents;\n};\n/**\n * finds a parent for both nodeA and nodeB\n * @param nodeA\n * @param nodeB\n * @returns {boolean|*}\n */\nexport var getCommonParent = function (nodeA, nodeB) {\n var parentsA = getParents(nodeA);\n var parentsB = getParents(nodeB);\n // tslint:disable-next-line:prefer-for-of\n for (var i = 0; i < parentsA.length; i += 1) {\n var currentParent = parentsA[i];\n if (parentsB.indexOf(currentParent) >= 0) {\n return currentParent;\n }\n }\n return false;\n};\nexport var getTopCommonParent = function (baseActiveElement, leftEntry, rightEntries) {\n var activeElements = asArray(baseActiveElement);\n var leftEntries = asArray(leftEntry);\n var activeElement = activeElements[0];\n var topCommon = false;\n leftEntries.filter(Boolean).forEach(function (entry) {\n topCommon = getCommonParent(topCommon || entry, entry) || topCommon;\n rightEntries.filter(Boolean).forEach(function (subEntry) {\n var common = getCommonParent(activeElement, subEntry);\n if (common) {\n if (!topCommon || contains(common, topCommon)) {\n topCommon = common;\n }\n else {\n topCommon = getCommonParent(common, topCommon);\n }\n }\n });\n });\n // TODO: add assert here?\n return topCommon;\n};\n/**\n * return list of nodes which are expected to be autofocused inside a given top nodes\n * @param entries\n * @param visibilityCache\n */\nexport var allParentAutofocusables = function (entries, visibilityCache) {\n return entries.reduce(function (acc, node) { return acc.concat(parentAutofocusables(node, visibilityCache)); }, []);\n};\n"],"names":["getParents","node","parents","push","parentNode","host","getCommonParent","nodeA","nodeB","parentsA","parentsB","i","length","currentParent","indexOf","getTopCommonParent","baseActiveElement","leftEntry","rightEntries","activeElements","asArray","leftEntries","activeElement","topCommon","filter","Boolean","forEach","entry","subEntry","common","contains","allParentAutofocusables","entries","visibilityCache","reduce","acc","concat","parentAutofocusables"],"mappings":"wGAGA,IAAIA,EAAa,SAAUC,EAAMC,GAM7B,YALgB,IAAZA,IAAsBA,EAAU,IACpCA,EAAQC,KAAKF,GACTA,EAAKG,YACLJ,EAAWC,EAAKG,WAAWC,MAAQJ,EAAKG,WAAYF,GAEjDA,GAQAI,EAAkB,SAAUC,EAAOC,GAI1C,IAHA,IAAIC,EAAWT,EAAWO,GACtBG,EAAWV,EAAWQ,GAEjBG,EAAI,EAAGA,EAAIF,EAASG,OAAQD,GAAK,EAAG,CACzC,IAAIE,EAAgBJ,EAASE,GAC7B,GAAID,EAASI,QAAQD,IAAkB,EACnC,OAAOA,EAGf,OAAO,GAEAE,EAAqB,SAAUC,EAAmBC,EAAWC,GACpE,IAAIC,EAAiBC,EAAQJ,GACzBK,EAAcD,EAAQH,GACtBK,EAAgBH,EAAe,GAC/BI,GAAY,EAgBhB,OAfAF,EAAYG,OAAOC,SAASC,SAAQ,SAAUC,GAC1CJ,EAAYjB,EAAgBiB,GAAaI,EAAOA,IAAUJ,EAC1DL,EAAaM,OAAOC,SAASC,SAAQ,SAAUE,GAC3C,IAAIC,EAASvB,EAAgBgB,EAAeM,GACxCC,IAEIN,GADCA,GAAaO,EAASD,EAAQN,GACnBM,EAGAvB,EAAgBuB,EAAQN,UAM7CA,GAOAQ,EAA0B,SAAUC,EAASC,GACpD,OAAOD,EAAQE,QAAO,SAAUC,EAAKlC,GAAQ,OAAOkC,EAAIC,OAAOC,EAAqBpC,EAAMgC,MAAsB"}
@@ -1 +1 @@
1
- {"version":3,"file":"tabOrder.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/tabOrder.js"],"sourcesContent":["import { toArray } from './array';\nexport var tabSort = function (a, b) {\n var tabDiff = a.tabIndex - b.tabIndex;\n var indexDiff = a.index - b.index;\n if (tabDiff) {\n if (!a.tabIndex) {\n return 1;\n }\n if (!b.tabIndex) {\n return -1;\n }\n }\n return tabDiff || indexDiff;\n};\nexport var orderByTabIndex = function (nodes, filterNegative, keepGuards) {\n return toArray(nodes)\n .map(function (node, index) { return ({\n node: node,\n index: index,\n tabIndex: keepGuards && node.tabIndex === -1 ? ((node.dataset || {}).focusGuard ? 0 : -1) : node.tabIndex,\n }); })\n .filter(function (data) { return !filterNegative || data.tabIndex >= 0; })\n .sort(tabSort);\n};\n"],"names":["tabSort","a","b","tabDiff","tabIndex","indexDiff","index","orderByTabIndex","nodes","filterNegative","keepGuards","toArray","map","node","dataset","focusGuard","filter","data","sort"],"mappings":"qCACU,IAACA,EAAU,SAAUC,EAAGC,GAC9B,IAAIC,EAAUF,EAAEG,SAAWF,EAAEE,SACzBC,EAAYJ,EAAEK,MAAQJ,EAAEI,MAC5B,GAAIH,EAAS,CACT,IAAKF,EAAEG,SACH,OAAO,EAEX,IAAKF,EAAEE,SACH,OAAQ,EAGhB,OAAOD,GAAWE,GAEXE,EAAkB,SAAUC,EAAOC,EAAgBC,GAC1D,OAAOC,EAAQH,GACVI,KAAI,SAAUC,EAAMP,GAAS,OAC9BO,KAAMA,EACNP,MAAOA,EACPF,SAAUM,IAAiC,IAAnBG,EAAKT,UAAoBS,EAAKC,SAAW,IAAIC,WAAa,GAAK,EAAKF,EAAKT,aAEhGY,QAAO,SAAUC,GAAQ,OAAQR,GAAkBQ,EAAKb,UAAY,KACpEc,KAAKlB"}
1
+ {"version":3,"file":"tabOrder.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/tabOrder.js"],"sourcesContent":["import { toArray } from './array';\nexport var tabSort = function (a, b) {\n var tabDiff = a.tabIndex - b.tabIndex;\n var indexDiff = a.index - b.index;\n if (tabDiff) {\n if (!a.tabIndex) {\n return 1;\n }\n if (!b.tabIndex) {\n return -1;\n }\n }\n return tabDiff || indexDiff;\n};\nexport var orderByTabIndex = function (nodes, filterNegative, keepGuards) {\n return toArray(nodes)\n .map(function (node, index) { return ({\n node: node,\n index: index,\n tabIndex: keepGuards && node.tabIndex === -1 ? ((node.dataset || {}).focusGuard ? 0 : -1) : node.tabIndex,\n }); })\n .filter(function (data) { return !filterNegative || data.tabIndex >= 0; })\n .sort(tabSort);\n};\n"],"names":["tabSort","a","b","tabDiff","tabIndex","indexDiff","index","orderByTabIndex","nodes","filterNegative","keepGuards","toArray","map","node","dataset","focusGuard","filter","data","sort"],"mappings":"qCACU,IAACA,EAAU,SAAUC,EAAGC,GAC9B,IAAIC,EAAUF,EAAEG,SAAWF,EAAEE,SACzBC,EAAYJ,EAAEK,MAAQJ,EAAEI,MAC5B,GAAIH,EAAS,CACT,IAAKF,EAAEG,SACH,OAAO,EAEX,IAAKF,EAAEE,SACH,OAAQ,EAGhB,OAAOD,GAAWE,GAEXE,EAAkB,SAAUC,EAAOC,EAAgBC,GAC1D,OAAOC,EAAQH,GACVI,KAAI,SAAUC,EAAMP,GAAS,MAAQ,CACtCO,KAAMA,EACNP,MAAOA,EACPF,SAAUM,IAAiC,IAAnBG,EAAKT,UAAoBS,EAAKC,SAAW,IAAIC,WAAa,GAAK,EAAKF,EAAKT,aAEhGY,QAAO,SAAUC,GAAQ,OAAQR,GAAkBQ,EAAKb,UAAY,KACpEc,KAAKlB"}
@@ -1,2 +1,2 @@
1
- import{FOCUS_AUTO as r}from"../constants.js";import{toArray as t}from"./array.js";import{tabbables as e}from"./tabbables.js";var n=e.join(","),o=n+", [data-focus-guard]",u=function(r,e){return r.reduce((function(r,u){return r.concat(t(u.querySelectorAll(e?o:n)),u.parentNode?t(u.parentNode.querySelectorAll(n)).filter((function(r){return r===u})):[])}),[])},c=function(e){var n=e.querySelectorAll("["+r+"]");return t(n).map((function(r){return u([r])})).reduce((function(r,t){return r.concat(t)}),[])};export{u as getFocusables,c as getParentAutofocusables};
1
+ import{FOCUS_AUTO as r}from"../constants.js";import{toArray as n}from"./array.js";import{tabbables as t}from"./tabbables.js";var o=t.join(","),e="".concat(o,", [data-focus-guard]"),c=function(r,t){var u;return n((null===(u=r.shadowRoot)||void 0===u?void 0:u.children)||r.children).reduce((function(r,n){return r.concat(n.matches(t?e:o)?[n]:[],c(n))}),[])},u=function(r,t){return r.reduce((function(r,e){return r.concat(c(e,t),e.parentNode?n(e.parentNode.querySelectorAll(o)).filter((function(r){return r===e})):[])}),[])},a=function(t){var o=t.querySelectorAll("[".concat(r,"]"));return n(o).map((function(r){return u([r])})).reduce((function(r,n){return r.concat(n)}),[])};export{u as getFocusables,a as getParentAutofocusables};
2
2
  //# sourceMappingURL=tabUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabUtils.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/tabUtils.js"],"sourcesContent":["import { FOCUS_AUTO } from '../constants';\nimport { toArray } from './array';\nimport { tabbables } from './tabbables';\nvar queryTabbables = tabbables.join(',');\nvar queryGuardTabbables = queryTabbables + \", [data-focus-guard]\";\nexport var getFocusables = function (parents, withGuards) {\n return parents.reduce(function (acc, parent) {\n return acc.concat(toArray(parent.querySelectorAll(withGuards ? queryGuardTabbables : queryTabbables)), parent.parentNode\n ? toArray(parent.parentNode.querySelectorAll(queryTabbables)).filter(function (node) { return node === parent; })\n : []);\n }, []);\n};\nexport var getParentAutofocusables = function (parent) {\n var parentFocus = parent.querySelectorAll(\"[\" + FOCUS_AUTO + \"]\");\n return toArray(parentFocus)\n .map(function (node) { return getFocusables([node]); })\n .reduce(function (acc, nodes) { return acc.concat(nodes); }, []);\n};\n"],"names":["queryTabbables","tabbables","join","queryGuardTabbables","getFocusables","parents","withGuards","reduce","acc","parent","concat","toArray","querySelectorAll","parentNode","filter","node","getParentAutofocusables","parentFocus","FOCUS_AUTO","map","nodes"],"mappings":"6HAGA,IAAIA,EAAiBC,EAAUC,KAAK,KAChCC,EAAsBH,EAAiB,uBAChCI,EAAgB,SAAUC,EAASC,GAC1C,OAAOD,EAAQE,QAAO,SAAUC,EAAKC,GACjC,OAAOD,EAAIE,OAAOC,EAAQF,EAAOG,iBAAiBN,EAAaH,EAAsBH,IAAkBS,EAAOI,WACxGF,EAAQF,EAAOI,WAAWD,iBAAiBZ,IAAiBc,QAAO,SAAUC,GAAQ,OAAOA,IAASN,KACrG,MACP,KAEIO,EAA0B,SAAUP,GAC3C,IAAIQ,EAAcR,EAAOG,iBAAiB,IAAMM,EAAa,KAC7D,OAAOP,EAAQM,GACVE,KAAI,SAAUJ,GAAQ,OAAOX,EAAc,CAACW,OAC5CR,QAAO,SAAUC,EAAKY,GAAS,OAAOZ,EAAIE,OAAOU,KAAW"}
1
+ {"version":3,"file":"tabUtils.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/tabUtils.js"],"sourcesContent":["import { FOCUS_AUTO } from '../constants';\nimport { toArray } from './array';\nimport { tabbables } from './tabbables';\nvar queryTabbables = tabbables.join(',');\nvar queryGuardTabbables = \"\".concat(queryTabbables, \", [data-focus-guard]\");\nvar getFocusablesWithShadowDom = function (parent, withGuards) {\n var _a;\n return toArray(((_a = parent.shadowRoot) === null || _a === void 0 ? void 0 : _a.children) || parent.children).reduce(function (acc, child) {\n return acc.concat(child.matches(withGuards ? queryGuardTabbables : queryTabbables) ? [child] : [], getFocusablesWithShadowDom(child));\n }, []);\n};\nexport var getFocusables = function (parents, withGuards) {\n return parents.reduce(function (acc, parent) {\n return acc.concat(\n // add all tabbables inside and within shadow DOMs in DOM order\n getFocusablesWithShadowDom(parent, withGuards), \n // add if node is tabbable itself\n parent.parentNode\n ? toArray(parent.parentNode.querySelectorAll(queryTabbables)).filter(function (node) { return node === parent; })\n : []);\n }, []);\n};\n/**\n * return a list of focusable nodes within an area marked as \"auto-focusable\"\n * @param parent\n */\nexport var getParentAutofocusables = function (parent) {\n var parentFocus = parent.querySelectorAll(\"[\".concat(FOCUS_AUTO, \"]\"));\n return toArray(parentFocus)\n .map(function (node) { return getFocusables([node]); })\n .reduce(function (acc, nodes) { return acc.concat(nodes); }, []);\n};\n"],"names":["queryTabbables","tabbables","join","queryGuardTabbables","concat","getFocusablesWithShadowDom","parent","withGuards","_a","toArray","shadowRoot","children","reduce","acc","child","matches","getFocusables","parents","parentNode","querySelectorAll","filter","node","getParentAutofocusables","parentFocus","FOCUS_AUTO","map","nodes"],"mappings":"6HAGA,IAAIA,EAAiBC,EAAUC,KAAK,KAChCC,EAAsB,GAAGC,OAAOJ,EAAgB,wBAChDK,EAA6B,SAAUC,EAAQC,GAC/C,IAAIC,EACJ,OAAOC,GAAsC,QAA5BD,EAAKF,EAAOI,kBAA+B,IAAPF,OAAgB,EAASA,EAAGG,WAAaL,EAAOK,UAAUC,QAAO,SAAUC,EAAKC,GACjI,OAAOD,EAAIT,OAAOU,EAAMC,QAAQR,EAAaJ,EAAsBH,GAAkB,CAACc,GAAS,GAAIT,EAA2BS,MAC/H,KAEIE,EAAgB,SAAUC,EAASV,GAC1C,OAAOU,EAAQL,QAAO,SAAUC,EAAKP,GACjC,OAAOO,EAAIT,OAEXC,EAA2BC,EAAQC,GAEnCD,EAAOY,WACDT,EAAQH,EAAOY,WAAWC,iBAAiBnB,IAAiBoB,QAAO,SAAUC,GAAQ,OAAOA,IAASf,KACrG,MACP,KAMIgB,EAA0B,SAAUhB,GAC3C,IAAIiB,EAAcjB,EAAOa,iBAAiB,IAAIf,OAAOoB,EAAY,MACjE,OAAOf,EAAQc,GACVE,KAAI,SAAUJ,GAAQ,OAAOL,EAAc,CAACK,OAC5CT,QAAO,SAAUC,EAAKa,GAAS,OAAOb,EAAIT,OAAOsB,KAAW"}
@@ -1 +1 @@
1
- {"version":3,"file":"tabbables.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/tabbables.js"],"sourcesContent":["export var tabbables = [\n 'button:enabled',\n 'select:enabled',\n 'textarea:enabled',\n 'input:enabled',\n 'a[href]',\n 'area[href]',\n 'summary',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[tabindex]',\n '[contenteditable]',\n '[autofocus]',\n];\n"],"names":["tabbables"],"mappings":"AAAU,IAACA,EAAY,CACnB,iBACA,iBACA,mBACA,gBACA,UACA,aACA,UACA,SACA,SACA,QACA,kBACA,kBACA,aACA,oBACA"}
1
+ {"version":3,"file":"tabbables.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/tabbables.js"],"sourcesContent":["/**\n * list of the object to be considered as focusable\n */\nexport var tabbables = [\n 'button:enabled',\n 'select:enabled',\n 'textarea:enabled',\n 'input:enabled',\n // elements with explicit roles will also use explicit tabindex\n // '[role=\"button\"]',\n 'a[href]',\n 'area[href]',\n 'summary',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[tabindex]',\n '[contenteditable]',\n '[autofocus]',\n];\n"],"names":["tabbables"],"mappings":"AAGU,IAACA,EAAY,CACnB,iBACA,iBACA,mBACA,gBAGA,UACA,aACA,UACA,SACA,SACA,QACA,kBACA,kBACA,aACA,oBACA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Combination.js","sources":["../../../../../../node_modules/react-focus-lock/dist/es2015/Combination.js"],"sourcesContent":["import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport FocusLockUI from './Lock';\nimport FocusTrap from './Trap';\n/* that would be a BREAKING CHANGE!\n// delaying sidecar execution till the first usage\nconst RequireSideCar = (props) => {\n // eslint-disable-next-line global-require\n const SideCar = require('./Trap').default;\n return <SideCar {...props} />;\n};\n*/\n\nvar FocusLockCombination = /*#__PURE__*/React.forwardRef(function FocusLockUICombination(props, ref) {\n return /*#__PURE__*/React.createElement(FocusLockUI, _extends({\n sideCar: FocusTrap,\n ref: ref\n }, props));\n});\n\nvar _ref = FocusLockUI.propTypes || {},\n sideCar = _ref.sideCar,\n propTypes = _objectWithoutPropertiesLoose(_ref, [\"sideCar\"]);\n\nFocusLockCombination.propTypes = process.env.NODE_ENV !== \"production\" ? propTypes : {};\nexport default FocusLockCombination;"],"names":["FocusLockCombination","React","forwardRef","props","ref","createElement","FocusLockUI","_extends","sideCar","FocusTrap","_ref","propTypes","_objectWithoutPropertiesLoose","process","env","NODE_ENV"],"mappings":"2NAcA,IAAIA,EAAoCC,EAAMC,YAAW,SAAgCC,EAAOC,GAC9F,OAAoBH,EAAMI,cAAcC,EAAaC,EAAS,CAC5DC,QAASC,EACTL,IAAKA,GACJD,OAGDO,EAAOJ,EAAYK,WAAa,GACtBD,EAAKF,YACfG,EAAYC,EAA8BF,EAAM,CAAC,YAErDV,EAAqBW,UAAqC,eAAzBE,QAAQC,IAAIC,SAA4BJ,EAAY,GACrF,MAAeX"}
1
+ {"version":3,"file":"Combination.js","sources":["../../../../../../node_modules/react-focus-lock/dist/es2015/Combination.js"],"sourcesContent":["import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport FocusLockUI from './Lock';\nimport FocusTrap from './Trap';\n/* that would be a BREAKING CHANGE!\n// delaying sidecar execution till the first usage\nconst RequireSideCar = (props) => {\n // eslint-disable-next-line global-require\n const SideCar = require('./Trap').default;\n return <SideCar {...props} />;\n};\n*/\n\nvar FocusLockCombination = /*#__PURE__*/React.forwardRef(function FocusLockUICombination(props, ref) {\n return /*#__PURE__*/React.createElement(FocusLockUI, _extends({\n sideCar: FocusTrap,\n ref: ref\n }, props));\n});\n\nvar _ref = FocusLockUI.propTypes || {},\n sideCar = _ref.sideCar,\n propTypes = _objectWithoutPropertiesLoose(_ref, [\"sideCar\"]);\n\nFocusLockCombination.propTypes = process.env.NODE_ENV !== \"production\" ? propTypes : {};\nexport default FocusLockCombination;"],"names":["FocusLockCombination","React","forwardRef","props","ref","createElement","FocusLockUI","_extends","sideCar","FocusTrap","_ref","propTypes","_objectWithoutPropertiesLoose","process","env","NODE_ENV","FocusLock"],"mappings":"2NAcA,IAAIA,EAAoCC,EAAMC,YAAW,SAAgCC,EAAOC,GAC9F,OAAoBH,EAAMI,cAAcC,EAAaC,EAAS,CAC5DC,QAASC,EACTL,IAAKA,GACJD,OAGDO,EAAOJ,EAAYK,WAAa,GACtBD,EAAKF,QACf,IAAAG,EAAYC,EAA8BF,EAAM,CAAC,YAErDV,EAAqBW,UAAqC,eAAzBE,QAAQC,IAAIC,SAA4BJ,EAAY,GACrF,IAAAK,EAAehB"}
@@ -1,2 +1,2 @@
1
- import e from"../../../@babel/runtime/helpers/esm/extends.js";import*as o from"react";import{useEffect as t}from"react";import{node as r,bool as s,oneOfType as a,object as n,func as c,string as u,arrayOf as i,any as d}from"prop-types";import{FOCUS_DISABLED as l,FOCUS_GROUP as f}from"../../../focus-lock/dist/es2015/constants.js";import{hiddenGuard as m}from"./FocusGuard.js";import{mediumFocus as v,mediumBlur as p,mediumSidecar as F}from"./medium.js";import{useMergeRefs as b}from"../../../use-callback-ref/dist/es2015/useMergeRef.js";var k=[],h=o.forwardRef((function(r,s){var a,n=o.useState(),c=n[0],u=n[1],i=o.useRef(),d=o.useRef(!1),h=o.useRef(null),E=r.children,g=r.disabled,w=r.noFocusGuards,y=r.persistentFocus,x=r.crossFrame,C=r.autoFocus,N=r.allowTextSelection,R=r.group,j=r.className,D=r.whiteList,L=r.shards,O=void 0===L?k:L,S=r.as,P=void 0===S?"div":S,T=r.lockProps,A=void 0===T?{}:T,G=r.sideCar,I=r.returnFocus,M=r.focusOptions,B=r.onActivation,V=r.onDeactivation,_=o.useState({})[0],q=o.useCallback((function(){h.current=h.current||document&&document.activeElement,i.current&&B&&B(i.current),d.current=!0}),[B]),z=o.useCallback((function(){d.current=!1,V&&V(i.current)}),[V]);t((function(){g||(h.current=null)}),[]);var H=o.useCallback((function(e){var o=h.current;if(o&&o.focus){var t="function"==typeof I?I(o):I;if(Boolean(t)){var r="object"==typeof t?t:void 0;h.current=null,e?Promise.resolve().then((function(){return o.focus(r)})):o.focus(r)}}}),[I]),J=o.useCallback((function(e){d.current&&v.useMedium(e)}),[]),K=p.useMedium,Q=o.useCallback((function(e){i.current!==e&&(i.current=e,u(e))}),[]);"production"!==process.env.NODE_ENV&&(void 0!==N&&console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"),o.useEffect((function(){i.current||console.error("FocusLock: could not obtain ref to internal node")}),[]));var U=e(((a={})[l]=g&&"disabled",a[f]=R,a),A),W=!0!==w,X=W&&"tail"!==w,Y=b([s,Q]);return o.createElement(o.Fragment,null,W&&[o.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:g?-1:0,style:m}),o.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:g?-1:1,style:m})],!g&&o.createElement(G,{id:_,sideCar:F,observed:c,disabled:g,persistentFocus:y,crossFrame:x,autoFocus:C,whiteList:D,shards:O,onActivation:q,onDeactivation:z,returnFocus:H,focusOptions:M}),o.createElement(P,e({ref:Y},U,{className:j,onBlur:K,onFocus:J}),E),X&&o.createElement("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:m}))}));h.propTypes="production"!==process.env.NODE_ENV?{children:r,disabled:s,returnFocus:a([s,n,c]),focusOptions:n,noFocusGuards:s,allowTextSelection:s,autoFocus:s,persistentFocus:s,crossFrame:s,group:u,className:u,whiteList:c,shards:i(d),as:a([u,c,n]),lockProps:n,onActivation:c,onDeactivation:c,sideCar:d.isRequired}:{},h.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var E=h;export{E as default};
1
+ import e from"../../../@babel/runtime/helpers/esm/extends.js";import*as o from"react";import{useEffect as t}from"react";import{node as s,bool as r,oneOfType as a,object as n,func as c,string as i,arrayOf as u,any as d}from"prop-types";import{FOCUS_DISABLED as l,FOCUS_GROUP as f}from"../../../focus-lock/dist/es2015/constants.js";import{hiddenGuard as v}from"./FocusGuard.js";import{mediumFocus as m,mediumBlur as p,mediumSidecar as F}from"./medium.js";import{useMergeRefs as b}from"../../../use-callback-ref/dist/es2015/useMergeRef.js";var h=[],k=o.forwardRef((function(s,r){var a,n=o.useState(),c=n[0],i=n[1],u=o.useRef(),d=o.useRef(!1),k=o.useRef(null),E=s.children,g=s.disabled,w=s.noFocusGuards,y=s.persistentFocus,x=s.crossFrame,C=s.autoFocus,N=s.allowTextSelection,P=s.group,R=s.className,j=s.whiteList,D=s.hasPositiveIndices,I=s.shards,L=void 0===I?h:I,O=s.as,S=void 0===O?"div":O,T=s.lockProps,A=void 0===T?{}:T,G=s.sideCar,M=s.returnFocus,V=s.focusOptions,_=s.onActivation,q=s.onDeactivation,B=o.useState({})[0],z=o.useCallback((function(){k.current=k.current||document&&document.activeElement,u.current&&_&&_(u.current),d.current=!0}),[_]),H=o.useCallback((function(){d.current=!1,q&&q(u.current)}),[q]);t((function(){g||(k.current=null)}),[]);var J=o.useCallback((function(e){var o=k.current;if(o&&o.focus){var t="function"==typeof M?M(o):M;if(t){var s="object"==typeof t?t:void 0;k.current=null,e?Promise.resolve().then((function(){return o.focus(s)})):o.focus(s)}}}),[M]),K=o.useCallback((function(e){d.current&&m.useMedium(e)}),[]),Q=p.useMedium,U=o.useCallback((function(e){u.current!==e&&(u.current=e,i(e))}),[]);"production"!==process.env.NODE_ENV&&(void 0!==N&&console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"),o.useEffect((function(){u.current||console.error("FocusLock: could not obtain ref to internal node")}),[]));var W=e(((a={})[l]=g&&"disabled",a[f]=P,a),A),X=!0!==w,Y=X&&"tail"!==w,Z=b([r,U]);return o.createElement(o.Fragment,null,X&&[o.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:g?-1:0,style:v}),D?o.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:g?-1:1,style:v}):null],!g&&o.createElement(G,{id:B,sideCar:F,observed:c,disabled:g,persistentFocus:y,crossFrame:x,autoFocus:C,whiteList:j,shards:L,onActivation:z,onDeactivation:H,returnFocus:J,focusOptions:V}),o.createElement(S,e({ref:Z},W,{className:R,onBlur:Q,onFocus:K}),E),Y&&o.createElement("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:v}))}));k.propTypes="production"!==process.env.NODE_ENV?{children:s,disabled:r,returnFocus:a([r,n,c]),focusOptions:n,noFocusGuards:r,hasPositiveIndices:r,allowTextSelection:r,autoFocus:r,persistentFocus:r,crossFrame:r,group:i,className:i,whiteList:c,shards:u(d),as:a([i,c,n]),lockProps:n,onActivation:c,onDeactivation:c,sideCar:d.isRequired}:{},k.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var E=k;export{E as default};
2
2
  //# sourceMappingURL=Lock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Lock.js","sources":["../../../../../../node_modules/react-focus-lock/dist/es2015/Lock.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { node, bool, string, any, arrayOf, oneOfType, object, func } from 'prop-types';\nimport * as constants from 'focus-lock/constants';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { hiddenGuard } from './FocusGuard';\nimport { mediumFocus, mediumBlur, mediumSidecar } from './medium';\nimport { useEffect } from \"react\";\nvar emptyArray = [];\nvar FocusLock = /*#__PURE__*/React.forwardRef(function FocusLockUI(props, parentRef) {\n var _extends2;\n\n var _React$useState = React.useState(),\n realObserved = _React$useState[0],\n setObserved = _React$useState[1];\n\n var observed = React.useRef();\n var isActive = React.useRef(false);\n var originalFocusedElement = React.useRef(null);\n var children = props.children,\n disabled = props.disabled,\n noFocusGuards = props.noFocusGuards,\n persistentFocus = props.persistentFocus,\n crossFrame = props.crossFrame,\n autoFocus = props.autoFocus,\n allowTextSelection = props.allowTextSelection,\n group = props.group,\n className = props.className,\n whiteList = props.whiteList,\n _props$shards = props.shards,\n shards = _props$shards === void 0 ? emptyArray : _props$shards,\n _props$as = props.as,\n Container = _props$as === void 0 ? 'div' : _props$as,\n _props$lockProps = props.lockProps,\n containerProps = _props$lockProps === void 0 ? {} : _props$lockProps,\n SideCar = props.sideCar,\n shouldReturnFocus = props.returnFocus,\n focusOptions = props.focusOptions,\n onActivationCallback = props.onActivation,\n onDeactivationCallback = props.onDeactivation;\n\n var _React$useState2 = React.useState({}),\n id = _React$useState2[0]; // SIDE EFFECT CALLBACKS\n\n\n var onActivation = React.useCallback(function () {\n originalFocusedElement.current = originalFocusedElement.current || document && document.activeElement;\n\n if (observed.current && onActivationCallback) {\n onActivationCallback(observed.current);\n }\n\n isActive.current = true;\n }, [onActivationCallback]);\n var onDeactivation = React.useCallback(function () {\n isActive.current = false;\n\n if (onDeactivationCallback) {\n onDeactivationCallback(observed.current);\n }\n }, [onDeactivationCallback]);\n useEffect(function () {\n if (!disabled) {\n // cleanup return focus on trap deactivation\n // sideEffect/returnFocus should happen by this time\n originalFocusedElement.current = null;\n }\n }, []);\n var returnFocus = React.useCallback(function (allowDefer) {\n var returnFocusTo = originalFocusedElement.current;\n\n if (returnFocusTo && returnFocusTo.focus) {\n var howToReturnFocus = typeof shouldReturnFocus === 'function' ? shouldReturnFocus(returnFocusTo) : shouldReturnFocus;\n\n if (Boolean(howToReturnFocus)) {\n var returnFocusOptions = typeof howToReturnFocus === 'object' ? howToReturnFocus : undefined;\n originalFocusedElement.current = null;\n\n if (allowDefer) {\n // React might return focus after update\n // it's safer to defer the action\n Promise.resolve().then(function () {\n return returnFocusTo.focus(returnFocusOptions);\n });\n } else {\n returnFocusTo.focus(returnFocusOptions);\n }\n }\n }\n }, [shouldReturnFocus]); // MEDIUM CALLBACKS\n\n var onFocus = React.useCallback(function (event) {\n if (isActive.current) {\n mediumFocus.useMedium(event);\n }\n }, []);\n var onBlur = mediumBlur.useMedium; // REF PROPAGATION\n // not using real refs due to race conditions\n\n var setObserveNode = React.useCallback(function (newObserved) {\n if (observed.current !== newObserved) {\n observed.current = newObserved;\n setObserved(newObserved);\n }\n }, []);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof allowTextSelection !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn('React-Focus-Lock: allowTextSelection is deprecated and enabled by default');\n }\n\n React.useEffect(function () {\n if (!observed.current) {\n // eslint-disable-next-line no-console\n console.error('FocusLock: could not obtain ref to internal node');\n }\n }, []);\n }\n\n var lockProps = _extends((_extends2 = {}, _extends2[constants.FOCUS_DISABLED] = disabled && 'disabled', _extends2[constants.FOCUS_GROUP] = group, _extends2), containerProps);\n\n var hasLeadingGuards = noFocusGuards !== true;\n var hasTailingGuards = hasLeadingGuards && noFocusGuards !== 'tail';\n var mergedRef = useMergeRefs([parentRef, setObserveNode]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, hasLeadingGuards && [/*#__PURE__*/React.createElement(\"div\", {\n key: \"guard-first\",\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 0,\n style: hiddenGuard\n }),\n /*#__PURE__*/\n // nearest focus guard\n React.createElement(\"div\", {\n key: \"guard-nearest\",\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 1,\n style: hiddenGuard\n }) // first tabbed element guard\n ], !disabled && /*#__PURE__*/React.createElement(SideCar, {\n id: id,\n sideCar: mediumSidecar,\n observed: realObserved,\n disabled: disabled,\n persistentFocus: persistentFocus,\n crossFrame: crossFrame,\n autoFocus: autoFocus,\n whiteList: whiteList,\n shards: shards,\n onActivation: onActivation,\n onDeactivation: onDeactivation,\n returnFocus: returnFocus,\n focusOptions: focusOptions\n }), /*#__PURE__*/React.createElement(Container, _extends({\n ref: mergedRef\n }, lockProps, {\n className: className,\n onBlur: onBlur,\n onFocus: onFocus\n }), children), hasTailingGuards && /*#__PURE__*/React.createElement(\"div\", {\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 0,\n style: hiddenGuard\n }));\n});\nFocusLock.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: node,\n disabled: bool,\n returnFocus: oneOfType([bool, object, func]),\n focusOptions: object,\n noFocusGuards: bool,\n allowTextSelection: bool,\n autoFocus: bool,\n persistentFocus: bool,\n crossFrame: bool,\n group: string,\n className: string,\n whiteList: func,\n shards: arrayOf(any),\n as: oneOfType([string, func, object]),\n lockProps: object,\n onActivation: func,\n onDeactivation: func,\n sideCar: any.isRequired\n} : {};\nFocusLock.defaultProps = {\n children: undefined,\n disabled: false,\n returnFocus: false,\n focusOptions: undefined,\n noFocusGuards: false,\n autoFocus: true,\n persistentFocus: false,\n crossFrame: true,\n allowTextSelection: undefined,\n group: undefined,\n className: undefined,\n whiteList: undefined,\n shards: undefined,\n as: 'div',\n lockProps: {},\n onActivation: undefined,\n onDeactivation: undefined\n};\nexport default FocusLock;"],"names":["emptyArray","FocusLock","React","forwardRef","props","parentRef","_extends2","_React$useState","useState","realObserved","setObserved","observed","useRef","isActive","originalFocusedElement","children","disabled","noFocusGuards","persistentFocus","crossFrame","autoFocus","allowTextSelection","group","className","whiteList","_props$shards","shards","_props$as","as","Container","_props$lockProps","lockProps","containerProps","SideCar","sideCar","shouldReturnFocus","returnFocus","focusOptions","onActivationCallback","onActivation","onDeactivationCallback","onDeactivation","id","useCallback","current","document","activeElement","useEffect","allowDefer","returnFocusTo","focus","howToReturnFocus","Boolean","returnFocusOptions","undefined","Promise","resolve","then","onFocus","event","mediumFocus","useMedium","onBlur","mediumBlur","setObserveNode","newObserved","process","env","NODE_ENV","console","warn","error","_extends","constants.FOCUS_DISABLED","constants.FOCUS_GROUP","hasLeadingGuards","hasTailingGuards","mergedRef","useMergeRefs","createElement","Fragment","key","tabIndex","style","hiddenGuard","mediumSidecar","ref","propTypes","node","bool","oneOfType","object","func","string","arrayOf","any","isRequired","defaultProps"],"mappings":"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"}
1
+ {"version":3,"file":"Lock.js","sources":["../../../../../../node_modules/react-focus-lock/dist/es2015/Lock.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { node, bool, string, any, arrayOf, oneOfType, object, func } from 'prop-types';\nimport * as constants from 'focus-lock/constants';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { useEffect } from 'react';\nimport { hiddenGuard } from './FocusGuard';\nimport { mediumFocus, mediumBlur, mediumSidecar } from './medium';\nvar emptyArray = [];\nvar FocusLock = /*#__PURE__*/React.forwardRef(function FocusLockUI(props, parentRef) {\n var _extends2;\n\n var _React$useState = React.useState(),\n realObserved = _React$useState[0],\n setObserved = _React$useState[1];\n\n var observed = React.useRef();\n var isActive = React.useRef(false);\n var originalFocusedElement = React.useRef(null);\n var children = props.children,\n disabled = props.disabled,\n noFocusGuards = props.noFocusGuards,\n persistentFocus = props.persistentFocus,\n crossFrame = props.crossFrame,\n autoFocus = props.autoFocus,\n allowTextSelection = props.allowTextSelection,\n group = props.group,\n className = props.className,\n whiteList = props.whiteList,\n hasPositiveIndices = props.hasPositiveIndices,\n _props$shards = props.shards,\n shards = _props$shards === void 0 ? emptyArray : _props$shards,\n _props$as = props.as,\n Container = _props$as === void 0 ? 'div' : _props$as,\n _props$lockProps = props.lockProps,\n containerProps = _props$lockProps === void 0 ? {} : _props$lockProps,\n SideCar = props.sideCar,\n shouldReturnFocus = props.returnFocus,\n focusOptions = props.focusOptions,\n onActivationCallback = props.onActivation,\n onDeactivationCallback = props.onDeactivation;\n\n var _React$useState2 = React.useState({}),\n id = _React$useState2[0]; // SIDE EFFECT CALLBACKS\n\n\n var onActivation = React.useCallback(function () {\n originalFocusedElement.current = originalFocusedElement.current || document && document.activeElement;\n\n if (observed.current && onActivationCallback) {\n onActivationCallback(observed.current);\n }\n\n isActive.current = true;\n }, [onActivationCallback]);\n var onDeactivation = React.useCallback(function () {\n isActive.current = false;\n\n if (onDeactivationCallback) {\n onDeactivationCallback(observed.current);\n }\n }, [onDeactivationCallback]);\n useEffect(function () {\n if (!disabled) {\n // cleanup return focus on trap deactivation\n // sideEffect/returnFocus should happen by this time\n originalFocusedElement.current = null;\n }\n }, []);\n var returnFocus = React.useCallback(function (allowDefer) {\n var returnFocusTo = originalFocusedElement.current;\n\n if (returnFocusTo && returnFocusTo.focus) {\n var howToReturnFocus = typeof shouldReturnFocus === 'function' ? shouldReturnFocus(returnFocusTo) : shouldReturnFocus;\n\n if (howToReturnFocus) {\n var returnFocusOptions = typeof howToReturnFocus === 'object' ? howToReturnFocus : undefined;\n originalFocusedElement.current = null;\n\n if (allowDefer) {\n // React might return focus after update\n // it's safer to defer the action\n Promise.resolve().then(function () {\n return returnFocusTo.focus(returnFocusOptions);\n });\n } else {\n returnFocusTo.focus(returnFocusOptions);\n }\n }\n }\n }, [shouldReturnFocus]); // MEDIUM CALLBACKS\n\n var onFocus = React.useCallback(function (event) {\n if (isActive.current) {\n mediumFocus.useMedium(event);\n }\n }, []);\n var onBlur = mediumBlur.useMedium; // REF PROPAGATION\n // not using real refs due to race conditions\n\n var setObserveNode = React.useCallback(function (newObserved) {\n if (observed.current !== newObserved) {\n observed.current = newObserved;\n setObserved(newObserved);\n }\n }, []);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof allowTextSelection !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn('React-Focus-Lock: allowTextSelection is deprecated and enabled by default');\n }\n\n React.useEffect(function () {\n if (!observed.current) {\n // eslint-disable-next-line no-console\n console.error('FocusLock: could not obtain ref to internal node');\n }\n }, []);\n }\n\n var lockProps = _extends((_extends2 = {}, _extends2[constants.FOCUS_DISABLED] = disabled && 'disabled', _extends2[constants.FOCUS_GROUP] = group, _extends2), containerProps);\n\n var hasLeadingGuards = noFocusGuards !== true;\n var hasTailingGuards = hasLeadingGuards && noFocusGuards !== 'tail';\n var mergedRef = useMergeRefs([parentRef, setObserveNode]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, hasLeadingGuards && [\n /*#__PURE__*/\n // nearest focus guard\n React.createElement(\"div\", {\n key: \"guard-first\",\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 0,\n style: hiddenGuard\n }), // first tabbed element guard\n hasPositiveIndices ? /*#__PURE__*/React.createElement(\"div\", {\n key: \"guard-nearest\",\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 1,\n style: hiddenGuard\n }) : null], !disabled && /*#__PURE__*/React.createElement(SideCar, {\n id: id,\n sideCar: mediumSidecar,\n observed: realObserved,\n disabled: disabled,\n persistentFocus: persistentFocus,\n crossFrame: crossFrame,\n autoFocus: autoFocus,\n whiteList: whiteList,\n shards: shards,\n onActivation: onActivation,\n onDeactivation: onDeactivation,\n returnFocus: returnFocus,\n focusOptions: focusOptions\n }), /*#__PURE__*/React.createElement(Container, _extends({\n ref: mergedRef\n }, lockProps, {\n className: className,\n onBlur: onBlur,\n onFocus: onFocus\n }), children), hasTailingGuards && /*#__PURE__*/React.createElement(\"div\", {\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 0,\n style: hiddenGuard\n }));\n});\nFocusLock.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: node,\n disabled: bool,\n returnFocus: oneOfType([bool, object, func]),\n focusOptions: object,\n noFocusGuards: bool,\n hasPositiveIndices: bool,\n allowTextSelection: bool,\n autoFocus: bool,\n persistentFocus: bool,\n crossFrame: bool,\n group: string,\n className: string,\n whiteList: func,\n shards: arrayOf(any),\n as: oneOfType([string, func, object]),\n lockProps: object,\n onActivation: func,\n onDeactivation: func,\n sideCar: any.isRequired\n} : {};\nFocusLock.defaultProps = {\n children: undefined,\n disabled: false,\n returnFocus: false,\n focusOptions: undefined,\n noFocusGuards: false,\n autoFocus: true,\n persistentFocus: false,\n crossFrame: true,\n hasPositiveIndices: undefined,\n allowTextSelection: undefined,\n group: undefined,\n className: undefined,\n whiteList: undefined,\n shards: undefined,\n as: 'div',\n lockProps: {},\n onActivation: undefined,\n onDeactivation: undefined\n};\nexport default FocusLock;"],"names":["emptyArray","FocusLock","React","forwardRef","props","parentRef","_extends2","_React$useState","useState","realObserved","setObserved","observed","useRef","isActive","originalFocusedElement","children","disabled","noFocusGuards","persistentFocus","crossFrame","autoFocus","allowTextSelection","group","className","whiteList","hasPositiveIndices","_props$shards","shards","_props$as","as","Container","_props$lockProps","lockProps","containerProps","SideCar","sideCar","shouldReturnFocus","returnFocus","focusOptions","onActivationCallback","onActivation","onDeactivationCallback","onDeactivation","id","useCallback","current","document","activeElement","useEffect","allowDefer","returnFocusTo","focus","howToReturnFocus","returnFocusOptions","undefined","Promise","resolve","then","onFocus","event","mediumFocus","useMedium","onBlur","mediumBlur","setObserveNode","newObserved","process","env","NODE_ENV","console","warn","error","_extends","constants.FOCUS_DISABLED","constants.FOCUS_GROUP","hasLeadingGuards","hasTailingGuards","mergedRef","useMergeRefs","createElement","Fragment","key","tabIndex","style","hiddenGuard","mediumSidecar","ref","propTypes","node","bool","oneOfType","object","func","string","arrayOf","any","isRequired","defaultProps","FocusLockUI"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- import"react";import e from"prop-types";import n from"../../../react-clientside-effect/lib/index.es.js";import t from"../../../focus-lock/dist/es2015/index.js";import{deferAction as o}from"./util.js";import{mediumFocus as r,mediumBlur as u,mediumEffect as i}from"./medium.js";import{focusInside as c}from"../../../focus-lock/dist/es2015/focusInside.js";import{focusIsHidden as s}from"../../../focus-lock/dist/es2015/focusIsHidden.js";import{getFocusabledIn as d}from"../../../focus-lock/dist/es2015/focusables.js";var a=function(){return document&&document.activeElement===document.body||s()},f=null,m=null,l=null,v=!1,p=function(){return!0};function b(e,n,t,o){var r=null,u=e;do{var i=o[u];if(i.guard)i.node.dataset.focusAutoGuard&&(r=i);else{if(!i.lockItem)break;if(u!==e)return;r=null}}while((u+=t)!==n);r&&(r.node.tabIndex=0)}var E=function(e){return e&&"current"in e?e.current:e},g=function(){var e,n=!1;if(f){var o=f,r=o.observed,u=o.persistentFocus,i=o.autoFocus,s=o.shards,g=o.crossFrame,h=o.focusOptions,j=r||l&&l.portaledElement,w=document&&document.activeElement;if(j){var I=[j].concat(s.map(E).filter(Boolean));if(w&&!function(e){return(f.whiteList||p)(e)}(w)||(u||(g?Boolean(v):"meanwhile"===v)||!a()||!m&&i)&&(!j||c(I)||(e=w,l&&l.portaledElement===e)||(document&&!m&&w&&!i?(w.blur&&w.blur(),document.body.focus()):(n=t(I,m,{focusOptions:h}),l={})),v=!1,m=document&&document.activeElement),document){var L=document&&document.activeElement,k=d(I),x=k.map((function(e){return e.node})).indexOf(L);x>-1&&(k.filter((function(e){var n=e.guard,t=e.node;return n&&t.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),b(x,k.length,1,k),b(x,-1,-1,k))}}}return n},h=function(e){g()&&e&&(e.stopPropagation(),e.preventDefault())},j=function(){return o(g)};"production"===process.env.NODE_ENV||e.node.isRequired;var w=function(){v="just",setTimeout((function(){v="meanwhile"}),0)};r.assignSyncMedium((function(e){var n=e.target,t=e.currentTarget;t.contains(n)||(l={observerNode:t,portaledElement:n})})),u.assignMedium(j),i.assignMedium((function(e){return e({moveFocusInside:t,focusInside:c})}));var I=n((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var n=e.slice(-1)[0];n&&!f&&(document.addEventListener("focusin",h),document.addEventListener("focusout",j),window.addEventListener("blur",w));var t=f,r=t&&n&&n.id===t.id;f=n,t&&!r&&(t.onDeactivation(),e.filter((function(e){return e.id===t.id})).length||t.returnFocus(!n)),n?(m=null,r&&t.observed===n.observed||n.onActivation(),g(),o(g)):(document.removeEventListener("focusin",h),document.removeEventListener("focusout",j),window.removeEventListener("blur",w),m=null)}))((function(){return null}));export{I as default};
1
+ import"react";import e from"prop-types";import n from"../../../react-clientside-effect/lib/index.es.js";import t from"../../../focus-lock/dist/es2015/index.js";import{deferAction as o}from"./util.js";import{mediumFocus as r,mediumBlur as u,mediumEffect as i}from"./medium.js";import{focusInside as c}from"../../../focus-lock/dist/es2015/focusInside.js";import{focusIsHidden as s}from"../../../focus-lock/dist/es2015/focusIsHidden.js";import{getFocusabledIn as d}from"../../../focus-lock/dist/es2015/focusables.js";var a=function(){return document&&document.activeElement===document.body||s()},f=null,m=null,l=null,v=!1,p=function(){return!0};function E(e,n,t,o){var r=null,u=e;do{var i=o[u];if(i.guard)i.node.dataset.focusAutoGuard&&(r=i);else{if(!i.lockItem)break;if(u!==e)return;r=null}}while((u+=t)!==n);r&&(r.node.tabIndex=0)}var b=function(e){return e&&"current"in e?e.current:e},g=function e(n,t,o){return t&&(t.host===n&&(!t.activeElement||o.contains(t.activeElement))||t.parentNode&&e(n,t.parentNode,o))},h=function(){var e,n=!1;if(f){var o=f,r=o.observed,u=o.persistentFocus,i=o.autoFocus,s=o.shards,h=o.crossFrame,j=o.focusOptions,w=r||l&&l.portaledElement,I=document&&document.activeElement;if(w){var L=[w].concat(s.map(b).filter(Boolean));if(I&&!function(e){return(f.whiteList||p)(e)}(I)||(u||(h?Boolean(v):"meanwhile"===v)||!a()||!m&&i)&&(w&&!(c(L)||I&&function(e,n){return n.some((function(n){return g(e,n,n)}))}(I,L)||(e=I,l&&l.portaledElement===e))&&(document&&!m&&I&&!i?(I.blur&&I.blur(),document.body.focus()):(n=t(L,m,{focusOptions:j}),l={})),v=!1,m=document&&document.activeElement),document){var k=document&&document.activeElement,x=d(L),F=x.map((function(e){return e.node})).indexOf(k);F>-1&&(x.filter((function(e){var n=e.guard,t=e.node;return n&&t.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),E(F,x.length,1,x),E(F,-1,-1,x))}}}return n},j=function(e){h()&&e&&(e.stopPropagation(),e.preventDefault())},w=function(){return o(h)};"production"===process.env.NODE_ENV||e.node.isRequired;var I=function(){v="just",setTimeout((function(){v="meanwhile"}),0)};r.assignSyncMedium((function(e){var n=e.target,t=e.currentTarget;t.contains(n)||(l={observerNode:t,portaledElement:n})})),u.assignMedium(w),i.assignMedium((function(e){return e({moveFocusInside:t,focusInside:c})}));var L=n((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var n=e.slice(-1)[0];n&&!f&&(document.addEventListener("focusin",j),document.addEventListener("focusout",w),window.addEventListener("blur",I));var t=f,r=t&&n&&n.id===t.id;f=n,t&&!r&&(t.onDeactivation(),e.filter((function(e){return e.id===t.id})).length||t.returnFocus(!n)),n?(m=null,r&&t.observed===n.observed||n.onActivation(),h(),o(h)):(document.removeEventListener("focusin",j),document.removeEventListener("focusout",w),window.removeEventListener("blur",I),m=null)}))((function(){return null}));export{L as default};
2
2
  //# sourceMappingURL=Trap.js.map