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.mjs.js
CHANGED
|
@@ -26485,8 +26485,8 @@ var transformAge = function (age, ageInMonths) {
|
|
|
26485
26485
|
};
|
|
26486
26486
|
|
|
26487
26487
|
var EventList = function (_a) {
|
|
26488
|
-
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,
|
|
26489
|
-
var
|
|
26488
|
+
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;
|
|
26489
|
+
var _m = useState(false), showFilters = _m[0], setShowFilters = _m[1];
|
|
26490
26490
|
var sortByOptions = [
|
|
26491
26491
|
{
|
|
26492
26492
|
title: 'Latest date',
|
|
@@ -26514,7 +26514,9 @@ var EventList = function (_a) {
|
|
|
26514
26514
|
React.createElement("label", { htmlFor: "eventSearch" }, "Search"),
|
|
26515
26515
|
React.createElement(Input, { name: "eventSearch", id: "eventSearch", type: "text", isFullWidth: true, value: eventSearch, onChange: function (e) { return setEventSearch(e.target.value); } }),
|
|
26516
26516
|
React.createElement(SelectContainer, null,
|
|
26517
|
-
React.createElement(DropDownSelect, { label: "Services", options: services ? services : [{ title: 'All services', value: 'all' }], onChange: function (e) { return setService(e.target.value); }, value: service, isFullWidth: true })),
|
|
26517
|
+
React.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" })),
|
|
26518
|
+
locations.length > 0 && (React.createElement(SelectContainer, null,
|
|
26519
|
+
React.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" }))),
|
|
26518
26520
|
React.createElement("label", { htmlFor: "startDate" }, "Start Date"),
|
|
26519
26521
|
React.createElement(Input, { name: "startDate", id: "startDate", type: "date", isFullWidth: true, value: startDate, onChange: function (e) {
|
|
26520
26522
|
setStartDate(e.target.value);
|
|
@@ -28774,9 +28776,9 @@ const ArticleContainer = styled.a`
|
|
|
28774
28776
|
border-bottom: 5px solid ${(props) => props.theme.theme_vars.colours.action};
|
|
28775
28777
|
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
28776
28778
|
overflow: hidden;
|
|
28777
|
-
/* display: block; */
|
|
28778
28779
|
text-decoration: none !important;
|
|
28779
28780
|
font-weight: normal !important;
|
|
28781
|
+
width: 100%;
|
|
28780
28782
|
|
|
28781
28783
|
&:hover {
|
|
28782
28784
|
border-bottom: 5px solid ${(props) => props.theme.theme_vars.colours.action_dark};
|
|
@@ -28802,10 +28804,6 @@ const ArticleContainer = styled.a`
|
|
|
28802
28804
|
}
|
|
28803
28805
|
|
|
28804
28806
|
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
28805
|
-
|
|
28806
|
-
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.s}) {
|
|
28807
|
-
display: flex;
|
|
28808
|
-
}
|
|
28809
28807
|
`;
|
|
28810
28808
|
|
|
28811
28809
|
const ArticleContent = styled.div`
|
|
@@ -28813,9 +28811,14 @@ const ArticleContent = styled.div`
|
|
|
28813
28811
|
|
|
28814
28812
|
${(props) => props.theme.fontStyles};
|
|
28815
28813
|
|
|
28816
|
-
|
|
28814
|
+
min-width: ${(props) => (props.$withImage ? '50%' : '100%')};
|
|
28815
|
+
|
|
28816
|
+
/* Medium-width screens (at least 1160px) */
|
|
28817
|
+
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) and (max-width: calc(${(props) =>
|
|
28818
|
+
props.theme.theme_vars.breakpoints.l} - 1px)) {
|
|
28817
28819
|
width: ${(props) => (props.$withImage ? '50%' : '100%')};
|
|
28818
28820
|
}
|
|
28821
|
+
/* large-width screens (at least 1440px) */
|
|
28819
28822
|
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.l}) {
|
|
28820
28823
|
width: ${(props) => (props.$withImage ? '66%' : '100%')};
|
|
28821
28824
|
}
|
|
@@ -28868,10 +28871,10 @@ var NewsArticleList = function (_a) {
|
|
|
28868
28871
|
React.createElement(ArticleContainer, { href: article.url, title: article.title },
|
|
28869
28872
|
article.image720x405 && (React.createElement(ImageContainer$2, { className: "news-article-list__image" },
|
|
28870
28873
|
React.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" }))),
|
|
28871
|
-
React.createElement(ArticleContent, { "$withImage": article.image720x405
|
|
28874
|
+
React.createElement(ArticleContent, { "$withImage": !!article.image720x405 },
|
|
28872
28875
|
React.createElement(Title$5, { className: "news-article-list__title" }, article.title),
|
|
28873
28876
|
article.excerpt.length > extractLength
|
|
28874
|
-
? article.excerpt.
|
|
28877
|
+
? article.excerpt.substring(0, extractLength - 1).trim() + String.fromCharCode(8230)
|
|
28875
28878
|
: article.excerpt,
|
|
28876
28879
|
React.createElement(DateContainer, null,
|
|
28877
28880
|
React.createElement(NewsArticleDate, { text: article.date.toString(), format: "X" }))))));
|