northants-design-system 0.3.13 → 0.3.15

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.
Files changed (44) hide show
  1. package/build/index.esm.js +474 -6381
  2. package/build/index.esm.js.map +1 -1
  3. package/build/index.js +476 -6389
  4. package/build/index.js.map +1 -1
  5. package/build/index.mjs.js +16661 -21481
  6. package/build/index.mjs.js.map +1 -1
  7. package/build/library/components/icons/EmailIcon/EmailIcon.d.ts +4 -0
  8. package/build/library/components/icons/EmailIcon/EmailIcon.types.d.ts +6 -0
  9. package/build/library/components/icons/HeartIcon/HeartIcon.d.ts +7 -0
  10. package/build/library/components/icons/HeartIcon/HeartIcon.types.d.ts +6 -0
  11. package/build/library/components/icons/PhoneIcon/PhoneIcon.d.ts +4 -0
  12. package/build/library/components/icons/PhoneIcon/PhoneIcon.types.d.ts +6 -0
  13. package/build/library/components/icons/PinIcon/PinIcon.d.ts +7 -0
  14. package/build/library/components/icons/PinIcon/PinIcon.types.d.ts +6 -0
  15. package/build/library/components/icons/WebsiteIcon/WebsiteIcon.d.ts +4 -0
  16. package/build/library/components/icons/WebsiteIcon/WebsiteIcon.types.d.ts +6 -0
  17. package/build/library/components/icons/services/BirthCertificate/Icon.d.ts +4 -0
  18. package/build/library/components/icons/services/BirthCertificate/IconHover.d.ts +4 -0
  19. package/build/library/components/icons/services/Ceremony/Icon.d.ts +4 -0
  20. package/build/library/components/icons/services/Ceremony/IconHover.d.ts +4 -0
  21. package/build/library/components/icons/services/DeathCertificate/Icon.d.ts +4 -0
  22. package/build/library/components/icons/services/DeathCertificate/IconHover.d.ts +4 -0
  23. package/build/library/components/icons/services/GiveNotice/Icon.d.ts +4 -0
  24. package/build/library/components/icons/services/GiveNotice/IconHover.d.ts +4 -0
  25. package/build/library/components/icons/services/RegisterBirth/Icon.d.ts +4 -0
  26. package/build/library/components/icons/services/RegisterBirth/IconHover.d.ts +4 -0
  27. package/build/library/components/icons/services/RegisterDeath/Icon.d.ts +4 -0
  28. package/build/library/components/icons/services/RegisterDeath/IconHover.d.ts +4 -0
  29. package/build/library/components/icons/services/ServicesIcons.d.ts +14 -0
  30. package/build/library/components/icons/services/Venue/Icon.d.ts +4 -0
  31. package/build/library/components/icons/services/Venue/IconHover.d.ts +4 -0
  32. package/build/library/contexts/DirectoryShortListProvider/DirectoryShortListProvider.types.d.ts +13 -1
  33. package/build/library/directory/DirectoryAddToShortList/DirectoryAddToShortList.types.d.ts +3 -0
  34. package/build/library/directory/DirectoryService/DirectoryService.d.ts +0 -1
  35. package/build/library/directory/DirectoryService/DirectoryService.storydata.d.ts +2 -1
  36. package/build/library/directory/DirectoryService/DirectoryService.types.d.ts +7 -0
  37. package/build/library/directory/DirectoryService/DirectoryServiceTransform.d.ts +2 -1
  38. package/build/library/directory/ServiceContact/ServiceContact.d.ts +2 -2
  39. package/build/library/directory/ServiceContact/ServiceContact.types.d.ts +6 -0
  40. package/build/library/directory/ServiceSocialLinks/ServiceSocialLinks.d.ts +4 -0
  41. package/build/library/directory/ServiceSocialLinks/ServiceSocialLinks.storydata.d.ts +2 -0
  42. package/build/library/directory/ServiceSocialLinks/ServiceSocialLinks.types.d.ts +24 -0
  43. package/build/library/pages/DirectoryServicePage/DirectoryServicePage.d.ts +2 -0
  44. package/package.json +3 -2
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { EmailIconProps } from './EmailIcon.types';
3
+ declare const ChevronIcon: React.FunctionComponent<EmailIconProps>;
4
+ export default ChevronIcon;
@@ -0,0 +1,6 @@
1
+ export interface EmailIconProps {
2
+ /**
3
+ * The colour of the icon
4
+ */
5
+ colourFill?: string;
6
+ }
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { HeartIconProps } from './HeartIcon.types';
3
+ /**
4
+ * Heart favourite icon
5
+ */
6
+ declare const IconDownload: React.FunctionComponent<HeartIconProps>;
7
+ export default IconDownload;
@@ -0,0 +1,6 @@
1
+ export interface HeartIconProps {
2
+ /**
3
+ * The colour fill for the icon
4
+ */
5
+ colourFill: string;
6
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { PhoneIconProps } from './PhoneIcon.types';
3
+ declare const ChevronIcon: React.FunctionComponent<PhoneIconProps>;
4
+ export default ChevronIcon;
@@ -0,0 +1,6 @@
1
+ export interface PhoneIconProps {
2
+ /**
3
+ * The colour of the icon
4
+ */
5
+ colourFill?: string;
6
+ }
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { PinIconProps } from './PinIcon.types';
3
+ /**
4
+ * Map pin icon
5
+ */
6
+ declare const IconDownload: React.FunctionComponent<PinIconProps>;
7
+ export default IconDownload;
@@ -0,0 +1,6 @@
1
+ export interface PinIconProps {
2
+ /**
3
+ * The colour fill for the icon
4
+ */
5
+ colourFill: string;
6
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { WebsiteIconProps } from './WebsiteIcon.types';
3
+ declare const ChevronIcon: React.FunctionComponent<WebsiteIconProps>;
4
+ export default ChevronIcon;
@@ -0,0 +1,6 @@
1
+ export interface WebsiteIconProps {
2
+ /**
3
+ * The colour of the icon
4
+ */
5
+ colourFill?: string;
6
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IconProps } from '../Icon.types';
3
+ declare const ServiceIcon: React.FunctionComponent<IconProps>;
4
+ export default ServiceIcon;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IconProps } from '../Icon.types';
3
+ declare const ServiceIcon: React.FunctionComponent<IconProps>;
4
+ export default ServiceIcon;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IconProps } from '../Icon.types';
3
+ declare const ServiceIcon: React.FunctionComponent<IconProps>;
4
+ export default ServiceIcon;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IconProps } from '../Icon.types';
3
+ declare const ServiceIcon: React.FunctionComponent<IconProps>;
4
+ export default ServiceIcon;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IconProps } from '../Icon.types';
3
+ declare const ServiceIcon: React.FunctionComponent<IconProps>;
4
+ export default ServiceIcon;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IconProps } from '../Icon.types';
3
+ declare const ServiceIcon: React.FunctionComponent<IconProps>;
4
+ export default ServiceIcon;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IconProps } from '../Icon.types';
3
+ declare const ServiceIcon: React.FunctionComponent<IconProps>;
4
+ export default ServiceIcon;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IconProps } from '../Icon.types';
3
+ declare const ServiceIcon: React.FunctionComponent<IconProps>;
4
+ export default ServiceIcon;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IconProps } from '../Icon.types';
3
+ declare const ServiceIcon: React.FunctionComponent<IconProps>;
4
+ export default ServiceIcon;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IconProps } from '../Icon.types';
3
+ declare const ServiceIcon: React.FunctionComponent<IconProps>;
4
+ export default ServiceIcon;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IconProps } from '../Icon.types';
3
+ declare const ServiceIcon: React.FunctionComponent<IconProps>;
4
+ export default ServiceIcon;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IconProps } from '../Icon.types';
3
+ declare const ServiceIcon: React.FunctionComponent<IconProps>;
4
+ export default ServiceIcon;
@@ -14,6 +14,8 @@ declare let components: {
14
14
  bindayHover: import("react").FunctionComponent<import("./Icon.types").IconProps>;
15
15
  bins: import("react").FC<import("./Icon.types").IconProps>;
16
16
  binsHover: import("react").FC<import("./Icon.types").IconProps>;
17
+ birthcertificate: import("react").FunctionComponent<import("./Icon.types").IconProps>;
18
+ birthcertificateHover: import("react").FunctionComponent<import("./Icon.types").IconProps>;
17
19
  births: import("react").FC<import("./Icon.types").IconProps>;
18
20
  birthsHover: import("react").FC<import("./Icon.types").IconProps>;
19
21
  bollard: import("react").FunctionComponent<import("./Icon.types").IconProps>;
@@ -32,6 +34,8 @@ declare let components: {
32
34
  cashHover: import("react").FunctionComponent<import("./Icon.types").IconProps>;
33
35
  catalogue: import("react").FunctionComponent<import("./Icon.types").IconProps>;
34
36
  catalogueHover: import("react").FunctionComponent<import("./Icon.types").IconProps>;
37
+ ceremony: import("react").FunctionComponent<import("./Icon.types").IconProps>;
38
+ ceremonyHover: import("react").FunctionComponent<import("./Icon.types").IconProps>;
35
39
  charity: import("react").FC<import("./Icon.types").IconProps>;
36
40
  charityHover: import("react").FC<import("./Icon.types").IconProps>;
37
41
  children: import("react").FC<import("./Icon.types").IconProps>;
@@ -52,6 +56,8 @@ declare let components: {
52
56
  culturenorthHover: import("react").FC<import("./Icon.types").IconProps>;
53
57
  culturewest: import("react").FC<import("./Icon.types").IconProps>;
54
58
  culturewestHover: import("react").FC<import("./Icon.types").IconProps>;
59
+ deathcertificate: import("react").FunctionComponent<import("./Icon.types").IconProps>;
60
+ deathcertificateHover: import("react").FunctionComponent<import("./Icon.types").IconProps>;
55
61
  democracy: import("react").FC<import("./Icon.types").IconProps>;
56
62
  democracyHover: import("react").FC<import("./Icon.types").IconProps>;
57
63
  dogfouling: import("react").FunctionComponent<import("./Icon.types").IconProps>;
@@ -74,6 +80,8 @@ declare let components: {
74
80
  flytipHover: import("react").FC<import("./Icon.types").IconProps>;
75
81
  foodwaste: import("react").FunctionComponent<import("./Icon.types").IconProps>;
76
82
  foodwasteHover: import("react").FunctionComponent<import("./Icon.types").IconProps>;
83
+ givenotice: import("react").FunctionComponent<import("./Icon.types").IconProps>;
84
+ givenoticeHover: import("react").FunctionComponent<import("./Icon.types").IconProps>;
77
85
  govUK: import("react").FC<import("./Icon.types").IconProps>;
78
86
  govUKHover: import("react").FC<import("./Icon.types").IconProps>;
79
87
  graffiti: import("react").FunctionComponent<import("./Icon.types").IconProps>;
@@ -118,6 +126,10 @@ declare let components: {
118
126
  protectHover: import("react").FunctionComponent<import("./Icon.types").IconProps>;
119
127
  ratepay: import("react").FunctionComponent<import("./Icon.types").IconProps>;
120
128
  ratepayHover: import("react").FunctionComponent<import("./Icon.types").IconProps>;
129
+ registerbirth: import("react").FunctionComponent<import("./Icon.types").IconProps>;
130
+ registerbirthHover: import("react").FunctionComponent<import("./Icon.types").IconProps>;
131
+ registerdeath: import("react").FunctionComponent<import("./Icon.types").IconProps>;
132
+ registerdeathHover: import("react").FunctionComponent<import("./Icon.types").IconProps>;
121
133
  report: import("react").FC<import("./Icon.types").IconProps>;
122
134
  reportHover: import("react").FC<import("./Icon.types").IconProps>;
123
135
  restrict: import("react").FunctionComponent<import("./Icon.types").IconProps>;
@@ -138,6 +150,8 @@ declare let components: {
138
150
  sportsHover: import("react").FC<import("./Icon.types").IconProps>;
139
151
  valuation: import("react").FunctionComponent<import("./Icon.types").IconProps>;
140
152
  valuationHover: import("react").FunctionComponent<import("./Icon.types").IconProps>;
153
+ venue: import("react").FunctionComponent<import("./Icon.types").IconProps>;
154
+ venueHover: import("react").FunctionComponent<import("./Icon.types").IconProps>;
141
155
  wastechecklist: import("react").FunctionComponent<import("./Icon.types").IconProps>;
142
156
  wastechecklistHover: import("react").FunctionComponent<import("./Icon.types").IconProps>;
143
157
  wastesorting: import("react").FunctionComponent<import("./Icon.types").IconProps>;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IconProps } from '../Icon.types';
3
+ declare const ServiceIcon: React.FunctionComponent<IconProps>;
4
+ export default ServiceIcon;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IconProps } from '../Icon.types';
3
+ declare const ServiceIcon: React.FunctionComponent<IconProps>;
4
+ export default ServiceIcon;
@@ -10,7 +10,7 @@ export interface DirectoryShortListContextType {
10
10
  favourites: ShortListProps[];
11
11
  setFavourites: Dispatch<SetStateAction<ShortListProps[]>>;
12
12
  };
13
- toggleFavourites?: (id: string, name: string, snippet: string) => void;
13
+ toggleFavourites?: (id: string, name: string, snippet: string, email?: string, website?: string, phone?: string) => void;
14
14
  isFavourite?: (id: string) => boolean;
15
15
  }
16
16
  export interface ShortListProps {
@@ -26,4 +26,16 @@ export interface ShortListProps {
26
26
  * The optional description snippet
27
27
  */
28
28
  snippet?: string;
29
+ /**
30
+ * The optional email
31
+ */
32
+ email?: string;
33
+ /**
34
+ * The optional website
35
+ */
36
+ website?: string;
37
+ /**
38
+ * The optional phone number
39
+ */
40
+ phone?: string;
29
41
  }
@@ -2,4 +2,7 @@ export interface DirectoryAddToShortListProps {
2
2
  id: string;
3
3
  name: string;
4
4
  snippet: string;
5
+ email?: string;
6
+ website?: string;
7
+ phone?: string;
5
8
  }
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
2
  import { DirectoryServiceProps } from './DirectoryService.types';
3
- export declare const getSnippet: (description: string, extractLength?: number) => string;
4
3
  declare const DirectoryService: React.FunctionComponent<DirectoryServiceProps>;
5
4
  export default DirectoryService;
@@ -1,2 +1,3 @@
1
- import { DirectoryServiceProps } from './DirectoryService.types';
1
+ import { DirectoryServiceProps, LocationProps } from './DirectoryService.types';
2
2
  export declare const ExampleService: DirectoryServiceProps;
3
+ export declare const MultipleLocations: LocationProps[];
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ServiceContactProps } from '../ServiceContact/ServiceContact.types';
3
3
  import { FileDownloadProps } from '../../components/FileDownload/FileDownload.types';
4
+ import { SocialProfile } from '../ServiceSocialLinks/ServiceSocialLinks.types';
4
5
  export interface DirectoryServiceProps {
5
6
  id: string;
6
7
  accreditations?: string;
@@ -16,8 +17,13 @@ export interface DirectoryServiceProps {
16
17
  regular_schedules?: RegularScheduleProps[];
17
18
  service_areas: ServiceAreaProps[];
18
19
  service_at_locations?: LocationProps[];
20
+ service_social_profiles?: SocialProfile[];
19
21
  url?: string;
20
22
  uploads?: FileDownloadProps[];
23
+ /**
24
+ * The url to the shortlist
25
+ */
26
+ shortListPath?: string;
21
27
  }
22
28
  export interface OrganizationProps {
23
29
  id: string;
@@ -33,6 +39,7 @@ export interface RegularScheduleProps {
33
39
  weekday: string;
34
40
  }
35
41
  export interface LocationProps {
42
+ id: number;
36
43
  name: string;
37
44
  description: string;
38
45
  latitude: string;
@@ -1,5 +1,6 @@
1
1
  import { SummaryRowProps } from '../../components/SummaryList/SummaryList.types';
2
2
  import { LanguagesProps, LocationProps, ServiceAreaProps } from './DirectoryService.types';
3
- export declare const transformService: (email: string, url: string) => SummaryRowProps[];
3
+ export declare const transformService: (email: string, url: string, phone?: string) => SummaryRowProps[];
4
4
  export declare const transformLocation: (location: LocationProps) => SummaryRowProps[];
5
5
  export declare const transformDescriptionDetails: (accreditations: string, fees: string, service_areas: ServiceAreaProps[], languages: LanguagesProps[]) => SummaryRowProps[];
6
+ export declare const transformSnippet: (description: string, extractLength?: number) => string;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { ServiceContactProps } from './ServiceContact.types';
3
- declare const ServiceContact: React.FC<ServiceContactProps>;
2
+ import { ServiceContactComponentProps } from './ServiceContact.types';
3
+ declare const ServiceContact: React.FunctionComponent<ServiceContactComponentProps>;
4
4
  export default ServiceContact;
@@ -1,4 +1,10 @@
1
+ export interface ServiceContactComponentProps {
2
+ email?: string;
3
+ website?: string;
4
+ contacts: ServiceContactProps[];
5
+ }
1
6
  export interface ServiceContactProps {
7
+ id: number;
2
8
  name: string;
3
9
  title: string;
4
10
  phones: PhoneProps[];
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ServiceSocialLinksProps } from './ServiceSocialLinks.types';
3
+ declare const ServiceSocialLinks: React.FunctionComponent<ServiceSocialLinksProps>;
4
+ export default ServiceSocialLinks;
@@ -0,0 +1,2 @@
1
+ import { ServiceSocialLinksProps } from './ServiceSocialLinks.types';
2
+ export declare const ExampleSocialProfiles: ServiceSocialLinksProps;
@@ -0,0 +1,24 @@
1
+ export interface ServiceSocialLinksProps {
2
+ /**
3
+ * An array of social links
4
+ */
5
+ profiles?: SocialProfile[];
6
+ }
7
+ export interface SocialProfile {
8
+ /**
9
+ * The id for the social profile
10
+ */
11
+ id: number;
12
+ /**
13
+ * The profile name
14
+ */
15
+ name: string;
16
+ /**
17
+ * The link to the profile
18
+ */
19
+ link: string;
20
+ /**
21
+ * The social network name
22
+ */
23
+ social_network: 'facebook' | 'instagram' | 'linkedin' | 'twitter' | 'youtube';
24
+ }
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DirectoryServicePage: React.FunctionComponent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "northants-design-system",
3
- "version": "0.3.13",
3
+ "version": "0.3.15",
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",
@@ -39,6 +39,7 @@
39
39
  "Storybook"
40
40
  ],
41
41
  "peerDependencies": {
42
+ "axios": "^1",
42
43
  "react": ">=18.2.0",
43
44
  "react-dom": ">=18.2.0",
44
45
  "styled-components": "^5.3.3"
@@ -69,6 +70,7 @@
69
70
  "@types/styled-components": "^5.1.19",
70
71
  "@typescript-eslint/eslint-plugin": "^5.12.0",
71
72
  "@typescript-eslint/parser": "^5.12.0",
73
+ "axios": "^1",
72
74
  "babel-jest": "^29.0.0",
73
75
  "babel-loader": "^9.0.0",
74
76
  "babel-preset-react-app": "^10.0.1",
@@ -101,7 +103,6 @@
101
103
  "webpack": "^5.69.0"
102
104
  },
103
105
  "dependencies": {
104
- "axios": "^0.27.2",
105
106
  "core-js": "^3.20.2",
106
107
  "downshift": "^6.1.7",
107
108
  "html-react-parser": "^1.4.5",