@nnc-digital/nnc-design-system 1.0.0-beta1 → 1.0.0-beta2
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.js +233 -87
- package/build/index.js.map +1 -1
- package/build/index.mjs.js +233 -88
- package/build/index.mjs.js.map +1 -1
- package/build/src/index.d.ts +2 -1
- package/package.json +1 -1
package/build/index.mjs.js
CHANGED
|
@@ -3874,7 +3874,7 @@ var Autocomplete = function (_a) {
|
|
|
3874
3874
|
})));
|
|
3875
3875
|
};
|
|
3876
3876
|
|
|
3877
|
-
const Container$
|
|
3877
|
+
const Container$19 = styled.div`
|
|
3878
3878
|
display: block;
|
|
3879
3879
|
`;
|
|
3880
3880
|
|
|
@@ -3959,7 +3959,7 @@ var BackToTop = function (_a) {
|
|
|
3959
3959
|
useEffect(function () {
|
|
3960
3960
|
window.addEventListener('scroll', toggleVisible);
|
|
3961
3961
|
});
|
|
3962
|
-
return (React.createElement(Container$
|
|
3962
|
+
return (React.createElement(Container$19, { "data-testid": "BackToTop" }, isActive && (React.createElement(BackToTopButton, { onClick: scrollToTop, "$visible": visible, "data-testid": "BackToTopButton", type: "button", "aria-label": "Go to the top of the page" },
|
|
3963
3963
|
React.createElement(ChevronIcon, { colourFill: themeContext.theme_vars.colours.white, direction: "up" })))));
|
|
3964
3964
|
};
|
|
3965
3965
|
|
|
@@ -4063,9 +4063,9 @@ var Button$4 = function (_a) {
|
|
|
4063
4063
|
return (React.createElement(StyledButton$1, __assign$2({ className: ["button--".concat(size), mode].join(' ') }, href, { title: title ? title : text, "$colourOverride": colourOverride && colourOverride }, props), text ? text : children));
|
|
4064
4064
|
};
|
|
4065
4065
|
|
|
4066
|
-
var Container$
|
|
4067
|
-
var Label$
|
|
4068
|
-
var VisuallyHiddenLabel = styled(Label$
|
|
4066
|
+
var Container$18 = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n"])));
|
|
4067
|
+
var Label$6 = styled.label(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: block;\n margin-bottom: 15px;\n"], ["\n display: block;\n margin-bottom: 15px;\n"])));
|
|
4068
|
+
var VisuallyHiddenLabel = styled(Label$6)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n clip-path: inset(50%);\n border: 0;\n white-space: nowrap;\n"], ["\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n clip-path: inset(50%);\n border: 0;\n white-space: nowrap;\n"])));
|
|
4069
4069
|
var BinCollectionButtonStyles = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n button {\n margin: 10px 10px 12px 10px;\n }\n"], ["\n button {\n margin: 10px 10px 12px 10px;\n }\n"])));
|
|
4070
4070
|
var FormContainer$1 = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n ", "\n"], ["\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n ", "\n"])), function (props) {
|
|
4071
4071
|
return props.$isLoading && "\n opacity: 0.5; \n pointer-events: none;\n ";
|
|
@@ -4078,7 +4078,7 @@ styled.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n
|
|
|
4078
4078
|
styled.input(templateObject_11 || (templateObject_11 = __makeTemplateObject([""], [""])));
|
|
4079
4079
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11;
|
|
4080
4080
|
|
|
4081
|
-
const Container$
|
|
4081
|
+
const Container$17 = styled.div`
|
|
4082
4082
|
display: flex;
|
|
4083
4083
|
-webkit-flex-direction: row;
|
|
4084
4084
|
-moz-flex-direction: row;
|
|
@@ -4115,7 +4115,7 @@ const ErrorSummary = styled.div`
|
|
|
4115
4115
|
*/
|
|
4116
4116
|
var FormWithLine = function (_a) {
|
|
4117
4117
|
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;
|
|
4118
|
-
return (React.createElement(Container$
|
|
4118
|
+
return (React.createElement(Container$17, null,
|
|
4119
4119
|
React.createElement(Line$1, { "$lineColour": lineColour, "$hideLine": hideLine, "$isError": isError }),
|
|
4120
4120
|
React.createElement(Form, { onSubmit: onSubmit, "$hideLine": hideLine, role: formRole, method: formMethod, url: formURL, "data-testid": "FormWithLine" },
|
|
4121
4121
|
errorSummary && React.createElement(ErrorSummary, null, errorSummary),
|
|
@@ -4193,7 +4193,7 @@ var FormButton = function (_a) {
|
|
|
4193
4193
|
return (React.createElement(StyledButton, __assign$2({ type: type, className: ["button--".concat(size), mode].join(' ') }, props), text));
|
|
4194
4194
|
};
|
|
4195
4195
|
|
|
4196
|
-
const Container$
|
|
4196
|
+
const Container$16 = styled.div`
|
|
4197
4197
|
${(props) => props.theme.fontStyles};
|
|
4198
4198
|
`;
|
|
4199
4199
|
|
|
@@ -4203,7 +4203,7 @@ const hideLabel$1 = (props) => {
|
|
|
4203
4203
|
}
|
|
4204
4204
|
};
|
|
4205
4205
|
|
|
4206
|
-
const Label$
|
|
4206
|
+
const Label$5 = styled.label`
|
|
4207
4207
|
display: block;
|
|
4208
4208
|
margin-bottom: 5px;
|
|
4209
4209
|
${hideLabel$1}
|
|
@@ -4238,8 +4238,8 @@ const Option = styled.option`
|
|
|
4238
4238
|
|
|
4239
4239
|
var DropDownSelect = function (_a) {
|
|
4240
4240
|
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;
|
|
4241
|
-
return (React.createElement(Container$
|
|
4242
|
-
React.createElement(Label$
|
|
4241
|
+
return (React.createElement(Container$16, null,
|
|
4242
|
+
React.createElement(Label$5, { htmlFor: id, "$hideLabel": hideLabel }, label),
|
|
4243
4243
|
React.createElement(Select, { id: id, name: id, onChange: onChange && onChange, defaultValue: selected && selected }, options.map(function (option, i) { return (React.createElement(Option, { key: i, value: option.value }, option.title)); }))));
|
|
4244
4244
|
};
|
|
4245
4245
|
|
|
@@ -4522,7 +4522,7 @@ var BinCollection = function (_a) {
|
|
|
4522
4522
|
useEffect(function () {
|
|
4523
4523
|
seenTitles.current.clear();
|
|
4524
4524
|
}, [calendarEvents]);
|
|
4525
|
-
return (React.createElement(Container$
|
|
4525
|
+
return (React.createElement(Container$18, { "data-testid": "BinCollection" },
|
|
4526
4526
|
React.createElement(FormWithLine, { onSubmit: handleSubmit, isError: isError, lineColour: themeContext.theme_vars.colours.$grey_dark, hideLine: true },
|
|
4527
4527
|
React.createElement(FormContainer$1, { "$isLoading": isLoading },
|
|
4528
4528
|
React.createElement(Heading, { level: 2, text: "Bin collection checker" }),
|
|
@@ -6629,7 +6629,7 @@ var HeadingWithIcon = function (_a) {
|
|
|
6629
6629
|
React.createElement(Heading, { text: text, level: level })));
|
|
6630
6630
|
};
|
|
6631
6631
|
|
|
6632
|
-
const Container$
|
|
6632
|
+
const Container$15 = styled.div`
|
|
6633
6633
|
display: flex;
|
|
6634
6634
|
width: 100%;
|
|
6635
6635
|
min-height: 400px;
|
|
@@ -6653,7 +6653,7 @@ var Map$1 = function (_a) {
|
|
|
6653
6653
|
setMap(new window.google.maps.Map(ref.current, { center: center, zoom: zoom }));
|
|
6654
6654
|
}
|
|
6655
6655
|
}, [ref, map]);
|
|
6656
|
-
return (React.createElement(Container$
|
|
6656
|
+
return (React.createElement(Container$15, { "data-testid": "Map" },
|
|
6657
6657
|
React.createElement("div", { ref: ref }),
|
|
6658
6658
|
React.Children.map(children, function (child) {
|
|
6659
6659
|
if (React.isValidElement(child)) {
|
|
@@ -6714,7 +6714,7 @@ var MapMarker = function (options) {
|
|
|
6714
6714
|
return null;
|
|
6715
6715
|
};
|
|
6716
6716
|
|
|
6717
|
-
const Container$
|
|
6717
|
+
const Container$14 = styled.div`
|
|
6718
6718
|
${(props) => props.theme.fontStyles};
|
|
6719
6719
|
display: block;
|
|
6720
6720
|
border-top: 1px solid ${(props) => props.theme.theme_vars.colours.grey};
|
|
@@ -7495,7 +7495,7 @@ var Pagination = function (_a) {
|
|
|
7495
7495
|
}
|
|
7496
7496
|
};
|
|
7497
7497
|
if (numbers.length > 1) {
|
|
7498
|
-
return (React.createElement(Container$
|
|
7498
|
+
return (React.createElement(Container$14, { "data-testid": "Pagination", role: "navigation", "aria-label": "Pagination" },
|
|
7499
7499
|
currentPage > 1 && (React.createElement(Previous, { onClick: function () { return buttonClick(currentPage - 1); }, title: "Go back a page" }, "Previous")),
|
|
7500
7500
|
React.createElement(NumbersContainer, null, numbers.map(function (v, i) { return (React.createElement(NumberContainer, { key: i },
|
|
7501
7501
|
v === '...' && React.createElement(Ellipsis, null, "..."),
|
|
@@ -7507,7 +7507,7 @@ var Pagination = function (_a) {
|
|
|
7507
7507
|
return null;
|
|
7508
7508
|
};
|
|
7509
7509
|
|
|
7510
|
-
const Container$
|
|
7510
|
+
const Container$13 = styled.div`
|
|
7511
7511
|
${(props) => props.theme.fontStyles};
|
|
7512
7512
|
margin-bottom: 30px;
|
|
7513
7513
|
`;
|
|
@@ -7678,7 +7678,7 @@ var CheckboxListFilter = function (_a) {
|
|
|
7678
7678
|
handleParams('news', [{ key: NewsArticleFilterFields.articleType.queryParamKey, value: articleTypes }], ['page']);
|
|
7679
7679
|
};
|
|
7680
7680
|
var backupLabel = Math.random().toString(36).substring(7);
|
|
7681
|
-
return (React.createElement(Container$
|
|
7681
|
+
return (React.createElement(Container$13, { "data-testid": "CheckboxListFilter" },
|
|
7682
7682
|
React.createElement(Fieldset$2, { "aria-describedby": hintId },
|
|
7683
7683
|
React.createElement(Legend$2, { "$labelHidden": labelHidden, "data-testid": "CheckboxListFilterLegend" }, label),
|
|
7684
7684
|
React.createElement(Hint, { id: hintId, "$hintHidden": hintHidden, "data-testid": "CheckboxListFilterHint" }, hint),
|
|
@@ -7810,7 +7810,7 @@ const PromotedLink$1 = styled.a`
|
|
|
7810
7810
|
${oneColStyles}
|
|
7811
7811
|
`;
|
|
7812
7812
|
|
|
7813
|
-
const Container$
|
|
7813
|
+
const Container$12 = styled.div`
|
|
7814
7814
|
box-sizing: border-box;
|
|
7815
7815
|
display: flex;
|
|
7816
7816
|
flex-wrap: wrap;
|
|
@@ -7833,7 +7833,7 @@ const Container$11 = styled.div`
|
|
|
7833
7833
|
|
|
7834
7834
|
var Row$1 = function (_a) {
|
|
7835
7835
|
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;
|
|
7836
|
-
return (React.createElement(Container$
|
|
7836
|
+
return (React.createElement(Container$12, { "data-testid": "Row", "$hasBorder": hasBorder, "$hasWrap": hasWrap, as: isList ? 'ul' : 'div' }, children));
|
|
7837
7837
|
};
|
|
7838
7838
|
|
|
7839
7839
|
const calculateWidth = (size) => {
|
|
@@ -7883,7 +7883,7 @@ const widths = (props) => {
|
|
|
7883
7883
|
`;
|
|
7884
7884
|
};
|
|
7885
7885
|
|
|
7886
|
-
const Container$
|
|
7886
|
+
const Container$11 = styled.div`
|
|
7887
7887
|
box-sizing: border-box;
|
|
7888
7888
|
display: block;
|
|
7889
7889
|
padding: ${(props) => (props.$hasPadding ? props.theme.theme_vars.spacingSizes.small : `0`)};
|
|
@@ -7894,7 +7894,7 @@ const Container$10 = styled.div`
|
|
|
7894
7894
|
|
|
7895
7895
|
var Column = function (_a) {
|
|
7896
7896
|
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, children = _a.children;
|
|
7897
|
-
return (React.createElement(Container$
|
|
7897
|
+
return (React.createElement(Container$11, { "data-testid": "Column", "$small": small, "$medium": medium, "$large": large, "$hasPadding": hasPadding, "$hasBorder": hasBorder, as: isList ? 'li' : 'div', className: classes }, children));
|
|
7898
7898
|
};
|
|
7899
7899
|
|
|
7900
7900
|
var PromotedLinks = function (_a) {
|
|
@@ -7910,7 +7910,7 @@ var PromotedLinks = function (_a) {
|
|
|
7910
7910
|
}
|
|
7911
7911
|
};
|
|
7912
7912
|
|
|
7913
|
-
const Container
|
|
7913
|
+
const Container$10 = styled.div`
|
|
7914
7914
|
display: block;
|
|
7915
7915
|
`;
|
|
7916
7916
|
|
|
@@ -7946,7 +7946,7 @@ const Cookies = styled.button`
|
|
|
7946
7946
|
}
|
|
7947
7947
|
`;
|
|
7948
7948
|
|
|
7949
|
-
const Container
|
|
7949
|
+
const Container$$ = styled.div`
|
|
7950
7950
|
${(props) => props.theme.fontStyles}
|
|
7951
7951
|
background-color: ${(props) => props.theme.theme_vars.colours.grey_light};
|
|
7952
7952
|
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
@@ -8220,18 +8220,18 @@ var CookieBanner = function (_a) {
|
|
|
8220
8220
|
hideCookiesAcceptedConfirmationBanner();
|
|
8221
8221
|
};
|
|
8222
8222
|
return (React.createElement(React.Fragment, null,
|
|
8223
|
-
showCookieBanner && (React.createElement(Container
|
|
8223
|
+
showCookieBanner && (React.createElement(Container$$, { "data-testid": "CookieBanner" },
|
|
8224
8224
|
React.createElement(CookieMessage, null,
|
|
8225
8225
|
React.createElement(CookieHeading, null, title),
|
|
8226
8226
|
React.createElement(CookieParagraph, null, paragraph),
|
|
8227
8227
|
React.createElement(ButtonsContainer, null,
|
|
8228
8228
|
React.createElement(FormButton, { primary: true, text: acceptButtonText, isDisabled: true, onClick: acceptCookies, size: "large" }),
|
|
8229
8229
|
React.createElement(FormButton, { primary: true, text: rejectButtonText, isDisabled: true, onClick: rejectCookies, size: "large" }))))),
|
|
8230
|
-
showCookiesRejectedBanner && (React.createElement(Container
|
|
8230
|
+
showCookiesRejectedBanner && (React.createElement(Container$$, { "data-testid": "CookieBannerRejected", id: "CookieBannerRejected" },
|
|
8231
8231
|
React.createElement(CookieMessage, { isInline: true },
|
|
8232
8232
|
React.createElement(CookieParagraph, null, rejectConfirmationText),
|
|
8233
8233
|
React.createElement(CookieHide, { onClick: hideCookiesConfirmationBanner, "aria-controls": "CookieBannerRejected", "aria-hidden": "false" }, "Hide")))),
|
|
8234
|
-
showCookiesAcceptedBanner && (React.createElement(Container
|
|
8234
|
+
showCookiesAcceptedBanner && (React.createElement(Container$$, { "data-testid": "CookieBannerAccepted", id: "CookieBannerAccepted" },
|
|
8235
8235
|
React.createElement(CookieMessage, { isInline: true },
|
|
8236
8236
|
React.createElement(CookieParagraph, null, acceptConfirmationText),
|
|
8237
8237
|
React.createElement(CookieHide, { onClick: hideCookiesConfirmationBanner, "aria-controls": "CookieBannerAccepted", "aria-hidden": "false" }, "Hide"))))));
|
|
@@ -8253,7 +8253,7 @@ var StaticMap = function (_a) {
|
|
|
8253
8253
|
return "&markers=size:".concat(size, "%7Ccolor:").concat(colour).concat(label, "%7C").concat(mapMarker.lat, ",").concat(mapMarker.lng);
|
|
8254
8254
|
})
|
|
8255
8255
|
.join('');
|
|
8256
|
-
return (React.createElement(Container
|
|
8256
|
+
return (React.createElement(Container$10, { "data-testid": "StaticMap" },
|
|
8257
8257
|
React.createElement(Message, null,
|
|
8258
8258
|
React.createElement("span", null,
|
|
8259
8259
|
"To interact with the map, you need to ",
|
|
@@ -8274,7 +8274,7 @@ var TextInput = function (_a) {
|
|
|
8274
8274
|
|
|
8275
8275
|
// Accordion
|
|
8276
8276
|
|
|
8277
|
-
const Container$
|
|
8277
|
+
const Container$_ = styled.div`
|
|
8278
8278
|
${(props) => props.theme.fontStyles}
|
|
8279
8279
|
margin-bottom: 20px;
|
|
8280
8280
|
border-bottom: 1px solid ${(props) => props.theme.theme_vars.colours.grey};
|
|
@@ -8551,7 +8551,7 @@ var Accordion$1 = function (_a) {
|
|
|
8551
8551
|
setAccordionStates(newStatus);
|
|
8552
8552
|
};
|
|
8553
8553
|
var accordionId = "accordion".concat(useId());
|
|
8554
|
-
return (React.createElement(Container$
|
|
8554
|
+
return (React.createElement(Container$_, { "data-testid": "Accordion", id: accordionId },
|
|
8555
8555
|
showControls && sections.length > 1 && (React.createElement(AccordionControls$1, null,
|
|
8556
8556
|
React.createElement(OpenAllButton, { onClick: toggleAll, type: "button", "aria-expanded": !openAll },
|
|
8557
8557
|
openAll ? 'Open all' : 'Close all',
|
|
@@ -8602,7 +8602,7 @@ var BlockQuote = function (_a) {
|
|
|
8602
8602
|
citation && React.createElement(Citation, null, citation)));
|
|
8603
8603
|
};
|
|
8604
8604
|
|
|
8605
|
-
const Container$
|
|
8605
|
+
const Container$Z = styled.div`
|
|
8606
8606
|
margin-bottom: 30px;
|
|
8607
8607
|
display: block;
|
|
8608
8608
|
|
|
@@ -8617,11 +8617,11 @@ const Container$Y = styled.div`
|
|
|
8617
8617
|
*/
|
|
8618
8618
|
var CallToAction = function (_a) {
|
|
8619
8619
|
var primary = _a.primary; _a.size; var text = _a.text, url = _a.url, isExternal = _a.isExternal, isDisabled = _a.isDisabled; __rest(_a, ["primary", "size", "text", "url", "isExternal", "isDisabled"]);
|
|
8620
|
-
return (React.createElement(Container$
|
|
8620
|
+
return (React.createElement(Container$Z, null,
|
|
8621
8621
|
React.createElement(Button$4, { primary: primary, size: "large", text: text, url: url, isExternal: isExternal, isDisabled: isDisabled })));
|
|
8622
8622
|
};
|
|
8623
8623
|
|
|
8624
|
-
const Container$
|
|
8624
|
+
const Container$Y = styled.div`
|
|
8625
8625
|
display: block;
|
|
8626
8626
|
${(props) => props.theme.fontStyles}
|
|
8627
8627
|
`;
|
|
@@ -8797,7 +8797,7 @@ var CouncilTaxAlphabeticalDirectory = function (_a) {
|
|
|
8797
8797
|
});
|
|
8798
8798
|
return letterData;
|
|
8799
8799
|
});
|
|
8800
|
-
return (React.createElement(Container$
|
|
8800
|
+
return (React.createElement(Container$Y, { "data-testid": "AlphabeticalDirectory", ref: directoryRef },
|
|
8801
8801
|
React.createElement(React.Fragment, null,
|
|
8802
8802
|
parishes.length === 0 && (React.createElement(ErrorText, null, "There was an issue fetching the parish data. Please try again later.")),
|
|
8803
8803
|
parish === null ? (React.createElement(React.Fragment, null, sortedData.map(function (letter, i) { return (React.createElement(Row, { key: i },
|
|
@@ -8823,9 +8823,9 @@ var CouncilTaxAlphabeticalDirectory = function (_a) {
|
|
|
8823
8823
|
React.createElement("td", null, Number(parish.values[band]).toLocaleString('en-GB', { style: 'currency', currency: 'GBP' })))); })))))))));
|
|
8824
8824
|
};
|
|
8825
8825
|
|
|
8826
|
-
const Container$
|
|
8826
|
+
const Container$X = styled.div``;
|
|
8827
8827
|
|
|
8828
|
-
const Container$
|
|
8828
|
+
const Container$W = styled.div`
|
|
8829
8829
|
display: flex;
|
|
8830
8830
|
flex-direction: column;
|
|
8831
8831
|
justify-content: flex-start;
|
|
@@ -19480,7 +19480,7 @@ function markDirtyUp(node) {
|
|
|
19480
19480
|
}
|
|
19481
19481
|
}
|
|
19482
19482
|
|
|
19483
|
-
let Container$
|
|
19483
|
+
let Container$V = class Container extends Node$1 {
|
|
19484
19484
|
append(...children) {
|
|
19485
19485
|
for (let child of children) {
|
|
19486
19486
|
let nodes = this.normalize(child, this.last);
|
|
@@ -19853,27 +19853,27 @@ let Container$U = class Container extends Node$1 {
|
|
|
19853
19853
|
}
|
|
19854
19854
|
};
|
|
19855
19855
|
|
|
19856
|
-
Container$
|
|
19856
|
+
Container$V.registerParse = dependant => {
|
|
19857
19857
|
parse$4 = dependant;
|
|
19858
19858
|
};
|
|
19859
19859
|
|
|
19860
|
-
Container$
|
|
19860
|
+
Container$V.registerRule = dependant => {
|
|
19861
19861
|
Rule$4 = dependant;
|
|
19862
19862
|
};
|
|
19863
19863
|
|
|
19864
|
-
Container$
|
|
19864
|
+
Container$V.registerAtRule = dependant => {
|
|
19865
19865
|
AtRule$4 = dependant;
|
|
19866
19866
|
};
|
|
19867
19867
|
|
|
19868
|
-
Container$
|
|
19868
|
+
Container$V.registerRoot = dependant => {
|
|
19869
19869
|
Root$6 = dependant;
|
|
19870
19870
|
};
|
|
19871
19871
|
|
|
19872
|
-
var container = Container$
|
|
19873
|
-
Container$
|
|
19872
|
+
var container = Container$V;
|
|
19873
|
+
Container$V.default = Container$V;
|
|
19874
19874
|
|
|
19875
19875
|
/* c8 ignore start */
|
|
19876
|
-
Container$
|
|
19876
|
+
Container$V.rebuild = node => {
|
|
19877
19877
|
if (node.type === 'atrule') {
|
|
19878
19878
|
Object.setPrototypeOf(node, AtRule$4.prototype);
|
|
19879
19879
|
} else if (node.type === 'rule') {
|
|
@@ -19890,16 +19890,16 @@ Container$U.rebuild = node => {
|
|
|
19890
19890
|
|
|
19891
19891
|
if (node.nodes) {
|
|
19892
19892
|
node.nodes.forEach(child => {
|
|
19893
|
-
Container$
|
|
19893
|
+
Container$V.rebuild(child);
|
|
19894
19894
|
});
|
|
19895
19895
|
}
|
|
19896
19896
|
};
|
|
19897
19897
|
|
|
19898
|
-
let Container$
|
|
19898
|
+
let Container$U = container;
|
|
19899
19899
|
|
|
19900
19900
|
let LazyResult$4, Processor$3;
|
|
19901
19901
|
|
|
19902
|
-
let Document$3 = class Document extends Container$
|
|
19902
|
+
let Document$3 = class Document extends Container$U {
|
|
19903
19903
|
constructor(defaults) {
|
|
19904
19904
|
// type needs to be passed to super, otherwise child roots won't be normalized correctly
|
|
19905
19905
|
super({ type: 'document', ...defaults });
|
|
@@ -20017,9 +20017,9 @@ let Result$4 = class Result {
|
|
|
20017
20017
|
var result = Result$4;
|
|
20018
20018
|
Result$4.default = Result$4;
|
|
20019
20019
|
|
|
20020
|
-
let Container$
|
|
20020
|
+
let Container$T = container;
|
|
20021
20021
|
|
|
20022
|
-
let AtRule$3 = class AtRule extends Container$
|
|
20022
|
+
let AtRule$3 = class AtRule extends Container$T {
|
|
20023
20023
|
constructor(defaults) {
|
|
20024
20024
|
super(defaults);
|
|
20025
20025
|
this.type = 'atrule';
|
|
@@ -20039,13 +20039,13 @@ let AtRule$3 = class AtRule extends Container$S {
|
|
|
20039
20039
|
var atRule = AtRule$3;
|
|
20040
20040
|
AtRule$3.default = AtRule$3;
|
|
20041
20041
|
|
|
20042
|
-
Container$
|
|
20042
|
+
Container$T.registerAtRule(AtRule$3);
|
|
20043
20043
|
|
|
20044
|
-
let Container$
|
|
20044
|
+
let Container$S = container;
|
|
20045
20045
|
|
|
20046
20046
|
let LazyResult$3, Processor$2;
|
|
20047
20047
|
|
|
20048
|
-
let Root$5 = class Root extends Container$
|
|
20048
|
+
let Root$5 = class Root extends Container$S {
|
|
20049
20049
|
constructor(defaults) {
|
|
20050
20050
|
super(defaults);
|
|
20051
20051
|
this.type = 'root';
|
|
@@ -20099,7 +20099,7 @@ Root$5.registerProcessor = dependant => {
|
|
|
20099
20099
|
var root = Root$5;
|
|
20100
20100
|
Root$5.default = Root$5;
|
|
20101
20101
|
|
|
20102
|
-
Container$
|
|
20102
|
+
Container$S.registerRoot(Root$5);
|
|
20103
20103
|
|
|
20104
20104
|
let list$2 = {
|
|
20105
20105
|
comma(string) {
|
|
@@ -20158,10 +20158,10 @@ let list$2 = {
|
|
|
20158
20158
|
var list_1 = list$2;
|
|
20159
20159
|
list$2.default = list$2;
|
|
20160
20160
|
|
|
20161
|
-
let Container$
|
|
20161
|
+
let Container$R = container;
|
|
20162
20162
|
let list$1 = list_1;
|
|
20163
20163
|
|
|
20164
|
-
let Rule$3 = class Rule extends Container$
|
|
20164
|
+
let Rule$3 = class Rule extends Container$R {
|
|
20165
20165
|
constructor(defaults) {
|
|
20166
20166
|
super(defaults);
|
|
20167
20167
|
this.type = 'rule';
|
|
@@ -20182,7 +20182,7 @@ let Rule$3 = class Rule extends Container$Q {
|
|
|
20182
20182
|
var rule = Rule$3;
|
|
20183
20183
|
Rule$3.default = Rule$3;
|
|
20184
20184
|
|
|
20185
|
-
Container$
|
|
20185
|
+
Container$R.registerRule(Rule$3);
|
|
20186
20186
|
|
|
20187
20187
|
let Declaration$2 = declaration;
|
|
20188
20188
|
let tokenizer = tokenize;
|
|
@@ -20792,7 +20792,7 @@ let Parser$1 = class Parser {
|
|
|
20792
20792
|
|
|
20793
20793
|
var parser = Parser$1;
|
|
20794
20794
|
|
|
20795
|
-
let Container$
|
|
20795
|
+
let Container$Q = container;
|
|
20796
20796
|
let Parser = parser;
|
|
20797
20797
|
let Input$3 = input;
|
|
20798
20798
|
|
|
@@ -20831,12 +20831,12 @@ function parse$3(css, opts) {
|
|
|
20831
20831
|
var parse_1 = parse$3;
|
|
20832
20832
|
parse$3.default = parse$3;
|
|
20833
20833
|
|
|
20834
|
-
Container$
|
|
20834
|
+
Container$Q.registerParse(parse$3);
|
|
20835
20835
|
|
|
20836
20836
|
let { isClean, my } = symbols;
|
|
20837
20837
|
let MapGenerator$1 = mapGenerator;
|
|
20838
20838
|
let stringify$2 = stringify_1;
|
|
20839
|
-
let Container$
|
|
20839
|
+
let Container$P = container;
|
|
20840
20840
|
let Document$2 = document$1;
|
|
20841
20841
|
let warnOnce$1 = warnOnce$2;
|
|
20842
20842
|
let Result$3 = result;
|
|
@@ -20971,7 +20971,7 @@ let LazyResult$2 = class LazyResult {
|
|
|
20971
20971
|
|
|
20972
20972
|
if (root && !root[my]) {
|
|
20973
20973
|
/* c8 ignore next 2 */
|
|
20974
|
-
Container$
|
|
20974
|
+
Container$P.rebuild(root);
|
|
20975
20975
|
}
|
|
20976
20976
|
}
|
|
20977
20977
|
|
|
@@ -21641,7 +21641,7 @@ fromJSON$1.default = fromJSON$1;
|
|
|
21641
21641
|
let CssSyntaxError = cssSyntaxError;
|
|
21642
21642
|
let Declaration = declaration;
|
|
21643
21643
|
let LazyResult = lazyResult;
|
|
21644
|
-
let Container$
|
|
21644
|
+
let Container$O = container;
|
|
21645
21645
|
let Processor = processor;
|
|
21646
21646
|
let stringify = stringify_1;
|
|
21647
21647
|
let fromJSON = fromJSON_1;
|
|
@@ -21721,7 +21721,7 @@ postcss.document = defaults => new Document(defaults);
|
|
|
21721
21721
|
|
|
21722
21722
|
postcss.CssSyntaxError = CssSyntaxError;
|
|
21723
21723
|
postcss.Declaration = Declaration;
|
|
21724
|
-
postcss.Container = Container$
|
|
21724
|
+
postcss.Container = Container$O;
|
|
21725
21725
|
postcss.Processor = Processor;
|
|
21726
21726
|
postcss.Document = Document;
|
|
21727
21727
|
postcss.Comment = Comment;
|
|
@@ -22590,7 +22590,7 @@ var sanitizeHtml$1 = sanitizeHtml_1;
|
|
|
22590
22590
|
var Card = function (_a) {
|
|
22591
22591
|
var header = _a.header, content = _a.content, footerLink = _a.footerLink, imageLarge = _a.imageLarge, imageSmall = _a.imageSmall, imageAltText = _a.imageAltText;
|
|
22592
22592
|
var showContent = content || header;
|
|
22593
|
-
return (React.createElement(Container$
|
|
22593
|
+
return (React.createElement(Container$W, { "data-testid": "Card" },
|
|
22594
22594
|
imageLarge && imageSmall && (React.createElement(React.Fragment, null, footerLink ? (React.createElement(ImageLink$1, { href: footerLink.url },
|
|
22595
22595
|
React.createElement(Image$4, { src: imageLarge, alt: imageAltText, srcSet: "".concat(imageSmall, " 400w, ").concat(imageLarge, " 800w"), sizes: "(max-width: 550px) 400px, 800px", loading: "lazy" }))) : (React.createElement(Image$4, { src: imageLarge, alt: imageAltText, srcSet: "".concat(imageSmall, " 400w, ").concat(imageLarge, " 800w"), sizes: "(max-width: 550px) 400px, 800px", loading: "lazy" })))),
|
|
22596
22596
|
showContent && (React.createElement(Content$6, null,
|
|
@@ -22606,12 +22606,12 @@ var Card = function (_a) {
|
|
|
22606
22606
|
*/
|
|
22607
22607
|
var Cards = function (_a) {
|
|
22608
22608
|
var cards = _a.cards;
|
|
22609
|
-
return (React.createElement(Container$
|
|
22609
|
+
return (React.createElement(Container$X, { "data-testid": "Cards" },
|
|
22610
22610
|
React.createElement(Row$1, null, cards.map(function (card, index) { return (React.createElement(Column, { small: "full", medium: "one-half", large: "one-third", key: index },
|
|
22611
22611
|
React.createElement(Card, __assign$2({}, card)))); }))));
|
|
22612
22612
|
};
|
|
22613
22613
|
|
|
22614
|
-
const Container$
|
|
22614
|
+
const Container$N = styled.div`
|
|
22615
22615
|
margin: 25px 0;
|
|
22616
22616
|
`;
|
|
22617
22617
|
|
|
@@ -22729,7 +22729,7 @@ var FileDownload = function (_a) {
|
|
|
22729
22729
|
|
|
22730
22730
|
var DownloadableFiles = function (_a) {
|
|
22731
22731
|
var files = _a.files;
|
|
22732
|
-
return (React.createElement(Container$
|
|
22732
|
+
return (React.createElement(Container$N, { "data-testid": "DownloadableFiles" }, files.length > 0 ?
|
|
22733
22733
|
files.map(function (file) { return React.createElement(FileDownload, __assign$2({ key: file.title }, file)); })
|
|
22734
22734
|
:
|
|
22735
22735
|
React.createElement("i", null, "No file to show")));
|
|
@@ -22830,7 +22830,7 @@ const AccessibleMapLink = styled(MapLink$1)`
|
|
|
22830
22830
|
${(props) => props.theme.visuallyHidden};
|
|
22831
22831
|
`;
|
|
22832
22832
|
|
|
22833
|
-
const Container$
|
|
22833
|
+
const Container$M = styled.div`
|
|
22834
22834
|
border: solid 4px;
|
|
22835
22835
|
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
22836
22836
|
border-color: ${(props) =>
|
|
@@ -22884,7 +22884,7 @@ const InnerContainer$2 = styled.div`
|
|
|
22884
22884
|
*/
|
|
22885
22885
|
var AlertBannerService = function (_a) {
|
|
22886
22886
|
var title = _a.title, _b = _a.hasTopSpacing, hasTopSpacing = _b === void 0 ? false : _b, _c = _a.alertType, alertType = _c === void 0 ? 'alert' : _c, children = _a.children;
|
|
22887
|
-
return (React.createElement(Container$
|
|
22887
|
+
return (React.createElement(Container$M, { "$alertType": alertType, "data-testid": "AlertBannerService", "$hasTopSpacing": hasTopSpacing },
|
|
22888
22888
|
React.createElement(InnerContainer$2, { "data-testid": "AlertBannerServiceInner" },
|
|
22889
22889
|
(title === null || title === void 0 ? void 0 : title.trim()) && React.createElement(Heading, { text: title }),
|
|
22890
22890
|
children)));
|
|
@@ -22937,7 +22937,7 @@ var GoogleMap = function (_a) {
|
|
|
22937
22937
|
React.createElement(MapLink$1, { href: link_url }, link_title ? link_title : 'Google Maps link')))));
|
|
22938
22938
|
};
|
|
22939
22939
|
|
|
22940
|
-
const Container$
|
|
22940
|
+
const Container$L = styled.figure`
|
|
22941
22941
|
display: block;
|
|
22942
22942
|
background: ${(props) =>
|
|
22943
22943
|
props.theme.cardinal_name === 'north'
|
|
@@ -23604,7 +23604,7 @@ var LazyImage = /*@__PURE__*/getDefaultExportFromCjs(lib$1);
|
|
|
23604
23604
|
*/
|
|
23605
23605
|
var Image$2 = function (_a) {
|
|
23606
23606
|
var imageSmall = _a.imageSmall, imageLarge = _a.imageLarge, imageAltText = _a.imageAltText, _b = _a.ratio, ratio = _b === void 0 ? '4by3' : _b, caption = _a.caption, wrapText = _a.wrapText;
|
|
23607
|
-
return (React.createElement(Container$
|
|
23607
|
+
return (React.createElement(Container$L, { "data-testid": "Image", "$wrapText": wrapText },
|
|
23608
23608
|
React.createElement(ImageContainer$4, { "data-testid": "ImageContainer", "$ratio": ratio },
|
|
23609
23609
|
React.createElement(LazyImage, { placeholder: imageSmall, src: imageLarge, visibilitySensorProps: {
|
|
23610
23610
|
partialVisibility: true,
|
|
@@ -23612,7 +23612,7 @@ var Image$2 = function (_a) {
|
|
|
23612
23612
|
(caption === null || caption === void 0 ? void 0 : caption.trim()) && React.createElement(Caption, null, caption)));
|
|
23613
23613
|
};
|
|
23614
23614
|
|
|
23615
|
-
const Container$
|
|
23615
|
+
const Container$K = styled.div`
|
|
23616
23616
|
display: block;
|
|
23617
23617
|
`;
|
|
23618
23618
|
|
|
@@ -23633,7 +23633,7 @@ const Content$5 = styled.div`
|
|
|
23633
23633
|
*/
|
|
23634
23634
|
var ImageAndText = function (_a) {
|
|
23635
23635
|
var heading = _a.heading, textContent = _a.textContent, image = _a.image;
|
|
23636
|
-
return (React.createElement(Container$
|
|
23636
|
+
return (React.createElement(Container$K, { "data-testid": "ImageAndText" },
|
|
23637
23637
|
React.createElement(Row$1, null,
|
|
23638
23638
|
heading && (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
23639
23639
|
React.createElement(HeadingContainer, null,
|
|
@@ -23653,7 +23653,7 @@ var CaseAppointmentType;
|
|
|
23653
23653
|
CaseAppointmentType["Writing"] = "writing";
|
|
23654
23654
|
})(CaseAppointmentType || (CaseAppointmentType = {}));
|
|
23655
23655
|
|
|
23656
|
-
const Container$
|
|
23656
|
+
const Container$J = styled.div`
|
|
23657
23657
|
display: block;
|
|
23658
23658
|
box-sizing: border-box;
|
|
23659
23659
|
`;
|
|
@@ -23774,7 +23774,7 @@ var InquestSchedule = function (_a) {
|
|
|
23774
23774
|
};
|
|
23775
23775
|
});
|
|
23776
23776
|
};
|
|
23777
|
-
return (React.createElement(Container$
|
|
23777
|
+
return (React.createElement(Container$J, { "data-testid": "InquestSchedule" },
|
|
23778
23778
|
Object.keys(hearingDayGrouped).length > 0 && (React.createElement(GroupContainer, null,
|
|
23779
23779
|
React.createElement(Heading, { level: 2, text: title }),
|
|
23780
23780
|
React.createElement(Accordion$1, { sections: transformToSections(hearingDayGrouped) }))),
|
|
@@ -23789,7 +23789,7 @@ var InquestSchedule = function (_a) {
|
|
|
23789
23789
|
error ? (React.createElement("p", null, " The information is currently unavailable.")) : (React.createElement("p", null, "There are no inquests scheduled for next month."))))));
|
|
23790
23790
|
};
|
|
23791
23791
|
|
|
23792
|
-
const Container$
|
|
23792
|
+
const Container$I = styled.div`
|
|
23793
23793
|
${(props) => props.theme.fontStyles};
|
|
23794
23794
|
overflow: hidden;
|
|
23795
23795
|
margin: 40px auto 5px auto;
|
|
@@ -23869,7 +23869,7 @@ const CTA = styled.a`
|
|
|
23869
23869
|
*/
|
|
23870
23870
|
var PromoBanner = function (_a) {
|
|
23871
23871
|
var title = _a.title, image1440x810 = _a.image1440x810, image144x81 = _a.image144x81, ctaText = _a.ctaText, ctaUrl = _a.ctaUrl, children = _a.children;
|
|
23872
|
-
return (React.createElement(Container$
|
|
23872
|
+
return (React.createElement(Container$I, null,
|
|
23873
23873
|
React.createElement(LazyImage, { src: image1440x810, placeholder: image144x81, visibilitySensorProps: {
|
|
23874
23874
|
partialVisibility: true,
|
|
23875
23875
|
} }, function (src) { return React.createElement(ImageLink, { "$img": src, href: ctaUrl, title: ctaText }); }),
|
|
@@ -24081,6 +24081,162 @@ var Promotions = function (_a) {
|
|
|
24081
24081
|
numberOfPromos > 1 && React.createElement(PromoBlock, { promos: promos.slice(1, numberOfPromos) })));
|
|
24082
24082
|
};
|
|
24083
24083
|
|
|
24084
|
+
const Container$H = styled.div`
|
|
24085
|
+
display: block;
|
|
24086
|
+
`;
|
|
24087
|
+
|
|
24088
|
+
const Label$4 = styled.label`
|
|
24089
|
+
margin-bottom: 5px;
|
|
24090
|
+
font-weight: bold;
|
|
24091
|
+
`;
|
|
24092
|
+
|
|
24093
|
+
const RoadworkList = styled.ul`
|
|
24094
|
+
list-style: none;
|
|
24095
|
+
margin: 0;
|
|
24096
|
+
padding: 0;
|
|
24097
|
+
max-width: 100% !important;
|
|
24098
|
+
`;
|
|
24099
|
+
|
|
24100
|
+
const Roadwork = styled.li`
|
|
24101
|
+
display: block;
|
|
24102
|
+
width: 100%;
|
|
24103
|
+
margin-left: 0;
|
|
24104
|
+
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.medium} !important;
|
|
24105
|
+
padding: ${(props) => `${props.theme.theme_vars.spacingSizes.small} ${props.theme.theme_vars.spacingSizes.medium}`};
|
|
24106
|
+
left: 0;
|
|
24107
|
+
box-shadow: 1px 1px 5px 1px rgba(0, 0, 0, 0.2);
|
|
24108
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
24109
|
+
background-color: ${(props) =>
|
|
24110
|
+
props.theme.cardinal_name === 'west'
|
|
24111
|
+
? props.theme.theme_vars.colours.grey_light + '7a'
|
|
24112
|
+
: props.theme.theme_vars.colours.white};
|
|
24113
|
+
|
|
24114
|
+
h3 {
|
|
24115
|
+
margin-top: ${(props) => props.theme.theme_vars.spacingSizes.medium} !important;
|
|
24116
|
+
}
|
|
24117
|
+
`;
|
|
24118
|
+
|
|
24119
|
+
const IconContainer$2 = styled.div`
|
|
24120
|
+
display: flex;
|
|
24121
|
+
flex-wrap: nowrap;
|
|
24122
|
+
flex-direction: row;
|
|
24123
|
+
justify-content: flex-start;
|
|
24124
|
+
align-items: center;
|
|
24125
|
+
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
24126
|
+
|
|
24127
|
+
&:last-of-type {
|
|
24128
|
+
margin-bottom: 0;
|
|
24129
|
+
}
|
|
24130
|
+
|
|
24131
|
+
& span svg {
|
|
24132
|
+
vertical-align: middle;
|
|
24133
|
+
}
|
|
24134
|
+
`;
|
|
24135
|
+
|
|
24136
|
+
const IconText = styled.div`
|
|
24137
|
+
padding-left: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
24138
|
+
`;
|
|
24139
|
+
|
|
24140
|
+
const NoMatches = styled.p`
|
|
24141
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.small} 0;
|
|
24142
|
+
`;
|
|
24143
|
+
|
|
24144
|
+
/**
|
|
24145
|
+
* Primary UI component for user interaction
|
|
24146
|
+
* If value is set then treat as controlled component
|
|
24147
|
+
*/
|
|
24148
|
+
var Input = function (_a) {
|
|
24149
|
+
var _b = _a.type, type = _b === void 0 ? 'text' : _b, _c = _a.placeholder, placeholder = _c === void 0 ? '' : _c, _d = _a.isErrored, isErrored = _d === void 0 ? false : _d, errorText = _a.errorText, name = _a.name, maxLength = _a.maxLength, defaultValue = _a.defaultValue, onChange = _a.onChange, id = _a.id, value = _a.value, autocomplete = _a.autocomplete, _e = _a.isFullWidth, isFullWidth = _e === void 0 ? false : _e;
|
|
24150
|
+
return (React.createElement(React.Fragment, null,
|
|
24151
|
+
errorText && React.createElement(ErrorText$1, null, errorText),
|
|
24152
|
+
typeof value !== 'undefined' ? (React.createElement(StyledInput, { onChange: onChange, type: type, placeholder: placeholder, name: name, "$isErrored": isErrored, maxLength: maxLength, value: value, id: id, autoComplete: autocomplete, "$isFullWidth": isFullWidth })) : (React.createElement(StyledInput, { onChange: onChange, type: type, placeholder: placeholder, name: name, "$isErrored": isErrored, maxLength: maxLength, defaultValue: defaultValue, id: id, autoComplete: autocomplete, "$isFullWidth": isFullWidth }))));
|
|
24153
|
+
};
|
|
24154
|
+
|
|
24155
|
+
/**
|
|
24156
|
+
* A filterable list of roadworks
|
|
24157
|
+
*/
|
|
24158
|
+
var RoadworksList = function (_a) {
|
|
24159
|
+
var roadworks = _a.roadworks, title = _a.title;
|
|
24160
|
+
var _b = useState(roadworks), filteredRoadworks = _b[0], setFilteredRoadworks = _b[1];
|
|
24161
|
+
var handleSearch = function (e) {
|
|
24162
|
+
var searchTerm = e.target.value.toLowerCase();
|
|
24163
|
+
if (searchTerm != '') {
|
|
24164
|
+
var updatedRoadworks = roadworks.filter(function (roadwork) {
|
|
24165
|
+
return (roadwork.description.toLowerCase().includes(searchTerm) ||
|
|
24166
|
+
roadwork.detailedLocation.toLocaleLowerCase().includes(searchTerm) ||
|
|
24167
|
+
roadwork.trafficManagement.toLowerCase().includes(searchTerm));
|
|
24168
|
+
});
|
|
24169
|
+
setFilteredRoadworks(updatedRoadworks);
|
|
24170
|
+
}
|
|
24171
|
+
else {
|
|
24172
|
+
setFilteredRoadworks(roadworks);
|
|
24173
|
+
}
|
|
24174
|
+
};
|
|
24175
|
+
// Format the time to match Gov UK style guide
|
|
24176
|
+
// https://www.gov.uk/guidance/style-guide/a-to-z#times
|
|
24177
|
+
var formatTime = function (dayJsInstance) {
|
|
24178
|
+
if (dayJsInstance.format('HH:mm') === '00:00') {
|
|
24179
|
+
return 'midnight';
|
|
24180
|
+
}
|
|
24181
|
+
if (dayJsInstance.format('HH:mm') === '12:00') {
|
|
24182
|
+
return 'midday';
|
|
24183
|
+
}
|
|
24184
|
+
if (dayJsInstance.format('mm') === '00') {
|
|
24185
|
+
return dayJsInstance.format('ha');
|
|
24186
|
+
}
|
|
24187
|
+
else {
|
|
24188
|
+
return dayJsInstance.format('h:mma');
|
|
24189
|
+
}
|
|
24190
|
+
};
|
|
24191
|
+
// Format the time to match the Gov UK style guide
|
|
24192
|
+
// https://www.gov.uk/guidance/style-guide/a-to-z#dates
|
|
24193
|
+
var formatDate = function (startTime, endTime) {
|
|
24194
|
+
if (!endTime) {
|
|
24195
|
+
return dayjs(startTime).format('dddd D MMMM YYYY') + ' at ' + formatTime(dayjs(startTime));
|
|
24196
|
+
}
|
|
24197
|
+
else {
|
|
24198
|
+
var endDate = dayjs(endTime);
|
|
24199
|
+
var startDate = dayjs(startTime);
|
|
24200
|
+
if (startDate.format('YYYY-MM-DD') === endDate.format('YYYY-MM-DD')) {
|
|
24201
|
+
if (startDate.format('HH:mm') === '00:00' && endDate.format('HH:mm') === '23:59') {
|
|
24202
|
+
return "".concat(startDate.format('dddd D MMMM YYYY'), " - all day");
|
|
24203
|
+
}
|
|
24204
|
+
return "".concat(startDate.format('dddd D MMMM YYYY'), " at ").concat(formatTime(startDate), " to ").concat(formatTime(endDate));
|
|
24205
|
+
}
|
|
24206
|
+
else {
|
|
24207
|
+
return "".concat(startDate.format('dddd D MMMM YYYY'), " at ").concat(formatTime(startDate), " to ").concat(endDate.format('dddd D MMMM YYYY'), " at ").concat(formatTime(endDate));
|
|
24208
|
+
}
|
|
24209
|
+
}
|
|
24210
|
+
};
|
|
24211
|
+
return (React.createElement(Container$H, { "data-testid": "RoadworksList" },
|
|
24212
|
+
React.createElement(Heading, { level: 2, text: title }),
|
|
24213
|
+
React.createElement(Label$4, { htmlFor: "roadworksSearch" }, "Search roadworks"),
|
|
24214
|
+
React.createElement(Input, { id: "roadworksSearch", name: "roadworksSearch", type: "text", placeholder: "Enter a search term", maxLength: 255, onChange: handleSearch, isFullWidth: true }),
|
|
24215
|
+
React.createElement(RoadworkList, null, filteredRoadworks.map(function (roadwork, index) {
|
|
24216
|
+
var startDate = new Date(roadwork.startTime);
|
|
24217
|
+
var endDate = new Date(roadwork.endTime);
|
|
24218
|
+
return (React.createElement(Roadwork, { key: index },
|
|
24219
|
+
React.createElement(IconContainer$2, null,
|
|
24220
|
+
React.createElement(DynamicIcon, { icon: "mappin" }),
|
|
24221
|
+
React.createElement(IconText, null,
|
|
24222
|
+
React.createElement(Heading, { text: roadwork.detailedLocation, level: 3 }))),
|
|
24223
|
+
React.createElement(IconContainer$2, null,
|
|
24224
|
+
React.createElement(DynamicIcon, { icon: "events" }),
|
|
24225
|
+
React.createElement(IconText, null,
|
|
24226
|
+
React.createElement("span", null, formatDate(startDate, endDate)))),
|
|
24227
|
+
React.createElement(IconContainer$2, null,
|
|
24228
|
+
React.createElement(DynamicIcon, { icon: "roadworks" }),
|
|
24229
|
+
React.createElement(IconText, null,
|
|
24230
|
+
React.createElement("span", null, roadwork.description))),
|
|
24231
|
+
React.createElement(IconContainer$2, null,
|
|
24232
|
+
React.createElement(DynamicIcon, { icon: "bollard" }),
|
|
24233
|
+
React.createElement(IconText, null,
|
|
24234
|
+
React.createElement("span", null, roadwork.trafficManagement)))));
|
|
24235
|
+
})),
|
|
24236
|
+
roadworks.length > 0 && filteredRoadworks.length === 0 && (React.createElement(NoMatches, null, "We couldn't find any results for your search term. Please try a different search.")),
|
|
24237
|
+
roadworks.length == 0 && (React.createElement(NoMatches, null, "Sorry, we're not able to find any results at the moment. Please try again later."))));
|
|
24238
|
+
};
|
|
24239
|
+
|
|
24084
24240
|
const Container$G = styled.div`
|
|
24085
24241
|
padding: 0;
|
|
24086
24242
|
margin: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
@@ -24199,17 +24355,6 @@ const SubmitButton = styled.input`
|
|
|
24199
24355
|
}
|
|
24200
24356
|
`;
|
|
24201
24357
|
|
|
24202
|
-
/**
|
|
24203
|
-
* Primary UI component for user interaction
|
|
24204
|
-
* If value is set then treat as controlled component
|
|
24205
|
-
*/
|
|
24206
|
-
var Input = function (_a) {
|
|
24207
|
-
var _b = _a.type, type = _b === void 0 ? 'text' : _b, _c = _a.placeholder, placeholder = _c === void 0 ? '' : _c, _d = _a.isErrored, isErrored = _d === void 0 ? false : _d, errorText = _a.errorText, name = _a.name, maxLength = _a.maxLength, defaultValue = _a.defaultValue, onChange = _a.onChange, id = _a.id, value = _a.value, autocomplete = _a.autocomplete, _e = _a.isFullWidth, isFullWidth = _e === void 0 ? false : _e;
|
|
24208
|
-
return (React.createElement(React.Fragment, null,
|
|
24209
|
-
errorText && React.createElement(ErrorText$1, null, errorText),
|
|
24210
|
-
typeof value !== 'undefined' ? (React.createElement(StyledInput, { onChange: onChange, type: type, placeholder: placeholder, name: name, "$isErrored": isErrored, maxLength: maxLength, value: value, id: id, autoComplete: autocomplete, "$isFullWidth": isFullWidth })) : (React.createElement(StyledInput, { onChange: onChange, type: type, placeholder: placeholder, name: name, "$isErrored": isErrored, maxLength: maxLength, defaultValue: defaultValue, id: id, autoComplete: autocomplete, "$isFullWidth": isFullWidth }))));
|
|
24211
|
-
};
|
|
24212
|
-
|
|
24213
24358
|
var CustomSearch = function (_a) {
|
|
24214
24359
|
var method = _a.method, path = _a.path, label = _a.label, _b = _a.hasHiddenLabel, hasHiddenLabel = _b === void 0 ? true : _b, fieldName = _a.fieldName, placeholder = _a.placeholder, searchText = _a.searchText, id = _a.id;
|
|
24215
24360
|
if (!id) {
|
|
@@ -33430,5 +33575,5 @@ var DirectoryDocumentList = function (_a) {
|
|
|
33430
33575
|
React.createElement(Column, { small: "full", medium: "full", large: "full" }, !isLoading && (React.createElement(Pagination, { currentPage: pageNumber, totalResults: totalResults, resultsPerPage: perPage, postTo: directoryPath, buttonClickOverride: setPageNumber }))))))));
|
|
33431
33576
|
};
|
|
33432
33577
|
|
|
33433
|
-
export { AccessibleLink as AccessibleLinks, Accordion$1 as Accordion, AlertBanner, AlertBannerService, Autocomplete, BackLink, BackToTop, BinCollection, BlockQuote, Breadcrumbs, Button$4 as Button, CallToAction, Cards, CheckboxListFilter, Contents$1 as Contents, ContentsNavigation, CookieBanner, CouncilTaxAlphabeticalDirectory, DirectoryDocumentList, DirectoryService, DirectoryServiceList, DirectoryShortList, DirectoryShortListProvider, DisplayDate, Divider, DownloadableFiles, DropDownFilter, DynamicIcon, Footer, FullWidthContainer, GDS_theme, GlobalStyleReset, GoogleMap, Header, Heading, HeadingWithIcon, HeroImage, HomeHero, Image$2 as 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, PromotedLinks, Promotions, SearchBox, SearchResultsList, Searchbar, SectionLinks, SectionLinksMobileContents, SectionLinksSidebar, ServiceLinksBoxed, ServicesLinksList, SignpostLinks, SkipToMainContent, StaticMap, Summary, TextInput, Video, WarningText, WarningTextDisclaimer, lb_theme_north, lb_theme_west, north_theme, useDirectoryShortListContext, west_theme };
|
|
33578
|
+
export { AccessibleLink as AccessibleLinks, Accordion$1 as Accordion, AlertBanner, AlertBannerService, Autocomplete, BackLink, BackToTop, BinCollection, BlockQuote, Breadcrumbs, Button$4 as Button, CallToAction, Cards, CheckboxListFilter, Contents$1 as Contents, ContentsNavigation, CookieBanner, CouncilTaxAlphabeticalDirectory, DirectoryDocumentList, DirectoryService, DirectoryServiceList, DirectoryShortList, DirectoryShortListProvider, DisplayDate, Divider, DownloadableFiles, DropDownFilter, DynamicIcon, Footer, FullWidthContainer, GDS_theme, GlobalStyleReset, GoogleMap, Header, Heading, HeadingWithIcon, HeroImage, HomeHero, Image$2 as 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, PromotedLinks, Promotions, RoadworksList, SearchBox, SearchResultsList, Searchbar, SectionLinks, SectionLinksMobileContents, SectionLinksSidebar, ServiceLinksBoxed, ServicesLinksList, SignpostLinks, SkipToMainContent, StaticMap, Summary, TextInput, Video, WarningText, WarningTextDisclaimer, lb_theme_north, lb_theme_west, north_theme, useDirectoryShortListContext, west_theme };
|
|
33434
33579
|
//# sourceMappingURL=index.mjs.js.map
|