@coopdigital/react 0.4.0 → 0.4.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 (2) hide show
  1. package/README.md +42 -17
  2. package/package.json +11 -3
package/README.md CHANGED
@@ -16,31 +16,32 @@
16
16
  <a href="https://static.coop.co.uk/experience-kit-storybook-react"><img src="https://img.shields.io/badge/storybook-react-F85792" alt="storybook" /></a>
17
17
  [![All Contributors][all_contributors_badge]](#contributors)
18
18
 
19
+ > React components for the Experience Library design system.
20
+
21
+ You can see the full range of components and documentation on the [Experience Kit Storybook](https://static.coop.co.uk/experience-kit-storybook-react)
22
+
19
23
  ## Getting started
20
24
 
21
- Install the package from NPM:
25
+ Install the react package and its companion [styles package](https://www.npmjs.com/package/@coopdigital/styles) from NPM:
22
26
  ```
23
- npm install @coopdigital/react
27
+ npm install @coopdigital/react @coopdigital/styles
24
28
  ```
29
+ *Note: In some edge cases you may want to install the packages independently*
25
30
 
26
- Import the components that you need:
31
+ ## Usage
32
+
33
+ Import the components that you need, along with the main stylesheet and the corresponding component styles:
27
34
  ```
28
- import { Button } from "@coopdigital/react"
35
+ import { Pill } from "@coopdigital/react"
36
+ import "@coopdigital/styles/dist/main.css"
37
+ import "@coopdigital/styles/dist/components/Pill.css"
29
38
  ```
30
39
 
31
- ### Package Scripts
32
-
33
- The following scripts should be run inside the react package folder.
34
-
35
- | Script | Action |
36
- | -------------------- | ---------------------------------------- |
37
- | `npm run test` | To run vitest |
38
- | `npm run test:coverage` | To run vitest test coverage |
39
- | `npm run test:e2e` | To run playwright in headless mode |
40
- | `npm run test:e2e:ui` | To run playwright with UI |
41
- | `npm run build` | To run build script |
42
- | `npm run build:storybook` | To build storybook |
43
- | `npm run storybook` | To run storybook |
40
+ Alternatively if your project uses SASS you can import the source stylesheets:
41
+ ```
42
+ @use "@coopdigital/styles/src/main.scss"
43
+ @use "@coopdigital/styles/src/components/Pill.scss"
44
+ ```
44
45
 
45
46
  ## Contributors ✨
46
47
 
@@ -140,3 +141,27 @@ Thanks goes to these wonderful people:
140
141
  <!-- ALL-CONTRIBUTORS-LIST:END -->
141
142
 
142
143
  This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification.
144
+
145
+ ## License
146
+
147
+ MIT License
148
+
149
+ Copyright (c) Co-operative Group Limited
150
+
151
+ Permission is hereby granted, free of charge, to any person obtaining a copy
152
+ of this software and associated documentation files (the "Software"), to deal
153
+ in the Software without restriction, including without limitation the rights
154
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
155
+ copies of the Software, and to permit persons to whom the Software is
156
+ furnished to do so, subject to the following conditions:
157
+
158
+ The above copyright notice and this permission notice shall be included in all
159
+ copies or substantial portions of the Software.
160
+
161
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
162
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
163
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
164
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
165
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
166
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
167
+ SOFTWARE.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coopdigital/react",
3
3
  "type": "module",
4
- "version": "0.4.0",
4
+ "version": "0.4.1",
5
5
  "main": "dist/index.js",
6
6
  "private": false,
7
7
  "publishConfig": {
@@ -13,6 +13,14 @@
13
13
  "!**/__{screenshots,tests}__",
14
14
  "!**/*.{stories,test}.*"
15
15
  ],
16
+ "keywords": [
17
+ "co-op",
18
+ "design-system",
19
+ "experience-kit",
20
+ "experience-library",
21
+ "components",
22
+ "react"
23
+ ],
16
24
  "scripts": {
17
25
  "test": "vitest run",
18
26
  "test:watch": "vitest",
@@ -31,7 +39,7 @@
31
39
  "devDependencies": {
32
40
  "@axe-core/playwright": "^4.10.1",
33
41
  "@chromatic-com/storybook": "^3.2.5",
34
- "@coopdigital/styles": "^0.5.1",
42
+ "@coopdigital/styles": "^0.5.2",
35
43
  "@playwright/test": "^1.50.1",
36
44
  "@rollup/plugin-node-resolve": "^16.0.0",
37
45
  "@rollup/plugin-typescript": "^12.1.2",
@@ -56,5 +64,5 @@
56
64
  "react": "^19.0.0",
57
65
  "react-dom": "^19.0.0"
58
66
  },
59
- "gitHead": "5f4108a06b915b2bd2c757bd713026e0710b0eb9"
67
+ "gitHead": "827c8ec0c84d2f8034e28acde178e7c3e7ed488b"
60
68
  }