@cruk/cruk-react-components 5.0.7 → 5.0.8
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/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 +1 -1
- 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 +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 +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 +2 -2
- 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/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/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.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/src/components/Footer/styles.js +69 -1
- package/lib/src/components/Footer/styles.js.map +1 -1
- package/lib/src/components/GlobalStyle.js +37 -1
- package/lib/src/components/GlobalStyle.js.map +1 -1
- 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 +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.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 +1 -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.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.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 +2 -2
- 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/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 +2 -2
- 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 +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 +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 +1 -1
- package/lib/src/components/TextField/index.js +1 -1
- package/lib/src/components/TextField/index.js.map +1 -1
- package/lib/src/components/TextField/styles.js +110 -1
- package/lib/src/components/TextField/styles.js.map +1 -1
- 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/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 +23 -30
- 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/index.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/index.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/index.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}/Collapse/styles.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}/DateField/styles.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}/ErrorText/styles.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}/Footer/styles.d.ts +0 -0
- /package/lib/{components → src/components}/GlobalStyle.d.ts +0 -0
- /package/lib/{components → src/components}/GlobalStyleNoFontFace.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}/InfoBox/index.d.ts +0 -0
- /package/lib/{components → src/components}/InfoBox/styles.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}/Link/index.d.ts +0 -0
- /package/lib/{components → src/components}/Link/styles.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}/Modal/styles.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/index.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}/RadioConsent/styles.d.ts +0 -0
- /package/lib/{components → src/components}/Select/Select.test.cypress.d.ts +0 -0
- /package/lib/{components → src/components}/Select/index.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/index.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/index.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}/TextField/index.d.ts +0 -0
- /package/lib/{components → src/components}/TextField/styles.d.ts +0 -0
- /package/lib/{components → src/components}/ThemeCheatSheet.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/{hooks → src/hooks}/useScrollPosition.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/Totaliser/index.tsx"],"sourcesContent":["import React, { type ReactNode } from \"react\";\nimport { useTheme } from \"styled-components\";\n\nimport {\n calculatePercentRounded,\n formatMoneyWithCommas,\n} from \"../../utils/Helper\";\n\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\nimport { Text } from \"../Text\";\nimport { Badge } from \"../Badge\";\nimport { Box } from \"../Box\";\n\nimport {\n TotaliserWrapper,\n CompactWrapper,\n Summary,\n BubbleWrapper,\n BubbleText,\n GiftAid,\n Total,\n ProgressBarWrapper,\n StyledProgressBar,\n} from \"./styles\";\n\nexport type TotaliserProps = {\n /** financial total as a number */\n total: number;\n /** additional donation amount as a number */\n additionalAmount?: number;\n /** git aid total as a number */\n giftAid?: number;\n /** money target as a number */\n target?: number | null;\n /** flag for low height compact appearance */\n isCompact?: boolean;\n /** component for custom summary message underneath total graph only visible if there is a target */\n summaryMessage?: ReactNode;\n /** component children */\n children?: ReactNode;\n};\n\n// TODO figure out how we want to handle AriaAttributes\n\n/**\n * Think Blue Peter, used to display total raised and if target prop is passed will display tercentage of target reached.\n * */\nexport function Totaliser({\n total,\n additionalAmount,\n giftAid,\n target = null,\n isCompact,\n summaryMessage = undefined,\n children,\n}: TotaliserProps) {\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n const percentageOfTotal = calculatePercentRounded(+total, target || 0);\n const withAdditionalPercentageOfTotal = calculatePercentRounded(\n additionalAmount ? +total + (additionalAmount || 0) : 0,\n target || 0,\n );\n\n const summaryString = `${percentageOfTotal}% of the £${formatMoneyWithCommas(\n target || 0,\n )} target`;\n\n return (\n <TotaliserWrapper $isCompact={isCompact || false} theme={theme}>\n {!isCompact ? (\n <BubbleWrapper theme={theme}>\n <BubbleText>Total raised</BubbleText>\n <Total>£{formatMoneyWithCommas(total)}</Total>\n <GiftAid>+ £{formatMoneyWithCommas(giftAid || 0)} Gift Aid</GiftAid>\n </BubbleWrapper>\n ) : (\n <Box marginHorizontal=\"none\" marginRight=\"xxs\" marginBottom=\"none\">\n <Badge>{`£${formatMoneyWithCommas(total)}`}</Badge>\n </Box>\n )}\n {/* We don't want to show the default summaryMessage if there is no target, because the summary is associated with the target progress bar */}\n {/* However, if we explicitly pass a summaryMessage string/component, then we want to always display it even if the target is zero */}\n\n {(!!target || !!summaryMessage) && (\n <>\n <ProgressBarWrapper $isCompact={isCompact || false} theme={theme}>\n <StyledProgressBar\n theme={theme}\n percentage={percentageOfTotal}\n secondaryPercentage={withAdditionalPercentageOfTotal}\n />\n {!isCompact ? (\n summaryMessage ? (\n <Summary>{summaryMessage}</Summary>\n ) : (\n <Summary>\n <Text as=\"span\">{summaryString}</Text>\n </Summary>\n )\n ) : (\n <CompactWrapper theme={theme}>\n {target !== null && (\n <Summary>\n <Text as=\"span\">{summaryString}</Text>\n </Summary>\n )}\n </CompactWrapper>\n )}\n </ProgressBarWrapper>\n </>\n )}\n {children}\n </TotaliserWrapper>\n );\n}\n\nexport default Totaliser;\n"],"names":["Totaliser","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Totaliser/index.tsx"],"sourcesContent":["import React, { type ReactNode } from \"react\";\nimport { useTheme } from \"styled-components\";\n\nimport {\n calculatePercentRounded,\n formatMoneyWithCommas,\n} from \"../../utils/Helper\";\n\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\nimport { Text } from \"../Text\";\nimport { Badge } from \"../Badge\";\nimport { Box } from \"../Box\";\n\nimport {\n TotaliserWrapper,\n CompactWrapper,\n Summary,\n BubbleWrapper,\n BubbleText,\n GiftAid,\n Total,\n ProgressBarWrapper,\n StyledProgressBar,\n} from \"./styles\";\n\nexport type TotaliserProps = {\n /** financial total as a number */\n total: number;\n /** additional donation amount as a number */\n additionalAmount?: number;\n /** git aid total as a number */\n giftAid?: number;\n /** money target as a number */\n target?: number | null;\n /** flag for low height compact appearance */\n isCompact?: boolean;\n /** component for custom summary message underneath total graph only visible if there is a target */\n summaryMessage?: ReactNode;\n /** component children */\n children?: ReactNode;\n};\n\n// TODO figure out how we want to handle AriaAttributes\n\n/**\n * Think Blue Peter, used to display total raised and if target prop is passed will display tercentage of target reached.\n * */\nexport function Totaliser({\n total,\n additionalAmount,\n giftAid,\n target = null,\n isCompact,\n summaryMessage = undefined,\n children,\n}: TotaliserProps) {\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n const percentageOfTotal = calculatePercentRounded(+total, target || 0);\n const withAdditionalPercentageOfTotal = calculatePercentRounded(\n additionalAmount ? +total + (additionalAmount || 0) : 0,\n target || 0,\n );\n\n const summaryString = `${percentageOfTotal}% of the £${formatMoneyWithCommas(\n target || 0,\n )} target`;\n\n return (\n <TotaliserWrapper $isCompact={isCompact || false} theme={theme}>\n {!isCompact ? (\n <BubbleWrapper theme={theme}>\n <BubbleText>Total raised</BubbleText>\n <Total>£{formatMoneyWithCommas(total)}</Total>\n <GiftAid>+ £{formatMoneyWithCommas(giftAid || 0)} Gift Aid</GiftAid>\n </BubbleWrapper>\n ) : (\n <Box marginHorizontal=\"none\" marginRight=\"xxs\" marginBottom=\"none\">\n <Badge>{`£${formatMoneyWithCommas(total)}`}</Badge>\n </Box>\n )}\n {/* We don't want to show the default summaryMessage if there is no target, because the summary is associated with the target progress bar */}\n {/* However, if we explicitly pass a summaryMessage string/component, then we want to always display it even if the target is zero */}\n\n {(!!target || !!summaryMessage) && (\n <>\n <ProgressBarWrapper $isCompact={isCompact || false} theme={theme}>\n <StyledProgressBar\n theme={theme}\n percentage={percentageOfTotal}\n secondaryPercentage={withAdditionalPercentageOfTotal}\n />\n {!isCompact ? (\n summaryMessage ? (\n <Summary>{summaryMessage}</Summary>\n ) : (\n <Summary>\n <Text as=\"span\">{summaryString}</Text>\n </Summary>\n )\n ) : (\n <CompactWrapper theme={theme}>\n {target !== null && (\n <Summary>\n <Text as=\"span\">{summaryString}</Text>\n </Summary>\n )}\n </CompactWrapper>\n )}\n </ProgressBarWrapper>\n </>\n )}\n {children}\n </TotaliserWrapper>\n );\n}\n\nexport default Totaliser;\n"],"names":["Totaliser","total","additionalAmount","giftAid","target","isCompact","summaryMessage","children","foundTheme","useTheme","theme","defaultTheme","percentageOfTotal","calculatePercentRounded","withAdditionalPercentageOfTotal","summaryString","formatMoneyWithCommas","React","createElement","TotaliserWrapper","$isCompact","Box","marginHorizontal","marginRight","marginBottom","Badge","BubbleWrapper","BubbleText","Total","GiftAid","Fragment","ProgressBarWrapper","StyledProgressBar","percentage","secondaryPercentage","CompactWrapper","Summary","Text","as"],"mappings":"ggBA+CM,SAAUA,GAAUC,MACxBA,EAAKC,iBACLA,EAAgBC,QAChBA,EAAOC,OACPA,EAAS,KAAIC,UACbA,EAASC,eACTA,EAA0BC,SAC1BA,IAEA,MAAMC,EAAaC,IACbC,EAAQ,IACTC,KACAH,GAECI,EAAoBC,GAAyBZ,EAAOG,GAAU,GAC9DU,EAAkCD,EACtCX,GAAoBD,GAASC,GAAoB,GAAK,EACtDE,GAAU,GAGNW,EAAgB,GAAGH,cAA8BI,EACrDZ,GAAU,YAGZ,OACEa,EAACC,cAAAC,EAA6B,CAAAC,WAAAf,IAAa,EAAOK,MAAOA,GACrDL,EAOAY,EAAAC,cAACG,EAAI,CAAAC,iBAAiB,OAAOC,YAAY,MAAMC,aAAa,QAC1DP,EAACC,cAAAO,EAAO,KAAA,IAAIT,EAAsBf,OAPpCgB,gBAACS,EAAa,CAAChB,MAAOA,GACpBO,EAAAC,cAACS,EAAoC,KAAA,gBACrCV,EAAAC,cAACU,EAAK,SAAGZ,EAAsBf,IAC/BgB,EAAAC,cAACW,EAAO,WAAKb,EAAsBb,GAAW,GAAsB,iBAUpEC,KAAYE,IACdW,EAAAC,cAAAD,EAAAa,SAAA,KACEb,EAACC,cAAAa,cAA+B1B,IAAa,EAAOK,MAAOA,GACzDO,EAAAC,cAACc,EAAiB,CAChBtB,MAAOA,EACPuB,WAAYrB,EACZsB,oBAAqBpB,IAErBT,EASAY,EAAAC,cAACiB,EAAc,CAACzB,MAAOA,GACT,OAAXN,GACCa,EAAAC,cAACkB,EAAO,KACNnB,EAAAC,cAACmB,EAAI,CAACC,GAAG,QAAQvB,KAXvBT,EACEW,gBAACmB,EAAO,KAAE9B,GAEVW,EAAAC,cAACkB,EAAO,KACNnB,EAAAC,cAACmB,EAAI,CAACC,GAAG,QAAQvB,MAe5BR,EAGP"}
|
|
@@ -1,2 +1,60 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o,{css as t}from"styled-components";import{ProgressBar as e}from"../ProgressBar/index.js";const r=o.div`
|
|
2
|
+
text-align: center;
|
|
3
|
+
background-color: ${({theme:o})=>o.colors.totaliserBubbleColor};
|
|
4
|
+
border-radius: 3.2rem;
|
|
5
|
+
padding: 5px;
|
|
6
|
+
position: relative;
|
|
7
|
+
p {
|
|
8
|
+
margin: 0;
|
|
9
|
+
}
|
|
10
|
+
`,a=o.div`
|
|
11
|
+
padding: 0 46px 12px;
|
|
12
|
+
margin-top: ${({theme:o})=>o.spacing.s};
|
|
13
|
+
position: relative;
|
|
14
|
+
|
|
15
|
+
${({$isCompact:o,theme:e})=>!0!=!!o&&t`
|
|
16
|
+
div > div > div:not(:first-child) {
|
|
17
|
+
&:after {
|
|
18
|
+
content: "\\25bc";
|
|
19
|
+
color: ${e.colors.totaliserBubbleColor};
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: -30px;
|
|
22
|
+
right: -15px;
|
|
23
|
+
font-size: 32px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
`};
|
|
27
|
+
`,i=o.p`
|
|
28
|
+
color: ${({theme:o})=>o.colors.totaliserBubbleTotalColor};
|
|
29
|
+
font-size: 2.625rem;
|
|
30
|
+
line-height: 3rem;
|
|
31
|
+
font-family: ${({theme:o})=>o.typography.fontFamilyHeadings};
|
|
32
|
+
text-transform: ${({theme:o})=>o.typography.headerTextTransform};
|
|
33
|
+
`,n=o.p`
|
|
34
|
+
color: ${({theme:o})=>o.colors.totaliserBubbleTextColor};
|
|
35
|
+
font-family: ${({theme:o})=>o.typography.fontFamilyHeadings};
|
|
36
|
+
text-transform: ${({theme:{typography:{headerTextTransform:o}}})=>o};
|
|
37
|
+
`,l=o.p`
|
|
38
|
+
color: ${({theme:o})=>o.colors.totaliserBubbleTotalColor};
|
|
39
|
+
font-family: ${({theme:o})=>o.typography.fontFamilyHeadings};
|
|
40
|
+
text-transform: ${({theme:{typography:{headerTextTransform:o}}})=>o};
|
|
41
|
+
`,m=o.span`
|
|
42
|
+
display: block;
|
|
43
|
+
text-align: right;
|
|
44
|
+
margin-top: 12px;
|
|
45
|
+
margin-bottom: 0;
|
|
46
|
+
font-family: ${({theme:o})=>o.typography.fontFamilyBase};
|
|
47
|
+
`,p=o.div`
|
|
48
|
+
font-family: ${({theme:o})=>o.typography.fontFamilyHeadings};
|
|
49
|
+
margin: 0;
|
|
50
|
+
${o=>o.$isCompact&&t`
|
|
51
|
+
${a} {
|
|
52
|
+
border: none;
|
|
53
|
+
padding: 0;
|
|
54
|
+
}
|
|
55
|
+
`}
|
|
56
|
+
`,s=o.div`
|
|
57
|
+
justify-content: flex-end;
|
|
58
|
+
display: flex;
|
|
59
|
+
`,d=o(e)``;export{n as BubbleText,r as BubbleWrapper,s as CompactWrapper,l as GiftAid,a as ProgressBarWrapper,d as StyledProgressBar,m as Summary,i as Total,p as TotaliserWrapper};
|
|
2
60
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../src/components/Totaliser/styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { type ThemeType } from \"../../types\";\n\nimport ProgressBar from \"../ProgressBar\";\n\nexport const BubbleWrapper = styled.div<{\n theme: ThemeType;\n}>`\n text-align: center;\n background-color: ${({ theme }) => theme.colors.totaliserBubbleColor};\n border-radius: 3.2rem;\n padding: 5px;\n position: relative;\n p {\n margin: 0;\n }\n`;\n\nexport const ProgressBarWrapper = styled.div<{\n $isCompact?: boolean;\n theme: ThemeType;\n}>`\n padding: 0 46px 12px;\n margin-top: ${({ theme }) => theme.spacing.s};\n position: relative;\n\n ${({ $isCompact, theme }) =>\n !!$isCompact !== true &&\n css`\n div > div > div:not(:first-child) {\n &:after {\n content: \"\\\\25bc\";\n color: ${theme.colors.totaliserBubbleColor};\n position: absolute;\n top: -30px;\n right: -15px;\n font-size: 32px;\n }\n }\n `};\n`;\n\nexport const Total = styled.p<{\n theme: ThemeType;\n}>`\n color: ${({ theme }) => theme.colors.totaliserBubbleTotalColor};\n font-size: 2.625rem;\n line-height: 3rem;\n font-family: ${({ theme }) => theme.typography.fontFamilyHeadings};\n text-transform: ${({ theme }) => theme.typography.headerTextTransform};\n`;\n\nexport const BubbleText = styled.p<{ theme: ThemeType }>`\n color: ${({ theme }) => theme.colors.totaliserBubbleTextColor};\n font-family: ${({ theme }) => theme.typography.fontFamilyHeadings};\n text-transform: ${({\n theme: {\n typography: { headerTextTransform },\n },\n }) => headerTextTransform};\n`;\n\nexport const GiftAid = styled.p<{ theme: ThemeType }>`\n color: ${({ theme }) => theme.colors.totaliserBubbleTotalColor};\n font-family: ${({ theme }) => theme.typography.fontFamilyHeadings};\n text-transform: ${({\n theme: {\n typography: { headerTextTransform },\n },\n }) => headerTextTransform};\n`;\n\n/* span not a div so that we don't end up with two speech bubble arrows from ProgressBarWrapper */\nexport const Summary = styled.span<{ theme: ThemeType }>`\n display: block;\n text-align: right;\n margin-top: 12px;\n margin-bottom: 0;\n font-family: ${({ theme }) => theme.typography.fontFamilyBase};\n`;\n\nexport const TotaliserWrapper = styled.div<{\n $isCompact: boolean;\n theme: ThemeType;\n}>`\n font-family: ${({ theme }) => theme.typography.fontFamilyHeadings};\n margin: 0;\n ${(props) =>\n props.$isCompact &&\n css`\n ${ProgressBarWrapper} {\n border: none;\n padding: 0;\n }\n `}\n`;\n\nexport const CompactWrapper = styled.div`\n justify-content: flex-end;\n display: flex;\n`;\n\nexport const StyledProgressBar = styled(ProgressBar)``;\n"],"names":["BubbleWrapper","styled","div","
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../src/components/Totaliser/styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { type ThemeType } from \"../../types\";\n\nimport ProgressBar from \"../ProgressBar\";\n\nexport const BubbleWrapper = styled.div<{\n theme: ThemeType;\n}>`\n text-align: center;\n background-color: ${({ theme }) => theme.colors.totaliserBubbleColor};\n border-radius: 3.2rem;\n padding: 5px;\n position: relative;\n p {\n margin: 0;\n }\n`;\n\nexport const ProgressBarWrapper = styled.div<{\n $isCompact?: boolean;\n theme: ThemeType;\n}>`\n padding: 0 46px 12px;\n margin-top: ${({ theme }) => theme.spacing.s};\n position: relative;\n\n ${({ $isCompact, theme }) =>\n !!$isCompact !== true &&\n css`\n div > div > div:not(:first-child) {\n &:after {\n content: \"\\\\25bc\";\n color: ${theme.colors.totaliserBubbleColor};\n position: absolute;\n top: -30px;\n right: -15px;\n font-size: 32px;\n }\n }\n `};\n`;\n\nexport const Total = styled.p<{\n theme: ThemeType;\n}>`\n color: ${({ theme }) => theme.colors.totaliserBubbleTotalColor};\n font-size: 2.625rem;\n line-height: 3rem;\n font-family: ${({ theme }) => theme.typography.fontFamilyHeadings};\n text-transform: ${({ theme }) => theme.typography.headerTextTransform};\n`;\n\nexport const BubbleText = styled.p<{ theme: ThemeType }>`\n color: ${({ theme }) => theme.colors.totaliserBubbleTextColor};\n font-family: ${({ theme }) => theme.typography.fontFamilyHeadings};\n text-transform: ${({\n theme: {\n typography: { headerTextTransform },\n },\n }) => headerTextTransform};\n`;\n\nexport const GiftAid = styled.p<{ theme: ThemeType }>`\n color: ${({ theme }) => theme.colors.totaliserBubbleTotalColor};\n font-family: ${({ theme }) => theme.typography.fontFamilyHeadings};\n text-transform: ${({\n theme: {\n typography: { headerTextTransform },\n },\n }) => headerTextTransform};\n`;\n\n/* span not a div so that we don't end up with two speech bubble arrows from ProgressBarWrapper */\nexport const Summary = styled.span<{ theme: ThemeType }>`\n display: block;\n text-align: right;\n margin-top: 12px;\n margin-bottom: 0;\n font-family: ${({ theme }) => theme.typography.fontFamilyBase};\n`;\n\nexport const TotaliserWrapper = styled.div<{\n $isCompact: boolean;\n theme: ThemeType;\n}>`\n font-family: ${({ theme }) => theme.typography.fontFamilyHeadings};\n margin: 0;\n ${(props) =>\n props.$isCompact &&\n css`\n ${ProgressBarWrapper} {\n border: none;\n padding: 0;\n }\n `}\n`;\n\nexport const CompactWrapper = styled.div`\n justify-content: flex-end;\n display: flex;\n`;\n\nexport const StyledProgressBar = styled(ProgressBar)``;\n"],"names":["BubbleWrapper","styled","div","theme","colors","totaliserBubbleColor","ProgressBarWrapper","spacing","s","$isCompact","css","Total","p","totaliserBubbleTotalColor","typography","fontFamilyHeadings","headerTextTransform","BubbleText","totaliserBubbleTextColor","GiftAid","Summary","span","fontFamilyBase","TotaliserWrapper","props","CompactWrapper","StyledProgressBar","ProgressBar"],"mappings":"iGAMa,MAAAA,EAAgBC,EAAOC,GAElC;;sBAEoB,EAAGC,WAAYA,EAAMC,OAAOC;;;;;;;EASrCC,EAAqBL,EAAOC,GAGvC;;gBAEc,EAAGC,WAAYA,EAAMI,QAAQC;;;IAGzC,EAAGC,aAAYN,YACE,KAAfM,GACFC,CAAG;;;;mBAIYP,EAAMC,OAAOC;;;;;;;;EAUnBM,EAAQV,EAAOW,CAE1B;WACS,EAAGT,WAAYA,EAAMC,OAAOS;;;iBAGtB,EAAGV,WAAYA,EAAMW,WAAWC;oBAC7B,EAAGZ,WAAYA,EAAMW,WAAWE;EAGvCC,EAAahB,EAAOW,CAAuB;WAC7C,EAAGT,WAAYA,EAAMC,OAAOc;iBACtB,EAAGf,WAAYA,EAAMW,WAAWC;oBAC7B,EAChBZ,OACEW,YAAcE,2BAEZA;EAGKG,EAAUlB,EAAOW,CAAuB;WAC1C,EAAGT,WAAYA,EAAMC,OAAOS;iBACtB,EAAGV,WAAYA,EAAMW,WAAWC;oBAC7B,EAChBZ,OACEW,YAAcE,2BAEZA;EAIKI,EAAUnB,EAAOoB,IAA0B;;;;;iBAKvC,EAAGlB,WAAYA,EAAMW,WAAWQ;EAGpCC,EAAmBtB,EAAOC,GAGrC;iBACe,EAAGC,WAAYA,EAAMW,WAAWC;;IAE5CS,GACDA,EAAMf,YACNC,CAAG;QACCJ;;;;;EAOKmB,EAAiBxB,EAAOC,GAAG;;;EAK3BwB,EAAoBzB,EAAO0B,EAAY"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"react";import{useTheme as t}from"styled-components";import{crukTheme as r}from"../../themes/cruk.js";import{Avatar as m}from"../Avatar/index.js";import{StyledUserBlock as n,Details as o,Name as a,Extra as l}from"./styles.js";function s({name:s,avatarName:i,avatarUrl:c,extra:u,size:f="l"}){const p=t(),y={...r,...p};return e.createElement(n,{theme:y},e.createElement(m,{name:i||("string"==typeof s?s:"Anonymous"),url:c||void 0,size:f}),e.createElement(o,null,e.createElement(a,null,s||"Anonymous"),!!u&&e.createElement(l,null,u)))}export{s as UserBlock,s as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/UserBlock/index.tsx"],"sourcesContent":["import React, { type ReactNode, type HTMLAttributes } from \"react\";\nimport { useTheme } from \"styled-components\";\n\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\nimport { Avatar } from \"../Avatar\";\n\nimport { StyledUserBlock, Details, Name, Extra } from \"./styles\";\n\nexport type UserBlockProps = HTMLAttributes<HTMLElement> & {\n /** name component or text */\n name?: ReactNode;\n /** string name used in avatar component */\n avatarName?: string | null;\n /** avatar image url */\n avatarUrl?: string | null;\n /** extra content component appears underneath name */\n extra?: ReactNode;\n /** size of avatar component */\n size?: \"s\" | \"m\" | \"l\" | \"xl\";\n};\n\n/**\n * Display an avatar with title and subtitle\n */\nexport function UserBlock({\n name,\n avatarName,\n avatarUrl,\n extra,\n size = \"l\",\n}: UserBlockProps) {\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n\n // name is a reserved html prop so we make sure we don't pass it into the styled component\n // or it will end up in the markup\n return (\n <StyledUserBlock theme={theme}>\n <Avatar\n name={avatarName || (typeof name === \"string\" ? name : \"Anonymous\")}\n url={avatarUrl || undefined}\n size={size}\n />\n <Details>\n <Name>{name || \"Anonymous\"}</Name>\n {!!extra && <Extra>{extra}</Extra>}\n </Details>\n </StyledUserBlock>\n );\n}\n\nexport default UserBlock;\n"],"names":["UserBlock","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/UserBlock/index.tsx"],"sourcesContent":["import React, { type ReactNode, type HTMLAttributes } from \"react\";\nimport { useTheme } from \"styled-components\";\n\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\nimport { Avatar } from \"../Avatar\";\n\nimport { StyledUserBlock, Details, Name, Extra } from \"./styles\";\n\nexport type UserBlockProps = HTMLAttributes<HTMLElement> & {\n /** name component or text */\n name?: ReactNode;\n /** string name used in avatar component */\n avatarName?: string | null;\n /** avatar image url */\n avatarUrl?: string | null;\n /** extra content component appears underneath name */\n extra?: ReactNode;\n /** size of avatar component */\n size?: \"s\" | \"m\" | \"l\" | \"xl\";\n};\n\n/**\n * Display an avatar with title and subtitle\n */\nexport function UserBlock({\n name,\n avatarName,\n avatarUrl,\n extra,\n size = \"l\",\n}: UserBlockProps) {\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n\n // name is a reserved html prop so we make sure we don't pass it into the styled component\n // or it will end up in the markup\n return (\n <StyledUserBlock theme={theme}>\n <Avatar\n name={avatarName || (typeof name === \"string\" ? name : \"Anonymous\")}\n url={avatarUrl || undefined}\n size={size}\n />\n <Details>\n <Name>{name || \"Anonymous\"}</Name>\n {!!extra && <Extra>{extra}</Extra>}\n </Details>\n </StyledUserBlock>\n );\n}\n\nexport default UserBlock;\n"],"names":["UserBlock","name","avatarName","avatarUrl","extra","size","foundTheme","useTheme","theme","defaultTheme","React","createElement","StyledUserBlock","Avatar","url","undefined","Details","Name","Extra"],"mappings":"+OAwBgB,SAAAA,GAAUC,KACxBA,EAAIC,WACJA,EAAUC,UACVA,EAASC,MACTA,EAAKC,KACLA,EAAO,MAEP,MAAMC,EAAaC,IACbC,EAAQ,IACTC,KACAH,GAKL,OACEI,EAACC,cAAAC,EAAgB,CAAAJ,MAAOA,GACtBE,EAAAC,cAACE,EAAM,CACLZ,KAAMC,IAA+B,iBAATD,EAAoBA,EAAO,aACvDa,IAAKX,QAAaY,EAClBV,KAAMA,IAERK,EAAAC,cAACK,EAAO,KACNN,EAAAC,cAACM,EAAI,KAAEhB,GAAQ,eACZG,GAASM,EAACC,cAAAO,EAAO,KAAAd,IAI5B"}
|
|
@@ -1,2 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"styled-components";const t=e.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: start;
|
|
5
|
+
flex: 1;
|
|
6
|
+
`,o=e.div`
|
|
7
|
+
flex: 1;
|
|
8
|
+
margin-left: ${({theme:e})=>e.spacing.xs};
|
|
9
|
+
text-align: left;
|
|
10
|
+
min-width: 0;
|
|
11
|
+
`,i=e.div`
|
|
12
|
+
font-family: ${({theme:e})=>e.typography.fontFamilyHeadings};
|
|
13
|
+
font-size: ${({theme:e})=>e.fontSizes.l};
|
|
14
|
+
white-space: normal;
|
|
15
|
+
word-break: break-word;
|
|
16
|
+
`,r=e.div`
|
|
17
|
+
color: ${({theme:e})=>e.colors.userBlockExtraText};
|
|
18
|
+
margin-top: 4px;
|
|
19
|
+
white-space: normal;
|
|
20
|
+
word-break: break-word;
|
|
21
|
+
`;export{o as Details,r as Extra,i as Name,t as StyledUserBlock};
|
|
2
22
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../src/components/UserBlock/styles.ts"],"sourcesContent":["import styled from \"styled-components\";\nimport { type ThemeType } from \"../../types\";\n\ntype Props = {\n theme: ThemeType;\n};\n\nexport const StyledUserBlock = styled.div`\n display: flex;\n align-items: center;\n justify-content: start;\n flex: 1;\n`;\n\nexport const Details = styled.div<Props>`\n flex: 1;\n margin-left: ${({ theme }) => theme.spacing.xs};\n text-align: left;\n min-width: 0;\n`;\n\nexport const Name = styled.div<Props>`\n font-family: ${({ theme }) => theme.typography.fontFamilyHeadings};\n font-size: ${({ theme }) => theme.fontSizes.l};\n white-space: normal;\n word-break: break-word;\n`;\n\nexport const Extra = styled.div<Props>`\n color: ${({ theme }) => theme.colors.userBlockExtraText};\n margin-top: 4px;\n white-space: normal;\n word-break: break-word;\n`;\n"],"names":["StyledUserBlock","styled","div","
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../src/components/UserBlock/styles.ts"],"sourcesContent":["import styled from \"styled-components\";\nimport { type ThemeType } from \"../../types\";\n\ntype Props = {\n theme: ThemeType;\n};\n\nexport const StyledUserBlock = styled.div`\n display: flex;\n align-items: center;\n justify-content: start;\n flex: 1;\n`;\n\nexport const Details = styled.div<Props>`\n flex: 1;\n margin-left: ${({ theme }) => theme.spacing.xs};\n text-align: left;\n min-width: 0;\n`;\n\nexport const Name = styled.div<Props>`\n font-family: ${({ theme }) => theme.typography.fontFamilyHeadings};\n font-size: ${({ theme }) => theme.fontSizes.l};\n white-space: normal;\n word-break: break-word;\n`;\n\nexport const Extra = styled.div<Props>`\n color: ${({ theme }) => theme.colors.userBlockExtraText};\n margin-top: 4px;\n white-space: normal;\n word-break: break-word;\n`;\n"],"names":["StyledUserBlock","styled","div","Details","theme","spacing","xs","Name","typography","fontFamilyHeadings","fontSizes","l","Extra","colors","userBlockExtraText"],"mappings":"iCAOa,MAAAA,EAAkBC,EAAOC,GAAG;;;;;EAO5BC,EAAUF,EAAOC,GAAU;;iBAEvB,EAAGE,WAAYA,EAAMC,QAAQC;;;EAKjCC,EAAON,EAAOC,GAAU;iBACpB,EAAGE,WAAYA,EAAMI,WAAWC;eAClC,EAAGL,WAAYA,EAAMM,UAAUC;;;EAKjCC,EAAQX,EAAOC,GAAU;WAC3B,EAAGE,WAAYA,EAAMS,OAAOC;;;;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type EffectCallback, type DependencyList } from "react";
|
|
2
|
-
export declare function useEffectBrowser(action: EffectCallback, deps: DependencyList): void
|
|
2
|
+
export declare function useEffectBrowser(action: EffectCallback, deps: DependencyList): void;
|
|
3
3
|
export default useEffectBrowser;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useEffect as e}from"react";
|
|
1
|
+
import{useEffect as e}from"react";function t(t,f){e((()=>{if("undefined"!=typeof window)return t()}),[f])}export{t as default,t as useEffectBrowser};
|
|
2
2
|
//# sourceMappingURL=useEffectBrowser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEffectBrowser.js","sources":["../../../src/hooks/useEffectBrowser.ts"],"sourcesContent":["import { useEffect, type EffectCallback, type DependencyList } from \"react\";\n\
|
|
1
|
+
{"version":3,"file":"useEffectBrowser.js","sources":["../../../src/hooks/useEffectBrowser.ts"],"sourcesContent":["import { useEffect, type EffectCallback, type DependencyList } from \"react\";\n\n// this is a useEffect hook which automatically checks if the code is running\n// in the browser before executing the action\nexport function useEffectBrowser(action: EffectCallback, deps: DependencyList) {\n useEffect(() => {\n if (typeof window === `undefined`) return;\n return action();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [deps]);\n}\n\nexport default useEffectBrowser;\n"],"names":["useEffectBrowser","action","deps","useEffect","window"],"mappings":"kCAIgB,SAAAA,EAAiBC,EAAwBC,GACvDC,GAAU,KACR,GAAsB,oBAAXC,OACX,OAAOH,GAAQ,GAEd,CAACC,GACN"}
|
package/lib/src/hooks/useKey.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useEffect as e}from"react";import{isBrowser as
|
|
1
|
+
import{useEffect as e}from"react";import{isBrowser as t}from"../utils/Helper.js";const n=(n,o,r)=>{const{detectKeys:d=[],keyevent:i}=o,s=e=>{(d.includes(e.key)||0===d.length)&&n(e)};e((()=>{if(t)return window.document.addEventListener(i||"keydown",s),()=>{window.document.removeEventListener(i||"keydown",s)}}),r||[])};export{n as default,n as useKey};
|
|
2
2
|
//# sourceMappingURL=useKey.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useKey.js","sources":["../../../src/hooks/useKey.ts"],"sourcesContent":["import { useEffect, type DependencyList } from \"react\";\nimport { isBrowser } from \"../utils/Helper\";\n\n// useKey((pressedKey, event) => {\n// console.log('Detected Key press', pressedKey);\n// console.log('Get event, if you want more details and preventDefault', event)\n// }, {\n// detectKeys: ['Enter']\n// });\n\nexport const useKey = (\n callback: (event: KeyboardEvent) => void,\n options: {\n detectKeys?: string[];\n keyevent?: \"keydown\" | \"keyup\" | \"keypress\";\n },\n dependencies?: DependencyList,\n): void => {\n const { detectKeys = [], keyevent } = options;\n\n const handleEvent = (event: KeyboardEvent) => {\n if (detectKeys.includes(event.key) || detectKeys.length === 0) {\n callback(event);\n }\n };\n\n useEffect(() => {\n if (!isBrowser) {\n return undefined;\n }\n\n window.document.addEventListener(keyevent || \"keydown\", handleEvent);\n return () => {\n window.document.removeEventListener(keyevent || \"keydown\", handleEvent);\n };\n }, dependencies || []);\n};\n\nexport default useKey;\n"],"names":["useKey","callback","options","dependencies","
|
|
1
|
+
{"version":3,"file":"useKey.js","sources":["../../../src/hooks/useKey.ts"],"sourcesContent":["import { useEffect, type DependencyList } from \"react\";\nimport { isBrowser } from \"../utils/Helper\";\n\n// useKey((pressedKey, event) => {\n// console.log('Detected Key press', pressedKey);\n// console.log('Get event, if you want more details and preventDefault', event)\n// }, {\n// detectKeys: ['Enter']\n// });\n\nexport const useKey = (\n callback: (event: KeyboardEvent) => void,\n options: {\n detectKeys?: string[];\n keyevent?: \"keydown\" | \"keyup\" | \"keypress\";\n },\n dependencies?: DependencyList,\n): void => {\n const { detectKeys = [], keyevent } = options;\n\n const handleEvent = (event: KeyboardEvent) => {\n if (detectKeys.includes(event.key) || detectKeys.length === 0) {\n callback(event);\n }\n };\n\n useEffect(() => {\n if (!isBrowser) {\n return undefined;\n }\n\n window.document.addEventListener(keyevent || \"keydown\", handleEvent);\n return () => {\n window.document.removeEventListener(keyevent || \"keydown\", handleEvent);\n };\n }, dependencies || []);\n};\n\nexport default useKey;\n"],"names":["useKey","callback","options","dependencies","detectKeys","keyevent","handleEvent","event","includes","key","length","useEffect","isBrowser","window","document","addEventListener","removeEventListener"],"mappings":"iFAUa,MAAAA,EAAS,CACpBC,EACAC,EAIAC,KAEA,MAAMC,WAAEA,EAAa,GAAEC,SAAEA,GAAaH,EAEhCI,EAAeC,KACfH,EAAWI,SAASD,EAAME,MAA8B,IAAtBL,EAAWM,SAC/CT,EAASM,IAIbI,GAAU,KACR,GAAKC,EAKL,OADAC,OAAOC,SAASC,iBAAiBV,GAAY,UAAWC,GACjD,KACLO,OAAOC,SAASE,oBAAoBX,GAAY,UAAWC,EAAY,CACxE,GACAH,GAAgB,GAAG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type EffectCallback, type DependencyList } from "react";
|
|
2
|
-
declare const useLayoutEffectBrowser: (action: EffectCallback, deps: DependencyList) => void
|
|
2
|
+
declare const useLayoutEffectBrowser: (action: EffectCallback, deps: DependencyList) => void;
|
|
3
3
|
export default useLayoutEffectBrowser;
|
|
4
4
|
export { useLayoutEffectBrowser };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useLayoutEffect as e}from"react";
|
|
1
|
+
import{useLayoutEffect as e}from"react";const o=(o,t)=>{e((()=>{"undefined"!=typeof window&&o()}),[t])};export{o as default,o as useLayoutEffectBrowser};
|
|
2
2
|
//# sourceMappingURL=useLayoutEffectBrowser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLayoutEffectBrowser.js","sources":["../../../src/hooks/useLayoutEffectBrowser.ts"],"sourcesContent":["import {\n useLayoutEffect,\n type EffectCallback,\n type DependencyList,\n} from \"react\";\n\
|
|
1
|
+
{"version":3,"file":"useLayoutEffectBrowser.js","sources":["../../../src/hooks/useLayoutEffectBrowser.ts"],"sourcesContent":["import {\n useLayoutEffect,\n type EffectCallback,\n type DependencyList,\n} from \"react\";\n\n// The sole purpose of this hook is to silence pointless warnings in next.js when using\n// useLayoutEffect about it not being isomorphic which is the whole point of the hook\n// which waits for components to be mounted to the DOM for scroll handlers etc.\nconst useLayoutEffectBrowser = (\n action: EffectCallback,\n deps: DependencyList,\n) => {\n useLayoutEffect(() => {\n if (typeof window === `undefined`) return;\n\n action();\n }, [deps]);\n};\n\nexport default useLayoutEffectBrowser;\nexport { useLayoutEffectBrowser };\n"],"names":["useLayoutEffectBrowser","action","deps","useLayoutEffect","window"],"mappings":"wCASA,MAAMA,EAAyB,CAC7BC,EACAC,KAEAC,GAAgB,KACQ,oBAAXC,QAEXH,GAAQ,GACP,CAACC,GAAM"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useRef as e}from"react";import
|
|
1
|
+
import{useRef as e}from"react";import t from"./useLayoutEffectBrowser.js";const n="undefined"!=typeof window;function o({element:e,useWindow:t}){if(!n)return{x:0,y:0};const o=document.body,r=o?o.getBoundingClientRect():{top:0,left:0};return t?{x:window.scrollX,y:window.scrollY}:{x:r.left,y:r.top}}const r=(r,s,l,u,c)=>{const i=e(o({useWindow:u,element:l}));let d=null;const w=()=>{const e=o({element:l,useWindow:u});r({prevPos:i.current,currPos:e}),i.current=e,d=null};t((()=>{const e=()=>{null===d&&(d=setTimeout(w,c))};return n&&window.addEventListener("scroll",e),()=>{n&&window.removeEventListener("scroll",e)}}),s)};export{r as default,r as useScrollPosition};
|
|
2
2
|
//# sourceMappingURL=useScrollPosition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollPosition.js","sources":["../../../src/hooks/useScrollPosition.ts"],"sourcesContent":["import {\n useRef,\n type DependencyList,\n type RefObject,\n type MutableRefObject,\n} from \"react\";\n\nimport { useLayoutEffectBrowser } from \"./useLayoutEffectBrowser\";\n\nconst isBrowser = typeof window !== `undefined`;\n\nfunction getScrollPosition({\n element,\n useWindow,\n}: {\n element?: RefObject<HTMLElement> | MutableRefObject<undefined> | null;\n useWindow: boolean;\n}) {\n if (!isBrowser) return { x: 0, y: 0 };\n\n const target = element ? element.current : document.body;\n const position = target\n ? target.getBoundingClientRect()\n : { top: 0, left: 0 };\n\n return useWindow\n ? { x: window.scrollX, y: window.scrollY }\n : { x: position.left, y: position.top };\n}\n\nconst useScrollPosition = (\n effect: ({\n currPos,\n }: {\n prevPos: { x: number; y: number };\n currPos: { x: number; y: number };\n }) => void,\n deps: DependencyList,\n element: RefObject<HTMLElement> | MutableRefObject<undefined> | null,\n useWindow: boolean,\n wait: number,\n): void => {\n const position = useRef(getScrollPosition({ useWindow, element }));\n\n let throttleTimeout: ReturnType<typeof setTimeout> | null = null;\n\n const callBack = () => {\n const currPos = getScrollPosition({ element, useWindow });\n effect({ prevPos: position.current, currPos });\n position.current = currPos;\n throttleTimeout = null;\n };\n\n useLayoutEffectBrowser(() => {\n const handleScroll = () => {\n if (wait) {\n if (throttleTimeout === null) {\n throttleTimeout = setTimeout(callBack, wait);\n }\n } else {\n callBack();\n }\n };\n if (isBrowser) {\n window.addEventListener(\"scroll\", handleScroll);\n }\n\n return () => {\n if (isBrowser) {\n window.removeEventListener(\"scroll\", handleScroll);\n }\n };\n }, deps);\n};\n\nexport default useScrollPosition;\nexport { useScrollPosition };\n"],"names":["isBrowser","window","getScrollPosition","
|
|
1
|
+
{"version":3,"file":"useScrollPosition.js","sources":["../../../src/hooks/useScrollPosition.ts"],"sourcesContent":["import {\n useRef,\n type DependencyList,\n type RefObject,\n type MutableRefObject,\n} from \"react\";\n\nimport { useLayoutEffectBrowser } from \"./useLayoutEffectBrowser\";\n\nconst isBrowser = typeof window !== `undefined`;\n\nfunction getScrollPosition({\n element,\n useWindow,\n}: {\n element?: RefObject<HTMLElement> | MutableRefObject<undefined> | null;\n useWindow: boolean;\n}) {\n if (!isBrowser) return { x: 0, y: 0 };\n\n const target = element ? element.current : document.body;\n const position = target\n ? target.getBoundingClientRect()\n : { top: 0, left: 0 };\n\n return useWindow\n ? { x: window.scrollX, y: window.scrollY }\n : { x: position.left, y: position.top };\n}\n\nconst useScrollPosition = (\n effect: ({\n currPos,\n }: {\n prevPos: { x: number; y: number };\n currPos: { x: number; y: number };\n }) => void,\n deps: DependencyList,\n element: RefObject<HTMLElement> | MutableRefObject<undefined> | null,\n useWindow: boolean,\n wait: number,\n): void => {\n const position = useRef(getScrollPosition({ useWindow, element }));\n\n let throttleTimeout: ReturnType<typeof setTimeout> | null = null;\n\n const callBack = () => {\n const currPos = getScrollPosition({ element, useWindow });\n effect({ prevPos: position.current, currPos });\n position.current = currPos;\n throttleTimeout = null;\n };\n\n useLayoutEffectBrowser(() => {\n const handleScroll = () => {\n if (wait) {\n if (throttleTimeout === null) {\n throttleTimeout = setTimeout(callBack, wait);\n }\n } else {\n callBack();\n }\n };\n if (isBrowser) {\n window.addEventListener(\"scroll\", handleScroll);\n }\n\n return () => {\n if (isBrowser) {\n window.removeEventListener(\"scroll\", handleScroll);\n }\n };\n }, deps);\n};\n\nexport default useScrollPosition;\nexport { useScrollPosition };\n"],"names":["isBrowser","window","getScrollPosition","element","useWindow","x","y","target","document","body","position","getBoundingClientRect","top","left","scrollX","scrollY","useScrollPosition","effect","deps","wait","useRef","throttleTimeout","callBack","currPos","prevPos","current","useLayoutEffectBrowser","handleScroll","setTimeout","addEventListener","removeEventListener"],"mappings":"0EASA,MAAMA,EAA8B,oBAAXC,OAEzB,SAASC,GAAkBC,QACzBA,EAAOC,UACPA,IAKA,IAAKJ,EAAW,MAAO,CAAEK,EAAG,EAAGC,EAAG,GAElC,MAAMC,EAAqCC,SAASC,KAC9CC,EAAWH,EACbA,EAAOI,wBACP,CAAEC,IAAK,EAAGC,KAAM,GAEpB,OAAOT,EACH,CAAEC,EAAGJ,OAAOa,QAASR,EAAGL,OAAOc,SAC/B,CAAEV,EAAGK,EAASG,KAAMP,EAAGI,EAASE,IACtC,CAEA,MAAMI,EAAoB,CACxBC,EAMAC,EACAf,EACAC,EACAe,KAEA,MAAMT,EAAWU,EAAOlB,EAAkB,CAAEE,YAAWD,aAEvD,IAAIkB,EAAwD,KAE5D,MAAMC,EAAW,KACf,MAAMC,EAAUrB,EAAkB,CAAEC,UAASC,cAC7Ca,EAAO,CAAEO,QAASd,EAASe,QAASF,YACpCb,EAASe,QAAUF,EACnBF,EAAkB,IAAI,EAGxBK,GAAuB,KACrB,MAAMC,EAAe,KAEO,OAApBN,IACFA,EAAkBO,WAAWN,EAAUH,KAU7C,OAJInB,GACFC,OAAO4B,iBAAiB,SAAUF,GAG7B,KACD3B,GACFC,OAAO6B,oBAAoB,SAAUH,GAExC,GACAT,EAAK"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{crukTheme as b}from"./cruk.js";b.utilities;const e={...b.siteConfig};b.avatar,e.assetPath,b.button,b.breakpoint;const l={...b.tokenColors,bbPurple:"#501e70",bbLightGreen:"#92ddcb",bbGreen:"#26bb98",bbPastelGreen:"#d4f1ea",bbPink:"#d81272",bbPastelPink:"#EB88B8",bbBlue:"#009ed1",bbTeal:"#005e85",bbYellow:"#e4b50b",bbPastelYellow:"#F1DA85"};b.colors,l.bbPurple,l.bbGreen,l.bbTeal,l.white,l.bbPurple,l.white,l.bbYellow,l.bbGreen,l.bbBlue,l.bbPurple,l.bbLightGreen,l.bbGreen,l.bbLightGreen,l.bbGreen,l.bbPurple,l.bbPink,l.bbPurple,l.bbPink,l.bbPastelGreen,l.bbPink,l.bbPurple,l.bbPurple,l.bbPurple,l.bbLightGreen,l.bbPink,l.bbPurple,l.bbPurple,l.bbPurple,l.bbLightGreen,l.white,l.bbPastelYellow,l.bbPurple,l.bbPastelYellow,l.bbPastelPink,l.bbPurple,l.bbPastelPink,l.grey_200,l.grey_800,l.grey_200,l.white,l.bbPurple,l.bbPastelYellow,l.bbPastelPink,l.bbPurple,l.bbPastelYellow,l.grey_200,l.grey_800,l.grey_200,l.bbPurple,l.bbPink,l.grey_200,b.spacing,b.shadows,b.fontSizes;const t={...b.typography,customFonts:[{family:"juana",urlWoff:`${e.assetPath}fonts/juana-semibold-webfont.woff`,urlWoff2:`${e.assetPath}fonts/juana-semibold-webfont.woff2`,fontWeight:600}]},r={typography:t};export{e as SITE_CONFIG,l as TOKEN_COLORS,t as TYPOGRAPHY,r as bowelbabeTheme,r as default};
|
|
2
2
|
//# sourceMappingURL=bowelbabe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bowelbabe.js","sources":["../../../src/themes/bowelbabe.ts"],"sourcesContent":["import {\n type UtilitiesType,\n type SiteConfigType,\n type AvatarType,\n type ButtonType,\n type BreakPointType,\n type TokenColorsType,\n type ColorsType,\n type SpacingType,\n type FontSizesType,\n type TypographyType,\n type ThemeType,\n type ShadowsType,\n} from \"../types\";\n\nimport { crukTheme as defaultTheme } from \"./cruk\";\n\nexport const UTILITIES: UtilitiesType = {\n ...defaultTheme.utilities,\n};\n\nexport const SITE_CONFIG: SiteConfigType = {\n ...defaultTheme.siteConfig,\n logoSrc:\n \"https://rcl.assets.cancerresearchuk.org/images/logos/bowelbabe-logo-160.png\",\n footerCopyText:\n \"The Bowelbabe Fund for Cancer Research UK, raises money to fund clinical trials, research and cancer information and awareness, as well as other initiatives to combat cancer and support those affected by cancer. The Bowelbabe Fund is a restricted fund within Cancer Research UK. Cancer Research UK is a registered charity in England and Wales (1089464), Scotland (SC041666), the Isle of Man (1103) and Jersey (247) and is registered with the Fundraising Regulator.\",\n};\n\nexport const AVATAR: AvatarType = {\n ...defaultTheme.avatar,\n path: `${SITE_CONFIG.assetPath}images/avatar/bowelbabe/`,\n};\n\nexport const BUTTON: ButtonType = {\n ...defaultTheme.button,\n horizontalPadding: \"1rem\",\n borderRadius: \"2em\",\n};\n\nexport const BREAKPOINT: BreakPointType = {\n ...defaultTheme.breakpoint,\n};\n\nexport const TOKEN_COLORS: TokenColorsType = {\n ...defaultTheme.tokenColors,\n bbPurple: \"#501e70\",\n bbLightGreen: \"#92ddcb\",\n bbGreen: \"#26bb98\",\n bbPastelGreen: \"#d4f1ea\",\n bbPink: \"#d81272\",\n bbPastelPink: \"#EB88B8\",\n bbBlue: \"#009ed1\",\n bbTeal: \"#005e85\",\n bbYellow: \"#e4b50b\",\n bbPastelYellow: \"#F1DA85\",\n};\n\nexport const COLORS: ColorsType = {\n ...defaultTheme.colors,\n primary: TOKEN_COLORS.bbPurple,\n secondary: TOKEN_COLORS.bbGreen,\n tertiary: TOKEN_COLORS.bbTeal,\n\n textOnPrimary: TOKEN_COLORS.white,\n textOnSecondary: TOKEN_COLORS.bbPurple,\n textOnTertiary: TOKEN_COLORS.white,\n\n warning: TOKEN_COLORS.bbYellow,\n success: TOKEN_COLORS.bbGreen,\n info: TOKEN_COLORS.bbBlue,\n\n avatarBorder: TOKEN_COLORS.bbPurple,\n progressBar: TOKEN_COLORS.bbLightGreen,\n progressBarSecondary: TOKEN_COLORS.bbGreen,\n circularProgress: TOKEN_COLORS.bbLightGreen,\n circularProgressSecondary: TOKEN_COLORS.bbGreen,\n linkColor: TOKEN_COLORS.bbPurple,\n linkColorHover: TOKEN_COLORS.bbPink,\n linkColorSecondary: TOKEN_COLORS.bbPurple,\n linkColorSecondaryHover: TOKEN_COLORS.bbPink,\n\n backgroundLightColor: TOKEN_COLORS.bbPastelGreen,\n\n collapseHeaderColor: TOKEN_COLORS.bbPink,\n check: TOKEN_COLORS.bbPurple,\n\n headerTaglineText: TOKEN_COLORS.bbPurple,\n\n loaderColor1: TOKEN_COLORS.bbPurple,\n loaderColor2: TOKEN_COLORS.bbLightGreen,\n loaderColor3: TOKEN_COLORS.bbPink,\n\n paginationText: TOKEN_COLORS.bbPurple,\n paginationBackground: TOKEN_COLORS.bbPurple,\n\n totaliserBubbleColor: TOKEN_COLORS.bbPurple,\n totaliserBubbleTextColor: TOKEN_COLORS.bbLightGreen,\n totaliserBubbleTotalColor: TOKEN_COLORS.white,\n\n buttonPrimaryBackground: TOKEN_COLORS.bbPastelYellow,\n buttonPrimaryText: TOKEN_COLORS.bbPurple,\n buttonPrimaryBorder: TOKEN_COLORS.bbPastelYellow,\n buttonPrimaryBackgroundHover: TOKEN_COLORS.bbPastelPink,\n buttonPrimaryTextHover: TOKEN_COLORS.bbPurple,\n buttonPrimaryBorderHover: TOKEN_COLORS.bbPastelPink,\n buttonPrimaryDisabledBackground: TOKEN_COLORS.grey_200,\n buttonPrimaryDisabledText: TOKEN_COLORS.grey_800,\n buttonPrimaryDisabledBorder: TOKEN_COLORS.grey_200,\n\n buttonSecondaryBackground: TOKEN_COLORS.white,\n buttonSecondaryText: TOKEN_COLORS.bbPurple,\n buttonSecondaryBorder: TOKEN_COLORS.bbPastelYellow,\n buttonSecondaryBackgroundHover: TOKEN_COLORS.bbPastelPink,\n buttonSecondaryTextHover: TOKEN_COLORS.bbPurple,\n buttonSecondaryBorderHover: TOKEN_COLORS.bbPastelYellow,\n buttonSecondaryDisabledBackground: TOKEN_COLORS.grey_200,\n buttonSecondaryDisabledText: TOKEN_COLORS.grey_800,\n buttonSecondaryDisabledBorder: TOKEN_COLORS.grey_200,\n\n buttonTertiaryText: TOKEN_COLORS.bbPurple,\n buttonTertiaryTextHover: TOKEN_COLORS.bbPink,\n buttonTertiaryDisabledText: TOKEN_COLORS.grey_200,\n};\n\nexport const SPACING: SpacingType = {\n ...defaultTheme.spacing,\n};\n\nexport const SHADOWS: ShadowsType = {\n ...defaultTheme.shadows,\n};\n\nexport const FONT_SIZES: FontSizesType = {\n ...defaultTheme.fontSizes,\n};\n\nexport const TYPOGRAPHY: TypographyType = {\n ...defaultTheme.typography,\n customFonts: [\n {\n family: \"juana\",\n urlWoff: `${SITE_CONFIG.assetPath}fonts/juana-semibold-webfont.woff`,\n urlWoff2: `${SITE_CONFIG.assetPath}fonts/juana-semibold-webfont.woff2`,\n fontWeight: 600,\n },\n ],\n fontFamilyHeadings: \"juana,Arial,sans-serif\",\n fontFamilyLinks: \"juana,Arial,sans-serif\",\n fontFamilyButtons: \"juana,Arial,sans-serif\",\n fontFamilyBase:\n \"Arial, Calibri, nimbussansl, liberationsans, freesans, clean, sans-serif\",\n fontFamilyLabel:\n \"Arial, Calibri, nimbussansl, liberationsans, freesans, clean, sans-serif\",\n // headerLineHeight: \"1.5em\",\n fontWeightBase: 400,\n fontWeightLinks: 600,\n fontWeightHeadings: 600,\n fontWeightButtons: 600,\n fontWeightLabels: 600,\n LinkPrimaryTextDecoration: \"none\",\n LinkLetterSpacing: \"0px\",\n};\n\nexport const bowelbabeTheme: ThemeType = {\n name: \"bowelbabe\",\n avatar: AVATAR,\n breakpoint: BREAKPOINT,\n button: BUTTON,\n tokenColors: TOKEN_COLORS,\n colors: COLORS,\n spacing: SPACING,\n fontSizes: FONT_SIZES,\n siteConfig: SITE_CONFIG,\n typography: TYPOGRAPHY,\n shadows: SHADOWS,\n utilities: UTILITIES,\n};\n\nexport default bowelbabeTheme;\n"],"names":["UTILITIES","__assign","defaultTheme","utilities","SITE_CONFIG","siteConfig","logoSrc","footerCopyText","AVATAR","avatar","path","assetPath","BUTTON","button","horizontalPadding","borderRadius","BREAKPOINT","breakpoint","TOKEN_COLORS","tokenColors","bbPurple","bbLightGreen","bbGreen","bbPastelGreen","bbPink","bbPastelPink","bbBlue","bbTeal","bbYellow","bbPastelYellow","COLORS","colors","primary","secondary","tertiary","textOnPrimary","white","textOnSecondary","textOnTertiary","warning","success","info","avatarBorder","progressBar","progressBarSecondary","circularProgress","circularProgressSecondary","linkColor","linkColorHover","linkColorSecondary","linkColorSecondaryHover","backgroundLightColor","collapseHeaderColor","check","headerTaglineText","loaderColor1","loaderColor2","loaderColor3","paginationText","paginationBackground","totaliserBubbleColor","totaliserBubbleTextColor","totaliserBubbleTotalColor","buttonPrimaryBackground","buttonPrimaryText","buttonPrimaryBorder","buttonPrimaryBackgroundHover","buttonPrimaryTextHover","buttonPrimaryBorderHover","buttonPrimaryDisabledBackground","grey_200","buttonPrimaryDisabledText","grey_800","buttonPrimaryDisabledBorder","buttonSecondaryBackground","buttonSecondaryText","buttonSecondaryBorder","buttonSecondaryBackgroundHover","buttonSecondaryTextHover","buttonSecondaryBorderHover","buttonSecondaryDisabledBackground","buttonSecondaryDisabledText","buttonSecondaryDisabledBorder","buttonTertiaryText","buttonTertiaryTextHover","buttonTertiaryDisabledText","SPACING","spacing","SHADOWS","shadows","FONT_SIZES","fontSizes","TYPOGRAPHY","typography","customFonts","family","urlWoff","concat","urlWoff2","fontWeight","fontFamilyHeadings","fontFamilyLinks","fontFamilyButtons","fontFamilyBase","fontFamilyLabel","fontWeightBase","fontWeightLinks","fontWeightHeadings","fontWeightButtons","fontWeightLabels","LinkPrimaryTextDecoration","LinkLetterSpacing","bowelbabeTheme","name"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"bowelbabe.js","sources":["../../../src/themes/bowelbabe.ts"],"sourcesContent":["import {\n type UtilitiesType,\n type SiteConfigType,\n type AvatarType,\n type ButtonType,\n type BreakPointType,\n type TokenColorsType,\n type ColorsType,\n type SpacingType,\n type FontSizesType,\n type TypographyType,\n type ThemeType,\n type ShadowsType,\n} from \"../types\";\n\nimport { crukTheme as defaultTheme } from \"./cruk\";\n\nexport const UTILITIES: UtilitiesType = {\n ...defaultTheme.utilities,\n};\n\nexport const SITE_CONFIG: SiteConfigType = {\n ...defaultTheme.siteConfig,\n logoSrc:\n \"https://rcl.assets.cancerresearchuk.org/images/logos/bowelbabe-logo-160.png\",\n footerCopyText:\n \"The Bowelbabe Fund for Cancer Research UK, raises money to fund clinical trials, research and cancer information and awareness, as well as other initiatives to combat cancer and support those affected by cancer. The Bowelbabe Fund is a restricted fund within Cancer Research UK. Cancer Research UK is a registered charity in England and Wales (1089464), Scotland (SC041666), the Isle of Man (1103) and Jersey (247) and is registered with the Fundraising Regulator.\",\n};\n\nexport const AVATAR: AvatarType = {\n ...defaultTheme.avatar,\n path: `${SITE_CONFIG.assetPath}images/avatar/bowelbabe/`,\n};\n\nexport const BUTTON: ButtonType = {\n ...defaultTheme.button,\n horizontalPadding: \"1rem\",\n borderRadius: \"2em\",\n};\n\nexport const BREAKPOINT: BreakPointType = {\n ...defaultTheme.breakpoint,\n};\n\nexport const TOKEN_COLORS: TokenColorsType = {\n ...defaultTheme.tokenColors,\n bbPurple: \"#501e70\",\n bbLightGreen: \"#92ddcb\",\n bbGreen: \"#26bb98\",\n bbPastelGreen: \"#d4f1ea\",\n bbPink: \"#d81272\",\n bbPastelPink: \"#EB88B8\",\n bbBlue: \"#009ed1\",\n bbTeal: \"#005e85\",\n bbYellow: \"#e4b50b\",\n bbPastelYellow: \"#F1DA85\",\n};\n\nexport const COLORS: ColorsType = {\n ...defaultTheme.colors,\n primary: TOKEN_COLORS.bbPurple,\n secondary: TOKEN_COLORS.bbGreen,\n tertiary: TOKEN_COLORS.bbTeal,\n\n textOnPrimary: TOKEN_COLORS.white,\n textOnSecondary: TOKEN_COLORS.bbPurple,\n textOnTertiary: TOKEN_COLORS.white,\n\n warning: TOKEN_COLORS.bbYellow,\n success: TOKEN_COLORS.bbGreen,\n info: TOKEN_COLORS.bbBlue,\n\n avatarBorder: TOKEN_COLORS.bbPurple,\n progressBar: TOKEN_COLORS.bbLightGreen,\n progressBarSecondary: TOKEN_COLORS.bbGreen,\n circularProgress: TOKEN_COLORS.bbLightGreen,\n circularProgressSecondary: TOKEN_COLORS.bbGreen,\n linkColor: TOKEN_COLORS.bbPurple,\n linkColorHover: TOKEN_COLORS.bbPink,\n linkColorSecondary: TOKEN_COLORS.bbPurple,\n linkColorSecondaryHover: TOKEN_COLORS.bbPink,\n\n backgroundLightColor: TOKEN_COLORS.bbPastelGreen,\n\n collapseHeaderColor: TOKEN_COLORS.bbPink,\n check: TOKEN_COLORS.bbPurple,\n\n headerTaglineText: TOKEN_COLORS.bbPurple,\n\n loaderColor1: TOKEN_COLORS.bbPurple,\n loaderColor2: TOKEN_COLORS.bbLightGreen,\n loaderColor3: TOKEN_COLORS.bbPink,\n\n paginationText: TOKEN_COLORS.bbPurple,\n paginationBackground: TOKEN_COLORS.bbPurple,\n\n totaliserBubbleColor: TOKEN_COLORS.bbPurple,\n totaliserBubbleTextColor: TOKEN_COLORS.bbLightGreen,\n totaliserBubbleTotalColor: TOKEN_COLORS.white,\n\n buttonPrimaryBackground: TOKEN_COLORS.bbPastelYellow,\n buttonPrimaryText: TOKEN_COLORS.bbPurple,\n buttonPrimaryBorder: TOKEN_COLORS.bbPastelYellow,\n buttonPrimaryBackgroundHover: TOKEN_COLORS.bbPastelPink,\n buttonPrimaryTextHover: TOKEN_COLORS.bbPurple,\n buttonPrimaryBorderHover: TOKEN_COLORS.bbPastelPink,\n buttonPrimaryDisabledBackground: TOKEN_COLORS.grey_200,\n buttonPrimaryDisabledText: TOKEN_COLORS.grey_800,\n buttonPrimaryDisabledBorder: TOKEN_COLORS.grey_200,\n\n buttonSecondaryBackground: TOKEN_COLORS.white,\n buttonSecondaryText: TOKEN_COLORS.bbPurple,\n buttonSecondaryBorder: TOKEN_COLORS.bbPastelYellow,\n buttonSecondaryBackgroundHover: TOKEN_COLORS.bbPastelPink,\n buttonSecondaryTextHover: TOKEN_COLORS.bbPurple,\n buttonSecondaryBorderHover: TOKEN_COLORS.bbPastelYellow,\n buttonSecondaryDisabledBackground: TOKEN_COLORS.grey_200,\n buttonSecondaryDisabledText: TOKEN_COLORS.grey_800,\n buttonSecondaryDisabledBorder: TOKEN_COLORS.grey_200,\n\n buttonTertiaryText: TOKEN_COLORS.bbPurple,\n buttonTertiaryTextHover: TOKEN_COLORS.bbPink,\n buttonTertiaryDisabledText: TOKEN_COLORS.grey_200,\n};\n\nexport const SPACING: SpacingType = {\n ...defaultTheme.spacing,\n};\n\nexport const SHADOWS: ShadowsType = {\n ...defaultTheme.shadows,\n};\n\nexport const FONT_SIZES: FontSizesType = {\n ...defaultTheme.fontSizes,\n};\n\nexport const TYPOGRAPHY: TypographyType = {\n ...defaultTheme.typography,\n customFonts: [\n {\n family: \"juana\",\n urlWoff: `${SITE_CONFIG.assetPath}fonts/juana-semibold-webfont.woff`,\n urlWoff2: `${SITE_CONFIG.assetPath}fonts/juana-semibold-webfont.woff2`,\n fontWeight: 600,\n },\n ],\n fontFamilyHeadings: \"juana,Arial,sans-serif\",\n fontFamilyLinks: \"juana,Arial,sans-serif\",\n fontFamilyButtons: \"juana,Arial,sans-serif\",\n fontFamilyBase:\n \"Arial, Calibri, nimbussansl, liberationsans, freesans, clean, sans-serif\",\n fontFamilyLabel:\n \"Arial, Calibri, nimbussansl, liberationsans, freesans, clean, sans-serif\",\n // headerLineHeight: \"1.5em\",\n fontWeightBase: 400,\n fontWeightLinks: 600,\n fontWeightHeadings: 600,\n fontWeightButtons: 600,\n fontWeightLabels: 600,\n LinkPrimaryTextDecoration: \"none\",\n LinkLetterSpacing: \"0px\",\n};\n\nexport const bowelbabeTheme: ThemeType = {\n name: \"bowelbabe\",\n avatar: AVATAR,\n breakpoint: BREAKPOINT,\n button: BUTTON,\n tokenColors: TOKEN_COLORS,\n colors: COLORS,\n spacing: SPACING,\n fontSizes: FONT_SIZES,\n siteConfig: SITE_CONFIG,\n typography: TYPOGRAPHY,\n shadows: SHADOWS,\n utilities: UTILITIES,\n};\n\nexport default bowelbabeTheme;\n"],"names":["defaultTheme","utilities","SITE_CONFIG","siteConfig","avatar","assetPath","button","breakpoint","TOKEN_COLORS","tokenColors","bbPurple","bbLightGreen","bbGreen","bbPastelGreen","bbPink","bbPastelPink","bbBlue","bbTeal","bbYellow","bbPastelYellow","colors","white","grey_200","grey_800","spacing","shadows","fontSizes","TYPOGRAPHY","typography","customFonts","family","urlWoff","urlWoff2","fontWeight","bowelbabeTheme"],"mappings":"sCAkBKA,EAAaC,UAGL,MAAAC,EAA8B,IACtCF,EAAaG,YAQbH,EAAaI,OACPF,EAAYG,UAIlBL,EAAaM,OAMbN,EAAaO,WAGL,MAAAC,EAAgC,IACxCR,EAAaS,YAChBC,SAAU,UACVC,aAAc,UACdC,QAAS,UACTC,cAAe,UACfC,OAAQ,UACRC,aAAc,UACdC,OAAQ,UACRC,OAAQ,UACRC,SAAU,UACVC,eAAgB,WAIbnB,EAAaoB,OACPZ,EAAaE,SACXF,EAAaI,QACdJ,EAAaS,OAERT,EAAaa,MACXb,EAAaE,SACdF,EAAaa,MAEpBb,EAAaU,SACbV,EAAaI,QAChBJ,EAAaQ,OAELR,EAAaE,SACdF,EAAaG,aACJH,EAAaI,QACjBJ,EAAaG,aACJH,EAAaI,QAC7BJ,EAAaE,SACRF,EAAaM,OACTN,EAAaE,SACRF,EAAaM,OAEhBN,EAAaK,cAEdL,EAAaM,OAC3BN,EAAaE,SAEDF,EAAaE,SAElBF,EAAaE,SACbF,EAAaG,aACbH,EAAaM,OAEXN,EAAaE,SACPF,EAAaE,SAEbF,EAAaE,SACTF,EAAaG,aACZH,EAAaa,MAEfb,EAAaW,eACnBX,EAAaE,SACXF,EAAaW,eACJX,EAAaO,aACnBP,EAAaE,SACXF,EAAaO,aACNP,EAAac,SACnBd,EAAae,SACXf,EAAac,SAEfd,EAAaa,MACnBb,EAAaE,SACXF,EAAaW,eACJX,EAAaO,aACnBP,EAAaE,SACXF,EAAaW,eACNX,EAAac,SACnBd,EAAae,SACXf,EAAac,SAExBd,EAAaE,SACRF,EAAaM,OACVN,EAAac,SAItCtB,EAAawB,QAIbxB,EAAayB,QAIbzB,EAAa0B,UAGL,MAAAC,EAA6B,IACrC3B,EAAa4B,WAChBC,YAAa,CACX,CACEC,OAAQ,QACRC,QAAS,GAAG7B,EAAYG,6CACxB2B,SAAU,GAAG9B,EAAYG,8CACzB4B,WAAY,OAoBLC,EAA4B,CAUvCN,WAAYD"}
|
package/lib/src/themes/cruk.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
const e={contentMaxWidth:"1020px",useDefaultFocusRect:!0,useDefaultFromControls:!1,useBackgroundStyleLinks:!1,inputBorderWidth:"1px"},r={assetPath:"https://rcl.assets.cancerresearchuk.org/",logoUrl:"/",logoAlt:"Cancer Research UK Giving Page",logoSrc:"https://rcl.assets.cancerresearchuk.org/images/logos/cruk.svg",footerCopyText:"Cancer Research UK is a registered charity in England and Wales (1089464), Scotland (SC041666), the Isle of Man (1103) and Jersey (247). A company limited by guarantee. Registered company in England and Wales(4325234) and the Isle of Man (5713F).",footerLogoAlt:"Registered with Fundraising Regulator",footerLogoSrc:"https://rcl.assets.cancerresearchuk.org/images/logos/fundreg.png"},t={s:"32px",m:"48px",l:"64px",xl:"128px",path:`${r.assetPath}images/avatar/cruk2/`},a={borderRadius:"0px",borderRadiusLarge:"0px",buttonBorderThickness:"2px",textDecoration:"none",textTransform:"none",horizontalPadding:"2em"},o={mobile:"576px",tablet:"768px",desktop:"992px",desktopLarge:"1200px"},n={navy_100:"#E5E5FF",navy_600:"#00007E",navy_700:"#000066",navy_800:"#00004D",magenta_100:"#FFE6F3",magenta_600:"#FF0087",magenta_700:"#E60079",magenta_800:"#CC006C",cyan_600:"#009CEE",cyan_700:"#006DA7",grey_100:"#F2F2F2",grey_200:"#E6E6E6",grey_300:"#c6c6c6",grey_600:"#666666",grey_800:"#575757",grey_900:"#2e2d2c",white:"#fff",black:"#000",red:"#D51311",yellow:"#fdc02f",green:"#3d854d"},i={primary:n.navy_600,secondary:n.magenta_700,tertiary:n.cyan_600,textOnPrimary:n.white,textOnSecondary:n.white,textOnTertiary:n.white,textHeaderDefault:n.black,disabled:n.grey_200,danger:n.red,warning:n.yellow,success:n.green,info:n.cyan_600,textError:n.red,textDark:n.black,textLight:n.white,linkColor:n.magenta_700,linkColorHover:n.magenta_800,linkColorSecondary:n.magenta_700,linkColorSecondaryHover:n.magenta_800,avatarBorder:n.navy_600,progressBar:n.navy_600,progressBarSecondary:n.magenta_700,progressBarBackground:n.grey_200,circularProgress:n.cyan_600,circularProgressSecondary:n.magenta_700,circularProgressBackground:n.grey_200,buttonPrimaryBackground:n.magenta_700,buttonPrimaryText:n.white,buttonPrimaryBorder:n.magenta_700,buttonPrimaryBackgroundHover:n.magenta_800,buttonPrimaryTextHover:n.white,buttonPrimaryBorderHover:n.magenta_800,buttonPrimaryDisabledBackground:n.grey_200,buttonPrimaryDisabledText:n.grey_600,buttonPrimaryDisabledBorder:n.grey_200,buttonSecondaryBackground:n.white,buttonSecondaryText:n.magenta_700,buttonSecondaryBorder:n.magenta_700,buttonSecondaryBackgroundHover:n.magenta_100,buttonSecondaryTextHover:n.magenta_800,buttonSecondaryBorderHover:n.magenta_100,buttonSecondaryDisabledBackground:n.grey_200,buttonSecondaryDisabledText:n.grey_600,buttonSecondaryDisabledBorder:n.grey_200,buttonTertiaryText:n.magenta_700,buttonTertiaryTextHover:n.magenta_800,buttonTertiaryDisabledText:n.grey_600,collapseHeaderColor:n.navy_600,selectionBorder:n.grey_600,textInputBorder:n.grey_900,inputBorder:n.grey_900,check:n.magenta_700,headerBackground:n.white,backgroundLight:n.white,backgroundLightColor:n.navy_100,backgroundMid:n.grey_200,backgroundMidLight:n.grey_100,loaderColor1:n.navy_600,loaderColor2:n.magenta_600,loaderColor3:n.cyan_600,paginationText:n.navy_600,paginationActive:n.grey_200,paginationBackground:n.navy_600,footerBackground:n.backgroundLight,headerBorder:n.grey_200,headerTaglineText:n.black,stepBorder:n.grey_200,stepBackground:n.white,popoverBackground:n.white,textInputExtraInfo:n.grey_200,totaliserBubbleColor:n.grey_200,totaliserBubbleTextColor:n.black,totaliserBubbleTotalColor:n.navy_600,selectBackground:n.black,modalBackdrop:n.black,userBlockExtraText:n.grey_800},s={none:"0",auto:"auto",xxs:"0.5rem",xs:"1rem",s:"1.5rem",m:"2rem",l:"2.5rem",xl:"3rem",xxl:"3.5rem"},g={xs:"0.75rem",s:"0.875rem",m:"1rem",l:"1.25rem",xl:"1.5625rem",xxl:"2rem",xxxl:"2.5rem",xxxxl:"3.125rem"},l={customFonts:[{family:"Progress",urlWoff:`${r.assetPath}fonts/Progress-Regular.woff2`,fontWeight:400},{family:"Progress",urlWoff:`${r.assetPath}fonts/Progress-SemiBold.woff2`,fontWeight:600},{family:"Poppins",urlWoff:`${r.assetPath}fonts/Poppins-Light.woff`,fontWeight:300},{family:"Poppins",urlWoff:`${r.assetPath}fonts/Poppins-Regular.woff2`,fontWeight:400},{family:"Poppins",urlWoff:`${r.assetPath}fonts/Poppins-SemiBold.woff2`,fontWeight:600},{family:"Poppins",urlWoff:`${r.assetPath}fonts/Poppins-Medium.woff`,fontWeight:500}],fontFamilyBase:"Poppins,sans-serif",fontFamilyButtons:"Poppins,sans-serif",fontFamilyLinks:"Poppins,sans-serif",fontFamilyHeadings:"Progress,Arial,Helvetica,sans-serif",fontFamilyLabel:"Poppins,sans-serif",fontSizeBase:"16px",fontWeightBase:300,fontWeightHeadings:400,fontWeightLinks:700,fontWeightButtons:400,fontWeightLabels:400,fontWeightHeavy:700,fontWeightMedium:500,fontWeightNormal:400,fontWeightLight:300,fontWeightVLight:100,linkTextDecoration:"underline",LinkLetterSpacing:"0px",LinkPrimaryTextDecoration:"underline",lineHeight:"1.5em",headerLineHeight:"1.25em",headerTextTransform:"none"},d={s:`0px 0px 2px 1px ${n.grey_300}`,m:`0px 0px 4px 1px ${n.grey_300}`,l:`0px 0px 7px 1px ${n.grey_300}`},c={name:"cruk",avatar:t,breakpoint:o,button:a,tokenColors:n,colors:i,spacing:s,fontSizes:g,siteConfig:r,typography:l,shadows:d,utilities:e};export{t as AVATAR,o as BREAKPOINT,a as BUTTON,i as COLORS,g as FONT_SIZES,d as SHADOWS,r as SITE_CONFIG,s as SPACING,n as TOKEN_COLORS,l as TYPOGRAPHY,e as UTILITIES,c as crukTheme,c as default};
|
|
2
2
|
//# sourceMappingURL=cruk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cruk.js","sources":["../../../src/themes/cruk.ts"],"sourcesContent":["import {\n type UtilitiesType,\n type SiteConfigType,\n type AvatarType,\n type ButtonType,\n type BreakPointType,\n type TokenColorsType,\n type ColorsType,\n type SpacingType,\n type FontSizesType,\n type ShadowsType,\n type TypographyType,\n type ThemeType,\n} from \"../types\";\n\nexport const UTILITIES: UtilitiesType = {\n contentMaxWidth: \"1020px\",\n useDefaultFocusRect: true,\n useDefaultFromControls: false,\n useBackgroundStyleLinks: false,\n inputBorderWidth: \"1px\",\n};\n\nexport const SITE_CONFIG: SiteConfigType = {\n assetPath: \"https://rcl.assets.cancerresearchuk.org/\",\n logoUrl: \"/\",\n logoAlt: \"Cancer Research UK Giving Page\",\n logoSrc: \"https://rcl.assets.cancerresearchuk.org/images/logos/cruk.svg\",\n footerCopyText:\n \"Cancer Research UK is a registered charity in England and Wales (1089464), Scotland (SC041666), the Isle of Man (1103) and Jersey (247). A company limited by guarantee. Registered company in England and Wales(4325234) and the Isle of Man (5713F).\",\n footerLogoAlt: \"Registered with Fundraising Regulator\",\n footerLogoSrc:\n \"https://rcl.assets.cancerresearchuk.org/images/logos/fundreg.png\",\n};\n\nexport const AVATAR: AvatarType = {\n s: \"32px\",\n m: \"48px\",\n l: \"64px\",\n xl: \"128px\",\n path: `${SITE_CONFIG.assetPath}images/avatar/cruk2/`,\n};\n\nexport const BUTTON: ButtonType = {\n borderRadius: \"0px\",\n borderRadiusLarge: \"0px\",\n buttonBorderThickness: \"2px\",\n textDecoration: \"none\",\n textTransform: \"none\",\n horizontalPadding: \"2em\",\n};\n\nexport const BREAKPOINT: BreakPointType = {\n mobile: \"576px\",\n tablet: \"768px\",\n desktop: \"992px\",\n desktopLarge: \"1200px\",\n};\n\nexport const TOKEN_COLORS: TokenColorsType = {\n navy_100: \"#E5E5FF\",\n navy_600: \"#00007E\",\n navy_700: \"#000066\",\n navy_800: \"#00004D\",\n\n magenta_100: \"#FFE6F3\",\n magenta_600: \"#FF0087\",\n magenta_700: \"#E60079\",\n magenta_800: \"#CC006C\",\n\n cyan_600: \"#009CEE\",\n cyan_700: \"#006DA7\",\n\n grey_100: \"#F2F2F2\",\n grey_200: \"#E6E6E6\",\n grey_300: \"#c6c6c6\", // used for shadows\n\n grey_600: \"#666666\",\n grey_800: \"#575757\",\n grey_900: \"#2e2d2c\",\n\n white: \"#fff\",\n black: \"#000\",\n\n red: \"#D51311\",\n yellow: \"#fdc02f\",\n green: \"#3d854d\",\n};\n\nexport const COLORS: ColorsType = {\n primary: TOKEN_COLORS.navy_600,\n secondary: TOKEN_COLORS.magenta_700,\n tertiary: TOKEN_COLORS.cyan_600,\n\n textOnPrimary: TOKEN_COLORS.white,\n textOnSecondary: TOKEN_COLORS.white,\n textOnTertiary: TOKEN_COLORS.white,\n textHeaderDefault: TOKEN_COLORS.black,\n\n disabled: TOKEN_COLORS.grey_200,\n danger: TOKEN_COLORS.red,\n warning: TOKEN_COLORS.yellow,\n success: TOKEN_COLORS.green,\n info: TOKEN_COLORS.cyan_600,\n textError: TOKEN_COLORS.red,\n\n textDark: TOKEN_COLORS.black,\n textLight: TOKEN_COLORS.white,\n linkColor: TOKEN_COLORS.magenta_700,\n linkColorHover: TOKEN_COLORS.magenta_800,\n linkColorSecondary: TOKEN_COLORS.magenta_700,\n linkColorSecondaryHover: TOKEN_COLORS.magenta_800,\n\n avatarBorder: TOKEN_COLORS.navy_600,\n progressBar: TOKEN_COLORS.navy_600,\n progressBarSecondary: TOKEN_COLORS.magenta_700,\n progressBarBackground: TOKEN_COLORS.grey_200,\n circularProgress: TOKEN_COLORS.cyan_600,\n circularProgressSecondary: TOKEN_COLORS.magenta_700,\n circularProgressBackground: TOKEN_COLORS.grey_200,\n\n buttonPrimaryBackground: TOKEN_COLORS.magenta_700,\n buttonPrimaryText: TOKEN_COLORS.white,\n buttonPrimaryBorder: TOKEN_COLORS.magenta_700,\n buttonPrimaryBackgroundHover: TOKEN_COLORS.magenta_800,\n buttonPrimaryTextHover: TOKEN_COLORS.white,\n buttonPrimaryBorderHover: TOKEN_COLORS.magenta_800,\n buttonPrimaryDisabledBackground: TOKEN_COLORS.grey_200,\n buttonPrimaryDisabledText: TOKEN_COLORS.grey_600,\n buttonPrimaryDisabledBorder: TOKEN_COLORS.grey_200,\n\n buttonSecondaryBackground: TOKEN_COLORS.white,\n buttonSecondaryText: TOKEN_COLORS.magenta_700,\n buttonSecondaryBorder: TOKEN_COLORS.magenta_700,\n buttonSecondaryBackgroundHover: TOKEN_COLORS.magenta_100,\n buttonSecondaryTextHover: TOKEN_COLORS.magenta_800,\n buttonSecondaryBorderHover: TOKEN_COLORS.magenta_100,\n buttonSecondaryDisabledBackground: TOKEN_COLORS.grey_200,\n buttonSecondaryDisabledText: TOKEN_COLORS.grey_600,\n buttonSecondaryDisabledBorder: TOKEN_COLORS.grey_200,\n\n buttonTertiaryText: TOKEN_COLORS.magenta_700,\n buttonTertiaryTextHover: TOKEN_COLORS.magenta_800,\n buttonTertiaryDisabledText: TOKEN_COLORS.grey_600,\n\n collapseHeaderColor: TOKEN_COLORS.navy_600,\n\n selectionBorder: TOKEN_COLORS.grey_600,\n\n textInputBorder: TOKEN_COLORS.grey_900,\n inputBorder: TOKEN_COLORS.grey_900,\n check: TOKEN_COLORS.magenta_700,\n\n headerBackground: TOKEN_COLORS.white,\n backgroundLight: TOKEN_COLORS.white,\n backgroundLightColor: TOKEN_COLORS.navy_100,\n backgroundMid: TOKEN_COLORS.grey_200,\n backgroundMidLight: TOKEN_COLORS.grey_100,\n\n loaderColor1: TOKEN_COLORS.navy_600,\n loaderColor2: TOKEN_COLORS.magenta_600,\n loaderColor3: TOKEN_COLORS.cyan_600,\n\n paginationText: TOKEN_COLORS.navy_600,\n paginationActive: TOKEN_COLORS.grey_200,\n paginationBackground: TOKEN_COLORS.navy_600,\n\n footerBackground: TOKEN_COLORS.backgroundLight,\n\n headerBorder: TOKEN_COLORS.grey_200,\n headerTaglineText: TOKEN_COLORS.black,\n\n stepBorder: TOKEN_COLORS.grey_200,\n stepBackground: TOKEN_COLORS.white,\n\n popoverBackground: TOKEN_COLORS.white,\n\n textInputExtraInfo: TOKEN_COLORS.grey_200,\n\n totaliserBubbleColor: TOKEN_COLORS.grey_200,\n totaliserBubbleTextColor: TOKEN_COLORS.black,\n totaliserBubbleTotalColor: TOKEN_COLORS.navy_600,\n\n selectBackground: TOKEN_COLORS.black,\n\n modalBackdrop: TOKEN_COLORS.black,\n\n userBlockExtraText: TOKEN_COLORS.grey_800,\n};\n\n// TODO: possibly convert to REMS, once a base font size has been agreed.\nexport const SPACING: SpacingType = {\n none: \"0\",\n auto: \"auto\",\n xxs: \"0.5rem\", // 8px\n xs: \"1rem\", // 16px\n s: \"1.5rem\", // 24px\n m: \"2rem\", // 32px\n l: \"2.5rem\", // 40px\n xl: \"3rem\", // 48px\n xxl: \"3.5rem\", // 56px\n};\n\nexport const FONT_SIZES: FontSizesType = {\n xs: \"0.75rem\", // 12px\n s: \"0.875rem\", // 14px\n m: \"1rem\", // 16px\n l: \"1.25rem\", // 20px\n xl: \"1.5625rem\", // 25px\n xxl: \"2rem\", // 32px\n xxxl: \"2.5rem\", // 40px\n xxxxl: \"3.125rem\", // 45px\n};\n\nexport const TYPOGRAPHY: TypographyType = {\n customFonts: [\n {\n family: \"Progress\",\n urlWoff: `${SITE_CONFIG.assetPath}fonts/Progress-Regular.woff2`,\n fontWeight: 400,\n },\n {\n family: \"Progress\",\n urlWoff: `${SITE_CONFIG.assetPath}fonts/Progress-SemiBold.woff2`,\n fontWeight: 600,\n },\n {\n family: \"Poppins\",\n urlWoff: `${SITE_CONFIG.assetPath}fonts/Poppins-Light.woff`,\n fontWeight: 300,\n },\n {\n family: \"Poppins\",\n urlWoff: `${SITE_CONFIG.assetPath}fonts/Poppins-Regular.woff2`,\n fontWeight: 400,\n },\n {\n family: \"Poppins\",\n urlWoff: `${SITE_CONFIG.assetPath}fonts/Poppins-SemiBold.woff2`,\n fontWeight: 600,\n },\n {\n family: \"Poppins\",\n urlWoff: `${SITE_CONFIG.assetPath}fonts/Poppins-Medium.woff`,\n fontWeight: 500,\n },\n ],\n fontFamilyBase: \"Poppins,sans-serif\",\n fontFamilyButtons: \"Poppins,sans-serif\",\n fontFamilyLinks: \"Poppins,sans-serif\",\n fontFamilyHeadings: \"Progress,Arial,Helvetica,sans-serif\",\n fontFamilyLabel: \"Poppins,sans-serif\",\n fontSizeBase: \"16px\",\n fontWeightBase: 300,\n fontWeightHeadings: 400,\n fontWeightLinks: 700,\n fontWeightButtons: 400,\n fontWeightLabels: 400,\n fontWeightHeavy: 700,\n fontWeightMedium: 500,\n fontWeightNormal: 400,\n fontWeightLight: 300,\n fontWeightVLight: 100,\n linkTextDecoration: \"underline\",\n LinkLetterSpacing: \"0px\",\n LinkPrimaryTextDecoration: \"underline\",\n lineHeight: \"1.5em\",\n headerLineHeight: \"1.25em\",\n headerTextTransform: \"none\",\n};\n\nexport const SHADOWS: ShadowsType = {\n s: `0px 0px 2px 1px ${TOKEN_COLORS.grey_300}`,\n m: `0px 0px 4px 1px ${TOKEN_COLORS.grey_300}`,\n l: `0px 0px 7px 1px ${TOKEN_COLORS.grey_300}`,\n};\n\nexport const crukTheme: ThemeType = {\n name: \"cruk\",\n avatar: AVATAR,\n breakpoint: BREAKPOINT,\n button: BUTTON,\n tokenColors: TOKEN_COLORS,\n colors: COLORS,\n spacing: SPACING,\n fontSizes: FONT_SIZES,\n siteConfig: SITE_CONFIG,\n typography: TYPOGRAPHY,\n shadows: SHADOWS,\n utilities: UTILITIES,\n};\n\nexport default crukTheme;\n"],"names":["UTILITIES","contentMaxWidth","useDefaultFocusRect","useDefaultFromControls","useBackgroundStyleLinks","inputBorderWidth","SITE_CONFIG","assetPath","logoUrl","logoAlt","logoSrc","footerCopyText","footerLogoAlt","footerLogoSrc","AVATAR","s","m","l","xl","path","concat","BUTTON","borderRadius","borderRadiusLarge","buttonBorderThickness","textDecoration","textTransform","horizontalPadding","BREAKPOINT","mobile","tablet","desktop","desktopLarge","TOKEN_COLORS","navy_100","navy_600","navy_700","navy_800","magenta_100","magenta_600","magenta_700","magenta_800","cyan_600","cyan_700","grey_100","grey_200","grey_300","grey_600","grey_800","grey_900","white","black","red","yellow","green","COLORS","primary","secondary","tertiary","textOnPrimary","textOnSecondary","textOnTertiary","textHeaderDefault","disabled","danger","warning","success","info","textError","textDark","textLight","linkColor","linkColorHover","linkColorSecondary","linkColorSecondaryHover","avatarBorder","progressBar","progressBarSecondary","progressBarBackground","circularProgress","circularProgressSecondary","circularProgressBackground","buttonPrimaryBackground","buttonPrimaryText","buttonPrimaryBorder","buttonPrimaryBackgroundHover","buttonPrimaryTextHover","buttonPrimaryBorderHover","buttonPrimaryDisabledBackground","buttonPrimaryDisabledText","buttonPrimaryDisabledBorder","buttonSecondaryBackground","buttonSecondaryText","buttonSecondaryBorder","buttonSecondaryBackgroundHover","buttonSecondaryTextHover","buttonSecondaryBorderHover","buttonSecondaryDisabledBackground","buttonSecondaryDisabledText","buttonSecondaryDisabledBorder","buttonTertiaryText","buttonTertiaryTextHover","buttonTertiaryDisabledText","collapseHeaderColor","selectionBorder","textInputBorder","inputBorder","check","headerBackground","backgroundLight","backgroundLightColor","backgroundMid","backgroundMidLight","loaderColor1","loaderColor2","loaderColor3","paginationText","paginationActive","paginationBackground","footerBackground","headerBorder","headerTaglineText","stepBorder","stepBackground","popoverBackground","textInputExtraInfo","totaliserBubbleColor","totaliserBubbleTextColor","totaliserBubbleTotalColor","selectBackground","modalBackdrop","userBlockExtraText","SPACING","none","auto","xxs","xs","xxl","FONT_SIZES","xxxl","xxxxl","TYPOGRAPHY","customFonts","family","urlWoff","fontWeight","fontFamilyBase","fontFamilyButtons","fontFamilyLinks","fontFamilyHeadings","fontFamilyLabel","fontSizeBase","fontWeightBase","fontWeightHeadings","fontWeightLinks","fontWeightButtons","fontWeightLabels","fontWeightHeavy","fontWeightMedium","fontWeightNormal","fontWeightLight","fontWeightVLight","linkTextDecoration","LinkLetterSpacing","LinkPrimaryTextDecoration","lineHeight","headerLineHeight","headerTextTransform","SHADOWS","crukTheme","name","avatar","breakpoint","button","tokenColors","colors","spacing","fontSizes","siteConfig","typography","shadows","utilities"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"cruk.js","sources":["../../../src/themes/cruk.ts"],"sourcesContent":["import {\n type UtilitiesType,\n type SiteConfigType,\n type AvatarType,\n type ButtonType,\n type BreakPointType,\n type TokenColorsType,\n type ColorsType,\n type SpacingType,\n type FontSizesType,\n type ShadowsType,\n type TypographyType,\n type ThemeType,\n} from \"../types\";\n\nexport const UTILITIES: UtilitiesType = {\n contentMaxWidth: \"1020px\",\n useDefaultFocusRect: true,\n useDefaultFromControls: false,\n useBackgroundStyleLinks: false,\n inputBorderWidth: \"1px\",\n};\n\nexport const SITE_CONFIG: SiteConfigType = {\n assetPath: \"https://rcl.assets.cancerresearchuk.org/\",\n logoUrl: \"/\",\n logoAlt: \"Cancer Research UK Giving Page\",\n logoSrc: \"https://rcl.assets.cancerresearchuk.org/images/logos/cruk.svg\",\n footerCopyText:\n \"Cancer Research UK is a registered charity in England and Wales (1089464), Scotland (SC041666), the Isle of Man (1103) and Jersey (247). A company limited by guarantee. Registered company in England and Wales(4325234) and the Isle of Man (5713F).\",\n footerLogoAlt: \"Registered with Fundraising Regulator\",\n footerLogoSrc:\n \"https://rcl.assets.cancerresearchuk.org/images/logos/fundreg.png\",\n};\n\nexport const AVATAR: AvatarType = {\n s: \"32px\",\n m: \"48px\",\n l: \"64px\",\n xl: \"128px\",\n path: `${SITE_CONFIG.assetPath}images/avatar/cruk2/`,\n};\n\nexport const BUTTON: ButtonType = {\n borderRadius: \"0px\",\n borderRadiusLarge: \"0px\",\n buttonBorderThickness: \"2px\",\n textDecoration: \"none\",\n textTransform: \"none\",\n horizontalPadding: \"2em\",\n};\n\nexport const BREAKPOINT: BreakPointType = {\n mobile: \"576px\",\n tablet: \"768px\",\n desktop: \"992px\",\n desktopLarge: \"1200px\",\n};\n\nexport const TOKEN_COLORS: TokenColorsType = {\n navy_100: \"#E5E5FF\",\n navy_600: \"#00007E\",\n navy_700: \"#000066\",\n navy_800: \"#00004D\",\n\n magenta_100: \"#FFE6F3\",\n magenta_600: \"#FF0087\",\n magenta_700: \"#E60079\",\n magenta_800: \"#CC006C\",\n\n cyan_600: \"#009CEE\",\n cyan_700: \"#006DA7\",\n\n grey_100: \"#F2F2F2\",\n grey_200: \"#E6E6E6\",\n grey_300: \"#c6c6c6\", // used for shadows\n\n grey_600: \"#666666\",\n grey_800: \"#575757\",\n grey_900: \"#2e2d2c\",\n\n white: \"#fff\",\n black: \"#000\",\n\n red: \"#D51311\",\n yellow: \"#fdc02f\",\n green: \"#3d854d\",\n};\n\nexport const COLORS: ColorsType = {\n primary: TOKEN_COLORS.navy_600,\n secondary: TOKEN_COLORS.magenta_700,\n tertiary: TOKEN_COLORS.cyan_600,\n\n textOnPrimary: TOKEN_COLORS.white,\n textOnSecondary: TOKEN_COLORS.white,\n textOnTertiary: TOKEN_COLORS.white,\n textHeaderDefault: TOKEN_COLORS.black,\n\n disabled: TOKEN_COLORS.grey_200,\n danger: TOKEN_COLORS.red,\n warning: TOKEN_COLORS.yellow,\n success: TOKEN_COLORS.green,\n info: TOKEN_COLORS.cyan_600,\n textError: TOKEN_COLORS.red,\n\n textDark: TOKEN_COLORS.black,\n textLight: TOKEN_COLORS.white,\n linkColor: TOKEN_COLORS.magenta_700,\n linkColorHover: TOKEN_COLORS.magenta_800,\n linkColorSecondary: TOKEN_COLORS.magenta_700,\n linkColorSecondaryHover: TOKEN_COLORS.magenta_800,\n\n avatarBorder: TOKEN_COLORS.navy_600,\n progressBar: TOKEN_COLORS.navy_600,\n progressBarSecondary: TOKEN_COLORS.magenta_700,\n progressBarBackground: TOKEN_COLORS.grey_200,\n circularProgress: TOKEN_COLORS.cyan_600,\n circularProgressSecondary: TOKEN_COLORS.magenta_700,\n circularProgressBackground: TOKEN_COLORS.grey_200,\n\n buttonPrimaryBackground: TOKEN_COLORS.magenta_700,\n buttonPrimaryText: TOKEN_COLORS.white,\n buttonPrimaryBorder: TOKEN_COLORS.magenta_700,\n buttonPrimaryBackgroundHover: TOKEN_COLORS.magenta_800,\n buttonPrimaryTextHover: TOKEN_COLORS.white,\n buttonPrimaryBorderHover: TOKEN_COLORS.magenta_800,\n buttonPrimaryDisabledBackground: TOKEN_COLORS.grey_200,\n buttonPrimaryDisabledText: TOKEN_COLORS.grey_600,\n buttonPrimaryDisabledBorder: TOKEN_COLORS.grey_200,\n\n buttonSecondaryBackground: TOKEN_COLORS.white,\n buttonSecondaryText: TOKEN_COLORS.magenta_700,\n buttonSecondaryBorder: TOKEN_COLORS.magenta_700,\n buttonSecondaryBackgroundHover: TOKEN_COLORS.magenta_100,\n buttonSecondaryTextHover: TOKEN_COLORS.magenta_800,\n buttonSecondaryBorderHover: TOKEN_COLORS.magenta_100,\n buttonSecondaryDisabledBackground: TOKEN_COLORS.grey_200,\n buttonSecondaryDisabledText: TOKEN_COLORS.grey_600,\n buttonSecondaryDisabledBorder: TOKEN_COLORS.grey_200,\n\n buttonTertiaryText: TOKEN_COLORS.magenta_700,\n buttonTertiaryTextHover: TOKEN_COLORS.magenta_800,\n buttonTertiaryDisabledText: TOKEN_COLORS.grey_600,\n\n collapseHeaderColor: TOKEN_COLORS.navy_600,\n\n selectionBorder: TOKEN_COLORS.grey_600,\n\n textInputBorder: TOKEN_COLORS.grey_900,\n inputBorder: TOKEN_COLORS.grey_900,\n check: TOKEN_COLORS.magenta_700,\n\n headerBackground: TOKEN_COLORS.white,\n backgroundLight: TOKEN_COLORS.white,\n backgroundLightColor: TOKEN_COLORS.navy_100,\n backgroundMid: TOKEN_COLORS.grey_200,\n backgroundMidLight: TOKEN_COLORS.grey_100,\n\n loaderColor1: TOKEN_COLORS.navy_600,\n loaderColor2: TOKEN_COLORS.magenta_600,\n loaderColor3: TOKEN_COLORS.cyan_600,\n\n paginationText: TOKEN_COLORS.navy_600,\n paginationActive: TOKEN_COLORS.grey_200,\n paginationBackground: TOKEN_COLORS.navy_600,\n\n footerBackground: TOKEN_COLORS.backgroundLight,\n\n headerBorder: TOKEN_COLORS.grey_200,\n headerTaglineText: TOKEN_COLORS.black,\n\n stepBorder: TOKEN_COLORS.grey_200,\n stepBackground: TOKEN_COLORS.white,\n\n popoverBackground: TOKEN_COLORS.white,\n\n textInputExtraInfo: TOKEN_COLORS.grey_200,\n\n totaliserBubbleColor: TOKEN_COLORS.grey_200,\n totaliserBubbleTextColor: TOKEN_COLORS.black,\n totaliserBubbleTotalColor: TOKEN_COLORS.navy_600,\n\n selectBackground: TOKEN_COLORS.black,\n\n modalBackdrop: TOKEN_COLORS.black,\n\n userBlockExtraText: TOKEN_COLORS.grey_800,\n};\n\n// TODO: possibly convert to REMS, once a base font size has been agreed.\nexport const SPACING: SpacingType = {\n none: \"0\",\n auto: \"auto\",\n xxs: \"0.5rem\", // 8px\n xs: \"1rem\", // 16px\n s: \"1.5rem\", // 24px\n m: \"2rem\", // 32px\n l: \"2.5rem\", // 40px\n xl: \"3rem\", // 48px\n xxl: \"3.5rem\", // 56px\n};\n\nexport const FONT_SIZES: FontSizesType = {\n xs: \"0.75rem\", // 12px\n s: \"0.875rem\", // 14px\n m: \"1rem\", // 16px\n l: \"1.25rem\", // 20px\n xl: \"1.5625rem\", // 25px\n xxl: \"2rem\", // 32px\n xxxl: \"2.5rem\", // 40px\n xxxxl: \"3.125rem\", // 45px\n};\n\nexport const TYPOGRAPHY: TypographyType = {\n customFonts: [\n {\n family: \"Progress\",\n urlWoff: `${SITE_CONFIG.assetPath}fonts/Progress-Regular.woff2`,\n fontWeight: 400,\n },\n {\n family: \"Progress\",\n urlWoff: `${SITE_CONFIG.assetPath}fonts/Progress-SemiBold.woff2`,\n fontWeight: 600,\n },\n {\n family: \"Poppins\",\n urlWoff: `${SITE_CONFIG.assetPath}fonts/Poppins-Light.woff`,\n fontWeight: 300,\n },\n {\n family: \"Poppins\",\n urlWoff: `${SITE_CONFIG.assetPath}fonts/Poppins-Regular.woff2`,\n fontWeight: 400,\n },\n {\n family: \"Poppins\",\n urlWoff: `${SITE_CONFIG.assetPath}fonts/Poppins-SemiBold.woff2`,\n fontWeight: 600,\n },\n {\n family: \"Poppins\",\n urlWoff: `${SITE_CONFIG.assetPath}fonts/Poppins-Medium.woff`,\n fontWeight: 500,\n },\n ],\n fontFamilyBase: \"Poppins,sans-serif\",\n fontFamilyButtons: \"Poppins,sans-serif\",\n fontFamilyLinks: \"Poppins,sans-serif\",\n fontFamilyHeadings: \"Progress,Arial,Helvetica,sans-serif\",\n fontFamilyLabel: \"Poppins,sans-serif\",\n fontSizeBase: \"16px\",\n fontWeightBase: 300,\n fontWeightHeadings: 400,\n fontWeightLinks: 700,\n fontWeightButtons: 400,\n fontWeightLabels: 400,\n fontWeightHeavy: 700,\n fontWeightMedium: 500,\n fontWeightNormal: 400,\n fontWeightLight: 300,\n fontWeightVLight: 100,\n linkTextDecoration: \"underline\",\n LinkLetterSpacing: \"0px\",\n LinkPrimaryTextDecoration: \"underline\",\n lineHeight: \"1.5em\",\n headerLineHeight: \"1.25em\",\n headerTextTransform: \"none\",\n};\n\nexport const SHADOWS: ShadowsType = {\n s: `0px 0px 2px 1px ${TOKEN_COLORS.grey_300}`,\n m: `0px 0px 4px 1px ${TOKEN_COLORS.grey_300}`,\n l: `0px 0px 7px 1px ${TOKEN_COLORS.grey_300}`,\n};\n\nexport const crukTheme: ThemeType = {\n name: \"cruk\",\n avatar: AVATAR,\n breakpoint: BREAKPOINT,\n button: BUTTON,\n tokenColors: TOKEN_COLORS,\n colors: COLORS,\n spacing: SPACING,\n fontSizes: FONT_SIZES,\n siteConfig: SITE_CONFIG,\n typography: TYPOGRAPHY,\n shadows: SHADOWS,\n utilities: UTILITIES,\n};\n\nexport default crukTheme;\n"],"names":["UTILITIES","contentMaxWidth","useDefaultFocusRect","useDefaultFromControls","useBackgroundStyleLinks","inputBorderWidth","SITE_CONFIG","assetPath","logoUrl","logoAlt","logoSrc","footerCopyText","footerLogoAlt","footerLogoSrc","AVATAR","s","m","l","xl","path","BUTTON","borderRadius","borderRadiusLarge","buttonBorderThickness","textDecoration","textTransform","horizontalPadding","BREAKPOINT","mobile","tablet","desktop","desktopLarge","TOKEN_COLORS","navy_100","navy_600","navy_700","navy_800","magenta_100","magenta_600","magenta_700","magenta_800","cyan_600","cyan_700","grey_100","grey_200","grey_300","grey_600","grey_800","grey_900","white","black","red","yellow","green","COLORS","primary","secondary","tertiary","textOnPrimary","textOnSecondary","textOnTertiary","textHeaderDefault","disabled","danger","warning","success","info","textError","textDark","textLight","linkColor","linkColorHover","linkColorSecondary","linkColorSecondaryHover","avatarBorder","progressBar","progressBarSecondary","progressBarBackground","circularProgress","circularProgressSecondary","circularProgressBackground","buttonPrimaryBackground","buttonPrimaryText","buttonPrimaryBorder","buttonPrimaryBackgroundHover","buttonPrimaryTextHover","buttonPrimaryBorderHover","buttonPrimaryDisabledBackground","buttonPrimaryDisabledText","buttonPrimaryDisabledBorder","buttonSecondaryBackground","buttonSecondaryText","buttonSecondaryBorder","buttonSecondaryBackgroundHover","buttonSecondaryTextHover","buttonSecondaryBorderHover","buttonSecondaryDisabledBackground","buttonSecondaryDisabledText","buttonSecondaryDisabledBorder","buttonTertiaryText","buttonTertiaryTextHover","buttonTertiaryDisabledText","collapseHeaderColor","selectionBorder","textInputBorder","inputBorder","check","headerBackground","backgroundLight","backgroundLightColor","backgroundMid","backgroundMidLight","loaderColor1","loaderColor2","loaderColor3","paginationText","paginationActive","paginationBackground","footerBackground","headerBorder","headerTaglineText","stepBorder","stepBackground","popoverBackground","textInputExtraInfo","totaliserBubbleColor","totaliserBubbleTextColor","totaliserBubbleTotalColor","selectBackground","modalBackdrop","userBlockExtraText","SPACING","none","auto","xxs","xs","xxl","FONT_SIZES","xxxl","xxxxl","TYPOGRAPHY","customFonts","family","urlWoff","fontWeight","fontFamilyBase","fontFamilyButtons","fontFamilyLinks","fontFamilyHeadings","fontFamilyLabel","fontSizeBase","fontWeightBase","fontWeightHeadings","fontWeightLinks","fontWeightButtons","fontWeightLabels","fontWeightHeavy","fontWeightMedium","fontWeightNormal","fontWeightLight","fontWeightVLight","linkTextDecoration","LinkLetterSpacing","LinkPrimaryTextDecoration","lineHeight","headerLineHeight","headerTextTransform","SHADOWS","crukTheme","name","avatar","breakpoint","button","tokenColors","colors","spacing","fontSizes","siteConfig","typography","shadows","utilities"],"mappings":"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"}
|
package/lib/src/themes/rfl.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{crukTheme as t}from"./cruk.js";t.utilities;const o={...t.siteConfig};t.avatar,o.assetPath,t.button,t.breakpoint;const a={...t.tokenColors};t.colors,a.navy_600,a.navy_600,a.magenta_700,a.navy_600,t.spacing,t.shadows,t.fontSizes;const s={...t.typography},n={typography:s};export{o as SITE_CONFIG,a as TOKEN_COLORS,s as TYPOGRAPHY,n as default,n as rflTheme};
|
|
2
2
|
//# sourceMappingURL=rfl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rfl.js","sources":["../../../src/themes/rfl.ts"],"sourcesContent":["import {\n type UtilitiesType,\n type SiteConfigType,\n type AvatarType,\n type ButtonType,\n type BreakPointType,\n type TokenColorsType,\n type ColorsType,\n type SpacingType,\n type FontSizesType,\n type TypographyType,\n type ThemeType,\n type ShadowsType,\n} from \"../types\";\n\nimport { crukTheme as defaultTheme } from \"./cruk\";\n\nexport const UTILITIES: UtilitiesType = {\n ...defaultTheme.utilities,\n};\n\nexport const SITE_CONFIG: SiteConfigType = {\n ...defaultTheme.siteConfig,\n logoSrc: \"https://rcl.assets.cancerresearchuk.org/images/logos/rfl-sl.svg\",\n};\n\nexport const AVATAR: AvatarType = {\n ...defaultTheme.avatar,\n path: `${SITE_CONFIG.assetPath}images/avatar/rfl/`,\n};\n\nexport const BUTTON: ButtonType = {\n ...defaultTheme.button,\n};\n\nexport const BREAKPOINT: BreakPointType = {\n ...defaultTheme.breakpoint,\n};\n\nexport const TOKEN_COLORS: TokenColorsType = {\n ...defaultTheme.tokenColors,\n};\n\nexport const COLORS: ColorsType = {\n ...defaultTheme.colors,\n textHeaderDefault: TOKEN_COLORS.navy_600,\n headerTaglineText: TOKEN_COLORS.navy_600,\n progressBar: TOKEN_COLORS.magenta_700,\n progressBarSecondary: TOKEN_COLORS.navy_600,\n};\n\nexport const SPACING: SpacingType = {\n ...defaultTheme.spacing,\n};\n\nexport const SHADOWS: ShadowsType = {\n ...defaultTheme.shadows,\n};\n\nexport const FONT_SIZES: FontSizesType = {\n ...defaultTheme.fontSizes,\n};\n\nexport const TYPOGRAPHY: TypographyType = {\n ...defaultTheme.typography,\n fontWeightHeadings: 600,\n};\n\nexport const rflTheme: ThemeType = {\n name: \"rfl\",\n avatar: AVATAR,\n breakpoint: BREAKPOINT,\n button: BUTTON,\n tokenColors: TOKEN_COLORS,\n colors: COLORS,\n spacing: SPACING,\n fontSizes: FONT_SIZES,\n siteConfig: SITE_CONFIG,\n typography: TYPOGRAPHY,\n shadows: SHADOWS,\n utilities: UTILITIES,\n};\n\nexport default rflTheme;\n"],"names":["
|
|
1
|
+
{"version":3,"file":"rfl.js","sources":["../../../src/themes/rfl.ts"],"sourcesContent":["import {\n type UtilitiesType,\n type SiteConfigType,\n type AvatarType,\n type ButtonType,\n type BreakPointType,\n type TokenColorsType,\n type ColorsType,\n type SpacingType,\n type FontSizesType,\n type TypographyType,\n type ThemeType,\n type ShadowsType,\n} from \"../types\";\n\nimport { crukTheme as defaultTheme } from \"./cruk\";\n\nexport const UTILITIES: UtilitiesType = {\n ...defaultTheme.utilities,\n};\n\nexport const SITE_CONFIG: SiteConfigType = {\n ...defaultTheme.siteConfig,\n logoSrc: \"https://rcl.assets.cancerresearchuk.org/images/logos/rfl-sl.svg\",\n};\n\nexport const AVATAR: AvatarType = {\n ...defaultTheme.avatar,\n path: `${SITE_CONFIG.assetPath}images/avatar/rfl/`,\n};\n\nexport const BUTTON: ButtonType = {\n ...defaultTheme.button,\n};\n\nexport const BREAKPOINT: BreakPointType = {\n ...defaultTheme.breakpoint,\n};\n\nexport const TOKEN_COLORS: TokenColorsType = {\n ...defaultTheme.tokenColors,\n};\n\nexport const COLORS: ColorsType = {\n ...defaultTheme.colors,\n textHeaderDefault: TOKEN_COLORS.navy_600,\n headerTaglineText: TOKEN_COLORS.navy_600,\n progressBar: TOKEN_COLORS.magenta_700,\n progressBarSecondary: TOKEN_COLORS.navy_600,\n};\n\nexport const SPACING: SpacingType = {\n ...defaultTheme.spacing,\n};\n\nexport const SHADOWS: ShadowsType = {\n ...defaultTheme.shadows,\n};\n\nexport const FONT_SIZES: FontSizesType = {\n ...defaultTheme.fontSizes,\n};\n\nexport const TYPOGRAPHY: TypographyType = {\n ...defaultTheme.typography,\n fontWeightHeadings: 600,\n};\n\nexport const rflTheme: ThemeType = {\n name: \"rfl\",\n avatar: AVATAR,\n breakpoint: BREAKPOINT,\n button: BUTTON,\n tokenColors: TOKEN_COLORS,\n colors: COLORS,\n spacing: SPACING,\n fontSizes: FONT_SIZES,\n siteConfig: SITE_CONFIG,\n typography: TYPOGRAPHY,\n shadows: SHADOWS,\n utilities: UTILITIES,\n};\n\nexport default rflTheme;\n"],"names":["defaultTheme","utilities","SITE_CONFIG","siteConfig","avatar","assetPath","button","breakpoint","TOKEN_COLORS","tokenColors","colors","navy_600","magenta_700","spacing","shadows","fontSizes","TYPOGRAPHY","typography","rflTheme"],"mappings":"sCAkBKA,EAAaC,UAGL,MAAAC,EAA8B,IACtCF,EAAaG,YAKbH,EAAaI,OACPF,EAAYG,UAIlBL,EAAaM,OAIbN,EAAaO,WAGL,MAAAC,EAAgC,IACxCR,EAAaS,aAIbT,EAAaU,OACGF,EAAaG,SACbH,EAAaG,SACnBH,EAAaI,YACJJ,EAAaG,SAIhCX,EAAaa,QAIbb,EAAac,QAIbd,EAAae,UAGL,MAAAC,EAA6B,IACrChB,EAAaiB,YAILC,EAAsB,CAUjCD,WAAYD"}
|
package/lib/src/themes/su2c.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{crukTheme as c}from"./cruk.js";c.utilities;const s={...c.siteConfig};c.avatar,s.assetPath,c.button,c.breakpoint;const a={...c.tokenColors,su2cOrange5:"#FF8E00",su2cOrange3:"#FFB04D",su2cOrange2:"#FFDAAD",su2cOrange1:"#FFF6EB",su2cBlack:"#231F20",su2cRed:"#EF4135"};c.colors,a.su2cOrange5,a.su2cOrange5,a.su2cBlack,a.su2cBlack,a.su2cBlack,a.su2cBlack,a.su2cOrange5,a.su2cRed,a.su2cOrange3,a.su2cRed,a.su2cOrange5,a.su2cRed,a.su2cOrange5,a.su2cRed,a.su2cOrange2,a.su2cOrange5,a.su2cRed,a.su2cBlack,a.su2cBlack,a.su2cBlack,a.su2cBlack,a.white,a.white,a.su2cOrange5,a.su2cBlack,a.su2cOrange5,a.su2cOrange5,a.su2cBlack,a.su2cOrange5,a.su2cOrange3,a.su2cBlack,a.su2cOrange3,a.grey_200,a.grey_600,a.grey_200,a.white,a.su2cOrange5,a.su2cOrange5,a.su2cOrange1,a.su2cOrange5,a.su2cOrange5,a.white,a.grey_200,a.grey_200,a.su2cOrange5,a.su2cOrange5,a.grey_200,c.spacing,c.shadows,c.fontSizes;const e={...c.typography,customFonts:[{family:"itc_avant_garde_pro",urlWoff:`${s.assetPath}fonts/itc_-_itcavantgardepro-bold-webfont.woff`,fontWeight:700}]},u={typography:e};export{s as SITE_CONFIG,a as TOKEN_COLORS,e as TYPOGRAPHY,u as default,u as su2cTheme};
|
|
2
2
|
//# sourceMappingURL=su2c.js.map
|