@cruk/cruk-react-components 7.1.5 → 7.2.1

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 (147) hide show
  1. package/lib/index.css +152 -398
  2. package/lib/src/components/AddressLookup/index.js +1 -1
  3. package/lib/src/components/AddressLookup/index.js.map +1 -1
  4. package/lib/src/components/Avatar/index.js +1 -1
  5. package/lib/src/components/Badge/index.js +1 -1
  6. package/lib/src/components/Box/index.js +1 -1
  7. package/lib/src/components/Carousel/index.js +1 -1
  8. package/lib/src/components/Carousel/index.js.map +1 -1
  9. package/lib/src/components/Checkbox/index.js +1 -1
  10. package/lib/src/components/Collapse/index.js +1 -1
  11. package/lib/src/components/DateField/index.js +1 -1
  12. package/lib/src/components/DateField/index.js.map +1 -1
  13. package/lib/src/components/ErrorText/index.js +1 -1
  14. package/lib/src/components/Footer/index.js +1 -1
  15. package/lib/src/components/Header/index.js +1 -1
  16. package/lib/src/components/Header/index.js.map +1 -1
  17. package/lib/src/components/Heading/index.js +1 -1
  18. package/lib/src/components/IconFa/index.js +1 -1
  19. package/lib/src/components/InfoBox/index.js +1 -1
  20. package/lib/src/components/LabelWrapper/index.js +1 -1
  21. package/lib/src/components/LegendWrapper/index.js +1 -1
  22. package/lib/src/components/Link/index.js +1 -1
  23. package/lib/src/components/Loader/index.js +1 -1
  24. package/lib/src/components/Modal/TestModalWithContent.d.ts +1 -3
  25. package/lib/src/components/Modal/TestModalWithOpenButton.d.ts +3 -0
  26. package/lib/src/components/Modal/index.d.ts +6 -3
  27. package/lib/src/components/Modal/index.js +1 -1
  28. package/lib/src/components/Modal/index.js.map +1 -1
  29. package/lib/src/components/Pagination/index.js +1 -1
  30. package/lib/src/components/PopOver/index.d.ts +4 -8
  31. package/lib/src/components/PopOver/index.js +1 -1
  32. package/lib/src/components/PopOver/index.js.map +1 -1
  33. package/lib/src/components/ProgressBar/index.js +1 -1
  34. package/lib/src/components/RadioConsent/index.js +1 -1
  35. package/lib/src/components/Select/index.js +1 -1
  36. package/lib/src/components/Step/index.js +1 -1
  37. package/lib/src/components/Text/index.js +1 -1
  38. package/lib/src/components/TextAreaField/index.js +1 -1
  39. package/lib/src/components/TextField/index.js +1 -1
  40. package/lib/src/components/Totaliser/index.js +1 -1
  41. package/lib/src/components/UserBlock/index.js +1 -1
  42. package/lib/src/hooks/useKey.js +1 -1
  43. package/lib/src/hooks/useLayoutEffectBrowser.js +1 -1
  44. package/lib/src/hooks/useScrollPosition.js +1 -1
  45. package/lib/src/hooks/useScrollPosition.js.map +1 -1
  46. package/lib/src/types.d.ts +1 -1
  47. package/lib/src/types.js.map +1 -1
  48. package/lib/src/utils/debounce.js +1 -1
  49. package/package.json +4 -15
  50. package/lib/index.css.map +0 -1
  51. package/lib/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0 -2
  52. package/lib/node_modules/@babel/runtime/helpers/esm/defineProperty.js.map +0 -1
  53. package/lib/node_modules/@babel/runtime/helpers/esm/extends.js +0 -2
  54. package/lib/node_modules/@babel/runtime/helpers/esm/extends.js.map +0 -1
  55. package/lib/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +0 -2
  56. package/lib/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js.map +0 -1
  57. package/lib/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -2
  58. package/lib/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +0 -1
  59. package/lib/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -2
  60. package/lib/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +0 -1
  61. package/lib/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -2
  62. package/lib/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +0 -1
  63. package/lib/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +0 -2
  64. package/lib/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js.map +0 -1
  65. package/lib/node_modules/@babel/runtime/helpers/esm/typeof.js +0 -2
  66. package/lib/node_modules/@babel/runtime/helpers/esm/typeof.js.map +0 -1
  67. package/lib/node_modules/focus-lock/dist/es2015/commands.js +0 -2
  68. package/lib/node_modules/focus-lock/dist/es2015/commands.js.map +0 -1
  69. package/lib/node_modules/focus-lock/dist/es2015/constants.js +0 -2
  70. package/lib/node_modules/focus-lock/dist/es2015/constants.js.map +0 -1
  71. package/lib/node_modules/focus-lock/dist/es2015/focusInside.js +0 -2
  72. package/lib/node_modules/focus-lock/dist/es2015/focusInside.js.map +0 -1
  73. package/lib/node_modules/focus-lock/dist/es2015/focusIsHidden.js +0 -2
  74. package/lib/node_modules/focus-lock/dist/es2015/focusIsHidden.js.map +0 -1
  75. package/lib/node_modules/focus-lock/dist/es2015/focusSolver.js +0 -2
  76. package/lib/node_modules/focus-lock/dist/es2015/focusSolver.js.map +0 -1
  77. package/lib/node_modules/focus-lock/dist/es2015/focusables.js +0 -2
  78. package/lib/node_modules/focus-lock/dist/es2015/focusables.js.map +0 -1
  79. package/lib/node_modules/focus-lock/dist/es2015/moveFocusInside.js +0 -2
  80. package/lib/node_modules/focus-lock/dist/es2015/moveFocusInside.js.map +0 -1
  81. package/lib/node_modules/focus-lock/dist/es2015/return-focus.js +0 -2
  82. package/lib/node_modules/focus-lock/dist/es2015/return-focus.js.map +0 -1
  83. package/lib/node_modules/focus-lock/dist/es2015/sibling.js +0 -2
  84. package/lib/node_modules/focus-lock/dist/es2015/sibling.js.map +0 -1
  85. package/lib/node_modules/focus-lock/dist/es2015/solver.js +0 -2
  86. package/lib/node_modules/focus-lock/dist/es2015/solver.js.map +0 -1
  87. package/lib/node_modules/focus-lock/dist/es2015/utils/DOMutils.js +0 -2
  88. package/lib/node_modules/focus-lock/dist/es2015/utils/DOMutils.js.map +0 -1
  89. package/lib/node_modules/focus-lock/dist/es2015/utils/all-affected.js +0 -2
  90. package/lib/node_modules/focus-lock/dist/es2015/utils/all-affected.js.map +0 -1
  91. package/lib/node_modules/focus-lock/dist/es2015/utils/array.js +0 -2
  92. package/lib/node_modules/focus-lock/dist/es2015/utils/array.js.map +0 -1
  93. package/lib/node_modules/focus-lock/dist/es2015/utils/auto-focus.js +0 -2
  94. package/lib/node_modules/focus-lock/dist/es2015/utils/auto-focus.js.map +0 -1
  95. package/lib/node_modules/focus-lock/dist/es2015/utils/correctFocus.js +0 -2
  96. package/lib/node_modules/focus-lock/dist/es2015/utils/correctFocus.js.map +0 -1
  97. package/lib/node_modules/focus-lock/dist/es2015/utils/firstFocus.js +0 -2
  98. package/lib/node_modules/focus-lock/dist/es2015/utils/firstFocus.js.map +0 -1
  99. package/lib/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js +0 -2
  100. package/lib/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js.map +0 -1
  101. package/lib/node_modules/focus-lock/dist/es2015/utils/is.js +0 -2
  102. package/lib/node_modules/focus-lock/dist/es2015/utils/is.js.map +0 -1
  103. package/lib/node_modules/focus-lock/dist/es2015/utils/parenting.js +0 -2
  104. package/lib/node_modules/focus-lock/dist/es2015/utils/parenting.js.map +0 -1
  105. package/lib/node_modules/focus-lock/dist/es2015/utils/safe.js +0 -2
  106. package/lib/node_modules/focus-lock/dist/es2015/utils/safe.js.map +0 -1
  107. package/lib/node_modules/focus-lock/dist/es2015/utils/tabOrder.js +0 -2
  108. package/lib/node_modules/focus-lock/dist/es2015/utils/tabOrder.js.map +0 -1
  109. package/lib/node_modules/focus-lock/dist/es2015/utils/tabUtils.js +0 -2
  110. package/lib/node_modules/focus-lock/dist/es2015/utils/tabUtils.js.map +0 -1
  111. package/lib/node_modules/focus-lock/dist/es2015/utils/tabbables.js +0 -2
  112. package/lib/node_modules/focus-lock/dist/es2015/utils/tabbables.js.map +0 -1
  113. package/lib/node_modules/react-clientside-effect/lib/index.es.js +0 -2
  114. package/lib/node_modules/react-clientside-effect/lib/index.es.js.map +0 -1
  115. package/lib/node_modules/react-focus-lock/dist/es2015/Combination.js +0 -2
  116. package/lib/node_modules/react-focus-lock/dist/es2015/Combination.js.map +0 -1
  117. package/lib/node_modules/react-focus-lock/dist/es2015/FocusGuard.js +0 -2
  118. package/lib/node_modules/react-focus-lock/dist/es2015/FocusGuard.js.map +0 -1
  119. package/lib/node_modules/react-focus-lock/dist/es2015/Lock.js +0 -2
  120. package/lib/node_modules/react-focus-lock/dist/es2015/Lock.js.map +0 -1
  121. package/lib/node_modules/react-focus-lock/dist/es2015/Trap.js +0 -2
  122. package/lib/node_modules/react-focus-lock/dist/es2015/Trap.js.map +0 -1
  123. package/lib/node_modules/react-focus-lock/dist/es2015/index.js +0 -2
  124. package/lib/node_modules/react-focus-lock/dist/es2015/index.js.map +0 -1
  125. package/lib/node_modules/react-focus-lock/dist/es2015/medium.js +0 -2
  126. package/lib/node_modules/react-focus-lock/dist/es2015/medium.js.map +0 -1
  127. package/lib/node_modules/react-focus-lock/dist/es2015/scope.js +0 -2
  128. package/lib/node_modules/react-focus-lock/dist/es2015/scope.js.map +0 -1
  129. package/lib/node_modules/react-focus-lock/dist/es2015/util.js +0 -2
  130. package/lib/node_modules/react-focus-lock/dist/es2015/util.js.map +0 -1
  131. package/lib/node_modules/react-intersection-observer/dist/index.js +0 -2
  132. package/lib/node_modules/react-intersection-observer/dist/index.js.map +0 -1
  133. package/lib/node_modules/use-callback-ref/dist/es2015/assignRef.js +0 -2
  134. package/lib/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +0 -1
  135. package/lib/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +0 -2
  136. package/lib/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +0 -1
  137. package/lib/node_modules/use-callback-ref/dist/es2015/useRef.js +0 -2
  138. package/lib/node_modules/use-callback-ref/dist/es2015/useRef.js.map +0 -1
  139. package/lib/node_modules/use-sidecar/dist/es2015/medium.js +0 -2
  140. package/lib/node_modules/use-sidecar/dist/es2015/medium.js.map +0 -1
  141. package/lib/src/components/Carousel/Dots.d.ts +0 -9
  142. package/lib/src/components/Carousel/Dots.js +0 -2
  143. package/lib/src/components/Carousel/Dots.js.map +0 -1
  144. package/lib/src/components/Modal/TestModalWithState.d.ts +0 -4
  145. package/lib/src/hooks/useEffectBrowser.d.ts +0 -3
  146. package/lib/src/hooks/useEffectBrowser.js +0 -2
  147. package/lib/src/hooks/useEffectBrowser.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"toPrimitive.js","sources":["../../../../../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js"],"sourcesContent":["import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };"],"names":["toPrimitive","t","r","_typeof","e","Symbol","i","call","TypeError","String","Number"],"mappings":"2BACA,SAASA,EAAYC,EAAGC,GACtB,GAAI,UAAYC,EAAQF,KAAOA,EAAG,OAAOA,EACzC,IAAIG,EAAIH,EAAEI,OAAOL,aACjB,QAAI,IAAWI,EAAG,CAChB,IAAIE,EAAIF,EAAEG,KAAKN,EAAGC,GAClB,GAAI,UAAYC,EAAQG,GAAI,OAAOA,EACnC,MAAM,IAAIE,UAAU,+CACtB,CACA,OAAQ,WAAaN,EAAIO,OAASC,QAAQT,EAC5C","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import r from"./typeof.js";import t from"./toPrimitive.js";function o(o){var i=t(o,"string");return"symbol"==r(i)?i:i+""}export{o as default};
