@raspberrypifoundation/design-system-react 1.6.0 → 2.0.0-beta.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 (50) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/README.md +63 -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 +59 -84
  49. package/dist/cjs/bundle.js +0 -1809
  50. package/dist/esm/bundle.js +0 -1791
package/CHANGELOG.md CHANGED
@@ -4,7 +4,22 @@ 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
- ## Unreleased
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
+
13
+ ## v1.7.0 - 2024-12-03
14
+
15
+ ### Added
16
+
17
+ - Added support for closing `Alert`s (#112)
18
+ - Update the design-system-core requirement to >2.0.0
19
+
20
+ ### Changed
21
+
22
+ - Update README so labels show (#110)
8
23
 
9
24
  ## v1.6.0 - 2024-10-24
10
25
 
package/README.md CHANGED
@@ -2,17 +2,23 @@
2
2
 
3
3
  The React implementation of the **Raspberry Pi Foundation Design System**
4
4
 
5
- [![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)](https://design-system-react.rpf-internal.org/?path=/docs/documentation-introduction--documentation)
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
8
 
9
- [![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)](https://rpf-design-system.pages.dev/)
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
10
 
11
- [![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)](https://github.com/raspberrypifoundation/design-system-core/)
12
- [![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)](https://design-system-core.rpf-internal.org/?path=/docs/about--docs)
11
+ <br>
13
12
 
14
- [![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)](https://github.com/raspberrypifoundation/design-system-rails/)
15
- [![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)](https://design-system-rails.rpf-internal.org/lookbook)
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
+
17
+ <br>
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>
16
22
 
17
23
  ---
18
24
 
@@ -27,13 +33,15 @@ yarn add @raspberrypifoundation/design-system-react
27
33
  ## Development
28
34
 
29
35
  Dependencies:
30
- * asdf (https://asdf-vm.com/)
36
+
37
+ - asdf (https://asdf-vm.com/)
31
38
 
32
39
  ```
33
40
  asdf install
34
41
  ```
35
42
 
36
43
  Enable corepack, which adds the yarn binary to your path
44
+
37
45
  ```
38
46
  corepack enable
39
47
  ```
@@ -50,6 +58,51 @@ Run Storybook:
50
58
  yarn run storybook
51
59
  ```
52
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
+
53
106
  ### Testing
54
107
 
55
108
  Run the tests with `yarn run test`.
@@ -58,7 +111,7 @@ Run the tests with `yarn run test`.
58
111
 
59
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`.
60
113
 
61
- 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`.
62
115
 
63
116
  ```
64
117
  yarn link ../design-system-core
@@ -97,13 +150,13 @@ If you are experiencing issues and believe design-system-react is not using your
97
150
 
98
151
  ## Node versions
99
152
 
100
- 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.
101
154
 
102
155
  ## Deployment
103
156
 
104
157
  Create a new [release](https://github.com/RaspberryPiFoundation/design-system-react/releases):
105
158
 
106
- - 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.
107
160
  - Update the changelog
108
161
  - Commit and push to a branch, and open a PR for review.
109
162