@raspberrypifoundation/design-system-react 1.7.0 → 2.0.0-beta.2

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 (50) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +64 -10
  3. package/dist/rpf-design-system-react.css +1 -0
  4. package/dist/rpf-design-system-react.js +2744 -0
  5. package/dist/rpf-design-system-react.umd.cjs +35 -0
  6. package/dist/scss/components/accordion.scss +94 -0
  7. package/dist/scss/components/alert.scss +131 -0
  8. package/dist/scss/components/burger-menu.scss +89 -0
  9. package/dist/scss/components/button.scss +321 -0
  10. package/dist/scss/components/forms/error-message.scss +20 -0
  11. package/dist/scss/components/forms/fieldset.scss +42 -0
  12. package/dist/scss/components/forms/input-checkbox.scss +62 -0
  13. package/dist/scss/components/forms/input-label.scss +36 -0
  14. package/dist/scss/components/forms/input-number.scss +61 -0
  15. package/dist/scss/components/forms/input-password.scss +109 -0
  16. package/dist/scss/components/forms/input-radio.scss +63 -0
  17. package/dist/scss/components/forms/input-search.scss +65 -0
  18. package/dist/scss/components/forms/input-select.scss +14 -0
  19. package/dist/scss/components/forms/input-text.scss +5 -0
  20. package/dist/scss/components/forms/input-textarea.scss +12 -0
  21. package/dist/scss/components/forms/inputs.scss +40 -0
  22. package/dist/scss/components/layout/decorative-section.scss +185 -0
  23. package/dist/scss/components/link.scss +51 -0
  24. package/dist/scss/components/menu-item.scss +66 -0
  25. package/dist/scss/components/menu-title.scss +25 -0
  26. package/dist/scss/components/menu.scss +31 -0
  27. package/dist/scss/components/progress-bar.scss +43 -0
  28. package/dist/scss/components/squiggle.scss +46 -0
  29. package/dist/scss/components/table/table-cell.scss +82 -0
  30. package/dist/scss/components/table/table.scss +32 -0
  31. package/dist/scss/components/tag.scss +50 -0
  32. package/dist/scss/design-system-core.scss +37 -0
  33. package/dist/scss/mixins/_inputs.scss +19 -0
  34. package/dist/scss/mixins/_typography.scss +75 -0
  35. package/dist/scss/properties/_border.scss +13 -0
  36. package/dist/scss/properties/_font-size.scss +14 -0
  37. package/dist/scss/properties/_font-weight.scss +4 -0
  38. package/dist/scss/properties/_line-height.scss +15 -0
  39. package/dist/scss/properties/_shadows.scss +7 -0
  40. package/dist/scss/properties/_sizing.scss +6 -0
  41. package/dist/scss/properties/_spacing.scss +16 -0
  42. package/dist/scss/properties/colors/_alert.scss +10 -0
  43. package/dist/scss/properties/colors/_brand.scss +14 -0
  44. package/dist/scss/properties/colors/_decorative.scss +58 -0
  45. package/dist/scss/properties/colors/_greys.scss +18 -0
  46. package/dist/scss/properties/colors/_inputs.scss +13 -0
  47. package/dist/scss/properties/colors/_text.scss +7 -0
  48. package/package.json +61 -83
  49. package/dist/cjs/bundle.js +0 -1821
  50. package/dist/esm/bundle.js +0 -1803
