@cruk/cruk-react-components 1.0.5 → 1.0.6

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +147 -0
  2. package/README.md +1 -1
  3. package/lib/cjs/node_modules/react-intersection-observer/react-intersection-observer.m.js +2 -0
  4. package/lib/cjs/node_modules/react-intersection-observer/react-intersection-observer.m.js.map +1 -0
  5. package/lib/cjs/src/components/Button/index.js +1 -1
  6. package/lib/cjs/src/components/Button/styles.js +1 -1
  7. package/lib/cjs/src/components/Carousel/Dots.js +2 -0
  8. package/lib/cjs/src/components/Carousel/Dots.js.map +1 -0
  9. package/lib/cjs/src/components/Carousel/index.js +2 -0
  10. package/lib/cjs/src/components/Carousel/index.js.map +1 -0
  11. package/lib/cjs/src/components/Carousel/styles.js +2 -0
  12. package/lib/cjs/src/components/Carousel/styles.js.map +1 -0
  13. package/lib/cjs/src/components/Link/styles.js +1 -1
  14. package/lib/cjs/src/components/Pagination/styles.js +1 -1
  15. package/lib/cjs/src/components/ProgressBar/index.js +1 -1
  16. package/lib/cjs/src/components/ProgressBar/styles.js +1 -1
  17. package/lib/cjs/src/components/Totaliser/index.js +1 -1
  18. package/lib/cjs/src/components/Totaliser/styles.js +1 -1
  19. package/lib/cjs/src/components/index.js +1 -1
  20. package/lib/cjs/src/themes/cruk.js +1 -1
  21. package/lib/cjs/src/themes/su2c.js +1 -1
  22. package/lib/components/Carousel/Carousel.stories.d.ts +6 -0
  23. package/lib/components/Carousel/Dots.d.ts +12 -0
  24. package/lib/components/Carousel/index.d.ts +13 -0
  25. package/lib/components/Carousel/styles.d.ts +30 -0
  26. package/lib/components/Carousel/test.cypress.d.ts +1 -0
  27. package/lib/components/ProgressBar/index.d.ts +5 -1
  28. package/lib/components/ProgressBar/styles.d.ts +20 -10
  29. package/lib/components/Totaliser/index.d.ts +2 -0
  30. package/lib/components/index.d.ts +1 -0
  31. package/lib/es/node_modules/react-intersection-observer/react-intersection-observer.m.js +2 -0
  32. package/lib/es/node_modules/react-intersection-observer/react-intersection-observer.m.js.map +1 -0
  33. package/lib/es/src/components/Button/index.js +1 -1
  34. package/lib/es/src/components/Button/styles.js +1 -1
  35. package/lib/es/src/components/Carousel/Dots.js +2 -0
  36. package/lib/es/src/components/Carousel/Dots.js.map +1 -0
  37. package/lib/es/src/components/Carousel/index.js +2 -0
  38. package/lib/es/src/components/Carousel/index.js.map +1 -0
  39. package/lib/es/src/components/Carousel/styles.js +2 -0
  40. package/lib/es/src/components/Carousel/styles.js.map +1 -0
  41. package/lib/es/src/components/Link/styles.js +1 -1
  42. package/lib/es/src/components/Pagination/styles.js +1 -1
  43. package/lib/es/src/components/ProgressBar/index.js +1 -1
  44. package/lib/es/src/components/ProgressBar/styles.js +1 -1
  45. package/lib/es/src/components/Totaliser/index.js +1 -1
  46. package/lib/es/src/components/Totaliser/styles.js +1 -1
  47. package/lib/es/src/components/index.js +1 -1
  48. package/lib/es/src/themes/cruk.js +1 -1
  49. package/lib/es/src/themes/su2c.js +1 -1
  50. package/lib/types.d.ts +2 -0
  51. package/package.json +15 -15
@@ -0,0 +1,12 @@
1
+ import { FC, ButtonHTMLAttributes } from "react";
2
+ declare type DotProps = {
3
+ count: number;
4
+ currentPosition: number;
5
+ scrollToPosition: (to: number) => void;
6
+ next: () => void;
7
+ previous: () => void;
8
+ };
9
+ export declare const CarouselLeftButton: FC<ButtonHTMLAttributes<HTMLElement>>;
10
+ export declare const CarouselRightButton: FC<ButtonHTMLAttributes<HTMLElement>>;
11
+ export declare const Dots: FC<DotProps>;
12
+ export default Dots;
@@ -0,0 +1,13 @@
1
+ import React, { FC } from "react";
2
+ export declare type CarouselProps = {
3
+ startPosition?: number;
4
+ onPositionChanged?: (position: number) => void;
5
+ shrinkUnselectedPages?: boolean;
6
+ };
7
+ /**
8
+ *
9
+ * Light weight carousel component that works with mouse and touch events, will work with divs and much anything you chuck in children
10
+ */
11
+ export declare const Carousel: FC<CarouselProps>;
12
+ declare const _default: React.MemoExoticComponent<React.FC<CarouselProps>>;
13
+ export default _default;
@@ -0,0 +1,30 @@
1
+ import { ThemeType } from "../../types";
2
+ export declare const CarouselWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ declare type ThemeProps = {
4
+ theme: ThemeType;
5
+ };
6
+ declare type CarouselScrollAreaProps = {
7
+ smoothScrolling: boolean;
8
+ };
9
+ export declare const CarouselScrollArea: import("styled-components").StyledComponent<"ul", any, CarouselScrollAreaProps, never>;
10
+ export declare const CarouselCard: import("styled-components").StyledComponent<"li", any, {
11
+ onlyChild: boolean;
12
+ }, never>;
13
+ declare type CarouselCardInnerProps = {
14
+ isSelected: boolean;
15
+ shrinkUnselectedPages: boolean;
16
+ onlyChild: boolean;
17
+ };
18
+ export declare const CarouselCardInner: import("styled-components").StyledComponent<"div", any, CarouselCardInnerProps, never>;
19
+ export declare const ButtonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
20
+ export declare const VerticalAlign: import("styled-components").StyledComponent<"span", any, {}, never>;
21
+ export declare const CarouselButton: import("styled-components").StyledComponent<"button", any, {}, never>;
22
+ export declare const DotContainer: import("styled-components").StyledComponent<"div", any, ThemeProps & {
23
+ count: number;
24
+ }, never>;
25
+ export declare const Dot: import("styled-components").StyledComponent<"button", any, {
26
+ theme: ThemeType;
27
+ selected: boolean;
28
+ }, never>;
29
+ export declare const ScreenReaderOnly: import("styled-components").StyledComponent<"span", any, {}, never>;
30
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -2,14 +2,18 @@ import { FC, ReactNode } from "react";
2
2
  export declare type ProgressBarProps = {
3
3
  /** percentage value of the progressbar */
4
4
  percentage: number;
5
+ /** percentage value of a secondary (highter) amount of the progressbar */
6
+ secondaryPercentage?: number;
5
7
  /** flag which converts line bar to donut chart */
6
8
  isCircular?: boolean;
7
9
  /** contents inside the donut chart */
8
10
  circleContents?: ReactNode;
9
11
  /** diameter of the donut chart */
10
12
  circleSize?: string;
11
- /** foreground colour of chart */
13
+ /** foreground colour of chart bar */
12
14
  barColor?: string;
15
+ /** foreground colour of chart secondary bar */
16
+ secondaryBarColor?: string;
13
17
  };
14
18
  /**
15
19
  * Provide up-to-date feedback on the progress of a workflow or action with
@@ -1,20 +1,30 @@
1
- export declare const ProgressBarWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const LineProgressBarWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ import { ThemeType } from "../../types";
2
+ declare type ThemeProp = {
3
+ theme: ThemeType;
4
+ };
3
5
  declare type LineProgressBarProps = {
4
6
  percentage: number;
5
7
  barColor?: string;
8
+ isSecondary?: boolean;
6
9
  };
7
- declare type CircularColorFillProps = {
8
- barColor?: string;
10
+ declare type LineProgressWrapperProps = {
11
+ percentage: number;
12
+ secondaryPercentage: number;
9
13
  };
14
+ declare type CircleWrapperProps = {
15
+ circleSize: string;
16
+ };
17
+ export declare const ProgressBarWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
18
+ export declare const LineProgressBarWrapper: import("styled-components").StyledComponent<"div", any, LineProgressWrapperProps, never>;
10
19
  export declare const LineProgressBar: import("styled-components").StyledComponent<"div", any, LineProgressBarProps, never>;
11
20
  export declare const ScreenReaderOnly: import("styled-components").StyledComponent<"span", any, {}, never>;
12
- export declare const CircularColorFill: import("styled-components").StyledComponent<"span", any, CircularColorFillProps, never>;
13
- export declare const CircularLeft: import("styled-components").StyledComponent<"span", any, {}, never>;
14
- export declare const CircularRight: import("styled-components").StyledComponent<"span", any, {}, never>;
15
- export declare const CircularWrapper: import("styled-components").StyledComponent<"div", any, {
16
- percentage: number;
17
- circleSize: string;
21
+ export declare const CircularWrapper: import("styled-components").StyledComponent<"div", any, CircleWrapperProps, never>;
22
+ export declare const CircleSvg: import("styled-components").StyledComponent<"svg", any, {}, never>;
23
+ export declare const EmptyCircle: import("styled-components").StyledComponent<"circle", any, {}, never>;
24
+ export declare const FullCircle: import("styled-components").StyledComponent<"circle", any, ThemeProp & {
25
+ strokeDashoffsetInit: number;
26
+ barColor?: string | undefined;
27
+ isSecondary?: boolean | undefined;
18
28
  }, never>;
19
29
  export declare const CircularValue: import("styled-components").StyledComponent<"div", any, {}, never>;
20
30
  export {};
@@ -2,6 +2,8 @@ import { FunctionComponent, ReactChild } from "react";
2
2
  export declare type TotaliserProps = {
3
3
  /** financial total as a number */
4
4
  total: number;
5
+ /** additional donation amount as a number */
6
+ additionalAmount?: number;
5
7
  /** git aid total as a number */
6
8
  giftAid?: number;
7
9
  /** money target as a number */
