northants-design-system 3.2.2 → 3.3.1
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 +2 -4
- package/build/index.js +5570 -4540
- package/build/index.js.map +1 -1
- package/build/index.mjs.js +5558 -4526
- package/build/index.mjs.js.map +1 -1
- package/build/library/components/MapMarker/MapMarker.d.ts +2 -4
- package/build/library/components/MapMarker/MapMarker.types.d.ts +46 -0
- package/build/library/components/StaticMap/StaticMap.d.ts +6 -0
- package/build/library/components/StaticMap/StaticMap.types.d.ts +7 -3
- package/build/library/components/icons/services/RecyclingSack/Icon.d.ts +4 -0
- package/build/library/components/icons/services/RecyclingSack/IconHover.d.ts +4 -0
- package/build/library/components/icons/services/ServicesIcons.d.ts +2 -0
- package/build/library/directory/DirectoryService/DirectoryService.storydata.d.ts +4 -0
- package/package.json +18 -17
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*/
|
|
5
|
-
declare const MapMarker: React.FunctionComponent<google.maps.MarkerOptions>;
|
|
2
|
+
import { MapMarkerProps } from './MapMarker.types';
|
|
3
|
+
declare const MapMarker: React.FunctionComponent<MapMarkerProps>;
|
|
6
4
|
export default MapMarker;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface MapMarkerProps {
|
|
2
|
+
/**
|
|
3
|
+
* The 'Advanced Marker Element Options' as defined by Google
|
|
4
|
+
* https://developers.google.com/maps/documentation/javascript/reference/advanced-markers#AdvancedMarkerElementOptions
|
|
5
|
+
*
|
|
6
|
+
* 'Pin Element Options' can be set through the 'content' attribute
|
|
7
|
+
* https://developers.google.com/maps/documentation/javascript/reference/advanced-markers#PinElementOptions
|
|
8
|
+
*/
|
|
9
|
+
advancedMarkerElementOptions?: google.maps.marker.AdvancedMarkerElementOptions;
|
|
10
|
+
/**
|
|
11
|
+
* Appearance options for the marker's pin (glyph text/colour, background,
|
|
12
|
+
* scale, etc.). Merged over the component's theme-based defaults.
|
|
13
|
+
* https://developers.google.com/maps/documentation/javascript/reference/advanced-markers#PinElementOptions
|
|
14
|
+
*/
|
|
15
|
+
pinElementOptions?: google.maps.marker.PinElementOptions;
|
|
16
|
+
/**
|
|
17
|
+
* The content to be displayed in the InfoWindow when this Marker is clicked on
|
|
18
|
+
*/
|
|
19
|
+
infoWindowContent?: React.ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* The index, assigned by the parent map, to uniquely identify this Marker
|
|
22
|
+
* (e.g. when recording that its InfoWindow is open).
|
|
23
|
+
*/
|
|
24
|
+
markerIndex?: number;
|
|
25
|
+
/**
|
|
26
|
+
* The index of the InfoWindow that has been recorded by the parent map
|
|
27
|
+
* as being currently open
|
|
28
|
+
*/
|
|
29
|
+
currentlyOpenInfoWindow: number;
|
|
30
|
+
/**
|
|
31
|
+
* The function to change the currently open InfoWindow that has been
|
|
32
|
+
* recorded by the parent map
|
|
33
|
+
*/
|
|
34
|
+
setCurrentlyOpenInfowindow: (n: number) => void;
|
|
35
|
+
/**
|
|
36
|
+
* The reset signal count to be used by the Parent Map to instruct this
|
|
37
|
+
* Marker to close its InfoWindow (e.g. when the map or another marker is clicked on)
|
|
38
|
+
* (this parameter will be incremented whenever the parent wishes to initiate InfoWindow closure)
|
|
39
|
+
*/
|
|
40
|
+
resetSignal: number;
|
|
41
|
+
/**
|
|
42
|
+
* A function that can be used when this Marker wants to instruct its parent
|
|
43
|
+
* that its InfoWindow has been clicked on
|
|
44
|
+
*/
|
|
45
|
+
initiateResetOfAnotherMarker: (n: number) => void;
|
|
46
|
+
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StaticMapProps } from './StaticMap.types';
|
|
3
|
+
/**
|
|
4
|
+
* A function to validate whether a given latitude/longitude pair are valid
|
|
5
|
+
* Ths function can be used to prevent untrusted backend/CMS values from
|
|
6
|
+
* injecting extra query parameters into the Static Maps request.
|
|
7
|
+
*/
|
|
8
|
+
export declare const isValidLatLng: (lat: unknown, lng: unknown) => boolean;
|
|
3
9
|
/**
|
|
4
10
|
* A static Google map with optional markers
|
|
5
11
|
*/
|
|
@@ -12,9 +12,9 @@ export interface StaticMapProps {
|
|
|
12
12
|
*/
|
|
13
13
|
mapType?: 'roadmap' | 'satellite' | 'terrain' | 'hybrid';
|
|
14
14
|
/**
|
|
15
|
-
* An array of map markers
|
|
15
|
+
* An optional array of map markers
|
|
16
16
|
*/
|
|
17
|
-
mapMarkers?:
|
|
17
|
+
mapMarkers?: StaticMapMarkerProps[];
|
|
18
18
|
/**
|
|
19
19
|
* The size of the map in the format wxh, such as 640x320
|
|
20
20
|
*/
|
|
@@ -24,7 +24,7 @@ export interface StaticMapProps {
|
|
|
24
24
|
*/
|
|
25
25
|
zoom?: number;
|
|
26
26
|
}
|
|
27
|
-
export interface
|
|
27
|
+
export interface StaticMapMarkerProps {
|
|
28
28
|
/**
|
|
29
29
|
* Optional marker colour. Default is red
|
|
30
30
|
*/
|
|
@@ -49,4 +49,8 @@ export interface MapMarkerProps {
|
|
|
49
49
|
* Optional marker title
|
|
50
50
|
*/
|
|
51
51
|
title?: string;
|
|
52
|
+
/**
|
|
53
|
+
* The content to be displayed in the InfoWindow when this Marker is clicked on
|
|
54
|
+
*/
|
|
55
|
+
infoWindowContent?: React.ReactNode;
|
|
52
56
|
}
|
|
@@ -143,6 +143,8 @@ declare let components: {
|
|
|
143
143
|
ratepayHover: import("react").FunctionComponent<import("./Icon.types").IconProps>;
|
|
144
144
|
recyclingbox: import("react").FunctionComponent<import("./Icon.types").IconProps>;
|
|
145
145
|
recyclingboxHover: import("react").FunctionComponent<import("./Icon.types").IconProps>;
|
|
146
|
+
recyclingsack: import("react").FunctionComponent<import("./Icon.types").IconProps>;
|
|
147
|
+
recyclingsackHover: import("react").FunctionComponent<import("./Icon.types").IconProps>;
|
|
146
148
|
registerbirth: import("react").FunctionComponent<import("./Icon.types").IconProps>;
|
|
147
149
|
registerbirthHover: import("react").FunctionComponent<import("./Icon.types").IconProps>;
|
|
148
150
|
registerdeath: import("react").FunctionComponent<import("./Icon.types").IconProps>;
|
|
@@ -3,3 +3,7 @@ export declare const ExampleService: DirectoryServiceProps;
|
|
|
3
3
|
export declare const MultipleLocations: LocationProps[];
|
|
4
4
|
export declare const OneVisitableLocation: LocationProps[];
|
|
5
5
|
export declare const OneVisitableLocationNoLatLon: LocationProps[];
|
|
6
|
+
export declare const locationsFormerNorthantsCC: LocationProps[];
|
|
7
|
+
export declare const locationsFormerNptonBorough: LocationProps[];
|
|
8
|
+
export declare const locationsInTowcesterFormerSNC: LocationProps[];
|
|
9
|
+
export declare const locationsInDaventryFormerDDC: LocationProps[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "northants-design-system",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.1",
|
|
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",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"test": "jest",
|
|
28
28
|
"test:watch": "jest --watch",
|
|
29
29
|
"test:coverage": "jest --coverage",
|
|
30
|
-
"storybook": "storybook dev -p 6006",
|
|
30
|
+
"storybook": "storybook dev -h localhost -p 6006",
|
|
31
31
|
"storybook:export": "storybook build",
|
|
32
32
|
"generate": "node ./util/create-component",
|
|
33
33
|
"prepublishOnly": "npm run build",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
],
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@cludosearch/cludo-search-components": "^1.0.146",
|
|
48
|
-
"@
|
|
48
|
+
"@vis.gl/react-google-maps": "^1.10.1",
|
|
49
49
|
"axios": "^1",
|
|
50
50
|
"react": "^19.2.3",
|
|
51
51
|
"react-dom": "^19.2.3",
|
|
@@ -58,44 +58,44 @@
|
|
|
58
58
|
"overrides": {
|
|
59
59
|
"react-hook-recaptcha": {
|
|
60
60
|
"react": "^19.2.3"
|
|
61
|
-
}
|
|
61
|
+
},
|
|
62
|
+
"test-exclude": "^8.0.0"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|
|
64
65
|
"@cludosearch/cludo-search-components": "^1.0.146",
|
|
65
66
|
"@eslint-react/eslint-plugin": "^5.7.4",
|
|
66
67
|
"@eslint/js": "^10.0.1",
|
|
67
68
|
"@etchteam/storybook-addon-status": "^8.0.0",
|
|
68
|
-
"@googlemaps/react-wrapper": "^1.1.35",
|
|
69
|
-
"@googlemaps/typescript-guards": "^2.0.3",
|
|
70
69
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
71
70
|
"@rollup/plugin-json": "^6",
|
|
72
71
|
"@rollup/plugin-node-resolve": "^16",
|
|
73
|
-
"@storybook/addon-a11y": "^10.6.
|
|
74
|
-
"@storybook/addon-docs": "^10.6.
|
|
75
|
-
"@storybook/addon-links": "^10.6.
|
|
72
|
+
"@storybook/addon-a11y": "^10.6.7",
|
|
73
|
+
"@storybook/addon-docs": "^10.6.7",
|
|
74
|
+
"@storybook/addon-links": "^10.6.7",
|
|
76
75
|
"@storybook/addon-webpack5-compiler-swc": "^4.0.3",
|
|
77
|
-
"@storybook/react-webpack5": "^10.6.
|
|
76
|
+
"@storybook/react-webpack5": "^10.6.7",
|
|
78
77
|
"@swc/core": "^1.4.11",
|
|
79
78
|
"@swc/jest": "^0.2.36",
|
|
80
79
|
"@testing-library/dom": "^10.4.0",
|
|
81
|
-
"@testing-library/jest-dom": "^
|
|
80
|
+
"@testing-library/jest-dom": "^7.0",
|
|
82
81
|
"@testing-library/react": "^16.0.0",
|
|
83
|
-
"@types/google.maps": "^3.
|
|
82
|
+
"@types/google.maps": "^3.66.4",
|
|
84
83
|
"@types/jest": "^30.0.0",
|
|
85
84
|
"@types/jest-axe": "^3.5.9",
|
|
86
85
|
"@types/react": "^19.2.3",
|
|
87
86
|
"@types/react-dom": "^19.2.3",
|
|
88
87
|
"@typescript-eslint/eslint-plugin": "^8.0",
|
|
89
88
|
"@typescript-eslint/parser": "^8.0",
|
|
89
|
+
"@vis.gl/react-google-maps": "^1.10.1",
|
|
90
90
|
"axios": "^1",
|
|
91
91
|
"colors": "^1.4.0",
|
|
92
92
|
"dayjs": "^1.10.7",
|
|
93
93
|
"eslint": "^10.0",
|
|
94
|
-
"eslint-plugin-storybook": "10.6.
|
|
94
|
+
"eslint-plugin-storybook": "10.6.7",
|
|
95
95
|
"globals": "^17.6.0",
|
|
96
96
|
"identity-obj-proxy": "^3.0.0",
|
|
97
97
|
"jest": "^30.0",
|
|
98
|
-
"jest-axe": "^
|
|
98
|
+
"jest-axe": "^11.0.0",
|
|
99
99
|
"jest-environment-jsdom": "^30.0",
|
|
100
100
|
"jsuri": "^1.3.1",
|
|
101
101
|
"react": "^19.2.3",
|
|
@@ -107,10 +107,10 @@
|
|
|
107
107
|
"rollup-plugin-postcss": "^4.0.2",
|
|
108
108
|
"rollup-plugin-svg": "^2.0.0",
|
|
109
109
|
"rollup-plugin-typescript2": "^0.37",
|
|
110
|
-
"storybook": "^10.6.
|
|
110
|
+
"storybook": "^10.6.7",
|
|
111
111
|
"styled-components": "^6.1.1",
|
|
112
112
|
"ts-jest": "^29",
|
|
113
|
-
"typescript": "^
|
|
113
|
+
"typescript": "^6.0.0",
|
|
114
114
|
"typescript-eslint": "^8.59.2",
|
|
115
115
|
"webpack": "^5.69.0"
|
|
116
116
|
},
|
|
@@ -130,6 +130,7 @@
|
|
|
130
130
|
"core-js": true,
|
|
131
131
|
"esbuild": true,
|
|
132
132
|
"unrs-resolver": true,
|
|
133
|
-
"fsevents": true
|
|
133
|
+
"fsevents": true,
|
|
134
|
+
"@parcel/watcher@2.6.0": true
|
|
134
135
|
}
|
|
135
136
|
}
|