@comicrelief/component-library 8.48.0 → 8.48.2
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/dist/components/Atoms/Input/Input.md +1 -0
- package/dist/components/Molecules/CTAMultiCard/CTAMultiCard.js +6 -2
- package/dist/components/Molecules/CTAMultiCard/CTAMultiCard.md +10 -6
- package/dist/components/Molecules/CTAMultiCard/CTAMultiCard.style.js +22 -21
- package/dist/components/Molecules/CTAMultiCard/SingleCard.js +1 -1
- package/dist/components/Molecules/CTAMultiCard/{ArrowIcon.js → _ArrowIcon.js} +2 -2
- package/dist/components/Molecules/CTAMultiCard/__snapshots__/CTAMultiCard.test.js.snap +64 -68
- package/dist/components/Molecules/Countdown/Countdown.js +12 -5
- package/dist/components/Molecules/Countdown/Countdown.md +1 -1
- package/dist/components/Organisms/Header/Nav/Nav.js +1 -1
- package/dist/components/Organisms/Header/data/data-extended.js +22 -22
- package/dist/components/Organisms/Header/data/data-live.js +1 -1
- package/dist/components/Organisms/Header/data/data.js +2 -2
- package/dist/components/Organisms/Header2025/Header2025.js +2 -2
- package/dist/components/Organisms/Header2025/Header2025.md +2 -2
- package/dist/components/Organisms/Header2025/HeaderNav2025/HeaderNav2025.js +1 -1
- package/dist/components/Organisms/Header2025/data/data-extended.js +23 -23
- package/dist/components/Organisms/Header2025/data/data-live--minimal.js +1 -1
- package/dist/components/Organisms/Header2025/data/data-live.js +2 -2
- package/dist/components/Organisms/Header2025/data/data.js +13 -13
- package/package.json +1 -1
- package/src/components/Atoms/Input/Input.md +1 -0
- package/src/components/Molecules/CTAMultiCard/CTAMultiCard.js +8 -2
- package/src/components/Molecules/CTAMultiCard/CTAMultiCard.md +10 -6
- package/src/components/Molecules/CTAMultiCard/CTAMultiCard.style.js +49 -43
- package/src/components/Molecules/CTAMultiCard/SingleCard.js +1 -1
- package/src/components/Molecules/CTAMultiCard/__snapshots__/CTAMultiCard.test.js.snap +64 -68
- package/src/components/Molecules/Countdown/Countdown.js +12 -5
- package/src/components/Molecules/Countdown/Countdown.md +1 -1
- package/src/components/Organisms/Header/Nav/Nav.js +2 -1
- package/src/components/Organisms/Header/data/data-extended.js +22 -22
- package/src/components/Organisms/Header/data/data-live.js +1 -1
- package/src/components/Organisms/Header/data/data.js +2 -2
- package/src/components/Organisms/Header2025/Header2025.js +5 -3
- package/src/components/Organisms/Header2025/Header2025.md +2 -2
- package/src/components/Organisms/Header2025/HeaderNav2025/HeaderNav2025.js +7 -4
- package/src/components/Organisms/Header2025/data/data-extended.js +23 -23
- package/src/components/Organisms/Header2025/data/data-live--minimal.js +1 -1
- package/src/components/Organisms/Header2025/data/data-live.js +2 -2
- package/src/components/Organisms/Header2025/data/data.js +13 -13
- /package/src/components/Molecules/CTAMultiCard/{ArrowIcon.js → _ArrowIcon.js} +0 -0
|
@@ -31,7 +31,9 @@ const CTAMultiCard = _ref => {
|
|
|
31
31
|
cards,
|
|
32
32
|
backgroundColour: bgCards,
|
|
33
33
|
layout,
|
|
34
|
-
carouselOfCards
|
|
34
|
+
carouselOfCards,
|
|
35
|
+
paddingAbove,
|
|
36
|
+
paddingBelow
|
|
35
37
|
} = data;
|
|
36
38
|
if (!cards || !Array.isArray(cards) || cards.length === 0) {
|
|
37
39
|
return null;
|
|
@@ -44,7 +46,9 @@ const CTAMultiCard = _ref => {
|
|
|
44
46
|
return /*#__PURE__*/_react.default.createElement(_CTAMultiCard.CardsContainer, {
|
|
45
47
|
backgroundColor: cardsBackground,
|
|
46
48
|
columns: columns,
|
|
47
|
-
isCarousel: carouselOfCards
|
|
49
|
+
isCarousel: carouselOfCards,
|
|
50
|
+
paddingAbove: paddingAbove,
|
|
51
|
+
paddingBelow: paddingBelow
|
|
48
52
|
}, cards.map(card => /*#__PURE__*/_react.default.createElement(_SingleCard.default, {
|
|
49
53
|
key: card.id,
|
|
50
54
|
card: card,
|
|
@@ -14,7 +14,7 @@ The component expects pre-rendered content to be passed in the `body` field of e
|
|
|
14
14
|
|
|
15
15
|
### CTAMultiCard: Desktop Grid View (3 columns)
|
|
16
16
|
|
|
17
|
-
**NB: In mobile view, this example displays as a carousel.**
|
|
17
|
+
**NB: In mobile view, this example displays as a carousel. This example also demonstrates no vertical padding via `paddingAbove` / `paddingBelow` set to `0rem`, so it will sit flush to the surrounding container.**
|
|
18
18
|
|
|
19
19
|
```js
|
|
20
20
|
import CTAMultiCard from './CTAMultiCard';
|
|
@@ -43,17 +43,19 @@ const data = {
|
|
|
43
43
|
...exampleData,
|
|
44
44
|
cards: cardsWithRenderedBody,
|
|
45
45
|
carouselOfCards: true,
|
|
46
|
-
backgroundColour: "transparent"
|
|
46
|
+
backgroundColour: "transparent",
|
|
47
|
+
paddingAbove: '0rem',
|
|
48
|
+
paddingBelow: '0rem'
|
|
47
49
|
};
|
|
48
50
|
|
|
49
|
-
<div style={{
|
|
51
|
+
<div style={{ background: '#E1E2E3' }}>
|
|
50
52
|
<CTAMultiCard data={data} />
|
|
51
53
|
</div>;
|
|
52
54
|
```
|
|
53
55
|
|
|
54
56
|
### CTAMultiCard: Desktop Grid View (2 columns)
|
|
55
57
|
|
|
56
|
-
**NB: One card contains a lot of lorem ipsum text to demonstrate that all cards will match the height of the tallest sibling card. In mobile view, this example displays as a vertical stack (non-carousel).**
|
|
58
|
+
**NB: One card contains a lot of lorem ipsum text to demonstrate that all cards will match the height of the tallest sibling card. In mobile view, this example displays as a vertical stack (non-carousel). This example also demonstrates larger vertical padding via `paddingAbove` / `paddingBelow` set to `4rem`, so it will appear with more space above and below the cards.**
|
|
57
59
|
|
|
58
60
|
```js
|
|
59
61
|
import CTAMultiCard from './CTAMultiCard';
|
|
@@ -95,10 +97,12 @@ const dataWithLongText = {
|
|
|
95
97
|
layout: "2 columns",
|
|
96
98
|
carouselOfCards: false,
|
|
97
99
|
backgroundColour: "Transparent",
|
|
98
|
-
cards: cardsWithRenderedBody
|
|
100
|
+
cards: cardsWithRenderedBody,
|
|
101
|
+
paddingAbove: '4rem',
|
|
102
|
+
paddingBelow: '4rem'
|
|
99
103
|
};
|
|
100
104
|
|
|
101
|
-
<div style={{
|
|
105
|
+
<div style={{ background: '#E1E2E3' }}>
|
|
102
106
|
<CTAMultiCard data={dataWithLongText} />
|
|
103
107
|
</div>;
|
|
104
108
|
```
|
|
@@ -13,47 +13,47 @@ var _fontHelper = _interopRequireDefault(require("../../../theme/crTheme/fontHel
|
|
|
13
13
|
const CardsContainer = exports.CardsContainer = _styledComponents.default.div.withConfig({
|
|
14
14
|
displayName: "CTAMultiCardstyle__CardsContainer",
|
|
15
15
|
componentId: "sc-qq5ca0-0"
|
|
16
|
-
})(["display:flex;flex-direction:column;width:100%;background:", ";gap:1rem;", "
|
|
16
|
+
})(["padding-top:", ";padding-bottom:", ";display:flex;flex-direction:column;width:100%;background:", ";gap:1rem;", " @media ", "{flex-direction:row;flex-wrap:wrap;justify-content:center;align-items:stretch;width:fit-content;max-width:100%;margin:0 auto;}", " @media ", "{", "}"], _ref => {
|
|
17
17
|
let {
|
|
18
|
-
|
|
19
|
-
backgroundColor
|
|
18
|
+
paddingAbove
|
|
20
19
|
} = _ref;
|
|
21
|
-
return
|
|
20
|
+
return paddingAbove;
|
|
22
21
|
}, _ref2 => {
|
|
23
22
|
let {
|
|
24
|
-
|
|
23
|
+
paddingBelow
|
|
25
24
|
} = _ref2;
|
|
26
|
-
return
|
|
25
|
+
return paddingBelow;
|
|
27
26
|
}, _ref3 => {
|
|
28
27
|
let {
|
|
29
|
-
|
|
28
|
+
theme,
|
|
29
|
+
backgroundColor
|
|
30
30
|
} = _ref3;
|
|
31
|
-
return
|
|
31
|
+
return theme.color(backgroundColor);
|
|
32
32
|
}, _ref4 => {
|
|
33
33
|
let {
|
|
34
|
-
|
|
34
|
+
isCarousel
|
|
35
35
|
} = _ref4;
|
|
36
|
-
return
|
|
36
|
+
return !isCarousel && (0, _styledComponents.css)(["@media (max-width:", "px){flex-direction:column;background:transparent;}"], _allBreakpoints.breakpointValues.M - 1);
|
|
37
37
|
}, _ref5 => {
|
|
38
38
|
let {
|
|
39
39
|
theme
|
|
40
40
|
} = _ref5;
|
|
41
|
-
return theme.allBreakpoints('
|
|
41
|
+
return theme.allBreakpoints('M');
|
|
42
42
|
}, _ref6 => {
|
|
43
43
|
let {
|
|
44
|
-
|
|
44
|
+
isCarousel
|
|
45
45
|
} = _ref6;
|
|
46
|
-
return
|
|
46
|
+
return isCarousel && (0, _styledComponents.css)(["@media (max-width:", "px){flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;width:100%;margin:0;max-width:100%;overflow-x:visible;overflow-y:scroll;-webkit-overflow-scrolling:touch;scroll-snap-type:x mandatory;padding:0.75rem 1rem;scrollbar-width:none;-ms-overflow-style:none;&::-webkit-scrollbar{display:none;}}"], _allBreakpoints.breakpointValues.L - 1);
|
|
47
47
|
}, _ref7 => {
|
|
48
48
|
let {
|
|
49
|
-
|
|
49
|
+
theme
|
|
50
50
|
} = _ref7;
|
|
51
|
-
return
|
|
51
|
+
return theme.allBreakpoints('XL');
|
|
52
52
|
}, _ref8 => {
|
|
53
53
|
let {
|
|
54
54
|
columns
|
|
55
55
|
} = _ref8;
|
|
56
|
-
return columns ===
|
|
56
|
+
return columns === 3 && (0, _styledComponents.css)(["display:grid;justify-content:center;align-items:stretch;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;margin:0 auto;max-width:100%;@media (min-width:1724px){grid-template-columns:repeat(3,564px);width:fit-content;}"]);
|
|
57
57
|
});
|
|
58
58
|
const ImageWrapper = exports.ImageWrapper = _styledComponents.default.div.withConfig({
|
|
59
59
|
displayName: "CTAMultiCardstyle__ImageWrapper",
|
|
@@ -96,7 +96,7 @@ const ArrowIconWrapper = exports.ArrowIconWrapper = _styledComponents.default.di
|
|
|
96
96
|
const CardLink = exports.CardLink = _styledComponents.default.a.withConfig({
|
|
97
97
|
displayName: "CTAMultiCardstyle__CardLink",
|
|
98
98
|
componentId: "sc-qq5ca0-5"
|
|
99
|
-
})(["display:flex;position:relative;flex-direction:column;width:100%;
|
|
99
|
+
})(["display:flex;position:relative;flex-direction:column;width:100%;flex:1 1 auto;background:transparent;border-radius:1rem;box-shadow:0 0 1rem rgba(0,0,0,0.15);text-decoration:none;overflow:hidden;cursor:pointer;img{transform:scale(1.02);transition:transform ", "s cubic-bezier(0.68,", ",0.265,", ");}@media ", "{", ";&:hover{box-shadow:0 0 1.5rem rgba(0,0,0,0.25);", " img{transform:scale(1.1);}", "{color:", ";text-decoration:none;}", "{opacity:1;}", "{background:", ";}}}"], 0.4, -1.15, 2.35, _ref13 => {
|
|
100
100
|
let {
|
|
101
101
|
theme
|
|
102
102
|
} = _ref13;
|
|
@@ -115,11 +115,11 @@ const CardLink = exports.CardLink = _styledComponents.default.a.withConfig({
|
|
|
115
115
|
const CardWrapper = exports.CardWrapper = _styledComponents.default.div.withConfig({
|
|
116
116
|
displayName: "CTAMultiCardstyle__CardWrapper",
|
|
117
117
|
componentId: "sc-qq5ca0-6"
|
|
118
|
-
})(["width:100%;flex-shrink:0;display:flex;flex-direction:column;align-self:stretch;", " ", " @media ", "{flex-basis:calc(50% - 1rem);max-width:564px;
|
|
118
|
+
})(["width:100%;flex-shrink:0;display:flex;flex-direction:column;align-self:stretch;", " ", " @media ", "{flex-basis:calc(50% - 1rem);max-width:564px;align-self:stretch;}@media ", "{flex-basis:unset;max-width:564px;align-self:stretch;}"], _ref16 => {
|
|
119
119
|
let {
|
|
120
120
|
isCarousel
|
|
121
121
|
} = _ref16;
|
|
122
|
-
return isCarousel && (0, _styledComponents.css)(["@media (max-width:", "px){scroll-snap-align:start;flex:0 0 calc(100% - 1.5rem);min-width:calc(100% - 1.5rem);max-width:calc(100% - 1.5rem);flex-shrink:0;
|
|
122
|
+
return isCarousel && (0, _styledComponents.css)(["@media (max-width:", "px){scroll-snap-align:start;flex:0 0 calc(100% - 1.5rem);min-width:calc(100% - 1.5rem);max-width:calc(100% - 1.5rem);flex-shrink:0;}"], _allBreakpoints.breakpointValues.L - 1);
|
|
123
123
|
}, _ref17 => {
|
|
124
124
|
let {
|
|
125
125
|
isCarousel
|
|
@@ -127,9 +127,10 @@ const CardWrapper = exports.CardWrapper = _styledComponents.default.div.withConf
|
|
|
127
127
|
return !isCarousel && (0, _styledComponents.css)(["@media (max-width:", "px){width:100%;}"], _allBreakpoints.breakpointValues.M - 1);
|
|
128
128
|
}, _ref18 => {
|
|
129
129
|
let {
|
|
130
|
-
theme
|
|
130
|
+
theme,
|
|
131
|
+
isCarousel
|
|
131
132
|
} = _ref18;
|
|
132
|
-
return theme.allBreakpoints('M');
|
|
133
|
+
return theme.allBreakpoints(isCarousel ? 'L' : 'M');
|
|
133
134
|
}, _ref19 => {
|
|
134
135
|
let {
|
|
135
136
|
theme
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _Picture = _interopRequireDefault(require("../../Atoms/Picture/Picture"));
|
|
10
|
-
var _ArrowIcon = _interopRequireDefault(require("./
|
|
10
|
+
var _ArrowIcon = _interopRequireDefault(require("./_ArrowIcon"));
|
|
11
11
|
var _alt_cta_underline = _interopRequireDefault(require("../../../theme/shared/assets/alt_cta_underline.svg"));
|
|
12
12
|
var _CTAMultiCard = require("./CTAMultiCard.style");
|
|
13
13
|
const SingleCard = _ref => {
|
|
@@ -8,8 +8,8 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
10
|
const StyledArrowIcon = _styledComponents.default.svg.withConfig({
|
|
11
|
-
displayName: "
|
|
12
|
-
componentId: "sc-
|
|
11
|
+
displayName: "_ArrowIcon__StyledArrowIcon",
|
|
12
|
+
componentId: "sc-1xqghuh-0"
|
|
13
13
|
})(["display:inline-block;color:", ";fill:currentColor;"], _ref => {
|
|
14
14
|
let {
|
|
15
15
|
theme
|
|
@@ -99,7 +99,9 @@ exports[`handles data structure correctly 1`] = `
|
|
|
99
99
|
-ms-flex-direction: column;
|
|
100
100
|
flex-direction: column;
|
|
101
101
|
width: 100%;
|
|
102
|
-
|
|
102
|
+
-webkit-flex: 1 1 auto;
|
|
103
|
+
-ms-flex: 1 1 auto;
|
|
104
|
+
flex: 1 1 auto;
|
|
103
105
|
background: transparent;
|
|
104
106
|
border-radius: 1rem;
|
|
105
107
|
box-shadow: 0 0 1rem rgba(0,0,0,0.15);
|
|
@@ -242,9 +244,13 @@ exports[`handles data structure correctly 1`] = `
|
|
|
242
244
|
-webkit-justify-content: center;
|
|
243
245
|
-ms-flex-pack: center;
|
|
244
246
|
justify-content: center;
|
|
245
|
-
|
|
247
|
+
-webkit-align-items: stretch;
|
|
248
|
+
-webkit-box-align: stretch;
|
|
249
|
+
-ms-flex-align: stretch;
|
|
250
|
+
align-items: stretch;
|
|
251
|
+
grid-template-columns: repeat(3,minmax(0,1fr));
|
|
246
252
|
width: 100%;
|
|
247
|
-
margin: 0;
|
|
253
|
+
margin: 0 auto;
|
|
248
254
|
max-width: 100%;
|
|
249
255
|
}
|
|
250
256
|
}
|
|
@@ -311,7 +317,6 @@ exports[`handles data structure correctly 1`] = `
|
|
|
311
317
|
-ms-flex-preferred-size: calc(50% - 1rem);
|
|
312
318
|
flex-basis: calc(50% - 1rem);
|
|
313
319
|
max-width: 564px;
|
|
314
|
-
height: 100%;
|
|
315
320
|
-webkit-align-self: stretch;
|
|
316
321
|
-ms-flex-item-align: stretch;
|
|
317
322
|
align-self: stretch;
|
|
@@ -324,7 +329,6 @@ exports[`handles data structure correctly 1`] = `
|
|
|
324
329
|
-ms-flex-preferred-size: unset;
|
|
325
330
|
flex-basis: unset;
|
|
326
331
|
max-width: 564px;
|
|
327
|
-
height: 100%;
|
|
328
332
|
-webkit-align-self: stretch;
|
|
329
333
|
-ms-flex-item-align: stretch;
|
|
330
334
|
align-self: stretch;
|
|
@@ -661,7 +665,9 @@ exports[`renders 2 columns layout correctly 1`] = `
|
|
|
661
665
|
-ms-flex-direction: column;
|
|
662
666
|
flex-direction: column;
|
|
663
667
|
width: 100%;
|
|
664
|
-
|
|
668
|
+
-webkit-flex: 1 1 auto;
|
|
669
|
+
-ms-flex: 1 1 auto;
|
|
670
|
+
flex: 1 1 auto;
|
|
665
671
|
background: transparent;
|
|
666
672
|
border-radius: 1rem;
|
|
667
673
|
box-shadow: 0 0 1rem rgba(0,0,0,0.15);
|
|
@@ -798,19 +804,7 @@ exports[`renders 2 columns layout correctly 1`] = `
|
|
|
798
804
|
}
|
|
799
805
|
|
|
800
806
|
@media (min-width:1440px) {
|
|
801
|
-
|
|
802
|
-
display: grid;
|
|
803
|
-
-webkit-box-pack: center;
|
|
804
|
-
-webkit-justify-content: center;
|
|
805
|
-
-ms-flex-pack: center;
|
|
806
|
-
justify-content: center;
|
|
807
|
-
grid-template-columns: repeat(2,1fr);
|
|
808
|
-
width: -webkit-fit-content;
|
|
809
|
-
width: -moz-fit-content;
|
|
810
|
-
width: fit-content;
|
|
811
|
-
margin: 0 auto;
|
|
812
|
-
max-width: 100%;
|
|
813
|
-
}
|
|
807
|
+
|
|
814
808
|
}
|
|
815
809
|
|
|
816
810
|
@media (min-width:740px) {
|
|
@@ -875,7 +869,6 @@ exports[`renders 2 columns layout correctly 1`] = `
|
|
|
875
869
|
-ms-flex-preferred-size: calc(50% - 1rem);
|
|
876
870
|
flex-basis: calc(50% - 1rem);
|
|
877
871
|
max-width: 564px;
|
|
878
|
-
height: 100%;
|
|
879
872
|
-webkit-align-self: stretch;
|
|
880
873
|
-ms-flex-item-align: stretch;
|
|
881
874
|
align-self: stretch;
|
|
@@ -888,7 +881,6 @@ exports[`renders 2 columns layout correctly 1`] = `
|
|
|
888
881
|
-ms-flex-preferred-size: unset;
|
|
889
882
|
flex-basis: unset;
|
|
890
883
|
max-width: 564px;
|
|
891
|
-
height: 100%;
|
|
892
884
|
-webkit-align-self: stretch;
|
|
893
885
|
-ms-flex-item-align: stretch;
|
|
894
886
|
align-self: stretch;
|
|
@@ -1225,7 +1217,9 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
1225
1217
|
-ms-flex-direction: column;
|
|
1226
1218
|
flex-direction: column;
|
|
1227
1219
|
width: 100%;
|
|
1228
|
-
|
|
1220
|
+
-webkit-flex: 1 1 auto;
|
|
1221
|
+
-ms-flex: 1 1 auto;
|
|
1222
|
+
flex: 1 1 auto;
|
|
1229
1223
|
background: transparent;
|
|
1230
1224
|
border-radius: 1rem;
|
|
1231
1225
|
box-shadow: 0 0 1rem rgba(0,0,0,0.15);
|
|
@@ -1328,7 +1322,31 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
1328
1322
|
}
|
|
1329
1323
|
}
|
|
1330
1324
|
|
|
1331
|
-
@media (
|
|
1325
|
+
@media (min-width:740px) {
|
|
1326
|
+
.c0 {
|
|
1327
|
+
-webkit-flex-direction: row;
|
|
1328
|
+
-ms-flex-direction: row;
|
|
1329
|
+
flex-direction: row;
|
|
1330
|
+
-webkit-flex-wrap: wrap;
|
|
1331
|
+
-ms-flex-wrap: wrap;
|
|
1332
|
+
flex-wrap: wrap;
|
|
1333
|
+
-webkit-box-pack: center;
|
|
1334
|
+
-webkit-justify-content: center;
|
|
1335
|
+
-ms-flex-pack: center;
|
|
1336
|
+
justify-content: center;
|
|
1337
|
+
-webkit-align-items: stretch;
|
|
1338
|
+
-webkit-box-align: stretch;
|
|
1339
|
+
-ms-flex-align: stretch;
|
|
1340
|
+
align-items: stretch;
|
|
1341
|
+
width: -webkit-fit-content;
|
|
1342
|
+
width: -moz-fit-content;
|
|
1343
|
+
width: fit-content;
|
|
1344
|
+
max-width: 100%;
|
|
1345
|
+
margin: 0 auto;
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
@media (max-width:1023px) {
|
|
1332
1350
|
.c0 {
|
|
1333
1351
|
-webkit-flex-direction: row;
|
|
1334
1352
|
-ms-flex-direction: row;
|
|
@@ -1336,6 +1354,13 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
1336
1354
|
-webkit-flex-wrap: nowrap;
|
|
1337
1355
|
-ms-flex-wrap: nowrap;
|
|
1338
1356
|
flex-wrap: nowrap;
|
|
1357
|
+
-webkit-box-pack: start;
|
|
1358
|
+
-webkit-justify-content: flex-start;
|
|
1359
|
+
-ms-flex-pack: start;
|
|
1360
|
+
justify-content: flex-start;
|
|
1361
|
+
width: 100%;
|
|
1362
|
+
margin: 0;
|
|
1363
|
+
max-width: 100%;
|
|
1339
1364
|
overflow-x: visible;
|
|
1340
1365
|
overflow-y: scroll;
|
|
1341
1366
|
-webkit-overflow-scrolling: touch;
|
|
@@ -1343,8 +1368,7 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
1343
1368
|
-moz-scroll-snap-type: x mandatory;
|
|
1344
1369
|
-ms-scroll-snap-type: x mandatory;
|
|
1345
1370
|
scroll-snap-type: x mandatory;
|
|
1346
|
-
padding: 0.75rem
|
|
1347
|
-
margin-left: 0.5rem;
|
|
1371
|
+
padding: 0.75rem 1rem;
|
|
1348
1372
|
-webkit-scrollbar-width: none;
|
|
1349
1373
|
-moz-scrollbar-width: none;
|
|
1350
1374
|
-ms-scrollbar-width: none;
|
|
@@ -1357,14 +1381,9 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
1357
1381
|
}
|
|
1358
1382
|
}
|
|
1359
1383
|
|
|
1360
|
-
@media (min-width:
|
|
1384
|
+
@media (min-width:1440px) {
|
|
1361
1385
|
.c0 {
|
|
1362
|
-
|
|
1363
|
-
-ms-flex-direction: row;
|
|
1364
|
-
flex-direction: row;
|
|
1365
|
-
-webkit-flex-wrap: wrap;
|
|
1366
|
-
-ms-flex-wrap: wrap;
|
|
1367
|
-
flex-wrap: wrap;
|
|
1386
|
+
display: grid;
|
|
1368
1387
|
-webkit-box-pack: center;
|
|
1369
1388
|
-webkit-justify-content: center;
|
|
1370
1389
|
-ms-flex-pack: center;
|
|
@@ -1373,24 +1392,9 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
1373
1392
|
-webkit-box-align: stretch;
|
|
1374
1393
|
-ms-flex-align: stretch;
|
|
1375
1394
|
align-items: stretch;
|
|
1376
|
-
|
|
1377
|
-
width: -moz-fit-content;
|
|
1378
|
-
width: fit-content;
|
|
1379
|
-
max-width: 100%;
|
|
1380
|
-
margin: 0 auto;
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
|
-
@media (min-width:1440px) {
|
|
1385
|
-
.c0 {
|
|
1386
|
-
display: grid;
|
|
1387
|
-
-webkit-box-pack: center;
|
|
1388
|
-
-webkit-justify-content: center;
|
|
1389
|
-
-ms-flex-pack: center;
|
|
1390
|
-
justify-content: center;
|
|
1391
|
-
grid-template-columns: repeat(3,1fr);
|
|
1395
|
+
grid-template-columns: repeat(3,minmax(0,1fr));
|
|
1392
1396
|
width: 100%;
|
|
1393
|
-
margin: 0;
|
|
1397
|
+
margin: 0 auto;
|
|
1394
1398
|
max-width: 100%;
|
|
1395
1399
|
}
|
|
1396
1400
|
}
|
|
@@ -1445,7 +1449,7 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
1445
1449
|
}
|
|
1446
1450
|
}
|
|
1447
1451
|
|
|
1448
|
-
@media (max-width:
|
|
1452
|
+
@media (max-width:1023px) {
|
|
1449
1453
|
.c1 {
|
|
1450
1454
|
-webkit-scroll-snap-align: start;
|
|
1451
1455
|
-moz-scroll-snap-align: start;
|
|
@@ -1459,26 +1463,15 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
1459
1463
|
-webkit-flex-shrink: 0;
|
|
1460
1464
|
-ms-flex-negative: 0;
|
|
1461
1465
|
flex-shrink: 0;
|
|
1462
|
-
margin-right: 0.5rem;
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
.c1:first-child {
|
|
1466
|
-
padding-left: 0.5rem;
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
|
-
.c1:last-child {
|
|
1470
|
-
margin-right: 0;
|
|
1471
|
-
padding-right: 0.5rem;
|
|
1472
1466
|
}
|
|
1473
1467
|
}
|
|
1474
1468
|
|
|
1475
|
-
@media (min-width:
|
|
1469
|
+
@media (min-width:1024px) {
|
|
1476
1470
|
.c1 {
|
|
1477
1471
|
-webkit-flex-basis: calc(50% - 1rem);
|
|
1478
1472
|
-ms-flex-preferred-size: calc(50% - 1rem);
|
|
1479
1473
|
flex-basis: calc(50% - 1rem);
|
|
1480
1474
|
max-width: 564px;
|
|
1481
|
-
height: 100%;
|
|
1482
1475
|
-webkit-align-self: stretch;
|
|
1483
1476
|
-ms-flex-item-align: stretch;
|
|
1484
1477
|
align-self: stretch;
|
|
@@ -1491,7 +1484,6 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
1491
1484
|
-ms-flex-preferred-size: unset;
|
|
1492
1485
|
flex-basis: unset;
|
|
1493
1486
|
max-width: 564px;
|
|
1494
|
-
height: 100%;
|
|
1495
1487
|
-webkit-align-self: stretch;
|
|
1496
1488
|
-ms-flex-item-align: stretch;
|
|
1497
1489
|
align-self: stretch;
|
|
@@ -1828,7 +1820,9 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
1828
1820
|
-ms-flex-direction: column;
|
|
1829
1821
|
flex-direction: column;
|
|
1830
1822
|
width: 100%;
|
|
1831
|
-
|
|
1823
|
+
-webkit-flex: 1 1 auto;
|
|
1824
|
+
-ms-flex: 1 1 auto;
|
|
1825
|
+
flex: 1 1 auto;
|
|
1832
1826
|
background: transparent;
|
|
1833
1827
|
border-radius: 1rem;
|
|
1834
1828
|
box-shadow: 0 0 1rem rgba(0,0,0,0.15);
|
|
@@ -1971,9 +1965,13 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
1971
1965
|
-webkit-justify-content: center;
|
|
1972
1966
|
-ms-flex-pack: center;
|
|
1973
1967
|
justify-content: center;
|
|
1974
|
-
|
|
1968
|
+
-webkit-align-items: stretch;
|
|
1969
|
+
-webkit-box-align: stretch;
|
|
1970
|
+
-ms-flex-align: stretch;
|
|
1971
|
+
align-items: stretch;
|
|
1972
|
+
grid-template-columns: repeat(3,minmax(0,1fr));
|
|
1975
1973
|
width: 100%;
|
|
1976
|
-
margin: 0;
|
|
1974
|
+
margin: 0 auto;
|
|
1977
1975
|
max-width: 100%;
|
|
1978
1976
|
}
|
|
1979
1977
|
}
|
|
@@ -2040,7 +2038,6 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
2040
2038
|
-ms-flex-preferred-size: calc(50% - 1rem);
|
|
2041
2039
|
flex-basis: calc(50% - 1rem);
|
|
2042
2040
|
max-width: 564px;
|
|
2043
|
-
height: 100%;
|
|
2044
2041
|
-webkit-align-self: stretch;
|
|
2045
2042
|
-ms-flex-item-align: stretch;
|
|
2046
2043
|
align-self: stretch;
|
|
@@ -2053,7 +2050,6 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
2053
2050
|
-ms-flex-preferred-size: unset;
|
|
2054
2051
|
flex-basis: unset;
|
|
2055
2052
|
max-width: 564px;
|
|
2056
|
-
height: 100%;
|
|
2057
2053
|
-webkit-align-self: stretch;
|
|
2058
2054
|
-ms-flex-item-align: stretch;
|
|
2059
2055
|
align-self: stretch;
|
|
@@ -17,6 +17,7 @@ const Countdown = _ref => {
|
|
|
17
17
|
endMessage = null,
|
|
18
18
|
introMessage = null
|
|
19
19
|
} = _ref;
|
|
20
|
+
const [thisEndDate, setThisEndDate] = (0, _react.useState)(null);
|
|
20
21
|
const [countdownHasEnded, setCountdownHasEnded] = (0, _react.useState)(false);
|
|
21
22
|
const [countdownTime, setCountdownTime] = (0, _react.useState)({
|
|
22
23
|
days: '00',
|
|
@@ -24,11 +25,14 @@ const Countdown = _ref => {
|
|
|
24
25
|
minutes: '00',
|
|
25
26
|
seconds: '00'
|
|
26
27
|
});
|
|
27
|
-
|
|
28
|
+
(0, _react.useEffect)(() => {
|
|
29
|
+
const isoEndDate = new Date(endDate).toISOString();
|
|
30
|
+
setThisEndDate((0, _moment.default)(isoEndDate));
|
|
31
|
+
}, [endDate]);
|
|
28
32
|
(0, _react.useEffect)(() => {
|
|
29
33
|
const interval = setInterval(() => {
|
|
30
34
|
const now = (0, _moment.default)();
|
|
31
|
-
const timeRemaining = (0, _moment.default)(
|
|
35
|
+
const timeRemaining = (0, _moment.default)(thisEndDate - now);
|
|
32
36
|
const days = timeRemaining.format('DDD');
|
|
33
37
|
const hours = timeRemaining.format('HH');
|
|
34
38
|
const minutes = timeRemaining.format('mm');
|
|
@@ -39,13 +43,16 @@ const Countdown = _ref => {
|
|
|
39
43
|
minutes,
|
|
40
44
|
seconds
|
|
41
45
|
});
|
|
42
|
-
if (
|
|
46
|
+
if (thisEndDate.diff(now, 'seconds') < 1) {
|
|
47
|
+
clearInterval(interval);
|
|
43
48
|
setCountdownHasEnded(true);
|
|
44
49
|
}
|
|
45
50
|
}, 1000);
|
|
46
51
|
return () => clearInterval(interval);
|
|
47
|
-
}, [
|
|
48
|
-
if (countdownHasEnded)
|
|
52
|
+
}, [thisEndDate]);
|
|
53
|
+
if (countdownHasEnded) {
|
|
54
|
+
return endMessage;
|
|
55
|
+
}
|
|
49
56
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, introMessage, /*#__PURE__*/_react.default.createElement(_Countdown.Wrapper, null, /*#__PURE__*/_react.default.createElement(_Countdown.Digits, null, /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
50
57
|
color: color,
|
|
51
58
|
family: "Anton",
|
|
@@ -5,5 +5,5 @@ import Text from '../../Atoms/Text/Text';
|
|
|
5
5
|
const intro = <Text tag="h2" size="xl">Hello</Text>;
|
|
6
6
|
const end = <Text tag="h2" size="xl">Bye</Text>;
|
|
7
7
|
|
|
8
|
-
<Countdown endDate="Jan
|
|
8
|
+
<Countdown endDate="Jan 16, 2026 10:30:00" endMessage={end} introMessage={intro}/>
|
|
9
9
|
```
|
|
@@ -73,7 +73,7 @@ const MainNav = _ref => {
|
|
|
73
73
|
|
|
74
74
|
/* Determine which field represents our url path */
|
|
75
75
|
let thisUrl = (0, _navHelper.NavHelper)(thisFirstChild);
|
|
76
|
-
const relNoopener = !(0, _allowListed.default)(thisUrl)
|
|
76
|
+
const relNoopener = !(0, _allowListed.default)(thisUrl) ? 'noopener' : 'false';
|
|
77
77
|
const hasSubMenu = group.links && group.links.length > 1;
|
|
78
78
|
const hasPopUp = hasSubMenu ? 'true' : null;
|
|
79
79
|
thisUrl = (0, _internalLinkHelper.InternalLinkHelper)(thisUrl);
|