@justeattakeaway/pie-checkbox-group 0.5.0 → 0.6.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.
- package/README.md +5 -77
- package/package.json +4 -3
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-checkbox-group)
|
|
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-checkbox-group
|
|
21
12
|
|
|
22
13
|
`pie-checkbox-group` is a Web Component built using the Lit library.
|
|
@@ -40,77 +31,14 @@ $ yarn add @justeattakeaway/pie-checkbox-group
|
|
|
40
31
|
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).
|
|
41
32
|
|
|
42
33
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
#### JavaScript
|
|
46
|
-
```js
|
|
47
|
-
// Default – for Native JS Applications, Vue, Angular, Svelte, etc.
|
|
48
|
-
import { PieCheckboxGroup } from '@justeattakeaway/pie-checkbox-group';
|
|
49
|
-
|
|
50
|
-
// If you don't need to reference the imported object, you can simply
|
|
51
|
-
// import the module which registers the component as a custom element.
|
|
52
|
-
import '@justeattakeaway/pie-checkbox-group';
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
#### React
|
|
56
|
-
```js
|
|
57
|
-
// React
|
|
58
|
-
// For React, you will need to import our React-specific component build
|
|
59
|
-
// which wraps the web component using @lit/react
|
|
60
|
-
import { PieCheckboxGroup } from '@justeattakeaway/pie-checkbox-group/dist/react';
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
> [!NOTE]
|
|
64
|
-
> When using the React version of the component, please make sure to also
|
|
65
|
-
> include React as a [peer dependency](#peer-dependencies) in your project.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
## Peer Dependencies
|
|
69
|
-
|
|
70
|
-
> [!IMPORTANT]
|
|
71
|
-
> When using `pie-checkbox-group`, 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.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
## Props
|
|
75
|
-
|
|
76
|
-
| Property | Type | Default | Description |
|
|
77
|
-
|---|---|---|---|
|
|
78
|
-
| `name` | string | - | The name associated with the group. |
|
|
79
|
-
| `disabled` | boolean | - | Same as the HTML disabled attribute - indicates whether or not the checkbox group is disabled. |
|
|
80
|
-
| `assistiveText` | `string` | - | Allows assistive text to be displayed below the checkbox group. |
|
|
81
|
-
| `status` | `'default'`, `'error'`, `'success'` | `'default'` | The status of the checkbox group / assistive text. If you use `status` you must provide an `assistiveText` prop value for accessibility purposes. |
|
|
82
|
-
|
|
83
|
-
In your markup or JSX, you can then use these to set the properties for the `pie-checkbox-group` component:
|
|
84
|
-
|
|
85
|
-
```html
|
|
86
|
-
<!-- Native HTML -->
|
|
87
|
-
<pie-checkbox-group name="TESTNAME">
|
|
88
|
-
<pie-checkbox name="my-checkbox-one">Checkbox Label 1</pie-checkbox>
|
|
89
|
-
<pie-checkbox name="my-checkbox-two">Checkbox Label 2</pie-checkbox>
|
|
90
|
-
<pie-checkbox name="my-checkbox-three">Checkbox Label 3</pie-checkbox>
|
|
91
|
-
</pie-checkbox-group>
|
|
92
|
-
|
|
93
|
-
<!-- JSX -->
|
|
94
|
-
<PieCheckboxGroup name="TESTNAME">
|
|
95
|
-
<PieCheckbox name="my-checkbox-one">Checkbox Label 1</PieCheckbox>
|
|
96
|
-
<PieCheckbox name="my-checkbox-two">Checkbox Label 2</PieCheckbox>
|
|
97
|
-
<PieCheckbox name="my-checkbox-three">Checkbox Label 3</PieCheckbox>
|
|
98
|
-
</PieCheckboxGroup>
|
|
99
|
-
```
|
|
34
|
+
## Documentation
|
|
100
35
|
|
|
101
|
-
|
|
36
|
+
Visit [Checkbox Group | PIE Design System](https://pie.design/components/checkbox-group/) to view more information on this component.
|
|
102
37
|
|
|
103
|
-
|
|
104
|
-
|---|---|
|
|
105
|
-
| `default` | Pass PieCheckbox components as direct children for the CheckboxGroup. |
|
|
106
|
-
| `label` | Pass PieFormLabel to render the checkbox group label. |
|
|
38
|
+
## Questions
|
|
107
39
|
|
|
108
|
-
|
|
109
|
-
| Event | Type | Description |
|
|
110
|
-
|-------|------|-------------|
|
|
111
|
-
| `pie-checkbox-group-disabled` | `CustomEvent` | Triggered after the disabled state of the checkbox group changes. |
|
|
112
|
-
| `pie-checkbox-group-error` | `CustomEvent` | Triggered after the state of the checkbox group changes to error. |
|
|
40
|
+
Please head to [FAQs | PIE Design System](https://pie.design/support/contact-us/) to see our FAQs and get in touch.
|
|
113
41
|
|
|
114
42
|
## Contributing
|
|
115
43
|
|
|
116
|
-
Check out our [contributing guide](https://github.com/justeattakeaway/pie/wiki/Contributing-Guide) for more information on [local development](https://github.com/justeattakeaway/pie/wiki/Contributing-Guide#local-development) and how to run specific [component tests](https://github.com/justeattakeaway/pie/wiki/Contributing-Guide#testing).
|
|
44
|
+
Check out our [contributing guide](https://github.com/justeattakeaway/pie/wiki/Contributing-Guide) for more information on [local development](https://github.com/justeattakeaway/pie/wiki/Contributing-Guide#local-development) and how to run specific [component tests](https://github.com/justeattakeaway/pie/wiki/Contributing-Guide#testing).
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/pie-checkbox-group",
|
|
3
3
|
"description": "PIE Design System Checkbox Group built using Web Components",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -36,11 +36,12 @@
|
|
|
36
36
|
"license": "Apache-2.0",
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@custom-elements-manifest/analyzer": "0.9.0",
|
|
39
|
-
"@justeattakeaway/pie-components-config": "0.
|
|
39
|
+
"@justeattakeaway/pie-components-config": "0.17.0",
|
|
40
|
+
"@justeattakeaway/pie-css": "0.12.1",
|
|
40
41
|
"cem-plugin-module-file-extensions": "0.0.5"
|
|
41
42
|
},
|
|
42
43
|
"dependencies": {
|
|
43
|
-
"@justeattakeaway/pie-assistive-text": "0.6.
|
|
44
|
+
"@justeattakeaway/pie-assistive-text": "0.6.1",
|
|
44
45
|
"@justeattakeaway/pie-webc-core": "0.24.0"
|
|
45
46
|
},
|
|
46
47
|
"volta": {
|