@warp-ds/elements 2.9.0-next.3 → 2.9.0-next.5
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 +3466 -3502
- package/dist/docs/affix/accessibility.md +8 -0
- package/dist/docs/affix/affix.md +178 -14
- package/dist/docs/affix/api.md +26 -14
- package/dist/docs/affix/examples.md +93 -0
- package/dist/docs/affix/usage.md +48 -0
- package/dist/docs/attention/accessibility.md +1 -0
- package/dist/docs/attention/attention.md +6 -0
- package/dist/docs/attention/examples.md +1 -0
- package/dist/docs/attention/usage.md +1 -0
- package/dist/docs/badge/accessibility.md +1 -0
- package/dist/docs/badge/badge.md +6 -0
- package/dist/docs/badge/examples.md +1 -0
- package/dist/docs/badge/usage.md +1 -0
- package/dist/docs/box/accessibility.md +1 -0
- package/dist/docs/box/box.md +6 -0
- package/dist/docs/box/examples.md +1 -0
- package/dist/docs/box/usage.md +1 -0
- package/dist/docs/breadcrumbs/accessibility.md +1 -0
- package/dist/docs/breadcrumbs/breadcrumbs.md +6 -0
- package/dist/docs/breadcrumbs/examples.md +1 -0
- package/dist/docs/breadcrumbs/usage.md +1 -0
- package/dist/docs/button/accessibility.md +1 -0
- package/dist/docs/button/button.md +6 -0
- package/dist/docs/button/examples.md +1 -0
- package/dist/docs/button/usage.md +1 -0
- package/dist/docs/card/accessibility.md +1 -0
- package/dist/docs/card/card.md +6 -0
- package/dist/docs/card/examples.md +1 -0
- package/dist/docs/card/usage.md +1 -0
- package/dist/docs/combobox/accessibility.md +1 -0
- package/dist/docs/combobox/api.md +15 -15
- package/dist/docs/combobox/combobox.md +21 -15
- package/dist/docs/combobox/examples.md +1 -0
- package/dist/docs/combobox/usage.md +1 -0
- package/dist/docs/datepicker/accessibility.md +1 -0
- package/dist/docs/datepicker/api.md +1 -9
- package/dist/docs/datepicker/datepicker.md +7 -9
- package/dist/docs/datepicker/examples.md +1 -0
- package/dist/docs/datepicker/usage.md +1 -0
- package/dist/docs/expandable/accessibility.md +1 -0
- package/dist/docs/expandable/examples.md +1 -0
- package/dist/docs/expandable/expandable.md +6 -0
- package/dist/docs/expandable/usage.md +1 -0
- package/dist/docs/link/accessibility.md +1 -0
- package/dist/docs/link/examples.md +1 -0
- package/dist/docs/link/link.md +6 -0
- package/dist/docs/link/usage.md +1 -0
- package/dist/docs/page-indicator/accessibility.md +1 -0
- package/dist/docs/page-indicator/api.md +2 -2
- package/dist/docs/page-indicator/examples.md +1 -0
- package/dist/docs/page-indicator/page-indicator.md +8 -2
- package/dist/docs/page-indicator/usage.md +1 -0
- package/dist/docs/pagination/accessibility.md +1 -0
- package/dist/docs/pagination/examples.md +1 -0
- package/dist/docs/pagination/pagination.md +6 -0
- package/dist/docs/pagination/usage.md +1 -0
- package/dist/docs/pill/accessibility.md +1 -0
- package/dist/docs/pill/examples.md +1 -0
- package/dist/docs/pill/pill.md +6 -0
- package/dist/docs/pill/usage.md +1 -0
- package/dist/docs/select/accessibility.md +1 -0
- package/dist/docs/select/api.md +19 -11
- package/dist/docs/select/examples.md +1 -0
- package/dist/docs/select/select.md +25 -11
- package/dist/docs/select/usage.md +1 -0
- package/dist/docs/slider/accessibility.md +1 -0
- package/dist/docs/slider/api.md +15 -9
- package/dist/docs/slider/examples.md +1 -0
- package/dist/docs/slider/slider.md +21 -9
- package/dist/docs/slider/usage.md +1 -0
- package/dist/docs/slider-thumb/accessibility.md +1 -0
- package/dist/docs/slider-thumb/api.md +48 -0
- package/dist/docs/slider-thumb/examples.md +1 -0
- package/dist/docs/slider-thumb/slider-thumb.md +54 -0
- package/dist/docs/slider-thumb/usage.md +1 -0
- package/dist/docs/step/accessibility.md +1 -0
- package/dist/docs/step/examples.md +1 -0
- package/dist/docs/step/step.md +6 -0
- package/dist/docs/step/usage.md +1 -0
- package/dist/docs/step-indicator/accessibility.md +1 -0
- package/dist/docs/step-indicator/examples.md +1 -0
- package/dist/docs/step-indicator/step-indicator.md +6 -0
- package/dist/docs/step-indicator/usage.md +1 -0
- package/dist/docs/switch/accessibility.md +1 -0
- package/dist/docs/switch/examples.md +1 -0
- package/dist/docs/switch/switch.md +6 -0
- package/dist/docs/switch/usage.md +1 -0
- package/dist/docs/tab/accessibility.md +1 -0
- package/dist/docs/tab/api.md +16 -0
- package/dist/docs/tab/examples.md +1 -0
- package/dist/docs/tab/tab.md +22 -0
- package/dist/docs/tab/usage.md +1 -0
- package/dist/docs/tab-panel/accessibility.md +1 -0
- package/dist/docs/tab-panel/api.md +16 -0
- package/dist/docs/tab-panel/examples.md +1 -0
- package/dist/docs/tab-panel/tab-panel.md +22 -0
- package/dist/docs/tab-panel/usage.md +1 -0
- package/dist/docs/tabs/accessibility.md +1 -0
- package/dist/docs/tabs/examples.md +1 -0
- package/dist/docs/tabs/tabs.md +6 -0
- package/dist/docs/tabs/usage.md +1 -0
- package/dist/docs/textarea/accessibility.md +1 -0
- package/dist/docs/textarea/examples.md +1 -0
- package/dist/docs/textarea/textarea.md +6 -0
- package/dist/docs/textarea/usage.md +1 -0
- package/dist/docs/textfield/accessibility.md +1 -0
- package/dist/docs/textfield/api.md +16 -6
- package/dist/docs/textfield/examples.md +1 -0
- package/dist/docs/textfield/textfield.md +22 -6
- package/dist/docs/textfield/usage.md +1 -0
- package/dist/docs/toast/accessibility.md +9 -0
- package/dist/docs/toast/api.md +71 -0
- package/dist/docs/toast/examples.md +29 -0
- package/dist/docs/toast/toast.md +150 -0
- package/dist/docs/toast/usage.md +31 -0
- package/dist/index.d.ts +312 -305
- package/dist/packages/affix/affix.d.ts +29 -6
- 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/attention/attention.d.ts +52 -0
- package/dist/packages/attention/attention.js.map +2 -2
- package/dist/packages/badge/badge.d.ts +8 -0
- 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.d.ts +20 -0
- package/dist/packages/box/box.js.map +2 -2
- 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.d.ts +60 -2
- package/dist/packages/button/button.js.map +2 -2
- package/dist/packages/button/button.react.stories.d.ts +1 -1
- package/dist/packages/card/card.d.ts +12 -0
- package/dist/packages/card/card.js.map +2 -2
- package/dist/packages/card/card.react.stories.d.ts +1 -1
- package/dist/packages/combobox/combobox.d.ts +60 -15
- package/dist/packages/combobox/combobox.js.map +2 -2
- package/dist/packages/combobox/combobox.react.stories.d.ts +1 -1
- package/dist/packages/datepicker/datepicker.d.ts +32 -5
- package/dist/packages/datepicker/datepicker.js.map +2 -2
- package/dist/packages/datepicker/datepicker.react.stories.d.ts +1 -1
- package/dist/packages/expandable/expandable.d.ts +44 -0
- package/dist/packages/expandable/expandable.js.map +2 -2
- package/dist/packages/expandable/expandable.react.stories.d.ts +1 -1
- package/dist/packages/link/link.d.ts +32 -0
- package/dist/packages/link/link.js.map +2 -2
- package/dist/packages/link/link.react.stories.d.ts +1 -1
- package/dist/packages/page-indicator/page-indicator.d.ts +8 -2
- package/dist/packages/page-indicator/page-indicator.js.map +2 -2
- package/dist/packages/page-indicator/page-indicator.react.stories.d.ts +1 -1
- package/dist/packages/pagination/pagination.d.ts +16 -0
- package/dist/packages/pagination/pagination.js.map +2 -2
- package/dist/packages/pagination/pagination.react.stories.d.ts +1 -1
- package/dist/packages/pill/pill.d.ts +24 -2
- package/dist/packages/pill/pill.js.map +2 -2
- package/dist/packages/pill/pill.react.stories.d.ts +1 -1
- package/dist/packages/select/select.d.ts +56 -12
- package/dist/packages/select/select.js.map +2 -2
- package/dist/packages/select/select.react.stories.d.ts +1 -1
- package/dist/packages/slider/slider.d.ts +65 -8
- package/dist/packages/slider/slider.js +7 -7
- package/dist/packages/slider/slider.js.map +3 -3
- package/dist/packages/slider/slider.test.js +68 -0
- package/dist/packages/slider-thumb/slider-thumb.d.ts +44 -6
- package/dist/packages/slider-thumb/slider-thumb.js +24 -23
- package/dist/packages/slider-thumb/slider-thumb.js.map +3 -3
- package/dist/packages/step/step.d.ts +8 -0
- package/dist/packages/step/step.js.map +2 -2
- package/dist/packages/step-indicator/step-indicator.d.ts +8 -0
- package/dist/packages/step-indicator/step-indicator.js.map +2 -2
- package/dist/packages/switch/switch.d.ts +16 -0
- package/dist/packages/switch/switch.js.map +2 -2
- package/dist/packages/tab/tab.d.ts +28 -3
- package/dist/packages/tab/tab.js.map +2 -2
- package/dist/packages/tab-panel/tab-panel.d.ts +8 -2
- package/dist/packages/tab-panel/tab-panel.js.map +2 -2
- package/dist/packages/tabs/tabs.d.ts +4 -0
- package/dist/packages/tabs/tabs.js.map +2 -2
- package/dist/packages/textarea/textarea.d.ts +52 -1
- package/dist/packages/textarea/textarea.js.map +2 -2
- package/dist/packages/textarea/textarea.react.stories.d.ts +1 -1
- package/dist/packages/textfield/textfield.d.ts +92 -4
- 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/packages/toast-container/toast-container.d.ts +14 -0
- package/dist/packages/toast-container/toast-container.js.map +2 -2
- package/dist/web-types.json +154 -286
- package/package.json +3 -3
- package/dist/docs/toast-container/api.md +0 -14
- package/dist/docs/toast-container/toast-container.md +0 -20
|
@@ -0,0 +1,8 @@
|
|
|
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
|
@@ -6,49 +6,213 @@ This component is usually used in other components like form elements to show a
|
|
|
6
6
|
|
|
7
7
|
[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-affix--docs)
|
|
8
8
|
|
|
9
|
+
## Usage
|
|
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
|
+
|
|
58
|
+
## Accessibility
|
|
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
|
+
|
|
67
|
+
## Examples
|
|
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
|
+
|
|
9
161
|
## API Documentation
|
|
10
162
|
|
|
11
163
|
### Properties
|
|
12
164
|
|
|
13
165
|
| Name | Type | Default | Summary |
|
|
14
166
|
|-|-|-|-|
|
|
15
|
-
| ariaLabel | `string` |
|
|
16
|
-
| clear | `boolean` | `false` |
|
|
17
|
-
| search | `boolean` | `false` |
|
|
18
|
-
| label | `string` |
|
|
167
|
+
| ariaLabel | `string | null` | `null` | Accessible label for icon-button variants. |
|
|
168
|
+
| clear | `boolean` | `false` | Renders a clear icon button. |
|
|
169
|
+
| search | `boolean` | `false` | Renders a search icon button. |
|
|
170
|
+
| label | `string` | `''` | Text label shown as prefix/suffix content. |
|
|
171
|
+
| icon | `string | null` | `null` | Icon name rendered as prefix/suffix content. |
|
|
172
|
+
| _icon | `unknown` | `-` | - |
|
|
19
173
|
|
|
20
174
|
### Property Details
|
|
21
175
|
|
|
22
176
|
#### ariaLabel
|
|
23
177
|
|
|
178
|
+
Used to override the default `aria-label`s for the internal button when `search` or `clear` is enabled.
|
|
24
179
|
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
- Default: `-`
|
|
180
|
+
- Type: `string | null`
|
|
181
|
+
- Default: `null`
|
|
28
182
|
|
|
29
183
|
#### clear
|
|
30
184
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
Set an `aria-label` that explains the action when using this.
|
|
185
|
+
Shows a clickable close icon meant for reset/clear actions, typically in a suffix slot.
|
|
34
186
|
|
|
35
187
|
- Type: `boolean`
|
|
36
188
|
- Default: `false`
|
|
37
189
|
|
|
38
190
|
#### search
|
|
39
191
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
Set an `aria-label` that explains the action when using this.
|
|
192
|
+
Shows a clickable search icon, typically in a prefix slot for search fields.
|
|
43
193
|
|
|
44
194
|
- Type: `boolean`
|
|
45
195
|
- Default: `false`
|
|
46
196
|
|
|
47
197
|
#### label
|
|
48
198
|
|
|
49
|
-
|
|
199
|
+
Displays plain text such as a currency or unit label (for example `kr` or `%`) instead of an icon button.
|
|
50
200
|
|
|
51
201
|
- Type: `string`
|
|
202
|
+
- Default: `''`
|
|
203
|
+
|
|
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
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
- Type: `unknown`
|
|
52
216
|
- Default: `-`
|
|
53
217
|
|
|
54
218
|
### Types
|
package/dist/docs/affix/api.md
CHANGED
|
@@ -4,43 +4,55 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Default | Summary |
|
|
6
6
|
|-|-|-|-|
|
|
7
|
-
| ariaLabel | `string` |
|
|
8
|
-
| clear | `boolean` | `false` |
|
|
9
|
-
| search | `boolean` | `false` |
|
|
10
|
-
| label | `string` |
|
|
7
|
+
| ariaLabel | `string | null` | `null` | Accessible label for icon-button variants. |
|
|
8
|
+
| clear | `boolean` | `false` | Renders a clear icon button. |
|
|
9
|
+
| search | `boolean` | `false` | Renders a search icon button. |
|
|
10
|
+
| label | `string` | `''` | Text label shown as prefix/suffix content. |
|
|
11
|
+
| icon | `string | null` | `null` | Icon name rendered as prefix/suffix content. |
|
|
12
|
+
| _icon | `unknown` | `-` | - |
|
|
11
13
|
|
|
12
14
|
### Property Details
|
|
13
15
|
|
|
14
16
|
#### ariaLabel
|
|
15
17
|
|
|
18
|
+
Used to override the default `aria-label`s for the internal button when `search` or `clear` is enabled.
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
- Default: `-`
|
|
20
|
+
- Type: `string | null`
|
|
21
|
+
- Default: `null`
|
|
20
22
|
|
|
21
23
|
#### clear
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
Set an `aria-label` that explains the action when using this.
|
|
25
|
+
Shows a clickable close icon meant for reset/clear actions, typically in a suffix slot.
|
|
26
26
|
|
|
27
27
|
- Type: `boolean`
|
|
28
28
|
- Default: `false`
|
|
29
29
|
|
|
30
30
|
#### search
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
Set an `aria-label` that explains the action when using this.
|
|
32
|
+
Shows a clickable search icon, typically in a prefix slot for search fields.
|
|
35
33
|
|
|
36
34
|
- Type: `boolean`
|
|
37
35
|
- Default: `false`
|
|
38
36
|
|
|
39
37
|
#### label
|
|
40
38
|
|
|
41
|
-
|
|
39
|
+
Displays plain text such as a currency or unit label (for example `kr` or `%`) instead of an icon button.
|
|
42
40
|
|
|
43
41
|
- Type: `string`
|
|
42
|
+
- Default: `''`
|
|
43
|
+
|
|
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
|
+
|
|
54
|
+
|
|
55
|
+
- Type: `unknown`
|
|
44
56
|
- Default: `-`
|
|
45
57
|
|
|
46
58
|
### Types
|
|
@@ -0,0 +1,93 @@
|
|
|
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
|
+
```
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Accessibility
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Examples
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Usage
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Accessibility
|
package/dist/docs/badge/badge.md
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Examples
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Usage
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Accessibility
|
package/dist/docs/box/box.md
CHANGED
|
@@ -6,6 +6,12 @@ Box is a layout component used for separating content areas on a page.
|
|
|
6
6
|
|
|
7
7
|
[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/layout-box--docs)
|
|
8
8
|
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
## Accessibility
|
|
12
|
+
|
|
13
|
+
## Examples
|
|
14
|
+
|
|
9
15
|
## API Documentation
|
|
10
16
|
|
|
11
17
|
### Properties
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Examples
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Usage
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Accessibility
|
|
@@ -6,6 +6,12 @@ Breadcrumbs show the navigation structure for the current location.
|
|
|
6
6
|
|
|
7
7
|
[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/navigation-breadcrumbs--docs)
|
|
8
8
|
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
## Accessibility
|
|
12
|
+
|
|
13
|
+
## Examples
|
|
14
|
+
|
|
9
15
|
## API Documentation
|
|
10
16
|
|
|
11
17
|
### Properties
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Examples
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Usage
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Accessibility
|
|
@@ -6,6 +6,12 @@ Buttons are used to perform actions, widh different visuals for different needs.
|
|
|
6
6
|
|
|
7
7
|
[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/buttons-button--docs)
|
|
8
8
|
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
## Accessibility
|
|
12
|
+
|
|
13
|
+
## Examples
|
|
14
|
+
|
|
9
15
|
## API Documentation
|
|
10
16
|
|
|
11
17
|
### Properties
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Examples
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Usage
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Accessibility
|
package/dist/docs/card/card.md
CHANGED
|
@@ -6,6 +6,12 @@ Card is a layout component used for separating content areas on a page.
|
|
|
6
6
|
|
|
7
7
|
[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/navigation-card--docs)
|
|
8
8
|
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
## Accessibility
|
|
12
|
+
|
|
13
|
+
## Examples
|
|
14
|
+
|
|
9
15
|
## API Documentation
|
|
10
16
|
|
|
11
17
|
### Properties
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Examples
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Usage
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Accessibility
|