2
- //# sourceMappingURL=toPropertyKey.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"toPropertyKey.js","sources":["../../../../../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js"],"sourcesContent":["import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };"],"names":["toPropertyKey","t","i","toPrimitive","_typeof"],"mappings":"2DAEA,SAASA,EAAcC,GACrB,IAAIC,EAAIC,EAAYF,EAAG,UACvB,MAAO,UAAYG,EAAQF,GAAKA,EAAIA,EAAI,EAC1C","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},o(t)}export{o as default};
2
- //# sourceMappingURL=typeof.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"typeof.js","sources":["../../../../../../node_modules/@babel/runtime/helpers/esm/typeof.js"],"sourcesContent":["function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };"],"names":["_typeof","o","Symbol","iterator","constructor","prototype"],"mappings":"AAAA,SAASA,EAAQC,GAGf,OAAOD,EAAU,mBAAqBE,QAAU,iBAAmBA,OAAOC,SAAW,SAAUF,GAC7F,cAAcA,CAChB,EAAI,SAAUA,GACZ,OAAOA,GAAK,mBAAqBC,QAAUD,EAAEG,cAAgBF,QAAUD,IAAMC,OAAOG,UAAY,gBAAkBJ,CACpH,EAAGD,EAAQC,EACb","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- var n=function(n,o){n&&("focus"in n&&n.focus(o),"contentWindow"in n&&n.contentWindow&&n.contentWindow.focus())};export{n as focusOn};
2
- //# sourceMappingURL=commands.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commands.js","sources":["../../../../../node_modules/focus-lock/dist/es2015/commands.js"],"sourcesContent":["export var focusOn = function (target, focusOptions) {\n if (!target) {\n // not clear how, but is possible https://github.com/theKashey/focus-lock/issues/53\n return;\n }\n if ('focus' in target) {\n target.focus(focusOptions);\n }\n if ('contentWindow' in target && target.contentWindow) {\n target.contentWindow.focus();\n }\n};\n"],"names":["focusOn","target","focusOptions","focus","contentWindow"],"mappings":"AAAU,IAACA,EAAU,SAAUC,EAAQC,GAC9BD,IAID,UAAWA,GACXA,EAAOE,MAAMD,GAEb,kBAAmBD,GAAUA,EAAOG,eACpCH,EAAOG,cAAcD,QAE7B","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
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
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
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","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import{contains as t}from"./utils/DOMutils.js";import{getAllAffectedNodes as r}from"./utils/all-affected.js";import{getFirst as e,toArray as o}from"./utils/array.js";import{getActiveElement as n}from"./utils/getActiveElement.js";var u=function(u,i){return void 0===i&&(i=n(e(u).ownerDocument)),!(!i||i.dataset&&i.dataset.focusGuard)&&r(u).some(function(r){return t(r,i)||function(t,r){return Boolean(o(t.querySelectorAll("iframe")).some(function(t){return function(t,r){return t===r}(t,r)}))}(r,i)})};export{u as focusInside};
2
- //# sourceMappingURL=focusInside.js.map
@@ -1 +0,0 @@
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 { getFirst, toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\nvar focusInFrame = function (frame, activeElement) { return frame === activeElement; };\nvar focusInsideIframe = function (topNode, activeElement) {\n return Boolean(toArray(topNode.querySelectorAll('iframe')).some(function (node) { return focusInFrame(node, activeElement); }));\n};\n/**\n * @returns {Boolean} true, if the current focus is inside given node or nodes.\n * Supports nodes hidden inside shadowDom\n */\nexport var focusInside = function (topNode, activeElement) {\n // const activeElement = document && getActiveElement();\n if (activeElement === void 0) { activeElement = getActiveElement(getFirst(topNode).ownerDocument); }\n if (!activeElement || (activeElement.dataset && activeElement.dataset.focusGuard)) {\n return false;\n }\n return getAllAffectedNodes(topNode).some(function (node) {\n return contains(node, activeElement) || focusInsideIframe(node, activeElement);\n });\n};\n"],"names":["focusInside","topNode","activeElement","getActiveElement","getFirst","ownerDocument","dataset","focusGuard","getAllAffectedNodes","some","node","contains","Boolean","toArray","querySelectorAll","frame","focusInFrame","focusInsideIframe"],"mappings":"qOAIA,IAQWA,EAAc,SAAUC,EAASC,GAGxC,YADsB,IAAlBA,IAA4BA,EAAgBC,EAAiBC,EAASH,GAASI,mBAC9EH,GAAkBA,EAAcI,SAAWJ,EAAcI,QAAQC,aAG/DC,EAAoBP,GAASQ,KAAK,SAAUC,GAC/C,OAAOC,EAASD,EAAMR,IAdN,SAAUD,EAASC,GACvC,OAAOU,QAAQC,EAAQZ,EAAQa,iBAAiB,WAAWL,KAAK,SAAUC,GAAQ,OAFnE,SAAUK,EAAOb,GAAiB,OAAOa,IAAUb,CAAe,CAEQc,CAAaN,EAAMR,EAAgB,GAChI,CAYgDe,CAAkBP,EAAMR,EACpE,EACJ","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
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 i=function(i){void 0===i&&(i=document);var m=e(i);return!!m&&o(i.querySelectorAll("[".concat(t,"]"))).some(function(t){return r(t,m)})};export{i as focusIsHidden};
2
- //# sourceMappingURL=focusIsHidden.js.map
@@ -1 +0,0 @@
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 * checks if focus is hidden FROM the focus-lock\n * ie contained inside a node focus-lock shall ignore\n *\n * This is a utility function coupled with {@link FOCUS_ALLOW} constant\n *\n * @returns {boolean} focus is currently is in \"allow\" area\n */\nexport var focusIsHidden = function (inDocument) {\n if (inDocument === void 0) { inDocument = document; }\n var activeElement = getActiveElement(inDocument);\n if (!activeElement) {\n return false;\n }\n // this does not support setting FOCUS_ALLOW within shadow dom\n return toArray(inDocument.querySelectorAll(\"[\".concat(FOCUS_ALLOW, \"]\"))).some(function (node) { return contains(node, activeElement); });\n};\n"],"names":["focusIsHidden","inDocument","document","activeElement","getActiveElement","toArray","querySelectorAll","concat","FOCUS_ALLOW","some","node","contains"],"mappings":"sMAYU,IAACA,EAAgB,SAAUC,QACd,IAAfA,IAAyBA,EAAaC,UAC1C,IAAIC,EAAgBC,EAAiBH,GACrC,QAAKE,GAIEE,EAAQJ,EAAWK,iBAAiB,IAAIC,OAAOC,EAAa,OAAOC,KAAK,SAAUC,GAAQ,OAAOC,EAASD,EAAMP,EAAgB,EAC3I","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import{newFocus as t,NEW_FOCUS as r}from"./solver.js";import{getFocusableNodes as o}from"./utils/DOMutils.js";import{getAllAffectedNodes as n}from"./utils/all-affected.js";import{getFirst as e,asArray as i}from"./utils/array.js";import{pickAutofocus as u}from"./utils/auto-focus.js";import{getActiveElement as f}from"./utils/getActiveElement.js";import{isNotAGuard as m,isDefined as s}from"./utils/is.js";import{getTopCommonParent as a,allParentAutofocusables as c}from"./utils/parenting.js";var l=function(l,p){var d=f(i(l).length>0?document:e(l).ownerDocument),v=n(l).filter(m),j=a(d||l,l,v),g=new Map,w=o(v,g),M=w.filter(function(t){var r=t.node;return m(r)});if(M[0]){var h,x,y,D=o([j],g).map(function(t){return t.node}),E=(h=D,x=M,y=new Map,x.forEach(function(t){return y.set(t.node,t)}),h.map(function(t){return y.get(t)}).filter(s)),b=E.map(function(t){return t.node}),k=E.filter(function(t){return t.tabIndex>=0}).map(function(t){return t.node}),A=t(b,k,D,d,p);if(A===r){var I=u(w,k,c(v,g))||u(w,b,c(v,g));return I?{node:I}:void console.warn("focus-lock: cannot find any node to move focus into")}return void 0===A?A:E[A]}};export{l as focusSolver};
2
- //# sourceMappingURL=focusSolver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"focusSolver.js","sources":["../../../../../node_modules/focus-lock/dist/es2015/focusSolver.js"],"sourcesContent":["import { NEW_FOCUS, newFocus } from './solver';\nimport { getFocusableNodes } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { asArray, getFirst } from './utils/array';\nimport { pickAutofocus } from './utils/auto-focus';\nimport { getActiveElement } from './utils/getActiveElement';\nimport { isDefined, isNotAGuard } from './utils/is';\nimport { allParentAutofocusables, getTopCommonParent } from './utils/parenting';\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 * contains the main logic of the `focus-lock` package.\n *\n * ! you probably dont need this function !\n *\n * given top node(s) and the last active element returns the element to be focused next\n * @returns element which should be focused to move focus inside\n * @param topNode\n * @param lastNode\n */\nexport var focusSolver = function (topNode, lastNode) {\n var activeElement = getActiveElement(asArray(topNode).length > 0 ? document : getFirst(topNode).ownerDocument);\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(activeElement || topNode, topNode, entries);\n var visibilityCache = new Map();\n var anyFocusable = getFocusableNodes(entries, visibilityCache);\n var innerElements = anyFocusable.filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n });\n if (!innerElements[0]) {\n return undefined;\n }\n var outerNodes = getFocusableNodes([commonParent], visibilityCache).map(function (_a) {\n var node = _a.node;\n return node;\n });\n var orderedInnerElements = reorderNodes(outerNodes, innerElements);\n // collect inner focusable and separately tabbables\n var innerFocusables = orderedInnerElements.map(function (_a) {\n var node = _a.node;\n return node;\n });\n var innerTabbable = orderedInnerElements.filter(function (_a) {\n var tabIndex = _a.tabIndex;\n return tabIndex >= 0;\n }).map(function (_a) {\n var node = _a.node;\n return node;\n });\n var newId = newFocus(innerFocusables, innerTabbable, outerNodes, activeElement, lastNode);\n if (newId === NEW_FOCUS) {\n var focusNode = \n // first try only tabbable, and the fallback to all focusable, as long as at least one element should be picked for focus\n pickAutofocus(anyFocusable, innerTabbable, allParentAutofocusables(entries, visibilityCache)) ||\n pickAutofocus(anyFocusable, innerFocusables, allParentAutofocusables(entries, visibilityCache));\n if (focusNode) {\n return { node: focusNode };\n }\n else {\n console.warn('focus-lock: cannot find any node to move focus into');\n return undefined;\n }\n }\n if (newId === undefined) {\n return newId;\n }\n return orderedInnerElements[newId];\n};\n"],"names":["focusSolver","topNode","lastNode","activeElement","getActiveElement","asArray","length","document","getFirst","ownerDocument","entries","getAllAffectedNodes","filter","isNotAGuard","commonParent","getTopCommonParent","visibilityCache","Map","anyFocusable","getFocusableNodes","innerElements","_a","node","srcNodes","dstNodes","remap","outerNodes","map","orderedInnerElements","forEach","entity","set","get","isDefined","innerFocusables","innerTabbable","tabIndex","newId","newFocus","NEW_FOCUS","focusNode","pickAutofocus","allParentAutofocusables","console","warn","undefined"],"mappings":"4eAQA,IAiBWA,EAAc,SAAUC,EAASC,GACxC,IAAIC,EAAgBC,EAAiBC,EAAQJ,GAASK,OAAS,EAAIC,SAAWC,EAASP,GAASQ,eAC5FC,EAAUC,EAAoBV,GAASW,OAAOC,GAC9CC,EAAeC,EAAmBZ,GAAiBF,EAASA,EAASS,GACrEM,EAAkB,IAAIC,IACtBC,EAAeC,EAAkBT,EAASM,GAC1CI,EAAgBF,EAAaN,OAAO,SAAUS,GAC9C,IAAIC,EAAOD,EAAGC,KACd,OAAOT,EAAYS,EACvB,GACA,GAAKF,EAAc,GAAnB,CAGA,IA9ByBG,EAAUC,EAC/BC,EA6BAC,EAAaP,EAAkB,CAACL,GAAeE,GAAiBW,IAAI,SAAUN,GAE9E,OADWA,EAAGC,IAElB,GACIM,GAlCqBL,EAkCeG,EAlCLF,EAkCiBJ,EAjChDK,EAAQ,IAAIR,IAEhBO,EAASK,QAAQ,SAAUC,GAAU,OAAOL,EAAMM,IAAID,EAAOR,KAAMQ,EAAS,GAErEP,EAASI,IAAI,SAAUL,GAAQ,OAAOG,EAAMO,IAAIV,EAAO,GAAGV,OAAOqB,IA+BpEC,EAAkBN,EAAqBD,IAAI,SAAUN,GAErD,OADWA,EAAGC,IAElB,GACIa,EAAgBP,EAAqBhB,OAAO,SAAUS,GAEtD,OADeA,EAAGe,UACC,CACvB,GAAGT,IAAI,SAAUN,GAEb,OADWA,EAAGC,IAElB,GACIe,EAAQC,EAASJ,EAAiBC,EAAeT,EAAYvB,EAAeD,GAChF,GAAImC,IAAUE,EAAW,CACrB,IAAIC,EAEJC,EAAcvB,EAAciB,EAAeO,EAAwBhC,EAASM,KACxEyB,EAAcvB,EAAcgB,EAAiBQ,EAAwBhC,EAASM,IAClF,OAAIwB,EACO,CAAElB,KAAMkB,QAGfG,QAAQC,KAAK,sDAGrB,CACA,YAAcC,IAAVR,EACOA,EAEJT,EAAqBS,EAnC5B,CAoCJ","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import{getAllAffectedNodes as r}from"./utils/all-affected.js";import{isNotAGuard as t,isGuard as i}from"./utils/is.js";import{getTopCommonParent as o}from"./utils/parenting.js";import{orderByTabIndex as e}from"./utils/tabOrder.js";import{getFocusables as n}from"./utils/tabUtils.js";var m=function(m){var s=r(m).filter(t),f=o(m,m,s),a=e(n([f],!0),!0,!0),l=n(s,!1);return a.map(function(r){var t=r.node;return{node:t,index:r.index,lockItem:l.indexOf(t)>=0,guard:i(t)}})};export{m as expandFocusableNodes};
2
- //# sourceMappingURL=focusables.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"focusables.js","sources":["../../../../../node_modules/focus-lock/dist/es2015/focusables.js"],"sourcesContent":["import { getAllAffectedNodes } from './utils/all-affected';\nimport { isGuard, isNotAGuard } from './utils/is';\nimport { getTopCommonParent } from './utils/parenting';\nimport { orderByTabIndex } from './utils/tabOrder';\nimport { getFocusables } from './utils/tabUtils';\n/**\n * traverses all related nodes (including groups) returning a list of all nodes(outer and internal) with meta information\n * This is low-level API!\n * @returns list of focusable elements inside a given top(!) node.\n * @see {@link getFocusableNodes} providing a simpler API\n */\nexport var expandFocusableNodes = function (topNode) {\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(topNode, topNode, entries);\n var outerNodes = orderByTabIndex(getFocusables([commonParent], true), true, true);\n var innerElements = getFocusables(entries, false);\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":["expandFocusableNodes","topNode","entries","getAllAffectedNodes","filter","isNotAGuard","commonParent","getTopCommonParent","outerNodes","orderByTabIndex","getFocusables","innerElements","map","_a","node","index","lockItem","indexOf","guard","isGuard"],"mappings":"2RAWU,IAACA,EAAuB,SAAUC,GACxC,IAAIC,EAAUC,EAAoBF,GAASG,OAAOC,GAC9CC,EAAeC,EAAmBN,EAASA,EAASC,GACpDM,EAAaC,EAAgBC,EAAc,CAACJ,IAAe,IAAO,GAAM,GACxEK,EAAgBD,EAAcR,GAAS,GAC3C,OAAOM,EAAWI,IAAI,SAAUC,GAC5B,IAAIC,EAAOD,EAAGC,KACd,MAAA,CACIA,KAAMA,EACNC,MAHwBF,EAAGE,MAI3BC,SAAUL,EAAcM,QAAQH,IAAS,EACzCI,MAAOC,EAAQL,GAEvB,EACJ","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import{focusOn as o}from"./commands.js";import{focusSolver as e}from"./focusSolver.js";var t=0,c=!1,s=function(s,i,n){void 0===n&&(n={});var f=e(s,i);if(!c&&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"),c=!0,void setTimeout(function(){c=!1},1);t++,o(f.node,n.focusOptions),t--}};export{s as moveFocusInside};
2
- //# sourceMappingURL=moveFocusInside.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"moveFocusInside.js","sources":["../../../../../node_modules/focus-lock/dist/es2015/moveFocusInside.js"],"sourcesContent":["import { focusOn } from './commands';\nimport { focusSolver } from './focusSolver';\nvar guardCount = 0;\nvar lockDisabled = false;\n/**\n * The main functionality of the focus-lock package\n *\n * Contains focus at a given node.\n * The last focused element will help to determine which element(first or last) should be focused.\n * The found element will be focused.\n *\n * This is one time action (move), not a persistent focus-lock\n *\n * HTML markers (see {@link import('./constants').FOCUS_AUTO} constants) can control autofocus\n * @see {@link focusSolver} for the same functionality without autofocus\n */\nexport var moveFocusInside = function (topNode, lastNode, options) {\n if (options === void 0) { options = {}; }\n var focusable = focusSolver(topNode, lastNode);\n // global local side effect to countain recursive lock activation and resolve focus-fighting\n if (lockDisabled) {\n return;\n }\n if (focusable) {\n /** +FOCUS-FIGHTING prevention **/\n if (guardCount > 2) {\n // we have recursive entered back the lock activation\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":["guardCount","lockDisabled","moveFocusInside","topNode","lastNode","options","focusable","focusSolver","console","error","setTimeout","focusOn","node","focusOptions"],"mappings":"uFAEA,IAAIA,EAAa,EACbC,GAAe,EAaRC,EAAkB,SAAUC,EAASC,EAAUC,QACtC,IAAZA,IAAsBA,EAAU,CAAA,GACpC,IAAIC,EAAYC,EAAYJ,EAASC,GAErC,IAAIH,GAGAK,EAAW,CAEX,GAAIN,EAAa,EAQb,OANAQ,QAAQC,MAAM,qJAEdR,GAAe,OACfS,WAAW,WACPT,GAAe,CACnB,EAAG,GAGPD,IACAW,EAAQL,EAAUM,KAAMP,EAAQQ,cAChCb,GACJ,CACJ","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import{getTabbableNodes as n}from"./utils/DOMutils.js";function e(n){if(!n)return null;if("undefined"==typeof WeakRef)return function(){return n||null};var e=n?new WeakRef(n):null;return function(){return(null==e?void 0:e.deref())||null}}var t=function(n){if(!n)return null;for(var t=[],r=n;r&&r!==document.body;)t.push({current:e(r),parent:e(r.parentElement),left:e(r.previousElementSibling),right:e(r.nextElementSibling)}),r=r.parentElement;return{element:e(n),stack:t,ownerDocument:n.ownerDocument}},r=function(e){var r=t(e);return function(){return function(e){var t,r,l,i,u;if(e)for(var o=e.stack,f=e.ownerDocument,a=new Map,v=0,c=o;v<c.length;v++){var d=c[v],m=null===(t=d.parent)||void 0===t?void 0:t.call(d);if(m&&f.contains(m)){for(var p=null===(r=d.left)||void 0===r?void 0:r.call(d),s=d.current(),g=m.contains(s)?s:void 0,h=null===(l=d.right)||void 0===l?void 0:l.call(d),E=n([m],a),b=null!==(u=null!==(i=null!=g?g:null==p?void 0:p.nextElementSibling)&&void 0!==i?i:h)&&void 0!==u?u:p;b;){for(var w=0,k=E;w<k.length;w++){var x=k[w];if(null==b?void 0:b.contains(x.node))return x.node}b=b.nextElementSibling}if(E.length)return E[0].node}}}(r)}};export{r as captureFocusRestore,t as recordElementLocation};
2
- //# sourceMappingURL=return-focus.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"return-focus.js","sources":["../../../../../node_modules/focus-lock/dist/es2015/return-focus.js"],"sourcesContent":["import { getTabbableNodes } from './utils/DOMutils';\nfunction weakRef(value) {\n if (!value)\n return null;\n // #68 Safari 14.1 dont have it yet\n // FIXME: remove in 2025\n if (typeof WeakRef === 'undefined') {\n return function () { return value || null; };\n }\n var w = value ? new WeakRef(value) : null;\n return function () { return (w === null || w === void 0 ? void 0 : w.deref()) || null; };\n}\nexport var recordElementLocation = function (element) {\n if (!element) {\n return null;\n }\n var stack = [];\n var currentElement = element;\n while (currentElement && currentElement !== document.body) {\n stack.push({\n current: weakRef(currentElement),\n parent: weakRef(currentElement.parentElement),\n left: weakRef(currentElement.previousElementSibling),\n right: weakRef(currentElement.nextElementSibling),\n });\n currentElement = currentElement.parentElement;\n }\n return {\n element: weakRef(element),\n stack: stack,\n ownerDocument: element.ownerDocument,\n };\n};\nvar restoreFocusTo = function (location) {\n var _a, _b, _c, _d, _e;\n if (!location) {\n return undefined;\n }\n var stack = location.stack, ownerDocument = location.ownerDocument;\n var visibilityCache = new Map();\n for (var _i = 0, stack_1 = stack; _i < stack_1.length; _i++) {\n var line = stack_1[_i];\n var parent_1 = (_a = line.parent) === null || _a === void 0 ? void 0 : _a.call(line);\n // is it still here?\n if (parent_1 && ownerDocument.contains(parent_1)) {\n var left = (_b = line.left) === null || _b === void 0 ? void 0 : _b.call(line);\n var savedCurrent = line.current();\n var current = parent_1.contains(savedCurrent) ? savedCurrent : undefined;\n var right = (_c = line.right) === null || _c === void 0 ? void 0 : _c.call(line);\n var focusables = getTabbableNodes([parent_1], visibilityCache);\n var aim = \n // that is element itself\n (_e = (_d = current !== null && current !== void 0 ? current : \n // or something in it's place\n left === null || left === void 0 ? void 0 : left.nextElementSibling) !== null && _d !== void 0 ? _d : \n // or somebody to the right, still close enough\n right) !== null && _e !== void 0 ? _e : \n // or somebody to the left, something?\n left;\n while (aim) {\n for (var _f = 0, focusables_1 = focusables; _f < focusables_1.length; _f++) {\n var focusable = focusables_1[_f];\n if (aim === null || aim === void 0 ? void 0 : aim.contains(focusable.node)) {\n return focusable.node;\n }\n }\n aim = aim.nextElementSibling;\n }\n if (focusables.length) {\n // if parent contains a focusable - move there\n return focusables[0].node;\n }\n }\n }\n // nothing matched\n return undefined;\n};\n/**\n * Captures the current focused element to restore focus as close as possible in the future\n * Handles situations where the focused element is removed from the DOM or no longer focusable\n * moving focus to the closest focusable element\n * @param targetElement - element where focus should be restored\n * @returns a function returning a new element to focus\n */\nexport var captureFocusRestore = function (targetElement) {\n var location = recordElementLocation(targetElement);\n return function () {\n return restoreFocusTo(location);\n };\n};\n"],"names":["weakRef","value","WeakRef","w","deref","recordElementLocation","element","stack","currentElement","document","body","push","current","parent","parentElement","left","previousElementSibling","right","nextElementSibling","ownerDocument","captureFocusRestore","targetElement","location","_a","_b","_c","_d","_e","visibilityCache","Map","_i","stack_1","length","line","parent_1","call","contains","savedCurrent","undefined","focusables","getTabbableNodes","aim","_f","focusables_1","focusable","node","restoreFocusTo"],"mappings":"uDACA,SAASA,EAAQC,GACb,IAAKA,EACD,OAAO,KAGX,GA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AC1Ca,EAMO,QAJVd,EAEwE,QAFlED,EAAKd,QAAyCA,EAErDG,aAAmC,EAASA,EAAKG,0BAAuC,IAAPQ,EAAgBA,EAEjGT,SAA0B,IAAPU,EAAgBA,EAEnCZ,EACO0B,GAAK,CACR,IAAK,IAAIC,EAAK,EAAGC,EAAeJ,EAAYG,EAAKC,EAAaX,OAAQU,IAAM,CACxE,IAAIE,EAAYD,EAAaD,GAC7B,GAAID,aAAiC,EAASA,EAAIL,SAASQ,EAAUC,MACjE,OAAOD,EAAUC,IAEzB,CACAJ,EAAMA,EAAIvB,kBACd,CACA,GAAIqB,EAAWP,OAEX,OAAOO,EAAW,GAAGM,IAE7B,CACJ,CAGJ,CAWeC,CAAexB,EAC1B,CACJ","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import{focusOn as n}from"./commands.js";import{getTabbableNodes as o,getFocusableNodes as e,contains as t}from"./utils/DOMutils.js";import{asArray as r}from"./utils/array.js";var i=function(n,i,c){if(!n||!i)return console.error("no element or scope given"),{};var s=r(i);if(s.every(function(o){return!t(o,n)}))return console.error("Active element is not contained in the scope"),{};var a=c?o(s,new Map):e(s,new Map),u=a.findIndex(function(o){return o.node===n});return-1!==u?{prev:a[u-1],next:a[u+1],first:a[0],last:a[a.length-1]}:void 0},c=function(o,e,t){void 0===e&&(e={});var r=function(n){return Object.assign({scope:document.body,cycle:!0,onlyTabbable:!0},n)}(e),c=i(o,r.scope,r.onlyTabbable);if(c){var s=t(c,r.cycle);s&&n(s.node,r.focusOptions)}},s=function(n,o){void 0===o&&(o={}),c(n,o,function(n,o){var e=n.next,t=n.first;return e||o&&t})},a=function(n,o){void 0===o&&(o={}),c(n,o,function(n,o){var e=n.prev,t=n.last;return e||o&&t})},u=function(t,i,c){var s,a,u,f,l=(a=t,u=null===(s=i.onlyTabbable)||void 0===s||s,{first:(f=u?o(r(a),new Map):e(r(a),new Map))[0],last:f[f.length-1]})[c];l&&n(l.node,i.focusOptions)},f=function(n,o){void 0===o&&(o={}),u(n,o,"first")},l=function(n,o){void 0===o&&(o={}),u(n,o,"last")};export{f as focusFirstElement,l as focusLastElement,s as focusNextElement,a as focusPrevElement,i as getRelativeFocusable};
2
- //# sourceMappingURL=sibling.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sibling.js","sources":["../../../../../node_modules/focus-lock/dist/es2015/sibling.js"],"sourcesContent":["import { focusOn } from './commands';\nimport { getTabbableNodes, contains, getFocusableNodes } from './utils/DOMutils';\nimport { asArray } from './utils/array';\n/**\n * for a given `element` in a given `scope` returns focusable siblings\n * @param element - base element\n * @param scope - common parent. Can be document, but better to narrow it down for performance reasons\n * @returns {prev,next} - references to a focusable element before and after\n * @returns undefined - if operation is not applicable\n */\nexport var getRelativeFocusable = function (element, scope, useTabbables) {\n if (!element || !scope) {\n console.error('no element or scope given');\n return {};\n }\n var shards = asArray(scope);\n if (shards.every(function (shard) { return !contains(shard, element); })) {\n console.error('Active element is not contained in the scope');\n return {};\n }\n var focusables = useTabbables\n ? getTabbableNodes(shards, new Map())\n : getFocusableNodes(shards, new Map());\n var current = focusables.findIndex(function (_a) {\n var node = _a.node;\n return node === element;\n });\n if (current === -1) {\n // an edge case, when anchor element is not found\n return undefined;\n }\n return {\n prev: focusables[current - 1],\n next: focusables[current + 1],\n first: focusables[0],\n last: focusables[focusables.length - 1],\n };\n};\nvar getBoundary = function (shards, useTabbables) {\n var set = useTabbables\n ? getTabbableNodes(asArray(shards), new Map())\n : getFocusableNodes(asArray(shards), new Map());\n return {\n first: set[0],\n last: set[set.length - 1],\n };\n};\nvar defaultOptions = function (options) {\n return Object.assign({\n scope: document.body,\n cycle: true,\n onlyTabbable: true,\n }, options);\n};\nvar moveFocus = function (fromElement, options, cb) {\n if (options === void 0) { options = {}; }\n var newOptions = defaultOptions(options);\n var solution = getRelativeFocusable(fromElement, newOptions.scope, newOptions.onlyTabbable);\n if (!solution) {\n return;\n }\n var target = cb(solution, newOptions.cycle);\n if (target) {\n focusOn(target.node, newOptions.focusOptions);\n }\n};\n/**\n * focuses next element in the tab-order\n * @param fromElement - common parent to scope active element search or tab cycle order\n * @param {FocusNextOptions} [options] - focus options\n */\nexport var focusNextElement = function (fromElement, options) {\n if (options === void 0) { options = {}; }\n moveFocus(fromElement, options, function (_a, cycle) {\n var next = _a.next, first = _a.first;\n return next || (cycle && first);\n });\n};\n/**\n * focuses prev element in the tab order\n * @param fromElement - common parent to scope active element search or tab cycle order\n * @param {FocusNextOptions} [options] - focus options\n */\nexport var focusPrevElement = function (fromElement, options) {\n if (options === void 0) { options = {}; }\n moveFocus(fromElement, options, function (_a, cycle) {\n var prev = _a.prev, last = _a.last;\n return prev || (cycle && last);\n });\n};\nvar pickBoundary = function (scope, options, what) {\n var _a;\n var boundary = getBoundary(scope, (_a = options.onlyTabbable) !== null && _a !== void 0 ? _a : true);\n var node = boundary[what];\n if (node) {\n focusOn(node.node, options.focusOptions);\n }\n};\n/**\n * focuses first element in the tab-order\n * @param {FocusNextOptions} options - focus options\n */\nexport var focusFirstElement = function (scope, options) {\n if (options === void 0) { options = {}; }\n pickBoundary(scope, options, 'first');\n};\n/**\n * focuses last element in the tab order\n * @param {FocusNextOptions} options - focus options\n */\nexport var focusLastElement = function (scope, options) {\n if (options === void 0) { options = {}; }\n pickBoundary(scope, options, 'last');\n};\n"],"names":["getRelativeFocusable","element","scope","useTabbables","console","error","shards","asArray","every","shard","contains","focusables","getTabbableNodes","Map","getFocusableNodes","current","findIndex","_a","node","prev","next","first","last","length","moveFocus","fromElement","options","cb","newOptions","Object","assign","document","body","cycle","onlyTabbable","defaultOptions","solution","target","focusOn","focusOptions","focusNextElement","focusPrevElement","pickBoundary","what","set","focusFirstElement","focusLastElement"],"mappings":"+KAUU,IAACA,EAAuB,SAAUC,EAASC,EAAOC,GACxD,IAAKF,IAAYC,EAEb,OADAE,QAAQC,MAAM,6BACP,CAAA,EAEX,IAAIC,EAASC,EAAQL,GACrB,GAAII,EAAOE,MAAM,SAAUC,GAAS,OAAQC,E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EAtDKC,EAsDkC,QAA/Bc,EAAKS,EAAQQ,oBAAiC,IAAPjB,GAAgBA,EAlDnF,CACHI,OAJAuB,EAAMzC,EACJS,EAAiBL,EAAQD,GAAS,IAAIO,KACtCC,EAAkBP,EAAQD,GAAS,IAAIO,MAE9B,GACXS,KAAMsB,EAAIA,EAAIrB,OAAS,KAiDPoB,GAChBzB,GACAoB,EAAQpB,EAAKA,KAAMQ,EAAQa,aAEnC,EAKWM,EAAoB,SAAU3C,EAAOwB,QAC5B,IAAZA,IAAsBA,EAAU,CAAA,GACpCgB,EAAaxC,EAAOwB,EAAS,QACjC,EAKWoB,EAAmB,SAAU5C,EAAOwB,QAC3B,IAAZA,IAAsBA,EAAU,CAAA,GACpCgB,EAAaxC,EAAOwB,EAAS,OACjC","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import{correctNodes as i}from"./utils/correctFocus.js";import{pickFocusable as r}from"./utils/firstFocus.js";import{isGuard as t}from"./utils/is.js";var n="NEW_FOCUS",e=function(e,f,o,d,a){var s=e.length,u=e[0],x=e[s-1],O=t(d);if(!(d&&e.indexOf(d)>=0)){var v=void 0!==d?o.indexOf(d):-1,h=a?o.indexOf(a):v,l=a?e.indexOf(a):-1;if(-1===v)return-1!==l?l:n;if(-1===l)return n;var c=v-h,m=o.indexOf(u),b=o.indexOf(x),p=i(o),M=void 0!==d?p.indexOf(d):-1,g=a?p.indexOf(a):M,j=p.filter(function(i){return i.tabIndex>=0}),F=void 0!==d?j.indexOf(d):-1,C=a?j.indexOf(a):F,E=F>=0&&C>=0?C-F:g-M;if(!c&&l>=0)return l;if(0===f.length)return l;var I=r(e,f[0]),N=r(e,f[f.length-1]);return v<=m&&O&&Math.abs(c)>1?N:v>=b&&O&&Math.abs(c)>1?I:c&&Math.abs(E)>1?l:v<=m?N:v>b?I:c?Math.abs(c)>1?l:(s+l+c)%s:void 0}};export{n as NEW_FOCUS,e as newFocus};
2
- //# sourceMappingURL=solver.js.map
@@ -1 +0,0 @@
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 - used to control \"return focus\"\n * @param innerTabbables - used to control \"autofocus\"\n * @param outerNodes\n * @param activeElement\n * @param lastNode\n * @returns {number|string|undefined|*}\n */\nexport var newFocus = function (innerNodes, innerTabbables, 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 // no active focus (or focus is on the body)\n if (activeIndex === -1) {\n // known fallback\n if (lastNodeInside !== -1) {\n return lastNodeInside;\n }\n return NEW_FOCUS;\n }\n // new focus, nothing to calculate\n if (lastNodeInside === -1) {\n return NEW_FOCUS;\n }\n var indexDiff = activeIndex - lastIndex;\n var firstNodeIndex = outerNodes.indexOf(firstFocus);\n var lastNodeIndex = outerNodes.indexOf(lastFocus);\n var correctedNodes = correctNodes(outerNodes);\n var currentFocusableIndex = activeElement !== undefined ? correctedNodes.indexOf(activeElement) : -1;\n var previousFocusableIndex = lastNode ? correctedNodes.indexOf(lastNode) : currentFocusableIndex;\n var tabbableNodes = correctedNodes.filter(function (node) { return node.tabIndex >= 0; });\n var currentTabbableIndex = activeElement !== undefined ? tabbableNodes.indexOf(activeElement) : -1;\n var previousTabbableIndex = lastNode ? tabbableNodes.indexOf(lastNode) : currentTabbableIndex;\n var focusIndexDiff = currentTabbableIndex >= 0 && previousTabbableIndex >= 0\n ? // old/new are tabbables, measure distance in tabbable space\n previousTabbableIndex - currentTabbableIndex\n : // or else measure in focusable space\n previousFocusableIndex - currentFocusableIndex;\n // old focus\n if (!indexDiff && lastNodeInside >= 0) {\n return lastNodeInside;\n }\n // no tabbable elements, autofocus is not possible\n if (innerTabbables.length === 0) {\n // an edge case with no tabbable elements\n // return the last focusable one\n // with some probability this will prevent focus from cycling across the lock, but there is no tabbale elements to cycle to\n return lastNodeInside;\n }\n var returnFirstNode = pickFocusable(innerNodes, innerTabbables[0]);\n var returnLastNode = pickFocusable(innerNodes, innerTabbables[innerTabbables.length - 1]);\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(focusIndexDiff) > 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","innerTabbables","outerNodes","activeElement","lastNode","cnt","length","firstFocus","lastFocus","isOnGuard","isGuard","indexOf","activeIndex","undefined","lastIndex","lastNodeInside","indexDiff","firstNodeIndex","lastNodeIndex","correctedNodes","correctNodes","currentFocusableIndex","previousFocusableIndex","tabbableNodes","filter","node","tabIndex","currentTabbableIndex","previousTabbableIndex","focusIndexDiff","returnFirstNode","pickFocusable","returnLastNode","Math","abs"],"mappings":"qJAGU,IAACA,EAAY,YAUZC,EAAW,SAAUC,EAAYC,EAAgBC,EAAYC,EAAeC,GACnF,IAAIC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e,EAGPpB,EAAcM,EACPY,EAGPd,EACIiB,KAAKC,IAAIlB,GAAa,EACfD,GAEHV,EAAMU,EAAiBC,GAAaX,OAJhD,CAhEA,CAwEJ","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import{toArray as t}from"./array.js";import{isVisibleCached as r,notHiddenInput as n,isAutoFocusAllowedCached as o}from"./is.js";import{orderByTabIndex as e}from"./tabOrder.js";import{getFocusables as i,getParentAutofocusables as u}from"./tabUtils.js";var f=function(o,e){return t(o).filter(function(t){return r(e,t)}).filter(function(t){return n(t)})},c=function(r,n){return void 0===n&&(n=new Map),t(r).filter(function(t){return o(n,t)})},a=function(t,r,n){return e(f(i(t,n),r),!0,n)},m=function(t,r){return e(f(i(t),r),!1)},s=function(t,r){return f(u(t),r)},l=function(r,n){return r.shadowRoot?l(r.shadowRoot,n):!(void 0===Object.getPrototypeOf(r).contains||!Object.getPrototypeOf(r).contains.call(r,n))||t(r.children).some(function(t){var r;if(t instanceof HTMLIFrameElement){var o=null===(r=t.contentDocument)||void 0===r?void 0:r.body;return!!o&&l(o,n)}return l(t,n)})};export{l as contains,c as filterAutoFocusable,f as filterFocusable,m as getFocusableNodes,a as getTabbableNodes,s as parentAutofocusables};
2
- //# sourceMappingURL=DOMutils.js.map
@@ -1 +0,0 @@
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 * !__WARNING__! Low level API.\n * @returns all tabbable nodes\n *\n * @see {@link getFocusableNodes} to get any focusable element\n *\n * @param topNodes - array of top level HTMLElements to search inside\n * @param visibilityCache - an cache to store intermediate measurements. Expected to be a fresh `new Map` on every call\n */\nexport var getTabbableNodes = function (topNodes, visibilityCache, withGuards) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards), visibilityCache), true, withGuards);\n};\n/**\n * !__WARNING__! Low level API.\n *\n * @returns anything \"focusable\", not only tabbable. The difference is in `tabIndex=-1`\n * (without guards, as long as they are not expected to be ever focused)\n *\n * @see {@link getTabbableNodes} to get only tabble nodes element\n *\n * @param topNodes - array of top level HTMLElements to search inside\n * @param visibilityCache - an cache to store intermediate measurements. Expected to be a fresh `new Map` on every call\n */\nexport var getFocusableNodes = 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 if (scope.shadowRoot) {\n return contains(scope.shadowRoot, element);\n }\n else {\n if (Object.getPrototypeOf(scope).contains !== undefined &&\n Object.getPrototypeOf(scope).contains.call(scope, element)) {\n return true;\n }\n return toArray(scope.children).some(function (child) {\n var _a;\n if (child instanceof HTMLIFrameElement) {\n var iframeBody = (_a = child.contentDocument) === null || _a === void 0 ? void 0 : _a.body;\n if (iframeBody) {\n return contains(iframeBody, element);\n }\n return false;\n }\n return contains(child, element);\n });\n }\n};\n"],"names":["filterFocusable","nodes","visibilityCache","toArray","filter","node","isVisibleCached","notHiddenInput","filterAutoFocusable","cache","Map","isAutoFocusAllowedCached","getTabbableNodes","topNodes","withGuards","orderByTabIndex","getFocusables","getFocusableNodes","parentAutofocusables","topNode","getParentAutofocusables","contains","scope","element","shadowRoot","undefined","Object","getPrototypeOf","call","children","some","child","_a","HTMLIFrameElement","iframeBody","contentDocument","body"],"mappings":"4PASU,IAACA,EAAkB,SAAUC,EAAOC,GAC1C,OAAOC,EAAQF,GACVG,OAAO,SAAUC,GAAQ,OAAOC,EAAgBJ,EAAiBG,EAAO,GACxED,OAAO,SAAUC,GAAQ,OAAOE,EAAeF,EAAO,EAC/D,EACWG,EAAsB,SAAUP,EAAOQ,GAE9C,YADc,IAAVA,IAAoBA,EAAQ,IAAIC,KAC7BP,EAAQF,GAAOG,OAAO,SAAUC,GAAQ,OAAOM,EAAyBF,EAAOJ,EAAO,EACjG,EAUWO,EAAmB,SAAUC,EAAUX,EAAiBY,GAC/D,OAAOC,EAAgBf,EAAgBgB,EAAcH,EAAUC,GAAaZ,IAAkB,EAAMY,EACxG,EAYWG,EAAoB,SAAUJ,EAAUX,GAC/C,OAAOa,EAAgBf,EAAgBgB,EAAcH,GAAWX,IAAkB,EACtF,EAMWgB,EAAuB,SAAUC,EAASjB,GACjD,OAAOF,EAAgBoB,EAAwBD,GAAUjB,EAC7D,EAIWmB,EAAW,SAAUC,EAAOC,GACnC,OAAID,EAAME,WACCH,EAASC,EAAME,WAAYD,UAGYE,IAA1CC,OAAOC,eAAeL,GAAOD,WAC7BK,OAAOC,eAAeL,GAAOD,SAASO,KAAKN,EAAOC,KAG/CpB,EAAQmB,EAAMO,UAAUC,KAAK,SAAUC,GAC1C,IAAIC,EACJ,GAAID,aAAiBE,kBAAmB,CACpC,IAAIC,EAA8C,QAAhCF,EAAKD,EAAMI,uBAAoC,IAAPH,OAAgB,EAASA,EAAGI,KACtF,QAAIF,GACOb,EAASa,EAAYX,EAGpC,CACA,OAAOF,EAASU,EAAOR,EAC3B,EAER","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import{FOCUS_GROUP as r,FOCUS_DISABLED as t}from"../constants.js";import{asArray as e,toArray as n}from"./array.js";var o=function(r){return r.parentNode?o(r.parentNode):r},a=function(a){return e(a).filter(Boolean).reduce(function(e,a){var c=a.getAttribute(r);return e.push.apply(e,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)})}(n(o(a).querySelectorAll("[".concat(r,'="').concat(c,'"]:not([').concat(t,'="disabled"])')))):[a]),e},[])};export{a as getAllAffectedNodes};
2
- //# sourceMappingURL=all-affected.js.map
@@ -1 +0,0 @@
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 - node or nodes to look inside\n * @returns Element[]\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,CAC7D,EAMWE,EAAsB,SAAUF,GAEvC,OADYG,EAAQH,GACPI,OAAOC,SAASC,OAAO,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,EAGtB,CAEJ,OAAOL,EAAMV,OAAO,SAAUuB,EAAGC,GAAS,OAAQb,EAAUc,IAAID,EAAQ,EAC5E,CAmBcE,CAAaC,EAAQhC,EAAaS,GAAawB,iBAAiB,IAAIC,OAAOtB,EAAa,MAAOsB,OAAOxB,EAAO,YAAawB,OAAOC,EAAgB,oBACjJ,CAAC1B,IACAD,CACX,EAAG,GACP","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- var r=function(r){for(var n=Array(r.length),t=0;t<r.length;++t)n[t]=r[t];return n},n=function(r){return Array.isArray(r)?r:[r]},t=function(r){return Array.isArray(r)?r[0]:r};export{n as asArray,t as getFirst,r as toArray};
2
- //# sourceMappingURL=array.js.map
@@ -1 +0,0 @@
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]); };\nexport var getFirst = function (a) { return (Array.isArray(a) ? a[0] : a); };\n"],"names":["toArray","a","ret","Array","length","i","asArray","isArray","getFirst"],"mappings":"AAGU,IAACA,EAAU,SAAUC,GAE3B,IADA,IAAIC,EAAMC,MAAMF,EAAEG,QACTC,EAAI,EAAGA,EAAIJ,EAAEG,SAAUC,EAC5BH,EAAIG,GAAKJ,EAAEI,GAEf,OAAOH,CACX,EACWI,EAAU,SAAUL,GAAK,OAAQE,MAAMI,QAAQN,GAAKA,EAAI,CAACA,EAAK,EAC9DO,EAAW,SAAUP,GAAK,OAAQE,MAAMI,QAAQN,GAAKA,EAAE,GAAKA,CAAI","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import{filterAutoFocusable as o}from"./DOMutils.js";import{pickFirstFocus as r}from"./firstFocus.js";import{getDataset as t}from"./is.js";var i=function(i,n,u){var f,s=i.map(function(o){return o.node}),e=o(s.filter((f=u,function(o){var r,i=null===(r=t(o))||void 0===r?void 0:r.autofocus;return o.autofocus||void 0!==i&&"false"!==i||f.indexOf(o)>=0})));return e&&e.length?r(e):r(o(n))};export{i as pickAutofocus};
2
- //# sourceMappingURL=auto-focus.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auto-focus.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/utils/auto-focus.js"],"sourcesContent":["import { filterAutoFocusable } from './DOMutils';\nimport { pickFirstFocus } from './firstFocus';\nimport { getDataset } from './is';\nvar findAutoFocused = function (autoFocusables) {\n return function (node) {\n var _a;\n var autofocus = (_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.autofocus;\n return (\n // @ts-expect-error\n node.autofocus ||\n //\n (autofocus !== undefined && autofocus !== 'false') ||\n //\n autoFocusables.indexOf(node) >= 0);\n };\n};\nexport var pickAutofocus = function (nodesIndexes, orderedNodes, groups) {\n var nodes = nodesIndexes.map(function (_a) {\n var node = _a.node;\n return node;\n });\n var autoFocusable = filterAutoFocusable(nodes.filter(findAutoFocused(groups)));\n if (autoFocusable && autoFocusable.length) {\n return pickFirstFocus(autoFocusable);\n }\n return pickFirstFocus(filterAutoFocusable(orderedNodes));\n};\n"],"names":["pickAutofocus","nodesIndexes","orderedNodes","groups","autoFocusables","nodes","map","_a","node","autoFocusable","filterAutoFocusable","filter","autofocus","getDataset","undefined","indexOf","length","pickFirstFocus"],"mappings":"0IAGA,IAaWA,EAAgB,SAAUC,EAAcC,EAAcC,GAC7D,IAd4BC,EAcxBC,EAAQJ,EAAaK,IAAI,SAAUC,GAEnC,OADWA,EAAGC,IAElB,GACIC,EAAgBC,EAAoBL,EAAMM,QAlBlBP,EAkByCD,EAjB9D,SAAUK,GACb,IAAID,EACAK,EAAwC,QAA3BL,EAAKM,EAAWL,UAA0B,IAAPD,OAAgB,EAASA,EAAGK,UAChF,OAEAJ,EAAKI,gBAEcE,IAAdF,GAAyC,UAAdA,GAE5BR,EAAeW,QAAQP,IAAS,CACxC,KAQA,OAAIC,GAAiBA,EAAcO,OACxBC,EAAeR,GAEnBQ,EAAeP,EAAoBR,GAC9C","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
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
- //# sourceMappingURL=correctFocus.js.map
@@ -1 +0,0 @@
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,OAAO,SAAUC,GAAM,OAAOA,EAAGF,OAASH,EAAKG,IAAM,GACrDC,OAAO,SAAUC,GAAM,OAAOA,EAAGC,OAAS,GAAG,IAAMN,CAC5D,CAGeO,CAAkBP,EAAMC,GAE5BD,CACX,EAKWQ,EAAe,SAAUP,GAEhC,IAAIQ,EAAY,IAAIC,IAGpB,OAFAT,EAAMU,QAAQ,SAAUX,GAAQ,OAAOS,EAAUG,IAAIb,EAAYC,EAAMC,GAAS,GAEzEA,EAAMG,OAAO,SAAUJ,GAAQ,OAAOS,EAAUI,IAAIb,EAAO,EACtE","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import{correctNode as r}from"./correctFocus.js";var n=function(n){return n[0]&&n.length>1?r(n[0],n):n[0]},t=function(n,t){return n.indexOf(r(t,n))};export{n as pickFirstFocus,t as pickFocusable};
2
- //# sourceMappingURL=firstFocus.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"firstFocus.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/utils/firstFocus.js"],"sourcesContent":["import { correctNode } from './correctFocus';\nexport var pickFirstFocus = function (nodes) {\n if (nodes[0] && nodes.length > 1) {\n return correctNode(nodes[0], nodes);\n }\n return nodes[0];\n};\nexport var pickFocusable = function (nodes, node) {\n return nodes.indexOf(correctNode(node, nodes));\n};\n"],"names":["pickFirstFocus","nodes","length","correctNode","pickFocusable","node","indexOf"],"mappings":"gDACU,IAACA,EAAiB,SAAUC,GAClC,OAAIA,EAAM,IAAMA,EAAMC,OAAS,EACpBC,EAAYF,EAAM,GAAIA,GAE1BA,EAAM,EACjB,EACWG,EAAgB,SAAUH,EAAOI,GACxC,OAAOJ,EAAMK,QAAQH,EAAYE,EAAMJ,GAC3C","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import{safeProbe as t}from"./safe.js";var n=function(o){if(void 0===o&&(o=document),o&&o.activeElement){var e=o.activeElement;return e.shadowRoot?n(e.shadowRoot):e instanceof HTMLIFrameElement&&t(function(){return e.contentWindow.document})?n(e.contentWindow.document):e}};export{n as getActiveElement};
2
- //# sourceMappingURL=getActiveElement.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getActiveElement.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/utils/getActiveElement.js"],"sourcesContent":["/**\n * returns active element from document or from nested shadowdoms\n */\nimport { safeProbe } from './safe';\n/**\n * returns current active element. If the active element is a \"container\" itself(shadowRoot or iframe) returns active element inside it\n * @param [inDocument]\n */\nexport var getActiveElement = function (inDocument) {\n if (inDocument === void 0) { inDocument = document; }\n if (!inDocument || !inDocument.activeElement) {\n return undefined;\n }\n var activeElement = inDocument.activeElement;\n return (activeElement.shadowRoot\n ? getActiveElement(activeElement.shadowRoot)\n : activeElement instanceof HTMLIFrameElement && safeProbe(function () { return activeElement.contentWindow.document; })\n ? getActiveElement(activeElement.contentWindow.document)\n : activeElement);\n};\n"],"names":["getActiveElement","inDocument","document","activeElement","shadowRoot","HTMLIFrameElement","safeProbe","contentWindow"],"mappings":"sCAQU,IAACA,EAAmB,SAAUC,GAEpC,QADmB,IAAfA,IAAyBA,EAAaC,UACrCD,GAAeA,EAAWE,cAA/B,CAGA,IAAIA,EAAgBF,EAAWE,cAC/B,OAAQA,EAAcC,WAChBJ,EAAiBG,EAAcC,YAC/BD,aAAyBE,mBAAqBC,EAAU,WAAc,OAAOH,EAAcI,cAAcL,QAAU,GAC/GF,EAAiBG,EAAcI,cAAcL,UAC7CC,CANV,CAOJ","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
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)&&!function(n){return n.hasAttribute("inert")}(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
- //# sourceMappingURL=is.js.map
@@ -1 +0,0 @@
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 isInert = function (node) { return node.hasAttribute('inert'); };\n/**\n * @see https://github.com/testing-library/jest-dom/blob/main/src/to-be-visible.js\n */\nvar isVisibleUncached = function (node, checkParent) {\n return !node || isTopNode(node) || (!isElementHidden(node) && !isInert(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","hasAttribute","isInert","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","isNotAG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EAC1EC,EAAqB,SAAUnC,GAAQ,MAAwB,UAAjBA,EAAKkC,OAAqB,EACxEE,EAAiB,SAAUpC,GAClC,OAAOmC,EAAmBnC,IAAuB,UAAdA,EAAKqC,IAC5C,EACWC,EAAiB,SAAUtC,GAClC,SAAUmC,EAAmBnC,IAASiC,EAAoBjC,MAAyB,WAAdA,EAAKqC,MAAqBrC,EAAKuC,UACxG,EACWV,EAAqB,SAAU7B,GACtC,IAAIwC,EAAYxC,EAAKyC,aAAaC,GAClC,OAAQ,EAAC,EAAM,OAAQ,IAAIC,SAASH,EACxC,EACWI,EAAU,SAAU5C,GAAQ,IAAI6C,EAAI,OAAOC,QAAQ9C,IAAqC,QAA3B6C,EAAKd,EAAW/B,UAA0B,IAAP6C,OAAgB,EAASA,EAAGE,YAAc,EAC1IC,EAAc,SAAUhD,GAAQ,OAAQ4C,EAAQ5C,EAAO,EACvDiD,EAAY,SAAUC,GAAK,OAAOJ,QAAQI,EAAI","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
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
- //# sourceMappingURL=parenting.js.map
@@ -1 +0,0 @@
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,CACX,EAOWI,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,CAEf,CACA,OAAO,CACX,EACWE,EAAqB,SAAUC,EAAmBC,EAAWC,GACpE,IAAIC,EAAiBC,EAAQJ,GACzBK,EAAcD,EAAQH,GACtBK,EAAgBH,EAAe,GAC/BI,GAAY,EAgBhB,OAfAF,EAAYG,OAAOC,SAASC,QAAQ,SAAUC,GAC1CJ,EAAYjB,EAAgBiB,GAAaI,EAAOA,IAAUJ,EAC1DL,EAAaM,OAAOC,SAASC,QAAQ,SAAUE,GAC3C,IAAIC,EAASvB,EAAgBgB,EAAeM,GACxCC,IAEIN,GADCA,GAAaO,EAASD,EAAQN,GACnBM,EAGAvB,EAAgBuB,EAAQN,GAGhD,EACJ,GAEOA,CACX,EAMWQ,EAA0B,SAAUC,EAASC,GACpD,OAAOD,EAAQE,OAAO,SAAUC,EAAKlC,GAAQ,OAAOkC,EAAIC,OAAOC,EAAqBpC,EAAMgC,GAAmB,EAAG,GACpH","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- var r=function(r){try{return r()}catch(r){return}};export{r as safeProbe};
2
- //# sourceMappingURL=safe.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"safe.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/utils/safe.js"],"sourcesContent":["export var safeProbe = function (cb) {\n try {\n return cb();\n }\n catch (e) {\n return undefined;\n }\n};\n"],"names":["safeProbe","cb","e"],"mappings":"AAAU,IAACA,EAAY,SAAUC,GAC7B,IACI,OAAOA,GACX,CACA,MAAOC,GACH,MACJ,CACJ","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import{toArray as t}from"./array.js";var n=function(t,n){var r=Math.max(0,t.tabIndex),e=Math.max(0,n.tabIndex),a=r-e,i=t.index-n.index;if(a){if(!r)return 1;if(!e)return-1}return a||i},r=function(r,e,a){return t(r).map(function(t,n){var r=function(t){return t.tabIndex<0&&!t.hasAttribute("tabindex")?0:t.tabIndex}(t);return{node:t,index:n,tabIndex:a&&-1===r?(t.dataset||{}).focusGuard?0:-1:r}}).filter(function(t){return!e||t.tabIndex>=0}).sort(n)};export{r as orderByTabIndex,n as tabSort};
2
- //# sourceMappingURL=tabOrder.js.map
@@ -1 +0,0 @@
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 aTab = Math.max(0, a.tabIndex);\n var bTab = Math.max(0, b.tabIndex);\n var tabDiff = aTab - bTab;\n var indexDiff = a.index - b.index;\n if (tabDiff) {\n if (!aTab) {\n return 1;\n }\n if (!bTab) {\n return -1;\n }\n }\n return tabDiff || indexDiff;\n};\nvar getTabIndex = function (node) {\n if (node.tabIndex < 0) {\n // all \"focusable\" elements are already preselected\n // but some might have implicit negative tabIndex\n // return 0 for <audio without tabIndex attribute - it is \"tabbable\"\n if (!node.hasAttribute('tabindex')) {\n return 0;\n }\n }\n return node.tabIndex;\n};\nexport var orderByTabIndex = function (nodes, filterNegative, keepGuards) {\n return toArray(nodes)\n .map(function (node, index) {\n var tabIndex = getTabIndex(node);\n return {\n node: node,\n index: index,\n tabIndex: keepGuards && tabIndex === -1 ? ((node.dataset || {}).focusGuard ? 0 : -1) : tabIndex,\n };\n })\n .filter(function (data) { return !filterNegative || data.tabIndex >= 0; })\n .sort(tabSort);\n};\n"],"names":["tabSort","a","b","aTab","Math","max","tabIndex","bTab","tabDiff","indexDiff","index","orderByTabIndex","nodes","filterNegative","keepGuards","toArray","map","node","hasAttribute","getTabIndex","dataset","focusGuard","filter","data","sort"],"mappings":"qCACU,IAACA,EAAU,SAAUC,EAAGC,GAC9B,IAAIC,EAAOC,KAAKC,IAAI,EAAGJ,EAAEK,UACrBC,EAAOH,KAAKC,IAAI,EAAGH,EAAEI,UACrBE,EAAUL,EAAOI,EACjBE,EAAYR,EAAES,MAAQR,EAAEQ,MAC5B,GAAIF,EAAS,CACT,IAAKL,EACD,OAAO,EAEX,IAAKI,EACD,OAAO,CAEf,CACA,OAAOC,GAAWC,CACtB,EAYWE,EAAkB,SAAUC,EAAOC,EAAgBC,GAC1D,OAAOC,EAAQH,GACVI,IAAI,SAAUC,EAAMP,GACrB,IAAIJ,EAdM,SAAUW,GACxB,OAAIA,EAAKX,SAAW,IAIXW,EAAKC,aAAa,YACZ,EAGRD,EAAKX,QAChB,CAIuBa,CAAYF,GAC3B,MAAO,CACHA,KAAMA,EACNP,MAAOA,EACPJ,SAAUQ,IAA2B,IAAbR,GAAoBW,EAAKG,SAAW,IAAIC,WAAa,GAAI,EAAMf,EAE/F,GACKgB,OAAO,SAAUC,GAAQ,OAAQV,GAAkBU,EAAKjB,UAAY,CAAG,GACvEkB,KAAKxB,EACd","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import{FOCUS_AUTO as n}from"../constants.js";import{toArray as t}from"./array.js";import{tabbables as r}from"./tabbables.js";var o=r.join(","),e="".concat(o,", [data-focus-guard]"),c=function(n,r){return t((n.shadowRoot||n).children).reduce(function(n,t){return n.concat(t.matches(r?e:o)?[t]:[],c(t))},[])},u=function(n,r){return n.reduce(function(n,e){var a,i=c(e,r),f=(a=[]).concat.apply(a,i.map(function(n){return function(n,t){var r;return n instanceof HTMLIFrameElement&&(null===(r=n.contentDocument)||void 0===r?void 0:r.body)?u([n.contentDocument.body],t):[n]}(n,r)}));return n.concat(f,e.parentNode?t(e.parentNode.querySelectorAll(o)).filter(function(n){return n===e}):[])},[])},a=function(r){var o=r.querySelectorAll("[".concat(n,"]"));return t(o).map(function(n){return u([n])}).reduce(function(n,t){return n.concat(t)},[])};export{u as getFocusables,a as getParentAutofocusables};
2
- //# sourceMappingURL=tabUtils.js.map
@@ -1 +0,0 @@
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 return toArray((parent.shadowRoot || parent).children).reduce(function (acc, child) {\n return acc.concat(child.matches(withGuards ? queryGuardTabbables : queryTabbables) ? [child] : [], getFocusablesWithShadowDom(child));\n }, []);\n};\nvar getFocusablesWithIFrame = function (parent, withGuards) {\n var _a;\n // contentDocument of iframe will be null if current origin cannot access it\n if (parent instanceof HTMLIFrameElement && ((_a = parent.contentDocument) === null || _a === void 0 ? void 0 : _a.body)) {\n return getFocusables([parent.contentDocument.body], withGuards);\n }\n return [parent];\n};\nexport var getFocusables = function (parents, withGuards) {\n return parents.reduce(function (acc, parent) {\n var _a;\n var focusableWithShadowDom = getFocusablesWithShadowDom(parent, withGuards);\n var focusableWithIframes = (_a = []).concat.apply(_a, focusableWithShadowDom.map(function (node) { return getFocusablesWithIFrame(node, withGuards); }));\n return acc.concat(\n // add all tabbables inside and within shadow DOMs in DOM order\n focusableWithIframes, \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","toArray","shadowRoot","children","reduce","acc","child","matches","getFocusables","parents","_a","focusableWithShadowDom","focusableWithIframes","apply","map","node","HTMLIFrameElement","contentDocument","body","getFocusablesWithIFrame","parentNode","querySelectorAll","filter","getParentAutofocusables","parentFocus","FOCUS_AUTO","nodes"],"mappings":"6HAGA,IAAIA,EAAiBC,EAAUC,KAAK,KAChCC,EAAsB,GAAGC,OAAOJ,EAAgB,wBAChDK,EAA6B,SAAUC,EAAQC,GAC/C,OAAOC,GAASF,EAAOG,YAAcH,GAAQI,UAAUC,OAAO,SAAUC,EAAKC,GACzE,OAAOD,EAAIR,OAAOS,EAAMC,QAAQP,EAAaJ,EAAsBH,GAAkB,CAACa,GAAS,GAAIR,EAA2BQ,GAClI,EAAG,GACP,EASWE,EAAgB,SAAUC,EAAST,GAC1C,OAAOS,EAAQL,OAAO,SAAUC,EAAKN,GACjC,IAAIW,EACAC,EAAyBb,EAA2BC,EAAQC,GAC5DY,GAAwBF,EAAK,IAAIb,OAAOgB,MAAMH,EAAIC,EAAuBG,IAAI,SAAUC,GAAQ,OAZ7E,SAAUhB,EAAQC,GAC5C,IAAIU,EAEJ,OAAIX,aAAkBiB,oBAAwD,QAAjCN,EAAKX,EAAOkB,uBAAoC,IAAPP,OAAgB,EAASA,EAAGQ,MACvGV,EAAc,CAACT,EAAOkB,gBAAgBC,MAAOlB,GAEjD,CAACD,EACZ,CAKkHoB,CAAwBJ,EAAMf,EAAa,IACrJ,OAAOK,EAAIR,OAEXe,EAEAb,EAAOqB,WACDnB,EAAQF,EAAOqB,WAAWC,iBAAiB5B,IAAiB6B,OAAO,SAAUP,GAAQ,OAAOA,IAAShB,CAAQ,GAC7G,GACV,EAAG,GACP,EAKWwB,EAA0B,SAAUxB,GAC3C,IAAIyB,EAAczB,EAAOsB,iBAAiB,IAAIxB,OAAO4B,EAAY,MACjE,OAAOxB,EAAQuB,GACVV,IAAI,SAAUC,GAAQ,OAAOP,EAAc,CAACO,GAAQ,GACpDX,OAAO,SAAUC,EAAKqB,GAAS,OAAOrB,EAAIR,OAAO6B,EAAQ,EAAG,GACrE","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- var e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"];export{e as tabbables};
2
- //# sourceMappingURL=tabbables.js.map
@@ -1 +0,0 @@
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","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import e from"../../@babel/runtime/helpers/esm/inheritsLoose.js";import n from"../../@babel/runtime/helpers/esm/defineProperty.js";import t,{PureComponent as o}from"react";function r(r,i){if("production"!==process.env.NODE_ENV){if("function"!=typeof r)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof i)throw new Error("Expected handleStateChangeOnClient to be a function.")}return function(p){if("production"!==process.env.NODE_ENV&&"function"!=typeof p)throw new Error("Expected WrappedComponent to be a React component.");var c,u=[];function f(){c=r(u.map(function(e){return e.props})),i(c)}var a=function(n){function o(){return n.apply(this,arguments)||this}e(o,n),o.peek=function(){return c};var r=o.prototype;return r.componentDidMount=function(){u.push(this),f()},r.componentDidUpdate=function(){f()},r.componentWillUnmount=function(){var e=u.indexOf(this);u.splice(e,1),f()},r.render=function(){return t.createElement(p,this.props)},o}(o);return n(a,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(p)+")"),a}}export{r as default};
2
- //# sourceMappingURL=index.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.es.js","sources":["../../../../node_modules/react-clientside-effect/lib/index.es.js"],"sourcesContent":["import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _defineProperty from '@babel/runtime/helpers/esm/defineProperty';\nimport React, { PureComponent } from 'react';\n\nfunction withSideEffect(reducePropsToState, handleStateChangeOnClient) {\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof reducePropsToState !== 'function') {\n throw new Error('Expected reducePropsToState to be a function.');\n }\n\n if (typeof handleStateChangeOnClient !== 'function') {\n throw new Error('Expected handleStateChangeOnClient to be a function.');\n }\n }\n\n function getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n }\n\n return function wrap(WrappedComponent) {\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof WrappedComponent !== 'function') {\n throw new Error('Expected WrappedComponent to be a React component.');\n }\n }\n\n var mountedInstances = [];\n var state;\n\n function emitChange() {\n state = reducePropsToState(mountedInstances.map(function (instance) {\n return instance.props;\n }));\n handleStateChangeOnClient(state);\n }\n\n var SideEffect = /*#__PURE__*/function (_PureComponent) {\n _inheritsLoose(SideEffect, _PureComponent);\n\n function SideEffect() {\n return _PureComponent.apply(this, arguments) || this;\n }\n\n // Try to use displayName of wrapped component\n SideEffect.peek = function peek() {\n return state;\n };\n\n var _proto = SideEffect.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n mountedInstances.push(this);\n emitChange();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n emitChange();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n var index = mountedInstances.indexOf(this);\n mountedInstances.splice(index, 1);\n emitChange();\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(WrappedComponent, this.props);\n };\n\n return SideEffect;\n }(PureComponent);\n\n _defineProperty(SideEffect, \"displayName\", \"SideEffect(\" + getDisplayName(WrappedComponent) + \")\");\n\n return SideEffect;\n };\n}\n\nexport default withSideEffect;\n"],"names":["withSideEffect","reducePropsToState","handleStateChangeOnClient","process","env","NODE_ENV","Error","WrappedComponent","state","mountedInstances","emitChange","map","instance","props","SideEffect","_PureComponent","apply","this","arguments","_inheritsLoose","peek","_proto","prototype","componentDidMount","push","componentDidUpdate","componentWillUnmount","index","indexOf","splice","render","React","createElement","PureComponent","_defineProperty","displayName","name","getDisplayName"],"mappings":"4KAIA,SAASA,EAAeC,EAAoBC,GAC1C,GAA6B,eAAzBC,QAAQC,IAAIC,SAA2B,CACzC,GAAkC,mBAAvBJ,EACT,MAAM,IAAIK,MAAM,iDAGlB,GAAyC,mBAA9BJ,EACT,MAAM,IAAII,MAAM,uDAEpB,CAMA,OAAO,SAAcC,GACnB,GAA6B,eAAzBJ,QAAQC,IAAIC,UACkB,mBAArBE,EACT,MAAM,IAAID,MAAM,sDAIpB,IACIE,EADAC,EAAmB,GAGvB,SAASC,IACPF,EAAQP,EAAmBQ,EAAiBE,IAAI,SAAUC,GACxD,OAAOA,EAASC,KAClB,IACAX,EAA0BM,EAC5B,CAEA,IAAIM,EAA0B,SAAUC,GAGtC,SAASD,IACP,OAAOC,EAAeC,MAAMC,KAAMC,YAAcD,IAClD,CAJAE,EAAeL,EAAYC,GAO3BD,EAAWM,KAAO,WAChB,OAAOZ,CACT,EAEA,IAAIa,EAASP,EAAWQ,UAqBxB,OAnBAD,EAAOE,kBAAoB,WACzBd,EAAiBe,KAAKP,MACtBP,GACF,EAEAW,EAAOI,mBAAqB,WAC1Bf,GACF,EAEAW,EAAOK,qBAAuB,WAC5B,IAAIC,EAAQlB,EAAiBmB,QAAQX,MACrCR,EAAiBoB,OAAOF,EAAO,GAC/BjB,GACF,EAEAW,EAAOS,OAAS,WACd,OAAoBC,EAAMC,cAAczB,EAAkBU,KAAKJ,MACjE,EAEOC,CACT,CAlC8B,CAkC5BmB,GAIF,OAFAC,EAAgBpB,EAAY,cAAe,cAzD7C,SAAwBP,GACtB,OAAOA,EAAiB4B,aAAe5B,EAAiB6B,MAAQ,WAClE,CAuD6DC,CAAe9B,GAAoB,KAEvFO,CACT,CACF","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import e from"../../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js";import r from"../../../@babel/runtime/helpers/esm/extends.js";import o,{forwardRef as t}from"react";import s from"./Lock.js";import p from"./Trap.js";var m=t(function(e,t){return o.createElement(s,r({sideCar:p,ref:t},e))}),i=s.propTypes||{};i.sideCar;var a=e(i,["sideCar"]);m.propTypes="production"!==process.env.NODE_ENV?a:{};export{m as default};
2
- //# sourceMappingURL=Combination.js.map
@@ -1 +0,0 @@
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 React, { forwardRef } from 'react';\nimport FocusLockUI from './Lock';\nimport FocusTrap from './Trap';\nvar FocusLockCombination = /*#__PURE__*/forwardRef(function FocusLockUICombination(props, ref) {\n return /*#__PURE__*/React.createElement(FocusLockUI, _extends({\n sideCar: FocusTrap,\n ref: ref\n }, props));\n});\nvar _ref = FocusLockUI.propTypes || {},\n sideCar = _ref.sideCar,\n propTypes = _objectWithoutPropertiesLoose(_ref, [\"sideCar\"]);\nFocusLockCombination.propTypes = process.env.NODE_ENV !== \"production\" ? propTypes : {};\nexport default FocusLockCombination;"],"names":["FocusLockCombination","forwardRef","props","ref","React","createElement","FocusLockUI","_extends","sideCar","FocusTrap","_ref","propTypes","_objectWithoutPropertiesLoose","process","env","NODE_ENV"],"mappings":"yOAKG,IAACA,EAAoCC,EAAW,SAAgCC,EAAOC,GACxF,OAAoBC,EAAMC,cAAcC,EAAaC,EAAS,CAC5DC,QAASC,EACTN,IAAKA,GACJD,GACL,GACIQ,EAAOJ,EAAYK,WAAa,CAAA,EACxBD,EAAKF,QACjB,IAAEG,EAAYC,EAA8BF,EAAM,CAAC,YACnDV,EAAqBW,UAAqC,eAAzBE,QAAQC,IAAIC,SAA4BJ,EAAY,CAAA","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import"react";import p from"prop-types";var o={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};"production"===process.env.NODE_ENV||p.node;export{o as hiddenGuard};
2
- //# sourceMappingURL=FocusGuard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FocusGuard.js","sources":["../../../../../node_modules/react-focus-lock/dist/es2015/FocusGuard.js"],"sourcesContent":["import React, { Fragment } from 'react';\nimport PropTypes from 'prop-types';\nexport var hiddenGuard = {\n width: '1px',\n height: '0px',\n padding: 0,\n overflow: 'hidden',\n position: 'fixed',\n top: '1px',\n left: '1px'\n};\nvar InFocusGuard = function InFocusGuard(_ref) {\n var _ref$children = _ref.children,\n children = _ref$children === void 0 ? null : _ref$children;\n return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n key: \"guard-first\",\n \"data-focus-guard\": true,\n \"data-focus-auto-guard\": true,\n style: hiddenGuard\n }), children, children && /*#__PURE__*/React.createElement(\"div\", {\n key: \"guard-last\",\n \"data-focus-guard\": true,\n \"data-focus-auto-guard\": true,\n style: hiddenGuard\n }));\n};\nInFocusGuard.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: PropTypes.node\n} : {};\nexport default InFocusGuard;"],"names":["hiddenGuard","width","height","padding","overflow","position","top","left","process","env","NODE_ENV","PropTypes","node"],"mappings":"wCAEU,IAACA,EAAc,CACvBC,MAAO,MACPC,OAAQ,MACRC,QAAS,EACTC,SAAU,SACVC,SAAU,QACVC,IAAK,MACLC,KAAM,OAiB0C,eAAzBC,QAAQC,IAAIC,UACzBC,EAAUC","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import e from"../../../@babel/runtime/helpers/esm/extends.js";import o,{forwardRef as r,useState as t,useRef as s,useCallback as n,useEffect as c,useMemo as i,Fragment as u}from"react";import{any as a,func as d,object as l,oneOfType as f,arrayOf as v,string as m,bool as p,node as F}from"prop-types";import{FOCUS_DISABLED as b,FOCUS_GROUP as y}from"../../../focus-lock/dist/es2015/constants.js";import{hiddenGuard as h}from"./FocusGuard.js";import{mediumFocus as E,mediumSidecar as g,mediumBlur as k}from"./medium.js";import{focusScope as x}from"./scope.js";import{useMergeRefs as j}from"../../../use-callback-ref/dist/es2015/useMergeRef.js";var w=[],N=r(function(r,a){var d,l=t(),f=l[0],v=l[1],m=s(),p=s(!1),F=s(null),N=t({})[1],P=r.children,D=r.disabled,I=void 0!==D&&D,L=r.noFocusGuards,O=void 0!==L&&L,G=r.persistentFocus,R=void 0!==G&&G,T=r.crossFrame,A=void 0===T||T,C=r.autoFocus,M=void 0===C||C,S=r.allowTextSelection,V=r.group,_=r.className,q=r.whiteList,B=r.hasPositiveIndices,z=r.shards,H=void 0===z?w:z,J=r.as,K=void 0===J?"div":J,Q=r.lockProps,U=void 0===Q?{}:Q,W=r.sideCar,X=r.returnFocus,Y=void 0!==X&&X,Z=r.focusOptions,$=r.onActivation,ee=r.onDeactivation,oe=t({})[0],re=n(function(e){var o=e.captureFocusRestore;if(!F.current){var r,t=null==(r=document)?void 0:r.activeElement;F.current=t,t!==document.body&&(F.current=o(t))}m.current&&$&&$(m.current),p.current=!0,N()},[$]),te=n(function(){p.current=!1,ee&&ee(m.current),N()},[ee]),se=n(function(e){var o=F.current;if(o){var r=("function"==typeof o?o():o)||document.body,t="function"==typeof Y?Y(r):Y;if(t){var s="object"==typeof t?t:void 0;F.current=null,e?Promise.resolve().then(function(){return r.focus(s)}):r.focus(s)}}},[Y]),ne=n(function(e){p.current&&E.useMedium(e)},[]),ce=k.useMedium,ie=n(function(e){m.current!==e&&(m.current=e,v(e))},[]);"production"!==process.env.NODE_ENV&&(void 0!==S&&console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"),c(function(){m.current||"string"==typeof K||console.error("FocusLock: could not obtain ref to internal node")},[]));var ue=e(((d={})[b]=I&&"disabled",d[y]=V,d),U),ae=!0!==O,de=ae&&"tail"!==O,le=j([a,ie]),fe=i(function(){return{observed:m,shards:H,enabled:!I,active:p.current}},[I,p.current,H,f]);return o.createElement(u,null,ae&&[o.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:I?-1:0,style:h}),B?o.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:I?-1:1,style:h}):null],!I&&o.createElement(W,{id:oe,sideCar:g,observed:f,disabled:I,persistentFocus:R,crossFrame:A,autoFocus:M,whiteList:q,shards:H,onActivation:re,onDeactivation:te,returnFocus:se,focusOptions:Z,noFocusGuards:O}),o.createElement(K,e({ref:le},ue,{className:_,onBlur:ce,onFocus:ne}),o.createElement(x.Provider,{value:fe},P)),de&&o.createElement("div",{"data-focus-guard":!0,tabIndex:I?-1:0,style:h}))});N.propTypes="production"!==process.env.NODE_ENV?{children:F,disabled:p,returnFocus:f([p,l,d]),focusOptions:l,noFocusGuards:p,hasPositiveIndices:p,allowTextSelection:p,autoFocus:p,persistentFocus:p,crossFrame:p,group:m,className:m,whiteList:d,shards:v(a),as:f([m,d,l]),lockProps:l,onActivation:d,onDeactivation:d,sideCar:a.isRequired}:{};export{N as default};
2
- //# sourceMappingURL=Lock.js.map
@@ -1 +0,0 @@
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 React, { forwardRef, useRef, useState, useCallback, useEffect, useMemo, Fragment } from 'react';\nimport { node, bool, string, any, arrayOf, oneOfType, object, func } from 'prop-types';\nimport { FOCUS_DISABLED, FOCUS_GROUP } from 'focus-lock/constants';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { hiddenGuard } from './FocusGuard';\nimport { mediumFocus, mediumBlur, mediumSidecar } from './medium';\nimport { focusScope } from './scope';\nvar emptyArray = [];\nvar FocusLock = /*#__PURE__*/forwardRef(function FocusLockUI(props, parentRef) {\n var _extends2;\n var _useState = useState(),\n realObserved = _useState[0],\n setObserved = _useState[1];\n var observed = useRef();\n var isActive = useRef(false);\n var originalFocusedElement = useRef(null);\n var _useState2 = useState({}),\n update = _useState2[1];\n var children = props.children,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$noFocusGuards = props.noFocusGuards,\n noFocusGuards = _props$noFocusGuards === void 0 ? false : _props$noFocusGuards,\n _props$persistentFocu = props.persistentFocus,\n persistentFocus = _props$persistentFocu === void 0 ? false : _props$persistentFocu,\n _props$crossFrame = props.crossFrame,\n crossFrame = _props$crossFrame === void 0 ? true : _props$crossFrame,\n _props$autoFocus = props.autoFocus,\n autoFocus = _props$autoFocus === void 0 ? true : _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 _props$returnFocus = props.returnFocus,\n shouldReturnFocus = _props$returnFocus === void 0 ? false : _props$returnFocus,\n focusOptions = props.focusOptions,\n onActivationCallback = props.onActivation,\n onDeactivationCallback = props.onDeactivation;\n var _useState3 = useState({}),\n id = _useState3[0];\n var onActivation = useCallback(function (_ref) {\n var captureFocusRestore = _ref.captureFocusRestore;\n if (!originalFocusedElement.current) {\n var _document;\n var activeElement = (_document = document) == null ? void 0 : _document.activeElement;\n originalFocusedElement.current = activeElement;\n if (activeElement !== document.body) {\n originalFocusedElement.current = captureFocusRestore(activeElement);\n }\n }\n if (observed.current && onActivationCallback) {\n onActivationCallback(observed.current);\n }\n isActive.current = true;\n update();\n }, [onActivationCallback]);\n var onDeactivation = useCallback(function () {\n isActive.current = false;\n if (onDeactivationCallback) {\n onDeactivationCallback(observed.current);\n }\n update();\n }, [onDeactivationCallback]);\n var returnFocus = useCallback(function (allowDefer) {\n var focusRestore = originalFocusedElement.current;\n if (focusRestore) {\n var returnFocusTo = (typeof focusRestore === 'function' ? focusRestore() : focusRestore) || document.body;\n var howToReturnFocus = typeof shouldReturnFocus === 'function' ? shouldReturnFocus(returnFocusTo) : shouldReturnFocus;\n if (howToReturnFocus) {\n var returnFocusOptions = typeof howToReturnFocus === 'object' ? howToReturnFocus : undefined;\n originalFocusedElement.current = null;\n if (allowDefer) {\n Promise.resolve().then(function () {\n return returnFocusTo.focus(returnFocusOptions);\n });\n } else {\n returnFocusTo.focus(returnFocusOptions);\n }\n }\n }\n }, [shouldReturnFocus]);\n var onFocus = useCallback(function (event) {\n if (isActive.current) {\n mediumFocus.useMedium(event);\n }\n }, []);\n var onBlur = mediumBlur.useMedium;\n var setObserveNode = useCallback(function (newObserved) {\n if (observed.current !== newObserved) {\n observed.current = newObserved;\n setObserved(newObserved);\n }\n }, []);\n if (process.env.NODE_ENV !== 'production') {\n if (typeof allowTextSelection !== 'undefined') {\n console.warn('React-Focus-Lock: allowTextSelection is deprecated and enabled by default');\n }\n useEffect(function () {\n if (!observed.current && typeof Container !== 'string') {\n console.error('FocusLock: could not obtain ref to internal node');\n }\n }, []);\n }\n var lockProps = _extends((_extends2 = {}, _extends2[FOCUS_DISABLED] = disabled && 'disabled', _extends2[FOCUS_GROUP] = group, _extends2), containerProps);\n var hasLeadingGuards = noFocusGuards !== true;\n var hasTailingGuards = hasLeadingGuards && noFocusGuards !== 'tail';\n var mergedRef = useMergeRefs([parentRef, setObserveNode]);\n var focusScopeValue = useMemo(function () {\n return {\n observed: observed,\n shards: shards,\n enabled: !disabled,\n active: isActive.current\n };\n }, [disabled, isActive.current, shards, realObserved]);\n return /*#__PURE__*/React.createElement(Fragment, null, hasLeadingGuards && [\n /*#__PURE__*/\n React.createElement(\"div\", {\n key: \"guard-first\",\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 0,\n style: hiddenGuard\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 noFocusGuards: noFocusGuards\n }), /*#__PURE__*/React.createElement(Container, _extends({\n ref: mergedRef\n }, lockProps, {\n className: className,\n onBlur: onBlur,\n onFocus: onFocus\n }), /*#__PURE__*/React.createElement(focusScope.Provider, {\n value: focusScopeValue\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} : {};\nexport default FocusLock;"],"names":["emptyArray","FocusLock","forwardRef","props","parentRef","_extends2","_useState","useState","realObserved","setObserved","observed","useRef","isActive","originalFocusedElement","update","children","_props$disabled","disabled","_props$noFocusGuards","noFocusGuards","_props$persistentFocu","persistentFocus","_props$crossFrame","crossFrame","_props$autoFocus","autoFocus","allowTextSelection","group","className","whiteList","hasPositiveIndices","_props$shards","shards","_props$as","as","Container","_props$lockProps","lockProps","containerProps","SideCar","sideCar","_props$returnFocus","returnFocus","shouldReturnFocus","focusOptions","onActivationCallback","onActivation","onDeactivationCallback","onDeactivation","id","useCallback","_ref","captureFocusRestore","current","_document","activeElement","document","body","allowDefer","focusRestore","returnFocusTo","howToReturnFocus","returnFocusOptions","undefined","Promise","resolve","then","focus","onFocus","event","mediumFocus","useMedium","onBlur","mediumBlur","setObserveNode","newObserved","process","env","NODE_ENV","console","warn","useEffect","error","_extends","FOCUS_DISABLED","FOCUS_GROUP","hasLeadingGuards","hasTailingGuards","mergedRef","useMergeRefs","focusScopeValue","useMemo","enabled","active","React","createElement","Fragment","key","tabIndex","style","hiddenGuard","mediumSidecar","ref","focusScope","Provider","value","propTypes","node","bool","oneOfType","object","func","string","arrayOf","any","isRequired"],"mappings":"koBAQA,IAAIA,EAAa,GACbC,EAAyBC,EAAW,SAAqBC,EAAOC,GAClE,IAAIC,EACAC,EAAYC,IACdC,EAAeF,EAAU,GACzBG,EAAcH,EAAU,GACtBI,EAAWC,IACXC,EAAWD,GAAO,GAClBE,EAAyBF,EAAO,MAElCG,EADeP,EAAS,IACJ,GAClBQ,EAAWZ,EAAMY,SACnBC,EAAkBb,EAAMc,SACxBA,OAA+B,IAApBD,GAAqCA,EAChDE,EAAuBf,EAAMgB,cAC7BA,OAAyC,IAAzBD,GAA0CA,EAC1DE,EAAwBjB,EAAMkB,gBAC9BA,OAA4C,IAA1BD,GAA2CA,EAC7DE,EAAoBnB,EAAMoB,WAC1BA,OAAmC,IAAtBD,GAAsCA,EACnDE,EAAmBrB,EAAMsB,UACzBA,OAAiC,IAArBD,GAAqCA,EACjDE,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AWA,EACXI,UAAWA,EACXG,OAAQA,EACRc,aAAcA,GACdE,eAAgBA,GAChBN,YAAaA,GACbE,aAAcA,EACdzB,cAAeA,IACA2E,EAAMC,cAAc5D,EAAWgD,EAAS,CACvDmB,IAAKd,IACJnD,GAAW,CACZT,UAAWA,EACX4C,OAAQA,GACRJ,QAASA,KACM0B,EAAMC,cAAcQ,EAAWC,SAAU,CACxDC,MAAOf,IACN3E,IAAYwE,IAAiCO,EAAMC,cAAc,MAAO,CACzE,oBAAoB,EACpBG,SAAUjF,GAAW,EAAK,EAC1BkF,MAAOC,IAEX,GACAnG,EAAUyG,UAAqC,eAAzB9B,QAAQC,IAAIC,SAA4B,CAC5D/D,SAAU4F,EACV1F,SAAU2F,EACVlE,YAAamE,EAAU,CAACD,EAAME,EAAQC,IACtCnE,aAAckE,EACd3F,cAAeyF,EACf9E,mBAAoB8E,EACpBlF,mBAAoBkF,EACpBnF,UAAWmF,EACXvF,gBAAiBuF,EACjBrF,WAAYqF,EACZjF,MAAOqF,EACPpF,UAAWoF,EACXnF,UAAWkF,EACX/E,OAAQiF,EAAQC,GAChBhF,GAAI2E,EAAU,CAACG,EAAQD,EAAMD,IAC7BzE,UAAWyE,EACXhE,aAAciE,EACd/D,eAAgB+D,EAChBvE,QAAS0E,EAAIC,YACX,CAAA","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import"react";import e from"prop-types";import n from"../../../react-clientside-effect/lib/index.es.js";import{focusInside as t}from"../../../focus-lock/dist/es2015/focusInside.js";import{focusIsHidden as o}from"../../../focus-lock/dist/es2015/focusIsHidden.js";import{expandFocusableNodes as r}from"../../../focus-lock/dist/es2015/focusables.js";import{moveFocusInside as u}from"../../../focus-lock/dist/es2015/moveFocusInside.js";import{captureFocusRestore as i}from"../../../focus-lock/dist/es2015/return-focus.js";import{focusLastElement as c,focusFirstElement as s,focusPrevElement as d,focusNextElement as f}from"../../../focus-lock/dist/es2015/sibling.js";import{getFocusableNodes as a}from"../../../focus-lock/dist/es2015/utils/DOMutils.js";import{deferAction as m,extractRef as l}from"./util.js";import{mediumFocus as v,mediumBlur as p,mediumEffect as E}from"./medium.js";var b=function(){return document&&document.activeElement===document.body},g=null,w=null,j=function(){return null},h=null,L=!1,k=!1,F=function(){return!0};function I(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 y=function e(n,t,o){return t&&(t.host===n&&(!t.activeElement||o.contains(t.activeElement))||t.parentNode&&e(n,t.parentNode,o))},x=function(e){return a(e,new Map)},N=function(){var e,n,c=!1;if(g){var s=g,d=s.observed,f=s.persistentFocus,a=s.autoFocus,m=s.shards,v=s.crossFrame,p=s.focusOptions,E=s.noFocusGuards,N=d||h&&h.portaledElement;if(b()&&w&&w!==document.body&&(!document.body.contains(w)||!x([(n=w).parentNode]).some(function(e){return e.node===n}))){var M=j();M&&M.focus()}var O=document&&document.activeElement;if(N){var A=[N].concat(m.map(l).filter(Boolean));if(O&&!function(e){return(g.whiteList||F)(e)}(O)||(f||function(){if(!(v?Boolean(L):"meanwhile"===L)||!E||!w||k)return!1;var e=x(A),n=e.findIndex(function(e){return e.node===w});return 0===n||n===e.length-1}()||!b()&&!o()||!w&&a)&&(N&&!(t(A)||O&&function(e,n){return n.some(function(n){return y(e,n,n)})}(O,A)||(e=O,h&&h.portaledElement===e))&&(document&&!w&&O&&!a?(O.blur&&O.blur(),document.body.focus()):(c=u(A,w,{focusOptions:p}),h={})),(w=document&&document.activeElement)!==document.body&&(j=i(w)),L=!1),document&&O!==document.activeElement&&document.querySelector("[data-focus-auto-guard]")){var D=document&&document.activeElement,G=r(A),q=G.map(function(e){return e.node}).indexOf(D);q>-1&&(G.filter(function(e){var n=e.guard,t=e.node;return n&&t.dataset.focusAutoGuard}).forEach(function(e){return e.node.removeAttribute("tabIndex")}),I(q,G.length,1,G),I(q,-1,-1,G))}}}return c},M=function(e){N()&&e&&(e.stopPropagation(),e.preventDefault())},O=function(){return m(N)};"production"===process.env.NODE_ENV||e.node.isRequired;var A=function(){k=!0},D=function(){k=!1,L="just",m(function(){L="meanwhile"})};var G={moveFocusInside:u,focusInside:t,focusNextElement:f,focusPrevElement:d,focusFirstElement:s,focusLastElement:c,captureFocusRestore:i};v.assignSyncMedium(function(e){var n=e.target,t=e.currentTarget;t.contains(n)||(h={observerNode:t,portaledElement:n})}),p.assignMedium(O),E.assignMedium(function(e){return e(G)});var q=n(function(e){return e.filter(function(e){return!e.disabled})},function(e){var n=e.slice(-1)[0];n&&!g&&(document.addEventListener("focusin",M),document.addEventListener("focusout",O),window.addEventListener("focus",A),window.addEventListener("blur",D));var t=g,o=t&&n&&n.id===t.id;g=n,t&&!o&&(t.onDeactivation(),e.filter(function(e){return e.id===t.id}).length||t.returnFocus(!n)),n?(w=null,o&&t.observed===n.observed||n.onActivation(G),N(),m(N)):(document.removeEventListener("focusin",M),document.removeEventListener("focusout",O),window.removeEventListener("focus",A),window.removeEventListener("blur",D),w=null)})(function(){return null});export{q as default};
2
- //# sourceMappingURL=Trap.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Trap.js","sources":["../../../../../node_modules/react-focus-lock/dist/es2015/Trap.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport withSideEffect from 'react-clientside-effect';\nimport { moveFocusInside, focusInside, focusIsHidden, expandFocusableNodes, getFocusableNodes, focusNextElement, focusPrevElement, focusFirstElement, focusLastElement, captureFocusRestore } from 'focus-lock';\nimport { deferAction, extractRef } from './util';\nimport { mediumFocus, mediumBlur, mediumEffect } from './medium';\nvar focusOnBody = function focusOnBody() {\n return document && document.activeElement === document.body;\n};\nvar isFreeFocus = function isFreeFocus() {\n return focusOnBody() || focusIsHidden();\n};\nvar lastActiveTrap = null;\nvar lastActiveFocus = null;\nvar tryRestoreFocus = function tryRestoreFocus() {\n return null;\n};\nvar lastPortaledElement = null;\nvar focusWasOutsideWindow = false;\nvar windowFocused = false;\nvar defaultWhitelist = function defaultWhitelist() {\n return true;\n};\nvar focusWhitelisted = function focusWhitelisted(activeElement) {\n return (lastActiveTrap.whiteList || defaultWhitelist)(activeElement);\n};\nvar recordPortal = function recordPortal(observerNode, portaledElement) {\n lastPortaledElement = {\n observerNode: observerNode,\n portaledElement: portaledElement\n };\n};\nvar focusIsPortaledPair = function focusIsPortaledPair(element) {\n return lastPortaledElement && lastPortaledElement.portaledElement === element;\n};\nfunction autoGuard(startIndex, end, step, allNodes) {\n var lastGuard = null;\n var i = startIndex;\n do {\n var item = allNodes[i];\n if (item.guard) {\n if (item.node.dataset.focusAutoGuard) {\n lastGuard = item;\n }\n } else if (item.lockItem) {\n if (i !== startIndex) {\n return;\n }\n lastGuard = null;\n } else {\n break;\n }\n } while ((i += step) !== end);\n if (lastGuard) {\n lastGuard.node.tabIndex = 0;\n }\n}\nvar focusWasOutside = function focusWasOutside(crossFrameOption) {\n if (crossFrameOption) {\n return Boolean(focusWasOutsideWindow);\n }\n return focusWasOutsideWindow === 'meanwhile';\n};\nvar checkInHost = function checkInHost(check, el, boundary) {\n return el && (el.host === check && (!el.activeElement || boundary.contains(el.activeElement)) || el.parentNode && checkInHost(check, el.parentNode, boundary));\n};\nvar withinHost = function withinHost(activeElement, workingArea) {\n return workingArea.some(function (area) {\n return checkInHost(activeElement, area, area);\n });\n};\nvar getNodeFocusables = function getNodeFocusables(nodes) {\n return getFocusableNodes(nodes, new Map());\n};\nvar isNotFocusable = function isNotFocusable(node) {\n return !getNodeFocusables([node.parentNode]).some(function (el) {\n return el.node === node;\n });\n};\nvar activateTrap = function activateTrap() {\n var result = false;\n if (lastActiveTrap) {\n var _lastActiveTrap = lastActiveTrap,\n observed = _lastActiveTrap.observed,\n persistentFocus = _lastActiveTrap.persistentFocus,\n autoFocus = _lastActiveTrap.autoFocus,\n shards = _lastActiveTrap.shards,\n crossFrame = _lastActiveTrap.crossFrame,\n focusOptions = _lastActiveTrap.focusOptions,\n noFocusGuards = _lastActiveTrap.noFocusGuards;\n var workingNode = observed || lastPortaledElement && lastPortaledElement.portaledElement;\n if (focusOnBody() && lastActiveFocus && lastActiveFocus !== document.body) {\n if (!document.body.contains(lastActiveFocus) || isNotFocusable(lastActiveFocus)) {\n var newTarget = tryRestoreFocus();\n if (newTarget) {\n newTarget.focus();\n }\n }\n }\n var activeElement = document && document.activeElement;\n if (workingNode) {\n var workingArea = [workingNode].concat(shards.map(extractRef).filter(Boolean));\n var shouldForceRestoreFocus = function shouldForceRestoreFocus() {\n if (!focusWasOutside(crossFrame) || !noFocusGuards || !lastActiveFocus || windowFocused) {\n return false;\n }\n var nodes = getNodeFocusables(workingArea);\n var lastIndex = nodes.findIndex(function (_ref) {\n var node = _ref.node;\n return node === lastActiveFocus;\n });\n return lastIndex === 0 || lastIndex === nodes.length - 1;\n };\n if (!activeElement || focusWhitelisted(activeElement)) {\n if (persistentFocus || shouldForceRestoreFocus() || !isFreeFocus() || !lastActiveFocus && autoFocus) {\n if (workingNode && !(focusInside(workingArea) || activeElement && withinHost(activeElement, workingArea) || focusIsPortaledPair(activeElement, workingNode))) {\n if (document && !lastActiveFocus && activeElement && !autoFocus) {\n if (activeElement.blur) {\n activeElement.blur();\n }\n document.body.focus();\n } else {\n result = moveFocusInside(workingArea, lastActiveFocus, {\n focusOptions: focusOptions\n });\n lastPortaledElement = {};\n }\n }\n lastActiveFocus = document && document.activeElement;\n if (lastActiveFocus !== document.body) {\n tryRestoreFocus = captureFocusRestore(lastActiveFocus);\n }\n focusWasOutsideWindow = false;\n }\n }\n if (document && activeElement !== document.activeElement && document.querySelector('[data-focus-auto-guard]')) {\n var newActiveElement = document && document.activeElement;\n var allNodes = expandFocusableNodes(workingArea);\n var focusedIndex = allNodes.map(function (_ref2) {\n var node = _ref2.node;\n return node;\n }).indexOf(newActiveElement);\n if (focusedIndex > -1) {\n allNodes.filter(function (_ref3) {\n var guard = _ref3.guard,\n node = _ref3.node;\n return guard && node.dataset.focusAutoGuard;\n }).forEach(function (_ref4) {\n var node = _ref4.node;\n return node.removeAttribute('tabIndex');\n });\n autoGuard(focusedIndex, allNodes.length, +1, allNodes);\n autoGuard(focusedIndex, -1, -1, allNodes);\n }\n }\n }\n }\n return result;\n};\nvar onTrap = function onTrap(event) {\n if (activateTrap() && event) {\n event.stopPropagation();\n event.preventDefault();\n }\n};\nvar onBlur = function onBlur() {\n return deferAction(activateTrap);\n};\nvar onFocus = function onFocus(event) {\n var source = event.target;\n var currentNode = event.currentTarget;\n if (!currentNode.contains(source)) {\n recordPortal(currentNode, source);\n }\n};\nvar FocusWatcher = function FocusWatcher() {\n return null;\n};\nvar FocusTrap = function FocusTrap(_ref5) {\n var children = _ref5.children;\n return /*#__PURE__*/React.createElement(\"div\", {\n onBlur: onBlur,\n onFocus: onFocus\n }, children);\n};\nFocusTrap.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: PropTypes.node.isRequired\n} : {};\nvar onWindowFocus = function onWindowFocus() {\n windowFocused = true;\n};\nvar onWindowBlur = function onWindowBlur() {\n windowFocused = false;\n focusWasOutsideWindow = 'just';\n deferAction(function () {\n focusWasOutsideWindow = 'meanwhile';\n });\n};\nvar attachHandler = function attachHandler() {\n document.addEventListener('focusin', onTrap);\n document.addEventListener('focusout', onBlur);\n window.addEventListener('focus', onWindowFocus);\n window.addEventListener('blur', onWindowBlur);\n};\nvar detachHandler = function detachHandler() {\n document.removeEventListener('focusin', onTrap);\n document.removeEventListener('focusout', onBlur);\n window.removeEventListener('focus', onWindowFocus);\n window.removeEventListener('blur', onWindowBlur);\n};\nfunction reducePropsToState(propsList) {\n return propsList.filter(function (_ref6) {\n var disabled = _ref6.disabled;\n return !disabled;\n });\n}\nvar focusLockAPI = {\n moveFocusInside: moveFocusInside,\n focusInside: focusInside,\n focusNextElement: focusNextElement,\n focusPrevElement: focusPrevElement,\n focusFirstElement: focusFirstElement,\n focusLastElement: focusLastElement,\n captureFocusRestore: captureFocusRestore\n};\nfunction handleStateChangeOnClient(traps) {\n var trap = traps.slice(-1)[0];\n if (trap && !lastActiveTrap) {\n attachHandler();\n }\n var lastTrap = lastActiveTrap;\n var sameTrap = lastTrap && trap && trap.id === lastTrap.id;\n lastActiveTrap = trap;\n if (lastTrap && !sameTrap) {\n lastTrap.onDeactivation();\n if (!traps.filter(function (_ref7) {\n var id = _ref7.id;\n return id === lastTrap.id;\n }).length) {\n lastTrap.returnFocus(!trap);\n }\n }\n if (trap) {\n lastActiveFocus = null;\n if (!sameTrap || lastTrap.observed !== trap.observed) {\n trap.onActivation(focusLockAPI);\n }\n activateTrap(true);\n deferAction(activateTrap);\n } else {\n detachHandler();\n lastActiveFocus = null;\n }\n}\nmediumFocus.assignSyncMedium(onFocus);\nmediumBlur.assignMedium(onBlur);\nmediumEffect.assignMedium(function (cb) {\n return cb(focusLockAPI);\n});\nexport default withSideEffect(reducePropsToState, handleStateChangeOnClient)(FocusWatcher);"],"names":["focusOnBody","document","activeElement","body","lastActiveTrap","lastActiveFocus","tryRestoreFocus","lastPortaledElement","focusWasOutsideWindow","windowFocused","defaultWhitelist","autoGuard","startIndex","end","step","allNodes","lastGuard","i","item","guard","node","dataset","focusAutoGuard","lockItem","tabIndex","checkInHost","check","el","boundary","host","contains","parentNode","getNodeFocusables","nodes","getFocusableNodes","Map","activateTrap","element","result","_lastActiveTrap","observed","persistentFocus","autoFocus","shards","crossFrame","focusOptions","noFocusGuards","workingNode","portaledElement","some","newTarget","focus","workingArea","concat","map","extractRef","filter","Boolean","whiteList","focusWhitelisted","lastIndex","findIndex","_ref","length","shouldForceRestoreFocus","focusIsHidden","focusInside","area","withinHost","blur","moveFocusInside","captureFocusRestore","querySelector","newActiveElement","expandFocusableNodes","focusedIndex","_ref2","indexOf","_ref3","forEach","_ref4","removeAttribute","onTrap","event","stopPropagation","preventDefault","onBlur","deferAction","process","env","NODE_ENV","PropTypes","isRequired","onWindowFocus","onWindowBlur","focusLockAPI","focusNextElement","focusPrevElement","focusFirstElement","focusLastElement","mediumFocus","assignSyncMedium","source","target","currentNode","currentTarget","observerNode","mediumBlur","assignMedium","mediumEffect","cb","FocusTrap","withSideEffect","propsList","_ref6","disabled","traps","trap","slice","addEventListener","window","lastTrap","sameTrap","id","onDeactivation","_ref7","returnFocus","onActivation","removeEventListener"],"mappings":"i3BAMA,IAAIA,EAAc,WAChB,OAAOC,UAAYA,SAASC,gBAAkBD,SAASE,IACzD,EAIIC,EAAiB,KACjBC,EAAkB,KAClBC,EAAkB,WACpB,OAAO,IACT,EACIC,EAAsB,KACtBC,GAAwB,EACxBC,GAAgB,EAChBC,EAAmB,WACrB,OAAO,CACT,EAaA,SAASC,EAAUC,EAAYC,EAAKC,EAAMC,GACxC,IAAIC,EAAY,KACZC,EAAIL,EACR,EAAG,CACD,IAAIM,EAAOH,EAASE,GACpB,GAAIC,EAAKC,MACHD,EAAKE,KAAKC,QAAQC,iBACpBN,EAAYE,OAET,KAAIA,EAAKK,SAMd,MALA,GAAIN,IAAML,EACR,OAEFI,EAAY,IAGd,CACF,QAAUC,GAAKH,KAAUD,GACrBG,IACFA,EAAUI,KAAKI,SAAW,EAE9B,CACA,IAMIC,EAAc,SAASA,EAAYC,EAAOC,EAAIC,GAChD,OAAOD,IAAOA,EAAGE,OAASH,KAAWC,EAAGzB,eAAiB0B,EAASE,SAASH,EAAGzB,iBAAmByB,EAAGI,YAAcN,EAAYC,EAAOC,EAAGI,WAAYH,GACtJ,EAMII,EAAoB,SAA2BC,GACjD,OAAOC,EAAkBD,EAAO,IAAIE,IACtC,EAMIC,EAAe,WACjB,IAhDqDC,EA0CVjB,EAMvCkB,GAAS,EACb,GAAIlC,EAAgB,CAClB,IAAImC,EAAkBnC,EACpBoC,EAAWD,EAAgBC,SAC3BC,EAAkBF,EAAgBE,gBAClCC,EAAYH,EAAgBG,UAC5BC,EAASJ,EAAgBI,OACzBC,EAAaL,EAAgBK,WAC7BC,EAAeN,EAAgBM,aAC/BC,EAAgBP,EAAgBO,cAC9BC,EAA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EAAaD,aAAa,SAAUE,GAClC,OAAOA,EAAGf,EACZ,GACA,IAAAgB,EAAeC,EAjDf,SAA4BC,GAC1B,OAAOA,EAAUzD,OAAO,SAAU0D,GAEhC,OADeA,EAAMC,QAEvB,EACF,EAUA,SAAmCC,GACjC,IAAIC,EAAOD,EAAME,OAAM,GAAI,GACvBD,IAASjH,IA5BbH,SAASsH,iBAAiB,UAAWrC,GACrCjF,SAASsH,iBAAiB,WAAYjC,GACtCkC,OAAOD,iBAAiB,QAAS1B,GACjC2B,OAAOD,iBAAiB,OAAQzB,IA4BhC,IAAI2B,EAAWrH,EACXsH,EAAWD,GAAYJ,GAAQA,EAAKM,KAAOF,EAASE,GACxDvH,EAAiBiH,EACbI,IAAaC,IACfD,EAASG,iBACJR,EAAM5D,OAAO,SAAUqE,GAE1B,OADSA,EAAMF,KACDF,EAASE,EACzB,GAAG5D,QACD0D,EAASK,aAAaT,IAGtBA,GACFhH,EAAkB,KACbqH,GAAYD,EAASjF,WAAa6E,EAAK7E,UAC1C6E,EAAKU,aAAahC,GAEpB3D,IACAmD,EAAYnD,KA3CdnC,SAAS+H,oBAAoB,UAAW9C,GACxCjF,SAAS+H,oBAAoB,WAAY1C,GACzCkC,OAAOQ,oBAAoB,QAASnC,GACpC2B,OAAOQ,oBAAoB,OAAQlC,GA2CjCzF,EAAkB,KAEtB,EAMe2G,CApFI,WACjB,OAAO,IACT","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import o from"./Combination.js";export{o as default};
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import{createMedium as e,createSidecarMedium as r}from"../../../use-sidecar/dist/es2015/medium.js";var t=e({},function(e){return{target:e.target,currentTarget:e.currentTarget}}),n=e(),s=e(),u=r({async:!0,ssr:"undefined"!=typeof document});export{n as mediumBlur,s as mediumEffect,t as mediumFocus,u as mediumSidecar};
2
- //# sourceMappingURL=medium.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"medium.js","sources":["../../../../../node_modules/react-focus-lock/dist/es2015/medium.js"],"sourcesContent":["import { createMedium, createSidecarMedium } from 'use-sidecar';\nexport var mediumFocus = createMedium({}, function (_ref) {\n var target = _ref.target,\n currentTarget = _ref.currentTarget;\n return {\n target: target,\n currentTarget: currentTarget\n };\n});\nexport var mediumBlur = createMedium();\nexport var mediumEffect = createMedium();\nexport var mediumSidecar = createSidecarMedium({\n async: true,\n ssr: typeof document !== 'undefined'\n});"],"names":["mediumFocus","createMedium","_ref","target","currentTarget","mediumBlur","mediumEffect","mediumSidecar","createSidecarMedium","async","ssr","document"],"mappings":"mGACU,IAACA,EAAcC,EAAa,GAAI,SAAUC,GAGlD,MAAO,CACLC,OAHWD,EAAKC,OAIhBC,cAHgBF,EAAKE,cAKzB,GACWC,EAAaJ,IACbK,EAAeL,IACfM,EAAgBC,EAAoB,CAC7CC,OAAO,EACPC,IAAyB,oBAAbC","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import{createContext as r}from"react";var o=r(void 0);export{o as focusScope};
2
- //# sourceMappingURL=scope.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scope.js","sources":["../../../../../node_modules/react-focus-lock/dist/es2015/scope.js"],"sourcesContent":["import { createContext } from 'react';\nexport var focusScope = /*#__PURE__*/createContext(undefined);"],"names":["focusScope","createContext","undefined"],"mappings":"sCACU,IAACA,EAA0BC,OAAcC","x_google_ignoreList":[0]}