package/CHANGELOG.md CHANGED
@@ -4,11 +4,19 @@ 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.0 BETA
8
+
9
+ - Updated Storybook Introduction (#119)
10
+ - Moved to use Vite for development (#114)
11
+ - Include all design-system-core components into the package so design system core can be removed as dependency from library users
12
+ (see [UPDATING.md](UPDATING.md) for more details)
13
+
7
14
  ## v1.7.0 - 2024-12-03
8
15
 
9
16
  ### Added
10
17
 
11
18
  - Added support for closing `Alert`s (#112)
19
+ - Update the design-system-core requirement to >2.0.0
12
20
 
13
21
  ### Changed
14
22
 
package/README.md CHANGED
@@ -2,16 +2,23 @@
2
2
 
3
3
  The React implementation of the **Raspberry Pi Foundation Design System**
4
4
 
5
- <a href="https://design-system-react.rpf-internal.org/?path=/docs/documentation-introduction--documentation">![Foo](https://img.shields.io/badge/React-Components_(Storybook)-label?style=for-the-badge&color=hsla(223%2C%209%25%2C%2085%25%2C%201)&labelColor=00AECE)</a>
5
+ <a href="https://design-system-react.rpf-internal.org/?path=/docs/documentation-introduction--documentation">![React Components](<https://img.shields.io/badge/React-Components_(Storybook)-label?style=for-the-badge&color=hsla(223%2C%209%25%2C%2085%25%2C%201)&labelColor=00AECE>)</a>
6
6
 
7
7
  ### Design System links:
8
- <a href="https://rpf-design-system.pages.dev/">![Foo](https://img.shields.io/badge/Design_System-Documentation-label?style=for-the-badge&color=hsla(223%2C%209%25%2C%2085%25%2C%201)&labelColor=CD2355)</a>
8
+
9
+ <a href="https://rpf-design-system.pages.dev/">![Design System Documentation](<https://img.shields.io/badge/Design_System-Documentation-label?style=for-the-badge&color=hsla(223%2C%209%25%2C%2085%25%2C%201)&labelColor=CD2355>)</a>
10
+
9
11
  <br>
10
- <a href="https://github.com/raspberrypifoundation/design-system-core/">![Foo](https://img.shields.io/badge/Core-Repository-label?style=for-the-badge&color=hsla(223%2C%209%25%2C%2085%25%2C%201)&labelColor=D95495)</a>
11
- <a href="https://design-system-core.rpf-internal.org/?path=/docs/about--docs">![Foo](https://img.shields.io/badge/Core-Components_(Storybook)-label?style=for-the-badge&color=hsla(223%2C%209%25%2C%2085%25%2C%201)&labelColor=D95495)</a>
12
+
13
+ <a href="https://github.com/raspberrypifoundation/design-system-core/">![Core Repository](<https://img.shields.io/badge/Core-Repository-label?style=for-the-badge&color=hsla(223%2C%209%25%2C%2085%25%2C%201)&labelColor=D95495>)</a>
14
+
15
+ <a href="https://design-system-core.rpf-internal.org/?path=/docs/about--docs">![Core Components](<https://img.shields.io/badge/Core-Components_(Storybook)-label?style=for-the-badge&color=hsla(223%2C%209%25%2C%2085%25%2C%201)&labelColor=D95495>)</a>
16
+
12
17
  <br>
13
- <a href="https://github.com/raspberrypifoundation/design-system-rails/">![Foo](https://img.shields.io/badge/Rails-Repository-label?style=for-the-badge&color=hsla(223%2C%209%25%2C%2085%25%2C%201)&labelColor=CC0000)</a>
14
- <a href="https://design-system-rails.rpf-internal.org/lookbook">![Foo](https://img.shields.io/badge/Rails-Components_(Lookbook)-label?style=for-the-badge&color=hsla(223%2C%209%25%2C%2085%25%2C%201)&labelColor=CC0000)</a>
18
+
19
+ <a href="https://github.com/raspberrypifoundation/design-system-rails/">![Rails Repository](<https://img.shields.io/badge/Rails-Repository-label?style=for-the-badge&color=hsla(223%2C%209%25%2C%2085%25%2C%201)&labelColor=CC0000>)</a>
20
+
21
+ <a href="https://design-system-rails.rpf-internal.org/lookbook">![Rails Components](<https://img.shields.io/badge/Rails-Components_(Lookbook)-label?style=for-the-badge&color=hsla(223%2C%209%25%2C%2085%25%2C%201)&labelColor=CC0000>)</a>
15
22
 
16
23
  ---
17
24
 
@@ -26,13 +33,15 @@ yarn add @raspberrypifoundation/design-system-react
26
33
  ## Development
27
34
 
28
35
  Dependencies:
29
- * asdf (https://asdf-vm.com/)
36
+
37
+ - asdf (https://asdf-vm.com/)
30
38
 
31
39
  ```
32
40
  asdf install
33
41
  ```
34
42
 
35
43
  Enable corepack, which adds the yarn binary to your path
44
+
36
45
  ```
37
46
  corepack enable
38
47
  ```
@@ -49,6 +58,51 @@ Run Storybook:
49
58
  yarn run storybook
50
59
  ```
51
60
 
61
+ ### Linting & Formatting
62
+
63
+ We use ESLint for linting and Prettier for formatting.
64
+
65
+ <details>
66
+ <summary>Why both?</summary>
67
+
68
+ Learn more [here](https://prettier.io/docs/en/comparison) and [here](https://eslint.org/blog/2023/10/deprecating-formatting-rules/#main).
69
+
70
+ In short:
71
+
72
+ - Formatting is faster and simpler with Prettier.
73
+ - Seperation of concerns for code quality and bug catching (ESLint) and code formatting (Prettier).
74
+ - It is recommended by ESLint maintainers to run a dedicated source code formatter - such as Prettier.
75
+
76
+ For both we are using the default recommend configurations to avoid [bike-shedding](https://en.wikipedia.org/wiki/Law_of_triviality). Prettier uses purposely [opinionated options](https://prettier.io/docs/en/options) for example.
77
+
78
+ </details>
79
+
80
+ #### Linting
81
+
82
+ You are manually run ESLint with:
83
+
84
+ ```bash
85
+ yarn lint
86
+ ```
87
+
88
+ To automatically fix issues where possible:
89
+
90
+ ```bash
91
+ yarn lint --fix
92
+ ```
93
+
94
+ #### Formatting
95
+
96
+ The `.prettierrc` file lets lets editors and other tools know we're are using Prettier.
97
+
98
+ To get the most out of Prettier, it’s recommended to [run it from your editor](https://prettier.io/docs/en/editors).
99
+
100
+ If you just want to run the formatting manually:
101
+
102
+ ```bash
103
+ yarn format
104
+ ```
105
+
52
106
  ### Testing
53
107
 
54
108
  Run the tests with `yarn run test`.
@@ -57,7 +111,7 @@ Run the tests with `yarn run test`.
57
111
 
58
112
  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
113
 
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`.
114
+ 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
115
 
62
116
  ```
63
117
  yarn link ../design-system-core
@@ -96,13 +150,13 @@ If you are experiencing issues and believe design-system-react is not using your
96
150
 
97
151
  ## Node versions
98
152
 
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.
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.
100
154
 
101
155
  ## Deployment
102
156
 
103
157
  Create a new [release](https://github.com/RaspberryPiFoundation/design-system-react/releases):
104
158
 
105
- - Use `yarn version -i minor` to increment the version in `package.json`. You can also use `major` or `patch` instead of `minor` here.
159
+ - Use `yarn version -i minor` to increment the version in `package.json`. You can also use `major` or `patch` instead of `minor` here.
106
160
  - Update the changelog
107
161
  - Commit and push to a branch, and open a PR for review.
108
162