@cruk/cruk-react-components 4.2.2 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -17
- package/lib/components/AddressLookup/AddressLookup.stories.d.ts +1 -15
- package/lib/components/AddressLookup/index.d.ts +3 -30
- package/lib/components/AddressLookup/styles.d.ts +13 -9
- package/lib/components/AllThemesWrapper.d.ts +2 -2
- package/lib/components/Avatar/Avatar.stories.d.ts +2 -3
- package/lib/components/Avatar/index.d.ts +2 -2
- package/lib/components/Avatar/styles.d.ts +2 -2
- package/lib/components/Badge/Badge.stories.d.ts +2 -3
- package/lib/components/Badge/index.d.ts +3 -3
- package/lib/components/Badge/styles.d.ts +2 -2
- package/lib/components/Box/Box.stories.d.ts +1 -1
- package/lib/components/Box/index.d.ts +7 -6
- package/lib/components/Box/styles.d.ts +7 -6
- package/lib/components/Button/Button.stories.d.ts +1 -11
- package/lib/components/Button/index.d.ts +5 -23
- package/lib/components/Button/styles.d.ts +4 -4
- package/lib/components/Carousel/Dots.d.ts +1 -1
- package/lib/components/Carousel/index.d.ts +1 -1
- package/lib/components/Carousel/styles.d.ts +16 -14
- package/lib/components/Checkbox/Checkbox.stories.d.ts +2 -7
- package/lib/components/Checkbox/index.d.ts +3 -10
- package/lib/components/Checkbox/styles.d.ts +6 -6
- package/lib/components/Collapse/Collapse.stories.d.ts +1 -1
- package/lib/components/Collapse/index.d.ts +3 -3
- package/lib/components/Collapse/styles.d.ts +15 -21
- package/lib/components/DateField/DateField.stories.d.ts +1 -2
- package/lib/components/DateField/index.d.ts +2 -2
- package/lib/components/DateField/styles.d.ts +10 -6
- package/lib/components/Divider.d.ts +1 -1
- package/lib/components/ErrorText/ErrorText.stories.d.ts +1 -2
- package/lib/components/ErrorText/index.d.ts +3 -3
- package/lib/components/ErrorText/styles.d.ts +4 -2
- package/lib/components/Flex.d.ts +6 -2
- package/lib/components/Fontface.d.ts +4 -2
- package/lib/components/Footer/Footer.stories.d.ts +1 -1
- package/lib/components/Footer/index.d.ts +2 -2
- package/lib/components/Footer/styles.d.ts +18 -12
- package/lib/components/GlobalStyle.d.ts +2 -8
- package/lib/components/GlobalStyleNoFontFace.d.ts +2 -8
- package/lib/components/Header/Header.stories.d.ts +2 -2
- package/lib/components/Header/index.d.ts +2 -2
- package/lib/components/Header/styles.d.ts +20 -21
- package/lib/components/Heading/Heading.stories.d.ts +1 -2
- package/lib/components/Heading/index.d.ts +4 -4
- package/lib/components/Heading/styles.d.ts +16 -49
- package/lib/components/IconFa/IconFa.stories.d.ts +1 -2
- package/lib/components/IconFa/index.d.ts +2 -2
- package/lib/components/IconFa/styles.d.ts +7 -4
- package/lib/components/InfoBox/InfoBox.stories.d.ts +1 -1
- package/lib/components/InfoBox/index.d.ts +3 -3
- package/lib/components/InfoBox/styles.d.ts +8 -11
- package/lib/components/LabelWrapper/index.d.ts +2 -7
- package/lib/components/LabelWrapper/styles.d.ts +9 -7
- package/lib/components/LegendWrapper/LegendWrapper.stories.d.ts +2 -3
- package/lib/components/LegendWrapper/index.d.ts +2 -2
- package/lib/components/LegendWrapper/styles.d.ts +4 -4
- package/lib/components/Link/Link.stories.d.ts +1 -7
- package/lib/components/Link/index.d.ts +3 -14
- package/lib/components/Link/styles.d.ts +10 -17
- package/lib/components/Loader/Loader.stories.d.ts +1 -2
- package/lib/components/Loader/index.d.ts +1 -1
- package/lib/components/Loader/styles.d.ts +3 -3
- package/lib/components/Modal/Modal.stories.d.ts +2 -3
- package/lib/components/Modal/index.d.ts +3 -3
- package/lib/components/Modal/styles.d.ts +9 -15
- package/lib/components/Pagination/Pagination.stories.d.ts +1 -2
- package/lib/components/Pagination/index.d.ts +2 -2
- package/lib/components/Pagination/styles.d.ts +9 -9
- package/lib/components/PopOver/Popover.stories.d.ts +2 -2
- package/lib/components/PopOver/index.d.ts +3 -3
- package/lib/components/PopOver/styles.d.ts +7 -7
- package/lib/components/ProgressBar/ProgressBar.stories.d.ts +1 -2
- package/lib/components/ProgressBar/index.d.ts +2 -2
- package/lib/components/ProgressBar/styles.d.ts +20 -14
- package/lib/components/Radio/Radio.stories.d.ts +2 -7
- package/lib/components/Radio/index.d.ts +3 -10
- package/lib/components/Radio/styles.d.ts +7 -7
- package/lib/components/RadioConsent/Radio.stories.d.ts +2 -3
- package/lib/components/RadioConsent/index.d.ts +7 -6
- package/lib/components/RadioConsent/styles.d.ts +8 -10
- package/lib/components/Select/Selelct.stories.d.ts +1 -1
- package/lib/components/Select/index.d.ts +3 -3
- package/lib/components/Select/styles.d.ts +2 -2
- package/lib/components/Spacing/index.d.ts +2 -2
- package/lib/components/Step/Step.stories.d.ts +1 -2
- package/lib/components/Step/index.d.ts +2 -2
- package/lib/components/Step/styles.d.ts +7 -6
- package/lib/components/Text/Text.stories.d.ts +1 -1
- package/lib/components/Text/index.d.ts +5 -5
- package/lib/components/Text/styles.d.ts +4 -14
- package/lib/components/TextAreaField/TextAreaField.stories.d.ts +2 -3
- package/lib/components/TextAreaField/index.d.ts +3 -3
- package/lib/components/TextAreaField/styles.d.ts +2 -2
- package/lib/components/TextField/TextField.stories.d.ts +1 -1
- package/lib/components/TextField/index.d.ts +2 -2
- package/lib/components/TextField/styles.d.ts +11 -7
- package/lib/components/ThemeCheatSheet.d.ts +6 -5
- package/lib/components/Totaliser/Totaliser.stories.d.ts +1 -2
- package/lib/components/Totaliser/index.d.ts +2 -2
- package/lib/components/Totaliser/styles.d.ts +14 -12
- package/lib/components/UserBlock/UserBlock.stories.d.ts +1 -2
- package/lib/components/UserBlock/index.d.ts +2 -2
- package/lib/components/UserBlock/styles.d.ts +5 -5
- package/lib/components/index.d.ts +41 -41
- package/lib/hooks/useEffectBrowser.d.ts +1 -1
- package/lib/hooks/useKey.d.ts +3 -3
- package/lib/hooks/useLayoutEffectBrowser.d.ts +1 -1
- package/lib/hooks/useScrollPosition.d.ts +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/defineProperty.js.map +1 -0
- package/lib/node_modules/@babel/runtime/helpers/esm/extends.js +2 -0
- package/lib/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -0
- package/lib/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js.map +1 -0
- package/lib/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +2 -0
- package/lib/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -0
- package/lib/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +1 -0
- package/lib/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +2 -0
- package/lib/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +1 -0
- package/lib/{es/node_modules → node_modules}/@babel/runtime/helpers/esm/toPropertyKey.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js.map +1 -0
- package/lib/node_modules/@babel/runtime/helpers/esm/typeof.js.map +1 -0
- package/lib/{es/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js → node_modules/@fortawesome/free-solid-svg-icons/index.js} +1 -1
- package/lib/node_modules/@fortawesome/free-solid-svg-icons/index.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/commands.js +2 -0
- package/lib/node_modules/focus-lock/dist/es2015/commands.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/constants.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/focusInside.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/focusIsHidden.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/focusSolver.js +2 -0
- package/lib/node_modules/focus-lock/dist/es2015/focusSolver.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/focusables.js +2 -0
- package/lib/node_modules/focus-lock/dist/es2015/focusables.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/moveFocusInside.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/return-focus.js +2 -0
- package/lib/node_modules/focus-lock/dist/es2015/return-focus.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/sibling.js +2 -0
- package/lib/node_modules/focus-lock/dist/es2015/sibling.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/solver.js +2 -0
- package/lib/node_modules/focus-lock/dist/es2015/solver.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/utils/DOMutils.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/utils/all-affected.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/utils/array.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/utils/auto-focus.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/utils/correctFocus.js.map +1 -0
- package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/firstFocus.js +1 -1
- package/lib/node_modules/focus-lock/dist/es2015/utils/firstFocus.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/utils/is.js +2 -0
- package/lib/node_modules/focus-lock/dist/es2015/utils/is.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/utils/parenting.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/utils/safe.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/utils/tabOrder.js +2 -0
- package/lib/node_modules/focus-lock/dist/es2015/utils/tabOrder.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/utils/tabUtils.js.map +1 -0
- package/lib/node_modules/focus-lock/dist/es2015/utils/tabbables.js.map +1 -0
- package/lib/node_modules/react-clientside-effect/lib/index.es.js.map +1 -0
- package/lib/{es/node_modules → node_modules}/react-focus-lock/dist/es2015/Combination.js +1 -1
- package/lib/node_modules/react-focus-lock/dist/es2015/Combination.js.map +1 -0
- package/lib/node_modules/react-focus-lock/dist/es2015/FocusGuard.js.map +1 -0
- package/lib/node_modules/react-focus-lock/dist/es2015/Lock.js +2 -0
- package/lib/node_modules/react-focus-lock/dist/es2015/Lock.js.map +1 -0
- package/lib/node_modules/react-focus-lock/dist/es2015/Trap.js +2 -0
- package/lib/node_modules/react-focus-lock/dist/es2015/Trap.js.map +1 -0
- package/lib/node_modules/react-focus-lock/dist/es2015/index.js +2 -0
- package/lib/node_modules/react-focus-lock/dist/es2015/medium.js +2 -0
- package/lib/node_modules/react-focus-lock/dist/es2015/medium.js.map +1 -0
- package/lib/node_modules/react-focus-lock/dist/es2015/scope.js +2 -0
- package/lib/node_modules/react-focus-lock/dist/es2015/scope.js.map +1 -0
- package/lib/node_modules/react-focus-lock/dist/es2015/util.js +2 -0
- package/lib/node_modules/react-focus-lock/dist/es2015/util.js.map +1 -0
- package/lib/node_modules/react-intersection-observer/dist/index.js +2 -0
- package/lib/node_modules/react-intersection-observer/dist/index.js.map +1 -0
- package/lib/{es/_virtual/_tslib.js → node_modules/tslib/tslib.es6.js} +1 -1
- package/lib/node_modules/tslib/tslib.es6.js.map +1 -0
- package/lib/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -0
- package/lib/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +2 -0
- package/lib/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -0
- package/lib/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -0
- package/lib/node_modules/use-sidecar/dist/es2015/medium.js +2 -0
- package/lib/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -0
- package/lib/src/components/AddressLookup/index.js +2 -0
- package/lib/src/components/AddressLookup/index.js.map +1 -0
- package/lib/src/components/AddressLookup/styles.js +2 -0
- package/lib/src/components/AddressLookup/styles.js.map +1 -0
- package/lib/src/components/Avatar/index.js +2 -0
- package/lib/src/components/Avatar/index.js.map +1 -0
- package/lib/src/components/Avatar/styles.js +2 -0
- package/lib/src/components/Avatar/styles.js.map +1 -0
- package/lib/src/components/Badge/index.js +2 -0
- package/lib/src/components/Badge/index.js.map +1 -0
- package/lib/src/components/Badge/styles.js +2 -0
- package/lib/src/components/Badge/styles.js.map +1 -0
- package/lib/src/components/Box/index.js +2 -0
- package/lib/src/components/Box/index.js.map +1 -0
- package/lib/src/components/Box/styles.js +2 -0
- package/lib/src/components/Box/styles.js.map +1 -0
- package/lib/src/components/Button/index.js +2 -0
- package/lib/src/components/Button/index.js.map +1 -0
- package/lib/src/components/Button/styles.js +2 -0
- package/lib/src/components/Button/styles.js.map +1 -0
- package/lib/src/components/Carousel/Dots.js +2 -0
- package/lib/src/components/Carousel/Dots.js.map +1 -0
- package/lib/src/components/Carousel/index.js +2 -0
- package/lib/src/components/Carousel/index.js.map +1 -0
- package/lib/src/components/Carousel/styles.js +2 -0
- package/lib/src/components/Carousel/styles.js.map +1 -0
- package/lib/src/components/Checkbox/index.js +2 -0
- package/lib/src/components/Checkbox/index.js.map +1 -0
- package/lib/src/components/Checkbox/styles.js +2 -0
- package/lib/src/components/Checkbox/styles.js.map +1 -0
- package/lib/src/components/Collapse/index.js +2 -0
- package/lib/src/components/Collapse/index.js.map +1 -0
- package/lib/src/components/Collapse/styles.js +2 -0
- package/lib/src/components/Collapse/styles.js.map +1 -0
- package/lib/src/components/DateField/index.js +2 -0
- package/lib/src/components/DateField/index.js.map +1 -0
- package/lib/src/components/DateField/styles.js +2 -0
- package/lib/src/components/DateField/styles.js.map +1 -0
- package/lib/src/components/Divider.js +2 -0
- package/lib/src/components/Divider.js.map +1 -0
- package/lib/src/components/ErrorText/index.js +2 -0
- package/lib/src/components/ErrorText/index.js.map +1 -0
- package/lib/src/components/ErrorText/styles.js +2 -0
- package/lib/src/components/ErrorText/styles.js.map +1 -0
- package/lib/src/components/Flex.js +2 -0
- package/lib/src/components/Flex.js.map +1 -0
- package/lib/src/components/Fontface.js +2 -0
- package/lib/src/components/Fontface.js.map +1 -0
- package/lib/src/components/Footer/index.js +2 -0
- package/lib/src/components/Footer/index.js.map +1 -0
- package/lib/src/components/Footer/styles.js +2 -0
- package/lib/src/components/Footer/styles.js.map +1 -0
- package/lib/src/components/GlobalStyle.js +2 -0
- package/lib/src/components/GlobalStyle.js.map +1 -0
- package/lib/src/components/GlobalStyleNoFontFace.js +2 -0
- package/lib/src/components/GlobalStyleNoFontFace.js.map +1 -0
- package/lib/src/components/Header/index.js +2 -0
- package/lib/src/components/Header/index.js.map +1 -0
- package/lib/src/components/Header/styles.js +2 -0
- package/lib/src/components/Header/styles.js.map +1 -0
- package/lib/src/components/Heading/index.js +2 -0
- package/lib/src/components/Heading/index.js.map +1 -0
- package/lib/src/components/Heading/styles.js +2 -0
- package/lib/src/components/Heading/styles.js.map +1 -0
- package/lib/src/components/IconFa/index.js +2 -0
- package/lib/src/components/IconFa/index.js.map +1 -0
- package/lib/src/components/IconFa/styles.js +2 -0
- package/lib/src/components/IconFa/styles.js.map +1 -0
- package/lib/src/components/InfoBox/index.js +2 -0
- package/lib/src/components/InfoBox/index.js.map +1 -0
- package/lib/src/components/InfoBox/styles.js +2 -0
- package/lib/src/components/InfoBox/styles.js.map +1 -0
- package/lib/src/components/LabelWrapper/index.js +2 -0
- package/lib/src/components/LabelWrapper/index.js.map +1 -0
- package/lib/src/components/LabelWrapper/styles.js +2 -0
- package/lib/src/components/LabelWrapper/styles.js.map +1 -0
- package/lib/src/components/LegendWrapper/index.js +2 -0
- package/lib/src/components/LegendWrapper/index.js.map +1 -0
- package/lib/src/components/LegendWrapper/styles.js +2 -0
- package/lib/src/components/LegendWrapper/styles.js.map +1 -0
- package/lib/src/components/Link/index.js +2 -0
- package/lib/src/components/Link/index.js.map +1 -0
- package/lib/src/components/Link/styles.js +2 -0
- package/lib/src/components/Link/styles.js.map +1 -0
- package/lib/src/components/Loader/index.js +2 -0
- package/lib/src/components/Loader/index.js.map +1 -0
- package/lib/src/components/Loader/styles.js +2 -0
- package/lib/src/components/Loader/styles.js.map +1 -0
- package/lib/src/components/Modal/index.js +2 -0
- package/lib/src/components/Modal/index.js.map +1 -0
- package/lib/src/components/Modal/styles.js +2 -0
- package/lib/src/components/Modal/styles.js.map +1 -0
- package/lib/src/components/Pagination/index.js +2 -0
- package/lib/src/components/Pagination/index.js.map +1 -0
- package/lib/src/components/Pagination/styles.js +2 -0
- package/lib/src/components/Pagination/styles.js.map +1 -0
- package/lib/src/components/PopOver/index.js +2 -0
- package/lib/src/components/PopOver/index.js.map +1 -0
- package/lib/src/components/PopOver/styles.js +2 -0
- package/lib/src/components/PopOver/styles.js.map +1 -0
- package/lib/src/components/ProgressBar/index.js +2 -0
- package/lib/src/components/ProgressBar/index.js.map +1 -0
- package/lib/src/components/ProgressBar/styles.js +2 -0
- package/lib/src/components/ProgressBar/styles.js.map +1 -0
- package/lib/src/components/Radio/index.js +2 -0
- package/lib/src/components/Radio/index.js.map +1 -0
- package/lib/src/components/Radio/styles.js +2 -0
- package/lib/src/components/Radio/styles.js.map +1 -0
- package/lib/src/components/RadioConsent/index.js +2 -0
- package/lib/src/components/RadioConsent/index.js.map +1 -0
- package/lib/src/components/RadioConsent/styles.js +2 -0
- package/lib/src/components/RadioConsent/styles.js.map +1 -0
- package/lib/src/components/Select/index.js +2 -0
- package/lib/src/components/Select/index.js.map +1 -0
- package/lib/src/components/Select/styles.js +2 -0
- package/lib/src/components/Select/styles.js.map +1 -0
- package/lib/src/components/Spacing/index.js +2 -0
- package/lib/src/components/Spacing/index.js.map +1 -0
- package/lib/src/components/Step/index.js +2 -0
- package/lib/src/components/Step/index.js.map +1 -0
- package/lib/src/components/Step/styles.js +2 -0
- package/lib/src/components/Step/styles.js.map +1 -0
- package/lib/src/components/Text/index.js +2 -0
- package/lib/src/components/Text/index.js.map +1 -0
- package/lib/src/components/Text/styles.js +2 -0
- package/lib/src/components/Text/styles.js.map +1 -0
- package/lib/src/components/TextAreaField/index.js +2 -0
- package/lib/src/components/TextAreaField/index.js.map +1 -0
- package/lib/src/components/TextAreaField/styles.js +2 -0
- package/lib/src/components/TextAreaField/styles.js.map +1 -0
- package/lib/src/components/TextField/index.js +2 -0
- package/lib/src/components/TextField/index.js.map +1 -0
- package/lib/src/components/TextField/styles.js +2 -0
- package/lib/src/components/TextField/styles.js.map +1 -0
- package/lib/src/components/Totaliser/index.js +2 -0
- package/lib/src/components/Totaliser/index.js.map +1 -0
- package/lib/src/components/Totaliser/styles.js +2 -0
- package/lib/src/components/Totaliser/styles.js.map +1 -0
- package/lib/src/components/UserBlock/index.js +2 -0
- package/lib/src/components/UserBlock/index.js.map +1 -0
- package/lib/src/components/UserBlock/styles.js +2 -0
- package/lib/src/components/UserBlock/styles.js.map +1 -0
- package/lib/src/components/index.js +2 -0
- package/lib/src/hooks/useEffectBrowser.js.map +1 -0
- package/lib/src/hooks/useKey.js.map +1 -0
- package/lib/src/hooks/useLayoutEffectBrowser.js.map +1 -0
- package/lib/{es/src → src}/hooks/useScrollPosition.js +1 -1
- package/lib/src/hooks/useScrollPosition.js.map +1 -0
- package/lib/src/themes/bowelbabe.js +2 -0
- package/lib/src/themes/bowelbabe.js.map +1 -0
- package/lib/{es/src → src}/themes/cruk.js +1 -1
- package/lib/src/themes/cruk.js.map +1 -0
- package/lib/src/themes/rfl.js +2 -0
- package/lib/src/themes/rfl.js.map +1 -0
- package/lib/src/themes/su2c.js +2 -0
- package/lib/src/themes/su2c.js.map +1 -0
- package/lib/src/utils/Helper.js +2 -0
- package/lib/src/utils/Helper.js.map +1 -0
- package/lib/{es/src → src}/utils/debounce.js +1 -1
- package/lib/src/utils/debounce.js.map +1 -0
- package/lib/themes/bowelbabe.d.ts +3 -3
- package/lib/themes/cruk.d.ts +3 -3
- package/lib/themes/rfl.d.ts +3 -3
- package/lib/themes/su2c.d.ts +3 -3
- package/lib/types.d.ts +1 -3
- package/lib/utils/debounce.d.ts +2 -2
- package/package.json +44 -55
- package/lib/es/_virtual/_tslib.js.map +0 -1
- package/lib/es/node_modules/@babel/runtime/helpers/esm/defineProperty.js.map +0 -1
- package/lib/es/node_modules/@babel/runtime/helpers/esm/extends.js +0 -2
- package/lib/es/node_modules/@babel/runtime/helpers/esm/extends.js.map +0 -1
- package/lib/es/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js.map +0 -1
- package/lib/es/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -2
- package/lib/es/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +0 -1
- package/lib/es/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +0 -1
- package/lib/es/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -2
- package/lib/es/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +0 -1
- package/lib/es/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js.map +0 -1
- package/lib/es/node_modules/@babel/runtime/helpers/esm/typeof.js.map +0 -1
- package/lib/es/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/commands.js +0 -2
- package/lib/es/node_modules/focus-lock/dist/es2015/commands.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/constants.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/focusInside.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/focusIsHidden.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/focusSolver.js +0 -2
- package/lib/es/node_modules/focus-lock/dist/es2015/focusSolver.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/focusables.js +0 -2
- package/lib/es/node_modules/focus-lock/dist/es2015/focusables.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/moveFocusInside.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/solver.js +0 -2
- package/lib/es/node_modules/focus-lock/dist/es2015/solver.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/DOMutils.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/all-affected.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/array.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/auto-focus.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/correctFocus.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/firstFocus.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/is.js +0 -2
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/is.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/parenting.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/safe.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/tabOrder.js +0 -2
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/tabOrder.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/tabUtils.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/tabbables.js.map +0 -1
- package/lib/es/node_modules/react-clientside-effect/lib/index.es.js.map +0 -1
- package/lib/es/node_modules/react-focus-lock/dist/es2015/Combination.js.map +0 -1
- package/lib/es/node_modules/react-focus-lock/dist/es2015/FocusGuard.js.map +0 -1
- package/lib/es/node_modules/react-focus-lock/dist/es2015/Lock.js +0 -2
- package/lib/es/node_modules/react-focus-lock/dist/es2015/Lock.js.map +0 -1
- package/lib/es/node_modules/react-focus-lock/dist/es2015/Trap.js +0 -2
- package/lib/es/node_modules/react-focus-lock/dist/es2015/Trap.js.map +0 -1
- package/lib/es/node_modules/react-focus-lock/dist/es2015/index.js +0 -2
- package/lib/es/node_modules/react-focus-lock/dist/es2015/medium.js +0 -2
- package/lib/es/node_modules/react-focus-lock/dist/es2015/medium.js.map +0 -1
- package/lib/es/node_modules/react-focus-lock/dist/es2015/util.js +0 -2
- package/lib/es/node_modules/react-focus-lock/dist/es2015/util.js.map +0 -1
- package/lib/es/node_modules/react-intersection-observer/index.mjs.js +0 -2
- package/lib/es/node_modules/react-intersection-observer/index.mjs.js.map +0 -1
- package/lib/es/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +0 -1
- package/lib/es/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +0 -2
- package/lib/es/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +0 -1
- package/lib/es/node_modules/use-callback-ref/dist/es2015/useRef.js.map +0 -1
- package/lib/es/node_modules/use-sidecar/dist/es2015/medium.js +0 -2
- package/lib/es/node_modules/use-sidecar/dist/es2015/medium.js.map +0 -1
- package/lib/es/src/components/AddressLookup/index.js +0 -2
- package/lib/es/src/components/AddressLookup/styles.js +0 -2
- package/lib/es/src/components/AddressLookup/styles.js.map +0 -1
- package/lib/es/src/components/Avatar/index.js +0 -2
- package/lib/es/src/components/Avatar/index.js.map +0 -1
- package/lib/es/src/components/Avatar/styles.js +0 -2
- package/lib/es/src/components/Avatar/styles.js.map +0 -1
- package/lib/es/src/components/Badge/index.js +0 -2
- package/lib/es/src/components/Badge/index.js.map +0 -1
- package/lib/es/src/components/Badge/styles.js +0 -2
- package/lib/es/src/components/Badge/styles.js.map +0 -1
- package/lib/es/src/components/Box/index.js +0 -2
- package/lib/es/src/components/Box/index.js.map +0 -1
- package/lib/es/src/components/Box/styles.js +0 -2
- package/lib/es/src/components/Box/styles.js.map +0 -1
- package/lib/es/src/components/Button/index.js +0 -2
- package/lib/es/src/components/Button/index.js.map +0 -1
- package/lib/es/src/components/Button/styles.js +0 -2
- package/lib/es/src/components/Button/styles.js.map +0 -1
- package/lib/es/src/components/Carousel/Dots.js +0 -2
- package/lib/es/src/components/Carousel/Dots.js.map +0 -1
- package/lib/es/src/components/Carousel/index.js +0 -2
- package/lib/es/src/components/Carousel/index.js.map +0 -1
- package/lib/es/src/components/Carousel/styles.js +0 -2
- package/lib/es/src/components/Carousel/styles.js.map +0 -1
- package/lib/es/src/components/Checkbox/index.js +0 -2
- package/lib/es/src/components/Checkbox/index.js.map +0 -1
- package/lib/es/src/components/Checkbox/styles.js +0 -2
- package/lib/es/src/components/Checkbox/styles.js.map +0 -1
- package/lib/es/src/components/Collapse/index.js +0 -2
- package/lib/es/src/components/Collapse/index.js.map +0 -1
- package/lib/es/src/components/Collapse/styles.js +0 -2
- package/lib/es/src/components/Collapse/styles.js.map +0 -1
- package/lib/es/src/components/DateField/index.js +0 -2
- package/lib/es/src/components/DateField/index.js.map +0 -1
- package/lib/es/src/components/DateField/styles.js +0 -2
- package/lib/es/src/components/DateField/styles.js.map +0 -1
- package/lib/es/src/components/Divider.js +0 -2
- package/lib/es/src/components/Divider.js.map +0 -1
- package/lib/es/src/components/ErrorText/index.js +0 -2
- package/lib/es/src/components/ErrorText/index.js.map +0 -1
- package/lib/es/src/components/ErrorText/styles.js +0 -2
- package/lib/es/src/components/ErrorText/styles.js.map +0 -1
- package/lib/es/src/components/Flex.js +0 -2
- package/lib/es/src/components/Flex.js.map +0 -1
- package/lib/es/src/components/Fontface.js +0 -2
- package/lib/es/src/components/Fontface.js.map +0 -1
- package/lib/es/src/components/Footer/index.js +0 -2
- package/lib/es/src/components/Footer/index.js.map +0 -1
- package/lib/es/src/components/Footer/styles.js +0 -2
- package/lib/es/src/components/Footer/styles.js.map +0 -1
- package/lib/es/src/components/GlobalStyle.js +0 -2
- package/lib/es/src/components/GlobalStyle.js.map +0 -1
- package/lib/es/src/components/GlobalStyleNoFontFace.js +0 -2
- package/lib/es/src/components/GlobalStyleNoFontFace.js.map +0 -1
- package/lib/es/src/components/Header/index.js +0 -2
- package/lib/es/src/components/Header/index.js.map +0 -1
- package/lib/es/src/components/Header/styles.js +0 -2
- package/lib/es/src/components/Header/styles.js.map +0 -1
- package/lib/es/src/components/Heading/index.js +0 -2
- package/lib/es/src/components/Heading/index.js.map +0 -1
- package/lib/es/src/components/Heading/styles.js +0 -2
- package/lib/es/src/components/Heading/styles.js.map +0 -1
- package/lib/es/src/components/IconFa/index.js +0 -2
- package/lib/es/src/components/IconFa/index.js.map +0 -1
- package/lib/es/src/components/IconFa/styles.js +0 -2
- package/lib/es/src/components/IconFa/styles.js.map +0 -1
- package/lib/es/src/components/InfoBox/index.js +0 -2
- package/lib/es/src/components/InfoBox/index.js.map +0 -1
- package/lib/es/src/components/InfoBox/styles.js +0 -2
- package/lib/es/src/components/InfoBox/styles.js.map +0 -1
- package/lib/es/src/components/LabelWrapper/index.js +0 -2
- package/lib/es/src/components/LabelWrapper/index.js.map +0 -1
- package/lib/es/src/components/LabelWrapper/styles.js +0 -2
- package/lib/es/src/components/LabelWrapper/styles.js.map +0 -1
- package/lib/es/src/components/LegendWrapper/index.js +0 -2
- package/lib/es/src/components/LegendWrapper/index.js.map +0 -1
- package/lib/es/src/components/LegendWrapper/styles.js +0 -2
- package/lib/es/src/components/LegendWrapper/styles.js.map +0 -1
- package/lib/es/src/components/Link/index.js +0 -2
- package/lib/es/src/components/Link/index.js.map +0 -1
- package/lib/es/src/components/Link/styles.js +0 -2
- package/lib/es/src/components/Link/styles.js.map +0 -1
- package/lib/es/src/components/Loader/index.js +0 -2
- package/lib/es/src/components/Loader/index.js.map +0 -1
- package/lib/es/src/components/Loader/styles.js +0 -2
- package/lib/es/src/components/Loader/styles.js.map +0 -1
- package/lib/es/src/components/Modal/index.js +0 -2
- package/lib/es/src/components/Modal/index.js.map +0 -1
- package/lib/es/src/components/Modal/styles.js +0 -2
- package/lib/es/src/components/Modal/styles.js.map +0 -1
- package/lib/es/src/components/Pagination/index.js +0 -2
- package/lib/es/src/components/Pagination/index.js.map +0 -1
- package/lib/es/src/components/Pagination/styles.js +0 -2
- package/lib/es/src/components/Pagination/styles.js.map +0 -1
- package/lib/es/src/components/PopOver/index.js +0 -2
- package/lib/es/src/components/PopOver/index.js.map +0 -1
- package/lib/es/src/components/PopOver/styles.js +0 -2
- package/lib/es/src/components/PopOver/styles.js.map +0 -1
- package/lib/es/src/components/ProgressBar/index.js +0 -2
- package/lib/es/src/components/ProgressBar/index.js.map +0 -1
- package/lib/es/src/components/ProgressBar/styles.js +0 -2
- package/lib/es/src/components/ProgressBar/styles.js.map +0 -1
- package/lib/es/src/components/Radio/index.js +0 -2
- package/lib/es/src/components/Radio/index.js.map +0 -1
- package/lib/es/src/components/Radio/styles.js +0 -2
- package/lib/es/src/components/Radio/styles.js.map +0 -1
- package/lib/es/src/components/RadioConsent/index.js +0 -2
- package/lib/es/src/components/RadioConsent/index.js.map +0 -1
- package/lib/es/src/components/RadioConsent/styles.js +0 -2
- package/lib/es/src/components/RadioConsent/styles.js.map +0 -1
- package/lib/es/src/components/Select/index.js +0 -2
- package/lib/es/src/components/Select/index.js.map +0 -1
- package/lib/es/src/components/Select/styles.js +0 -2
- package/lib/es/src/components/Select/styles.js.map +0 -1
- package/lib/es/src/components/Spacing/index.js +0 -2
- package/lib/es/src/components/Spacing/index.js.map +0 -1
- package/lib/es/src/components/Step/index.js +0 -2
- package/lib/es/src/components/Step/index.js.map +0 -1
- package/lib/es/src/components/Step/styles.js +0 -2
- package/lib/es/src/components/Step/styles.js.map +0 -1
- package/lib/es/src/components/Text/index.js +0 -2
- package/lib/es/src/components/Text/index.js.map +0 -1
- package/lib/es/src/components/Text/styles.js +0 -2
- package/lib/es/src/components/Text/styles.js.map +0 -1
- package/lib/es/src/components/TextAreaField/index.js +0 -2
- package/lib/es/src/components/TextAreaField/index.js.map +0 -1
- package/lib/es/src/components/TextAreaField/styles.js +0 -2
- package/lib/es/src/components/TextAreaField/styles.js.map +0 -1
- package/lib/es/src/components/TextField/index.js +0 -2
- package/lib/es/src/components/TextField/index.js.map +0 -1
- package/lib/es/src/components/TextField/styles.js +0 -2
- package/lib/es/src/components/TextField/styles.js.map +0 -1
- package/lib/es/src/components/Totaliser/index.js +0 -2
- package/lib/es/src/components/Totaliser/index.js.map +0 -1
- package/lib/es/src/components/Totaliser/styles.js +0 -2
- package/lib/es/src/components/Totaliser/styles.js.map +0 -1
- package/lib/es/src/components/UserBlock/index.js +0 -2
- package/lib/es/src/components/UserBlock/index.js.map +0 -1
- package/lib/es/src/components/UserBlock/styles.js +0 -2
- package/lib/es/src/components/UserBlock/styles.js.map +0 -1
- package/lib/es/src/components/index.js +0 -2
- package/lib/es/src/components/index.js.map +0 -1
- package/lib/es/src/hooks/useEffectBrowser.js.map +0 -1
- package/lib/es/src/hooks/useKey.js.map +0 -1
- package/lib/es/src/hooks/useLayoutEffectBrowser.js.map +0 -1
- package/lib/es/src/hooks/useScrollPosition.js.map +0 -1
- package/lib/es/src/themes/bowelbabe.js +0 -2
- package/lib/es/src/themes/bowelbabe.js.map +0 -1
- package/lib/es/src/themes/cruk.js.map +0 -1
- package/lib/es/src/themes/rfl.js +0 -2
- package/lib/es/src/themes/rfl.js.map +0 -1
- package/lib/es/src/themes/su2c.js +0 -2
- package/lib/es/src/themes/su2c.js.map +0 -1
- package/lib/es/src/utils/Helper.js +0 -2
- package/lib/es/src/utils/Helper.js.map +0 -1
- package/lib/es/src/utils/debounce.js.map +0 -1
- /package/lib/{es/node_modules → node_modules}/@babel/runtime/helpers/esm/defineProperty.js +0 -0
- /package/lib/{es/node_modules → node_modules}/@babel/runtime/helpers/esm/inheritsLoose.js +0 -0
- /package/lib/{es/node_modules → node_modules}/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -0
- /package/lib/{es/node_modules → node_modules}/@babel/runtime/helpers/esm/typeof.js +0 -0
- /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/constants.js +0 -0
- /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/focusInside.js +0 -0
- /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/focusIsHidden.js +0 -0
- /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/moveFocusInside.js +0 -0
- /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/DOMutils.js +0 -0
- /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/all-affected.js +0 -0
- /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/array.js +0 -0
- /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/auto-focus.js +0 -0
- /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/correctFocus.js +0 -0
- /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/getActiveElement.js +0 -0
- /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/parenting.js +0 -0
- /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/safe.js +0 -0
- /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/tabUtils.js +0 -0
- /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/tabbables.js +0 -0
- /package/lib/{es/node_modules → node_modules}/react-clientside-effect/lib/index.es.js +0 -0
- /package/lib/{es/node_modules → node_modules}/react-focus-lock/dist/es2015/FocusGuard.js +0 -0
- /package/lib/{es/node_modules → node_modules}/react-focus-lock/dist/es2015/index.js.map +0 -0
- /package/lib/{es/node_modules → node_modules}/use-callback-ref/dist/es2015/assignRef.js +0 -0
- /package/lib/{es/node_modules → node_modules}/use-callback-ref/dist/es2015/useRef.js +0 -0
- /package/lib/{es/src/components/AddressLookup → src/components}/index.js.map +0 -0
- /package/lib/{es/src → src}/hooks/useEffectBrowser.js +0 -0
- /package/lib/{es/src → src}/hooks/useKey.js +0 -0
- /package/lib/{es/src → src}/hooks/useLayoutEffectBrowser.js +0 -0
- /package/lib/utils/__tests__/{testHelpers.jest.d.ts → testHelpers.test.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
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]}
|
|
@@ -0,0 +1 @@
|
|
|
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]}
|
|
@@ -0,0 +1 @@
|
|
|
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,MAAK,SAAUC,GAC/C,OAAOC,EAASD,EAAMR,IAdN,SAAUD,EAASC,GACvC,OAAOU,QAAQC,EAAQZ,EAAQa,iBAAiB,WAAWL,MAAK,SAAUC,GAAQ,OAFnE,SAAUK,EAAOb,GAAiB,OAAOa,IAAUb,EAEuBc,CAAaN,EAAMR,EAAiB,IACjI,CAYgDe,CAAkBP,EAAMR,EACxE,GACA","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
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,MAAK,SAAUC,GAAQ,OAAOC,EAASD,EAAMP,EAAe,GAC1I","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
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{asArray as e,getFirst 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(e(l).length>0?document:i(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
|
|
@@ -0,0 +1 @@
|
|
|
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,QAAO,SAAUS,GAC9C,IAAIC,EAAOD,EAAGC,KACd,OAAOT,EAAYS,EAC3B,IACI,GAAKF,EAAc,GAAnB,CAGA,IA9ByBG,EAAUC,EAC/BC,EA6BAC,EAAaP,EAAkB,CAACL,GAAeE,GAAiBW,KAAI,SAAUN,GAE9E,OADWA,EAAGC,IAEtB,IACQM,GAlCqBL,EAkCeG,EAlCLF,EAkCiBJ,EAjChDK,EAAQ,IAAIR,IAEhBO,EAASK,SAAQ,SAAUC,GAAU,OAAOL,EAAMM,IAAID,EAAOR,KAAMQ,EAAU,IAEtEP,EAASI,KAAI,SAAUL,GAAQ,OAAOG,EAAMO,IAAIV,EAAQ,IAAEV,OAAOqB,IA+BpEC,EAAkBN,EAAqBD,KAAI,SAAUN,GAErD,OADWA,EAAGC,IAEtB,IACQa,EAAgBP,EAAqBhB,QAAO,SAAUS,GAEtD,OADeA,EAAGe,UACC,CAC3B,IAAOT,KAAI,SAAUN,GAEb,OADWA,EAAGC,IAEtB,IACQe,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,sDAGpB,CACD,YAAcC,IAAVR,EACOA,EAEJT,EAAqBS,EAnC3B,CAoCL","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,KAAI,SAAUC,GAC5B,IAAIC,EAAOD,EAAGC,KACd,MAAQ,CACJA,KAAMA,EACNC,MAHwBF,EAAGE,MAI3BC,SAAUL,EAAcM,QAAQH,IAAS,EACzCI,MAAOC,EAAQL,GAE3B,GACA","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
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,CAAE,GACtC,IAAIC,EAAYC,EAAYJ,EAASC,GAErC,IAAIH,GAGAK,EAAW,CAEX,GAAIN,EAAa,EAQb,OANAQ,QAAQC,MAAM,qJAEdR,GAAe,OACfS,YAAW,WACPT,GAAe,CAClB,GAAE,GAGPD,IACAW,EAAQL,EAAUM,KAAMP,EAAQQ,cAChCb,GACH,CACL","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,GAAuB,oBAAZC,QACP,OAAO,WAAc,OAAOD,GAAS,IA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AyCA,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,IAExB,CACDJ,EAAMA,EAAIvB,kBACb,CACD,GAAIqB,EAAWP,OAEX,OAAOO,EAAW,GAAGM,IAE5B,CACJ,CAGL,CAWeC,CAAexB,EAC9B,CACA","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{focusOn as n}from"./commands.js";import{contains as o,getTabbableNodes as e,getFocusableNodes 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(e){return!o(e,n)})))return console.error("Active element is not contained in the scope"),{};var a=c?e(s,new Map):t(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(o,i,c){var s,a,u,f,l=(a=o,u=null===(s=i.onlyTabbable)||void 0===s||s,{first:(f=u?e(r(a),new Map):t(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
|
|
@@ -0,0 +1 @@
|
|
|
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,GAEX,IAAIC,EAASC,EAAQL,GACrB,GAAII,EAAOE,OAAM,SAAUC,GAAS,OAAQC,EAASD,EAAO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/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,CAAE,GACtCgB,EAAaxC,EAAOwB,EAAS,QACjC,EAKWoB,EAAmB,SAAU5C,EAAOwB,QAC3B,IAAZA,IAAsBA,EAAU,CAAE,GACtCgB,EAAaxC,EAAOwB,EAAS,OACjC","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
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 e="NEW_FOCUS",f=function(f,n,o,s,a){var d=f.length,u=f[0],x=f[d-1],O=t(s);if(!(s&&f.indexOf(s)>=0)){var v=void 0!==s?o.indexOf(s):-1,h=a?o.indexOf(a):v,l=a?f.indexOf(a):-1;if(-1===v)return-1!==l?l:e;if(-1===l)return e;var m=v-h,c=o.indexOf(u),b=o.indexOf(x),p=i(o),M=(void 0!==s?p.indexOf(s):-1)-(a?p.indexOf(a):v);if(!m&&l>=0)return l;if(0===n.length)return l;var g=r(f,n[0]),j=r(f,n[n.length-1]);return v<=c&&O&&Math.abs(m)>1?j:v>=b&&O&&Math.abs(m)>1?g:m&&Math.abs(M)>1?l:v<=c?j:v>b?g:m?Math.abs(m)>1?l:(d+l+m)%d:void 0}};export{e as NEW_FOCUS,f as newFocus};
|
|
2
|
+
//# sourceMappingURL=solver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solver.js","sources":["../../../../../node_modules/focus-lock/dist/es2015/solver.js"],"sourcesContent":["import { correctNodes } from './utils/correctFocus';\nimport { pickFocusable } from './utils/firstFocus';\nimport { isGuard } from './utils/is';\nexport var NEW_FOCUS = 'NEW_FOCUS';\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 correctedIndex = activeElement !== undefined ? correctedNodes.indexOf(activeElement) : -1;\n var correctedIndexDiff = correctedIndex - (lastNode ? correctedNodes.indexOf(lastNode) : activeIndex);\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(correctedIndexDiff) > 1) {\n return lastNodeInside;\n }\n // focus above lock\n if (activeIndex <= firstNodeIndex) {\n return returnLastNode;\n }\n // focus below lock\n if (activeIndex > lastNodeIndex) {\n return returnFirstNode;\n }\n // index is inside tab order, but outside Lock\n if (indexDiff) {\n if (Math.abs(indexDiff) > 1) {\n return lastNodeInside;\n }\n return (cnt + lastNodeInside + indexDiff) % cnt;\n }\n // do nothing\n return undefined;\n};\n"],"names":["NEW_FOCUS","newFocus","innerNodes","innerTabbables","outerNodes","activeElement","lastNode","cnt","length","firstFocus","lastFocus","isOnGuard","isGuard","indexOf","activeIndex","undefined","lastIndex","lastNodeInside","indexDiff","firstNodeIndex","lastNodeIndex","correctedNodes","correctNodes","correctedIndexDiff","returnFirstNode","pickFocusable","returnLastNode","Math","abs"],"mappings":"qJAGU,IAACA,EAAY,YAUZC,EAAW,SAAUC,EAAYC,EAAgBC,EAAYC,EAAeC,GACnF,IAAIC,EAAML,EAAWM,OACjBC,EAAaP,EAAW,GACxBQ,EAAYR,EAAWK,EAAM,GAC7BI,EAAYC,EAAQP,GAExB,KAAIA,GAAiBH,EAAWW,QAAQR,IAAkB,GAA1D,CAGA,IAAIS,OAAgCC,IAAlBV,EAA8BD,EAAWS,QAAQR,IAAkB,EACjFW,EAAYV,EAAWF,EAAWS,QAAQP,GAAYQ,EACtDG,EAAiBX,EAAWJ,EAAWW,QAAQP,IAAa,EAEhE,IAAqB,IAAjBQ,EAEA,OAAwB,IAApBG,EACOA,EAEJjB,EAGX,IAAwB,IAApBiB,EACA,OAAOjB,EAEX,IAAIkB,EAAYJ,EAAcE,EAC1BG,EAAiBf,EAAWS,QAAQJ,GACpCW,EAAgBhB,EAAWS,QAAQH,GACnCW,EAAiBC,EAAalB,GAE9BmB,QADmCR,IAAlBV,EAA8BgB,EAAeR,QAAQR,IAAkB,IACjDC,EAAWe,EAAeR,QAAQP,GAAYQ,GAEzF,IAAKI,GAAaD,GAAkB,EAChC,OAAOA,EAGX,GAA8B,IAA1Bd,EAAeK,OAIf,OAAOS,EAEX,IAAIO,EAAkBC,EAAcvB,EAAYC,EAAe,IAC3DuB,EAAiBD,EAAcvB,EAAYC,EAAeA,EAAeK,OAAS,IAEtF,OAAIM,GAAeK,GAAkBR,GAAagB,KAAKC,IAAIV,GAAa,EAC7DQ,EAGPZ,GAAeM,GAAiBT,GAAagB,KAAKC,IAAIV,GAAa,EAC5DM,EAGPN,GAAaS,KAAKC,IAAIL,GAAsB,EACrCN,EAGPH,GAAeK,EACRO,EAGPZ,EAAcM,EACPI,EAGPN,EACIS,KAAKC,IAAIV,GAAa,EACfD,GAEHV,EAAMU,EAAiBC,GAAaX,OAJhD,CAxDC,CAgEL","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
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,QAAO,SAAUC,GAAQ,OAAOC,EAAgBJ,EAAiBG,MACjED,QAAO,SAAUC,GAAQ,OAAOE,EAAeF,EAAM,GAC9D,EACWG,EAAsB,SAAUP,EAAOQ,GAE9C,YADc,IAAVA,IAAoBA,EAAQ,IAAIC,KAC7BP,EAAQF,GAAOG,QAAO,SAAUC,GAAQ,OAAOM,EAAyBF,EAAOJ,EAAQ,GAClG,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,MAAK,SAAUC,GAC1C,IAAIC,EACJ,GAAID,aAAiBE,kBAAmB,CACpC,IAAIC,EAA8C,QAAhCF,EAAKD,EAAMI,uBAAoC,IAAPH,OAAgB,EAASA,EAAGI,KACtF,QAAIF,GACOb,EAASa,EAAYX,EAGnC,CACD,OAAOF,EAASU,EAAOR,EACnC,GAEA","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"all-affected.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/utils/all-affected.js"],"sourcesContent":["import { FOCUS_DISABLED, FOCUS_GROUP } from '../constants';\nimport { asArray, toArray } from './array';\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,QAAO,SAAUC,EAAKC,GAC/C,IAAIC,EAAQD,EAAYE,aAAaC,GAIrC,OAHAJ,EAAIK,KAAKC,MAAMN,EAAME,EAnCV,SAAUK,GAGzB,IAFA,IAAIC,EAAY,IAAIC,IAChBC,EAAIH,EAAMI,OACLC,EAAI,EAAGA,EAAIF,EAAGE,GAAK,EACxB,IAAK,IAAIC,EAAID,EAAI,EAAGC,EAAIH,EAAGG,GAAK,EAAG,CAC/B,IAAIC,EAAWP,EAAMK,GAAGG,wBAAwBR,EAAMM,KAEjDC,EAAWE,KAAKC,gCAAkC,GACnDT,EAAUU,IAAIL,IAEbC,EAAWE,KAAKG,4BAA8B,GAC/CX,EAAUU,IAAIN,EAGrB,CAEL,OAAOL,EAAMV,QAAO,SAAUuB,EAAGC,GAAS,OAAQb,EAAUc,IAAID,EAAS,GAC7E,CAmBcE,CAAaC,EAAQhC,EAAaS,GAAawB,iBAAiB,IAAIC,OAAOtB,EAAa,MAAOsB,OAAOxB,EAAO,YAAawB,OAAOC,EAAgB,oBACjJ,CAAC1B,IACAD,CACV,GAAE,GACP","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
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,EAAO,EAChEO,EAAW,SAAUP,GAAK,OAAQE,MAAMI,QAAQN,GAAKA,EAAE,GAAKA,CAAG","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
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,KAAI,SAAUC,GAEnC,OADWA,EAAGC,IAEtB,IACQC,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,CAC5C,KAQI,OAAIC,GAAiBA,EAAcO,OACxBC,EAAeR,GAEnBQ,EAAeP,EAAoBR,GAC9C","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"correctFocus.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/utils/correctFocus.js"],"sourcesContent":["import { isRadioElement } from './is';\nvar findSelectedRadio = function (node, nodes) {\n return nodes\n .filter(isRadioElement)\n .filter(function (el) { return el.name === node.name; })\n .filter(function (el) { return el.checked; })[0] || node;\n};\nexport var correctNode = function (node, nodes) {\n if (isRadioElement(node) && node.name) {\n return findSelectedRadio(node, nodes);\n }\n return node;\n};\n/**\n * giving a set of radio inputs keeps only selected (tabbable) ones\n * @param nodes\n */\nexport var correctNodes = function (nodes) {\n // IE11 has no Set(array) constructor\n var resultSet = new Set();\n nodes.forEach(function (node) { return resultSet.add(correctNode(node, nodes)); });\n // using filter to support IE11\n return nodes.filter(function (node) { return resultSet.has(node); });\n};\n"],"names":["correctNode","node","nodes","isRadioElement","name","filter","el","checked","findSelectedRadio","correctNodes","resultSet","Set","forEach","add","has"],"mappings":"yCACA,IAMWA,EAAc,SAAUC,EAAMC,GACrC,OAAIC,EAAeF,IAASA,EAAKG,KAPb,SAAUH,EAAMC,GACpC,OAAOA,EACFG,OAAOF,GACPE,QAAO,SAAUC,GAAM,OAAOA,EAAGF,OAASH,EAAKG,QAC/CC,QAAO,SAAUC,GAAM,OAAOA,EAAGC,WAAY,IAAMN,CAC5D,CAGeO,CAAkBP,EAAMC,GAE5BD,CACX,EAKWQ,EAAe,SAAUP,GAEhC,IAAIQ,EAAY,IAAIC,IAGpB,OAFAT,EAAMU,SAAQ,SAAUX,GAAQ,OAAOS,EAAUG,IAAIb,EAAYC,EAAMC,GAAU,IAE1EA,EAAMG,QAAO,SAAUJ,GAAQ,OAAOS,EAAUI,IAAIb,EAAM,GACrE","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
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.
|
|
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
2
|
//# sourceMappingURL=firstFocus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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]}
|
|
@@ -0,0 +1 @@
|
|
|
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,GAAU,WAAc,OAAOH,EAAcI,cAAcL,YACrGF,EAAiBG,EAAcI,cAAcL,UAC7CC,CANT,CAOL","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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","isNotAGuard","isDefined","x"],"mappings":"qDACA,IAYIA,EAAgB,SAAUC,GAE1B,OAAOA,EAAKC,YAAcD,EAAKC,WAAWC,WAAaC,KAAKC,uBAEpDJ,EAAKC,WAAWI,KAClBL,EAAKC,UACf,EACIK,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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,YAAgB,EAC5IC,EAAc,SAAUhD,GAAQ,OAAQ4C,EAAQ5C,EAAS,EACzDiD,EAAY,SAAUC,GAAK,OAAOJ,QAAQI,EAAG","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
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,CAEd,CACD,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,SAAQ,SAAUC,GAC1CJ,EAAYjB,EAAgBiB,GAAaI,EAAOA,IAAUJ,EAC1DL,EAAaM,OAAOC,SAASC,SAAQ,SAAUE,GAC3C,IAAIC,EAASvB,EAAgBgB,EAAeM,GACxCC,IAEIN,GADCA,GAAaO,EAASD,EAAQN,GACnBM,EAGAvB,EAAgBuB,EAAQN,GAGxD,GACA,IAEWA,CACX,EAMWQ,EAA0B,SAAUC,EAASC,GACpD,OAAOD,EAAQE,QAAO,SAAUC,EAAKlC,GAAQ,OAAOkC,EAAIC,OAAOC,EAAqBpC,EAAMgC,GAAoB,GAAE,GACpH","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
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,GACV,CACD,MAAOC,GACH,MACH,CACL","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabOrder.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/utils/tabOrder.js"],"sourcesContent":["import { toArray } from './array';\nexport var tabSort = function (a, b) {\n var 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,OAAQ,CAEf,CACD,OAAOC,GAAWC,CACtB,EAYWE,EAAkB,SAAUC,EAAOC,EAAgBC,GAC1D,OAAOC,EAAQH,GACVI,KAAI,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,IAA4B,IAAdR,GAAoBW,EAAKG,SAAW,CAAE,GAAEC,WAAa,GAAK,EAAKf,EAEnG,IACSgB,QAAO,SAAUC,GAAQ,OAAQV,GAAkBU,EAAKjB,UAAY,KACpEkB,KAAKxB,EACd","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabUtils.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/utils/tabUtils.js"],"sourcesContent":["import { FOCUS_AUTO } from '../constants';\nimport { toArray } from './array';\nimport { tabbables } from './tabbables';\nvar queryTabbables = tabbables.join(',');\nvar queryGuardTabbables = \"\".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,QAAO,SAAUC,EAAKC,GACzE,OAAOD,EAAIR,OAAOS,EAAMC,QAAQP,EAAaJ,EAAsBH,GAAkB,CAACa,GAAS,GAAIR,EAA2BQ,GACjI,GAAE,GACP,EASWE,EAAgB,SAAUC,EAAST,GAC1C,OAAOS,EAAQL,QAAO,SAAUC,EAAKN,GACjC,IAAIW,EACAC,EAAyBb,EAA2BC,EAAQC,GAC5DY,GAAwBF,EAAK,IAAIb,OAAOgB,MAAMH,EAAIC,EAAuBG,KAAI,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,EAAc,KACtJ,OAAOK,EAAIR,OAEXe,EAEAb,EAAOqB,WACDnB,EAAQF,EAAOqB,WAAWC,iBAAiB5B,IAAiB6B,QAAO,SAAUP,GAAQ,OAAOA,IAAShB,CAAO,IAC5G,GACT,GAAE,GACP,EAKWwB,EAA0B,SAAUxB,GAC3C,IAAIyB,EAAczB,EAAOsB,iBAAiB,IAAIxB,OAAO4B,EAAY,MACjE,OAAOxB,EAAQuB,GACVV,KAAI,SAAUC,GAAQ,OAAOP,EAAc,CAACO,OAC5CX,QAAO,SAAUC,EAAKqB,GAAS,OAAOrB,EAAIR,OAAO6B,KAAW,GACrE","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
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]}
|
|
@@ -0,0 +1 @@
|
|
|
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,uDAEnB,CAMD,OAAO,SAAcC,GACnB,GAA6B,eAAzBJ,QAAQC,IAAIC,UACkB,mBAArBE,EACT,MAAM,IAAID,MAAM,sDAIpB,IACIE,EADAC,EAAmB,GAGvB,SAASC,IACPF,EAAQP,EAAmBQ,EAAiBE,KAAI,SAAUC,GACxD,OAAOA,EAASC,KACjB,KACDX,EAA0BM,EAC3B,CAED,IAAIM,EAA0B,SAAUC,GAGtC,SAASD,IACP,OAAOC,EAAeC,MAAMC,KAAMC,YAAcD,IACjD,CAJDE,EAAeL,EAAYC,GAO3BD,EAAWM,KAAO,WAChB,OAAOZ,CACf,EAEM,IAAIa,EAASP,EAAWQ,UAqBxB,OAnBAD,EAAOE,kBAAoB,WACzBd,EAAiBe,KAAKP,MACtBP,GACR,EAEMW,EAAOI,mBAAqB,WAC1Bf,GACR,EAEMW,EAAOK,qBAAuB,WAC5B,IAAIC,EAAQlB,EAAiBmB,QAAQX,MACrCR,EAAiBoB,OAAOF,EAAO,GAC/BjB,GACR,EAEMW,EAAOS,OAAS,WACd,OAAoBC,EAAMC,cAAczB,EAAkBU,KAAKJ,MACvE,EAEaC,CACR,CAlC6B,CAkC5BmB,GAIF,OAFAC,EAAgBpB,EAAY,cAAe,cAzD7C,SAAwBP,GACtB,OAAOA,EAAiB4B,aAAe5B,EAAiB6B,MAAQ,WACjE,CAuD4DC,CAAe9B,GAAoB,KAEvFO,CACX,CACA","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import r from"../../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js";import e from"../../../@babel/runtime/helpers/esm/extends.js";import*as o from"react";import s from"./Lock.js";import t from"./Trap.js";var p=o.forwardRef((function(r,p){return o.createElement(s,e({sideCar:t,ref:p},r))})),
|
|
1
|
+
import r from"../../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js";import e from"../../../@babel/runtime/helpers/esm/extends.js";import*as o from"react";import s from"./Lock.js";import t from"./Trap.js";var p=o.forwardRef((function(r,p){return o.createElement(s,e({sideCar:t,ref:p},r))})),m=s.propTypes||{};m.sideCar;var a=r(m,["sideCar"]);p.propTypes="production"!==process.env.NODE_ENV?a:{};export{p as default};
|
|
2
2
|
//# sourceMappingURL=Combination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Combination.js","sources":["../../../../../node_modules/react-focus-lock/dist/es2015/Combination.js"],"sourcesContent":["import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport FocusLockUI from './Lock';\nimport FocusTrap from './Trap';\nvar FocusLockCombination = /*#__PURE__*/React.forwardRef(function FocusLockUICombination(props, ref) {\n return /*#__PURE__*/React.createElement(FocusLockUI, _extends({\n sideCar: FocusTrap,\n ref: ref\n }, props));\n});\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","React","forwardRef","props","ref","createElement","FocusLockUI","_extends","sideCar","FocusTrap","_ref","propTypes","_objectWithoutPropertiesLoose","process","env","NODE_ENV"],"mappings":"2NAKG,IAACA,EAAoCC,EAAMC,YAAW,SAAgCC,EAAOC,GAC9F,OAAoBH,EAAMI,cAAcC,EAAaC,EAAS,CAC5DC,QAASC,EACTL,IAAKA,GACJD,GACL,IACIO,EAAOJ,EAAYK,WAAa,GACxBD,EAAKF,QACf,IAAAG,EAAYC,EAA8BF,EAAM,CAAC,YACnDV,EAAqBW,UAAqC,eAAzBE,QAAQC,IAAIC,SAA4BJ,EAAY,CAAE","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FocusGuard.js","sources":["../../../../../node_modules/react-focus-lock/dist/es2015/FocusGuard.js"],"sourcesContent":["import * as React 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(React.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]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e from"../../../@babel/runtime/helpers/esm/extends.js";import*as t from"react";import{node as o,bool as r,oneOfType as s,object as n,func as c,string as a,arrayOf as u,any as i}from"prop-types";import{FOCUS_DISABLED as d,FOCUS_GROUP as l}from"../../../focus-lock/dist/es2015/constants.js";import{hiddenGuard as f}from"./FocusGuard.js";import{mediumFocus as m,mediumSidecar as v,mediumBlur as p}from"./medium.js";import{focusScope as b}from"./scope.js";import{useMergeRefs as F}from"../../../use-callback-ref/dist/es2015/useMergeRef.js";var y=[],h=t.forwardRef((function(o,r){var s,n=t.useState(),c=n[0],a=n[1],u=t.useRef(),i=t.useRef(!1),h=t.useRef(null),k=t.useState({})[1],E=o.children,g=o.disabled,w=void 0!==g&&g,x=o.noFocusGuards,C=void 0!==x&&x,R=o.persistentFocus,j=void 0!==R&&R,N=o.crossFrame,P=void 0===N||N,S=o.autoFocus,D=void 0===S||S,I=o.allowTextSelection,L=o.group,O=o.className,M=o.whiteList,T=o.hasPositiveIndices,A=o.shards,G=void 0===A?y:A,V=o.as,_=void 0===V?"div":V,q=o.lockProps,B=void 0===q?{}:q,z=o.sideCar,H=o.returnFocus,J=void 0!==H&&H,K=o.focusOptions,Q=o.onActivation,U=o.onDeactivation,W=t.useState({})[0],X=t.useCallback((function(e){var t=e.captureFocusRestore;if(!h.current){var o,r=null==(o=document)?void 0:o.activeElement;h.current=r,r!==document.body&&(h.current=t(r))}u.current&&Q&&Q(u.current),i.current=!0,k()}),[Q]),Y=t.useCallback((function(){i.current=!1,U&&U(u.current),k()}),[U]),Z=t.useCallback((function(e){var t=h.current;if(t){var o=("function"==typeof t?t():t)||document.body,r="function"==typeof J?J(o):J;if(r){var s="object"==typeof r?r:void 0;h.current=null,e?Promise.resolve().then((function(){return o.focus(s)})):o.focus(s)}}}),[J]),$=t.useCallback((function(e){i.current&&m.useMedium(e)}),[]),ee=p.useMedium,te=t.useCallback((function(e){u.current!==e&&(u.current=e,a(e))}),[]);"production"!==process.env.NODE_ENV&&(void 0!==I&&console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"),t.useEffect((function(){u.current||"string"==typeof _||console.error("FocusLock: could not obtain ref to internal node")}),[]));var oe=e(((s={})[d]=w&&"disabled",s[l]=L,s),B),re=!0!==C,se=re&&"tail"!==C,ne=F([r,te]),ce=t.useMemo((function(){return{observed:u,shards:G,enabled:!w,active:i.current}}),[w,i.current,G,c]);return t.createElement(t.Fragment,null,re&&[t.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:w?-1:0,style:f}),T?t.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:w?-1:1,style:f}):null],!w&&t.createElement(z,{id:W,sideCar:v,observed:c,disabled:w,persistentFocus:j,crossFrame:P,autoFocus:D,whiteList:M,shards:G,onActivation:X,onDeactivation:Y,returnFocus:Z,focusOptions:K}),t.createElement(_,e({ref:ne},oe,{className:O,onBlur:ee,onFocus:$}),t.createElement(b.Provider,{value:ce},E)),se&&t.createElement("div",{"data-focus-guard":!0,tabIndex:w?-1:0,style:f}))}));h.propTypes="production"!==process.env.NODE_ENV?{children:o,disabled:r,returnFocus:s([r,n,c]),focusOptions:n,noFocusGuards:r,hasPositiveIndices:r,allowTextSelection:r,autoFocus:r,persistentFocus:r,crossFrame:r,group:a,className:a,whiteList:c,shards:u(i),as:s([a,c,n]),lockProps:n,onActivation:c,onDeactivation:c,sideCar:i.isRequired}:{};export{h as default};
|
|
2
|
+
//# sourceMappingURL=Lock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Lock.js","sources":["../../../../../node_modules/react-focus-lock/dist/es2015/Lock.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { node, bool, string, any, arrayOf, oneOfType, object, func } from 'prop-types';\nimport * as constants from 'focus-lock/constants';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { hiddenGuard } from './FocusGuard';\nimport { mediumFocus, mediumBlur, mediumSidecar } from './medium';\nimport { focusScope } from './scope';\nvar emptyArray = [];\nvar FocusLock = /*#__PURE__*/React.forwardRef(function FocusLockUI(props, parentRef) {\n var _extends2;\n var _React$useState = React.useState(),\n realObserved = _React$useState[0],\n setObserved = _React$useState[1];\n var observed = React.useRef();\n var isActive = React.useRef(false);\n var originalFocusedElement = React.useRef(null);\n var _React$useState2 = React.useState({}),\n update = _React$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 _React$useState3 = React.useState({}),\n id = _React$useState3[0];\n var onActivation = React.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 = React.useCallback(function () {\n isActive.current = false;\n if (onDeactivationCallback) {\n onDeactivationCallback(observed.current);\n }\n update();\n }, [onDeactivationCallback]);\n var returnFocus = React.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 = React.useCallback(function (event) {\n if (isActive.current) {\n mediumFocus.useMedium(event);\n }\n }, []);\n var onBlur = mediumBlur.useMedium;\n var setObserveNode = React.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 React.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[constants.FOCUS_DISABLED] = disabled && 'disabled', _extends2[constants.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 = React.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(React.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 }), /*#__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","React","forwardRef","props","parentRef","_extends2","_React$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","constants.FOCUS_DISABLED","constants.FOCUS_GROUP","hasLeadingGuards","hasTailingGuards","mergedRef","useMergeRefs","focusScopeValue","useMemo","enabled","active","createElement","Fragment","key","tabIndex","style","hiddenGuard","mediumSidecar","ref","focusScope","Provider","value","propTypes","node","bool","one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ACpBjF,mBAAoBiF,EACpBlF,UAAWkF,EACXtF,gBAAiBsF,EACjBpF,WAAYoF,EACZhF,MAAOoF,EACPnF,UAAWmF,EACXlF,UAAWiF,EACX9E,OAAQgF,EAAQC,GAChB/E,GAAI0E,EAAU,CAACG,EAAQD,EAAMD,IAC7BxE,UAAWwE,EACX/D,aAAcgE,EACd9D,eAAgB8D,EAChBtE,QAASyE,EAAIC,YACX,CAAE","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"react";import e from"prop-types";import t from"../../../react-clientside-effect/lib/index.es.js";import{focusInside as n}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{focusNextElement as s,focusPrevElement as c,focusFirstElement as d,focusLastElement as a}from"../../../focus-lock/dist/es2015/sibling.js";import{deferAction as f,extractRef as m}from"./util.js";import{mediumFocus as l,mediumBlur as v,mediumEffect as p}from"./medium.js";var E=function(){return document&&document.activeElement===document.body||o()},b=null,g=null,j=null,h=!1,k=function(){return!0};function w(e,t,n,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+=n)!==t);r&&(r.node.tabIndex=0)}var F=function e(t,n,o){return n&&(n.host===t&&(!n.activeElement||o.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,o))},I=function(){var e,t=!1;if(b){var o=b,i=o.observed,s=o.persistentFocus,c=o.autoFocus,d=o.shards,a=o.crossFrame,f=o.focusOptions,l=i||j&&j.portaledElement,v=document&&document.activeElement;if(l){var p=[l].concat(d.map(m).filter(Boolean));if(v&&!function(e){return(b.whiteList||k)(e)}(v)||(s||(a?Boolean(h):"meanwhile"===h)||!E()||!g&&c)&&(l&&!(n(p)||v&&function(e,t){return t.some((function(t){return F(e,t,t)}))}(v,p)||(e=v,j&&j.portaledElement===e))&&(document&&!g&&v&&!c?(v.blur&&v.blur(),document.body.focus()):(t=u(p,g,{focusOptions:f}),j={})),h=!1,g=document&&document.activeElement),document&&v!==document.activeElement&&document.querySelector("[data-focus-auto-guard]")){var I=document&&document.activeElement,L=r(p),x=L.map((function(e){return e.node})).indexOf(I);x>-1&&(L.filter((function(e){var t=e.guard,n=e.node;return t&&n.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),w(x,L.length,1,L),w(x,-1,-1,L))}}}return t},L=function(e){I()&&e&&(e.stopPropagation(),e.preventDefault())},x=function(){return f(I)};"production"===process.env.NODE_ENV||e.node.isRequired;var N=function(){h="just",f((function(){h="meanwhile"}))};var y={moveFocusInside:u,focusInside:n,focusNextElement:s,focusPrevElement:c,focusFirstElement:d,focusLastElement:a,captureFocusRestore:i};l.assignSyncMedium((function(e){var t=e.target,n=e.currentTarget;n.contains(t)||(j={observerNode:n,portaledElement:t})})),v.assignMedium(x),p.assignMedium((function(e){return e(y)}));var A=t((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var t=e.slice(-1)[0];t&&!b&&(document.addEventListener("focusin",L),document.addEventListener("focusout",x),window.addEventListener("blur",N));var n=b,o=n&&t&&t.id===n.id;b=t,n&&!o&&(n.onDeactivation(),e.filter((function(e){return e.id===n.id})).length||n.returnFocus(!t)),t?(g=null,o&&n.observed===t.observed||t.onActivation(y),I(),f(I)):(document.removeEventListener("focusin",L),document.removeEventListener("focusout",x),window.removeEventListener("blur",N),g=null)}))((function(){return null}));export{A as default};
|
|
2
|
+
//# sourceMappingURL=Trap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Trap.js","sources":["../../../../../node_modules/react-focus-lock/dist/es2015/Trap.js"],"sourcesContent":["import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport withSideEffect from 'react-clientside-effect';\nimport { moveFocusInside, focusInside, focusIsHidden, expandFocusableNodes, 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 lastPortaledElement = null;\nvar focusWasOutsideWindow = 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 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 var workingNode = observed || lastPortaledElement && lastPortaledElement.portaledElement;\n var activeElement = document && document.activeElement;\n if (workingNode) {\n var workingArea = [workingNode].concat(shards.map(extractRef).filter(Boolean));\n if (!activeElement || focusWhitelisted(activeElement)) {\n if (persistentFocus || focusWasOutside(crossFrame) || !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 focusWasOutsideWindow = false;\n lastActiveFocus = document && document.activeElement;\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 (_ref) {\n var node = _ref.node;\n return node;\n }).indexOf(newActiveElement);\n if (focusedIndex > -1) {\n allNodes.filter(function (_ref2) {\n var guard = _ref2.guard,\n node = _ref2.node;\n return guard && node.dataset.focusAutoGuard;\n }).forEach(function (_ref3) {\n var node = _ref3.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(_ref4) {\n var children = _ref4.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 onWindowBlur = function onWindowBlur() {\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('blur', onWindowBlur);\n};\nvar detachHandler = function detachHandler() {\n document.removeEventListener('focusin', onTrap);\n document.removeEventListener('focusout', onBlur);\n window.removeEventListener('blur', onWindowBlur);\n};\nfunction reducePropsToState(propsList) {\n return propsList.filter(function (_ref5) {\n var disabled = _ref5.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 (_ref6) {\n var id = _ref6.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":["isFreeFocus","document","activeElement","body","focusIsHidden","lastActiveTrap","lastActiveFocus","lastPortaledElement","focusWasOutsideWindow","defaultWhitelist","autoGuard","startIndex","end","step","allNodes","lastGuard","i","item","guard","node","dataset","focusAutoGuard","lockItem","tabIndex","checkInHost","check","el","boundary","host","contains","parentNode","activateTrap","element","result","_lastActiveTrap","observed","persistentFocus","autoFocus","shards","crossFrame","focusOptions","workingNode","portaledElement","workingArea","concat","map","extractRef","filter","Boolean","whiteList","focusWhitelisted","focusInside","some","area","withinHost","blur","focus","moveFocusInside","querySelector","newActiveElement","expandFocusableNodes","focusedIndex","_ref","indexOf","_ref2","forEach","_ref3","removeAttribute","length","onTrap","event","stopPropagation","preventDefault","onBlur","deferAction","process","env","NODE_ENV","PropTypes","isRequired","onWindowBlur","focusLockAPI","focusNextElement","focusPrevElement","focusFirstElement","focusLastElement","captureFocusRestore","mediumFocus","assignSyncMedium","source","target","currentNode","currentTarget","observerNode","mediumBlur","assignMedium","mediumEffect","cb","FocusTrap","withSideEffect","propsList","_ref5","disabled","traps","trap","slice","addEventListener","window","lastTrap","sameTrap","id","onDeactivation","_ref6","returnFocus","onActivation","removeEventListener"],"mappings":"2xBAMA,IAGIA,EAAc,WAChB,OAHOC,UAAYA,SAASC,gBAAkBD,SAASE,MAG/BC,GAC1B,EACIC,EAAiB,KACjBC,EAAkB,KAClBC,EAAsB,KACtBC,GAAwB,EACxBC,EAAmB,WACrB,OAAO,CACT,EAaA,SAASC,EAAUC,EAAYC,EAAKC,EAAMC,GACxC,IAAIC,EAAY,KACZC,EAAIL,EACR,EAAG,CACD,IAAIM,EAAOH,EAASE,GACpB,GAAIC,EAAKC,MACH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AK,EAAWC,aAAatB,GACxBuB,EAAaD,cAAa,SAAUE,GAClC,OAAOA,EAAGhB,EACZ,IACA,IAAeiB,EAAAC,GAjDf,SAA4BC,GAC1B,OAAOA,EAAUrD,QAAO,SAAUsD,GAEhC,OADeA,EAAMC,QAEzB,GACA,IAUA,SAAmCC,GACjC,IAAIC,EAAOD,EAAME,OAAO,GAAG,GACvBD,IAASnG,IA1BbJ,SAASyG,iBAAiB,UAAWrC,GACrCpE,SAASyG,iBAAiB,WAAYjC,GACtCkC,OAAOD,iBAAiB,OAAQ1B,IA2BhC,IAAI4B,EAAWvG,EACXwG,EAAWD,GAAYJ,GAAQA,EAAKM,KAAOF,EAASE,GACxDzG,EAAiBmG,EACbI,IAAaC,IACfD,EAASG,iBACJR,EAAMxD,QAAO,SAAUiE,GAE1B,OADSA,EAAMF,KACDF,EAASE,EACxB,IAAE1C,QACDwC,EAASK,aAAaT,IAGtBA,GACFlG,EAAkB,KACbuG,GAAYD,EAASzE,WAAaqE,EAAKrE,UAC1CqE,EAAKU,aAAajC,GAEpBlD,IACA2C,EAAY3C,KA1Cd9B,SAASkH,oBAAoB,UAAW9C,GACxCpE,SAASkH,oBAAoB,WAAY1C,GACzCkC,OAAOQ,oBAAoB,OAAQnC,GA2CjC1E,EAAkB,KAEtB,GAMe6F,EA9EI,WACjB,OAAO,IACT","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,IAAI,SAAUC,GAGlD,MAAO,CACLC,OAHWD,EAAKC,OAIhBC,cAHgBF,EAAKE,cAKzB,IACWC,EAAaJ,IACbK,EAAeL,IACfM,EAAgBC,EAAoB,CAC7CC,OAAO,EACPC,IAAyB,oBAAbC","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
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]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.js","sources":["../../../../../node_modules/react-focus-lock/dist/es2015/util.js"],"sourcesContent":["export function deferAction(action) {\n setTimeout(action, 1);\n}\nexport var inlineProp = function inlineProp(name, value) {\n var obj = {};\n obj[name] = value;\n return obj;\n};\nexport var extractRef = function extractRef(ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};"],"names":["deferAction","action","setTimeout","extractRef","ref","current"],"mappings":"AAAO,SAASA,EAAYC,GAC1BC,WAAWD,EAAQ,EACrB,CAMU,IAACE,EAAa,SAAoBC,GAC1C,OAAOA,GAAO,YAAaA,EAAMA,EAAIC,QAAUD,CACjD","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as e from"react";var t=Object.defineProperty,i=(e,i,s)=>((e,i,s)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s)(e,"symbol"!=typeof i?i+"":i,s),s=new Map,n=new WeakMap,o=0;function r(e){return Object.keys(e).sort().filter((t=>void 0!==e[t])).map((t=>{return`${t}_${"root"===t?(i=e.root,i?(n.has(i)||(o+=1,n.set(i,o.toString())),n.get(i)):"0"):e[t]}`;var i})).toString()}function h(e,t,i={},n=undefined){if(void 0===window.IntersectionObserver&&void 0!==n){const s=e.getBoundingClientRect();return t(n,{isIntersecting:n,target:e,intersectionRatio:"number"==typeof i.threshold?i.threshold:0,time:0,boundingClientRect:s,intersectionRect:s,rootBounds:s}),()=>{}}const{id:o,observer:h,elements:l}=function(e){const t=r(e);let i=s.get(t);if(!i){const n=new Map;let o;const r=new IntersectionObserver((t=>{t.forEach((t=>{var i;const s=t.isIntersecting&&o.some((e=>t.intersectionRatio>=e));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=s),null==(i=n.get(t.target))||i.forEach((e=>{e(s,t)}))}))}),e);o=r.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),i={id:t,observer:r,elements:n},s.set(t,i)}return i}(i),a=l.get(e)||[];return l.has(e)||l.set(e,a),a.push(t),h.observe(e),function(){a.splice(a.indexOf(t),1),0===a.length&&(l.delete(e),h.unobserve(e)),0===l.size&&(h.disconnect(),s.delete(o))}}var l=class extends e.Component{constructor(e){super(e),i(this,"node",null),i(this,"_unobserveCb",null),i(this,"handleNode",(e=>{this.node&&(this.unobserve(),e||this.props.triggerOnce||this.props.skip||this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=e||null,this.observeNode()})),i(this,"handleChange",((e,t)=>{e&&this.props.triggerOnce&&this.unobserve(),function(e){return"function"!=typeof e.children}(this.props)||this.setState({inView:e,entry:t}),this.props.onChange&&this.props.onChange(e,t)})),this.state={inView:!!e.initialInView,entry:void 0}}componentDidMount(){this.unobserve(),this.observeNode()}componentDidUpdate(e){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold&&e.skip===this.props.skip&&e.trackVisibility===this.props.trackVisibility&&e.delay===this.props.delay||(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve()}observeNode(){if(!this.node||this.props.skip)return;const{threshold:e,root:t,rootMargin:i,trackVisibility:s,delay:n,fallbackInView:o}=this.props;this._unobserveCb=h(this.node,this.handleChange,{threshold:e,root:t,rootMargin:i,trackVisibility:s,delay:n},o)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:t}=this.props;if("function"==typeof t){const{inView:e,entry:i}=this.state;return t({inView:e,entry:i,ref:this.handleNode})}const{as:i,triggerOnce:s,threshold:n,root:o,rootMargin:r,onChange:h,skip:l,trackVisibility:a,delay:d,initialInView:p,fallbackInView:c,...u}=this.props;return e.createElement(i||"div",{ref:this.handleNode,...u},t)}};export{l as InView,h as observe};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/react-intersection-observer/dist/index.mjs"],"sourcesContent":["\"use client\";\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n\n// src/InView.tsx\nimport * as React from \"react\";\n\n// src/observe.ts\nvar observerMap = /* @__PURE__ */ new Map();\nvar RootIds = /* @__PURE__ */ new WeakMap();\nvar rootId = 0;\nvar unsupportedValue = void 0;\nfunction defaultFallbackInView(inView) {\n unsupportedValue = inView;\n}\nfunction getRootId(root) {\n if (!root) return \"0\";\n if (RootIds.has(root)) return RootIds.get(root);\n rootId += 1;\n RootIds.set(root, rootId.toString());\n return RootIds.get(root);\n}\nfunction optionsToId(options) {\n return Object.keys(options).sort().filter(\n (key) => options[key] !== void 0\n ).map((key) => {\n return `${key}_${key === \"root\" ? getRootId(options.root) : options[key]}`;\n }).toString();\n}\nfunction createObserver(options) {\n const id = optionsToId(options);\n let instance = observerMap.get(id);\n if (!instance) {\n const elements = /* @__PURE__ */ new Map();\n let thresholds;\n const observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n var _a;\n const inView = entry.isIntersecting && thresholds.some((threshold) => entry.intersectionRatio >= threshold);\n if (options.trackVisibility && typeof entry.isVisible === \"undefined\") {\n entry.isVisible = inView;\n }\n (_a = elements.get(entry.target)) == null ? void 0 : _a.forEach((callback) => {\n callback(inView, entry);\n });\n });\n }, options);\n thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);\n instance = {\n id,\n observer,\n elements\n };\n observerMap.set(id, instance);\n }\n return instance;\n}\nfunction observe(element, callback, options = {}, fallbackInView = unsupportedValue) {\n if (typeof window.IntersectionObserver === \"undefined\" && fallbackInView !== void 0) {\n const bounds = element.getBoundingClientRect();\n callback(fallbackInView, {\n isIntersecting: fallbackInView,\n target: element,\n intersectionRatio: typeof options.threshold === \"number\" ? options.threshold : 0,\n time: 0,\n boundingClientRect: bounds,\n intersectionRect: bounds,\n rootBounds: bounds\n });\n return () => {\n };\n }\n const { id, observer, elements } = createObserver(options);\n const callbacks = elements.get(element) || [];\n if (!elements.has(element)) {\n elements.set(element, callbacks);\n }\n callbacks.push(callback);\n observer.observe(element);\n return function unobserve() {\n callbacks.splice(callbacks.indexOf(callback), 1);\n if (callbacks.length === 0) {\n elements.delete(element);\n observer.unobserve(element);\n }\n if (elements.size === 0) {\n observer.disconnect();\n observerMap.delete(id);\n }\n };\n}\n\n// src/InView.tsx\nfunction isPlainChildren(props) {\n return typeof props.children !== \"function\";\n}\nvar InView = class extends React.Component {\n constructor(props) {\n super(props);\n __publicField(this, \"node\", null);\n __publicField(this, \"_unobserveCb\", null);\n __publicField(this, \"handleNode\", (node) => {\n if (this.node) {\n this.unobserve();\n if (!node && !this.props.triggerOnce && !this.props.skip) {\n this.setState({ inView: !!this.props.initialInView, entry: void 0 });\n }\n }\n this.node = node ? node : null;\n this.observeNode();\n });\n __publicField(this, \"handleChange\", (inView, entry) => {\n if (inView && this.props.triggerOnce) {\n this.unobserve();\n }\n if (!isPlainChildren(this.props)) {\n this.setState({ inView, entry });\n }\n if (this.props.onChange) {\n this.props.onChange(inView, entry);\n }\n });\n this.state = {\n inView: !!props.initialInView,\n entry: void 0\n };\n }\n componentDidMount() {\n this.unobserve();\n this.observeNode();\n }\n componentDidUpdate(prevProps) {\n if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) {\n this.unobserve();\n this.observeNode();\n }\n }\n componentWillUnmount() {\n this.unobserve();\n }\n observeNode() {\n if (!this.node || this.props.skip) return;\n const {\n threshold,\n root,\n rootMargin,\n trackVisibility,\n delay,\n fallbackInView\n } = this.props;\n this._unobserveCb = observe(\n this.node,\n this.handleChange,\n {\n threshold,\n root,\n rootMargin,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n },\n fallbackInView\n );\n }\n unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n this._unobserveCb = null;\n }\n }\n render() {\n const { children } = this.props;\n if (typeof children === \"function\") {\n const { inView, entry } = this.state;\n return children({ inView, entry, ref: this.handleNode });\n }\n const {\n as,\n triggerOnce,\n threshold,\n root,\n rootMargin,\n onChange,\n skip,\n trackVisibility,\n delay,\n initialInView,\n fallbackInView,\n ...props\n } = this.props;\n return React.createElement(\n as || \"div\",\n { ref: this.handleNode, ...props },\n children\n );\n }\n};\n\n// src/useInView.tsx\nimport * as React2 from \"react\";\nfunction useInView({\n threshold,\n delay,\n trackVisibility,\n rootMargin,\n root,\n triggerOnce,\n skip,\n initialInView,\n fallbackInView,\n onChange\n} = {}) {\n var _a;\n const [ref, setRef] = React2.useState(null);\n const callback = React2.useRef();\n const [state, setState] = React2.useState({\n inView: !!initialInView,\n entry: void 0\n });\n callback.current = onChange;\n React2.useEffect(\n () => {\n if (skip || !ref) return;\n let unobserve;\n unobserve = observe(\n ref,\n (inView, entry) => {\n setState({\n inView,\n entry\n });\n if (callback.current) callback.current(inView, entry);\n if (entry.isIntersecting && triggerOnce && unobserve) {\n unobserve();\n unobserve = void 0;\n }\n },\n {\n root,\n rootMargin,\n threshold,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n },\n fallbackInView\n );\n return () => {\n if (unobserve) {\n unobserve();\n }\n };\n },\n // We break the rule here, because we aren't including the actual `threshold` variable\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n // If the threshold is an array, convert it to a string, so it won't change between renders.\n Array.isArray(threshold) ? threshold.toString() : threshold,\n ref,\n root,\n rootMargin,\n triggerOnce,\n skip,\n trackVisibility,\n fallbackInView,\n delay\n ]\n );\n const entryTarget = (_a = state.entry) == null ? void 0 : _a.target;\n const previousEntryTarget = React2.useRef();\n if (!ref && entryTarget && !triggerOnce && !skip && previousEntryTarget.current !== entryTarget) {\n previousEntryTarget.current = entryTarget;\n setState({\n inView: !!initialInView,\n entry: void 0\n });\n }\n const result = [setRef, state.inView, state.entry];\n result.ref = result[0];\n result.inView = result[1];\n result.entry = result[2];\n return result;\n}\nexport {\n InView,\n defaultFallbackInView,\n observe,\n useInView\n};\n//# sourceMappingURL=index.mjs.map"],"names":["__defProp","Object","defineProperty","__publicField","obj","key","value","enumerable","configurable","writable","__defNormalProp","observerMap","Map","RootIds","WeakMap","rootId","optionsToId","options","keys","sort","filter","map","root","has","set","toString","get","observe","element","callback","fallbackInView","window","IntersectionObserver","bounds","getBoundingClientRect","isIntersecting","target","intersectionRatio","threshold","time","boundingClientRect","intersectionRect","rootBounds","id","observer","elements","instance","thresholds","entries","forEach","entry","_a","inView","some","trackVisibility","isVisible","Array","isArray","createObserver","callbacks","push","splice","indexOf","length","delete","unobserve","size","disconnect","InView","React","Component","constructor","props","super","this","node","triggerOnce","skip","setState","initialInView","observeNode","children","isPlainChildren","onChange","state","componentDidMount","componentDidUpdate","prevProps","rootMargin","delay","componentWillUnmount","_unobserveCb","handleChange","render","ref","handleNode","as","createElement"],"mappings":"wBACA,IAAIA,EAAYC,OAAOC,eAEnBC,EAAgB,CAACC,EAAKC,EAAKC,IADT,EAACF,EAAKC,EAAKC,IAAUD,KAAOD,EAAMJ,EAAUI,EAAKC,EAAK,CAAEE,YAAY,EAAMC,cAAc,EAAMC,UAAU,EAAMH,UAAWF,EAAIC,GAAOC,EACjHI,CAAgBN,EAAoB,iBAARC,EAAmBA,EAAM,GAAKA,EAAKC,GAMpGK,EAA8B,IAAIC,IAClCC,EAA0B,IAAIC,QAC9BC,EAAS,EAYb,SAASC,EAAYC,GACnB,OAAOhB,OAAOiB,KAAKD,GAASE,OAAOC,QAChCf,QAAyB,IAAjBY,EAAQZ,KACjBgB,KAAKhB,IACL,MAAO,GAAGA,KAAe,SAARA,GAXFiB,EAW6BL,EAAQK,KAVjDA,GACDT,EAAQU,IAAID,KAChBP,GAAU,EACVF,EAAQW,IAAIF,EAAMP,EAAOU,aAFKZ,EAAQa,IAAIJ,IADxB,KAU4CL,EAAQZ,KAXxE,IAAmBiB,CAW2D,IACzEG,UACL,CA6BA,SAASE,EAAQC,EAASC,EAAUZ,EAAU,CAAE,EAAEa,EA9C3B,WA+CrB,QAA2C,IAAhCC,OAAOC,2BAA2D,IAAnBF,EAA2B,CACnF,MAAMG,EAASL,EAAQM,wBAUvB,OATAL,EAASC,EAAgB,CACvBK,eAAgBL,EAChBM,OAAQR,EACRS,kBAAgD,iBAAtBpB,EAAQqB,UAAyBrB,EAAQqB,UAAY,EAC/EC,KAAM,EACNC,mBAAoBP,EACpBQ,iBAAkBR,EAClBS,WAAYT,IAEP,MAER,CACD,MAAMU,GAAEA,EAAEC,SAAEA,EAAQC,SAAEA,GA3CxB,SA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,EAAyB,CAClC,MAAM7B,OAAEA,EAAMF,MAAEA,GAAUwB,KAAKU,MAC/B,OAAOH,EAAS,CAAE7B,SAAQF,QAAO4C,IAAKpB,KAAKqB,YAC5C,CACD,MAAMC,GACJA,EAAEpB,YACFA,EAAWtC,UACXA,EAAShB,KACTA,EAAIkE,WACJA,EAAUL,SACVA,EAAQN,KACRA,EAAIvB,gBACJA,EAAemC,MACfA,EAAKV,cACLA,EAAajD,eACbA,KACG0C,GACDE,KAAKF,MACT,OAAOH,EAAM4B,cACXD,GAAM,MACN,CAAEF,IAAKpB,KAAKqB,cAAevB,GAC3BS,EAEH","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
var r=function(){return r=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r},r.apply(this,arguments)};function e(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(r);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(r,n[o])&&(t[n[o]]=r[n[o]])}return t}function t(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r}"function"==typeof SuppressedError&&SuppressedError;export{r as __assign,t as __makeTemplateObject,e as __rest};
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=tslib.es6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tslib.es6.js","sources":["../../../node_modules/tslib/tslib.es6.js"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","__makeTemplateObject","cooked","raw","defineProperty","value","SuppressedError"],"mappings":"AA+BU,IAACA,EAAW,WAQlB,OAPAA,EAAWC,OAAOC,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,IAE9E,OAAON,CACV,EACMH,EAASa,MAAMC,KAAMP,UAChC,EAEO,SAASQ,EAAOX,EAAGY,GACtB,IAAIb,EAAI,CAAA,EACR,IAAK,IAAIM,KAAKL,EAAOH,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,IAAMO,EAAEC,QAAQR,GAAK,IAC9EN,EAAEM,GAAKL,EAAEK,IACb,GAAS,MAALL,GAAqD,mBAAjCH,OAAOiB,sBACtB,KAAIb,EAAI,EAAb,IAAgBI,EAAIR,OAAOiB,sBAAsBd,GAAIC,EAAII,EAAED,OAAQH,IAC3DW,EAAEC,QAAQR,EAAEJ,IAAM,GAAKJ,OAAOS,UAAUS,qBAAqBP,KAAKR,EAAGK,EAAEJ,MACvEF,EAAEM,EAAEJ,IAAMD,EAAEK,EAAEJ,IAF4B,CAItD,OAAOF,CACX,CA0MO,SAASiB,EAAqBC,EAAQC,GAEzC,OADIrB,OAAOsB,eAAkBtB,OAAOsB,eAAeF,EAAQ,MAAO,CAAEG,MAAOF,IAAiBD,EAAOC,IAAMA,EAClGD,CACX,CA8DkD,mBAApBI,iBAAiCA","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assignRef.js","sources":["../../../../../node_modules/use-callback-ref/dist/es2015/assignRef.js"],"sourcesContent":["/**\n * Assigns a value for a given ref, no matter of the ref format\n * @param {RefObject} ref - a callback function or ref object\n * @param value - a new value\n *\n * @see https://github.com/theKashey/use-callback-ref#assignref\n * @example\n * const refObject = useRef();\n * const refFn = (ref) => {....}\n *\n * assignRef(refObject, \"refValue\");\n * assignRef(refFn, \"refValue\");\n */\nexport function assignRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n }\n else if (ref) {\n ref.current = value;\n }\n return ref;\n}\n"],"names":["assignRef","ref","value","current"],"mappings":"AAaO,SAASA,EAAUC,EAAKC,GAO3B,MANmB,mBAARD,EACPA,EAAIC,GAECD,IACLA,EAAIE,QAAUD,GAEXD,CACX","x_google_ignoreList":[0]}
|