northants-design-system 3.1.3 → 3.2.0
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.d.ts +2 -1
- package/build/index.js +109 -46
- package/build/index.js.map +1 -1
- package/build/index.mjs.js +109 -47
- package/build/index.mjs.js.map +1 -1
- package/build/library/pages/ContentPage/ContentPage.storydata.d.ts +2 -0
- package/package.json +1 -1
package/build/index.mjs.js
CHANGED
|
@@ -3613,7 +3613,7 @@ var Autocomplete = function (_a) {
|
|
|
3613
3613
|
})));
|
|
3614
3614
|
};
|
|
3615
3615
|
|
|
3616
|
-
const Container$
|
|
3616
|
+
const Container$1v = styled.div`
|
|
3617
3617
|
display: block;
|
|
3618
3618
|
`;
|
|
3619
3619
|
|
|
@@ -3699,7 +3699,7 @@ var BackToTop = function (_a) {
|
|
|
3699
3699
|
useEffect(function () {
|
|
3700
3700
|
window.addEventListener('scroll', toggleVisible);
|
|
3701
3701
|
});
|
|
3702
|
-
return (React__default.createElement(Container$
|
|
3702
|
+
return (React__default.createElement(Container$1v, { "data-testid": "BackToTop" }, isActive && (React__default.createElement(BackToTopButton, { onClick: scrollToTop, "$visible": visible, "data-testid": "BackToTopButton", type: "button", "aria-label": "Go to the top of the page" },
|
|
3703
3703
|
React__default.createElement(ChevronIcon, { colourFill: theme.theme_vars.colours.white, direction: "up" })))));
|
|
3704
3704
|
};
|
|
3705
3705
|
|
|
@@ -3792,7 +3792,7 @@ var Button$5 = function (_a) {
|
|
|
3792
3792
|
return (React__default.createElement(StyledButton$1, __assign({ className: ["button--".concat(size), mode].join(' ') }, href, { title: title ? title : text, "$colourOverride": colourOverride && colourOverride }, props), text ? text : children));
|
|
3793
3793
|
};
|
|
3794
3794
|
|
|
3795
|
-
const Container$
|
|
3795
|
+
const Container$1u = styled.div`
|
|
3796
3796
|
display: block;
|
|
3797
3797
|
background-color: ${(props) =>
|
|
3798
3798
|
props.$isOpen ? props.theme.theme_vars.colours.positive : props.theme.theme_vars.colours.negative}16;
|
|
@@ -20215,7 +20215,7 @@ var ConsultationStatus = function (_a) {
|
|
|
20215
20215
|
detail: new Date(closeDate).toLocaleDateString('en-GB'),
|
|
20216
20216
|
},
|
|
20217
20217
|
];
|
|
20218
|
-
return (React__default.createElement(Container$
|
|
20218
|
+
return (React__default.createElement(Container$1u, { "data-testid": "ConsultationStatus", "$isOpen": isOpen },
|
|
20219
20219
|
React__default.createElement(SummaryList, { terms: terms, hasBorders: false, hasMargin: false, hasWrapOnMobile: false })));
|
|
20220
20220
|
};
|
|
20221
20221
|
|
|
@@ -22428,7 +22428,7 @@ var DynamicIcon = function (_a) {
|
|
|
22428
22428
|
React__default.createElement(DynamicComponent, { name: icon, isHover: true }))))));
|
|
22429
22429
|
};
|
|
22430
22430
|
|
|
22431
|
-
const Container$
|
|
22431
|
+
const Container$1t = styled.div`
|
|
22432
22432
|
display: block;
|
|
22433
22433
|
padding: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
22434
22434
|
border-bottom: ${(props) => (props.$hasBorder ? `1px solid ${props.theme.theme_vars.colours.grey}` : 'none')};
|
|
@@ -22600,14 +22600,14 @@ var formatDateRange = function (startDate, endDate) {
|
|
|
22600
22600
|
|
|
22601
22601
|
var EventDetails = function (_a) {
|
|
22602
22602
|
var startTime = _a.startTime, endTime = _a.endTime, location = _a.location, _b = _a.hasBorder, hasBorder = _b === void 0 ? true : _b, _c = _a.hasMargin, hasMargin = _c === void 0 ? true : _c;
|
|
22603
|
-
return (React__default.createElement(Container$
|
|
22603
|
+
return (React__default.createElement(Container$1t, { "data-testid": "EventDetails", "$hasBorder": hasBorder, "$hasMargin": hasMargin },
|
|
22604
22604
|
React__default.createElement(EventRow, null,
|
|
22605
22605
|
React__default.createElement(HeadingWithIcon, { icon: "events", level: 4, text: formatDateRange(startTime, endTime), hasHover: false })),
|
|
22606
22606
|
React__default.createElement(EventRow, null,
|
|
22607
22607
|
React__default.createElement(HeadingWithIcon, { icon: "address", level: 4, text: location, hasHover: false }))));
|
|
22608
22608
|
};
|
|
22609
22609
|
|
|
22610
|
-
const Container$
|
|
22610
|
+
const Container$1s = styled.div`
|
|
22611
22611
|
display: flex;
|
|
22612
22612
|
width: 100%;
|
|
22613
22613
|
min-height: 400px;
|
|
@@ -22631,7 +22631,7 @@ var Map$1 = function (_a) {
|
|
|
22631
22631
|
setMap(new window.google.maps.Map(ref.current, { center: center, zoom: zoom }));
|
|
22632
22632
|
}
|
|
22633
22633
|
}, [ref, map]);
|
|
22634
|
-
return (React__default.createElement(Container$
|
|
22634
|
+
return (React__default.createElement(Container$1s, { "data-testid": "Map" },
|
|
22635
22635
|
React__default.createElement("div", { ref: ref }),
|
|
22636
22636
|
React__default.Children.map(children, function (child) {
|
|
22637
22637
|
if (React__default.isValidElement(child)) {
|
|
@@ -22688,7 +22688,7 @@ var MapMarker = function (options) {
|
|
|
22688
22688
|
return null;
|
|
22689
22689
|
};
|
|
22690
22690
|
|
|
22691
|
-
const Container$
|
|
22691
|
+
const Container$1r = styled.div`
|
|
22692
22692
|
${(props) => props.theme.fontStyles};
|
|
22693
22693
|
display: block;
|
|
22694
22694
|
border-top: 1px solid ${(props) => props.theme.theme_vars.colours.grey};
|
|
@@ -23474,7 +23474,7 @@ var Pagination = function (_a) {
|
|
|
23474
23474
|
}
|
|
23475
23475
|
};
|
|
23476
23476
|
if (numbers.length > 1) {
|
|
23477
|
-
return (React__default.createElement(Container$
|
|
23477
|
+
return (React__default.createElement(Container$1r, { "data-testid": "Pagination", role: "navigation", "aria-label": "Pagination" },
|
|
23478
23478
|
currentPage > 1 && (React__default.createElement(Previous, { onClick: function () { return buttonClick(currentPage - 1); }, title: "Go back a page" }, "Previous")),
|
|
23479
23479
|
React__default.createElement(NumbersContainer, null, numbers.map(function (v, i) { return (React__default.createElement(NumberContainer, { key: i },
|
|
23480
23480
|
v === '...' && React__default.createElement(Ellipsis, null, "..."),
|
|
@@ -23486,7 +23486,7 @@ var Pagination = function (_a) {
|
|
|
23486
23486
|
return null;
|
|
23487
23487
|
};
|
|
23488
23488
|
|
|
23489
|
-
const Container$
|
|
23489
|
+
const Container$1q = styled.div`
|
|
23490
23490
|
${(props) => props.theme.fontStyles};
|
|
23491
23491
|
margin-bottom: 30px;
|
|
23492
23492
|
`;
|
|
@@ -23670,7 +23670,7 @@ var CheckboxListFilter = function (_a) {
|
|
|
23670
23670
|
}
|
|
23671
23671
|
};
|
|
23672
23672
|
var backupLabel = useId();
|
|
23673
|
-
return (React__default.createElement(Container$
|
|
23673
|
+
return (React__default.createElement(Container$1q, { "data-testid": "CheckboxListFilter" },
|
|
23674
23674
|
React__default.createElement(Fieldset$2, { "aria-describedby": hintId },
|
|
23675
23675
|
React__default.createElement(Legend$4, { "$labelHidden": labelHidden, "data-testid": "CheckboxListFilterLegend" }, label),
|
|
23676
23676
|
React__default.createElement(Hint$1, { id: hintId, "$hintHidden": hintHidden, "data-testid": "CheckboxListFilterHint" }, hint),
|
|
@@ -23679,11 +23679,11 @@ var CheckboxListFilter = function (_a) {
|
|
|
23679
23679
|
React__default.createElement(CheckboxLabel, { "$isChecked": option.checked, htmlFor: option.value }, option.title))); })))));
|
|
23680
23680
|
};
|
|
23681
23681
|
|
|
23682
|
-
const Container$
|
|
23682
|
+
const Container$1p = styled.div`
|
|
23683
23683
|
margin-bottom: ${(props) => (props.$hasMargin ? props.theme.theme_vars.spacingSizes.small : 0)};
|
|
23684
23684
|
`;
|
|
23685
23685
|
|
|
23686
|
-
const Container$
|
|
23686
|
+
const Container$1o = styled.div`
|
|
23687
23687
|
${(props) => props.theme.fontStyles};
|
|
23688
23688
|
width: ${(props) => (props.$isFullWidth ? '100%' : 'auto')};
|
|
23689
23689
|
`;
|
|
@@ -23750,7 +23750,7 @@ const ErrorText$2 = styled.p`
|
|
|
23750
23750
|
|
|
23751
23751
|
var DropDownSelect = function (_a) {
|
|
23752
23752
|
var id = _a.id, label = _a.label, options = _a.options, onChange = _a.onChange, selected = _a.selected, _b = _a.hideLabel, hideLabel = _b === void 0 ? false : _b, _c = _a.isErrored, isErrored = _c === void 0 ? false : _c, errorText = _a.errorText, _d = _a.value, value = _d === void 0 ? undefined : _d, _e = _a.hasBottomMargin, hasBottomMargin = _e === void 0 ? false : _e, _f = _a.hasBoldLabel, hasBoldLabel = _f === void 0 ? false : _f, _g = _a.isFullWidth, isFullWidth = _g === void 0 ? false : _g;
|
|
23753
|
-
return (React__default.createElement(Container$
|
|
23753
|
+
return (React__default.createElement(Container$1o, { "$isFullWidth": isFullWidth },
|
|
23754
23754
|
React__default.createElement(Label$a, { htmlFor: id, "$hideLabel": hideLabel, "$hasBoldLabel": hasBoldLabel }, label),
|
|
23755
23755
|
errorText && React__default.createElement(ErrorText$2, { id: "".concat(id, "Error") }, errorText),
|
|
23756
23756
|
typeof value !== 'undefined' ? (React__default.createElement(Select, { id: id, name: id, onChange: onChange && onChange, value: value, "$isErrored": isErrored, "$hasBottomMargin": hasBottomMargin, "$isFullWidth": isFullWidth }, options.map(function (option, i) { return (React__default.createElement(Option, { key: i, value: option.value }, option.title)); }))) : (React__default.createElement(Select, { id: id, name: id, onChange: onChange && onChange, defaultValue: selected && selected, "$isErrored": isErrored, "$isFullWidth": isFullWidth }, options.map(function (option, i) { return (React__default.createElement(Option, { key: i, value: option.value }, option.title)); })))));
|
|
@@ -23763,7 +23763,7 @@ var DropDownFilter = function (_a) {
|
|
|
23763
23763
|
setValue(e.target.value);
|
|
23764
23764
|
handleParams('news', [{ key: NewsArticleFilterFields[filterKey].queryParamKey, value: e.target.value }], ['page']);
|
|
23765
23765
|
};
|
|
23766
|
-
return (React__default.createElement(Container$
|
|
23766
|
+
return (React__default.createElement(Container$1p, { "$hasMargin": hasMargin },
|
|
23767
23767
|
React__default.createElement(DropDownSelect, { id: id, label: label, options: options, onChange: optionPicked, selected: value, hideLabel: hideLabel })));
|
|
23768
23768
|
};
|
|
23769
23769
|
|
|
@@ -23908,7 +23908,7 @@ const ListItem$3 = styled.li`
|
|
|
23908
23908
|
}
|
|
23909
23909
|
`;
|
|
23910
23910
|
|
|
23911
|
-
const Container$
|
|
23911
|
+
const Container$1n = styled.div`
|
|
23912
23912
|
box-sizing: border-box;
|
|
23913
23913
|
display: flex;
|
|
23914
23914
|
flex-wrap: wrap;
|
|
@@ -23934,7 +23934,7 @@ const Container$1m = styled.div`
|
|
|
23934
23934
|
|
|
23935
23935
|
var Row$1 = function (_a) {
|
|
23936
23936
|
var _b = _a.hasBorder, hasBorder = _b === void 0 ? false : _b, _c = _a.isList, isList = _c === void 0 ? false : _c, _d = _a.hasWrap, hasWrap = _d === void 0 ? true : _d, children = _a.children, classes = _a.classes;
|
|
23937
|
-
return (React__default.createElement(Container$
|
|
23937
|
+
return (React__default.createElement(Container$1n, { "data-testid": "Row", "$hasBorder": hasBorder, "$hasWrap": hasWrap, as: isList ? 'ul' : 'div', className: classes }, children));
|
|
23938
23938
|
};
|
|
23939
23939
|
|
|
23940
23940
|
const calculateWidth = (size) => {
|
|
@@ -23984,7 +23984,7 @@ const widths = (props) => {
|
|
|
23984
23984
|
`;
|
|
23985
23985
|
};
|
|
23986
23986
|
|
|
23987
|
-
const Container$
|
|
23987
|
+
const Container$1m = styled.div`
|
|
23988
23988
|
box-sizing: border-box;
|
|
23989
23989
|
display: block;
|
|
23990
23990
|
padding: ${(props) => (props.$hasPadding ? props.theme.theme_vars.spacingSizes.small : `0`)};
|
|
@@ -23996,7 +23996,7 @@ const Container$1l = styled.div`
|
|
|
23996
23996
|
|
|
23997
23997
|
var Column = function (_a) {
|
|
23998
23998
|
var _b = _a.small, small = _b === void 0 ? 'full' : _b, _c = _a.medium, medium = _c === void 0 ? 'one-half' : _c, _d = _a.large, large = _d === void 0 ? 'one-third' : _d, _e = _a.hasPadding, hasPadding = _e === void 0 ? true : _e, _f = _a.hasBorder, hasBorder = _f === void 0 ? false : _f, _g = _a.isList, isList = _g === void 0 ? false : _g, classes = _a.classes, id = _a.id, children = _a.children, role = _a.role;
|
|
23999
|
-
return (React__default.createElement(Container$
|
|
23999
|
+
return (React__default.createElement(Container$1m, { "data-testid": "Column", "$small": small, "$medium": medium, "$large": large, "$hasPadding": hasPadding, "$hasBorder": hasBorder, as: isList ? 'li' : 'div', className: classes, role: role, id: id }, children));
|
|
24000
24000
|
};
|
|
24001
24001
|
|
|
24002
24002
|
var PromotedLinks = function (_a) {
|
|
@@ -24013,7 +24013,7 @@ var PromotedLinks = function (_a) {
|
|
|
24013
24013
|
}
|
|
24014
24014
|
};
|
|
24015
24015
|
|
|
24016
|
-
const Container$
|
|
24016
|
+
const Container$1l = styled.div`
|
|
24017
24017
|
display: block;
|
|
24018
24018
|
`;
|
|
24019
24019
|
|
|
@@ -24063,7 +24063,7 @@ const promotedStyles = (props) => {
|
|
|
24063
24063
|
}
|
|
24064
24064
|
};
|
|
24065
24065
|
|
|
24066
|
-
const Container$
|
|
24066
|
+
const Container$1k = styled.a`
|
|
24067
24067
|
display: flex;
|
|
24068
24068
|
flex-direction: row;
|
|
24069
24069
|
flex-wrap: wrap;
|
|
@@ -24200,7 +24200,7 @@ const imageRatio = (props) => {
|
|
|
24200
24200
|
}
|
|
24201
24201
|
};
|
|
24202
24202
|
|
|
24203
|
-
const Container$
|
|
24203
|
+
const Container$1j = styled.div`
|
|
24204
24204
|
display: block;
|
|
24205
24205
|
position: ${(props) => (props.$ratio === 'auto' ? 'absolute' : 'relative')};
|
|
24206
24206
|
${imageRatio}
|
|
@@ -24218,13 +24218,13 @@ const Image$3 = styled.img`
|
|
|
24218
24218
|
|
|
24219
24219
|
var ResponsiveImage = function (_a) {
|
|
24220
24220
|
var imageSmall = _a.imageSmall, imageLarge = _a.imageLarge, imageAltText = _a.imageAltText, _b = _a.smallWidth, smallWidth = _b === void 0 ? '400' : _b, _c = _a.largeWidth, largeWidth = _c === void 0 ? '1200' : _c, ratio = _a.ratio, _d = _a.objectFit, objectFit = _d === void 0 ? 'cover' : _d;
|
|
24221
|
-
return (React__default.createElement(Container$
|
|
24221
|
+
return (React__default.createElement(Container$1j, { "data-testid": "ResponsiveImage", "$ratio": ratio },
|
|
24222
24222
|
React__default.createElement(Image$3, { alt: imageAltText, loading: "lazy", srcSet: "".concat(imageSmall, " ").concat(smallWidth, "w, ").concat(imageLarge, " ").concat(largeWidth, "w"), sizes: "(max-width: 550px) 550px, ".concat(largeWidth, "px"), src: imageLarge, "$objectFit": objectFit })));
|
|
24223
24223
|
};
|
|
24224
24224
|
|
|
24225
24225
|
var EventLink = function (_a) {
|
|
24226
24226
|
var title = _a.title, summary = _a.summary, startTime = _a.startTime, endTime = _a.endTime, location = _a.location, url = _a.url, imageLarge = _a.imageLarge, imageSmall = _a.imageSmall, imageAltText = _a.imageAltText, _b = _a.showSummary, showSummary = _b === void 0 ? false : _b, _c = _a.hasPadding, hasPadding = _c === void 0 ? true : _c, _d = _a.isPromoted, isPromoted = _d === void 0 ? false : _d, parentTitle = _a.parentTitle;
|
|
24227
|
-
return (React__default.createElement(Container$
|
|
24227
|
+
return (React__default.createElement(Container$1k, { "data-testid": "EventLink", href: url, "$isPromoted": isPromoted },
|
|
24228
24228
|
React__default.createElement(Row$1, null,
|
|
24229
24229
|
React__default.createElement(Column, { small: "full", medium: imageLarge ? 'two-thirds' : 'full', large: imageLarge ? 'two-thirds' : 'full', hasPadding: false },
|
|
24230
24230
|
React__default.createElement(EventContent, { "$hasPadding": hasPadding },
|
|
@@ -24240,13 +24240,13 @@ var EventLink = function (_a) {
|
|
|
24240
24240
|
// A list of related events
|
|
24241
24241
|
var RelatedEvents = function (_a) {
|
|
24242
24242
|
var title = _a.title, events = _a.events;
|
|
24243
|
-
return (React__default.createElement(Container$
|
|
24243
|
+
return (React__default.createElement(Container$1l, { "data-testid": "RelatedEvents" },
|
|
24244
24244
|
React__default.createElement(Title$a, null, title),
|
|
24245
24245
|
React__default.createElement(List$3, null, events.map(function (event, index) { return (React__default.createElement(ListItem$2, { key: index },
|
|
24246
24246
|
React__default.createElement(EventLink, { title: event.title, startTime: event.startTime, endTime: event.endTime, showSummary: false, url: event.url, location: event.location, hasPadding: false }))); }))));
|
|
24247
24247
|
};
|
|
24248
24248
|
|
|
24249
|
-
const Container$
|
|
24249
|
+
const Container$1i = styled.div`
|
|
24250
24250
|
display: block;
|
|
24251
24251
|
`;
|
|
24252
24252
|
|
|
@@ -24282,7 +24282,7 @@ const Cookies = styled.button`
|
|
|
24282
24282
|
}
|
|
24283
24283
|
`;
|
|
24284
24284
|
|
|
24285
|
-
const Container$
|
|
24285
|
+
const Container$1h = styled.div`
|
|
24286
24286
|
${(props) => props.theme.fontStyles}
|
|
24287
24287
|
background-color: ${(props) => props.theme.theme_vars.colours.grey_light};
|
|
24288
24288
|
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
@@ -24628,18 +24628,18 @@ var CookieBanner = function (_a) {
|
|
|
24628
24628
|
hideCookiesAcceptedConfirmationBanner();
|
|
24629
24629
|
};
|
|
24630
24630
|
return (React__default.createElement(React__default.Fragment, null,
|
|
24631
|
-
showCookieBanner && (React__default.createElement(Container$
|
|
24631
|
+
showCookieBanner && (React__default.createElement(Container$1h, { "data-testid": "CookieBanner" },
|
|
24632
24632
|
React__default.createElement(CookieMessage, null,
|
|
24633
24633
|
React__default.createElement(CookieHeading, null, title),
|
|
24634
24634
|
React__default.createElement(CookieParagraph, null, paragraph),
|
|
24635
24635
|
React__default.createElement(ButtonsContainer, null,
|
|
24636
24636
|
React__default.createElement(FormButton, { primary: true, text: acceptButtonText, isDisabled: false, type: "button", onClick: acceptCookies, size: "large" }),
|
|
24637
24637
|
React__default.createElement(FormButton, { primary: true, text: rejectButtonText, isDisabled: false, type: "button", onClick: rejectCookies, size: "large" }))))),
|
|
24638
|
-
showCookiesRejectedBanner && (React__default.createElement(Container$
|
|
24638
|
+
showCookiesRejectedBanner && (React__default.createElement(Container$1h, { "data-testid": "CookieBannerRejected", id: "CookieBannerRejected" },
|
|
24639
24639
|
React__default.createElement(CookieMessage, { isInline: true },
|
|
24640
24640
|
React__default.createElement(CookieParagraph, null, rejectConfirmationText),
|
|
24641
24641
|
React__default.createElement(CookieHide, { onClick: hideCookiesConfirmationBanner, "aria-controls": "CookieBannerRejected", "aria-hidden": "false" }, "Hide")))),
|
|
24642
|
-
showCookiesAcceptedBanner && (React__default.createElement(Container$
|
|
24642
|
+
showCookiesAcceptedBanner && (React__default.createElement(Container$1h, { "data-testid": "CookieBannerAccepted", id: "CookieBannerAccepted" },
|
|
24643
24643
|
React__default.createElement(CookieMessage, { isInline: true },
|
|
24644
24644
|
React__default.createElement(CookieParagraph, null, acceptConfirmationText),
|
|
24645
24645
|
React__default.createElement(CookieHide, { onClick: hideCookiesConfirmationBanner, "aria-controls": "CookieBannerAccepted", "aria-hidden": "false" }, "Hide"))))));
|
|
@@ -24661,7 +24661,7 @@ var StaticMap = function (_a) {
|
|
|
24661
24661
|
return "&markers=size:".concat(size, "%7Ccolor:").concat(colour).concat(label, "%7C").concat(mapMarker.lat, ",").concat(mapMarker.lng);
|
|
24662
24662
|
})
|
|
24663
24663
|
.join('');
|
|
24664
|
-
return (React__default.createElement(Container$
|
|
24664
|
+
return (React__default.createElement(Container$1i, { "data-testid": "StaticMap" },
|
|
24665
24665
|
React__default.createElement(Message$1, null,
|
|
24666
24666
|
React__default.createElement("span", null,
|
|
24667
24667
|
"To interact with the map, you need to ",
|
|
@@ -24680,7 +24680,7 @@ var TextInput = function (_a) {
|
|
|
24680
24680
|
React__default.createElement(StyledTextInput, { type: "text", id: id, name: name, defaultValue: value, "$size": size, placeholder: placeholder, "$isErrored": isErrored, "$isLarge": isLarge })));
|
|
24681
24681
|
};
|
|
24682
24682
|
|
|
24683
|
-
const Container$
|
|
24683
|
+
const Container$1g = styled.div`
|
|
24684
24684
|
display: block;
|
|
24685
24685
|
padding-bottom: ${(props) => props.theme.theme_vars.spacingSizes.extra_small};
|
|
24686
24686
|
margin-top: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
@@ -24728,11 +24728,11 @@ var ToggleButtons = function (_a) {
|
|
|
24728
24728
|
setActiveButton(index);
|
|
24729
24729
|
onClick();
|
|
24730
24730
|
};
|
|
24731
|
-
return (React__default.createElement(Container$
|
|
24731
|
+
return (React__default.createElement(Container$1g, { "data-testid": "ToggleButtons", "$hasTopMargin": hasTopMargin },
|
|
24732
24732
|
React__default.createElement(React__default.Fragment, null, buttons.map(function (button, index) { return (React__default.createElement(ToggleButton, { type: "button", title: button.title, "aria-label": button.ariaLabel, key: index, onClick: function () { return handleClick(index, button.onClick); }, "$isActive": activeButton == index }, button.label)); }))));
|
|
24733
24733
|
};
|
|
24734
24734
|
|
|
24735
|
-
const Container$
|
|
24735
|
+
const Container$1f = styled.div`
|
|
24736
24736
|
display: block;
|
|
24737
24737
|
position: fixed;
|
|
24738
24738
|
margin-top: ${(props) => props.theme.theme_vars.spacingSizes.large};
|
|
@@ -24832,14 +24832,14 @@ var QuickExit = function (_a) {
|
|
|
24832
24832
|
window.location.replace(url);
|
|
24833
24833
|
};
|
|
24834
24834
|
return (React__default.createElement(React__default.Fragment, null,
|
|
24835
|
-
React__default.createElement(Container$
|
|
24835
|
+
React__default.createElement(Container$1f, { "data-testid": "QuickExit" },
|
|
24836
24836
|
React__default.createElement(QuickExitButton, { onClick: function (e) { return handleClick(e); } },
|
|
24837
24837
|
React__default.createElement(HeadingWithIcon, { icon: "quickExit", level: 3, text: label, hasHover: false })))));
|
|
24838
24838
|
};
|
|
24839
24839
|
|
|
24840
24840
|
// Accordion
|
|
24841
24841
|
|
|
24842
|
-
const Container$
|
|
24842
|
+
const Container$1e = styled.div`
|
|
24843
24843
|
${(props) => props.theme.fontStyles}
|
|
24844
24844
|
margin-bottom: 20px;
|
|
24845
24845
|
border-bottom: 1px solid ${(props) => props.theme.theme_vars.colours.grey};
|
|
@@ -25129,7 +25129,7 @@ var Accordion$1 = function (_a) {
|
|
|
25129
25129
|
setAccordionStates(newStatus);
|
|
25130
25130
|
};
|
|
25131
25131
|
var accordionId = "accordion".concat(useId());
|
|
25132
|
-
return (React__default.createElement(Container$
|
|
25132
|
+
return (React__default.createElement(Container$1e, { "data-testid": "Accordion", id: accordionId },
|
|
25133
25133
|
showControls && sections.length > 1 && (React__default.createElement(AccordionControls$1, null,
|
|
25134
25134
|
React__default.createElement(OpenAllButton, { onClick: toggleAll, type: "button", "aria-expanded": !openAll },
|
|
25135
25135
|
openAll ? 'Open all' : 'Close all',
|
|
@@ -25137,7 +25137,7 @@ var Accordion$1 = function (_a) {
|
|
|
25137
25137
|
accordionStates.map(function (section, i) { return (React__default.createElement(AccordionSection, __assign({}, section, { key: i, onToggle: updateAccordionState, isFilter: isFilter, withReadMore: withReadMore }))); })));
|
|
25138
25138
|
};
|
|
25139
25139
|
|
|
25140
|
-
const Container$
|
|
25140
|
+
const Container$1d = styled.div`
|
|
25141
25141
|
display: block;
|
|
25142
25142
|
background-color: ${(props) => props.theme.theme_vars.colours.grey_light};
|
|
25143
25143
|
padding: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
@@ -25191,7 +25191,7 @@ var _a, _b;
|
|
|
25191
25191
|
var PostcodeSearchApiUrl = (_a = process.env.NEXT_PUBLIC_POSTCODE_SEARCH_API_URL) !== null && _a !== void 0 ? _a : '';
|
|
25192
25192
|
var BinFinderApiUrl = (_b = process.env.NEXT_PUBLIC_BIN_FINDER_API_URL) !== null && _b !== void 0 ? _b : '';
|
|
25193
25193
|
|
|
25194
|
-
const Container$
|
|
25194
|
+
const Container$1c = styled.div`
|
|
25195
25195
|
display: flex;
|
|
25196
25196
|
-webkit-flex-direction: row;
|
|
25197
25197
|
-moz-flex-direction: row;
|
|
@@ -25228,7 +25228,7 @@ const ErrorSummary$1 = styled.div`
|
|
|
25228
25228
|
*/
|
|
25229
25229
|
var FormWithLine = function (_a) {
|
|
25230
25230
|
var _b = _a.lineColour, lineColour = _b === void 0 ? '#C6C6C6' : _b, _c = _a.hideLine, hideLine = _c === void 0 ? false : _c, formRole = _a.formRole, formMethod = _a.formMethod, formURL = _a.formURL, _d = _a.isError, isError = _d === void 0 ? false : _d, errorSummary = _a.errorSummary, onSubmit = _a.onSubmit, children = _a.children;
|
|
25231
|
-
return (React__default.createElement(Container$
|
|
25231
|
+
return (React__default.createElement(Container$1c, null,
|
|
25232
25232
|
React__default.createElement(Line$1, { "$lineColour": lineColour, "$hideLine": hideLine, "$isError": isError }),
|
|
25233
25233
|
React__default.createElement(Form, { onSubmit: onSubmit, "$hideLine": hideLine, role: formRole, method: formMethod, url: formURL, "data-testid": "FormWithLine" },
|
|
25234
25234
|
errorSummary && React__default.createElement(ErrorSummary$1, null, errorSummary),
|
|
@@ -25278,7 +25278,7 @@ var Input = function (_a) {
|
|
|
25278
25278
|
typeof value !== 'undefined' ? (React__default.createElement(StyledInput, { onChange: onChange, type: type, placeholder: placeholder, name: name, "$isErrored": isErrored, maxLength: maxLength, value: value, id: id, autoComplete: autocomplete, "$isFullWidth": isFullWidth, min: minValue })) : (React__default.createElement(StyledInput, { onChange: onChange, type: type, placeholder: placeholder, name: name, "$isErrored": isErrored, maxLength: maxLength, defaultValue: defaultValue, id: id, autoComplete: autocomplete, "$isFullWidth": isFullWidth, min: minValue }))));
|
|
25279
25279
|
};
|
|
25280
25280
|
|
|
25281
|
-
const Container$
|
|
25281
|
+
const Container$1b = styled.div`
|
|
25282
25282
|
display: block;
|
|
25283
25283
|
`;
|
|
25284
25284
|
|
|
@@ -25318,7 +25318,7 @@ const Outer$1 = styled.div`
|
|
|
25318
25318
|
}
|
|
25319
25319
|
}
|
|
25320
25320
|
`;
|
|
25321
|
-
const Link$
|
|
25321
|
+
const Link$5 = styled.a`
|
|
25322
25322
|
margin-bottom: 15px;
|
|
25323
25323
|
display: block;
|
|
25324
25324
|
width: 100%;
|
|
@@ -25410,7 +25410,7 @@ var FileDownload = function (_a) {
|
|
|
25410
25410
|
var title = _a.title, type = _a.type, url = _a.url, size = _a.size, _b = _a.archived, archived = _b === void 0 ? false : _b; __rest(_a, ["title", "type", "url", "size", "archived"]);
|
|
25411
25411
|
var _c = useState(false); _c[0]; var setIsHovered = _c[1];
|
|
25412
25412
|
return (React__default.createElement(Outer$1, { "data-testid": "FileDownload" },
|
|
25413
|
-
React__default.createElement(Link$
|
|
25413
|
+
React__default.createElement(Link$5, { href: url, download: true, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, rel: archived ? 'archived' : '' },
|
|
25414
25414
|
React__default.createElement(IconDownload$2, null),
|
|
25415
25415
|
React__default.createElement(FileDetails, { className: "file-details" },
|
|
25416
25416
|
React__default.createElement(Title$8, { className: "file-title" }, title),
|
|
@@ -25475,7 +25475,7 @@ var BinCollection = function (_a) {
|
|
|
25475
25475
|
}
|
|
25476
25476
|
return acc;
|
|
25477
25477
|
}, {});
|
|
25478
|
-
return (React__default.createElement(Container$
|
|
25478
|
+
return (React__default.createElement(Container$1b, { "data-testid": "BinCollection" },
|
|
25479
25479
|
React__default.createElement(Heading$1, { text: "Bin collections for:", level: 3 }),
|
|
25480
25480
|
React__default.createElement("p", null, address),
|
|
25481
25481
|
Object.keys(binCollectionsGrouped).map(function (day) {
|
|
@@ -25664,7 +25664,7 @@ var BinFinder = function (_a) {
|
|
|
25664
25664
|
return [2 /*return*/];
|
|
25665
25665
|
});
|
|
25666
25666
|
}); };
|
|
25667
|
-
return (React__default.createElement(Container$
|
|
25667
|
+
return (React__default.createElement(Container$1d, { "data-testid": "BinFinder" },
|
|
25668
25668
|
title && (React__default.createElement(TitleContainer, null,
|
|
25669
25669
|
React__default.createElement(Heading$1, { level: 2, text: title }))),
|
|
25670
25670
|
uprn === '' ? (React__default.createElement(React__default.Fragment, null,
|
|
@@ -25718,6 +25718,68 @@ var BinFinder = function (_a) {
|
|
|
25718
25718
|
React__default.createElement(Error$1, null, isError))))));
|
|
25719
25719
|
};
|
|
25720
25720
|
|
|
25721
|
+
const Container$1a = styled.div`
|
|
25722
|
+
display: block;
|
|
25723
|
+
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
25724
|
+
`;
|
|
25725
|
+
|
|
25726
|
+
const LinkContainer$1 = styled.div`
|
|
25727
|
+
position: relative;
|
|
25728
|
+
border-bottom: 1px solid ${(props) => props.theme.theme_vars.colours.grey};
|
|
25729
|
+
padding-bottom: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
25730
|
+
`;
|
|
25731
|
+
|
|
25732
|
+
const ImageContainer$6 = styled.div`
|
|
25733
|
+
margin-right: 15px;
|
|
25734
|
+
`;
|
|
25735
|
+
|
|
25736
|
+
const Link$4 = styled.a`
|
|
25737
|
+
${(props) => props.theme.linkStyles};
|
|
25738
|
+
min-height: 44px;
|
|
25739
|
+
display: block;
|
|
25740
|
+
|
|
25741
|
+
&:hover {
|
|
25742
|
+
${(props) => props.theme.linkStylesHover};
|
|
25743
|
+
}
|
|
25744
|
+
&:focus {
|
|
25745
|
+
${(props) => props.theme.linkStylesFocus};
|
|
25746
|
+
}
|
|
25747
|
+
&:active {
|
|
25748
|
+
${(props) => props.theme.linkStylesActive};
|
|
25749
|
+
}
|
|
25750
|
+
`;
|
|
25751
|
+
|
|
25752
|
+
const BlockLink = styled.span`
|
|
25753
|
+
position: absolute;
|
|
25754
|
+
width: 100%;
|
|
25755
|
+
top: 0;
|
|
25756
|
+
left: 0;
|
|
25757
|
+
right: 0;
|
|
25758
|
+
bottom: 0;
|
|
25759
|
+
`;
|
|
25760
|
+
|
|
25761
|
+
const LinkSummary = styled.span`
|
|
25762
|
+
display: block;
|
|
25763
|
+
line-height: 1.3;
|
|
25764
|
+
`;
|
|
25765
|
+
|
|
25766
|
+
var BlockLinks = function (_a) {
|
|
25767
|
+
var title = _a.title, links = _a.links, imageAltText = _a.imageAltText, imageLarge = _a.imageLarge, imageSmall = _a.imageSmall;
|
|
25768
|
+
return (React__default.createElement(Container$1a, { "data-testid": "BlockLinks" },
|
|
25769
|
+
title && React__default.createElement(Heading$1, { text: title, level: 2 }),
|
|
25770
|
+
React__default.createElement(Row$1, null,
|
|
25771
|
+
imageLarge && imageSmall && (React__default.createElement(Column, { small: "full", medium: "one-third", large: "one-quarter" },
|
|
25772
|
+
React__default.createElement(ImageContainer$6, null,
|
|
25773
|
+
React__default.createElement(ResponsiveImage, { imageAltText: imageAltText !== null && imageAltText !== void 0 ? imageAltText : '', imageLarge: imageLarge, imageSmall: imageSmall, ratio: "4by3", smallWidth: "400", largeWidth: "800" })))),
|
|
25774
|
+
React__default.createElement(Column, { small: "full", medium: imageLarge && imageSmall ? 'two-thirds' : 'full', large: imageLarge && imageSmall ? 'three-quarters' : 'full' },
|
|
25775
|
+
React__default.createElement(Row$1, { isList: true }, links.map(function (link) { return (React__default.createElement(Column, { isList: true, key: link.id, small: "full", medium: "full", large: "full" },
|
|
25776
|
+
React__default.createElement(LinkContainer$1, null,
|
|
25777
|
+
React__default.createElement(Link$4, { href: link.url },
|
|
25778
|
+
React__default.createElement("span", null, link.title),
|
|
25779
|
+
React__default.createElement(BlockLink, null)),
|
|
25780
|
+
link.summary && React__default.createElement(LinkSummary, null, link.summary)))); }))))));
|
|
25781
|
+
};
|
|
25782
|
+
|
|
25721
25783
|
const Blockquote = styled.blockquote `
|
|
25722
25784
|
${props => props.theme.fontStyles}
|
|
25723
25785
|
margin: 20px 0px;
|
|
@@ -40222,5 +40284,5 @@ var DirectoryDocumentList = function (_a) {
|
|
|
40222
40284
|
React__default.createElement(Column, { small: "full", medium: "full", large: "full" }, !isLoading && (React__default.createElement(Pagination, { currentPage: pageNumber, totalResults: totalResults, resultsPerPage: perPage, postTo: directoryPath, buttonClickOverride: setPageNumber }))))))));
|
|
40223
40285
|
};
|
|
40224
40286
|
|
|
40225
|
-
export { AccessibleLinks, Accordion$1 as Accordion, AlertBanner, AlertBannerService, Autocomplete, BackLink, BackToTop, BinFinder, BlockQuote, Breadcrumbs, BudgetGame, Button$5 as Button, CallToAction, Cards, CheckboxListFilter, CludoSearch, ConsultationList, ConsultationStatus, Contents$1 as Contents, ContentsNavigation, CookieBanner, CouncilTaxAlphabeticalDirectory, DirectoryDocumentList, DirectoryDocuments, DirectoryService, DirectoryServiceList, DirectoryShortList, DirectoryShortListProvider, DisplayDate, Divider, DownloadableFiles, DropDownFilter, DynamicIcon, EventDetails, EventList, Footer, FullWidthContainer, GDS_theme, GlobalStyleReset, GoogleMap, Header, Heading$1 as Heading, HeadingWithIcon, HeroImage, HomeHero, Image, ImageAndText, InquestSchedule, Map$1 as Map, MapMarker, MaxWidthContainer, MemorialHero, NewsArticleDate, NewsArticleFeaturedBlock, NewsArticleFilterAccordion, NewsArticleImage, NewsArticleList, NewsArticleListHeader, NewsArticleOldBanner, PageMain, PageSidebar, PageTitle, PageWithSidebarContainer, PageWrapper, Pagination, PhaseBanner, PromoBanner, PromoBlock, PromoTabs, PromoTabsDisplay, PromotedLinks, PromotedServicesTabs, Promotions, QuickExit, Quiz, RateThisPage, RecyclingInformation, RelatedEvents, ResponsiveImage, RoadworksList, SearchBox, SearchResultsList, Searchbar, SectionLinks, SectionLinksMobileContents, SectionLinksSidebar, ServiceLinksBoxed, ServicesLinksList, SignpostLinks, SkipToMainContent, StaticMap, Summary, SummaryList, TextInput, ToggleButtons, Video, WarningText, WarningTextDisclaimer, WebChat, WebChatAssistant, lb_theme_north, lb_theme_west, north_theme, useDirectoryShortListContext, west_theme };
|
|
40287
|
+
export { AccessibleLinks, Accordion$1 as Accordion, AlertBanner, AlertBannerService, Autocomplete, BackLink, BackToTop, BinFinder, BlockLinks, BlockQuote, Breadcrumbs, BudgetGame, Button$5 as Button, CallToAction, Cards, CheckboxListFilter, CludoSearch, ConsultationList, ConsultationStatus, Contents$1 as Contents, ContentsNavigation, CookieBanner, CouncilTaxAlphabeticalDirectory, DirectoryDocumentList, DirectoryDocuments, DirectoryService, DirectoryServiceList, DirectoryShortList, DirectoryShortListProvider, DisplayDate, Divider, DownloadableFiles, DropDownFilter, DynamicIcon, EventDetails, EventList, Footer, FullWidthContainer, GDS_theme, GlobalStyleReset, GoogleMap, Header, Heading$1 as Heading, HeadingWithIcon, HeroImage, HomeHero, Image, ImageAndText, InquestSchedule, Map$1 as Map, MapMarker, MaxWidthContainer, MemorialHero, NewsArticleDate, NewsArticleFeaturedBlock, NewsArticleFilterAccordion, NewsArticleImage, NewsArticleList, NewsArticleListHeader, NewsArticleOldBanner, PageMain, PageSidebar, PageTitle, PageWithSidebarContainer, PageWrapper, Pagination, PhaseBanner, PromoBanner, PromoBlock, PromoTabs, PromoTabsDisplay, PromotedLinks, PromotedServicesTabs, Promotions, QuickExit, Quiz, RateThisPage, RecyclingInformation, RelatedEvents, ResponsiveImage, RoadworksList, SearchBox, SearchResultsList, Searchbar, SectionLinks, SectionLinksMobileContents, SectionLinksSidebar, ServiceLinksBoxed, ServicesLinksList, SignpostLinks, SkipToMainContent, StaticMap, Summary, SummaryList, TextInput, ToggleButtons, Video, WarningText, WarningTextDisclaimer, WebChat, WebChatAssistant, lb_theme_north, lb_theme_west, north_theme, useDirectoryShortListContext, west_theme };
|
|
40226
40288
|
//# sourceMappingURL=index.mjs.js.map
|