northants-design-system 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +14 -11
- package/build/index.js.map +1 -1
- package/build/index.mjs.js +14 -11
- package/build/index.mjs.js.map +1 -1
- package/build/library/components/ConsultationLink/ConsultationLink.d.ts +4 -0
- package/build/library/components/ConsultationLink/ConsultationLink.test.d.ts +1 -0
- package/build/library/components/ConsultationLink/ConsultationLink.types.d.ts +50 -0
- package/build/library/components/ConsultationStatus/ConsultationStatus.d.ts +4 -0
- package/build/library/components/ConsultationStatus/ConsultationStatus.test.d.ts +1 -0
- package/build/library/components/ConsultationStatus/ConsultationStatus.types.d.ts +10 -0
- package/build/library/pages/ConsultationPage/ConsultationPageExample.d.ts +6 -0
- package/build/library/pages/ConsultationsLandingPageExample/ConsultationsLandingPageExample.d.ts +4 -0
- package/build/library/structure/ConsultationList/ConsultationList.d.ts +4 -0
- package/build/library/structure/ConsultationList/ConsultationList.storydata.d.ts +2 -0
- package/build/library/structure/ConsultationList/ConsultationList.test.d.ts +1 -0
- package/build/library/structure/ConsultationList/ConsultationList.types.d.ts +158 -0
- package/build/library/structure/EventList/EventList.types.d.ts +12 -0
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -26496,8 +26496,8 @@ var transformAge = function (age, ageInMonths) {
|
|
|
26496
26496
|
};
|
|
26497
26497
|
|
|
26498
26498
|
var EventList = function (_a) {
|
|
26499
|
-
var results = _a.results, _b = _a.pageNumber, pageNumber = _b === void 0 ? 1 : _b, sortBy = _a.sortBy, setSortBy = _a.setSortBy, _c = _a.totalResults, totalResults = _c === void 0 ? 0 : _c, services = _a.services, eventTypes = _a.eventTypes, _d = _a.eventSearch, eventSearch = _d === void 0 ? '' : _d, setEventSearch = _a.setEventSearch,
|
|
26500
|
-
var
|
|
26499
|
+
var results = _a.results, _b = _a.pageNumber, pageNumber = _b === void 0 ? 1 : _b, sortBy = _a.sortBy, setSortBy = _a.setSortBy, _c = _a.totalResults, totalResults = _c === void 0 ? 0 : _c, services = _a.services, eventTypes = _a.eventTypes, _d = _a.eventSearch, eventSearch = _d === void 0 ? '' : _d, _e = _a.locations, locations = _e === void 0 ? [] : _e, setEventSearch = _a.setEventSearch, _f = _a.service, service = _f === void 0 ? '' : _f, setService = _a.setService, _g = _a.eventType, eventType = _g === void 0 ? [''] : _g, setEventType = _a.setEventType, _h = _a.location, location = _h === void 0 ? '' : _h, setLocation = _a.setLocation, _j = _a.startDate, startDate = _j === void 0 ? '' : _j, setStartDate = _a.setStartDate, _k = _a.endDate, endDate = _k === void 0 ? '' : _k, setEndDate = _a.setEndDate, onSubmit = _a.onSubmit, clearFilters = _a.clearFilters, _l = _a.eventsPagePath, eventsPagePath = _l === void 0 ? '/events' : _l, cards = _a.cards;
|
|
26500
|
+
var _m = React.useState(false), showFilters = _m[0], setShowFilters = _m[1];
|
|
26501
26501
|
var sortByOptions = [
|
|
26502
26502
|
{
|
|
26503
26503
|
title: 'Latest date',
|
|
@@ -26525,7 +26525,9 @@ var EventList = function (_a) {
|
|
|
26525
26525
|
React__default.default.createElement("label", { htmlFor: "eventSearch" }, "Search"),
|
|
26526
26526
|
React__default.default.createElement(Input, { name: "eventSearch", id: "eventSearch", type: "text", isFullWidth: true, value: eventSearch, onChange: function (e) { return setEventSearch(e.target.value); } }),
|
|
26527
26527
|
React__default.default.createElement(SelectContainer, null,
|
|
26528
|
-
React__default.default.createElement(DropDownSelect, { label: "Services", options: services ? services : [{ title: 'All services', value: 'all' }], onChange: function (e) { return setService(e.target.value); }, value: service, isFullWidth: true })),
|
|
26528
|
+
React__default.default.createElement(DropDownSelect, { label: "Services", options: services ? services : [{ title: 'All services', value: 'all' }], onChange: function (e) { return setService(e.target.value); }, value: service, isFullWidth: true, id: "servicesDropdown" })),
|
|
26529
|
+
locations.length > 0 && (React__default.default.createElement(SelectContainer, null,
|
|
26530
|
+
React__default.default.createElement(DropDownSelect, { label: "Location", options: locations ? locations : [{ title: 'All locations', value: '' }], onChange: function (e) { return setLocation(e.target.value); }, value: location, isFullWidth: true, id: "locationDropdown" }))),
|
|
26529
26531
|
React__default.default.createElement("label", { htmlFor: "startDate" }, "Start Date"),
|
|
26530
26532
|
React__default.default.createElement(Input, { name: "startDate", id: "startDate", type: "date", isFullWidth: true, value: startDate, onChange: function (e) {
|
|
26531
26533
|
setStartDate(e.target.value);
|
|
@@ -28785,9 +28787,9 @@ const ArticleContainer = styled__default.default.a`
|
|
|
28785
28787
|
border-bottom: 5px solid ${(props) => props.theme.theme_vars.colours.action};
|
|
28786
28788
|
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
28787
28789
|
overflow: hidden;
|
|
28788
|
-
/* display: block; */
|
|
28789
28790
|
text-decoration: none !important;
|
|
28790
28791
|
font-weight: normal !important;
|
|
28792
|
+
width: 100%;
|
|
28791
28793
|
|
|
28792
28794
|
&:hover {
|
|
28793
28795
|
border-bottom: 5px solid ${(props) => props.theme.theme_vars.colours.action_dark};
|
|
@@ -28813,10 +28815,6 @@ const ArticleContainer = styled__default.default.a`
|
|
|
28813
28815
|
}
|
|
28814
28816
|
|
|
28815
28817
|
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
28816
|
-
|
|
28817
|
-
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.s}) {
|
|
28818
|
-
display: flex;
|
|
28819
|
-
}
|
|
28820
28818
|
`;
|
|
28821
28819
|
|
|
28822
28820
|
const ArticleContent = styled__default.default.div`
|
|
@@ -28824,9 +28822,14 @@ const ArticleContent = styled__default.default.div`
|
|
|
28824
28822
|
|
|
28825
28823
|
${(props) => props.theme.fontStyles};
|
|
28826
28824
|
|
|
28827
|
-
|
|
28825
|
+
min-width: ${(props) => (props.$withImage ? '50%' : '100%')};
|
|
28826
|
+
|
|
28827
|
+
/* Medium-width screens (at least 1160px) */
|
|
28828
|
+
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) and (max-width: calc(${(props) =>
|
|
28829
|
+
props.theme.theme_vars.breakpoints.l} - 1px)) {
|
|
28828
28830
|
width: ${(props) => (props.$withImage ? '50%' : '100%')};
|
|
28829
28831
|
}
|
|
28832
|
+
/* large-width screens (at least 1440px) */
|
|
28830
28833
|
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.l}) {
|
|
28831
28834
|
width: ${(props) => (props.$withImage ? '66%' : '100%')};
|
|
28832
28835
|
}
|
|
@@ -28879,10 +28882,10 @@ var NewsArticleList = function (_a) {
|
|
|
28879
28882
|
React__default.default.createElement(ArticleContainer, { href: article.url, title: article.title },
|
|
28880
28883
|
article.image720x405 && (React__default.default.createElement(ImageContainer$2, { className: "news-article-list__image" },
|
|
28881
28884
|
React__default.default.createElement(ResponsiveImage, { imageSmall: article.image72x41, imageLarge: article.image720x405, imageAltText: (_a = article.imageAltText) !== null && _a !== void 0 ? _a : 'News article', smallWidth: "400", largeWidth: "720", ratio: "16by9", objectFit: "contain" }))),
|
|
28882
|
-
React__default.default.createElement(ArticleContent, { "$withImage": article.image720x405
|
|
28885
|
+
React__default.default.createElement(ArticleContent, { "$withImage": !!article.image720x405 },
|
|
28883
28886
|
React__default.default.createElement(Title$5, { className: "news-article-list__title" }, article.title),
|
|
28884
28887
|
article.excerpt.length > extractLength
|
|
28885
|
-
? article.excerpt.
|
|
28888
|
+
? article.excerpt.substring(0, extractLength - 1).trim() + String.fromCharCode(8230)
|
|
28886
28889
|
: article.excerpt,
|
|
28887
28890
|
React__default.default.createElement(DateContainer, null,
|
|
28888
28891
|
React__default.default.createElement(NewsArticleDate, { text: article.date.toString(), format: "X" }))))));
|