@raspberrypifoundation/design-system-react 2.6.0 → 2.6.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +21 -0
  3. package/dist/design-system-react.js +675 -739
  4. package/dist/design-system-react.umd.cjs +6 -6
  5. package/dist/types/src/components/Alert/Alert.types.d.ts +41 -0
  6. package/dist/types/src/components/Alert/Alert.types.d.ts.map +1 -0
  7. package/dist/types/src/components/Alert/index.d.ts +4 -25
  8. package/dist/types/src/components/Alert/index.d.ts.map +1 -1
  9. package/dist/types/src/components/Button/Button.types.d.ts +34 -0
  10. package/dist/types/src/components/Button/Button.types.d.ts.map +1 -0
  11. package/dist/types/src/components/Button/index.d.ts +4 -37
  12. package/dist/types/src/components/Button/index.d.ts.map +1 -1
  13. package/dist/types/src/components/Form/CheckboxInput/CheckboxInput.types.d.ts +24 -0
  14. package/dist/types/src/components/Form/CheckboxInput/CheckboxInput.types.d.ts.map +1 -0
  15. package/dist/types/src/components/Form/CheckboxInput/index.d.ts +4 -25
  16. package/dist/types/src/components/Form/CheckboxInput/index.d.ts.map +1 -1
  17. package/dist/types/src/components/Form/SearchInput/SearchInput.types.d.ts +21 -0
  18. package/dist/types/src/components/Form/SearchInput/SearchInput.types.d.ts.map +1 -0
  19. package/dist/types/src/components/Form/SearchInput/index.d.ts +4 -25
  20. package/dist/types/src/components/Form/SearchInput/index.d.ts.map +1 -1
  21. package/dist/types/src/components/ProgressBar/ProgressBar.types.d.ts +11 -0
  22. package/dist/types/src/components/ProgressBar/ProgressBar.types.d.ts.map +1 -0
  23. package/dist/types/src/components/ProgressBar/index.d.ts +4 -15
  24. package/dist/types/src/components/ProgressBar/index.d.ts.map +1 -1
  25. package/dist/types/src/components/Tag/Tag.types.d.ts +13 -0
  26. package/dist/types/src/components/Tag/Tag.types.d.ts.map +1 -0
  27. package/dist/types/src/components/Tag/index.d.ts +3 -17
  28. package/dist/types/src/components/Tag/index.d.ts.map +1 -1
  29. package/dist/types/src/stories/Alert.stories.d.ts +40 -91
  30. package/dist/types/src/stories/Alert.stories.d.ts.map +1 -1
  31. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
4
4
 
5
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
6
 
7
+ ## 2.6.1 - 2025-09-18
8
+
9
+ ### Changed
10
+
11
+ - CheckboxInput, SearchInput, Alert, Button, Tag and ProgressBar have Typescript typing for props. (#156)
12
+ - `Alert` props are now enforced at the type level - you cannot have `title` and `titleChildren` at the same time, nor `text` and `children`.
13
+
7
14
  ## 2.6.0 - 2025-09-12
8
15
 
9
16
  ### Added
package/README.md CHANGED
@@ -152,6 +152,27 @@ If you are experiencing issues and believe design-system-react is not using your
152
152
 
153
153
  We've two places where the NodeJS version is specified, and we should keep these in-sync. The `.tool-versions` is used for local development, installed via `asdf`. The `.nvmrc` is used in the CI/publish Github action, and the Cloudflare pages build process. If you change one, please change t'other.
154
154
 
155
+ ## TypeScript and PropTypes
156
+
157
+ This package is gradually migrating from `PropTypes` to TypeScript for type checking. `PropTypes` were deprecated in 2017 and will not be supported by React 19.
158
+
159
+ ### To get the best type experience:
160
+
161
+ - **TypeScript consumers**
162
+ - You’ll get full static type information when using the TS-enabled components (any component using the `.tsx` file extension).
163
+ - Props are defined with TypeScript interfaces/types instead of `propTypes`.
164
+ - No runtime validation is performed — errors are caught at compile time.
165
+
166
+ - **JavaScript consumers**
167
+ - Components continue to work exactly the same.
168
+ - However, you will no longer see runtime warnings in the console when passing
169
+ incorrect props to components that use TypeScript instead of `propTypes`.
170
+ - Refer to the [Storybook](https://design-system-react.rpf-internal.org/) docs
171
+ or the component’s TypeScript definition for prop typing details.
172
+ - Consider moving to Typescript to get the most out of type definitions.
173
+
174
+ During the migration period you may see a mix of `propTypes` and TypeScript in different components.
175
+
155
176
  ## Deployment
156
177
 
157
178
  Create a new [release](https://github.com/RaspberryPiFoundation/design-system-react/releases):