@raspberrypifoundation/design-system-react 2.7.2 → 2.9.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 (65) hide show
  1. package/README.md +16 -7
  2. package/dist/design-system-react.css +1 -1
  3. package/dist/design-system-react.js +3313 -889
  4. package/dist/design-system-react.umd.cjs +16 -13
  5. package/dist/scss/components/switch.scss +179 -0
  6. package/dist/scss/design-system-core.scss +3 -2
  7. package/dist/scss/properties/colors/_greys.scss +1 -0
  8. package/dist/scss/utility/_visually-hidden.scss +11 -0
  9. package/dist/types/lib/main.d.ts +10 -0
  10. package/dist/types/lib/main.d.ts.map +1 -1
  11. package/dist/types/src/components/Button/index.d.ts.map +1 -1
  12. package/dist/types/src/components/Form/CheckboxInput/CheckboxInput.types.d.ts +1 -11
  13. package/dist/types/src/components/Form/CheckboxInput/CheckboxInput.types.d.ts.map +1 -1
  14. package/dist/types/src/components/Form/CheckboxInput/index.d.ts +1 -1
  15. package/dist/types/src/components/Form/CheckboxInput/index.d.ts.map +1 -1
  16. package/dist/types/src/components/Form/RadioInput/RadioInput.types.d.ts +3 -11
  17. package/dist/types/src/components/Form/RadioInput/RadioInput.types.d.ts.map +1 -1
  18. package/dist/types/src/components/Form/RadioInput/index.d.ts +1 -1
  19. package/dist/types/src/components/Form/RadioInput/index.d.ts.map +1 -1
  20. package/dist/types/src/components/Form/SelectInput/SelectInput.types.d.ts +1 -7
  21. package/dist/types/src/components/Form/SelectInput/SelectInput.types.d.ts.map +1 -1
  22. package/dist/types/src/components/Form/SelectInput/index.d.ts +1 -1
  23. package/dist/types/src/components/Form/SelectInput/index.d.ts.map +1 -1
  24. package/dist/types/src/components/Form/Switch/Switch.spec.d.ts +2 -0
  25. package/dist/types/src/components/Form/Switch/Switch.spec.d.ts.map +1 -0
  26. package/dist/types/src/components/Form/Switch/Switch.types.d.ts +24 -0
  27. package/dist/types/src/components/Form/Switch/Switch.types.d.ts.map +1 -0
  28. package/dist/types/src/components/Form/Switch/index.d.ts +16 -0
  29. package/dist/types/src/components/Form/Switch/index.d.ts.map +1 -0
  30. package/dist/types/src/components/Form/TextInput/TextInput.types.d.ts +1 -7
  31. package/dist/types/src/components/Form/TextInput/TextInput.types.d.ts.map +1 -1
  32. package/dist/types/src/components/Form/TextInput/index.d.ts +1 -1
  33. package/dist/types/src/components/Form/TextInput/index.d.ts.map +1 -1
  34. package/dist/types/src/components/Menu/Menu.types.d.ts +6 -0
  35. package/dist/types/src/components/Menu/Menu.types.d.ts.map +1 -0
  36. package/dist/types/src/components/Menu/MenuButton/MenuButton.types.d.ts +7 -0
  37. package/dist/types/src/components/Menu/MenuButton/MenuButton.types.d.ts.map +1 -0
  38. package/dist/types/src/components/Menu/MenuButton/index.d.ts +4 -0
  39. package/dist/types/src/components/Menu/MenuButton/index.d.ts.map +1 -0
  40. package/dist/types/src/components/Menu/MenuItem/MenuItem.types.d.ts +11 -0
  41. package/dist/types/src/components/Menu/MenuItem/MenuItem.types.d.ts.map +1 -0
  42. package/dist/types/src/components/Menu/MenuItem/index.d.ts +6 -0
  43. package/dist/types/src/components/Menu/MenuItem/index.d.ts.map +1 -0
  44. package/dist/types/src/components/Menu/MenuTitle/MenuTitle.types.d.ts +4 -0
  45. package/dist/types/src/components/Menu/MenuTitle/MenuTitle.types.d.ts.map +1 -0
  46. package/dist/types/src/components/Menu/MenuTitle/index.d.ts +5 -0
  47. package/dist/types/src/components/Menu/MenuTitle/index.d.ts.map +1 -0
  48. package/dist/types/src/components/Menu/index.d.ts +5 -0
  49. package/dist/types/src/components/Menu/index.d.ts.map +1 -0
  50. package/dist/types/src/stories/Menu/Menu.stories.d.ts +8 -0
  51. package/dist/types/src/stories/Menu/Menu.stories.d.ts.map +1 -0
  52. package/dist/types/src/stories/Menu/MenuButton.stories.d.ts +7 -0
  53. package/dist/types/src/stories/Menu/MenuButton.stories.d.ts.map +1 -0
  54. package/dist/types/src/stories/Menu/MenuItem.stories.d.ts +9 -0
  55. package/dist/types/src/stories/Menu/MenuItem.stories.d.ts.map +1 -0
  56. package/dist/types/src/stories/Menu/MenuTitle.stories.d.ts +7 -0
  57. package/dist/types/src/stories/Menu/MenuTitle.stories.d.ts.map +1 -0
  58. package/dist/types/src/stories/forms/RadioInput.stories.d.ts +4 -0
  59. package/dist/types/src/stories/forms/RadioInput.stories.d.ts.map +1 -1
  60. package/dist/types/src/stories/forms/Switch.stories.d.ts +54 -0
  61. package/dist/types/src/stories/forms/Switch.stories.d.ts.map +1 -0
  62. package/dist/types/src/stories/forms/TextInput.stories.d.ts +4 -0
  63. package/dist/types/src/stories/forms/TextInput.stories.d.ts.map +1 -1
  64. package/package.json +18 -13
  65. package/CHANGELOG.md +0 -328
