@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
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@warp-ds/elements",
|
|
4
|
-
"version": "2.9.0-next.
|
|
4
|
+
"version": "2.9.0-next.5",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -49,12 +49,232 @@
|
|
|
49
49
|
"events": []
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
|
+
{
|
|
53
|
+
"name": "w-textfield",
|
|
54
|
+
"description": "A single-line input component used for entering and editing textual or numeric data.\n---\n\n\n### **Slots:**\n - **suffix** - Use with `<w-affix>` to include a suffix, for example the unit for a number (e. g. km or sek).\n- **prefix** - Use with `<w-affix>` to include a prefix, for example a search icon.",
|
|
55
|
+
"doc-url": "",
|
|
56
|
+
"attributes": [
|
|
57
|
+
{
|
|
58
|
+
"name": "disabled",
|
|
59
|
+
"description": "Keep in mind that using disabled in its current form is an anti-pattern.\n\nThere will always be users who don't understand why an element is disabled, or users who can't even see that it is disabled because of poor lighting conditions or other reasons.\n\nPlease consider more informative alternatives before choosing to use disabled on an element.",
|
|
60
|
+
"value": { "type": "boolean", "default": "false" }
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "invalid",
|
|
64
|
+
"description": "Mark the form field as invalid. Make sure to also set a `help-text` to help users fix the validation problem.",
|
|
65
|
+
"value": { "type": "boolean", "default": "false" }
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "label",
|
|
69
|
+
"description": "Either a `label` or an `aria-label` must be provided.",
|
|
70
|
+
"value": { "type": "string" }
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "help-text",
|
|
74
|
+
"description": "Use in combination with `invalid` to show as a validation error message,\nor on its own to show a help text.",
|
|
75
|
+
"value": { "type": "string" }
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "size",
|
|
79
|
+
"description": "Sets the [size](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#size) (width) of the input field to fit the expected length of inputs.",
|
|
80
|
+
"value": { "type": "string" }
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "max",
|
|
84
|
+
"description": "Use with `type=\"number\"` to set the [maximum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength).",
|
|
85
|
+
"value": { "type": "number" }
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "min",
|
|
89
|
+
"description": "Use with `type=\"number\"` to set the [minimum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#minlength).",
|
|
90
|
+
"value": { "type": "number" }
|
|
91
|
+
},
|
|
92
|
+
{ "name": "min-length", "value": { "type": "number" } },
|
|
93
|
+
{
|
|
94
|
+
"name": "minlength",
|
|
95
|
+
"description": "For `text`, `search`, `url`, `tel`, `email` and `password` fields, sets the [minimum string length](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#minlength) required.",
|
|
96
|
+
"value": { "type": "number" }
|
|
97
|
+
},
|
|
98
|
+
{ "name": "max-length", "value": { "type": "number" } },
|
|
99
|
+
{
|
|
100
|
+
"name": "maxlength",
|
|
101
|
+
"description": "For `text`, `search`, `url`, `tel`, `email` and `password` fields, sets the [maximum string length](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength) allowed.",
|
|
102
|
+
"value": { "type": "number" }
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "pattern",
|
|
106
|
+
"description": "Sets a [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions) that the input's value must [match to pass validation](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#pattern)",
|
|
107
|
+
"value": { "type": "string" }
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "placeholder",
|
|
111
|
+
"description": "Set a text that is shown in the textfield when it doesn't have a value.\n\nPlaceholder text should not be used as a substitute for labeling the element with a visible label.",
|
|
112
|
+
"value": { "type": "string" }
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "read-only",
|
|
116
|
+
"value": { "type": "boolean", "default": "false" }
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "readonly",
|
|
120
|
+
"description": "Whether the input can be selected but not changed by the user.",
|
|
121
|
+
"value": { "type": "boolean", "default": "false" }
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "required",
|
|
125
|
+
"description": "Whether user input is required on the input before form submission.",
|
|
126
|
+
"value": { "type": "boolean", "default": "false" }
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"name": "type",
|
|
130
|
+
"description": "The [type of input](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#input_types).",
|
|
131
|
+
"value": { "type": "string" }
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "value",
|
|
135
|
+
"description": "Lets you set the current value.",
|
|
136
|
+
"value": { "type": "string" }
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "name",
|
|
140
|
+
"description": "The [name](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name) of the input field when submitting the form.",
|
|
141
|
+
"value": { "type": "string" }
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "step",
|
|
145
|
+
"description": "When used with `number` this attribute forces inputs to be a whole number of `step`.\n\nFor example with a `step=\"5\"` only values that divide evenly on 5 are allowed.\nUsing arrow up and down in the input field increments and decrements by 5.",
|
|
146
|
+
"value": { "type": "number" }
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "autocomplete",
|
|
150
|
+
"description": "A space-separated string that hints to browsers [what type of content it can suggest](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/autocomplete#value) to autofill.",
|
|
151
|
+
"value": { "type": "string | undefined" }
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"slots": [
|
|
155
|
+
{
|
|
156
|
+
"name": "suffix",
|
|
157
|
+
"description": "Use with `<w-affix>` to include a suffix, for example the unit for a number (e. g. km or sek)."
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "prefix",
|
|
161
|
+
"description": "Use with `<w-affix>` to include a prefix, for example a search icon."
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
"events": [],
|
|
165
|
+
"js": {
|
|
166
|
+
"properties": [
|
|
167
|
+
{
|
|
168
|
+
"name": "disabled",
|
|
169
|
+
"description": "Keep in mind that using disabled in its current form is an anti-pattern.\n\nThere will always be users who don't understand why an element is disabled, or users who can't even see that it is disabled because of poor lighting conditions or other reasons.\n\nPlease consider more informative alternatives before choosing to use disabled on an element.",
|
|
170
|
+
"type": "boolean"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"name": "invalid",
|
|
174
|
+
"description": "Mark the form field as invalid. Make sure to also set a `help-text` to help users fix the validation problem.",
|
|
175
|
+
"type": "boolean"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"name": "label",
|
|
179
|
+
"description": "Either a `label` or an `aria-label` must be provided.",
|
|
180
|
+
"type": "string"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"name": "helpText",
|
|
184
|
+
"description": "Use in combination with `invalid` to show as a validation error message,\nor on its own to show a help text.",
|
|
185
|
+
"type": "string"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "size",
|
|
189
|
+
"description": "Sets the [size](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#size) (width) of the input field to fit the expected length of inputs.",
|
|
190
|
+
"type": "string"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"name": "max",
|
|
194
|
+
"description": "Use with `type=\"number\"` to set the [maximum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength).",
|
|
195
|
+
"type": "number"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "min",
|
|
199
|
+
"description": "Use with `type=\"number\"` to set the [minimum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#minlength).",
|
|
200
|
+
"type": "number"
|
|
201
|
+
},
|
|
202
|
+
{ "name": "minLength", "type": "number" },
|
|
203
|
+
{
|
|
204
|
+
"name": "minlength",
|
|
205
|
+
"description": "For `text`, `search`, `url`, `tel`, `email` and `password` fields, sets the [minimum string length](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#minlength) required.",
|
|
206
|
+
"type": "number"
|
|
207
|
+
},
|
|
208
|
+
{ "name": "maxLength", "type": "number" },
|
|
209
|
+
{
|
|
210
|
+
"name": "maxlength",
|
|
211
|
+
"description": "For `text`, `search`, `url`, `tel`, `email` and `password` fields, sets the [maximum string length](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength) allowed.",
|
|
212
|
+
"type": "number"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"name": "pattern",
|
|
216
|
+
"description": "Sets a [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions) that the input's value must [match to pass validation](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#pattern)",
|
|
217
|
+
"type": "string"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"name": "placeholder",
|
|
221
|
+
"description": "Set a text that is shown in the textfield when it doesn't have a value.\n\nPlaceholder text should not be used as a substitute for labeling the element with a visible label.",
|
|
222
|
+
"type": "string"
|
|
223
|
+
},
|
|
224
|
+
{ "name": "readOnly", "type": "boolean" },
|
|
225
|
+
{
|
|
226
|
+
"name": "readonly",
|
|
227
|
+
"description": "Whether the input can be selected but not changed by the user.",
|
|
228
|
+
"type": "boolean"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"name": "required",
|
|
232
|
+
"description": "Whether user input is required on the input before form submission.",
|
|
233
|
+
"type": "boolean"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"name": "type",
|
|
237
|
+
"description": "The [type of input](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#input_types).",
|
|
238
|
+
"type": "string"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"name": "value",
|
|
242
|
+
"description": "Lets you set the current value.",
|
|
243
|
+
"type": "string"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"name": "name",
|
|
247
|
+
"description": "The [name](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name) of the input field when submitting the form.",
|
|
248
|
+
"type": "string"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"name": "step",
|
|
252
|
+
"description": "When used with `number` this attribute forces inputs to be a whole number of `step`.\n\nFor example with a `step=\"5\"` only values that divide evenly on 5 are allowed.\nUsing arrow up and down in the input field increments and decrements by 5.",
|
|
253
|
+
"type": "number"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"name": "autocomplete",
|
|
257
|
+
"description": "A space-separated string that hints to browsers [what type of content it can suggest](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/autocomplete#value) to autofill.",
|
|
258
|
+
"type": "string | undefined"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"name": "formatter",
|
|
262
|
+
"description": "Function to format value when the input field.\n\nOnly active when the input field does not have focus,\nsimilar to the accessible input [masking example from Filament Group](https://filamentgroup.github.io/politespace/demo/demo.html).",
|
|
263
|
+
"type": "(value: string) => string"
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
"events": []
|
|
267
|
+
}
|
|
268
|
+
},
|
|
52
269
|
{
|
|
53
270
|
"name": "w-affix",
|
|
54
271
|
"description": "This component is usually used in other components like form elements to show a prefix or suffix. See for example `w-textfield`.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-affix--docs)\n---\n",
|
|
55
272
|
"doc-url": "",
|
|
56
273
|
"attributes": [
|
|
57
|
-
{
|
|
274
|
+
{
|
|
275
|
+
"name": "aria-label",
|
|
276
|
+
"value": { "type": "string | null", "default": "null" }
|
|
277
|
+
},
|
|
58
278
|
{
|
|
59
279
|
"name": "clear",
|
|
60
280
|
"description": "Add this property to render a clickable Warp close icon.\n\nSet an `aria-label` that explains the action when using this.",
|
|
@@ -62,18 +282,32 @@
|
|
|
62
282
|
},
|
|
63
283
|
{
|
|
64
284
|
"name": "search",
|
|
65
|
-
"description": "Add this property to render a clickable Warp search icon
|
|
285
|
+
"description": "Add this property to render a clickable Warp search icon.",
|
|
66
286
|
"value": { "type": "boolean", "default": "false" }
|
|
67
287
|
},
|
|
68
|
-
{ "name": "label", "value": { "type": "string" } }
|
|
288
|
+
{ "name": "label", "value": { "type": "string", "default": "''" } },
|
|
289
|
+
{
|
|
290
|
+
"name": "icon",
|
|
291
|
+
"value": { "type": "string | null", "default": "null" }
|
|
292
|
+
}
|
|
69
293
|
],
|
|
70
294
|
"events": [],
|
|
71
295
|
"js": {
|
|
72
296
|
"properties": [
|
|
73
|
-
{ "name": "ariaLabel", "type": "string" },
|
|
74
|
-
{
|
|
75
|
-
|
|
76
|
-
|
|
297
|
+
{ "name": "ariaLabel", "type": "string | null" },
|
|
298
|
+
{
|
|
299
|
+
"name": "clear",
|
|
300
|
+
"description": "Add this property to render a clickable Warp close icon.\n\nSet an `aria-label` that explains the action when using this.",
|
|
301
|
+
"type": "boolean"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"name": "search",
|
|
305
|
+
"description": "Add this property to render a clickable Warp search icon.",
|
|
306
|
+
"type": "boolean"
|
|
307
|
+
},
|
|
308
|
+
{ "name": "label", "type": "string" },
|
|
309
|
+
{ "name": "icon", "type": "string | null" },
|
|
310
|
+
{ "name": "_icon" }
|
|
77
311
|
],
|
|
78
312
|
"events": []
|
|
79
313
|
}
|
|
@@ -104,19 +338,10 @@
|
|
|
104
338
|
"properties": [
|
|
105
339
|
{
|
|
106
340
|
"name": "variant",
|
|
107
|
-
"description": "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.",
|
|
108
341
|
"type": "'negative' | 'positive' | 'warning' | 'info'"
|
|
109
342
|
},
|
|
110
|
-
{
|
|
111
|
-
|
|
112
|
-
"description": "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`).",
|
|
113
|
-
"type": "boolean"
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
"name": "role",
|
|
117
|
-
"description": "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.",
|
|
118
|
-
"type": "string"
|
|
119
|
-
}
|
|
343
|
+
{ "name": "show", "type": "boolean" },
|
|
344
|
+
{ "name": "role", "type": "string" }
|
|
120
345
|
],
|
|
121
346
|
"events": []
|
|
122
347
|
}
|
|
@@ -328,31 +553,41 @@
|
|
|
328
553
|
},
|
|
329
554
|
{
|
|
330
555
|
"name": "w-badge",
|
|
331
|
-
"description": "`w-badge` is used for showing a small amount of non-interactive color-categorized metadata, like a status or count.\n\n
|
|
556
|
+
"description": "`w-badge` is used for showing a small amount of non-interactive color-categorized metadata, like a status or count.\n---\n\n\n### **Slots:**\n - _default_ - The content of the badge, which is typically a short string like \"New\" or \"4\".",
|
|
332
557
|
"doc-url": "",
|
|
333
558
|
"attributes": [
|
|
334
559
|
{
|
|
335
560
|
"name": "variant",
|
|
561
|
+
"description": "Controls the badge color treatment.\nIf omitted, the badge uses neutral styling without reflecting a `variant` attribute.\nAccepted values are `neutral`, `info`, `positive`, `warning`, `negative`, `disabled`, `price`, and `sponsored`. If omitted, the badge uses neutral styling without reflecting a `variant` attribute.",
|
|
336
562
|
"value": {
|
|
337
563
|
"type": "'neutral' | 'info' | 'positive' | 'warning' | 'negative' | 'disabled' | 'price' | 'sponsored'"
|
|
338
564
|
}
|
|
339
565
|
},
|
|
340
566
|
{
|
|
341
567
|
"name": "position",
|
|
568
|
+
"description": "Positions the badge in a corner of a parent element.\nUse this with a parent element that has `position: relative`. When set, the badge uses absolute positioning and adjusts its corner radii so it sits flush against the selected corner.\nUse this with a parent element that has `position: relative`. Accepted values are `top-left`, `top-right`, `bottom-right`, and `bottom-left`.",
|
|
342
569
|
"value": {
|
|
343
570
|
"type": "'top-left' | 'top-right' | 'bottom-right' | 'bottom-left'"
|
|
344
571
|
}
|
|
345
572
|
}
|
|
346
573
|
],
|
|
574
|
+
"slots": [
|
|
575
|
+
{
|
|
576
|
+
"name": "",
|
|
577
|
+
"description": "The content of the badge, which is typically a short string like \"New\" or \"4\"."
|
|
578
|
+
}
|
|
579
|
+
],
|
|
347
580
|
"events": [],
|
|
348
581
|
"js": {
|
|
349
582
|
"properties": [
|
|
350
583
|
{
|
|
351
584
|
"name": "variant",
|
|
585
|
+
"description": "Controls the badge color treatment.\nIf omitted, the badge uses neutral styling without reflecting a `variant` attribute.\nAccepted values are `neutral`, `info`, `positive`, `warning`, `negative`, `disabled`, `price`, and `sponsored`. If omitted, the badge uses neutral styling without reflecting a `variant` attribute.",
|
|
352
586
|
"type": "'neutral' | 'info' | 'positive' | 'warning' | 'negative' | 'disabled' | 'price' | 'sponsored'"
|
|
353
587
|
},
|
|
354
588
|
{
|
|
355
589
|
"name": "position",
|
|
590
|
+
"description": "Positions the badge in a corner of a parent element.\nUse this with a parent element that has `position: relative`. When set, the badge uses absolute positioning and adjusts its corner radii so it sits flush against the selected corner.\nUse this with a parent element that has `position: relative`. Accepted values are `top-left`, `top-right`, `bottom-right`, and `bottom-left`.",
|
|
356
591
|
"type": "'top-left' | 'top-right' | 'bottom-right' | 'bottom-left'"
|
|
357
592
|
}
|
|
358
593
|
],
|
|
@@ -679,21 +914,81 @@
|
|
|
679
914
|
"events": [],
|
|
680
915
|
"js": {
|
|
681
916
|
"properties": [
|
|
682
|
-
{
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
{
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
{
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
917
|
+
{
|
|
918
|
+
"name": "options",
|
|
919
|
+
"description": "The available options to select from",
|
|
920
|
+
"type": "ComboboxOption[]"
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
"name": "label",
|
|
924
|
+
"description": "Label above input",
|
|
925
|
+
"type": "string | undefined"
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
"name": "placeholder",
|
|
929
|
+
"description": "Input placeholder",
|
|
930
|
+
"type": "string | undefined"
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
"name": "value",
|
|
934
|
+
"description": "The input value",
|
|
935
|
+
"type": "string"
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
"name": "openOnFocus",
|
|
939
|
+
"description": "Whether the popover opens when focus is on the text field",
|
|
940
|
+
"type": "boolean"
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
"name": "selectOnBlur",
|
|
944
|
+
"description": "Select active option on blur",
|
|
945
|
+
"type": "boolean"
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
"name": "matchTextSegments",
|
|
949
|
+
"description": "Whether the matching text segments in the options should be highlighted",
|
|
950
|
+
"type": "boolean"
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
"name": "disableStaticFiltering",
|
|
954
|
+
"description": "Disable client-side static filtering",
|
|
955
|
+
"type": "boolean"
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
"name": "invalid",
|
|
959
|
+
"description": "Renders the input field in an invalid state",
|
|
960
|
+
"type": "boolean"
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
"name": "helpText",
|
|
964
|
+
"description": "The content to display as the help text",
|
|
965
|
+
"type": "string | undefined"
|
|
966
|
+
},
|
|
967
|
+
{
|
|
968
|
+
"name": "disabled",
|
|
969
|
+
"description": "Whether the element is disabled",
|
|
970
|
+
"type": "boolean"
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
"name": "required",
|
|
974
|
+
"description": "Whether the element is required",
|
|
975
|
+
"type": "boolean"
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
"name": "optional",
|
|
979
|
+
"description": "Whether to show optional text",
|
|
980
|
+
"type": "boolean"
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
"name": "name",
|
|
984
|
+
"description": "Name attribute for form submission",
|
|
985
|
+
"type": "string | undefined"
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
"name": "autocomplete",
|
|
989
|
+
"description": "Autocomplete attribute for the input field",
|
|
990
|
+
"type": "string | undefined"
|
|
991
|
+
}
|
|
697
992
|
],
|
|
698
993
|
"events": []
|
|
699
994
|
}
|
|
@@ -731,13 +1026,33 @@
|
|
|
731
1026
|
"js": {
|
|
732
1027
|
"properties": [
|
|
733
1028
|
{ "name": "label", "type": "string" },
|
|
734
|
-
{
|
|
1029
|
+
{
|
|
1030
|
+
"name": "lang",
|
|
1031
|
+
"description": "Takes precedence over the `<html>` lang attribute.",
|
|
1032
|
+
"type": "string"
|
|
1033
|
+
},
|
|
735
1034
|
{ "name": "name", "type": "string" },
|
|
736
1035
|
{ "name": "value", "type": "string" },
|
|
737
|
-
{
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
1036
|
+
{
|
|
1037
|
+
"name": "headerFormat",
|
|
1038
|
+
"description": "Decides the format of the date as shown in the calendar header.\n\nThe syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).",
|
|
1039
|
+
"type": "string"
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
"name": "weekdayFormat",
|
|
1043
|
+
"description": "Decides the format of the weekday as shown above the grid of dates in the calendar.\n\nThe syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).",
|
|
1044
|
+
"type": "string"
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
"name": "isDayDisabled",
|
|
1048
|
+
"description": "Lets you control if a date in the calendar should be disabled.\n\nThis needs to be set on the element instance in JavaScript, not as an HTML attribute.",
|
|
1049
|
+
"type": "(day: Date) => boolean"
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
"name": "dayFormat",
|
|
1053
|
+
"description": "Decides the format of the day in the calendar as read to screen readers.\n\nThe syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).",
|
|
1054
|
+
"type": "string"
|
|
1055
|
+
},
|
|
741
1056
|
{ "name": "isCalendarOpen", "type": "boolean" },
|
|
742
1057
|
{ "name": "navigationDate", "type": "Date" },
|
|
743
1058
|
{ "name": "selectedDate", "type": "Date | null" },
|
|
@@ -930,8 +1245,16 @@
|
|
|
930
1245
|
"events": [],
|
|
931
1246
|
"js": {
|
|
932
1247
|
"properties": [
|
|
933
|
-
{
|
|
934
|
-
|
|
1248
|
+
{
|
|
1249
|
+
"name": "selectedPage",
|
|
1250
|
+
"description": "Currently selected page (1-based index, clamped to valid range)",
|
|
1251
|
+
"type": "number"
|
|
1252
|
+
},
|
|
1253
|
+
{
|
|
1254
|
+
"name": "pageCount",
|
|
1255
|
+
"description": "Total number of pages (minimum 1)",
|
|
1256
|
+
"type": "number"
|
|
1257
|
+
}
|
|
935
1258
|
],
|
|
936
1259
|
"events": []
|
|
937
1260
|
}
|
|
@@ -1224,98 +1547,67 @@
|
|
|
1224
1547
|
"events": [{ "name": "change", "type": "CustomEvent" }],
|
|
1225
1548
|
"js": {
|
|
1226
1549
|
"properties": [
|
|
1227
|
-
{
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
{
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
{
|
|
1550
|
+
{
|
|
1551
|
+
"name": "autoFocus",
|
|
1552
|
+
"description": "Whether the element should receive focus on render.",
|
|
1553
|
+
"type": "boolean"
|
|
1554
|
+
},
|
|
1555
|
+
{
|
|
1556
|
+
"name": "autofocus",
|
|
1557
|
+
"description": "Whether the element should receive focus on render",
|
|
1558
|
+
"type": "boolean"
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
"name": "helpText",
|
|
1562
|
+
"description": "The content displayed as the help text. Paired with `invalid` to show the text as a validation error.",
|
|
1563
|
+
"type": "string"
|
|
1564
|
+
},
|
|
1565
|
+
{
|
|
1566
|
+
"name": "invalid",
|
|
1567
|
+
"description": "Renders the field in an invalid state. Paired with `help-text` to provide feedback about the error.",
|
|
1568
|
+
"type": "boolean"
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
"name": "always",
|
|
1572
|
+
"description": "Whether to always show a hint.",
|
|
1573
|
+
"type": "boolean"
|
|
1574
|
+
},
|
|
1575
|
+
{
|
|
1576
|
+
"name": "hint",
|
|
1577
|
+
"description": "The content displayed as the help text.",
|
|
1578
|
+
"type": "string"
|
|
1579
|
+
},
|
|
1580
|
+
{
|
|
1581
|
+
"name": "label",
|
|
1582
|
+
"description": "The content to disply as the label",
|
|
1583
|
+
"type": "string"
|
|
1584
|
+
},
|
|
1585
|
+
{
|
|
1586
|
+
"name": "optional",
|
|
1587
|
+
"description": "Whether to show optional text",
|
|
1588
|
+
"type": "boolean"
|
|
1589
|
+
},
|
|
1590
|
+
{
|
|
1591
|
+
"name": "disabled",
|
|
1592
|
+
"description": "Renders the field in a disabled state.",
|
|
1593
|
+
"type": "boolean"
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
"name": "readOnly",
|
|
1597
|
+
"description": "Renders the field in a readonly state.",
|
|
1598
|
+
"type": "boolean"
|
|
1599
|
+
},
|
|
1600
|
+
{
|
|
1601
|
+
"name": "readonly",
|
|
1602
|
+
"description": "Renders the field in a readonly state.",
|
|
1603
|
+
"type": "boolean"
|
|
1604
|
+
},
|
|
1238
1605
|
{ "name": "name", "type": "string" },
|
|
1239
|
-
{ "name": "value", "type": "string" }
|
|
1240
|
-
{ "name": "_options" }
|
|
1606
|
+
{ "name": "value", "type": "string" }
|
|
1241
1607
|
],
|
|
1242
1608
|
"events": [{ "name": "change", "type": "CustomEvent" }]
|
|
1243
1609
|
}
|
|
1244
1610
|
},
|
|
1245
|
-
{
|
|
1246
|
-
"name": "w-textfield",
|
|
1247
|
-
"description": "A single line text input element.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-textfield--docs)\n---\n",
|
|
1248
|
-
"doc-url": "",
|
|
1249
|
-
"attributes": [
|
|
1250
|
-
{
|
|
1251
|
-
"name": "disabled",
|
|
1252
|
-
"value": { "type": "boolean", "default": "false" }
|
|
1253
|
-
},
|
|
1254
|
-
{
|
|
1255
|
-
"name": "invalid",
|
|
1256
|
-
"value": { "type": "boolean", "default": "false" }
|
|
1257
|
-
},
|
|
1258
|
-
{ "name": "id", "value": { "type": "string" } },
|
|
1259
|
-
{ "name": "label", "value": { "type": "string" } },
|
|
1260
|
-
{ "name": "help-text", "value": { "type": "string" } },
|
|
1261
|
-
{ "name": "size", "value": { "type": "string" } },
|
|
1262
|
-
{ "name": "max", "value": { "type": "number" } },
|
|
1263
|
-
{ "name": "min", "value": { "type": "number" } },
|
|
1264
|
-
{ "name": "min-length", "value": { "type": "number" } },
|
|
1265
|
-
{ "name": "max-length", "value": { "type": "number" } },
|
|
1266
|
-
{ "name": "pattern", "value": { "type": "string" } },
|
|
1267
|
-
{ "name": "placeholder", "value": { "type": "string" } },
|
|
1268
|
-
{
|
|
1269
|
-
"name": "read-only",
|
|
1270
|
-
"value": { "type": "boolean", "default": "false" }
|
|
1271
|
-
},
|
|
1272
|
-
{
|
|
1273
|
-
"name": "readonly",
|
|
1274
|
-
"value": { "type": "boolean", "default": "false" }
|
|
1275
|
-
},
|
|
1276
|
-
{
|
|
1277
|
-
"name": "required",
|
|
1278
|
-
"value": { "type": "boolean", "default": "false" }
|
|
1279
|
-
},
|
|
1280
|
-
{ "name": "type", "value": { "type": "string" } },
|
|
1281
|
-
{ "name": "value", "value": { "type": "string" } },
|
|
1282
|
-
{ "name": "name", "value": { "type": "string" } },
|
|
1283
|
-
{ "name": "step", "value": { "type": "number" } },
|
|
1284
|
-
{
|
|
1285
|
-
"name": "autocomplete",
|
|
1286
|
-
"value": { "type": "string | undefined" }
|
|
1287
|
-
}
|
|
1288
|
-
],
|
|
1289
|
-
"events": [],
|
|
1290
|
-
"js": {
|
|
1291
|
-
"properties": [
|
|
1292
|
-
{ "name": "disabled", "type": "boolean" },
|
|
1293
|
-
{ "name": "invalid", "type": "boolean" },
|
|
1294
|
-
{ "name": "id", "type": "string" },
|
|
1295
|
-
{ "name": "label", "type": "string" },
|
|
1296
|
-
{ "name": "helpText", "type": "string" },
|
|
1297
|
-
{ "name": "size", "type": "string" },
|
|
1298
|
-
{ "name": "max", "type": "number" },
|
|
1299
|
-
{ "name": "min", "type": "number" },
|
|
1300
|
-
{ "name": "minLength", "type": "number" },
|
|
1301
|
-
{ "name": "maxLength", "type": "number" },
|
|
1302
|
-
{ "name": "pattern", "type": "string" },
|
|
1303
|
-
{ "name": "placeholder", "type": "string" },
|
|
1304
|
-
{ "name": "readOnly", "type": "boolean" },
|
|
1305
|
-
{ "name": "readonly", "type": "boolean" },
|
|
1306
|
-
{ "name": "required", "type": "boolean" },
|
|
1307
|
-
{ "name": "type", "type": "string" },
|
|
1308
|
-
{ "name": "value", "type": "string" },
|
|
1309
|
-
{ "name": "name", "type": "string" },
|
|
1310
|
-
{ "name": "step", "type": "number" },
|
|
1311
|
-
{ "name": "autocomplete", "type": "string | undefined" },
|
|
1312
|
-
{ "name": "formatter", "type": "(value: string) => string" },
|
|
1313
|
-
{ "name": "_hasPrefix" },
|
|
1314
|
-
{ "name": "_hasSuffix" }
|
|
1315
|
-
],
|
|
1316
|
-
"events": []
|
|
1317
|
-
}
|
|
1318
|
-
},
|
|
1319
1611
|
{
|
|
1320
1612
|
"name": "w-slider-thumb",
|
|
1321
1613
|
"description": "Component to place inside a `<w-slider>`.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-slider-and-range-slider--docs)\n---\n\n\n### **Events:**\n - **thumbreset**\n- **slidervalidity**",
|
|
@@ -1351,13 +1643,7 @@
|
|
|
1351
1643
|
"description": "Value to display in the tooltip",
|
|
1352
1644
|
"type": "string | number"
|
|
1353
1645
|
},
|
|
1354
|
-
{ "name": "ariaDescriptionText" }
|
|
1355
|
-
{ "name": "disabled" },
|
|
1356
|
-
{ "name": "invalid" },
|
|
1357
|
-
{ "name": "openEnded" },
|
|
1358
|
-
{ "name": "valueFormatter" },
|
|
1359
|
-
{ "name": "tooltipFormatter" },
|
|
1360
|
-
{ "name": "labelFormatter" }
|
|
1646
|
+
{ "name": "ariaDescriptionText" }
|
|
1361
1647
|
],
|
|
1362
1648
|
"events": [
|
|
1363
1649
|
{ "name": "thumbreset", "type": "CustomEvent" },
|
|
@@ -1438,29 +1724,52 @@
|
|
|
1438
1724
|
"events": [],
|
|
1439
1725
|
"js": {
|
|
1440
1726
|
"properties": [
|
|
1441
|
-
{
|
|
1727
|
+
{
|
|
1728
|
+
"name": "label",
|
|
1729
|
+
"description": "The slider fieldset label. Required for proper accessibility.\n\nIf you need to display HTML, use the `label` slot instead (f. ex. `<legend class=\"sr-only\" slot=\"label\">Production year</legend>`)",
|
|
1730
|
+
"type": "string"
|
|
1731
|
+
},
|
|
1442
1732
|
{ "name": "disabled", "type": "boolean" },
|
|
1443
|
-
{
|
|
1733
|
+
{
|
|
1734
|
+
"name": "openEnded",
|
|
1735
|
+
"description": "Whether or not to allow values outside the range such as \"Before 1950\" and \"2025+\".",
|
|
1736
|
+
"type": "boolean"
|
|
1737
|
+
},
|
|
1444
1738
|
{ "name": "error", "type": "string" },
|
|
1445
1739
|
{ "name": "helpText", "type": "string" },
|
|
1446
1740
|
{ "name": "invalid", "type": "boolean" },
|
|
1447
|
-
{
|
|
1741
|
+
{
|
|
1742
|
+
"name": "required",
|
|
1743
|
+
"description": "Ensures a child slider thumb has a value before allowing the containing form to submit.",
|
|
1744
|
+
"type": "boolean"
|
|
1745
|
+
},
|
|
1448
1746
|
{ "name": "min", "type": "string" },
|
|
1449
1747
|
{ "name": "max", "type": "string" },
|
|
1450
|
-
{
|
|
1748
|
+
{
|
|
1749
|
+
"name": "markers",
|
|
1750
|
+
"description": "Pass a value similar to step to create visual markers at that interval",
|
|
1751
|
+
"type": "number"
|
|
1752
|
+
},
|
|
1451
1753
|
{ "name": "step", "type": "number" },
|
|
1452
|
-
{
|
|
1754
|
+
{
|
|
1755
|
+
"name": "suffix",
|
|
1756
|
+
"description": "Suffix used in text input fields and for the min and max values of the slider.",
|
|
1757
|
+
"type": "string"
|
|
1758
|
+
},
|
|
1453
1759
|
{ "name": "hiddenTextfield", "type": "boolean" },
|
|
1454
1760
|
{
|
|
1455
1761
|
"name": "valueFormatter",
|
|
1762
|
+
"description": "Formatter for the tooltip and input mask values.",
|
|
1456
1763
|
"type": "(value: string, slot: SliderSlot) => string"
|
|
1457
1764
|
},
|
|
1458
1765
|
{
|
|
1459
1766
|
"name": "tooltipFormatter",
|
|
1767
|
+
"description": "Replaces valueFormatter for the tooltip. Use in open-ended sliders to show for example \"300+ hk\" instead of \"Max\" in the tooltip.",
|
|
1460
1768
|
"type": "(value: string, slot: SliderSlot) => string"
|
|
1461
1769
|
},
|
|
1462
1770
|
{
|
|
1463
1771
|
"name": "labelFormatter",
|
|
1772
|
+
"description": "Formatter for the min and max labels below the range.",
|
|
1464
1773
|
"type": "(slot: SliderSlot) => string"
|
|
1465
1774
|
},
|
|
1466
1775
|
{ "name": "fieldset", "type": "HTMLFieldSetElement" },
|
|
@@ -1590,9 +1899,7 @@
|
|
|
1590
1899
|
},
|
|
1591
1900
|
{ "name": "ariaSelected", "type": "'true' | 'false'" },
|
|
1592
1901
|
{ "name": "active", "type": "boolean" },
|
|
1593
|
-
{ "name": "over", "type": "boolean" }
|
|
1594
|
-
{ "name": "_parentTabIndex" },
|
|
1595
|
-
{ "name": "_parentAriaSelected" }
|
|
1902
|
+
{ "name": "over", "type": "boolean" }
|
|
1596
1903
|
],
|
|
1597
1904
|
"events": []
|
|
1598
1905
|
}
|
|
@@ -1615,9 +1922,7 @@
|
|
|
1615
1922
|
"name": "active",
|
|
1616
1923
|
"description": "Whether this panel is active (visible).\nSet by parent w-tabs via the _parentActive property.",
|
|
1617
1924
|
"type": "boolean"
|
|
1618
|
-
}
|
|
1619
|
-
{ "name": "_parentActive" },
|
|
1620
|
-
{ "name": "_parentAriaLabelledBy" }
|
|
1925
|
+
}
|
|
1621
1926
|
],
|
|
1622
1927
|
"events": []
|
|
1623
1928
|
}
|