@cruk/cruk-react-components 1.4.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js +1 -1
- package/lib/cjs/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js.map +1 -1
- package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js +1 -1
- package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js.map +1 -1
- package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/safe.js +2 -0
- package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/safe.js.map +1 -0
- package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/tabUtils.js +1 -1
- package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/tabUtils.js.map +1 -1
- package/lib/cjs/node_modules/react-intersection-observer/react-intersection-observer.modern.mjs.js.map +1 -1
- package/lib/cjs/src/components/Button/styles.js +1 -1
- package/lib/cjs/src/components/Collapse/styles.js +1 -1
- package/lib/cjs/src/components/Fontface.js +1 -1
- package/lib/cjs/src/components/Header/styles.js +1 -1
- package/lib/cjs/src/components/Link/index.js +1 -1
- package/lib/cjs/src/components/Link/styles.js +1 -1
- package/lib/cjs/src/components/Pagination/styles.js +1 -1
- package/lib/cjs/src/components/index.js +1 -1
- package/lib/cjs/src/themes/bowelbabe.js +2 -0
- package/lib/cjs/src/themes/bowelbabe.js.map +1 -0
- package/lib/cjs/src/themes/cruk.js +1 -1
- package/lib/cjs/src/themes/su2c.js +1 -1
- package/lib/components/AddressLookup/AddressLookup.stories.d.ts +1 -0
- package/lib/components/Avatar/Avatar.stories.d.ts +5 -0
- package/lib/components/Badge/Badge.stories.d.ts +4 -0
- package/lib/components/Box/Box.stories.d.ts +3 -0
- package/lib/components/Button/Button.stories.d.ts +3 -0
- package/lib/components/Carousel/Carousel.stories.d.ts +1 -0
- package/lib/components/Checkbox/Checkbox.stories.d.ts +1 -0
- package/lib/components/Collapse/Collapse.stories.d.ts +3 -0
- package/lib/components/DateField/DateField.stories.d.ts +2 -0
- package/lib/components/ErrorText/ErrorText.stories.d.ts +1 -0
- package/lib/components/Footer/Footer.stories.d.ts +1 -0
- package/lib/components/Header/Header.stories.d.ts +1 -0
- package/lib/components/Heading/Heading.stories.d.ts +6 -0
- package/lib/components/IconFa/IconFa.stories.d.ts +3 -2
- package/lib/components/InfoBox/InfoBox.stories.d.ts +5 -3
- package/lib/components/InfoBox/InfoBox.test.cypress.d.ts +1 -0
- package/lib/components/LegendWrapper/LegendWrapper.stories.d.ts +1 -0
- package/lib/components/Link/Link.stories.d.ts +3 -0
- package/lib/components/Loader/Loader.stories.d.ts +1 -0
- package/lib/components/Modal/Modal.stories.d.ts +1 -0
- package/lib/components/Pagination/Pagination.stories.d.ts +1 -0
- package/lib/components/PopOver/Popover.stories.d.ts +2 -1
- package/lib/components/ProgressBar/ProgressBar.stories.d.ts +2 -0
- package/lib/components/Radio/Radio.stories.d.ts +1 -0
- package/lib/components/RadioConsent/Radio.stories.d.ts +1 -0
- package/lib/components/Select/Selelct.stories.d.ts +2 -0
- package/lib/components/Step/Step.stories.d.ts +1 -0
- package/lib/components/Text/Text.stories.d.ts +1 -0
- package/lib/components/TextAreaField/TextAreaField.stories.d.ts +2 -0
- package/lib/components/TextField/TextField.stories.d.ts +2 -0
- package/lib/components/Totaliser/Totaliser.stories.d.ts +5 -0
- package/lib/components/UserBlock/UserBlock.stories.d.ts +4 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/es/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js +1 -1
- package/lib/es/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js.map +1 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js +1 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js.map +1 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/safe.js +2 -0
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/safe.js.map +1 -0
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/tabUtils.js +1 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/tabUtils.js.map +1 -1
- package/lib/es/node_modules/react-intersection-observer/react-intersection-observer.modern.mjs.js.map +1 -1
- package/lib/es/src/components/Button/styles.js +1 -1
- package/lib/es/src/components/Collapse/styles.js +1 -1
- package/lib/es/src/components/Fontface.js +1 -1
- package/lib/es/src/components/Header/styles.js +1 -1
- package/lib/es/src/components/Link/index.js +1 -1
- package/lib/es/src/components/Link/styles.js +1 -1
- package/lib/es/src/components/Pagination/styles.js +1 -1
- package/lib/es/src/components/index.js +1 -1
- package/lib/es/src/themes/bowelbabe.js +2 -0
- package/lib/es/src/themes/bowelbabe.js.map +1 -0
- package/lib/es/src/themes/cruk.js +1 -1
- package/lib/es/src/themes/su2c.js +1 -1
- package/lib/themes/bowelbabe.d.ts +13 -0
- package/lib/types.d.ts +4 -0
- package/package.json +9 -26
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
import{safeProbe as t}from"./safe.js";var n=function(o){if(void 0===o&&(o=document),o&&o.activeElement){var e=o.activeElement;return e.shadowRoot?n(e.shadowRoot):e instanceof HTMLIFrameElement&&t((function(){return e.contentWindow.document}))?n(e.contentWindow.document):e}};export{n as getActiveElement};
|
|
2
2
|
//# sourceMappingURL=getActiveElement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getActiveElement.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/getActiveElement.js"],"sourcesContent":["/**\n * returns active element from document or from nested shadowdoms\n */\nexport var getActiveElement = function (inDocument) {\n
|
|
1
|
+
{"version":3,"file":"getActiveElement.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/getActiveElement.js"],"sourcesContent":["/**\n * returns active element from document or from nested shadowdoms\n */\nimport { safeProbe } from './safe';\nexport var getActiveElement = function (inDocument) {\n if (inDocument === void 0) { inDocument = document; }\n if (!inDocument || !inDocument.activeElement) {\n return undefined;\n }\n var activeElement = inDocument.activeElement;\n return (activeElement.shadowRoot\n ? getActiveElement(activeElement.shadowRoot)\n : activeElement instanceof HTMLIFrameElement && safeProbe(function () { return activeElement.contentWindow.document; })\n ? getActiveElement(activeElement.contentWindow.document)\n : activeElement);\n};\n"],"names":["getActiveElement","inDocument","document","activeElement","shadowRoot","HTMLIFrameElement","safeProbe","contentWindow"],"mappings":"sCAIU,IAACA,EAAmB,SAAUC,GAEpC,QADmB,IAAfA,IAAyBA,EAAaC,UACrCD,GAAeA,EAAWE,cAA/B,CAGA,IAAIA,EAAgBF,EAAWE,cAC/B,OAAQA,EAAcC,WAChBJ,EAAiBG,EAAcC,YAC/BD,aAAyBE,mBAAqBC,GAAU,WAAc,OAAOH,EAAcI,cAAcL,YACrGF,EAAiBG,EAAcI,cAAcL,UAC7CC,CANT,CAOL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safe.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/safe.js"],"sourcesContent":["export var safeProbe = function (cb) {\n try {\n return cb();\n }\n catch (e) {\n return undefined;\n }\n};\n"],"names":["safeProbe","cb","e"],"mappings":"AAAU,IAACA,EAAY,SAAUC,GAC7B,IACI,OAAOA,GAIV,CAFD,MAAOC,GACH,MACH,CACL"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{FOCUS_AUTO as n}from"../constants.js";import{toArray as t}from"./array.js";import{tabbables as r}from"./tabbables.js";var o=r.join(","),e="".concat(o,", [data-focus-guard]"),c=function(n,r){
|
|
1
|
+
import{FOCUS_AUTO as n}from"../constants.js";import{toArray as t}from"./array.js";import{tabbables as r}from"./tabbables.js";var o=r.join(","),e="".concat(o,", [data-focus-guard]"),c=function(n,r){return t((n.shadowRoot||n).children).reduce((function(n,t){return n.concat(t.matches(r?e:o)?[t]:[],c(t))}),[])},u=function(n,r){return n.reduce((function(n,e){var a,i=c(e,r),f=(a=[]).concat.apply(a,i.map((function(n){return function(n,t){var r;return n instanceof HTMLIFrameElement&&(null===(r=n.contentDocument)||void 0===r?void 0:r.body)?u([n.contentDocument.body],t):[n]}(n,r)})));return n.concat(f,e.parentNode?t(e.parentNode.querySelectorAll(o)).filter((function(n){return n===e})):[])}),[])},a=function(r){var o=r.querySelectorAll("[".concat(n,"]"));return t(o).map((function(n){return u([n])})).reduce((function(n,t){return n.concat(t)}),[])};export{u as getFocusables,a as getParentAutofocusables};
|
|
2
2
|
//# sourceMappingURL=tabUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabUtils.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/tabUtils.js"],"sourcesContent":["import { FOCUS_AUTO } from '../constants';\nimport { toArray } from './array';\nimport { tabbables } from './tabbables';\nvar queryTabbables = tabbables.join(',');\nvar queryGuardTabbables = \"\".concat(queryTabbables, \", [data-focus-guard]\");\nvar getFocusablesWithShadowDom = function (parent, withGuards) {\n
|
|
1
|
+
{"version":3,"file":"tabUtils.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/tabUtils.js"],"sourcesContent":["import { FOCUS_AUTO } from '../constants';\nimport { toArray } from './array';\nimport { tabbables } from './tabbables';\nvar queryTabbables = tabbables.join(',');\nvar queryGuardTabbables = \"\".concat(queryTabbables, \", [data-focus-guard]\");\nvar getFocusablesWithShadowDom = function (parent, withGuards) {\n return toArray((parent.shadowRoot || parent).children).reduce(function (acc, child) {\n return acc.concat(child.matches(withGuards ? queryGuardTabbables : queryTabbables) ? [child] : [], getFocusablesWithShadowDom(child));\n }, []);\n};\nvar getFocusablesWithIFrame = function (parent, withGuards) {\n var _a;\n // contentDocument of iframe will be null if current origin cannot access it\n if (parent instanceof HTMLIFrameElement && ((_a = parent.contentDocument) === null || _a === void 0 ? void 0 : _a.body)) {\n return getFocusables([parent.contentDocument.body], withGuards);\n }\n return [parent];\n};\nexport var getFocusables = function (parents, withGuards) {\n return parents.reduce(function (acc, parent) {\n var _a;\n var focusableWithShadowDom = getFocusablesWithShadowDom(parent, withGuards);\n var focusableWithIframes = (_a = []).concat.apply(_a, focusableWithShadowDom.map(function (node) { return getFocusablesWithIFrame(node, withGuards); }));\n return acc.concat(\n // add all tabbables inside and within shadow DOMs in DOM order\n focusableWithIframes, \n // add if node is tabbable itself\n parent.parentNode\n ? toArray(parent.parentNode.querySelectorAll(queryTabbables)).filter(function (node) { return node === parent; })\n : []);\n }, []);\n};\n/**\n * return a list of focusable nodes within an area marked as \"auto-focusable\"\n * @param parent\n */\nexport var getParentAutofocusables = function (parent) {\n var parentFocus = parent.querySelectorAll(\"[\".concat(FOCUS_AUTO, \"]\"));\n return toArray(parentFocus)\n .map(function (node) { return getFocusables([node]); })\n .reduce(function (acc, nodes) { return acc.concat(nodes); }, []);\n};\n"],"names":["queryTabbables","tabbables","join","queryGuardTabbables","concat","getFocusablesWithShadowDom","parent","withGuards","toArray","shadowRoot","children","reduce","acc","child","matches","getFocusables","parents","_a","focusableWithShadowDom","focusableWithIframes","apply","map","node","HTMLIFrameElement","contentDocument","body","getFocusablesWithIFrame","parentNode","querySelectorAll","filter","getParentAutofocusables","parentFocus","FOCUS_AUTO","nodes"],"mappings":"6HAGA,IAAIA,EAAiBC,EAAUC,KAAK,KAChCC,EAAsB,GAAGC,OAAOJ,EAAgB,wBAChDK,EAA6B,SAAUC,EAAQC,GAC/C,OAAOC,GAASF,EAAOG,YAAcH,GAAQI,UAAUC,QAAO,SAAUC,EAAKC,GACzE,OAAOD,EAAIR,OAAOS,EAAMC,QAAQP,EAAaJ,EAAsBH,GAAkB,CAACa,GAAS,GAAIR,EAA2BQ,GACjI,GAAE,GACP,EASWE,EAAgB,SAAUC,EAAST,GAC1C,OAAOS,EAAQL,QAAO,SAAUC,EAAKN,GACjC,IAAIW,EACAC,EAAyBb,EAA2BC,EAAQC,GAC5DY,GAAwBF,EAAK,IAAIb,OAAOgB,MAAMH,EAAIC,EAAuBG,KAAI,SAAUC,GAAQ,OAZ7E,SAAUhB,EAAQC,GAC5C,IAAIU,EAEJ,OAAIX,aAAkBiB,oBAAwD,QAAjCN,EAAKX,EAAOkB,uBAAoC,IAAPP,OAAgB,EAASA,EAAGQ,MACvGV,EAAc,CAACT,EAAOkB,gBAAgBC,MAAOlB,GAEjD,CAACD,EACZ,CAKkHoB,CAAwBJ,EAAMf,EAAc,KACtJ,OAAOK,EAAIR,OAEXe,EAEAb,EAAOqB,WACDnB,EAAQF,EAAOqB,WAAWC,iBAAiB5B,IAAiB6B,QAAO,SAAUP,GAAQ,OAAOA,IAAShB,CAAO,IAC5G,GACT,GAAE,GACP,EAKWwB,EAA0B,SAAUxB,GAC3C,IAAIyB,EAAczB,EAAOsB,iBAAiB,IAAIxB,OAAO4B,EAAY,MACjE,OAAOxB,EAAQuB,GACVV,KAAI,SAAUC,GAAQ,OAAOP,EAAc,CAACO,OAC5CX,QAAO,SAAUC,EAAKqB,GAAS,OAAOrB,EAAIR,OAAO6B,KAAW,GACrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-intersection-observer.modern.mjs.js","sources":["../../../../node_modules/react-intersection-observer/react-intersection-observer.modern.mjs"],"sourcesContent":["import * as React from 'react';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nconst observerMap = new Map();\nconst RootIds = new WeakMap();\nlet rootId = 0;\nlet unsupportedValue = undefined;\n/**\r\n * What should be the default behavior if the IntersectionObserver is unsupported?\r\n * Ideally the polyfill has been loaded, you can have the following happen:\r\n * - `undefined`: Throw an error\r\n * - `true` or `false`: Set the `inView` value to this regardless of intersection state\r\n * **/\n\nfunction defaultFallbackInView(inView) {\n unsupportedValue = inView;\n}\n/**\r\n * Generate a unique ID for the root element\r\n * @param root\r\n */\n\nfunction getRootId(root) {\n if (!root) return '0';\n if (RootIds.has(root)) return RootIds.get(root);\n rootId += 1;\n RootIds.set(root, rootId.toString());\n return RootIds.get(root);\n}\n/**\r\n * Convert the options to a string Id, based on the values.\r\n * Ensures we can reuse the same observer when observing elements with the same options.\r\n * @param options\r\n */\n\n\nfunction optionsToId(options) {\n return Object.keys(options).sort().filter(key => options[key] !== undefined).map(key => {\n return `${key}_${key === 'root' ? getRootId(options.root) : options[key]}`;\n }).toString();\n}\n\nfunction createObserver(options) {\n // Create a unique ID for this observer instance, based on the root, root margin and threshold.\n let id = optionsToId(options);\n let instance = observerMap.get(id);\n\n if (!instance) {\n // Create a map of elements this observer is going to observe. Each element has a list of callbacks that should be triggered, once it comes into view.\n const elements = new Map();\n let thresholds;\n const observer = new IntersectionObserver(entries => {\n entries.forEach(entry => {\n var _elements$get;\n\n // While it would be nice if you could just look at isIntersecting to determine if the component is inside the viewport, browsers can't agree on how to use it.\n // -Firefox ignores `threshold` when considering `isIntersecting`, so it will never be false again if `threshold` is > 0\n const inView = entry.isIntersecting && thresholds.some(threshold => entry.intersectionRatio >= threshold); // @ts-ignore support IntersectionObserver v2\n\n if (options.trackVisibility && typeof entry.isVisible === 'undefined') {\n // The browser doesn't support Intersection Observer v2, falling back to v1 behavior.\n // @ts-ignore\n entry.isVisible = inView;\n }\n\n (_elements$get = elements.get(entry.target)) == null ? void 0 : _elements$get.forEach(callback => {\n callback(inView, entry);\n });\n });\n }, options); // Ensure we have a valid thresholds array. If not, use the threshold from the options\n\n thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);\n instance = {\n id,\n observer,\n elements\n };\n observerMap.set(id, instance);\n }\n\n return instance;\n}\n/**\r\n * @param element - DOM Element to observe\r\n * @param callback - Callback function to trigger when intersection status changes\r\n * @param options - Intersection Observer options\r\n * @param fallbackInView - Fallback inView value.\r\n * @return Function - Cleanup function that should be triggered to unregister the observer\r\n */\n\n\nfunction observe(element, callback, options = {}, fallbackInView = unsupportedValue) {\n if (typeof window.IntersectionObserver === 'undefined' && fallbackInView !== undefined) {\n const bounds = element.getBoundingClientRect();\n callback(fallbackInView, {\n isIntersecting: fallbackInView,\n target: element,\n intersectionRatio: typeof options.threshold === 'number' ? options.threshold : 0,\n time: 0,\n boundingClientRect: bounds,\n intersectionRect: bounds,\n rootBounds: bounds\n });\n return () => {// Nothing to cleanup\n };\n } // An observer with the same options can be reused, so lets use this fact\n\n\n const {\n id,\n observer,\n elements\n } = createObserver(options); // Register the callback listener for this element\n\n let callbacks = elements.get(element) || [];\n\n if (!elements.has(element)) {\n elements.set(element, callbacks);\n }\n\n callbacks.push(callback);\n observer.observe(element);\n return function unobserve() {\n // Remove the callback from the callback list\n callbacks.splice(callbacks.indexOf(callback), 1);\n\n if (callbacks.length === 0) {\n // No more callback exists for element, so destroy it\n elements.delete(element);\n observer.unobserve(element);\n }\n\n if (elements.size === 0) {\n // No more elements are being observer by this instance, so destroy it\n observer.disconnect();\n observerMap.delete(id);\n }\n };\n}\n\nconst _excluded = [\"children\", \"as\", \"triggerOnce\", \"threshold\", \"root\", \"rootMargin\", \"onChange\", \"skip\", \"trackVisibility\", \"delay\", \"initialInView\", \"fallbackInView\"];\n\nfunction isPlainChildren(props) {\n return typeof props.children !== 'function';\n}\n/**\r\n ## Render props\r\n\n To use the `<InView>` component, you pass it a function. It will be called\r\n whenever the state changes, with the new value of `inView`. In addition to the\r\n `inView` prop, children also receive a `ref` that should be set on the\r\n containing DOM element. This is the element that the IntersectionObserver will\r\n monitor.\r\n\n If you need it, you can also access the\r\n [`IntersectionObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry)\r\n on `entry`, giving you access to all the details about the current intersection\r\n state.\r\n\n ```jsx\r\n import { InView } from 'react-intersection-observer';\r\n\n const Component = () => (\r\n <InView>\r\n {({ inView, ref, entry }) => (\r\n <div ref={ref}>\r\n <h2>{`Header inside viewport ${inView}.`}</h2>\r\n </div>\r\n )}\r\n </InView>\r\n );\r\n\n export default Component;\r\n ```\r\n\n ## Plain children\r\n\n You can pass any element to the `<InView />`, and it will handle creating the\r\n wrapping DOM element. Add a handler to the `onChange` method, and control the\r\n state in your own component. Any extra props you add to `<InView>` will be\r\n passed to the HTML element, allowing you set the `className`, `style`, etc.\r\n\n ```jsx\r\n import { InView } from 'react-intersection-observer';\r\n\n const Component = () => (\r\n <InView as=\"div\" onChange={(inView, entry) => console.log('Inview:', inView)}>\r\n <h2>Plain children are always rendered. Use onChange to monitor state.</h2>\r\n </InView>\r\n );\r\n\n export default Component;\r\n ```\r\n */\n\n\nclass InView extends React.Component {\n constructor(props) {\n super(props);\n this.node = null;\n this._unobserveCb = null;\n\n this.handleNode = node => {\n if (this.node) {\n // Clear the old observer, before we start observing a new element\n this.unobserve();\n\n if (!node && !this.props.triggerOnce && !this.props.skip) {\n // Reset the state if we get a new node, and we aren't ignoring updates\n this.setState({\n inView: !!this.props.initialInView,\n entry: undefined\n });\n }\n }\n\n this.node = node ? node : null;\n this.observeNode();\n };\n\n this.handleChange = (inView, entry) => {\n if (inView && this.props.triggerOnce) {\n // If `triggerOnce` is true, we should stop observing the element.\n this.unobserve();\n }\n\n if (!isPlainChildren(this.props)) {\n // Store the current State, so we can pass it to the children in the next render update\n // There's no reason to update the state for plain children, since it's not used in the rendering.\n this.setState({\n inView,\n entry\n });\n }\n\n if (this.props.onChange) {\n // If the user is actively listening for onChange, always trigger it\n this.props.onChange(inView, entry);\n }\n };\n\n this.state = {\n inView: !!props.initialInView,\n entry: undefined\n };\n }\n\n componentDidUpdate(prevProps) {\n // If a IntersectionObserver option changed, reinit the observer\n if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) {\n this.unobserve();\n this.observeNode();\n }\n }\n\n componentWillUnmount() {\n this.unobserve();\n this.node = null;\n }\n\n observeNode() {\n if (!this.node || this.props.skip) return;\n const {\n threshold,\n root,\n rootMargin,\n trackVisibility,\n delay,\n fallbackInView\n } = this.props;\n this._unobserveCb = observe(this.node, this.handleChange, {\n threshold,\n root,\n rootMargin,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n }, fallbackInView);\n }\n\n unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n\n this._unobserveCb = null;\n }\n }\n\n render() {\n if (!isPlainChildren(this.props)) {\n const {\n inView,\n entry\n } = this.state;\n return this.props.children({\n inView,\n entry,\n ref: this.handleNode\n });\n }\n\n const _this$props = this.props,\n {\n children,\n as\n } = _this$props,\n props = _objectWithoutPropertiesLoose(_this$props, _excluded);\n\n return React.createElement(as || 'div', _extends({\n ref: this.handleNode\n }, props), children);\n }\n\n}\n\n/**\r\n * React Hooks make it easy to monitor the `inView` state of your components. Call\r\n * the `useInView` hook with the (optional) [options](#options) you need. It will\r\n * return an array containing a `ref`, the `inView` status and the current\r\n * [`entry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry).\r\n * Assign the `ref` to the DOM element you want to monitor, and the hook will\r\n * report the status.\r\n *\r\n * @example\r\n * ```jsx\r\n * import React from 'react';\r\n * import { useInView } from 'react-intersection-observer';\r\n *\r\n * const Component = () => {\r\n * const { ref, inView, entry } = useInView({\r\n * threshold: 0,\r\n * });\r\n *\r\n * return (\r\n * <div ref={ref}>\r\n * <h2>{`Header inside viewport ${inView}.`}</h2>\r\n * </div>\r\n * );\r\n * };\r\n * ```\r\n */\n\nfunction useInView({\n threshold,\n delay,\n trackVisibility,\n rootMargin,\n root,\n triggerOnce,\n skip,\n initialInView,\n fallbackInView,\n onChange\n} = {}) {\n var _state$entry;\n\n const [ref, setRef] = React.useState(null);\n const callback = React.useRef();\n const [state, setState] = React.useState({\n inView: !!initialInView,\n entry: undefined\n }); // Store the onChange callback in a `ref`, so we can access the latest instance\n // inside the `useEffect`, but without triggering a rerender.\n\n callback.current = onChange;\n React.useEffect(() => {\n // Ensure we have node ref, and that we shouldn't skip observing\n if (skip || !ref) return;\n let unobserve;\n unobserve = observe(ref, (inView, entry) => {\n setState({\n inView,\n entry\n });\n if (callback.current) callback.current(inView, entry);\n\n if (entry.isIntersecting && triggerOnce && unobserve) {\n // If it should only trigger once, unobserve the element after it's inView\n unobserve();\n unobserve = undefined;\n }\n }, {\n root,\n rootMargin,\n threshold,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n }, fallbackInView);\n return () => {\n if (unobserve) {\n unobserve();\n }\n };\n }, // We break the rule here, because we aren't including the actual `threshold` variable\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [// If the threshold is an array, convert it to a string, so it won't change between renders.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n Array.isArray(threshold) ? threshold.toString() : threshold, ref, root, rootMargin, triggerOnce, skip, trackVisibility, fallbackInView, delay]);\n const entryTarget = (_state$entry = state.entry) == null ? void 0 : _state$entry.target;\n React.useEffect(() => {\n if (!ref && entryTarget && !triggerOnce && !skip) {\n // If we don't have a node ref, then reset the state (unless the hook is set to only `triggerOnce` or `skip`)\n // This ensures we correctly reflect the current state - If you aren't observing anything, then nothing is inView\n setState({\n inView: !!initialInView,\n entry: undefined\n });\n }\n }, [ref, entryTarget, triggerOnce, skip, initialInView]);\n const result = [setRef, state.inView, state.entry]; // Support object destructuring, by adding the specific values.\n\n result.ref = result[0];\n result.inView = result[1];\n result.entry = result[2];\n return result;\n}\n\nexport { InView, defaultFallbackInView, observe, useInView };\n//# sourceMappingURL=react-intersection-observer.modern.mjs.map\n"],"names":["_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","observerMap","Map","RootIds","WeakMap","unsupportedValue","rootId","optionsToId","options","keys","sort","filter","undefined","map","root","has","set","toString","get","observe","element","callback","fallbackInView","window","IntersectionObserver","bounds","getBoundingClientRect","isIntersecting","intersectionRatio","threshold","time","boundingClientRect","intersectionRect","rootBounds","id","observer","elements","instance","thresholds","entries","forEach","entry","_elements$get","inView","some","trackVisibility","isVisible","Array","isArray","createObserver","callbacks","push","splice","indexOf","delete","unobserve","size","disconnect","_excluded","isPlainChildren","props","children","InView","React","Component","constructor","super","node","_unobserveCb","handleNode","triggerOnce","skip","setState","initialInView","observeNode","handleChange","onChange","state","componentDidUpdate","prevProps","rootMargin","delay","componentWillUnmount","render","ref","_this$props","as","excluded","sourceKeys","_objectWithoutPropertiesLoose","createElement"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"react-intersection-observer.modern.mjs.js","sources":["../../../../node_modules/react-intersection-observer/react-intersection-observer.modern.mjs"],"sourcesContent":["import * as React from 'react';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nconst observerMap = new Map();\nconst RootIds = new WeakMap();\nlet rootId = 0;\nlet unsupportedValue = undefined;\n/**\r\n * What should be the default behavior if the IntersectionObserver is unsupported?\r\n * Ideally the polyfill has been loaded, you can have the following happen:\r\n * - `undefined`: Throw an error\r\n * - `true` or `false`: Set the `inView` value to this regardless of intersection state\r\n * **/\n\nfunction defaultFallbackInView(inView) {\n unsupportedValue = inView;\n}\n/**\r\n * Generate a unique ID for the root element\r\n * @param root\r\n */\n\nfunction getRootId(root) {\n if (!root) return '0';\n if (RootIds.has(root)) return RootIds.get(root);\n rootId += 1;\n RootIds.set(root, rootId.toString());\n return RootIds.get(root);\n}\n/**\r\n * Convert the options to a string Id, based on the values.\r\n * Ensures we can reuse the same observer when observing elements with the same options.\r\n * @param options\r\n */\n\n\nfunction optionsToId(options) {\n return Object.keys(options).sort().filter(key => options[key] !== undefined).map(key => {\n return `${key}_${key === 'root' ? getRootId(options.root) : options[key]}`;\n }).toString();\n}\n\nfunction createObserver(options) {\n // Create a unique ID for this observer instance, based on the root, root margin and threshold.\n let id = optionsToId(options);\n let instance = observerMap.get(id);\n\n if (!instance) {\n // Create a map of elements this observer is going to observe. Each element has a list of callbacks that should be triggered, once it comes into view.\n const elements = new Map();\n let thresholds;\n const observer = new IntersectionObserver(entries => {\n entries.forEach(entry => {\n var _elements$get;\n\n // While it would be nice if you could just look at isIntersecting to determine if the component is inside the viewport, browsers can't agree on how to use it.\n // -Firefox ignores `threshold` when considering `isIntersecting`, so it will never be false again if `threshold` is > 0\n const inView = entry.isIntersecting && thresholds.some(threshold => entry.intersectionRatio >= threshold); // @ts-ignore support IntersectionObserver v2\n\n if (options.trackVisibility && typeof entry.isVisible === 'undefined') {\n // The browser doesn't support Intersection Observer v2, falling back to v1 behavior.\n // @ts-ignore\n entry.isVisible = inView;\n }\n\n (_elements$get = elements.get(entry.target)) == null ? void 0 : _elements$get.forEach(callback => {\n callback(inView, entry);\n });\n });\n }, options); // Ensure we have a valid thresholds array. If not, use the threshold from the options\n\n thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);\n instance = {\n id,\n observer,\n elements\n };\n observerMap.set(id, instance);\n }\n\n return instance;\n}\n/**\r\n * @param element - DOM Element to observe\r\n * @param callback - Callback function to trigger when intersection status changes\r\n * @param options - Intersection Observer options\r\n * @param fallbackInView - Fallback inView value.\r\n * @return Function - Cleanup function that should be triggered to unregister the observer\r\n */\n\n\nfunction observe(element, callback, options = {}, fallbackInView = unsupportedValue) {\n if (typeof window.IntersectionObserver === 'undefined' && fallbackInView !== undefined) {\n const bounds = element.getBoundingClientRect();\n callback(fallbackInView, {\n isIntersecting: fallbackInView,\n target: element,\n intersectionRatio: typeof options.threshold === 'number' ? options.threshold : 0,\n time: 0,\n boundingClientRect: bounds,\n intersectionRect: bounds,\n rootBounds: bounds\n });\n return () => {// Nothing to cleanup\n };\n } // An observer with the same options can be reused, so lets use this fact\n\n\n const {\n id,\n observer,\n elements\n } = createObserver(options); // Register the callback listener for this element\n\n let callbacks = elements.get(element) || [];\n\n if (!elements.has(element)) {\n elements.set(element, callbacks);\n }\n\n callbacks.push(callback);\n observer.observe(element);\n return function unobserve() {\n // Remove the callback from the callback list\n callbacks.splice(callbacks.indexOf(callback), 1);\n\n if (callbacks.length === 0) {\n // No more callback exists for element, so destroy it\n elements.delete(element);\n observer.unobserve(element);\n }\n\n if (elements.size === 0) {\n // No more elements are being observer by this instance, so destroy it\n observer.disconnect();\n observerMap.delete(id);\n }\n };\n}\n\nconst _excluded = [\"children\", \"as\", \"triggerOnce\", \"threshold\", \"root\", \"rootMargin\", \"onChange\", \"skip\", \"trackVisibility\", \"delay\", \"initialInView\", \"fallbackInView\"];\n\nfunction isPlainChildren(props) {\n return typeof props.children !== 'function';\n}\n/**\r\n ## Render props\r\n\n To use the `<InView>` component, you pass it a function. It will be called\r\n whenever the state changes, with the new value of `inView`. In addition to the\r\n `inView` prop, children also receive a `ref` that should be set on the\r\n containing DOM element. This is the element that the IntersectionObserver will\r\n monitor.\r\n\n If you need it, you can also access the\r\n [`IntersectionObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry)\r\n on `entry`, giving you access to all the details about the current intersection\r\n state.\r\n\n ```jsx\r\n import { InView } from 'react-intersection-observer';\r\n\n const Component = () => (\r\n <InView>\r\n {({ inView, ref, entry }) => (\r\n <div ref={ref}>\r\n <h2>{`Header inside viewport ${inView}.`}</h2>\r\n </div>\r\n )}\r\n </InView>\r\n );\r\n\n export default Component;\r\n ```\r\n\n ## Plain children\r\n\n You can pass any element to the `<InView />`, and it will handle creating the\r\n wrapping DOM element. Add a handler to the `onChange` method, and control the\r\n state in your own component. Any extra props you add to `<InView>` will be\r\n passed to the HTML element, allowing you set the `className`, `style`, etc.\r\n\n ```jsx\r\n import { InView } from 'react-intersection-observer';\r\n\n const Component = () => (\r\n <InView as=\"div\" onChange={(inView, entry) => console.log('Inview:', inView)}>\r\n <h2>Plain children are always rendered. Use onChange to monitor state.</h2>\r\n </InView>\r\n );\r\n\n export default Component;\r\n ```\r\n */\n\n\nclass InView extends React.Component {\n constructor(props) {\n super(props);\n this.node = null;\n this._unobserveCb = null;\n\n this.handleNode = node => {\n if (this.node) {\n // Clear the old observer, before we start observing a new element\n this.unobserve();\n\n if (!node && !this.props.triggerOnce && !this.props.skip) {\n // Reset the state if we get a new node, and we aren't ignoring updates\n this.setState({\n inView: !!this.props.initialInView,\n entry: undefined\n });\n }\n }\n\n this.node = node ? node : null;\n this.observeNode();\n };\n\n this.handleChange = (inView, entry) => {\n if (inView && this.props.triggerOnce) {\n // If `triggerOnce` is true, we should stop observing the element.\n this.unobserve();\n }\n\n if (!isPlainChildren(this.props)) {\n // Store the current State, so we can pass it to the children in the next render update\n // There's no reason to update the state for plain children, since it's not used in the rendering.\n this.setState({\n inView,\n entry\n });\n }\n\n if (this.props.onChange) {\n // If the user is actively listening for onChange, always trigger it\n this.props.onChange(inView, entry);\n }\n };\n\n this.state = {\n inView: !!props.initialInView,\n entry: undefined\n };\n }\n\n componentDidUpdate(prevProps) {\n // If a IntersectionObserver option changed, reinit the observer\n if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) {\n this.unobserve();\n this.observeNode();\n }\n }\n\n componentWillUnmount() {\n this.unobserve();\n this.node = null;\n }\n\n observeNode() {\n if (!this.node || this.props.skip) return;\n const {\n threshold,\n root,\n rootMargin,\n trackVisibility,\n delay,\n fallbackInView\n } = this.props;\n this._unobserveCb = observe(this.node, this.handleChange, {\n threshold,\n root,\n rootMargin,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n }, fallbackInView);\n }\n\n unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n\n this._unobserveCb = null;\n }\n }\n\n render() {\n if (!isPlainChildren(this.props)) {\n const {\n inView,\n entry\n } = this.state;\n return this.props.children({\n inView,\n entry,\n ref: this.handleNode\n });\n }\n\n const _this$props = this.props,\n {\n children,\n as\n } = _this$props,\n props = _objectWithoutPropertiesLoose(_this$props, _excluded);\n\n return React.createElement(as || 'div', _extends({\n ref: this.handleNode\n }, props), children);\n }\n\n}\n\n/**\r\n * React Hooks make it easy to monitor the `inView` state of your components. Call\r\n * the `useInView` hook with the (optional) [options](#options) you need. It will\r\n * return an array containing a `ref`, the `inView` status and the current\r\n * [`entry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry).\r\n * Assign the `ref` to the DOM element you want to monitor, and the hook will\r\n * report the status.\r\n *\r\n * @example\r\n * ```jsx\r\n * import React from 'react';\r\n * import { useInView } from 'react-intersection-observer';\r\n *\r\n * const Component = () => {\r\n * const { ref, inView, entry } = useInView({\r\n * threshold: 0,\r\n * });\r\n *\r\n * return (\r\n * <div ref={ref}>\r\n * <h2>{`Header inside viewport ${inView}.`}</h2>\r\n * </div>\r\n * );\r\n * };\r\n * ```\r\n */\n\nfunction useInView({\n threshold,\n delay,\n trackVisibility,\n rootMargin,\n root,\n triggerOnce,\n skip,\n initialInView,\n fallbackInView,\n onChange\n} = {}) {\n var _state$entry;\n\n const [ref, setRef] = React.useState(null);\n const callback = React.useRef();\n const [state, setState] = React.useState({\n inView: !!initialInView,\n entry: undefined\n }); // Store the onChange callback in a `ref`, so we can access the latest instance\n // inside the `useEffect`, but without triggering a rerender.\n\n callback.current = onChange;\n React.useEffect(() => {\n // Ensure we have node ref, and that we shouldn't skip observing\n if (skip || !ref) return;\n let unobserve;\n unobserve = observe(ref, (inView, entry) => {\n setState({\n inView,\n entry\n });\n if (callback.current) callback.current(inView, entry);\n\n if (entry.isIntersecting && triggerOnce && unobserve) {\n // If it should only trigger once, unobserve the element after it's inView\n unobserve();\n unobserve = undefined;\n }\n }, {\n root,\n rootMargin,\n threshold,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n }, fallbackInView);\n return () => {\n if (unobserve) {\n unobserve();\n }\n };\n }, // We break the rule here, because we aren't including the actual `threshold` variable\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [// If the threshold is an array, convert it to a string, so it won't change between renders.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n Array.isArray(threshold) ? threshold.toString() : threshold, ref, root, rootMargin, triggerOnce, skip, trackVisibility, fallbackInView, delay]);\n const entryTarget = (_state$entry = state.entry) == null ? void 0 : _state$entry.target;\n const previousEntryTarget = React.useRef();\n\n if (!ref && entryTarget && !triggerOnce && !skip && previousEntryTarget.current !== entryTarget) {\n // If we don't have a node ref, then reset the state (unless the hook is set to only `triggerOnce` or `skip`)\n // This ensures we correctly reflect the current state - If you aren't observing anything, then nothing is inView\n previousEntryTarget.current = entryTarget;\n setState({\n inView: !!initialInView,\n entry: undefined\n });\n }\n\n const result = [setRef, state.inView, state.entry]; // Support object destructuring, by adding the specific values.\n\n result.ref = result[0];\n result.inView = result[1];\n result.entry = result[2];\n return result;\n}\n\nexport { InView, defaultFallbackInView, observe, useInView };\n//# sourceMappingURL=react-intersection-observer.modern.mjs.map\n"],"names":["_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","observerMap","Map","RootIds","WeakMap","unsupportedValue","rootId","optionsToId","options","keys","sort","filter","undefined","map","root","has","set","toString","get","observe","element","callback","fallbackInView","window","IntersectionObserver","bounds","getBoundingClientRect","isIntersecting","intersectionRatio","threshold","time","boundingClientRect","intersectionRect","rootBounds","id","observer","elements","instance","thresholds","entries","forEach","entry","_elements$get","inView","some","trackVisibility","isVisible","Array","isArray","createObserver","callbacks","push","splice","indexOf","delete","unobserve","size","disconnect","_excluded","isPlainChildren","props","children","InView","React","Component","constructor","super","node","_unobserveCb","handleNode","triggerOnce","skip","setState","initialInView","observeNode","handleChange","onChange","state","componentDidUpdate","prevProps","rootMargin","delay","componentWillUnmount","render","ref","_this$props","as","excluded","sourceKeys","_objectWithoutPropertiesLoose","createElement"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o,{css as r}from"styled-components";var t,e,c,i,a,l,d,u,s="3rem",b="4rem",m=o.span(t||(t=n(["\n margin-left: ",";\n &:first-of-type {\n margin-left: 0;\n }\n"],["\n margin-left: ",";\n &:first-of-type {\n margin-left: 0;\n }\n"])),(function(n){return n.theme.spacing.xxs})),h=o.button(u||(u=n(["\n box-sizing: border-box;\n min-height: ",";\n height: min-content;\n display: inline-block;\n vertical-align: middle;\n padding: ",";\n width: ",";\n min-width: ",";\n\n border-radius: ",";\n border-style: solid;\n border-width: ",";\n\n transition: color 0.2s ease, background-color 0.2s ease,\n border-color 0.2s ease;\n\n cursor: pointer;\n font-size: ",";\n font-family: ",";\n font-weight: ",";\n text-align: center;\n text-transform: ",";\n text-decoration: ",";\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n \n ","\n\n ","\n\n ","\n"],["\n box-sizing: border-box;\n min-height: ",";\n height: min-content;\n display: inline-block;\n vertical-align: middle;\n padding: ",";\n width: ",";\n min-width: ",";\n\n border-radius: ",";\n border-style: solid;\n border-width: ",";\n\n transition: color 0.2s ease, background-color 0.2s ease,\n border-color 0.2s ease;\n\n cursor: pointer;\n font-size: ",";\n font-family: ",";\n font-weight: ",";\n text-align: center;\n text-transform: ",";\n text-decoration: ",";\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n \n ","\n\n ","\n\n ","\n"])),s,(function(n){var o=n.theme;return n.isIconButton?"0":"calc( (".concat(s," - ( ").concat(o.button.buttonBorderThickness," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.
|
|
1
|
+
import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o,{css as r}from"styled-components";var t,e,c,i,a,l,d,u,s="3rem",b="4rem",m=o.span(t||(t=n(["\n margin-left: ",";\n &:first-of-type {\n margin-left: 0;\n }\n"],["\n margin-left: ",";\n &:first-of-type {\n margin-left: 0;\n }\n"])),(function(n){return n.theme.spacing.xxs})),h=o.button(u||(u=n(["\n box-sizing: border-box;\n min-height: ",";\n height: min-content;\n display: inline-block;\n vertical-align: middle;\n padding: ",";\n width: ",";\n min-width: ",";\n\n border-radius: ",";\n border-style: solid;\n border-width: ",";\n\n transition: color 0.2s ease, background-color 0.2s ease,\n border-color 0.2s ease;\n\n cursor: pointer;\n font-size: ",";\n font-family: ",";\n font-weight: ",";\n text-align: center;\n text-transform: ",";\n text-decoration: ",";\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n \n ","\n\n ","\n\n ","\n"],["\n box-sizing: border-box;\n min-height: ",";\n height: min-content;\n display: inline-block;\n vertical-align: middle;\n padding: ",";\n width: ",";\n min-width: ",";\n\n border-radius: ",";\n border-style: solid;\n border-width: ",";\n\n transition: color 0.2s ease, background-color 0.2s ease,\n border-color 0.2s ease;\n\n cursor: pointer;\n font-size: ",";\n font-family: ",";\n font-weight: ",";\n text-align: center;\n text-transform: ",";\n text-decoration: ",";\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n \n ","\n\n ","\n\n ","\n"])),s,(function(n){var o=n.theme;return n.isIconButton?"0":"calc( (".concat(s," - ( ").concat(o.button.buttonBorderThickness," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.button.horizontalPadding)}),(function(n){return n.isIconButton?"".concat(s):"auto"}),(function(n){return n.isIconButton?"".concat(s):"auto"}),(function(n){return n.theme.button.borderRadius}),(function(n){return n.theme.button.buttonBorderThickness}),(function(n){return n.theme.fontSizes.m}),(function(n){return n.theme.typography.fontFamilyHeadings}),(function(n){return n.theme.typography.fontWeightMedium}),(function(n){return n.theme.button.textTransform}),(function(n){return n.theme.button.textDecoration}),(function(o){return"primary"===o.appearance&&r(e||(e=n(["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "],["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "])),o.theme.colors.buttonPrimaryBackground,o.theme.colors.buttonPrimaryBorder,o.theme.colors.buttonPrimaryText,o.theme.colors.buttonPrimaryBackgroundHover,o.theme.colors.buttonPrimaryBorderHover,o.theme.colors.buttonPrimaryTextHover,o.theme.colors.buttonPrimaryDisabledBackground,o.theme.colors.buttonPrimaryDisabledText,o.theme.colors.buttonPrimaryDisabledBorder)}),(function(o){return"secondary"===o.appearance&&r(c||(c=n(["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "],["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "])),o.theme.colors.buttonSecondaryBackground,o.theme.colors.buttonSecondaryBorder,o.theme.colors.buttonSecondaryText,o.theme.colors.buttonSecondaryBackgroundHover,o.theme.colors.buttonSecondaryBorderHover,o.theme.colors.buttonSecondaryTextHover,o.theme.colors.buttonSecondaryDisabledBackground,o.theme.colors.buttonSecondaryDisabledText,o.theme.colors.buttonSecondaryDisabledBorder)}),(function(o){return"tertiary"===o.appearance&&r(i||(i=n(["\n display: inline-block;\n padding: 0;\n border: 0px;\n background-color: rgba(255, 255, 255, 0);\n transition: color 0.2s ease;\n color: ",";\n :focus,\n :hover {\n color: ",";\n }\n :disabled {\n cursor: not-allowed;\n background-color: transparent;\n color: "," !important;\n border-color: transparent;\n }\n "],["\n display: inline-block;\n padding: 0;\n border: 0px;\n background-color: rgba(255, 255, 255, 0);\n transition: color 0.2s ease;\n color: ",";\n :focus,\n :hover {\n color: ",";\n }\n :disabled {\n cursor: not-allowed;\n background-color: transparent;\n color: "," !important;\n border-color: transparent;\n }\n "])),o.theme.colors.buttonTertiaryText,o.theme.colors.buttonTertiaryTextHover,o.theme.colors.buttonTertiaryDisabledText)}),(function(o){return"l"===o.size&&r(a||(a=n(["\n min-height: ",";\n border-radius: ",";\n padding: ",";\n min-width: ",";\n height: ",";\n "],["\n min-height: ",";\n border-radius: ",";\n padding: ",";\n min-width: ",";\n height: ",";\n "])),b,(function(n){return n.theme.button.borderRadiusLarge}),(function(n){var o=n.theme;return n.isIconButton?"0":"calc( (".concat(b," - ( ").concat(o.button.buttonBorderThickness," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.m)}),(function(n){return n.isIconButton?"".concat(b):"auto"}),(function(n){return n.isIconButton?"".concat(b):"min-content"}))}),(function(o){return o.full&&r(l||(l=n(["\n width: 100%;\n "],["\n width: 100%;\n "])))}),(function(o){return o.css&&r(d||(d=n(["\n ","\n "],["\n ","\n "])),o.css)}));export{m as Spacer,h as StyledButton};
|
|
2
2
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import t from"styled-components";import{Button as o}from"../Button/index.js";import i from"../IconFa/index.js";var e,r,a,s,l=.5,f=t(i)(e||(e=n(["\n transform: ",";\n transition-duration: ","s;\n"],["\n transform: ",";\n transition-duration: ","s;\n"])),(function(n){return n.open?"translateY(0.1em) scaleY(-1)":"initial"}),.5),m=t(o)(r||(r=n(["\n display: flex;\n color: ",";\n font-size: ",";\n font-family: ",";\n font-weight: normal;\n margin-bottom: 0;\n height: initial;\n text-decoration: none;\n text-align: left;\n border-radius: 0;\n :hover,\n :focus {\n color: ",";\n }\n"],["\n display: flex;\n color: ",";\n font-size: ",";\n font-family: ",";\n font-weight: normal;\n margin-bottom: 0;\n height: initial;\n text-decoration: none;\n text-align: left;\n border-radius: 0;\n :hover,\n :focus {\n color: ",";\n }\n"])),(function(n){var t=n.theme.colors,o=n.textColor;return o&&void 0!==t[o]?t[o]:o||t.
|
|
1
|
+
import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import t from"styled-components";import{Button as o}from"../Button/index.js";import i from"../IconFa/index.js";var e,r,a,s,l=.5,f=t(i)(e||(e=n(["\n transform: ",";\n transition-duration: ","s;\n"],["\n transform: ",";\n transition-duration: ","s;\n"])),(function(n){return n.open?"translateY(0.1em) scaleY(-1)":"initial"}),.5),m=t(o)(r||(r=n(["\n display: flex;\n color: ",";\n font-size: ",";\n font-family: ",";\n font-weight: normal;\n margin-bottom: 0;\n height: initial;\n text-decoration: none;\n text-align: left;\n border-radius: 0;\n :hover,\n :focus {\n color: ",";\n }\n"],["\n display: flex;\n color: ",";\n font-size: ",";\n font-family: ",";\n font-weight: normal;\n margin-bottom: 0;\n height: initial;\n text-decoration: none;\n text-align: left;\n border-radius: 0;\n :hover,\n :focus {\n color: ",";\n }\n"])),(function(n){var t=n.theme.colors,o=n.textColor;return o&&void 0!==t[o]?t[o]:o||t.collapseHeaderColor}),(function(n){var t=n.theme,o=t.fontSizes,i=t.fontSizes.m,e=n.textSize;return e?o[e]:i}),(function(n){var t=n.theme;return n.textFontFamily||t.typography.fontFamilyBase}),(function(n){var t=n.theme.colors,o=n.textColor;return o&&void 0!==t[o]?t[o]:o||t.collapseHeaderColor})),d=t.div(a||(a=n(["\n margin: 0;\n transition: ","s ease;\n height: ",";\n visibility: ",";\n overflow: hidden;\n & > p {\n margin-top: 0;\n }\n"],["\n margin: 0;\n transition: ","s ease;\n height: ",";\n visibility: ",";\n overflow: hidden;\n & > p {\n margin-top: 0;\n }\n"])),.5,(function(n){return n.contentHeight}),(function(n){return n.openStatus?"visible":"hidden"})),c=t.div(s||(s=n(["\n cursor: pointer;\n"],["\n cursor: pointer;\n"])));export{d as CollapseContent,c as CustomHeader,m as DefaultHeader,f as FlippingIcon,l as transitionDurationSeconds};
|
|
2
2
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"../themes/cruk.js";import n from"../themes/su2c.js";var
|
|
1
|
+
import o from"../themes/cruk.js";import n from"../themes/su2c.js";import t from"../themes/bowelbabe.js";var f=function(o){return o.map((function(o){return"\n @font-face {\n font-family: ".concat(o.family,";\n src: ").concat((null==o?void 0:o.urlWoff2)?'url("'.concat(o.urlWoff2,"\") format('woff2')"):"").concat(o.urlWoff&&(null==o?void 0:o.urlWoff2)?", ":"","\n ").concat((null==o?void 0:o.urlWoff)?'url("'.concat(o.urlWoff,"\") format('woff')"):"",";\n font-weight: normal;\n font-style: normal;\n font-display: fallback;\n }\n ")})).join("")},r="\n".concat(f(o.typography.customFonts),"\n").concat(f(n.typography.customFonts),"\n").concat(f(t.typography.customFonts),"\n");export{r as default,r as fontFaceStyleString};
|
|
2
2
|
//# sourceMappingURL=Fontface.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import t from"styled-components";import i from"../../themes/cruk.js";var e,o,a,r,h,d,s,u,l,c,p,f="120px",g="72px",m=i.spacing.
|
|
1
|
+
import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import t from"styled-components";import i from"../../themes/cruk.js";var e,o,a,r,h,d,s,u,l,c,p,f="120px",g="72px",m=i.spacing.xs,x="40px",y="0.2s",w=t.header(e||(e=n(["\n box-sizing: border-box;\n position: relative;\n width: 100%;\n background-color: ",";\n z-index: 9998;\n"],["\n box-sizing: border-box;\n position: relative;\n width: 100%;\n background-color: ",";\n z-index: 9998;\n"])),(function(n){return n.theme.colors.headerBackground})),b=t.div(o||(o=n(["\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: ",";\n\n @media (min-width: ",") {\n height: ",";\n }\n"],["\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: ",";\n\n @media (min-width: ",") {\n height: ",";\n }\n"])),g,(function(n){return n.theme.breakpoint.desktop}),f),v=t.div(a||(a=n(["\n width: 100%;\n height: 100%;\n padding: 0 ",";\n background-color: ",";\n position: relative;\n border-bottom: ",";\n height: ",";\n\n top: ",";\n position: ",";\n transition: height "," ease;\n\n @media (min-width: ",") {\n position: ",";\n height: ",";\n }\n"],["\n width: 100%;\n height: 100%;\n padding: 0 ",";\n background-color: ",";\n position: relative;\n border-bottom: ",";\n height: ",";\n\n top: ",";\n position: ",";\n transition: height "," ease;\n\n @media (min-width: ",") {\n position: ",";\n height: ",";\n }\n"])),m,(function(n){return n.theme.colors.headerBackground}),(function(n){var t=n.theme.colors.headerBorder;return"solid 1px ".concat(t)}),g,(function(n){return n.isSticky?0:"auto"}),(function(n){return n.isSticky?"fixed":"relative"}),y,(function(n){return n.theme.breakpoint.desktop}),(function(n){return n.isSticky?"fixed":"relative"}),(function(n){var t=n.isSmall,i=n.isSticky;return t&&i?g:f})),k=t.div(r||(r=n(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 100%;\n margin: 0 auto;\n max-width: ",";\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 100%;\n margin: 0 auto;\n max-width: ",";\n"])),(function(n){var t=n.fullWidth,i=n.theme.utilities.contentMaxWidth;return t?"100%":i})),z=t.img(h||(h=n(["\n height: 100%;\n width: auto;\n max-width: 100%;\n max-height: 100%;\n"],["\n height: 100%;\n width: auto;\n max-width: 100%;\n max-height: 100%;\n"]))),S=t.div(d||(d=n(["\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n width: auto;\n transition: height "," ease;\n\n height: ",";\n\n @media (min-width: ",") {\n height: ",";\n }\n"],["\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n width: auto;\n transition: height "," ease;\n\n height: ",";\n\n @media (min-width: ",") {\n height: ",";\n }\n"])),y,x,(function(n){return n.theme.breakpoint.desktop}),(function(n){var t=n.isSmall,i=n.isSticky;return t&&i?x:"80px"})),j=t.a(s||(s=n(["\n display: inline-block;\n"],["\n display: inline-block;\n"]))),B=t.a(u||(u=n(["\n left: -999px;\n position: absolute;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n z-index: -999;\n &:focus,\n &:active,\n &:focus-within {\n left: auto;\n top: auto;\n width: 30%;\n height: auto;\n overflow: auto;\n margin: 10px 35%;\n padding: ",";\n border-radius: 15px;\n border: 4px solid yellow;\n text-align: center;\n font-size: 1.2em;\n z-index: 999;\n }\n"],["\n left: -999px;\n position: absolute;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n z-index: -999;\n &:focus,\n &:active,\n &:focus-within {\n left: auto;\n top: auto;\n width: 30%;\n height: auto;\n overflow: auto;\n margin: 10px 35%;\n padding: ",";\n border-radius: 15px;\n border: 4px solid yellow;\n text-align: center;\n font-size: 1.2em;\n z-index: 999;\n }\n"])),(function(n){return n.theme.spacing.xs})),W=t.p(l||(l=n(["\n flex: 1 1 auto;\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n color: ",";\n text-align: center;\n opacity: 0;\n transition: opacity "," ease;\n display: none;\n\n @media (min-width: ",") {\n display: block;\n opacity: ",";\n }\n"],["\n flex: 1 1 auto;\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n color: ",";\n text-align: center;\n opacity: 0;\n transition: opacity "," ease;\n display: none;\n\n @media (min-width: ",") {\n display: block;\n opacity: ",";\n }\n"])),(function(n){return n.theme.typography.fontFamilyHeadings}),(function(n){return n.theme.typography.fontWeightLight}),(function(n){return n.theme.fontSizes.xl}),(function(n){return n.theme.colors.primary}),y,(function(n){return n.theme.breakpoint.desktop}),(function(n){var t=n.isSmall,i=n.isSticky;return t&&i?0:1})),F=t.div(c||(c=n(["\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n"],["\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n"]))),H=t.div(p||(p=n(["\n height: auto;\n margin: auto 0;\n"],["\n height: auto;\n margin: auto 0;\n"])));export{H as ChildInner,F as ChildWrapper,k as HeaderMainContent,v as HeaderStickyContainer,b as HeaderStickyPlaceHolder,z as Logo,S as LogoWrapper,B as SkipToMain,w as StyledHeader,j as StyledLink,W as Tagline};
|
|
2
2
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import r,{forwardRef as o}from"react";import{useTheme as t,ThemeProvider as m}from"styled-components";import{faChevronRight as s}from"../../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js";import
|
|
1
|
+
import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import r,{forwardRef as o}from"react";import{useTheme as t,ThemeProvider as m}from"styled-components";import{faChevronRight as s}from"../../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js";import a from"../../themes/cruk.js";import{StyledLink as n,ChevyWithLevee as i}from"./styles.js";var l=o((function(o,l){var f=t(),d=e(e({},a),f),p=o.rel?o.rel:"_blank"===o.target?"noopener noreferrer":"",c=o.as&&"a"!==o.as?void 0:"a";return r.createElement(m,{theme:d},r.createElement(n,e({},o,{theme:d,rel:p,forwardedAs:c,ref:l}),"primary"===o.appearance&&r.createElement(i,{faIcon:s,size:"0.8em"}),o.children))}));export{l as Link,l as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o,{css as r}from"styled-components";import{Text as e}from"../Text/index.js";import t from"../IconFa/index.js";var a,i,c,s=o(t)(a||(a=n(["\n margin-right: ",";\n stroke: currentColor;\n stroke-width: 70;\n"],["\n margin-right: ",";\n stroke: currentColor;\n stroke-width: 70;\n"])),(function(n){return n.theme.spacing.xxs})),u=o(e)(c||(c=n(["\n transition: color 0.2s ease, background-size 0.3s ease;\n overflow-wrap: break-word;\n background-color: rgba(255, 255, 255, 0);\n border: none;\n padding: 0;\n color: ",";\n text-decoration: ",";\n font-weight: ",";\n background: ",";\n background-repeat: no-repeat;\n background-position-y: calc(100%);\n background-size: 100% 2px;\n\n ","\n\n &:focus-visible {\n outline: auto;\n }\n\n &:hover {\n cursor: pointer;\n background-size: 100% 100%;\n color: ",";\n }\n"],["\n transition: color 0.2s ease, background-size 0.3s ease;\n overflow-wrap: break-word;\n background-color: rgba(255, 255, 255, 0);\n border: none;\n padding: 0;\n color: ",";\n text-decoration: ",";\n font-weight: ",";\n background: ",";\n background-repeat: no-repeat;\n background-position-y: calc(100%);\n background-size: 100% 2px;\n\n ","\n\n &:focus-visible {\n outline: auto;\n }\n\n &:hover {\n cursor: pointer;\n background-size: 100% 100%;\n color: ",";\n }\n"])),(function(n){var o=n.theme,r=o.colors,e=o.utilities.useBackgroundStyleLinks,t=n.textColor,a=n.appearance;return t&&void 0!==r[t]?r[t]:t||(!a&&e?"currentColor":a&&"primary"===a?r.
|
|
1
|
+
import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o,{css as r}from"styled-components";import{Text as e}from"../Text/index.js";import t from"../IconFa/index.js";var a,i,c,s=o(t)(a||(a=n(["\n margin-right: ",";\n stroke: currentColor;\n stroke-width: 70;\n"],["\n margin-right: ",";\n stroke: currentColor;\n stroke-width: 70;\n"])),(function(n){return n.theme.spacing.xxs})),u=o(e)(c||(c=n(["\n transition: color 0.2s ease, background-size 0.3s ease;\n overflow-wrap: break-word;\n background-color: rgba(255, 255, 255, 0);\n border: none;\n padding: 0;\n color: ",";\n text-decoration: ",";\n font-weight: ",";\n background: ",";\n background-repeat: no-repeat;\n background-position-y: calc(100%);\n background-size: 100% 2px;\n\n ","\n\n &:focus-visible {\n outline: auto;\n }\n\n &:hover {\n cursor: pointer;\n background-size: 100% 100%;\n color: ",";\n }\n"],["\n transition: color 0.2s ease, background-size 0.3s ease;\n overflow-wrap: break-word;\n background-color: rgba(255, 255, 255, 0);\n border: none;\n padding: 0;\n color: ",";\n text-decoration: ",";\n font-weight: ",";\n background: ",";\n background-repeat: no-repeat;\n background-position-y: calc(100%);\n background-size: 100% 2px;\n\n ","\n\n &:focus-visible {\n outline: auto;\n }\n\n &:hover {\n cursor: pointer;\n background-size: 100% 100%;\n color: ",";\n }\n"])),(function(n){var o=n.theme,r=o.colors,e=o.utilities.useBackgroundStyleLinks,t=n.textColor,a=n.appearance;return t&&void 0!==r[t]?r[t]:t||(!a&&e?"currentColor":a&&"primary"===a?r.linkColorSecondary:r.linkColor)}),(function(n){var o=n.appearance,r=n.theme.typography.linkTextDecoration;return"primary"===o||"secondary"===o?"none":r}),(function(n){var o=n.theme;return o.utilities.useBackgroundStyleLinks?o.typography.fontWeightHeavy:o.typography.fontWeightNormal}),(function(n){var o=n.appearance,r=n.theme;return n.theme.utilities.useBackgroundStyleLinks&&!o?"linear-gradient(180deg, rgba(255, 255, 255, 0) 0px, ".concat(r.colors.primary," -4px);"):void 0}),(function(o){var e=o.appearance,t=o.theme.typography.fontWeightHeavy;return("primary"===e||"secondary"===e)&&r(i||(i=n(["\n font-weight: ",";\n "],["\n font-weight: ",";\n "])),t)}),(function(n){var o=n.theme,r=o.colors,e=o.utilities.useBackgroundStyleLinks,t=n.textHoverColor,a=n.appearance;return!t&&e?r.textDark:t&&void 0!==r[t]?r[t]:t?a&&"primary"===a?r.linkColorHover:r.linkColorSecondaryHover:r.linkColorHover}));export{s as ChevyWithLevee,u as StyledLink};
|
|
2
2
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o,{css as e}from"styled-components";var t,r,i,a,c,d,l,s=o.div(t||(t=n(["\n display: table;\n width: 100%;\n clear: both;\n text-align: center;\n"],["\n display: table;\n width: 100%;\n clear: both;\n text-align: center;\n"]))),u=o.ul(r||(r=n(["\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n"],["\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n"]))),p=o.a(d||(d=n(["\n font-weight: normal;\n font-family: ",";\n font-size: ",";\n color: ",";\n background-color: ",";\n cursor: pointer;\n border-radius: 0;\n margin: ",";\n padding: 7px 11px;\n text-decoration: none;\n &:hover {\n opacity: 0.88;\n text-decoration: underline;\n }\n &:
|
|
1
|
+
import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o,{css as e}from"styled-components";var t,r,i,a,c,d,l,s=o.div(t||(t=n(["\n display: table;\n width: 100%;\n clear: both;\n text-align: center;\n"],["\n display: table;\n width: 100%;\n clear: both;\n text-align: center;\n"]))),u=o.ul(r||(r=n(["\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n"],["\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n"]))),p=o.a(d||(d=n(["\n font-weight: normal;\n font-family: ",";\n font-size: ",";\n color: ",";\n background-color: ",";\n cursor: pointer;\n border-radius: 0;\n margin: ",";\n padding: 7px 11px;\n text-decoration: none;\n &:active,\n &:focus,\n &:hover {\n opacity: 0.88;\n text-decoration: underline;\n }\n &:visited {\n text-decoration: none;\n }\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n"],["\n font-weight: normal;\n font-family: ",";\n font-size: ",";\n color: ",";\n background-color: ",";\n cursor: pointer;\n border-radius: 0;\n margin: ",";\n padding: 7px 11px;\n text-decoration: none;\n &:active,\n &:focus,\n &:hover {\n opacity: 0.88;\n text-decoration: underline;\n }\n &:visited {\n text-decoration: none;\n }\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n"])),(function(n){return n.theme.typography.fontFamilyBase}),(function(n){return n.theme.fontSizes.s}),(function(n){return n.theme.colors.textLight}),(function(n){return n.theme.colors.paginationBackground}),(function(n){return n.theme.spacing.xxs}),(function(o){return o.active&&e(i||(i=n(["\n color: ",";\n background-color: ",";\n cursor: default;\n &:hover {\n background-color: ",";\n text-decoration: none;\n }\n "],["\n color: ",";\n background-color: ",";\n cursor: default;\n &:hover {\n background-color: ",";\n text-decoration: none;\n }\n "])),(function(n){return n.theme.colors.textDark}),(function(n){return n.theme.colors.paginationActive}),(function(n){return n.theme.colors.paginationActive}))}),(function(o){return("Prev"===o.name||"Next"===o.name)&&e(a||(a=n(["\n color: ",";\n background-color: transparent;\n font-weight: bold;\n padding: 8px 6px;\n background-color: transparent;\n &:focus,\n &:hover {\n background-color: transparent;\n text-decoration: underline;\n }\n &:active,\n &:visited {\n text-decoration: none;\n }\n "],["\n color: ",";\n background-color: transparent;\n font-weight: bold;\n padding: 8px 6px;\n background-color: transparent;\n &:focus,\n &:hover {\n background-color: transparent;\n text-decoration: underline;\n }\n &:active,\n &:visited {\n text-decoration: none;\n }\n "])),(function(n){var o=n.theme;return n.disabled?o.colors.disabled:o.colors.paginationText}))}),(function(o){return o.disabled&&e(c||(c=n(["\n color: $ ",";\n cursor: not-allowed;\n pointer-events:none\n text-decoration: none;\n &:hover,\n &:focus,\n &:active,\n &:visited {\n color: ",";\n text-decoration: none;\n }\n "],["\n color: $ ",";\n cursor: not-allowed;\n pointer-events:none\n text-decoration: none;\n &:hover,\n &:focus,\n &:active,\n &:visited {\n color: ",";\n text-decoration: none;\n }\n "])),(function(n){return n.theme.colors.disabled}),(function(n){return n.theme.colors.disabled}))})),f=o.li(l||(l=n(["\n display: none;\n &:first-child,\n &:last-child {\n display: inline;\n }\n @media (min-width: ",") {\n display: inline;\n }\n span {\n border: none;\n min-width: 30px;\n padding: 5px;\n margin: 1px;\n border-radius: 0;\n }\n"],["\n display: none;\n &:first-child,\n &:last-child {\n display: inline;\n }\n @media (min-width: ",") {\n display: inline;\n }\n span {\n border: none;\n min-width: 30px;\n padding: 5px;\n margin: 1px;\n border-radius: 0;\n }\n"])),(function(n){return n.theme.breakpoint.mobile}));export{f as PagerItem,p as PagerLink,u as PagerList,s as PagerWrapper};
|
|
2
2
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{default as AddressLookup}from"./AddressLookup/index.js";export{default as Avatar}from"./Avatar/index.js";export{default as Badge}from"./Badge/index.js";export{default as Box}from"./Box/index.js";export{Button}from"./Button/index.js";export{default as Carousel}from"./Carousel/index.js";export{default as Checkbox}from"./Checkbox/index.js";export{default as Collapse}from"./Collapse/index.js";export{default as DateField}from"./DateField/index.js";export{Divider}from"./Divider.js";export{default as ErrorText}from"./ErrorText/index.js";export{default as Flex}from"./Flex.js";export{fontFaceStyleString as Fontface}from"./Fontface.js";export{Footer}from"./Footer/index.js";export{default as GlobalStyle}from"./GlobalStyle.js";export{default as GlobalStyleNoFontFace}from"./GlobalStyleNoFontFace.js";export{Header}from"./Header/index.js";export{default as Heading}from"./Heading/index.js";export{default as Icon}from"./Icon/index.js";export{default as IconFa}from"./IconFa/index.js";export{LabelWrapper}from"./LabelWrapper/index.js";export{LegendWrapper}from"./LegendWrapper/index.js";export{Link}from"./Link/index.js";export{default as Loader}from"./Loader/index.js";export{default as Modal}from"./Modal/index.js";export{default as Pagination}from"./Pagination/index.js";export{default as PopOver}from"./PopOver/index.js";export{default as ProgressBar}from"./ProgressBar/index.js";export{default as Radio}from"./Radio/index.js";export{default as RadioConsent}from"./RadioConsent/index.js";export{default as Select}from"./Select/index.js";export{default as Step}from"./Step/index.js";export{Text}from"./Text/index.js";export{default as TextAreaField}from"./TextAreaField/index.js";export{default as TextField}from"./TextField/index.js";export{default as Totaliser}from"./Totaliser/index.js";export{default as UserBlock}from"./UserBlock/index.js";export{default as InfoBox}from"./InfoBox/index.js";export{default as crukTheme}from"../themes/cruk.js";export{default as su2cTheme}from"../themes/su2c.js";export{default as AddressLookupReadme}from"./AddressLookup/README.md.js";export{default as AvatarReadme}from"./Avatar/README.md.js";export{default as BadgeReadme}from"./Badge/README.md.js";export{default as BoxReadme}from"./Box/README.md.js";export{default as ButtonReadme}from"./Button/README.md.js";export{default as CheckboxReadme}from"./Checkbox/README.md.js";export{default as CollapseReadme}from"./Collapse/README.md.js";export{default as DateFieldReadme}from"./DateField/README.md.js";export{default as ErrorTextReadme}from"./ErrorText/README.md.js";export{default as FooterReadme}from"./Footer/README.md.js";export{default as HeadingReadme}from"./Heading/README.md.js";export{default as HeaderReadme}from"./Header/README.md.js";export{default as IconReadme}from"./Icon/README.md.js";export{default as IconFaReadme}from"./IconFa/README.md.js";export{default as InfoBoxReadme}from"./InfoBox/README.md.js";export{default as LinkReadme}from"./Link/README.md.js";export{default as LegendWrapperReadme}from"./LegendWrapper/README.md.js";export{default as LoaderReadme}from"./Loader/README.md.js";export{default as ModalReadme}from"./Modal/README.md.js";export{default as PaginationReadme}from"./Pagination/README.md.js";export{default as PopOverReadme}from"./PopOver/README.md.js";export{default as ProgressBarReadme}from"./ProgressBar/README.md.js";export{default as RadioReadme}from"./Radio/README.md.js";export{default as RadioConsentReadme}from"./RadioConsent/README.md.js";export{default as SelectReadme}from"./Select/README.md.js";export{default as StepReadme}from"./Step/README.md.js";export{default as TextReadme}from"./Text/README.md.js";export{default as TextAreaFieldReadme}from"./TextAreaField/README.md.js";export{default as TextFieldReadme}from"./TextField/README.md.js";export{default as TotaliserReadme}from"./Totaliser/README.md.js";export{default as UserBlockReadme}from"./UserBlock/README.md.js";
|
|
1
|
+
export{default as AddressLookup}from"./AddressLookup/index.js";export{default as Avatar}from"./Avatar/index.js";export{default as Badge}from"./Badge/index.js";export{default as Box}from"./Box/index.js";export{Button}from"./Button/index.js";export{default as Carousel}from"./Carousel/index.js";export{default as Checkbox}from"./Checkbox/index.js";export{default as Collapse}from"./Collapse/index.js";export{default as DateField}from"./DateField/index.js";export{Divider}from"./Divider.js";export{default as ErrorText}from"./ErrorText/index.js";export{default as Flex}from"./Flex.js";export{fontFaceStyleString as Fontface}from"./Fontface.js";export{Footer}from"./Footer/index.js";export{default as GlobalStyle}from"./GlobalStyle.js";export{default as GlobalStyleNoFontFace}from"./GlobalStyleNoFontFace.js";export{Header}from"./Header/index.js";export{default as Heading}from"./Heading/index.js";export{default as Icon}from"./Icon/index.js";export{default as IconFa}from"./IconFa/index.js";export{LabelWrapper}from"./LabelWrapper/index.js";export{LegendWrapper}from"./LegendWrapper/index.js";export{Link}from"./Link/index.js";export{default as Loader}from"./Loader/index.js";export{default as Modal}from"./Modal/index.js";export{default as Pagination}from"./Pagination/index.js";export{default as PopOver}from"./PopOver/index.js";export{default as ProgressBar}from"./ProgressBar/index.js";export{default as Radio}from"./Radio/index.js";export{default as RadioConsent}from"./RadioConsent/index.js";export{default as Select}from"./Select/index.js";export{default as Step}from"./Step/index.js";export{Text}from"./Text/index.js";export{default as TextAreaField}from"./TextAreaField/index.js";export{default as TextField}from"./TextField/index.js";export{default as Totaliser}from"./Totaliser/index.js";export{default as UserBlock}from"./UserBlock/index.js";export{default as InfoBox}from"./InfoBox/index.js";export{default as bowelbabeTheme}from"../themes/bowelbabe.js";export{default as crukTheme}from"../themes/cruk.js";export{default as su2cTheme}from"../themes/su2c.js";export{default as AddressLookupReadme}from"./AddressLookup/README.md.js";export{default as AvatarReadme}from"./Avatar/README.md.js";export{default as BadgeReadme}from"./Badge/README.md.js";export{default as BoxReadme}from"./Box/README.md.js";export{default as ButtonReadme}from"./Button/README.md.js";export{default as CheckboxReadme}from"./Checkbox/README.md.js";export{default as CollapseReadme}from"./Collapse/README.md.js";export{default as DateFieldReadme}from"./DateField/README.md.js";export{default as ErrorTextReadme}from"./ErrorText/README.md.js";export{default as FooterReadme}from"./Footer/README.md.js";export{default as HeadingReadme}from"./Heading/README.md.js";export{default as HeaderReadme}from"./Header/README.md.js";export{default as IconReadme}from"./Icon/README.md.js";export{default as IconFaReadme}from"./IconFa/README.md.js";export{default as InfoBoxReadme}from"./InfoBox/README.md.js";export{default as LinkReadme}from"./Link/README.md.js";export{default as LegendWrapperReadme}from"./LegendWrapper/README.md.js";export{default as LoaderReadme}from"./Loader/README.md.js";export{default as ModalReadme}from"./Modal/README.md.js";export{default as PaginationReadme}from"./Pagination/README.md.js";export{default as PopOverReadme}from"./PopOver/README.md.js";export{default as ProgressBarReadme}from"./ProgressBar/README.md.js";export{default as RadioReadme}from"./Radio/README.md.js";export{default as RadioConsentReadme}from"./RadioConsent/README.md.js";export{default as SelectReadme}from"./Select/README.md.js";export{default as StepReadme}from"./Step/README.md.js";export{default as TextReadme}from"./Text/README.md.js";export{default as TextAreaFieldReadme}from"./TextAreaField/README.md.js";export{default as TextFieldReadme}from"./TextField/README.md.js";export{default as TotaliserReadme}from"./Totaliser/README.md.js";export{default as UserBlockReadme}from"./UserBlock/README.md.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import r from"./cruk.js";var o=e({},r.utilities),b=e(e({},r.siteConfig),{logoSrc:"https://rcl.assets.cancerresearchuk.org/images/logos/bowelbabe-logo-160.png"}),t=e({},r.avatar),a=e(e({},r.button),{horizontalPadding:"1rem"}),n=e({},r.breakpoint),i=e(e({},r.tokenColors),{bbPurple:"#501e70",bbLightGreen:"#92ddcb",bbGreen:"#26bb98",bbPastelGreen:"#d4f1ea",bbPink:"#d81272",bbBlue:"#009ed1",bbTeal:"#005e85",bbYellow:"#e4b50b"}),l=e(e({},r.colors),{primary:i.bbPurple,secondary:i.bbGreen,tertiary:i.bbTeal,textOnPrimary:i.white,textOnSecondary:i.bbPurple,textOnTertiary:i.white,warning:i.bbYellow,success:i.bbGreen,info:i.bbBlue,progressBar:i.bbLightGreen,progressBarSecondary:i.bbGreen,circularProgress:i.bbLightGreen,circularProgressSecondary:i.bbGreen,linkColor:i.bbPurple,linkColorHover:i.bbPink,linkColorSecondary:i.bbPurple,linkColorSecondaryHover:i.bbPink,backgroundLightColor:i.bbPastelGreen,collapseHeaderColor:i.bbPink,loaderColor1:i.bbPurple,loaderColor2:i.bbLightGreen,loaderColor3:i.bbPink,paginationText:i.bbPurple,paginationBackground:i.bbPurple,totaliserBubbleColor:i.bbPurple,totaliserBubbleTextColor:i.bbLightGreen,totaliserBubbleTotalColor:i.white,buttonPrimaryBackground:i.bbPurple,buttonPrimaryText:i.white,buttonPrimaryBorder:i.bbPurple,buttonPrimaryBackgroundHover:i.bbPink,buttonPrimaryTextHover:i.white,buttonPrimaryBorderHover:i.bbPink,buttonPrimaryDisabledBackground:i.grey_300,buttonPrimaryDisabledText:i.white,buttonPrimaryDisabledBorder:i.grey_300,buttonSecondaryBackground:i.white,buttonSecondaryText:i.bbPurple,buttonSecondaryBorder:i.bbPurple,buttonSecondaryBackgroundHover:i.white,buttonSecondaryTextHover:i.bbPink,buttonSecondaryBorderHover:i.bbPink,buttonSecondaryDisabledBackground:i.white,buttonSecondaryDisabledText:i.grey_300,buttonSecondaryDisabledBorder:i.grey_300,buttonTertiaryText:i.bbPurple,buttonTertiaryTextHover:i.bbPink,buttonTertiaryDisabledText:i.grey_300}),s=e({},r.spacing),u=e({},r.fontSizes),d=e(e({},r.typography),{customFonts:[{family:"juana-semibold",urlWoff:"".concat(b.assetPath,"fonts/juana-semibold-webfont.woff"),urlWoff2:"".concat(b.assetPath,"fonts/juana-semibold-webfont.woff2")}],fontFamilyHeadings:"juana-semibold,Arial,sans-serif"}),c={name:"bowelbabe",avatar:t,breakpoint:n,button:a,tokenColors:i,colors:l,spacing:s,fontSizes:u,siteConfig:b,typography:d,utilities:o};export{t as AVATAR,n as BREAKPOINT,a as BUTTON,l as COLORS,u as FONT_SIZES,b as SITE_CONFIG,s as SPACING,i as TOKEN_COLORS,d as TYPOGRAPHY,o as UTILITIES,c as default};
|
|
2
|
+
//# sourceMappingURL=bowelbabe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bowelbabe.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var 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-160.png",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"},a={s:"35px",m:"50px",l:"60px",xl:"90px",path:"".concat(r.assetPath,"images/avatar/cruk/")},t={borderRadius:"4px",borderRadiusLarge:"4px",buttonBorderThickness:"2px",textDecoration:"none",textTransform:"none"},o={mobile:"576px",tablet:"768px",desktop:"992px",desktopLarge:"1200px"},n={darkBlue_100:"#edeaf5",darkBlue_200:"#dad2ea",darkBlue_300:"#a896cf",darkBlue_500:"#2e008b",magenta_100:"#fdeaf5",magenta_500:"#e40087",magenta_800:"#BB0071",magenta_900:"#710044",cyan_500:"#00b6ed",cyan_900:"#005870",grey_100:"#f5f5f5",grey_200:"#ededed",grey_300:"#c6c6c6",grey_500:"#9A9A9A",grey_800:"#575757",grey_900:"#2e2d2c",white:"#fff",black:"#000",red:"#D51311",yellow:"#fdc02f",green:"#3d854d"},
|
|
1
|
+
var 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-160.png",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"},a={s:"35px",m:"50px",l:"60px",xl:"90px",path:"".concat(r.assetPath,"images/avatar/cruk/")},t={borderRadius:"4px",borderRadiusLarge:"4px",buttonBorderThickness:"2px",textDecoration:"none",textTransform:"none",horizontalPadding:"2em"},o={mobile:"576px",tablet:"768px",desktop:"992px",desktopLarge:"1200px"},n={darkBlue_100:"#edeaf5",darkBlue_200:"#dad2ea",darkBlue_300:"#a896cf",darkBlue_500:"#2e008b",magenta_100:"#fdeaf5",magenta_500:"#e40087",magenta_800:"#BB0071",magenta_900:"#710044",cyan_500:"#00b6ed",cyan_900:"#005870",grey_100:"#f5f5f5",grey_200:"#ededed",grey_300:"#c6c6c6",grey_500:"#9A9A9A",grey_800:"#575757",grey_900:"#2e2d2c",white:"#fff",black:"#000",red:"#D51311",yellow:"#fdc02f",green:"#3d854d"},g={primary:n.darkBlue_500,secondary:n.magenta_500,tertiary:n.cyan_500,textOnPrimary:n.white,textOnSecondary:n.white,textOnTertiary:n.white,disabled:n.grey_300,danger:n.red,warning:n.yellow,success:n.green,info:n.cyan_500,textError:n.red,linkColor:n.darkBlue_500,linkColorHover:n.magenta_800,textDark:n.grey_900,textLight:n.white,linkColorSecondary:n.magenta_500,linkColorSecondaryHover:n.magenta_800,progressBar:n.darkBlue_500,progressBarSecondary:n.magenta_500,progressBarBackground:n.grey_200,circularProgress:n.cyan_500,circularProgressSecondary:n.magenta_500,circularProgressBackground:n.grey_300,buttonPrimaryBackground:n.magenta_500,buttonPrimaryText:n.white,buttonPrimaryBorder:n.magenta_500,buttonPrimaryBackgroundHover:n.magenta_800,buttonPrimaryTextHover:n.white,buttonPrimaryBorderHover:n.magenta_800,buttonPrimaryDisabledBackground:n.grey_100,buttonPrimaryDisabledText:n.grey_500,buttonPrimaryDisabledBorder:n.grey_100,buttonSecondaryBackground:n.white,buttonSecondaryText:n.magenta_500,buttonSecondaryBorder:n.magenta_500,buttonSecondaryBackgroundHover:n.magenta_100,buttonSecondaryTextHover:n.magenta_800,buttonSecondaryBorderHover:n.magenta_800,buttonSecondaryDisabledBackground:n.grey_100,buttonSecondaryDisabledText:n.grey_500,buttonSecondaryDisabledBorder:n.grey_100,buttonTertiaryText:n.magenta_500,buttonTertiaryTextHover:n.magenta_800,buttonTertiaryDisabledText:n.grey_500,collapseHeaderColor:n.magenta_500,selectionBorder:n.grey_500,textInputBorder:n.grey_900,inputBorder:n.grey_900,headerBackground:n.white,backgroundLight:n.white,backgroundLightColor:n.darkBlue_200,backgroundMid:n.grey_100,loaderColor1:n.darkBlue_500,loaderColor2:n.magenta_500,loaderColor3:n.cyan_500,paginationText:n.darkBlue_500,paginationActive:n.grey_300,paginationBackground:n.darkBlue_500,footerBackground:n.grey_200,headerBorder:n.grey_300,stepBorder:n.grey_300,stepBackground:n.white,popoverBackground:n.white,textInputExtraInfo:n.grey_200,totaliserBubbleColor:n.grey_200,totaliserBubbleTextColor:n.grey_900,totaliserBubbleTotalColor:n.darkBlue_500,selectBackground:n.grey_900,modalBackdrop:n.grey_900,userBlockExtraText:n.grey_800},i={none:"0",auto:"auto",xxs:"0.5rem",xs:"1rem",s:"1.5rem",m:"2rem",l:"2.5rem",xl:"3rem",xxl:"3.5rem"},s={xs:"0.75rem",s:"0.875rem",m:"1rem",l:"1.25rem",xl:"1.5625rem",xxl:"2rem",xxxl:"2.5rem",xxxxl:"3.125rem"},d={customFonts:[{family:"MuseoSans-500",urlWoff:"".concat(r.assetPath,"fonts/MuseoSansRounded-500.woff"),urlWoff2:"".concat(r.assetPath,"fonts/MuseoSansRounded-500.woff2")}],fontFamilyBase:"Arial, Calibri, nimbussansl, liberationsans, freesans, clean, sans-serif",fontFamilyHeadings:"MuseoSans-500,Calibri,Arial,sans-serif",fontSizeBase:"16px",fontWeightHeavy:"700",fontWeightMedium:"500",fontWeightNormal:"400",fontWeightLight:"300",fontWeightVLight:"100",linkTextDecoration:"underline",lineHeight:"1.5em",headerLineHeight:"1.25em",headerTextTransform:"none"},l={name:"cruk",avatar:a,breakpoint:o,button:t,tokenColors:n,colors:g,spacing:i,fontSizes:s,siteConfig:r,typography:d,utilities:e};export{a as AVATAR,o as BREAKPOINT,t as BUTTON,g as COLORS,s as FONT_SIZES,r as SITE_CONFIG,i as SPACING,n as TOKEN_COLORS,d as TYPOGRAPHY,e as UTILITIES,l as default};
|
|
2
2
|
//# sourceMappingURL=cruk.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as r}from"../../node_modules/tslib/tslib.es6.js";import e from"./cruk.js";var a=r(r({},e.utilities),{useBackgroundStyleLinks:!0}),o=r(r({},e.siteConfig),{logoSrc:"https://rcl.assets.cancerresearchuk.org/images/logos/su2c-160.png",footerCopyText:"Stand Up To Cancer and Stand Up To Cancer Brand Marks are registered trademarks of the Entertainment Industry Foundation. 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). Registered address: 2 Redman Place, London, E20 1JQ. Donations will be made to Cancer Research UK in support of the Stand Up To Cancer campaign."}),t=r(r({},e.avatar),{path:"".concat(o.assetPath,"images/avatar/su2c/")}),n=r(r({},e.button),{borderRadius:"1.5rem",borderRadiusLarge:"2rem",textTransform:"uppercase"}),s=r({},e.breakpoint),c=r(r({},e.tokenColors),{su2cOrange5:"#FF8E00",su2cOrange3:"#FFB04D",su2cOrange2:"#FFDAAD",su2cOrange1:"#FFF6EB",su2cBlack:"#231F20",su2cGrey1:"#555759",su2cGrey2:"#A5A5A9",su2cRed:"#EF4135",su2cYellow:"#FFC325"}),u=r(r({},e.colors),{primary:c.su2cOrange5,secondary:c.su2cOrange5,tertiary:c.su2cBlack,textOnPrimary:c.su2cBlack,progressBar:c.su2cOrange5,progressBarSecondary:c.su2cRed,circularProgress:c.su2cOrange3,circularProgressSecondary:c.su2cRed,linkColor:c.su2cOrange5,linkColorHover:c.su2cRed,backgroundLightColor:c.su2cOrange2,loaderColor1:c.su2cOrange5,loaderColor2:c.su2cRed,loaderColor3:c.su2cBlack,paginationText:c.su2cBlack,paginationBackground:c.su2cBlack,totaliserBubbleColor:c.su2cBlack,totaliserBubbleTextColor:c.white,totaliserBubbleTotalColor:c.white,buttonPrimaryBackground:c.su2cOrange5,buttonPrimaryText:c.su2cBlack,buttonPrimaryBorder:c.su2cOrange5,buttonPrimaryBackgroundHover:c.su2cOrange3,buttonPrimaryTextHover:c.su2cBlack,buttonPrimaryBorderHover:c.su2cOrange3,buttonPrimaryDisabledBackground:c.grey_300,buttonPrimaryDisabledText:c.white,buttonPrimaryDisabledBorder:c.grey_300,buttonSecondaryBackground:c.white,buttonSecondaryText:c.su2cOrange5,buttonSecondaryBorder:c.su2cOrange5,buttonSecondaryBackgroundHover:c.su2cOrange1,buttonSecondaryTextHover:c.su2cOrange5,buttonSecondaryBorderHover:c.su2cOrange5,buttonSecondaryDisabledBackground:c.white,buttonSecondaryDisabledText:c.grey_300,buttonSecondaryDisabledBorder:c.grey_300,buttonTertiaryText:c.su2cOrange5,buttonTertiaryTextHover:c.su2cOrange5,buttonTertiaryDisabledText:c.grey_300}),i=r({},e.spacing),d=r({},e.fontSizes),l=r(r({},e.typography),{customFonts:[{family:"itc_avant_garde_pro_mdbold",urlWoff:"".concat(o.assetPath,"fonts/itc_-_itcavantgardepro-bold-webfont.woff")}],fontFamilyHeadings:"itc_avant_garde_pro_mdbold,Arial,sans-serif",linkTextDecoration:"none",headerLineHeight:"1.5em",headerTextTransform:"uppercase"}),g={name:"su2c",avatar:t,breakpoint:s,button:n,tokenColors:c,colors:u,spacing:i,fontSizes:d,siteConfig:o,typography:l,utilities:a};export{t as AVATAR,s as BREAKPOINT,n as BUTTON,u as COLORS,d as FONT_SIZES,o as SITE_CONFIG,i as SPACING,c as TOKEN_COLORS,l as TYPOGRAPHY,a as UTILITIES,g as default};
|
|
1
|
+
import{__assign as r}from"../../node_modules/tslib/tslib.es6.js";import e from"./cruk.js";var a=r(r({},e.utilities),{useBackgroundStyleLinks:!0}),o=r(r({},e.siteConfig),{logoSrc:"https://rcl.assets.cancerresearchuk.org/images/logos/su2c-160.png",footerCopyText:"Stand Up To Cancer and Stand Up To Cancer Brand Marks are registered trademarks of the Entertainment Industry Foundation. 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). Registered address: 2 Redman Place, London, E20 1JQ. Donations will be made to Cancer Research UK in support of the Stand Up To Cancer campaign."}),t=r(r({},e.avatar),{path:"".concat(o.assetPath,"images/avatar/su2c/")}),n=r(r({},e.button),{borderRadius:"1.5rem",borderRadiusLarge:"2rem",textTransform:"uppercase"}),s=r({},e.breakpoint),c=r(r({},e.tokenColors),{su2cOrange5:"#FF8E00",su2cOrange3:"#FFB04D",su2cOrange2:"#FFDAAD",su2cOrange1:"#FFF6EB",su2cBlack:"#231F20",su2cGrey1:"#555759",su2cGrey2:"#A5A5A9",su2cRed:"#EF4135",su2cYellow:"#FFC325"}),u=r(r({},e.colors),{primary:c.su2cOrange5,secondary:c.su2cOrange5,tertiary:c.su2cBlack,textOnPrimary:c.su2cBlack,progressBar:c.su2cOrange5,progressBarSecondary:c.su2cRed,circularProgress:c.su2cOrange3,circularProgressSecondary:c.su2cRed,linkColor:c.su2cOrange5,linkColorHover:c.su2cRed,linkColorSecondary:c.su2cOrange5,linkColorSecondaryHover:c.su2cRed,backgroundLightColor:c.su2cOrange2,loaderColor1:c.su2cOrange5,loaderColor2:c.su2cRed,loaderColor3:c.su2cBlack,paginationText:c.su2cBlack,paginationBackground:c.su2cBlack,totaliserBubbleColor:c.su2cBlack,totaliserBubbleTextColor:c.white,totaliserBubbleTotalColor:c.white,collapseHeaderColor:c.su2cOrange5,buttonPrimaryBackground:c.su2cOrange5,buttonPrimaryText:c.su2cBlack,buttonPrimaryBorder:c.su2cOrange5,buttonPrimaryBackgroundHover:c.su2cOrange3,buttonPrimaryTextHover:c.su2cBlack,buttonPrimaryBorderHover:c.su2cOrange3,buttonPrimaryDisabledBackground:c.grey_300,buttonPrimaryDisabledText:c.white,buttonPrimaryDisabledBorder:c.grey_300,buttonSecondaryBackground:c.white,buttonSecondaryText:c.su2cOrange5,buttonSecondaryBorder:c.su2cOrange5,buttonSecondaryBackgroundHover:c.su2cOrange1,buttonSecondaryTextHover:c.su2cOrange5,buttonSecondaryBorderHover:c.su2cOrange5,buttonSecondaryDisabledBackground:c.white,buttonSecondaryDisabledText:c.grey_300,buttonSecondaryDisabledBorder:c.grey_300,buttonTertiaryText:c.su2cOrange5,buttonTertiaryTextHover:c.su2cOrange5,buttonTertiaryDisabledText:c.grey_300}),i=r({},e.spacing),d=r({},e.fontSizes),l=r(r({},e.typography),{customFonts:[{family:"itc_avant_garde_pro_mdbold",urlWoff:"".concat(o.assetPath,"fonts/itc_-_itcavantgardepro-bold-webfont.woff")}],fontFamilyHeadings:"itc_avant_garde_pro_mdbold,Arial,sans-serif",linkTextDecoration:"none",headerLineHeight:"1.5em",headerTextTransform:"uppercase"}),g={name:"su2c",avatar:t,breakpoint:s,button:n,tokenColors:c,colors:u,spacing:i,fontSizes:d,siteConfig:o,typography:l,utilities:a};export{t as AVATAR,s as BREAKPOINT,n as BUTTON,u as COLORS,d as FONT_SIZES,o as SITE_CONFIG,i as SPACING,c as TOKEN_COLORS,l as TYPOGRAPHY,a as UTILITIES,g as default};
|
|
2
2
|
//# sourceMappingURL=su2c.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { UtilitiesType, SiteConfigType, AvatarType, ButtonType, BreakPointType, TokenColorsType, ColorsType, SpacingType, FontSizesType, TypographyType, ThemeType } from "../types";
|
|
2
|
+
export declare const UTILITIES: UtilitiesType;
|
|
3
|
+
export declare const SITE_CONFIG: SiteConfigType;
|
|
4
|
+
export declare const AVATAR: AvatarType;
|
|
5
|
+
export declare const BUTTON: ButtonType;
|
|
6
|
+
export declare const BREAKPOINT: BreakPointType;
|
|
7
|
+
export declare const TOKEN_COLORS: TokenColorsType;
|
|
8
|
+
export declare const COLORS: ColorsType;
|
|
9
|
+
export declare const SPACING: SpacingType;
|
|
10
|
+
export declare const FONT_SIZES: FontSizesType;
|
|
11
|
+
export declare const TYPOGRAPHY: TypographyType;
|
|
12
|
+
declare const theme: ThemeType;
|
|
13
|
+
export default theme;
|
package/lib/types.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export type ButtonType = {
|
|
|
31
31
|
buttonBorderThickness: string;
|
|
32
32
|
textDecoration: string;
|
|
33
33
|
textTransform: string;
|
|
34
|
+
horizontalPadding: string;
|
|
34
35
|
};
|
|
35
36
|
export type ButtonAppearanceType = "primary" | "secondary" | "tertiary";
|
|
36
37
|
export type PopOverPositionType = "top" | "topLeft" | "left" | "right" | "bottom" | "bottomLeft";
|
|
@@ -60,6 +61,8 @@ export type ColorsType = {
|
|
|
60
61
|
linkColorHover: string;
|
|
61
62
|
textDark: string;
|
|
62
63
|
textLight: string;
|
|
64
|
+
linkColorSecondary: string;
|
|
65
|
+
linkColorSecondaryHover: string;
|
|
63
66
|
progressBar: string;
|
|
64
67
|
progressBarSecondary: string;
|
|
65
68
|
progressBarBackground: string;
|
|
@@ -87,6 +90,7 @@ export type ColorsType = {
|
|
|
87
90
|
buttonTertiaryText: string;
|
|
88
91
|
buttonTertiaryTextHover: string;
|
|
89
92
|
buttonTertiaryDisabledText: string;
|
|
93
|
+
collapseHeaderColor: string;
|
|
90
94
|
selectionBorder: string;
|
|
91
95
|
inputBorder: string;
|
|
92
96
|
headerBackground: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cruk/cruk-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "React components implementing CRUK and SU2C designs",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"publishConfig": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"lib"
|
|
16
16
|
],
|
|
17
17
|
"engines": {
|
|
18
|
-
"node": "^14 || ^16"
|
|
18
|
+
"node": "^14 || ^16 || ^18"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"dev": "NODE_ENV=development npm i && npm run start",
|
|
@@ -39,24 +39,10 @@
|
|
|
39
39
|
"prettier": "prettier --write '**/*.{ts,tsx}'",
|
|
40
40
|
"prettier:test": "prettier --check src/**/*.{ts,tsx}",
|
|
41
41
|
"prettier:debug": "prettier --debug-check src/**/*.{ts,tsx}",
|
|
42
|
-
"prettier:test-staged": "npx pretty-quick --pattern 'src/**/*.{js,ts,tsx}' 'cypress/{integration,plugins,support}/**/*.{js,ts,tsx}' --staged",
|
|
43
42
|
"storybook": "start-storybook -p 6006",
|
|
44
43
|
"build-storybook": "build-storybook",
|
|
45
44
|
"eslint:test": "eslint src",
|
|
46
|
-
"eslint:fix": "eslint src --fix"
|
|
47
|
-
"eslint:test-staged": "npx lint-staged",
|
|
48
|
-
"prepare": "husky install",
|
|
49
|
-
"precommit": "npm run prettier:test-staged && npm run eslint:test-staged"
|
|
50
|
-
},
|
|
51
|
-
"husky": {
|
|
52
|
-
"hooks": {
|
|
53
|
-
"pre-commit": "npm run precommit"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"lint-staged": {
|
|
57
|
-
"*.{ts,tsx}": [
|
|
58
|
-
"eslint --fix"
|
|
59
|
-
]
|
|
45
|
+
"eslint:fix": "eslint src --fix"
|
|
60
46
|
},
|
|
61
47
|
"repository": {
|
|
62
48
|
"type": "git",
|
|
@@ -74,7 +60,7 @@
|
|
|
74
60
|
"@babel/preset-react": "^7.14.5",
|
|
75
61
|
"@babel/preset-typescript": "^7.9.0",
|
|
76
62
|
"@cruk/eslint-config": "^1.0.8",
|
|
77
|
-
"@cypress/webpack-dev-server": "
|
|
63
|
+
"@cypress/webpack-dev-server": "3.3.0",
|
|
78
64
|
"@cypress/webpack-preprocessor": "^5.12.0",
|
|
79
65
|
"@mdx-js/loader": "^2.2.1",
|
|
80
66
|
"@mdx-js/mdx": "^2.2.1",
|
|
@@ -84,10 +70,10 @@
|
|
|
84
70
|
"@reach/router": "^1.3.4",
|
|
85
71
|
"@react-theming/storybook-addon": "^1.1.6",
|
|
86
72
|
"@rollup/plugin-babel": "^5.0.0",
|
|
87
|
-
"@rollup/plugin-commonjs": "^
|
|
73
|
+
"@rollup/plugin-commonjs": "^24.0.1",
|
|
88
74
|
"@rollup/plugin-node-resolve": "^13.0.5",
|
|
89
75
|
"@simonsmith/cypress-image-snapshot": "^5.0.4",
|
|
90
|
-
"@storybook/addon-a11y": "6.5.
|
|
76
|
+
"@storybook/addon-a11y": "6.5.16",
|
|
91
77
|
"@storybook/addon-actions": "^6.5.13",
|
|
92
78
|
"@storybook/addon-docs": "^6.5.13",
|
|
93
79
|
"@storybook/addon-essentials": "^6.5.13",
|
|
@@ -128,11 +114,8 @@
|
|
|
128
114
|
"eslint-plugin-storybook": "^0.6.1",
|
|
129
115
|
"html-loader": "^4.1.0",
|
|
130
116
|
"html-webpack-plugin": "^5.3.2",
|
|
131
|
-
"husky": "^8.0.1",
|
|
132
117
|
"jest": "^29.2.0",
|
|
133
|
-
"lint-staged": "^13.0.3",
|
|
134
118
|
"prettier": "^2.8.1",
|
|
135
|
-
"pretty-quick": "^3.1.1",
|
|
136
119
|
"react": "^16.12.0",
|
|
137
120
|
"react-dom": "^16.12.0",
|
|
138
121
|
"react-live": "^3.1.1",
|
|
@@ -152,9 +135,9 @@
|
|
|
152
135
|
"styled-components": "^5.3.5"
|
|
153
136
|
},
|
|
154
137
|
"dependencies": {
|
|
155
|
-
"@fortawesome/fontawesome-common-types": "^6.
|
|
156
|
-
"@fortawesome/free-brands-svg-icons": "^6.
|
|
157
|
-
"@fortawesome/free-solid-svg-icons": "^6.
|
|
138
|
+
"@fortawesome/fontawesome-common-types": "^6.3.0",
|
|
139
|
+
"@fortawesome/free-brands-svg-icons": "^6.3.0",
|
|
140
|
+
"@fortawesome/free-solid-svg-icons": "^6.3.0",
|
|
158
141
|
"react-focus-lock": "^2.5.2",
|
|
159
142
|
"react-intersection-observer": "^9.1.0",
|
|
160
143
|
"react-is": "^18.2.0",
|