@cruk/cruk-react-components 5.0.7 → 6.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 +20 -7
- package/lib/.storybook/main.d.ts +3 -0
- package/lib/.storybook/preview.d.ts +3 -0
- package/lib/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +1 -1
- package/lib/node_modules/@fortawesome/free-solid-svg-icons/index.js +6 -1
- package/lib/node_modules/@fortawesome/free-solid-svg-icons/index.js.map +1 -1
- package/lib/node_modules/focus-lock/dist/es2015/focusInside.js.map +1 -1
- package/lib/node_modules/focus-lock/dist/es2015/focusIsHidden.js.map +1 -1
- package/lib/node_modules/focus-lock/dist/es2015/focusSolver.js +1 -1
- package/lib/node_modules/focus-lock/dist/es2015/moveFocusInside.js.map +1 -1
- package/lib/node_modules/focus-lock/dist/es2015/return-focus.js.map +1 -1
- package/lib/node_modules/focus-lock/dist/es2015/sibling.js +1 -1
- package/lib/node_modules/focus-lock/dist/es2015/sibling.js.map +1 -1
- package/lib/node_modules/focus-lock/dist/es2015/solver.js +1 -1
- package/lib/node_modules/focus-lock/dist/es2015/solver.js.map +1 -1
- package/lib/node_modules/focus-lock/dist/es2015/utils/DOMutils.js.map +1 -1
- package/lib/node_modules/focus-lock/dist/es2015/utils/all-affected.js +1 -1
- package/lib/node_modules/focus-lock/dist/es2015/utils/auto-focus.js.map +1 -1
- package/lib/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js.map +1 -1
- package/lib/node_modules/focus-lock/dist/es2015/utils/is.js.map +1 -1
- package/lib/node_modules/focus-lock/dist/es2015/utils/parenting.js.map +1 -1
- package/lib/node_modules/focus-lock/dist/es2015/utils/tabOrder.js.map +1 -1
- package/lib/node_modules/focus-lock/dist/es2015/utils/tabUtils.js.map +1 -1
- package/lib/node_modules/react-focus-lock/dist/es2015/Combination.js +1 -1
- package/lib/node_modules/react-focus-lock/dist/es2015/Combination.js.map +1 -1
- package/lib/node_modules/react-focus-lock/dist/es2015/FocusGuard.js.map +1 -1
- package/lib/node_modules/react-focus-lock/dist/es2015/Lock.js +1 -1
- package/lib/node_modules/react-focus-lock/dist/es2015/Lock.js.map +1 -1
- package/lib/node_modules/react-focus-lock/dist/es2015/Trap.js +1 -1
- package/lib/node_modules/react-focus-lock/dist/es2015/Trap.js.map +1 -1
- package/lib/node_modules/react-intersection-observer/dist/index.js.map +1 -1
- package/lib/node_modules/tslib/tslib.es6.js +1 -1
- package/lib/node_modules/tslib/tslib.es6.js.map +1 -1
- package/lib/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -1
- package/lib/{components → src/components}/AddressLookup/AddressLookup.stories.d.ts +4 -4
- package/lib/{components → src/components}/AddressLookup/index.d.ts +2 -2
- package/lib/src/components/AddressLookup/index.js +1 -1
- package/lib/src/components/AddressLookup/index.js.map +1 -1
- package/lib/src/components/AddressLookup/styles.js +38 -1
- package/lib/src/components/AddressLookup/styles.js.map +1 -1
- package/lib/{components → src/components}/Avatar/Avatar.stories.d.ts +1 -1
- package/lib/src/components/Avatar/index.js +1 -1
- package/lib/src/components/Avatar/index.js.map +1 -1
- package/lib/src/components/Avatar/styles.js +10 -1
- package/lib/src/components/Avatar/styles.js.map +1 -1
- package/lib/{components → src/components}/Badge/Badge.stories.d.ts +1 -1
- package/lib/src/components/Badge/index.js +1 -1
- package/lib/src/components/Badge/index.js.map +1 -1
- package/lib/src/components/Badge/styles.js +17 -1
- package/lib/src/components/Badge/styles.js.map +1 -1
- package/lib/{components → src/components}/Box/Box.stories.d.ts +2 -2
- package/lib/{components → src/components}/Box/index.d.ts +1 -1
- package/lib/src/components/Box/index.js +1 -1
- package/lib/src/components/Box/index.js.map +1 -1
- package/lib/src/components/Box/styles.js +13 -1
- package/lib/src/components/Box/styles.js.map +1 -1
- package/lib/{components → src/components}/Button/Button.stories.d.ts +2 -2
- package/lib/{components → src/components}/Button/index.d.ts +1 -1
- package/lib/src/components/Button/index.js +1 -1
- package/lib/src/components/Button/index.js.map +1 -1
- package/lib/src/components/Button/styles.js +108 -1
- package/lib/src/components/Button/styles.js.map +1 -1
- package/lib/{components → src/components}/Carousel/Carousel.stories.d.ts +2 -2
- package/lib/src/components/Carousel/Dots.js +1 -1
- package/lib/src/components/Carousel/Dots.js.map +1 -1
- package/lib/src/components/Carousel/index.js +1 -1
- package/lib/src/components/Carousel/index.js.map +1 -1
- package/lib/src/components/Carousel/styles.js +96 -1
- package/lib/src/components/Carousel/styles.js.map +1 -1
- package/lib/{components → src/components}/Checkbox/Checkbox.stories.d.ts +3 -3
- package/lib/{components → src/components}/Checkbox/index.d.ts +3 -3
- package/lib/src/components/Checkbox/index.js +1 -1
- package/lib/src/components/Checkbox/index.js.map +1 -1
- package/lib/src/components/Checkbox/styles.js +105 -1
- package/lib/src/components/Checkbox/styles.js.map +1 -1
- package/lib/{components → src/components}/Collapse/Collapse.stories.d.ts +1 -1
- package/lib/src/components/Collapse/index.js +1 -1
- package/lib/src/components/Collapse/index.js.map +1 -1
- package/lib/{components → src/components}/Collapse/styles.d.ts +11 -3
- package/lib/src/components/Collapse/styles.js +31 -1
- package/lib/src/components/Collapse/styles.js.map +1 -1
- package/lib/{components → src/components}/DateField/DateField.stories.d.ts +1 -1
- package/lib/src/components/DateField/index.js +1 -1
- package/lib/src/components/DateField/index.js.map +1 -1
- package/lib/{components → src/components}/DateField/styles.d.ts +12 -6
- package/lib/src/components/DateField/styles.js +26 -1
- package/lib/src/components/DateField/styles.js.map +1 -1
- package/lib/src/components/Divider.js +17 -1
- package/lib/src/components/Divider.js.map +1 -1
- package/lib/{components → src/components}/ErrorText/ErrorText.stories.d.ts +1 -1
- package/lib/src/components/ErrorText/index.js +1 -1
- package/lib/src/components/ErrorText/index.js.map +1 -1
- package/lib/src/components/ErrorText/styles.d.ts +16 -0
- package/lib/src/components/ErrorText/styles.js +5 -1
- package/lib/src/components/ErrorText/styles.js.map +1 -1
- package/lib/src/components/Flex.js +7 -1
- package/lib/src/components/Flex.js.map +1 -1
- package/lib/src/components/Fontface.js +1 -1
- package/lib/src/components/Fontface.js.map +1 -1
- package/lib/{components → src/components}/Footer/Footer.stories.d.ts +2 -2
- package/lib/src/components/Footer/index.js +1 -1
- package/lib/src/components/Footer/index.js.map +1 -1
- package/lib/{components → src/components}/Footer/styles.d.ts +3 -9
- package/lib/src/components/Footer/styles.js +69 -1
- package/lib/src/components/Footer/styles.js.map +1 -1
- package/lib/src/components/GlobalStyle.d.ts +2 -0
- package/lib/src/components/GlobalStyle.js +37 -1
- package/lib/src/components/GlobalStyle.js.map +1 -1
- package/lib/src/components/GlobalStyleNoFontFace.d.ts +2 -0
- package/lib/src/components/GlobalStyleNoFontFace.js +37 -1
- package/lib/src/components/GlobalStyleNoFontFace.js.map +1 -1
- package/lib/{components → src/components}/Header/Header.stories.d.ts +1 -1
- package/lib/src/components/Header/index.js +1 -1
- package/lib/src/components/Header/index.js.map +1 -1
- package/lib/src/components/Header/styles.js +109 -1
- package/lib/src/components/Header/styles.js.map +1 -1
- package/lib/{components → src/components}/Heading/Heading.stories.d.ts +1 -1
- package/lib/src/components/Heading/index.js +1 -1
- package/lib/src/components/Heading/index.js.map +1 -1
- package/lib/src/components/Heading/styles.js +75 -1
- package/lib/src/components/Heading/styles.js.map +1 -1
- package/lib/{components → src/components}/IconFa/IconFa.stories.d.ts +1 -1
- package/lib/src/components/IconFa/index.js +1 -1
- package/lib/src/components/IconFa/index.js.map +1 -1
- package/lib/src/components/IconFa/styles.js +10 -1
- package/lib/src/components/IconFa/styles.js.map +1 -1
- package/lib/{components → src/components}/InfoBox/InfoBox.stories.d.ts +2 -2
- package/lib/{components → src/components}/InfoBox/index.d.ts +1 -1
- package/lib/src/components/InfoBox/index.js +1 -1
- package/lib/src/components/InfoBox/index.js.map +1 -1
- package/lib/src/components/InfoBox/styles.d.ts +13 -0
- package/lib/src/components/InfoBox/styles.js +12 -1
- package/lib/src/components/InfoBox/styles.js.map +1 -1
- package/lib/src/components/LabelWrapper/index.js +1 -1
- package/lib/src/components/LabelWrapper/index.js.map +1 -1
- package/lib/src/components/LabelWrapper/styles.js +15 -1
- package/lib/src/components/LabelWrapper/styles.js.map +1 -1
- package/lib/{components → src/components}/LegendWrapper/LegendWrapper.stories.d.ts +1 -1
- package/lib/src/components/LegendWrapper/index.js +1 -1
- package/lib/src/components/LegendWrapper/index.js.map +1 -1
- package/lib/src/components/LegendWrapper/styles.js +34 -1
- package/lib/src/components/LegendWrapper/styles.js.map +1 -1
- package/lib/{components → src/components}/Link/Link.stories.d.ts +5 -2
- package/lib/{components → src/components}/Link/index.d.ts +4 -1
- package/lib/src/components/Link/index.js +1 -1
- package/lib/src/components/Link/index.js.map +1 -1
- package/lib/src/components/Link/styles.d.ts +20 -0
- package/lib/src/components/Link/styles.js +29 -1
- package/lib/src/components/Link/styles.js.map +1 -1
- package/lib/{components → src/components}/Loader/Loader.stories.d.ts +1 -1
- package/lib/src/components/Loader/index.js +1 -1
- package/lib/src/components/Loader/index.js.map +1 -1
- package/lib/src/components/Loader/styles.js +45 -1
- package/lib/src/components/Loader/styles.js.map +1 -1
- package/lib/{components → src/components}/Modal/Modal.stories.d.ts +1 -1
- package/lib/src/components/Modal/index.js +1 -1
- package/lib/src/components/Modal/index.js.map +1 -1
- package/lib/src/components/Modal/styles.d.ts +32 -0
- package/lib/src/components/Modal/styles.js +59 -1
- package/lib/src/components/Modal/styles.js.map +1 -1
- package/lib/{components → src/components}/Pagination/Pagination.stories.d.ts +1 -1
- package/lib/src/components/Pagination/index.js +1 -1
- package/lib/src/components/Pagination/index.js.map +1 -1
- package/lib/src/components/Pagination/styles.js +92 -1
- package/lib/src/components/Pagination/styles.js.map +1 -1
- package/lib/{components → src/components}/PopOver/Popover.stories.d.ts +1 -1
- package/lib/src/components/PopOver/index.js +1 -1
- package/lib/src/components/PopOver/index.js.map +1 -1
- package/lib/src/components/PopOver/styles.js +81 -1
- package/lib/src/components/PopOver/styles.js.map +1 -1
- package/lib/{components → src/components}/ProgressBar/ProgressBar.stories.d.ts +1 -1
- package/lib/src/components/ProgressBar/index.js +1 -1
- package/lib/src/components/ProgressBar/index.js.map +1 -1
- package/lib/src/components/ProgressBar/styles.js +132 -1
- package/lib/src/components/ProgressBar/styles.js.map +1 -1
- package/lib/{components → src/components}/Radio/Radio.stories.d.ts +3 -3
- package/lib/{components → src/components}/Radio/index.d.ts +3 -3
- package/lib/src/components/Radio/index.js +1 -1
- package/lib/src/components/Radio/index.js.map +1 -1
- package/lib/src/components/Radio/styles.js +125 -1
- package/lib/src/components/Radio/styles.js.map +1 -1
- package/lib/{components → src/components}/RadioConsent/Radio.stories.d.ts +1 -1
- package/lib/src/components/RadioConsent/index.js +1 -1
- package/lib/src/components/RadioConsent/index.js.map +1 -1
- package/lib/{components → src/components}/RadioConsent/styles.d.ts +6 -3
- package/lib/src/components/RadioConsent/styles.js +26 -1
- package/lib/src/components/RadioConsent/styles.js.map +1 -1
- package/lib/{components → src/components}/Select/Selelct.stories.d.ts +3 -3
- package/lib/{components → src/components}/Select/index.d.ts +3 -3
- package/lib/src/components/Select/index.js +1 -1
- package/lib/src/components/Select/index.js.map +1 -1
- package/lib/src/components/Select/styles.js +41 -1
- package/lib/src/components/Select/styles.js.map +1 -1
- package/lib/src/components/Spacing/index.js +1 -1
- package/lib/src/components/Spacing/index.js.map +1 -1
- package/lib/{components → src/components}/Step/Step.stories.d.ts +1 -1
- package/lib/src/components/Step/index.js +1 -1
- package/lib/src/components/Step/index.js.map +1 -1
- package/lib/src/components/Step/styles.js +79 -1
- package/lib/src/components/Step/styles.js.map +1 -1
- package/lib/{components → src/components}/Text/Text.stories.d.ts +2 -2
- package/lib/{components → src/components}/Text/index.d.ts +1 -1
- package/lib/src/components/Text/index.js +1 -1
- package/lib/src/components/Text/index.js.map +1 -1
- package/lib/src/components/Text/styles.js +19 -1
- package/lib/src/components/Text/styles.js.map +1 -1
- package/lib/{components → src/components}/TextAreaField/TextAreaField.stories.d.ts +2 -2
- package/lib/{components → src/components}/TextAreaField/index.d.ts +1 -1
- package/lib/src/components/TextAreaField/index.js +1 -1
- package/lib/src/components/TextAreaField/index.js.map +1 -1
- package/lib/src/components/TextAreaField/styles.js +29 -1
- package/lib/src/components/TextAreaField/styles.js.map +1 -1
- package/lib/{components → src/components}/TextField/TextField.stories.d.ts +2 -2
- package/lib/{components → src/components}/TextField/index.d.ts +1 -1
- package/lib/src/components/TextField/index.js +1 -1
- package/lib/src/components/TextField/index.js.map +1 -1
- package/lib/{components → src/components}/TextField/styles.d.ts +2 -6
- package/lib/src/components/TextField/styles.js +110 -1
- package/lib/src/components/TextField/styles.js.map +1 -1
- package/lib/src/components/ThemeCheatSheet.d.ts +7 -0
- package/lib/{components → src/components}/Totaliser/Totaliser.stories.d.ts +1 -1
- package/lib/src/components/Totaliser/index.js +1 -1
- package/lib/src/components/Totaliser/index.js.map +1 -1
- package/lib/src/components/Totaliser/styles.js +59 -1
- package/lib/src/components/Totaliser/styles.js.map +1 -1
- package/lib/{components → src/components}/UserBlock/UserBlock.stories.d.ts +1 -1
- package/lib/src/components/UserBlock/index.js +1 -1
- package/lib/src/components/UserBlock/index.js.map +1 -1
- package/lib/src/components/UserBlock/styles.js +21 -1
- package/lib/src/components/UserBlock/styles.js.map +1 -1
- package/lib/{hooks → src/hooks}/useEffectBrowser.d.ts +1 -1
- package/lib/src/hooks/useEffectBrowser.js +1 -1
- package/lib/src/hooks/useEffectBrowser.js.map +1 -1
- package/lib/src/hooks/useKey.js +1 -1
- package/lib/src/hooks/useKey.js.map +1 -1
- package/lib/{hooks → src/hooks}/useLayoutEffectBrowser.d.ts +1 -1
- package/lib/src/hooks/useLayoutEffectBrowser.js +1 -1
- package/lib/src/hooks/useLayoutEffectBrowser.js.map +1 -1
- package/lib/{hooks → src/hooks}/useScrollPosition.d.ts +2 -2
- package/lib/src/hooks/useScrollPosition.js +1 -1
- package/lib/src/hooks/useScrollPosition.js.map +1 -1
- package/lib/src/themes/bowelbabe.js +1 -1
- package/lib/src/themes/bowelbabe.js.map +1 -1
- package/lib/src/themes/cruk.js +1 -1
- package/lib/src/themes/cruk.js.map +1 -1
- package/lib/src/themes/rfl.js +1 -1
- package/lib/src/themes/rfl.js.map +1 -1
- package/lib/src/themes/su2c.js +1 -1
- package/lib/src/themes/su2c.js.map +1 -1
- package/lib/{types.d.ts → src/types.d.ts} +1 -3
- package/lib/src/utils/Helper.js +1 -1
- package/lib/src/utils/Helper.js.map +1 -1
- package/lib/src/utils/debounce.d.ts +2 -0
- package/lib/src/utils/debounce.js +1 -1
- package/lib/src/utils/debounce.js.map +1 -1
- package/lib/src/utils/themeUtils.js +1 -1
- package/lib/src/utils/themeUtils.js.map +1 -1
- package/package.json +37 -44
- package/lib/components/ErrorText/styles.d.ts +0 -8
- package/lib/components/GlobalStyle.d.ts +0 -2
- package/lib/components/GlobalStyleNoFontFace.d.ts +0 -2
- package/lib/components/InfoBox/styles.d.ts +0 -10
- package/lib/components/Link/styles.d.ts +0 -12
- package/lib/components/Modal/styles.d.ts +0 -21
- package/lib/components/ThemeCheatSheet.d.ts +0 -7
- package/lib/utils/debounce.d.ts +0 -2
- /package/lib/{components → src/components}/AddressLookup/AddressLookUp.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/AddressLookup/styles.d.ts +0 -0
- /package/lib/{components → src/components}/AllThemesWrapper.d.ts +0 -0
- /package/lib/{components → src/components}/Avatar/Avatar.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Avatar/index.d.ts +0 -0
- /package/lib/{components → src/components}/Avatar/styles.d.ts +0 -0
- /package/lib/{components → src/components}/Badge/Badge.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Badge/index.d.ts +0 -0
- /package/lib/{components → src/components}/Badge/styles.d.ts +0 -0
- /package/lib/{components → src/components}/Box/Box.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Box/styles.d.ts +0 -0
- /package/lib/{components → src/components}/Button/Button.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Button/styles.d.ts +0 -0
- /package/lib/{components → src/components}/Carousel/Carousel.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Carousel/Dots.d.ts +0 -0
- /package/lib/{components → src/components}/Carousel/index.d.ts +0 -0
- /package/lib/{components → src/components}/Carousel/styles.d.ts +0 -0
- /package/lib/{components → src/components}/Checkbox/CheckBox.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Checkbox/styles.d.ts +0 -0
- /package/lib/{components → src/components}/Collapse/Collapse.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Collapse/index.d.ts +0 -0
- /package/lib/{components → src/components}/DateField/DateField.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/DateField/index.d.ts +0 -0
- /package/lib/{components → src/components}/Divider.d.ts +0 -0
- /package/lib/{components → src/components}/ErrorText/ErrorText.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/ErrorText/index.d.ts +0 -0
- /package/lib/{components → src/components}/Flex.d.ts +0 -0
- /package/lib/{components → src/components}/Fontface.d.ts +0 -0
- /package/lib/{components → src/components}/Footer/Footer.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Footer/index.d.ts +0 -0
- /package/lib/{components → src/components}/Header/Header.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Header/index.d.ts +0 -0
- /package/lib/{components → src/components}/Header/styles.d.ts +0 -0
- /package/lib/{components → src/components}/Heading/Heading.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Heading/index.d.ts +0 -0
- /package/lib/{components → src/components}/Heading/styles.d.ts +0 -0
- /package/lib/{components → src/components}/IconFa/IconFa.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/IconFa/index.d.ts +0 -0
- /package/lib/{components → src/components}/IconFa/styles.d.ts +0 -0
- /package/lib/{components → src/components}/InfoBox/InfoBox.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/LabelWrapper/index.d.ts +0 -0
- /package/lib/{components → src/components}/LabelWrapper/styles.d.ts +0 -0
- /package/lib/{components → src/components}/LegendWrapper/LegendWrapper.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/LegendWrapper/index.d.ts +0 -0
- /package/lib/{components → src/components}/LegendWrapper/styles.d.ts +0 -0
- /package/lib/{components → src/components}/Link/Link.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Loader/Loader.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Loader/index.d.ts +0 -0
- /package/lib/{components → src/components}/Loader/styles.d.ts +0 -0
- /package/lib/{components → src/components}/Modal/Modal.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Modal/index.d.ts +0 -0
- /package/lib/{components → src/components}/Pagination/Pagination.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Pagination/index.d.ts +0 -0
- /package/lib/{components → src/components}/Pagination/styles.d.ts +0 -0
- /package/lib/{components → src/components}/PopOver/PopOver.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/PopOver/index.d.ts +0 -0
- /package/lib/{components → src/components}/PopOver/styles.d.ts +0 -0
- /package/lib/{components → src/components}/ProgressBar/ProgressBar.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/ProgressBar/index.d.ts +0 -0
- /package/lib/{components → src/components}/ProgressBar/styles.d.ts +0 -0
- /package/lib/{components → src/components}/Radio/Radio.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Radio/styles.d.ts +0 -0
- /package/lib/{components → src/components}/RadioConsent/RadioConsent.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/RadioConsent/index.d.ts +0 -0
- /package/lib/{components → src/components}/Select/Select.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Select/styles.d.ts +0 -0
- /package/lib/{components → src/components}/Spacing/index.d.ts +0 -0
- /package/lib/{components → src/components}/Step/Step.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Step/index.d.ts +0 -0
- /package/lib/{components → src/components}/Step/styles.d.ts +0 -0
- /package/lib/{components → src/components}/Text/Text.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Text/styles.d.ts +0 -0
- /package/lib/{components → src/components}/TextAreaField/TextAreaField.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/TextAreaField/styles.d.ts +0 -0
- /package/lib/{components → src/components}/TextField/TextField.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Totaliser/Totaliser.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Totaliser/index.d.ts +0 -0
- /package/lib/{components → src/components}/Totaliser/styles.d.ts +0 -0
- /package/lib/{components → src/components}/UserBlock/UserBlock.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/UserBlock/index.d.ts +0 -0
- /package/lib/{components → src/components}/UserBlock/styles.d.ts +0 -0
- /package/lib/{components → src/components}/index.d.ts +0 -0
- /package/lib/{hooks → src/hooks}/useKey.d.ts +0 -0
- /package/lib/{themes → src/themes}/bowelbabe.d.ts +0 -0
- /package/lib/{themes → src/themes}/cruk.d.ts +0 -0
- /package/lib/{themes → src/themes}/rfl.d.ts +0 -0
- /package/lib/{themes → src/themes}/su2c.d.ts +0 -0
- /package/lib/{utils → src/utils}/Helper.d.ts +0 -0
- /package/lib/{utils → src/utils}/__tests__/testHelpers.test.d.ts +0 -0
- /package/lib/{utils → src/utils}/themeUtils.d.ts +0 -0
|
@@ -1,2 +1,60 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o,{keyframes as i}from"styled-components";import{Box as t}from"../Box/index.js";import{Button as n}from"../Button/index.js";const a=o.div`
|
|
2
|
+
height: 100%;
|
|
3
|
+
overflow-x: hidden;
|
|
4
|
+
overflow-y: auto;
|
|
5
|
+
position: fixed;
|
|
6
|
+
top: 0;
|
|
7
|
+
width: 100%;
|
|
8
|
+
z-index: 9999;
|
|
9
|
+
`,e=i`
|
|
10
|
+
from {
|
|
11
|
+
opacity: 0;
|
|
12
|
+
transform: scale(0);
|
|
13
|
+
}
|
|
14
|
+
to {
|
|
15
|
+
opacity: 1;
|
|
16
|
+
transform: scale(1);
|
|
17
|
+
}
|
|
18
|
+
`,m=i`
|
|
19
|
+
from {
|
|
20
|
+
opacity: 0;
|
|
21
|
+
}
|
|
22
|
+
to {
|
|
23
|
+
opacity: 0.5;
|
|
24
|
+
}
|
|
25
|
+
`,r=o(t)`
|
|
26
|
+
background-color: ${({theme:{colors:o},backgroundColor:i})=>void 0!==i?void 0!==o[i]?o[i]:i:o.backgroundLight};
|
|
27
|
+
position: relative;
|
|
28
|
+
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
|
29
|
+
margin: ${({$top:o})=>`${o} auto auto auto`};
|
|
30
|
+
width: ${({$width:o})=>o};
|
|
31
|
+
min-height: 10rem;
|
|
32
|
+
max-width: ${({$maxWidth:o})=>o};
|
|
33
|
+
z-index: 9999;
|
|
34
|
+
animation-direction: normal;
|
|
35
|
+
animation-timing-function: ease-in-out;
|
|
36
|
+
animation-duration: 0.2s;
|
|
37
|
+
animation-name: ${({$isAnimated:o})=>o?e:"none"};
|
|
38
|
+
`,d=o(n)`
|
|
39
|
+
float: right;
|
|
40
|
+
margin-left: ${({theme:{spacing:{xs:o}}})=>o};
|
|
41
|
+
font-size: 1.2rem;
|
|
42
|
+
padding: 0;
|
|
43
|
+
`,s=o.div`
|
|
44
|
+
background: ${({theme:o})=>o.colors.modalBackdrop};
|
|
45
|
+
bottom: 0;
|
|
46
|
+
left: 0;
|
|
47
|
+
opacity: 0.5;
|
|
48
|
+
position: fixed;
|
|
49
|
+
right: 0;
|
|
50
|
+
top: 0;
|
|
51
|
+
transition:
|
|
52
|
+
opacity 0.3s,
|
|
53
|
+
bottom 0s 0.3s;
|
|
54
|
+
z-index: 100;
|
|
55
|
+
animation-direction: normal;
|
|
56
|
+
animation-timing-function: ease-in-out;
|
|
57
|
+
animation-duration: 0.3s;
|
|
58
|
+
animation-name: ${({$isAnimated:o})=>o?m:"none"};
|
|
59
|
+
`;export{s as Background,d as CloseButton,r as Content,a as Wrapper};
|
|
2
60
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../src/components/Modal/styles.ts"],"sourcesContent":["import styled, { keyframes } from \"styled-components\";\nimport { type ColorKeyType, type ThemeType } from \"../../types\";\nimport Box from \"../Box\";\nimport { Button } from \"../Button\";\n\nexport const Wrapper = styled.div`\n height: 100%;\n overflow-x: hidden;\n overflow-y: auto;\n position: fixed;\n top: 0;\n width: 100%;\n z-index: 9999;\n`;\n\nconst grow = keyframes`\n from {\n opacity: 0;\n transform: scale(0);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n`;\n\nconst fade = keyframes`\n from {\n opacity: 0;\n }\n to {\n opacity: 0.5;\n }\n`;\n\nexport const Content = styled(Box)<{\n $backgroundColor?: string;\n $top: string;\n $width: string;\n $maxWidth: string;\n $isAnimated?: boolean;\n theme: ThemeType;\n}>`\n background-color: ${({ theme: { colors }, backgroundColor }) =>\n backgroundColor !== undefined
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../src/components/Modal/styles.ts"],"sourcesContent":["import styled, { keyframes } from \"styled-components\";\nimport { type ColorKeyType, type ThemeType } from \"../../types\";\nimport Box from \"../Box\";\nimport { Button } from \"../Button\";\n\nexport const Wrapper = styled.div`\n height: 100%;\n overflow-x: hidden;\n overflow-y: auto;\n position: fixed;\n top: 0;\n width: 100%;\n z-index: 9999;\n`;\n\nconst grow = keyframes`\n from {\n opacity: 0;\n transform: scale(0);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n`;\n\nconst fade = keyframes`\n from {\n opacity: 0;\n }\n to {\n opacity: 0.5;\n }\n`;\n\nexport const Content = styled(Box)<{\n $backgroundColor?: string;\n $top: string;\n $width: string;\n $maxWidth: string;\n $isAnimated?: boolean;\n theme: ThemeType;\n}>`\n background-color: ${({ theme: { colors }, backgroundColor }) =>\n backgroundColor !== undefined\n ? colors[backgroundColor as ColorKeyType] !== undefined\n ? colors[backgroundColor as ColorKeyType]\n : backgroundColor\n : colors.backgroundLight};\n position: relative;\n box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);\n margin: ${({ $top }) => `${$top} auto auto auto`};\n width: ${({ $width }) => $width};\n min-height: 10rem;\n max-width: ${({ $maxWidth }) => $maxWidth};\n z-index: 9999;\n animation-direction: normal;\n animation-timing-function: ease-in-out;\n animation-duration: 0.2s;\n animation-name: ${({ $isAnimated }) => ($isAnimated ? grow : \"none\")};\n`;\n\nexport const CloseButton = styled(Button)<{\n theme: ThemeType;\n}>`\n float: right;\n margin-left: ${({\n theme: {\n spacing: { xs },\n },\n }) => xs};\n font-size: 1.2rem;\n padding: 0;\n`;\n\nexport const Background = styled.div<{\n theme: ThemeType;\n $isAnimated?: boolean;\n}>`\n background: ${({ theme }) => theme.colors.modalBackdrop};\n bottom: 0;\n left: 0;\n opacity: 0.5;\n position: fixed;\n right: 0;\n top: 0;\n transition:\n opacity 0.3s,\n bottom 0s 0.3s;\n z-index: 100;\n animation-direction: normal;\n animation-timing-function: ease-in-out;\n animation-duration: 0.3s;\n animation-name: ${({ $isAnimated }) => ($isAnimated ? fade : \"none\")};\n`;\n"],"names":["Wrapper","styled","div","grow","keyframes","fade","Content","Box","theme","colors","backgroundColor","undefined","backgroundLight","$top","$width","$maxWidth","$isAnimated","CloseButton","Button","spacing","xs","Background","modalBackdrop"],"mappings":"mIAKa,MAAAA,EAAUC,EAAOC,GAAG;;;;;;;;EAU3BC,EAAOC,CAAS;;;;;;;;;EAWhBC,EAAOD,CAAS;;;;;;;EASTE,EAAUL,EAAOM,EAO5B;sBACoB,EAAGC,OAASC,UAAUC,0BACpBC,IAApBD,OACgDC,IAA5CF,EAAOC,GACLD,EAAOC,GACPA,EACFD,EAAOG;;;YAGH,EAAGC,UAAW,GAAGA;WAClB,EAAGC,YAAaA;;eAEZ,EAAGC,eAAgBA;;;;;oBAKd,EAAGC,iBAAmBA,EAAcb,EAAO;EAGlDc,EAAchB,EAAOiB,EAEhC;;iBAEe,EACbV,OACEW,SAAWC,UAETA;;;EAKKC,EAAapB,EAAOC,GAG/B;gBACc,EAAGM,WAAYA,EAAMC,OAAOa;;;;;;;;;;;;;;oBAcxB,EAAGN,iBAAmBA,EAAcX,EAAO;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"react";import{useTheme as t,ThemeProvider as a}from"styled-components";import{crukTheme as l}from"../../themes/cruk.js";import{PagerWrapper as n,PagerList as c,PagerItem as r,PagerLink as i}from"./styles.js";function s({current:s,items:o,hideLast:m,pagerCallback:d,perPage:p,searchParam:u="page",children:f,id:E}){const $=t(),h={...l,...$},b=p>0?p:1,k=Math.ceil(o/b)||1,y=e=>({href:`${"undefined"!=typeof window?window.location.pathname:""}?${u?`${u}=${e}`:""}`,onClick:t=>{t.preventDefault(),d(e)}});return e.createElement(a,{theme:h},o>p&&e.createElement(n,null,e.createElement(c,null,e.createElement(r,{key:"Prev"},e.createElement(i,{"data-cta":E?`${E}-prev`:null,name:"Prev","aria-disabled":1===s,...1===s&&{tabIndex:-1},...1!==s&&y(s-1),$disabled:1===s},"Prev")),((t,a)=>{const l=[];let n=[];for(let n=1;n<=a;n+=1)l.push(e.createElement(r,{key:n},e.createElement(i,{"data-cta":E?`${E}-${n}`:null,$active:n===t,...y(n),"aria-label":`page ${n} of ${a}`},n)));const c=l.slice(0,1).concat(e.createElement(r,{key:"first"},e.createElement("span",null,"..."))),s=l.slice(l.length-1).concat(e.createElement(r,{key:"last"},e.createElement("span",null,"..."))).reverse();return n=l.slice(0,a),a>7&&(n=t<=4?m?l.slice(0,7):l.slice(0,5).concat(s):t>a-4?c.concat(l.slice(-5)):m?c.concat(l.slice(t-3,t+2)):c.concat(l.slice(t-2,t+1)).concat(s)),n})(s,k),e.createElement(r,{key:"Next"},e.createElement(i,{"data-cta":E?`${E}-next`:null,name:"Next","aria-disabled":s===k,...s===k&&{tabIndex:-1},...s!==k&&y(s+1),$disabled:s===k},"Next"))),f))}export{s as Pagination,s as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/Pagination/index.tsx"],"sourcesContent":["import React, {\n type HTMLAttributes,\n type MouseEvent,\n type ReactNode,\n type TouchEvent,\n} from \"react\";\nimport { ThemeProvider, useTheme } from \"styled-components\";\n\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\n\nimport { PagerItem, PagerLink, PagerList, PagerWrapper } from \"./styles\";\n\nexport type PaginationProps = {\n /** set current page number */\n current: number;\n /** total number of pages */\n items: number;\n /** don't show an ellipsise and then the last page link, usefull for search results where the last page isn't important */\n hideLast?: boolean;\n /** callback function which is passed the selected page number on click */\n pagerCallback: (n: number) => void;\n /** number of items per page */\n perPage: number;\n /** the name of the search param in the url that is modified on page click, defaults to 'page' */\n searchParam?: string;\n children?: ReactNode;\n} & HTMLAttributes<HTMLElement>;\n\n/**\n * \n * Pagination is used when we are viewing large amounts of data.\nData is split into multiple pages and pagination is used to\neasily navigate through these pages.\n */\nexport function Pagination({\n current,\n items,\n hideLast,\n pagerCallback,\n perPage,\n searchParam = \"page\",\n children,\n id,\n}: PaginationProps) {\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n const perPageValue = perPage > 0 ? perPage : 1;\n const totalPages = Math.ceil(items / perPageValue) || 1;\n\n const linkProps = (number: number) => ({\n href: `${typeof window !== \"undefined\" ? window.location.pathname : \"\"}?${\n searchParam ? `${searchParam}=${number}` : \"\"\n }`,\n onClick: (e: TouchEvent | MouseEvent) => {\n e.preventDefault();\n pagerCallback(number);\n },\n });\n\n const renderPager = (active: number, total: number) => {\n const list = [];\n let pager = [];\n // get the list of items\n for (let number = 1; number <= total; number += 1) {\n list.push(\n <PagerItem key={number}>\n <PagerLink\n data-cta={id ? `${id}-${number}` : null}\n $active={number === active}\n {...linkProps(number)}\n aria-label={`page ${number} of ${total}`}\n >\n {number}\n </PagerLink>\n </PagerItem>,\n );\n }\n const first = list.slice(0, 1).concat(\n <PagerItem key=\"first\">\n <span>...</span>\n </PagerItem>,\n );\n const last = list\n .slice(list.length - 1)\n .concat(\n <PagerItem key=\"last\">\n <span>...</span>\n </PagerItem>,\n )\n .reverse();\n pager = list.slice(0, total);\n if (total > 7) {\n if (active <= 4) {\n pager = hideLast ? list.slice(0, 7) : list.slice(0, 5).concat(last);\n } else {\n pager =\n active > total - 4\n ? first.concat(list.slice(-5))\n : hideLast\n ? first.concat(list.slice(active - 3, active + 2))\n : first.concat(list.slice(active - 2, active + 1)).concat(last);\n }\n }\n return pager;\n };\n\n return (\n <ThemeProvider theme={theme}>\n {items > perPage && (\n <PagerWrapper>\n <PagerList>\n <PagerItem key=\"Prev\">\n <PagerLink\n data-cta={id ? `${id}-prev` : null}\n name=\"Prev\"\n aria-disabled={current === 1}\n {...(current === 1 && { tabIndex: -1 })}\n {...(current !== 1 && linkProps(current - 1))}\n $disabled={current === 1}\n >\n Prev\n </PagerLink>\n </PagerItem>\n {renderPager(current, totalPages)}\n <PagerItem key=\"Next\">\n <PagerLink\n data-cta={id ? `${id}-next` : null}\n name=\"Next\"\n aria-disabled={current === totalPages}\n {...(current === totalPages && { tabIndex: -1 })}\n {...(current !== totalPages && linkProps(current + 1))}\n $disabled={current === totalPages}\n >\n Next\n </PagerLink>\n </PagerItem>\n </PagerList>\n {children}\n </PagerWrapper>\n )}\n </ThemeProvider>\n );\n}\n\nexport default Pagination;\n"],"names":["Pagination","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Pagination/index.tsx"],"sourcesContent":["import React, {\n type HTMLAttributes,\n type MouseEvent,\n type ReactNode,\n type TouchEvent,\n} from \"react\";\nimport { ThemeProvider, useTheme } from \"styled-components\";\n\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\n\nimport { PagerItem, PagerLink, PagerList, PagerWrapper } from \"./styles\";\n\nexport type PaginationProps = {\n /** set current page number */\n current: number;\n /** total number of pages */\n items: number;\n /** don't show an ellipsise and then the last page link, usefull for search results where the last page isn't important */\n hideLast?: boolean;\n /** callback function which is passed the selected page number on click */\n pagerCallback: (n: number) => void;\n /** number of items per page */\n perPage: number;\n /** the name of the search param in the url that is modified on page click, defaults to 'page' */\n searchParam?: string;\n children?: ReactNode;\n} & HTMLAttributes<HTMLElement>;\n\n/**\n * \n * Pagination is used when we are viewing large amounts of data.\nData is split into multiple pages and pagination is used to\neasily navigate through these pages.\n */\nexport function Pagination({\n current,\n items,\n hideLast,\n pagerCallback,\n perPage,\n searchParam = \"page\",\n children,\n id,\n}: PaginationProps) {\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n const perPageValue = perPage > 0 ? perPage : 1;\n const totalPages = Math.ceil(items / perPageValue) || 1;\n\n const linkProps = (number: number) => ({\n href: `${typeof window !== \"undefined\" ? window.location.pathname : \"\"}?${\n searchParam ? `${searchParam}=${number}` : \"\"\n }`,\n onClick: (e: TouchEvent | MouseEvent) => {\n e.preventDefault();\n pagerCallback(number);\n },\n });\n\n const renderPager = (active: number, total: number) => {\n const list = [];\n let pager = [];\n // get the list of items\n for (let number = 1; number <= total; number += 1) {\n list.push(\n <PagerItem key={number}>\n <PagerLink\n data-cta={id ? `${id}-${number}` : null}\n $active={number === active}\n {...linkProps(number)}\n aria-label={`page ${number} of ${total}`}\n >\n {number}\n </PagerLink>\n </PagerItem>,\n );\n }\n const first = list.slice(0, 1).concat(\n <PagerItem key=\"first\">\n <span>...</span>\n </PagerItem>,\n );\n const last = list\n .slice(list.length - 1)\n .concat(\n <PagerItem key=\"last\">\n <span>...</span>\n </PagerItem>,\n )\n .reverse();\n pager = list.slice(0, total);\n if (total > 7) {\n if (active <= 4) {\n pager = hideLast ? list.slice(0, 7) : list.slice(0, 5).concat(last);\n } else {\n pager =\n active > total - 4\n ? first.concat(list.slice(-5))\n : hideLast\n ? first.concat(list.slice(active - 3, active + 2))\n : first.concat(list.slice(active - 2, active + 1)).concat(last);\n }\n }\n return pager;\n };\n\n return (\n <ThemeProvider theme={theme}>\n {items > perPage && (\n <PagerWrapper>\n <PagerList>\n <PagerItem key=\"Prev\">\n <PagerLink\n data-cta={id ? `${id}-prev` : null}\n name=\"Prev\"\n aria-disabled={current === 1}\n {...(current === 1 && { tabIndex: -1 })}\n {...(current !== 1 && linkProps(current - 1))}\n $disabled={current === 1}\n >\n Prev\n </PagerLink>\n </PagerItem>\n {renderPager(current, totalPages)}\n <PagerItem key=\"Next\">\n <PagerLink\n data-cta={id ? `${id}-next` : null}\n name=\"Next\"\n aria-disabled={current === totalPages}\n {...(current === totalPages && { tabIndex: -1 })}\n {...(current !== totalPages && linkProps(current + 1))}\n $disabled={current === totalPages}\n >\n Next\n </PagerLink>\n </PagerItem>\n </PagerList>\n {children}\n </PagerWrapper>\n )}\n </ThemeProvider>\n );\n}\n\nexport default Pagination;\n"],"names":["Pagination","current","items","hideLast","pagerCallback","perPage","searchParam","children","id","foundTheme","useTheme","theme","defaultTheme","perPageValue","totalPages","Math","ceil","linkProps","number","href","window","location","pathname","onClick","e","preventDefault","React","createElement","ThemeProvider","PagerWrapper","PagerList","PagerItem","key","PagerLink","name","tabIndex","active","total","list","pager","push","$active","first","slice","concat","last","length","reverse","renderPager","$disabled"],"mappings":"8NAkCM,SAAUA,GAAWC,QACzBA,EAAOC,MACPA,EAAKC,SACLA,EAAQC,cACRA,EAAaC,QACbA,EAAOC,YACPA,EAAc,OAAMC,SACpBA,EAAQC,GACRA,IAEA,MAAMC,EAAaC,IACbC,EAAQ,IACTC,KACAH,GAECI,EAAeR,EAAU,EAAIA,EAAU,EACvCS,EAAaC,KAAKC,KAAKd,EAAQW,IAAiB,EAEhDI,EAAaC,IAAoB,CACrCC,KAAM,GAAqB,o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ACEuC,EAAME,OAAON,EAAKK,MAAMP,EAAS,EAAGA,EAAS,IAC7CM,EAAME,OAAON,EAAKK,MAAMP,EAAS,EAAGA,EAAS,IAAIQ,OAAOC,IAG7DN,CAAK,EAoBHS,CAAY/C,EAASa,GACtBY,EAAAC,cAACI,EAAS,CAACC,IAAI,QACbN,EAACC,cAAAM,EACW,CAAA,WAAAzB,EAAK,GAAGA,SAAY,KAC9B0B,KAAK,OACU,gBAAAjC,IAAYa,KACtBb,IAAYa,GAAc,CAAEqB,UAAY,MACxClC,IAAYa,GAAcG,EAAUhB,EAAU,GACxCgD,UAAAhD,IAAYa,GAGb,UAGfP,GAKX"}
|
|
@@ -1,2 +1,93 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o,{css as e}from"styled-components";const t=o.div`
|
|
2
|
+
display: table;
|
|
3
|
+
width: 100%;
|
|
4
|
+
clear: both;
|
|
5
|
+
text-align: center;
|
|
6
|
+
`,n=o.ul`
|
|
7
|
+
display: inline-block;
|
|
8
|
+
padding-left: 0;
|
|
9
|
+
margin: 20px 0;
|
|
10
|
+
`,i=o.a`
|
|
11
|
+
font-weight: normal;
|
|
12
|
+
font-family: ${({theme:{typography:{fontFamilyBase:o}}})=>o};
|
|
13
|
+
font-size: ${({theme:{fontSizes:{s:o}}})=>o};
|
|
14
|
+
color: ${({theme:o})=>o.colors.textLight};
|
|
15
|
+
background-color: ${({theme:o})=>o.colors.paginationBackground};
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
border-radius: 0;
|
|
18
|
+
margin: ${({theme:o})=>o.spacing.xxs};
|
|
19
|
+
padding: 7px 11px;
|
|
20
|
+
text-decoration: none;
|
|
21
|
+
&:active,
|
|
22
|
+
&:focus,
|
|
23
|
+
&:hover {
|
|
24
|
+
opacity: 0.88;
|
|
25
|
+
text-decoration: underline;
|
|
26
|
+
}
|
|
27
|
+
&:visited {
|
|
28
|
+
text-decoration: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:focus-visible {
|
|
32
|
+
outline: auto;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
${({$active:o,theme:t})=>o&&e`
|
|
36
|
+
color: ${t.colors.textDark};
|
|
37
|
+
background-color: ${t.colors.paginationActive};
|
|
38
|
+
cursor: default;
|
|
39
|
+
&:hover {
|
|
40
|
+
background-color: ${t.colors.paginationActive};
|
|
41
|
+
text-decoration: none;
|
|
42
|
+
}
|
|
43
|
+
`}
|
|
44
|
+
|
|
45
|
+
${({name:o,theme:t,$disabled:n})=>("Prev"===o||"Next"===o)&&e`
|
|
46
|
+
color: ${n?t.colors.disabled:t.colors.paginationText};
|
|
47
|
+
background-color: transparent;
|
|
48
|
+
font-weight: bold;
|
|
49
|
+
padding: 8px 6px;
|
|
50
|
+
background-color: transparent;
|
|
51
|
+
&:focus,
|
|
52
|
+
&:hover {
|
|
53
|
+
background-color: transparent;
|
|
54
|
+
text-decoration: underline;
|
|
55
|
+
}
|
|
56
|
+
&:active,
|
|
57
|
+
&:visited {
|
|
58
|
+
text-decoration: none;
|
|
59
|
+
}
|
|
60
|
+
`}
|
|
61
|
+
|
|
62
|
+
${({theme:o,$disabled:t})=>t&&e`
|
|
63
|
+
color: $ ${o.colors.disabled};
|
|
64
|
+
cursor: not-allowed;
|
|
65
|
+
pointer-events:none
|
|
66
|
+
text-decoration: none;
|
|
67
|
+
&:hover,
|
|
68
|
+
&:focus,
|
|
69
|
+
&:active,
|
|
70
|
+
&:visited {
|
|
71
|
+
color: ${o.colors.disabled};
|
|
72
|
+
text-decoration: none;
|
|
73
|
+
}
|
|
74
|
+
`}
|
|
75
|
+
`,r=o.li`
|
|
76
|
+
display: none;
|
|
77
|
+
&:first-child,
|
|
78
|
+
&:last-child {
|
|
79
|
+
display: inline;
|
|
80
|
+
}
|
|
81
|
+
@media (min-width: ${o=>o.theme.breakpoint.mobile}) {
|
|
82
|
+
display: inline;
|
|
83
|
+
}
|
|
84
|
+
span {
|
|
85
|
+
border: none;
|
|
86
|
+
min-width: 30px;
|
|
87
|
+
padding: 5px;
|
|
88
|
+
margin: 1px;
|
|
89
|
+
border-radius: 0;
|
|
90
|
+
border-width: ${o=>o.theme.breakpoint.mobile};
|
|
91
|
+
}
|
|
92
|
+
`;export{r as PagerItem,i as PagerLink,n as PagerList,t as PagerWrapper};
|
|
2
93
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../src/components/Pagination/styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport { type ThemeType } from \"../../types\";\n\nexport const PagerWrapper = styled.div`\n display: table;\n width: 100%;\n clear: both;\n text-align: center;\n`;\n\nexport const PagerList = styled.ul`\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n`;\n\nexport const PagerLink = styled.a<{\n name?: string;\n theme: ThemeType;\n $active?: boolean;\n $disabled?: boolean;\n}>`\n font-weight: normal;\n font-family: ${({\n theme: {\n typography: { fontFamilyBase },\n },\n }) => fontFamilyBase};\n font-size: ${({\n theme: {\n fontSizes: { s },\n },\n }) => s};\n color: ${({ theme }) => theme.colors.textLight};\n background-color: ${({ theme }) => theme.colors.paginationBackground};\n cursor: pointer;\n border-radius: 0;\n margin: ${({ theme }) => theme.spacing.xxs};\n padding: 7px 11px;\n text-decoration: none;\n &:active,\n &:focus,\n &:hover {\n opacity: 0.88;\n text-decoration: underline;\n }\n &:visited {\n text-decoration: none;\n }\n\n &:focus-visible {\n outline: auto;\n }\n\n ${({ $active, theme }) =>\n $active &&\n css`\n color: ${theme.colors.textDark};\n background-color: ${theme.colors.paginationActive};\n cursor: default;\n &:hover {\n background-color: ${theme.colors.paginationActive};\n text-decoration: none;\n }\n `}\n\n ${({ name, theme, $disabled }) =>\n (name === \"Prev\" || name === \"Next\") &&\n css`\n color: ${$disabled ? theme.colors.disabled : theme.colors.paginationText};\n background-color: transparent;\n font-weight: bold;\n padding: 8px 6px;\n background-color: transparent;\n &:focus,\n &:hover {\n background-color: transparent;\n text-decoration: underline;\n }\n &:active,\n &:visited {\n text-decoration: none;\n }\n `}\n\n ${({ theme, $disabled }) =>\n $disabled &&\n css`\n color: $ ${theme.colors.disabled};\n cursor: not-allowed;\n pointer-events:none\n text-decoration: none;\n &:hover,\n &:focus,\n &:active,\n &:visited {\n color: ${theme.colors.disabled};\n text-decoration: none;\n }\n `}\n`;\n\nexport const PagerItem = styled.li<{ theme: ThemeType }>`\n display: none;\n &:first-child,\n &:last-child {\n display: inline;\n }\n @media (min-width: ${(props) => props.theme.breakpoint.mobile}) {\n display: inline;\n }\n span {\n border: none;\n min-width: 30px;\n padding: 5px;\n margin: 1px;\n border-radius: 0;\n border-width: ${(props) => props.theme.breakpoint.mobile};\n }\n`;\n"],"names":["PagerWrapper","styled","div","
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../src/components/Pagination/styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport { type ThemeType } from \"../../types\";\n\nexport const PagerWrapper = styled.div`\n display: table;\n width: 100%;\n clear: both;\n text-align: center;\n`;\n\nexport const PagerList = styled.ul`\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n`;\n\nexport const PagerLink = styled.a<{\n name?: string;\n theme: ThemeType;\n $active?: boolean;\n $disabled?: boolean;\n}>`\n font-weight: normal;\n font-family: ${({\n theme: {\n typography: { fontFamilyBase },\n },\n }) => fontFamilyBase};\n font-size: ${({\n theme: {\n fontSizes: { s },\n },\n }) => s};\n color: ${({ theme }) => theme.colors.textLight};\n background-color: ${({ theme }) => theme.colors.paginationBackground};\n cursor: pointer;\n border-radius: 0;\n margin: ${({ theme }) => theme.spacing.xxs};\n padding: 7px 11px;\n text-decoration: none;\n &:active,\n &:focus,\n &:hover {\n opacity: 0.88;\n text-decoration: underline;\n }\n &:visited {\n text-decoration: none;\n }\n\n &:focus-visible {\n outline: auto;\n }\n\n ${({ $active, theme }) =>\n $active &&\n css`\n color: ${theme.colors.textDark};\n background-color: ${theme.colors.paginationActive};\n cursor: default;\n &:hover {\n background-color: ${theme.colors.paginationActive};\n text-decoration: none;\n }\n `}\n\n ${({ name, theme, $disabled }) =>\n (name === \"Prev\" || name === \"Next\") &&\n css`\n color: ${$disabled ? theme.colors.disabled : theme.colors.paginationText};\n background-color: transparent;\n font-weight: bold;\n padding: 8px 6px;\n background-color: transparent;\n &:focus,\n &:hover {\n background-color: transparent;\n text-decoration: underline;\n }\n &:active,\n &:visited {\n text-decoration: none;\n }\n `}\n\n ${({ theme, $disabled }) =>\n $disabled &&\n css`\n color: $ ${theme.colors.disabled};\n cursor: not-allowed;\n pointer-events:none\n text-decoration: none;\n &:hover,\n &:focus,\n &:active,\n &:visited {\n color: ${theme.colors.disabled};\n text-decoration: none;\n }\n `}\n`;\n\nexport const PagerItem = styled.li<{ theme: ThemeType }>`\n display: none;\n &:first-child,\n &:last-child {\n display: inline;\n }\n @media (min-width: ${(props) => props.theme.breakpoint.mobile}) {\n display: inline;\n }\n span {\n border: none;\n min-width: 30px;\n padding: 5px;\n margin: 1px;\n border-radius: 0;\n border-width: ${(props) => props.theme.breakpoint.mobile};\n }\n`;\n"],"names":["PagerWrapper","styled","div","PagerList","ul","PagerLink","a","theme","typography","fontFamilyBase","fontSizes","s","colors","textLight","paginationBackground","spacing","xxs","$active","css","textDark","paginationActive","name","$disabled","disabled","paginationText","PagerItem","li","props","breakpoint","mobile"],"mappings":"2CAGa,MAAAA,EAAeC,EAAOC,GAAG;;;;;EAOzBC,EAAYF,EAAOG,EAAE;;;;EAMrBC,EAAYJ,EAAOK,CAK9B;;iBAEe,EACbC,OACEC,YAAcC,sBAEZA;eACO,EACXF,OACEG,WAAaC,SAEXA;WACG,EAAGJ,WAAYA,EAAMK,OAAOC;sBACjB,EAAGN,WAAYA,EAAMK,OAAOE;;;YAGtC,EAAGP,WAAYA,EAAMQ,QAAQC;;;;;;;;;;;;;;;;;IAiBrC,EAAGC,UAASV,WACZU,GACAC,CAAG;eACQX,EAAMK,OAAOO;0BACFZ,EAAMK,OAAOQ;;;4BAGXb,EAAMK,OAAOQ;;;;;IAKrC,EAAGC,OAAMd,QAAOe,gBACN,SAATD,GAA4B,SAATA,IACpBH,CAAG;eACQI,EAAYf,EAAMK,OAAOW,SAAWhB,EAAMK,OAAOY;;;;;;;;;;;;;;;;IAgB5D,EAAGjB,QAAOe,eACVA,GACAJ,CAAG;iBACUX,EAAMK,OAAOW;;;;;;;;iBAQbhB,EAAMK,OAAOW;;;;EAMjBE,EAAYxB,EAAOyB,EAAwB;;;;;;uBAMhCC,GAAUA,EAAMpB,MAAMqB,WAAWC;;;;;;;;;oBASpCF,GAAUA,EAAMpB,MAAMqB,WAAWC;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e,{useRef as t,useState as o,useEffect as r}from"react";import{useTheme as n,ThemeProvider as a}from"styled-components";import{useKey as i}from"../../hooks/useKey.js";import{crukTheme as m}from"../../themes/cruk.js";import{useEffectBrowser as l}from"../../hooks/useEffectBrowser.js";import{PopOverWrapper as s,PopOverModal as c}from"./styles.js";function d({onPopOverIsOpenChange:d,children:p,minWidth:u,maxWidth:f,position:h,modalLabel:E,modalContent:k,css:$,full:g=!1}){const j=t(null),[v,x]=o(!1),y=n(),C={...m,...y},W=()=>x(!v),L=()=>x(!1),b=e=>{j.current&&!j.current.contains(e.target)&&L()};return i((()=>{L()}),{detectKeys:["Escape"]},[]),r((()=>{d&&d(v)}),[v,d]),l((()=>(document.addEventListener("click",b,!0),()=>{document.removeEventListener("click",b,!0)})),[]),e.createElement(a,{theme:C},e.createElement(s,{$full:g,$css:$,ref:j},e.Children.map(p,(t=>e.cloneElement(t,{onClick:W,"aria-expanded":v,"aria-haspopup":"dialog"}))),v?e.createElement(c,{$maxWidth:f||"none",$minWidth:u||"auto",$position:h||"top",theme:C,role:"dialog","aria-label":E,"aria-modal":v},k):null))}export{d as PopOver,d as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/PopOver/index.tsx"],"sourcesContent":["import React, {\n useState,\n useEffect,\n useRef,\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/PopOver/index.tsx"],"sourcesContent":["import React, {\n useState,\n useEffect,\n useRef,\n type ReactNode,\n type DetailedReactHTMLElement,\n} from \"react\";\nimport { ThemeProvider, useTheme } from \"styled-components\";\n\nimport { useKey } from \"../../hooks/useKey\";\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\nimport { useEffectBrowser } from \"../../hooks/useEffectBrowser\";\n\nimport { type PopOverPositionType } from \"../../types\";\nimport { PopOverWrapper, PopOverModal } from \"./styles\";\n\nexport type PopOverProps = {\n /** modalLabel: used for aria-label of modal */\n modalLabel: string;\n /** modalContent: contents in side the popover modal */\n modalContent: ReactNode;\n /** position: position that the popover opens relative to the triggering element, the trigger element is the child of the component */\n position?: PopOverPositionType;\n /** full: enable child button extend full width */\n full?: boolean;\n /** maxWidth: popover modal max width */\n maxWidth?: string;\n /** minWidth: popover modal min width */\n minWidth?: string;\n /** onPopOverIsOpenChange: popover isOpen changed handler */\n onPopOverIsOpenChange?: (isOpen: boolean) => void;\n children?: ReactNode;\n css?: string;\n};\n\n/**\n * Popover is a non-modal dialog that floats around its disclosure. It's\ncommonly used for displaying additional rich content on top of something.\n*/\nexport function PopOver({\n onPopOverIsOpenChange,\n children,\n minWidth,\n maxWidth,\n position,\n modalLabel,\n modalContent,\n css,\n full = false,\n}: PopOverProps) {\n const popRef = useRef<HTMLDivElement>(null);\n const [showPopOver, setShowPopOver] = useState(false);\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n\n const toggle = () => setShowPopOver(!showPopOver);\n const closePopOver = () => setShowPopOver(false);\n\n // outside click closes popover\n const handleDocumentClick = (e: MouseEvent) => {\n if (!!popRef.current && !popRef.current.contains(e.target as Node)) {\n closePopOver();\n }\n };\n\n useKey(\n () => {\n closePopOver();\n },\n {\n detectKeys: [\"Escape\"],\n },\n [],\n );\n\n useEffect(() => {\n if (onPopOverIsOpenChange) {\n onPopOverIsOpenChange(showPopOver);\n }\n }, [showPopOver, onPopOverIsOpenChange]);\n\n useEffectBrowser(() => {\n document.addEventListener(\"click\", handleDocumentClick, true);\n return () => {\n document.removeEventListener(\"click\", handleDocumentClick, true);\n };\n }, []);\n\n return (\n <ThemeProvider theme={theme}>\n <PopOverWrapper $full={full} $css={css} ref={popRef}>\n {React.Children.map(children, (child) =>\n React.cloneElement(\n child as DetailedReactHTMLElement<object, HTMLElement>,\n {\n onClick: toggle,\n \"aria-expanded\": showPopOver,\n \"aria-haspopup\": \"dialog\",\n },\n ),\n )}\n {showPopOver ? (\n <PopOverModal\n $maxWidth={maxWidth || \"none\"}\n $minWidth={minWidth || \"auto\"}\n $position={position || \"top\"}\n theme={theme}\n role=\"dialog\"\n aria-label={modalLabel}\n aria-modal={showPopOver}\n >\n {modalContent}\n </PopOverModal>\n ) : null}\n </PopOverWrapper>\n </ThemeProvider>\n );\n}\n\nexport default PopOver;\n"],"names":["PopOver","onPopOverIsOpenChange","children","minWidth","maxWidth","position","modalLabel","modalContent","css","full","popRef","useRef","showPopOver","setShowPopOver","useState","foundTheme","useTheme","theme","defaultTheme","toggle","closePopOver","handleDocumentClick","e","current","contains","target","useKey","detectKeys","useEffect","useEffectBrowser","document","addEventListener","removeEventListener","React","createElement","ThemeProvider","PopOverWrapper","$css","ref","Children","map","child","cloneElement","onClick","PopOverModal","$minWidth","role"],"mappings":"iWAuCM,SAAUA,GAAQC,sBACtBA,EAAqBC,SACrBA,EAAQC,SACRA,EAAQC,SACRA,EAAQC,SACRA,EAAQC,WACRA,EAAUC,aACVA,EAAYC,IACZA,EAAGC,KACHA,GAAO,IAEP,MAAMC,EAASC,EAAuB,OAC/BC,EAAaC,GAAkBC,GAAS,GACzCC,EAAaC,IACbC,EAAQ,IACTC,KACAH,GAGCI,EAAS,IAAMN,GAAgBD,GAC/BQ,EAAe,IAAMP,GAAe,GAGpCQ,EAAuBC,IACrBZ,EAAOa,UAAYb,EAAOa,QAAQC,SAASF,EAAEG,SACjDL,KA2BJ,OAvBAM,GACE,KACEN,GAAc,GAEhB,CACEO,WAAY,CAAC,WAEf,IAGFC,GAAU,KACJ3B,GACFA,EAAsBW,KAEvB,CAACA,EAAaX,IAEjB4B,GAAiB,KACfC,SAASC,iBAAiB,QAASV,GAAqB,GACjD,KACLS,SAASE,oBAAoB,QAASX,GAAqB,EAAK,IAEjE,IAGDY,EAACC,cAAAC,EAAc,CAAAlB,MAAOA,GACpBgB,EAACC,cAAAE,SAAsB3B,EAAI4B,KAAQ7B,EAAK8B,IAAK5B,GAC1CuB,EAAMM,SAASC,IAAItC,GAAWuC,GAC7BR,EAAMS,aACJD,EACA,CACEE,QAASxB,EACT,gBAAiBP,EACjB,gBAAiB,aAItBA,EACCqB,EAACC,cAAAU,aACYxC,GAAY,OAAMyC,UAClB1C,GAAY,iBACZE,GAAY,MACvBY,MAAOA,EACP6B,KAAK,SACO,aAAAxC,eACAM,GAEXL,GAED,MAIZ"}
|
|
@@ -1,2 +1,82 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t,{css as e}from"styled-components";const o=t.div`
|
|
2
|
+
position: relative;
|
|
3
|
+
display: ${({$full:t})=>t?"block":"inline-block"};
|
|
4
|
+
${t=>t.$css&&e`
|
|
5
|
+
${t.$css}
|
|
6
|
+
`}
|
|
7
|
+
`,r=t.div`
|
|
8
|
+
position: absolute;
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
word-wrap: break-word;
|
|
12
|
+
z-index: 9999;
|
|
13
|
+
max-width: ${({$maxWidth:t})=>t};
|
|
14
|
+
min-width: ${({$minWidth:t})=>t};
|
|
15
|
+
font-size: ${({theme:{fontSizes:{s:t}}})=>t};
|
|
16
|
+
background-color: ${({theme:{colors:{popoverBackground:t}}})=>t};
|
|
17
|
+
background-clip: padding-box;
|
|
18
|
+
border: 1px solid rgba(0, 0, 0, 0.25);
|
|
19
|
+
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
|
20
|
+
|
|
21
|
+
margin-bottom: ${({$position:t})=>{switch(t){case"top":case"topLeft":case"bottomLeft":default:return"10px";case"left":case"right":case"bottom":return 0}}};
|
|
22
|
+
|
|
23
|
+
margin-top: ${({$position:t})=>{switch(t){case"bottom":case"bottomLeft":case"left":case"right":return"10px";default:return 0}}};
|
|
24
|
+
top: ${({$position:t})=>{switch(t){case"top":case"topLeft":default:return"auto";case"left":case"right":case"bottom":case"bottomLeft":return"100%"}}};
|
|
25
|
+
|
|
26
|
+
bottom: ${({$position:t})=>{switch(t){case"top":case"topLeft":default:return"100%";case"left":case"right":case"bottom":case"bottomLeft":return"auto"}}};
|
|
27
|
+
|
|
28
|
+
left: ${({$position:t})=>"top"===t?0:"auto"};
|
|
29
|
+
right: ${({$position:t})=>{switch(t){case"top":case"left":case"bottom":default:return"auto";case"topLeft":case"bottomLeft":return 0;case"right":return"0"}}};
|
|
30
|
+
|
|
31
|
+
&:after,
|
|
32
|
+
&:before {
|
|
33
|
+
content: "";
|
|
34
|
+
border-style: solid;
|
|
35
|
+
border-width: 10px;
|
|
36
|
+
width: 0;
|
|
37
|
+
height: 0;
|
|
38
|
+
position: absolute;
|
|
39
|
+
top: ${({$position:t})=>{switch(t){case"top":case"topLeft":default:return"100%";case"left":case"right":case"bottom":case"bottomLeft":return"auto"}}};
|
|
40
|
+
bottom: ${({$position:t})=>{switch(t){case"top":case"topLeft":default:return"auto";case"left":case"right":case"bottom":case"bottomLeft":return"100%"}}};
|
|
41
|
+
|
|
42
|
+
left: ${({$position:t,theme:e})=>{switch(t){case"top":case"left":case"bottom":default:return`${e.spacing.s}`;case"topLeft":case"right":case"bottomLeft":return"auto"}}};
|
|
43
|
+
right: ${({$position:t,theme:e})=>{switch(t){case"top":case"left":case"bottom":default:return"auto";case"topLeft":case"right":case"bottomLeft":return`${e.spacing.s}`}}};
|
|
44
|
+
}
|
|
45
|
+
&:before {
|
|
46
|
+
border-color: ${({$position:t})=>{switch(t){case"top":case"topLeft":default:return"rgba(0, 0, 0, 0.25) transparent transparent";case"left":case"right":case"bottom":case"bottomLeft":return"transparent transparent rgba(0, 0, 0, 0.25)"}}};
|
|
47
|
+
}
|
|
48
|
+
&:after {
|
|
49
|
+
margin: ${({$position:t})=>{switch(t){case"top":case"topLeft":default:return"-1px 0 0 0";case"left":case"right":case"bottom":case"bottomLeft":return"0 0 -1px 0"}}};
|
|
50
|
+
border-color: ${({theme:t,$position:e})=>{switch(e){case"top":case"topLeft":default:return`${t.colors.popoverBackground} transparent transparent`;case"left":case"right":case"bottom":case"bottomLeft":return`transparent transparent ${t.colors.popoverBackground}`}}};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@media (min-width: ${({theme:t})=>t.breakpoint.desktop}) {
|
|
54
|
+
margin-top: ${({$position:t})=>{switch(t){case"bottom":case"bottomLeft":return"10px";default:return 0}}};
|
|
55
|
+
|
|
56
|
+
margin-left: ${({$position:t})=>"right"===t?"10px":0};
|
|
57
|
+
margin-right: ${({$position:t})=>"left"===t?"10px":0};
|
|
58
|
+
|
|
59
|
+
top: ${({$position:t})=>{switch(t){case"top":case"topLeft":default:return"auto";case"left":case"right":return 0;case"bottom":case"bottomLeft":return"100%"}}};
|
|
60
|
+
|
|
61
|
+
left: ${({$position:t})=>{switch(t){case"top":return 0;case"topLeft":case"left":case"bottom":case"bottomLeft":default:return"auto";case"right":return"100%"}}};
|
|
62
|
+
right: ${({$position:t})=>{switch(t){case"top":case"right":case"bottom":default:return"auto";case"topLeft":case"bottomLeft":return 0;case"left":return"100%"}}};
|
|
63
|
+
|
|
64
|
+
&:after,
|
|
65
|
+
&:before {
|
|
66
|
+
content: "";
|
|
67
|
+
top: ${({$position:t,theme:e})=>{switch(t){case"top":case"topLeft":default:return"100%";case"left":case"right":return`${e.spacing.xs}`;case"bottom":case"bottomLeft":return"auto"}}};
|
|
68
|
+
bottom: ${({$position:t})=>{switch(t){case"top":case"topLeft":case"left":case"right":default:return"auto";case"bottom":case"bottomLeft":return"100%"}}};
|
|
69
|
+
|
|
70
|
+
left: ${({$position:t,theme:e})=>{switch(t){case"top":case"bottom":default:return`${e.spacing.s}`;case"topLeft":case"bottomLeft":return"auto";case"left":return"100%";case"right":return"-20px"}}};
|
|
71
|
+
right: ${({$position:t,theme:e})=>{switch(t){case"top":case"left":case"bottom":default:return"auto";case"topLeft":case"bottomLeft":return`${e.spacing.s}`;case"right":return"0"}}};
|
|
72
|
+
}
|
|
73
|
+
&:before {
|
|
74
|
+
border-color: ${({$position:t})=>{switch(t){case"top":case"topLeft":default:return"rgba(0, 0, 0, 0.25) transparent transparent";case"left":return"transparent transparent transparent rgba(0, 0, 0, 0.25)";case"right":return"transparent rgba(0, 0, 0, 0.25) transparent transparent";case"bottom":case"bottomLeft":return"transparent transparent rgba(0, 0, 0, 0.25)"}}};
|
|
75
|
+
}
|
|
76
|
+
&:after {
|
|
77
|
+
margin: ${({$position:t})=>{switch(t){case"top":case"topLeft":default:return"-1px 0 0 0";case"left":return"0 0 0 -1px";case"right":return"0 0 0 1px";case"bottom":case"bottomLeft":return"0 0 -1px 0"}}};
|
|
78
|
+
border-color: ${({theme:t,$position:e})=>{switch(e){case"top":case"topLeft":default:return`${t.colors.popoverBackground} transparent transparent`;case"left":return`transparent transparent transparent ${t.colors.popoverBackground}`;case"right":return`transparent ${t.colors.popoverBackground} transparent transparent`;case"bottom":case"bottomLeft":return`transparent transparent ${t.colors.popoverBackground}`}}};
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
`;export{r as PopOverModal,o as PopOverWrapper};
|
|
2
82
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../src/components/PopOver/styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { type ThemeType, type PopOverPositionType } from \"../../types\";\n\nexport const PopOverWrapper = styled.div<{\n $full: boolean;\n $css?: string;\n}>`\n position: relative;\n display: ${({ $full }) => ($full ? \"block\" : \"inline-block\")};\n ${(props) =>\n props.$css &&\n css`\n ${props.$css}\n `}\n`;\n\nexport const PopOverModal = styled.div<{\n $position: PopOverPositionType;\n $maxWidth: string;\n $minWidth: string;\n theme?: ThemeType;\n}>`\n position: absolute;\n display: flex;\n justify-content: center;\n word-wrap: break-word;\n z-index: 9999;\n max-width: ${({ $maxWidth }) => $maxWidth};\n min-width: ${({ $minWidth }) => $minWidth};\n font-size: ${({\n theme: {\n fontSizes: { s },\n },\n }) => s};\n background-color: ${({\n theme: {\n colors: { popoverBackground },\n },\n }) => popoverBackground};\n background-clip: padding-box;\n border: 1px solid rgba(0, 0, 0, 0.25);\n box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n\n margin-bottom: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"10px\";\n case \"topLeft\":\n return \"10px\";\n case \"left\":\n return 0;\n case \"right\":\n return 0;\n case \"bottom\":\n return 0;\n case \"bottomLeft\":\n return \"10px\";\n default:\n return \"10px\";\n }\n }};\n\n margin-top: ${({ $position }) => {\n switch ($position) {\n case \"bottom\":\n return \"10px\";\n case \"bottomLeft\":\n return \"10px\";\n case \"left\":\n return \"10px\";\n case \"right\":\n return \"10px\";\n default:\n return 0;\n }\n }};\n top: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"auto\";\n case \"topLeft\":\n return \"auto\";\n case \"left\":\n return \"100%\";\n case \"right\":\n return \"100%\";\n case \"bottom\":\n return \"100%\";\n case \"bottomLeft\":\n return \"100%\";\n default:\n return \"auto\";\n }\n }};\n\n bottom: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"100%\";\n case \"topLeft\":\n return \"100%\";\n case \"left\":\n return \"auto\";\n case \"right\":\n return \"auto\";\n case \"bottom\":\n return \"auto\";\n case \"bottomLeft\":\n return \"auto\";\n default:\n return \"100%\";\n }\n }};\n\n left: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return 0;\n case \"topLeft\":\n return \"auto\";\n case \"left\":\n return \"auto\";\n case \"right\":\n return \"auto\";\n case \"bottom\":\n return \"auto\";\n case \"bottomLeft\":\n return \"auto\";\n default:\n return \"auto\";\n }\n }};\n right: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"auto\";\n case \"topLeft\":\n return 0;\n case \"left\":\n return \"auto\";\n case \"right\":\n return \"0\";\n case \"bottom\":\n return \"auto\";\n case \"bottomLeft\":\n return 0;\n default:\n return \"auto\";\n }\n }};\n\n &:after,\n &:before {\n content: \"\";\n border-style: solid;\n border-width: 10px;\n width: 0;\n height: 0;\n position: absolute;\n top: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"100%\";\n case \"topLeft\":\n return \"100%\";\n case \"left\":\n return \"auto\";\n case \"right\":\n return \"auto\";\n case \"bottom\":\n return \"auto\";\n case \"bottomLeft\":\n return \"auto\";\n default:\n return \"100%\";\n }\n }};\n bottom: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"auto\";\n case \"topLeft\":\n return \"auto\";\n case \"left\":\n return \"100%\";\n case \"right\":\n return \"100%\";\n case \"bottom\":\n return \"100%\";\n case \"bottomLeft\":\n return \"100%\";\n default:\n return \"auto\";\n }\n }};\n\n left: ${({ $position, theme }) => {\n switch ($position) {\n case \"top\":\n return `${theme.spacing.s}`;\n case \"topLeft\":\n return \"auto\";\n case \"left\":\n return `${theme.spacing.s}`;\n case \"right\":\n return \"auto\";\n case \"bottom\":\n return `${theme.spacing.s}`;\n case \"bottomLeft\":\n return \"auto\";\n default:\n return `${theme.spacing.s}`;\n }\n }};\n right: ${({ $position, theme }) => {\n switch ($position) {\n case \"top\":\n return `auto`;\n case \"topLeft\":\n return `${theme.spacing.s}`;\n case \"left\":\n return \"auto\";\n case \"right\":\n return `${theme.spacing.s}`;\n case \"bottom\":\n return `auto`;\n case \"bottomLeft\":\n return `${theme.spacing.s}`;\n default:\n return `auto`;\n }\n }};\n }\n &:before {\n border-color: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"rgba(0, 0, 0, 0.25) transparent transparent\";\n case \"topLeft\":\n return \"rgba(0, 0, 0, 0.25) transparent transparent\";\n case \"left\":\n return \"transparent transparent rgba(0, 0, 0, 0.25)\";\n case \"right\":\n return \"transparent transparent rgba(0, 0, 0, 0.25)\";\n case \"bottom\":\n return \"transparent transparent rgba(0, 0, 0, 0.25)\";\n case \"bottomLeft\":\n return \"transparent transparent rgba(0, 0, 0, 0.25)\";\n default:\n return \"rgba(0, 0, 0, 0.25) transparent transparent\";\n }\n }};\n }\n &:after {\n margin: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"-1px 0 0 0\";\n case \"topLeft\":\n return \"-1px 0 0 0\";\n case \"left\":\n return \"0 0 -1px 0\";\n case \"right\":\n return \"0 0 -1px 0\";\n case \"bottom\":\n return \"0 0 -1px 0\";\n case \"bottomLeft\":\n return \"0 0 -1px 0\";\n default:\n return \"-1px 0 0 0\";\n }\n }};\n border-color: ${({ theme, $position }) => {\n switch ($position) {\n case \"top\":\n return `${theme.colors.popoverBackground} transparent transparent`;\n case \"topLeft\":\n return `${theme.colors.popoverBackground} transparent transparent`;\n case \"left\":\n return `transparent transparent ${theme.colors.popoverBackground}`;\n case \"right\":\n return `transparent transparent ${theme.colors.popoverBackground}`;\n case \"bottom\":\n return `transparent transparent ${theme.colors.popoverBackground}`;\n case \"bottomLeft\":\n return `transparent transparent ${theme.colors.popoverBackground}`;\n default:\n return `${theme.colors.popoverBackground} transparent transparent`;\n }\n }};\n }\n\n @media (min-width: ${({ theme }) => theme.breakpoint.desktop}) {\n margin-top: ${({ $position }) => {\n switch ($position) {\n case \"bottom\":\n return \"10px\";\n case \"bottomLeft\":\n return \"10px\";\n default:\n return 0;\n }\n }};\n\n margin-left: ${({ $position }) => {\n switch ($position) {\n case \"right\":\n return \"10px\";\n default:\n return 0;\n }\n }};\n margin-right: ${({ $position }) => {\n switch ($position) {\n case \"left\":\n return \"10px\";\n default:\n return 0;\n }\n }};\n\n top: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"auto\";\n case \"topLeft\":\n return \"auto\";\n case \"left\":\n return 0;\n case \"right\":\n return 0;\n case \"bottom\":\n return \"100%\";\n case \"bottomLeft\":\n return \"100%\";\n default:\n return \"auto\";\n }\n }};\n\n left: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return 0;\n case \"topLeft\":\n return \"auto\";\n case \"left\":\n return \"auto\";\n case \"right\":\n return \"100%\";\n case \"bottom\":\n return \"auto\";\n case \"bottomLeft\":\n return \"auto\";\n default:\n return \"auto\";\n }\n }};\n right: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"auto\";\n case \"topLeft\":\n return 0;\n case \"left\":\n return \"100%\";\n case \"right\":\n return \"auto\";\n case \"bottom\":\n return \"auto\";\n case \"bottomLeft\":\n return 0;\n default:\n return \"auto\";\n }\n }};\n\n &:after,\n &:before {\n content: \"\";\n top: ${({ $position, theme }) => {\n switch ($position) {\n case \"top\":\n return \"100%\";\n case \"topLeft\":\n return \"100%\";\n case \"left\":\n return `${theme.spacing.xs}`;\n case \"right\":\n return `${theme.spacing.xs}`;\n case \"bottom\":\n return \"auto\";\n case \"bottomLeft\":\n return \"auto\";\n default:\n return \"100%\";\n }\n }};\n bottom: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"auto\";\n case \"topLeft\":\n return \"auto\";\n case \"left\":\n return \"auto\";\n case \"right\":\n return \"auto\";\n case \"bottom\":\n return \"100%\";\n case \"bottomLeft\":\n return \"100%\";\n default:\n return \"auto\";\n }\n }};\n\n left: ${({ $position, theme }) => {\n switch ($position) {\n case \"top\":\n return `${theme.spacing.s}`;\n case \"topLeft\":\n return \"auto\";\n case \"left\":\n return \"100%\";\n case \"right\":\n return \"-20px\";\n case \"bottom\":\n return `${theme.spacing.s}`;\n case \"bottomLeft\":\n return \"auto\";\n default:\n return `${theme.spacing.s}`;\n }\n }};\n right: ${({ $position, theme }) => {\n switch ($position) {\n case \"top\":\n return `auto`;\n case \"topLeft\":\n return `${theme.spacing.s}`;\n case \"left\":\n return \"auto\";\n case \"right\":\n return `0`;\n case \"bottom\":\n return `auto`;\n case \"bottomLeft\":\n return `${theme.spacing.s}`;\n default:\n return `auto`;\n }\n }};\n }\n &:before {\n border-color: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"rgba(0, 0, 0, 0.25) transparent transparent\";\n case \"topLeft\":\n return \"rgba(0, 0, 0, 0.25) transparent transparent\";\n case \"left\":\n return \"transparent transparent transparent rgba(0, 0, 0, 0.25)\";\n case \"right\":\n return \"transparent rgba(0, 0, 0, 0.25) transparent transparent\";\n case \"bottom\":\n return \"transparent transparent rgba(0, 0, 0, 0.25)\";\n case \"bottomLeft\":\n return \"transparent transparent rgba(0, 0, 0, 0.25)\";\n default:\n return \"rgba(0, 0, 0, 0.25) transparent transparent\";\n }\n }};\n }\n &:after {\n margin: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"-1px 0 0 0\";\n case \"topLeft\":\n return \"-1px 0 0 0\";\n case \"left\":\n return \"0 0 0 -1px\";\n case \"right\":\n return \"0 0 0 1px\";\n case \"bottom\":\n return \"0 0 -1px 0\";\n case \"bottomLeft\":\n return \"0 0 -1px 0\";\n default:\n return \"-1px 0 0 0\";\n }\n }};\n border-color: ${({ theme, $position }) => {\n switch ($position) {\n case \"top\":\n return `${theme.colors.popoverBackground} transparent transparent`;\n case \"topLeft\":\n return `${theme.colors.popoverBackground} transparent transparent`;\n case \"left\":\n return `transparent transparent transparent ${theme.colors.popoverBackground}`;\n case \"right\":\n return `transparent ${theme.colors.popoverBackground} transparent transparent`;\n case \"bottom\":\n return `transparent transparent ${theme.colors.popoverBackground}`;\n case \"bottomLeft\":\n return `transparent transparent ${theme.colors.popoverBackground}`;\n default:\n return `${theme.colors.popoverBackground} transparent transparent`;\n }\n }};\n }\n }\n`;\n"],"names":["PopOverWrapper","styled","div","templateObject_2","__makeTemplateObject","_a","$full","props","$css","css","templateObject_1","PopOverModal","templateObject_3","$maxWidth","$minWidth","theme","fontSizes","s","colors","popoverBackground","$position","spacing","breakpoint","desktop","xs"],"mappings":"2HAIO,UAAMA,EAAiBC,EAAOC,IAGnCC,IAAAA,EAAAC,EAAA,CAAA,uCAAA,QAAA,MAAA,CAAA,uCAE4D,QAKzD,SALQ,SAACC,GAAc,OAAPA,EAAAC,MAAgB,QAAU,cAAnB,IACxB,SAACC,GACD,OAAAA,EAAMC,MACNC,EAAGC,IAAAA,EAAAN,EAAA,CAAA,WAAA,UAAA,CAAA,WACW,YAAVG,EAAMC,KAFV,IAMSG,EAAeV,EAAOC,IAKjCU,IAAAA,EAAAR,EAAA,CAAA,mIAAA,mBAAA,mBAAA,0BAAA,kJAAA,sBAAA,aAAA,kBAAA,gBAAA,eAAA,wKAAA,kBAAA,kBAAA,iBAAA,2CAAA,oCAAA,wBAAA,kCAAA,wBAAA,yBAAA,wBAAA,iBAAA,kBAAA,iBAAA,qEAAA,oBAAA,oBAAA,mBAAA,iDAAA,0CAAA,0BAAA,mBAAA,CAAA,mIAMyC,mBACA,mBAKlC,0BAKgB,kJAsBtB,sBAeA,aAkBA,kBAmBA,gBAmBA,eAkBA,wKA2BE,kBAkBA,kBAmBA,iBAkBA,2CAoBA,oCAoBA,wBAkBA,kCAGyD,wBAUzD,yBASA,wBAQA,iBAmBA,kBAmBA,iBAkBA,qEAsBE,oBAkBA,oBAmBA,mBAkBA,iDAoBA,0CAoBA,0BAkBA,sBAneQ,SAACC,GAAkB,OAAPA,EAAAQ,SAAO,IACnB,SAACR,GAAkB,OAAPA,EAAAS,SAAO,IACnB,SAACT,GAIR,OAFYA,EAAAU,MAAAC,UAAAC,CAEZ,IACc,SAACZ,GAIf,OAFyBA,EAAAU,MAAAG,OAAAC,iBAEzB,IAKW,SAACd,GAChB,OAD2BA,EAAAe,WAEzB,IAAK,MAEL,IAAK,UAQL,IAAK,aAEL,QACE,MAAO,OATT,IA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K,OACH,MAAO,8CAAuCJ,EAAMG,OAAOC,mBAC7D,IAAK,QACH,MAAO,sBAAeJ,EAAMG,OAAOC,8CACrC,IAAK,SAEL,IAAK,aACH,MAAO,kCAA2BJ,EAAMG,OAAOC,mBAIrD"}
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../src/components/PopOver/styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { type ThemeType, type PopOverPositionType } from \"../../types\";\n\nexport const PopOverWrapper = styled.div<{\n $full: boolean;\n $css?: string;\n}>`\n position: relative;\n display: ${({ $full }) => ($full ? \"block\" : \"inline-block\")};\n ${(props) =>\n props.$css &&\n css`\n ${props.$css}\n `}\n`;\n\nexport const PopOverModal = styled.div<{\n $position: PopOverPositionType;\n $maxWidth: string;\n $minWidth: string;\n theme?: ThemeType;\n}>`\n position: absolute;\n display: flex;\n justify-content: center;\n word-wrap: break-word;\n z-index: 9999;\n max-width: ${({ $maxWidth }) => $maxWidth};\n min-width: ${({ $minWidth }) => $minWidth};\n font-size: ${({\n theme: {\n fontSizes: { s },\n },\n }) => s};\n background-color: ${({\n theme: {\n colors: { popoverBackground },\n },\n }) => popoverBackground};\n background-clip: padding-box;\n border: 1px solid rgba(0, 0, 0, 0.25);\n box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n\n margin-bottom: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"10px\";\n case \"topLeft\":\n return \"10px\";\n case \"left\":\n return 0;\n case \"right\":\n return 0;\n case \"bottom\":\n return 0;\n case \"bottomLeft\":\n return \"10px\";\n default:\n return \"10px\";\n }\n }};\n\n margin-top: ${({ $position }) => {\n switch ($position) {\n case \"bottom\":\n return \"10px\";\n case \"bottomLeft\":\n return \"10px\";\n case \"left\":\n return \"10px\";\n case \"right\":\n return \"10px\";\n default:\n return 0;\n }\n }};\n top: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"auto\";\n case \"topLeft\":\n return \"auto\";\n case \"left\":\n return \"100%\";\n case \"right\":\n return \"100%\";\n case \"bottom\":\n return \"100%\";\n case \"bottomLeft\":\n return \"100%\";\n default:\n return \"auto\";\n }\n }};\n\n bottom: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"100%\";\n case \"topLeft\":\n return \"100%\";\n case \"left\":\n return \"auto\";\n case \"right\":\n return \"auto\";\n case \"bottom\":\n return \"auto\";\n case \"bottomLeft\":\n return \"auto\";\n default:\n return \"100%\";\n }\n }};\n\n left: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return 0;\n case \"topLeft\":\n return \"auto\";\n case \"left\":\n return \"auto\";\n case \"right\":\n return \"auto\";\n case \"bottom\":\n return \"auto\";\n case \"bottomLeft\":\n return \"auto\";\n default:\n return \"auto\";\n }\n }};\n right: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"auto\";\n case \"topLeft\":\n return 0;\n case \"left\":\n return \"auto\";\n case \"right\":\n return \"0\";\n case \"bottom\":\n return \"auto\";\n case \"bottomLeft\":\n return 0;\n default:\n return \"auto\";\n }\n }};\n\n &:after,\n &:before {\n content: \"\";\n border-style: solid;\n border-width: 10px;\n width: 0;\n height: 0;\n position: absolute;\n top: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"100%\";\n case \"topLeft\":\n return \"100%\";\n case \"left\":\n return \"auto\";\n case \"right\":\n return \"auto\";\n case \"bottom\":\n return \"auto\";\n case \"bottomLeft\":\n return \"auto\";\n default:\n return \"100%\";\n }\n }};\n bottom: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"auto\";\n case \"topLeft\":\n return \"auto\";\n case \"left\":\n return \"100%\";\n case \"right\":\n return \"100%\";\n case \"bottom\":\n return \"100%\";\n case \"bottomLeft\":\n return \"100%\";\n default:\n return \"auto\";\n }\n }};\n\n left: ${({ $position, theme }) => {\n switch ($position) {\n case \"top\":\n return `${theme.spacing.s}`;\n case \"topLeft\":\n return \"auto\";\n case \"left\":\n return `${theme.spacing.s}`;\n case \"right\":\n return \"auto\";\n case \"bottom\":\n return `${theme.spacing.s}`;\n case \"bottomLeft\":\n return \"auto\";\n default:\n return `${theme.spacing.s}`;\n }\n }};\n right: ${({ $position, theme }) => {\n switch ($position) {\n case \"top\":\n return `auto`;\n case \"topLeft\":\n return `${theme.spacing.s}`;\n case \"left\":\n return \"auto\";\n case \"right\":\n return `${theme.spacing.s}`;\n case \"bottom\":\n return `auto`;\n case \"bottomLeft\":\n return `${theme.spacing.s}`;\n default:\n return `auto`;\n }\n }};\n }\n &:before {\n border-color: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"rgba(0, 0, 0, 0.25) transparent transparent\";\n case \"topLeft\":\n return \"rgba(0, 0, 0, 0.25) transparent transparent\";\n case \"left\":\n return \"transparent transparent rgba(0, 0, 0, 0.25)\";\n case \"right\":\n return \"transparent transparent rgba(0, 0, 0, 0.25)\";\n case \"bottom\":\n return \"transparent transparent rgba(0, 0, 0, 0.25)\";\n case \"bottomLeft\":\n return \"transparent transparent rgba(0, 0, 0, 0.25)\";\n default:\n return \"rgba(0, 0, 0, 0.25) transparent transparent\";\n }\n }};\n }\n &:after {\n margin: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"-1px 0 0 0\";\n case \"topLeft\":\n return \"-1px 0 0 0\";\n case \"left\":\n return \"0 0 -1px 0\";\n case \"right\":\n return \"0 0 -1px 0\";\n case \"bottom\":\n return \"0 0 -1px 0\";\n case \"bottomLeft\":\n return \"0 0 -1px 0\";\n default:\n return \"-1px 0 0 0\";\n }\n }};\n border-color: ${({ theme, $position }) => {\n switch ($position) {\n case \"top\":\n return `${theme.colors.popoverBackground} transparent transparent`;\n case \"topLeft\":\n return `${theme.colors.popoverBackground} transparent transparent`;\n case \"left\":\n return `transparent transparent ${theme.colors.popoverBackground}`;\n case \"right\":\n return `transparent transparent ${theme.colors.popoverBackground}`;\n case \"bottom\":\n return `transparent transparent ${theme.colors.popoverBackground}`;\n case \"bottomLeft\":\n return `transparent transparent ${theme.colors.popoverBackground}`;\n default:\n return `${theme.colors.popoverBackground} transparent transparent`;\n }\n }};\n }\n\n @media (min-width: ${({ theme }) => theme.breakpoint.desktop}) {\n margin-top: ${({ $position }) => {\n switch ($position) {\n case \"bottom\":\n return \"10px\";\n case \"bottomLeft\":\n return \"10px\";\n default:\n return 0;\n }\n }};\n\n margin-left: ${({ $position }) => {\n switch ($position) {\n case \"right\":\n return \"10px\";\n default:\n return 0;\n }\n }};\n margin-right: ${({ $position }) => {\n switch ($position) {\n case \"left\":\n return \"10px\";\n default:\n return 0;\n }\n }};\n\n top: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"auto\";\n case \"topLeft\":\n return \"auto\";\n case \"left\":\n return 0;\n case \"right\":\n return 0;\n case \"bottom\":\n return \"100%\";\n case \"bottomLeft\":\n return \"100%\";\n default:\n return \"auto\";\n }\n }};\n\n left: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return 0;\n case \"topLeft\":\n return \"auto\";\n case \"left\":\n return \"auto\";\n case \"right\":\n return \"100%\";\n case \"bottom\":\n return \"auto\";\n case \"bottomLeft\":\n return \"auto\";\n default:\n return \"auto\";\n }\n }};\n right: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"auto\";\n case \"topLeft\":\n return 0;\n case \"left\":\n return \"100%\";\n case \"right\":\n return \"auto\";\n case \"bottom\":\n return \"auto\";\n case \"bottomLeft\":\n return 0;\n default:\n return \"auto\";\n }\n }};\n\n &:after,\n &:before {\n content: \"\";\n top: ${({ $position, theme }) => {\n switch ($position) {\n case \"top\":\n return \"100%\";\n case \"topLeft\":\n return \"100%\";\n case \"left\":\n return `${theme.spacing.xs}`;\n case \"right\":\n return `${theme.spacing.xs}`;\n case \"bottom\":\n return \"auto\";\n case \"bottomLeft\":\n return \"auto\";\n default:\n return \"100%\";\n }\n }};\n bottom: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"auto\";\n case \"topLeft\":\n return \"auto\";\n case \"left\":\n return \"auto\";\n case \"right\":\n return \"auto\";\n case \"bottom\":\n return \"100%\";\n case \"bottomLeft\":\n return \"100%\";\n default:\n return \"auto\";\n }\n }};\n\n left: ${({ $position, theme }) => {\n switch ($position) {\n case \"top\":\n return `${theme.spacing.s}`;\n case \"topLeft\":\n return \"auto\";\n case \"left\":\n return \"100%\";\n case \"right\":\n return \"-20px\";\n case \"bottom\":\n return `${theme.spacing.s}`;\n case \"bottomLeft\":\n return \"auto\";\n default:\n return `${theme.spacing.s}`;\n }\n }};\n right: ${({ $position, theme }) => {\n switch ($position) {\n case \"top\":\n return `auto`;\n case \"topLeft\":\n return `${theme.spacing.s}`;\n case \"left\":\n return \"auto\";\n case \"right\":\n return `0`;\n case \"bottom\":\n return `auto`;\n case \"bottomLeft\":\n return `${theme.spacing.s}`;\n default:\n return `auto`;\n }\n }};\n }\n &:before {\n border-color: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"rgba(0, 0, 0, 0.25) transparent transparent\";\n case \"topLeft\":\n return \"rgba(0, 0, 0, 0.25) transparent transparent\";\n case \"left\":\n return \"transparent transparent transparent rgba(0, 0, 0, 0.25)\";\n case \"right\":\n return \"transparent rgba(0, 0, 0, 0.25) transparent transparent\";\n case \"bottom\":\n return \"transparent transparent rgba(0, 0, 0, 0.25)\";\n case \"bottomLeft\":\n return \"transparent transparent rgba(0, 0, 0, 0.25)\";\n default:\n return \"rgba(0, 0, 0, 0.25) transparent transparent\";\n }\n }};\n }\n &:after {\n margin: ${({ $position }) => {\n switch ($position) {\n case \"top\":\n return \"-1px 0 0 0\";\n case \"topLeft\":\n return \"-1px 0 0 0\";\n case \"left\":\n return \"0 0 0 -1px\";\n case \"right\":\n return \"0 0 0 1px\";\n case \"bottom\":\n return \"0 0 -1px 0\";\n case \"bottomLeft\":\n return \"0 0 -1px 0\";\n default:\n return \"-1px 0 0 0\";\n }\n }};\n border-color: ${({ theme, $position }) => {\n switch ($position) {\n case \"top\":\n return `${theme.colors.popoverBackground} transparent transparent`;\n case \"topLeft\":\n return `${theme.colors.popoverBackground} transparent transparent`;\n case \"left\":\n return `transparent transparent transparent ${theme.colors.popoverBackground}`;\n case \"right\":\n return `transparent ${theme.colors.popoverBackground} transparent transparent`;\n case \"bottom\":\n return `transparent transparent ${theme.colors.popoverBackground}`;\n case \"bottomLeft\":\n return `transparent transparent ${theme.colors.popoverBackground}`;\n default:\n return `${theme.colors.popoverBackground} transparent transparent`;\n }\n }};\n }\n }\n`;\n"],"names":["PopOverWrapper","styled","div","$full","props","$css","css","PopOverModal","$maxWidth","$minWidth","theme","fontSizes","s","colors","popoverBackground","$position","spacing","breakpoint","desktop","xs"],"mappings":"2CAIa,MAAAA,EAAiBC,EAAOC,GAGnC;;aAEW,EAAGC,WAAaA,EAAQ,QAAU;IAC1CC,GACDA,EAAMC,MACNC,CAAG;QACCF,EAAMC;;EAIDE,EAAeN,EAAOC,GAKjC;;;;;;eAMa,EAAGM,eAAgBA;eACnB,EAAGC,eAAgBA;eACnB,EACXC,OACEC,WAAaC,SAEXA;sBACc,EAClBF,OACEG,QAAUC,yBAERA;;;;;mBAKW,EAAGC,gBAClB,OAAQA,GACN,IAAK,MAEL,IAAK,UAQL,IAAK,aAEL,QACE,MAAO,OATT,IAAK,OAEL,IAAK,QAEL,IAAK,SACH,OAAO;;gBAQC,EAAGA,gBACf,OAAQA,GACN,IAAK,SAEL,IAAK,aAEL,IAAK,OAEL,IAAK,QACH,MAAO,OACT,QACE,OAAO;SAGN,EAAGA,gBACR,OAAQA,GACN,IAAK,MAEL,IAAK,UAUL,QACE,MAAO,OATT,IAAK,OAEL,IAAK,QAEL,IAAK,SAEL,IAAK,aACH,MAAO;;YAMH,EAAGA,gBACX,OAAQA,GACN,IAAK,MAEL,IAAK,UAUL,QACE,MAAO,OATT,IAAK,OAEL,IAAK,QAEL,IAAK,SAEL,IAAK,aACH,MAAO;;UAML,EAAGA,eAEF,QADCA,EAEG,EAYA;WAGJ,EAAGA,gBACV,OAAQA,GACN,IAAK,MAIL,IAAK,OA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SAEL,IAAK,aACH,MAAO;;;gBAOH,EAAGA,gBACX,OAAQA,GACN,IAAK,MAEL,IAAK,UAUL,QACE,MAAO,aATT,IAAK,OACH,MAAO,aACT,IAAK,QACH,MAAO,YACT,IAAK,SAEL,IAAK,aACH,MAAO;sBAKG,EAAGL,QAAOK,gBACxB,OAAQA,GACN,IAAK,MAEL,IAAK,UAUL,QACE,MAAO,GAAGL,EAAMG,OAAOC,4CATzB,IAAK,OACH,MAAO,uCAAuCJ,EAAMG,OAAOC,oBAC7D,IAAK,QACH,MAAO,eAAeJ,EAAMG,OAAOC,4CACrC,IAAK,SAEL,IAAK,aACH,MAAO,2BAA2BJ,EAAMG,OAAOC;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"react";import{useTheme as r,ThemeProvider as t}from"styled-components";import{crukTheme as o}from"../../themes/cruk.js";import{ProgressBarWrapper as a,CircularWrapper as c,CircleSvg as n,EmptyCircle as s,FullCircle as l,CircularValue as m,LineProgressBarWrapper as i,LineProgressBar as $,ScreenReaderOnly as f}from"./styles.js";function h({percentage:h=0,isCircular:p,circleContents:y,circleSize:E,barColor:d,secondaryBarColor:k,secondaryPercentage:u,children:C}){const b=r(),g={...o,...b},x=Number.isNaN(h)?0:h,D=x>100?100:x,N=`${x}%`,S=u&&!Number.isNaN(u)?u:0,I=S>100?100:S,P=`${"string"==typeof y?y:""} ${N}% Complete`,W=y||N,j=58,z=2*Math.PI*j;return e.createElement(t,{theme:g},e.createElement(a,null,p?e.createElement(c,{$circleSize:E||"90px"},e.createElement(n,{viewBox:"0 0 128 128"},e.createElement(s,{cx:64,cy:64,r:j,strokeWidth:6}),e.createElement(l,{$isSecondary:!0,$barColor:k,cx:64,cy:64,r:j,strokeWidth:6,strokeDasharray:z,strokeDashoffset:z*(1-I/100),$strokeDashoffsetInit:z}),e.createElement(l,{$barColor:d,cx:64,cy:64,r:j,strokeWidth:6,strokeDasharray:z,strokeDashoffset:z*(1-D/100),$strokeDashoffsetInit:z})),e.createElement(m,null,W)):e.createElement(i,{$percentage:D,$secondaryPercentage:I},e.createElement($,{$isSecondary:!0,$percentage:I,$barColor:k}),e.createElement($,{$percentage:D,$barColor:d}),e.createElement(f,null,P)),C))}export{h as ProgressBar,h as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|