package/package.json CHANGED
@@ -1,19 +1,22 @@
1
1
  {
2
2
  "name": "@raspberrypifoundation/design-system-react",
3
- "version": "2.7.2",
3
+ "version": "2.9.0",
4
4
  "type": "module",
5
5
  "main": "./dist/design-system-react.umd.cjs",
6
6
  "module": "./dist/design-system-react.js",
7
7
  "files": [
8
8
  "dist"
9
9
  ],
10
- "sideEffects": false,
10
+ "sideEffects": [
11
+ "dist/design-system-react.css"
12
+ ],
11
13
  "exports": {
12
14
  ".": {
13
15
  "types": "./dist/types/lib/main.d.ts",
14
16
  "require": "./dist/design-system-react.umd.cjs",
15
17
  "import": "./dist/design-system-react.js"
16
18
  },
19
+ "./styles.css": "./dist/design-system-react.css",
17
20
  "./scss/*": "./dist/scss/*.scss",
18
21
  "./scss": "./dist/scss/design-system-core.scss",
19
22
  "./package.json": "./package.json",
@@ -40,20 +43,22 @@
40
43
  "ts:watch": "tsc --noEmit --watch"
41
44
  },
42
45
  "dependencies": {
43
- "@raspberrypifoundation/design-system-core": "^2.4.0",
46
+ "@raspberrypifoundation/design-system-core": "^2.4.5",
44
47
  "classnames": "^2.5.1",
45
48
  "lucide-react": "^0.553.0"
46
49
  },
47
50
  "devDependencies": {
48
51
  "@eslint/js": "^9.15.0",
49
- "@storybook/addon-essentials": "^8.6.11",
50
- "@storybook/addon-interactions": "^8.6.11",
51
- "@storybook/addon-onboarding": "^8.6.11",
52
- "@storybook/blocks": "^8.6.11",
53
- "@storybook/preview-api": "^8.6.11",
54
- "@storybook/react": "^8.6.11",
55
- "@storybook/react-vite": "^8.6.11",
56
- "@storybook/test": "^8.6.11",
52
+ "@floating-ui/react": "^0.26.19",
53
+ "@storybook/addon-a11y": "8.6.15",
54
+ "@storybook/addon-essentials": "8.6.15",
55
+ "@storybook/addon-interactions": "8.6.15",
56
+ "@storybook/addon-onboarding": "8.6.15",
57
+ "@storybook/blocks": "8.6.15",
58
+ "@storybook/preview-api": "8.6.15",
59
+ "@storybook/react": "8.6.15",
60
+ "@storybook/react-vite": "8.6.15",
61
+ "@storybook/test": "8.6.15",
57
62
  "@testing-library/dom": "^10.4.1",
58
63
  "@testing-library/jest-dom": "^6.6.3",
59
64
  "@testing-library/react": "^16.1.0",
@@ -79,7 +84,7 @@
79
84
  "react-dom": "^18.3.1",
80
85
  "react-router-dom": "^6.24.0",
81
86
  "sass-embedded": "^1.83.1",
82
- "storybook": "^8.6.11",
87
+ "storybook": "^8.6.18",
83
88
  "typescript": "^5.9.2",
84
89
  "vite": "^6.2.4",
85
90
  "vitest": "^3.1.1"
@@ -103,4 +108,4 @@
103
108
  "plugin:storybook/recommended"
104
109
  ]
105
110
  }
