northants-design-system 2.2.0 → 2.3.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 +3 -1
- package/build/index.js +840 -201
- package/build/index.js.map +1 -1
- package/build/index.mjs.js +838 -201
- package/build/index.mjs.js.map +1 -1
- package/build/library/components/BudgetSlider/BudgetSlider.d.ts +4 -0
- package/build/library/components/BudgetSlider/BudgetSlider.test.d.ts +1 -0
- package/build/library/components/BudgetSlider/BudgetSlider.types.d.ts +56 -0
- package/build/library/components/QuestionAndAnswer/QuestionAndAnswer.d.ts +4 -0
- package/build/library/components/QuestionAndAnswer/QuestionAndAnswer.test.d.ts +1 -0
- package/build/library/components/QuestionAndAnswer/QuestionAndAnswer.types.d.ts +17 -0
- package/build/library/components/RadioCheckboxInput/RadioCheckboxInput.types.d.ts +4 -0
- package/build/library/components/logos/WestColouredLogo/logo.d.ts +2 -2
- package/build/library/pages/BudgetGameExample/BudgetGameExample.d.ts +4 -0
- package/build/library/pages/BudgetQuizExample/BudgetQuizExample.d.ts +4 -0
- package/build/library/slices/BudgetGame/BudgetGame.d.ts +7 -0
- package/build/library/slices/BudgetGame/BudgetGame.storydata.d.ts +2 -0
- package/build/library/slices/BudgetGame/BudgetGame.test.d.ts +1 -0
- package/build/library/slices/BudgetGame/BudgetGame.types.d.ts +20 -0
- package/build/library/slices/Quiz/Quiz.d.ts +4 -0
- package/build/library/slices/Quiz/Quiz.storydata.d.ts +2 -0
- package/build/library/slices/Quiz/Quiz.test.d.ts +1 -0
- package/build/library/slices/Quiz/Quiz.types.d.ts +11 -0
- package/package.json +3 -1
package/build/index.mjs.js
CHANGED
|
@@ -3635,7 +3635,7 @@ var Autocomplete = function (_a) {
|
|
|
3635
3635
|
})));
|
|
3636
3636
|
};
|
|
3637
3637
|
|
|
3638
|
-
const Container$
|
|
3638
|
+
const Container$1t = styled.div`
|
|
3639
3639
|
display: block;
|
|
3640
3640
|
`;
|
|
3641
3641
|
|
|
@@ -3721,7 +3721,7 @@ var BackToTop = function (_a) {
|
|
|
3721
3721
|
useEffect(function () {
|
|
3722
3722
|
window.addEventListener('scroll', toggleVisible);
|
|
3723
3723
|
});
|
|
3724
|
-
return (React.createElement(Container$
|
|
3724
|
+
return (React.createElement(Container$1t, { "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" },
|
|
3725
3725
|
React.createElement(ChevronIcon, { colourFill: theme.theme_vars.colours.white, direction: "up" })))));
|
|
3726
3726
|
};
|
|
3727
3727
|
|
|
@@ -3807,14 +3807,14 @@ const StyledButton$1 = styled.a`
|
|
|
3807
3807
|
/**
|
|
3808
3808
|
* Primary UI component for user interaction
|
|
3809
3809
|
*/
|
|
3810
|
-
var Button$
|
|
3810
|
+
var Button$5 = function (_a) {
|
|
3811
3811
|
var _b = _a.primary, primary = _b === void 0 ? true : _b, _c = _a.size, size = _c === void 0 ? 'medium' : _c, text = _a.text, title = _a.title, url = _a.url, colourOverride = _a.colourOverride; _a.isExternal; var _e = _a.isDisabled, isDisabled = _e === void 0 ? false : _e, children = _a.children, props = __rest(_a, ["primary", "size", "text", "title", "url", "colourOverride", "isExternal", "isDisabled", "children"]);
|
|
3812
3812
|
var mode = primary ? 'button--primary' : 'button--secondary';
|
|
3813
3813
|
var href = isDisabled ? null : { href: url };
|
|
3814
3814
|
return (React.createElement(StyledButton$1, __assign({ className: ["button--".concat(size), mode].join(' ') }, href, { title: title ? title : text, "$colourOverride": colourOverride && colourOverride }, props), text ? text : children));
|
|
3815
3815
|
};
|
|
3816
3816
|
|
|
3817
|
-
const Container$
|
|
3817
|
+
const Container$1s = styled.div`
|
|
3818
3818
|
display: block;
|
|
3819
3819
|
background-color: ${(props) =>
|
|
3820
3820
|
props.$isOpen ? props.theme.theme_vars.colours.positive : props.theme.theme_vars.colours.negative}16;
|
|
@@ -19186,7 +19186,7 @@ var ConsultationStatus = function (_a) {
|
|
|
19186
19186
|
detail: new Date(closeDate).toLocaleDateString('en-GB'),
|
|
19187
19187
|
},
|
|
19188
19188
|
];
|
|
19189
|
-
return (React.createElement(Container$
|
|
19189
|
+
return (React.createElement(Container$1s, { "data-testid": "ConsultationStatus", "$isOpen": isOpen },
|
|
19190
19190
|
React.createElement(SummaryList, { terms: terms, hasBorders: false, hasMargin: false })));
|
|
19191
19191
|
};
|
|
19192
19192
|
|
|
@@ -21399,7 +21399,7 @@ var DynamicIcon = function (_a) {
|
|
|
21399
21399
|
React.createElement(DynamicComponent, { name: icon, isHover: true }))))));
|
|
21400
21400
|
};
|
|
21401
21401
|
|
|
21402
|
-
const Container$
|
|
21402
|
+
const Container$1r = styled.div`
|
|
21403
21403
|
display: block;
|
|
21404
21404
|
padding: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
21405
21405
|
border-bottom: ${(props) => (props.$hasBorder ? `1px solid ${props.theme.theme_vars.colours.grey}` : 'none')};
|
|
@@ -21586,14 +21586,14 @@ var formatDateRange = function (startDate, endDate) {
|
|
|
21586
21586
|
|
|
21587
21587
|
var EventDetails = function (_a) {
|
|
21588
21588
|
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;
|
|
21589
|
-
return (React.createElement(Container$
|
|
21589
|
+
return (React.createElement(Container$1r, { "data-testid": "EventDetails", "$hasBorder": hasBorder, "$hasMargin": hasMargin },
|
|
21590
21590
|
React.createElement(EventRow, null,
|
|
21591
21591
|
React.createElement(HeadingWithIcon, { icon: "events", level: 4, text: formatDateRange(startTime, endTime), hasHover: false })),
|
|
21592
21592
|
React.createElement(EventRow, null,
|
|
21593
21593
|
React.createElement(HeadingWithIcon, { icon: "address", level: 4, text: location, hasHover: false }))));
|
|
21594
21594
|
};
|
|
21595
21595
|
|
|
21596
|
-
const Container$
|
|
21596
|
+
const Container$1q = styled.div`
|
|
21597
21597
|
display: flex;
|
|
21598
21598
|
width: 100%;
|
|
21599
21599
|
min-height: 400px;
|
|
@@ -21617,7 +21617,7 @@ var Map$1 = function (_a) {
|
|
|
21617
21617
|
setMap(new window.google.maps.Map(ref.current, { center: center, zoom: zoom }));
|
|
21618
21618
|
}
|
|
21619
21619
|
}, [ref, map]);
|
|
21620
|
-
return (React.createElement(Container$
|
|
21620
|
+
return (React.createElement(Container$1q, { "data-testid": "Map" },
|
|
21621
21621
|
React.createElement("div", { ref: ref }),
|
|
21622
21622
|
React.Children.map(children, function (child) {
|
|
21623
21623
|
if (React.isValidElement(child)) {
|
|
@@ -21674,7 +21674,7 @@ var MapMarker = function (options) {
|
|
|
21674
21674
|
return null;
|
|
21675
21675
|
};
|
|
21676
21676
|
|
|
21677
|
-
const Container$
|
|
21677
|
+
const Container$1p = styled.div`
|
|
21678
21678
|
${(props) => props.theme.fontStyles};
|
|
21679
21679
|
display: block;
|
|
21680
21680
|
border-top: 1px solid ${(props) => props.theme.theme_vars.colours.grey};
|
|
@@ -22460,7 +22460,7 @@ var Pagination = function (_a) {
|
|
|
22460
22460
|
}
|
|
22461
22461
|
};
|
|
22462
22462
|
if (numbers.length > 1) {
|
|
22463
|
-
return (React.createElement(Container$
|
|
22463
|
+
return (React.createElement(Container$1p, { "data-testid": "Pagination", role: "navigation", "aria-label": "Pagination" },
|
|
22464
22464
|
currentPage > 1 && (React.createElement(Previous, { onClick: function () { return buttonClick(currentPage - 1); }, title: "Go back a page" }, "Previous")),
|
|
22465
22465
|
React.createElement(NumbersContainer, null, numbers.map(function (v, i) { return (React.createElement(NumberContainer, { key: i },
|
|
22466
22466
|
v === '...' && React.createElement(Ellipsis, null, "..."),
|
|
@@ -22472,7 +22472,7 @@ var Pagination = function (_a) {
|
|
|
22472
22472
|
return null;
|
|
22473
22473
|
};
|
|
22474
22474
|
|
|
22475
|
-
const Container$
|
|
22475
|
+
const Container$1o = styled.div`
|
|
22476
22476
|
${(props) => props.theme.fontStyles};
|
|
22477
22477
|
margin-bottom: 30px;
|
|
22478
22478
|
`;
|
|
@@ -22496,7 +22496,7 @@ const hideLabel$1 = (props) => {
|
|
|
22496
22496
|
}
|
|
22497
22497
|
};
|
|
22498
22498
|
|
|
22499
|
-
const Legend$
|
|
22499
|
+
const Legend$4 = styled.legend`
|
|
22500
22500
|
color: #0b0c0c;
|
|
22501
22501
|
-webkit-box-sizing: border-box;
|
|
22502
22502
|
box-sizing: border-box;
|
|
@@ -22656,20 +22656,20 @@ var CheckboxListFilter = function (_a) {
|
|
|
22656
22656
|
}
|
|
22657
22657
|
};
|
|
22658
22658
|
var backupLabel = Math.random().toString(36).substring(7);
|
|
22659
|
-
return (React.createElement(Container$
|
|
22659
|
+
return (React.createElement(Container$1o, { "data-testid": "CheckboxListFilter" },
|
|
22660
22660
|
React.createElement(Fieldset$2, { "aria-describedby": hintId },
|
|
22661
|
-
React.createElement(Legend$
|
|
22661
|
+
React.createElement(Legend$4, { "$labelHidden": labelHidden, "data-testid": "CheckboxListFilterLegend" }, label),
|
|
22662
22662
|
React.createElement(Hint$1, { id: hintId, "$hintHidden": hintHidden, "data-testid": "CheckboxListFilterHint" }, hint),
|
|
22663
22663
|
React.createElement(Checkboxes, null, checkboxState.map(function (option, i) { return (React.createElement(Checkbox, { key: i },
|
|
22664
22664
|
React.createElement(CheckboxInput, { id: option.value, name: labelHidden ? backupLabel : label, type: "checkbox", onChange: optionChecked, value: option.value, checked: option.checked }),
|
|
22665
22665
|
React.createElement(CheckboxLabel, { "$isChecked": option.checked, htmlFor: option.value }, option.title))); })))));
|
|
22666
22666
|
};
|
|
22667
22667
|
|
|
22668
|
-
const Container$
|
|
22668
|
+
const Container$1n = styled.div`
|
|
22669
22669
|
margin-bottom: ${(props) => (props.$hasMargin ? props.theme.theme_vars.spacingSizes.small : 0)};
|
|
22670
22670
|
`;
|
|
22671
22671
|
|
|
22672
|
-
const Container$
|
|
22672
|
+
const Container$1m = styled.div`
|
|
22673
22673
|
${(props) => props.theme.fontStyles};
|
|
22674
22674
|
width: ${(props) => (props.$isFullWidth ? '100%' : 'auto')};
|
|
22675
22675
|
`;
|
|
@@ -22736,7 +22736,7 @@ const ErrorText$2 = styled.p`
|
|
|
22736
22736
|
|
|
22737
22737
|
var DropDownSelect = function (_a) {
|
|
22738
22738
|
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;
|
|
22739
|
-
return (React.createElement(Container$
|
|
22739
|
+
return (React.createElement(Container$1m, { "$isFullWidth": isFullWidth },
|
|
22740
22740
|
React.createElement(Label$a, { htmlFor: id, "$hideLabel": hideLabel, "$hasBoldLabel": hasBoldLabel }, label),
|
|
22741
22741
|
errorText && React.createElement(ErrorText$2, { id: "".concat(id, "Error") }, errorText),
|
|
22742
22742
|
typeof value !== 'undefined' ? (React.createElement(Select, { id: id, name: id, onChange: onChange && onChange, value: value, "$isErrored": isErrored, "$hasBottomMargin": hasBottomMargin, "$isFullWidth": isFullWidth }, options.map(function (option, i) { return (React.createElement(Option, { key: i, value: option.value }, option.title)); }))) : (React.createElement(Select, { id: id, name: id, onChange: onChange && onChange, defaultValue: selected && selected, "$isErrored": isErrored, "$isFullWidth": isFullWidth }, options.map(function (option, i) { return (React.createElement(Option, { key: i, value: option.value }, option.title)); })))));
|
|
@@ -22749,7 +22749,7 @@ var DropDownFilter = function (_a) {
|
|
|
22749
22749
|
setValue(e.target.value);
|
|
22750
22750
|
handleParams('news', [{ key: NewsArticleFilterFields[filterKey].queryParamKey, value: e.target.value }], ['page']);
|
|
22751
22751
|
};
|
|
22752
|
-
return (React.createElement(Container$
|
|
22752
|
+
return (React.createElement(Container$1n, { "$hasMargin": hasMargin },
|
|
22753
22753
|
React.createElement(DropDownSelect, { id: id, label: label, options: options, onChange: optionPicked, selected: value, hideLabel: hideLabel })));
|
|
22754
22754
|
};
|
|
22755
22755
|
|
|
@@ -22894,7 +22894,7 @@ const ListItem$3 = styled.li`
|
|
|
22894
22894
|
}
|
|
22895
22895
|
`;
|
|
22896
22896
|
|
|
22897
|
-
const Container$
|
|
22897
|
+
const Container$1l = styled.div`
|
|
22898
22898
|
box-sizing: border-box;
|
|
22899
22899
|
display: flex;
|
|
22900
22900
|
flex-wrap: wrap;
|
|
@@ -22920,7 +22920,7 @@ const Container$1h = styled.div`
|
|
|
22920
22920
|
|
|
22921
22921
|
var Row$1 = function (_a) {
|
|
22922
22922
|
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;
|
|
22923
|
-
return (React.createElement(Container$
|
|
22923
|
+
return (React.createElement(Container$1l, { "data-testid": "Row", "$hasBorder": hasBorder, "$hasWrap": hasWrap, as: isList ? 'ul' : 'div', className: classes }, children));
|
|
22924
22924
|
};
|
|
22925
22925
|
|
|
22926
22926
|
const calculateWidth = (size) => {
|
|
@@ -22970,7 +22970,7 @@ const widths = (props) => {
|
|
|
22970
22970
|
`;
|
|
22971
22971
|
};
|
|
22972
22972
|
|
|
22973
|
-
const Container$
|
|
22973
|
+
const Container$1k = styled.div`
|
|
22974
22974
|
box-sizing: border-box;
|
|
22975
22975
|
display: block;
|
|
22976
22976
|
padding: ${(props) => (props.$hasPadding ? props.theme.theme_vars.spacingSizes.small : `0`)};
|
|
@@ -22982,7 +22982,7 @@ const Container$1g = styled.div`
|
|
|
22982
22982
|
|
|
22983
22983
|
var Column = function (_a) {
|
|
22984
22984
|
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;
|
|
22985
|
-
return (React.createElement(Container$
|
|
22985
|
+
return (React.createElement(Container$1k, { "data-testid": "Column", "$small": small, "$medium": medium, "$large": large, "$hasPadding": hasPadding, "$hasBorder": hasBorder, as: isList ? 'li' : 'div', className: classes, role: role, id: id }, children));
|
|
22986
22986
|
};
|
|
22987
22987
|
|
|
22988
22988
|
var PromotedLinks = function (_a) {
|
|
@@ -22999,7 +22999,7 @@ var PromotedLinks = function (_a) {
|
|
|
22999
22999
|
}
|
|
23000
23000
|
};
|
|
23001
23001
|
|
|
23002
|
-
const Container$
|
|
23002
|
+
const Container$1j = styled.div`
|
|
23003
23003
|
display: block;
|
|
23004
23004
|
`;
|
|
23005
23005
|
|
|
@@ -23049,7 +23049,7 @@ const promotedStyles = (props) => {
|
|
|
23049
23049
|
}
|
|
23050
23050
|
};
|
|
23051
23051
|
|
|
23052
|
-
const Container$
|
|
23052
|
+
const Container$1i = styled.a`
|
|
23053
23053
|
display: flex;
|
|
23054
23054
|
flex-direction: row;
|
|
23055
23055
|
flex-wrap: wrap;
|
|
@@ -23186,7 +23186,7 @@ const imageRatio = (props) => {
|
|
|
23186
23186
|
}
|
|
23187
23187
|
};
|
|
23188
23188
|
|
|
23189
|
-
const Container$
|
|
23189
|
+
const Container$1h = styled.div`
|
|
23190
23190
|
display: block;
|
|
23191
23191
|
position: ${(props) => (props.$ratio === 'auto' ? 'absolute' : 'relative')};
|
|
23192
23192
|
${imageRatio}
|
|
@@ -23204,13 +23204,13 @@ const Image$3 = styled.img`
|
|
|
23204
23204
|
|
|
23205
23205
|
var ResponsiveImage = function (_a) {
|
|
23206
23206
|
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;
|
|
23207
|
-
return (React.createElement(Container$
|
|
23207
|
+
return (React.createElement(Container$1h, { "data-testid": "ResponsiveImage", "$ratio": ratio },
|
|
23208
23208
|
React.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 })));
|
|
23209
23209
|
};
|
|
23210
23210
|
|
|
23211
23211
|
var EventLink = function (_a) {
|
|
23212
23212
|
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;
|
|
23213
|
-
return (React.createElement(Container$
|
|
23213
|
+
return (React.createElement(Container$1i, { "data-testid": "EventLink", href: url, "$isPromoted": isPromoted },
|
|
23214
23214
|
React.createElement(Row$1, null,
|
|
23215
23215
|
React.createElement(Column, { small: "full", medium: imageLarge ? 'two-thirds' : 'full', large: imageLarge ? 'two-thirds' : 'full', hasPadding: false },
|
|
23216
23216
|
React.createElement(EventContent, { "$hasPadding": hasPadding },
|
|
@@ -23226,13 +23226,13 @@ var EventLink = function (_a) {
|
|
|
23226
23226
|
// A list of related events
|
|
23227
23227
|
var RelatedEvents = function (_a) {
|
|
23228
23228
|
var title = _a.title, events = _a.events;
|
|
23229
|
-
return (React.createElement(Container$
|
|
23229
|
+
return (React.createElement(Container$1j, { "data-testid": "RelatedEvents" },
|
|
23230
23230
|
React.createElement(Title$a, null, title),
|
|
23231
23231
|
React.createElement(List$3, null, events.map(function (event, index) { return (React.createElement(ListItem$2, { key: index },
|
|
23232
23232
|
React.createElement(EventLink, { title: event.title, startTime: event.startTime, endTime: event.endTime, showSummary: false, url: event.url, location: event.location, hasPadding: false }))); }))));
|
|
23233
23233
|
};
|
|
23234
23234
|
|
|
23235
|
-
const Container$
|
|
23235
|
+
const Container$1g = styled.div`
|
|
23236
23236
|
display: block;
|
|
23237
23237
|
`;
|
|
23238
23238
|
|
|
@@ -23268,7 +23268,7 @@ const Cookies = styled.button`
|
|
|
23268
23268
|
}
|
|
23269
23269
|
`;
|
|
23270
23270
|
|
|
23271
|
-
const Container$
|
|
23271
|
+
const Container$1f = styled.div`
|
|
23272
23272
|
${(props) => props.theme.fontStyles}
|
|
23273
23273
|
background-color: ${(props) => props.theme.theme_vars.colours.grey_light};
|
|
23274
23274
|
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
@@ -23614,18 +23614,18 @@ var CookieBanner = function (_a) {
|
|
|
23614
23614
|
hideCookiesAcceptedConfirmationBanner();
|
|
23615
23615
|
};
|
|
23616
23616
|
return (React.createElement(React.Fragment, null,
|
|
23617
|
-
showCookieBanner && (React.createElement(Container$
|
|
23617
|
+
showCookieBanner && (React.createElement(Container$1f, { "data-testid": "CookieBanner" },
|
|
23618
23618
|
React.createElement(CookieMessage, null,
|
|
23619
23619
|
React.createElement(CookieHeading, null, title),
|
|
23620
23620
|
React.createElement(CookieParagraph, null, paragraph),
|
|
23621
23621
|
React.createElement(ButtonsContainer, null,
|
|
23622
23622
|
React.createElement(FormButton, { primary: true, text: acceptButtonText, isDisabled: false, type: "button", onClick: acceptCookies, size: "large" }),
|
|
23623
23623
|
React.createElement(FormButton, { primary: true, text: rejectButtonText, isDisabled: false, type: "button", onClick: rejectCookies, size: "large" }))))),
|
|
23624
|
-
showCookiesRejectedBanner && (React.createElement(Container$
|
|
23624
|
+
showCookiesRejectedBanner && (React.createElement(Container$1f, { "data-testid": "CookieBannerRejected", id: "CookieBannerRejected" },
|
|
23625
23625
|
React.createElement(CookieMessage, { isInline: true },
|
|
23626
23626
|
React.createElement(CookieParagraph, null, rejectConfirmationText),
|
|
23627
23627
|
React.createElement(CookieHide, { onClick: hideCookiesConfirmationBanner, "aria-controls": "CookieBannerRejected", "aria-hidden": "false" }, "Hide")))),
|
|
23628
|
-
showCookiesAcceptedBanner && (React.createElement(Container$
|
|
23628
|
+
showCookiesAcceptedBanner && (React.createElement(Container$1f, { "data-testid": "CookieBannerAccepted", id: "CookieBannerAccepted" },
|
|
23629
23629
|
React.createElement(CookieMessage, { isInline: true },
|
|
23630
23630
|
React.createElement(CookieParagraph, null, acceptConfirmationText),
|
|
23631
23631
|
React.createElement(CookieHide, { onClick: hideCookiesConfirmationBanner, "aria-controls": "CookieBannerAccepted", "aria-hidden": "false" }, "Hide"))))));
|
|
@@ -23647,7 +23647,7 @@ var StaticMap = function (_a) {
|
|
|
23647
23647
|
return "&markers=size:".concat(size, "%7Ccolor:").concat(colour).concat(label, "%7C").concat(mapMarker.lat, ",").concat(mapMarker.lng);
|
|
23648
23648
|
})
|
|
23649
23649
|
.join('');
|
|
23650
|
-
return (React.createElement(Container$
|
|
23650
|
+
return (React.createElement(Container$1g, { "data-testid": "StaticMap" },
|
|
23651
23651
|
React.createElement(Message, null,
|
|
23652
23652
|
React.createElement("span", null,
|
|
23653
23653
|
"To interact with the map, you need to ",
|
|
@@ -23666,7 +23666,7 @@ var TextInput = function (_a) {
|
|
|
23666
23666
|
React.createElement(StyledTextInput, { type: "text", id: id, name: name, defaultValue: value, "$size": size, placeholder: placeholder, "$isErrored": isErrored, "$isLarge": isLarge })));
|
|
23667
23667
|
};
|
|
23668
23668
|
|
|
23669
|
-
const Container$
|
|
23669
|
+
const Container$1e = styled.div`
|
|
23670
23670
|
display: block;
|
|
23671
23671
|
padding-bottom: ${(props) => props.theme.theme_vars.spacingSizes.extra_small};
|
|
23672
23672
|
margin-top: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
@@ -23714,11 +23714,11 @@ var ToggleButtons = function (_a) {
|
|
|
23714
23714
|
setActiveButton(index);
|
|
23715
23715
|
onClick();
|
|
23716
23716
|
};
|
|
23717
|
-
return (React.createElement(Container$
|
|
23717
|
+
return (React.createElement(Container$1e, { "data-testid": "ToggleButtons", "$hasTopMargin": hasTopMargin },
|
|
23718
23718
|
React.createElement(React.Fragment, null, buttons.map(function (button, index) { return (React.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)); }))));
|
|
23719
23719
|
};
|
|
23720
23720
|
|
|
23721
|
-
const Container$
|
|
23721
|
+
const Container$1d = styled.div`
|
|
23722
23722
|
display: block;
|
|
23723
23723
|
position: fixed;
|
|
23724
23724
|
top: ${(props) => props.theme.theme_vars.spacingSizes.xxx_large};
|
|
@@ -23818,14 +23818,14 @@ var QuickExit = function (_a) {
|
|
|
23818
23818
|
window.location.replace(url);
|
|
23819
23819
|
};
|
|
23820
23820
|
return (React.createElement(React.Fragment, null,
|
|
23821
|
-
React.createElement(Container$
|
|
23821
|
+
React.createElement(Container$1d, { "data-testid": "QuickExit" },
|
|
23822
23822
|
React.createElement(QuickExitButton, { onClick: function (e) { return handleClick(e); } },
|
|
23823
23823
|
React.createElement(HeadingWithIcon, { icon: "quickExit", level: 3, text: label, hasHover: false })))));
|
|
23824
23824
|
};
|
|
23825
23825
|
|
|
23826
23826
|
// Accordion
|
|
23827
23827
|
|
|
23828
|
-
const Container$
|
|
23828
|
+
const Container$1c = styled.div`
|
|
23829
23829
|
${(props) => props.theme.fontStyles}
|
|
23830
23830
|
margin-bottom: 20px;
|
|
23831
23831
|
border-bottom: 1px solid ${(props) => props.theme.theme_vars.colours.grey};
|
|
@@ -24115,7 +24115,7 @@ var Accordion$1 = function (_a) {
|
|
|
24115
24115
|
setAccordionStates(newStatus);
|
|
24116
24116
|
};
|
|
24117
24117
|
var accordionId = "accordion".concat(useId());
|
|
24118
|
-
return (React.createElement(Container$
|
|
24118
|
+
return (React.createElement(Container$1c, { "data-testid": "Accordion", id: accordionId },
|
|
24119
24119
|
showControls && sections.length > 1 && (React.createElement(AccordionControls$1, null,
|
|
24120
24120
|
React.createElement(OpenAllButton, { onClick: toggleAll, type: "button", "aria-expanded": !openAll },
|
|
24121
24121
|
openAll ? 'Open all' : 'Close all',
|
|
@@ -24123,7 +24123,7 @@ var Accordion$1 = function (_a) {
|
|
|
24123
24123
|
accordionStates.map(function (section, i) { return (React.createElement(AccordionSection, __assign({}, section, { key: i, onToggle: updateAccordionState, isFilter: isFilter, withReadMore: withReadMore }))); })));
|
|
24124
24124
|
};
|
|
24125
24125
|
|
|
24126
|
-
const Container$
|
|
24126
|
+
const Container$1b = styled.div`
|
|
24127
24127
|
display: block;
|
|
24128
24128
|
background-color: ${(props) => props.theme.theme_vars.colours.grey_light};
|
|
24129
24129
|
padding: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
@@ -24177,7 +24177,7 @@ var _a, _b;
|
|
|
24177
24177
|
var PostcodeSearchApiUrl = (_a = process.env.NEXT_PUBLIC_POSTCODE_SEARCH_API_URL) !== null && _a !== void 0 ? _a : '';
|
|
24178
24178
|
var BinFinderApiUrl = (_b = process.env.NEXT_PUBLIC_BIN_FINDER_API_URL) !== null && _b !== void 0 ? _b : '';
|
|
24179
24179
|
|
|
24180
|
-
const Container$
|
|
24180
|
+
const Container$1a = styled.div`
|
|
24181
24181
|
display: flex;
|
|
24182
24182
|
-webkit-flex-direction: row;
|
|
24183
24183
|
-moz-flex-direction: row;
|
|
@@ -24214,7 +24214,7 @@ const ErrorSummary$1 = styled.div`
|
|
|
24214
24214
|
*/
|
|
24215
24215
|
var FormWithLine = function (_a) {
|
|
24216
24216
|
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;
|
|
24217
|
-
return (React.createElement(Container$
|
|
24217
|
+
return (React.createElement(Container$1a, null,
|
|
24218
24218
|
React.createElement(Line$1, { "$lineColour": lineColour, "$hideLine": hideLine, "$isError": isError }),
|
|
24219
24219
|
React.createElement(Form, { onSubmit: onSubmit, "$hideLine": hideLine, role: formRole, method: formMethod, url: formURL, "data-testid": "FormWithLine" },
|
|
24220
24220
|
errorSummary && React.createElement(ErrorSummary$1, null, errorSummary),
|
|
@@ -24264,7 +24264,7 @@ var Input = function (_a) {
|
|
|
24264
24264
|
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, min: minValue })) : (React.createElement(StyledInput, { onChange: onChange, type: type, placeholder: placeholder, name: name, "$isErrored": isErrored, maxLength: maxLength, defaultValue: defaultValue, id: id, autoComplete: autocomplete, "$isFullWidth": isFullWidth, min: minValue }))));
|
|
24265
24265
|
};
|
|
24266
24266
|
|
|
24267
|
-
const Container$
|
|
24267
|
+
const Container$19 = styled.div`
|
|
24268
24268
|
display: block;
|
|
24269
24269
|
`;
|
|
24270
24270
|
|
|
@@ -24458,7 +24458,7 @@ var BinCollection = function (_a) {
|
|
|
24458
24458
|
acc[collectionDay].push(binCollection);
|
|
24459
24459
|
return acc;
|
|
24460
24460
|
}, {});
|
|
24461
|
-
return (React.createElement(Container$
|
|
24461
|
+
return (React.createElement(Container$19, { "data-testid": "BinCollection" },
|
|
24462
24462
|
React.createElement(Heading$1, { text: "Bin collections for:", level: 3 }),
|
|
24463
24463
|
React.createElement("p", null, address),
|
|
24464
24464
|
Object.keys(binCollectionsGrouped).map(function (day) {
|
|
@@ -24643,7 +24643,7 @@ var BinFinder = function (_a) {
|
|
|
24643
24643
|
return [2 /*return*/];
|
|
24644
24644
|
});
|
|
24645
24645
|
}); };
|
|
24646
|
-
return (React.createElement(Container$
|
|
24646
|
+
return (React.createElement(Container$1b, { "data-testid": "BinFinder" },
|
|
24647
24647
|
title && (React.createElement(TitleContainer, null,
|
|
24648
24648
|
React.createElement(Heading$1, { level: 2, text: title }))),
|
|
24649
24649
|
uprn === '' ? (React.createElement(React.Fragment, null,
|
|
@@ -24740,7 +24740,468 @@ var BlockQuote = function (_a) {
|
|
|
24740
24740
|
citation && React.createElement(Citation, null, citation)));
|
|
24741
24741
|
};
|
|
24742
24742
|
|
|
24743
|
-
const Container$
|
|
24743
|
+
const Container$18 = styled.div`
|
|
24744
|
+
display: block;
|
|
24745
|
+
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.large};
|
|
24746
|
+
`;
|
|
24747
|
+
|
|
24748
|
+
const Totalizer = styled.div`
|
|
24749
|
+
position: relative;
|
|
24750
|
+
display: flex;
|
|
24751
|
+
flex-direction: row;
|
|
24752
|
+
justify-content: start;
|
|
24753
|
+
width: 100%;
|
|
24754
|
+
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
24755
|
+
`;
|
|
24756
|
+
|
|
24757
|
+
const TotalContainer = styled.div`
|
|
24758
|
+
width: 100%;
|
|
24759
|
+
display: flex;
|
|
24760
|
+
flex-direction: row;
|
|
24761
|
+
justify-content: space-between;
|
|
24762
|
+
align-items: center;
|
|
24763
|
+
flex-wrap: wrap;
|
|
24764
|
+
|
|
24765
|
+
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) {
|
|
24766
|
+
flex-wrap: nowrap;
|
|
24767
|
+
}
|
|
24768
|
+
`;
|
|
24769
|
+
|
|
24770
|
+
const TotalAmount = styled.span`
|
|
24771
|
+
font-weight: bold;
|
|
24772
|
+
font-size: ${(props) => props.theme.theme_vars.fontSizes.large};
|
|
24773
|
+
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.extra_small} !important;
|
|
24774
|
+
display: block;
|
|
24775
|
+
color: ${(props) =>
|
|
24776
|
+
props.$current > props.$target ? props.theme.theme_vars.colours.negative : props.theme.theme_vars.colours.positive};
|
|
24777
|
+
`;
|
|
24778
|
+
|
|
24779
|
+
const TargetAmount = styled.span`
|
|
24780
|
+
font-weight: normal;
|
|
24781
|
+
font-size: ${(props) => props.theme.theme_vars.fontSizes.medium};
|
|
24782
|
+
display: block;
|
|
24783
|
+
`;
|
|
24784
|
+
|
|
24785
|
+
const calculateTotal = (props) => {
|
|
24786
|
+
if (props.$current <= props.$target) {
|
|
24787
|
+
return css`
|
|
24788
|
+
background-color: ${(props) => props.theme.theme_vars.colours.positive};
|
|
24789
|
+
width: 100%;
|
|
24790
|
+
`;
|
|
24791
|
+
}
|
|
24792
|
+
const width = props.$current > 0 ? Math.floor((props.$target / props.$current) * 100) : 0;
|
|
24793
|
+
return css`
|
|
24794
|
+
background-color: ${(props) => props.theme.theme_vars.colours.action};
|
|
24795
|
+
width: ${width + '%'};
|
|
24796
|
+
border-right: 1px solid black;
|
|
24797
|
+
`;
|
|
24798
|
+
};
|
|
24799
|
+
|
|
24800
|
+
const Target = styled.div`
|
|
24801
|
+
height: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
24802
|
+
${calculateTotal}
|
|
24803
|
+
`;
|
|
24804
|
+
|
|
24805
|
+
const calculateOver = (props) => {
|
|
24806
|
+
if (props.$current < props.$target) {
|
|
24807
|
+
return css`
|
|
24808
|
+
display: none;
|
|
24809
|
+
`;
|
|
24810
|
+
}
|
|
24811
|
+
const width = props.$current > 0 ? Math.ceil(((props.$current - props.$target) / props.$current) * 100) : 0;
|
|
24812
|
+
return css`
|
|
24813
|
+
width: ${width + '%'};
|
|
24814
|
+
`;
|
|
24815
|
+
};
|
|
24816
|
+
const OverBudget = styled.div`
|
|
24817
|
+
height: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
24818
|
+
background-color: ${(props) => props.theme.theme_vars.colours.negative};
|
|
24819
|
+
${calculateOver}
|
|
24820
|
+
`;
|
|
24821
|
+
|
|
24822
|
+
const ButtonContainer$5 = styled.div`
|
|
24823
|
+
display: flex;
|
|
24824
|
+
flex-direction: column;
|
|
24825
|
+
justify-content: center;
|
|
24826
|
+
align-items: center;
|
|
24827
|
+
`;
|
|
24828
|
+
|
|
24829
|
+
const SubmitResults = styled.button`
|
|
24830
|
+
background-color: ${(props) => props.theme.theme_vars.colours.action};
|
|
24831
|
+
padding: ${(props) => `${props.theme.theme_vars.spacingSizes.medium}`};
|
|
24832
|
+
color: ${(props) => props.theme.theme_vars.colours.white};
|
|
24833
|
+
cursor: pointer;
|
|
24834
|
+
font-weight: bold;
|
|
24835
|
+
font-size: ${(props) => props.theme.theme_vars.fontSizes.small};
|
|
24836
|
+
min-width: 45px;
|
|
24837
|
+
outline: none;
|
|
24838
|
+
border: none;
|
|
24839
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
24840
|
+
`;
|
|
24841
|
+
|
|
24842
|
+
const ServiceSummary = styled.div`
|
|
24843
|
+
display: block;
|
|
24844
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
24845
|
+
box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.08);
|
|
24846
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius_large};
|
|
24847
|
+
`;
|
|
24848
|
+
|
|
24849
|
+
const ServiceResult = styled.div`
|
|
24850
|
+
display: flex;
|
|
24851
|
+
flex-direction: row;
|
|
24852
|
+
justify-content: flex-start;
|
|
24853
|
+
align-items: center;
|
|
24854
|
+
`;
|
|
24855
|
+
|
|
24856
|
+
const ServiceValue = styled.div`
|
|
24857
|
+
color: ${(props) => props.theme.theme_vars.colours.action};
|
|
24858
|
+
font-size: ${(props) => props.theme.theme_vars.fontSizes.medium};
|
|
24859
|
+
font-weight: bold;
|
|
24860
|
+
padding-right: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
24861
|
+
`;
|
|
24862
|
+
|
|
24863
|
+
const ServiceChange = styled.div`
|
|
24864
|
+
color: ${(props) =>
|
|
24865
|
+
props.$change === 'positive' ? props.theme.theme_vars.colours.positive : props.theme.theme_vars.colours.negative};
|
|
24866
|
+
font-weight: bold;
|
|
24867
|
+
font-size: ${(props) => props.theme.theme_vars.fontSizes.small};
|
|
24868
|
+
`;
|
|
24869
|
+
|
|
24870
|
+
const Retry = styled.button`
|
|
24871
|
+
outline: none;
|
|
24872
|
+
border: none;
|
|
24873
|
+
cursor: pointer;
|
|
24874
|
+
font-size: ${(props) => props.theme.theme_vars.fontSizes.small};
|
|
24875
|
+
margin-top: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
24876
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
24877
|
+
background: none;
|
|
24878
|
+
|
|
24879
|
+
${(props) => props.theme.linkStyles}
|
|
24880
|
+
|
|
24881
|
+
&:hover {
|
|
24882
|
+
${(props) => props.theme.linkStylesHover}
|
|
24883
|
+
}
|
|
24884
|
+
&:focus {
|
|
24885
|
+
${(props) => props.theme.linkStylesFocus}
|
|
24886
|
+
}
|
|
24887
|
+
&:active {
|
|
24888
|
+
${(props) => props.theme.linkStylesActive};
|
|
24889
|
+
}
|
|
24890
|
+
`;
|
|
24891
|
+
|
|
24892
|
+
const Container$17 = styled.div`
|
|
24893
|
+
display: block;
|
|
24894
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
24895
|
+
box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.08);
|
|
24896
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius_large};
|
|
24897
|
+
`;
|
|
24898
|
+
|
|
24899
|
+
const RangeLabel = styled.label`
|
|
24900
|
+
${VisuallyHidden$3};
|
|
24901
|
+
`;
|
|
24902
|
+
|
|
24903
|
+
const RangeInput = styled.input`
|
|
24904
|
+
appearance: none;
|
|
24905
|
+
background: transparent;
|
|
24906
|
+
width: 100%;
|
|
24907
|
+
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
24908
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
24909
|
+
|
|
24910
|
+
&:focus {
|
|
24911
|
+
outline: none;
|
|
24912
|
+
}
|
|
24913
|
+
|
|
24914
|
+
&::-webkit-slider-runnable-track {
|
|
24915
|
+
background-color: ${(props) => props.theme.theme_vars.colours.grey};
|
|
24916
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
24917
|
+
height: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
24918
|
+
}
|
|
24919
|
+
|
|
24920
|
+
&::-webkit-slider-thumb {
|
|
24921
|
+
appearance: none;
|
|
24922
|
+
width: 0px;
|
|
24923
|
+
height: 0px;
|
|
24924
|
+
border-style: solid;
|
|
24925
|
+
border-width: 0 15px 30px 15px;
|
|
24926
|
+
border-color: transparent transparent ${(props) => props.theme.theme_vars.colours.action} transparent;
|
|
24927
|
+
transform: rotate(0deg);
|
|
24928
|
+
margin-top: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
24929
|
+
}
|
|
24930
|
+
|
|
24931
|
+
&:focus::-webkit-slider-thumb {
|
|
24932
|
+
outline: none;
|
|
24933
|
+
}
|
|
24934
|
+
|
|
24935
|
+
&::-moz-range-track {
|
|
24936
|
+
background-color: ${(props) => props.theme.theme_vars.colours.grey};
|
|
24937
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
24938
|
+
height: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
24939
|
+
}
|
|
24940
|
+
|
|
24941
|
+
&::-moz-range-thumb {
|
|
24942
|
+
appearance: none;
|
|
24943
|
+
width: 0px;
|
|
24944
|
+
height: 0px;
|
|
24945
|
+
border-style: solid;
|
|
24946
|
+
border-width: ${(props) => `0 15px 30px 15px`};
|
|
24947
|
+
border-color: transparent transparent ${(props) => props.theme.theme_vars.colours.action} transparent;
|
|
24948
|
+
transform: rotate(0deg);
|
|
24949
|
+
margin-top: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
24950
|
+
}
|
|
24951
|
+
|
|
24952
|
+
&:focus::-moz-range-thumb {
|
|
24953
|
+
outline: none;
|
|
24954
|
+
}
|
|
24955
|
+
`;
|
|
24956
|
+
|
|
24957
|
+
const MinMaxContainer = styled.div`
|
|
24958
|
+
display: flex;
|
|
24959
|
+
justify-content: space-between;
|
|
24960
|
+
`;
|
|
24961
|
+
|
|
24962
|
+
const MinMax = styled.div`
|
|
24963
|
+
font-weight: bold;
|
|
24964
|
+
font-size: ${(props) => props.theme.theme_vars.fontSizes.small};
|
|
24965
|
+
padding: ${(props) => `0 ${props.theme.theme_vars.spacingSizes.small}`};
|
|
24966
|
+
`;
|
|
24967
|
+
|
|
24968
|
+
const CurrentValue = styled.div`
|
|
24969
|
+
font-weight: bold;
|
|
24970
|
+
font-size: ${(props) => props.theme.theme_vars.fontSizes.medium};
|
|
24971
|
+
color: ${(props) => props.theme.theme_vars.colours.action_dark};
|
|
24972
|
+
width: 100%;
|
|
24973
|
+
text-align: center;
|
|
24974
|
+
`;
|
|
24975
|
+
|
|
24976
|
+
const ButtonContainer$4 = styled.div`
|
|
24977
|
+
width: 100%;
|
|
24978
|
+
display: flex;
|
|
24979
|
+
justify-content: end;
|
|
24980
|
+
`;
|
|
24981
|
+
|
|
24982
|
+
const RangeButton = styled.button`
|
|
24983
|
+
background-color: ${(props) => props.theme.theme_vars.colours.action};
|
|
24984
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
24985
|
+
color: ${(props) => props.theme.theme_vars.colours.white};
|
|
24986
|
+
cursor: pointer;
|
|
24987
|
+
font-weight: bold;
|
|
24988
|
+
font-size: ${(props) => props.theme.theme_vars.fontSizes.medium};
|
|
24989
|
+
min-width: 45px;
|
|
24990
|
+
outline: none;
|
|
24991
|
+
border: none;
|
|
24992
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
24993
|
+
display: flex;
|
|
24994
|
+
justify-content: center;
|
|
24995
|
+
align-items: center;
|
|
24996
|
+
|
|
24997
|
+
svg {
|
|
24998
|
+
width: ${(props) => props.theme.theme_vars.spacingSizes.large};
|
|
24999
|
+
height: ${(props) => props.theme.theme_vars.spacingSizes.large};
|
|
25000
|
+
color: ${(props) => props.theme.theme_vars.colours.white};
|
|
25001
|
+
}
|
|
25002
|
+
|
|
25003
|
+
&:disabled {
|
|
25004
|
+
background-color: ${(props) => props.theme.theme_vars.colours.grey_dark} !important;
|
|
25005
|
+
color: ${(props) => props.theme.theme_vars.colours.white} !important;
|
|
25006
|
+
outline: none !important;
|
|
25007
|
+
cursor: not-allowed;
|
|
25008
|
+
}
|
|
25009
|
+
|
|
25010
|
+
&:hover {
|
|
25011
|
+
background-color: ${(props) => props.theme.theme_vars.colours.action_dark};
|
|
25012
|
+
}
|
|
25013
|
+
|
|
25014
|
+
&:focus {
|
|
25015
|
+
${(props) => props.theme.linkStylesFocus};
|
|
25016
|
+
svg {
|
|
25017
|
+
color: ${(props) => props.theme.theme_vars.colours.black} !important;
|
|
25018
|
+
}
|
|
25019
|
+
}
|
|
25020
|
+
|
|
25021
|
+
&:active {
|
|
25022
|
+
${(props) => props.theme.linkStylesActive};
|
|
25023
|
+
svg {
|
|
25024
|
+
color: ${(props) => props.theme.theme_vars.colours.black} !important;
|
|
25025
|
+
}
|
|
25026
|
+
}
|
|
25027
|
+
`;
|
|
25028
|
+
|
|
25029
|
+
const impactContainerHighlight = (props) => {
|
|
25030
|
+
switch (props.$title) {
|
|
25031
|
+
case 'low':
|
|
25032
|
+
return css`
|
|
25033
|
+
border-left: 5px solid ${(props) => props.theme.theme_vars.colours.negative};
|
|
25034
|
+
`;
|
|
25035
|
+
case 'medium':
|
|
25036
|
+
return css`
|
|
25037
|
+
border-left: 5px solid ${(props) => props.theme.theme_vars.colours.focus};
|
|
25038
|
+
`;
|
|
25039
|
+
default:
|
|
25040
|
+
return css`
|
|
25041
|
+
border-left: 5px solid ${(props) => props.theme.theme_vars.colours.positive};
|
|
25042
|
+
`;
|
|
25043
|
+
}
|
|
25044
|
+
};
|
|
25045
|
+
|
|
25046
|
+
const ImpactContainer = styled.div`
|
|
25047
|
+
width: 100%;
|
|
25048
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
25049
|
+
background-color: ${(props) => props.theme.theme_vars.colours.grey_light};
|
|
25050
|
+
${impactContainerHighlight};
|
|
25051
|
+
`;
|
|
25052
|
+
|
|
25053
|
+
const ImpactTitle = styled.p`
|
|
25054
|
+
font-weight: bold;
|
|
25055
|
+
font-size: ${(props) => props.theme.theme_vars.fontSizes.small};
|
|
25056
|
+
margin-bottom: 0 !important;
|
|
25057
|
+
text-transform: capitalize;
|
|
25058
|
+
`;
|
|
25059
|
+
|
|
25060
|
+
const ImpactSummary = styled.p`
|
|
25061
|
+
font-size: ${(props) => props.theme.theme_vars.fontSizes.small};
|
|
25062
|
+
margin-bottom: 0 !important;
|
|
25063
|
+
`;
|
|
25064
|
+
|
|
25065
|
+
var BudgetSlider = function (_a) {
|
|
25066
|
+
var title = _a.title, _b = _a.summary, summary = _b === void 0 ? '' : _b, icon = _a.icon, minimum = _a.minimum, maximum = _a.maximum, initialValue = _a.initialValue, impacts = _a.impacts, onChange = _a.onChange, _c = _a.index, index = _c === void 0 ? 0 : _c;
|
|
25067
|
+
var _d = useState(initialValue), value = _d[0], setValue = _d[1];
|
|
25068
|
+
var handleDecrement = function () {
|
|
25069
|
+
if (value > minimum) {
|
|
25070
|
+
var updatedValue = value - 1;
|
|
25071
|
+
setValue(updatedValue);
|
|
25072
|
+
if (onChange) {
|
|
25073
|
+
onChange(updatedValue, index);
|
|
25074
|
+
}
|
|
25075
|
+
}
|
|
25076
|
+
};
|
|
25077
|
+
var handleIncrement = function () {
|
|
25078
|
+
if (value < maximum) {
|
|
25079
|
+
var updatedValue = value + 1;
|
|
25080
|
+
setValue(updatedValue);
|
|
25081
|
+
if (onChange) {
|
|
25082
|
+
onChange(updatedValue, index);
|
|
25083
|
+
}
|
|
25084
|
+
}
|
|
25085
|
+
};
|
|
25086
|
+
/**
|
|
25087
|
+
* Transform a title into a string suitable for a html id
|
|
25088
|
+
*/
|
|
25089
|
+
var createId = function (text) {
|
|
25090
|
+
return text
|
|
25091
|
+
.toLowerCase()
|
|
25092
|
+
.replace(/[^a-z0-9 -]/g, '')
|
|
25093
|
+
.replace(/\s+/g, '-') // replace spaces with hyphens
|
|
25094
|
+
.replace(/-+/g, '-');
|
|
25095
|
+
};
|
|
25096
|
+
return (React.createElement(Container$17, { "data-testid": "BudgetSlider" },
|
|
25097
|
+
icon ? (React.createElement(HeadingWithIcon, { text: title, icon: icon, level: 3, subHeading: summary })) : (React.createElement(React.Fragment, null,
|
|
25098
|
+
React.createElement(Heading$1, { text: title, level: 3 }),
|
|
25099
|
+
React.createElement("p", null, summary))),
|
|
25100
|
+
React.createElement(Row$1, null,
|
|
25101
|
+
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
25102
|
+
React.createElement(MinMaxContainer, null,
|
|
25103
|
+
React.createElement(MinMax, null,
|
|
25104
|
+
minimum,
|
|
25105
|
+
"%"),
|
|
25106
|
+
React.createElement(MinMax, null,
|
|
25107
|
+
maximum,
|
|
25108
|
+
"%")),
|
|
25109
|
+
React.createElement(RangeLabel, { htmlFor: createId(title) }, "Range slider for ".concat(title)),
|
|
25110
|
+
React.createElement(RangeInput, { type: "range", min: minimum, max: maximum, value: value, id: createId(title), readOnly: true, tabIndex: "-1", "aria-valuetext": "".concat(title, " value is ").concat(value, " percent"), "aria-live": "polite", "aria-valuemin": minimum, "aria-valuemax": maximum })),
|
|
25111
|
+
React.createElement(Column, { small: "one-third", medium: "one-third", large: "one-third" },
|
|
25112
|
+
React.createElement(RangeButton, { onClick: handleDecrement, type: "button", "aria-label": "Lower the ".concat(title, " value"), disabled: value === minimum },
|
|
25113
|
+
React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 3, stroke: "currentColor" },
|
|
25114
|
+
React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 12h14" })))),
|
|
25115
|
+
React.createElement(Column, { small: "one-third", medium: "one-third", large: "one-third" },
|
|
25116
|
+
React.createElement(CurrentValue, null,
|
|
25117
|
+
value,
|
|
25118
|
+
"%")),
|
|
25119
|
+
React.createElement(Column, { small: "one-third", medium: "one-third", large: "one-third" },
|
|
25120
|
+
React.createElement(ButtonContainer$4, null,
|
|
25121
|
+
React.createElement(RangeButton, { onClick: handleIncrement, type: "button", "aria-label": "Increase the ".concat(title, " value"), disabled: value === maximum },
|
|
25122
|
+
React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 3, stroke: "currentColor" },
|
|
25123
|
+
React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }))))),
|
|
25124
|
+
impacts && (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
25125
|
+
React.createElement(React.Fragment, null, impacts.map(function (impact, index) { return (React.createElement(React.Fragment, { key: index }, value >= impact.minimum && value <= impact.maximum && (React.createElement(ImpactContainer, { "$title": impact.title },
|
|
25126
|
+
React.createElement(ImpactTitle, null, impact.title),
|
|
25127
|
+
React.createElement(ImpactSummary, null, impact.summary))))); })))))));
|
|
25128
|
+
};
|
|
25129
|
+
|
|
25130
|
+
/**
|
|
25131
|
+
* A budget game with sliders to set your own budget
|
|
25132
|
+
*/
|
|
25133
|
+
var BudgetGame = function (_a) {
|
|
25134
|
+
var _b = _a.budgetServices, budgetServices = _b === void 0 ? [] : _b, totalAllowed = _a.totalAllowed, onSubmitResults = _a.onSubmitResults, onTryAgain = _a.onTryAgain;
|
|
25135
|
+
var _c = useState(false), viewResults = _c[0], setViewResults = _c[1];
|
|
25136
|
+
var _d = useState(budgetServices.map(function (budgetService) { var _a; return (_a = budgetService.initialValue) !== null && _a !== void 0 ? _a : 0; })), budgetValues = _d[0], setBudgetValues = _d[1];
|
|
25137
|
+
var _e = useState(0), totalBudget = _e[0], setTotalBudget = _e[1];
|
|
25138
|
+
var calculateTotal = function () {
|
|
25139
|
+
return budgetValues.reduce(function (accumulator, currentValue) { return accumulator + currentValue; }, 0);
|
|
25140
|
+
};
|
|
25141
|
+
var handleValueChange = function (value, index) {
|
|
25142
|
+
var valuesToUpdate = budgetValues.map(function (budgetValue, valueIndex) {
|
|
25143
|
+
if (valueIndex === index) {
|
|
25144
|
+
return value;
|
|
25145
|
+
}
|
|
25146
|
+
else {
|
|
25147
|
+
return budgetValue;
|
|
25148
|
+
}
|
|
25149
|
+
});
|
|
25150
|
+
setBudgetValues(valuesToUpdate);
|
|
25151
|
+
};
|
|
25152
|
+
// Set the total each time the budgetValues changes
|
|
25153
|
+
useEffect(function () {
|
|
25154
|
+
var updatedTotal = calculateTotal();
|
|
25155
|
+
setTotalBudget(updatedTotal);
|
|
25156
|
+
}, [budgetValues]);
|
|
25157
|
+
var handleSubmitResults = function () {
|
|
25158
|
+
setViewResults(true);
|
|
25159
|
+
if (onSubmitResults) {
|
|
25160
|
+
onSubmitResults();
|
|
25161
|
+
}
|
|
25162
|
+
};
|
|
25163
|
+
var handleTryAgain = function () {
|
|
25164
|
+
setViewResults(false);
|
|
25165
|
+
if (onTryAgain) {
|
|
25166
|
+
onTryAgain();
|
|
25167
|
+
}
|
|
25168
|
+
};
|
|
25169
|
+
return (React.createElement(Container$18, { "data-testid": "BudgetGame" },
|
|
25170
|
+
React.createElement(Row$1, null,
|
|
25171
|
+
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
25172
|
+
React.createElement(TotalContainer, null,
|
|
25173
|
+
React.createElement(TargetAmount, null,
|
|
25174
|
+
"Target: ",
|
|
25175
|
+
totalAllowed,
|
|
25176
|
+
"%"),
|
|
25177
|
+
React.createElement(TotalAmount, { "$current": totalBudget, "$target": totalAllowed, "aria-live": "polite", "data-testid": "BudgetTotal" },
|
|
25178
|
+
"Total: ",
|
|
25179
|
+
totalBudget,
|
|
25180
|
+
"%"))),
|
|
25181
|
+
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
25182
|
+
React.createElement(Totalizer, { "$current": totalBudget, "$target": totalAllowed },
|
|
25183
|
+
React.createElement(Target, { "$current": totalBudget, "$target": totalAllowed }),
|
|
25184
|
+
React.createElement(OverBudget, { "$current": totalBudget, "$target": totalAllowed }))),
|
|
25185
|
+
totalBudget <= totalAllowed && (React.createElement(Column, { small: "full", medium: "full", large: "full" }, !viewResults ? (React.createElement(ButtonContainer$5, null,
|
|
25186
|
+
React.createElement(SubmitResults, { type: "button", onClick: handleSubmitResults }, "See your results"))) : (React.createElement(Row$1, null,
|
|
25187
|
+
budgetServices.map(function (budgetService, index) { return (React.createElement(Column, { key: index, small: "full", medium: "one-half", large: "one-half" },
|
|
25188
|
+
React.createElement(ServiceSummary, null,
|
|
25189
|
+
budgetService.icon ? (React.createElement(HeadingWithIcon, { text: budgetService.title, icon: budgetService.icon, level: 3 })) : (React.createElement(Heading$1, { level: 3, text: budgetService.title })),
|
|
25190
|
+
React.createElement(ServiceResult, null,
|
|
25191
|
+
React.createElement(ServiceValue, null,
|
|
25192
|
+
budgetValues[index],
|
|
25193
|
+
"%"),
|
|
25194
|
+
React.createElement(ServiceChange, { "$change": budgetValues[index] - budgetService.initialValue < 0 ? 'negative' : 'positive' },
|
|
25195
|
+
budgetValues[index] - budgetService.initialValue,
|
|
25196
|
+
"% change"))))); }),
|
|
25197
|
+
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
25198
|
+
React.createElement(ButtonContainer$5, null,
|
|
25199
|
+
React.createElement(Retry, { type: "button", onClick: handleTryAgain }, "Try again"))))))),
|
|
25200
|
+
!viewResults && (React.createElement(React.Fragment, null, budgetServices.map(function (budgetService, index) { return (React.createElement(Column, { small: "full", medium: "one-half", large: "one-half", key: index },
|
|
25201
|
+
React.createElement(BudgetSlider, __assign({}, budgetService, { onChange: handleValueChange, index: index })))); }))))));
|
|
25202
|
+
};
|
|
25203
|
+
|
|
25204
|
+
const Container$16 = styled.div`
|
|
24744
25205
|
margin-bottom: 30px;
|
|
24745
25206
|
display: block;
|
|
24746
25207
|
|
|
@@ -24755,11 +25216,11 @@ const Container$14 = styled.div`
|
|
|
24755
25216
|
*/
|
|
24756
25217
|
var CallToAction = function (_a) {
|
|
24757
25218
|
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"]);
|
|
24758
|
-
return (React.createElement(Container$
|
|
24759
|
-
React.createElement(Button$
|
|
25219
|
+
return (React.createElement(Container$16, null,
|
|
25220
|
+
React.createElement(Button$5, { primary: primary, size: "large", text: text, url: url, isExternal: isExternal, isDisabled: isDisabled })));
|
|
24760
25221
|
};
|
|
24761
25222
|
|
|
24762
|
-
const Container$
|
|
25223
|
+
const Container$15 = styled.div`
|
|
24763
25224
|
display: block;
|
|
24764
25225
|
${(props) => props.theme.fontStyles}
|
|
24765
25226
|
`;
|
|
@@ -24935,7 +25396,7 @@ var CouncilTaxAlphabeticalDirectory = function (_a) {
|
|
|
24935
25396
|
});
|
|
24936
25397
|
return letterData;
|
|
24937
25398
|
});
|
|
24938
|
-
return (React.createElement(Container$
|
|
25399
|
+
return (React.createElement(Container$15, { "data-testid": "AlphabeticalDirectory", ref: directoryRef },
|
|
24939
25400
|
React.createElement(React.Fragment, null,
|
|
24940
25401
|
parishes.length === 0 && (React.createElement(ErrorText$1, null, "There was an issue fetching the parish data. Please try again later.")),
|
|
24941
25402
|
parish === null ? (React.createElement(React.Fragment, null, sortedData.map(function (letter, i) { return (React.createElement(Row, { key: i },
|
|
@@ -24961,9 +25422,9 @@ var CouncilTaxAlphabeticalDirectory = function (_a) {
|
|
|
24961
25422
|
React.createElement("td", null, Number(parish.values[band]).toLocaleString('en-GB', { style: 'currency', currency: 'GBP' })))); })))))))));
|
|
24962
25423
|
};
|
|
24963
25424
|
|
|
24964
|
-
const Container$
|
|
25425
|
+
const Container$14 = styled.div``;
|
|
24965
25426
|
|
|
24966
|
-
const Container$
|
|
25427
|
+
const Container$13 = styled.div`
|
|
24967
25428
|
display: flex;
|
|
24968
25429
|
flex-direction: column;
|
|
24969
25430
|
justify-content: flex-start;
|
|
@@ -25039,7 +25500,7 @@ const FooterLink$1 = styled.a`
|
|
|
25039
25500
|
var Card = function (_a) {
|
|
25040
25501
|
var header = _a.header, content = _a.content, footerLink = _a.footerLink, imageLarge = _a.imageLarge, imageSmall = _a.imageSmall, imageAltText = _a.imageAltText;
|
|
25041
25502
|
var showContent = content || header;
|
|
25042
|
-
return (React.createElement(Container$
|
|
25503
|
+
return (React.createElement(Container$13, { "data-testid": "Card" },
|
|
25043
25504
|
imageLarge && imageSmall && (React.createElement(React.Fragment, null, footerLink ? (React.createElement(ImageLink$1, { href: footerLink.url },
|
|
25044
25505
|
React.createElement(Image$2, { src: imageLarge, alt: imageAltText, srcSet: "".concat(imageSmall, " 400w, ").concat(imageLarge, " 800w"), sizes: "(max-width: 550px) 400px, 800px", loading: "lazy" }))) : (React.createElement(Image$2, { src: imageLarge, alt: imageAltText, srcSet: "".concat(imageSmall, " 400w, ").concat(imageLarge, " 800w"), sizes: "(max-width: 550px) 400px, 800px", loading: "lazy" })))),
|
|
25045
25506
|
showContent && (React.createElement(Content$7, null,
|
|
@@ -25055,24 +25516,24 @@ var Card = function (_a) {
|
|
|
25055
25516
|
*/
|
|
25056
25517
|
var Cards = function (_a) {
|
|
25057
25518
|
var cards = _a.cards;
|
|
25058
|
-
return (React.createElement(Container$
|
|
25519
|
+
return (React.createElement(Container$14, { "data-testid": "Cards" },
|
|
25059
25520
|
React.createElement(Row$1, null, cards.map(function (card, index) { return (React.createElement(Column, { small: "full", medium: "one-half", large: "one-third", key: index },
|
|
25060
25521
|
React.createElement(Card, __assign({}, card)))); }))));
|
|
25061
25522
|
};
|
|
25062
25523
|
|
|
25063
|
-
const Container$
|
|
25524
|
+
const Container$12 = styled.div`
|
|
25064
25525
|
margin: 25px 0;
|
|
25065
25526
|
`;
|
|
25066
25527
|
|
|
25067
25528
|
var DownloadableFiles = function (_a) {
|
|
25068
25529
|
var files = _a.files;
|
|
25069
|
-
return (React.createElement(Container$
|
|
25530
|
+
return (React.createElement(Container$12, { "data-testid": "DownloadableFiles" }, files.length > 0 ?
|
|
25070
25531
|
files.map(function (file) { return React.createElement(FileDownload, __assign({ key: file.title }, file)); })
|
|
25071
25532
|
:
|
|
25072
25533
|
React.createElement("i", null, "No file to show")));
|
|
25073
25534
|
};
|
|
25074
25535
|
|
|
25075
|
-
const Container
|
|
25536
|
+
const Container$11 = styled.div`
|
|
25076
25537
|
display: block;
|
|
25077
25538
|
|
|
25078
25539
|
input {
|
|
@@ -25176,7 +25637,7 @@ var AccessibleLinks = function (_a) {
|
|
|
25176
25637
|
})));
|
|
25177
25638
|
};
|
|
25178
25639
|
|
|
25179
|
-
const Container$
|
|
25640
|
+
const Container$10 = styled.div`
|
|
25180
25641
|
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
25181
25642
|
background: ${(props) =>
|
|
25182
25643
|
props.$alertType === 'alert'
|
|
@@ -25307,7 +25768,7 @@ const handleContainerPadding = (noBackground, noPadding) => {
|
|
|
25307
25768
|
}
|
|
25308
25769
|
};
|
|
25309
25770
|
|
|
25310
|
-
const Container
|
|
25771
|
+
const Container$$ = styled.div`
|
|
25311
25772
|
background: ${(props) =>
|
|
25312
25773
|
props.$noBackground
|
|
25313
25774
|
? 'transparent'
|
|
@@ -25349,7 +25810,7 @@ const MaxWidth = styled.div`
|
|
|
25349
25810
|
*/
|
|
25350
25811
|
var MaxWidthContainer = function (_a) {
|
|
25351
25812
|
var children = _a.children, classes = _a.classes, _b = _a.noBackground, noBackground = _b === void 0 ? false : _b, _c = _a.noPadding, noPadding = _c === void 0 ? false : _c, _d = _a.overflowVisible, overflowVisible = _d === void 0 ? false : _d, props = __rest(_a, ["children", "classes", "noBackground", "noPadding", "overflowVisible"]);
|
|
25352
|
-
return (React.createElement(Container
|
|
25813
|
+
return (React.createElement(Container$$, { "$noBackground": noBackground, "$noPadding": noPadding, "$overflowVisible": overflowVisible },
|
|
25353
25814
|
React.createElement(MaxWidth, __assign({ className: classes, "$overflowVisible": overflowVisible }, props), children)));
|
|
25354
25815
|
};
|
|
25355
25816
|
|
|
@@ -25420,7 +25881,7 @@ var AlertBanner = function (_a) {
|
|
|
25420
25881
|
setShowAlert(false);
|
|
25421
25882
|
};
|
|
25422
25883
|
return (showAlert &&
|
|
25423
|
-
notServer && (React.createElement(Container$
|
|
25884
|
+
notServer && (React.createElement(Container$10, { "$alertType": alertType, "data-testid": "AlertBanner" },
|
|
25424
25885
|
React.createElement(MaxWidthContainer, { noBackground: true },
|
|
25425
25886
|
React.createElement(InnerContainer$2, null,
|
|
25426
25887
|
React.createElement(BannerContentContainer, null,
|
|
@@ -25434,7 +25895,7 @@ var AlertBanner = function (_a) {
|
|
|
25434
25895
|
"Dismiss"))))));
|
|
25435
25896
|
};
|
|
25436
25897
|
|
|
25437
|
-
const Container$
|
|
25898
|
+
const Container$_ = styled.div`
|
|
25438
25899
|
border: solid 4px;
|
|
25439
25900
|
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
25440
25901
|
border-color: ${(props) =>
|
|
@@ -25488,13 +25949,13 @@ const InnerContainer$1 = styled.div`
|
|
|
25488
25949
|
*/
|
|
25489
25950
|
var AlertBannerService = function (_a) {
|
|
25490
25951
|
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;
|
|
25491
|
-
return (React.createElement(Container$
|
|
25952
|
+
return (React.createElement(Container$_, { "$alertType": alertType, "data-testid": "AlertBannerService", "$hasTopSpacing": hasTopSpacing },
|
|
25492
25953
|
React.createElement(InnerContainer$1, { "data-testid": "AlertBannerServiceInner" },
|
|
25493
25954
|
(title === null || title === void 0 ? void 0 : title.trim()) && React.createElement(Heading$1, { text: title }),
|
|
25494
25955
|
children)));
|
|
25495
25956
|
};
|
|
25496
25957
|
|
|
25497
|
-
const Container$
|
|
25958
|
+
const Container$Z = styled.a`
|
|
25498
25959
|
display: inline-block;
|
|
25499
25960
|
position: relative;
|
|
25500
25961
|
padding-top: 15px;
|
|
@@ -25553,10 +26014,10 @@ const Container$X = styled.a`
|
|
|
25553
26014
|
*/
|
|
25554
26015
|
var BackLink = function (_a) {
|
|
25555
26016
|
var link = _a.link, _b = _a.useHistory, useHistory = _b === void 0 ? false : _b;
|
|
25556
|
-
return (React.createElement(React.Fragment, null, useHistory ? (React.createElement(Container$
|
|
26017
|
+
return (React.createElement(React.Fragment, null, useHistory ? (React.createElement(Container$Z, { onClick: function () { return history.back(); }, "data-testid": "BackLink", as: "button" }, "Back")) : (React.createElement(Container$Z, { href: link, "data-testid": "BackLink" }, "Back"))));
|
|
25557
26018
|
};
|
|
25558
26019
|
|
|
25559
|
-
const Container$
|
|
26020
|
+
const Container$Y = styled.div`
|
|
25560
26021
|
padding-top: 15px;
|
|
25561
26022
|
border-bottom: 1px solid ${(props) => props.theme.theme_vars.colours.grey}80;
|
|
25562
26023
|
margin-bottom: ${(props) => (props.$hasMargin ? props.theme.theme_vars.spacingSizes.large : 0)};
|
|
@@ -25624,14 +26085,14 @@ const BreadcrumbLink$1 = styled.a`
|
|
|
25624
26085
|
|
|
25625
26086
|
var Breadcrumbs = function (_a) {
|
|
25626
26087
|
var breadcrumbsArray = _a.breadcrumbsArray, _b = _a.hasMargin, hasMargin = _b === void 0 ? false : _b;
|
|
25627
|
-
return (React.createElement(Container$
|
|
26088
|
+
return (React.createElement(Container$Y, { "$hasMargin": hasMargin, "data-testid": "Breadcrumbs" },
|
|
25628
26089
|
React.createElement(List$2, { as: breadcrumbsArray.length === 1 ? 'div' : 'ol' }, breadcrumbsArray.map(function (crumb) { return (React.createElement(Crumb, { key: crumb.title, as: breadcrumbsArray.length === 1 ? 'span' : 'li' }, React.createElement(React.Fragment, null,
|
|
25629
26090
|
React.createElement(BreadcrumbLink$1, { href: crumb.url, title: crumb.title }, crumb.title),
|
|
25630
26091
|
React.createElement(IconWrapper$4, null,
|
|
25631
26092
|
React.createElement(ChevronIcon, { direction: 'right', colourFill: "#C6C6C6" }))))); }))));
|
|
25632
26093
|
};
|
|
25633
26094
|
|
|
25634
|
-
const Container$
|
|
26095
|
+
const Container$X = styled.div`
|
|
25635
26096
|
display: block;
|
|
25636
26097
|
|
|
25637
26098
|
a {
|
|
@@ -26060,7 +26521,7 @@ var CludoSearch = function (_a) {
|
|
|
26060
26521
|
];
|
|
26061
26522
|
var Facets = function () { return (React.createElement(FacetGroup, null,
|
|
26062
26523
|
React.createElement(StandardFacet, { field: "Category", label: "Show results from", hideClear: true, hideCount: false, hideSearchBar: true, hideShowMore: true, className: "wnc-cludo-facet-list", exclude: ['Documents'], order: filterOrder, includeAllResultsOption: true, allResultsOptionLabel: "All services" }))); };
|
|
26063
|
-
return (React.createElement(Container$
|
|
26524
|
+
return (React.createElement(Container$X, { "data-testid": "CludoSearch" },
|
|
26064
26525
|
React.createElement(CludoWrapper, { config: cludoSearchConfig },
|
|
26065
26526
|
React.createElement(CludoAutoComplete, null),
|
|
26066
26527
|
React.createElement(ResultCount, null),
|
|
@@ -26086,7 +26547,7 @@ var CludoSearch = function (_a) {
|
|
|
26086
26547
|
React.createElement(Facets, null)))))));
|
|
26087
26548
|
};
|
|
26088
26549
|
|
|
26089
|
-
const Container$
|
|
26550
|
+
const Container$W = styled.div`
|
|
26090
26551
|
display: block;
|
|
26091
26552
|
|
|
26092
26553
|
.consultation-list__results {
|
|
@@ -26186,7 +26647,7 @@ const ClearFilters$1 = styled.button`
|
|
|
26186
26647
|
}
|
|
26187
26648
|
`;
|
|
26188
26649
|
|
|
26189
|
-
const Container$
|
|
26650
|
+
const Container$V = styled.a`
|
|
26190
26651
|
display: flex;
|
|
26191
26652
|
flex-direction: row;
|
|
26192
26653
|
flex-wrap: wrap;
|
|
@@ -26331,7 +26792,7 @@ var ConsultationLink = function (_a) {
|
|
|
26331
26792
|
detail: new Date(closeDate).toLocaleDateString(),
|
|
26332
26793
|
},
|
|
26333
26794
|
];
|
|
26334
|
-
return (React.createElement(Container$
|
|
26795
|
+
return (React.createElement(Container$V, { "data-testid": "ConsultationLink", href: url },
|
|
26335
26796
|
React.createElement(Row$1, null,
|
|
26336
26797
|
React.createElement(Column, { small: "full", medium: imageLarge ? 'two-thirds' : 'full', large: imageLarge ? 'two-thirds' : 'full', hasPadding: false },
|
|
26337
26798
|
React.createElement(ConsultationContent, { "$hasPadding": hasPadding },
|
|
@@ -26377,7 +26838,7 @@ var ConsultationList = function (_a) {
|
|
|
26377
26838
|
event.preventDefault();
|
|
26378
26839
|
onSubmit();
|
|
26379
26840
|
};
|
|
26380
|
-
return (React.createElement(Container$
|
|
26841
|
+
return (React.createElement(Container$W, { "data-testid": "ConsultationList" },
|
|
26381
26842
|
React.createElement(Row$1, null,
|
|
26382
26843
|
React.createElement(Column, { small: "full", medium: "one-third", large: "one-third" },
|
|
26383
26844
|
React.createElement(ToggleFilters$1, { onClick: function () { return setShowFilters(!showFilters); } },
|
|
@@ -26419,7 +26880,7 @@ var ConsultationList = function (_a) {
|
|
|
26419
26880
|
React.createElement(Pagination, { currentPage: pageNumber, totalResults: totalResults, postTo: consultationsPagePath, resultsPerPage: 5 }))) : (React.createElement("p", null, "No results found"))))));
|
|
26420
26881
|
};
|
|
26421
26882
|
|
|
26422
|
-
const Container$
|
|
26883
|
+
const Container$U = styled.div`
|
|
26423
26884
|
display: block;
|
|
26424
26885
|
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.large};
|
|
26425
26886
|
padding-bottom: ${(props) => props.theme.theme_vars.spacingSizes.large};
|
|
@@ -26469,12 +26930,12 @@ const CurrentPage = styled.span`
|
|
|
26469
26930
|
|
|
26470
26931
|
var Contents$1 = function (_a) {
|
|
26471
26932
|
var contents = _a.contents, _b = _a.currentPath, currentPath = _b === void 0 ? undefined : _b, _c = _a.title, title = _c === void 0 ? 'Contents' : _c;
|
|
26472
|
-
return (React.createElement(Container$
|
|
26933
|
+
return (React.createElement(Container$U, { "data-testid": "Contents" },
|
|
26473
26934
|
React.createElement(Heading$1, { text: title, level: 2 }),
|
|
26474
26935
|
React.createElement(List$1, null, contents.map(function (content, index) { return (React.createElement(ListItem$1, { key: index }, content.url === currentPath ? (React.createElement(CurrentPage, null, content.title)) : (React.createElement(Link$2, { href: content.url, "$active": content.url === currentPath }, content.title)))); }))));
|
|
26475
26936
|
};
|
|
26476
26937
|
|
|
26477
|
-
const Container$
|
|
26938
|
+
const Container$T = styled.div`
|
|
26478
26939
|
display: block;
|
|
26479
26940
|
border-top: 1px solid ${(props) => props.theme.theme_vars.colours.grey}80;
|
|
26480
26941
|
margin: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
@@ -26524,7 +26985,7 @@ var ContentsNavigation = function (_a) {
|
|
|
26524
26985
|
};
|
|
26525
26986
|
var nextPage = currentPage() < contents.length - 1 ? contents[currentPage() + 1] : undefined;
|
|
26526
26987
|
var previousPage = currentPage() !== 0 ? contents[currentPage() - 1] : undefined;
|
|
26527
|
-
return (React.createElement(Container$
|
|
26988
|
+
return (React.createElement(Container$T, { "data-testid": "ContentsNavigation" },
|
|
26528
26989
|
previousPage && (React.createElement(NavigationLink, { href: previousPage.url },
|
|
26529
26990
|
React.createElement(Arrow, null, "\u2190"),
|
|
26530
26991
|
React.createElement(LinkText, null,
|
|
@@ -26599,7 +27060,7 @@ var DisplayDate = function (_a) {
|
|
|
26599
27060
|
postText));
|
|
26600
27061
|
};
|
|
26601
27062
|
|
|
26602
|
-
const Container$
|
|
27063
|
+
const Container$S = styled.div`
|
|
26603
27064
|
display: block;
|
|
26604
27065
|
|
|
26605
27066
|
.event-list__results {
|
|
@@ -26879,7 +27340,7 @@ var EventList = function (_a) {
|
|
|
26879
27340
|
event.preventDefault();
|
|
26880
27341
|
onSubmit();
|
|
26881
27342
|
};
|
|
26882
|
-
return (React.createElement(Container$
|
|
27343
|
+
return (React.createElement(Container$S, { "data-testid": "EventList" },
|
|
26883
27344
|
React.createElement(Row$1, null,
|
|
26884
27345
|
React.createElement(Column, { small: "full", medium: "one-third", large: "one-third" },
|
|
26885
27346
|
React.createElement(ToggleFilters, { onClick: function () { return setShowFilters(!showFilters); } },
|
|
@@ -26928,7 +27389,7 @@ var EventList = function (_a) {
|
|
|
26928
27389
|
React.createElement(Pagination, { currentPage: pageNumber, totalResults: totalResults, postTo: eventsPagePath, resultsPerPage: 5 }))) : (React.createElement(ResultInfo$4, null, "No results found"))))));
|
|
26929
27390
|
};
|
|
26930
27391
|
|
|
26931
|
-
const Container$
|
|
27392
|
+
const Container$R = styled.footer`
|
|
26932
27393
|
background-color: ${(props) => props.theme.theme_vars.colours.black};
|
|
26933
27394
|
padding: 25px 0;
|
|
26934
27395
|
`;
|
|
@@ -27110,7 +27571,7 @@ var ServiceIcon = function (_a) {
|
|
|
27110
27571
|
React.createElement("path", { d: "M15.0107 13.6688L22.6607 18.0161L15.0107 22.3634V13.6688ZM36 3.85714V32.1429C36 34.2723 34.2723 36 32.1429 36H3.85714C1.72768 36 0 34.2723 0 32.1429V3.85714C0 1.72768 1.72768 0 3.85714 0H32.1429C34.2723 0 36 1.72768 36 3.85714ZM32.625 18.0241C32.625 18.0241 32.625 13.2348 32.0143 10.9366C31.6768 9.66696 30.6884 8.67054 29.4268 8.33304C27.1527 7.71429 18 7.71429 18 7.71429C18 7.71429 8.84732 7.71429 6.57321 8.33304C5.31161 8.67054 4.32321 9.66696 3.98571 10.9366C3.375 13.2268 3.375 18.0241 3.375 18.0241C3.375 18.0241 3.375 22.8134 3.98571 25.1116C4.32321 26.3813 5.31161 27.3375 6.57321 27.675C8.84732 28.2857 18 28.2857 18 28.2857C18 28.2857 27.1527 28.2857 29.4268 27.667C30.6884 27.3295 31.6768 26.3732 32.0143 25.1036C32.625 22.8134 32.625 18.0241 32.625 18.0241Z", fill: colourFill })));
|
|
27111
27572
|
};
|
|
27112
27573
|
|
|
27113
|
-
const Container$
|
|
27574
|
+
const Container$Q = styled.div`
|
|
27114
27575
|
display: block;
|
|
27115
27576
|
|
|
27116
27577
|
.goog-te-combo {
|
|
@@ -27185,7 +27646,7 @@ var GoogleTranslate = function (_a) {
|
|
|
27185
27646
|
document.body.appendChild(addScript);
|
|
27186
27647
|
window.googleTranslateElementInit = googleTranslateElementInit;
|
|
27187
27648
|
}, []);
|
|
27188
|
-
return (React.createElement(Container$
|
|
27649
|
+
return (React.createElement(Container$Q, { "data-testid": "GoogleTranslate", "$hasDarkBackground": hasDarkBackground },
|
|
27189
27650
|
label && React.createElement(Label$7, { "$hasDarkBackground": hasDarkBackground }, label),
|
|
27190
27651
|
React.createElement("div", { id: "google_translate_element" })));
|
|
27191
27652
|
};
|
|
@@ -27193,7 +27654,7 @@ var GoogleTranslate = function (_a) {
|
|
|
27193
27654
|
var Footer = function (_a) {
|
|
27194
27655
|
var _b = _a.footerLinksArray, footerLinksArray = _b === void 0 ? null : _b, _c = _a.year, year = _c === void 0 ? new Date().getFullYear() : _c, _d = _a.hasTranslate, hasTranslate = _d === void 0 ? false : _d;
|
|
27195
27656
|
var themeContext = useContext(ThemeContext);
|
|
27196
|
-
return (React.createElement(Container$
|
|
27657
|
+
return (React.createElement(Container$R, { "data-testid": "Footer" },
|
|
27197
27658
|
React.createElement(StyledMaxWidthContainer$2, { noBackground: true },
|
|
27198
27659
|
React.createElement(FooterAlignment, null,
|
|
27199
27660
|
React.createElement("div", null,
|
|
@@ -27228,7 +27689,7 @@ var Footer = function (_a) {
|
|
|
27228
27689
|
: '' }, themeContext.cardinal_name === 'north' ? (React.createElement(NorthWhiteLogo, null)) : themeContext.cardinal_name === 'west' ? (React.createElement(WestWhiteLogo, null)) : (React.createElement(GDSLogo, null))))))));
|
|
27229
27690
|
};
|
|
27230
27691
|
|
|
27231
|
-
const Container$
|
|
27692
|
+
const Container$P = styled.div`
|
|
27232
27693
|
background: ${(props) => (props.$hasBackground ? props.theme.theme_vars.colours.grey_light : 'transparent')};
|
|
27233
27694
|
padding: ${(props) => (props.$hasPadding ? '50px 0 20px' : '0')};
|
|
27234
27695
|
font-family: ${(props) => props.theme.theme_vars.fontstack};
|
|
@@ -27239,7 +27700,7 @@ const Container$N = styled.div`
|
|
|
27239
27700
|
*/
|
|
27240
27701
|
var FullWidthContainer = function (_a) {
|
|
27241
27702
|
var children = _a.children, _b = _a.hasBackground, hasBackground = _b === void 0 ? false : _b, _c = _a.hasPadding, hasPadding = _c === void 0 ? false : _c;
|
|
27242
|
-
return (React.createElement(Container$
|
|
27703
|
+
return (React.createElement(Container$P, { "$hasBackground": hasBackground, "$hasPadding": hasPadding, "data-testid": "FullWidthContainer" }, children));
|
|
27243
27704
|
};
|
|
27244
27705
|
|
|
27245
27706
|
/**
|
|
@@ -27271,7 +27732,7 @@ const headerThemeStyles = (props) => {
|
|
|
27271
27732
|
}
|
|
27272
27733
|
};
|
|
27273
27734
|
|
|
27274
|
-
const Container$
|
|
27735
|
+
const Container$O = styled.header`
|
|
27275
27736
|
box-shadow: 1px 1px 5px 1px rgba(0, 0, 0, 0.2);
|
|
27276
27737
|
position: relative;
|
|
27277
27738
|
z-index: 20;
|
|
@@ -27579,7 +28040,7 @@ var NorthColouredLogo = function () {
|
|
|
27579
28040
|
React.createElement("path", { fill: "#fff", d: "M0 0H974V327H0z" })))));
|
|
27580
28041
|
};
|
|
27581
28042
|
|
|
27582
|
-
const Container$
|
|
28043
|
+
const Container$N = styled.div`
|
|
27583
28044
|
${(props) => props.theme.fontStyles}
|
|
27584
28045
|
width: calc(100% - ${(props) => (props.$isLarge ? '5rem' : '3rem')});
|
|
27585
28046
|
`;
|
|
@@ -27607,7 +28068,7 @@ const InputWrapper$1 = styled.div`
|
|
|
27607
28068
|
}
|
|
27608
28069
|
`;
|
|
27609
28070
|
|
|
27610
|
-
const Button$
|
|
28071
|
+
const Button$4 = styled.button`
|
|
27611
28072
|
position: absolute;
|
|
27612
28073
|
top: 0;
|
|
27613
28074
|
right: ${(props) => (props.$isLarge ? '-5rem' : '-3rem')};
|
|
@@ -27727,18 +28188,18 @@ var Searchbar = function (_a) {
|
|
|
27727
28188
|
/**
|
|
27728
28189
|
* Render the component
|
|
27729
28190
|
*/
|
|
27730
|
-
return (React.createElement(Container$
|
|
28191
|
+
return (React.createElement(Container$N, { "data-testid": "Searchbar", "$isLarge": isLarge },
|
|
27731
28192
|
React.createElement("form", { onSubmit: handleSubmit },
|
|
27732
28193
|
React.createElement("div", { role: "search" },
|
|
27733
28194
|
React.createElement(InputWrapper$1, null,
|
|
27734
28195
|
React.createElement(Autocomplete, { id: id, name: NewsArticleFilterFields.search.queryParamKey, placeholder: placeholder, onSelect: handleSelect, onChange: handleChange, value: inputSearchTerm, suggestions: suggestions, minimumMatchLength: minimumMatchLength, maximumMatchesShown: maximumMatchesShown, isLarge: isLarge, hasAdjacentButton: true, isErrored: isErrored, hasHiddenLabel: true, required: true, errorText: "The search field is required.", hasLightBackground: isLight }),
|
|
27735
|
-
React.createElement(Button$
|
|
28196
|
+
React.createElement(Button$4, { type: "submit", value: "Search", "$isLarge": isLarge, "$isLight": isLight, "$isErrored": isErrored, "data-testid": "SearchButton" },
|
|
27736
28197
|
React.createElement(IconDownload, { colourFill: "#fff" }),
|
|
27737
28198
|
React.createElement(ButtonText$2, null, "Search")))))));
|
|
27738
28199
|
};
|
|
27739
28200
|
|
|
27740
28201
|
var WestColouredLogo = function () {
|
|
27741
|
-
var randomId =
|
|
28202
|
+
var randomId = useId();
|
|
27742
28203
|
return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "974", height: "327", fill: "none", viewBox: "0 0 974 327" },
|
|
27743
28204
|
React.createElement("path", { fill: "url(#paint0_linear_".concat(randomId, ")"), d: "M104.506 216.165c.4.799.823 1.591 1.254 2.376 11.203-.577 21.323-6.329 27.497-15.541-.177-.33-.353-.669-.523-1.007-6.274-12.495-5.544-26.713.7-38.147a35.024 35.024 0 00-13.356-11.98c-4.422-2.269-9.136-3.553-14.034-3.83a73.7 73.7 0 00-5.575 12.673c-6.097 18.423-4.667 38.116 4.037 55.456z" }),
|
|
27744
28205
|
React.createElement("path", { fill: "url(#paint1_linear_".concat(randomId, ")"), d: "M234.358 150.981c-8.705-17.339-23.645-30.257-42.062-36.363-16.055-5.321-33.087-4.913-48.674 1.046 11.335 6.628 20.67 15.84 27.359 26.89 14.464.569 28.213 8.773 35.156 22.599 10.158 20.239 1.961 44.96-18.277 55.118a40.82 40.82 0 01-17.271 4.344c-6.882 11.135-16.309 20.231-27.528 26.652 1.153.446 2.322.869 3.514 1.261 18.416 6.106 38.117 4.675 55.456-4.029 17.34-8.705 30.258-23.645 36.364-42.061 6.105-18.424 4.675-38.117-4.037-55.457z" }),
|
|
@@ -27784,7 +28245,7 @@ var NorthBlackLogo = function () {
|
|
|
27784
28245
|
React.createElement("path", { fill: "#000", d: "M342.215 236.608c-114.072-17.17-228.119 17.17-342.191 0v-37.339c114.072 17.17 228.119-17.17 342.191 0v37.339zM411.838 122.367l-21.063-36.59v36.59h-9.335v-50.35h10.64l20.846 36.662V72.018h9.335v50.349h-10.423zM449.999 123.262c-11.051 0-20.047-8.851-20.047-19.758 0-10.834 8.996-19.758 19.975-19.758 11.39 0 20.169 8.779 20.169 20.024 0 10.616-9.117 19.492-20.097 19.492zm0-31.22c-5.924 0-10.906 5.102-10.906 11.317 0 6.481 4.837 11.584 10.979 11.584 5.997 0 10.907-5.103 10.907-11.439 0-6.288-4.91-11.463-10.98-11.463zM484.968 101.376v20.991h-9.069v-37.75h8.319v3.676c2.395-3.483 4.305-4.57 8.174-4.57h.677v8.73c-5.465.144-8.101 3.07-8.101 8.923zM509.829 92.863v29.504h-9.069V92.863h-4.425v-8.246h4.425v-12.6h9.069v12.6h5.441v8.246h-5.441zM545.595 122.367v-19.274c0-7.908-2.055-11.052-7.352-11.052-5.175 0-7.98 2.854-7.98 11.173v19.153h-9.069v-50.35h9.069v15.188c2.733-2.443 5.731-3.555 9.601-3.555 9.068 0 14.8 4.981 14.8 17.387v21.33h-9.069zM411.838 195.376l-21.063-36.59v36.59h-9.335v-50.35h10.64l20.846 36.662v-36.662h9.335v50.35h-10.423zM449.999 196.271c-11.051 0-20.047-8.851-20.047-19.758 0-10.834 8.996-19.758 19.975-19.758 11.39 0 20.169 8.779 20.169 20.024 0 10.641-9.117 19.492-20.097 19.492zm0-31.221c-5.924 0-10.906 5.103-10.906 11.318 0 6.481 4.837 11.584 10.979 11.584 5.997 0 10.907-5.103 10.907-11.439 0-6.288-4.91-11.463-10.98-11.463zM484.968 174.385v20.991h-9.069v-37.75h8.319v3.676c2.395-3.483 4.305-4.571 8.174-4.571h.677v8.73c-5.465.145-8.101 3.071-8.101 8.924zM509.829 165.872v29.504h-9.069v-29.504h-4.425v-8.246h4.425v-12.6h9.069v12.6h5.441v8.246h-5.441zM545.595 195.376v-19.274c0-7.908-2.055-11.052-7.352-11.052-5.175 0-7.98 2.853-7.98 11.172v19.154h-9.069v-50.35h9.069v15.187c2.733-2.442 5.731-3.555 9.601-3.555 9.068 0 14.8 4.982 14.8 17.388v21.33h-9.069zM592.705 195.376v-4.909c-3.604 4.086-7.231 5.803-12.527 5.803-11.052 0-19.008-8.246-19.008-19.636 0-11.511 8.029-19.903 19.226-19.903 5.441 0 9.189 1.765 12.333 5.925v-5.054h8.319v37.75h-8.343v.024zm-11.391-30.326c-6.481 0-11.051 4.909-11.051 11.777 0 6.602 4.57 11.1 11.172 11.1 6.893 0 10.98-4.909 10.98-11.172 0-6.868-4.619-11.705-11.101-11.705zM655.992 195.376v-20.725c0-7.57-2.854-9.601-7.086-9.601-5.03 0-7.641 2.733-7.641 11.729v18.597h-9.069v-20.725c0-7.424-2.588-9.601-7.352-9.601-5.248 0-7.352 2.805-7.352 11.729v18.597h-9.068v-37.75h8.319v3.531c2.66-3.193 5.393-4.426 9.818-4.426 5.175 0 8.513 1.765 11.1 5.852 3.072-4.087 6.82-5.852 12.14-5.852 9.939 0 15.26 5.514 15.26 16.832v21.813h-9.069zM694.516 196.27c-4.643 0-8.174-1.354-11.584-4.425v16.154h-9.069v-50.373h8.319v4.425c2.926-3.409 7.304-5.32 12.406-5.32 10.907 0 18.815 8.247 18.815 19.637-.024 11.463-8.005 19.902-18.887 19.902zm-1.113-31.22c-6.263 0-11.051 4.909-11.051 11.39 0 6.602 4.764 11.511 11.172 11.511 5.998 0 10.689-4.981 10.689-11.39.049-6.529-4.667-11.511-10.81-11.511zM729.944 165.872v29.504h-9.069v-29.504h-4.425v-8.246h4.425v-12.6h9.069v12.6h5.441v8.246h-5.441zM758.359 196.271c-11.051 0-20.047-8.851-20.047-19.758 0-10.834 8.996-19.758 19.975-19.758 11.39 0 20.168 8.779 20.168 20.024 0 10.641-9.117 19.492-20.096 19.492zm0-31.221c-5.925 0-10.906 5.103-10.906 11.318 0 6.481 4.836 11.584 10.979 11.584 5.997 0 10.906-5.103 10.906-11.439 0-6.288-4.909-11.463-10.979-11.463zM808.708 195.376V176.9c0-10.085-2.733-11.85-7.231-11.85-2.854 0-5.248 1.233-6.675 3.482-1.16 1.838-1.499 4.015-1.499 9.069v17.775h-9.069v-37.75h8.392v3.603c3.337-3.192 6.336-4.498 10.64-4.498 5.248 0 9.335 1.911 11.778 5.441 2.055 2.926 2.732 6.191 2.732 12.938v20.242h-9.068v.024zM837.268 196.271c-7.497 0-12.89-4.087-13.833-12.89h9.141c.895 3.192 2.394 4.571 5.055 4.571 2.321 0 4.086-1.572 4.086-3.676 0-2.177-.338-2.805-6.408-4.837-7.497-2.515-10.495-5.659-10.495-11.172 0-6.482 5.513-11.512 12.551-11.512 6.408 0 12.067 4.232 12.406 11.318h-8.852c-.411-1.983-1.644-2.999-3.554-2.999-1.983 0-3.483 1.355-3.483 3.193 0 1.983.194 2.103 6.409 4.086 7.908 2.443 10.495 5.442 10.495 11.052-.024 7.207-5.949 12.866-13.518 12.866zM880.894 195.376v-19.274c0-7.908-2.056-11.052-7.352-11.052-5.175 0-7.98 2.853-7.98 11.172v19.154h-9.069v-50.35h9.069v15.187c2.733-2.442 5.731-3.555 9.601-3.555 9.068 0 14.8 4.982 14.8 17.388v21.33h-9.069zM898.065 195.376v-37.75h9.069v37.75h-9.069zm.049-43.191v-9.069h9.068v9.069h-9.068zM924.159 174.385v20.991h-9.069v-37.75h8.319v3.676c2.394-3.483 4.305-4.571 8.174-4.571h.677v8.73c-5.441.145-8.101 3.071-8.101 8.924zM973.637 180.527H944.4c1.088 4.571 5.054 7.424 10.423 7.424 3.748 0 5.997-1.015 8.319-3.748h9.89c-2.515 7.763-10.35 12.067-17.992 12.067-11.511 0-20.435-8.585-20.435-19.636 0-11.1 8.803-19.903 19.903-19.903 11.245 0 19.492 8.585 19.492 20.314-.024 1.378-.097 2.176-.363 3.482zm-19.032-15.477c-5.393 0-9.069 2.66-10.496 7.497h20.919c-1.137-4.837-4.813-7.497-10.423-7.497zM405.358 269.279c-14.728 0-26.505-11.729-26.505-26.238 0-14.244 11.656-25.9 25.9-25.9 10.351 0 19.419 5.586 23.845 15.332h-10.423c-3.41-4.426-7.352-6.336-13.228-6.336-9.601 0-16.687 7.496-16.687 16.976 0 9.407 7.642 17.17 16.904 17.17 4.837 0 8.392-1.644 12.479-5.925h10.979c-3.966 9.19-12.962 14.921-23.264 14.921zM452.732 269.279c-11.052 0-20.048-8.851-20.048-19.757 0-10.834 8.996-19.758 19.975-19.758 11.391 0 20.169 8.779 20.169 20.048 0 10.616-9.141 19.467-20.096 19.467zm0-31.196c-5.925 0-10.907 5.103-10.907 11.318 0 6.481 4.837 11.584 10.979 11.584 5.998 0 10.907-5.103 10.907-11.439-.024-6.288-4.933-11.463-10.979-11.463zM503.831 268.409v-3.603c-3.409 3.337-6.263 4.498-10.834 4.498-8.802 0-14.389-5.103-14.389-18.404v-20.241h9.069v18.476c0 10.012 2.781 11.85 7.158 11.85 3.072 0 5.514-1.306 6.892-3.483 1.016-1.693 1.427-4.014 1.427-9.068v-17.775h9.069v37.75h-8.392zM544.653 268.409v-18.476c0-10.085-2.733-11.85-7.231-11.85-2.854 0-5.248 1.233-6.675 3.482-1.161 1.838-1.499 4.015-1.499 9.069v17.775h-9.069v-37.774h8.392v3.603c3.337-3.192 6.336-4.498 10.64-4.498 5.248 0 9.335 1.91 11.778 5.441 2.055 2.926 2.732 6.191 2.732 12.938v20.241h-9.068v.049zM580.299 269.279c-11.173 0-20.169-8.802-20.169-19.757 0-11.1 8.73-19.758 19.903-19.758 8.585 0 16.081 4.837 19.008 13.494h-10.23c-1.838-3.482-4.691-5.175-8.803-5.175-6.263 0-10.761 4.764-10.761 11.39 0 6.602 4.691 11.512 10.979 11.512 3.748 0 6.336-1.5 8.585-4.982h10.23c-3.144 8.44-9.964 13.276-18.742 13.276zM606.054 268.409v-37.774h9.068v37.749h-9.068v.025zm.072-43.216v-9.068h9.069v9.068h-9.069zM623.079 268.409v-50.374h9.068v50.35h-9.068v.024z" })));
|
|
27785
28246
|
};
|
|
27786
28247
|
|
|
27787
|
-
const Container$
|
|
28248
|
+
const Container$M = styled.div`
|
|
27788
28249
|
display: block;
|
|
27789
28250
|
min-height: 46px;
|
|
27790
28251
|
|
|
@@ -27845,7 +28306,7 @@ var CludoSearchBar = function (_a) {
|
|
|
27845
28306
|
autocomplete: CludoAutoComplete,
|
|
27846
28307
|
},
|
|
27847
28308
|
};
|
|
27848
|
-
return (React.createElement(Container$
|
|
28309
|
+
return (React.createElement(Container$M, { "data-testid": "CludoSearchBar" },
|
|
27849
28310
|
React.createElement(CludoWrapper, { config: cludoSearchConfig },
|
|
27850
28311
|
React.createElement(CludoAutoComplete, { hasMargin: false }))));
|
|
27851
28312
|
};
|
|
@@ -27904,7 +28365,7 @@ var Header = function (_a) {
|
|
|
27904
28365
|
var show = showTranslate;
|
|
27905
28366
|
setShowTranslate(!show);
|
|
27906
28367
|
};
|
|
27907
|
-
return (React.createElement(Container$
|
|
28368
|
+
return (React.createElement(Container$O, { "$isHomepage": isHomepage, "data-testid": "Header" },
|
|
27908
28369
|
!hideSearchBar && (React.createElement(SearchContainer, null,
|
|
27909
28370
|
React.createElement(MaxWidthContainer, { noPadding: true, noBackground: true, overflowVisible: true },
|
|
27910
28371
|
React.createElement(SearchWrapper, null,
|
|
@@ -27949,7 +28410,7 @@ var Header = function (_a) {
|
|
|
27949
28410
|
* Hero image container with optional dark gradient for non-box mode
|
|
27950
28411
|
* Optimised for an image in 16:5 ratio on all but small width screens
|
|
27951
28412
|
*/
|
|
27952
|
-
const Container$
|
|
28413
|
+
const Container$L = styled.div`
|
|
27953
28414
|
padding-bottom: 10px;
|
|
27954
28415
|
display: flex;
|
|
27955
28416
|
justify-content: center;
|
|
@@ -28129,7 +28590,7 @@ const Search = styled.div`
|
|
|
28129
28590
|
margin: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
28130
28591
|
`;
|
|
28131
28592
|
|
|
28132
|
-
const Container$
|
|
28593
|
+
const Container$K = styled.div`
|
|
28133
28594
|
display: block;
|
|
28134
28595
|
|
|
28135
28596
|
input[type='text'] {
|
|
@@ -28207,7 +28668,7 @@ var CustomSearch = function (_a) {
|
|
|
28207
28668
|
if (!id) {
|
|
28208
28669
|
id = useId();
|
|
28209
28670
|
}
|
|
28210
|
-
return (React.createElement(Container$
|
|
28671
|
+
return (React.createElement(Container$K, { "data-testid": "CustomSearch" },
|
|
28211
28672
|
React.createElement("form", { method: method, action: path, "aria-label": label },
|
|
28212
28673
|
React.createElement("div", { role: "search" },
|
|
28213
28674
|
React.createElement(Label$6, { htmlFor: id, "$hasHiddenLabel": hasHiddenLabel }, label),
|
|
@@ -28222,7 +28683,7 @@ var CustomSearch = function (_a) {
|
|
|
28222
28683
|
*/
|
|
28223
28684
|
var HeroImage = function (_a) {
|
|
28224
28685
|
var headline = _a.headline, content = _a.content, callToActionText = _a.callToActionText, callToActionURL = _a.callToActionURL, _b = _a.callToActionIsPrimary, callToActionIsPrimary = _b === void 0 ? true : _b, _c = _a.backgroundBox, backgroundBox = _c === void 0 ? true : _c, imageLarge = _a.imageLarge, imageSmall = _a.imageSmall, imageAltText = _a.imageAltText, breadcrumb = _a.breadcrumb, customSearch = _a.customSearch;
|
|
28225
|
-
return (React.createElement(Container$
|
|
28686
|
+
return (React.createElement(Container$L, { "data-testid": "HeroImage" },
|
|
28226
28687
|
React.createElement(ImageContainer$4, { "$backgroundBox": backgroundBox },
|
|
28227
28688
|
React.createElement(ResponsiveImage, { imageSmall: imageSmall, imageLarge: imageLarge, imageAltText: imageAltText, smallWidth: "144", largeWidth: "1440", ratio: "auto", objectFit: "cover" })),
|
|
28228
28689
|
React.createElement(InnerContainer, null,
|
|
@@ -28251,7 +28712,7 @@ const Wrapper$4 = styled.header`
|
|
|
28251
28712
|
position: relative;
|
|
28252
28713
|
`;
|
|
28253
28714
|
|
|
28254
|
-
const Container$
|
|
28715
|
+
const Container$J = styled.div`
|
|
28255
28716
|
font-family: ${(props) => props.theme.theme_vars.fontstack};
|
|
28256
28717
|
overflow: hidden;
|
|
28257
28718
|
background: ${(props) => props.theme.theme_vars.colours.action}5A;
|
|
@@ -28347,7 +28808,7 @@ const PromotedServicesTabContainer = styled.div`
|
|
|
28347
28808
|
width: 100%;
|
|
28348
28809
|
`;
|
|
28349
28810
|
|
|
28350
|
-
const Container$
|
|
28811
|
+
const Container$I = styled.div`
|
|
28351
28812
|
display: none;
|
|
28352
28813
|
|
|
28353
28814
|
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) {
|
|
@@ -28499,7 +28960,7 @@ var PromotedServicesTabs = function (_a) {
|
|
|
28499
28960
|
var toggleTab = function (index) {
|
|
28500
28961
|
setActiveTab(index);
|
|
28501
28962
|
};
|
|
28502
|
-
return (React.createElement(Container$
|
|
28963
|
+
return (React.createElement(Container$I, { "data-testid": "PromotedServicesTabs", role: "tablist" },
|
|
28503
28964
|
React.createElement(Row$1, null, tabs.map(function (tab, index) { return (React.createElement(Column, { key: index, small: "full", medium: "one-quarter", large: "one-quarter", classes: "promoted-services-tab-column" },
|
|
28504
28965
|
React.createElement(Tab, { "$isActive": index === activeTab, onClick: function () { return toggleTab(index); }, "aria-label": index === activeTab ? "Hide ".concat(tab.title) : "Show ".concat(tab.title), "aria-selected": index === activeTab ? 'true' : 'false', "aria-controls": "promoted-services-tabpanel-".concat(index), id: "promoted-services-tab-".concat(index), role: "tab" }, tab.title))); }))));
|
|
28505
28966
|
};
|
|
@@ -28546,7 +29007,7 @@ var HomeHero = function (_a) {
|
|
|
28546
29007
|
}, []);
|
|
28547
29008
|
return (React.createElement(Outer, { "data-testid": "HomeHero" },
|
|
28548
29009
|
React.createElement(Wrapper$4, { as: showSearch ? 'header' : 'div' },
|
|
28549
|
-
React.createElement(Container$
|
|
29010
|
+
React.createElement(Container$J, { className: random !== 999 ? 'loaded' : 'loading', "$showSearch": showSearch },
|
|
28550
29011
|
random !== 999 && (React.createElement(ResponsiveImage, { imageSmall: (_b = imagesArray[random].image144x81) !== null && _b !== void 0 ? _b : '', imageLarge: (_c = imagesArray[random].image1440x810) !== null && _c !== void 0 ? _c : '', imageAltText: (_d = imagesArray[random].imageAltText) !== null && _d !== void 0 ? _d : '', smallWidth: "144", largeWidth: "1440", ratio: "auto", objectFit: "cover" })),
|
|
28551
29012
|
React.createElement(StyledMaxWidthContainer$1, null,
|
|
28552
29013
|
showSearch ? (React.createElement(MainBox, null,
|
|
@@ -28576,7 +29037,7 @@ const Wrapper$3 = styled.section`
|
|
|
28576
29037
|
padding-bottom: 0px;
|
|
28577
29038
|
`;
|
|
28578
29039
|
|
|
28579
|
-
const Container$
|
|
29040
|
+
const Container$H = styled.div`
|
|
28580
29041
|
font-family: ${(props) => props.theme.theme_vars.fontstack};
|
|
28581
29042
|
display: flex;
|
|
28582
29043
|
flex-wrap: wrap;
|
|
@@ -28707,7 +29168,7 @@ var MemorialHero = function (_a) {
|
|
|
28707
29168
|
React.createElement(HiddenH1, null,
|
|
28708
29169
|
themeContext.full_name,
|
|
28709
29170
|
" Council"),
|
|
28710
|
-
React.createElement(Container$
|
|
29171
|
+
React.createElement(Container$H, null,
|
|
28711
29172
|
React.createElement(Left, null,
|
|
28712
29173
|
children,
|
|
28713
29174
|
React.createElement(ThemeProvider, { theme: theme }, councilServices)),
|
|
@@ -28736,7 +29197,7 @@ var NewsArticleDate = function (_a) {
|
|
|
28736
29197
|
const imageHeightMobile$1 = 150;
|
|
28737
29198
|
const imageHeightDesktop$1 = 200;
|
|
28738
29199
|
|
|
28739
|
-
const Container$
|
|
29200
|
+
const Container$G = styled.div`
|
|
28740
29201
|
${(props) => props.theme.fontStyles};
|
|
28741
29202
|
padding: 15px 0;
|
|
28742
29203
|
|
|
@@ -28864,7 +29325,7 @@ var NewsArticleFeaturedBlock = function (_a) {
|
|
|
28864
29325
|
if (articles && articles.length > 0) {
|
|
28865
29326
|
return (React.createElement(React.Fragment, null,
|
|
28866
29327
|
!withoutTitle && React.createElement(Heading$1, { text: "News articles and press releases" }),
|
|
28867
|
-
React.createElement(Container$
|
|
29328
|
+
React.createElement(Container$G, null,
|
|
28868
29329
|
React.createElement(Row$1, { isList: true }, articles.map(function (article) {
|
|
28869
29330
|
var _a;
|
|
28870
29331
|
return (React.createElement(Column, { isList: true, small: "full", medium: "one-half", large: "one-third", key: article.id },
|
|
@@ -28879,14 +29340,14 @@ var NewsArticleFeaturedBlock = function (_a) {
|
|
|
28879
29340
|
React.createElement(NewsArticleDate, { text: article.date.toString(), format: "X" }))))))));
|
|
28880
29341
|
}))),
|
|
28881
29342
|
viewAllLink && (React.createElement(ViewAllContainer, null,
|
|
28882
|
-
React.createElement(Button$
|
|
29343
|
+
React.createElement(Button$5, { text: "View all news", primary: false, url: viewAllLink, size: "large" })))));
|
|
28883
29344
|
}
|
|
28884
29345
|
else {
|
|
28885
29346
|
return React.createElement(React.Fragment, null);
|
|
28886
29347
|
}
|
|
28887
29348
|
};
|
|
28888
29349
|
|
|
28889
|
-
const Container$
|
|
29350
|
+
const Container$F = styled.div`
|
|
28890
29351
|
/* margin-top: 50px; */
|
|
28891
29352
|
/* border: 1px solid red; */
|
|
28892
29353
|
|
|
@@ -28988,7 +29449,7 @@ const FilterHeading = styled.h2`
|
|
|
28988
29449
|
}
|
|
28989
29450
|
`;
|
|
28990
29451
|
|
|
28991
|
-
const Container$
|
|
29452
|
+
const Container$E = styled.a`
|
|
28992
29453
|
${props => props.theme.linkStyles}
|
|
28993
29454
|
color: ${props => props.theme.theme_vars.colours.negative} !important;
|
|
28994
29455
|
font-weight: normal;
|
|
@@ -29017,7 +29478,7 @@ var RemoveAllFilters = function (_a) {
|
|
|
29017
29478
|
e.preventDefault();
|
|
29018
29479
|
removeParams(__spreadArray(__spreadArray([], NewsArticleFilterFields.removeFiltersList, true), ['page'], false));
|
|
29019
29480
|
};
|
|
29020
|
-
return (React.createElement(Container$
|
|
29481
|
+
return (React.createElement(Container$E, { "data-testid": "RemoveAllFilters", href: "#", onClick: removeAllFilters },
|
|
29021
29482
|
"Clear ",
|
|
29022
29483
|
searchValue.length > 0 && 'search term and ',
|
|
29023
29484
|
"filters",
|
|
@@ -29074,7 +29535,7 @@ var NewsArticleFilterAccordion = function (_a) {
|
|
|
29074
29535
|
section.isExpanded = false;
|
|
29075
29536
|
}
|
|
29076
29537
|
});
|
|
29077
|
-
return (React.createElement(Container$
|
|
29538
|
+
return (React.createElement(Container$F, { "data-testid": "NewsArticleFilterAccordion" },
|
|
29078
29539
|
React.createElement(ShowFiltersButton, { onClick: showFullscreenFilters, "aria-expanded": !!isFullScreen, "aria-controls": "PageFilters" },
|
|
29079
29540
|
"Show Search and filters",
|
|
29080
29541
|
count > 0 && " (".concat(count, ")")),
|
|
@@ -29134,7 +29595,7 @@ var NewsArticleImage = function (_a) {
|
|
|
29134
29595
|
imageCaption && React.createElement(Small, { itemprop: "copyrightHolder" }, imageCaption)));
|
|
29135
29596
|
};
|
|
29136
29597
|
|
|
29137
|
-
const Container$
|
|
29598
|
+
const Container$D = styled.div`
|
|
29138
29599
|
${(props) => props.theme.fontStyles};
|
|
29139
29600
|
`;
|
|
29140
29601
|
|
|
@@ -29254,7 +29715,7 @@ var NewsArticleList = function (_a) {
|
|
|
29254
29715
|
var results = _a.results;
|
|
29255
29716
|
var extractLength = 140;
|
|
29256
29717
|
if (results && results.length > 0) {
|
|
29257
|
-
return (React.createElement(Container$
|
|
29718
|
+
return (React.createElement(Container$D, { "data-testid": "NewsArticleList" },
|
|
29258
29719
|
React.createElement(Row$1, { isList: true }, results.map(function (article) {
|
|
29259
29720
|
var _a;
|
|
29260
29721
|
return (React.createElement(Column, { isList: true, small: "full", medium: "full", large: "full", key: article.id },
|
|
@@ -29271,12 +29732,12 @@ var NewsArticleList = function (_a) {
|
|
|
29271
29732
|
}))));
|
|
29272
29733
|
}
|
|
29273
29734
|
else {
|
|
29274
|
-
return (React.createElement(Container$
|
|
29735
|
+
return (React.createElement(Container$D, { "data-testid": "NewsArticleList" },
|
|
29275
29736
|
React.createElement(ResultInfo$3, null, "No results found")));
|
|
29276
29737
|
}
|
|
29277
29738
|
};
|
|
29278
29739
|
|
|
29279
|
-
const Container$
|
|
29740
|
+
const Container$C = styled.div`
|
|
29280
29741
|
${props => props.theme.fontStyles};
|
|
29281
29742
|
padding-bottom: 20px;
|
|
29282
29743
|
border-bottom: 1px solid ${props => props.theme.theme_vars.colours.grey};
|
|
@@ -29350,7 +29811,7 @@ const Preposition = styled.div`
|
|
|
29350
29811
|
font-size: 80%;
|
|
29351
29812
|
`;
|
|
29352
29813
|
|
|
29353
|
-
const Container$
|
|
29814
|
+
const Container$B = styled.span`
|
|
29354
29815
|
margin: 0 5px;
|
|
29355
29816
|
display: inline-block;
|
|
29356
29817
|
position: relative;
|
|
@@ -29373,7 +29834,7 @@ const Text = styled.span`
|
|
|
29373
29834
|
margin-left: 5px;
|
|
29374
29835
|
`;
|
|
29375
29836
|
|
|
29376
|
-
const Button$
|
|
29837
|
+
const Button$3 = styled.button`
|
|
29377
29838
|
display: none;
|
|
29378
29839
|
position: absolute;
|
|
29379
29840
|
top: 0;
|
|
@@ -29411,9 +29872,9 @@ var RemovableTag = function (_a) {
|
|
|
29411
29872
|
var index = _a.index, preposition = _a.preposition, label = _a.label; _a.value; _a.param; var clickHandler = _a.clickHandler;
|
|
29412
29873
|
return (React.createElement(Wrapper$2, { "data-testid": "RemovableTag" },
|
|
29413
29874
|
index > 0 && preposition && React.createElement(Preposition, null, preposition),
|
|
29414
|
-
React.createElement(Container$
|
|
29875
|
+
React.createElement(Container$B, null,
|
|
29415
29876
|
React.createElement(Text, null, label),
|
|
29416
|
-
React.createElement(Button$
|
|
29877
|
+
React.createElement(Button$3, { "aria-label": "Remove filter ".concat(label), onClick: clickHandler }, "x"))));
|
|
29417
29878
|
};
|
|
29418
29879
|
|
|
29419
29880
|
var NewsArticleListHeader = function (_a) {
|
|
@@ -29431,7 +29892,7 @@ var NewsArticleListHeader = function (_a) {
|
|
|
29431
29892
|
var removeFilterValue = function (param, value) {
|
|
29432
29893
|
removeValueFromParam(param, value);
|
|
29433
29894
|
};
|
|
29434
|
-
return (React.createElement(Container$
|
|
29895
|
+
return (React.createElement(Container$C, { "data-testid": "NewsArticleListHeader" },
|
|
29435
29896
|
React.createElement(LeftCol, null,
|
|
29436
29897
|
totalResults,
|
|
29437
29898
|
" article",
|
|
@@ -29485,7 +29946,7 @@ var NewsArticleOldBanner = function (_a) {
|
|
|
29485
29946
|
React.createElement("strong", null, "1 year old")));
|
|
29486
29947
|
};
|
|
29487
29948
|
|
|
29488
|
-
const Container$
|
|
29949
|
+
const Container$A = styled.main`
|
|
29489
29950
|
padding-top: 30px;
|
|
29490
29951
|
font-family: ${(props) => props.theme.theme_vars.fontstack};
|
|
29491
29952
|
|
|
@@ -29607,10 +30068,10 @@ const Container$y = styled.main`
|
|
|
29607
30068
|
*/
|
|
29608
30069
|
var PageMain = function (_a) {
|
|
29609
30070
|
var children = _a.children, classes = _a.classes, _b = _a.fullWidthText, fullWidthText = _b === void 0 ? false : _b, props = __rest(_a, ["children", "classes", "fullWidthText"]);
|
|
29610
|
-
return (React.createElement(Container$
|
|
30071
|
+
return (React.createElement(Container$A, __assign({ id: "main", className: classes, "$fullWidthText": fullWidthText }, props, { "data-testid": "PageMain" }), children));
|
|
29611
30072
|
};
|
|
29612
30073
|
|
|
29613
|
-
const Container$
|
|
30074
|
+
const Container$z = styled.aside`
|
|
29614
30075
|
padding-top: 30px;
|
|
29615
30076
|
`;
|
|
29616
30077
|
|
|
@@ -29619,10 +30080,10 @@ const Container$x = styled.aside`
|
|
|
29619
30080
|
*/
|
|
29620
30081
|
var PageSidebar = function (_a) {
|
|
29621
30082
|
var children = _a.children;
|
|
29622
|
-
return (React.createElement(Container$
|
|
30083
|
+
return (React.createElement(Container$z, { className: "sidebar" }, children));
|
|
29623
30084
|
};
|
|
29624
30085
|
|
|
29625
|
-
const Container$
|
|
30086
|
+
const Container$y = styled.div`
|
|
29626
30087
|
padding-top: 30px;
|
|
29627
30088
|
|
|
29628
30089
|
h1 {
|
|
@@ -29635,10 +30096,10 @@ const Container$w = styled.div`
|
|
|
29635
30096
|
*/
|
|
29636
30097
|
var PageTitle = function (_a) {
|
|
29637
30098
|
var children = _a.children, classes = _a.classes, props = __rest(_a, ["children", "classes"]);
|
|
29638
|
-
return (React.createElement(Container$
|
|
30099
|
+
return (React.createElement(Container$y, __assign({ "data-testid": "title", className: classes }, props), children));
|
|
29639
30100
|
};
|
|
29640
30101
|
|
|
29641
|
-
const Container$
|
|
30102
|
+
const Container$x = styled.div`
|
|
29642
30103
|
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) {
|
|
29643
30104
|
display: flex;
|
|
29644
30105
|
flex-wrap: wrap;
|
|
@@ -29680,7 +30141,7 @@ const Container$v = styled.div`
|
|
|
29680
30141
|
*/
|
|
29681
30142
|
var PageWithSidebarContainer = function (_a) {
|
|
29682
30143
|
var _b = _a.sidebarLeft, sidebarLeft = _b === void 0 ? false : _b, children = _a.children;
|
|
29683
|
-
return React.createElement(Container$
|
|
30144
|
+
return React.createElement(Container$x, { "$sidebarLeft": sidebarLeft }, children);
|
|
29684
30145
|
};
|
|
29685
30146
|
|
|
29686
30147
|
const backgroundDecider = (props) => {
|
|
@@ -29696,7 +30157,7 @@ const backgroundDecider = (props) => {
|
|
|
29696
30157
|
}
|
|
29697
30158
|
};
|
|
29698
30159
|
|
|
29699
|
-
const Container$
|
|
30160
|
+
const Container$w = styled.div`
|
|
29700
30161
|
${backgroundDecider};
|
|
29701
30162
|
padding-top: 1.5em;
|
|
29702
30163
|
font-family: ${(props) => props.theme.theme_vars.fontstack};
|
|
@@ -29704,7 +30165,7 @@ const Container$u = styled.div`
|
|
|
29704
30165
|
|
|
29705
30166
|
var PageWrapper = function (_a) {
|
|
29706
30167
|
var colour = _a.colour, children = _a.children;
|
|
29707
|
-
return (React.createElement(Container$
|
|
30168
|
+
return (React.createElement(Container$w, { "data-testid": "PageWrapper", "$colour": colour }, children));
|
|
29708
30169
|
};
|
|
29709
30170
|
|
|
29710
30171
|
const Wrapper$1 = styled.div`
|
|
@@ -29818,7 +30279,7 @@ var PhaseBanner = function (_a) {
|
|
|
29818
30279
|
React.createElement(PhaseContentContainer, { "$isHome": isHome }, children))));
|
|
29819
30280
|
};
|
|
29820
30281
|
|
|
29821
|
-
const Container$
|
|
30282
|
+
const Container$v = styled.div`
|
|
29822
30283
|
${(props) => props.theme.fontStyles};
|
|
29823
30284
|
overflow: hidden;
|
|
29824
30285
|
margin: 40px auto 5px auto;
|
|
@@ -29895,7 +30356,7 @@ const CTA = styled.a`
|
|
|
29895
30356
|
*/
|
|
29896
30357
|
var PromoBanner = function (_a) {
|
|
29897
30358
|
var title = _a.title, image1440x810 = _a.image1440x810, image144x81 = _a.image144x81, ctaText = _a.ctaText, ctaUrl = _a.ctaUrl, children = _a.children;
|
|
29898
|
-
return (React.createElement(Container$
|
|
30359
|
+
return (React.createElement(Container$v, null,
|
|
29899
30360
|
React.createElement(ImageLink, { href: ctaUrl, title: ctaText },
|
|
29900
30361
|
React.createElement(ResponsiveImage, { imageSmall: image144x81, imageLarge: image1440x810, imageAltText: ctaText, smallWidth: "144", largeWidth: "1440", ratio: "16by9", objectFit: "cover" })),
|
|
29901
30362
|
React.createElement(Wrapper, null,
|
|
@@ -30078,7 +30539,7 @@ var PromoBlock = function (_a) {
|
|
|
30078
30539
|
promos.length === 1 && React.createElement(Column, { small: "full", medium: "one-half", large: "one-half" }))))));
|
|
30079
30540
|
};
|
|
30080
30541
|
|
|
30081
|
-
const Container$
|
|
30542
|
+
const Container$u = styled.div`
|
|
30082
30543
|
display: block;
|
|
30083
30544
|
box-shadow: 1px 1px 5px 1px rgba(0, 0, 0, 0.2);
|
|
30084
30545
|
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
@@ -30195,7 +30656,7 @@ var PromoTabs = function (_a) {
|
|
|
30195
30656
|
var toggleTab = function (index) {
|
|
30196
30657
|
setActiveTab(index);
|
|
30197
30658
|
};
|
|
30198
|
-
return (React.createElement(Container$
|
|
30659
|
+
return (React.createElement(Container$u, { "data-testid": "PromoTabs" },
|
|
30199
30660
|
React.createElement(Row$1, null,
|
|
30200
30661
|
React.createElement(Column, { small: "full", medium: "one-third", large: "one-quarter", classes: "promo-tab-column" },
|
|
30201
30662
|
React.createElement("div", { role: "tablist" }, promos.map(function (promo, index) { return (React.createElement(TitleButton, { onClick: function () { return toggleTab(index); }, key: index, "$isActive": index === activeTab, role: "tab", id: "promo-tab-".concat(index), "aria-controls": "promo-tabpanel-".concat(index), "aria-selected": index === activeTab ? 'true' : 'false' }, promo.title)); }))),
|
|
@@ -30217,7 +30678,7 @@ var PromoTabs = function (_a) {
|
|
|
30217
30678
|
}))));
|
|
30218
30679
|
};
|
|
30219
30680
|
|
|
30220
|
-
const Container$
|
|
30681
|
+
const Container$t = styled.div`
|
|
30221
30682
|
display: block;
|
|
30222
30683
|
`;
|
|
30223
30684
|
|
|
@@ -30239,7 +30700,7 @@ const SmallScreen = styled.div`
|
|
|
30239
30700
|
|
|
30240
30701
|
var PromoTabsDisplay = function (_a) {
|
|
30241
30702
|
var promos = _a.promos;
|
|
30242
|
-
return (React.createElement(Container$
|
|
30703
|
+
return (React.createElement(Container$t, { "data-testid": "PromoTabsDisplay" },
|
|
30243
30704
|
React.createElement(LargeScreen, null,
|
|
30244
30705
|
React.createElement(PromoTabs, { promos: promos })),
|
|
30245
30706
|
React.createElement(SmallScreen, null,
|
|
@@ -30269,7 +30730,7 @@ var RatingValues = [
|
|
|
30269
30730
|
},
|
|
30270
30731
|
];
|
|
30271
30732
|
|
|
30272
|
-
const FormContainer$1 = styled(Container$
|
|
30733
|
+
const FormContainer$1 = styled(Container$A)`
|
|
30273
30734
|
display: block;
|
|
30274
30735
|
.grecaptcha-badge {
|
|
30275
30736
|
visibility: hidden;
|
|
@@ -30293,7 +30754,7 @@ const ShowFullForm = styled.div`
|
|
|
30293
30754
|
flex-direction: column;
|
|
30294
30755
|
`;
|
|
30295
30756
|
|
|
30296
|
-
const Legend$
|
|
30757
|
+
const Legend$3 = styled.legend`
|
|
30297
30758
|
margin-bottom: 5px;
|
|
30298
30759
|
font-weight: 600;
|
|
30299
30760
|
font-size: 1.1em;
|
|
@@ -30306,9 +30767,9 @@ const Label$5 = styled.label`
|
|
|
30306
30767
|
|
|
30307
30768
|
const Hint = styled.p``;
|
|
30308
30769
|
|
|
30309
|
-
const FormErrorText = styled(ErrorText$3)``;
|
|
30770
|
+
const FormErrorText$1 = styled(ErrorText$3)``;
|
|
30310
30771
|
|
|
30311
|
-
const Hidden = styled.span`
|
|
30772
|
+
const Hidden$1 = styled.span`
|
|
30312
30773
|
${VisuallyHidden$3}
|
|
30313
30774
|
`;
|
|
30314
30775
|
|
|
@@ -30374,7 +30835,7 @@ const ErrorText = styled.p`
|
|
|
30374
30835
|
}
|
|
30375
30836
|
`;
|
|
30376
30837
|
|
|
30377
|
-
const Container$
|
|
30838
|
+
const Container$s = styled.div`
|
|
30378
30839
|
display: block;
|
|
30379
30840
|
`;
|
|
30380
30841
|
|
|
@@ -30390,7 +30851,7 @@ var CharacterCount = function (_a) {
|
|
|
30390
30851
|
var calculatedRemaining = maxLength - input.length;
|
|
30391
30852
|
setRemaining(calculatedRemaining < 0 ? 0 : calculatedRemaining);
|
|
30392
30853
|
}, [input]);
|
|
30393
|
-
return (React.createElement(Container$
|
|
30854
|
+
return (React.createElement(Container$s, { "data-testid": "CharacterCount" },
|
|
30394
30855
|
React.createElement(Count, { "aria-live": "polite" },
|
|
30395
30856
|
"You have ",
|
|
30396
30857
|
remaining,
|
|
@@ -30410,14 +30871,15 @@ var Textarea = function (_a) {
|
|
|
30410
30871
|
maxLength && typeof value === 'string' && React.createElement(CharacterCount, { maxLength: maxLength, input: value }))) : (React.createElement(StyledTextarea, { onChange: onChange, placeholder: placeholder, name: name, "$isErrored": isErrored, maxLength: maxLength, defaultValue: defaultValue, id: id, "$isFullWidth": isFullWidth }))));
|
|
30411
30872
|
};
|
|
30412
30873
|
|
|
30413
|
-
const Container$
|
|
30874
|
+
const Container$r = styled.div`
|
|
30414
30875
|
display: block;
|
|
30415
30876
|
border-left: ${(props) =>
|
|
30416
30877
|
props.$isErrored
|
|
30417
|
-
? `${props.theme.theme_vars.
|
|
30878
|
+
? `${props.theme.theme_vars.border_width_error} solid ${props.theme.theme_vars.colours.negative}`
|
|
30418
30879
|
: 'none'};
|
|
30419
30880
|
padding-left: ${(props) => (props.$isErrored ? ` ${props.theme.theme_vars.spacingSizes.extra_small}` : '0')};
|
|
30420
|
-
padding-bottom:
|
|
30881
|
+
padding-bottom: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
30882
|
+
padding-top: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
30421
30883
|
`;
|
|
30422
30884
|
|
|
30423
30885
|
const Category$2 = styled.div`
|
|
@@ -30485,8 +30947,6 @@ const CategoryInputLabel = styled.label`
|
|
|
30485
30947
|
-ms-touch-action: manipulation;
|
|
30486
30948
|
touch-action: manipulation;
|
|
30487
30949
|
color: #0b0c0c;
|
|
30488
|
-
display: block;
|
|
30489
|
-
margin-bottom: 5px;
|
|
30490
30950
|
|
|
30491
30951
|
&:before {
|
|
30492
30952
|
content: '';
|
|
@@ -30513,11 +30973,11 @@ const CategoryInputLabel = styled.label`
|
|
|
30513
30973
|
`;
|
|
30514
30974
|
|
|
30515
30975
|
var RadioCheckboxInput = function (_a) {
|
|
30516
|
-
var singleSelection = _a.singleSelection, value = _a.value, name = _a.name, onChange = _a.onChange, checked = _a.checked, label = _a.label, _b = _a.isErrored, isErrored = _b === void 0 ? false : _b;
|
|
30976
|
+
var singleSelection = _a.singleSelection, value = _a.value, name = _a.name, onChange = _a.onChange, checked = _a.checked, label = _a.label, _b = _a.isErrored, isErrored = _b === void 0 ? false : _b, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c;
|
|
30517
30977
|
var id = useId();
|
|
30518
|
-
return (React.createElement(Container$
|
|
30978
|
+
return (React.createElement(Container$r, { "data-testid": "RadioCheckboxInput", "$isErrored": isErrored },
|
|
30519
30979
|
React.createElement(Category$2, null,
|
|
30520
|
-
React.createElement(CategoryInput, { type: singleSelection ? 'radio' : 'checkbox', value: value, id: id, name: name, onClick: onChange, defaultChecked: checked }),
|
|
30980
|
+
React.createElement(CategoryInput, { type: singleSelection ? 'radio' : 'checkbox', value: value, id: id, name: name, onClick: onChange, defaultChecked: checked, disabled: isDisabled }),
|
|
30521
30981
|
React.createElement(CategoryInputLabel, { "$isChecked": checked, htmlFor: id, "$singleSelection": singleSelection }, label))));
|
|
30522
30982
|
};
|
|
30523
30983
|
|
|
@@ -30597,7 +31057,7 @@ function R({
|
|
|
30597
31057
|
};
|
|
30598
31058
|
}
|
|
30599
31059
|
|
|
30600
|
-
const Container$
|
|
31060
|
+
const Container$q = styled.div`
|
|
30601
31061
|
display: flex;
|
|
30602
31062
|
flex-direction: column;
|
|
30603
31063
|
justify-content: center;
|
|
@@ -30633,12 +31093,12 @@ const Content$4 = styled.div`
|
|
|
30633
31093
|
*/
|
|
30634
31094
|
var Panel = function (_a) {
|
|
30635
31095
|
var heading = _a.heading, children = _a.children;
|
|
30636
|
-
return (React.createElement(Container$
|
|
31096
|
+
return (React.createElement(Container$q, { "data-testid": "Panel" },
|
|
30637
31097
|
React.createElement(Heading, null, heading),
|
|
30638
31098
|
children && React.createElement(Content$4, null, children)));
|
|
30639
31099
|
};
|
|
30640
31100
|
|
|
30641
|
-
const Container$
|
|
31101
|
+
const Container$p = styled.div`
|
|
30642
31102
|
display: block;
|
|
30643
31103
|
width: 100%;
|
|
30644
31104
|
padding: 0 ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
@@ -30664,7 +31124,7 @@ const ErrorLink = styled.a`
|
|
|
30664
31124
|
|
|
30665
31125
|
var ErrorSummary = function (_a) {
|
|
30666
31126
|
var errors = _a.errors;
|
|
30667
|
-
return (React.createElement(Container$
|
|
31127
|
+
return (React.createElement(Container$p, { "data-testid": "ErrorSummary" },
|
|
30668
31128
|
React.createElement(Heading$1, { level: 2, text: "There is a problem" }),
|
|
30669
31129
|
React.createElement(ErrorList, null, Object.keys(errors).map(function (field) { return (React.createElement(ErrorMessage, { key: field },
|
|
30670
31130
|
React.createElement(ErrorLink, { href: "#".concat(field, "Error") }, errors[field].message))); }))));
|
|
@@ -30769,12 +31229,12 @@ var RateThisPage = function (_a) {
|
|
|
30769
31229
|
errors && Object.keys(errors).length > 0 && React.createElement(ErrorSummary, { errors: errors }),
|
|
30770
31230
|
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
30771
31231
|
React.createElement("fieldset", { "aria-describedby": errors.IsHelpful ? 'IsHelpfulError' : 'IsHelpfulLegend' },
|
|
30772
|
-
React.createElement(Legend$
|
|
31232
|
+
React.createElement(Legend$3, { id: "IsHelpfulLegend" }, "Is this information helpful?"),
|
|
30773
31233
|
React.createElement(Controller, { name: "IsHelpful", control: control, rules: { required: { value: true, message: 'The field is this information helpful is required.' } }, render: function (_a) {
|
|
30774
31234
|
var _b = _a.field, onChange = _b.onChange, value = _b.value;
|
|
30775
31235
|
return (React.createElement(React.Fragment, null,
|
|
30776
|
-
errors.IsHelpful && (React.createElement(FormErrorText, { id: "IsHelpfulError" },
|
|
30777
|
-
React.createElement(Hidden, null, "Error:"),
|
|
31236
|
+
errors.IsHelpful && (React.createElement(FormErrorText$1, { id: "IsHelpfulError" },
|
|
31237
|
+
React.createElement(Hidden$1, null, "Error:"),
|
|
30778
31238
|
" ",
|
|
30779
31239
|
errors.IsHelpful.message)),
|
|
30780
31240
|
Object.entries(HelpfulEnum).map(function (_a) {
|
|
@@ -30805,11 +31265,11 @@ var RateThisPage = function (_a) {
|
|
|
30805
31265
|
React.createElement("li", null, "I don't think I have been treated fairly"),
|
|
30806
31266
|
React.createElement("li", null, "I feel as if I have been misled")),
|
|
30807
31267
|
React.createElement(QuestionButton, null,
|
|
30808
|
-
React.createElement(Button$
|
|
31268
|
+
React.createElement(Button$5, { url: complaintsFormLink }, "I have a comment or complaint about this service"))))),
|
|
30809
31269
|
React.createElement(ShowFullForm, { "$show": showFullForm },
|
|
30810
31270
|
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
30811
31271
|
React.createElement("fieldset", { "aria-describedby": "HowEasyToFindLegend" },
|
|
30812
|
-
React.createElement(Legend$
|
|
31272
|
+
React.createElement(Legend$3, { id: "HowEasyToFindLegend" }, "How easy was it to find what you were looking for?"),
|
|
30813
31273
|
React.createElement(Hint, null, "1 being very easy and 5 being extremely difficult."),
|
|
30814
31274
|
React.createElement(Controller, { name: "HowEasyToFind", control: control, rules: {
|
|
30815
31275
|
pattern: {
|
|
@@ -30823,15 +31283,15 @@ var RateThisPage = function (_a) {
|
|
|
30823
31283
|
}, render: function (_a) {
|
|
30824
31284
|
var _b = _a.field, onChange = _b.onChange, value = _b.value;
|
|
30825
31285
|
return (React.createElement(React.Fragment, null,
|
|
30826
|
-
errors.HowEasyToFind && (React.createElement(FormErrorText, { id: "HowEasyToFindError" },
|
|
30827
|
-
React.createElement(Hidden, null, "Error:"),
|
|
31286
|
+
errors.HowEasyToFind && (React.createElement(FormErrorText$1, { id: "HowEasyToFindError" },
|
|
31287
|
+
React.createElement(Hidden$1, null, "Error:"),
|
|
30828
31288
|
" ",
|
|
30829
31289
|
errors.HowEasyToFind.message)),
|
|
30830
31290
|
RatingValues.map(function (ratingValue, index) { return (React.createElement(RadioCheckboxInput, { key: index, value: ratingValue.value, label: ratingValue.label, checked: String(value) == ratingValue.value, name: "HowEasyToFind", singleSelection: true, onChange: onChange, isErrored: errors.HowEasyToFind ? true : false })); })));
|
|
30831
31291
|
} }))),
|
|
30832
31292
|
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
30833
31293
|
React.createElement("fieldset", { "aria-describedby": "HowEasyToUnderstandLegend" },
|
|
30834
|
-
React.createElement(Legend$
|
|
31294
|
+
React.createElement(Legend$3, { id: "HowEasyToUnderstandLegend" }, "How easy was this content to understand?"),
|
|
30835
31295
|
React.createElement(Hint, null, "1 being very easy and 5 being extremely difficult."),
|
|
30836
31296
|
React.createElement(Controller, { name: "HowEasyToUnderstand", control: control, rules: {
|
|
30837
31297
|
pattern: {
|
|
@@ -30845,8 +31305,8 @@ var RateThisPage = function (_a) {
|
|
|
30845
31305
|
}, render: function (_a) {
|
|
30846
31306
|
var _b = _a.field, onChange = _b.onChange, value = _b.value;
|
|
30847
31307
|
return (React.createElement(React.Fragment, null,
|
|
30848
|
-
errors.HowEasyToUnderstand && (React.createElement(FormErrorText, { id: "HowEasyToUnderstandError" },
|
|
30849
|
-
React.createElement(Hidden, null, "Error:"),
|
|
31308
|
+
errors.HowEasyToUnderstand && (React.createElement(FormErrorText$1, { id: "HowEasyToUnderstandError" },
|
|
31309
|
+
React.createElement(Hidden$1, null, "Error:"),
|
|
30850
31310
|
" ",
|
|
30851
31311
|
errors.HowEasyToUnderstand.message)),
|
|
30852
31312
|
RatingValues.map(function (ratingValue, index) { return (React.createElement(RadioCheckboxInput, { key: index, value: ratingValue.value, label: ratingValue.label, checked: String(value) == ratingValue.value, name: "HowEasyToUnderstand", singleSelection: true, onChange: onChange, isErrored: errors.HowEasyToUnderstand ? true : false })); })));
|
|
@@ -30908,7 +31368,7 @@ var RateThisPage = function (_a) {
|
|
|
30908
31368
|
React.createElement("div", { id: recaptchaContainerId, className: "g-recaptcha" })));
|
|
30909
31369
|
};
|
|
30910
31370
|
|
|
30911
|
-
const Container$
|
|
31371
|
+
const Container$o = styled.div`
|
|
30912
31372
|
${(props) => props.theme.fontStyles};
|
|
30913
31373
|
`;
|
|
30914
31374
|
|
|
@@ -30917,7 +31377,7 @@ const ResultInfo$2 = styled.div`
|
|
|
30917
31377
|
margin: ${(props) => props.theme.theme_vars.spacingSizes.large} 0;
|
|
30918
31378
|
`;
|
|
30919
31379
|
|
|
30920
|
-
const Result = styled.div`
|
|
31380
|
+
const Result$1 = styled.div`
|
|
30921
31381
|
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.x_large};
|
|
30922
31382
|
|
|
30923
31383
|
&:first-of-type {
|
|
@@ -31082,18 +31542,18 @@ var SearchResultsList = function (_a) {
|
|
|
31082
31542
|
return Math.ceil(Math.abs(currentDate.getTime() - dateObject.getTime()) / (1000 * 60 * 60 * 24)) > 365;
|
|
31083
31543
|
};
|
|
31084
31544
|
if (totalResults === 0) {
|
|
31085
|
-
return (React.createElement(Container$
|
|
31545
|
+
return (React.createElement(Container$o, { "data-testid": "SearchResultsList" },
|
|
31086
31546
|
React.createElement(ResultInfo$2, null, "No results found")));
|
|
31087
31547
|
}
|
|
31088
31548
|
else {
|
|
31089
|
-
return (React.createElement(Container$
|
|
31549
|
+
return (React.createElement(Container$o, { "data-testid": "SearchResultsList" },
|
|
31090
31550
|
React.createElement(ResultInfo$2, null,
|
|
31091
31551
|
pageNumber > 1 && 'Page ' + pageNumber + ' of ',
|
|
31092
31552
|
totalResults,
|
|
31093
31553
|
" total results for '",
|
|
31094
31554
|
searchTerm,
|
|
31095
31555
|
"'"),
|
|
31096
|
-
results.map(function (result, i) { return (React.createElement(Result, { key: i },
|
|
31556
|
+
results.map(function (result, i) { return (React.createElement(Result$1, { key: i },
|
|
31097
31557
|
result.service && React.createElement(ServiceArea, null, result.service),
|
|
31098
31558
|
React.createElement(Title$4, { href: result.link }, result.title),
|
|
31099
31559
|
result.published && result.service === 'News' && isOld(result.published) && React.createElement(NewsArticleOldBanner, null),
|
|
@@ -31104,7 +31564,7 @@ var SearchResultsList = function (_a) {
|
|
|
31104
31564
|
}
|
|
31105
31565
|
};
|
|
31106
31566
|
|
|
31107
|
-
const Container$
|
|
31567
|
+
const Container$n = styled.div`
|
|
31108
31568
|
li {
|
|
31109
31569
|
line-height: 1.5;
|
|
31110
31570
|
}
|
|
@@ -31209,7 +31669,7 @@ styled.img`
|
|
|
31209
31669
|
*/
|
|
31210
31670
|
var SectionLinks = function (_a) {
|
|
31211
31671
|
var sectionTitle = _a.sectionTitle, _b = _a.displayTitle, displayTitle = _b === void 0 ? true : _b, sectionSlug = _a.sectionSlug, pageLinksArray = _a.pageLinksArray, _c = _a.hasImages, hasImages = _c === void 0 ? false : _c;
|
|
31212
|
-
return (React.createElement(Container$
|
|
31672
|
+
return (React.createElement(Container$n, { id: sectionSlug, "data-testid": "SectionLinks" },
|
|
31213
31673
|
displayTitle ? React.createElement(SectionTitle$1, { text: sectionTitle }) : React.createElement("br", null),
|
|
31214
31674
|
React.createElement(Row$1, { isList: true }, pageLinksArray.map(function (link, i) {
|
|
31215
31675
|
var _a;
|
|
@@ -31221,7 +31681,7 @@ var SectionLinks = function (_a) {
|
|
|
31221
31681
|
}))));
|
|
31222
31682
|
};
|
|
31223
31683
|
|
|
31224
|
-
const Container$
|
|
31684
|
+
const Container$m = styled.aside`
|
|
31225
31685
|
padding-top: 20px;
|
|
31226
31686
|
display: block;
|
|
31227
31687
|
|
|
@@ -31307,14 +31767,14 @@ const InlineLink = styled.a`
|
|
|
31307
31767
|
|
|
31308
31768
|
var SectionLinksMobileContents = function (_a) {
|
|
31309
31769
|
var sectionLinksArray = _a.sectionLinksArray;
|
|
31310
|
-
return (React.createElement(Container$
|
|
31770
|
+
return (React.createElement(Container$m, null,
|
|
31311
31771
|
React.createElement(Contents, null,
|
|
31312
31772
|
React.createElement(ContentsTitle, null, "Contents"),
|
|
31313
31773
|
React.createElement(ContentsList, null, sectionLinksArray.map(function (link) { return (React.createElement(ContentsItem, { key: link.title },
|
|
31314
31774
|
React.createElement(InlineLink, { href: '#' + link.id, title: link.title }, link.title))); })))));
|
|
31315
31775
|
};
|
|
31316
31776
|
|
|
31317
|
-
const Container$
|
|
31777
|
+
const Container$l = styled.div`
|
|
31318
31778
|
${(props) => props.theme.fontStyles}
|
|
31319
31779
|
background-color: ${(props) => props.theme.theme_vars.colours.action_light};
|
|
31320
31780
|
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
@@ -31463,7 +31923,7 @@ const ListItemLink = styled.a`
|
|
|
31463
31923
|
var SectionLinksSidebar = function (_a) {
|
|
31464
31924
|
var Title = _a.Title, Sections = _a.Sections;
|
|
31465
31925
|
var _b = useState(false), open = _b[0], setOpen = _b[1];
|
|
31466
|
-
return (React.createElement(Container$
|
|
31926
|
+
return (React.createElement(Container$l, { "data-testid": "SectionLinksSidebar" },
|
|
31467
31927
|
React.createElement(MobileTitleButton, { onClick: function () { return (open ? setOpen(false) : setOpen(true)); } },
|
|
31468
31928
|
Title,
|
|
31469
31929
|
React.createElement(IconWrapper$2, null,
|
|
@@ -31475,7 +31935,7 @@ var SectionLinksSidebar = function (_a) {
|
|
|
31475
31935
|
React.createElement(ListItemLink, { href: link.url }, link.title))); })))); }))));
|
|
31476
31936
|
};
|
|
31477
31937
|
|
|
31478
|
-
const Container$
|
|
31938
|
+
const Container$k = styled.div`
|
|
31479
31939
|
position: relative;
|
|
31480
31940
|
isolation: isolate;
|
|
31481
31941
|
`;
|
|
@@ -31629,7 +32089,7 @@ var ServiceLinksBoxed = function (_a) {
|
|
|
31629
32089
|
var _a;
|
|
31630
32090
|
return (_a = refs.current[index]) !== null && _a !== void 0 ? _a : React.createRef();
|
|
31631
32091
|
});
|
|
31632
|
-
return (React.createElement(Container$
|
|
32092
|
+
return (React.createElement(Container$k, { "data-testid": "ServiceLinksBoxed" },
|
|
31633
32093
|
React.createElement(Row$1, null, serviceLinksArray.map(function (serviceLink, index) {
|
|
31634
32094
|
var _a;
|
|
31635
32095
|
return (React.createElement(Column, { small: "full", medium: "one-half", large: "one-third", key: index },
|
|
@@ -31666,7 +32126,7 @@ const containerMaxHeight = (props) => {
|
|
|
31666
32126
|
}
|
|
31667
32127
|
};
|
|
31668
32128
|
|
|
31669
|
-
const Container$
|
|
32129
|
+
const Container$j = styled.div`
|
|
31670
32130
|
${(props) => props.theme.fontStyles}
|
|
31671
32131
|
${containerMaxHeight}
|
|
31672
32132
|
|
|
@@ -32070,7 +32530,7 @@ var ServicesLinksList = function (_a) {
|
|
|
32070
32530
|
}
|
|
32071
32531
|
}, [currentOrder]);
|
|
32072
32532
|
return (React.createElement(React.Fragment, null,
|
|
32073
|
-
React.createElement(Container$
|
|
32533
|
+
React.createElement(Container$j, { id: serviceId, className: open && 'open', "$hideHeader": hideHeader, "$isBoxed": isBoxed },
|
|
32074
32534
|
!hideHeader && (React.createElement(HomeTitle, { "data-testid": "servicesLinksListHeader" },
|
|
32075
32535
|
React.createElement(Heading$1, { text: "Council services" }),
|
|
32076
32536
|
React.createElement(ReorderControl, null,
|
|
@@ -32099,7 +32559,7 @@ var ServicesLinksList = function (_a) {
|
|
|
32099
32559
|
" services")))));
|
|
32100
32560
|
};
|
|
32101
32561
|
|
|
32102
|
-
const Container$
|
|
32562
|
+
const Container$i = styled.div`
|
|
32103
32563
|
${(props) => props.theme.fontStyles}
|
|
32104
32564
|
max-width: 500px;
|
|
32105
32565
|
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
@@ -32143,7 +32603,7 @@ const SingleButtonContainer = styled.div`
|
|
|
32143
32603
|
}
|
|
32144
32604
|
`;
|
|
32145
32605
|
|
|
32146
|
-
const Container$
|
|
32606
|
+
const Container$h = styled.div`
|
|
32147
32607
|
strong {
|
|
32148
32608
|
font-weight: bold;
|
|
32149
32609
|
}
|
|
@@ -32408,7 +32868,7 @@ var PostCodeSearch = function (_a) {
|
|
|
32408
32868
|
setCurrentPostcode(currentPostcode + ' (' + singleAddress.title + ')');
|
|
32409
32869
|
}
|
|
32410
32870
|
}
|
|
32411
|
-
return (React.createElement(Container$
|
|
32871
|
+
return (React.createElement(Container$h, { "data-testid": "PostCodeSearch" },
|
|
32412
32872
|
React.createElement(DropDownButton, { onClick: function () { return setOpen(open ? false : true); } },
|
|
32413
32873
|
React.createElement(IconWrapper, null,
|
|
32414
32874
|
React.createElement(ChevronIcon, { direction: open ? 'down' : 'right', colourFill: themeContext.theme_vars.colours.black })),
|
|
@@ -32475,7 +32935,7 @@ var PostCodeSearch = function (_a) {
|
|
|
32475
32935
|
" Northamptonshire website and find your local area (",
|
|
32476
32936
|
responseData[sovereignType][0].name,
|
|
32477
32937
|
") for this service."),
|
|
32478
|
-
React.createElement(Button$
|
|
32938
|
+
React.createElement(Button$5, { size: "large", colourOverride: themeContext.theme_vars.other_council_action, text: 'Go to ' + responseData.unitaries[0].name + " Northamptonshire's website", url: otherCouncilLink, isExternal: true }),
|
|
32479
32939
|
React.createElement("br", null))),
|
|
32480
32940
|
React.createElement(StartAgain, { onClick: function () { return clearData(); } }, "Check another postcode")))))))));
|
|
32481
32941
|
};
|
|
@@ -32484,7 +32944,7 @@ var SignpostLinks = function (_a) {
|
|
|
32484
32944
|
var signpostLinksArray = _a.signpostLinksArray, _b = _a.TopLineText, TopLineText = _b === void 0 ? 'Select your local area for more information:' : _b, otherCouncilLink = _a.otherCouncilLink, _c = _a.sovereignType, sovereignType = _c === void 0 ? 'sovereigns' : _c;
|
|
32485
32945
|
var themeContext = useContext(ThemeContext);
|
|
32486
32946
|
var councilLink = otherCouncilLink ? otherCouncilLink : themeContext.theme_vars.other_council_link;
|
|
32487
|
-
return (React.createElement(React.Fragment, null, signpostLinksArray.length > 1 ? (React.createElement(Container$
|
|
32947
|
+
return (React.createElement(React.Fragment, null, signpostLinksArray.length > 1 ? (React.createElement(Container$i, null,
|
|
32488
32948
|
React.createElement(Paragraph, null, TopLineText),
|
|
32489
32949
|
React.createElement(SignpostLinksList, { signpostLinksArray: signpostLinksArray }),
|
|
32490
32950
|
React.createElement(PostCodeSearch, { otherCouncilLink: councilLink, signPostLinks: signpostLinksArray, sovereignType: sovereignType }),
|
|
@@ -32492,7 +32952,7 @@ var SignpostLinks = function (_a) {
|
|
|
32492
32952
|
"If your area isn't listed, you may be a resident of\u00A0",
|
|
32493
32953
|
React.createElement(SignpostLink, { href: councilLink, title: themeContext.theme_vars.other_council_name + ' (this link will take you to an external website)' }, themeContext.theme_vars.other_council_name),
|
|
32494
32954
|
".")))) : (React.createElement(SingleButtonContainer, null,
|
|
32495
|
-
React.createElement(Button$
|
|
32955
|
+
React.createElement(Button$5, { url: signpostLinksArray[0].url, title: signpostLinksArray[0].areaName + ' (this link will take you to an external website)' },
|
|
32496
32956
|
React.createElement(LinkIcon, null),
|
|
32497
32957
|
signpostLinksArray[0].cta_text ? signpostLinksArray[0].cta_text : signpostLinksArray[0].areaName)))));
|
|
32498
32958
|
};
|
|
@@ -32578,7 +33038,7 @@ const summaryStyles = (props) => {
|
|
|
32578
33038
|
}
|
|
32579
33039
|
};
|
|
32580
33040
|
|
|
32581
|
-
const Container$
|
|
33041
|
+
const Container$g = styled.div`
|
|
32582
33042
|
padding: ${(props) => (props.$hasPadding ? '30px 20px' : '0')};
|
|
32583
33043
|
font-size: 1.2em;
|
|
32584
33044
|
margin-bottom: 15px;
|
|
@@ -32595,7 +33055,7 @@ const Container$e = styled.div`
|
|
|
32595
33055
|
|
|
32596
33056
|
var Summary = function (_a) {
|
|
32597
33057
|
var children = _a.children, _b = _a.hasBackground, hasBackground = _b === void 0 ? true : _b, _c = _a.hasPadding, hasPadding = _c === void 0 ? true : _c;
|
|
32598
|
-
return (React.createElement(Container$
|
|
33058
|
+
return (React.createElement(Container$g, { "data-testid": "Summary", "$hasBackground": hasBackground, "$hasPadding": hasPadding }, children));
|
|
32599
33059
|
};
|
|
32600
33060
|
|
|
32601
33061
|
/**
|
|
@@ -32611,7 +33071,7 @@ var DirectoryDocuments = function (_a) {
|
|
|
32611
33071
|
};
|
|
32612
33072
|
var from = pageNumber * perPage - (perPage - 1);
|
|
32613
33073
|
from + ((documents === null || documents === void 0 ? void 0 : documents.length) ? documents.length - 1 : 0);
|
|
32614
|
-
return (React.createElement(Container
|
|
33074
|
+
return (React.createElement(Container$11, { "data-testid": "DirectoryDocuments" },
|
|
32615
33075
|
React.createElement(FormWithLine, { onSubmit: submitSearch, hideLine: true },
|
|
32616
33076
|
React.createElement(Row$1, null,
|
|
32617
33077
|
React.createElement(Column, { small: "full", medium: "one-half", large: "one-half" },
|
|
@@ -32777,7 +33237,7 @@ var GoogleMap = function (_a) {
|
|
|
32777
33237
|
React.createElement(MapLink$1, { href: link_url }, link_title ? link_title : 'Google Maps link')))));
|
|
32778
33238
|
};
|
|
32779
33239
|
|
|
32780
|
-
const Container$
|
|
33240
|
+
const Container$f = styled.figure`
|
|
32781
33241
|
display: block;
|
|
32782
33242
|
background: ${(props) =>
|
|
32783
33243
|
props.theme.cardinal_name === 'north'
|
|
@@ -32810,12 +33270,12 @@ const Caption = styled.figcaption`
|
|
|
32810
33270
|
*/
|
|
32811
33271
|
var Image = function (_a) {
|
|
32812
33272
|
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;
|
|
32813
|
-
return (React.createElement(Container$
|
|
33273
|
+
return (React.createElement(Container$f, { "data-testid": "Image", "$wrapText": wrapText },
|
|
32814
33274
|
React.createElement(ResponsiveImage, { imageSmall: imageSmall, imageLarge: imageLarge, imageAltText: imageAltText, ratio: ratio, smallWidth: "400", largeWidth: "1200" }),
|
|
32815
33275
|
(caption === null || caption === void 0 ? void 0 : caption.trim()) && React.createElement(Caption, null, caption)));
|
|
32816
33276
|
};
|
|
32817
33277
|
|
|
32818
|
-
const Container$
|
|
33278
|
+
const Container$e = styled.div`
|
|
32819
33279
|
display: block;
|
|
32820
33280
|
`;
|
|
32821
33281
|
|
|
@@ -32836,7 +33296,7 @@ const Content$3 = styled.div`
|
|
|
32836
33296
|
*/
|
|
32837
33297
|
var ImageAndText = function (_a) {
|
|
32838
33298
|
var heading = _a.heading, textContent = _a.textContent, image = _a.image;
|
|
32839
|
-
return (React.createElement(Container$
|
|
33299
|
+
return (React.createElement(Container$e, { "data-testid": "ImageAndText" },
|
|
32840
33300
|
React.createElement(Row$1, null,
|
|
32841
33301
|
heading && (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
32842
33302
|
React.createElement(HeadingContainer, null,
|
|
@@ -32858,7 +33318,7 @@ var CaseAppointmentType;
|
|
|
32858
33318
|
CaseAppointmentType["Writing"] = "writing";
|
|
32859
33319
|
})(CaseAppointmentType || (CaseAppointmentType = {}));
|
|
32860
33320
|
|
|
32861
|
-
const Container$
|
|
33321
|
+
const Container$d = styled.div`
|
|
32862
33322
|
display: block;
|
|
32863
33323
|
box-sizing: border-box;
|
|
32864
33324
|
`;
|
|
@@ -32981,7 +33441,7 @@ var InquestSchedule = function (_a) {
|
|
|
32981
33441
|
};
|
|
32982
33442
|
});
|
|
32983
33443
|
};
|
|
32984
|
-
return (React.createElement(Container$
|
|
33444
|
+
return (React.createElement(Container$d, { "data-testid": "InquestSchedule" },
|
|
32985
33445
|
Object.keys(hearingDayGrouped).length > 0 && (React.createElement(GroupContainer, null,
|
|
32986
33446
|
React.createElement(Heading$1, { level: 2, text: title }),
|
|
32987
33447
|
React.createElement(Accordion$1, { sections: transformToSections(hearingDayGrouped) }))),
|
|
@@ -33016,6 +33476,183 @@ var Promotions = function (_a) {
|
|
|
33016
33476
|
numberOfPromos > 1 && React.createElement(PromoBlock, { promos: promos.slice(1, numberOfPromos) })));
|
|
33017
33477
|
};
|
|
33018
33478
|
|
|
33479
|
+
const Container$c = styled.div`
|
|
33480
|
+
display: block;
|
|
33481
|
+
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
33482
|
+
`;
|
|
33483
|
+
|
|
33484
|
+
const Button$2 = styled.button`
|
|
33485
|
+
font-weight: 700;
|
|
33486
|
+
border: 0;
|
|
33487
|
+
cursor: pointer;
|
|
33488
|
+
display: inline-block;
|
|
33489
|
+
line-height: 1;
|
|
33490
|
+
font-family: ${(props) => props.theme.theme_vars.fontstack};
|
|
33491
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
33492
|
+
text-decoration: none !important;
|
|
33493
|
+
width: auto;
|
|
33494
|
+
text-align: center;
|
|
33495
|
+
color: white !important;
|
|
33496
|
+
font-size: 16px;
|
|
33497
|
+
padding: 16px 24px;
|
|
33498
|
+
background-color: ${(props) =>
|
|
33499
|
+
props.$colourOverride ? props.$colourOverride : props.theme.theme_vars.colours.action};
|
|
33500
|
+
|
|
33501
|
+
&:hover {
|
|
33502
|
+
background-color: ${(props) =>
|
|
33503
|
+
props.$colourOverride ? props.$colourOverride : props.theme.theme_vars.colours.action_dark};
|
|
33504
|
+
}
|
|
33505
|
+
&:focus {
|
|
33506
|
+
color: ${(props) => props.theme.theme_vars.colours.black} !important;
|
|
33507
|
+
border-color: ${(props) => props.theme.theme_vars.colours.focus};
|
|
33508
|
+
${(props) => props.theme.linkStylesFocus}
|
|
33509
|
+
}
|
|
33510
|
+
&:active {
|
|
33511
|
+
transform: translateY(2px);
|
|
33512
|
+
color: ${(props) => props.theme.theme_vars.colours.black} !important;
|
|
33513
|
+
border-color: ${(props) => props.theme.theme_vars.colours.focus};
|
|
33514
|
+
${(props) => props.theme.linkStylesActive}
|
|
33515
|
+
}
|
|
33516
|
+
`;
|
|
33517
|
+
|
|
33518
|
+
const Container$b = styled.div`
|
|
33519
|
+
display: block;
|
|
33520
|
+
`;
|
|
33521
|
+
|
|
33522
|
+
const CategoryContainer = styled.div`
|
|
33523
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
33524
|
+
background-color: ${(props) => props.theme.theme_vars.colours.action_light};
|
|
33525
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
33526
|
+
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
33527
|
+
`;
|
|
33528
|
+
|
|
33529
|
+
const Legend$2 = styled.legend`
|
|
33530
|
+
font-weight: bold;
|
|
33531
|
+
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
33532
|
+
`;
|
|
33533
|
+
|
|
33534
|
+
const FormErrorText = styled(ErrorText$3)``;
|
|
33535
|
+
|
|
33536
|
+
const Hidden = styled.span`
|
|
33537
|
+
${VisuallyHidden$3}
|
|
33538
|
+
`;
|
|
33539
|
+
|
|
33540
|
+
const Answers = styled.div`
|
|
33541
|
+
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
33542
|
+
`;
|
|
33543
|
+
|
|
33544
|
+
const Result = styled.div`
|
|
33545
|
+
display: flex;
|
|
33546
|
+
flex-direction: row;
|
|
33547
|
+
flex-wrap: nowrap;
|
|
33548
|
+
align-items: center;
|
|
33549
|
+
margin: ${(props) => props.theme.theme_vars.spacingSizes.small} 0;
|
|
33550
|
+
`;
|
|
33551
|
+
|
|
33552
|
+
const ResultIcon = styled.div`
|
|
33553
|
+
width: ${(props) => props.theme.theme_vars.spacingSizes.x_large};
|
|
33554
|
+
color: ${(props) =>
|
|
33555
|
+
props.$correct ? props.theme.theme_vars.colours.positive : props.theme.theme_vars.colours.negative};
|
|
33556
|
+
margin-right: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
33557
|
+
`;
|
|
33558
|
+
|
|
33559
|
+
var QuestionAndAnswer = function (_a) {
|
|
33560
|
+
var questionText = _a.questionText, _b = _a.hintText, hintText = _b === void 0 ? '' : _b, answers = _a.answers, category = _a.category, icon = _a.icon, onSubmit = _a.onSubmit, _c = _a.index, index = _c === void 0 ? null : _c;
|
|
33561
|
+
var _d = useState(''), selectedAnswer = _d[0], setSelectedAnswer = _d[1];
|
|
33562
|
+
var _e = useState(false), hasError = _e[0], setHasError = _e[1];
|
|
33563
|
+
var _f = useState(null), correct = _f[0], setCorrect = _f[1];
|
|
33564
|
+
var _g = useState(null), summary = _g[0], setSummary = _g[1];
|
|
33565
|
+
var handleChange = function (e) {
|
|
33566
|
+
setSelectedAnswer(e.target.value);
|
|
33567
|
+
};
|
|
33568
|
+
var handleSubmit = function (e) {
|
|
33569
|
+
e.preventDefault();
|
|
33570
|
+
setHasError(false);
|
|
33571
|
+
if (selectedAnswer === '') {
|
|
33572
|
+
setHasError(true);
|
|
33573
|
+
return;
|
|
33574
|
+
}
|
|
33575
|
+
var selected = answers[selectedAnswer];
|
|
33576
|
+
setCorrect(selected.correctAnswer);
|
|
33577
|
+
setSummary(selected.answerSummary);
|
|
33578
|
+
if (onSubmit) {
|
|
33579
|
+
onSubmit(selected.correctAnswer, index);
|
|
33580
|
+
}
|
|
33581
|
+
};
|
|
33582
|
+
return (React.createElement(Container$b, { "data-testid": "QuestionAndAnswer" },
|
|
33583
|
+
category && (React.createElement(CategoryContainer, null,
|
|
33584
|
+
icon && category && React.createElement(HeadingWithIcon, { text: category, icon: icon, level: 3 }),
|
|
33585
|
+
category && !icon && React.createElement(Heading$1, { text: category, level: 3 }))),
|
|
33586
|
+
React.createElement(FormWithLine, { hideLine: true, onSubmit: handleSubmit },
|
|
33587
|
+
React.createElement("fieldset", null,
|
|
33588
|
+
React.createElement(Legend$2, null,
|
|
33589
|
+
index !== null && "".concat(index + 1, ". "),
|
|
33590
|
+
questionText),
|
|
33591
|
+
hintText && React.createElement(HintText, { text: hintText }),
|
|
33592
|
+
hasError && (React.createElement(FormErrorText, { id: "IsHelpfulError" },
|
|
33593
|
+
React.createElement(Hidden, null, "Error:"),
|
|
33594
|
+
" Please select an option")),
|
|
33595
|
+
React.createElement(Answers, null, answers.map(function (answer, index) { return (React.createElement(RadioCheckboxInput, { key: index, name: questionText, singleSelection: true, checked: selectedAnswer === index.toString(), value: index.toString(), label: answer.answerText, onChange: function (e) { return handleChange(e); }, isErrored: hasError, isDisabled: correct !== null })); }))),
|
|
33596
|
+
correct === null && React.createElement(FormButton, { text: "Submit", size: "large" })),
|
|
33597
|
+
correct !== null && (React.createElement(Result, null,
|
|
33598
|
+
React.createElement(ResultIcon, { "$correct": correct }, correct ? (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor" },
|
|
33599
|
+
React.createElement("title", null, "Correct"),
|
|
33600
|
+
React.createElement("path", { fillRule: "evenodd", d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z", clipRule: "evenodd" }))) : (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor" },
|
|
33601
|
+
React.createElement("title", null, "Incorrect"),
|
|
33602
|
+
React.createElement("path", { fillRule: "evenodd", d: "M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z", clipRule: "evenodd" })))),
|
|
33603
|
+
React.createElement("p", null, summary)))));
|
|
33604
|
+
};
|
|
33605
|
+
|
|
33606
|
+
var Quiz = function (_a) {
|
|
33607
|
+
var title = _a.title, questions = _a.questions;
|
|
33608
|
+
var _b = useState(0), activeQuestion = _b[0], setActiveQuestion = _b[1];
|
|
33609
|
+
var _c = useState([]), results = _c[0], setResults = _c[1];
|
|
33610
|
+
var _d = useState(false), showNextQuestion = _d[0], setShowNextQuestion = _d[1];
|
|
33611
|
+
var _e = useState(false), showResults = _e[0], setShowResults = _e[1];
|
|
33612
|
+
var _f = useState(false), finished = _f[0], setFinished = _f[1];
|
|
33613
|
+
var nextQuestion = function () {
|
|
33614
|
+
if (activeQuestion < questions.length - 1) {
|
|
33615
|
+
var next = activeQuestion + 1;
|
|
33616
|
+
setActiveQuestion(next);
|
|
33617
|
+
setShowNextQuestion(false);
|
|
33618
|
+
}
|
|
33619
|
+
};
|
|
33620
|
+
var handleSubmission = function (answer, index) {
|
|
33621
|
+
var updatedResults = results;
|
|
33622
|
+
results.splice(index, 1, answer);
|
|
33623
|
+
setResults(updatedResults);
|
|
33624
|
+
if (activeQuestion < questions.length - 1) {
|
|
33625
|
+
setShowNextQuestion(true);
|
|
33626
|
+
}
|
|
33627
|
+
else {
|
|
33628
|
+
setShowResults(true);
|
|
33629
|
+
}
|
|
33630
|
+
};
|
|
33631
|
+
var resetQuiz = function () {
|
|
33632
|
+
setResults([]);
|
|
33633
|
+
setShowNextQuestion(false);
|
|
33634
|
+
setActiveQuestion(0);
|
|
33635
|
+
setShowResults(false);
|
|
33636
|
+
setFinished(false);
|
|
33637
|
+
};
|
|
33638
|
+
return (React.createElement(Container$c, { "data-testid": "Quiz" },
|
|
33639
|
+
React.createElement(Heading$1, { text: title, level: 2 }),
|
|
33640
|
+
finished ? (React.createElement("div", null,
|
|
33641
|
+
React.createElement("p", null,
|
|
33642
|
+
"You got ",
|
|
33643
|
+
results.filter(function (result) { return result === true; }).length,
|
|
33644
|
+
" out of ",
|
|
33645
|
+
results.length,
|
|
33646
|
+
"."),
|
|
33647
|
+
React.createElement(Button$2, { type: "button", onClick: resetQuiz }, "Try again"))) : (React.createElement(Row$1, null,
|
|
33648
|
+
questions.map(function (question, index) { return (React.createElement(React.Fragment, { key: index }, activeQuestion === index && (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
33649
|
+
React.createElement(QuestionAndAnswer, __assign({}, question, { onSubmit: handleSubmission, index: index })))))); }),
|
|
33650
|
+
showNextQuestion && (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
33651
|
+
React.createElement(Button$2, { type: "button", onClick: nextQuestion }, "Next"))),
|
|
33652
|
+
showResults && (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
33653
|
+
React.createElement(Button$2, { type: "button", onClick: function () { return setFinished(true); } }, "Show results")))))));
|
|
33654
|
+
};
|
|
33655
|
+
|
|
33019
33656
|
const Container$a = styled.div`
|
|
33020
33657
|
display: block;
|
|
33021
33658
|
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
@@ -33240,7 +33877,7 @@ var SearchBox = function (_a) {
|
|
|
33240
33877
|
React.createElement(CustomSearch, __assign({}, customSearch))),
|
|
33241
33878
|
searchBoxLink && (React.createElement(Column, { small: "full", medium: "full", large: "one-third" },
|
|
33242
33879
|
React.createElement(LinkContainer, null,
|
|
33243
|
-
React.createElement(Button$
|
|
33880
|
+
React.createElement(Button$5, { text: searchBoxLink.title, url: searchBoxLink.url, primary: searchBoxLinkIsPrimary, size: "large" })))))));
|
|
33244
33881
|
return (React.createElement(Container$8, { "data-testid": "SearchBox", "$hasImage": imageSmall && imageLarge },
|
|
33245
33882
|
imageSmall && imageLarge && (React.createElement(ResponsiveImage, { imageSmall: imageSmall, imageLarge: imageLarge, imageAltText: imageAltText, smallWidth: "400", largeWidth: "1200", ratio: "auto", objectFit: "cover" })),
|
|
33246
33883
|
searchInner));
|
|
@@ -34382,7 +35019,7 @@ var DirectoryService = function (_a) {
|
|
|
34382
35019
|
.filter(function (item) { return item !== '' && item !== address.id; })
|
|
34383
35020
|
.join(' <br />'),
|
|
34384
35021
|
} }),
|
|
34385
|
-
location.latitude && location.longitude && (React.createElement(Button$
|
|
35022
|
+
location.latitude && location.longitude && (React.createElement(Button$5, { url: "https://google.com/maps/dir//".concat(location.latitude, ",").concat(location.longitude), text: "Get directions" })))); }),
|
|
34386
35023
|
(location === null || location === void 0 ? void 0 : location.accessibility_for_disabilities.length) > 0 && (React.createElement(React.Fragment, null,
|
|
34387
35024
|
React.createElement(Heading$1, { level: 3, text: "Other facilities on site" }),
|
|
34388
35025
|
React.createElement("ul", null, location.accessibility_for_disabilities.map(function (accessibility) { return (React.createElement("li", { key: accessibility.id }, accessibility.accessibility)); })))))); })),
|
|
@@ -34990,7 +35627,7 @@ var DirectoryServiceList = function (_a) {
|
|
|
34990
35627
|
filtersActive && (React.createElement(Button$1, { onClick: clearSearch, type: "button", "$isWarning": true },
|
|
34991
35628
|
React.createElement(ButtonText$1, null, "Clear search"))))),
|
|
34992
35629
|
hasDocuments && (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
34993
|
-
React.createElement(Button$
|
|
35630
|
+
React.createElement(Button$5, { url: "".concat(directoryPath, "/documents?search=").concat(searchTerm), text: "View documents and resources", primary: false, size: "large" }))))))),
|
|
34994
35631
|
React.createElement(Column, { small: "full", medium: "one-third", large: "one-third" },
|
|
34995
35632
|
React.createElement(FilterToggle, { type: "button", onClick: function (e) { return setShowFilters(!showFilters); } }, showFilters ? "Hide Filters" : "Show Filters"),
|
|
34996
35633
|
React.createElement(FilterContainer, { "$showFilters": showFilters },
|
|
@@ -36979,7 +37616,7 @@ var DirectoryDocumentList = function (_a) {
|
|
|
36979
37616
|
React.createElement(ButtonText, null, "Search"),
|
|
36980
37617
|
React.createElement(IconDownload, { colourFill: "#fff" })))),
|
|
36981
37618
|
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
36982
|
-
React.createElement(Button$
|
|
37619
|
+
React.createElement(Button$5, { url: "".concat(directoryPath, "?search=").concat(searchTerm), text: "View directory", primary: false })))))),
|
|
36983
37620
|
React.createElement(Column, { small: "full", medium: "one-third", large: "one-third" },
|
|
36984
37621
|
React.createElement(Row$1, null,
|
|
36985
37622
|
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
@@ -37012,5 +37649,5 @@ var DirectoryDocumentList = function (_a) {
|
|
|
37012
37649
|
React.createElement(Column, { small: "full", medium: "full", large: "full" }, !isLoading && (React.createElement(Pagination, { currentPage: pageNumber, totalResults: totalResults, resultsPerPage: perPage, postTo: directoryPath, buttonClickOverride: setPageNumber }))))))));
|
|
37013
37650
|
};
|
|
37014
37651
|
|
|
37015
|
-
export { AccessibleLinks, Accordion$1 as Accordion, AlertBanner, AlertBannerService, Autocomplete, BackLink, BackToTop, BinFinder, BlockQuote, Breadcrumbs, Button$
|
|
37652
|
+
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, lb_theme_north, lb_theme_west, north_theme, useDirectoryShortListContext, west_theme };
|
|
37016
37653
|
//# sourceMappingURL=index.mjs.js.map
|