@warp-ds/elements 2.9.0-next.5 → 2.9.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/dist/custom-elements.json +221 -118
- package/dist/docs/affix/affix.md +49 -61
- package/dist/docs/affix/api.md +25 -23
- package/dist/docs/affix/examples.md +24 -38
- package/dist/docs/alert/accessibility.md +4 -9
- package/dist/docs/alert/alert.md +36 -51
- package/dist/docs/alert/api.md +12 -12
- package/dist/docs/alert/examples.md +20 -30
- package/dist/docs/attention/accessibility.md +50 -0
- package/dist/docs/attention/api.md +72 -59
- package/dist/docs/attention/attention.md +305 -56
- package/dist/docs/attention/examples.md +91 -0
- package/dist/docs/attention/usage.md +91 -0
- package/dist/docs/badge/accessibility.md +44 -0
- package/dist/docs/badge/api.md +12 -8
- package/dist/docs/badge/badge.md +178 -10
- package/dist/docs/badge/examples.md +69 -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/accessibility.md +5 -0
- package/dist/docs/textarea/api.md +52 -65
- package/dist/docs/textarea/examples.md +81 -0
- package/dist/docs/textarea/textarea.md +151 -65
- package/dist/docs/textarea/usage.md +9 -0
- package/dist/docs/textfield/accessibility.md +15 -0
- package/dist/docs/textfield/api.md +86 -83
- package/dist/docs/textfield/examples.md +130 -0
- package/dist/docs/textfield/textfield.md +258 -86
- package/dist/docs/textfield/usage.md +26 -0
- package/dist/index.d.ts +456 -330
- package/dist/packages/attention/attention.d.ts +46 -37
- package/dist/packages/attention/attention.js +20 -20
- package/dist/packages/attention/attention.js.map +3 -3
- 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/textarea/textarea.d.ts +38 -29
- package/dist/packages/textarea/textarea.js.map +2 -2
- 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 +573 -153
- package/package.json +1 -2
package/dist/docs/affix/affix.md
CHANGED
|
@@ -68,58 +68,46 @@ When `search` or `clear` is enabled, `w-affix` renders a button and a matching `
|
|
|
68
68
|
|
|
69
69
|
### Prefix Label
|
|
70
70
|
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
-
<w-affix slot="prefix" label="kr"></w-affix>
|
|
74
|
-
</w-textfield>
|
|
75
|
-
</style-isolate>
|
|
76
|
-
|
|
71
|
+
<elements-example>
|
|
72
|
+
|
|
77
73
|
```html
|
|
78
74
|
<w-textfield label="Price">
|
|
79
75
|
<w-affix slot="suffix" label="kr"></w-affix>
|
|
80
76
|
</w-textfield>
|
|
81
77
|
```
|
|
82
78
|
|
|
83
|
-
|
|
79
|
+
</elements-example>
|
|
84
80
|
|
|
85
|
-
|
|
86
|
-
<w-textfield label="Price">
|
|
87
|
-
<w-affix slot="suffix" label="kr"></w-affix>
|
|
88
|
-
</w-textfield>
|
|
89
|
-
</style-isolate>
|
|
81
|
+
### Suffix Label
|
|
90
82
|
|
|
83
|
+
<elements-example>
|
|
84
|
+
|
|
91
85
|
```html
|
|
92
86
|
<w-textfield label="Price">
|
|
93
87
|
<w-affix slot="suffix" label="kr"></w-affix>
|
|
94
88
|
</w-textfield>
|
|
95
89
|
```
|
|
96
90
|
|
|
97
|
-
|
|
91
|
+
</elements-example>
|
|
98
92
|
|
|
99
|
-
|
|
100
|
-
<w-textfield label="Search">
|
|
101
|
-
<w-affix slot="prefix" search></w-affix>
|
|
102
|
-
</w-textfield>
|
|
103
|
-
</style-isolate>
|
|
93
|
+
### Prefix Search Icon
|
|
104
94
|
|
|
95
|
+
<elements-example>
|
|
96
|
+
|
|
105
97
|
```html
|
|
106
98
|
<w-textfield label="Search">
|
|
107
99
|
<w-affix slot="prefix" search></w-affix>
|
|
108
100
|
</w-textfield>
|
|
109
101
|
```
|
|
110
102
|
|
|
103
|
+
</elements-example>
|
|
104
|
+
|
|
111
105
|
### Suffix Search Icon
|
|
112
106
|
|
|
113
107
|
If you wrap the textfield with affix in a form element, clicking the search button will automatically submit the form
|
|
114
108
|
|
|
115
|
-
<
|
|
116
|
-
|
|
117
|
-
<w-textfield label="Search">
|
|
118
|
-
<w-affix slot="suffix" search></w-affix>
|
|
119
|
-
</w-textfield>
|
|
120
|
-
</form>
|
|
121
|
-
</style-isolate>
|
|
122
|
-
|
|
109
|
+
<elements-example>
|
|
110
|
+
|
|
123
111
|
```html
|
|
124
112
|
<form>
|
|
125
113
|
<w-textfield label="Search">
|
|
@@ -128,92 +116,92 @@ If you wrap the textfield with affix in a form element, clicking the search butt
|
|
|
128
116
|
</form>
|
|
129
117
|
```
|
|
130
118
|
|
|
119
|
+
</elements-example>
|
|
120
|
+
|
|
131
121
|
### Suffix Clear Icon
|
|
132
122
|
|
|
133
123
|
Clicking the clear button will reset the textfield
|
|
134
124
|
|
|
135
|
-
<
|
|
136
|
-
|
|
137
|
-
<w-affix slot="suffix" clear></w-affix>
|
|
138
|
-
</w-textfield>
|
|
139
|
-
</style-isolate>
|
|
140
|
-
|
|
125
|
+
<elements-example>
|
|
126
|
+
|
|
141
127
|
```html
|
|
142
128
|
<w-textfield label="Search input">
|
|
143
129
|
<w-affix slot="suffix" clear></w-affix>
|
|
144
130
|
</w-textfield>
|
|
145
131
|
```
|
|
146
132
|
|
|
147
|
-
|
|
133
|
+
</elements-example>
|
|
148
134
|
|
|
149
|
-
|
|
150
|
-
<w-textfield label="Award">
|
|
151
|
-
<w-affix slot="prefix" icon="AwardMedal"></w-affix>
|
|
152
|
-
</w-textfield>
|
|
153
|
-
</style-isolate>
|
|
135
|
+
### Icons
|
|
154
136
|
|
|
137
|
+
<elements-example>
|
|
138
|
+
|
|
155
139
|
```html
|
|
156
140
|
<w-textfield label="Award">
|
|
157
141
|
<w-affix slot="prefix" icon="AwardMedal"></w-affix>
|
|
158
142
|
</w-textfield>
|
|
159
143
|
```
|
|
160
144
|
|
|
145
|
+
</elements-example>
|
|
146
|
+
|
|
161
147
|
## API Documentation
|
|
162
148
|
|
|
163
149
|
### Properties
|
|
164
150
|
|
|
165
151
|
| Name | Type | Default | Summary |
|
|
166
152
|
|-|-|-|-|
|
|
167
|
-
|
|
|
153
|
+
| _icon | `unknown` | `-` | - |
|
|
154
|
+
| ariaLabel | `string \| null` | `null` | Accessible label for icon-button variants. |
|
|
168
155
|
| clear | `boolean` | `false` | Renders a clear icon button. |
|
|
169
|
-
|
|
|
156
|
+
| icon | `string \| null` | `null` | Icon name rendered as prefix/suffix content. |
|
|
170
157
|
| label | `string` | `''` | Text label shown as prefix/suffix content. |
|
|
171
|
-
|
|
|
172
|
-
| _icon | `unknown` | `-` | - |
|
|
158
|
+
| search | `boolean` | `false` | Renders a search icon button. |
|
|
173
159
|
|
|
174
160
|
### Property Details
|
|
175
161
|
|
|
162
|
+
#### _icon
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
- Type: `unknown`
|
|
167
|
+
- Default: `-`
|
|
168
|
+
|
|
176
169
|
#### ariaLabel
|
|
177
170
|
|
|
178
|
-
Used to override the default `aria-label`s for the internal button when `search` or `clear` is enabled.
|
|
179
171
|
|
|
180
|
-
|
|
172
|
+
|
|
173
|
+
- Type: `string \| null`
|
|
181
174
|
- Default: `null`
|
|
182
175
|
|
|
183
176
|
#### clear
|
|
184
177
|
|
|
185
|
-
|
|
178
|
+
Add this property to render a clickable Warp close icon.
|
|
179
|
+
|
|
180
|
+
Set an `aria-label` that explains the action when using this.
|
|
186
181
|
|
|
187
182
|
- Type: `boolean`
|
|
188
183
|
- Default: `false`
|
|
189
184
|
|
|
190
|
-
####
|
|
185
|
+
#### icon
|
|
191
186
|
|
|
192
|
-
Shows a clickable search icon, typically in a prefix slot for search fields.
|
|
193
187
|
|
|
194
|
-
|
|
195
|
-
-
|
|
188
|
+
|
|
189
|
+
- Type: `string \| null`
|
|
190
|
+
- Default: `null`
|
|
196
191
|
|
|
197
192
|
#### label
|
|
198
193
|
|
|
199
|
-
|
|
194
|
+
|
|
200
195
|
|
|
201
196
|
- Type: `string`
|
|
202
197
|
- Default: `''`
|
|
203
198
|
|
|
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
|
-
|
|
199
|
+
#### search
|
|
213
200
|
|
|
201
|
+
Add this property to render a clickable Warp search icon.
|
|
214
202
|
|
|
215
|
-
- Type: `
|
|
216
|
-
- Default:
|
|
203
|
+
- Type: `boolean`
|
|
204
|
+
- Default: `false`
|
|
217
205
|
|
|
218
206
|
### Types
|
|
219
207
|
|
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
|
|
|
@@ -2,58 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
### Prefix Label
|
|
4
4
|
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
<w-affix slot="prefix" label="kr"></w-affix>
|
|
8
|
-
</w-textfield>
|
|
9
|
-
</style-isolate>
|
|
10
|
-
|
|
5
|
+
<elements-example>
|
|
6
|
+
|
|
11
7
|
```html
|
|
12
8
|
<w-textfield label="Price">
|
|
13
9
|
<w-affix slot="suffix" label="kr"></w-affix>
|
|
14
10
|
</w-textfield>
|
|
15
11
|
```
|
|
16
12
|
|
|
17
|
-
|
|
13
|
+
</elements-example>
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
<w-textfield label="Price">
|
|
21
|
-
<w-affix slot="suffix" label="kr"></w-affix>
|
|
22
|
-
</w-textfield>
|
|
23
|
-
</style-isolate>
|
|
15
|
+
### Suffix Label
|
|
24
16
|
|
|
17
|
+
<elements-example>
|
|
18
|
+
|
|
25
19
|
```html
|
|
26
20
|
<w-textfield label="Price">
|
|
27
21
|
<w-affix slot="suffix" label="kr"></w-affix>
|
|
28
22
|
</w-textfield>
|
|
29
23
|
```
|
|
30
24
|
|
|
31
|
-
|
|
25
|
+
</elements-example>
|
|
32
26
|
|
|
33
|
-
|
|
34
|
-
<w-textfield label="Search">
|
|
35
|
-
<w-affix slot="prefix" search></w-affix>
|
|
36
|
-
</w-textfield>
|
|
37
|
-
</style-isolate>
|
|
27
|
+
### Prefix Search Icon
|
|
38
28
|
|
|
29
|
+
<elements-example>
|
|
30
|
+
|
|
39
31
|
```html
|
|
40
32
|
<w-textfield label="Search">
|
|
41
33
|
<w-affix slot="prefix" search></w-affix>
|
|
42
34
|
</w-textfield>
|
|
43
35
|
```
|
|
44
36
|
|
|
37
|
+
</elements-example>
|
|
38
|
+
|
|
45
39
|
### Suffix Search Icon
|
|
46
40
|
|
|
47
41
|
If you wrap the textfield with affix in a form element, clicking the search button will automatically submit the form
|
|
48
42
|
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
<w-textfield label="Search">
|
|
52
|
-
<w-affix slot="suffix" search></w-affix>
|
|
53
|
-
</w-textfield>
|
|
54
|
-
</form>
|
|
55
|
-
</style-isolate>
|
|
56
|
-
|
|
43
|
+
<elements-example>
|
|
44
|
+
|
|
57
45
|
```html
|
|
58
46
|
<form>
|
|
59
47
|
<w-textfield label="Search">
|
|
@@ -62,32 +50,30 @@ If you wrap the textfield with affix in a form element, clicking the search butt
|
|
|
62
50
|
</form>
|
|
63
51
|
```
|
|
64
52
|
|
|
53
|
+
</elements-example>
|
|
54
|
+
|
|
65
55
|
### Suffix Clear Icon
|
|
66
56
|
|
|
67
57
|
Clicking the clear button will reset the textfield
|
|
68
58
|
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
<w-affix slot="suffix" clear></w-affix>
|
|
72
|
-
</w-textfield>
|
|
73
|
-
</style-isolate>
|
|
74
|
-
|
|
59
|
+
<elements-example>
|
|
60
|
+
|
|
75
61
|
```html
|
|
76
62
|
<w-textfield label="Search input">
|
|
77
63
|
<w-affix slot="suffix" clear></w-affix>
|
|
78
64
|
</w-textfield>
|
|
79
65
|
```
|
|
80
66
|
|
|
81
|
-
|
|
67
|
+
</elements-example>
|
|
82
68
|
|
|
83
|
-
|
|
84
|
-
<w-textfield label="Award">
|
|
85
|
-
<w-affix slot="prefix" icon="AwardMedal"></w-affix>
|
|
86
|
-
</w-textfield>
|
|
87
|
-
</style-isolate>
|
|
69
|
+
### Icons
|
|
88
70
|
|
|
71
|
+
<elements-example>
|
|
72
|
+
|
|
89
73
|
```html
|
|
90
74
|
<w-textfield label="Award">
|
|
91
75
|
<w-affix slot="prefix" icon="AwardMedal"></w-affix>
|
|
92
76
|
</w-textfield>
|
|
93
77
|
```
|
|
78
|
+
|
|
79
|
+
</elements-example>
|
|
@@ -10,15 +10,8 @@ assign it to its particular child (e.g. title), you can do so by setting `role`
|
|
|
10
10
|
property of the `Alert` component to an empty string and assigning a respective
|
|
11
11
|
`role` attribute on the child element.
|
|
12
12
|
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
<h3 role="alert" class="t5">
|
|
16
|
-
This is an alert styled as an information box
|
|
17
|
-
</h3>
|
|
18
|
-
<p>In this example only the title has the role of alert. All alerts can have a description.</p>
|
|
19
|
-
</w-alert>
|
|
20
|
-
</style-isolate>
|
|
21
|
-
|
|
13
|
+
<elements-example>
|
|
14
|
+
|
|
22
15
|
```html
|
|
23
16
|
<w-alert variant="info" show role="">
|
|
24
17
|
<h3 role="alert" class="t5">This is an alert styled as an information box</h3>
|
|
@@ -26,5 +19,7 @@ property of the `Alert` component to an empty string and assigning a respective
|
|
|
26
19
|
</w-alert>
|
|
27
20
|
```
|
|
28
21
|
|
|
22
|
+
</elements-example>
|
|
23
|
+
|
|
29
24
|
Read more about live region `role`
|
|
30
25
|
attribute on [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions#roles_with_implicit_live_region_attributes).
|
package/dist/docs/alert/alert.md
CHANGED
|
@@ -63,15 +63,8 @@ assign it to its particular child (e.g. title), you can do so by setting `role`
|
|
|
63
63
|
property of the `Alert` component to an empty string and assigning a respective
|
|
64
64
|
`role` attribute on the child element.
|
|
65
65
|
|
|
66
|
-
<
|
|
67
|
-
|
|
68
|
-
<h3 role="alert" class="t5">
|
|
69
|
-
This is an alert styled as an information box
|
|
70
|
-
</h3>
|
|
71
|
-
<p>In this example only the title has the role of alert. All alerts can have a description.</p>
|
|
72
|
-
</w-alert>
|
|
73
|
-
</style-isolate>
|
|
74
|
-
|
|
66
|
+
<elements-example>
|
|
67
|
+
|
|
75
68
|
```html
|
|
76
69
|
<w-alert variant="info" show role="">
|
|
77
70
|
<h3 role="alert" class="t5">This is an alert styled as an information box</h3>
|
|
@@ -79,6 +72,8 @@ property of the `Alert` component to an empty string and assigning a respective
|
|
|
79
72
|
</w-alert>
|
|
80
73
|
```
|
|
81
74
|
|
|
75
|
+
</elements-example>
|
|
76
|
+
|
|
82
77
|
Read more about live region `role`
|
|
83
78
|
attribute on [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions#roles_with_implicit_live_region_attributes).
|
|
84
79
|
|
|
@@ -86,74 +81,64 @@ attribute on [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/AR
|
|
|
86
81
|
|
|
87
82
|
### Basic
|
|
88
83
|
|
|
89
|
-
<
|
|
90
|
-
|
|
91
|
-
<p>We have updated your preferences.</p>
|
|
92
|
-
</w-alert>
|
|
93
|
-
</style-isolate>
|
|
94
|
-
|
|
84
|
+
<elements-example>
|
|
85
|
+
|
|
95
86
|
```html
|
|
96
87
|
<w-alert show>
|
|
97
88
|
<p>We have updated your preferences.</p>
|
|
98
89
|
</w-alert>
|
|
99
90
|
```
|
|
100
91
|
|
|
101
|
-
|
|
92
|
+
</elements-example>
|
|
102
93
|
|
|
103
|
-
|
|
104
|
-
<w-alert variant="info" show>
|
|
105
|
-
<p>This is an informational alert.</p>
|
|
106
|
-
</w-alert>
|
|
107
|
-
</style-isolate>
|
|
94
|
+
### Info
|
|
108
95
|
|
|
96
|
+
<elements-example>
|
|
97
|
+
|
|
109
98
|
```html
|
|
110
99
|
<w-alert variant="info" show>
|
|
111
100
|
<p>This is an informational alert.</p>
|
|
112
101
|
</w-alert>
|
|
113
102
|
```
|
|
114
103
|
|
|
115
|
-
|
|
104
|
+
</elements-example>
|
|
116
105
|
|
|
117
|
-
|
|
118
|
-
<w-alert variant="warning" show>
|
|
119
|
-
<p>Please double-check this value before continuing.</p>
|
|
120
|
-
</w-alert>
|
|
121
|
-
</style-isolate>
|
|
106
|
+
### Warning
|
|
122
107
|
|
|
108
|
+
<elements-example>
|
|
109
|
+
|
|
123
110
|
```html
|
|
124
111
|
<w-alert variant="warning" show>
|
|
125
112
|
<p>Please double-check this value before continuing.</p>
|
|
126
113
|
</w-alert>
|
|
127
114
|
```
|
|
128
115
|
|
|
129
|
-
|
|
116
|
+
</elements-example>
|
|
130
117
|
|
|
131
|
-
|
|
132
|
-
<w-alert variant="negative" show>
|
|
133
|
-
<p>Something went wrong. Try again.</p>
|
|
134
|
-
</w-alert>
|
|
135
|
-
</style-isolate>
|
|
118
|
+
### Negative
|
|
136
119
|
|
|
120
|
+
<elements-example>
|
|
121
|
+
|
|
137
122
|
```html
|
|
138
123
|
<w-alert variant="negative" show>
|
|
139
124
|
<p>Something went wrong. Try again.</p>
|
|
140
125
|
</w-alert>
|
|
141
126
|
```
|
|
142
127
|
|
|
143
|
-
|
|
128
|
+
</elements-example>
|
|
144
129
|
|
|
145
|
-
|
|
146
|
-
<w-alert variant="positive" show>
|
|
147
|
-
<p>Your changes were saved successfully.</p>
|
|
148
|
-
</w-alert>
|
|
149
|
-
</style-isolate>
|
|
130
|
+
### Positive
|
|
150
131
|
|
|
132
|
+
<elements-example>
|
|
133
|
+
|
|
151
134
|
```html
|
|
152
135
|
<w-alert variant="positive" show>
|
|
153
136
|
<p>Your changes were saved successfully.</p>
|
|
154
137
|
</w-alert>
|
|
155
138
|
```
|
|
156
139
|
|
|
140
|
+
</elements-example>
|
|
141
|
+
|
|
157
142
|
### Programmatic Visibility
|
|
158
143
|
|
|
159
144
|
```html
|
|
@@ -173,36 +158,36 @@ attribute on [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/AR
|
|
|
173
158
|
|
|
174
159
|
| Name | Type | Default | Summary |
|
|
175
160
|
|-|-|-|-|
|
|
176
|
-
| variant | [`AlertVariants`](#alertvariants) | `'info'` | Visual style of the alert. |
|
|
177
|
-
| show | `boolean` | `false` | Whether the alert is visible. |
|
|
178
161
|
| role | `string` | `'alert'` | ARIA role announced to assistive technology. |
|
|
162
|
+
| show | `boolean` | `false` | Whether the alert is visible. |
|
|
163
|
+
| variant | [`AlertVariants`](#alertvariants) | `'info'` | Visual style of the alert. |
|
|
179
164
|
|
|
180
165
|
### Property Details
|
|
181
166
|
|
|
182
|
-
####
|
|
167
|
+
#### role
|
|
183
168
|
|
|
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
169
|
|
|
186
|
-
|
|
187
|
-
-
|
|
170
|
+
|
|
171
|
+
- Type: `string`
|
|
172
|
+
- Default: `'alert'`
|
|
188
173
|
|
|
189
174
|
#### show
|
|
190
175
|
|
|
191
|
-
|
|
176
|
+
|
|
192
177
|
|
|
193
178
|
- Type: `boolean`
|
|
194
179
|
- Default: `false`
|
|
195
180
|
|
|
196
|
-
####
|
|
181
|
+
#### variant
|
|
197
182
|
|
|
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
183
|
|
|
200
|
-
|
|
201
|
-
-
|
|
184
|
+
|
|
185
|
+
- Type: [`AlertVariants`](#alertvariants)
|
|
186
|
+
- Default: `'info'`
|
|
202
187
|
|
|
203
188
|
### Types
|
|
204
189
|
|
|
205
190
|
#### AlertVariants
|
|
206
191
|
|
|
207
|
-
`'negative'
|
|
192
|
+
`'negative' \| 'positive' \| 'warning' \| 'info'`
|
|
208
193
|
|
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
|
|