@warp-ds/elements 2.9.0-next.4 → 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 +3554 -3442
- package/dist/docs/affix/accessibility.md +7 -0
- package/dist/docs/affix/affix.md +174 -10
- package/dist/docs/affix/api.md +28 -10
- package/dist/docs/affix/examples.md +92 -0
- package/dist/docs/affix/usage.md +47 -0
- 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 +343 -319
- package/dist/packages/affix/affix.d.ts +23 -14
- package/dist/packages/affix/affix.js +24 -11
- package/dist/packages/affix/affix.js.map +4 -4
- package/dist/packages/affix/affix.stories.d.ts +3 -0
- package/dist/packages/affix/affix.stories.js +16 -0
- package/dist/packages/affix/affix.test.js +7 -0
- package/dist/packages/affix/locales/da/messages.d.mts +1 -0
- package/dist/packages/affix/locales/da/messages.mjs +1 -0
- package/dist/packages/affix/locales/en/messages.d.mts +1 -0
- package/dist/packages/affix/locales/en/messages.mjs +1 -0
- package/dist/packages/affix/locales/fi/messages.d.mts +1 -0
- package/dist/packages/affix/locales/fi/messages.mjs +1 -0
- package/dist/packages/affix/locales/nb/messages.d.mts +1 -0
- package/dist/packages/affix/locales/nb/messages.mjs +1 -0
- package/dist/packages/affix/locales/sv/messages.d.mts +1 -0
- package/dist/packages/affix/locales/sv/messages.mjs +1 -0
- package/dist/packages/badge/badge.d.ts +7 -5
- package/dist/packages/badge/badge.js.map +2 -2
- package/dist/packages/badge/badge.react.stories.d.ts +1 -1
- package/dist/packages/box/box.react.stories.d.ts +1 -1
- package/dist/packages/breadcrumbs/breadcrumbs.react.stories.d.ts +1 -1
- package/dist/packages/button/button.react.stories.d.ts +1 -1
- package/dist/packages/card/card.react.stories.d.ts +1 -1
- package/dist/packages/combobox/combobox.react.stories.d.ts +1 -1
- 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/expandable/expandable.react.stories.d.ts +1 -1
- package/dist/packages/link/link.react.stories.d.ts +1 -1
- package/dist/packages/page-indicator/page-indicator.react.stories.d.ts +1 -1
- package/dist/packages/pagination/pagination.react.stories.d.ts +1 -1
- package/dist/packages/pill/pill.react.stories.d.ts +1 -1
- package/dist/packages/select/select.react.stories.d.ts +1 -1
- package/dist/packages/textarea/textarea.react.stories.d.ts +1 -1
- 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/packages/textfield/textfield.stories.d.ts +3 -0
- package/dist/packages/textfield/textfield.stories.js +45 -0
- package/dist/web-types.json +452 -147
- package/package.json +2 -2
|
@@ -1 +1,8 @@
|
|
|
1
1
|
## Accessibility
|
|
2
|
+
|
|
3
|
+
When `search` or `clear` is enabled, `w-affix` renders a button and a matching `aria-label`. If the `aria-label` incorrect for your context, you may provide your own describing the action.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<w-affix search aria-label="Ad Search"></w-affix>
|
|
7
|
+
<w-affix clear aria-label="Clear text input"></w-affix>
|
|
8
|
+
```
|
package/dist/docs/affix/affix.md
CHANGED
|
@@ -8,50 +8,214 @@ This component is usually used in other components like form elements to show a
|
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
|
+
`w-affix` is typically used inside form controls to render prefix/suffix text or icon actions.
|
|
12
|
+
|
|
13
|
+
### In Textfield Slots
|
|
14
|
+
|
|
15
|
+
`w-affix` is usually slotted into the w-textfield form element. Use the w-textfield's `prefix` or `suffix` slots to add the affix to the component.
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<w-textfield label="Price">
|
|
19
|
+
<w-affix slot="suffix" label="kr"></w-affix>
|
|
20
|
+
</w-textfield>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Text Label
|
|
24
|
+
|
|
25
|
+
Use `label` to render static text, such as currency or unit indicators.
|
|
26
|
+
|
|
27
|
+
```html
|
|
28
|
+
<w-affix label="kr"></w-affix>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Icons
|
|
32
|
+
|
|
33
|
+
`w-affix` can also render any icon supported by `w-icon` using the attribute `icon`.
|
|
34
|
+
|
|
35
|
+
```html
|
|
36
|
+
<w-textfield label="Award">
|
|
37
|
+
<w-affix slot="prefix" icon="AwardMedal"></w-affix>
|
|
38
|
+
</w-textfield>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Search Icon
|
|
42
|
+
|
|
43
|
+
Use `search` to render a clickable search icon button. If you wrap the w-affix and surrounding w-textfield in a form, clicking the w-affix will submit the form.
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<w-affix search aria-label="Search"></w-affix>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Clear Icon
|
|
50
|
+
|
|
51
|
+
Use `clear` to render a clickable clear/reset icon button.
|
|
52
|
+
When the clear attribute is used inside a w-textfield, clicking the clear button will automatically reset the w-textfield.
|
|
53
|
+
|
|
54
|
+
```html
|
|
55
|
+
<w-affix clear aria-label="Clear input"></w-affix>
|
|
56
|
+
```
|
|
57
|
+
|
|
11
58
|
## Accessibility
|
|
12
59
|
|
|
60
|
+
When `search` or `clear` is enabled, `w-affix` renders a button and a matching `aria-label`. If the `aria-label` incorrect for your context, you may provide your own describing the action.
|
|
61
|
+
|
|
62
|
+
```html
|
|
63
|
+
<w-affix search aria-label="Ad Search"></w-affix>
|
|
64
|
+
<w-affix clear aria-label="Clear text input"></w-affix>
|
|
65
|
+
```
|
|
66
|
+
|
|
13
67
|
## Examples
|
|
14
68
|
|
|
69
|
+
### Prefix Label
|
|
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
|
+
|
|
77
|
+
```html
|
|
78
|
+
<w-textfield label="Price">
|
|
79
|
+
<w-affix slot="suffix" label="kr"></w-affix>
|
|
80
|
+
</w-textfield>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Suffix Label
|
|
84
|
+
|
|
85
|
+
<style-isolate>
|
|
86
|
+
<w-textfield label="Price">
|
|
87
|
+
<w-affix slot="suffix" label="kr"></w-affix>
|
|
88
|
+
</w-textfield>
|
|
89
|
+
</style-isolate>
|
|
90
|
+
|
|
91
|
+
```html
|
|
92
|
+
<w-textfield label="Price">
|
|
93
|
+
<w-affix slot="suffix" label="kr"></w-affix>
|
|
94
|
+
</w-textfield>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Prefix Search Icon
|
|
98
|
+
|
|
99
|
+
<style-isolate>
|
|
100
|
+
<w-textfield label="Search">
|
|
101
|
+
<w-affix slot="prefix" search></w-affix>
|
|
102
|
+
</w-textfield>
|
|
103
|
+
</style-isolate>
|
|
104
|
+
|
|
105
|
+
```html
|
|
106
|
+
<w-textfield label="Search">
|
|
107
|
+
<w-affix slot="prefix" search></w-affix>
|
|
108
|
+
</w-textfield>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Suffix Search Icon
|
|
112
|
+
|
|
113
|
+
If you wrap the textfield with affix in a form element, clicking the search button will automatically submit the form
|
|
114
|
+
|
|
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
|
+
|
|
123
|
+
```html
|
|
124
|
+
<form>
|
|
125
|
+
<w-textfield label="Search">
|
|
126
|
+
<w-affix slot="prefix" search></w-affix>
|
|
127
|
+
</w-textfield>
|
|
128
|
+
</form>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Suffix Clear Icon
|
|
132
|
+
|
|
133
|
+
Clicking the clear button will reset the textfield
|
|
134
|
+
|
|
135
|
+
<style-isolate>
|
|
136
|
+
<w-textfield label="Search input">
|
|
137
|
+
<w-affix slot="suffix" clear></w-affix>
|
|
138
|
+
</w-textfield>
|
|
139
|
+
</style-isolate>
|
|
140
|
+
|
|
141
|
+
```html
|
|
142
|
+
<w-textfield label="Search input">
|
|
143
|
+
<w-affix slot="suffix" clear></w-affix>
|
|
144
|
+
</w-textfield>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Icons
|
|
148
|
+
|
|
149
|
+
<style-isolate>
|
|
150
|
+
<w-textfield label="Award">
|
|
151
|
+
<w-affix slot="prefix" icon="AwardMedal"></w-affix>
|
|
152
|
+
</w-textfield>
|
|
153
|
+
</style-isolate>
|
|
154
|
+
|
|
155
|
+
```html
|
|
156
|
+
<w-textfield label="Award">
|
|
157
|
+
<w-affix slot="prefix" icon="AwardMedal"></w-affix>
|
|
158
|
+
</w-textfield>
|
|
159
|
+
```
|
|
160
|
+
|
|
15
161
|
## API Documentation
|
|
16
162
|
|
|
17
163
|
### Properties
|
|
18
164
|
|
|
19
165
|
| Name | Type | Default | Summary |
|
|
20
166
|
|-|-|-|-|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
167
|
+
| _icon | `unknown` | `-` | - |
|
|
168
|
+
| ariaLabel | `string \| null` | `null` | Accessible label for icon-button variants. |
|
|
169
|
+
| clear | `boolean` | `false` | Renders a clear icon button. |
|
|
170
|
+
| icon | `string \| null` | `null` | Icon name rendered as prefix/suffix content. |
|
|
171
|
+
| label | `string` | `''` | Text label shown as prefix/suffix content. |
|
|
172
|
+
| search | `boolean` | `false` | Renders a search icon button. |
|
|
25
173
|
|
|
26
174
|
### Property Details
|
|
27
175
|
|
|
28
|
-
####
|
|
176
|
+
#### _icon
|
|
29
177
|
|
|
30
178
|
|
|
31
179
|
|
|
32
|
-
- Type: `
|
|
180
|
+
- Type: `unknown`
|
|
33
181
|
- Default: `-`
|
|
34
182
|
|
|
183
|
+
#### ariaLabel
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
- Type: `string \| null`
|
|
188
|
+
- Default: `null`
|
|
189
|
+
|
|
35
190
|
#### clear
|
|
36
191
|
|
|
192
|
+
Add this property to render a clickable Warp close icon.
|
|
37
193
|
|
|
194
|
+
Set an `aria-label` that explains the action when using this.
|
|
38
195
|
|
|
39
196
|
- Type: `boolean`
|
|
40
197
|
- Default: `false`
|
|
41
198
|
|
|
42
|
-
####
|
|
199
|
+
#### icon
|
|
43
200
|
|
|
44
201
|
|
|
45
202
|
|
|
46
|
-
- Type: `
|
|
47
|
-
- Default: `
|
|
203
|
+
- Type: `string \| null`
|
|
204
|
+
- Default: `null`
|
|
48
205
|
|
|
49
206
|
#### label
|
|
50
207
|
|
|
51
208
|
|
|
52
209
|
|
|
53
210
|
- Type: `string`
|
|
54
|
-
- Default:
|
|
211
|
+
- Default: `''`
|
|
212
|
+
|
|
213
|
+
#### search
|
|
214
|
+
|
|
215
|
+
Add this property to render a clickable Warp search icon.
|
|
216
|
+
|
|
217
|
+
- Type: `boolean`
|
|
218
|
+
- Default: `false`
|
|
55
219
|
|
|
56
220
|
### Types
|
|
57
221
|
|
package/dist/docs/affix/api.md
CHANGED
|
@@ -4,40 +4,58 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Default | Summary |
|
|
6
6
|
|-|-|-|-|
|
|
7
|
-
|
|
|
8
|
-
|
|
|
9
|
-
|
|
|
10
|
-
|
|
|
7
|
+
| _icon | `unknown` | `-` | - |
|
|
8
|
+
| ariaLabel | `string \| null` | `null` | Accessible label for icon-button variants. |
|
|
9
|
+
| clear | `boolean` | `false` | Renders a clear icon button. |
|
|
10
|
+
| icon | `string \| null` | `null` | Icon name rendered as prefix/suffix content. |
|
|
11
|
+
| label | `string` | `''` | Text label shown as prefix/suffix content. |
|
|
12
|
+
| search | `boolean` | `false` | Renders a search icon button. |
|
|
11
13
|
|
|
12
14
|
### Property Details
|
|
13
15
|
|
|
14
|
-
####
|
|
16
|
+
#### _icon
|
|
15
17
|
|
|
16
18
|
|
|
17
19
|
|
|
18
|
-
- Type: `
|
|
20
|
+
- Type: `unknown`
|
|
19
21
|
- Default: `-`
|
|
20
22
|
|
|
23
|
+
#### ariaLabel
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
- Type: `string \| null`
|
|
28
|
+
- Default: `null`
|
|
29
|
+
|
|
21
30
|
#### clear
|
|
22
31
|
|
|
32
|
+
Add this property to render a clickable Warp close icon.
|
|
23
33
|
|
|
34
|
+
Set an `aria-label` that explains the action when using this.
|
|
24
35
|
|
|
25
36
|
- Type: `boolean`
|
|
26
37
|
- Default: `false`
|
|
27
38
|
|
|
28
|
-
####
|
|
39
|
+
#### icon
|
|
29
40
|
|
|
30
41
|
|
|
31
42
|
|
|
32
|
-
- Type: `
|
|
33
|
-
- Default: `
|
|
43
|
+
- Type: `string \| null`
|
|
44
|
+
- Default: `null`
|
|
34
45
|
|
|
35
46
|
#### label
|
|
36
47
|
|
|
37
48
|
|
|
38
49
|
|
|
39
50
|
- Type: `string`
|
|
40
|
-
- Default:
|
|
51
|
+
- Default: `''`
|
|
52
|
+
|
|
53
|
+
#### search
|
|
54
|
+
|
|
55
|
+
Add this property to render a clickable Warp search icon.
|
|
56
|
+
|
|
57
|
+
- Type: `boolean`
|
|
58
|
+
- Default: `false`
|
|
41
59
|
|
|
42
60
|
### Types
|
|
43
61
|
|
|
@@ -1 +1,93 @@
|
|
|
1
1
|
## Examples
|
|
2
|
+
|
|
3
|
+
### Prefix Label
|
|
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
|
+
|
|
11
|
+
```html
|
|
12
|
+
<w-textfield label="Price">
|
|
13
|
+
<w-affix slot="suffix" label="kr"></w-affix>
|
|
14
|
+
</w-textfield>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Suffix Label
|
|
18
|
+
|
|
19
|
+
<style-isolate>
|
|
20
|
+
<w-textfield label="Price">
|
|
21
|
+
<w-affix slot="suffix" label="kr"></w-affix>
|
|
22
|
+
</w-textfield>
|
|
23
|
+
</style-isolate>
|
|
24
|
+
|
|
25
|
+
```html
|
|
26
|
+
<w-textfield label="Price">
|
|
27
|
+
<w-affix slot="suffix" label="kr"></w-affix>
|
|
28
|
+
</w-textfield>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Prefix Search Icon
|
|
32
|
+
|
|
33
|
+
<style-isolate>
|
|
34
|
+
<w-textfield label="Search">
|
|
35
|
+
<w-affix slot="prefix" search></w-affix>
|
|
36
|
+
</w-textfield>
|
|
37
|
+
</style-isolate>
|
|
38
|
+
|
|
39
|
+
```html
|
|
40
|
+
<w-textfield label="Search">
|
|
41
|
+
<w-affix slot="prefix" search></w-affix>
|
|
42
|
+
</w-textfield>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Suffix Search Icon
|
|
46
|
+
|
|
47
|
+
If you wrap the textfield with affix in a form element, clicking the search button will automatically submit the form
|
|
48
|
+
|
|
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
|
+
|
|
57
|
+
```html
|
|
58
|
+
<form>
|
|
59
|
+
<w-textfield label="Search">
|
|
60
|
+
<w-affix slot="prefix" search></w-affix>
|
|
61
|
+
</w-textfield>
|
|
62
|
+
</form>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Suffix Clear Icon
|
|
66
|
+
|
|
67
|
+
Clicking the clear button will reset the textfield
|
|
68
|
+
|
|
69
|
+
<style-isolate>
|
|
70
|
+
<w-textfield label="Search input">
|
|
71
|
+
<w-affix slot="suffix" clear></w-affix>
|
|
72
|
+
</w-textfield>
|
|
73
|
+
</style-isolate>
|
|
74
|
+
|
|
75
|
+
```html
|
|
76
|
+
<w-textfield label="Search input">
|
|
77
|
+
<w-affix slot="suffix" clear></w-affix>
|
|
78
|
+
</w-textfield>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Icons
|
|
82
|
+
|
|
83
|
+
<style-isolate>
|
|
84
|
+
<w-textfield label="Award">
|
|
85
|
+
<w-affix slot="prefix" icon="AwardMedal"></w-affix>
|
|
86
|
+
</w-textfield>
|
|
87
|
+
</style-isolate>
|
|
88
|
+
|
|
89
|
+
```html
|
|
90
|
+
<w-textfield label="Award">
|
|
91
|
+
<w-affix slot="prefix" icon="AwardMedal"></w-affix>
|
|
92
|
+
</w-textfield>
|
|
93
|
+
```
|
package/dist/docs/affix/usage.md
CHANGED
|
@@ -1 +1,48 @@
|
|
|
1
1
|
## Usage
|
|
2
|
+
|
|
3
|
+
`w-affix` is typically used inside form controls to render prefix/suffix text or icon actions.
|
|
4
|
+
|
|
5
|
+
### In Textfield Slots
|
|
6
|
+
|
|
7
|
+
`w-affix` is usually slotted into the w-textfield form element. Use the w-textfield's `prefix` or `suffix` slots to add the affix to the component.
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<w-textfield label="Price">
|
|
11
|
+
<w-affix slot="suffix" label="kr"></w-affix>
|
|
12
|
+
</w-textfield>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Text Label
|
|
16
|
+
|
|
17
|
+
Use `label` to render static text, such as currency or unit indicators.
|
|
18
|
+
|
|
19
|
+
```html
|
|
20
|
+
<w-affix label="kr"></w-affix>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Icons
|
|
24
|
+
|
|
25
|
+
`w-affix` can also render any icon supported by `w-icon` using the attribute `icon`.
|
|
26
|
+
|
|
27
|
+
```html
|
|
28
|
+
<w-textfield label="Award">
|
|
29
|
+
<w-affix slot="prefix" icon="AwardMedal"></w-affix>
|
|
30
|
+
</w-textfield>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Search Icon
|
|
34
|
+
|
|
35
|
+
Use `search` to render a clickable search icon button. If you wrap the w-affix and surrounding w-textfield in a form, clicking the w-affix will submit the form.
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<w-affix search aria-label="Search"></w-affix>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Clear Icon
|
|
42
|
+
|
|
43
|
+
Use `clear` to render a clickable clear/reset icon button.
|
|
44
|
+
When the clear attribute is used inside a w-textfield, clicking the clear button will automatically reset the w-textfield.
|
|
45
|
+
|
|
46
|
+
```html
|
|
47
|
+
<w-affix clear aria-label="Clear input"></w-affix>
|
|
48
|
+
```
|
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
|
|