@warp-ds/elements 2.9.1 → 2.10.0-next.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.
- package/dist/custom-elements.json +347 -284
- package/dist/docs/button/accessibility.md +42 -0
- package/dist/docs/button/api.md +63 -39
- package/dist/docs/button/button.md +322 -40
- package/dist/docs/button/examples.md +126 -0
- package/dist/docs/button/usage.md +89 -0
- package/dist/docs/modal/accessibility.md +1 -0
- package/dist/docs/modal/api.md +51 -0
- package/dist/docs/modal/examples.md +67 -0
- package/dist/docs/modal/modal.md +238 -0
- package/dist/docs/modal/usage.md +110 -0
- package/dist/docs/modal-footer/accessibility.md +1 -0
- package/dist/docs/modal-footer/api.md +11 -0
- package/dist/docs/modal-footer/examples.md +1 -0
- package/dist/docs/modal-footer/modal-footer.md +23 -0
- package/dist/docs/modal-footer/usage.md +1 -0
- package/dist/docs/modal-header/accessibility.md +1 -0
- package/dist/docs/modal-header/api.md +42 -0
- package/dist/docs/modal-header/examples.md +1 -0
- package/dist/docs/modal-header/modal-header.md +54 -0
- package/dist/docs/modal-header/usage.md +1 -0
- package/dist/docs/page-indicator/api.md +6 -6
- package/dist/docs/page-indicator/examples.md +8 -0
- package/dist/docs/page-indicator/page-indicator.md +23 -6
- package/dist/docs/page-indicator/usage.md +8 -0
- package/dist/docs/pagination/api.md +12 -10
- package/dist/docs/pagination/examples.md +20 -0
- package/dist/docs/pagination/pagination.md +50 -12
- package/dist/docs/pagination/usage.md +18 -0
- package/dist/docs/pill/accessibility.md +2 -0
- package/dist/docs/pill/api.md +10 -26
- package/dist/docs/pill/examples.md +23 -0
- package/dist/docs/pill/pill.md +43 -28
- package/dist/docs/pill/usage.md +8 -0
- package/dist/docs/radio/accessibility.md +1 -0
- package/dist/docs/radio/api.md +57 -0
- package/dist/docs/radio/examples.md +1 -0
- package/dist/docs/radio/radio.md +69 -0
- package/dist/docs/radio/usage.md +1 -0
- package/dist/docs/radio-group/accessibility.md +1 -0
- package/dist/docs/radio-group/api.md +69 -0
- package/dist/docs/radio-group/examples.md +68 -0
- package/dist/docs/radio-group/radio-group.md +311 -0
- package/dist/docs/radio-group/styling.md +118 -0
- package/dist/docs/radio-group/usage.md +44 -0
- package/dist/docs/select/accessibility.md +2 -0
- package/dist/docs/select/api.md +20 -16
- package/dist/docs/select/examples.md +116 -0
- package/dist/docs/select/select.md +168 -18
- package/dist/docs/select/usage.md +30 -0
- package/dist/index.d.ts +441 -474
- package/dist/packages/attention/attention.js +23 -21
- package/dist/packages/attention/attention.js.map +3 -3
- package/dist/packages/button/button.d.ts +54 -37
- package/dist/packages/button/button.js +17 -15
- package/dist/packages/button/button.js.map +3 -3
- package/dist/packages/button/button.react.stories.d.ts +2 -2
- package/dist/packages/button/react.d.ts +1 -1
- package/dist/packages/modal/index.d.ts +4 -4
- package/dist/packages/modal/index.js +4 -4
- package/dist/packages/modal/modal.d.ts +21 -12
- package/dist/packages/modal/modal.js +4 -4
- package/dist/packages/modal/modal.js.map +3 -3
- package/dist/packages/modal/modal.react.stories.d.ts +3 -3
- package/dist/packages/modal/modal.stories.d.ts +2 -1
- package/dist/packages/modal/modal.stories.js +85 -3
- package/dist/packages/modal/react.d.ts +2 -2
- package/dist/packages/modal-footer/modal-footer.d.ts +5 -3
- package/dist/packages/modal-footer/modal-footer.js +4 -4
- package/dist/packages/modal-footer/modal-footer.js.map +3 -3
- package/dist/packages/modal-footer/react.d.ts +1 -1
- package/dist/packages/modal-header/modal-header.d.ts +21 -11
- package/dist/packages/modal-header/modal-header.js +1 -1
- package/dist/packages/modal-header/modal-header.js.map +3 -3
- package/dist/packages/modal-header/react.d.ts +2 -2
- package/dist/packages/page-indicator/page-indicator.d.ts +9 -14
- package/dist/packages/page-indicator/page-indicator.js.map +2 -2
- package/dist/packages/pagination/pagination.d.ts +11 -11
- package/dist/packages/pagination/pagination.js.map +2 -2
- package/dist/packages/pill/pill.d.ts +14 -29
- package/dist/packages/pill/pill.js.map +2 -2
- package/dist/packages/pill/pill.react.stories.d.ts +2 -2
- package/dist/packages/pill/react.d.ts +1 -1
- package/dist/packages/radio/radio.d.ts +51 -13
- package/dist/packages/radio/radio.js +3 -3
- package/dist/packages/radio/radio.js.map +3 -3
- package/dist/packages/radio/radio.react.stories.d.ts +1 -1
- package/dist/packages/radio/radio.stories.d.ts +2 -2
- package/dist/packages/radio/react.d.ts +2 -2
- package/dist/packages/radio-group/radio-group.d.ts +43 -5
- package/dist/packages/radio-group/radio-group.js +7 -7
- package/dist/packages/radio-group/radio-group.js.map +3 -3
- package/dist/packages/radio-group/react.d.ts +4 -4
- package/dist/packages/select/select.d.ts +32 -48
- package/dist/packages/select/select.js.map +2 -2
- package/dist/web-types.json +349 -115
- package/package.json +5 -5
|
@@ -3,14 +3,31 @@
|
|
|
3
3
|
## Description
|
|
4
4
|
|
|
5
5
|
A page indicator component that displays a series of dots representing pages.
|
|
6
|
+
|
|
6
7
|
One dot is highlighted to indicate the currently selected page.
|
|
7
8
|
|
|
8
9
|
## Usage
|
|
9
10
|
|
|
11
|
+
<elements-example>
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<w-page-indicator page-count="5" selected-page="1"></w-page-indicator>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
</elements-example>
|
|
18
|
+
|
|
10
19
|
## Accessibility
|
|
11
20
|
|
|
12
21
|
## Examples
|
|
13
22
|
|
|
23
|
+
<elements-example>
|
|
24
|
+
|
|
25
|
+
```html
|
|
26
|
+
<w-page-indicator selected-page="3" page-count="5"></w-page-indicator>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
</elements-example>
|
|
30
|
+
|
|
14
31
|
## `<w-page-indicator>` API
|
|
15
32
|
|
|
16
33
|
Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
|
|
@@ -19,22 +36,22 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
|
|
|
19
36
|
|
|
20
37
|
| Name | Type | Default | Summary |
|
|
21
38
|
|-|-|-|-|
|
|
22
|
-
| page-count | `number` |
|
|
23
|
-
| selected-page | `number` |
|
|
39
|
+
| page-count | `number` | `1` | Total number of pages |
|
|
40
|
+
| selected-page | `number` | `1` | Currently selected page (1-based index) |
|
|
24
41
|
|
|
25
42
|
### Property Details
|
|
26
43
|
|
|
27
44
|
#### page-count
|
|
28
45
|
|
|
29
|
-
Total number of pages
|
|
46
|
+
Total number of pages
|
|
30
47
|
|
|
31
48
|
- Type: `number`
|
|
32
|
-
- Default:
|
|
49
|
+
- Default: `1`
|
|
33
50
|
|
|
34
51
|
#### selected-page
|
|
35
52
|
|
|
36
|
-
Currently selected page (1-based index
|
|
53
|
+
Currently selected page (1-based index)
|
|
37
54
|
|
|
38
55
|
- Type: `number`
|
|
39
|
-
- Default:
|
|
56
|
+
- Default: `1`
|
|
40
57
|
|
|
@@ -6,46 +6,48 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
|
|
|
6
6
|
|
|
7
7
|
| Name | Type | Default | Summary |
|
|
8
8
|
|-|-|-|-|
|
|
9
|
-
| base-url | `string` | `-` |
|
|
10
|
-
| current-page | `number` |
|
|
11
|
-
| pages | `number` | `-` |
|
|
12
|
-
| visible-pages | `number` |
|
|
9
|
+
| base-url | `string` | `-` | The base URL used to construct page links, for example `/search?page=`. |
|
|
10
|
+
| current-page | `number` | `1` | The currently active page number. |
|
|
11
|
+
| pages | `number` | `-` | The total number of pages. |
|
|
12
|
+
| visible-pages | `number` | `7` | The maximum number of page numbers visible. |
|
|
13
13
|
|
|
14
14
|
### Property Details
|
|
15
15
|
|
|
16
16
|
#### base-url
|
|
17
17
|
|
|
18
|
+
The base URL used to construct page links, for example `/search?page=`.
|
|
18
19
|
|
|
20
|
+
The page number is appended to this URL.
|
|
19
21
|
|
|
20
22
|
- Type: `string`
|
|
21
23
|
- Default: `-`
|
|
22
24
|
|
|
23
25
|
#### current-page
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
The currently active page number.
|
|
26
28
|
|
|
27
29
|
- Type: `number`
|
|
28
|
-
- Default:
|
|
30
|
+
- Default: `1`
|
|
29
31
|
|
|
30
32
|
#### pages
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
The total number of pages.
|
|
33
35
|
|
|
34
36
|
- Type: `number`
|
|
35
37
|
- Default: `-`
|
|
36
38
|
|
|
37
39
|
#### visible-pages
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
The maximum number of page numbers visible.
|
|
40
42
|
|
|
41
43
|
- Type: `number`
|
|
42
|
-
- Default:
|
|
44
|
+
- Default: `7`
|
|
43
45
|
|
|
44
46
|
### Events
|
|
45
47
|
|
|
46
48
|
#### page-click
|
|
47
49
|
|
|
48
|
-
Triggered when a link
|
|
50
|
+
Triggered when a link in the pagination is clicked. Contains the page number in `string` form.
|
|
49
51
|
|
|
50
52
|
- Type: `CustomEvent`
|
|
51
53
|
|
|
@@ -1 +1,21 @@
|
|
|
1
1
|
## Examples
|
|
2
|
+
|
|
3
|
+
### Single-page app behavior
|
|
4
|
+
|
|
5
|
+
By default the pagination component uses link which trigger a full page navigation.
|
|
6
|
+
|
|
7
|
+
If you want to override this in your app and handle things like scroll and focus management on your own you can add an event listener to the pagination component and prevent the default navigation.
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<w-pagination base-url="/search?page=" pages="10" current-page="5"></w-pagination>
|
|
11
|
+
|
|
12
|
+
<script type="module">
|
|
13
|
+
const pagination = document.querySelector('w-pagination');
|
|
14
|
+
|
|
15
|
+
pagination.addEventListener('page-click', (event) => {
|
|
16
|
+
event.preventDefault();
|
|
17
|
+
// event.detail = { clickedPage: string }
|
|
18
|
+
console.log('Do something with the clicked page after preventing default navigation:', event.detail.clickedPage);
|
|
19
|
+
});
|
|
20
|
+
</script>
|
|
21
|
+
```
|
|
@@ -4,14 +4,50 @@
|
|
|
4
4
|
|
|
5
5
|
Pagination allows users to navigate through multiple pages of content by providing navigation controls with page numbers and directional arrows.
|
|
6
6
|
|
|
7
|
-
[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/navigation-pagination--docs)
|
|
8
|
-
|
|
9
7
|
## Usage
|
|
10
8
|
|
|
9
|
+
|
|
10
|
+
The pagination component automatically shows/hides navigation buttons based on the current page:
|
|
11
|
+
|
|
12
|
+
- **First page button** (double chevron): Shown when current page is greater than 2
|
|
13
|
+
- **Previous page button** (single chevron): Shown when current page is greater than 1
|
|
14
|
+
- **Next page button** (single chevron): Shown when current page is less than total pages
|
|
15
|
+
|
|
16
|
+
On mobile devices, the page numbers are hidden and replaced with a "Page X" label for a cleaner interface.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
<elements-example>
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<w-pagination base-url="#/search?page=" pages="5" current-page="1"></w-pagination>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
</elements-example>
|
|
26
|
+
|
|
11
27
|
## Accessibility
|
|
12
28
|
|
|
13
29
|
## Examples
|
|
14
30
|
|
|
31
|
+
### Single-page app behavior
|
|
32
|
+
|
|
33
|
+
By default the pagination component uses link which trigger a full page navigation.
|
|
34
|
+
|
|
35
|
+
If you want to override this in your app and handle things like scroll and focus management on your own you can add an event listener to the pagination component and prevent the default navigation.
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<w-pagination base-url="/search?page=" pages="10" current-page="5"></w-pagination>
|
|
39
|
+
|
|
40
|
+
<script type="module">
|
|
41
|
+
const pagination = document.querySelector('w-pagination');
|
|
42
|
+
|
|
43
|
+
pagination.addEventListener('page-click', (event) => {
|
|
44
|
+
event.preventDefault();
|
|
45
|
+
// event.detail = { clickedPage: string }
|
|
46
|
+
console.log('Do something with the clicked page after preventing default navigation:', event.detail.clickedPage);
|
|
47
|
+
});
|
|
48
|
+
</script>
|
|
49
|
+
```
|
|
50
|
+
|
|
15
51
|
## `<w-pagination>` API
|
|
16
52
|
|
|
17
53
|
Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
|
|
@@ -20,46 +56,48 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
|
|
|
20
56
|
|
|
21
57
|
| Name | Type | Default | Summary |
|
|
22
58
|
|-|-|-|-|
|
|
23
|
-
| base-url | `string` | `-` |
|
|
24
|
-
| current-page | `number` |
|
|
25
|
-
| pages | `number` | `-` |
|
|
26
|
-
| visible-pages | `number` |
|
|
59
|
+
| base-url | `string` | `-` | The base URL used to construct page links, for example `/search?page=`. |
|
|
60
|
+
| current-page | `number` | `1` | The currently active page number. |
|
|
61
|
+
| pages | `number` | `-` | The total number of pages. |
|
|
62
|
+
| visible-pages | `number` | `7` | The maximum number of page numbers visible. |
|
|
27
63
|
|
|
28
64
|
### Property Details
|
|
29
65
|
|
|
30
66
|
#### base-url
|
|
31
67
|
|
|
68
|
+
The base URL used to construct page links, for example `/search?page=`.
|
|
32
69
|
|
|
70
|
+
The page number is appended to this URL.
|
|
33
71
|
|
|
34
72
|
- Type: `string`
|
|
35
73
|
- Default: `-`
|
|
36
74
|
|
|
37
75
|
#### current-page
|
|
38
76
|
|
|
39
|
-
|
|
77
|
+
The currently active page number.
|
|
40
78
|
|
|
41
79
|
- Type: `number`
|
|
42
|
-
- Default:
|
|
80
|
+
- Default: `1`
|
|
43
81
|
|
|
44
82
|
#### pages
|
|
45
83
|
|
|
46
|
-
|
|
84
|
+
The total number of pages.
|
|
47
85
|
|
|
48
86
|
- Type: `number`
|
|
49
87
|
- Default: `-`
|
|
50
88
|
|
|
51
89
|
#### visible-pages
|
|
52
90
|
|
|
53
|
-
|
|
91
|
+
The maximum number of page numbers visible.
|
|
54
92
|
|
|
55
93
|
- Type: `number`
|
|
56
|
-
- Default:
|
|
94
|
+
- Default: `7`
|
|
57
95
|
|
|
58
96
|
### Events
|
|
59
97
|
|
|
60
98
|
#### page-click
|
|
61
99
|
|
|
62
|
-
Triggered when a link
|
|
100
|
+
Triggered when a link in the pagination is clicked. Contains the page number in `string` form.
|
|
63
101
|
|
|
64
102
|
- Type: `CustomEvent`
|
|
65
103
|
|
|
@@ -1 +1,19 @@
|
|
|
1
1
|
## Usage
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
The pagination component automatically shows/hides navigation buttons based on the current page:
|
|
5
|
+
|
|
6
|
+
- **First page button** (double chevron): Shown when current page is greater than 2
|
|
7
|
+
- **Previous page button** (single chevron): Shown when current page is greater than 1
|
|
8
|
+
- **Next page button** (single chevron): Shown when current page is less than total pages
|
|
9
|
+
|
|
10
|
+
On mobile devices, the page numbers are hidden and replaced with a "Page X" label for a cleaner interface.
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
<elements-example>
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<w-pagination base-url="#/search?page=" pages="5" current-page="1"></w-pagination>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
</elements-example>
|
package/dist/docs/pill/api.md
CHANGED
|
@@ -6,27 +6,25 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
|
|
|
6
6
|
|
|
7
7
|
| Name | Type | Default | Summary |
|
|
8
8
|
|-|-|-|-|
|
|
9
|
-
| can-close | `boolean` | `false` |
|
|
10
|
-
| close-aria-label | `string` | `-` |
|
|
9
|
+
| can-close | `boolean` | `false` | Whether the pill should be removable via a close button. |
|
|
10
|
+
| close-aria-label | `string` | `-` | Label read by screen readers when targeting the close button. |
|
|
11
11
|
| close-sr-label | `string` | `-` | **Deprecated**: Used "close-arial-label" instead. |
|
|
12
|
-
| open-aria-label | `string` | `-` |
|
|
13
|
-
| openFilterSrText (JS only) | `unknown` | `-` | - |
|
|
12
|
+
| open-aria-label | `string` | `-` | Label read by screen readers when targeting the pill. |
|
|
14
13
|
| open-sr-label | `string` | `-` | **Deprecated**: Used "open-arial-label" instead. |
|
|
15
|
-
|
|
|
16
|
-
| suggestion | `boolean` | `false` | - |
|
|
14
|
+
| suggestion | `boolean` | `false` | Whether the pill should be rendered as a suggestion. |
|
|
17
15
|
|
|
18
16
|
### Property Details
|
|
19
17
|
|
|
20
18
|
#### can-close
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
Whether the pill should be removable via a close button.
|
|
23
21
|
|
|
24
22
|
- Type: `boolean`
|
|
25
23
|
- Default: `false`
|
|
26
24
|
|
|
27
25
|
#### close-aria-label
|
|
28
26
|
|
|
29
|
-
|
|
27
|
+
Label read by screen readers when targeting the close button.
|
|
30
28
|
|
|
31
29
|
- Type: `string`
|
|
32
30
|
- Default: `-`
|
|
@@ -42,18 +40,11 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
|
|
|
42
40
|
|
|
43
41
|
#### open-aria-label
|
|
44
42
|
|
|
45
|
-
|
|
43
|
+
Label read by screen readers when targeting the pill.
|
|
46
44
|
|
|
47
45
|
- Type: `string`
|
|
48
46
|
- Default: `-`
|
|
49
47
|
|
|
50
|
-
#### openFilterSrText (JS only)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
- Type: `unknown`
|
|
55
|
-
- Default: `-`
|
|
56
|
-
|
|
57
48
|
#### open-sr-label
|
|
58
49
|
|
|
59
50
|
**Deprecated**: Used "open-arial-label" instead.
|
|
@@ -63,16 +54,9 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
|
|
|
63
54
|
- Type: `string`
|
|
64
55
|
- Default: `-`
|
|
65
56
|
|
|
66
|
-
#### removeFilterSrText (JS only)
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
- Type: `unknown`
|
|
71
|
-
- Default: `-`
|
|
72
|
-
|
|
73
57
|
#### suggestion
|
|
74
58
|
|
|
75
|
-
|
|
59
|
+
Whether the pill should be rendered as a suggestion.
|
|
76
60
|
|
|
77
61
|
- Type: `boolean`
|
|
78
62
|
- Default: `false`
|
|
@@ -81,12 +65,12 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
|
|
|
81
65
|
|
|
82
66
|
#### w-pill-click
|
|
83
67
|
|
|
84
|
-
|
|
68
|
+
Fires when the pill itself is clicked.
|
|
85
69
|
|
|
86
70
|
- Type: `CustomEvent`
|
|
87
71
|
#### w-pill-close
|
|
88
72
|
|
|
89
|
-
|
|
73
|
+
Fires when the pill's close button is clicked.
|
|
90
74
|
|
|
91
75
|
- Type: `CustomEvent`
|
|
92
76
|
|
|
@@ -1 +1,24 @@
|
|
|
1
1
|
## Examples
|
|
2
|
+
|
|
3
|
+
### Closable
|
|
4
|
+
|
|
5
|
+
For example to dismiss or turn off parts of a filter.
|
|
6
|
+
|
|
7
|
+
<elements-example>
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<w-pill can-close>Filter</w-pill>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
</elements-example>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Suggestion
|
|
17
|
+
|
|
18
|
+
<elements-example>
|
|
19
|
+
|
|
20
|
+
```html
|
|
21
|
+
<w-pill suggestion>Suggestion</w-pill>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
</elements-example>
|
package/dist/docs/pill/pill.md
CHANGED
|
@@ -4,14 +4,45 @@
|
|
|
4
4
|
|
|
5
5
|
Pill is a type of button that is often used as a filter, but can also be used as a rounded button for overlays, etc.
|
|
6
6
|
|
|
7
|
-
[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/buttons-pill--docs)
|
|
8
|
-
|
|
9
7
|
## Usage
|
|
10
8
|
|
|
9
|
+
<elements-example>
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<w-pill>Filter</w-pill>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
</elements-example>
|
|
16
|
+
|
|
11
17
|
## Accessibility
|
|
12
18
|
|
|
19
|
+
Pills are designed to show active filters. By default they include generic accessible labels, but you can override these with your own.
|
|
20
|
+
|
|
13
21
|
## Examples
|
|
14
22
|
|
|
23
|
+
### Closable
|
|
24
|
+
|
|
25
|
+
For example to dismiss or turn off parts of a filter.
|
|
26
|
+
|
|
27
|
+
<elements-example>
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<w-pill can-close>Filter</w-pill>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
</elements-example>
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Suggestion
|
|
37
|
+
|
|
38
|
+
<elements-example>
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<w-pill suggestion>Suggestion</w-pill>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
</elements-example>
|
|
45
|
+
|
|
15
46
|
## `<w-pill>` API
|
|
16
47
|
|
|
17
48
|
Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
|
|
@@ -20,27 +51,25 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
|
|
|
20
51
|
|
|
21
52
|
| Name | Type | Default | Summary |
|
|
22
53
|
|-|-|-|-|
|
|
23
|
-
| can-close | `boolean` | `false` |
|
|
24
|
-
| close-aria-label | `string` | `-` |
|
|
54
|
+
| can-close | `boolean` | `false` | Whether the pill should be removable via a close button. |
|
|
55
|
+
| close-aria-label | `string` | `-` | Label read by screen readers when targeting the close button. |
|
|
25
56
|
| close-sr-label | `string` | `-` | **Deprecated**: Used "close-arial-label" instead. |
|
|
26
|
-
| open-aria-label | `string` | `-` |
|
|
27
|
-
| openFilterSrText (JS only) | `unknown` | `-` | - |
|
|
57
|
+
| open-aria-label | `string` | `-` | Label read by screen readers when targeting the pill. |
|
|
28
58
|
| open-sr-label | `string` | `-` | **Deprecated**: Used "open-arial-label" instead. |
|
|
29
|
-
|
|
|
30
|
-
| suggestion | `boolean` | `false` | - |
|
|
59
|
+
| suggestion | `boolean` | `false` | Whether the pill should be rendered as a suggestion. |
|
|
31
60
|
|
|
32
61
|
### Property Details
|
|
33
62
|
|
|
34
63
|
#### can-close
|
|
35
64
|
|
|
36
|
-
|
|
65
|
+
Whether the pill should be removable via a close button.
|
|
37
66
|
|
|
38
67
|
- Type: `boolean`
|
|
39
68
|
- Default: `false`
|
|
40
69
|
|
|
41
70
|
#### close-aria-label
|
|
42
71
|
|
|
43
|
-
|
|
72
|
+
Label read by screen readers when targeting the close button.
|
|
44
73
|
|
|
45
74
|
- Type: `string`
|
|
46
75
|
- Default: `-`
|
|
@@ -56,18 +85,11 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
|
|
|
56
85
|
|
|
57
86
|
#### open-aria-label
|
|
58
87
|
|
|
59
|
-
|
|
88
|
+
Label read by screen readers when targeting the pill.
|
|
60
89
|
|
|
61
90
|
- Type: `string`
|
|
62
91
|
- Default: `-`
|
|
63
92
|
|
|
64
|
-
#### openFilterSrText (JS only)
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
- Type: `unknown`
|
|
69
|
-
- Default: `-`
|
|
70
|
-
|
|
71
93
|
#### open-sr-label
|
|
72
94
|
|
|
73
95
|
**Deprecated**: Used "open-arial-label" instead.
|
|
@@ -77,16 +99,9 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
|
|
|
77
99
|
- Type: `string`
|
|
78
100
|
- Default: `-`
|
|
79
101
|
|
|
80
|
-
#### removeFilterSrText (JS only)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
- Type: `unknown`
|
|
85
|
-
- Default: `-`
|
|
86
|
-
|
|
87
102
|
#### suggestion
|
|
88
103
|
|
|
89
|
-
|
|
104
|
+
Whether the pill should be rendered as a suggestion.
|
|
90
105
|
|
|
91
106
|
- Type: `boolean`
|
|
92
107
|
- Default: `false`
|
|
@@ -95,12 +110,12 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
|
|
|
95
110
|
|
|
96
111
|
#### w-pill-click
|
|
97
112
|
|
|
98
|
-
|
|
113
|
+
Fires when the pill itself is clicked.
|
|
99
114
|
|
|
100
115
|
- Type: `CustomEvent`
|
|
101
116
|
#### w-pill-close
|
|
102
117
|
|
|
103
|
-
|
|
118
|
+
Fires when the pill's close button is clicked.
|
|
104
119
|
|
|
105
120
|
- Type: `CustomEvent`
|
|
106
121
|
|
package/dist/docs/pill/usage.md
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Accessibility
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
### `<w-radio>` API
|
|
2
|
+
|
|
3
|
+
#### Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Default | Summary |
|
|
6
|
+
|-|-|-|-|
|
|
7
|
+
| checked | `boolean` | `false` | Draws the radio in a checked state (reflected to attribute). |
|
|
8
|
+
| disabled | `boolean` | `false` | Disables the radio. |
|
|
9
|
+
| invalid | `boolean` | `false` | Draws the radio in an invalid state. |
|
|
10
|
+
| name | `string` | `-` | The name of the radio, submitted as a name/value pair with form data. |
|
|
11
|
+
| required | `boolean` | `false` | Makes the radio a required field. |
|
|
12
|
+
| value | `string \| null` | `null` | The radio's value. When selected, the radio group will receive this value. |
|
|
13
|
+
|
|
14
|
+
#### Property Details
|
|
15
|
+
|
|
16
|
+
##### checked
|
|
17
|
+
|
|
18
|
+
Draws the radio in a checked state (reflected to attribute).
|
|
19
|
+
|
|
20
|
+
- Type: `boolean`
|
|
21
|
+
- Default: `false`
|
|
22
|
+
|
|
23
|
+
##### disabled
|
|
24
|
+
|
|
25
|
+
Disables the radio.
|
|
26
|
+
|
|
27
|
+
- Type: `boolean`
|
|
28
|
+
- Default: `false`
|
|
29
|
+
|
|
30
|
+
##### invalid
|
|
31
|
+
|
|
32
|
+
Draws the radio in an invalid state.
|
|
33
|
+
|
|
34
|
+
- Type: `boolean`
|
|
35
|
+
- Default: `false`
|
|
36
|
+
|
|
37
|
+
##### name
|
|
38
|
+
|
|
39
|
+
The name of the radio, submitted as a name/value pair with form data.
|
|
40
|
+
|
|
41
|
+
- Type: `string`
|
|
42
|
+
- Default: `-`
|
|
43
|
+
|
|
44
|
+
##### required
|
|
45
|
+
|
|
46
|
+
Makes the radio a required field.
|
|
47
|
+
|
|
48
|
+
- Type: `boolean`
|
|
49
|
+
- Default: `false`
|
|
50
|
+
|
|
51
|
+
##### value
|
|
52
|
+
|
|
53
|
+
The radio's value. When selected, the radio group will receive this value.
|
|
54
|
+
|
|
55
|
+
- Type: `string | null`
|
|
56
|
+
- Default: `null`
|
|
57
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Examples
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Radio (w-radio)
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
## Accessibility
|
|
10
|
+
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
### `<w-radio>` API
|
|
14
|
+
|
|
15
|
+
#### Properties
|
|
16
|
+
|
|
17
|
+
| Name | Type | Default | Summary |
|
|
18
|
+
|-|-|-|-|
|
|
19
|
+
| checked | `boolean` | `false` | Draws the radio in a checked state (reflected to attribute). |
|
|
20
|
+
| disabled | `boolean` | `false` | Disables the radio. |
|
|
21
|
+
| invalid | `boolean` | `false` | Draws the radio in an invalid state. |
|
|
22
|
+
| name | `string` | `-` | The name of the radio, submitted as a name/value pair with form data. |
|
|
23
|
+
| required | `boolean` | `false` | Makes the radio a required field. |
|
|
24
|
+
| value | `string \| null` | `null` | The radio's value. When selected, the radio group will receive this value. |
|
|
25
|
+
|
|
26
|
+
#### Property Details
|
|
27
|
+
|
|
28
|
+
##### checked
|
|
29
|
+
|
|
30
|
+
Draws the radio in a checked state (reflected to attribute).
|
|
31
|
+
|
|
32
|
+
- Type: `boolean`
|
|
33
|
+
- Default: `false`
|
|
34
|
+
|
|
35
|
+
##### disabled
|
|
36
|
+
|
|
37
|
+
Disables the radio.
|
|
38
|
+
|
|
39
|
+
- Type: `boolean`
|
|
40
|
+
- Default: `false`
|
|
41
|
+
|
|
42
|
+
##### invalid
|
|
43
|
+
|
|
44
|
+
Draws the radio in an invalid state.
|
|
45
|
+
|
|
46
|
+
- Type: `boolean`
|
|
47
|
+
- Default: `false`
|
|
48
|
+
|
|
49
|
+
##### name
|
|
50
|
+
|
|
51
|
+
The name of the radio, submitted as a name/value pair with form data.
|
|
52
|
+
|
|
53
|
+
- Type: `string`
|
|
54
|
+
- Default: `-`
|
|
55
|
+
|
|
56
|
+
##### required
|
|
57
|
+
|
|
58
|
+
Makes the radio a required field.
|
|
59
|
+
|
|
60
|
+
- Type: `boolean`
|
|
61
|
+
- Default: `false`
|
|
62
|
+
|
|
63
|
+
##### value
|
|
64
|
+
|
|
65
|
+
The radio's value. When selected, the radio group will receive this value.
|
|
66
|
+
|
|
67
|
+
- Type: `string | null`
|
|
68
|
+
- Default: `null`
|
|
69
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Usage
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Accessibility
|