@warp-ds/elements 2.9.0-next.5 → 2.9.0-next.6
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 +159 -97
- package/dist/docs/affix/affix.md +25 -23
- package/dist/docs/affix/api.md +25 -23
- package/dist/docs/alert/alert.md +12 -12
- package/dist/docs/alert/api.md +12 -12
- package/dist/docs/attention/api.md +46 -46
- package/dist/docs/attention/attention.md +46 -46
- package/dist/docs/badge/accessibility.md +44 -0
- package/dist/docs/badge/api.md +12 -8
- package/dist/docs/badge/badge.md +191 -10
- package/dist/docs/badge/examples.md +82 -0
- package/dist/docs/badge/usage.md +53 -0
- package/dist/docs/button/api.md +46 -42
- package/dist/docs/button/button.md +46 -42
- package/dist/docs/card/api.md +11 -11
- package/dist/docs/card/card.md +11 -11
- package/dist/docs/combobox/api.md +62 -62
- package/dist/docs/combobox/combobox.md +62 -62
- package/dist/docs/datepicker/api.md +74 -66
- package/dist/docs/datepicker/datepicker.md +74 -66
- package/dist/docs/expandable/api.md +26 -26
- package/dist/docs/expandable/expandable.md +26 -26
- package/dist/docs/link/api.md +28 -28
- package/dist/docs/link/link.md +28 -28
- package/dist/docs/page-indicator/api.md +6 -6
- package/dist/docs/page-indicator/page-indicator.md +6 -6
- package/dist/docs/pagination/api.md +3 -3
- package/dist/docs/pagination/pagination.md +3 -3
- package/dist/docs/pill/api.md +19 -15
- package/dist/docs/pill/pill.md +19 -15
- package/dist/docs/select/api.md +44 -44
- package/dist/docs/select/select.md +44 -44
- package/dist/docs/slider/api.md +80 -78
- package/dist/docs/slider/slider.md +80 -78
- package/dist/docs/slider-thumb/api.md +28 -76
- package/dist/docs/slider-thumb/slider-thumb.md +28 -76
- package/dist/docs/switch/api.md +16 -16
- package/dist/docs/switch/switch.md +16 -16
- package/dist/docs/tab/api.md +26 -40
- package/dist/docs/tab/tab.md +26 -40
- package/dist/docs/tab-panel/api.md +1 -17
- package/dist/docs/tab-panel/tab-panel.md +1 -17
- package/dist/docs/tabs/api.md +3 -3
- package/dist/docs/tabs/tabs.md +3 -3
- package/dist/docs/textarea/api.md +42 -40
- package/dist/docs/textarea/textarea.md +42 -40
- package/dist/docs/textfield/accessibility.md +15 -0
- package/dist/docs/textfield/api.md +86 -83
- package/dist/docs/textfield/examples.md +147 -0
- package/dist/docs/textfield/textfield.md +279 -86
- package/dist/docs/textfield/usage.md +30 -0
- package/dist/index.d.ts +220 -196
- package/dist/packages/badge/badge.d.ts +7 -5
- package/dist/packages/badge/badge.js.map +2 -2
- package/dist/packages/datepicker/datepicker.js +1 -1
- package/dist/packages/datepicker/datepicker.js.map +2 -2
- package/dist/packages/datepicker/datepicker.react.stories.d.ts +9 -1
- package/dist/packages/datepicker/react.d.ts +4 -0
- package/dist/packages/datepicker/react.js +4 -0
- package/dist/packages/textfield/textfield.d.ts +57 -60
- package/dist/packages/textfield/textfield.js +5 -5
- package/dist/packages/textfield/textfield.js.map +2 -2
- package/dist/packages/textfield/textfield.react.stories.d.ts +1 -1
- package/dist/web-types.json +392 -116
- package/package.json +1 -1
package/dist/docs/affix/affix.md
CHANGED
|
@@ -164,56 +164,58 @@ Clicking the clear button will reset the textfield
|
|
|
164
164
|
|
|
165
165
|
| Name | Type | Default | Summary |
|
|
166
166
|
|-|-|-|-|
|
|
167
|
-
|
|
|
167
|
+
| _icon | `unknown` | `-` | - |
|
|
168
|
+
| ariaLabel | `string \| null` | `null` | Accessible label for icon-button variants. |
|
|
168
169
|
| clear | `boolean` | `false` | Renders a clear icon button. |
|
|
169
|
-
|
|
|
170
|
+
| icon | `string \| null` | `null` | Icon name rendered as prefix/suffix content. |
|
|
170
171
|
| label | `string` | `''` | Text label shown as prefix/suffix content. |
|
|
171
|
-
|
|
|
172
|
-
| _icon | `unknown` | `-` | - |
|
|
172
|
+
| search | `boolean` | `false` | Renders a search icon button. |
|
|
173
173
|
|
|
174
174
|
### Property Details
|
|
175
175
|
|
|
176
|
+
#### _icon
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
- Type: `unknown`
|
|
181
|
+
- Default: `-`
|
|
182
|
+
|
|
176
183
|
#### ariaLabel
|
|
177
184
|
|
|
178
|
-
Used to override the default `aria-label`s for the internal button when `search` or `clear` is enabled.
|
|
179
185
|
|
|
180
|
-
|
|
186
|
+
|
|
187
|
+
- Type: `string \| null`
|
|
181
188
|
- Default: `null`
|
|
182
189
|
|
|
183
190
|
#### clear
|
|
184
191
|
|
|
185
|
-
|
|
192
|
+
Add this property to render a clickable Warp close icon.
|
|
193
|
+
|
|
194
|
+
Set an `aria-label` that explains the action when using this.
|
|
186
195
|
|
|
187
196
|
- Type: `boolean`
|
|
188
197
|
- Default: `false`
|
|
189
198
|
|
|
190
|
-
####
|
|
199
|
+
#### icon
|
|
191
200
|
|
|
192
|
-
Shows a clickable search icon, typically in a prefix slot for search fields.
|
|
193
201
|
|
|
194
|
-
|
|
195
|
-
-
|
|
202
|
+
|
|
203
|
+
- Type: `string \| null`
|
|
204
|
+
- Default: `null`
|
|
196
205
|
|
|
197
206
|
#### label
|
|
198
207
|
|
|
199
|
-
|
|
208
|
+
|
|
200
209
|
|
|
201
210
|
- Type: `string`
|
|
202
211
|
- Default: `''`
|
|
203
212
|
|
|
204
|
-
####
|
|
205
|
-
|
|
206
|
-
Displays a non-interactive `w-icon` in the affix area using the provided icon name (for example `Search` or `Close`) instead of text.
|
|
207
|
-
|
|
208
|
-
- Type: `string | null`
|
|
209
|
-
- Default: `null`
|
|
210
|
-
|
|
211
|
-
#### _icon
|
|
212
|
-
|
|
213
|
+
#### search
|
|
213
214
|
|
|
215
|
+
Add this property to render a clickable Warp search icon.
|
|
214
216
|
|
|
215
|
-
- Type: `
|
|
216
|
-
- Default:
|
|
217
|
+
- Type: `boolean`
|
|
218
|
+
- Default: `false`
|
|
217
219
|
|
|
218
220
|
### Types
|
|
219
221
|
|
package/dist/docs/affix/api.md
CHANGED
|
@@ -4,56 +4,58 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Default | Summary |
|
|
6
6
|
|-|-|-|-|
|
|
7
|
-
|
|
|
7
|
+
| _icon | `unknown` | `-` | - |
|
|
8
|
+
| ariaLabel | `string \| null` | `null` | Accessible label for icon-button variants. |
|
|
8
9
|
| clear | `boolean` | `false` | Renders a clear icon button. |
|
|
9
|
-
|
|
|
10
|
+
| icon | `string \| null` | `null` | Icon name rendered as prefix/suffix content. |
|
|
10
11
|
| label | `string` | `''` | Text label shown as prefix/suffix content. |
|
|
11
|
-
|
|
|
12
|
-
| _icon | `unknown` | `-` | - |
|
|
12
|
+
| search | `boolean` | `false` | Renders a search icon button. |
|
|
13
13
|
|
|
14
14
|
### Property Details
|
|
15
15
|
|
|
16
|
+
#### _icon
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
- Type: `unknown`
|
|
21
|
+
- Default: `-`
|
|
22
|
+
|
|
16
23
|
#### ariaLabel
|
|
17
24
|
|
|
18
|
-
Used to override the default `aria-label`s for the internal button when `search` or `clear` is enabled.
|
|
19
25
|
|
|
20
|
-
|
|
26
|
+
|
|
27
|
+
- Type: `string \| null`
|
|
21
28
|
- Default: `null`
|
|
22
29
|
|
|
23
30
|
#### clear
|
|
24
31
|
|
|
25
|
-
|
|
32
|
+
Add this property to render a clickable Warp close icon.
|
|
33
|
+
|
|
34
|
+
Set an `aria-label` that explains the action when using this.
|
|
26
35
|
|
|
27
36
|
- Type: `boolean`
|
|
28
37
|
- Default: `false`
|
|
29
38
|
|
|
30
|
-
####
|
|
39
|
+
#### icon
|
|
31
40
|
|
|
32
|
-
Shows a clickable search icon, typically in a prefix slot for search fields.
|
|
33
41
|
|
|
34
|
-
|
|
35
|
-
-
|
|
42
|
+
|
|
43
|
+
- Type: `string \| null`
|
|
44
|
+
- Default: `null`
|
|
36
45
|
|
|
37
46
|
#### label
|
|
38
47
|
|
|
39
|
-
|
|
48
|
+
|
|
40
49
|
|
|
41
50
|
- Type: `string`
|
|
42
51
|
- Default: `''`
|
|
43
52
|
|
|
44
|
-
####
|
|
45
|
-
|
|
46
|
-
Displays a non-interactive `w-icon` in the affix area using the provided icon name (for example `Search` or `Close`) instead of text.
|
|
47
|
-
|
|
48
|
-
- Type: `string | null`
|
|
49
|
-
- Default: `null`
|
|
50
|
-
|
|
51
|
-
#### _icon
|
|
52
|
-
|
|
53
|
+
#### search
|
|
53
54
|
|
|
55
|
+
Add this property to render a clickable Warp search icon.
|
|
54
56
|
|
|
55
|
-
- Type: `
|
|
56
|
-
- Default:
|
|
57
|
+
- Type: `boolean`
|
|
58
|
+
- Default: `false`
|
|
57
59
|
|
|
58
60
|
### Types
|
|
59
61
|
|
package/dist/docs/alert/alert.md
CHANGED
|
@@ -173,36 +173,36 @@ attribute on [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/AR
|
|
|
173
173
|
|
|
174
174
|
| Name | Type | Default | Summary |
|
|
175
175
|
|-|-|-|-|
|
|
176
|
-
| variant | [`AlertVariants`](#alertvariants) | `'info'` | Visual style of the alert. |
|
|
177
|
-
| show | `boolean` | `false` | Whether the alert is visible. |
|
|
178
176
|
| role | `string` | `'alert'` | ARIA role announced to assistive technology. |
|
|
177
|
+
| show | `boolean` | `false` | Whether the alert is visible. |
|
|
178
|
+
| variant | [`AlertVariants`](#alertvariants) | `'info'` | Visual style of the alert. |
|
|
179
179
|
|
|
180
180
|
### Property Details
|
|
181
181
|
|
|
182
|
-
####
|
|
182
|
+
#### role
|
|
183
183
|
|
|
184
|
-
Controls both the color treatment and icon used by the component. Accepted values are `info`, `warning`, `positive`, and `negative`. Use the variant that matches the message severity so users can quickly distinguish informative messages from warnings, errors, and confirmations.
|
|
185
184
|
|
|
186
|
-
|
|
187
|
-
-
|
|
185
|
+
|
|
186
|
+
- Type: `string`
|
|
187
|
+
- Default: `'alert'`
|
|
188
188
|
|
|
189
189
|
#### show
|
|
190
190
|
|
|
191
|
-
|
|
191
|
+
|
|
192
192
|
|
|
193
193
|
- Type: `boolean`
|
|
194
194
|
- Default: `false`
|
|
195
195
|
|
|
196
|
-
####
|
|
196
|
+
#### variant
|
|
197
197
|
|
|
198
|
-
Defaults to `alert` so urgent changes are announced by screen readers. Override this only when your use case requires a different announcement behavior, for example a less assertive live region strategy.
|
|
199
198
|
|
|
200
|
-
|
|
201
|
-
-
|
|
199
|
+
|
|
200
|
+
- Type: [`AlertVariants`](#alertvariants)
|
|
201
|
+
- Default: `'info'`
|
|
202
202
|
|
|
203
203
|
### Types
|
|
204
204
|
|
|
205
205
|
#### AlertVariants
|
|
206
206
|
|
|
207
|
-
`'negative'
|
|
207
|
+
`'negative' \| 'positive' \| 'warning' \| 'info'`
|
|
208
208
|
|
package/dist/docs/alert/api.md
CHANGED
|
@@ -4,36 +4,36 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Default | Summary |
|
|
6
6
|
|-|-|-|-|
|
|
7
|
-
| variant | [`AlertVariants`](#alertvariants) | `'info'` | Visual style of the alert. |
|
|
8
|
-
| show | `boolean` | `false` | Whether the alert is visible. |
|
|
9
7
|
| role | `string` | `'alert'` | ARIA role announced to assistive technology. |
|
|
8
|
+
| show | `boolean` | `false` | Whether the alert is visible. |
|
|
9
|
+
| variant | [`AlertVariants`](#alertvariants) | `'info'` | Visual style of the alert. |
|
|
10
10
|
|
|
11
11
|
### Property Details
|
|
12
12
|
|
|
13
|
-
####
|
|
13
|
+
#### role
|
|
14
14
|
|
|
15
|
-
Controls both the color treatment and icon used by the component. Accepted values are `info`, `warning`, `positive`, and `negative`. Use the variant that matches the message severity so users can quickly distinguish informative messages from warnings, errors, and confirmations.
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
-
|
|
16
|
+
|
|
17
|
+
- Type: `string`
|
|
18
|
+
- Default: `'alert'`
|
|
19
19
|
|
|
20
20
|
#### show
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
|
|
24
24
|
- Type: `boolean`
|
|
25
25
|
- Default: `false`
|
|
26
26
|
|
|
27
|
-
####
|
|
27
|
+
#### variant
|
|
28
28
|
|
|
29
|
-
Defaults to `alert` so urgent changes are announced by screen readers. Override this only when your use case requires a different announcement behavior, for example a less assertive live region strategy.
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
-
|
|
30
|
+
|
|
31
|
+
- Type: [`AlertVariants`](#alertvariants)
|
|
32
|
+
- Default: `'info'`
|
|
33
33
|
|
|
34
34
|
### Types
|
|
35
35
|
|
|
36
36
|
#### AlertVariants
|
|
37
37
|
|
|
38
|
-
`'negative'
|
|
38
|
+
`'negative' \| 'positive' \| 'warning' \| 'info'`
|
|
39
39
|
|
|
@@ -4,128 +4,128 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Default | Summary |
|
|
6
6
|
|-|-|-|-|
|
|
7
|
-
|
|
|
8
|
-
|
|
|
9
|
-
| tooltip | `boolean` | `false` | - |
|
|
7
|
+
| _actualDirection | `unknown` | `-` | - |
|
|
8
|
+
| _initialPlacement | `unknown` | `-` | - |
|
|
10
9
|
| callout | `boolean` | `false` | - |
|
|
11
|
-
| popover | `boolean` | `false` | - |
|
|
12
|
-
| highlight | `boolean` | `false` | - |
|
|
13
10
|
| canClose | `boolean` | `false` | - |
|
|
14
|
-
| noArrow | `boolean` | `false` | - |
|
|
15
|
-
| distance | `number` | `8` | - |
|
|
16
|
-
| skidding | `number` | `0` | - |
|
|
17
|
-
| flip | `boolean` | `false` | - |
|
|
18
11
|
| crossAxis | `boolean` | `false` | - |
|
|
12
|
+
| distance | `number` | `8` | - |
|
|
19
13
|
| fallbackPlacements | `Directions[]` | `-` | - |
|
|
20
|
-
|
|
|
21
|
-
|
|
|
14
|
+
| flip | `boolean` | `false` | - |
|
|
15
|
+
| highlight | `boolean` | `false` | - |
|
|
16
|
+
| noArrow | `boolean` | `false` | - |
|
|
17
|
+
| placement | `Directions` | `'bottom'` | - |
|
|
18
|
+
| popover | `boolean` | `false` | - |
|
|
19
|
+
| show | `boolean` | `false` | - |
|
|
20
|
+
| skidding | `number` | `0` | - |
|
|
21
|
+
| tooltip | `boolean` | `false` | - |
|
|
22
22
|
|
|
23
23
|
### Property Details
|
|
24
24
|
|
|
25
|
-
####
|
|
25
|
+
#### _actualDirection
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
- Type: `
|
|
30
|
-
- Default:
|
|
29
|
+
- Type: `unknown`
|
|
30
|
+
- Default: `-`
|
|
31
31
|
|
|
32
|
-
####
|
|
32
|
+
#### _initialPlacement
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
- Type: `
|
|
37
|
-
- Default:
|
|
36
|
+
- Type: `unknown`
|
|
37
|
+
- Default: `-`
|
|
38
38
|
|
|
39
|
-
####
|
|
39
|
+
#### callout
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
- Type: `boolean`
|
|
44
44
|
- Default: `false`
|
|
45
45
|
|
|
46
|
-
####
|
|
46
|
+
#### canClose
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
- Type: `boolean`
|
|
51
51
|
- Default: `false`
|
|
52
52
|
|
|
53
|
-
####
|
|
53
|
+
#### crossAxis
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
- Type: `boolean`
|
|
58
58
|
- Default: `false`
|
|
59
59
|
|
|
60
|
-
####
|
|
60
|
+
#### distance
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
- Type: `
|
|
65
|
-
- Default: `
|
|
64
|
+
- Type: `number`
|
|
65
|
+
- Default: `8`
|
|
66
66
|
|
|
67
|
-
####
|
|
67
|
+
#### fallbackPlacements
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
|
|
71
|
-
- Type: `
|
|
72
|
-
- Default:
|
|
71
|
+
- Type: `Directions[]`
|
|
72
|
+
- Default: `-`
|
|
73
73
|
|
|
74
|
-
####
|
|
74
|
+
#### flip
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
- Type: `boolean`
|
|
79
79
|
- Default: `false`
|
|
80
80
|
|
|
81
|
-
####
|
|
81
|
+
#### highlight
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
- Type: `
|
|
86
|
-
- Default: `
|
|
85
|
+
- Type: `boolean`
|
|
86
|
+
- Default: `false`
|
|
87
87
|
|
|
88
|
-
####
|
|
88
|
+
#### noArrow
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
- Type: `
|
|
93
|
-
- Default: `
|
|
92
|
+
- Type: `boolean`
|
|
93
|
+
- Default: `false`
|
|
94
94
|
|
|
95
|
-
####
|
|
95
|
+
#### placement
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
|
|
99
|
-
- Type: `
|
|
100
|
-
- Default: `
|
|
99
|
+
- Type: `Directions`
|
|
100
|
+
- Default: `'bottom'`
|
|
101
101
|
|
|
102
|
-
####
|
|
102
|
+
#### popover
|
|
103
103
|
|
|
104
104
|
|
|
105
105
|
|
|
106
106
|
- Type: `boolean`
|
|
107
107
|
- Default: `false`
|
|
108
108
|
|
|
109
|
-
####
|
|
109
|
+
#### show
|
|
110
110
|
|
|
111
111
|
|
|
112
112
|
|
|
113
|
-
- Type: `
|
|
114
|
-
- Default:
|
|
113
|
+
- Type: `boolean`
|
|
114
|
+
- Default: `false`
|
|
115
115
|
|
|
116
|
-
####
|
|
116
|
+
#### skidding
|
|
117
117
|
|
|
118
118
|
|
|
119
119
|
|
|
120
|
-
- Type: `
|
|
121
|
-
- Default:
|
|
120
|
+
- Type: `number`
|
|
121
|
+
- Default: `0`
|
|
122
122
|
|
|
123
|
-
####
|
|
123
|
+
#### tooltip
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
|
|
127
|
-
- Type: `
|
|
128
|
-
- Default:
|
|
127
|
+
- Type: `boolean`
|
|
128
|
+
- Default: `false`
|
|
129
129
|
|
|
130
130
|
### Types
|
|
131
131
|
|
|
@@ -16,128 +16,128 @@
|
|
|
16
16
|
|
|
17
17
|
| Name | Type | Default | Summary |
|
|
18
18
|
|-|-|-|-|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
| tooltip | `boolean` | `false` | - |
|
|
19
|
+
| _actualDirection | `unknown` | `-` | - |
|
|
20
|
+
| _initialPlacement | `unknown` | `-` | - |
|
|
22
21
|
| callout | `boolean` | `false` | - |
|
|
23
|
-
| popover | `boolean` | `false` | - |
|
|
24
|
-
| highlight | `boolean` | `false` | - |
|
|
25
22
|
| canClose | `boolean` | `false` | - |
|
|
26
|
-
| noArrow | `boolean` | `false` | - |
|
|
27
|
-
| distance | `number` | `8` | - |
|
|
28
|
-
| skidding | `number` | `0` | - |
|
|
29
|
-
| flip | `boolean` | `false` | - |
|
|
30
23
|
| crossAxis | `boolean` | `false` | - |
|
|
24
|
+
| distance | `number` | `8` | - |
|
|
31
25
|
| fallbackPlacements | `Directions[]` | `-` | - |
|
|
32
|
-
|
|
|
33
|
-
|
|
|
26
|
+
| flip | `boolean` | `false` | - |
|
|
27
|
+
| highlight | `boolean` | `false` | - |
|
|
28
|
+
| noArrow | `boolean` | `false` | - |
|
|
29
|
+
| placement | `Directions` | `'bottom'` | - |
|
|
30
|
+
| popover | `boolean` | `false` | - |
|
|
31
|
+
| show | `boolean` | `false` | - |
|
|
32
|
+
| skidding | `number` | `0` | - |
|
|
33
|
+
| tooltip | `boolean` | `false` | - |
|
|
34
34
|
|
|
35
35
|
### Property Details
|
|
36
36
|
|
|
37
|
-
####
|
|
37
|
+
#### _actualDirection
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
- Type: `
|
|
42
|
-
- Default:
|
|
41
|
+
- Type: `unknown`
|
|
42
|
+
- Default: `-`
|
|
43
43
|
|
|
44
|
-
####
|
|
44
|
+
#### _initialPlacement
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
- Type: `
|
|
49
|
-
- Default:
|
|
48
|
+
- Type: `unknown`
|
|
49
|
+
- Default: `-`
|
|
50
50
|
|
|
51
|
-
####
|
|
51
|
+
#### callout
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
- Type: `boolean`
|
|
56
56
|
- Default: `false`
|
|
57
57
|
|
|
58
|
-
####
|
|
58
|
+
#### canClose
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
62
62
|
- Type: `boolean`
|
|
63
63
|
- Default: `false`
|
|
64
64
|
|
|
65
|
-
####
|
|
65
|
+
#### crossAxis
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
- Type: `boolean`
|
|
70
70
|
- Default: `false`
|
|
71
71
|
|
|
72
|
-
####
|
|
72
|
+
#### distance
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
|
|
76
|
-
- Type: `
|
|
77
|
-
- Default: `
|
|
76
|
+
- Type: `number`
|
|
77
|
+
- Default: `8`
|
|
78
78
|
|
|
79
|
-
####
|
|
79
|
+
#### fallbackPlacements
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
- Type: `
|
|
84
|
-
- Default:
|
|
83
|
+
- Type: `Directions[]`
|
|
84
|
+
- Default: `-`
|
|
85
85
|
|
|
86
|
-
####
|
|
86
|
+
#### flip
|
|
87
87
|
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
- Type: `boolean`
|
|
91
91
|
- Default: `false`
|
|
92
92
|
|
|
93
|
-
####
|
|
93
|
+
#### highlight
|
|
94
94
|
|
|
95
95
|
|
|
96
96
|
|
|
97
|
-
- Type: `
|
|
98
|
-
- Default: `
|
|
97
|
+
- Type: `boolean`
|
|
98
|
+
- Default: `false`
|
|
99
99
|
|
|
100
|
-
####
|
|
100
|
+
#### noArrow
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
|
|
104
|
-
- Type: `
|
|
105
|
-
- Default: `
|
|
104
|
+
- Type: `boolean`
|
|
105
|
+
- Default: `false`
|
|
106
106
|
|
|
107
|
-
####
|
|
107
|
+
#### placement
|
|
108
108
|
|
|
109
109
|
|
|
110
110
|
|
|
111
|
-
- Type: `
|
|
112
|
-
- Default: `
|
|
111
|
+
- Type: `Directions`
|
|
112
|
+
- Default: `'bottom'`
|
|
113
113
|
|
|
114
|
-
####
|
|
114
|
+
#### popover
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
|
|
118
118
|
- Type: `boolean`
|
|
119
119
|
- Default: `false`
|
|
120
120
|
|
|
121
|
-
####
|
|
121
|
+
#### show
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
|
|
125
|
-
- Type: `
|
|
126
|
-
- Default:
|
|
125
|
+
- Type: `boolean`
|
|
126
|
+
- Default: `false`
|
|
127
127
|
|
|
128
|
-
####
|
|
128
|
+
#### skidding
|
|
129
129
|
|
|
130
130
|
|
|
131
131
|
|
|
132
|
-
- Type: `
|
|
133
|
-
- Default:
|
|
132
|
+
- Type: `number`
|
|
133
|
+
- Default: `0`
|
|
134
134
|
|
|
135
|
-
####
|
|
135
|
+
#### tooltip
|
|
136
136
|
|
|
137
137
|
|
|
138
138
|
|
|
139
|
-
- Type: `
|
|
140
|
-
- Default:
|
|
139
|
+
- Type: `boolean`
|
|
140
|
+
- Default: `false`
|
|
141
141
|
|
|
142
142
|
### Types
|
|
143
143
|
|
|
@@ -1 +1,45 @@
|
|
|
1
1
|
## Accessibility
|
|
2
|
+
|
|
3
|
+
Badge renders slotted text as regular content. It does not add an ARIA role and it is not announced as a live region.
|
|
4
|
+
|
|
5
|
+
### Use Meaningful Text
|
|
6
|
+
|
|
7
|
+
Do not rely on color alone to communicate meaning. The badge text should describe the status or metadata by itself.
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<w-badge variant="positive">Approved</w-badge>
|
|
11
|
+
<w-badge variant="negative">Rejected</w-badge>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Avoid labels that only make sense visually:
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<!-- Avoid -->
|
|
18
|
+
<w-badge variant="positive">Green</w-badge>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Keep Badges Non-Interactive
|
|
22
|
+
|
|
23
|
+
Do not place interactive elements inside `w-badge`. If the user can click, dismiss, filter, or select the item, use an interactive component instead.
|
|
24
|
+
|
|
25
|
+
The `disabled` variant is visual only. It does not disable related controls or remove anything from the tab order.
|
|
26
|
+
|
|
27
|
+
```html
|
|
28
|
+
<!-- Avoid -->
|
|
29
|
+
<w-badge>
|
|
30
|
+
<button type="button">New</button>
|
|
31
|
+
</w-badge>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Dynamic Changes
|
|
35
|
+
|
|
36
|
+
If a badge value changes after the page has loaded and users need to be notified, announce that change outside the badge with an appropriate live region or use [Alert](/docs/components/alert/overview) for important feedback.
|
|
37
|
+
|
|
38
|
+
### Duplicate or Decorative Badges
|
|
39
|
+
|
|
40
|
+
If the same information is already available in nearby accessible text and the badge is only a visual duplicate, hide the duplicate badge from assistive technologies.
|
|
41
|
+
|
|
42
|
+
```html
|
|
43
|
+
<p>Sponsored listing</p>
|
|
44
|
+
<w-badge aria-hidden="true" variant="sponsored">Sponsored</w-badge>
|
|
45
|
+
```
|