@nnc-digital/nnc-design-system 1.0.0-beta20 → 1.0.0-beta22
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/build/index.esm.js +55 -29
- package/build/index.esm.js.map +1 -1
- package/build/index.js +55 -29
- package/build/index.js.map +1 -1
- package/build/index.mjs.js +55 -29
- package/build/index.mjs.js.map +1 -1
- package/package.json +1 -1
package/build/index.esm.js
CHANGED
|
@@ -6344,6 +6344,15 @@ const Container$I = styled.div`
|
|
|
6344
6344
|
}
|
|
6345
6345
|
`;
|
|
6346
6346
|
|
|
6347
|
+
const ImageColumn = styled.div`
|
|
6348
|
+
width: 100%;
|
|
6349
|
+
|
|
6350
|
+
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) {
|
|
6351
|
+
width: 50%;
|
|
6352
|
+
min-height: 300px;
|
|
6353
|
+
}
|
|
6354
|
+
`;
|
|
6355
|
+
|
|
6347
6356
|
const ImageLink = styled.a`
|
|
6348
6357
|
background-image: url('${(props) => props.$img}');
|
|
6349
6358
|
background-size: cover;
|
|
@@ -6353,7 +6362,6 @@ const ImageLink = styled.a`
|
|
|
6353
6362
|
display: block;
|
|
6354
6363
|
|
|
6355
6364
|
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) {
|
|
6356
|
-
width: 50%;
|
|
6357
6365
|
min-height: 300px;
|
|
6358
6366
|
}
|
|
6359
6367
|
`;
|
|
@@ -6397,17 +6405,18 @@ const CTA = styled.a`
|
|
|
6397
6405
|
var PromoBanner = function (_a) {
|
|
6398
6406
|
var title = _a.title, image1440x810 = _a.image1440x810, image144x81 = _a.image144x81, ctaText = _a.ctaText, ctaUrl = _a.ctaUrl, children = _a.children;
|
|
6399
6407
|
return (React.createElement(Container$I, null,
|
|
6400
|
-
React.createElement(
|
|
6401
|
-
|
|
6402
|
-
|
|
6408
|
+
React.createElement(ImageColumn, null,
|
|
6409
|
+
React.createElement(LazyImage, { src: image1440x810, placeholder: image144x81, visibilitySensorProps: {
|
|
6410
|
+
partialVisibility: true,
|
|
6411
|
+
} }, function (src) { return React.createElement(ImageLink, { "$img": src, href: ctaUrl, title: ctaText }); })),
|
|
6403
6412
|
React.createElement(Wrapper$4, null,
|
|
6404
6413
|
React.createElement(Heading, { text: title }),
|
|
6405
6414
|
React.createElement(Content$4, null, children),
|
|
6406
6415
|
React.createElement(CTA, { href: ctaUrl }, ctaText))));
|
|
6407
6416
|
};
|
|
6408
6417
|
|
|
6409
|
-
const imageHeightMobile$
|
|
6410
|
-
const imageHeightDesktop$
|
|
6418
|
+
const imageHeightMobile$2 = 150;
|
|
6419
|
+
const imageHeightDesktop$2 = 200;
|
|
6411
6420
|
|
|
6412
6421
|
/**
|
|
6413
6422
|
* Container for the 1-3 promo tiles
|
|
@@ -6484,7 +6493,7 @@ const PromoTile = styled.a`
|
|
|
6484
6493
|
const PromoImage = styled.span`
|
|
6485
6494
|
display: block;
|
|
6486
6495
|
width: 100%;
|
|
6487
|
-
height: ${imageHeightMobile$
|
|
6496
|
+
height: ${imageHeightMobile$2}px;
|
|
6488
6497
|
overflow: hidden;
|
|
6489
6498
|
background-image: url('${(props) => props.$background}');
|
|
6490
6499
|
background-size: cover;
|
|
@@ -6492,11 +6501,11 @@ const PromoImage = styled.span`
|
|
|
6492
6501
|
justify-self: center;
|
|
6493
6502
|
|
|
6494
6503
|
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.s}) {
|
|
6495
|
-
min-height: ${imageHeightDesktop$
|
|
6504
|
+
min-height: ${imageHeightDesktop$2}px;
|
|
6496
6505
|
}
|
|
6497
6506
|
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) {
|
|
6498
6507
|
flex: none;
|
|
6499
|
-
height: ${imageHeightDesktop$
|
|
6508
|
+
height: ${imageHeightDesktop$2}px;
|
|
6500
6509
|
}
|
|
6501
6510
|
`;
|
|
6502
6511
|
|
|
@@ -6505,11 +6514,11 @@ const PromoImage = styled.span`
|
|
|
6505
6514
|
*/
|
|
6506
6515
|
const PromoText = styled.div`
|
|
6507
6516
|
padding: 15px;
|
|
6508
|
-
height: calc(100% - ${imageHeightMobile$
|
|
6517
|
+
height: calc(100% - ${imageHeightMobile$2 + 30}px);
|
|
6509
6518
|
${(props) => props.theme.fontStyles};
|
|
6510
6519
|
|
|
6511
6520
|
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.s}) {
|
|
6512
|
-
height: calc(100% - ${imageHeightDesktop$
|
|
6521
|
+
height: calc(100% - ${imageHeightDesktop$2 + 30}px);
|
|
6513
6522
|
}
|
|
6514
6523
|
`;
|
|
6515
6524
|
|
|
@@ -9008,8 +9017,8 @@ var NewsArticleDate = function (_a) {
|
|
|
9008
9017
|
React.createElement(DisplayDate, { text: text, format: format })));
|
|
9009
9018
|
};
|
|
9010
9019
|
|
|
9011
|
-
const imageHeightMobile = 150;
|
|
9012
|
-
const imageHeightDesktop = 200;
|
|
9020
|
+
const imageHeightMobile$1 = 150;
|
|
9021
|
+
const imageHeightDesktop$1 = 200;
|
|
9013
9022
|
|
|
9014
9023
|
const Container$r = styled.div`
|
|
9015
9024
|
${(props) => props.theme.fontStyles};
|
|
@@ -9110,7 +9119,7 @@ const ArticleContent$1 = styled.div`
|
|
|
9110
9119
|
const ImageContainer$3 = styled.span`
|
|
9111
9120
|
display: block;
|
|
9112
9121
|
width: 100%;
|
|
9113
|
-
height: ${imageHeightMobile}px;
|
|
9122
|
+
height: ${imageHeightMobile$1}px;
|
|
9114
9123
|
overflow: hidden;
|
|
9115
9124
|
background-image: url('${(props) => props.$background}');
|
|
9116
9125
|
background-size: contain;
|
|
@@ -9121,11 +9130,11 @@ const ImageContainer$3 = styled.span`
|
|
|
9121
9130
|
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.s}) {
|
|
9122
9131
|
flex: 0 0 40%;
|
|
9123
9132
|
height: 100%;
|
|
9124
|
-
min-height: ${imageHeightMobile}px;
|
|
9133
|
+
min-height: ${imageHeightMobile$1}px;
|
|
9125
9134
|
}
|
|
9126
9135
|
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) {
|
|
9127
9136
|
flex: none;
|
|
9128
|
-
height: ${imageHeightDesktop}px;
|
|
9137
|
+
height: ${imageHeightDesktop$1}px;
|
|
9129
9138
|
}
|
|
9130
9139
|
`;
|
|
9131
9140
|
|
|
@@ -9411,6 +9420,9 @@ var NewsArticleImage = function (_a) {
|
|
|
9411
9420
|
imageCaption && React.createElement(Small, { itemProp: "copyrightHolder" }, imageCaption))); })));
|
|
9412
9421
|
};
|
|
9413
9422
|
|
|
9423
|
+
const imageHeightMobile = 150;
|
|
9424
|
+
const imageHeightDesktop = 200;
|
|
9425
|
+
|
|
9414
9426
|
const Container$o = styled.div`
|
|
9415
9427
|
${(props) => props.theme.fontStyles};
|
|
9416
9428
|
`;
|
|
@@ -9490,10 +9502,28 @@ const ArticleContent = styled.div`
|
|
|
9490
9502
|
}
|
|
9491
9503
|
`;
|
|
9492
9504
|
|
|
9505
|
+
const ImageWrapper = styled.div`
|
|
9506
|
+
width: 100%;
|
|
9507
|
+
|
|
9508
|
+
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.s}) {
|
|
9509
|
+
width: 180px;
|
|
9510
|
+
flex: 0 0 180px;
|
|
9511
|
+
}
|
|
9512
|
+
|
|
9513
|
+
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) {
|
|
9514
|
+
width: 50%;
|
|
9515
|
+
flex: none;
|
|
9516
|
+
}
|
|
9517
|
+
|
|
9518
|
+
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.l}) {
|
|
9519
|
+
width: 33%;
|
|
9520
|
+
}
|
|
9521
|
+
`;
|
|
9522
|
+
|
|
9493
9523
|
const ImageContainer$1 = styled.span`
|
|
9494
9524
|
display: block;
|
|
9495
9525
|
width: 100%;
|
|
9496
|
-
height:
|
|
9526
|
+
height: ${imageHeightMobile}px;
|
|
9497
9527
|
overflow: hidden;
|
|
9498
9528
|
background-image: url('${(props) => props.$background}');
|
|
9499
9529
|
background-size: contain;
|
|
@@ -9502,15 +9532,10 @@ const ImageContainer$1 = styled.span`
|
|
|
9502
9532
|
justify-self: center;
|
|
9503
9533
|
|
|
9504
9534
|
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.s}) {
|
|
9505
|
-
|
|
9506
|
-
height: auto;
|
|
9507
|
-
min-width: 180px;
|
|
9535
|
+
height: ${imageHeightMobile}px;
|
|
9508
9536
|
}
|
|
9509
9537
|
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) {
|
|
9510
|
-
|
|
9511
|
-
}
|
|
9512
|
-
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.l}) {
|
|
9513
|
-
width: 33%;
|
|
9538
|
+
height: ${imageHeightDesktop}px;
|
|
9514
9539
|
}
|
|
9515
9540
|
`;
|
|
9516
9541
|
|
|
@@ -9535,9 +9560,10 @@ var NewsArticleList = function (_a) {
|
|
|
9535
9560
|
return (React.createElement(Container$o, { "data-testid": "NewsArticleList" },
|
|
9536
9561
|
React.createElement(Row$1, { isList: true }, results.map(function (article) { return (React.createElement(Column, { isList: true, small: "full", medium: "full", large: "full", key: article.id },
|
|
9537
9562
|
React.createElement(ArticleContainer, { href: article.url, title: article.title },
|
|
9538
|
-
article.image720x405 && (React.createElement(
|
|
9539
|
-
|
|
9540
|
-
|
|
9563
|
+
article.image720x405 && (React.createElement(ImageWrapper, null,
|
|
9564
|
+
React.createElement(LazyImage, { src: article.image720x405, placeholder: article.image72x41, visibilitySensorProps: {
|
|
9565
|
+
partialVisibility: true,
|
|
9566
|
+
} }, function (src) { return (React.createElement(ImageContainer$1, { className: "news-article-list__image", "$background": src, role: "img", "aria-label": article.imageAltText ? article.imageAltText : 'News article' })); }))),
|
|
9541
9567
|
React.createElement(ArticleContent, { "$withImage": article.image720x405 ? true : false },
|
|
9542
9568
|
React.createElement(Title$4, { className: "news-article-list__title" }, article.title),
|
|
9543
9569
|
article.excerpt.length > extractLength
|
|
@@ -14863,7 +14889,7 @@ var Event = function (_a) {
|
|
|
14863
14889
|
id: 'org-1',
|
|
14864
14890
|
name: 'Wicksteed Park',
|
|
14865
14891
|
description: 'A family theme park and nature reserve in Kettering',
|
|
14866
|
-
logo: 'https://
|
|
14892
|
+
logo: 'https://placehold.co/200x100?text=Wicksteed+Park',
|
|
14867
14893
|
url: 'https://www.wicksteedpark.co.uk',
|
|
14868
14894
|
},
|
|
14869
14895
|
location: {
|
|
@@ -14971,7 +14997,7 @@ var Event = function (_a) {
|
|
|
14971
14997
|
id: 'org-2',
|
|
14972
14998
|
name: 'Northamptonshire Family Support',
|
|
14973
14999
|
description: 'Supporting families across Northamptonshire',
|
|
14974
|
-
logo: 'https://
|
|
15000
|
+
logo: 'https://placehold.co/200x100?text=Family+Support',
|
|
14975
15001
|
url: 'https://www.northantsfamilysupport.org.uk',
|
|
14976
15002
|
},
|
|
14977
15003
|
location: {
|