@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.
Files changed (79) hide show
  1. package/dist/custom-elements.json +221 -118
  2. package/dist/docs/affix/affix.md +49 -61
  3. package/dist/docs/affix/api.md +25 -23
  4. package/dist/docs/affix/examples.md +24 -38
  5. package/dist/docs/alert/accessibility.md +4 -9
  6. package/dist/docs/alert/alert.md +36 -51
  7. package/dist/docs/alert/api.md +12 -12
  8. package/dist/docs/alert/examples.md +20 -30
  9. package/dist/docs/attention/accessibility.md +50 -0
  10. package/dist/docs/attention/api.md +72 -59
  11. package/dist/docs/attention/attention.md +305 -56
  12. package/dist/docs/attention/examples.md +91 -0
  13. package/dist/docs/attention/usage.md +91 -0
  14. package/dist/docs/badge/accessibility.md +44 -0
  15. package/dist/docs/badge/api.md +12 -8
  16. package/dist/docs/badge/badge.md +178 -10
  17. package/dist/docs/badge/examples.md +69 -0
  18. package/dist/docs/badge/usage.md +53 -0
  19. package/dist/docs/button/api.md +46 -42
  20. package/dist/docs/button/button.md +46 -42
  21. package/dist/docs/card/api.md +11 -11
  22. package/dist/docs/card/card.md +11 -11
  23. package/dist/docs/combobox/api.md +62 -62
  24. package/dist/docs/combobox/combobox.md +62 -62
  25. package/dist/docs/datepicker/api.md +74 -66
  26. package/dist/docs/datepicker/datepicker.md +74 -66
  27. package/dist/docs/expandable/api.md +26 -26
  28. package/dist/docs/expandable/expandable.md +26 -26
  29. package/dist/docs/link/api.md +28 -28
  30. package/dist/docs/link/link.md +28 -28
  31. package/dist/docs/page-indicator/api.md +6 -6
  32. package/dist/docs/page-indicator/page-indicator.md +6 -6
  33. package/dist/docs/pagination/api.md +3 -3
  34. package/dist/docs/pagination/pagination.md +3 -3
  35. package/dist/docs/pill/api.md +19 -15
  36. package/dist/docs/pill/pill.md +19 -15
  37. package/dist/docs/select/api.md +44 -44
  38. package/dist/docs/select/select.md +44 -44
  39. package/dist/docs/slider/api.md +80 -78
  40. package/dist/docs/slider/slider.md +80 -78
  41. package/dist/docs/slider-thumb/api.md +28 -76
  42. package/dist/docs/slider-thumb/slider-thumb.md +28 -76
  43. package/dist/docs/switch/api.md +16 -16
  44. package/dist/docs/switch/switch.md +16 -16
  45. package/dist/docs/tab/api.md +26 -40
  46. package/dist/docs/tab/tab.md +26 -40
  47. package/dist/docs/tab-panel/api.md +1 -17
  48. package/dist/docs/tab-panel/tab-panel.md +1 -17
  49. package/dist/docs/tabs/api.md +3 -3
  50. package/dist/docs/tabs/tabs.md +3 -3
  51. package/dist/docs/textarea/accessibility.md +5 -0
  52. package/dist/docs/textarea/api.md +52 -65
  53. package/dist/docs/textarea/examples.md +81 -0
  54. package/dist/docs/textarea/textarea.md +151 -65
  55. package/dist/docs/textarea/usage.md +9 -0
  56. package/dist/docs/textfield/accessibility.md +15 -0
  57. package/dist/docs/textfield/api.md +86 -83
  58. package/dist/docs/textfield/examples.md +130 -0
  59. package/dist/docs/textfield/textfield.md +258 -86
  60. package/dist/docs/textfield/usage.md +26 -0
  61. package/dist/index.d.ts +456 -330
  62. package/dist/packages/attention/attention.d.ts +46 -37
  63. package/dist/packages/attention/attention.js +20 -20
  64. package/dist/packages/attention/attention.js.map +3 -3
  65. package/dist/packages/badge/badge.d.ts +7 -5
  66. package/dist/packages/badge/badge.js.map +2 -2
  67. package/dist/packages/datepicker/datepicker.js +1 -1
  68. package/dist/packages/datepicker/datepicker.js.map +2 -2
  69. package/dist/packages/datepicker/datepicker.react.stories.d.ts +9 -1
  70. package/dist/packages/datepicker/react.d.ts +4 -0
  71. package/dist/packages/datepicker/react.js +4 -0
  72. package/dist/packages/textarea/textarea.d.ts +38 -29
  73. package/dist/packages/textarea/textarea.js.map +2 -2
  74. package/dist/packages/textfield/textfield.d.ts +57 -60
  75. package/dist/packages/textfield/textfield.js +5 -5
  76. package/dist/packages/textfield/textfield.js.map +2 -2
  77. package/dist/packages/textfield/textfield.react.stories.d.ts +1 -1
  78. package/dist/web-types.json +573 -153
  79. package/package.json +1 -2
@@ -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
- <style-isolate>
72
- <w-textfield label="Price">
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
- ### Suffix Label
79
+ </elements-example>
84
80
 
85
- <style-isolate>
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
- ### Prefix Search Icon
91
+ </elements-example>
98
92
 
99
- <style-isolate>
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
- <style-isolate>
116
- <form>
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
- <style-isolate>
136
- <w-textfield label="Search input">
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
- ### Icons
133
+ </elements-example>
148
134
 
149
- <style-isolate>
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
- | ariaLabel | `string | null` | `null` | Accessible label for icon-button variants. |
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
- | search | `boolean` | `false` | Renders a search icon button. |
156
+ | icon | `string \| null` | `null` | Icon name rendered as prefix/suffix content. |
170
157
  | label | `string` | `''` | Text label shown as prefix/suffix content. |
