@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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commands.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/commands.js"],"sourcesContent":["export var focusOn = function (target, focusOptions) {\n if ('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,GAC/B,UAAWD,GACXA,EAAOE,MAAMD,GAEb,kBAAmBD,GAAUA,EAAOG,eACpCH,EAAOG,cAAcD,OAE7B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/constants.js"],"sourcesContent":["/**\n * defines a focus group\n */\nexport var FOCUS_GROUP = 'data-focus-lock';\n/**\n * disables element discovery inside a group marked by key\n */\nexport var FOCUS_DISABLED = 'data-focus-lock-disabled';\n/**\n * allows uncontrolled focus within the marked area, effectively disabling focus lock for it's content\n */\nexport var FOCUS_ALLOW = 'data-no-focus-lock';\n/**\n * instructs autofocus engine to pick default autofocus inside a given node\n * can be set on the element or container\n */\nexport var FOCUS_AUTO = 'data-autofocus-inside';\n/**\n * instructs autofocus to ignore elements within a given node\n * can be set on the element or container\n */\nexport var FOCUS_NO_AUTOFOCUS = 'data-no-autofocus';\n"],"names":["FOCUS_GROUP","FOCUS_DISABLED","FOCUS_ALLOW","FOCUS_AUTO","FOCUS_NO_AUTOFOCUS"],"mappings":"AAGU,IAACA,EAAc,kBAIdC,EAAiB,2BAIjBC,EAAc,qBAKdC,EAAa,wBAKbC,EAAqB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"focusInside.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusInside.js"],"sourcesContent":["import { contains } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { getFirst, toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\nvar focusInFrame = function (frame, activeElement) { return frame === activeElement; };\nvar focusInsideIframe = function (topNode, activeElement) {\n return Boolean(toArray(topNode.querySelectorAll('iframe')).some(function (node) { return focusInFrame(node, activeElement); }));\n};\n/**\n * @returns {Boolean} true, if the current focus is inside given node or nodes.\n * Supports nodes hidden inside shadowDom\n */\nexport var focusInside = function (topNode, activeElement) {\n // const activeElement = document && getActiveElement();\n if (activeElement === void 0) { activeElement = getActiveElement(getFirst(topNode).ownerDocument); }\n if (!activeElement || (activeElement.dataset && activeElement.dataset.focusGuard)) {\n return false;\n }\n return getAllAffectedNodes(topNode).some(function (node) {\n return contains(node, activeElement) || focusInsideIframe(node, activeElement);\n });\n};\n"],"names":["focusInside","topNode","activeElement","getActiveElement","getFirst","ownerDocument","dataset","focusGuard","getAllAffectedNodes","some","node","contains","Boolean","toArray","querySelectorAll","frame","focusInFrame","focusInsideIframe"],"mappings":"qOAIA,IAQWA,EAAc,SAAUC,EAASC,GAGxC,YADsB,IAAlBA,IAA4BA,EAAgBC,EAAiBC,EAASH,GAASI,mBAC9EH,GAAkBA,EAAcI,SAAWJ,EAAcI,QAAQC,aAG/DC,EAAoBP,GAASQ,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"focusIsHidden.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusIsHidden.js"],"sourcesContent":["import { FOCUS_ALLOW } from './constants';\nimport { contains } from './utils/DOMutils';\nimport { toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\n/**\n * checks if focus is hidden FROM the focus-lock\n * ie contained inside a node focus-lock shall ignore\n *\n * This is a utility function coupled with {@link FOCUS_ALLOW} constant\n *\n * @returns {boolean} focus is currently is in \"allow\" area\n */\nexport var focusIsHidden = function (inDocument) {\n if (inDocument === void 0) { inDocument = document; }\n var activeElement = getActiveElement(inDocument);\n if (!activeElement) {\n return false;\n }\n // this does not support setting FOCUS_ALLOW within shadow dom\n return toArray(inDocument.querySelectorAll(\"[\".concat(FOCUS_ALLOW, \"]\"))).some(function (node) { return contains(node, activeElement); });\n};\n"],"names":["focusIsHidden","inDocument","document","activeElement","getActiveElement","toArray","querySelectorAll","concat","FOCUS_ALLOW","some","node","contains"],"mappings":"sMAYU,IAACA,EAAgB,SAAUC,QACd,IAAfA,IAAyBA,EAAaC,UAC1C,IAAIC,EAAgBC,EAAiBH,GACrC,QAAKE,GAIEE,EAAQJ,EAAWK,iBAAiB,IAAIC,OAAOC,EAAa,OAAOC,MAAK,SAAUC,GAAQ,OAAOC,EAASD,EAAMP,EAAe,GAC1I"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{newFocus as o,NEW_FOCUS as t}from"./solver.js";import{getFocusableNodes as r,getTabbableNodes as n}from"./utils/DOMutils.js";import{getAllAffectedNodes as e}from"./utils/all-affected.js";import{asArray as i,getFirst as u}from"./utils/array.js";import{pickAutofocus as f}from"./utils/auto-focus.js";import{getActiveElement as m}from"./utils/getActiveElement.js";import{isNotAGuard as s,isDefined as a}from"./utils/is.js";import{getTopCommonParent as l,allParentAutofocusables as c}from"./utils/parenting.js";var p=function(p,d){var v=m(i(p).length>0?document:u(p).ownerDocument),j=e(p).filter(s),g=l(v||p,p,j),w=new Map,M=r(j,w),h=n(j,w).filter((function(o){var t=o.node;return s(t)}));if(h[0]||(h=M)[0]){var y,D,E,k=r([g],w).map((function(o){return o.node})),x=(y=k,D=h,E=new Map,D.forEach((function(o){return E.set(o.node,o)})),y.map((function(o){return E.get(o)})).filter(a)),A=x.map((function(o){return o.node})),O=o(A,k,v,d);if(O===t){var b=f(M,A,c(j,w));return b?{node:b}:void console.warn("focus-lock: cannot find any node to move focus into")}return void 0===O?O:x[O]}};export{p as focusSolver};
|
|
2
|
-
//# sourceMappingURL=focusSolver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"focusSolver.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusSolver.js"],"sourcesContent":["import { NEW_FOCUS, newFocus } from './solver';\nimport { getFocusableNodes, getTabbableNodes } 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 = getTabbableNodes(entries, visibilityCache).filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n });\n if (!innerElements[0]) {\n innerElements = anyFocusable;\n if (!innerElements[0]) {\n return undefined;\n }\n }\n var outerNodes = getFocusableNodes([commonParent], visibilityCache).map(function (_a) {\n var node = _a.node;\n return node;\n });\n var orderedInnerElements = reorderNodes(outerNodes, innerElements);\n var innerNodes = orderedInnerElements.map(function (_a) {\n var node = _a.node;\n return node;\n });\n var newId = newFocus(innerNodes, outerNodes, activeElement, lastNode);\n if (newId === NEW_FOCUS) {\n var focusNode = pickAutofocus(anyFocusable, innerNodes, 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","getTabbableNodes","_a","node","srcNodes","dstNodes","remap","outerNodes","map","orderedInnerElements","forEach","entity","set","get","isDefined","innerNodes","newId","newFocus","NEW_FOCUS","focusNode","pickAutofocus","allParentAutofocusables","console","warn","undefined"],"mappings":"kgBAQA,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,EAAgBC,EAAiBX,EAASM,GAAiBJ,QAAO,SAAUU,GAC5E,IAAIC,EAAOD,EAAGC,KACd,OAAOV,EAAYU,EAC3B,IACI,GAAKH,EAAc,KACfA,EAAgBF,GACG,GAFvB,CAMA,IAjCyBM,EAAUC,EAC/BC,EAgCAC,EAAaR,EAAkB,CAACL,GAAeE,GAAiBY,KAAI,SAAUN,GAE9E,OADWA,EAAGC,IAEtB,IACQM,GArCqBL,EAqCeG,EArCLF,EAqCiBL,EApChDM,EAAQ,IAAIT,IAEhBQ,EAASK,SAAQ,SAAUC,GAAU,OAAOL,EAAMM,IAAID,EAAOR,KAAMQ,EAAU,IAEtEP,EAASI,KAAI,SAAUL,GAAQ,OAAOG,EAAMO,IAAIV,EAAQ,IAAEX,OAAOsB,IAiCpEC,EAAaN,EAAqBD,KAAI,SAAUN,GAEhD,OADWA,EAAGC,IAEtB,IACQa,EAAQC,EAASF,EAAYR,EAAYxB,EAAeD,GAC5D,GAAIkC,IAAUE,EAAW,CACrB,IAAIC,EAAYC,EAActB,EAAciB,EAAYM,EAAwB/B,EAASM,IACzF,OAAIuB,EACO,CAAEhB,KAAMgB,QAGfG,QAAQC,KAAK,sDAGpB,CACD,YAAcC,IAAVR,EACOA,EAEJP,EAAqBO,EAxB3B,CAyBL"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{getTabbableNodes as r}from"./utils/DOMutils.js";import{getAllAffectedNodes as t}from"./utils/all-affected.js";import{isNotAGuard as n,isGuard as i}from"./utils/is.js";import{getTopCommonParent as e}from"./utils/parenting.js";var o=function(o){var u=t(o).filter(n),f=e(o,o,u),a=new Map,m=r([f],a,!0),l=r(u,a).filter((function(r){var t=r.node;return n(t)})).map((function(r){return r.node}));return m.map((function(r){var t=r.node;return{node:t,index:r.index,lockItem:l.indexOf(t)>=0,guard:i(t)}}))};export{o as expandFocusableNodes};
|
|
2
|
-
//# sourceMappingURL=focusables.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"focusables.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusables.js"],"sourcesContent":["import { getTabbableNodes } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { isGuard, isNotAGuard } from './utils/is';\nimport { getTopCommonParent } from './utils/parenting';\n/**\n * @returns list of focusable elements inside a given top node\n * @see {@link getFocusableNodes} for lower level access\n */\nexport var expandFocusableNodes = function (topNode) {\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(topNode, topNode, entries);\n var visibilityCache = new Map();\n var outerNodes = getTabbableNodes([commonParent], visibilityCache, true);\n var innerElements = getTabbableNodes(entries, visibilityCache)\n .filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n })\n .map(function (_a) {\n var node = _a.node;\n return node;\n });\n return outerNodes.map(function (_a) {\n var node = _a.node, index = _a.index;\n return ({\n node: node,\n index: index,\n lockItem: innerElements.indexOf(node) >= 0,\n guard: isGuard(node),\n });\n });\n};\n"],"names":["expandFocusableNodes","topNode","entries","getAllAffectedNodes","filter","isNotAGuard","commonParent","getTopCommonParent","visibilityCache","Map","outerNodes","getTabbableNodes","innerElements","_a","node","map","index","lockItem","indexOf","guard","isGuard"],"mappings":"wOAQU,IAACA,EAAuB,SAAUC,GACxC,IAAIC,EAAUC,EAAoBF,GAASG,OAAOC,GAC9CC,EAAeC,EAAmBN,EAASA,EAASC,GACpDM,EAAkB,IAAIC,IACtBC,EAAaC,EAAiB,CAACL,GAAeE,GAAiB,GAC/DI,EAAgBD,EAAiBT,EAASM,GACzCJ,QAAO,SAAUS,GAClB,IAAIC,EAAOD,EAAGC,KACd,OAAOT,EAAYS,EAC3B,IACSC,KAAI,SAAUF,GAEf,OADWA,EAAGC,IAEtB,IACI,OAAOJ,EAAWK,KAAI,SAAUF,GAC5B,IAAIC,EAAOD,EAAGC,KACd,MAAQ,CACJA,KAAMA,EACNE,MAHwBH,EAAGG,MAI3BC,SAAUL,EAAcM,QAAQJ,IAAS,EACzCK,MAAOC,EAAQN,GAE3B,GACA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"moveFocusInside.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/moveFocusInside.js"],"sourcesContent":["import { focusOn } from './commands';\nimport { focusSolver } from './focusSolver';\nvar guardCount = 0;\nvar lockDisabled = false;\n/**\n * The main functionality of the focus-lock package\n *\n * Contains focus at a given node.\n * The last focused element will help to determine which element(first or last) should be focused.\n * The found element will be focused.\n *\n * This is one time action (move), not a persistent focus-lock\n *\n * HTML markers (see {@link import('./constants').FOCUS_AUTO} constants) can control autofocus\n * @see {@link focusSolver} for the same functionality without autofocus\n */\nexport var moveFocusInside = function (topNode, lastNode, options) {\n if (options === void 0) { options = {}; }\n var focusable = focusSolver(topNode, lastNode);\n // global local side effect to countain recursive lock activation and resolve focus-fighting\n if (lockDisabled) {\n return;\n }\n if (focusable) {\n /** +FOCUS-FIGHTING prevention **/\n if (guardCount > 2) {\n // we have recursive entered back the lock activation\n console.error('FocusLock: focus-fighting detected. Only one focus management system could be active. ' +\n 'See https://github.com/theKashey/focus-lock/#focus-fighting');\n lockDisabled = true;\n setTimeout(function () {\n lockDisabled = false;\n }, 1);\n return;\n }\n guardCount++;\n focusOn(focusable.node, options.focusOptions);\n guardCount--;\n }\n};\n"],"names":["guardCount","lockDisabled","moveFocusInside","topNode","lastNode","options","focusable","focusSolver","console","error","setTimeout","focusOn","node","focusOptions"],"mappings":"uFAEA,IAAIA,EAAa,EACbC,GAAe,EAaRC,EAAkB,SAAUC,EAASC,EAAUC,QACtC,IAAZA,IAAsBA,EAAU,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"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{correctNodes as i}from"./utils/correctFocus.js";import{pickFocusable as t}from"./utils/firstFocus.js";import{isGuard as r}from"./utils/is.js";var f="NEW_FOCUS",o=function(o,s,e,n){var a=o.length,d=o[0],x=o[a-1],O=r(e);if(!(e&&o.indexOf(e)>=0)){var u=void 0!==e?s.indexOf(e):-1,m=n?s.indexOf(n):u,v=n?o.indexOf(n):-1,c=u-m,h=s.indexOf(d),b=s.indexOf(x),l=i(s),p=(void 0!==e?l.indexOf(e):-1)-(n?l.indexOf(n):u),M=t(o,0),j=t(o,a-1);return-1===u||-1===v?f:!c&&v>=0?v:u<=h&&O&&Math.abs(c)>1?j:u>=b&&O&&Math.abs(c)>1?M:c&&Math.abs(p)>1?v:u<=h?j:u>b?M:c?Math.abs(c)>1?v:(a+v+c)%a:void 0}};export{f as NEW_FOCUS,o as newFocus};
|
|
2
|
-
//# sourceMappingURL=solver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"solver.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/solver.js"],"sourcesContent":["import { correctNodes } from './utils/correctFocus';\nimport { pickFocusable } from './utils/firstFocus';\nimport { isGuard } from './utils/is';\nexport var NEW_FOCUS = 'NEW_FOCUS';\n/**\n * Main solver for the \"find next focus\" question\n * @param innerNodes\n * @param outerNodes\n * @param activeElement\n * @param lastNode\n * @returns {number|string|undefined|*}\n */\nexport var newFocus = function (innerNodes, outerNodes, activeElement, lastNode) {\n var cnt = innerNodes.length;\n var firstFocus = innerNodes[0];\n var lastFocus = innerNodes[cnt - 1];\n var isOnGuard = isGuard(activeElement);\n // focus is inside\n if (activeElement && innerNodes.indexOf(activeElement) >= 0) {\n return undefined;\n }\n var activeIndex = activeElement !== undefined ? outerNodes.indexOf(activeElement) : -1;\n var lastIndex = lastNode ? outerNodes.indexOf(lastNode) : activeIndex;\n var lastNodeInside = lastNode ? innerNodes.indexOf(lastNode) : -1;\n var indexDiff = activeIndex - lastIndex;\n var firstNodeIndex = outerNodes.indexOf(firstFocus);\n var lastNodeIndex = outerNodes.indexOf(lastFocus);\n var correctedNodes = correctNodes(outerNodes);\n var correctedIndex = activeElement !== undefined ? correctedNodes.indexOf(activeElement) : -1;\n var correctedIndexDiff = correctedIndex - (lastNode ? correctedNodes.indexOf(lastNode) : activeIndex);\n var returnFirstNode = pickFocusable(innerNodes, 0);\n var returnLastNode = pickFocusable(innerNodes, cnt - 1);\n // new focus\n if (activeIndex === -1 || lastNodeInside === -1) {\n return NEW_FOCUS;\n }\n // old focus\n if (!indexDiff && lastNodeInside >= 0) {\n return lastNodeInside;\n }\n // first element\n if (activeIndex <= firstNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnLastNode;\n }\n // last element\n if (activeIndex >= lastNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnFirstNode;\n }\n // jump out, but not on the guard\n if (indexDiff && Math.abs(correctedIndexDiff) > 1) {\n return lastNodeInside;\n }\n // focus above lock\n if (activeIndex <= firstNodeIndex) {\n return returnLastNode;\n }\n // focus below lock\n if (activeIndex > lastNodeIndex) {\n return returnFirstNode;\n }\n // index is inside tab order, but outside Lock\n if (indexDiff) {\n if (Math.abs(indexDiff) > 1) {\n return lastNodeInside;\n }\n return (cnt + lastNodeInside + indexDiff) % cnt;\n }\n // do nothing\n return undefined;\n};\n"],"names":["NEW_FOCUS","newFocus","innerNodes","outerNodes","activeElement","lastNode","cnt","length","firstFocus","lastFocus","isOnGuard","isGuard","indexOf","activeIndex","undefined","lastIndex","lastNodeInside","indexDiff","firstNodeIndex","lastNodeIndex","correctedNodes","correctNodes","correctedIndexDiff","returnFirstNode","pickFocusable","returnLastNode","Math","abs"],"mappings":"qJAGU,IAACA,EAAY,YASZC,EAAW,SAAUC,EAAYC,EAAYC,EAAeC,GACnE,IAAIC,EAAMJ,EAAWK,OACjBC,EAAaN,EAAW,GACxBO,EAAYP,EAAWI,EAAM,GAC7BI,EAAYC,EAAQP,GAExB,KAAIA,GAAiBF,EAAWU,QAAQR,IAAkB,GAA1D,CAGA,IAAIS,OAAgCC,IAAlBV,EAA8BD,EAAWS,QAAQR,IAAkB,EACjFW,EAAYV,EAAWF,EAAWS,QAAQP,GAAYQ,EACtDG,EAAiBX,EAAWH,EAAWU,QAAQP,IAAa,EAC5DY,EAAYJ,EAAcE,EAC1BG,EAAiBf,EAAWS,QAAQJ,GACpCW,EAAgBhB,EAAWS,QAAQH,GACnCW,EAAiBC,EAAalB,GAE9BmB,QADmCR,IAAlBV,EAA8BgB,EAAeR,QAAQR,IAAkB,IACjDC,EAAWe,EAAeR,QAAQP,GAAYQ,GACrFU,EAAkBC,EAActB,EAAY,GAC5CuB,EAAiBD,EAActB,EAAYI,EAAM,GAErD,OAAqB,IAAjBO,IAA0C,IAApBG,EACfhB,GAGNiB,GAAaD,GAAkB,EACzBA,EAGPH,GAAeK,GAAkBR,GAAagB,KAAKC,IAAIV,GAAa,EAC7DQ,EAGPZ,GAAeM,GAAiBT,GAAagB,KAAKC,IAAIV,GAAa,EAC5DM,EAGPN,GAAaS,KAAKC,IAAIL,GAAsB,EACrCN,EAGPH,GAAeK,EACRO,EAGPZ,EAAcM,EACPI,EAGPN,EACIS,KAAKC,IAAIV,GAAa,EACfD,GAEHV,EAAMU,EAAiBC,GAAaX,OAJhD,CAzCC,CAiDL"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DOMutils.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/DOMutils.js"],"sourcesContent":["import { toArray } from './array';\nimport { isAutoFocusAllowedCached, isVisibleCached, notHiddenInput } from './is';\nimport { orderByTabIndex } from './tabOrder';\nimport { getFocusables, getParentAutofocusables } from './tabUtils';\n/**\n * given list of focusable elements keeps the ones user can interact with\n * @param nodes\n * @param visibilityCache\n */\nexport var filterFocusable = function (nodes, visibilityCache) {\n return toArray(nodes)\n .filter(function (node) { return isVisibleCached(visibilityCache, node); })\n .filter(function (node) { return notHiddenInput(node); });\n};\nexport var filterAutoFocusable = function (nodes, cache) {\n if (cache === void 0) { cache = new Map(); }\n return toArray(nodes).filter(function (node) { return isAutoFocusAllowedCached(cache, node); });\n};\n/**\n * !__WARNING__! Low level API.\n * @returns all tabbable nodes\n *\n * @see {@link getFocusableNodes} to get any focusable element\n *\n * @param topNodes - array of top level HTMLElements to search inside\n * @param visibilityCache - an cache to store intermediate measurements. Expected to be a fresh `new Map` on every call\n */\nexport var getTabbableNodes = function (topNodes, visibilityCache, withGuards) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards), visibilityCache), true, withGuards);\n};\n/**\n * !__WARNING__! Low level API.\n *\n * @returns anything \"focusable\", not only tabbable. The difference is in `tabIndex=-1`\n * (without guards, as long as they are not expected to be ever focused)\n *\n * @see {@link getTabbableNodes} to get only tabble nodes element\n *\n * @param topNodes - array of top level HTMLElements to search inside\n * @param visibilityCache - an cache to store intermediate measurements. Expected to be a fresh `new Map` on every call\n */\nexport var getFocusableNodes = function (topNodes, visibilityCache) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes), visibilityCache), false);\n};\n/**\n * return list of nodes which are expected to be auto-focused\n * @param topNode\n * @param visibilityCache\n */\nexport var parentAutofocusables = function (topNode, visibilityCache) {\n return filterFocusable(getParentAutofocusables(topNode), visibilityCache);\n};\n/*\n * Determines if element is contained in scope, including nested shadow DOMs\n */\nexport var contains = function (scope, element) {\n if (scope.shadowRoot) {\n return contains(scope.shadowRoot, element);\n }\n else {\n if (Object.getPrototypeOf(scope).contains !== undefined &&\n Object.getPrototypeOf(scope).contains.call(scope, element)) {\n return true;\n }\n return toArray(scope.children).some(function (child) {\n var _a;\n if (child instanceof HTMLIFrameElement) {\n var iframeBody = (_a = child.contentDocument) === null || _a === void 0 ? void 0 : _a.body;\n if (iframeBody) {\n return contains(iframeBody, element);\n }\n return false;\n }\n return contains(child, element);\n });\n }\n};\n"],"names":["filterFocusable","nodes","visibilityCache","toArray","filter","node","isVisibleCached","notHiddenInput","filterAutoFocusable","cache","Map","isAutoFocusAllowedCached","getTabbableNodes","topNodes","withGuards","orderByTabIndex","getFocusables","getFocusableNodes","parentAutofocusables","topNode","getParentAutofocusables","contains","scope","element","shadowRoot","undefined","Object","getPrototypeOf","call","children","some","child","_a","HTMLIFrameElement","iframeBody","contentDocument","body"],"mappings":"4PASU,IAACA,EAAkB,SAAUC,EAAOC,GAC1C,OAAOC,EAAQF,GACVG,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"all-affected.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/all-affected.js"],"sourcesContent":["import { FOCUS_DISABLED, FOCUS_GROUP } from '../constants';\nimport { asArray, toArray } from './array';\n/**\n * in case of multiple nodes nested inside each other\n * keeps only top ones\n * this is O(nlogn)\n * @param nodes\n * @returns {*}\n */\nvar filterNested = function (nodes) {\n var contained = new Set();\n var l = nodes.length;\n for (var i = 0; i < l; i += 1) {\n for (var j = i + 1; j < l; j += 1) {\n var position = nodes[i].compareDocumentPosition(nodes[j]);\n /* eslint-disable no-bitwise */\n if ((position & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0) {\n contained.add(j);\n }\n if ((position & Node.DOCUMENT_POSITION_CONTAINS) > 0) {\n contained.add(i);\n }\n /* eslint-enable */\n }\n }\n return nodes.filter(function (_, index) { return !contained.has(index); });\n};\n/**\n * finds top most parent for a node\n * @param node\n * @returns {*}\n */\nvar getTopParent = function (node) {\n return node.parentNode ? getTopParent(node.parentNode) : node;\n};\n/**\n * returns all \"focus containers\" inside a given node\n * @param node - node or nodes to look inside\n * @returns Element[]\n */\nexport var getAllAffectedNodes = function (node) {\n var nodes = asArray(node);\n return nodes.filter(Boolean).reduce(function (acc, currentNode) {\n var group = currentNode.getAttribute(FOCUS_GROUP);\n acc.push.apply(acc, (group\n ? filterNested(toArray(getTopParent(currentNode).querySelectorAll(\"[\".concat(FOCUS_GROUP, \"=\\\"\").concat(group, \"\\\"]:not([\").concat(FOCUS_DISABLED, \"=\\\"disabled\\\"])\"))))\n : [currentNode]));\n return acc;\n }, []);\n};\n"],"names":["getTopParent","node","parentNode","getAllAffectedNodes","asArray","filter","Boolean","reduce","acc","currentNode","group","getAttribute","FOCUS_GROUP","push","apply","nodes","contained","Set","l","length","i","j","position","compareDocumentPosition","Node","DOCUMENT_POSITION_CONTAINED_BY","add","DOCUMENT_POSITION_CONTAINS","_","index","has","filterNested","toArray","querySelectorAll","concat","FOCUS_DISABLED"],"mappings":"oHASA,IAuBIA,EAAe,SAAUC,GACzB,OAAOA,EAAKC,WAAaF,EAAaC,EAAKC,YAAcD,CAC7D,EAMWE,EAAsB,SAAUF,GAEvC,OADYG,EAAQH,GACPI,OAAOC,SAASC,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"array.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/array.js"],"sourcesContent":["/*\nIE11 support\n */\nexport var toArray = function (a) {\n var ret = Array(a.length);\n for (var i = 0; i < a.length; ++i) {\n ret[i] = a[i];\n }\n return ret;\n};\nexport var asArray = function (a) { return (Array.isArray(a) ? a : [a]); };\nexport var getFirst = function (a) { return (Array.isArray(a) ? a[0] : a); };\n"],"names":["toArray","a","ret","Array","length","i","asArray","isArray","getFirst"],"mappings":"AAGU,IAACA,EAAU,SAAUC,GAE3B,IADA,IAAIC,EAAMC,MAAMF,EAAEG,QACTC,EAAI,EAAGA,EAAIJ,EAAEG,SAAUC,EAC5BH,EAAIG,GAAKJ,EAAEI,GAEf,OAAOH,CACX,EACWI,EAAU,SAAUL,GAAK,OAAQE,MAAMI,QAAQN,GAAKA,EAAI,CAACA,EAAO,EAChEO,EAAW,SAAUP,GAAK,OAAQE,MAAMI,QAAQN,GAAKA,EAAE,GAAKA,CAAG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auto-focus.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/auto-focus.js"],"sourcesContent":["import { filterAutoFocusable } from './DOMutils';\nimport { pickFirstFocus } from './firstFocus';\nimport { getDataset } from './is';\nvar findAutoFocused = function (autoFocusables) {\n return function (node) {\n var _a;\n var autofocus = (_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.autofocus;\n return (\n // @ts-expect-error\n node.autofocus ||\n //\n (autofocus !== undefined && autofocus !== 'false') ||\n //\n autoFocusables.indexOf(node) >= 0);\n };\n};\nexport var pickAutofocus = function (nodesIndexes, orderedNodes, groups) {\n var nodes = nodesIndexes.map(function (_a) {\n var node = _a.node;\n return node;\n });\n var autoFocusable = filterAutoFocusable(nodes.filter(findAutoFocused(groups)));\n if (autoFocusable && autoFocusable.length) {\n return pickFirstFocus(autoFocusable);\n }\n return pickFirstFocus(filterAutoFocusable(orderedNodes));\n};\n"],"names":["pickAutofocus","nodesIndexes","orderedNodes","groups","autoFocusables","nodes","map","_a","node","autoFocusable","filterAutoFocusable","filter","autofocus","getDataset","undefined","indexOf","length","pickFirstFocus"],"mappings":"0IAGA,IAaWA,EAAgB,SAAUC,EAAcC,EAAcC,GAC7D,IAd4BC,EAcxBC,EAAQJ,EAAaK,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"correctFocus.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/correctFocus.js"],"sourcesContent":["import { isRadioElement } from './is';\nvar findSelectedRadio = function (node, nodes) {\n return nodes\n .filter(isRadioElement)\n .filter(function (el) { return el.name === node.name; })\n .filter(function (el) { return el.checked; })[0] || node;\n};\nexport var correctNode = function (node, nodes) {\n if (isRadioElement(node) && node.name) {\n return findSelectedRadio(node, nodes);\n }\n return node;\n};\n/**\n * giving a set of radio inputs keeps only selected (tabbable) ones\n * @param nodes\n */\nexport var correctNodes = function (nodes) {\n // IE11 has no Set(array) constructor\n var resultSet = new Set();\n nodes.forEach(function (node) { return resultSet.add(correctNode(node, nodes)); });\n // using filter to support IE11\n return nodes.filter(function (node) { return resultSet.has(node); });\n};\n"],"names":["correctNode","node","nodes","isRadioElement","name","filter","el","checked","findSelectedRadio","correctNodes","resultSet","Set","forEach","add","has"],"mappings":"yCACA,IAMWA,EAAc,SAAUC,EAAMC,GACrC,OAAIC,EAAeF,IAASA,EAAKG,KAPb,SAAUH,EAAMC,GACpC,OAAOA,EACFG,OAAOF,GACPE,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"firstFocus.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/firstFocus.js"],"sourcesContent":["import { correctNode } from './correctFocus';\nexport var pickFirstFocus = function (nodes) {\n if (nodes[0] && nodes.length > 1) {\n return correctNode(nodes[0], nodes);\n }\n return nodes[0];\n};\nexport var pickFocusable = function (nodes, index) {\n if (nodes.length > 1) {\n return nodes.indexOf(correctNode(nodes[index], nodes));\n }\n return index;\n};\n"],"names":["pickFirstFocus","nodes","length","correctNode","pickFocusable","index","indexOf"],"mappings":"gDACU,IAACA,EAAiB,SAAUC,GAClC,OAAIA,EAAM,IAAMA,EAAMC,OAAS,EACpBC,EAAYF,EAAM,GAAIA,GAE1BA,EAAM,EACjB,EACWG,EAAgB,SAAUH,EAAOI,GACxC,OAAIJ,EAAMC,OAAS,EACRD,EAAMK,QAAQH,EAAYF,EAAMI,GAAQJ,IAE5CI,CACX"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getActiveElement.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/getActiveElement.js"],"sourcesContent":["/**\n * returns active element from document or from nested shadowdoms\n */\nimport { safeProbe } from './safe';\n/**\n * returns current active element. If the active element is a \"container\" itself(shadowRoot or iframe) returns active element inside it\n * @param [inDocument]\n */\nexport var getActiveElement = function (inDocument) {\n if (inDocument === void 0) { inDocument = document; }\n if (!inDocument || !inDocument.activeElement) {\n return undefined;\n }\n var activeElement = inDocument.activeElement;\n return (activeElement.shadowRoot\n ? getActiveElement(activeElement.shadowRoot)\n : activeElement instanceof HTMLIFrameElement && safeProbe(function () { return activeElement.contentWindow.document; })\n ? getActiveElement(activeElement.contentWindow.document)\n : activeElement);\n};\n"],"names":["getActiveElement","inDocument","document","activeElement","shadowRoot","HTMLIFrameElement","safeProbe","contentWindow"],"mappings":"sCAQU,IAACA,EAAmB,SAAUC,GAEpC,QADmB,IAAfA,IAAyBA,EAAaC,UACrCD,GAAeA,EAAWE,cAA/B,CAGA,IAAIA,EAAgBF,EAAWE,cAC/B,OAAQA,EAAcC,WAChBJ,EAAiBG,EAAcC,YAC/BD,aAAyBE,mBAAqBC,GAAU,WAAc,OAAOH,EAAcI,cAAcL,YACrGF,EAAiBG,EAAcI,cAAcL,UAC7CC,CANT,CAOL"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{FOCUS_NO_AUTOFOCUS as n}from"../constants.js";var t=function(n){return n.parentNode&&n.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?n.parentNode.host:n.parentNode},e=function(n){return n===document||n&&n.nodeType===Node.DOCUMENT_NODE},r=function(n,r){return!n||e(n)||!function(n){if(n.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(n,null);return!(!t||!t.getPropertyValue||"none"!==t.getPropertyValue("display")&&"hidden"!==t.getPropertyValue("visibility"))}(n)&&r(t(n))},o=function(n,t){var e=n.get(t);if(void 0!==e)return e;var u=r(t,o.bind(void 0,n));return n.set(t,u),u},u=function(n,r){var o=n.get(r);if(void 0!==o)return o;var i=function(n,r){return!(n&&!e(n))||!!N(n)&&r(t(n))}(r,u.bind(void 0,n));return n.set(r,i),i},i=function(n){return n.dataset},d=function(n){return"BUTTON"===n.tagName},a=function(n){return"INPUT"===n.tagName},f=function(n){return a(n)&&"radio"===n.type},c=function(n){return!((a(n)||d(n))&&("hidden"===n.type||n.disabled))},N=function(t){var e=t.getAttribute(n);return![!0,"true",""].includes(e)},p=function(n){var t;return Boolean(n&&(null===(t=i(n))||void 0===t?void 0:t.focusGuard))},v=function(n){return!p(n)},l=function(n){return Boolean(n)};export{i as getDataset,N as isAutoFocusAllowed,u as isAutoFocusAllowedCached,l as isDefined,p as isGuard,d as isHTMLButtonElement,a as isHTMLInputElement,v as isNotAGuard,f as isRadioElement,o as isVisibleCached,c as notHiddenInput};
|
|
2
|
-
//# sourceMappingURL=is.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/is.js"],"sourcesContent":["import { FOCUS_NO_AUTOFOCUS } from '../constants';\nvar isElementHidden = function (node) {\n // we can measure only \"elements\"\n // consider others as \"visible\"\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n var computedStyle = window.getComputedStyle(node, null);\n if (!computedStyle || !computedStyle.getPropertyValue) {\n return false;\n }\n return (computedStyle.getPropertyValue('display') === 'none' || computedStyle.getPropertyValue('visibility') === 'hidden');\n};\nvar getParentNode = function (node) {\n // DOCUMENT_FRAGMENT_NODE can also point on ShadowRoot. In this case .host will point on the next node\n return node.parentNode && node.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n node.parentNode.host\n : node.parentNode;\n};\nvar isTopNode = function (node) {\n // @ts-ignore\n return node === document || (node && node.nodeType === Node.DOCUMENT_NODE);\n};\nvar isVisibleUncached = function (node, checkParent) {\n return !node || isTopNode(node) || (!isElementHidden(node) && checkParent(getParentNode(node)));\n};\nexport var isVisibleCached = function (visibilityCache, node) {\n var cached = visibilityCache.get(node);\n if (cached !== undefined) {\n return cached;\n }\n var result = isVisibleUncached(node, isVisibleCached.bind(undefined, visibilityCache));\n visibilityCache.set(node, result);\n return result;\n};\nvar isAutoFocusAllowedUncached = function (node, checkParent) {\n return node && !isTopNode(node) ? (isAutoFocusAllowed(node) ? checkParent(getParentNode(node)) : false) : true;\n};\nexport var isAutoFocusAllowedCached = function (cache, node) {\n var cached = cache.get(node);\n if (cached !== undefined) {\n return cached;\n }\n var result = isAutoFocusAllowedUncached(node, isAutoFocusAllowedCached.bind(undefined, cache));\n cache.set(node, result);\n return result;\n};\nexport var getDataset = function (node) {\n // @ts-ignore\n return node.dataset;\n};\nexport var isHTMLButtonElement = function (node) { return node.tagName === 'BUTTON'; };\nexport var isHTMLInputElement = function (node) { return node.tagName === 'INPUT'; };\nexport var isRadioElement = function (node) {\n return isHTMLInputElement(node) && node.type === 'radio';\n};\nexport var notHiddenInput = function (node) {\n return !((isHTMLInputElement(node) || isHTMLButtonElement(node)) && (node.type === 'hidden' || node.disabled));\n};\nexport var isAutoFocusAllowed = function (node) {\n var attribute = node.getAttribute(FOCUS_NO_AUTOFOCUS);\n return ![true, 'true', ''].includes(attribute);\n};\nexport var isGuard = function (node) { var _a; return Boolean(node && ((_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.focusGuard)); };\nexport var isNotAGuard = function (node) { return !isGuard(node); };\nexport var isDefined = function (x) { return Boolean(x); };\n"],"names":["getParentNode","node","parentNode","nodeType","Node","DOCUMENT_FRAGMENT_NODE","host","isTopNode","document","DOCUMENT_NODE","isVisibleUncached","checkParent","ELEMENT_NODE","computedStyle","window","getComputedStyle","getPropertyValue","isElementHidden","isVisibleCached","visibilityCache","cached","get","undefined","result","bind","set","isAutoFocusAllowedCached","cache","isAutoFocusAllowed","isAutoFocusAllowedUncached","getDataset","dataset","isHTMLButtonElement","tagName","isHTMLInputElement","isRadioElement","type","notHiddenInput","disabled","attribute","getAttribute","FOCUS_NO_AUTOFOCUS","includes","isGuard","_a","Boolean","focusGuard","isNotAGuard","isDefined","x"],"mappings":"qDACA,IAYIA,EAAgB,SAAUC,GAE1B,OAAOA,EAAKC,YAAcD,EAAKC,WAAWC,WAAaC,KAAKC,uBAEpDJ,EAAKC,WAAWI,KAClBL,EAAKC,UACf,EACIK,EAAY,SAAUN,GAEtB,OAAOA,IAASO,UAAaP,GAAQA,EAAKE,WAAaC,KAAKK,aAChE,EACIC,EAAoB,SAAUT,EAAMU,GACpC,OAAQV,GAAQM,EAAUN,KAxBR,SAAUA,GAG5B,GAAIA,EAAKE,WAAaC,KAAKQ,aACvB,OAAO,EAEX,IAAIC,EAAgBC,OAAOC,iBAAiBd,EAAM,MAClD,SAAKY,IAAkBA,EAAcG,kBAGiB,SAA9CH,EAAcG,iBAAiB,YAA0E,WAAjDH,EAAcG,iBAAiB,cACnG,CAayCC,CAAgBhB,IAASU,EAAYX,EAAcC,GAC5F,EACWiB,EAAkB,SAAUC,EAAiBlB,GACpD,IAAImB,EAASD,EAAgBE,IAAIpB,GACjC,QAAeqB,IAAXF,EACA,OAAOA,EAEX,IAAIG,EAASb,EAAkBT,EAAMiB,EAAgBM,UAAKF,EAAWH,IAErE,OADAA,EAAgBM,IAAIxB,EAAMsB,GACnBA,CACX,EAIWG,EAA2B,SAAUC,EAAO1B,GACnD,IAAImB,EAASO,EAAMN,IAAIpB,GACvB,QAAeqB,IAAXF,EACA,OAAOA,EAEX,IAAIG,EARyB,SAAUtB,EAAMU,GAC7C,QAAOV,IAASM,EAAUN,OAAS2B,EAAmB3B,IAAQU,EAAYX,EAAcC,GAC5F,CAMiB4B,CAA2B5B,EAAMyB,EAAyBF,UAAKF,EAAWK,IAEvF,OADAA,EAAMF,IAAIxB,EAAMsB,GACTA,CACX,EACWO,EAAa,SAAU7B,GAE9B,OAAOA,EAAK8B,OAChB,EACWC,EAAsB,SAAU/B,GAAQ,MAAwB,WAAjBA,EAAKgC,OAAwB,EAC5EC,EAAqB,SAAUjC,GAAQ,MAAwB,UAAjBA,EAAKgC,OAAuB,EAC1EE,EAAiB,SAAUlC,GAClC,OAAOiC,EAAmBjC,IAAuB,UAAdA,EAAKmC,IAC5C,EACWC,EAAiB,SAAUpC,GAClC,SAAUiC,EAAmBjC,IAAS+B,EAAoB/B,MAAyB,WAAdA,EAAKmC,MAAqBnC,EAAKqC,UACxG,EACWV,EAAqB,SAAU3B,GACtC,IAAIsC,EAAYtC,EAAKuC,aAAaC,GAClC,OAAQ,EAAC,EAAM,OAAQ,IAAIC,SAASH,EACxC,EACWI,EAAU,SAAU1C,GAAQ,IAAI2C,EAAI,OAAOC,QAAQ5C,IAAqC,QAA3B2C,EAAKd,EAAW7B,UAA0B,IAAP2C,OAAgB,EAASA,EAAGE,YAAgB,EAC5IC,EAAc,SAAU9C,GAAQ,OAAQ0C,EAAQ1C,EAAS,EACzD+C,EAAY,SAAUC,GAAK,OAAOJ,QAAQI,EAAG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parenting.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/parenting.js"],"sourcesContent":["import { parentAutofocusables } from './DOMutils';\nimport { contains } from './DOMutils';\nimport { asArray } from './array';\nvar getParents = function (node, parents) {\n if (parents === void 0) { parents = []; }\n parents.push(node);\n if (node.parentNode) {\n getParents(node.parentNode.host || node.parentNode, parents);\n }\n return parents;\n};\n/**\n * finds a parent for both nodeA and nodeB\n * @param nodeA\n * @param nodeB\n * @returns {boolean|*}\n */\nexport var getCommonParent = function (nodeA, nodeB) {\n var parentsA = getParents(nodeA);\n var parentsB = getParents(nodeB);\n // tslint:disable-next-line:prefer-for-of\n for (var i = 0; i < parentsA.length; i += 1) {\n var currentParent = parentsA[i];\n if (parentsB.indexOf(currentParent) >= 0) {\n return currentParent;\n }\n }\n return false;\n};\nexport var getTopCommonParent = function (baseActiveElement, leftEntry, rightEntries) {\n var activeElements = asArray(baseActiveElement);\n var leftEntries = asArray(leftEntry);\n var activeElement = activeElements[0];\n var topCommon = false;\n leftEntries.filter(Boolean).forEach(function (entry) {\n topCommon = getCommonParent(topCommon || entry, entry) || topCommon;\n rightEntries.filter(Boolean).forEach(function (subEntry) {\n var common = getCommonParent(activeElement, subEntry);\n if (common) {\n if (!topCommon || contains(common, topCommon)) {\n topCommon = common;\n }\n else {\n topCommon = getCommonParent(common, topCommon);\n }\n }\n });\n });\n // TODO: add assert here?\n return topCommon;\n};\n/**\n * return list of nodes which are expected to be autofocused inside a given top nodes\n * @param entries\n * @param visibilityCache\n */\nexport var allParentAutofocusables = function (entries, visibilityCache) {\n return entries.reduce(function (acc, node) { return acc.concat(parentAutofocusables(node, visibilityCache)); }, []);\n};\n"],"names":["getParents","node","parents","push","parentNode","host","getCommonParent","nodeA","nodeB","parentsA","parentsB","i","length","currentParent","indexOf","getTopCommonParent","baseActiveElement","leftEntry","rightEntries","activeElements","asArray","leftEntries","activeElement","topCommon","filter","Boolean","forEach","entry","subEntry","common","contains","allParentAutofocusables","entries","visibilityCache","reduce","acc","concat","parentAutofocusables"],"mappings":"wGAGA,IAAIA,EAAa,SAAUC,EAAMC,GAM7B,YALgB,IAAZA,IAAsBA,EAAU,IACpCA,EAAQC,KAAKF,GACTA,EAAKG,YACLJ,EAAWC,EAAKG,WAAWC,MAAQJ,EAAKG,WAAYF,GAEjDA,CACX,EAOWI,EAAkB,SAAUC,EAAOC,GAI1C,IAHA,IAAIC,EAAWT,EAAWO,GACtBG,EAAWV,EAAWQ,GAEjBG,EAAI,EAAGA,EAAIF,EAASG,OAAQD,GAAK,EAAG,CACzC,IAAIE,EAAgBJ,EAASE,GAC7B,GAAID,EAASI,QAAQD,IAAkB,EACnC,OAAOA,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"safe.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/safe.js"],"sourcesContent":["export var safeProbe = function (cb) {\n try {\n return cb();\n }\n catch (e) {\n return undefined;\n }\n};\n"],"names":["safeProbe","cb","e"],"mappings":"AAAU,IAACA,EAAY,SAAUC,GAC7B,IACI,OAAOA,GACV,CACD,MAAOC,GACH,MACH,CACL"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{toArray as n}from"./array.js";var t=function(n,t){var r=n.tabIndex-t.tabIndex,e=n.index-t.index;if(r){if(!n.tabIndex)return 1;if(!t.tabIndex)return-1}return r||e},r=function(r,e,a){return n(r).map((function(n,t){return{node:n,index:t,tabIndex:a&&-1===n.tabIndex?(n.dataset||{}).focusGuard?0:-1:n.tabIndex}})).filter((function(n){return!e||n.tabIndex>=0})).sort(t)};export{r as orderByTabIndex,t as tabSort};
|
|
2
|
-
//# sourceMappingURL=tabOrder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabOrder.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/tabOrder.js"],"sourcesContent":["import { toArray } from './array';\nexport var tabSort = function (a, b) {\n var tabDiff = a.tabIndex - b.tabIndex;\n var indexDiff = a.index - b.index;\n if (tabDiff) {\n if (!a.tabIndex) {\n return 1;\n }\n if (!b.tabIndex) {\n return -1;\n }\n }\n return tabDiff || indexDiff;\n};\nexport var orderByTabIndex = function (nodes, filterNegative, keepGuards) {\n return toArray(nodes)\n .map(function (node, index) { return ({\n node: node,\n index: index,\n tabIndex: keepGuards && node.tabIndex === -1 ? ((node.dataset || {}).focusGuard ? 0 : -1) : node.tabIndex,\n }); })\n .filter(function (data) { return !filterNegative || data.tabIndex >= 0; })\n .sort(tabSort);\n};\n"],"names":["tabSort","a","b","tabDiff","tabIndex","indexDiff","index","orderByTabIndex","nodes","filterNegative","keepGuards","toArray","map","node","dataset","focusGuard","filter","data","sort"],"mappings":"qCACU,IAACA,EAAU,SAAUC,EAAGC,GAC9B,IAAIC,EAAUF,EAAEG,SAAWF,EAAEE,SACzBC,EAAYJ,EAAEK,MAAQJ,EAAEI,MAC5B,GAAIH,EAAS,CACT,IAAKF,EAAEG,SACH,OAAO,EAEX,IAAKF,EAAEE,SACH,OAAQ,CAEf,CACD,OAAOD,GAAWE,CACtB,EACWE,EAAkB,SAAUC,EAAOC,EAAgBC,GAC1D,OAAOC,EAAQH,GACVI,KAAI,SAAUC,EAAMP,GAAS,MAAQ,CACtCO,KAAMA,EACNP,MAAOA,EACPF,SAAUM,IAAiC,IAAnBG,EAAKT,UAAoBS,EAAKC,SAAW,CAAA,GAAIC,WAAa,GAAK,EAAKF,EAAKT,aAEhGY,QAAO,SAAUC,GAAQ,OAAQR,GAAkBQ,EAAKb,UAAY,KACpEc,KAAKlB,EACd"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabUtils.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/tabUtils.js"],"sourcesContent":["import { FOCUS_AUTO } from '../constants';\nimport { toArray } from './array';\nimport { tabbables } from './tabbables';\nvar queryTabbables = tabbables.join(',');\nvar queryGuardTabbables = \"\".concat(queryTabbables, \", [data-focus-guard]\");\nvar getFocusablesWithShadowDom = function (parent, withGuards) {\n return toArray((parent.shadowRoot || parent).children).reduce(function (acc, child) {\n return acc.concat(child.matches(withGuards ? queryGuardTabbables : queryTabbables) ? [child] : [], getFocusablesWithShadowDom(child));\n }, []);\n};\nvar getFocusablesWithIFrame = function (parent, withGuards) {\n var _a;\n // contentDocument of iframe will be null if current origin cannot access it\n if (parent instanceof HTMLIFrameElement && ((_a = parent.contentDocument) === null || _a === void 0 ? void 0 : _a.body)) {\n return getFocusables([parent.contentDocument.body], withGuards);\n }\n return [parent];\n};\nexport var getFocusables = function (parents, withGuards) {\n return parents.reduce(function (acc, parent) {\n var _a;\n var focusableWithShadowDom = getFocusablesWithShadowDom(parent, withGuards);\n var focusableWithIframes = (_a = []).concat.apply(_a, focusableWithShadowDom.map(function (node) { return getFocusablesWithIFrame(node, withGuards); }));\n return acc.concat(\n // add all tabbables inside and within shadow DOMs in DOM order\n focusableWithIframes, \n // add if node is tabbable itself\n parent.parentNode\n ? toArray(parent.parentNode.querySelectorAll(queryTabbables)).filter(function (node) { return node === parent; })\n : []);\n }, []);\n};\n/**\n * return a list of focusable nodes within an area marked as \"auto-focusable\"\n * @param parent\n */\nexport var getParentAutofocusables = function (parent) {\n var parentFocus = parent.querySelectorAll(\"[\".concat(FOCUS_AUTO, \"]\"));\n return toArray(parentFocus)\n .map(function (node) { return getFocusables([node]); })\n .reduce(function (acc, nodes) { return acc.concat(nodes); }, []);\n};\n"],"names":["queryTabbables","tabbables","join","queryGuardTabbables","concat","getFocusablesWithShadowDom","parent","withGuards","toArray","shadowRoot","children","reduce","acc","child","matches","getFocusables","parents","_a","focusableWithShadowDom","focusableWithIframes","apply","map","node","HTMLIFrameElement","contentDocument","body","getFocusablesWithIFrame","parentNode","querySelectorAll","filter","getParentAutofocusables","parentFocus","FOCUS_AUTO","nodes"],"mappings":"6HAGA,IAAIA,EAAiBC,EAAUC,KAAK,KAChCC,EAAsB,GAAGC,OAAOJ,EAAgB,wBAChDK,EAA6B,SAAUC,EAAQC,GAC/C,OAAOC,GAASF,EAAOG,YAAcH,GAAQI,UAAUC,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabbables.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/tabbables.js"],"sourcesContent":["/**\n * list of the object to be considered as focusable\n */\nexport var tabbables = [\n 'button:enabled',\n 'select:enabled',\n 'textarea:enabled',\n 'input:enabled',\n // elements with explicit roles will also use explicit tabindex\n // '[role=\"button\"]',\n 'a[href]',\n 'area[href]',\n 'summary',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[tabindex]',\n '[contenteditable]',\n '[autofocus]',\n];\n"],"names":["tabbables"],"mappings":"AAGU,IAACA,EAAY,CACnB,iBACA,iBACA,mBACA,gBAGA,UACA,aACA,UACA,SACA,SACA,QACA,kBACA,kBACA,aACA,oBACA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../../../node_modules/react-clientside-effect/lib/index.es.js"],"sourcesContent":["import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _defineProperty from '@babel/runtime/helpers/esm/defineProperty';\nimport React, { PureComponent } from 'react';\n\nfunction withSideEffect(reducePropsToState, handleStateChangeOnClient) {\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof reducePropsToState !== 'function') {\n throw new Error('Expected reducePropsToState to be a function.');\n }\n\n if (typeof handleStateChangeOnClient !== 'function') {\n throw new Error('Expected handleStateChangeOnClient to be a function.');\n }\n }\n\n function getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n }\n\n return function wrap(WrappedComponent) {\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof WrappedComponent !== 'function') {\n throw new Error('Expected WrappedComponent to be a React component.');\n }\n }\n\n var mountedInstances = [];\n var state;\n\n function emitChange() {\n state = reducePropsToState(mountedInstances.map(function (instance) {\n return instance.props;\n }));\n handleStateChangeOnClient(state);\n }\n\n var SideEffect = /*#__PURE__*/function (_PureComponent) {\n _inheritsLoose(SideEffect, _PureComponent);\n\n function SideEffect() {\n return _PureComponent.apply(this, arguments) || this;\n }\n\n // Try to use displayName of wrapped component\n SideEffect.peek = function peek() {\n return state;\n };\n\n var _proto = SideEffect.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n mountedInstances.push(this);\n emitChange();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n emitChange();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n var index = mountedInstances.indexOf(this);\n mountedInstances.splice(index, 1);\n emitChange();\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(WrappedComponent, this.props);\n };\n\n return SideEffect;\n }(PureComponent);\n\n _defineProperty(SideEffect, \"displayName\", \"SideEffect(\" + getDisplayName(WrappedComponent) + \")\");\n\n return SideEffect;\n };\n}\n\nexport default withSideEffect;\n"],"names":["withSideEffect","reducePropsToState","handleStateChangeOnClient","process","env","NODE_ENV","Error","WrappedComponent","state","mountedInstances","emitChange","map","instance","props","SideEffect","_PureComponent","apply","this","arguments","_inheritsLoose","peek","_proto","prototype","componentDidMount","push","componentDidUpdate","componentWillUnmount","index","indexOf","splice","render","React","createElement","PureComponent","_defineProperty","displayName","name","getDisplayName"],"mappings":"4KAIA,SAASA,EAAeC,EAAoBC,GAC1C,GAA6B,eAAzBC,QAAQC,IAAIC,SAA2B,CACzC,GAAkC,mBAAvBJ,EACT,MAAM,IAAIK,MAAM,iDAGlB,GAAyC,mBAA9BJ,EACT,MAAM,IAAII,MAAM,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Combination.js","sources":["../../../../../../node_modules/react-focus-lock/dist/es2015/Combination.js"],"sourcesContent":["import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport FocusLockUI from './Lock';\nimport FocusTrap from './Trap';\n/* that would be a BREAKING CHANGE!\n// delaying sidecar execution till the first usage\nconst RequireSideCar = (props) => {\n // eslint-disable-next-line global-require\n const SideCar = require('./Trap').default;\n return <SideCar {...props} />;\n};\n*/\n\nvar FocusLockCombination = /*#__PURE__*/React.forwardRef(function FocusLockUICombination(props, ref) {\n return /*#__PURE__*/React.createElement(FocusLockUI, _extends({\n sideCar: FocusTrap,\n ref: ref\n }, props));\n});\n\nvar _ref = FocusLockUI.propTypes || {},\n sideCar = _ref.sideCar,\n propTypes = _objectWithoutPropertiesLoose(_ref, [\"sideCar\"]);\n\nFocusLockCombination.propTypes = process.env.NODE_ENV !== \"production\" ? propTypes : {};\nexport default FocusLockCombination;"],"names":["FocusLockCombination","React","forwardRef","props","ref","createElement","FocusLockUI","_extends","sideCar","FocusTrap","_ref","propTypes","_objectWithoutPropertiesLoose","process","env","NODE_ENV","FocusLock"],"mappings":"2NAcA,IAAIA,EAAoCC,EAAMC,YAAW,SAAgCC,EAAOC,GAC9F,OAAoBH,EAAMI,cAAcC,EAAaC,EAAS,CAC5DC,QAASC,EACTL,IAAKA,GACJD,GACL,IAEIO,EAAOJ,EAAYK,WAAa,GACtBD,EAAKF,QACf,IAAAG,EAAYC,EAA8BF,EAAM,CAAC,YAErDV,EAAqBW,UAAqC,eAAzBE,QAAQC,IAAIC,SAA4BJ,EAAY,GACrF,IAAAK,EAAehB"}
|
|
@@ -1 +0,0 @@
|
|
|
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};\n\nvar InFocusGuard = function InFocusGuard(_ref) {\n var children = _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};\n\nInFocusGuard.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: PropTypes.node\n} : {};\nInFocusGuard.defaultProps = {\n children: null\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,OAkB0C,eAAzBC,QAAQC,IAAIC,UACzBC,EAAUC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e from"../../../@babel/runtime/helpers/esm/extends.js";import*as o from"react";import{useEffect as t}from"react";import{node as s,bool as r,oneOfType as n,object as a,func as c,string as i,arrayOf as u,any as d}from"prop-types";import{FOCUS_DISABLED as l,FOCUS_GROUP as f}from"../../../focus-lock/dist/es2015/constants.js";import{hiddenGuard as v}from"./FocusGuard.js";import{mediumFocus as m,mediumBlur as p,mediumSidecar as F}from"./medium.js";import{useMergeRefs as b}from"../../../use-callback-ref/dist/es2015/useMergeRef.js";var h=[],k=o.forwardRef((function(s,r){var n,a=o.useState(),c=a[0],i=a[1],u=o.useRef(),d=o.useRef(!1),k=o.useRef(null),E=s.children,g=s.disabled,y=s.noFocusGuards,w=s.persistentFocus,x=s.crossFrame,C=s.autoFocus,N=s.allowTextSelection,P=s.group,R=s.className,j=s.whiteList,D=s.hasPositiveIndices,I=s.shards,L=void 0===I?h:I,O=s.as,S=void 0===O?"div":O,T=s.lockProps,A=void 0===T?{}:T,G=s.sideCar,M=s.returnFocus,V=s.focusOptions,_=s.onActivation,q=s.onDeactivation,B=o.useState({})[0],z=o.useCallback((function(){k.current=k.current||document&&document.activeElement,u.current&&_&&_(u.current),d.current=!0}),[_]),H=o.useCallback((function(){d.current=!1,q&&q(u.current)}),[q]);t((function(){g||(k.current=null)}),[]);var J=o.useCallback((function(e){var o=k.current;if(o&&o.focus){var t="function"==typeof M?M(o):M;if(t){var s="object"==typeof t?t:void 0;k.current=null,e?Promise.resolve().then((function(){return o.focus(s)})):o.focus(s)}}}),[M]),K=o.useCallback((function(e){d.current&&m.useMedium(e)}),[]),Q=p.useMedium,U=o.useCallback((function(e){u.current!==e&&(u.current=e,i(e))}),[]);"production"!==process.env.NODE_ENV&&(void 0!==N&&console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"),o.useEffect((function(){u.current||"string"==typeof S||console.error("FocusLock: could not obtain ref to internal node")}),[]));var W=e(((n={})[l]=g&&"disabled",n[f]=P,n),A),X=!0!==y,Y=X&&"tail"!==y,Z=b([r,U]);return o.createElement(o.Fragment,null,X&&[o.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:g?-1:0,style:v}),D?o.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:g?-1:1,style:v}):null],!g&&o.createElement(G,{id:B,sideCar:F,observed:c,disabled:g,persistentFocus:w,crossFrame:x,autoFocus:C,whiteList:j,shards:L,onActivation:z,onDeactivation:H,returnFocus:J,focusOptions:V}),o.createElement(S,e({ref:Z},W,{className:R,onBlur:Q,onFocus:K}),E),Y&&o.createElement("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:v}))}));k.propTypes="production"!==process.env.NODE_ENV?{children:s,disabled:r,returnFocus:n([r,a,c]),focusOptions:a,noFocusGuards:r,hasPositiveIndices:r,allowTextSelection:r,autoFocus:r,persistentFocus:r,crossFrame:r,group:i,className:i,whiteList:c,shards:u(d),as:n([i,c,a]),lockProps:a,onActivation:c,onDeactivation:c,sideCar:d.isRequired}:{},k.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var E=k;export{E as default};
|
|
2
|
-
//# sourceMappingURL=Lock.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Lock.js","sources":["../../../../../../node_modules/react-focus-lock/dist/es2015/Lock.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { node, bool, string, any, arrayOf, oneOfType, object, func } from 'prop-types';\nimport * as constants from 'focus-lock/constants';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { useEffect } from 'react';\nimport { hiddenGuard } from './FocusGuard';\nimport { mediumFocus, mediumBlur, mediumSidecar } from './medium';\nvar emptyArray = [];\nvar FocusLock = /*#__PURE__*/React.forwardRef(function FocusLockUI(props, parentRef) {\n var _extends2;\n\n var _React$useState = React.useState(),\n realObserved = _React$useState[0],\n setObserved = _React$useState[1];\n\n var observed = React.useRef();\n var isActive = React.useRef(false);\n var originalFocusedElement = React.useRef(null);\n var children = props.children,\n disabled = props.disabled,\n noFocusGuards = props.noFocusGuards,\n persistentFocus = props.persistentFocus,\n crossFrame = props.crossFrame,\n autoFocus = props.autoFocus,\n allowTextSelection = props.allowTextSelection,\n group = props.group,\n className = props.className,\n whiteList = props.whiteList,\n hasPositiveIndices = props.hasPositiveIndices,\n _props$shards = props.shards,\n shards = _props$shards === void 0 ? emptyArray : _props$shards,\n _props$as = props.as,\n Container = _props$as === void 0 ? 'div' : _props$as,\n _props$lockProps = props.lockProps,\n containerProps = _props$lockProps === void 0 ? {} : _props$lockProps,\n SideCar = props.sideCar,\n shouldReturnFocus = props.returnFocus,\n focusOptions = props.focusOptions,\n onActivationCallback = props.onActivation,\n onDeactivationCallback = props.onDeactivation;\n\n var _React$useState2 = React.useState({}),\n id = _React$useState2[0]; // SIDE EFFECT CALLBACKS\n\n\n var onActivation = React.useCallback(function () {\n originalFocusedElement.current = originalFocusedElement.current || document && document.activeElement;\n\n if (observed.current && onActivationCallback) {\n onActivationCallback(observed.current);\n }\n\n isActive.current = true;\n }, [onActivationCallback]);\n var onDeactivation = React.useCallback(function () {\n isActive.current = false;\n\n if (onDeactivationCallback) {\n onDeactivationCallback(observed.current);\n }\n }, [onDeactivationCallback]);\n useEffect(function () {\n if (!disabled) {\n // cleanup return focus on trap deactivation\n // sideEffect/returnFocus should happen by this time\n originalFocusedElement.current = null;\n }\n }, []);\n var returnFocus = React.useCallback(function (allowDefer) {\n var returnFocusTo = originalFocusedElement.current;\n\n if (returnFocusTo && returnFocusTo.focus) {\n var howToReturnFocus = typeof shouldReturnFocus === 'function' ? shouldReturnFocus(returnFocusTo) : shouldReturnFocus;\n\n if (howToReturnFocus) {\n var returnFocusOptions = typeof howToReturnFocus === 'object' ? howToReturnFocus : undefined;\n originalFocusedElement.current = null;\n\n if (allowDefer) {\n // React might return focus after update\n // it's safer to defer the action\n Promise.resolve().then(function () {\n return returnFocusTo.focus(returnFocusOptions);\n });\n } else {\n returnFocusTo.focus(returnFocusOptions);\n }\n }\n }\n }, [shouldReturnFocus]); // MEDIUM CALLBACKS\n\n var onFocus = React.useCallback(function (event) {\n if (isActive.current) {\n mediumFocus.useMedium(event);\n }\n }, []);\n var onBlur = mediumBlur.useMedium; // REF PROPAGATION\n // not using real refs due to race conditions\n\n var setObserveNode = React.useCallback(function (newObserved) {\n if (observed.current !== newObserved) {\n observed.current = newObserved;\n setObserved(newObserved);\n }\n }, []);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof allowTextSelection !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn('React-Focus-Lock: allowTextSelection is deprecated and enabled by default');\n }\n\n React.useEffect(function () {\n // report incorrect integration - https://github.com/theKashey/react-focus-lock/issues/123\n if (!observed.current && typeof Container !== 'string') {\n // eslint-disable-next-line no-console\n console.error('FocusLock: could not obtain ref to internal node');\n }\n }, []);\n }\n\n var lockProps = _extends((_extends2 = {}, _extends2[constants.FOCUS_DISABLED] = disabled && 'disabled', _extends2[constants.FOCUS_GROUP] = group, _extends2), containerProps);\n\n var hasLeadingGuards = noFocusGuards !== true;\n var hasTailingGuards = hasLeadingGuards && noFocusGuards !== 'tail';\n var mergedRef = useMergeRefs([parentRef, setObserveNode]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, hasLeadingGuards && [\n /*#__PURE__*/\n // nearest focus guard\n React.createElement(\"div\", {\n key: \"guard-first\",\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 0,\n style: hiddenGuard\n }), // first tabbed element guard\n hasPositiveIndices ? /*#__PURE__*/React.createElement(\"div\", {\n key: \"guard-nearest\",\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 1,\n style: hiddenGuard\n }) : null], !disabled && /*#__PURE__*/React.createElement(SideCar, {\n id: id,\n sideCar: mediumSidecar,\n observed: realObserved,\n disabled: disabled,\n persistentFocus: persistentFocus,\n crossFrame: crossFrame,\n autoFocus: autoFocus,\n whiteList: whiteList,\n shards: shards,\n onActivation: onActivation,\n onDeactivation: onDeactivation,\n returnFocus: returnFocus,\n focusOptions: focusOptions\n }), /*#__PURE__*/React.createElement(Container, _extends({\n ref: mergedRef\n }, lockProps, {\n className: className,\n onBlur: onBlur,\n onFocus: onFocus\n }), children), hasTailingGuards && /*#__PURE__*/React.createElement(\"div\", {\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 0,\n style: hiddenGuard\n }));\n});\nFocusLock.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: node,\n disabled: bool,\n returnFocus: oneOfType([bool, object, func]),\n focusOptions: object,\n noFocusGuards: bool,\n hasPositiveIndices: bool,\n allowTextSelection: bool,\n autoFocus: bool,\n persistentFocus: bool,\n crossFrame: bool,\n group: string,\n className: string,\n whiteList: func,\n shards: arrayOf(any),\n as: oneOfType([string, func, object]),\n lockProps: object,\n onActivation: func,\n onDeactivation: func,\n sideCar: any.isRequired\n} : {};\nFocusLock.defaultProps = {\n children: undefined,\n disabled: false,\n returnFocus: false,\n focusOptions: undefined,\n noFocusGuards: false,\n autoFocus: true,\n persistentFocus: false,\n crossFrame: true,\n hasPositiveIndices: undefined,\n allowTextSelection: undefined,\n group: undefined,\n className: undefined,\n whiteList: undefined,\n shards: undefined,\n as: 'div',\n lockProps: {},\n onActivation: undefined,\n onDeactivation: undefined\n};\nexport default FocusLock;"],"names":["emptyArray","FocusLock","React","forwardRef","props","parentRef","_extends2","_React$useState","useState","realObserved","setObserved","observed","useRef","isActive","originalFocusedElement","children","disabled","noFocusGuards","persistentFocus","crossFrame","autoFocus","allowTextSelection","group","className","whiteList","hasPositiveIndices","_props$shards","shards","_props$as","as","Container","_props$lockProps","lockProps","containerProps","SideCar","sideCar","shouldReturnFocus","returnFocus","focusOptions","onActivationCallback","onActivation","onDeactivationCallback","onDeactivation","id","useCallback","current","document","activeElement","useEffect","allowDefer","returnFocusTo","focus","howToReturnFocus","returnFocusOptions","undefined","Promise","resolve","then","onFocus","event","mediumFocus","useMedium","onBlur","mediumBlur","setObserveNode","newObserved","process","env","NODE_ENV","console","warn","error","_extends","constants.FOCUS_DISABLED","constants.FOCUS_GROUP","hasLeadingGuards","hasTailingGuards","mergedRef","useMergeRefs","createElement","Fragment","key","tabIndex","style","hiddenGuard","mediumSidecar","ref","propTypes","node","bool","oneOfType","object","func","string","arrayOf","any","isRequired","defaultProps","FocusLockUI"],"mappings":"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"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"react";import e from"prop-types";import n from"../../../react-clientside-effect/lib/index.es.js";import{focusInside as t}from"../../../focus-lock/dist/es2015/focusInside.js";import{focusIsHidden as o}from"../../../focus-lock/dist/es2015/focusIsHidden.js";import{expandFocusableNodes as r}from"../../../focus-lock/dist/es2015/focusables.js";import{moveFocusInside as u}from"../../../focus-lock/dist/es2015/moveFocusInside.js";import{deferAction as i}from"./util.js";import{mediumFocus as c,mediumBlur as s,mediumEffect as d}from"./medium.js";var a=function(){return document&&document.activeElement===document.body||o()},f=null,m=null,l=null,v=!1,p=function(){return!0};function E(e,n,t,o){var r=null,u=e;do{var i=o[u];if(i.guard)i.node.dataset.focusAutoGuard&&(r=i);else{if(!i.lockItem)break;if(u!==e)return;r=null}}while((u+=t)!==n);r&&(r.node.tabIndex=0)}var b=function(e){return e&&"current"in e?e.current:e},g=function e(n,t,o){return t&&(t.host===n&&(!t.activeElement||o.contains(t.activeElement))||t.parentNode&&e(n,t.parentNode,o))},h=function(){var e,n=!1;if(f){var o=f,i=o.observed,c=o.persistentFocus,s=o.autoFocus,d=o.shards,h=o.crossFrame,j=o.focusOptions,w=i||l&&l.portaledElement,I=document&&document.activeElement;if(w){var L=[w].concat(d.map(b).filter(Boolean));if(I&&!function(e){return(f.whiteList||p)(e)}(I)||(c||(h?Boolean(v):"meanwhile"===v)||!a()||!m&&s)&&(w&&!(t(L)||I&&function(e,n){return n.some((function(n){return g(e,n,n)}))}(I,L)||(e=I,l&&l.portaledElement===e))&&(document&&!m&&I&&!s?(I.blur&&I.blur(),document.body.focus()):(n=u(L,m,{focusOptions:j}),l={})),v=!1,m=document&&document.activeElement),document){var k=document&&document.activeElement,F=r(L),x=F.map((function(e){return e.node})).indexOf(k);x>-1&&(F.filter((function(e){var n=e.guard,t=e.node;return n&&t.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),E(x,F.length,1,F),E(x,-1,-1,F))}}}return n},j=function(e){h()&&e&&(e.stopPropagation(),e.preventDefault())},w=function(){return i(h)};"production"===process.env.NODE_ENV||e.node.isRequired;var I=function(){v="just",i((function(){v="meanwhile"}))};c.assignSyncMedium((function(e){var n=e.target,t=e.currentTarget;t.contains(n)||(l={observerNode:t,portaledElement:n})})),s.assignMedium(w),d.assignMedium((function(e){return e({moveFocusInside:u,focusInside:t})}));var L=n((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var n=e.slice(-1)[0];n&&!f&&(document.addEventListener("focusin",j),document.addEventListener("focusout",w),window.addEventListener("blur",I));var t=f,o=t&&n&&n.id===t.id;f=n,t&&!o&&(t.onDeactivation(),e.filter((function(e){return e.id===t.id})).length||t.returnFocus(!n)),n?(m=null,o&&t.observed===n.observed||n.onActivation(),h(),i(h)):(document.removeEventListener("focusin",j),document.removeEventListener("focusout",w),window.removeEventListener("blur",I),m=null)}))((function(){return null}));export{L as default};
|
|
2
|
-
//# sourceMappingURL=Trap.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Trap.js","sources":["../../../../../../node_modules/react-focus-lock/dist/es2015/Trap.js"],"sourcesContent":["/* eslint-disable no-mixed-operators */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport withSideEffect from 'react-clientside-effect';\nimport { moveFocusInside, focusInside, focusIsHidden, expandFocusableNodes } from 'focus-lock';\nimport { deferAction } from './util';\nimport { mediumFocus, mediumBlur, mediumEffect } from './medium';\n\nvar focusOnBody = function focusOnBody() {\n return document && document.activeElement === document.body;\n};\n\nvar isFreeFocus = function isFreeFocus() {\n return focusOnBody() || focusIsHidden();\n};\n\nvar lastActiveTrap = null;\nvar lastActiveFocus = null;\nvar lastPortaledElement = null;\nvar focusWasOutsideWindow = false;\n\nvar defaultWhitelist = function defaultWhitelist() {\n return true;\n};\n\nvar focusWhitelisted = function focusWhitelisted(activeElement) {\n return (lastActiveTrap.whiteList || defaultWhitelist)(activeElement);\n};\n\nvar recordPortal = function recordPortal(observerNode, portaledElement) {\n lastPortaledElement = {\n observerNode: observerNode,\n portaledElement: portaledElement\n };\n};\n\nvar focusIsPortaledPair = function focusIsPortaledPair(element) {\n return lastPortaledElement && lastPortaledElement.portaledElement === element;\n};\n\nfunction autoGuard(startIndex, end, step, allNodes) {\n var lastGuard = null;\n var i = startIndex;\n\n do {\n var item = allNodes[i];\n\n if (item.guard) {\n if (item.node.dataset.focusAutoGuard) {\n lastGuard = item;\n }\n } else if (item.lockItem) {\n if (i !== startIndex) {\n // we will tab to the next element\n return;\n }\n\n lastGuard = null;\n } else {\n break;\n }\n } while ((i += step) !== end);\n\n if (lastGuard) {\n lastGuard.node.tabIndex = 0;\n }\n}\n\nvar extractRef = function extractRef(ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};\n\nvar focusWasOutside = function focusWasOutside(crossFrameOption) {\n if (crossFrameOption) {\n // with cross frame return true for any value\n return Boolean(focusWasOutsideWindow);\n } // in other case return only of focus went a while aho\n\n\n return focusWasOutsideWindow === 'meanwhile';\n};\n\nvar checkInHost = function checkInHost(check, el, boundary) {\n return el && ( // find host equal to active element and check nested active element\n el.host === check && (!el.activeElement || boundary.contains(el.activeElement)) // dive up\n || el.parentNode && checkInHost(check, el.parentNode, boundary));\n};\n\nvar withinHost = function withinHost(activeElement, workingArea) {\n return workingArea.some(function (area) {\n return checkInHost(activeElement, area, area);\n });\n};\n\nvar activateTrap = function activateTrap() {\n var result = false;\n\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\n if (workingNode) {\n var workingArea = [workingNode].concat(shards.map(extractRef).filter(Boolean));\n\n if (!activeElement || focusWhitelisted(activeElement)) {\n if (persistentFocus || focusWasOutside(crossFrame) || !isFreeFocus() || !lastActiveFocus && autoFocus) {\n if (workingNode && !( // active element is \"inside\" working area\n focusInside(workingArea) || // check for shadow-dom contained elements\n activeElement && withinHost(activeElement, workingArea) || focusIsPortaledPair(activeElement, workingNode))) {\n if (document && !lastActiveFocus && activeElement && !autoFocus) {\n // Check if blur() exists, which is missing on certain elements on IE\n if (activeElement.blur) {\n activeElement.blur();\n }\n\n document.body.focus();\n } else {\n result = moveFocusInside(workingArea, lastActiveFocus, {\n focusOptions: focusOptions\n });\n lastPortaledElement = {};\n }\n }\n\n focusWasOutsideWindow = false;\n lastActiveFocus = document && document.activeElement;\n }\n }\n\n if (document) {\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\n if (focusedIndex > -1) {\n // remove old focus\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\n return result;\n};\n\nvar onTrap = function onTrap(event) {\n if (activateTrap() && event) {\n // prevent scroll jump\n event.stopPropagation();\n event.preventDefault();\n }\n};\n\nvar onBlur = function onBlur() {\n return deferAction(activateTrap);\n};\n\nvar onFocus = function onFocus(event) {\n // detect portal\n var source = event.target;\n var currentNode = event.currentTarget;\n\n if (!currentNode.contains(source)) {\n recordPortal(currentNode, source);\n }\n};\n\nvar FocusWatcher = function FocusWatcher() {\n return null;\n};\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};\n\nFocusTrap.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: PropTypes.node.isRequired\n} : {};\n\nvar onWindowBlur = function onWindowBlur() {\n focusWasOutsideWindow = 'just'; // using setTimeout to set this variable after React/sidecar reaction\n\n deferAction(function () {\n focusWasOutsideWindow = 'meanwhile';\n });\n};\n\nvar attachHandler = function attachHandler() {\n document.addEventListener('focusin', onTrap);\n document.addEventListener('focusout', onBlur);\n window.addEventListener('blur', onWindowBlur);\n};\n\nvar detachHandler = function detachHandler() {\n document.removeEventListener('focusin', onTrap);\n document.removeEventListener('focusout', onBlur);\n window.removeEventListener('blur', onWindowBlur);\n};\n\nfunction reducePropsToState(propsList) {\n return propsList.filter(function (_ref5) {\n var disabled = _ref5.disabled;\n return !disabled;\n });\n}\n\nfunction handleStateChangeOnClient(traps) {\n var trap = traps.slice(-1)[0];\n\n if (trap && !lastActiveTrap) {\n attachHandler();\n }\n\n var lastTrap = lastActiveTrap;\n var sameTrap = lastTrap && trap && trap.id === lastTrap.id;\n lastActiveTrap = trap;\n\n if (lastTrap && !sameTrap) {\n lastTrap.onDeactivation(); // return focus only of last trap was removed\n\n if (!traps.filter(function (_ref6) {\n var id = _ref6.id;\n return id === lastTrap.id;\n }).length) {\n // allow defer is no other trap is awaiting restore\n lastTrap.returnFocus(!trap);\n }\n }\n\n if (trap) {\n lastActiveFocus = null;\n\n if (!sameTrap || lastTrap.observed !== trap.observed) {\n trap.onActivation();\n }\n\n activateTrap(true);\n deferAction(activateTrap);\n } else {\n detachHandler();\n lastActiveFocus = null;\n }\n} // bind medium\n\n\nmediumFocus.assignSyncMedium(onFocus);\nmediumBlur.assignMedium(onBlur);\nmediumEffect.assignMedium(function (cb) {\n return cb({\n moveFocusInside: moveFocusInside,\n focusInside: focusInside\n });\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","extractRef","ref","current","checkInHost","check","el","boundary","host","contains","parentNode","activateTrap","element","result","_lastActiveTrap","observed","persistentFocus","autoFocus","shards","crossFrame","focusOptions","workingNode","portaledElement","workingArea","concat","map","filter","Boolean","whiteList","focusWhitelisted","focusInside","some","area","withinHost","blur","focus","moveFocusInside","newActiveElement","expandFocusableNodes","focusedIndex","_ref","indexOf","_ref2","forEach","_ref3","removeAttribute","length","onTrap","event","stopPropagation","preventDefault","onBlur","deferAction","process","env","NODE_ENV","PropTypes","isRequired","onWindowBlur","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":"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"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createMedium as r,createSidecarMedium as t}from"../../../use-sidecar/dist/es2015/medium.js";var e=r({},(function(r){return{target:r.target,currentTarget:r.currentTarget}})),a=r(),n=r(),s=t({async:!0});export{a as mediumBlur,n as mediumEffect,e as mediumFocus,s as mediumSidecar};
|
|
2
|
-
//# sourceMappingURL=medium.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"medium.js","sources":["../../../../../../node_modules/react-focus-lock/dist/es2015/medium.js"],"sourcesContent":["import { createMedium, createSidecarMedium } from 'use-sidecar';\nexport var mediumFocus = createMedium({}, function (_ref) {\n var target = _ref.target,\n currentTarget = _ref.currentTarget;\n return {\n target: target,\n currentTarget: currentTarget\n };\n});\nexport var mediumBlur = createMedium();\nexport var mediumEffect = createMedium();\nexport var mediumSidecar = createSidecarMedium({\n async: true // focus-lock sidecar is not required on the server\n // however, it might be required for JSDOM tests\n // ssr: true,\n\n});"],"names":["mediumFocus","createMedium","_ref","target","currentTarget","mediumBlur","mediumEffect","mediumSidecar","createSidecarMedium","async"],"mappings":"mGACU,IAACA,EAAcC,EAAa,IAAI,SAAUC,GAGlD,MAAO,CACLC,OAHWD,EAAKC,OAIhBC,cAHkBF,EAAKE,cAK3B,IACWC,EAAaJ,IACbK,EAAeL,IACfM,EAAgBC,EAAoB,CAC7CC,OAAO"}
|
|
@@ -1 +0,0 @@
|
|
|
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};"],"names":["deferAction","action","setTimeout"],"mappings":"AAAO,SAASA,EAAYC,GAC1BC,WAAWD,EAAQ,EACrB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
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),s=new Map,n=new WeakMap,r=0;function o(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)||(r+=1,n.set(i,r.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:r,observer:h,elements:l}=function(e){let t=o(e),i=s.get(t);if(!i){const n=new Map;let r;const o=new IntersectionObserver((t=>{t.forEach((t=>{var i;const s=t.isIntersecting&&r.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);r=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),i={id:t,observer:o,elements:n},s.set(t,i)}return i}(i);let 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(r))}}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}}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(),this.node=null}observeNode(){if(!this.node||this.props.skip)return;const{threshold:e,root:t,rootMargin:i,trackVisibility:s,delay:n,fallbackInView:r}=this.props;this._unobserveCb=h(this.node,this.handleChange,{threshold:e,root:t,rootMargin:i,trackVisibility:s,delay:n},r)}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:r,rootMargin:o,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.mjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs.js","sources":["../../../../node_modules/react-intersection-observer/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) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\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)\n return \"0\";\n if (RootIds.has(root))\n 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 let 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 let 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 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 this.node = null;\n }\n observeNode() {\n if (!this.node || this.props.skip)\n 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)\n return;\n let unobserve;\n unobserve = observe(\n ref,\n (inView, entry) => {\n setState({\n inView,\n entry\n });\n if (callback.current)\n 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 // eslint-disable-next-line react-hooks/exhaustive-deps\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","componentDidUpdate","prevProps","rootMargin","delay","componentWillUnmount","_unobserveCb","handleChange","render","ref","handleNode","as","createElement"],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useMergeRef.js","sources":["../../../../../../node_modules/use-callback-ref/dist/es2015/useMergeRef.js"],"sourcesContent":["import { assignRef } from './assignRef';\nimport { useCallbackRef } from './useRef';\n/**\n * Merges two or more refs together providing a single interface to set their value\n * @param {RefObject|Ref} refs\n * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}\n *\n * @see {@link mergeRefs} a version without buit-in memoization\n * @see https://github.com/theKashey/use-callback-ref#usemergerefs\n * @example\n * const Component = React.forwardRef((props, ref) => {\n * const ownRef = useRef();\n * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together\n * return <div ref={domRef}>...</div>\n * }\n */\nexport function useMergeRefs(refs, defaultValue) {\n return useCallbackRef(defaultValue || null, function (newValue) { return refs.forEach(function (ref) { return assignRef(ref, newValue); }); });\n}\n"],"names":["useMergeRefs","refs","defaultValue","useCallbackRef","newValue","forEach","ref","assignRef"],"mappings":"wFAgBO,SAASA,EAAaC,EAAMC,GAC/B,OAAOC,EAAeD,GAAgB,MAAM,SAAUE,GAAY,OAAOH,EAAKI,SAAQ,SAAUC,GAAO,OAAOC,EAAUD,EAAKF,EAAY,GAAE,GAC/I"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRef.js","sources":["../../../../../../node_modules/use-callback-ref/dist/es2015/useRef.js"],"sourcesContent":["import { useState } from 'react';\n/**\n * creates a MutableRef with ref change callback\n * @param initialValue - initial ref value\n * @param {Function} callback - a callback to run when value changes\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n *\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n * @returns {MutableRefObject}\n */\nexport function useCallbackRef(initialValue, callback) {\n var ref = useState(function () { return ({\n // value\n value: initialValue,\n // last callback\n callback: callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n var last = ref.value;\n if (last !== value) {\n ref.value = value;\n ref.callback(value, last);\n }\n },\n },\n }); })[0];\n // update callback\n ref.callback = callback;\n return ref.facade;\n}\n"],"names":["useCallbackRef","initialValue","callback","ref","useState","value","facade","current","last"],"mappings":"iCAeO,SAASA,EAAeC,EAAcC,GACzC,IAAIC,EAAMC,GAAS,WAAc,MAAQ,CAErCC,MAAOJ,EAEPC,SAAUA,EAEVI,OAAQ,CACJ,WAAIC,GACA,OAAOJ,EAAIE,KACd,EACD,WAAIE,CAAQF,GACR,IAAIG,EAAOL,EAAIE,MACXG,IAASH,IACTF,EAAIE,MAAQA,EACZF,EAAID,SAASG,EAAOG,GAE3B,GAEJ,IAAE,GAGP,OADAL,EAAID,SAAWA,EACRC,EAAIG,MACf"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{__assign as n}from"../../../../_virtual/_tslib.js";function r(n){return n}function t(n,t){void 0===t&&(t=r);var u=[],i=!1;return{read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return u.length?u[u.length-1]:n},useMedium:function(n){var r=t(n,i);return u.push(r),function(){u=u.filter((function(n){return n!==r}))}},assignSyncMedium:function(n){for(i=!0;u.length;){var r=u;u=[],r.forEach(n)}u={push:function(r){return n(r)},filter:function(){return u}}},assignMedium:function(n){i=!0;var r=[];if(u.length){var t=u;u=[],t.forEach(n),r=u}var e=function(){var t=r;r=[],t.forEach(n)},o=function(){return Promise.resolve().then(e)};o(),u={push:function(n){r.push(n),o()},filter:function(n){return r=r.filter(n),u}}}}}function u(n,u){return void 0===u&&(u=r),t(n,u)}function i(r){void 0===r&&(r={});var u=t(null);return u.options=n({async:!0,ssr:!1},r),u}export{u as createMedium,i as createSidecarMedium};
|
|
2
|
-
//# sourceMappingURL=medium.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"medium.js","sources":["../../../../../../node_modules/use-sidecar/dist/es2015/medium.js"],"sourcesContent":["import { __assign } from \"tslib\";\nfunction ItoI(a) {\n return a;\n}\nfunction innerCreateMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n var buffer = [];\n var assigned = false;\n var medium = {\n read: function () {\n if (assigned) {\n throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');\n }\n if (buffer.length) {\n return buffer[buffer.length - 1];\n }\n return defaults;\n },\n useMedium: function (data) {\n var item = middleware(data, assigned);\n buffer.push(item);\n return function () {\n buffer = buffer.filter(function (x) { return x !== item; });\n };\n },\n assignSyncMedium: function (cb) {\n assigned = true;\n while (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n }\n buffer = {\n push: function (x) { return cb(x); },\n filter: function () { return buffer; },\n };\n },\n assignMedium: function (cb) {\n assigned = true;\n var pendingQueue = [];\n if (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n pendingQueue = buffer;\n }\n var executeQueue = function () {\n var cbs = pendingQueue;\n pendingQueue = [];\n cbs.forEach(cb);\n };\n var cycle = function () { return Promise.resolve().then(executeQueue); };\n cycle();\n buffer = {\n push: function (x) {\n pendingQueue.push(x);\n cycle();\n },\n filter: function (filter) {\n pendingQueue = pendingQueue.filter(filter);\n return buffer;\n },\n };\n },\n };\n return medium;\n}\nexport function createMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n return innerCreateMedium(defaults, middleware);\n}\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function createSidecarMedium(options) {\n if (options === void 0) { options = {}; }\n var medium = innerCreateMedium(null);\n medium.options = __assign({ async: true, ssr: false }, options);\n return medium;\n}\n"],"names":["ItoI","a","innerCreateMedium","defaults","middleware","buffer","assigned","read","Error","length","useMedium","data","item","push","filter","x","assignSyncMedium","cb","cbs","forEach","assignMedium","pendingQueue","executeQueue","cycle","Promise","resolve","then","createMedium","createSidecarMedium","options","medium","__assign","async","ssr"],"mappings":"0DACA,SAASA,EAAKC,GACV,OAAOA,CACX,CACA,SAASC,EAAkBC,EAAUC,QACd,IAAfA,IAAyBA,EAAaJ,GAC1C,IAAIK,EAAS,GACTC,GAAW,EA0Df,MAzDa,CACTC,KAAM,WACF,GAAID,EACA,MAAM,IAAIE,MAAM,oGAEpB,OAAIH,EAAOI,OACAJ,EAAOA,EAAOI,OAAS,GAE3BN,CACV,EACDO,UAAW,SAAUC,GACjB,IAAIC,EAAOR,EAAWO,EAAML,GAE5B,OADAD,EAAOQ,KAAKD,GACL,WACHP,EAASA,EAAOS,QAAO,SAAUC,GAAK,OAAOA,IAAMH,CAAK,GACxE,CACS,EACDI,iBAAkB,SAAUC,GAExB,IADAX,GAAW,EACJD,EAAOI,QAAQ,CAClB,IAAIS,EAAMb,EACVA,EAAS,GACTa,EAAIC,QAAQF,EACf,CACDZ,EAAS,CACLQ,KAAM,SAAUE,GAAK,OAAOE,EAAGF,EAAK,EACpCD,OAAQ,WAAc,OAAOT,CAAS,EAE7C,EACDe,aAAc,SAAUH,GACpBX,GAAW,EACX,IAAIe,EAAe,GACnB,GAAIhB,EAAOI,OAAQ,CACf,IAAIS,EAAMb,EACVA,EAAS,GACTa,EAAIC,QAAQF,GACZI,EAAehB,CAClB,CACD,IAAIiB,EAAe,WACf,IAAIJ,EAAMG,EACVA,EAAe,GACfH,EAAIC,QAAQF,EAC5B,EACgBM,EAAQ,WAAc,OAAOC,QAAQC,UAAUC,KAAKJ,IACxDC,IACAlB,EAAS,CACLQ,KAAM,SAAUE,GACZM,EAAaR,KAAKE,GAClBQ,GACH,EACDT,OAAQ,SAAUA,GAEd,OADAO,EAAeA,EAAaP,OAAOA,GAC5BT,CACV,EAER,EAGT,CACO,SAASsB,EAAaxB,EAAUC,GAEnC,YADmB,IAAfA,IAAyBA,EAAaJ,GACnCE,EAAkBC,EAAUC,EACvC,CAEO,SAASwB,EAAoBC,QAChB,IAAZA,IAAsBA,EAAU,CAAE,GACtC,IAAIC,EAAS5B,EAAkB,MAE/B,OADA4B,EAAOD,QAAUE,EAAS,CAAEC,OAAO,EAAMC,KAAK,GAASJ,GAChDC,CACX"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{__rest as e,__assign as t}from"../../../_virtual/_tslib.js";import n,{forwardRef as r,useState as o,useRef as s,useCallback as a,useEffect as i}from"react";import{useTheme as l}from"styled-components";import{faChevronRight as c}from"../../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js";import{useKey as d}from"../../hooks/useKey.js";import u from"../../utils/debounce.js";import{removeCommasFromObjectStringValues as m}from"../../utils/Helper.js";import{Text as f}from"../Text/index.js";import p from"../TextField/index.js";import h from"../IconFa/index.js";import g from"../../themes/cruk.js";import{ScreenReaderOnly as v,ListWrapper as y,List as E,ListItem as w}from"./styles.js";var b=r((function(r,b){var j=r.apiKey,x=r.countries,I=r.errorMessage,T=r.hasError,V=r.isValid,k=r.isValidVisible,A=r.isInvalidVisible,C=r.label,K=r.hintText,D=r.onAddressError,F=void 0===D?function(e){}:D,S=r.onAddressSelected,_=r.onChange,M=r.onBlur,B=e(r,["apiKey","countries","errorMessage","hasError","isValid","isValidVisible","isInvalidVisible","label","hintText","onAddressError","onAddressSelected","onChange","onBlur"]),H=o([]),L=H[0],O=H[1],U=o(-1),q=U[0],R=U[1],W=s(null),z=l(),G=t(t({},g),z),J=function(){R(-1),O([])},N=a(u(500,(function(e){return P(e)})),[]),P=function(e,t){if(void 0===t&&(t=""),0===e.length)return O([]);var n="".concat("https://api.addressy.com/Capture/Interactive/Find/v1.1/json3.ws","?Key=").concat(j,"&Text=").concat(e,"&Container=").concat(t);return void 0!==x&&(n="".concat(n,"&Countries=").concat(x.join(","))),fetch(n).then((function(e){if(!e.ok)throw new Error("Something went wrong please try again");return e.json()})).then((function(e){if(e.Items[0].Error)throw new Error("Something went wrong please try again");return O(e.Items||[]),null})).catch((function(e){return F(e)})),null},Q=function(e){fetch("".concat("https://api.addressy.com/Capture/Interactive/Retrieve/v1/json3.ws","?Key=").concat(j,"&Id=").concat(e)).then((function(e){if(!e.ok)throw new Error("Something went wrong please try again");return e.json()})).then((function(e){var t=e.Items[0],n=m(t);return S(n),J(),null})).catch((function(e){return F(e)}))},X=function(e){return"Address"===e.Type?Q(e.Id):(P(e.Text,e.Id),null)},Y=function(e){W.current&&e.target instanceof HTMLElement&&!W.current.contains(e.target)&&J()};return i((function(){return document.addEventListener("mousedown",Y),function(){document.removeEventListener("mousedown",Y)}})),d((function(){J()}),{detectKeys:["Escape","Tab"]},[]),n.createElement(n.Fragment,null,n.createElement(p,t({"aria-activedescendant":L.length?"addressOptions-".concat(q):"","aria-owns":"found_addresses","aria-autocomplete":"both","aria-expanded":L.length?"true":"false",autoComplete:"off",hasError:T||!!I,errorMessage:I,hintText:null!=K?K:"Start typing your address or postcode",isValid:V,isValidVisible:k,isInvalidVisible:A,label:null!=C?C:"Home address",ref:b,required:!0,role:"combobox",type:"search"},B,{onKeyDown:function(e){"Enter"===e.key&&L[q]?(e.preventDefault(),"Address"===L[q].Type&&Q(L[q].Id),P(L[q].Text,L[q].Id),R(-1)):"ArrowUp"===e.key?(e.preventDefault(),q<=-1&&R(L.length-1),R(q-1)):"ArrowDown"===e.key?(e.preventDefault(),q+1>=L.length&&R(0),R(q+1)):R(-1)},onChange:function(e){N(e.target.value),_&&_(e)},onBlur:function(e){var t=!!L.length;M&&!t&&M(e)}})),!!L.length&&n.createElement(n.Fragment,null,n.createElement(v,{role:"status","aria-live":"assertive"},!!L.length&&"We have found ".concat(L.length," result").concat(1!==L.length?"s":""," matching your search. Use up and down arrow keys to navigate")),n.createElement(y,{ref:W},n.createElement(E,{"aria-label":"found addresses",id:"found_addresses",role:"listbox",theme:G},L.map((function(e,t){return n.createElement(w,{tabIndex:0,id:"addressOptions-".concat(t),isActive:t===q,key:e.Id,onClick:function(){X(e)},onKeyDown:function(t){"Enter"===t.key&&X(e)},role:"option","data-hj-suppress":!0,theme:G},n.createElement(f,{as:"span","data-hj-suppress":!0},e.Text," ",e.Description),"Address"!==e.Type&&n.createElement(n.Fragment,null,n.createElement(v,null,"press enter for these addresses"),n.createElement(h,{faIcon:c})))}))))))}));export{b as default};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from"../../../_virtual/_tslib.js";import o from"styled-components";var i,r,e,t,p=o.div(i||(i=n(["\n position: relative;\n"],["\n position: relative;\n"]))),d=o.ul(r||(r=n(["\n background-color: ",";\n border-radius: 3px;\n border: 2px solid #ccc;\n box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.2);\n list-style: none;\n margin-top: 0;\n max-height: 400px;\n overflow-y: auto;\n padding: 0;\n position: absolute;\n width: 100%;\n z-index: 999;\n"],["\n background-color: ",";\n border-radius: 3px;\n border: 2px solid #ccc;\n box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.2);\n list-style: none;\n margin-top: 0;\n max-height: 400px;\n overflow-y: auto;\n padding: 0;\n position: absolute;\n width: 100%;\n z-index: 999;\n"])),(function(n){return n.theme.colors.backgroundLight})),a=o.li(e||(e=n(["\n align-items: center;\n background-color: ",";\n cursor: pointer;\n display: flex;\n justify-content: space-between;\n padding: 5px;\n &:hover,\n &:focus {\n background-color: #ddd;\n }\n"],["\n align-items: center;\n background-color: ",";\n cursor: pointer;\n display: flex;\n justify-content: space-between;\n padding: 5px;\n &:hover,\n &:focus {\n background-color: #ddd;\n }\n"])),(function(n){var o=n.theme;return n.isActive?o.colors.backgroundMid:o.colors.backgroundLight})),c=o.div(t||(t=n(["\n border: 0px;\n clip: rect(0px, 0px, 0px, 0px);\n height: 1px;\n margin-bottom: -1px;\n margin-right: -1px;\n overflow: hidden;\n padding: 0px;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n"],["\n border: 0px;\n clip: rect(0px, 0px, 0px, 0px);\n height: 1px;\n margin-bottom: -1px;\n margin-right: -1px;\n overflow: hidden;\n padding: 0px;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n"])));export{d as List,a as ListItem,p as ListWrapper,c as ScreenReaderOnly};
|
|
2
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{__rest as t,__assign as r}from"../../../_virtual/_tslib.js";import a from"react";import{useTheme as o}from"styled-components";import e from"../../themes/cruk.js";import{StyledAvatar as n}from"./styles.js";var i=function(i){var m=i.url,s=i.name,c=i.size,p=void 0===c?"m":c,u=i.alt,l=void 0===u?"":u,f=t(i,["url","name","size","alt"]),v=o(),y=r(r({},e),v);return a.createElement(n,r({},f,{size:y.avatar[p||"m"],src:function(){if(m)return m;var t=s&&"string"==typeof s&&"Anonymous"!==s&&/[a-z]/i.exec(s[0].trim())?"icon-avatar-".concat(s[0].trim().toUpperCase(),".png"):"icon-avatar-Anonymous.png";return"".concat(y.avatar.path).concat(t)}(),alt:l}))};export{i as default};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{__makeTemplateObject as r}from"../../../_virtual/_tslib.js";import o from"styled-components";var n,e=o.img(n||(n=r(["\n box-sizing: border-box;\n border-radius: 50%;\n height: ",";\n object-fit: cover;\n width: ",";\n border-style: solid;\n border-width: 2px;\n border-color: ",";\n"],["\n box-sizing: border-box;\n border-radius: 50%;\n height: ",";\n object-fit: cover;\n width: ",";\n border-style: solid;\n border-width: 2px;\n border-color: ",";\n"])),(function(r){return r.size}),(function(r){return r.size}),(function(r){return r.theme.colors.avatarBorder}));export{e as StyledAvatar,e as default};
|
|
2
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{__rest as r,__assign as t}from"../../../_virtual/_tslib.js";import e from"react";import{useTheme as o}from"styled-components";import m from"../../themes/cruk.js";import{StyledBadge as s}from"./styles.js";var i=function(i){var n=i.children,f=r(i,["children"]),l=o(),p=t(t({},m),l);return e.createElement(s,t({theme:p,isText:"string"==typeof n,size:"xs"},f),n)};export{i as default};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from"../../../_virtual/_tslib.js";import r,{css as e}from"styled-components";var i,o,t=r.span(o||(o=n(["\n border-width: 1px;\n border-style: solid;\n background-color: ",";\n color: ",";\n border-color: ",";\n text-align: center;\n border-radius: 1.5rem;\n font-size: ",";\n line-height: 1rem;\n padding: ",";\n display: inline-block;\n min-width: ",";\n\n ","\n"],["\n border-width: 1px;\n border-style: solid;\n background-color: ",";\n color: ",";\n border-color: ",";\n text-align: center;\n border-radius: 1.5rem;\n font-size: ",";\n line-height: 1rem;\n padding: ",";\n display: inline-block;\n min-width: ",";\n\n ","\n"])),(function(n){var r=n.theme.colors,e=n.backgroundColor;return e&&void 0!==r[e]?r[e]:e||r.primary}),(function(n){var r=n.theme.colors,e=n.textColor;return e&&void 0!==r[e]?r[e]:e||r.textOnPrimary}),(function(n){var r=n.theme.colors,e=n.borderColor,i=n.backgroundColor;return e&&void 0!==r[e]?r[e]:e||(i&&void 0!==r[i]?r[i]:i||r.primary)}),(function(n){return n.theme.fontSizes.m}),(function(n){return n.theme.spacing.xxs}),(function(n){var r=n.size,e=n.theme,i=e.spacing,o=e.spacing.xs;return"calc(".concat(i[r]," + ").concat(o,")")}),(function(r){return!r.isText&&e(i||(i=n(["\n padding: 0;\n border-radius: 50%;\n height: ",";\n width: ",";\n line-height: ",";\n svg {\n height: ",";\n }\n "],["\n padding: 0;\n border-radius: 50%;\n height: ",";\n width: ",";\n line-height: ",";\n svg {\n height: ",";\n }\n "])),(function(n){var r=n.size,e=n.theme,i=e.spacing,o=e.spacing.xs;return"calc(".concat(i[r]," + ").concat(o,")")}),(function(n){var r=n.size,e=n.theme,i=e.spacing,o=e.spacing.xs;return"calc(".concat(i[r]," + ").concat(o,")")}),(function(n){var r=n.size,e=n.theme,i=e.spacing,o=e.spacing.xs;return"calc(".concat(i[r]," + ").concat(o,")")}),(function(n){var r=n.size;return n.theme.spacing[r]}))}));export{t as StyledBadge,t as default};
|
|
2
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{__rest as r,__assign as t}from"../../../_virtual/_tslib.js";import e,{forwardRef as m}from"react";import{useTheme as o}from"styled-components";import s from"../../themes/cruk.js";import{StyledBox as i}from"./styles.js";var c=m((function(m,c){var a=r(m,[]),f=a.children;a.css;var l=r(a,["children","css"]),n=o(),p=t(t({},s),n);return e.createElement(i,t({theme:p},l,{ref:c}),f)}));export{c as default};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from"../../../_virtual/_tslib.js";import r,{css as o}from"styled-components";import{Spacing as t}from"../Spacing/index.js";var c,a,i=r.div(a||(a=n(["\n background-color: ",";\n padding: ",";\n margin: 0 0 "," 0;\n\n &:last-child {\n margin-bottom: 0;\n }\n\n background-color: ",";\n\n ","\n ","\n"],["\n background-color: ",";\n padding: ",";\n margin: 0 0 "," 0;\n\n &:last-child {\n margin-bottom: 0;\n }\n\n background-color: ",";\n\n ","\n ","\n"])),(function(n){return n.theme.colors.backgroundLight}),(function(n){var r=n.theme;return n.backgroundColor?r.spacing.s:0}),(function(n){return n.theme.spacing.m}),(function(n){var r=n.theme.colors,o=n.backgroundColor;return o&&void 0!==r[o]?r[o]:o||"transparent"}),(function(r){return r.css&&o(c||(c=n(["\n ","\n "],["\n ","\n "])),r.css)}),(function(n){return t(n,n.theme)}));export{i as StyledBox,i as default};
|
|
2
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{__assign as e}from"../../../_virtual/_tslib.js";import r,{forwardRef as t}from"react";import{useTheme as n}from"styled-components";import o from"../../themes/cruk.js";import a from"../IconFa/index.js";import{StyledButton as i,Spacer as l}from"./styles.js";var m=t((function(t,m){var p=n(),s=e(e({},o),p),c=t.appearance,f=void 0===c?"primary":c,u=t.isIconButton,d=void 0!==u&&u,h=r.Children.toArray(t.children),y="string"==typeof h[0],v=h[0],j=!(!d&&(1===h.length&&!y&&(null==v?void 0:v.type))!==a);return r.createElement(i,e({as:t.href?"a":"button"},t.href?{role:"button"}:{},t,{appearance:f,isIconButton:j,theme:s,ref:m}),t.children&&h.length?r.Children.map(t.children,(function(e,t){return r.createElement(l,{theme:s,key:t},e)})):null)}));m.defaultProps={appearance:"primary",full:!1,size:"m"};export{m as Button,m as default};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|