northants-design-system 2.2.0 → 3.0.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.
Files changed (31) hide show
  1. package/README.md +1 -1
  2. package/build/index.d.ts +3 -1
  3. package/build/index.js +5805 -4438
  4. package/build/index.js.map +1 -1
  5. package/build/index.mjs.js +5786 -4438
  6. package/build/index.mjs.js.map +1 -1
  7. package/build/library/components/BudgetSlider/BudgetSlider.d.ts +4 -0
  8. package/build/library/components/BudgetSlider/BudgetSlider.test.d.ts +1 -0
  9. package/build/library/components/BudgetSlider/BudgetSlider.types.d.ts +56 -0
  10. package/build/library/components/QuestionAndAnswer/QuestionAndAnswer.d.ts +4 -0
  11. package/build/library/components/QuestionAndAnswer/QuestionAndAnswer.test.d.ts +1 -0
  12. package/build/library/components/QuestionAndAnswer/QuestionAndAnswer.types.d.ts +17 -0
  13. package/build/library/components/RadioCheckboxInput/RadioCheckboxInput.types.d.ts +4 -0
  14. package/build/library/components/logos/WestColouredLogo/logo.d.ts +2 -2
  15. package/build/library/pages/BudgetGameExample/BudgetGameExample.d.ts +4 -0
  16. package/build/library/pages/BudgetQuizExample/BudgetQuizExample.d.ts +4 -0
  17. package/build/library/slices/BudgetGame/BudgetGame.d.ts +7 -0
  18. package/build/library/slices/BudgetGame/BudgetGame.storydata.d.ts +2 -0
  19. package/build/library/slices/BudgetGame/BudgetGame.test.d.ts +1 -0
  20. package/build/library/slices/BudgetGame/BudgetGame.types.d.ts +20 -0
  21. package/build/library/slices/Quiz/Quiz.d.ts +4 -0
  22. package/build/library/slices/Quiz/Quiz.storydata.d.ts +2 -0
  23. package/build/library/slices/Quiz/Quiz.test.d.ts +1 -0
  24. package/build/library/slices/Quiz/Quiz.types.d.ts +11 -0
  25. package/build/library/structure/CludoNewsSearch/CludoNewsDateSearch.d.ts +6 -0
  26. package/build/library/structure/CludoNewsSearch/CludoNewsResultCount.d.ts +3 -0
  27. package/build/library/structure/CludoNewsSearch/CludoNewsSearch.d.ts +4 -0
  28. package/build/library/structure/CludoNewsSearch/CludoNewsSearch.test.d.ts +1 -0
  29. package/build/library/structure/CludoNewsSearch/CludoNewsSearch.types.d.ts +18 -0
  30. package/build/library/structure/CludoNewsSearch/CludoNewsSort.d.ts +3 -0
  31. package/package.json +30 -28
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { BudgetSliderProps } from './BudgetSlider.types';
3
+ declare const BudgetSlider: React.FunctionComponent<BudgetSliderProps>;
4
+ export default BudgetSlider;
@@ -0,0 +1,56 @@
1
+ export interface BudgetSliderProps {
2
+ /**
3
+ * The budget slider title heading text
4
+ */
5
+ title: string;
6
+ /**
7
+ * A line of summary text to describe the slider
8
+ */
9
+ summary?: string;
10
+ /**
11
+ * An optional icon name
12
+ */
13
+ icon?: string | null;
14
+ /**
15
+ * The minimum percentage allowed
16
+ */
17
+ minimum: number;
18
+ /**
19
+ * The maximum percentage allowed
20
+ */
21
+ maximum: number;
22
+ /**
23
+ * The value
24
+ */
25
+ initialValue?: number;
26
+ /**
27
+ * Optional array of impacts
28
+ */
29
+ impacts?: ImpactProps[];
30
+ /**
31
+ * The function passed in that will triggered when the value is updated (for parent component to manage)
32
+ */
33
+ onChange?: (value: number, index: number) => void;
34
+ /**
35
+ * The index number of the service from the parent component
36
+ */
37
+ index?: number;
38
+ }
39
+ export interface ImpactProps {
40
+ /**
41
+ * The minimum threshold for the impact
42
+ */
43
+ minimum: number;
44
+ /**
45
+ * The maximum threshold for the impact
46
+ */
47
+ maximum: number;
48
+ /**
49
+ * The impact title
50
+ */
51
+ title: 'low' | 'medium' | 'high';
52
+ /**
53
+ * The summary text for the impact
54
+ */
55
+ summary: string;
56
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { QuestionAndAnswerProps } from './QuestionAndAnswer.types';
3
+ declare const QuestionAndAnswer: React.FunctionComponent<QuestionAndAnswerProps>;
4
+ export default QuestionAndAnswer;
@@ -0,0 +1,17 @@
1
+ export interface QuestionAndAnswerProps {
2
+ /**
3
+ * What is this?
4
+ */
5
+ questionText: string;
6
+ hintText?: string | null;
7
+ answers: AnswerProps[];
8
+ category?: string | null;
9
+ icon?: string | null;
10
+ onSubmit?: (answer: boolean, index: number) => void;
11
+ index?: number;
12
+ }
13
+ export interface AnswerProps {
14
+ answerText: string;
15
+ correctAnswer: boolean;
16
+ answerSummary: string;
17
+ }
@@ -27,4 +27,8 @@ export interface RadioCheckboxInputProps {
27
27
  * Is the field in an error state
28
28
  */
29
29
  isErrored?: boolean;
30
+ /**
31
+ * Is the radio button disabled?
32
+ */
33
+ isDisabled?: boolean;
30
34
  }
@@ -1,4 +1,4 @@
1
- import React from "react";
2
- import { LogoProps } from "./logo.types";
1
+ import React from 'react';
2
+ import { LogoProps } from './logo.types';
3
3
  declare const WestColouredLogo: React.FC<LogoProps>;
4
4
  export default WestColouredLogo;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export interface BudgetGamePageExampleProps {
3
+ }
4
+ export declare const BudgetGamePageExample: React.FunctionComponent<BudgetGamePageExampleProps>;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export interface BudgetQuizPageExampleProps {
3
+ }
4
+ export declare const BudgetQuizPageExample: React.FunctionComponent<BudgetQuizPageExampleProps>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { BudgetGameProps } from './BudgetGame.types';
3
+ /**
4
+ * A budget game with sliders to set your own budget
5
+ */
6
+ declare const BudgetGame: React.FunctionComponent<BudgetGameProps>;
7
+ export default BudgetGame;
@@ -0,0 +1,2 @@
1
+ import { BudgetGameProps } from './BudgetGame.types';
2
+ export declare const ExampleBudgetGameProps: BudgetGameProps;
@@ -0,0 +1,20 @@
1
+ import { BudgetSliderProps } from '../../components/BudgetSlider/BudgetSlider.types';
2
+ export interface BudgetGameProps {
3
+ /**
4
+ * The total budget percentage allowed, e.g. 85
5
+ */
6
+ totalAllowed: number;
7
+ /**
8
+ * An array of Budget Slider props
9
+ */
10
+ budgetServices: BudgetSliderProps[];
11
+ /**
12
+ * Optional function that is triggered when results are submitted
13
+ * For example, trigger a custom event in Google Analytics
14
+ */
15
+ onSubmitResults?: () => void;
16
+ /**
17
+ * Optional function that is triggered when try again is pressed
18
+ */
19
+ onTryAgain?: () => void;
20
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { QuizProps } from './Quiz.types';
3
+ declare const Quiz: React.FunctionComponent<QuizProps>;
4
+ export default Quiz;
@@ -0,0 +1,2 @@
1
+ import { QuizProps } from './Quiz.types';
2
+ export declare const ExampleQuizProps: QuizProps;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import { QuestionAndAnswerProps } from '../../components/QuestionAndAnswer/QuestionAndAnswer.types';
2
+ export interface QuizProps {
3
+ /**
4
+ * The quiz title
5
+ */
6
+ title: string;
7
+ /**
8
+ * An array of questions and answers for the quiz
9
+ */
10
+ questions: QuestionAndAnswerProps[];
11
+ }
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface CludoNewsDateSearchProps {
3
+ firstArticleDate?: string;
4
+ }
5
+ declare const CludoNewsDateSearch: React.FunctionComponent<CludoNewsDateSearchProps>;
6
+ export default CludoNewsDateSearch;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const CludoNewsResultCount: React.FunctionComponent;
3
+ export default CludoNewsResultCount;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { CludoNewsSearchProps } from './CludoNewsSearch.types';
3
+ declare const CludoNewsSearch: React.FunctionComponent<CludoNewsSearchProps>;
4
+ export default CludoNewsSearch;
@@ -0,0 +1,18 @@
1
+ export interface CludoNewsSearchProps {
2
+ /**
3
+ * The optional search term
4
+ */
5
+ searchTerm?: string;
6
+ /**
7
+ * The cludo customer Id
8
+ */
9
+ customerId: number;
10
+ /**
11
+ * The cludo engine Id
12
+ */
13
+ engineId: number;
14
+ /**
15
+ * Optional first article date to work out the start year
16
+ */
17
+ firstArticleDate?: string;
18
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const CludoNewsSort: React.FunctionComponent;
3
+ export default CludoNewsSort;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "northants-design-system",
3
- "version": "2.2.0",
3
+ "version": "3.0.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",
7
7
  "engines": {
8
- "node": ">=20"
8
+ "node": ">=24"
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
@@ -31,7 +31,8 @@
31
31
  "storybook:export": "storybook build",
32
32
  "generate": "node ./util/create-component",
33
33
  "prepublishOnly": "npm run build",
34
- "dev": "npm run storybook"
34
+ "dev": "npm run storybook",
35
+ "lint": "eslint ./src"
35
36
  },
36
37
  "keywords": [
37
38
  "React",
@@ -46,8 +47,8 @@
46
47
  "@cludosearch/cludo-search-components": "^1.0.59",
47
48
  "@googlemaps/react-wrapper": ">=1.1.35",
48
49
  "axios": "^1",
49
- "react": "19.1.0",
50
- "react-dom": "19.1.0",
50
+ "react": "^19.2.3",
51
+ "react-dom": "^19.2.3",
51
52
  "react-hook-form": "^7.5",
52
53
  "styled-components": "^6.1.1"
53
54
  },
@@ -56,22 +57,24 @@
56
57
  },
57
58
  "overrides": {
58
59
  "react-hook-recaptcha": {
59
- "react": "19.1.0"
60
+ "react": "^19.2.3"
60
61
  }
61
62
  },
62
63
  "devDependencies": {
63
64
  "@cludosearch/cludo-search-components": "^1.0.59",
64
- "@etchteam/storybook-addon-status": "^7.0.0",
65
+ "@eslint-react/eslint-plugin": "^5.7.4",
66
+ "@eslint/js": "^10.0.1",
67
+ "@etchteam/storybook-addon-status": "^8.0.0",
65
68
  "@googlemaps/react-wrapper": "^1.1.35",
66
69
  "@googlemaps/typescript-guards": "^2.0.3",
67
- "@rollup/plugin-commonjs": "^28.0.0",
70
+ "@rollup/plugin-commonjs": "^29.0.0",
68
71
  "@rollup/plugin-json": "^6",
69
72
  "@rollup/plugin-node-resolve": "^16",
70
- "@storybook/addon-a11y": "^9.0.17",
71
- "@storybook/addon-docs": "^9.0.17",
72
- "@storybook/addon-links": "^9.0.17",
73
- "@storybook/addon-webpack5-compiler-swc": "^3.0.0",
74
- "@storybook/react-webpack5": "^9.0.17",
73
+ "@storybook/addon-a11y": "^10.4.1",
74
+ "@storybook/addon-docs": "^10.4.1",
75
+ "@storybook/addon-links": "^10.4.1",
76
+ "@storybook/addon-webpack5-compiler-swc": "^4.0.3",
77
+ "@storybook/react-webpack5": "^10.4.1",
75
78
  "@swc/core": "^1.4.11",
76
79
  "@swc/jest": "^0.2.36",
77
80
  "@testing-library/dom": "^10.4.0",
@@ -79,43 +82,42 @@
79
82
  "@testing-library/react": "^16.0.0",
80
83
  "@types/google.maps": "^3.50.5",
81
84
  "@types/jest": "^30.0.0",
82
- "@types/react": "19.1.8",
83
- "@types/react-dom": "19.1.6",
85
+ "@types/jest-axe": "^3.5.9",
86
+ "@types/react": "^19.2.3",
87
+ "@types/react-dom": "^19.2.3",
84
88
  "@typescript-eslint/eslint-plugin": "^8.0",
85
89
  "@typescript-eslint/parser": "^8.0",
86
90
  "axios": "^1",
87
91
  "colors": "^1.4.0",
88
92
  "dayjs": "^1.10.7",
89
- "eslint": "^9.0",
90
- "eslint-config-airbnb": "^19.0.0",
91
- "eslint-plugin-import": "^2.25.4",
92
- "eslint-plugin-jsx-a11y": "^6.5.1",
93
- "eslint-plugin-react": "^7.28.0",
94
- "eslint-plugin-react-hooks": "^5.0",
95
- "eslint-plugin-storybook": "^9.0.17",
93
+ "eslint": "^10.0",
94
+ "globals": "^17.6.0",
96
95
  "identity-obj-proxy": "^3.0.0",
97
96
  "jest": "^29.7.0",
97
+ "jest-axe": "^10.0.0",
98
98
  "jest-environment-jsdom": "^29.3.1",
99
99
  "jsuri": "^1.3.1",
100
- "react": "19.1.0",
101
- "react-dom": "19.1.0",
100
+ "react": "^19.2.3",
101
+ "react-dom": "^19.2.3",
102
102
  "react-hook-form": "^7.50.1",
103
103
  "rollup": "^4",
104
104
  "rollup-plugin-copy": "^3.4.0",
105
105
  "rollup-plugin-peer-deps-external": "^2.2.4",
106
106
  "rollup-plugin-postcss": "^4.0.2",
107
107
  "rollup-plugin-svg": "^2.0.0",
108
- "rollup-plugin-typescript2": "^0.36",
109
- "storybook": "^9.0.17",
108
+ "rollup-plugin-typescript2": "^0.37",
109
+ "storybook": "^10.4.1",
110
110
  "styled-components": "^6.1.1",
111
111
  "ts-jest": "^29",
112
112
  "typescript": "^5.0.0",
113
- "webpack": "^5.69.0"
113
+ "typescript-eslint": "^8.59.2",
114
+ "webpack": "^5.69.0",
115
+ "eslint-plugin-storybook": "10.4.1"
114
116
  },
115
117
  "dependencies": {
116
118
  "core-js": "^3.20.2",
117
119
  "downshift": "^9.0",
118
- "html-react-parser": "^5",
120
+ "html-react-parser": "^6",
119
121
  "react-hook-form": "^7.5",
120
122
  "react-hook-recaptcha": "^2.0.1",
121
123
  "react-qr-code": "^2.0.11",