@justeattakeaway/pie-chip 0.3.0 → 0.4.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 (2) hide show
  1. package/README.md +4 -81
  2. package/package.json +6 -5
package/README.md CHANGED
@@ -8,15 +8,6 @@
8
8
  </a>
9
9
  </p>
10
10
 
11
- # Table of Contents
12
-
13
- 1. [Introduction](#pie-chip)
14
- 2. [Installation](#installation)
15
- 3. [Importing the component](#importing-the-component)
16
- 4. [Peer Dependencies](#peer-dependencies)
17
- 5. [Props](#props)
18
- 6. [Contributing](#contributing)
19
-
20
11
  ## pie-chip
21
12
 
22
13
  `pie-chip` is a Web Component built using the Lit library.
@@ -36,81 +27,13 @@ $ npm i @justeattakeaway/pie-chip
36
27
  $ yarn add @justeattakeaway/pie-chip
37
28
  ```
38
29
 
39
- 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).
40
-
41
-
42
- ### Importing the component
43
-
44
- #### JavaScript
45
- ```js
46
- // Default – for Native JS Applications, Vue, Angular, Svelte, etc.
47
- import { PieChip } from '@justeattakeaway/pie-chip';
48
-
49
- // If you don't need to reference the imported object, you can simply
50
- // import the module which registers the component as a custom element.
51
- import '@justeattakeaway/pie-chip';
52
- ```
53
-
54
- #### React
55
- ```js
56
- // React
57
- // For React, you will need to import our React-specific component build
58
- // which wraps the web component using ​@lit/react
59
- import { PieChip } from '@justeattakeaway/pie-chip/dist/react';
60
- ```
61
-
62
- > [!NOTE]
63
- > When using the React version of the component, please make sure to also
64
- > include React as a [peer dependency](#peer-dependencies) in your project.
65
-
66
-
67
- ## Peer Dependencies
30
+ ## Documentation
68
31
 
69
- > [!IMPORTANT]
70
- > When using `pie-chip`, you will also need to include a couple of dependencies to ensure the component renders as expected. See [the PIE Wiki](https://github.com/justeattakeaway/pie/wiki/Getting-started-with-PIE-Web-Components#expected-dependencies) for more information and how to include these in your application.
32
+ Visit [Chip | PIE Design System](https://pie.design/components/chip/overview) to view more information on this component.
71
33
 
34
+ ## Questions
72
35
 
73
- ## Props
74
-
75
- | Property | Type | Default | Description |
76
- |---|---|---|---|
77
- | variant | `String` | `default` | Variant of the chip, one of `variants` - `default`, `outline`, `ghost` |
78
- | isSelected | `Boolean` | `false` | If `true`, applies the selected styles |
79
- | isLoading | `Boolean` | `false` | If `true`, displays a loading indicator inside the chip |
80
- | isDismissible | `Boolean` | `false` | If `true`, displays a close icon to dismiss the chip component. Can be only used if `isSelected` is set to true |
81
- | disabled | `Boolean` | `false` | If `true`, disables the chip component |
82
- | aria | `Object` | `{}` | An object representing the aria labels for the close button & chip |
83
-
84
- In your markup or JSX, you can then use these to set the properties for the `pie-chip` component:
85
-
86
- ```html
87
- <!-- Native HTML -->
88
- <pie-chip>Label</pie-chip>
89
-
90
- <!-- JSX -->
91
- <PieChip>Label</PieChip>
92
- ```
93
-
94
- ## Slots
95
-
96
- | Slot | Description |
97
- | Default slot | Used to pass text into the chip component. |
98
- | icon | Used to pass in an icon to the chip component. We recommend using `pie-icons-webc` for defining this icon, but this can also accept an SVG icon. |
99
-
100
- ### Using `pie-icons-webc` with `pie-chip` icon slot
101
-
102
- We recommend using `pie-icons-webc` when using the `icon` slot. Here is an example of how you would do this:
103
-
104
- ```html
105
- <!--
106
- Note that pie-chip and the icon that you want to use will need to be imported as components into your application.
107
- See the `pie-icons-webc` README for more info on importing these icons.
108
- -->
109
- <pie-chip>
110
- <icon-vegan slot="icon"></icon-vegan>
111
- Label
112
- </pie-chip>
113
- ```
36
+ Please head to [FAQs | PIE Design System](https://pie.design/support/contact-us/) to see our FAQs and get in touch.
114
37
 
115
38
  ## Contributing
116
39
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-chip",
3
3
  "description": "PIE Design System Chip built using Web Components",
4
- "version": "0.3.0",
4
+ "version": "0.4.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -22,6 +22,7 @@
22
22
  "watch": "run -T vite build --watch",
23
23
  "test": "echo \"Error: no test specified\" && exit 0",
24
24
  "test:ci": "yarn test",
25
+ "test:browsers-setup": "npx playwright-lit-setup",
25
26
  "test:browsers": "npx playwright test -c ./playwright-lit.config.ts",
26
27
  "test:browsers:ci": "yarn test:browsers",
27
28
  "test:visual": "run -T cross-env-shell PERCY_TOKEN=${PERCY_TOKEN_PIE_CHIP} percy exec --allowed-hostname cloudfront.net -- npx playwright test -c ./playwright-lit-visual.config.ts",
@@ -31,13 +32,13 @@
31
32
  "license": "Apache-2.0",
32
33
  "devDependencies": {
33
34
  "@custom-elements-manifest/analyzer": "0.9.0",
34
- "@justeattakeaway/pie-components-config": "0.10.0",
35
+ "@justeattakeaway/pie-components-config": "0.14.0",
35
36
  "cem-plugin-module-file-extensions": "0.0.5"
36
37
  },
37
38
  "dependencies": {
38
- "@justeattakeaway/pie-icons-webc": "0.19.1",
39
- "@justeattakeaway/pie-spinner": "0.5.5",
40
- "@justeattakeaway/pie-webc-core": "0.19.1"
39
+ "@justeattakeaway/pie-icons-webc": "0.20.0",
40
+ "@justeattakeaway/pie-spinner": "0.6.0",
41
+ "@justeattakeaway/pie-webc-core": "0.20.0"
41
42
  },
42
43
  "volta": {
43
44
  "extends": "../../../package.json"