106
- }
111
+ }
package/CHANGELOG.md DELETED
@@ -1,328 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
-
7
- ## 2.7.2 - 2025-11-28
8
-
9
- ### Changed
10
-
11
- - Fieldset, InputField, SelectInput, TextareaInput, TextInput, RadioInput and InputLabel have Typescript typing for props. (#169)
12
-
13
- ## 2.7.1 - 2025-11-13
14
-
15
- ### Changed
16
-
17
- - The HeaderCell component now uses Lucide arrow icons for sortable columns to make it clear which columns are sortable and which columns are currently being sorted. (#166)
18
-
19
- ## 2.7.0 - 2025-10-21
20
-
21
- ### Added
22
-
23
- - Add support for using React 19, but keeping react 18 as the default for now. (#159)
24
-
25
- ### Changed
26
-
27
- - Table, HeaderCell and BodyCell have Typescript typing for props. (#162)
28
- - The HeaderCell is clickable if it has a sort direction, and adds `aria-sort`. (#163)
29
-
30
- ## 2.6.2 - 2025-09-18
31
-
32
- ### Changed
33
-
34
- - Types are now exported in `main.ts` for CheckboxInput, SearchInput, Alert, Button, Tag and ProgressBar. (#160)
35
-
36
- ## 2.6.1 - 2025-09-18
37
-
38
- ### Changed
39
-
40
- - CheckboxInput, SearchInput, Alert, Button, Tag and ProgressBar have Typescript typing for props. (#156)
41
- - `Alert` props are now enforced at the type level - you cannot have `title` and `titleChildren` at the same time, nor `text` and `children`.
42
-
43
- ## 2.6.0 - 2025-09-12
44
-
45
- ### Added
46
-
47
- - Migration-optimised Typescript configuration (#149)
48
- - Modal component, including typing
49
-
50
- ## 2.5.0 - 2025-09-11
51
-
52
- ### Changed
53
-
54
- - `Alert` title can accept custom children (#152)
55
-
56
- ## 2.4.2 - 2025-07-30
57
-
58
- ### Changed
59
-
60
- - Improved `SearchInput` accessibility:
61
- - Wrapped component in semantic `<search>` element and a `<form>` element
62
- - Moved `onClick` handler to the `form` element
63
- - Changed button type to `submit`
64
-
65
- It should now be possible for users to submit their input using the keyboard 'enter' key without having to tab to the button.
66
-
67
- ## 2.4.1 - 2025-07-30
68
-
69
- ### Changed
70
-
71
- - Upgrade Design System Core to v2.3.1
72
-
73
- ## 2.4.0 - 2025-07-15
74
-
75
- ### Changed
76
-
77
- - Material Symbols now loads using Google Fonts instead of a local package to better support use in web components
78
-
79
- ## 2.3.0 - 2025-07-02
80
-
81
- ### Added
82
-
83
- - `complete` prop to `ProgressBar`
84
- - `className` prop to `ProgressBar`
85
-
86
- ### Changed
87
-
88
- - Upgrade Design System Core to v2.3.0
89
-
90
- ## Fixed
91
-
92
- - Checkbox using the wrong HTML causing styling issues.
93
-
94
- ## 2.2.0 - 2025-04-14
95
-
96
- ### Changed
97
-
98
- - Modify build output to ensure CRA based projects are able to import the components correctly
99
- - Upgrade dependencies and improve storybook loading
100
-
101
- ### Removed
102
-
103
- - Remove react-router-dom Link from the Button component, instead optionally allow it to be passed in as a prop.
104
- To use it:
105
-
106
- ```jsx
107
- import { Link } from "react-router-dom";
108
- import { Button } from "@raspberrypifoundation/design-system-react";
109
-
110
- <Button
111
- href="/some-path"
112
- linkComponent={Link}
113
- // other props
114
- />;
115
- ```
116
-
117
- ## 2.1.0 - 2025-02-26
118
-
119
- ### Added
120
-
121
- - Checkbox component now supports a custom class (122)
122
-
123
- ## 2.0 - 2025-02-12
124
-
125
- - Updated Storybook Introduction (#119)
126
- - Moved to use Vite for development (#114)
127
- - Include all design-system-core components into the package so design system core can be removed as dependency from library users
128
- (see [UPDATING.md](UPDATING.md) for more details)
129
- - design-system-core version included is 2.0.0
130
-
131
- ## v1.7.0 - 2024-12-03
132
-
133
- ### Added
134
-
135
- - Added support for closing `Alert`s (#112)
136
- - Update the design-system-core requirement to >2.0.0
137
-
138
- ### Changed
139
-
140
- - Update README so labels show (#110)
141
-
142
- ## v1.6.0 - 2024-10-24
143
-
144
- ### Changed
145
-
146
- - Update to use yarn instead of npm and set peerdependency for react-router-dom (#98)
147
- - Update InputField, SearchInput, SelectInput, TextInput and TextareaInput to link label to input field correctly using id (#107)
148
- - Update `README.md` to include global header (#97)
149
- - Update the search input to accept an onChange function and a default value. Add button type to the search button. (#108)
150
-
151
- ## v1.5.0
152
-
153
- ## Fixed
154
-
155
- - Fix (#103) using wrong version number (#106)
156
- - Fix (#101) being added to wrong release in changelog (#103)
157
-
158
- ### Changed
159
-
160
- - Alert component can now accept children (#101)
161
-
162
- ## v1.4.0
163
-
164
- ### Added
165
-
166
- - Table component (#92)
167
-
168
- ## v1.3.1
169
-
170
- ### Fixed
171
-
172
- - Fixed `exports` change in 1.3.0 (#89) to use relative path in `package.json`
173
-
174
- ## v1.3.0
175
-
176
- ### Changed
177
-
178
- - Use `exports` instead of `main`/`module` in `package.json` to define what is exported (#89)
179
-
180
- ## v1.2.1
181
-
182
- ### Fixed
183
-
184
- - Added missing Tag export
185
-
186
- ## v1.2.0
187
-
188
- ### Added
189
-
190
- - SearchInput component (#82)
191
- - InputLabel component (#71)
192
- - Fieldset component (#70)
193
- - Add changelog update check to github workflow (#73)
194
- - Tag component (#81)
195
- - Add details to `README.md` on using `npm link` with `design-system-core` (#80)
196
-
197
- ### Changed
198
-
199
- - Update design-system-core to v1.3.2
200
- - Update nodejs to latest LTS release (v20.16.0) to match design-system-core (#77)
201
-
202
- ## Fixed
203
-
204
- - Update `.nvmrc` to match `.tool_versions` in order to fix builds (#84)
205
-
206
- ## v1.1.16
207
-
208
- ### Added
209
-
210
- - TextareaInput component
211
- - RadioInput component
212
- - Updated `design-system-core` to `v1.1.1`
213
-
214
- ## v1.1.15
215
-
216
- ### Fixed
217
-
218
- - Updated Core to v1.1.0
219
- - Update `ProgressBar` as per https://github.com/RaspberryPiFoundation/design-system-core/pull/124
220
- - This does not result in breaking changes to this library
221
-
222
- ## v1.1.14
223
-
224
- ### Fixed
225
-
226
- - Remove defaultProps from accordion
227
-
228
- ## v1.1.13
229
-
230
- ### Fixed
231
-
232
- - Ensure aria-label on button is passed through unchanged
233
-
234
- ## v1.1.12
235
-
236
- ### Fixed
237
-
238
- - Only change the paragraph spacing of the alerts
239
-
240
- ## v1.1.11
241
-
242
- ### Fixed
243
-
244
- - Fix linting by assigning options to a variable
245
- - Remove reliance on defaultProps (to be deprecated)
246
- - Tidy up alert padding
247
-
248
- ## v1.1.9
249
-
250
- - Fixing `rollup` config
251
-
252
- ## v1.1.8
253
-
254
- ### Changed
255
-
256
- - `Button` component now uses the `react-router-dom` `Link` component for links rather than a plain anchor tag
257
-
258
- ## v1.1.7
259
-
260
- ### Fixed
261
-
262
- - Fixed legacy `Button` component use case with React element as icon
263
-
264
- ## v1.1.6
265
-
266
- ### Fixed
267
-
268
- - Exports Alert component
269
-
270
- ## v1.1.5
271
-
272
- ### Added
273
-
274
- - Alert component added
275
-
276
- ## v1.1.4
277
-
278
- ### Fixed
279
-
280
- - Fixes bug with SelectInput to allow setting of placeholder value
281
-
282
- ## v1.1.0
283
-
284
- ### Added
285
-
286
- - v1.1 TextInput component added
287
- - v1.1 SelectInput component added
288
- - v1.1 CheckboxInput component added
289
- - v1.1 ProgressBar component added
290
-
291
- ## v1.0.0
292
-
293
- ### Added
294
-
295
- - Button additions to bring in line with Core ([#15](https://github.com/RaspberryPiFoundation/design-system-react/pull/15))
296
- - Added: Icon library/font (same as core)
297
- - Added prop: iconPosition
298
- - Added prop: variant, danger
299
- - Added prop: fullWidth
300
- - Storybook: Enabled icon changing
301
- - Storybook: Added link to icon names
302
- - Storybook: Added button docs
303
- - General storybook additions ([#15](https://github.com/RaspberryPiFoundation/design-system-react/pull/15))
304
- - Storybook: Added pseudo-state addon
305
- - Storybook: Added "Install" docs
306
- - Storybook: Added docs styles
307
-
308
- ### Changed
309
-
310
- - Button changes to bring in line with Core ([#15](https://github.com/RaspberryPiFoundation/design-system-react/pull/15))
311
- - Renamed prop: enabled -> disabled
312
- - Renamed prop: textAlways -> iconOnly
313
- - Renamed prop: small -> size
314
- - Removed prop: active
315
- - Removed prop: textOnHover (not actually used/functional)
316
- - Changed prop: icon, now uses same icon font as core.
317
-
318
- ### Removed
319
-
320
- - Button changes to bring in line with Core ([#15](https://github.com/RaspberryPiFoundation/design-system-react/pull/15))
321
- - Removed prop: active
322
- - Removed prop: textOnHover (not actually used/functional)
323
-
324
- ### Fixed
325
-
326
- - General storybook improvements ([#15](https://github.com/RaspberryPiFoundation/design-system-react/pull/15))
327
- - Storybook: Updated "Introduction" docs
328
- - Storybook: Reordered addons