@justeattakeaway/pie-button 0.29.0 → 0.31.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.
Files changed (3) hide show
  1. package/README.md +45 -23
  2. package/package.json +8 -5
  3. package/LICENSE +0 -17
package/README.md CHANGED
@@ -11,46 +11,41 @@
11
11
  # Table of Contents
12
12
 
13
13
  1. [Introduction](#pie-button)
14
- 2. [Local Development](#local-development)
15
- 3. [Props](#props)
14
+ 2. [Installation](#installation)
15
+ 3. [Importing the component](#importing-the-component)
16
16
  4. [Peer Dependencies](#peer-dependencies)
17
- 5. [Events](#events)
17
+ 5. [Local Development](#local-development)
18
+ 6. [Props](#props)
19
+ 7. [Events](#events)
18
20
  - [HTML example](#html)
19
21
  - [Vue example (using Nuxt 3)](#vue-templates-using-nuxt-3)
20
22
  - [React example (using Next 13)](#react-templates-using-next-13)
21
- 6. [Testing](#testing)
23
+ 8. [Testing](#testing)
22
24
  - [Browser Tests](#browser-tests)
23
25
  - [Visual Tests](#visual-tests)
24
26
 
25
27
 
26
- ## `pie-button`
28
+ ## pie-button
27
29
 
28
30
  `pie-button` is a Web Component built using the Lit library. It offers a simple and accessible button component for web applications.
29
31
 
30
32
  This component can be easily integrated into various frontend frameworks and customized through a set of properties.
31
33
 
32
- ## Local development
33
34
 
34
- Install the dependencies. Note that this, and the following commands below, should be run from the **root of the monorepo**:
35
+ ## Installation
35
36
 
36
- ```bash
37
- yarn
38
- ```
39
-
40
- To build the `pie-button` package, run the following command:
37
+ To install `pie-button` in your application, run the following on your command line:
41
38
 
42
39
  ```bash
43
- yarn build --filter=pie-button
44
- ```
40
+ # npm
41
+ $ npm i @justeattakeaway/pie-button
45
42
 
46
- If you'd like to develop using the component storybook, then you should build the component in `watch` mode, and run storybook in a separate terminal tab:
43
+ # yarn
44
+ $ yarn add @justeattakeaway/pie-button
45
+ ```
47
46
 
48
- ```bash
49
- yarn watch --filter=pie-button
47
+ For full information on using PIE components as part of an application, check out the [Getting Started Guide](https://github.com/justeattakeaway/pie/wiki/Getting-started-with-PIE-Web-Components).
50
48
 
51
- # in a separate terminal tab, run
52
- yarn dev --filter=pie-storybook
53
- ```
54
49
 
55
50
  ### Importing the component
56
51
 
@@ -67,11 +62,37 @@ import { PieButton } from '@justeattakeaway/pie-button';
67
62
 
68
63
  import { PieButton } from '@justeattakeaway/pie-button/dist/react';
69
64
  ```
65
+
66
+
70
67
  ## Peer Dependencies
71
68
 
72
- > **Note**
73
- > Before using `@justeattakeaway/pie-button`, please make sure you have the following peer dependencies installed in your project:
74
- > - `react` (for integration with React apps only)
69
+ > [!IMPORTANT]
70
+ > When using `pie-button`, you will also need to include a couple of dependencies to ensure the component renders as expected. See [the PIE Wiki for more information and how to include these in your application](https://github.com/justeattakeaway/pie/wiki/Getting-started-with-PIE-Web-Components#expected-dependencies).
71
+
72
+
73
+ ## Local development
74
+
75
+ Install the dependencies. Note that this, and the following commands below, should be run from the **root of the monorepo**:
76
+
77
+ ```bash
78
+ yarn
79
+ ```
80
+
81
+ To build the `pie-button` package, run the following command:
82
+
83
+ ```bash
84
+ yarn build --filter=pie-button
85
+ ```
86
+
87
+ If you'd like to develop using the component storybook, then you should build the component in `watch` mode, and run storybook in a separate terminal tab:
88
+
89
+ ```bash
90
+ yarn watch --filter=pie-button
91
+
92
+ # in a separate terminal tab, run
93
+ yarn dev --filter=pie-storybook
94
+ ```
95
+
75
96
 
76
97
  ## Props
77
98
 
@@ -95,6 +116,7 @@ In your markup or JSX, you can then use these to set the properties for the `pie
95
116
  <PieButton size='medium' type='button' variant='primary'>Click me!</PieButton>
96
117
  ```
97
118
 
119
+
98
120
  ## Slots
99
121
 
100
122
  | Slot | Description |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-button",
3
- "version": "0.29.0",
3
+ "version": "0.31.0",
4
4
  "description": "PIE design system button built using web components",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -25,15 +25,18 @@
25
25
  "test:visual": "run -T cross-env-shell PERCY_TOKEN=${PERCY_TOKEN_PIE_BUTTON} percy exec --allowed-hostname cloudfront.net -- npx playwright test -c ./playwright-lit-visual.config.ts",
26
26
  "test:visual:ci": "yarn test:visual"
27
27
  },
28
- "author": "JustEatTakeaway - Design System Web Team",
28
+ "author": "Just Eat Takeaway.com - Design System Team",
29
29
  "license": "Apache-2.0",
30
30
  "devDependencies": {
31
31
  "@justeat/pie-design-tokens": "5.8.2",
32
32
  "@justeattakeaway/pie-components-config": "0.4.0",
33
- "@justeattakeaway/pie-css": "0.5.0",
34
- "@justeattakeaway/pie-webc-core": "0.9.0"
33
+ "@justeattakeaway/pie-css": "0.6.0",
34
+ "@justeattakeaway/pie-webc-core": "0.10.0"
35
35
  },
36
36
  "volta": {
37
37
  "extends": "../../../package.json"
38
- }
38
+ },
39
+ "sideEffects": [
40
+ "dist/*.js"
41
+ ]
39
42
  }
package/LICENSE DELETED
@@ -1,17 +0,0 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- Copyright (c) Just Eat Takeaway.com
6
-
7
- Licensed under the Apache License, Version 2.0 (the "License");
8
- you may not use this file except in compliance with the License.
9
- You may obtain a copy of the License at
10
-
11
- http://www.apache.org/licenses/LICENSE-2.0
12
-
13
- Unless required by applicable law or agreed to in writing, software
14
- distributed under the License is distributed on an "AS IS" BASIS,
15
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- See the License for the specific language governing permissions and
17
- limitations under the License.