northants-design-system 2.0.2 → 2.1.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.
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ConsultationLinkProps } from './ConsultationLink.types';
3
+ declare const ConsultationLink: React.FunctionComponent<ConsultationLinkProps>;
4
+ export default ConsultationLink;
@@ -0,0 +1,50 @@
1
+ export interface ConsultationLinkProps {
2
+ /**
3
+ * A unique identifier for the consultation
4
+ */
5
+ id: string;
6
+ /**
7
+ * The title of the consultation
8
+ */
9
+ title: string;
10
+ /**
11
+ * A summary of the consultation
12
+ */
13
+ summary?: string;
14
+ /**
15
+ * Should the summary be shown? Defaults to false
16
+ */
17
+ showSummary?: boolean;
18
+ /**
19
+ * The open date of the consultation
20
+ */
21
+ openDate: string;
22
+ /**
23
+ * The end date of the consultation
24
+ */
25
+ closeDate: string;
26
+ /**
27
+ * The optional parent service landing page title
28
+ */
29
+ parentTitle?: string | null;
30
+ /**
31
+ * A URL for the consultation
32
+ */
33
+ url: string;
34
+ /**
35
+ * The optional large image
36
+ */
37
+ imageLarge?: string | null;
38
+ /**
39
+ * The optional small image
40
+ */
41
+ imageSmall?: string | null;
42
+ /**
43
+ * The alt text for the image
44
+ */
45
+ imageAltText?: string | null;
46
+ /**
47
+ * Should the link have padding? Defaults to false.
48
+ */
49
+ hasPadding?: boolean;
50
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ConsultationStatusProps } from './ConsultationStatus.types';
3
+ declare const ConsultationStatus: React.FunctionComponent<ConsultationStatusProps>;
4
+ export default ConsultationStatus;
@@ -0,0 +1,10 @@
1
+ export interface ConsultationStatusProps {
2
+ /**
3
+ * The open date of the consultation
4
+ */
5
+ openDate: string;
6
+ /**
7
+ * The end date of the consultation
8
+ */
9
+ closeDate: string;
10
+ }
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { ConsultationItemProps } from '../../structure/ConsultationList/ConsultationList.types';
3
+ export interface ConsultationPageExampleProps {
4
+ consultation: ConsultationItemProps;
5
+ }
6
+ export declare const ConsultationPageExample: React.FunctionComponent<ConsultationPageExampleProps>;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export interface ConsultationLandingPageExampleProps {
3
+ }
4
+ export declare const ConsultationLandingPageExample: React.FunctionComponent<ConsultationLandingPageExampleProps>;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ConsultationListProps } from './ConsultationList.types';
3
+ declare const ConsultationList: React.FunctionComponent<ConsultationListProps>;
4
+ export default ConsultationList;
@@ -0,0 +1,2 @@
1
+ import { ConsultationListProps } from './ConsultationList.types';
2
+ export declare const ExampleConsultationListData: ConsultationListProps;
@@ -0,0 +1,158 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ import { DropDownSelectOptionsProps } from '../../components/DropDownSelect/DropDownSelect.types';
3
+ export interface ConsultationListProps {
4
+ /**
5
+ * Consultations that match the search results
6
+ */
7
+ results: ConsultationItemProps[];
8
+ /**
9
+ * The total number of results
10
+ */
11
+ totalResults?: number;
12
+ /**
13
+ * The current page number
14
+ */
15
+ pageNumber?: number;
16
+ /**
17
+ * The list of services to select from
18
+ */
19
+ services: DropDownSelectOptionsProps[];
20
+ /**
21
+ * The list of activity types to select from
22
+ */
23
+ activityTypes?: DropDownSelectOptionsProps[];
24
+ /**
25
+ * The selected activity type
26
+ */
27
+ activityType?: string;
28
+ /**
29
+ * Function prop passed in to handle updating activity type
30
+ */
31
+ setActivityType?: Dispatch<SetStateAction<string>>;
32
+ /**
33
+ * What the list is sorted by
34
+ */
35
+ sortBy?: string;
36
+ /**
37
+ * Function prop passed in to handle updating sort
38
+ */
39
+ setSortBy?: Dispatch<SetStateAction<string>>;
40
+ /**
41
+ * The optional search term
42
+ */
43
+ consultationSearch?: string;
44
+ /**
45
+ * Function prop passed in to handle updating the search term
46
+ */
47
+ setConsultationSearch?: Dispatch<SetStateAction<string>>;
48
+ /**
49
+ * The selected service filter
50
+ */
51
+ service?: string;
52
+ /**
53
+ * Function prop passed in to handle updating the service
54
+ */
55
+ setService?: Dispatch<SetStateAction<string>>;
56
+ /**
57
+ * The selected status, defaults to ''
58
+ */
59
+ status?: string[];
60
+ /**
61
+ * Function prop passed in to handle updating the status
62
+ */
63
+ setStatus?: (selected: string) => void;
64
+ /**
65
+ * Optional years to filter consultations by
66
+ */
67
+ allYears?: DropDownSelectOptionsProps[];
68
+ /**
69
+ * Optional year filter
70
+ */
71
+ year?: number | null;
72
+ /**
73
+ * Function prop passed in to set the year filter
74
+ */
75
+ setYear?: Dispatch<SetStateAction<number | null | undefined>>;
76
+ /**
77
+ * Optional month filter
78
+ */
79
+ month?: number | null;
80
+ /**
81
+ * Function prop passed in to set the month filter
82
+ */
83
+ setMonth?: Dispatch<SetStateAction<number | null | undefined>>;
84
+ /**
85
+ * The function prop passed in to handle the filters being submitted
86
+ */
87
+ onSubmit?: () => void;
88
+ /**
89
+ * The function prop passed in to handle the clear filters
90
+ */
91
+ clearFilters?: () => void;
92
+ /**
93
+ * The optional path for pagination
94
+ */
95
+ consultationsPagePath?: string;
96
+ }
97
+ export interface ConsultationItemProps {
98
+ /**
99
+ * A unique identifier for the consultation
100
+ */
101
+ id: string;
102
+ /**
103
+ * The title of the consultation
104
+ */
105
+ title: string;
106
+ /**
107
+ * A description of the consultation
108
+ */
109
+ description?: string;
110
+ /**
111
+ * A short summary of the consultation
112
+ */
113
+ summary?: string;
114
+ /**
115
+ * The start date of the consultation
116
+ */
117
+ openDate: string;
118
+ /**
119
+ * The end date of the consultation
120
+ */
121
+ closeDate: string;
122
+ /**
123
+ * The optional parent service landing page title
124
+ */
125
+ parentTitle?: string | null;
126
+ /**
127
+ * A URL for the consultation
128
+ */
129
+ url: string;
130
+ /**
131
+ * The optional large image
132
+ */
133
+ imageLarge?: string | null;
134
+ /**
135
+ * The optional small image
136
+ */
137
+ imageSmall?: string | null;
138
+ /**
139
+ * The alt text for the image
140
+ */
141
+ imageAltText?: string | null;
142
+ /**
143
+ * The optional survey link
144
+ */
145
+ surveyLink?: string;
146
+ /**
147
+ * The optional contact name
148
+ */
149
+ contact?: string | null;
150
+ /**
151
+ * The optional contact role
152
+ */
153
+ role?: string | null;
154
+ /**
155
+ * The optional contact email
156
+ */
157
+ email?: string | null;
158
+ }
@@ -23,6 +23,10 @@ export interface EventListProps {
23
23
  * The list of event types to select from
24
24
  */
25
25
  eventTypes?: CheckboxValsProps[];
26
+ /**
27
+ * The optional list of locations to select from
28
+ */
29
+ locations?: DropDownSelectOptionsProps[];
26
30
  /**
27
31
  * What the list is sorted by
28
32
  */
@@ -39,6 +43,14 @@ export interface EventListProps {
39
43
  * Function prop passed in to handle updating event search
40
44
  */
41
45
  setEventSearch?: Dispatch<SetStateAction<string>>;
46
+ /**
47
+ * The location name
48
+ */
49
+ location?: string;
50
+ /**
51
+ * Function prop passed in to handle updating location search
52
+ */
53
+ setLocation?: Dispatch<SetStateAction<string>>;
42
54
  /**
43
55
  * The selected service filter
44
56
  */
@@ -4,6 +4,7 @@ import AlertBannerService from './AlertBannerService/AlertBannerService';
4
4
  import BackLink from './BackLink/BackLink';
5
5
  import Breadcrumbs from './Breadcrumbs/Breadcrumbs';
6
6
  import CludoSearch from './CludoSearch/CludoSearch';
7
+ import ConsultationList from './ConsultationList/ConsultationList';
7
8
  import Contents from './Contents/Contents';
8
9
  import ContentsNavigation from './ContentsNavigation/ContentsNavigation';
9
10
  import CookieBanner from './CookieBanner/CookieBanner';
@@ -45,4 +46,4 @@ import ServicesLinksList from './ServicesLinksList/ServicesLinksList';
45
46
  import SignpostLinks from './SignpostLinks/SignpostLinks';
46
47
  import SkipToMainContent from './SkipToMainContent/SkipToMainContent';
47
48
  import Summary from './Summary/Summary';
48
- export { AccessibleLinks, AlertBanner, AlertBannerService, BackLink, Breadcrumbs, CludoSearch, Contents, ContentsNavigation, CookieBanner, DisplayDate, EventList, Footer, FullWidthContainer, Header, HeroImage, HomeHero, MaxWidthContainer, MemorialHero, NewsArticleDate, NewsArticleFeaturedBlock, NewsArticleFilterAccordion, NewsArticleImage, NewsArticleList, NewsArticleListHeader, NewsArticleOldBanner, PhaseBanner, PageMain, PageSidebar, PageTitle, PageWithSidebarContainer, PageWrapper, PromoBanner, PromoBlock, PromoTabs, PromoTabsDisplay, PromotedServicesTabs, RateThisPage, Searchbar, SearchResultsList, SectionLinks, SectionLinksMobileContents, SectionLinksSidebar, ServiceLinksBoxed, ServicesLinksList, SignpostLinks, SkipToMainContent, Summary, };
49
+ export { AccessibleLinks, AlertBanner, AlertBannerService, BackLink, Breadcrumbs, CludoSearch, ConsultationList, Contents, ContentsNavigation, CookieBanner, DisplayDate, EventList, Footer, FullWidthContainer, Header, HeroImage, HomeHero, MaxWidthContainer, MemorialHero, NewsArticleDate, NewsArticleFeaturedBlock, NewsArticleFilterAccordion, NewsArticleImage, NewsArticleList, NewsArticleListHeader, NewsArticleOldBanner, PhaseBanner, PageMain, PageSidebar, PageTitle, PageWithSidebarContainer, PageWrapper, PromoBanner, PromoBlock, PromoTabs, PromoTabsDisplay, PromotedServicesTabs, RateThisPage, Searchbar, SearchResultsList, SectionLinks, SectionLinksMobileContents, SectionLinksSidebar, ServiceLinksBoxed, ServicesLinksList, SignpostLinks, SkipToMainContent, Summary, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "northants-design-system",
3
- "version": "2.0.2",
3
+ "version": "2.1.0",
4
4
  "private": false,
5
5
  "description": "Design system for West & North Northamptonshire Councils, two unitary councils encompassing Wellingborough, Corby, Daventry, East Northants, Kettering, Northampton, Northamptonshire County and South Northants.",
6
6
  "main": "build/index.js",