@raspberrypifoundation/design-system-react 1.5.0 → 1.7.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.
- package/CHANGELOG.md +203 -0
- package/README.md +79 -18
- package/dist/cjs/bundle.js +51 -32
- package/dist/esm/bundle.js +51 -32
- package/package.json +9 -5
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
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
|
+
## v1.7.0 - 2024-12-03
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Added support for closing `Alert`s (#112)
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Update README so labels show (#110)
|
|
16
|
+
|
|
17
|
+
## v1.6.0 - 2024-10-24
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Update to use yarn instead of npm and set peerdependency for react-router-dom (#98)
|
|
22
|
+
- Update InputField, SearchInput, SelectInput, TextInput and TextareaInput to link label to input field correctly using id (#107)
|
|
23
|
+
- Update `README.md` to include global header (#97)
|
|
24
|
+
- Update the search input to accept an onChange function and a default value. Add button type to the search button. (#108)
|
|
25
|
+
|
|
26
|
+
## v1.5.0
|
|
27
|
+
|
|
28
|
+
## Fixed
|
|
29
|
+
|
|
30
|
+
- Fix (#103) using wrong version number (#106)
|
|
31
|
+
- Fix (#101) being added to wrong release in changelog (#103)
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
|
|
35
|
+
- Alert component can now accept children (#101)
|
|
36
|
+
|
|
37
|
+
## v1.4.0
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
|
|
41
|
+
- Table component (#92)
|
|
42
|
+
|
|
43
|
+
## v1.3.1
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
|
|
47
|
+
- Fixed `exports` change in 1.3.0 (#89) to use relative path in `package.json`
|
|
48
|
+
|
|
49
|
+
## v1.3.0
|
|
50
|
+
|
|
51
|
+
### Changed
|
|
52
|
+
|
|
53
|
+
- Use `exports` instead of `main`/`module` in `package.json` to define what is exported (#89)
|
|
54
|
+
|
|
55
|
+
## v1.2.1
|
|
56
|
+
|
|
57
|
+
### Fixed
|
|
58
|
+
|
|
59
|
+
- Added missing Tag export
|
|
60
|
+
|
|
61
|
+
## v1.2.0
|
|
62
|
+
|
|
63
|
+
### Added
|
|
64
|
+
|
|
65
|
+
- SearchInput component (#82)
|
|
66
|
+
- InputLabel component (#71)
|
|
67
|
+
- Fieldset component (#70)
|
|
68
|
+
- Add changelog update check to github workflow (#73)
|
|
69
|
+
- Tag component (#81)
|
|
70
|
+
- Add details to `README.md` on using `npm link` with `design-system-core` (#80)
|
|
71
|
+
|
|
72
|
+
### Changed
|
|
73
|
+
|
|
74
|
+
- Update design-system-core to v1.3.2
|
|
75
|
+
- Update nodejs to latest LTS release (v20.16.0) to match design-system-core (#77)
|
|
76
|
+
|
|
77
|
+
## Fixed
|
|
78
|
+
|
|
79
|
+
- Update `.nvmrc` to match `.tool_versions` in order to fix builds (#84)
|
|
80
|
+
|
|
81
|
+
## v1.1.16
|
|
82
|
+
|
|
83
|
+
### Added
|
|
84
|
+
|
|
85
|
+
- TextareaInput component
|
|
86
|
+
- RadioInput component
|
|
87
|
+
- Updated `design-system-core` to `v1.1.1`
|
|
88
|
+
|
|
89
|
+
## v1.1.15
|
|
90
|
+
|
|
91
|
+
### Fixed
|
|
92
|
+
|
|
93
|
+
- Updated Core to v1.1.0
|
|
94
|
+
- Update `ProgressBar` as per https://github.com/RaspberryPiFoundation/design-system-core/pull/124
|
|
95
|
+
- This does not result in breaking changes to this library
|
|
96
|
+
|
|
97
|
+
## v1.1.14
|
|
98
|
+
|
|
99
|
+
### Fixed
|
|
100
|
+
|
|
101
|
+
- Remove defaultProps from accordion
|
|
102
|
+
|
|
103
|
+
## v1.1.13
|
|
104
|
+
|
|
105
|
+
### Fixed
|
|
106
|
+
|
|
107
|
+
- Ensure aria-label on button is passed through unchanged
|
|
108
|
+
|
|
109
|
+
## v1.1.12
|
|
110
|
+
|
|
111
|
+
### Fixed
|
|
112
|
+
|
|
113
|
+
- Only change the paragraph spacing of the alerts
|
|
114
|
+
|
|
115
|
+
## v1.1.11
|
|
116
|
+
|
|
117
|
+
### Fixed
|
|
118
|
+
|
|
119
|
+
- Fix linting by assigning options to a variable
|
|
120
|
+
- Remove reliance on defaultProps (to be deprecated)
|
|
121
|
+
- Tidy up alert padding
|
|
122
|
+
|
|
123
|
+
## v1.1.9
|
|
124
|
+
|
|
125
|
+
- Fixing `rollup` config
|
|
126
|
+
|
|
127
|
+
## v1.1.8
|
|
128
|
+
|
|
129
|
+
### Changed
|
|
130
|
+
|
|
131
|
+
- `Button` component now uses the `react-router-dom` `Link` component for links rather than a plain anchor tag
|
|
132
|
+
|
|
133
|
+
## v1.1.7
|
|
134
|
+
|
|
135
|
+
### Fixed
|
|
136
|
+
|
|
137
|
+
- Fixed legacy `Button` component use case with React element as icon
|
|
138
|
+
|
|
139
|
+
## v1.1.6
|
|
140
|
+
|
|
141
|
+
### Fixed
|
|
142
|
+
|
|
143
|
+
- Exports Alert component
|
|
144
|
+
|
|
145
|
+
## v1.1.5
|
|
146
|
+
|
|
147
|
+
### Added
|
|
148
|
+
|
|
149
|
+
- Alert component added
|
|
150
|
+
|
|
151
|
+
## v1.1.4
|
|
152
|
+
|
|
153
|
+
### Fixed
|
|
154
|
+
|
|
155
|
+
- Fixes bug with SelectInput to allow setting of placeholder value
|
|
156
|
+
|
|
157
|
+
## v1.1.0
|
|
158
|
+
|
|
159
|
+
### Added
|
|
160
|
+
|
|
161
|
+
- v1.1 TextInput component added
|
|
162
|
+
- v1.1 SelectInput component added
|
|
163
|
+
- v1.1 CheckboxInput component added
|
|
164
|
+
- v1.1 ProgressBar component added
|
|
165
|
+
|
|
166
|
+
## v1.0.0
|
|
167
|
+
|
|
168
|
+
### Added
|
|
169
|
+
|
|
170
|
+
- Button additions to bring in line with Core ([#15](https://github.com/RaspberryPiFoundation/design-system-react/pull/15))
|
|
171
|
+
- Added: Icon library/font (same as core)
|
|
172
|
+
- Added prop: iconPosition
|
|
173
|
+
- Added prop: variant, danger
|
|
174
|
+
- Added prop: fullWidth
|
|
175
|
+
- Storybook: Enabled icon changing
|
|
176
|
+
- Storybook: Added link to icon names
|
|
177
|
+
- Storybook: Added button docs
|
|
178
|
+
- General storybook additions ([#15](https://github.com/RaspberryPiFoundation/design-system-react/pull/15))
|
|
179
|
+
- Storybook: Added pseudo-state addon
|
|
180
|
+
- Storybook: Added "Install" docs
|
|
181
|
+
- Storybook: Added docs styles
|
|
182
|
+
|
|
183
|
+
### Changed
|
|
184
|
+
|
|
185
|
+
- Button changes to bring in line with Core ([#15](https://github.com/RaspberryPiFoundation/design-system-react/pull/15))
|
|
186
|
+
- Renamed prop: enabled -> disabled
|
|
187
|
+
- Renamed prop: textAlways -> iconOnly
|
|
188
|
+
- Renamed prop: small -> size
|
|
189
|
+
- Removed prop: active
|
|
190
|
+
- Removed prop: textOnHover (not actually used/functional)
|
|
191
|
+
- Changed prop: icon, now uses same icon font as core.
|
|
192
|
+
|
|
193
|
+
### Removed
|
|
194
|
+
|
|
195
|
+
- Button changes to bring in line with Core ([#15](https://github.com/RaspberryPiFoundation/design-system-react/pull/15))
|
|
196
|
+
- Removed prop: active
|
|
197
|
+
- Removed prop: textOnHover (not actually used/functional)
|
|
198
|
+
|
|
199
|
+
### Fixed
|
|
200
|
+
|
|
201
|
+
- General storybook improvements ([#15](https://github.com/RaspberryPiFoundation/design-system-react/pull/15))
|
|
202
|
+
- Storybook: Updated "Introduction" docs
|
|
203
|
+
- Storybook: Reordered addons
|
package/README.md
CHANGED
|
@@ -1,60 +1,121 @@
|
|
|
1
|
-
# Design System React
|
|
1
|
+
# RPF Design System - React
|
|
2
|
+
|
|
3
|
+
The React implementation of the **Raspberry Pi Foundation Design System**
|
|
4
|
+
|
|
5
|
+
<a href="https://design-system-react.rpf-internal.org/?path=/docs/documentation-introduction--documentation">-label?style=for-the-badge&color=hsla(223%2C%209%25%2C%2085%25%2C%201)&labelColor=00AECE)</a>
|
|
6
|
+
|
|
7
|
+
### Design System links:
|
|
8
|
+
<a href="https://rpf-design-system.pages.dev/">&labelColor=CD2355)</a>
|
|
9
|
+
<br>
|
|
10
|
+
<a href="https://github.com/raspberrypifoundation/design-system-core/">&labelColor=D95495)</a>
|
|
11
|
+
<a href="https://design-system-core.rpf-internal.org/?path=/docs/about--docs">-label?style=for-the-badge&color=hsla(223%2C%209%25%2C%2085%25%2C%201)&labelColor=D95495)</a>
|
|
12
|
+
<br>
|
|
13
|
+
<a href="https://github.com/raspberrypifoundation/design-system-rails/">&labelColor=CC0000)</a>
|
|
14
|
+
<a href="https://design-system-rails.rpf-internal.org/lookbook">-label?style=for-the-badge&color=hsla(223%2C%209%25%2C%2085%25%2C%201)&labelColor=CC0000)</a>
|
|
15
|
+
|
|
16
|
+
---
|
|
2
17
|
|
|
3
18
|
## Usage
|
|
4
19
|
|
|
5
|
-
Using `
|
|
20
|
+
Using `yarn`:
|
|
6
21
|
|
|
7
22
|
```bash
|
|
8
|
-
|
|
9
|
-
npm run storybook
|
|
23
|
+
yarn add @raspberrypifoundation/design-system-react
|
|
10
24
|
```
|
|
11
25
|
|
|
12
|
-
|
|
26
|
+
## Development
|
|
13
27
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
28
|
+
Dependencies:
|
|
29
|
+
* asdf (https://asdf-vm.com/)
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
asdf install
|
|
17
33
|
```
|
|
18
34
|
|
|
35
|
+
Enable corepack, which adds the yarn binary to your path
|
|
36
|
+
```
|
|
37
|
+
corepack enable
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Install packages:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
yarn
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Run Storybook:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
yarn run storybook
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Testing
|
|
53
|
+
|
|
54
|
+
Run the tests with `yarn run test`.
|
|
55
|
+
|
|
19
56
|
### Working with a local version of [design-system-core](https://github.com/RaspberryPiFoundation/design-system-core)
|
|
20
57
|
|
|
21
|
-
Sometimes you may want to work on `design-system-core` and `design-system-react` at the same time. You can do this by working with your local version of core using `
|
|
58
|
+
Sometimes you may want to work on `design-system-core` and `design-system-react` at the same time. You can do this by working with your local version of core using `yarn link`.
|
|
59
|
+
|
|
60
|
+
1. In your `design-system-react` repo and tell the application to use your local version of `design-system-core`. In this command `../design-system-core` should be replaced with the path to your copy of `design-system-core`.
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
yarn link ../design-system-core
|
|
64
|
+
```
|
|
22
65
|
|
|
23
|
-
|
|
66
|
+
The output should look include something like
|
|
24
67
|
|
|
25
68
|
```
|
|
26
|
-
|
|
69
|
+
➤ YN0000: ┌ Resolution step
|
|
70
|
+
➤ YN0085: │ + @raspberrypifoundation/design-system-core@portal:/Users/testy.mctestface/path/to/design-system-core::locator=%40raspberrypifoundation%2Fdesign-system-react%40workspace%3A.
|
|
71
|
+
➤ YN0085: │ - @raspberrypifoundation/design-system-core@npm:1.4.0
|
|
72
|
+
➤ YN0000: └ Completed
|
|
27
73
|
```
|
|
28
74
|
|
|
29
|
-
2.
|
|
75
|
+
2. Set `NODE_OPTIONS=--preserve-symlinks`, to make sure the local version of `design-system-core` is being used.
|
|
30
76
|
|
|
31
77
|
```
|
|
32
|
-
|
|
78
|
+
export NODE_OPTIONS="$NODE_OPTIONS --preserve-symlinks"
|
|
33
79
|
```
|
|
34
80
|
|
|
35
|
-
3.
|
|
81
|
+
3. Re-start storybook
|
|
36
82
|
|
|
37
83
|
```
|
|
38
|
-
|
|
84
|
+
yarn run storybook
|
|
39
85
|
```
|
|
40
86
|
|
|
41
87
|
#### Troubleshooting
|
|
42
88
|
|
|
43
|
-
If you are experiencing issues and believe design-system-react is not using your local version of design-system-core, or if you are running into issues running `
|
|
89
|
+
If you are experiencing issues and believe design-system-react is not using your local version of design-system-core, or if you are running into issues running `yarn link`, try the following:
|
|
44
90
|
|
|
45
91
|
- Check that `design-system-react` and `design-system-core` are both using the same `nodejs` version in `.tool_versions`. If they are not, update the node version(s) in `.tool_versions` locally and retry the steps above. If this was the issues / the `nodejs` versions are not the same, consider creating a PR to bring them in-line.
|
|
46
92
|
|
|
47
|
-
-
|
|
93
|
+
- Make sure the `NODE_OPTIONS=--preserve-symlinks` is set in the same terminal (i.e. shell instance) as Storybook, and that Storybook has been restarted.
|
|
94
|
+
|
|
95
|
+
- Ask in the `design-system` Slack channel.
|
|
96
|
+
|
|
97
|
+
## Node versions
|
|
98
|
+
|
|
99
|
+
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.
|
|
48
100
|
|
|
49
101
|
## Deployment
|
|
50
102
|
|
|
51
103
|
Create a new [release](https://github.com/RaspberryPiFoundation/design-system-react/releases):
|
|
52
104
|
|
|
53
|
-
-
|
|
105
|
+
- Use `yarn version -i minor` to increment the version in `package.json`. You can also use `major` or `patch` instead of `minor` here.
|
|
106
|
+
- Update the changelog
|
|
107
|
+
- Commit and push to a branch, and open a PR for review.
|
|
108
|
+
|
|
109
|
+
Make a cuppa while a peer reviews the release.
|
|
110
|
+
|
|
111
|
+
- Once approved, merge your PR to main
|
|
54
112
|
- Click 'Draft a new release'
|
|
55
113
|
- Type the version in the dropdown and click 'Create new tag'
|
|
56
114
|
- Add a title and some notes about what the release contains
|
|
57
115
|
- Click 'Publish release' (leave 'Set as latest release' checked) and a build will be kicked off
|
|
116
|
+
|
|
117
|
+
Once published
|
|
118
|
+
|
|
58
119
|
- Add new version to `package.json` in your app
|
|
59
120
|
|
|
60
121
|
## Using Docker
|