171
- | icon | `string | null` | `null` | Icon name rendered as prefix/suffix content. |
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
- - Type: `string | null`
172
+
173
+ - Type: `string \| null`
181
174
  - Default: `null`
182
175
 
183
176
  #### clear
184
177
 
185
- Shows a clickable close icon meant for reset/clear actions, typically in a suffix slot.
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
- #### search
185
+ #### icon
191
186
 
192
- Shows a clickable search icon, typically in a prefix slot for search fields.
193
187
 
194
- - Type: `boolean`
195
- - Default: `false`
188
+
189
+ - Type: `string \| null`
190
+ - Default: `null`
196
191
 
197
192
  #### label
198
193
 
199
- Displays plain text such as a currency or unit label (for example `kr` or `%`) instead of an icon button.
194
+
200
195
 
201
196
  - Type: `string`
202
197
  - Default: `''`
203
198
 
204
- #### icon
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: `unknown`
216
- - Default: `-`
203
+ - Type: `boolean`
204
+ - Default: `false`
217
205
 
218
206
  ### Types
219
207
 
@@ -4,56 +4,58 @@
4
4
 
5
5
  | Name | Type | Default | Summary |
6
6
  |-|-|-|-|
7
- | ariaLabel | `string | null` | `null` | Accessible label for icon-button variants. |
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
- | search | `boolean` | `false` | Renders a search icon button. |
10
+ | icon | `string \| null` | `null` | Icon name rendered as prefix/suffix content. |
10
11
  | label | `string` | `''` | Text label shown as prefix/suffix content. |
11
- | icon | `string | null` | `null` | Icon name rendered as prefix/suffix content. |
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
- - Type: `string | null`
26
+
27
+ - Type: `string \| null`
21
28
  - Default: `null`
22
29
 
23
30
  #### clear
24
31
 
25
- Shows a clickable close icon meant for reset/clear actions, typically in a suffix slot.
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
- #### search
39
+ #### icon
31
40
 
32
- Shows a clickable search icon, typically in a prefix slot for search fields.
33
41
 
34
- - Type: `boolean`
35
- - Default: `false`
42
+
43
+ - Type: `string \| null`
44
+ - Default: `null`
36
45
 
37
46
  #### label
38
47
 
39
- Displays plain text such as a currency or unit label (for example `kr` or `%`) instead of an icon button.
48
+
40
49
 
41
50
  - Type: `string`
42
51
  - Default: `''`
43
52
 
44
- #### icon
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: `unknown`
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
- <style-isolate>
6
- <w-textfield label="Price">
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
- ### Suffix Label
13
+ </elements-example>
18
14
 
19
- <style-isolate>
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
- ### Prefix Search Icon
25
+ </elements-example>
32
26
 
33
- <style-isolate>
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
- <style-isolate>
50
- <form>
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
- <style-isolate>
70
- <w-textfield label="Search input">
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
- ### Icons
67
+ </elements-example>
82
68
 
83
- <style-isolate>
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
- <style-isolate>
14
- <w-alert variant="info" show role="">
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).
@@ -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
- <style-isolate>
67
- <w-alert variant="info" show role="">
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
- <style-isolate>
90
- <w-alert show>
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
- ### Info
92
+ </elements-example>
102
93
 
103
- <style-isolate>
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
- ### Warning
104
+ </elements-example>
116
105
 
117
- <style-isolate>
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
- ### Negative
116
+ </elements-example>
130
117
 
131
- <style-isolate>
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
- ### Positive
128
+ </elements-example>
144
129
 
145
- <style-isolate>
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
- #### variant
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
- - Type: [`AlertVariants`](#alertvariants)
187
- - Default: `'info'`
170
+
171
+ - Type: `string`
172
+ - Default: `'alert'`
188
173
 
189
174
  #### show
190
175
 
191
- Alerts are hidden by default (`false`). Set this to `true` to render and expand the content. This is reflected as an attribute, so visibility can be controlled from markup (`show`) or from JavaScript (`element.show = true`).
176
+
192
177
 
193
178
  - Type: `boolean`
194
179
  - Default: `false`
195
180
 
196
- #### role
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
- - Type: `string`
201
- - Default: `'alert'`
184
+
185
+ - Type: [`AlertVariants`](#alertvariants)
186
+ - Default: `'info'`
202
187
 
203
188
  ### Types
204
189
 
205
190
  #### AlertVariants
206
191
 
207
- `'negative' | 'positive' | 'warning' | 'info'`
192
+ `'negative' \| 'positive' \| 'warning' \| 'info'`
208
193
 
@@ -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
- #### variant
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
- - Type: [`AlertVariants`](#alertvariants)
18
- - Default: `'info'`
16
+
17
+ - Type: `string`
18
+ - Default: `'alert'`
19
19
 
20
20
  #### show
21
21
 
22
- Alerts are hidden by default (`false`). Set this to `true` to render and expand the content. This is reflected as an attribute, so visibility can be controlled from markup (`show`) or from JavaScript (`element.show = true`).
22
+
23
23
 
24
24
  - Type: `boolean`
25
25
  - Default: `false`
26
26
 
27
- #### role
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
- - Type: `string`
32
- - Default: `'alert'`
30
+
31
+ - Type: [`AlertVariants`](#alertvariants)
32
+ - Default: `'info'`
33
33
 
34
34
  ### Types
35
35
 
36
36
  #### AlertVariants
37
37
 
38
- `'negative' | 'positive' | 'warning' | 'info'`
38
+ `'negative' \| 'positive' \| 'warning' \| 'info'`
39
39