@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.
- package/CHANGELOG.md +147 -0
- package/README.md +1 -1
- package/lib/cjs/node_modules/react-intersection-observer/react-intersection-observer.m.js +2 -0
- package/lib/cjs/node_modules/react-intersection-observer/react-intersection-observer.m.js.map +1 -0
- package/lib/cjs/src/components/Button/index.js +1 -1
- package/lib/cjs/src/components/Button/styles.js +1 -1
- package/lib/cjs/src/components/Carousel/Dots.js +2 -0
- package/lib/cjs/src/components/Carousel/Dots.js.map +1 -0
- package/lib/cjs/src/components/Carousel/index.js +2 -0
- package/lib/cjs/src/components/Carousel/index.js.map +1 -0
- package/lib/cjs/src/components/Carousel/styles.js +2 -0
- package/lib/cjs/src/components/Carousel/styles.js.map +1 -0
- package/lib/cjs/src/components/Link/styles.js +1 -1
- package/lib/cjs/src/components/Pagination/styles.js +1 -1
- package/lib/cjs/src/components/ProgressBar/index.js +1 -1
- package/lib/cjs/src/components/ProgressBar/styles.js +1 -1
- package/lib/cjs/src/components/Totaliser/index.js +1 -1
- package/lib/cjs/src/components/Totaliser/styles.js +1 -1
- package/lib/cjs/src/components/index.js +1 -1
- package/lib/cjs/src/themes/cruk.js +1 -1
- package/lib/cjs/src/themes/su2c.js +1 -1
- package/lib/components/Carousel/Carousel.stories.d.ts +6 -0
- package/lib/components/Carousel/Dots.d.ts +12 -0
- package/lib/components/Carousel/index.d.ts +13 -0
- package/lib/components/Carousel/styles.d.ts +30 -0
- package/lib/components/Carousel/test.cypress.d.ts +1 -0
- package/lib/components/ProgressBar/index.d.ts +5 -1
- package/lib/components/ProgressBar/styles.d.ts +20 -10
- package/lib/components/Totaliser/index.d.ts +2 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/es/node_modules/react-intersection-observer/react-intersection-observer.m.js +2 -0
- package/lib/es/node_modules/react-intersection-observer/react-intersection-observer.m.js.map +1 -0
- package/lib/es/src/components/Button/index.js +1 -1
- package/lib/es/src/components/Button/styles.js +1 -1
- package/lib/es/src/components/Carousel/Dots.js +2 -0
- package/lib/es/src/components/Carousel/Dots.js.map +1 -0
- package/lib/es/src/components/Carousel/index.js +2 -0
- package/lib/es/src/components/Carousel/index.js.map +1 -0
- package/lib/es/src/components/Carousel/styles.js +2 -0
- package/lib/es/src/components/Carousel/styles.js.map +1 -0
- package/lib/es/src/components/Link/styles.js +1 -1
- package/lib/es/src/components/Pagination/styles.js +1 -1
- package/lib/es/src/components/ProgressBar/index.js +1 -1
- package/lib/es/src/components/ProgressBar/styles.js +1 -1
- package/lib/es/src/components/Totaliser/index.js +1 -1
- package/lib/es/src/components/Totaliser/styles.js +1 -1
- package/lib/es/src/components/index.js +1 -1
- package/lib/es/src/themes/cruk.js +1 -1
- package/lib/es/src/themes/su2c.js +1 -1
- package/lib/types.d.ts +2 -0
- package/package.json +15 -15
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.6] - 2021-03-23
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Links, Pagination button/links and Buttons that have been cast as an anchor tag all show default focus outline on focus. This wasn't happening in Firefox. [#428](https://github.com/CRUKorg/cruk-react-components/issues/428)
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- Carousel component
|
|
17
|
+
- secondaryPercentage prop for Progress Bar and Totaliser
|
|
18
|
+
|
|
19
|
+
## [1.0.5] - 2021-02-09
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- Using node 16 and cypress 9.4.1
|
|
24
|
+
|
|
25
|
+
## [1.0.4] - 2021-02-02
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- Collapse focus rect SU2C needs reduced border radius [#403](https://github.com/CRUKorg/cruk-react-components/issues/403)
|
|
30
|
+
- Totaliser with custom summary has a speech bubble arrow artifact [#404](https://github.com/CRUKorg/cruk-react-components/issues/404)
|
|
31
|
+
|
|
32
|
+
## [1.0.3] - 2021-01-21
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- Moving storybook/react into dev dependencies
|
|
37
|
+
|
|
38
|
+
## [1.0.2] - 2021-01-21
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- Bumping storybook dependencies to 6.4.14
|
|
43
|
+
|
|
44
|
+
## [1.0.1] - 2021-12-01
|
|
45
|
+
|
|
46
|
+
### Removed
|
|
47
|
+
|
|
48
|
+
- "@react-theming/storybook-addon", because it was breaking storybook post 6.4
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
- Replaced all absolute paths with relative paths, not out of choice but because rollup + typescript + absolute paths leads to broken typescript definition files with absolute paths, this broke intellisense.
|
|
53
|
+
- Footer logo src and alt text configurable from theme
|
|
54
|
+
|
|
55
|
+
### Added
|
|
56
|
+
|
|
57
|
+
- New theme selector bar in storybook top bar to replace the react-theming addon
|
|
58
|
+
|
|
59
|
+
## [1.0.0] - 2021-10-18
|
|
60
|
+
|
|
61
|
+
### Changed
|
|
62
|
+
|
|
63
|
+
(BREAKING CHANGES)
|
|
64
|
+
|
|
65
|
+
- Renamed RadioGroup to RadioConsent to discorage people to use this pattern in other scenarios
|
|
66
|
+
- The old Button variant 'tertiary' has been removed and old Button variant 'text' is now Button variant 'teriary'
|
|
67
|
+
- Changed avatar name prop type from ReactNode to string
|
|
68
|
+
|
|
69
|
+
### Added
|
|
70
|
+
|
|
71
|
+
- Added aria-described by support for controlls with error messages for TextField, TextAreaField, Select, Checkbox, Radio
|
|
72
|
+
- Added isIconButton prop to Button sets the button into a round or square shape when it only contains and icon, is happening in order to deprecate Icon and use another tree shakeable icon library in its stead.
|
|
73
|
+
- Added hideRequiredInLabel prop to select to hide required in label when it is used to filter lists etc.
|
|
74
|
+
|
|
75
|
+
## [0.1.7] - 2021-10-06
|
|
76
|
+
|
|
77
|
+
### Fixed
|
|
78
|
+
|
|
79
|
+
- CRUK secondary button hover colours solution causes cypress to think something is covering/obscuring text inputs when it isn't
|
|
80
|
+
|
|
81
|
+
## [0.1.6] - 2021-10-05
|
|
82
|
+
|
|
83
|
+
### Fixed
|
|
84
|
+
|
|
85
|
+
- CRUK secondary button hover colours not accessible [#299](https://github.com/CRUKorg/cruk-react-components/issues/299)
|
|
86
|
+
- CRUK totaliser colours not accessible [#324](https://github.com/CRUKorg/cruk-react-components/issues/324)
|
|
87
|
+
|
|
88
|
+
## [0.1.5] - 2021-09-23
|
|
89
|
+
|
|
90
|
+
### Added
|
|
91
|
+
|
|
92
|
+
- Test for TextField with extra left and extra right props
|
|
93
|
+
|
|
94
|
+
### Changed
|
|
95
|
+
|
|
96
|
+
- Heading H6 tags are always 1em
|
|
97
|
+
|
|
98
|
+
### Fixed
|
|
99
|
+
|
|
100
|
+
- TextField isValid and isInvalid checks and crosses disappear when focused because of Chrome browser default styling [#298](https://github.com/CRUKorg/cruk-react-components/issues/298)
|
|
101
|
+
- Missing attributes on AddressDataType [#306](https://github.com/CRUKorg/cruk-react-components/issues/306)
|
|
102
|
+
|
|
103
|
+
## [0.1.4] - 2021-08-27
|
|
104
|
+
|
|
105
|
+
### Changed
|
|
106
|
+
|
|
107
|
+
- improved select cypress tests
|
|
108
|
+
- Checkbox and Radio focus rect box shaddow is now inset for visual fix where it appears cropped in some scenarios
|
|
109
|
+
|
|
110
|
+
### Added
|
|
111
|
+
|
|
112
|
+
- Added onPopOverIsOpenChange prop to PopOver component
|
|
113
|
+
- Added backgroundColor prop to Modal component
|
|
114
|
+
|
|
115
|
+
## [0.1.3] - 2021-08-09
|
|
116
|
+
|
|
117
|
+
### Changed
|
|
118
|
+
|
|
119
|
+
- Added Hotjar recording suppression attribute to TextField, TextAreaField and AddressLookup components
|
|
120
|
+
|
|
121
|
+
## [0.1.2] - 2021-07-20
|
|
122
|
+
|
|
123
|
+
### Added
|
|
124
|
+
|
|
125
|
+
- LegendWrapper component
|
|
126
|
+
|
|
127
|
+
### Changed
|
|
128
|
+
|
|
129
|
+
- Added hasError and errorMessage prop to Radio and Checkbox components
|
|
130
|
+
- Updated styles for the Radio and Checkbox components to reflect hasError
|
|
131
|
+
- Updated JS doc comment for Text, Link, TextField and TextAreaField components
|
|
132
|
+
- Updated ErrorText colour, font weight and spacing inside form controlls
|
|
133
|
+
- Updated AddressLookup, tab away from component and search results disappear, address results are focusable and input will no longer blur when clicking though lists of address
|
|
134
|
+
|
|
135
|
+
### Removed
|
|
136
|
+
|
|
137
|
+
### Fixed
|
|
138
|
+
|
|
139
|
+
## [0.1.1] - 2021-06-11
|
|
140
|
+
|
|
141
|
+
### Added
|
|
142
|
+
|
|
143
|
+
### Changed
|
|
144
|
+
|
|
145
|
+
### Removed
|
|
146
|
+
|
|
147
|
+
### Fixed
|
package/README.md
CHANGED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react"));function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(this,arguments)}function n(e,t){return n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}var i=new Map,o=new WeakMap,s=0;function a(e){return Object.keys(e).sort().filter((function(t){return void 0!==e[t]})).map((function(t){return t+"_"+("root"===t?(r=e.root)?(o.has(r)||(s+=1,o.set(r,s.toString())),o.get(r)):"0":e[t]);var r})).toString()}function u(e,t,r,n){if(void 0===r&&(r={}),void 0===n&&(n=undefined),void 0===window.IntersectionObserver&&void 0!==n){var o=e.getBoundingClientRect();return t(n,{isIntersecting:n,target:e,intersectionRatio:"number"==typeof r.threshold?r.threshold:0,time:0,boundingClientRect:o,intersectionRect:o,rootBounds:o}),function(){}}var s=function(e){var t=a(e),r=i.get(t);if(!r){var n,o=new Map,s=new IntersectionObserver((function(t){t.forEach((function(t){var r,i=t.isIntersecting&&n.some((function(e){return t.intersectionRatio>=e}));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=i),null==(r=o.get(t.target))||r.forEach((function(e){e(i,t)}))}))}),e);n=s.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),r={id:t,observer:s,elements:o},i.set(t,r)}return r}(r),u=s.id,c=s.observer,l=s.elements,p=l.get(e)||[];return l.has(e)||l.set(e,p),p.push(t),c.observe(e),function(){p.splice(p.indexOf(t),1),0===p.length&&(l.delete(e),c.unobserve(e)),0===l.size&&(c.disconnect(),i.delete(u))}}var c=["children","as","tag","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function l(e){return"function"!=typeof e.children}var p=function(e){var i,o;function s(t){var r;return(r=e.call(this,t)||this).node=null,r._unobserveCb=null,r.handleNode=function(e){r.node&&(r.unobserve(),e||r.props.triggerOnce||r.props.skip||r.setState({inView:!!r.props.initialInView,entry:void 0})),r.node=e||null,r.observeNode()},r.handleChange=function(e,t){e&&r.props.triggerOnce&&r.unobserve(),l(r.props)||r.setState({inView:e,entry:t}),r.props.onChange&&r.props.onChange(e,t)},r.state={inView:!!t.initialInView,entry:void 0},r}o=e,(i=s).prototype=Object.create(o.prototype),i.prototype.constructor=i,n(i,o);var a=s.prototype;return a.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())},a.componentWillUnmount=function(){this.unobserve(),this.node=null},a.observeNode=function(){if(this.node&&!this.props.skip){var e=this.props,t=e.threshold,r=e.root,n=e.rootMargin,i=e.trackVisibility,o=e.delay,s=e.fallbackInView;this._unobserveCb=u(this.node,this.handleChange,{threshold:t,root:r,rootMargin:n,trackVisibility:i,delay:o},s)}},a.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},a.render=function(){if(!l(this.props)){var e=this.state,n=e.inView,i=e.entry;return this.props.children({inView:n,entry:i,ref:this.handleNode})}var o=this.props,s=o.children,a=o.as,u=o.tag,p=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(o,c);return t.createElement(a||u||"div",r({ref:this.handleNode},p),s)},s}(t.Component);p.displayName="InView",p.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1},exports.InView=p,exports.default=p,exports.observe=u;
|
|
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":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.js"),t=require("react"),r=require("styled-components"),n=require("../../themes/cruk.js"),a=require("../Icon/index.js"),u=require("./styles.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=l(t),s=t.forwardRef((function(t,l){var s=r.useTheme(),o=e.__assign(e.__assign({},n.default),s),d=t.appearance,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.js"),t=require("react"),r=require("styled-components"),n=require("../../themes/cruk.js"),a=require("../Icon/index.js"),u=require("./styles.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=l(t),s=t.forwardRef((function(t,l){var s=r.useTheme(),o=e.__assign(e.__assign({},n.default),s),d=t.appearance,f=void 0===d?"primary":d,c=t.isIconButton,p=void 0!==c&&c,h=i.default.Children.toArray(t.children),m="string"==typeof h[0],y=h[0],_=!(!p&&(1===h.length&&!m&&(null==y?void 0:y.type))!==a.default);return i.default.createElement(u.StyledButton,e.__assign({as:t.href?"a":"button"},t.href?{role:"button"}:{},t,{appearance:f,isIconButton:_,theme:o,ref:l}),t.children&&h.length?i.default.Children.map(t.children,(function(e,t){return i.default.createElement(u.Spacer,{theme:o,key:t},e)})):null)}));s.defaultProps={appearance:"primary",full:!1,size:"m"},exports.Button=s,exports.default=s;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../../node_modules/tslib/tslib.es6.js"),o=require("styled-components");function r(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var t,e,c,a,i,l,d,s
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../../node_modules/tslib/tslib.es6.js"),o=require("styled-components");function r(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var t,e,c,a,i,l,d,u,s=r(o),b=s.default.span(t||(t=n.__makeTemplateObject(["\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})),m=s.default.button(u||(u=n.__makeTemplateObject(["\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(r){return"primary"===r.appearance&&o.css(e||(e=n.__makeTemplateObject(["\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 "])),r.theme.colors.buttonPrimaryBackground,r.theme.colors.buttonPrimaryBorder,r.theme.colors.buttonPrimaryText,r.theme.colors.buttonPrimaryBackgroundHover,r.theme.colors.buttonPrimaryBorderHover,r.theme.colors.buttonPrimaryTextHover,r.theme.colors.buttonPrimaryDisabledBackground,r.theme.colors.buttonPrimaryDisabledText,r.theme.colors.buttonPrimaryDisabledBorder)}),(function(r){return"secondary"===r.appearance&&o.css(c||(c=n.__makeTemplateObject(["\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 "])),r.theme.colors.buttonSecondaryBackground,r.theme.colors.buttonSecondaryBorder,r.theme.colors.buttonSecondaryText,r.theme.colors.buttonSecondaryBackgroundHover,r.theme.colors.buttonSecondaryBorderHover,r.theme.colors.buttonSecondaryTextHover,r.theme.colors.buttonSecondaryDisabledBackground,r.theme.colors.buttonSecondaryDisabledText,r.theme.colors.buttonSecondaryDisabledBorder)}),(function(r){return"tertiary"===r.appearance&&o.css(a||(a=n.__makeTemplateObject(["\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 "])),r.theme.colors.buttonTertiaryText,r.theme.colors.buttonTertiaryTextHover,r.theme.colors.buttonTertiaryDisabledText)}),(function(r){return"l"===r.size&&o.css(i||(i=n.__makeTemplateObject(["\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(r){return r.full&&o.css(l||(l=n.__makeTemplateObject(["\n width: 100%;\n "],["\n width: 100%;\n "])))}),(function(r){return r.css&&o.css(d||(d=n.__makeTemplateObject(["\n ","\n "],["\n ","\n "])),r.css)}));exports.Spacer=b,exports.StyledButton=m;
|
|
2
2
|
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.js"),t=require("react"),l=require("./styles.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=r(t),a=function(t){return n.default.createElement("div",null,n.default.createElement(l.CarouselButton,e.__assign({},t,{"aria-label":"previous"}),n.default.createElement(l.VerticalAlign,null,"◄",n.default.createElement(l.ScreenReaderOnly,null,"Scroll carousel to previous index"))))},u=function(t){return n.default.createElement("div",null,n.default.createElement(l.CarouselButton,e.__assign({},t,{"aria-label":"next"}),n.default.createElement(l.VerticalAlign,null,"►",n.default.createElement(l.ScreenReaderOnly,null,"Scroll carousel to previous index"))))},o=function(e){var t=e.count,r=e.currentPosition,o=void 0===r?0:r,c=e.scrollToPosition,i=e.next,s=e.previous,d=o!==t-1,f=0!==o,m=Array.from({length:t},(function(e,t){return"arrayIndex".concat(t)}));return n.default.createElement(l.ButtonWrapper,null,n.default.createElement(a,{disabled:!f,onClick:s}),n.default.createElement(l.DotContainer,{count:t},m.map((function(e,t){var r=t===o;return n.default.createElement(l.Dot,{key:e,selected:r,role:"switch","aria-checked":r,onClick:function(){c(t)}},n.default.createElement(l.ScreenReaderOnly,null,"Scroll carousel to index ".concat(t)))}))),n.default.createElement(u,{disabled:!d,onClick:i}))};exports.CarouselLeftButton=a,exports.CarouselRightButton=u,exports.Dots=o,exports.default=o;
|
|
2
|
+
//# sourceMappingURL=Dots.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dots.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../../../node_modules/react-intersection-observer/react-intersection-observer.m.js"),r=require("../Box/index.js"),n=require("./Dots.js"),l=require("./styles.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=o(e),a=function(o){var a=o.startPosition,s=void 0===a?0:a,i=o.children,c=o.onPositionChanged,d=o.shrinkUnselectedPages,f=void 0!==d&&d,h=e.useState(s),v=h[0],m=h[1],C=e.useState(!0),E=C[0],g=C[1],p=e.useRef(null),x=u.default.Children.toArray(i).filter(Boolean),y=function(e){if(p&&p.current){var t=p.current.scrollWidth,r=0===e,n=e===p.current.children.length-1,l=p.current.children[e];if(!l)return;var o=l.offsetLeft;r?p.current.scrollTo(0,0):n?p.current.scrollTo(t,0):p.current.scrollTo(o,0),E||g(!0)}};e.useEffect((function(){0!==s&&g(!1)}),[s]),e.useEffect((function(){!1===E&&y(s)}),[E]);var P=1===x.length;return u.default.createElement(u.default.Fragment,null,u.default.createElement(r.default,null,u.default.createElement(l.CarouselWrapper,null,u.default.createElement(l.CarouselScrollArea,{ref:p,"aria-live":"assertive",smoothScrolling:E,tabIndex:0},x.map((function(e,r){var n=r===v;return u.default.createElement(l.CarouselCard,{key:r,onlyChild:P},u.default.createElement(t.InView,{threshold:.5,as:"div",onChange:function(e){var t;e&&v!==(t=r)&&(m(t),c&&c(t))}},u.default.createElement(l.CarouselCardInner,{onlyChild:P,isSelected:n,shrinkUnselectedPages:f},e)))}))))),x.length>1?u.default.createElement(r.default,null,u.default.createElement(n.Dots,{count:x.length,currentPosition:v,scrollToPosition:y,next:function(){y(v+1)},previous:function(){y(v-1)}})):null)},s=e.memo(a);exports.Carousel=a,exports.default=s;
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../../node_modules/tslib/tslib.es6.js");function e(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var t,o,r,i,a,l,s,c,d,p,u=e(require("styled-components")),m=u.default.div(t||(t=n.__makeTemplateObject(["\n position: relative;\n width: 100%;\n overflow-y: hidden;\n"],["\n position: relative;\n width: 100%;\n overflow-y: hidden;\n"]))),h=u.default.ul(o||(o=n.__makeTemplateObject(["\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"})),f=u.default.li(r||(r=n.__makeTemplateObject(["\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%"})),b=u.default.div(i||(i=n.__makeTemplateObject(["\n transition: transform 0.2s linear;\n transform: ",";\n"],["\n transition: transform 0.2s linear;\n transform: ",";\n"])),(function(n){var e=n.isSelected,t=n.shrinkUnselectedPages;return n.onlyChild||e&&t?"scale(1)":"scale(0.9)"})),g=u.default.div(a||(a=n.__makeTemplateObject(["\n display: flex;\n justify-content: center;\n"],["\n display: flex;\n justify-content: center;\n"]))),x=u.default.span(l||(l=n.__makeTemplateObject(["\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"]))),y=u.default.button(s||(s=n.__makeTemplateObject(["\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,t=n.theme;return e?t.colors.disabled:"su2c"===t.name?t.colors.textDark:t.colors.primary}),(function(n){return n.theme.fontSizes.xxxl}),(function(n){return n.disabled?"scale(0.8)":"scale(1)"})),w=u.default.div(c||(c=n.__makeTemplateObject(["\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"})),k=u.default.button(d||(d=n.__makeTemplateObject(["\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=u.default.span(p||(p=n.__makeTemplateObject(["\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"])));exports.ButtonWrapper=g,exports.CarouselButton=y,exports.CarouselCard=f,exports.CarouselCardInner=b,exports.CarouselScrollArea=h,exports.CarouselWrapper=m,exports.Dot=k,exports.DotContainer=w,exports.ScreenReaderOnly=v,exports.VerticalAlign=x;
|
|
2
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../../node_modules/tslib/tslib.es6.js"),e=require("styled-components"),r=require("../Text/index.js"),o=require("../Icon/index.js");function t(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var a,i,c,u=t(e),s=u.default(o.default)(a||(a=n.__makeTemplateObject(["\n margin-right: ",";\n"],["\n margin-right: ",";\n"])),(function(n){return n.theme.spacing.xxs})),d=u.default(r.Text)(c||(c=n.__makeTemplateObject(["\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 e=n.theme,r=e.colors,o=e.utilities.useBackgroundStyleLinks,t=n.textColor,a=n.appearance;return t&&void 0!==r[t]?r[t]:t||(!a&&o?"currentColor":a&&"primary"===a?r.secondary:r.linkColor)}),(function(n){var e=n.appearance,r=n.theme.typography.linkTextDecoration;return"primary"===e||"secondary"===e?"none":r}),(function(n){var e=n.theme;return e.utilities.useBackgroundStyleLinks?e.typography.fontWeightHeavy:e.typography.fontWeightMedium}),(function(n){var e=n.appearance,r=n.theme;return n.theme.utilities.useBackgroundStyleLinks&&!e?"linear-gradient(180deg, rgba(255, 255, 255, 0) 0px, ".concat(r.colors.primary," -4px);"):void 0}),(function(r){var o=r.appearance,t=r.theme.typography.fontWeightHeavy;return("primary"===o||"secondary"===o)&&e.css(i||(i=n.__makeTemplateObject(["\n font-weight: ",";\n "],["\n font-weight: ",";\n "])),t)}),(function(n){var e=n.theme,r=e.colors,o=e.utilities.useBackgroundStyleLinks,t=n.textHoverColor;return!t&&o?r.textDark:t&&void 0!==r[t]?r[t]:t||r.linkColorHover}));exports.ChevyWithLevee=s,exports.StyledLink=d;
|
|
2
2
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../../node_modules/tslib/tslib.es6.js"),e=require("styled-components");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../../node_modules/tslib/tslib.es6.js"),e=require("styled-components");function o(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var t,r,i,a,c,d,l,s=o(e),u=s.default.div(t||(t=n.__makeTemplateObject(["\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"]))),p=s.default.ul(r||(r=n.__makeTemplateObject(["\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"]))),f=s.default.a(d||(d=n.__makeTemplateObject(["\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.css(i||(i=n.__makeTemplateObject(["\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.css(a||(a=n.__makeTemplateObject(["\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 e=n.theme;return n.disabled?e.colors.disabled:e.colors.paginationText}))}),(function(o){return o.disabled&&e.css(c||(c=n.__makeTemplateObject(["\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}))})),m=s.default.li(l||(l=n.__makeTemplateObject(["\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}));exports.PagerItem=m,exports.PagerLink=f,exports.PagerList=p,exports.PagerWrapper=u;
|
|
2
2
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.js"),r=require("react"),t=require("styled-components"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.js"),r=require("react"),t=require("styled-components"),a=require("../../themes/cruk.js"),l=require("./styles.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=c(r);exports.default=function(r){var c=r.percentage,o=void 0===c?0:c,n=r.isCircular,i=r.circleContents,u=r.circleSize,d=r.barColor,f=r.secondaryBarColor,m=r.secondaryPercentage,p=r.children,y=t.useTheme(),h=e.__assign(e.__assign({},a.default),y),C=Number.isNaN(o)?0:o,g=C>100?100:C,E="".concat(C,"%"),b=m&&!Number.isNaN(m)?m:0,k=b>100?100:b,P="".concat("string"==typeof i?i:""," ").concat(E,"% Complete"),v=i||E,x=58,_=2*Math.PI*x;return s.default.createElement(t.ThemeProvider,{theme:h},s.default.createElement(l.ProgressBarWrapper,null,n?s.default.createElement(l.CircularWrapper,{circleSize:u||"90px"},s.default.createElement(l.CircleSvg,{viewBox:"0 0 ".concat(128," ").concat(128)},s.default.createElement(l.EmptyCircle,{cx:64,cy:64,r:x,strokeWidth:6}),s.default.createElement(l.FullCircle,{isSecondary:!0,barColor:f,cx:64,cy:64,r:x,strokeWidth:6,strokeDasharray:_,strokeDashoffset:_*(1-k/100),strokeDashoffsetInit:_}),s.default.createElement(l.FullCircle,{barColor:d,cx:64,cy:64,r:x,strokeWidth:6,strokeDasharray:_,strokeDashoffset:_*(1-g/100),strokeDashoffsetInit:_})),s.default.createElement(l.CircularValue,null,v)):s.default.createElement(l.LineProgressBarWrapper,{percentage:g,secondaryPercentage:k},s.default.createElement(l.LineProgressBar,{isSecondary:!0,percentage:k,barColor:f}),s.default.createElement(l.LineProgressBar,{percentage:g,barColor:d}),s.default.createElement(l.ScreenReaderOnly,null,P)),p))};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../../node_modules/tslib/tslib.es6.js"),e=require("styled-components");function t(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var r,o,i,a,s,l,d,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../../node_modules/tslib/tslib.es6.js"),e=require("styled-components");function t(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var r,o,i,a,s,c,l,p,d,u,h,f,m,g,b,x=t(e),k=function(t){var o=t.strokeDashoffsetInit,i=t.strokeDashoffset;return e.keyframes(r||(r=n.__makeTemplateObject(["\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)},_=function(t){var r=t.strokeDashoffsetInit,i=t.strokeDashoffset;return e.keyframes(o||(o=n.__makeTemplateObject(["\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"])),r,i)},y=function(){return e.keyframes(i||(i=n.__makeTemplateObject(["\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"])))},w=function(){return e.keyframes(a||(a=n.__makeTemplateObject(["\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"])))},v=x.default.div(s||(s=n.__makeTemplateObject(["\n margin-top: ",";\n"],["\n margin-top: ",";\n"])),"16px"),j=x.default.div(l||(l=n.__makeTemplateObject(["\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 r=t.percentage,o=t.secondaryPercentage;return(100===r||100===o)&&e.css(c||(c=n.__makeTemplateObject(["\n animation: "," 0.3s 0.5s 1 ease-out;\n "],["\n animation: "," 0.3s 0.5s 1 ease-out;\n "])),w)})),O=x.default.div(d||(d=n.__makeTemplateObject(["\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 e=n.barColor,t=n.isSecondary,r=n.theme.colors,o=r.progressBar,i=r.progressBarSecondary;return e||t?i:o}),(function(n){return n.percentage}),(function(n){var e=n.barColor,t=n.isSecondary,r=n.theme.colors,o=r.progressBar,i=r.progressBarSecondary;return e||t?i:o}),(function(t){return 100===t.percentage&&e.css(p||(p=n.__makeTemplateObject(["\n animation: "," 0.33s 0.75s 3 ease-in;\n "],["\n animation: "," 0.33s 0.75s 3 ease-in;\n "])),y)})),T=x.default.span(u||(u=n.__makeTemplateObject(["\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"]))),S=x.default.div(h||(h=n.__makeTemplateObject(["\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})),B=x.default.svg(f||(f=n.__makeTemplateObject(["\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"]))),C=x.default.circle(m||(m=n.__makeTemplateObject(["\n stroke: ",";\n"],["\n stroke: ",";\n"])),(function(n){return n.theme.tokenColors.grey_200})),z=x.default.circle(g||(g=n.__makeTemplateObject(["\n stroke: ",";\n animation: ","\n 1s linear;\n"],["\n stroke: ",";\n animation: ","\n 1s linear;\n"])),(function(n){var e=n.isSecondary,t=n.barColor,r=n.theme.colors,o=r.circularProgress,i=r.circularProgressSecondary;return t||e?i:o}),(function(n){return n.isSecondary?_:k})),P=x.default.div(b||(b=n.__makeTemplateObject(["\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}));exports.CircleSvg=B,exports.CircularValue=P,exports.CircularWrapper=S,exports.EmptyCircle=C,exports.FullCircle=z,exports.LineProgressBar=O,exports.LineProgressBarWrapper=j,exports.ProgressBarWrapper=v,exports.ScreenReaderOnly=T;
|
|
2
2
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.js"),t=require("react"),a=require("styled-components"),r=require("../../utils/Helper.js"),l=require("../../themes/cruk.js"),n=require("../Text/index.js"),u=require("../Badge/index.js"),m=require("../Box/index.js"),o=require("./styles.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=s(t);exports.default=function(t){var s=t.total,d=t.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.js"),t=require("react"),a=require("styled-components"),r=require("../../utils/Helper.js"),l=require("../../themes/cruk.js"),n=require("../Text/index.js"),u=require("../Badge/index.js"),m=require("../Box/index.js"),o=require("./styles.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=s(t);exports.default=function(t){var s=t.total,d=t.additionalAmount,c=t.giftAid,f=t.target,p=void 0===f?null:f,g=t.isCompact,E=t.summaryMessage,h=void 0===E?void 0:E,y=t.children,x=a.useTheme(),j=e.__assign(e.__assign({},l.default),x),q=r.calculatePercentRounded(+s,p||0),b=r.calculatePercentRounded(d?+s+(d||0):0,p||0),C="".concat(q,"% of the £").concat(r.formatMoneyWithCommas(p||0)," target");return i.default.createElement(o.TotaliserWrapper,{isCompact:g||!1,theme:j},g?i.default.createElement(o.CompactWrapper,{theme:j},i.default.createElement(m.default,{marginHorizontal:"none",marginRight:"xxs",marginBottom:"none"},i.default.createElement(u.default,null,"£".concat(r.formatMoneyWithCommas(s)))),null!==p&&i.default.createElement(o.Summary,null,i.default.createElement(n.Text,{as:"span"},C))):i.default.createElement(o.BubbleWrapper,{theme:j},i.default.createElement(o.BubbleText,null,"Total raised"),i.default.createElement(o.Total,null,"£",r.formatMoneyWithCommas(s)),i.default.createElement(o.GiftAid,null,"+ £",r.formatMoneyWithCommas(c||0)," Gift Aid")),(!!p||!!h)&&i.default.createElement(o.ProgressBarWrapper,{isCompact:g||!1,theme:j},i.default.createElement(o.StyledProgressBar,{theme:j,percentage:q,secondaryPercentage:b}),!g&&(h?i.default.createElement(o.Summary,null,h):i.default.createElement(o.Summary,null,i.default.createElement(n.Text,{as:"span"},C)))),y)};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../../node_modules/tslib/tslib.es6.js"),e=require("styled-components"),t=require("../ProgressBar/index.js");function r(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var o,a,i,l,p,m,s,f,u,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../../node_modules/tslib/tslib.es6.js"),e=require("styled-components"),t=require("../ProgressBar/index.js");function r(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var o,a,i,l,p,m,s,f,c,u,d,x=r(e),b=x.default.div(o||(o=n.__makeTemplateObject(["\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})),g=x.default.div(i||(i=n.__makeTemplateObject(["\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&&e.css(a||(a=n.__makeTemplateObject(['\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}))})),y=x.default.p(l||(l=n.__makeTemplateObject(["\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=x.default.p(p||(p=n.__makeTemplateObject(["\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})),_=x.default.p(m||(m=n.__makeTemplateObject(["\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})),T=x.default.span(s||(s=n.__makeTemplateObject(["\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})),j=x.default.div(c||(c=n.__makeTemplateObject(["\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&&e.css(f||(f=n.__makeTemplateObject(["\n "," {\n border: none;\n padding: 0;\n }\n "],["\n "," {\n border: none;\n padding: 0;\n }\n "])),g)})),v=x.default.div(u||(u=n.__makeTemplateObject(["\n justify-content: space-between;\n display: flex;\n"],["\n justify-content: space-between;\n display: flex;\n"]))),k=x.default(t.default)(d||(d=n.__makeTemplateObject([""],[""])));exports.BubbleText=h,exports.BubbleWrapper=b,exports.CompactWrapper=v,exports.GiftAid=_,exports.ProgressBarWrapper=g,exports.StyledProgressBar=k,exports.Summary=T,exports.Total=y,exports.TotaliserWrapper=j;
|
|
2
2
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./AddressLookup/index.js"),r=require("./Avatar/index.js"),d=require("./Badge/index.js"),t=require("./Box/index.js"),s=require("./Button/index.js"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./AddressLookup/index.js"),r=require("./Avatar/index.js"),d=require("./Badge/index.js"),t=require("./Box/index.js"),s=require("./Button/index.js"),a=require("./Carousel/index.js"),o=require("./Checkbox/index.js"),i=require("./Collapse/index.js"),u=require("./DateField/index.js"),x=require("./Divider.js"),l=require("./ErrorText/index.js"),p=require("./Flex.js"),n=require("./Footer/index.js"),j=require("./GlobalStyle.js"),R=require("./Header/index.js"),q=require("./Heading/index.js"),m=require("./Icon/index.js"),E=require("./LabelWrapper/index.js"),f=require("./LegendWrapper/index.js"),A=require("./Link/index.js"),D=require("./Loader/index.js"),M=require("./Modal/index.js"),T=require("./Pagination/index.js"),c=require("./PopOver/index.js"),g=require("./ProgressBar/index.js"),B=require("./Radio/index.js"),L=require("./RadioConsent/index.js"),k=require("./Select/index.js"),F=require("./Step/index.js"),C=require("./Text/index.js"),v=require("./TextAreaField/index.js"),P=require("./TextField/index.js"),b=require("./Totaliser/index.js"),S=require("./UserBlock/index.js"),H=require("../themes/cruk.js"),h=require("../themes/su2c.js"),W=require("./AddressLookup/README.md.js"),O=require("./Avatar/README.md.js"),I=require("./Badge/README.md.js"),U=require("./Box/README.md.js"),y=require("./Button/README.md.js"),G=require("./Checkbox/README.md.js"),_=require("./Collapse/README.md.js"),w=require("./DateField/README.md.js"),z=require("./ErrorText/README.md.js"),J=require("./Footer/README.md.js"),K=require("./Heading/README.md.js"),N=require("./Header/README.md.js"),Q=require("./Icon/README.md.js"),V=require("./Link/README.md.js"),X=require("./LegendWrapper/README.md.js"),Y=require("./Loader/README.md.js"),Z=require("./Modal/README.md.js"),$=require("./Pagination/README.md.js"),ee=require("./PopOver/README.md.js"),re=require("./ProgressBar/README.md.js"),de=require("./Radio/README.md.js"),te=require("./RadioConsent/README.md.js"),se=require("./Select/README.md.js"),ae=require("./Step/README.md.js"),oe=require("./Text/README.md.js"),ie=require("./TextAreaField/README.md.js"),ue=require("./TextField/README.md.js"),xe=require("./Totaliser/README.md.js"),le=require("./UserBlock/README.md.js");exports.AddressLookup=e.default,exports.Avatar=r.default,exports.Badge=d.default,exports.Box=t.default,exports.Button=s.Button,exports.Carousel=a.default,exports.Checkbox=o.default,exports.Collapse=i.default,exports.DateField=u.default,exports.Divider=x.Divider,exports.ErrorText=l.default,exports.Flex=p.default,exports.Footer=n.Footer,exports.GlobalStyle=j.default,exports.Header=R.Header,exports.Heading=q.default,exports.Icon=m.default,exports.LabelWrapper=E.LabelWrapper,exports.LegendWrapper=f.LegendWrapper,exports.Link=A.Link,exports.Loader=D.default,exports.Modal=M.default,exports.Pagination=T.default,exports.PopOver=c.default,exports.ProgressBar=g.default,exports.Radio=B.default,exports.RadioConsent=L.default,exports.Select=k.default,exports.Step=F.default,exports.Text=C.Text,exports.TextAreaField=v.default,exports.TextField=P.default,exports.Totaliser=b.default,exports.UserBlock=S.default,exports.crukTheme=H.default,exports.su2cTheme=h.default,exports.AddressLookupReadme=W.default,exports.AvatarReadme=O.default,exports.BadgeReadme=I.default,exports.BoxReadme=U.default,exports.ButtonReadme=y.default,exports.CheckboxReadme=G.default,exports.CollapseReadme=_.default,exports.DateFieldReadme=w.default,exports.ErrorTextReadme=z.default,exports.FooterReadme=J.default,exports.HeadingReadme=K.default,exports.HeaderReadme=N.default,exports.IconReadme=Q.default,exports.LinkReadme=V.default,exports.LegendWrapperReadme=X.default,exports.LoaderReadme=Y.default,exports.ModalReadme=Z.default,exports.PaginationReadme=$.default,exports.PopOverReadme=ee.default,exports.ProgressBarReadme=re.default,exports.RadioReadme=de.default,exports.RadioConsentReadme=te.default,exports.SelectReadme=se.default,exports.StepReadme=ae.default,exports.TextReadme=oe.default,exports.TextAreaFieldReadme=ie.default,exports.TextFieldReadme=ue.default,exports.TotaliserReadme=xe.default,exports.UserBlockReadme=le.default;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});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"},t={s:"35px",m:"50px",l:"60px",xl:"90px",path:"".concat(r.assetPath,"images/icon-avatars/")},a={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"},s={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},i={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:t,breakpoint:o,button:a,tokenColors:n,colors:s,spacing:i,fontSizes:d,siteConfig:r,typography:g,utilities:e};exports.AVATAR=t,exports.BREAKPOINT=o,exports.BUTTON=a,exports.COLORS=s,exports.FONT_SIZES=d,exports.SITE_CONFIG=r,exports.SPACING=i,exports.TOKEN_COLORS=n,exports.TYPOGRAPHY=g,exports.UTILITIES=e,exports.default=u;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});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"},t={s:"35px",m:"50px",l:"60px",xl:"90px",path:"".concat(r.assetPath,"images/icon-avatars/")},a={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"},s={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},i={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:t,breakpoint:o,button:a,tokenColors:n,colors:s,spacing:i,fontSizes:d,siteConfig:r,typography:g,utilities:e};exports.AVATAR=t,exports.BREAKPOINT=o,exports.BUTTON=a,exports.COLORS=s,exports.FONT_SIZES=d,exports.SITE_CONFIG=r,exports.SPACING=i,exports.TOKEN_COLORS=n,exports.TYPOGRAPHY=g,exports.UTILITIES=e,exports.default=u;
|
|
2
2
|
//# sourceMappingURL=cruk.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.js"),r=require("./cruk.js"),a=e.__assign(e.__assign({},r.default.utilities),{useBackgroundStyleLinks:!0}),t=e.__assign(e.__assign({},r.default.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."}),s=e.__assign(e.__assign({},r.default.avatar),{path:"https://fundraise.cancerresearchuk.org/profiles/cruk_fundraising/themes/cruk_of_bootstrap/images/icon-avatars/su2c/"}),o=e.__assign(e.__assign({},r.default.button),{borderRadius:"1.5rem",borderRadiusLarge:"2rem",textTransform:"uppercase"}),n=e.__assign({},r.default.breakpoint),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.js"),r=require("./cruk.js"),a=e.__assign(e.__assign({},r.default.utilities),{useBackgroundStyleLinks:!0}),t=e.__assign(e.__assign({},r.default.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."}),s=e.__assign(e.__assign({},r.default.avatar),{path:"https://fundraise.cancerresearchuk.org/profiles/cruk_fundraising/themes/cruk_of_bootstrap/images/icon-avatars/su2c/"}),o=e.__assign(e.__assign({},r.default.button),{borderRadius:"1.5rem",borderRadiusLarge:"2rem",textTransform:"uppercase"}),n=e.__assign({},r.default.breakpoint),u=e.__assign(e.__assign({},r.default.tokenColors),{su2cOrange5:"#FF8E00",su2cOrange3:"#FFB04D",su2cOrange2:"#FFDAAD",su2cOrange1:"#FFF6EB",su2cBlack:"#231F20",su2cGrey1:"#555759",su2cGrey2:"#A5A5A9",su2cRed:"#EF4135",su2cYellow:"#FFC325"}),i=e.__assign(e.__assign({},r.default.colors),{primary:u.su2cOrange5,secondary:u.su2cOrange5,tertiary:u.su2cBlack,textOnPrimary:u.su2cBlack,progressBar:u.su2cOrange5,progressBarSecondary:u.su2cRed,circularProgress:u.su2cOrange3,circularProgressSecondary:u.su2cRed,linkColor:u.su2cOrange5,linkColorHover:u.su2cRed,backgroundLightColor:u.su2cOrange2,loaderColor1:u.su2cOrange5,loaderColor2:u.su2cRed,loaderColor3:u.su2cBlack,paginationText:u.su2cBlack,paginationBackground:u.su2cBlack,totaliserBubbleColor:u.su2cBlack,totaliserBubbleTextColor:u.white,totaliserBubbleTotalColor:u.white,buttonPrimaryBackground:u.su2cOrange5,buttonPrimaryText:u.su2cBlack,buttonPrimaryBorder:u.su2cOrange5,buttonPrimaryBackgroundHover:u.su2cOrange3,buttonPrimaryTextHover:u.su2cBlack,buttonPrimaryBorderHover:u.su2cOrange3,buttonPrimaryDisabledBackground:u.grey_300,buttonPrimaryDisabledText:u.white,buttonPrimaryDisabledBorder:u.grey_300,buttonSecondaryBackground:u.white,buttonSecondaryText:u.su2cOrange5,buttonSecondaryBorder:u.su2cOrange5,buttonSecondaryBackgroundHover:u.su2cOrange1,buttonSecondaryTextHover:u.su2cOrange5,buttonSecondaryBorderHover:u.su2cOrange5,buttonSecondaryDisabledBackground:u.white,buttonSecondaryDisabledText:u.grey_300,buttonSecondaryDisabledBorder:u.grey_300,buttonTertiaryText:u.su2cOrange5,buttonTertiaryTextHover:u.su2cOrange5,buttonTertiaryDisabledText:u.grey_300}),c=e.__assign({},r.default.spacing),d=e.__assign({},r.default.fontSizes),g=e.__assign(e.__assign({},r.default.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"}),l={name:"su2c",avatar:s,breakpoint:n,button:o,tokenColors:u,colors:i,spacing:c,fontSizes:d,siteConfig:t,typography:g,utilities:a};exports.AVATAR=s,exports.BREAKPOINT=n,exports.BUTTON=o,exports.COLORS=i,exports.FONT_SIZES=d,exports.SITE_CONFIG=t,exports.SPACING=c,exports.TOKEN_COLORS=u,exports.TYPOGRAPHY=g,exports.UTILITIES=a,exports.default=l;
|
|
2
2
|
//# sourceMappingURL=su2c.js.map
|