@@ -3,6 +3,7 @@ export { default as Avatar } from "./Avatar";
3
3
  export { default as Badge } from "./Badge";
4
4
  export { default as Box } from "./Box";
5
5
  export { default as Button } from "./Button";
6
+ export { default as Carousel } from "./Carousel";
6
7
  export { default as Checkbox } from "./Checkbox";
7
8
  export { default as Collapse } from "./Collapse";
8
9
  export { default as DateField } from "./DateField";
@@ -0,0 +1,2 @@
1
+ import*as e from"react";function t(){return t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}function n(e,t){return n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}var r=new Map,i=new WeakMap,o=0;function s(e){return Object.keys(e).sort().filter((function(t){return void 0!==e[t]})).map((function(t){return t+"_"+("root"===t?(n=e.root)?(i.has(n)||(o+=1,i.set(n,o.toString())),i.get(n)):"0":e[t]);var n})).toString()}function a(e,t,n,i){if(void 0===n&&(n={}),void 0===i&&(i=undefined),void 0===window.IntersectionObserver&&void 0!==i){var o=e.getBoundingClientRect();return t(i,{isIntersecting:i,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:o,intersectionRect:o,rootBounds:o}),function(){}}var a=function(e){var t=s(e),n=r.get(t);if(!n){var i,o=new Map,a=new IntersectionObserver((function(t){t.forEach((function(t){var n,r=t.isIntersecting&&i.some((function(e){return t.intersectionRatio>=e}));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=r),null==(n=o.get(t.target))||n.forEach((function(e){e(r,t)}))}))}),e);i=a.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:a,elements:o},r.set(t,n)}return n}(n),l=a.id,h=a.observer,c=a.elements,u=c.get(e)||[];return c.has(e)||c.set(e,u),u.push(t),h.observe(e),function(){u.splice(u.indexOf(t),1),0===u.length&&(c.delete(e),h.unobserve(e)),0===c.size&&(h.disconnect(),r.delete(l))}}var l=["children","as","tag","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function h(e){return"function"!=typeof e.children}var c=function(r){var i,o;function s(e){var t;return(t=r.call(this,e)||this).node=null,t._unobserveCb=null,t.handleNode=function(e){t.node&&(t.unobserve(),e||t.props.triggerOnce||t.props.skip||t.setState({inView:!!t.props.initialInView,entry:void 0})),t.node=e||null,t.observeNode()},t.handleChange=function(e,n){e&&t.props.triggerOnce&&t.unobserve(),h(t.props)||t.setState({inView:e,entry:n}),t.props.onChange&&t.props.onChange(e,n)},t.state={inView:!!e.initialInView,entry:void 0},t}o=r,(i=s).prototype=Object.create(o.prototype),i.prototype.constructor=i,n(i,o);var c=s.prototype;return c.componentDidUpdate=function(e){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold&&e.skip===this.props.skip&&e.trackVisibility===this.props.trackVisibility&&e.delay===this.props.delay||(this.unobserve(),this.observeNode())},c.componentWillUnmount=function(){this.unobserve(),this.node=null},c.observeNode=function(){if(this.node&&!this.props.skip){var e=this.props,t=e.threshold,n=e.root,r=e.rootMargin,i=e.trackVisibility,o=e.delay,s=e.fallbackInView;this._unobserveCb=a(this.node,this.handleChange,{threshold:t,root:n,rootMargin:r,trackVisibility:i,delay:o},s)}},c.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},c.render=function(){if(!h(this.props)){var n=this.state,r=n.inView,i=n.entry;return this.props.children({inView:r,entry:i,ref:this.handleNode})}var o=this.props,s=o.children,a=o.as,c=o.tag,u=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(o,l);return e.createElement(a||c||"div",t({ref:this.handleNode},u),s)},s}(e.Component);c.displayName="InView",c.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};export{c as InView,c as default,a as observe};
2
+ //# sourceMappingURL=react-intersection-observer.m.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-intersection-observer.m.js","sources":["../../../../node_modules/react-intersection-observer/react-intersection-observer.m.js"],"sourcesContent":["import * as React from 'react';\nimport { useEffect } 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 _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\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\nvar observerMap = new Map();\nvar RootIds = new WeakMap();\nvar rootId = 0;\nvar 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(function (key) {\n return options[key] !== undefined;\n }).map(function (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 var id = optionsToId(options);\n var 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 var elements = new Map();\n var thresholds;\n var observer = new IntersectionObserver(function (entries) {\n entries.forEach(function (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 var inView = entry.isIntersecting && thresholds.some(function (threshold) {\n return entry.intersectionRatio >= threshold;\n }); // @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(function (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: id,\n observer: observer,\n elements: 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) {\n if (options === void 0) {\n options = {};\n }\n\n if (fallbackInView === void 0) {\n fallbackInView = unsupportedValue;\n }\n\n if (typeof window.IntersectionObserver === 'undefined' && fallbackInView !== undefined) {\n var 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 function () {// Nothing to cleanup\n };\n } // An observer with the same options can be reused, so lets use this fact\n\n\n var _createObserver = createObserver(options),\n id = _createObserver.id,\n observer = _createObserver.observer,\n elements = _createObserver.elements; // Register the callback listener for this element\n\n\n var 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\nvar _excluded = [\"children\", \"as\", \"tag\", \"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\nvar InView = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(InView, _React$Component);\n\n function InView(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.node = null;\n _this._unobserveCb = null;\n\n _this.handleNode = function (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\n _this.observeNode();\n };\n\n _this.handleChange = function (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: inView,\n entry: 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 return _this;\n }\n\n var _proto = InView.prototype;\n\n _proto.componentDidUpdate = function 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 _proto.componentWillUnmount = function componentWillUnmount() {\n this.unobserve();\n this.node = null;\n };\n\n _proto.observeNode = function observeNode() {\n if (!this.node || this.props.skip) return;\n var _this$props = this.props,\n threshold = _this$props.threshold,\n root = _this$props.root,\n rootMargin = _this$props.rootMargin,\n trackVisibility = _this$props.trackVisibility,\n delay = _this$props.delay,\n fallbackInView = _this$props.fallbackInView;\n this._unobserveCb = observe(this.node, this.handleChange, {\n threshold: threshold,\n root: root,\n rootMargin: rootMargin,\n // @ts-ignore\n trackVisibility: trackVisibility,\n // @ts-ignore\n delay: delay\n }, fallbackInView);\n };\n\n _proto.unobserve = function unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n\n this._unobserveCb = null;\n }\n };\n\n _proto.render = function render() {\n if (!isPlainChildren(this.props)) {\n var _this$state = this.state,\n inView = _this$state.inView,\n entry = _this$state.entry;\n return this.props.children({\n inView: inView,\n entry: entry,\n ref: this.handleNode\n });\n }\n\n var _this$props2 = this.props,\n children = _this$props2.children,\n as = _this$props2.as,\n tag = _this$props2.tag,\n props = _objectWithoutPropertiesLoose(_this$props2, _excluded);\n\n return /*#__PURE__*/React.createElement(as || tag || 'div', _extends({\n ref: this.handleNode\n }, props), children);\n };\n\n return InView;\n}(React.Component);\nInView.displayName = 'InView';\nInView.defaultProps = {\n threshold: 0,\n triggerOnce: false,\n initialInView: false\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(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n threshold = _ref.threshold,\n delay = _ref.delay,\n trackVisibility = _ref.trackVisibility,\n rootMargin = _ref.rootMargin,\n root = _ref.root,\n triggerOnce = _ref.triggerOnce,\n skip = _ref.skip,\n initialInView = _ref.initialInView,\n fallbackInView = _ref.fallbackInView;\n\n var unobserve = React.useRef();\n\n var _React$useState = React.useState({\n inView: !!initialInView\n }),\n state = _React$useState[0],\n setState = _React$useState[1];\n\n var setRef = React.useCallback(function (node) {\n if (unobserve.current !== undefined) {\n unobserve.current();\n unobserve.current = undefined;\n } // Skip creating the observer\n\n\n if (skip) return;\n\n if (node) {\n unobserve.current = observe(node, function (inView, entry) {\n setState({\n inView: inView,\n entry: entry\n });\n\n if (entry.isIntersecting && triggerOnce && unobserve.current) {\n // If it should only trigger once, unobserve the element after it's inView\n unobserve.current();\n unobserve.current = undefined;\n }\n }, {\n root: root,\n rootMargin: rootMargin,\n threshold: threshold,\n // @ts-ignore\n trackVisibility: trackVisibility,\n // @ts-ignore\n delay: delay\n }, fallbackInView);\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, root, rootMargin, triggerOnce, skip, trackVisibility, fallbackInView, delay]);\n /* eslint-disable-next-line */\n\n useEffect(function () {\n if (!unobserve.current && state.entry && !triggerOnce && !skip) {\n // If we don't have a 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 });\n }\n });\n var 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, InView as default, defaultFallbackInView, observe, useInView };\n//# sourceMappingURL=react-intersection-observer.m.js.map\n"],"names":["_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_setPrototypeOf","o","p","setPrototypeOf","__proto__","observerMap","Map","RootIds","WeakMap","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","_createObserver","id","instance","thresholds","elements","observer","entries","forEach","entry","_elements$get","inView","some","trackVisibility","isVisible","Array","isArray","createObserver","callbacks","push","splice","indexOf","unobserve","size","disconnect","_excluded","isPlainChildren","props","children","InView","_React$Component","subClass","superClass","_this","node","_unobserveCb","handleNode","triggerOnce","skip","setState","initialInView","observeNode","handleChange","onChange","state","create","constructor","_proto","componentDidUpdate","prevProps","rootMargin","delay","componentWillUnmount","_this$props","render","_this$state","ref","_this$props2","as","tag","excluded","sourceKeys","_objectWithoutPropertiesLoose","React","createElement","Component","displayName","defaultProps"],"mappings":"wBAGA,SAASA,IAeP,OAdAA,EAAWC,OAAOC,QAAU,SAAUC,GACpC,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAASF,UAAUD,GAEvB,IAAK,IAAII,KAAOD,EACVN,OAAOQ,UAAUC,eAAeC,KAAKJ,EAAQC,KAC/CL,EAAOK,GAAOD,EAAOC,IAK3B,OAAOL,GAGFH,EAASY,MAAMC,KAAMR,WAU9B,SAASS,EAAgBC,EAAGC,GAM1B,OALAF,EAAkBb,OAAOgB,gBAAkB,SAAyBF,EAAGC,GAErE,OADAD,EAAEG,UAAYF,EACPD,GAGFD,EAAgBC,EAAGC,GAkB5B,IAAIG,EAAc,IAAIC,IAClBC,EAAU,IAAIC,QACdC,EAAS,EA+Bb,SAASC,EAAYC,GACnB,OAAOxB,OAAOyB,KAAKD,GAASE,OAAOC,QAAO,SAAUpB,GAClD,YAAwBqB,IAAjBJ,EAAQjB,MACdsB,KAAI,SAAUtB,GACf,OAAOA,EAAM,KAAe,SAARA,GAlBLuB,EAkBgCN,EAAQM,OAhBrDV,EAAQW,IAAID,KAChBR,GAAU,EACVF,EAAQY,IAAIF,EAAMR,EAAOW,aAFKb,EAAQc,IAAIJ,IADxB,IAiB+CN,EAAQjB,IAlB3E,IAAmBuB,KAmBdG,WAsDL,SAASE,EAAQC,EAASC,EAAUb,EAASc,GAS3C,QARgB,IAAZd,IACFA,EAAU,SAGW,IAAnBc,IACFA,EA/FmBV,gBAkGsB,IAAhCW,OAAOC,2BAA2DZ,IAAnBU,EAA8B,CACtF,IAAIG,EAASL,EAAQM,wBAUrB,OATAL,EAASC,EAAgB,CACvBK,eAAgBL,EAChBpC,OAAQkC,EACRQ,kBAAgD,iBAAtBpB,EAAQqB,UAAyBrB,EAAQqB,UAAY,EAC/EC,KAAM,EACNC,mBAAoBN,EACpBO,iBAAkBP,EAClBQ,WAAYR,IAEP,aAKT,IAAIS,EA5EN,SAAwB1B,GAEtB,IAAI2B,EAAK5B,EAAYC,GACjB4B,EAAWlC,EAAYgB,IAAIiB,GAE/B,IAAKC,EAAU,CAEb,IACIC,EADAC,EAAW,IAAInC,IAEfoC,EAAW,IAAIf,sBAAqB,SAAUgB,GAChDA,EAAQC,SAAQ,SAAUC,GACxB,IAAIC,EAIAC,EAASF,EAAMf,gBAAkBU,EAAWQ,MAAK,SAAUhB,GAC7D,OAAOa,EAAMd,mBAAqBC,KAGhCrB,EAAQsC,sBAA8C,IAApBJ,EAAMK,YAG1CL,EAAMK,UAAYH,GAG4B,OAA/CD,EAAgBL,EAASpB,IAAIwB,EAAMxD,UAA4ByD,EAAcF,SAAQ,SAAUpB,GAC9FA,EAASuB,EAAQF,WAGpBlC,GAEH6B,EAAaE,EAASF,aAAeW,MAAMC,QAAQzC,EAAQqB,WAAarB,EAAQqB,UAAY,CAACrB,EAAQqB,WAAa,IAClHO,EAAW,CACTD,GAAIA,EACJI,SAAUA,EACVD,SAAUA,GAEZpC,EAAYc,IAAImB,EAAIC,GAGtB,OAAOA,EAoCec,CAAe1C,GACjC2B,EAAKD,EAAgBC,GACrBI,EAAWL,EAAgBK,SAC3BD,EAAWJ,EAAgBI,SAG3Ba,EAAYb,EAASpB,IAAIE,IAAY,GAQzC,OANKkB,EAASvB,IAAIK,IAChBkB,EAAStB,IAAII,EAAS+B,GAGxBA,EAAUC,KAAK/B,GACfkB,EAASpB,QAAQC,GACV,WAEL+B,EAAUE,OAAOF,EAAUG,QAAQjC,GAAW,GAErB,IAArB8B,EAAU9D,SAEZiD,EAAiB,OAAElB,GACnBmB,EAASgB,UAAUnC,IAGC,IAAlBkB,EAASkB,OAEXjB,EAASkB,aACTvD,EAAoB,OAAEiC,KAK5B,IAAIuB,EAAY,CAAC,WAAY,KAAM,MAAO,cAAe,YAAa,OAAQ,aAAc,WAAY,OAAQ,kBAAmB,QAAS,gBAAiB,kBAE7J,SAASC,EAAgBC,GACvB,MAAiC,mBAAnBA,EAAMC,SAqDnB,IAACC,EAAsB,SAAUC,GA5OpC,IAAwBC,EAAUC,EA+OhC,SAASH,EAAOF,GACd,IAAIM,EAkDJ,OAhDAA,EAAQH,EAAiBrE,KAAKE,KAAMgE,IAAUhE,MACxCuE,KAAO,KACbD,EAAME,aAAe,KAErBF,EAAMG,WAAa,SAAUF,GACvBD,EAAMC,OAERD,EAAMX,YAEDY,GAASD,EAAMN,MAAMU,aAAgBJ,EAAMN,MAAMW,MAEpDL,EAAMM,SAAS,CACb5B,SAAUsB,EAAMN,MAAMa,cACtB/B,WAAO9B,KAKbsD,EAAMC,KAAOA,GAAc,KAE3BD,EAAMQ,eAGRR,EAAMS,aAAe,SAAU/B,EAAQF,GACjCE,GAAUsB,EAAMN,MAAMU,aAExBJ,EAAMX,YAGHI,EAAgBO,EAAMN,QAGzBM,EAAMM,SAAS,CACb5B,OAAQA,EACRF,MAAOA,IAIPwB,EAAMN,MAAMgB,UAEdV,EAAMN,MAAMgB,SAAShC,EAAQF,IAIjCwB,EAAMW,MAAQ,CACZjC,SAAUgB,EAAMa,cAChB/B,WAAO9B,GAEFsD,EAlSuBD,EA6OTF,GA7ODC,EA6OPF,GA5ONtE,UAAYR,OAAO8F,OAAOb,EAAWzE,WAC9CwE,EAASxE,UAAUuF,YAAcf,EAEjCnE,EAAgBmE,EAAUC,GAiS1B,IAAIe,EAASlB,EAAOtE,UAkEpB,OAhEAwF,EAAOC,mBAAqB,SAA4BC,GAElDA,EAAUC,aAAevF,KAAKgE,MAAMuB,YAAcD,EAAUpE,OAASlB,KAAKgE,MAAM9C,MAAQoE,EAAUrD,YAAcjC,KAAKgE,MAAM/B,WAAaqD,EAAUX,OAAS3E,KAAKgE,MAAMW,MAAQW,EAAUpC,kBAAoBlD,KAAKgE,MAAMd,iBAAmBoC,EAAUE,QAAUxF,KAAKgE,MAAMwB,QAC3QxF,KAAK2D,YACL3D,KAAK8E,gBAITM,EAAOK,qBAAuB,WAC5BzF,KAAK2D,YACL3D,KAAKuE,KAAO,MAGda,EAAON,YAAc,WACnB,GAAK9E,KAAKuE,OAAQvE,KAAKgE,MAAMW,KAA7B,CACA,IAAIe,EAAc1F,KAAKgE,MACnB/B,EAAYyD,EAAYzD,UACxBf,EAAOwE,EAAYxE,KACnBqE,EAAaG,EAAYH,WACzBrC,EAAkBwC,EAAYxC,gBAC9BsC,EAAQE,EAAYF,MACpB9D,EAAiBgE,EAAYhE,eACjC1B,KAAKwE,aAAejD,EAAQvB,KAAKuE,KAAMvE,KAAK+E,aAAc,CACxD9C,UAAWA,EACXf,KAAMA,EACNqE,WAAYA,EAEZrC,gBAAiBA,EAEjBsC,MAAOA,GACN9D,KAGL0D,EAAOzB,UAAY,WACb3D,KAAKwE,eACPxE,KAAKwE,eAELxE,KAAKwE,aAAe,OAIxBY,EAAOO,OAAS,WACd,IAAK5B,EAAgB/D,KAAKgE,OAAQ,CAChC,IAAI4B,EAAc5F,KAAKiF,MACnBjC,EAAS4C,EAAY5C,OACrBF,EAAQ8C,EAAY9C,MACxB,OAAO9C,KAAKgE,MAAMC,SAAS,CACzBjB,OAAQA,EACRF,MAAOA,EACP+C,IAAK7F,KAAKyE,aAId,IAAIqB,EAAe9F,KAAKgE,MACpBC,EAAW6B,EAAa7B,SACxB8B,EAAKD,EAAaC,GAClBC,EAAMF,EAAaE,IACnBhC,EAhVR,SAAuCtE,EAAQuG,GAC7C,GAAc,MAAVvG,EAAgB,MAAO,GAC3B,IAEIC,EAAKJ,EAFLD,EAAS,GACT4G,EAAa9G,OAAOyB,KAAKnB,GAG7B,IAAKH,EAAI,EAAGA,EAAI2G,EAAWzG,OAAQF,IACjCI,EAAMuG,EAAW3G,GACb0G,EAASvC,QAAQ/D,IAAQ,IAC7BL,EAAOK,GAAOD,EAAOC,IAGvB,OAAOL,EAoUO6G,CAA8BL,EAAchC,GAExD,OAAoBsC,EAAMC,cAAcN,GAAMC,GAAO,MAAO7G,EAAS,CACnE0G,IAAK7F,KAAKyE,YACTT,GAAQC,IAGNC,EA3HiB,CA4HxBkC,EAAME,WACRpC,EAAOqC,YAAc,SACrBrC,EAAOsC,aAAe,CACpBvE,UAAW,EACXyC,aAAa,EACbG,eAAe"}
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import r,{forwardRef as t}from"react";import{useTheme as n}from"styled-components";import o from"../../themes/cruk.js";import i from"../Icon/index.js";import{StyledButton as a,Spacer as m}from"./styles.js";var l=t((function(t,l){var p=n(),s=e(e({},o),p),c=t.appearance,d=void 0===c?"primary":c,f=t.isIconButton,u=void 0!==f&&f,h=r.Children.toArray(t.children),y="string"==typeof h[0],v=h[0],j=!(!u&&(1===h.length&&!y&&(null==v?void 0:v.type))!==i);return r.createElement(a,e({as:t.href?"a":"button"},t,{appearance:d,isIconButton:j,theme:s,ref:l}),t.children&&h.length?r.Children.map(t.children,(function(e,t){return r.createElement(m,{theme:s,key:t},e)})):null)}));l.defaultProps={appearance:"primary",full:!1,size:"m"};export{l as Button,l as default};
1
+ import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import r,{forwardRef as t}from"react";import{useTheme as o}from"styled-components";import n from"../../themes/cruk.js";import i from"../Icon/index.js";import{StyledButton as a,Spacer as l}from"./styles.js";var m=t((function(t,m){var p=o(),s=e(e({},n),p),c=t.appearance,f=void 0===c?"primary":c,u=t.isIconButton,d=void 0!==u&&u,h=r.Children.toArray(t.children),y="string"==typeof h[0],v=h[0],b=!(!d&&(1===h.length&&!y&&(null==v?void 0:v.type))!==i);return r.createElement(a,e({as:t.href?"a":"button"},t.href?{role:"button"}:{},t,{appearance:f,isIconButton:b,theme:s,ref:m}),t.children&&h.length?r.Children.map(t.children,(function(e,t){return r.createElement(l,{theme:s,key:t},e)})):null)}));m.defaultProps={appearance:"primary",full:!1,size:"m"};export{m as Button,m as default};
2
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";var t,e,c,a,i,l,d,u,s=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})),b=o.button(u||(u=n(["\n box-sizing: border-box;\n min-height: ",";\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 ","\n\n ","\n\n ","\n \n ","\n\n ","\n\n ","\n"],["\n box-sizing: border-box;\n min-height: ",";\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 ","\n\n ","\n\n ","\n \n ","\n\n ","\n\n ","\n"])),"3rem",(function(n){var o=n.theme;return n.isIconButton?"0":"calc( (".concat("3rem"," - ( ").concat(o.button.buttonBorderThickness," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.m)}),(function(n){return n.isIconButton?"".concat("3rem"):"auto"}),(function(n){return n.isIconButton?"".concat("3rem"):"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(a||(a=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(i||(i=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 "])),"4rem",(function(n){return n.theme.button.borderRadiusLarge}),(function(n){var o=n.theme;return n.isIconButton?"0":"calc( (".concat("4rem"," - ( ").concat(o.button.buttonBorderThickness," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.m)}),(function(n){return n.isIconButton?"".concat("4rem"):"auto"}),(function(n){return n.isIconButton?"".concat("4rem"):"auto"}))}),(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{s as Spacer,b as StyledButton};
1
+ import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o,{css as r}from"styled-components";var t,e,c,a,i,l,d,u,s=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})),b=o.button(u||(u=n(["\n box-sizing: border-box;\n min-height: ",";\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 {\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 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 {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n \n ","\n\n ","\n\n ","\n"])),"3rem",(function(n){var o=n.theme;return n.isIconButton?"0":"calc( (".concat("3rem"," - ( ").concat(o.button.buttonBorderThickness," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.m)}),(function(n){return n.isIconButton?"".concat("3rem"):"auto"}),(function(n){return n.isIconButton?"".concat("3rem"):"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(a||(a=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(i||(i=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 "])),"4rem",(function(n){return n.theme.button.borderRadiusLarge}),(function(n){var o=n.theme;return n.isIconButton?"0":"calc( (".concat("4rem"," - ( ").concat(o.button.buttonBorderThickness," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.m)}),(function(n){return n.isIconButton?"".concat("4rem"):"auto"}),(function(n){return n.isIconButton?"".concat("4rem"):"auto"}))}),(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{s as Spacer,b as StyledButton};
2
2
  //# sourceMappingURL=styles.js.map
@@ -0,0 +1,2 @@
1
+ import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import t from"react";import{ButtonWrapper as l,DotContainer as n,Dot as r,ScreenReaderOnly as o,CarouselButton as c,VerticalAlign as a}from"./styles.js";var i=function(l){return t.createElement("div",null,t.createElement(c,e({},l,{"aria-label":"previous"}),t.createElement(a,null,"◄",t.createElement(o,null,"Scroll carousel to previous index"))))},u=function(l){return t.createElement("div",null,t.createElement(c,e({},l,{"aria-label":"next"}),t.createElement(a,null,"►",t.createElement(o,null,"Scroll carousel to previous index"))))},m=function(e){var c=e.count,a=e.currentPosition,m=void 0===a?0:a,s=e.scrollToPosition,d=e.next,E=e.previous,f=m!==c-1,v=0!==m,p=Array.from({length:c},(function(e,t){return"arrayIndex".concat(t)}));return t.createElement(l,null,t.createElement(i,{disabled:!v,onClick:E}),t.createElement(n,{count:c},p.map((function(e,l){var n=l===m;return t.createElement(r,{key:e,selected:n,role:"switch","aria-checked":n,onClick:function(){s(l)}},t.createElement(o,null,"Scroll carousel to index ".concat(l)))}))),t.createElement(u,{disabled:!f,onClick:d}))};export{i as CarouselLeftButton,u as CarouselRightButton,m as Dots,m as default};
2
+ //# sourceMappingURL=Dots.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dots.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import e,{memo as r,useState as t,useRef as n,useEffect as o}from"react";import{InView as l}from"../../../node_modules/react-intersection-observer/react-intersection-observer.m.js";import i from"../Box/index.js";import{Dots as c}from"./Dots.js";import{CarouselWrapper as s,CarouselScrollArea as a,CarouselCard as u,CarouselCardInner as m}from"./styles.js";var f=function(r){var f=r.startPosition,d=void 0===f?0:f,h=r.children,v=r.onPositionChanged,g=r.shrinkUnselectedPages,E=void 0!==g&&g,p=t(d),P=p[0],x=p[1],y=t(!0),C=y[0],j=y[1],T=n(null),b=e.Children.toArray(h).filter(Boolean),k=function(e){if(T&&T.current){var r=T.current.scrollWidth,t=0===e,n=e===T.current.children.length-1,o=T.current.children[e];if(!o)return;var l=o.offsetLeft;t?T.current.scrollTo(0,0):n?T.current.scrollTo(r,0):T.current.scrollTo(l,0),C||j(!0)}};o((function(){0!==d&&j(!1)}),[d]),o((function(){!1===C&&k(d)}),[C]);var B=1===b.length;return e.createElement(e.Fragment,null,e.createElement(i,null,e.createElement(s,null,e.createElement(a,{ref:T,"aria-live":"assertive",smoothScrolling:C,tabIndex:0},b.map((function(r,t){var n=t===P;return e.createElement(u,{key:t,onlyChild:B},e.createElement(l,{threshold:.5,as:"div",onChange:function(e){var r;e&&P!==(r=t)&&(x(r),v&&v(r))}},e.createElement(m,{onlyChild:B,isSelected:n,shrinkUnselectedPages:E},r)))}))))),b.length>1?e.createElement(i,null,e.createElement(c,{count:b.length,currentPosition:P,scrollToPosition:k,next:function(){k(P+1)},previous:function(){k(P-1)}})):null)},d=r(f);export{f as Carousel,d as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import e from"styled-components";var o,t,r,i,a,s,l,c,d,p,h=e.div(o||(o=n(["\n position: relative;\n width: 100%;\n overflow-y: hidden;\n"],["\n position: relative;\n width: 100%;\n overflow-y: hidden;\n"]))),m=e.ul(t||(t=n(["\n position: relative;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n scroll-behavior: ",";\n -webkit-overflow-scrolling: touch;\n white-space: nowrap;\n padding-left: 0;\n padding-right: 0;\n padding-bottom: 20px;\n margin-bottom: -20px;\n height: 100%;\n"],["\n position: relative;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n scroll-behavior: ",";\n -webkit-overflow-scrolling: touch;\n white-space: nowrap;\n padding-left: 0;\n padding-right: 0;\n padding-bottom: 20px;\n margin-bottom: -20px;\n height: 100%;\n"])),(function(n){return n.smoothScrolling?"smooth":"auto"})),u=e.li(r||(r=n(["\n scroll-snap-align: center;\n display: inline-block;\n width: ",";\n"],["\n scroll-snap-align: center;\n display: inline-block;\n width: ",";\n"])),(function(n){return n.onlyChild?"100%":"80%"})),f=e.div(i||(i=n(["\n transition: transform 0.2s linear;\n transform: ",";\n"],["\n transition: transform 0.2s linear;\n transform: ",";\n"])),(function(n){var e=n.isSelected,o=n.shrinkUnselectedPages;return n.onlyChild||e&&o?"scale(1)":"scale(0.9)"})),g=e.div(a||(a=n(["\n display: flex;\n justify-content: center;\n"],["\n display: flex;\n justify-content: center;\n"]))),b=e.span(s||(s=n(["\n display: block;\n margin: auto;\n height: 2rem;\n line-height: 1.75rem;\n"],["\n display: block;\n margin: auto;\n height: 2rem;\n line-height: 1.75rem;\n"]))),x=e.button(l||(l=n(["\n height: 100%;\n cursor: pointer;\n background-color: rgba(255, 255, 255, 0);\n border: none;\n /* TODO if this makes it into the component library carouselButtonColor should be a theme prop */\n color: ",";\n font-size: ",";\n font-weight: 600;\n transition: color 0.3s ease, transform 0.3s ease;\n max-width: 3rem;\n padding: 0;\n vertical-align: middle;\n user-select: none;\n\n transform: scale(0.8);\n &:hover {\n transform: ",";\n }\n"],["\n height: 100%;\n cursor: pointer;\n background-color: rgba(255, 255, 255, 0);\n border: none;\n /* TODO if this makes it into the component library carouselButtonColor should be a theme prop */\n color: ",";\n font-size: ",";\n font-weight: 600;\n transition: color 0.3s ease, transform 0.3s ease;\n max-width: 3rem;\n padding: 0;\n vertical-align: middle;\n user-select: none;\n\n transform: scale(0.8);\n &:hover {\n transform: ",";\n }\n"])),(function(n){var e=n.disabled,o=n.theme;return e?o.colors.disabled:"su2c"===o.name?o.colors.textDark:o.colors.primary}),(function(n){return n.theme.fontSizes.xxxl}),(function(n){return n.disabled?"scale(0.8)":"scale(1)"})),w=e.div(c||(c=n(["\n display: flex;\n flex-direction: row;\n justify-content: center;\n display: ",";\n\n @media (min-width: ",") {\n display: ",";\n }\n\n @media (min-width: ",") {\n display: ",";\n }\n"],["\n display: flex;\n flex-direction: row;\n justify-content: center;\n display: ",";\n\n @media (min-width: ",") {\n display: ",";\n }\n\n @media (min-width: ",") {\n display: ",";\n }\n"])),(function(n){return n.count>6?"none":"flex"}),(function(n){return n.theme.breakpoint.tablet}),(function(n){return n.count>10?"none":"flex"}),(function(n){return n.theme.breakpoint.desktop}),(function(n){return n.count>20?"none":"flex"})),y=e.button(d||(d=n(["\n border: none;\n outline-offset: ",";\n padding: 0;\n margin: ",";\n width: ",";\n height: ",";\n border-radius: 50%;\n /* TODO if this makes it into the component library carouselButtonColor should be a theme prop */\n border: ",";\n background-color: ",";\n user-select: none;\n transition: background-color 0.3s ease, transform 0.3s ease;\n transform: scale(0.8);\n &:hover {\n transform: scale(1);\n }\n"],["\n border: none;\n outline-offset: ",";\n padding: 0;\n margin: ",";\n width: ",";\n height: ",";\n border-radius: 50%;\n /* TODO if this makes it into the component library carouselButtonColor should be a theme prop */\n border: ",";\n background-color: ",";\n user-select: none;\n transition: background-color 0.3s ease, transform 0.3s ease;\n transform: scale(0.8);\n &:hover {\n transform: scale(1);\n }\n"])),(function(n){return n.theme.spacing.xxs}),(function(n){var e=n.theme;return"auto ".concat(e.spacing.xxs)}),(function(n){return n.theme.fontSizes.l}),(function(n){return n.theme.fontSizes.l}),(function(n){var e=n.theme;return"solid 1px ".concat("su2c"===e.name?e.colors.textDark:e.colors.primary)}),(function(n){var e=n.theme;return n.selected?"".concat("su2c"===e.name?e.colors.textDark:e.colors.primary):e.colors.backgroundLight})),v=e.span(p||(p=n(["\n border: 0px;\n clip: rect(0px, 0px, 0px, 0px);\n height: 1px;\n margin-bottom: -1px;\n margin-right: -1px;\n overflow: hidden;\n padding: 0px;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n"],["\n border: 0px;\n clip: rect(0px, 0px, 0px, 0px);\n height: 1px;\n margin-bottom: -1px;\n margin-right: -1px;\n overflow: hidden;\n padding: 0px;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n"])));export{g as ButtonWrapper,x as CarouselButton,u as CarouselCard,f as CarouselCardInner,m as CarouselScrollArea,h as CarouselWrapper,y as Dot,w as DotContainer,v as ScreenReaderOnly,b as VerticalAlign};
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import r,{css as o}from"styled-components";import{Text as e}from"../Text/index.js";import t from"../Icon/index.js";var a,i,c,s=r(t)(a||(a=n(["\n margin-right: ",";\n"],["\n margin-right: ",";\n"])),(function(n){return n.theme.spacing.xxs})),u=r(e)(c||(c=n(["\n transition: color 0.2s ease, background-size 0.3s ease;\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 &: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 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 &:hover {\n cursor: pointer;\n background-size: 100% 100%;\n color: ",";\n }\n"])),(function(n){var r=n.theme,o=r.colors,e=r.utilities.useBackgroundStyleLinks,t=n.textColor,a=n.appearance;return t&&void 0!==o[t]?o[t]:t||(!a&&e?"currentColor":a&&"primary"===a?o.secondary:o.linkColor)}),(function(n){var r=n.appearance,o=n.theme.typography.linkTextDecoration;return"primary"===r||"secondary"===r?"none":o}),(function(n){var r=n.theme;return r.utilities.useBackgroundStyleLinks?r.typography.fontWeightHeavy:r.typography.fontWeightMedium}),(function(n){var r=n.appearance,o=n.theme;return n.theme.utilities.useBackgroundStyleLinks&&!r?"linear-gradient(180deg, rgba(255, 255, 255, 0) 0px, ".concat(o.colors.primary," -4px);"):void 0}),(function(r){var e=r.appearance,t=r.theme.typography.fontWeightHeavy;return("primary"===e||"secondary"===e)&&o(i||(i=n(["\n font-weight: ",";\n "],["\n font-weight: ",";\n "])),t)}),(function(n){var r=n.theme,o=r.colors,e=r.utilities.useBackgroundStyleLinks,t=n.textHoverColor;return!t&&e?o.textDark:t&&void 0!==o[t]?o[t]:t||o.linkColorHover}));export{s as ChevyWithLevee,u as StyledLink};
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"../Icon/index.js";var a,i,c,s=o(t)(a||(a=n(["\n margin-right: ",";\n"],["\n margin-right: ",";\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 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 {\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 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 {\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.secondary: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.fontWeightMedium}),(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;return!t&&e?r.textDark:t&&void 0!==r[t]?r[t]:t||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 &:focus,\n &:active,\n &:visited {\n text-decoration: none;\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 &:hover {\n opacity: 0.88;\n text-decoration: underline;\n }\n &:focus,\n &:active,\n &:visited {\n text-decoration: none;\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 &:hover {\n background-color: transparent;\n text-decoration: underline;\n }\n &:focus,\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 &:hover {\n background-color: transparent;\n text-decoration: underline;\n }\n &:focus,\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 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 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};
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 &:focus,\n &:active,\n &:visited {\n text-decoration: none;\n }\n\n &:focus {\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 &:hover {\n opacity: 0.88;\n text-decoration: underline;\n }\n &:focus,\n &:active,\n &:visited {\n text-decoration: none;\n }\n\n &:focus {\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 &:hover {\n background-color: transparent;\n text-decoration: underline;\n }\n &:focus,\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 &:hover {\n background-color: transparent;\n text-decoration: underline;\n }\n &:focus,\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 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 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
- import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import t from"react";import{useTheme as r,ThemeProvider as l}from"styled-components";import c from"../../themes/cruk.js";import{ProgressBarWrapper as a,CircularWrapper as n,CircularLeft as o,CircularColorFill as m,CircularRight as s,CircularValue as i,LineProgressBarWrapper as p,LineProgressBar as u,ScreenReaderOnly as E}from"./styles.js";var f=function(f){var b=f.percentage,C=void 0===b?0:b,d=f.isCircular,g=f.circleContents,N=f.circleSize,h=f.barColor,j=f.children,v=r(),y=e(e({},c),v),x=C,z="".concat(Number.isNaN(x)?"0":x,"%"),S="".concat("string"==typeof g?g:""," ").concat(z,"% Complete"),k=g||z;return t.createElement(l,{theme:y},t.createElement(a,null,d?t.createElement(n,{percentage:x,circleSize:N||"90px"},t.createElement(o,{className:"Left"},t.createElement(m,{barColor:h})),t.createElement(s,{className:"Right"},t.createElement(m,{barColor:h})),t.createElement(i,null,k)):t.createElement(p,null,t.createElement(u,{percentage:x>100?100:x,barColor:h}),t.createElement(E,null,S)),j))};export{f as default};
1
+ import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import r from"react";import{useTheme as t,ThemeProvider as o}from"styled-components";import a from"../../themes/cruk.js";import{ProgressBarWrapper as c,CircularWrapper as n,CircleSvg as s,EmptyCircle as l,FullCircle as m,CircularValue as i,LineProgressBarWrapper as f,LineProgressBar as d,ScreenReaderOnly as p}from"./styles.js";var h=function(h){var y=h.percentage,E=void 0===y?0:y,u=h.isCircular,k=h.circleContents,b=h.circleSize,C=h.barColor,g=h.secondaryBarColor,x=h.secondaryPercentage,D=h.children,N=t(),v=e(e({},a),N),S=Number.isNaN(E)?0:E,j=S>100?100:S,I="".concat(S,"%"),P=x&&!Number.isNaN(x)?x:0,W=P>100?100:P,z="".concat("string"==typeof k?k:""," ").concat(I,"% Complete"),B=k||I,w=58,M=2*Math.PI*w;return r.createElement(o,{theme:v},r.createElement(c,null,u?r.createElement(n,{circleSize:b||"90px"},r.createElement(s,{viewBox:"0 0 ".concat(128," ").concat(128)},r.createElement(l,{cx:64,cy:64,r:w,strokeWidth:6}),r.createElement(m,{isSecondary:!0,barColor:g,cx:64,cy:64,r:w,strokeWidth:6,strokeDasharray:M,strokeDashoffset:M*(1-W/100),strokeDashoffsetInit:M}),r.createElement(m,{barColor:C,cx:64,cy:64,r:w,strokeWidth:6,strokeDasharray:M,strokeDashoffset:M*(1-j/100),strokeDashoffsetInit:M})),r.createElement(i,null,B)):r.createElement(f,{percentage:j,secondaryPercentage:W},r.createElement(d,{isSecondary:!0,percentage:W,barColor:g}),r.createElement(d,{percentage:j,barColor:C}),r.createElement(p,null,z)),D))};export{h 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 t,{css as r,keyframes as e}from"styled-components";var o,i,a,s,d,l,h,g,c,f,u,p,b,m,w,x,v=t.div(o||(o=n(["\n margin-top: 15px;\n"],["\n margin-top: 15px;\n"]))),k=r(i||(i=n(["\n height: 15px;\n margin-bottom: 0;\n background-color: ",";\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n"],["\n height: 15px;\n margin-bottom: 0;\n background-color: ",";\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n"])),(function(n){return n.theme.colors.progressBarBackground})),z=t.div(a||(a=n(["\n ",";\n"],["\n ",";\n"])),k),y=t.div(d||(d=n(["\n float: left;\n width: 1%;\n height: 100%;\n font-size: ",";\n line-height: ",";\n color: ",";\n text-align: center;\n background-color: ",";\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n transition: width 0.6s ease;\n position: relative;\n\n ","\n"],["\n float: left;\n width: 1%;\n height: 100%;\n font-size: ",";\n line-height: ",";\n color: ",";\n text-align: center;\n background-color: ",";\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n transition: width 0.6s ease;\n position: relative;\n\n ","\n"])),(function(n){return n.theme.fontSizes.s}),(function(n){return n.theme.typography.lineHeight}),(function(n){return n.theme.colors.textLight}),(function(n){var t=n.barColor,r=n.theme.colors.progressBar;return t||r}),(function(t){return t.percentage&&r(s||(s=n(["\n width: ","%;\n "],["\n width: ","%;\n "])),t.percentage)})),S=t.span(l||(l=n(["\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n"],["\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n"]))),B=t.span(h||(h=n(["\n width: 100%;\n height: 100%;\n background: none;\n border-width: ",";\n border-style: solid;\n position: absolute;\n top: 0;\n border-color: ",";\n"],["\n width: 100%;\n height: 100%;\n background: none;\n border-width: ",";\n border-style: solid;\n position: absolute;\n top: 0;\n border-color: ",";\n"])),"4px",(function(n){var t=n.barColor,r=n.theme.colors.circularProgress;return t||r})),j=t.span(g||(g=n(["\n left: 0;\n\n "," {\n left: 100%;\n border-top-right-radius: 100vw;\n border-bottom-right-radius: 100vw;\n border-left: 0;\n -webkit-transform-origin: center left;\n transform-origin: center left;\n }\n"],["\n left: 0;\n\n "," {\n left: 100%;\n border-top-right-radius: 100vw;\n border-bottom-right-radius: 100vw;\n border-left: 0;\n -webkit-transform-origin: center left;\n transform-origin: center left;\n }\n"])),B),C=t.span(c||(c=n(["\n right: 0;\n\n "," {\n left: -100%;\n border-top-left-radius: 100vw;\n border-bottom-left-radius: 100vw;\n border-right: 0;\n -webkit-transform-origin: center right;\n transform-origin: center right;\n }\n"],["\n right: 0;\n\n "," {\n left: -100%;\n border-top-left-radius: 100vw;\n border-bottom-left-radius: 100vw;\n border-right: 0;\n -webkit-transform-origin: center right;\n transform-origin: center right;\n }\n"])),B),P=function(t){var r=t.percentage;return e(f||(f=n(["\n 0% { transform: rotate(0deg); }\n 100% {\n transform: rotate(","deg);\n }\n"],["\n 0% { transform: rotate(0deg); }\n 100% {\n transform: rotate(","deg);\n }\n"])),r>50?"180":3.6*r)},D=function(t){var r=t.percentage;return e(u||(u=n(["\n 0% { transform: rotate(0deg); }\n 100% {\n transform: rotate(","deg);\n }\n"],["\n 0% { transform: rotate(0deg); }\n 100% {\n transform: rotate(","deg);\n }\n"])),r>100?"180":3.6*r-180)},H=t.div(w||(w=n(["\n ",";\n\n width: ",";\n height: ",';\n background: none;\n margin: 0 auto;\n box-shadow: none;\n position: relative;\n\n &:after {\n content: "";\n width: 100%;\n height: 100%;\n border-radius: 50%;\n border: ',";\n position: absolute;\n top: 0;\n left: 0;\n z-index: 0;\n }\n > span {\n width: 50%;\n height: 100%;\n overflow: hidden;\n position: absolute;\n top: 0;\n z-index: 1;\n }\n\n ",";\n ",";\n ",";\n"],["\n ",";\n\n width: ",";\n height: ",';\n background: none;\n margin: 0 auto;\n box-shadow: none;\n position: relative;\n\n &:after {\n content: "";\n width: 100%;\n height: 100%;\n border-radius: 50%;\n border: ',";\n position: absolute;\n top: 0;\n left: 0;\n z-index: 0;\n }\n > span {\n width: 50%;\n height: 100%;\n overflow: hidden;\n position: absolute;\n top: 0;\n z-index: 1;\n }\n\n ",";\n ",";\n ",";\n"])),k,(function(n){return n.circleSize}),(function(n){return n.circleSize}),(function(n){var t=n.theme.colors.circularProgressBackground;return"".concat("4px"," solid ").concat(t)}),(function(t){return t.percentage<51&&r(p||(p=n(["\n "," "," {\n animation: "," 0.5s linear forwards;\n }\n "],["\n "," "," {\n animation: "," 0.5s linear forwards;\n }\n "])),C,B,P)}),(function(t){return t.percentage>50&&r(b||(b=n(["\n "," "," {\n animation: "," 0.5s linear forwards;\n }\n "," "," {\n animation: "," 0.5s linear forwards 0.5s;\n }\n "],["\n "," "," {\n animation: "," 0.5s linear forwards;\n }\n "," "," {\n animation: "," 0.5s linear forwards 0.5s;\n }\n "])),C,B,P,j,B,D)}),(function(t){return t.percentage>=100&&r(m||(m=n(["\n "," "," {\n animation: "," 0.5s linear forwards;\n }\n "," "," {\n animation: "," 0.5s linear forwards 0.5s;\n }\n "],["\n "," "," {\n animation: "," 0.5s linear forwards;\n }\n "," "," {\n animation: "," 0.5s linear forwards 0.5s;\n }\n "])),C,B,P,j,B,D)})),L=t.div(x||(x=n(["\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n z-index: 2;\n font-size: ",";\n line-height: ",";\n text-align: center;\n height: 100%;\n color: ",";\n"],["\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n z-index: 2;\n font-size: ",";\n line-height: ",";\n text-align: center;\n height: 100%;\n color: ",";\n"])),(function(n){return n.theme.fontSizes.l}),(function(n){return n.theme.fontSizes.l}),(function(n){return n.theme.colors.textDark}));export{B as CircularColorFill,j as CircularLeft,C as CircularRight,L as CircularValue,H as CircularWrapper,y as LineProgressBar,z as LineProgressBarWrapper,v as ProgressBarWrapper,S as ScreenReaderOnly};
1
+ import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import t,{css as o,keyframes as e}from"styled-components";var r,i,s,a,c,h,d,p,l,u,f,g,b,x,m,k=function(t){var o=t.strokeDashoffsetInit,i=t.strokeDashoffset;return e(r||(r=n(["\n 0% {\n stroke-dashoffset: "," ;\n }\n 50% {\n stroke-dashoffset: "," ;\n }\n 100% {\n stroke-dashoffset: "," ;\n }\n"],["\n 0% {\n stroke-dashoffset: "," ;\n }\n 50% {\n stroke-dashoffset: "," ;\n }\n 100% {\n stroke-dashoffset: "," ;\n }\n"])),o,i,i)},w=function(t){var o=t.strokeDashoffsetInit,r=t.strokeDashoffset;return e(i||(i=n(["\n 0% {\n stroke-dashoffset: "," ;\n }\n 100% {\n stroke-dashoffset: "," ;\n }\n"],["\n 0% {\n stroke-dashoffset: "," ;\n }\n 100% {\n stroke-dashoffset: "," ;\n }\n"])),o,r)},y=function(){return e(s||(s=n(["\n 0% {\n width: 0px;\n height: 0px;\n opacity: 0;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n width: 64px;\n height: 64px;\n right: -32px;\n }\n"],["\n 0% {\n width: 0px;\n height: 0px;\n opacity: 0;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n width: 64px;\n height: 64px;\n right: -32px;\n }\n"])))},v=function(){return e(a||(a=n(["\n 0% {\n transform: scale(1);\n border-radius: 0px;\n\n }\n 50% {\n transform:scale(1.025);\n }\n 100% {\n transform: scale(1);\n border-radius: 0px;\n }\n"],["\n 0% {\n transform: scale(1);\n border-radius: 0px;\n\n }\n 50% {\n transform:scale(1.025);\n }\n 100% {\n transform: scale(1);\n border-radius: 0px;\n }\n"])))},S=t.div(c||(c=n(["\n margin-top: ",";\n"],["\n margin-top: ",";\n"])),"16px"),z=t.div(d||(d=n(["\n position: relative;\n height: ",";\n margin-bottom: 0;\n background-color: ",";\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n\n ","\n"],["\n position: relative;\n height: ",";\n margin-bottom: 0;\n background-color: ",";\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n\n ","\n"])),"16px",(function(n){return n.theme.colors.progressBarBackground}),(function(t){var e=t.percentage,r=t.secondaryPercentage;return(100===e||100===r)&&o(h||(h=n(["\n animation: "," 0.3s 0.5s 1 ease-out;\n "],["\n animation: "," 0.3s 0.5s 1 ease-out;\n "])),v)})),B=t.div(l||(l=n(["\n position: absolute;\n left: 0;\n height: ",";\n background-color: ",";\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n transition: width 0.6s ease;\n width: ",'%;\n\n &::before {\n content: "";\n display: inline-block;\n position: absolute;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 0px;\n height: 0px;\n border-radius: 50%;\n opacity: 0;\n filter: blur(2px);\n background-color: ',";\n\n ","\n }\n"],["\n position: absolute;\n left: 0;\n height: ",";\n background-color: ",";\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n transition: width 0.6s ease;\n width: ",'%;\n\n &::before {\n content: "";\n display: inline-block;\n position: absolute;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 0px;\n height: 0px;\n border-radius: 50%;\n opacity: 0;\n filter: blur(2px);\n background-color: ',";\n\n ","\n }\n"])),"16px",(function(n){var t=n.barColor,o=n.isSecondary,e=n.theme.colors,r=e.progressBar,i=e.progressBarSecondary;return t||o?i:r}),(function(n){return n.percentage}),(function(n){var t=n.barColor,o=n.isSecondary,e=n.theme.colors,r=e.progressBar,i=e.progressBarSecondary;return t||o?i:r}),(function(t){return 100===t.percentage&&o(p||(p=n(["\n animation: "," 0.33s 0.75s 3 ease-in;\n "],["\n animation: "," 0.33s 0.75s 3 ease-in;\n "])),y)})),D=t.span(u||(u=n(["\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n"],["\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n"]))),C=t.div(f||(f=n(["\n position: relative;\n width: ",";\n height: ",";\n background: none;\n margin: 0 auto;\n box-shadow: none;\n"],["\n position: relative;\n width: ",";\n height: ",";\n background: none;\n margin: 0 auto;\n box-shadow: none;\n"])),(function(n){return n.circleSize}),(function(n){return n.circleSize})),j=t.svg(g||(g=n(["\n position: absolute;\n transform: rotate(-90deg);\n fill: none;\n stroke-linecap: round;\n width: 100%;\n height: 100%;\n"],["\n position: absolute;\n transform: rotate(-90deg);\n fill: none;\n stroke-linecap: round;\n width: 100%;\n height: 100%;\n"]))),P=t.circle(b||(b=n(["\n stroke: ",";\n"],["\n stroke: ",";\n"])),(function(n){return n.theme.tokenColors.grey_200})),I=t.circle(x||(x=n(["\n stroke: ",";\n animation: ","\n 1s linear;\n"],["\n stroke: ",";\n animation: ","\n 1s linear;\n"])),(function(n){var t=n.isSecondary,o=n.barColor,e=n.theme.colors,r=e.circularProgress,i=e.circularProgressSecondary;return o||t?i:r}),(function(n){return n.isSecondary?w:k})),_=t.div(m||(m=n(["\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n z-index: 2;\n font-size: ",";\n line-height: ",";\n text-align: center;\n height: 100%;\n color: ",";\n"],["\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n z-index: 2;\n font-size: ",";\n line-height: ",";\n text-align: center;\n height: 100%;\n color: ",";\n"])),(function(n){return n.theme.fontSizes.l}),(function(n){return n.theme.fontSizes.l}),(function(n){return n.theme.colors.textDark}));export{j as CircleSvg,_ as CircularValue,C as CircularWrapper,P as EmptyCircle,I as FullCircle,B as LineProgressBar,z as LineProgressBarWrapper,S as ProgressBarWrapper,D as ScreenReaderOnly};
2
2
  //# sourceMappingURL=styles.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import t from"react";import{useTheme as r}from"styled-components";import{formatMoneyWithCommas as m,calculatePercentRounded as n}from"../../utils/Helper.js";import l from"../../themes/cruk.js";import{Text as a}from"../Text/index.js";import o from"../Badge/index.js";import i from"../Box/index.js";import{TotaliserWrapper as c,CompactWrapper as s,Summary as p,BubbleWrapper as u,BubbleText as d,Total as E,GiftAid as f,ProgressBarWrapper as g,StyledProgressBar as h}from"./styles.js";var x=function(x){var j=x.total,v=x.giftAid,y=x.target,B=void 0===y?null:y,C=x.isCompact,b=x.summaryMessage,A=void 0===b?void 0:b,H=x.children,T=r(),k=e(e({},l),T),z=n(+j,B||0),G=n(+j,B||0),M="".concat(G,"% of the £").concat(m(B||0)," target");return t.createElement(c,{isCompact:C||!1,theme:k},C?t.createElement(s,{theme:k},t.createElement(i,{marginHorizontal:"none",marginRight:"xxs",marginBottom:"none"},t.createElement(o,null,"£".concat(m(j)))),null!==B&&t.createElement(p,null,t.createElement(a,{as:"span"},M))):t.createElement(u,{theme:k},t.createElement(d,null,"Total raised"),t.createElement(E,null,"£",m(j)),t.createElement(f,null,"+ £",m(v||0)," Gift Aid")),(!!B||!!A)&&t.createElement(g,{isCompact:C||!1,theme:k},t.createElement(h,{theme:k,percentage:z}),!C&&(A?t.createElement(p,null,A):t.createElement(p,null,t.createElement(a,{as:"span"},M)))),H)};export{x as default};
1
+ import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import t from"react";import{useTheme as r}from"styled-components";import{formatMoneyWithCommas as n,calculatePercentRounded as m}from"../../utils/Helper.js";import a from"../../themes/cruk.js";import{Text as l}from"../Text/index.js";import o from"../Badge/index.js";import i from"../Box/index.js";import{TotaliserWrapper as c,CompactWrapper as s,Summary as d,BubbleWrapper as p,BubbleText as u,Total as E,GiftAid as f,ProgressBarWrapper as g,StyledProgressBar as h}from"./styles.js";var x=function(x){var j=x.total,v=x.additionalAmount,y=x.giftAid,A=x.target,B=void 0===A?null:A,C=x.isCompact,b=x.summaryMessage,H=void 0===b?void 0:b,T=x.children,k=r(),z=e(e({},a),k),G=m(+j,B||0),M=m(v?+j+(v||0):0,B||0),P="".concat(G,"% of the £").concat(n(B||0)," target");return t.createElement(c,{isCompact:C||!1,theme:z},C?t.createElement(s,{theme:z},t.createElement(i,{marginHorizontal:"none",marginRight:"xxs",marginBottom:"none"},t.createElement(o,null,"£".concat(n(j)))),null!==B&&t.createElement(d,null,t.createElement(l,{as:"span"},P))):t.createElement(p,{theme:z},t.createElement(u,null,"Total raised"),t.createElement(E,null,"£",n(j)),t.createElement(f,null,"+ £",n(y||0)," Gift Aid")),(!!B||!!H)&&t.createElement(g,{isCompact:C||!1,theme:z},t.createElement(h,{theme:z,percentage:G,secondaryPercentage:M}),!C&&(H?t.createElement(d,null,H):t.createElement(d,null,t.createElement(l,{as:"span"},P)))),T)};export{x 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 t,{css as o}from"styled-components";import e from"../ProgressBar/index.js";var r,i,a,l,p,m,f,s,c,d,u,g=t.div(r||(r=n(["\n text-align: center;\n background-color: ",";\n border-radius: 3.2rem;\n padding: 5px;\n position: relative;\n z-index: 10;\n\n p {\n margin: 0;\n }\n"],["\n text-align: center;\n background-color: ",";\n border-radius: 3.2rem;\n padding: 5px;\n position: relative;\n z-index: 10;\n\n p {\n margin: 0;\n }\n"])),(function(n){return n.theme.colors.totaliserBubbleColor})),y=t.div(a||(a=n(["\n padding: 0 46px 12px;\n margin-top: ",";\n position: relative;\n\n ",";\n"],["\n padding: 0 46px 12px;\n margin-top: ",";\n position: relative;\n\n ",";\n"])),(function(n){return n.theme.spacing.s}),(function(t){return!0!=!!t.isCompact&&o(i||(i=n(['\n div > div > div:after {\n content: "\\25bc";\n color: ',";\n z-index: 11;\n position: absolute;\n top: -30px;\n right: -15px;\n font-size: 32px;\n }\n "],['\n div > div > div:after {\n content: "\\\\25bc";\n color: ',";\n z-index: 11;\n position: absolute;\n top: -30px;\n right: -15px;\n font-size: 32px;\n }\n "])),(function(n){return n.theme.colors.totaliserBubbleColor}))})),x=t.p(l||(l=n(["\n color: ",";\n font-size: 2.625rem;\n line-height: 3rem;\n font-family: ",";\n text-transform: ",";\n"],["\n color: ",";\n font-size: 2.625rem;\n line-height: 3rem;\n font-family: ",";\n text-transform: ",";\n"])),(function(n){return n.theme.colors.totaliserBubbleTotalColor}),(function(n){return n.theme.typography.fontFamilyHeadings}),(function(n){return n.theme.typography.headerTextTransform})),h=t.p(p||(p=n(["\n color: ",";\n font-family: ",";\n text-transform: ",";\n"],["\n color: ",";\n font-family: ",";\n text-transform: ",";\n"])),(function(n){return n.theme.colors.totaliserBubbleTextColor}),(function(n){return n.theme.typography.fontFamilyHeadings}),(function(n){return n.theme.typography.headerTextTransform})),b=t.p(m||(m=n(["\n color: ",";\n font-family: ",";\n text-transform: ",";\n"],["\n color: ",";\n font-family: ",";\n text-transform: ",";\n"])),(function(n){return n.theme.colors.totaliserBubbleTotalColor}),(function(n){return n.theme.typography.fontFamilyHeadings}),(function(n){return n.theme.typography.headerTextTransform})),v=t.span(f||(f=n(["\n display: block;\n text-align: right;\n margin-top: 12px;\n margin-bottom: 0;\n font-family: ",";\n"],["\n display: block;\n text-align: right;\n margin-top: 12px;\n margin-bottom: 0;\n font-family: ",";\n"])),(function(n){return n.theme.typography.fontFamilyBase})),T=t.div(c||(c=n(["\n font-family: ",";\n margin: 0;\n ","\n"],["\n font-family: ",";\n margin: 0;\n ","\n"])),(function(n){return n.theme.typography.fontFamilyHeadings}),(function(t){return t.isCompact&&o(s||(s=n(["\n "," {\n border: none;\n padding: 0;\n }\n "],["\n "," {\n border: none;\n padding: 0;\n }\n "])),y)})),z=t.div(d||(d=n(["\n justify-content: space-between;\n display: flex;\n"],["\n justify-content: space-between;\n display: flex;\n"]))),B=t(e)(u||(u=n([""],[""])));export{h as BubbleText,g as BubbleWrapper,z as CompactWrapper,b as GiftAid,y as ProgressBarWrapper,B as StyledProgressBar,v as Summary,x as Total,T as TotaliserWrapper};
1
+ import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import t,{css as o}from"styled-components";import e from"../ProgressBar/index.js";var r,i,a,l,p,m,f,s,c,d,u,g=t.div(r||(r=n(["\n text-align: center;\n background-color: ",";\n border-radius: 3.2rem;\n padding: 5px;\n position: relative;\n z-index: 10;\n\n p {\n margin: 0;\n }\n"],["\n text-align: center;\n background-color: ",";\n border-radius: 3.2rem;\n padding: 5px;\n position: relative;\n z-index: 10;\n\n p {\n margin: 0;\n }\n"])),(function(n){return n.theme.colors.totaliserBubbleColor})),y=t.div(a||(a=n(["\n padding: 0 46px 12px;\n margin-top: ",";\n position: relative;\n\n ",";\n"],["\n padding: 0 46px 12px;\n margin-top: ",";\n position: relative;\n\n ",";\n"])),(function(n){return n.theme.spacing.s}),(function(t){return!0!=!!t.isCompact&&o(i||(i=n(['\n div > div > div:not(:first-child) {\n &:after {\n content: "\\25bc";\n color: ',";\n z-index: 11;\n position: absolute;\n top: -30px;\n right: -15px;\n font-size: 32px;\n }\n }\n "],['\n div > div > div:not(:first-child) {\n &:after {\n content: "\\\\25bc";\n color: ',";\n z-index: 11;\n position: absolute;\n top: -30px;\n right: -15px;\n font-size: 32px;\n }\n }\n "])),(function(n){return n.theme.colors.totaliserBubbleColor}))})),x=t.p(l||(l=n(["\n color: ",";\n font-size: 2.625rem;\n line-height: 3rem;\n font-family: ",";\n text-transform: ",";\n"],["\n color: ",";\n font-size: 2.625rem;\n line-height: 3rem;\n font-family: ",";\n text-transform: ",";\n"])),(function(n){return n.theme.colors.totaliserBubbleTotalColor}),(function(n){return n.theme.typography.fontFamilyHeadings}),(function(n){return n.theme.typography.headerTextTransform})),h=t.p(p||(p=n(["\n color: ",";\n font-family: ",";\n text-transform: ",";\n"],["\n color: ",";\n font-family: ",";\n text-transform: ",";\n"])),(function(n){return n.theme.colors.totaliserBubbleTextColor}),(function(n){return n.theme.typography.fontFamilyHeadings}),(function(n){return n.theme.typography.headerTextTransform})),b=t.p(m||(m=n(["\n color: ",";\n font-family: ",";\n text-transform: ",";\n"],["\n color: ",";\n font-family: ",";\n text-transform: ",";\n"])),(function(n){return n.theme.colors.totaliserBubbleTotalColor}),(function(n){return n.theme.typography.fontFamilyHeadings}),(function(n){return n.theme.typography.headerTextTransform})),v=t.span(f||(f=n(["\n display: block;\n text-align: right;\n margin-top: 12px;\n margin-bottom: 0;\n font-family: ",";\n"],["\n display: block;\n text-align: right;\n margin-top: 12px;\n margin-bottom: 0;\n font-family: ",";\n"])),(function(n){return n.theme.typography.fontFamilyBase})),T=t.div(c||(c=n(["\n font-family: ",";\n margin: 0;\n ","\n"],["\n font-family: ",";\n margin: 0;\n ","\n"])),(function(n){return n.theme.typography.fontFamilyHeadings}),(function(t){return t.isCompact&&o(s||(s=n(["\n "," {\n border: none;\n padding: 0;\n }\n "],["\n "," {\n border: none;\n padding: 0;\n }\n "])),y)})),z=t.div(d||(d=n(["\n justify-content: space-between;\n display: flex;\n"],["\n justify-content: space-between;\n display: flex;\n"]))),B=t(e)(u||(u=n([""],[""])));export{h as BubbleText,g as BubbleWrapper,z as CompactWrapper,b as GiftAid,y as ProgressBarWrapper,B as StyledProgressBar,v as Summary,x as Total,T as TotaliserWrapper};
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 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{Footer}from"./Footer/index.js";export{default as GlobalStyle}from"./GlobalStyle.js";export{Header}from"./Header/index.js";export{default as Heading}from"./Heading/index.js";export{default as Icon}from"./Icon/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 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 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{Footer}from"./Footer/index.js";export{default as GlobalStyle}from"./GlobalStyle.js";export{Header}from"./Header/index.js";export{default as Heading}from"./Heading/index.js";export{default as Icon}from"./Icon/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 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 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
@@ -1,2 +1,2 @@
1
- var e={contentMaxWidth:"1020px",useDefaultFocusRect:!0,useDefaultFromControls:!1,useBackgroundStyleLinks:!1,inputBorderWidth:"1px"},r={cdnPath:"https://ccp-s3.int.cruk.org/",assetPath:"https://fundraise.cancerresearchuk.org/profiles/cruk_fundraising/themes/cruk_of_bootstrap/",logoUrl:"/",logoAlt:"Cancer Research UK Giving Page",logoSrc:"https://fundraise.cancerresearchuk.org/profiles/cruk_fundraising/themes/cruk_of_bootstrap/logo.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://fundraise.cancerresearchuk.org/profiles/cruk_fundraising/themes/cruk_of_bootstrap/images/fundreg.png"},a={s:"35px",m:"50px",l:"60px",xl:"90px",path:"".concat(r.assetPath,"images/icon-avatars/")},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:"#e40074",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"},i={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,progressBar:n.darkBlue_500,progressBarBackground:n.grey_200,circularProgress:n.cyan_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,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},s={none:"0",auto:"auto",xxs:"0.5rem",xs:"1rem",s:"1.5rem",m:"2rem",l:"2.5rem",xl:"3rem",xxl:"3.5rem"},d={xs:"0.75rem",s:"0.857rem",m:"1rem",l:"1.25rem",xl:"1.5625rem",xxl:"2rem",xxxl:"2.5rem",xxxxl:"3.125rem"},g={customFonts:[{family:"MuseoSans-500",url:"https://ccp-s3.int.cruk.org/fonts/MuseoSansRounded-500"}],fontUrl:"".concat(r.cdnPath,"fonts"),fontFamilyBase:"Arial, Calibri, nimbussansl, liberationsans, freesans, clean, sans-serif",fontFamilyHeadings:"MuseoSans-500,Calibri,Arial,sans-serif",fontSizeBase:"16px",fontWeightHeavy:"700",fontWeightMedium:"500",fontWeightLight:"300",fontWeightVLight:"100",linkTextDecoration:"underline",lineHeight:"1.5em",headerLineHeight:"1.25em",headerTextTransform:"none"},u={name:"cruk",avatar:a,breakpoint:o,button:t,tokenColors:n,colors:i,spacing:s,fontSizes:d,siteConfig:r,typography:g,utilities:e};export{a as AVATAR,o as BREAKPOINT,t as BUTTON,i as COLORS,d as FONT_SIZES,r as SITE_CONFIG,s as SPACING,n as TOKEN_COLORS,g as TYPOGRAPHY,e as UTILITIES,u as default};
1
+ var e={contentMaxWidth:"1020px",useDefaultFocusRect:!0,useDefaultFromControls:!1,useBackgroundStyleLinks:!1,inputBorderWidth:"1px"},r={cdnPath:"https://ccp-s3.int.cruk.org/",assetPath:"https://fundraise.cancerresearchuk.org/profiles/cruk_fundraising/themes/cruk_of_bootstrap/",logoUrl:"/",logoAlt:"Cancer Research UK Giving Page",logoSrc:"https://fundraise.cancerresearchuk.org/profiles/cruk_fundraising/themes/cruk_of_bootstrap/logo.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://fundraise.cancerresearchuk.org/profiles/cruk_fundraising/themes/cruk_of_bootstrap/images/fundreg.png"},a={s:"35px",m:"50px",l:"60px",xl:"90px",path:"".concat(r.assetPath,"images/icon-avatars/")},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:"#e40074",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"},i={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,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,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},s={none:"0",auto:"auto",xxs:"0.5rem",xs:"1rem",s:"1.5rem",m:"2rem",l:"2.5rem",xl:"3rem",xxl:"3.5rem"},g={xs:"0.75rem",s:"0.857rem",m:"1rem",l:"1.25rem",xl:"1.5625rem",xxl:"2rem",xxxl:"2.5rem",xxxxl:"3.125rem"},d={customFonts:[{family:"MuseoSans-500",url:"https://ccp-s3.int.cruk.org/fonts/MuseoSansRounded-500"}],fontUrl:"".concat(r.cdnPath,"fonts"),fontFamilyBase:"Arial, Calibri, nimbussansl, liberationsans, freesans, clean, sans-serif",fontFamilyHeadings:"MuseoSans-500,Calibri,Arial,sans-serif",fontSizeBase:"16px",fontWeightHeavy:"700",fontWeightMedium:"500",fontWeightLight:"300",fontWeightVLight:"100",linkTextDecoration:"underline",lineHeight:"1.5em",headerLineHeight:"1.25em",headerTextTransform:"none"},u={name:"cruk",avatar:a,breakpoint:o,button:t,tokenColors:n,colors:i,spacing:s,fontSizes:g,siteConfig:r,typography:d,utilities:e};export{a as AVATAR,o as BREAKPOINT,t as BUTTON,i as COLORS,g as FONT_SIZES,r as SITE_CONFIG,s as SPACING,n as TOKEN_COLORS,d as TYPOGRAPHY,e as UTILITIES,u 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://fundraise.cancerresearchuk.org/profiles/cruk_fundraising/themes/cruk_of_bootstrap/images/su2c-logo.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:"https://fundraise.cancerresearchuk.org/profiles/cruk_fundraising/themes/cruk_of_bootstrap/images/icon-avatars/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,circularProgress:c.su2cOrange3,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",url:"https://crukorg.github.io/SU2C-drupal/assets/fonts/su2c/itc_-_itcavantgardepro-bold-webfont"}],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://fundraise.cancerresearchuk.org/profiles/cruk_fundraising/themes/cruk_of_bootstrap/images/su2c-logo.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:"https://fundraise.cancerresearchuk.org/profiles/cruk_fundraising/themes/cruk_of_bootstrap/images/icon-avatars/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",url:"https://crukorg.github.io/SU2C-drupal/assets/fonts/su2c/itc_-_itcavantgardepro-bold-webfont"}],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
package/lib/types.d.ts CHANGED
@@ -62,8 +62,10 @@ export declare type ColorsType = {
62
62
  textDark: string;
63
63
  textLight: string;
64
64
  progressBar: string;
65
+ progressBarSecondary: string;
65
66
  progressBarBackground: string;
66
67
  circularProgress: string;
68
+ circularProgressSecondary: string;
67
69
  circularProgressBackground: string;
68
70
  buttonPrimaryBackground: string;
69
71
  buttonPrimaryText: string;