@warp-ds/elements 2.9.0-next.5 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +221 -118
- package/dist/docs/affix/affix.md +49 -61
- package/dist/docs/affix/api.md +25 -23
- package/dist/docs/affix/examples.md +24 -38
- package/dist/docs/alert/accessibility.md +4 -9
- package/dist/docs/alert/alert.md +36 -51
- package/dist/docs/alert/api.md +12 -12
- package/dist/docs/alert/examples.md +20 -30
- package/dist/docs/attention/accessibility.md +50 -0
- package/dist/docs/attention/api.md +72 -59
- package/dist/docs/attention/attention.md +305 -56
- package/dist/docs/attention/examples.md +91 -0
- package/dist/docs/attention/usage.md +91 -0
- package/dist/docs/badge/accessibility.md +44 -0
- package/dist/docs/badge/api.md +12 -8
- package/dist/docs/badge/badge.md +178 -10
- package/dist/docs/badge/examples.md +69 -0
- package/dist/docs/badge/usage.md +53 -0
- package/dist/docs/button/api.md +46 -42
- package/dist/docs/button/button.md +46 -42
- package/dist/docs/card/api.md +11 -11
- package/dist/docs/card/card.md +11 -11
- package/dist/docs/combobox/api.md +62 -62
- package/dist/docs/combobox/combobox.md +62 -62
- package/dist/docs/datepicker/api.md +74 -66
- package/dist/docs/datepicker/datepicker.md +74 -66
- package/dist/docs/expandable/api.md +26 -26
- package/dist/docs/expandable/expandable.md +26 -26
- package/dist/docs/link/api.md +28 -28
- package/dist/docs/link/link.md +28 -28
- package/dist/docs/page-indicator/api.md +6 -6
- package/dist/docs/page-indicator/page-indicator.md +6 -6
- package/dist/docs/pagination/api.md +3 -3
- package/dist/docs/pagination/pagination.md +3 -3
- package/dist/docs/pill/api.md +19 -15
- package/dist/docs/pill/pill.md +19 -15
- package/dist/docs/select/api.md +44 -44
- package/dist/docs/select/select.md +44 -44
- package/dist/docs/slider/api.md +80 -78
- package/dist/docs/slider/slider.md +80 -78
- package/dist/docs/slider-thumb/api.md +28 -76
- package/dist/docs/slider-thumb/slider-thumb.md +28 -76
- package/dist/docs/switch/api.md +16 -16
- package/dist/docs/switch/switch.md +16 -16
- package/dist/docs/tab/api.md +26 -40
- package/dist/docs/tab/tab.md +26 -40
- package/dist/docs/tab-panel/api.md +1 -17
- package/dist/docs/tab-panel/tab-panel.md +1 -17
- package/dist/docs/tabs/api.md +3 -3
- package/dist/docs/tabs/tabs.md +3 -3
- package/dist/docs/textarea/accessibility.md +5 -0
- package/dist/docs/textarea/api.md +52 -65
- package/dist/docs/textarea/examples.md +81 -0
- package/dist/docs/textarea/textarea.md +151 -65
- package/dist/docs/textarea/usage.md +9 -0
- package/dist/docs/textfield/accessibility.md +15 -0
- package/dist/docs/textfield/api.md +86 -83
- package/dist/docs/textfield/examples.md +130 -0
- package/dist/docs/textfield/textfield.md +258 -86
- package/dist/docs/textfield/usage.md +26 -0
- package/dist/index.d.ts +456 -330
- package/dist/packages/attention/attention.d.ts +46 -37
- package/dist/packages/attention/attention.js +20 -20
- package/dist/packages/attention/attention.js.map +3 -3
- package/dist/packages/badge/badge.d.ts +7 -5
- package/dist/packages/badge/badge.js.map +2 -2
- package/dist/packages/datepicker/datepicker.js +1 -1
- package/dist/packages/datepicker/datepicker.js.map +2 -2
- package/dist/packages/datepicker/datepicker.react.stories.d.ts +9 -1
- package/dist/packages/datepicker/react.d.ts +4 -0
- package/dist/packages/datepicker/react.js +4 -0
- package/dist/packages/textarea/textarea.d.ts +38 -29
- package/dist/packages/textarea/textarea.js.map +2 -2
- package/dist/packages/textfield/textfield.d.ts +57 -60
- package/dist/packages/textfield/textfield.js +5 -5
- package/dist/packages/textfield/textfield.js.map +2 -2
- package/dist/packages/textfield/textfield.react.stories.d.ts +1 -1
- package/dist/web-types.json +573 -153
- package/package.json +1 -2
package/dist/index.d.ts
CHANGED
|
@@ -129,117 +129,141 @@ export type WIconSolidJsProps = {
|
|
|
129
129
|
};
|
|
130
130
|
|
|
131
131
|
export type WarpTextFieldProps = {
|
|
132
|
-
/**
|
|
132
|
+
/** Keep in mind that using disabled in its current form is an anti-pattern.
|
|
133
|
+
|
|
134
|
+
There 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.
|
|
135
|
+
|
|
136
|
+
Please consider more informative alternatives before choosing to use disabled on an element. */
|
|
133
137
|
disabled?: WarpTextField["disabled"];
|
|
134
|
-
/**
|
|
138
|
+
/** Mark the form field as invalid. Make sure to also set a `help-text` to help users fix the validation problem. */
|
|
135
139
|
invalid?: WarpTextField["invalid"];
|
|
136
|
-
/**
|
|
137
|
-
id?: WarpTextField["id"];
|
|
138
|
-
/** */
|
|
140
|
+
/** Either a `label` or an `aria-label` must be provided. */
|
|
139
141
|
label?: WarpTextField["label"];
|
|
140
|
-
/**
|
|
142
|
+
/** Use in combination with `invalid` to show as a validation error message,
|
|
143
|
+
or on its own to show a help text. */
|
|
141
144
|
"help-text"?: WarpTextField["helpText"];
|
|
142
|
-
/**
|
|
145
|
+
/** Use in combination with `invalid` to show as a validation error message,
|
|
146
|
+
or on its own to show a help text. */
|
|
143
147
|
helpText?: WarpTextField["helpText"];
|
|
144
|
-
/**
|
|
148
|
+
/** 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. */
|
|
145
149
|
size?: WarpTextField["size"];
|
|
146
|
-
/**
|
|
150
|
+
/** Use with `type="number"` to set the [maximum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength). */
|
|
147
151
|
max?: WarpTextField["max"];
|
|
148
|
-
/**
|
|
152
|
+
/** Use with `type="number"` to set the [minimum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#minlength). */
|
|
149
153
|
min?: WarpTextField["min"];
|
|
150
|
-
/** */
|
|
154
|
+
/** @deprecated Use the native `minlength` attribute */
|
|
151
155
|
"min-length"?: WarpTextField["minLength"];
|
|
152
|
-
/** */
|
|
156
|
+
/** @deprecated Use the native `minlength` attribute */
|
|
153
157
|
minLength?: WarpTextField["minLength"];
|
|
154
|
-
/**
|
|
158
|
+
/** 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. */
|
|
159
|
+
minlength?: WarpTextField["minlength"];
|
|
160
|
+
/** @deprecated Use the native `maxlength` attribute */
|
|
155
161
|
"max-length"?: WarpTextField["maxLength"];
|
|
156
|
-
/** */
|
|
162
|
+
/** @deprecated Use the native `maxlength` attribute */
|
|
157
163
|
maxLength?: WarpTextField["maxLength"];
|
|
158
|
-
/**
|
|
164
|
+
/** 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. */
|
|
165
|
+
maxlength?: WarpTextField["maxlength"];
|
|
166
|
+
/** 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) */
|
|
159
167
|
pattern?: WarpTextField["pattern"];
|
|
160
|
-
/**
|
|
168
|
+
/** Set a text that is shown in the textfield when it doesn't have a value.
|
|
169
|
+
|
|
170
|
+
Placeholder text should not be used as a substitute for labeling the element with a visible label. */
|
|
161
171
|
placeholder?: WarpTextField["placeholder"];
|
|
162
172
|
/** @deprecated Use the native readonly attribute instead. */
|
|
163
173
|
"read-only"?: WarpTextField["readOnly"];
|
|
164
174
|
/** @deprecated Use the native readonly attribute instead. */
|
|
165
175
|
readOnly?: WarpTextField["readOnly"];
|
|
166
|
-
/**
|
|
176
|
+
/** Whether the input can be selected but not changed by the user. */
|
|
167
177
|
readonly?: WarpTextField["readonly"];
|
|
168
|
-
/**
|
|
178
|
+
/** Whether user input is required on the input before form submission. */
|
|
169
179
|
required?: WarpTextField["required"];
|
|
170
|
-
/**
|
|
180
|
+
/** The [type of input](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#input_types). */
|
|
171
181
|
type?: WarpTextField["type"];
|
|
172
|
-
/**
|
|
182
|
+
/** Lets you set the current value. */
|
|
173
183
|
value?: WarpTextField["value"];
|
|
174
|
-
/**
|
|
184
|
+
/** The [name](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name) of the input field when submitting the form. */
|
|
175
185
|
name?: WarpTextField["name"];
|
|
176
|
-
/**
|
|
186
|
+
/** When used with `number` this attribute forces inputs to be a whole number of `step`.
|
|
187
|
+
|
|
188
|
+
For example with a `step="5"` only values that divide evenly on 5 are allowed.
|
|
189
|
+
Using arrow up and down in the input field increments and decrements by 5. */
|
|
177
190
|
step?: WarpTextField["step"];
|
|
178
|
-
/**
|
|
191
|
+
/** 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. */
|
|
179
192
|
autocomplete?: WarpTextField["autocomplete"];
|
|
180
|
-
/**
|
|
193
|
+
/** Function to format value when the input field.
|
|
194
|
+
|
|
195
|
+
Only active when the input field does not have focus,
|
|
196
|
+
similar to the accessible input [masking example from Filament Group](https://filamentgroup.github.io/politespace/demo/demo.html). */
|
|
181
197
|
formatter?: WarpTextField["formatter"];
|
|
182
|
-
/** */
|
|
183
|
-
_hasPrefix?: WarpTextField["_hasPrefix"];
|
|
184
|
-
/** */
|
|
185
|
-
_hasSuffix?: WarpTextField["_hasSuffix"];
|
|
186
198
|
};
|
|
187
199
|
|
|
188
200
|
export type WarpTextFieldSolidJsProps = {
|
|
189
|
-
/**
|
|
201
|
+
/** Keep in mind that using disabled in its current form is an anti-pattern.
|
|
202
|
+
|
|
203
|
+
There 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.
|
|
204
|
+
|
|
205
|
+
Please consider more informative alternatives before choosing to use disabled on an element. */
|
|
190
206
|
"prop:disabled"?: WarpTextField["disabled"];
|
|
191
|
-
/**
|
|
207
|
+
/** Mark the form field as invalid. Make sure to also set a `help-text` to help users fix the validation problem. */
|
|
192
208
|
"prop:invalid"?: WarpTextField["invalid"];
|
|
193
|
-
/**
|
|
194
|
-
"prop:id"?: WarpTextField["id"];
|
|
195
|
-
/** */
|
|
209
|
+
/** Either a `label` or an `aria-label` must be provided. */
|
|
196
210
|
"prop:label"?: WarpTextField["label"];
|
|
197
|
-
/**
|
|
211
|
+
/** Use in combination with `invalid` to show as a validation error message,
|
|
212
|
+
or on its own to show a help text. */
|
|
198
213
|
"attr:help-text"?: WarpTextField["helpText"];
|
|
199
|
-
/**
|
|
214
|
+
/** Use in combination with `invalid` to show as a validation error message,
|
|
215
|
+
or on its own to show a help text. */
|
|
200
216
|
"prop:helpText"?: WarpTextField["helpText"];
|
|
201
|
-
/**
|
|
217
|
+
/** 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. */
|
|
202
218
|
"prop:size"?: WarpTextField["size"];
|
|
203
|
-
/**
|
|
219
|
+
/** Use with `type="number"` to set the [maximum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength). */
|
|
204
220
|
"prop:max"?: WarpTextField["max"];
|
|
205
|
-
/**
|
|
221
|
+
/** Use with `type="number"` to set the [minimum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#minlength). */
|
|
206
222
|
"prop:min"?: WarpTextField["min"];
|
|
207
|
-
/** */
|
|
223
|
+
/** @deprecated Use the native `minlength` attribute */
|
|
208
224
|
"attr:min-length"?: WarpTextField["minLength"];
|
|
209
|
-
/** */
|
|
225
|
+
/** @deprecated Use the native `minlength` attribute */
|
|
210
226
|
"prop:minLength"?: WarpTextField["minLength"];
|
|
211
|
-
/**
|
|
227
|
+
/** 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. */
|
|
228
|
+
"prop:minlength"?: WarpTextField["minlength"];
|
|
229
|
+
/** @deprecated Use the native `maxlength` attribute */
|
|
212
230
|
"attr:max-length"?: WarpTextField["maxLength"];
|
|
213
|
-
/** */
|
|
231
|
+
/** @deprecated Use the native `maxlength` attribute */
|
|
214
232
|
"prop:maxLength"?: WarpTextField["maxLength"];
|
|
215
|
-
/**
|
|
233
|
+
/** 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. */
|
|
234
|
+
"prop:maxlength"?: WarpTextField["maxlength"];
|
|
235
|
+
/** 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) */
|
|
216
236
|
"prop:pattern"?: WarpTextField["pattern"];
|
|
217
|
-
/**
|
|
237
|
+
/** Set a text that is shown in the textfield when it doesn't have a value.
|
|
238
|
+
|
|
239
|
+
Placeholder text should not be used as a substitute for labeling the element with a visible label. */
|
|
218
240
|
"prop:placeholder"?: WarpTextField["placeholder"];
|
|
219
241
|
/** @deprecated Use the native readonly attribute instead. */
|
|
220
242
|
"bool:read-only"?: WarpTextField["readOnly"];
|
|
221
243
|
/** @deprecated Use the native readonly attribute instead. */
|
|
222
244
|
"prop:readOnly"?: WarpTextField["readOnly"];
|
|
223
|
-
/**
|
|
245
|
+
/** Whether the input can be selected but not changed by the user. */
|
|
224
246
|
"prop:readonly"?: WarpTextField["readonly"];
|
|
225
|
-
/**
|
|
247
|
+
/** Whether user input is required on the input before form submission. */
|
|
226
248
|
"prop:required"?: WarpTextField["required"];
|
|
227
|
-
/**
|
|
249
|
+
/** The [type of input](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#input_types). */
|
|
228
250
|
"prop:type"?: WarpTextField["type"];
|
|
229
|
-
/**
|
|
251
|
+
/** Lets you set the current value. */
|
|
230
252
|
"prop:value"?: WarpTextField["value"];
|
|
231
|
-
/**
|
|
253
|
+
/** The [name](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name) of the input field when submitting the form. */
|
|
232
254
|
"prop:name"?: WarpTextField["name"];
|
|
233
|
-
/**
|
|
255
|
+
/** When used with `number` this attribute forces inputs to be a whole number of `step`.
|
|
256
|
+
|
|
257
|
+
For example with a `step="5"` only values that divide evenly on 5 are allowed.
|
|
258
|
+
Using arrow up and down in the input field increments and decrements by 5. */
|
|
234
259
|
"prop:step"?: WarpTextField["step"];
|
|
235
|
-
/**
|
|
260
|
+
/** 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. */
|
|
236
261
|
"prop:autocomplete"?: WarpTextField["autocomplete"];
|
|
237
|
-
/**
|
|
262
|
+
/** Function to format value when the input field.
|
|
263
|
+
|
|
264
|
+
Only active when the input field does not have focus,
|
|
265
|
+
similar to the accessible input [masking example from Filament Group](https://filamentgroup.github.io/politespace/demo/demo.html). */
|
|
238
266
|
"prop:formatter"?: WarpTextField["formatter"];
|
|
239
|
-
/** */
|
|
240
|
-
"prop:_hasPrefix"?: WarpTextField["_hasPrefix"];
|
|
241
|
-
/** */
|
|
242
|
-
"prop:_hasSuffix"?: WarpTextField["_hasSuffix"];
|
|
243
267
|
|
|
244
268
|
/** Set the innerHTML of the element */
|
|
245
269
|
innerHTML?: string;
|
|
@@ -444,39 +468,56 @@ export type WarpButtonSolidJsProps = {
|
|
|
444
468
|
};
|
|
445
469
|
|
|
446
470
|
export type WarpAttentionProps = {
|
|
447
|
-
/**
|
|
471
|
+
/** Controls whether the attention panel is visible.
|
|
472
|
+
Set to `true` to show the attention content and `false` to hide it. */
|
|
448
473
|
show?: WarpAttention["show"];
|
|
449
|
-
/**
|
|
474
|
+
/** Preferred placement relative to the trigger element.
|
|
475
|
+
Sets the initial direction for positioning, for example `top`, `right`, `bottom`, or `left` variants. */
|
|
450
476
|
placement?: WarpAttention["placement"];
|
|
451
|
-
/**
|
|
477
|
+
/** Renders the component with tooltip styling and behavior.
|
|
478
|
+
Use for compact, non-modal contextual hints anchored to another element. */
|
|
452
479
|
tooltip?: WarpAttention["tooltip"];
|
|
453
|
-
/**
|
|
480
|
+
/** Renders the component as an inline callout.
|
|
481
|
+
Callout mode is used for always-in-flow informational content instead of floating overlay behavior. */
|
|
454
482
|
callout?: WarpAttention["callout"];
|
|
455
|
-
/**
|
|
483
|
+
/** Enables native popover behavior for the attention element.
|
|
484
|
+
When enabled, the component uses popover semantics and styling suitable for floating surface UI. */
|
|
456
485
|
popover?: WarpAttention["popover"];
|
|
457
|
-
/**
|
|
486
|
+
/** Renders the component with highlight styling.
|
|
487
|
+
Use highlight mode to visually emphasize important contextual information. */
|
|
458
488
|
highlight?: WarpAttention["highlight"];
|
|
459
|
-
/**
|
|
489
|
+
/** Shows a close button inside the attention component.
|
|
490
|
+
Adds an internal dismiss action that lets users close the attention panel. */
|
|
460
491
|
"can-close"?: WarpAttention["canClose"];
|
|
461
|
-
/**
|
|
492
|
+
/** Shows a close button inside the attention component.
|
|
493
|
+
Adds an internal dismiss action that lets users close the attention panel. */
|
|
462
494
|
canClose?: WarpAttention["canClose"];
|
|
463
|
-
/**
|
|
495
|
+
/** Hides the directional arrow of the attention component.
|
|
496
|
+
Disable the arrow when the visual connection to the trigger should not be shown. */
|
|
464
497
|
"no-arrow"?: WarpAttention["noArrow"];
|
|
465
|
-
/**
|
|
498
|
+
/** Hides the directional arrow of the attention component.
|
|
499
|
+
Disable the arrow when the visual connection to the trigger should not be shown. */
|
|
466
500
|
noArrow?: WarpAttention["noArrow"];
|
|
467
|
-
/**
|
|
501
|
+
/** Distance offset between trigger and attention panel.
|
|
502
|
+
Defines the main-axis spacing in pixels from the anchor element. */
|
|
468
503
|
distance?: WarpAttention["distance"];
|
|
469
|
-
/**
|
|
504
|
+
/** Cross-axis offset for fine-grained positioning.
|
|
505
|
+
Moves the panel along the cross axis in pixels to adjust alignment with the trigger. */
|
|
470
506
|
skidding?: WarpAttention["skidding"];
|
|
471
|
-
/**
|
|
507
|
+
/** Enables automatic flipping when placement has no space.
|
|
508
|
+
Allows the component to choose an alternative side if the preferred placement would overflow. */
|
|
472
509
|
flip?: WarpAttention["flip"];
|
|
473
|
-
/**
|
|
510
|
+
/** Allows overflow checks on the cross axis when flipping.
|
|
511
|
+
Use with `flip` to improve collision handling when space is constrained horizontally or vertically. */
|
|
474
512
|
"cross-axis"?: WarpAttention["crossAxis"];
|
|
475
|
-
/**
|
|
513
|
+
/** Allows overflow checks on the cross axis when flipping.
|
|
514
|
+
Use with `flip` to improve collision handling when space is constrained horizontally or vertically. */
|
|
476
515
|
crossAxis?: WarpAttention["crossAxis"];
|
|
477
|
-
/**
|
|
516
|
+
/** Ordered list of fallback placements.
|
|
517
|
+
Provides explicit alternative placements to try when `flip` is enabled and the preferred placement does not fit. */
|
|
478
518
|
"fallback-placements"?: WarpAttention["fallbackPlacements"];
|
|
479
|
-
/**
|
|
519
|
+
/** Ordered list of fallback placements.
|
|
520
|
+
Provides explicit alternative placements to try when `flip` is enabled and the preferred placement does not fit. */
|
|
480
521
|
fallbackPlacements?: WarpAttention["fallbackPlacements"];
|
|
481
522
|
/** */
|
|
482
523
|
_initialPlacement?: WarpAttention["_initialPlacement"];
|
|
@@ -485,39 +526,56 @@ export type WarpAttentionProps = {
|
|
|
485
526
|
};
|
|
486
527
|
|
|
487
528
|
export type WarpAttentionSolidJsProps = {
|
|
488
|
-
/**
|
|
529
|
+
/** Controls whether the attention panel is visible.
|
|
530
|
+
Set to `true` to show the attention content and `false` to hide it. */
|
|
489
531
|
"prop:show"?: WarpAttention["show"];
|
|
490
|
-
/**
|
|
532
|
+
/** Preferred placement relative to the trigger element.
|
|
533
|
+
Sets the initial direction for positioning, for example `top`, `right`, `bottom`, or `left` variants. */
|
|
491
534
|
"prop:placement"?: WarpAttention["placement"];
|
|
492
|
-
/**
|
|
535
|
+
/** Renders the component with tooltip styling and behavior.
|
|
536
|
+
Use for compact, non-modal contextual hints anchored to another element. */
|
|
493
537
|
"prop:tooltip"?: WarpAttention["tooltip"];
|
|
494
|
-
/**
|
|
538
|
+
/** Renders the component as an inline callout.
|
|
539
|
+
Callout mode is used for always-in-flow informational content instead of floating overlay behavior. */
|
|
495
540
|
"prop:callout"?: WarpAttention["callout"];
|
|
496
|
-
/**
|
|
541
|
+
/** Enables native popover behavior for the attention element.
|
|
542
|
+
When enabled, the component uses popover semantics and styling suitable for floating surface UI. */
|
|
497
543
|
"prop:popover"?: WarpAttention["popover"];
|
|
498
|
-
/**
|
|
544
|
+
/** Renders the component with highlight styling.
|
|
545
|
+
Use highlight mode to visually emphasize important contextual information. */
|
|
499
546
|
"prop:highlight"?: WarpAttention["highlight"];
|
|
500
|
-
/**
|
|
547
|
+
/** Shows a close button inside the attention component.
|
|
548
|
+
Adds an internal dismiss action that lets users close the attention panel. */
|
|
501
549
|
"bool:can-close"?: WarpAttention["canClose"];
|
|
502
|
-
/**
|
|
550
|
+
/** Shows a close button inside the attention component.
|
|
551
|
+
Adds an internal dismiss action that lets users close the attention panel. */
|
|
503
552
|
"prop:canClose"?: WarpAttention["canClose"];
|
|
504
|
-
/**
|
|
553
|
+
/** Hides the directional arrow of the attention component.
|
|
554
|
+
Disable the arrow when the visual connection to the trigger should not be shown. */
|
|
505
555
|
"bool:no-arrow"?: WarpAttention["noArrow"];
|
|
506
|
-
/**
|
|
556
|
+
/** Hides the directional arrow of the attention component.
|
|
557
|
+
Disable the arrow when the visual connection to the trigger should not be shown. */
|
|
507
558
|
"prop:noArrow"?: WarpAttention["noArrow"];
|
|
508
|
-
/**
|
|
559
|
+
/** Distance offset between trigger and attention panel.
|
|
560
|
+
Defines the main-axis spacing in pixels from the anchor element. */
|
|
509
561
|
"prop:distance"?: WarpAttention["distance"];
|
|
510
|
-
/**
|
|
562
|
+
/** Cross-axis offset for fine-grained positioning.
|
|
563
|
+
Moves the panel along the cross axis in pixels to adjust alignment with the trigger. */
|
|
511
564
|
"prop:skidding"?: WarpAttention["skidding"];
|
|
512
|
-
/**
|
|
565
|
+
/** Enables automatic flipping when placement has no space.
|
|
566
|
+
Allows the component to choose an alternative side if the preferred placement would overflow. */
|
|
513
567
|
"prop:flip"?: WarpAttention["flip"];
|
|
514
|
-
/**
|
|
568
|
+
/** Allows overflow checks on the cross axis when flipping.
|
|
569
|
+
Use with `flip` to improve collision handling when space is constrained horizontally or vertically. */
|
|
515
570
|
"bool:cross-axis"?: WarpAttention["crossAxis"];
|
|
516
|
-
/**
|
|
571
|
+
/** Allows overflow checks on the cross axis when flipping.
|
|
572
|
+
Use with `flip` to improve collision handling when space is constrained horizontally or vertically. */
|
|
517
573
|
"prop:crossAxis"?: WarpAttention["crossAxis"];
|
|
518
|
-
/**
|
|
574
|
+
/** Ordered list of fallback placements.
|
|
575
|
+
Provides explicit alternative placements to try when `flip` is enabled and the preferred placement does not fit. */
|
|
519
576
|
"attr:fallback-placements"?: WarpAttention["fallbackPlacements"];
|
|
520
|
-
/**
|
|
577
|
+
/** Ordered list of fallback placements.
|
|
578
|
+
Provides explicit alternative placements to try when `flip` is enabled and the preferred placement does not fit. */
|
|
521
579
|
"prop:fallbackPlacements"?: WarpAttention["fallbackPlacements"];
|
|
522
580
|
/** */
|
|
523
581
|
"prop:_initialPlacement"?: WarpAttention["_initialPlacement"];
|
|
@@ -531,16 +589,24 @@ export type WarpAttentionSolidJsProps = {
|
|
|
531
589
|
};
|
|
532
590
|
|
|
533
591
|
export type WarpBadgeProps = {
|
|
534
|
-
/**
|
|
592
|
+
/** Controls the badge color treatment.
|
|
593
|
+
If omitted, the badge uses neutral styling without reflecting a `variant` attribute.
|
|
594
|
+
Accepted values are `neutral`, `info`, `positive`, `warning`, `negative`, `disabled`, `price`, and `sponsored`. If omitted, the badge uses neutral styling without reflecting a `variant` attribute. */
|
|
535
595
|
variant?: WarpBadge["variant"];
|
|
536
|
-
/**
|
|
596
|
+
/** Positions the badge in a corner of a parent element.
|
|
597
|
+
Use 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.
|
|
598
|
+
Use this with a parent element that has `position: relative`. Accepted values are `top-left`, `top-right`, `bottom-right`, and `bottom-left`. */
|
|
537
599
|
position?: WarpBadge["position"];
|
|
538
600
|
};
|
|
539
601
|
|
|
540
602
|
export type WarpBadgeSolidJsProps = {
|
|
541
|
-
/**
|
|
603
|
+
/** Controls the badge color treatment.
|
|
604
|
+
If omitted, the badge uses neutral styling without reflecting a `variant` attribute.
|
|
605
|
+
Accepted values are `neutral`, `info`, `positive`, `warning`, `negative`, `disabled`, `price`, and `sponsored`. If omitted, the badge uses neutral styling without reflecting a `variant` attribute. */
|
|
542
606
|
"prop:variant"?: WarpBadge["variant"];
|
|
543
|
-
/**
|
|
607
|
+
/** Positions the badge in a corner of a parent element.
|
|
608
|
+
Use 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.
|
|
609
|
+
Use this with a parent element that has `position: relative`. Accepted values are `top-left`, `top-right`, `bottom-right`, and `bottom-left`. */
|
|
544
610
|
"prop:position"?: WarpBadge["position"];
|
|
545
611
|
|
|
546
612
|
/** Set the innerHTML of the element */
|
|
@@ -833,7 +899,9 @@ The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/form
|
|
|
833
899
|
|
|
834
900
|
The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format). */
|
|
835
901
|
dayFormat?: WarpDatepicker["dayFormat"];
|
|
836
|
-
/**
|
|
902
|
+
/** Lets you control if a date in the calendar should be disabled.
|
|
903
|
+
|
|
904
|
+
This needs to be set on the element instance in JavaScript, not as an HTML attribute. */
|
|
837
905
|
isDayDisabled?: WarpDatepicker["isDayDisabled"];
|
|
838
906
|
/** */
|
|
839
907
|
isCalendarOpen?: WarpDatepicker["isCalendarOpen"];
|
|
@@ -892,7 +960,9 @@ The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/form
|
|
|
892
960
|
|
|
893
961
|
The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format). */
|
|
894
962
|
"prop:dayFormat"?: WarpDatepicker["dayFormat"];
|
|
895
|
-
/**
|
|
963
|
+
/** Lets you control if a date in the calendar should be disabled.
|
|
964
|
+
|
|
965
|
+
This needs to be set on the element instance in JavaScript, not as an HTML attribute. */
|
|
896
966
|
"prop:isDayDisabled"?: WarpDatepicker["isDayDisabled"];
|
|
897
967
|
/** */
|
|
898
968
|
"prop:isCalendarOpen"?: WarpDatepicker["isCalendarOpen"];
|
|
@@ -1361,8 +1431,6 @@ export type WarpSelectProps = {
|
|
|
1361
1431
|
name?: WarpSelect["name"];
|
|
1362
1432
|
/** */
|
|
1363
1433
|
value?: WarpSelect["value"];
|
|
1364
|
-
/** */
|
|
1365
|
-
_options?: WarpSelect["_options"];
|
|
1366
1434
|
|
|
1367
1435
|
/** */
|
|
1368
1436
|
onchange?: (e: CustomEvent) => void;
|
|
@@ -1402,8 +1470,6 @@ export type WarpSelectSolidJsProps = {
|
|
|
1402
1470
|
/** */
|
|
1403
1471
|
"prop:value"?: WarpSelect["value"];
|
|
1404
1472
|
/** */
|
|
1405
|
-
"prop:_options"?: WarpSelect["_options"];
|
|
1406
|
-
/** */
|
|
1407
1473
|
"on:change"?: (e: CustomEvent) => void;
|
|
1408
1474
|
|
|
1409
1475
|
/** Set the innerHTML of the element */
|
|
@@ -1433,18 +1499,6 @@ export type WarpSliderThumbProps = {
|
|
|
1433
1499
|
tooltipTarget?: WarpSliderThumb["tooltipTarget"];
|
|
1434
1500
|
/** */
|
|
1435
1501
|
textfield?: WarpSliderThumb["textfield"];
|
|
1436
|
-
/** */
|
|
1437
|
-
disabled?: WarpSliderThumb["disabled"];
|
|
1438
|
-
/** */
|
|
1439
|
-
invalid?: WarpSliderThumb["invalid"];
|
|
1440
|
-
/** */
|
|
1441
|
-
openEnded?: WarpSliderThumb["openEnded"];
|
|
1442
|
-
/** */
|
|
1443
|
-
valueFormatter?: WarpSliderThumb["valueFormatter"];
|
|
1444
|
-
/** */
|
|
1445
|
-
tooltipFormatter?: WarpSliderThumb["tooltipFormatter"];
|
|
1446
|
-
/** */
|
|
1447
|
-
labelFormatter?: WarpSliderThumb["labelFormatter"];
|
|
1448
1502
|
|
|
1449
1503
|
/** */
|
|
1450
1504
|
onthumbreset?: (e: CustomEvent) => void;
|
|
@@ -1474,18 +1528,6 @@ export type WarpSliderThumbSolidJsProps = {
|
|
|
1474
1528
|
/** */
|
|
1475
1529
|
"prop:textfield"?: WarpSliderThumb["textfield"];
|
|
1476
1530
|
/** */
|
|
1477
|
-
"prop:disabled"?: WarpSliderThumb["disabled"];
|
|
1478
|
-
/** */
|
|
1479
|
-
"prop:invalid"?: WarpSliderThumb["invalid"];
|
|
1480
|
-
/** */
|
|
1481
|
-
"prop:openEnded"?: WarpSliderThumb["openEnded"];
|
|
1482
|
-
/** */
|
|
1483
|
-
"prop:valueFormatter"?: WarpSliderThumb["valueFormatter"];
|
|
1484
|
-
/** */
|
|
1485
|
-
"prop:tooltipFormatter"?: WarpSliderThumb["tooltipFormatter"];
|
|
1486
|
-
/** */
|
|
1487
|
-
"prop:labelFormatter"?: WarpSliderThumb["labelFormatter"];
|
|
1488
|
-
/** */
|
|
1489
1531
|
"on:thumbreset"?: (e: CustomEvent) => void;
|
|
1490
1532
|
/** */
|
|
1491
1533
|
"on:slidervalidity"?: (e: CustomEvent) => void;
|
|
@@ -1531,11 +1573,11 @@ If you need to display HTML, use the `label` slot instead (f. ex. `<legend class
|
|
|
1531
1573
|
"hidden-textfield"?: WarpSlider["hiddenTextfield"];
|
|
1532
1574
|
/** */
|
|
1533
1575
|
hiddenTextfield?: WarpSlider["hiddenTextfield"];
|
|
1534
|
-
/**
|
|
1576
|
+
/** Formatter for the tooltip and input mask values. */
|
|
1535
1577
|
valueFormatter?: WarpSlider["valueFormatter"];
|
|
1536
|
-
/**
|
|
1578
|
+
/** Replaces valueFormatter for the tooltip. Use in open-ended sliders to show for example "300+ hk" instead of "Max" in the tooltip. */
|
|
1537
1579
|
tooltipFormatter?: WarpSlider["tooltipFormatter"];
|
|
1538
|
-
/**
|
|
1580
|
+
/** Formatter for the min and max labels below the range. */
|
|
1539
1581
|
labelFormatter?: WarpSlider["labelFormatter"];
|
|
1540
1582
|
/** */
|
|
1541
1583
|
fieldset?: WarpSlider["fieldset"];
|
|
@@ -1584,11 +1626,11 @@ If you need to display HTML, use the `label` slot instead (f. ex. `<legend class
|
|
|
1584
1626
|
"bool:hidden-textfield"?: WarpSlider["hiddenTextfield"];
|
|
1585
1627
|
/** */
|
|
1586
1628
|
"prop:hiddenTextfield"?: WarpSlider["hiddenTextfield"];
|
|
1587
|
-
/**
|
|
1629
|
+
/** Formatter for the tooltip and input mask values. */
|
|
1588
1630
|
"prop:valueFormatter"?: WarpSlider["valueFormatter"];
|
|
1589
|
-
/**
|
|
1631
|
+
/** Replaces valueFormatter for the tooltip. Use in open-ended sliders to show for example "300+ hk" instead of "Max" in the tooltip. */
|
|
1590
1632
|
"prop:tooltipFormatter"?: WarpSlider["tooltipFormatter"];
|
|
1591
|
-
/**
|
|
1633
|
+
/** Formatter for the min and max labels below the range. */
|
|
1592
1634
|
"prop:labelFormatter"?: WarpSlider["labelFormatter"];
|
|
1593
1635
|
/** */
|
|
1594
1636
|
"prop:fieldset"?: WarpSlider["fieldset"];
|
|
@@ -1696,10 +1738,6 @@ export type WarpTabProps = {
|
|
|
1696
1738
|
over?: WarpTab["over"];
|
|
1697
1739
|
/** Override tabIndex setter to set _parentTabIndex (for backwards compatibility). */
|
|
1698
1740
|
tabIndex?: WarpTab["tabIndex"];
|
|
1699
|
-
/** */
|
|
1700
|
-
_parentTabIndex?: WarpTab["_parentTabIndex"];
|
|
1701
|
-
/** */
|
|
1702
|
-
_parentAriaSelected?: WarpTab["_parentAriaSelected"];
|
|
1703
1741
|
};
|
|
1704
1742
|
|
|
1705
1743
|
export type WarpTabSolidJsProps = {
|
|
@@ -1721,10 +1759,6 @@ export type WarpTabSolidJsProps = {
|
|
|
1721
1759
|
"prop:over"?: WarpTab["over"];
|
|
1722
1760
|
/** Override tabIndex setter to set _parentTabIndex (for backwards compatibility). */
|
|
1723
1761
|
"prop:tabIndex"?: WarpTab["tabIndex"];
|
|
1724
|
-
/** */
|
|
1725
|
-
"prop:_parentTabIndex"?: WarpTab["_parentTabIndex"];
|
|
1726
|
-
/** */
|
|
1727
|
-
"prop:_parentAriaSelected"?: WarpTab["_parentAriaSelected"];
|
|
1728
1762
|
|
|
1729
1763
|
/** Set the innerHTML of the element */
|
|
1730
1764
|
innerHTML?: string;
|
|
@@ -1736,20 +1770,12 @@ export type WarpTabPanelProps = {
|
|
|
1736
1770
|
/** Whether this panel is active (visible).
|
|
1737
1771
|
Set by parent w-tabs via the _parentActive property. */
|
|
1738
1772
|
active?: WarpTabPanel["active"];
|
|
1739
|
-
/** */
|
|
1740
|
-
_parentActive?: WarpTabPanel["_parentActive"];
|
|
1741
|
-
/** */
|
|
1742
|
-
_parentAriaLabelledBy?: WarpTabPanel["_parentAriaLabelledBy"];
|
|
1743
1773
|
};
|
|
1744
1774
|
|
|
1745
1775
|
export type WarpTabPanelSolidJsProps = {
|
|
1746
1776
|
/** Whether this panel is active (visible).
|
|
1747
1777
|
Set by parent w-tabs via the _parentActive property. */
|
|
1748
1778
|
"prop:active"?: WarpTabPanel["active"];
|
|
1749
|
-
/** */
|
|
1750
|
-
"prop:_parentActive"?: WarpTabPanel["_parentActive"];
|
|
1751
|
-
/** */
|
|
1752
|
-
"prop:_parentAriaLabelledBy"?: WarpTabPanel["_parentAriaLabelledBy"];
|
|
1753
1779
|
|
|
1754
1780
|
/** Set the innerHTML of the element */
|
|
1755
1781
|
innerHTML?: string;
|
|
@@ -1778,85 +1804,97 @@ export type WarpTabsSolidJsProps = {
|
|
|
1778
1804
|
};
|
|
1779
1805
|
|
|
1780
1806
|
export type WarpTextareaProps = {
|
|
1781
|
-
/**
|
|
1807
|
+
/** Keep in mind that using disabled in its current form is an anti-pattern.
|
|
1808
|
+
|
|
1809
|
+
There 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.
|
|
1810
|
+
|
|
1811
|
+
Please consider more informative alternatives before choosing to use disabled on an element. */
|
|
1782
1812
|
disabled?: WarpTextarea["disabled"];
|
|
1783
|
-
/**
|
|
1813
|
+
/** Mark the form field as invalid.
|
|
1814
|
+
|
|
1815
|
+
Make sure to also set a `help-text` to help users fix the validation problem. */
|
|
1784
1816
|
invalid?: WarpTextarea["invalid"];
|
|
1785
|
-
/**
|
|
1817
|
+
/** Either a `label` or an `aria-label` must be provided. */
|
|
1786
1818
|
label?: WarpTextarea["label"];
|
|
1787
|
-
/**
|
|
1819
|
+
/** Use in combination with `invalid` to show as a validation error message,
|
|
1820
|
+
or on its own to show a help text. */
|
|
1788
1821
|
"help-text"?: WarpTextarea["helpText"];
|
|
1789
|
-
/**
|
|
1822
|
+
/** Use in combination with `invalid` to show as a validation error message,
|
|
1823
|
+
or on its own to show a help text. */
|
|
1790
1824
|
helpText?: WarpTextarea["helpText"];
|
|
1791
|
-
/**
|
|
1825
|
+
/** Sets the maximum number of text rows before the content starts scrolling. */
|
|
1792
1826
|
"maximum-rows"?: WarpTextarea["maxRows"];
|
|
1793
|
-
/**
|
|
1827
|
+
/** Sets the maximum number of text rows before the content starts scrolling. */
|
|
1794
1828
|
maxRows?: WarpTextarea["maxRows"];
|
|
1795
|
-
/**
|
|
1829
|
+
/** Sets the minimum number of text rows the textarea should display */
|
|
1796
1830
|
"minimum-rows"?: WarpTextarea["minRows"];
|
|
1797
|
-
/**
|
|
1831
|
+
/** Sets the minimum number of text rows the textarea should display */
|
|
1798
1832
|
minRows?: WarpTextarea["minRows"];
|
|
1799
|
-
/**
|
|
1833
|
+
/** The [name](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name) of the input field when submitting the form */
|
|
1800
1834
|
name?: WarpTextarea["name"];
|
|
1801
|
-
/**
|
|
1835
|
+
/** Set a text that is shown in the textarea when it doesn't have a value.
|
|
1836
|
+
|
|
1837
|
+
Placeholder text should not be used as a substitute for labeling the element with a visible label. */
|
|
1802
1838
|
placeholder?: WarpTextarea["placeholder"];
|
|
1803
|
-
/** @deprecated Use the native readonly attribute instead
|
|
1839
|
+
/** @deprecated Use the native `readonly` attribute instead */
|
|
1804
1840
|
"read-only"?: WarpTextarea["readOnly"];
|
|
1805
|
-
/** @deprecated Use the native readonly attribute instead
|
|
1841
|
+
/** @deprecated Use the native `readonly` attribute instead */
|
|
1806
1842
|
readOnly?: WarpTextarea["readOnly"];
|
|
1807
|
-
/**
|
|
1843
|
+
/** Whether the input can be selected but not changed by the user */
|
|
1808
1844
|
readonly?: WarpTextarea["readonly"];
|
|
1809
|
-
/**
|
|
1845
|
+
/** Whether user input is required on the input before form submission */
|
|
1810
1846
|
required?: WarpTextarea["required"];
|
|
1811
|
-
/**
|
|
1847
|
+
/** Lets you set the current value */
|
|
1812
1848
|
value?: WarpTextarea["value"];
|
|
1813
|
-
/**
|
|
1849
|
+
/** Show an icon behind the label indicating the field is optional */
|
|
1814
1850
|
optional?: WarpTextarea["optional"];
|
|
1815
|
-
/** */
|
|
1816
|
-
minHeight?: WarpTextarea["minHeight"];
|
|
1817
|
-
/** */
|
|
1818
|
-
maxHeight?: WarpTextarea["maxHeight"];
|
|
1819
1851
|
};
|
|
1820
1852
|
|
|
1821
1853
|
export type WarpTextareaSolidJsProps = {
|
|
1822
|
-
/**
|
|
1854
|
+
/** Keep in mind that using disabled in its current form is an anti-pattern.
|
|
1855
|
+
|
|
1856
|
+
There 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.
|
|
1857
|
+
|
|
1858
|
+
Please consider more informative alternatives before choosing to use disabled on an element. */
|
|
1823
1859
|
"prop:disabled"?: WarpTextarea["disabled"];
|
|
1824
|
-
/**
|
|
1860
|
+
/** Mark the form field as invalid.
|
|
1861
|
+
|
|
1862
|
+
Make sure to also set a `help-text` to help users fix the validation problem. */
|
|
1825
1863
|
"prop:invalid"?: WarpTextarea["invalid"];
|
|
1826
|
-
/**
|
|
1864
|
+
/** Either a `label` or an `aria-label` must be provided. */
|
|
1827
1865
|
"prop:label"?: WarpTextarea["label"];
|
|
1828
|
-
/**
|
|
1866
|
+
/** Use in combination with `invalid` to show as a validation error message,
|
|
1867
|
+
or on its own to show a help text. */
|
|
1829
1868
|
"attr:help-text"?: WarpTextarea["helpText"];
|
|
1830
|
-
/**
|
|
1869
|
+
/** Use in combination with `invalid` to show as a validation error message,
|
|
1870
|
+
or on its own to show a help text. */
|
|
1831
1871
|
"prop:helpText"?: WarpTextarea["helpText"];
|
|
1832
|
-
/**
|
|
1872
|
+
/** Sets the maximum number of text rows before the content starts scrolling. */
|
|
1833
1873
|
"attr:maximum-rows"?: WarpTextarea["maxRows"];
|
|
1834
|
-
/**
|
|
1874
|
+
/** Sets the maximum number of text rows before the content starts scrolling. */
|
|
1835
1875
|
"prop:maxRows"?: WarpTextarea["maxRows"];
|
|
1836
|
-
/**
|
|
1876
|
+
/** Sets the minimum number of text rows the textarea should display */
|
|
1837
1877
|
"attr:minimum-rows"?: WarpTextarea["minRows"];
|
|
1838
|
-
/**
|
|
1878
|
+
/** Sets the minimum number of text rows the textarea should display */
|
|
1839
1879
|
"prop:minRows"?: WarpTextarea["minRows"];
|
|
1840
|
-
/**
|
|
1880
|
+
/** The [name](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name) of the input field when submitting the form */
|
|
1841
1881
|
"prop:name"?: WarpTextarea["name"];
|
|
1842
|
-
/**
|
|
1882
|
+
/** Set a text that is shown in the textarea when it doesn't have a value.
|
|
1883
|
+
|
|
1884
|
+
Placeholder text should not be used as a substitute for labeling the element with a visible label. */
|
|
1843
1885
|
"prop:placeholder"?: WarpTextarea["placeholder"];
|
|
1844
|
-
/** @deprecated Use the native readonly attribute instead
|
|
1886
|
+
/** @deprecated Use the native `readonly` attribute instead */
|
|
1845
1887
|
"bool:read-only"?: WarpTextarea["readOnly"];
|
|
1846
|
-
/** @deprecated Use the native readonly attribute instead
|
|
1888
|
+
/** @deprecated Use the native `readonly` attribute instead */
|
|
1847
1889
|
"prop:readOnly"?: WarpTextarea["readOnly"];
|
|
1848
|
-
/**
|
|
1890
|
+
/** Whether the input can be selected but not changed by the user */
|
|
1849
1891
|
"prop:readonly"?: WarpTextarea["readonly"];
|
|
1850
|
-
/**
|
|
1892
|
+
/** Whether user input is required on the input before form submission */
|
|
1851
1893
|
"prop:required"?: WarpTextarea["required"];
|
|
1852
|
-
/**
|
|
1894
|
+
/** Lets you set the current value */
|
|
1853
1895
|
"prop:value"?: WarpTextarea["value"];
|
|
1854
|
-
/**
|
|
1896
|
+
/** Show an icon behind the label indicating the field is optional */
|
|
1855
1897
|
"prop:optional"?: WarpTextarea["optional"];
|
|
1856
|
-
/** */
|
|
1857
|
-
"prop:minHeight"?: WarpTextarea["minHeight"];
|
|
1858
|
-
/** */
|
|
1859
|
-
"prop:maxHeight"?: WarpTextarea["maxHeight"];
|
|
1860
1898
|
|
|
1861
1899
|
/** Set the innerHTML of the element */
|
|
1862
1900
|
innerHTML?: string;
|
|
@@ -1879,37 +1917,54 @@ export type CustomElements = {
|
|
|
1879
1917
|
"w-icon": Partial<WIconProps & BaseProps<WIcon> & BaseEvents>;
|
|
1880
1918
|
|
|
1881
1919
|
/**
|
|
1882
|
-
* A single
|
|
1883
|
-
*
|
|
1884
|
-
* [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-textfield--docs)
|
|
1920
|
+
* A single-line input component used for entering and editing textual or numeric data.
|
|
1885
1921
|
*
|
|
1886
1922
|
* ## Attributes & Properties
|
|
1887
1923
|
*
|
|
1888
1924
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
1889
1925
|
*
|
|
1890
|
-
* - `disabled`:
|
|
1891
|
-
*
|
|
1892
|
-
*
|
|
1893
|
-
*
|
|
1894
|
-
*
|
|
1895
|
-
* - `
|
|
1896
|
-
* - `
|
|
1897
|
-
* - `
|
|
1926
|
+
* - `disabled`: Keep in mind that using disabled in its current form is an anti-pattern.
|
|
1927
|
+
*
|
|
1928
|
+
* There 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.
|
|
1929
|
+
*
|
|
1930
|
+
* Please consider more informative alternatives before choosing to use disabled on an element.
|
|
1931
|
+
* - `invalid`: Mark the form field as invalid. Make sure to also set a `help-text` to help users fix the validation problem.
|
|
1932
|
+
* - `label`: Either a `label` or an `aria-label` must be provided.
|
|
1933
|
+
* - `help-text`/`helpText`: Use in combination with `invalid` to show as a validation error message,
|
|
1934
|
+
* or on its own to show a help text.
|
|
1935
|
+
* - `size`: 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.
|
|
1936
|
+
* - `max`: Use with `type="number"` to set the [maximum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength).
|
|
1937
|
+
* - `min`: Use with `type="number"` to set the [minimum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#minlength).
|
|
1898
1938
|
* - `min-length`/`minLength`: undefined
|
|
1939
|
+
* - `minlength`: 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.
|
|
1899
1940
|
* - `max-length`/`maxLength`: undefined
|
|
1900
|
-
* - `
|
|
1901
|
-
* - `
|
|
1941
|
+
* - `maxlength`: 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.
|
|
1942
|
+
* - `pattern`: 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)
|
|
1943
|
+
* - `placeholder`: Set a text that is shown in the textfield when it doesn't have a value.
|
|
1944
|
+
*
|
|
1945
|
+
* Placeholder text should not be used as a substitute for labeling the element with a visible label.
|
|
1902
1946
|
* - `read-only`/`readOnly`: undefined
|
|
1903
|
-
* - `readonly`:
|
|
1904
|
-
* - `required`:
|
|
1905
|
-
* - `type`:
|
|
1906
|
-
* - `value`:
|
|
1907
|
-
* - `name`:
|
|
1908
|
-
* - `step`:
|
|
1909
|
-
*
|
|
1910
|
-
*
|
|
1911
|
-
*
|
|
1912
|
-
* - `
|
|
1947
|
+
* - `readonly`: Whether the input can be selected but not changed by the user.
|
|
1948
|
+
* - `required`: Whether user input is required on the input before form submission.
|
|
1949
|
+
* - `type`: The [type of input](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#input_types).
|
|
1950
|
+
* - `value`: Lets you set the current value.
|
|
1951
|
+
* - `name`: The [name](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name) of the input field when submitting the form.
|
|
1952
|
+
* - `step`: When used with `number` this attribute forces inputs to be a whole number of `step`.
|
|
1953
|
+
*
|
|
1954
|
+
* For example with a `step="5"` only values that divide evenly on 5 are allowed.
|
|
1955
|
+
* Using arrow up and down in the input field increments and decrements by 5.
|
|
1956
|
+
* - `autocomplete`: 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.
|
|
1957
|
+
* - `formatter`: Function to format value when the input field.
|
|
1958
|
+
*
|
|
1959
|
+
* Only active when the input field does not have focus,
|
|
1960
|
+
* similar to the accessible input [masking example from Filament Group](https://filamentgroup.github.io/politespace/demo/demo.html). (property only)
|
|
1961
|
+
*
|
|
1962
|
+
* ## Slots
|
|
1963
|
+
*
|
|
1964
|
+
* Areas where markup can be added to the component.
|
|
1965
|
+
*
|
|
1966
|
+
* - `suffix`: Use with `<w-affix>` to include a suffix, for example the unit for a number (e. g. km or sek).
|
|
1967
|
+
* - `prefix`: Use with `<w-affix>` to include a prefix, for example a search icon.
|
|
1913
1968
|
*
|
|
1914
1969
|
* ## Methods
|
|
1915
1970
|
*
|
|
@@ -2016,25 +2071,42 @@ export type CustomElements = {
|
|
|
2016
2071
|
"w-button": Partial<WarpButtonProps & BaseProps<WarpButton> & BaseEvents>;
|
|
2017
2072
|
|
|
2018
2073
|
/**
|
|
2074
|
+
* Attention is a versatile component for displaying contextual information and messages. It can be used for a wide range of purposes, such as tooltips, callouts, popovers, and highlights.
|
|
2075
|
+
*
|
|
2076
|
+
* The component is designed to be anchored to a trigger element, providing contextual information related to that element. It supports various placements and styling options to accommodate different use cases and design needs.
|
|
2019
2077
|
*
|
|
2078
|
+
* Note: attention will soon be split into multiple components (tooltip, callout, popover, highlight) at which time this component will be deprecated. For now, use the `tooltip`, `callout`, `popover`, and `highlight` boolean properties to achieve the desired style and behavior.
|
|
2020
2079
|
*
|
|
2021
2080
|
* ## Attributes & Properties
|
|
2022
2081
|
*
|
|
2023
2082
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
2024
2083
|
*
|
|
2025
|
-
* - `show`:
|
|
2026
|
-
*
|
|
2027
|
-
* - `
|
|
2028
|
-
*
|
|
2029
|
-
* - `
|
|
2030
|
-
* -
|
|
2031
|
-
* - `
|
|
2032
|
-
*
|
|
2033
|
-
* - `
|
|
2034
|
-
*
|
|
2035
|
-
* - `
|
|
2036
|
-
*
|
|
2037
|
-
* - `
|
|
2084
|
+
* - `show`: Controls whether the attention panel is visible.
|
|
2085
|
+
* Set to `true` to show the attention content and `false` to hide it.
|
|
2086
|
+
* - `placement`: Preferred placement relative to the trigger element.
|
|
2087
|
+
* Sets the initial direction for positioning, for example `top`, `right`, `bottom`, or `left` variants.
|
|
2088
|
+
* - `tooltip`: Renders the component with tooltip styling and behavior.
|
|
2089
|
+
* Use for compact, non-modal contextual hints anchored to another element.
|
|
2090
|
+
* - `callout`: Renders the component as an inline callout.
|
|
2091
|
+
* Callout mode is used for always-in-flow informational content instead of floating overlay behavior.
|
|
2092
|
+
* - `popover`: Enables native popover behavior for the attention element.
|
|
2093
|
+
* When enabled, the component uses popover semantics and styling suitable for floating surface UI.
|
|
2094
|
+
* - `highlight`: Renders the component with highlight styling.
|
|
2095
|
+
* Use highlight mode to visually emphasize important contextual information.
|
|
2096
|
+
* - `can-close`/`canClose`: Shows a close button inside the attention component.
|
|
2097
|
+
* Adds an internal dismiss action that lets users close the attention panel.
|
|
2098
|
+
* - `no-arrow`/`noArrow`: Hides the directional arrow of the attention component.
|
|
2099
|
+
* Disable the arrow when the visual connection to the trigger should not be shown.
|
|
2100
|
+
* - `distance`: Distance offset between trigger and attention panel.
|
|
2101
|
+
* Defines the main-axis spacing in pixels from the anchor element.
|
|
2102
|
+
* - `skidding`: Cross-axis offset for fine-grained positioning.
|
|
2103
|
+
* Moves the panel along the cross axis in pixels to adjust alignment with the trigger.
|
|
2104
|
+
* - `flip`: Enables automatic flipping when placement has no space.
|
|
2105
|
+
* Allows the component to choose an alternative side if the preferred placement would overflow.
|
|
2106
|
+
* - `cross-axis`/`crossAxis`: Allows overflow checks on the cross axis when flipping.
|
|
2107
|
+
* Use with `flip` to improve collision handling when space is constrained horizontally or vertically.
|
|
2108
|
+
* - `fallback-placements`/`fallbackPlacements`: Ordered list of fallback placements.
|
|
2109
|
+
* Provides explicit alternative placements to try when `flip` is enabled and the preferred placement does not fit.
|
|
2038
2110
|
* - `_initialPlacement`: undefined (property only)
|
|
2039
2111
|
* - `_actualDirection`: undefined (property only)
|
|
2040
2112
|
*
|
|
@@ -2056,14 +2128,22 @@ export type CustomElements = {
|
|
|
2056
2128
|
/**
|
|
2057
2129
|
* `w-badge` is used for showing a small amount of non-interactive color-categorized metadata, like a status or count.
|
|
2058
2130
|
*
|
|
2059
|
-
* [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/layout-badge--docs)
|
|
2060
|
-
*
|
|
2061
2131
|
* ## Attributes & Properties
|
|
2062
2132
|
*
|
|
2063
2133
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
2064
2134
|
*
|
|
2065
|
-
* - `variant`:
|
|
2066
|
-
*
|
|
2135
|
+
* - `variant`: Controls the badge color treatment.
|
|
2136
|
+
* If omitted, the badge uses neutral styling without reflecting a `variant` attribute.
|
|
2137
|
+
* Accepted values are `neutral`, `info`, `positive`, `warning`, `negative`, `disabled`, `price`, and `sponsored`. If omitted, the badge uses neutral styling without reflecting a `variant` attribute.
|
|
2138
|
+
* - `position`: Positions the badge in a corner of a parent element.
|
|
2139
|
+
* Use 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.
|
|
2140
|
+
* Use this with a parent element that has `position: relative`. Accepted values are `top-left`, `top-right`, `bottom-right`, and `bottom-left`.
|
|
2141
|
+
*
|
|
2142
|
+
* ## Slots
|
|
2143
|
+
*
|
|
2144
|
+
* Areas where markup can be added to the component.
|
|
2145
|
+
*
|
|
2146
|
+
* - `(default)`: The content of the badge, which is typically a short string like "New" or "4".
|
|
2067
2147
|
*/
|
|
2068
2148
|
"w-badge": Partial<WarpBadgeProps & BaseProps<WarpBadge> & BaseEvents>;
|
|
2069
2149
|
|
|
@@ -2244,7 +2324,9 @@ export type CustomElements = {
|
|
|
2244
2324
|
* - `day-format`/`dayFormat`: Decides the format of the day in the calendar as read to screen readers.
|
|
2245
2325
|
*
|
|
2246
2326
|
* The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).
|
|
2247
|
-
* - `isDayDisabled`:
|
|
2327
|
+
* - `isDayDisabled`: Lets you control if a date in the calendar should be disabled.
|
|
2328
|
+
*
|
|
2329
|
+
* This needs to be set on the element instance in JavaScript, not as an HTML attribute. (property only)
|
|
2248
2330
|
* - `isCalendarOpen`: undefined (property only)
|
|
2249
2331
|
* - `navigationDate`: undefined (property only)
|
|
2250
2332
|
* - `selectedDate`: undefined (property only) (readonly)
|
|
@@ -2552,7 +2634,6 @@ export type CustomElements = {
|
|
|
2552
2634
|
* - `readonly`: Renders the field in a readonly state.
|
|
2553
2635
|
* - `name`: undefined
|
|
2554
2636
|
* - `value`: undefined
|
|
2555
|
-
* - `_options`: undefined (property only)
|
|
2556
2637
|
*
|
|
2557
2638
|
* ## Events
|
|
2558
2639
|
*
|
|
@@ -2592,12 +2673,6 @@ export type CustomElements = {
|
|
|
2592
2673
|
* - `textFieldDisplayValue`: Value to display in the textfield (shows boundary when focused on empty value) (property only) (readonly)
|
|
2593
2674
|
* - `tooltipDisplayValue`: Value to display in the tooltip (property only) (readonly)
|
|
2594
2675
|
* - `ariaDescriptionText`: undefined (property only) (readonly)
|
|
2595
|
-
* - `disabled`: undefined (property only)
|
|
2596
|
-
* - `invalid`: undefined (property only)
|
|
2597
|
-
* - `openEnded`: undefined (property only)
|
|
2598
|
-
* - `valueFormatter`: undefined (property only)
|
|
2599
|
-
* - `tooltipFormatter`: undefined (property only)
|
|
2600
|
-
* - `labelFormatter`: undefined (property only)
|
|
2601
2676
|
*
|
|
2602
2677
|
* ## Events
|
|
2603
2678
|
*
|
|
@@ -2641,9 +2716,9 @@ export type CustomElements = {
|
|
|
2641
2716
|
* - `step`: undefined
|
|
2642
2717
|
* - `suffix`: Suffix used in text input fields and for the min and max values of the slider.
|
|
2643
2718
|
* - `hidden-textfield`/`hiddenTextfield`: undefined
|
|
2644
|
-
* - `valueFormatter`:
|
|
2645
|
-
* - `tooltipFormatter`:
|
|
2646
|
-
* - `labelFormatter`:
|
|
2719
|
+
* - `valueFormatter`: Formatter for the tooltip and input mask values. (property only)
|
|
2720
|
+
* - `tooltipFormatter`: Replaces valueFormatter for the tooltip. Use in open-ended sliders to show for example "300+ hk" instead of "Max" in the tooltip. (property only)
|
|
2721
|
+
* - `labelFormatter`: Formatter for the min and max labels below the range. (property only)
|
|
2647
2722
|
* - `fieldset`: undefined (property only)
|
|
2648
2723
|
* - `_invalidMessage`: undefined (property only)
|
|
2649
2724
|
* - `_hasInternalError`: undefined (property only)
|
|
@@ -2750,8 +2825,6 @@ export type CustomElements = {
|
|
|
2750
2825
|
* - `over`: undefined
|
|
2751
2826
|
* - `tabIndex`: Override tabIndex setter to set _parentTabIndex (for backwards compatibility). (property only)
|
|
2752
2827
|
* - `_computedAriaSelected`: Computed aria-selected: prefers parent-managed, falls back to own property (property only) (readonly)
|
|
2753
|
-
* - `_parentTabIndex`: undefined (property only)
|
|
2754
|
-
* - `_parentAriaSelected`: undefined (property only)
|
|
2755
2828
|
*/
|
|
2756
2829
|
"w-tab": Partial<WarpTabProps & BaseProps<WarpTab> & BaseEvents>;
|
|
2757
2830
|
|
|
@@ -2767,8 +2840,6 @@ export type CustomElements = {
|
|
|
2767
2840
|
*
|
|
2768
2841
|
* - `active`: Whether this panel is active (visible).
|
|
2769
2842
|
* Set by parent w-tabs via the _parentActive property.
|
|
2770
|
-
* - `_parentActive`: undefined (property only)
|
|
2771
|
-
* - `_parentAriaLabelledBy`: undefined (property only)
|
|
2772
2843
|
*/
|
|
2773
2844
|
"w-tab-panel": Partial<
|
|
2774
2845
|
WarpTabPanelProps & BaseProps<WarpTabPanel> & BaseEvents
|
|
@@ -2796,29 +2867,40 @@ export type CustomElements = {
|
|
|
2796
2867
|
"w-tabs": Partial<WarpTabsProps & BaseProps<WarpTabs> & BaseEvents>;
|
|
2797
2868
|
|
|
2798
2869
|
/**
|
|
2799
|
-
* A
|
|
2870
|
+
* A multi-line text input with built-in form validation, auto-resizing, and styling support.
|
|
2800
2871
|
*
|
|
2801
|
-
*
|
|
2872
|
+
* The component automatically handles:
|
|
2873
|
+
* - Form integration
|
|
2874
|
+
* - Auto-resizing based on content and row constraints
|
|
2875
|
+
* - Built-in validation with customizable error messages
|
|
2876
|
+
* - Accessibility attributes and labeling
|
|
2802
2877
|
*
|
|
2803
2878
|
* ## Attributes & Properties
|
|
2804
2879
|
*
|
|
2805
2880
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
2806
2881
|
*
|
|
2807
|
-
* - `disabled`:
|
|
2808
|
-
*
|
|
2809
|
-
*
|
|
2810
|
-
*
|
|
2811
|
-
*
|
|
2812
|
-
* - `
|
|
2813
|
-
*
|
|
2814
|
-
*
|
|
2882
|
+
* - `disabled`: Keep in mind that using disabled in its current form is an anti-pattern.
|
|
2883
|
+
*
|
|
2884
|
+
* There 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.
|
|
2885
|
+
*
|
|
2886
|
+
* Please consider more informative alternatives before choosing to use disabled on an element.
|
|
2887
|
+
* - `invalid`: Mark the form field as invalid.
|
|
2888
|
+
*
|
|
2889
|
+
* Make sure to also set a `help-text` to help users fix the validation problem.
|
|
2890
|
+
* - `label`: Either a `label` or an `aria-label` must be provided.
|
|
2891
|
+
* - `help-text`/`helpText`: Use in combination with `invalid` to show as a validation error message,
|
|
2892
|
+
* or on its own to show a help text.
|
|
2893
|
+
* - `maximum-rows`/`maxRows`: Sets the maximum number of text rows before the content starts scrolling.
|
|
2894
|
+
* - `minimum-rows`/`minRows`: Sets the minimum number of text rows the textarea should display
|
|
2895
|
+
* - `name`: The [name](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name) of the input field when submitting the form
|
|
2896
|
+
* - `placeholder`: Set a text that is shown in the textarea when it doesn't have a value.
|
|
2897
|
+
*
|
|
2898
|
+
* Placeholder text should not be used as a substitute for labeling the element with a visible label.
|
|
2815
2899
|
* - `read-only`/`readOnly`: undefined
|
|
2816
|
-
* - `readonly`:
|
|
2817
|
-
* - `required`:
|
|
2818
|
-
* - `value`:
|
|
2819
|
-
* - `optional`:
|
|
2820
|
-
* - `minHeight`: undefined (property only)
|
|
2821
|
-
* - `maxHeight`: undefined (property only)
|
|
2900
|
+
* - `readonly`: Whether the input can be selected but not changed by the user
|
|
2901
|
+
* - `required`: Whether user input is required on the input before form submission
|
|
2902
|
+
* - `value`: Lets you set the current value
|
|
2903
|
+
* - `optional`: Show an icon behind the label indicating the field is optional
|
|
2822
2904
|
* - `validationMessage`: Returns the validation message if the textarea is invalid, otherwise an empty string (property only) (readonly)
|
|
2823
2905
|
* - `validity`: Returns the validity state of the textarea (property only) (readonly)
|
|
2824
2906
|
*
|
|
@@ -2854,37 +2936,54 @@ export type CustomElementsSolidJs = {
|
|
|
2854
2936
|
>;
|
|
2855
2937
|
|
|
2856
2938
|
/**
|
|
2857
|
-
* A single
|
|
2858
|
-
*
|
|
2859
|
-
* [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-textfield--docs)
|
|
2939
|
+
* A single-line input component used for entering and editing textual or numeric data.
|
|
2860
2940
|
*
|
|
2861
2941
|
* ## Attributes & Properties
|
|
2862
2942
|
*
|
|
2863
2943
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
2864
2944
|
*
|
|
2865
|
-
* - `disabled`:
|
|
2866
|
-
*
|
|
2867
|
-
*
|
|
2868
|
-
*
|
|
2869
|
-
*
|
|
2870
|
-
* - `
|
|
2871
|
-
* - `
|
|
2872
|
-
* - `
|
|
2945
|
+
* - `disabled`: Keep in mind that using disabled in its current form is an anti-pattern.
|
|
2946
|
+
*
|
|
2947
|
+
* There 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.
|
|
2948
|
+
*
|
|
2949
|
+
* Please consider more informative alternatives before choosing to use disabled on an element.
|
|
2950
|
+
* - `invalid`: Mark the form field as invalid. Make sure to also set a `help-text` to help users fix the validation problem.
|
|
2951
|
+
* - `label`: Either a `label` or an `aria-label` must be provided.
|
|
2952
|
+
* - `help-text`/`helpText`: Use in combination with `invalid` to show as a validation error message,
|
|
2953
|
+
* or on its own to show a help text.
|
|
2954
|
+
* - `size`: 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.
|
|
2955
|
+
* - `max`: Use with `type="number"` to set the [maximum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength).
|
|
2956
|
+
* - `min`: Use with `type="number"` to set the [minimum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#minlength).
|
|
2873
2957
|
* - `min-length`/`minLength`: undefined
|
|
2958
|
+
* - `minlength`: 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.
|
|
2874
2959
|
* - `max-length`/`maxLength`: undefined
|
|
2875
|
-
* - `
|
|
2876
|
-
* - `
|
|
2960
|
+
* - `maxlength`: 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.
|
|
2961
|
+
* - `pattern`: 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)
|
|
2962
|
+
* - `placeholder`: Set a text that is shown in the textfield when it doesn't have a value.
|
|
2963
|
+
*
|
|
2964
|
+
* Placeholder text should not be used as a substitute for labeling the element with a visible label.
|
|
2877
2965
|
* - `read-only`/`readOnly`: undefined
|
|
2878
|
-
* - `readonly`:
|
|
2879
|
-
* - `required`:
|
|
2880
|
-
* - `type`:
|
|
2881
|
-
* - `value`:
|
|
2882
|
-
* - `name`:
|
|
2883
|
-
* - `step`:
|
|
2884
|
-
*
|
|
2885
|
-
*
|
|
2886
|
-
*
|
|
2887
|
-
* - `
|
|
2966
|
+
* - `readonly`: Whether the input can be selected but not changed by the user.
|
|
2967
|
+
* - `required`: Whether user input is required on the input before form submission.
|
|
2968
|
+
* - `type`: The [type of input](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#input_types).
|
|
2969
|
+
* - `value`: Lets you set the current value.
|
|
2970
|
+
* - `name`: The [name](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name) of the input field when submitting the form.
|
|
2971
|
+
* - `step`: When used with `number` this attribute forces inputs to be a whole number of `step`.
|
|
2972
|
+
*
|
|
2973
|
+
* For example with a `step="5"` only values that divide evenly on 5 are allowed.
|
|
2974
|
+
* Using arrow up and down in the input field increments and decrements by 5.
|
|
2975
|
+
* - `autocomplete`: 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.
|
|
2976
|
+
* - `formatter`: Function to format value when the input field.
|
|
2977
|
+
*
|
|
2978
|
+
* Only active when the input field does not have focus,
|
|
2979
|
+
* similar to the accessible input [masking example from Filament Group](https://filamentgroup.github.io/politespace/demo/demo.html). (property only)
|
|
2980
|
+
*
|
|
2981
|
+
* ## Slots
|
|
2982
|
+
*
|
|
2983
|
+
* Areas where markup can be added to the component.
|
|
2984
|
+
*
|
|
2985
|
+
* - `suffix`: Use with `<w-affix>` to include a suffix, for example the unit for a number (e. g. km or sek).
|
|
2986
|
+
* - `prefix`: Use with `<w-affix>` to include a prefix, for example a search icon.
|
|
2888
2987
|
*
|
|
2889
2988
|
* ## Methods
|
|
2890
2989
|
*
|
|
@@ -3005,25 +3104,42 @@ export type CustomElementsSolidJs = {
|
|
|
3005
3104
|
>;
|
|
3006
3105
|
|
|
3007
3106
|
/**
|
|
3107
|
+
* Attention is a versatile component for displaying contextual information and messages. It can be used for a wide range of purposes, such as tooltips, callouts, popovers, and highlights.
|
|
3008
3108
|
*
|
|
3109
|
+
* The component is designed to be anchored to a trigger element, providing contextual information related to that element. It supports various placements and styling options to accommodate different use cases and design needs.
|
|
3110
|
+
*
|
|
3111
|
+
* Note: attention will soon be split into multiple components (tooltip, callout, popover, highlight) at which time this component will be deprecated. For now, use the `tooltip`, `callout`, `popover`, and `highlight` boolean properties to achieve the desired style and behavior.
|
|
3009
3112
|
*
|
|
3010
3113
|
* ## Attributes & Properties
|
|
3011
3114
|
*
|
|
3012
3115
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
3013
3116
|
*
|
|
3014
|
-
* - `show`:
|
|
3015
|
-
*
|
|
3016
|
-
* - `
|
|
3017
|
-
*
|
|
3018
|
-
* - `
|
|
3019
|
-
* -
|
|
3020
|
-
* - `
|
|
3021
|
-
*
|
|
3022
|
-
* - `
|
|
3023
|
-
*
|
|
3024
|
-
* - `
|
|
3025
|
-
*
|
|
3026
|
-
* - `
|
|
3117
|
+
* - `show`: Controls whether the attention panel is visible.
|
|
3118
|
+
* Set to `true` to show the attention content and `false` to hide it.
|
|
3119
|
+
* - `placement`: Preferred placement relative to the trigger element.
|
|
3120
|
+
* Sets the initial direction for positioning, for example `top`, `right`, `bottom`, or `left` variants.
|
|
3121
|
+
* - `tooltip`: Renders the component with tooltip styling and behavior.
|
|
3122
|
+
* Use for compact, non-modal contextual hints anchored to another element.
|
|
3123
|
+
* - `callout`: Renders the component as an inline callout.
|
|
3124
|
+
* Callout mode is used for always-in-flow informational content instead of floating overlay behavior.
|
|
3125
|
+
* - `popover`: Enables native popover behavior for the attention element.
|
|
3126
|
+
* When enabled, the component uses popover semantics and styling suitable for floating surface UI.
|
|
3127
|
+
* - `highlight`: Renders the component with highlight styling.
|
|
3128
|
+
* Use highlight mode to visually emphasize important contextual information.
|
|
3129
|
+
* - `can-close`/`canClose`: Shows a close button inside the attention component.
|
|
3130
|
+
* Adds an internal dismiss action that lets users close the attention panel.
|
|
3131
|
+
* - `no-arrow`/`noArrow`: Hides the directional arrow of the attention component.
|
|
3132
|
+
* Disable the arrow when the visual connection to the trigger should not be shown.
|
|
3133
|
+
* - `distance`: Distance offset between trigger and attention panel.
|
|
3134
|
+
* Defines the main-axis spacing in pixels from the anchor element.
|
|
3135
|
+
* - `skidding`: Cross-axis offset for fine-grained positioning.
|
|
3136
|
+
* Moves the panel along the cross axis in pixels to adjust alignment with the trigger.
|
|
3137
|
+
* - `flip`: Enables automatic flipping when placement has no space.
|
|
3138
|
+
* Allows the component to choose an alternative side if the preferred placement would overflow.
|
|
3139
|
+
* - `cross-axis`/`crossAxis`: Allows overflow checks on the cross axis when flipping.
|
|
3140
|
+
* Use with `flip` to improve collision handling when space is constrained horizontally or vertically.
|
|
3141
|
+
* - `fallback-placements`/`fallbackPlacements`: Ordered list of fallback placements.
|
|
3142
|
+
* Provides explicit alternative placements to try when `flip` is enabled and the preferred placement does not fit.
|
|
3027
3143
|
* - `_initialPlacement`: undefined (property only)
|
|
3028
3144
|
* - `_actualDirection`: undefined (property only)
|
|
3029
3145
|
*
|
|
@@ -3048,14 +3164,22 @@ export type CustomElementsSolidJs = {
|
|
|
3048
3164
|
/**
|
|
3049
3165
|
* `w-badge` is used for showing a small amount of non-interactive color-categorized metadata, like a status or count.
|
|
3050
3166
|
*
|
|
3051
|
-
* [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/layout-badge--docs)
|
|
3052
|
-
*
|
|
3053
3167
|
* ## Attributes & Properties
|
|
3054
3168
|
*
|
|
3055
3169
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
3056
3170
|
*
|
|
3057
|
-
* - `variant`:
|
|
3058
|
-
*
|
|
3171
|
+
* - `variant`: Controls the badge color treatment.
|
|
3172
|
+
* If omitted, the badge uses neutral styling without reflecting a `variant` attribute.
|
|
3173
|
+
* Accepted values are `neutral`, `info`, `positive`, `warning`, `negative`, `disabled`, `price`, and `sponsored`. If omitted, the badge uses neutral styling without reflecting a `variant` attribute.
|
|
3174
|
+
* - `position`: Positions the badge in a corner of a parent element.
|
|
3175
|
+
* Use 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.
|
|
3176
|
+
* Use this with a parent element that has `position: relative`. Accepted values are `top-left`, `top-right`, `bottom-right`, and `bottom-left`.
|
|
3177
|
+
*
|
|
3178
|
+
* ## Slots
|
|
3179
|
+
*
|
|
3180
|
+
* Areas where markup can be added to the component.
|
|
3181
|
+
*
|
|
3182
|
+
* - `(default)`: The content of the badge, which is typically a short string like "New" or "4".
|
|
3059
3183
|
*/
|
|
3060
3184
|
"w-badge": Partial<
|
|
3061
3185
|
WarpBadgeProps & WarpBadgeSolidJsProps & BaseProps<WarpBadge> & BaseEvents
|
|
@@ -3253,7 +3377,9 @@ export type CustomElementsSolidJs = {
|
|
|
3253
3377
|
* - `day-format`/`dayFormat`: Decides the format of the day in the calendar as read to screen readers.
|
|
3254
3378
|
*
|
|
3255
3379
|
* The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).
|
|
3256
|
-
* - `isDayDisabled`:
|
|
3380
|
+
* - `isDayDisabled`: Lets you control if a date in the calendar should be disabled.
|
|
3381
|
+
*
|
|
3382
|
+
* This needs to be set on the element instance in JavaScript, not as an HTML attribute. (property only)
|
|
3257
3383
|
* - `isCalendarOpen`: undefined (property only)
|
|
3258
3384
|
* - `navigationDate`: undefined (property only)
|
|
3259
3385
|
* - `selectedDate`: undefined (property only) (readonly)
|
|
@@ -3588,7 +3714,6 @@ export type CustomElementsSolidJs = {
|
|
|
3588
3714
|
* - `readonly`: Renders the field in a readonly state.
|
|
3589
3715
|
* - `name`: undefined
|
|
3590
3716
|
* - `value`: undefined
|
|
3591
|
-
* - `_options`: undefined (property only)
|
|
3592
3717
|
*
|
|
3593
3718
|
* ## Events
|
|
3594
3719
|
*
|
|
@@ -3633,12 +3758,6 @@ export type CustomElementsSolidJs = {
|
|
|
3633
3758
|
* - `textFieldDisplayValue`: Value to display in the textfield (shows boundary when focused on empty value) (property only) (readonly)
|
|
3634
3759
|
* - `tooltipDisplayValue`: Value to display in the tooltip (property only) (readonly)
|
|
3635
3760
|
* - `ariaDescriptionText`: undefined (property only) (readonly)
|
|
3636
|
-
* - `disabled`: undefined (property only)
|
|
3637
|
-
* - `invalid`: undefined (property only)
|
|
3638
|
-
* - `openEnded`: undefined (property only)
|
|
3639
|
-
* - `valueFormatter`: undefined (property only)
|
|
3640
|
-
* - `tooltipFormatter`: undefined (property only)
|
|
3641
|
-
* - `labelFormatter`: undefined (property only)
|
|
3642
3761
|
*
|
|
3643
3762
|
* ## Events
|
|
3644
3763
|
*
|
|
@@ -3685,9 +3804,9 @@ export type CustomElementsSolidJs = {
|
|
|
3685
3804
|
* - `step`: undefined
|
|
3686
3805
|
* - `suffix`: Suffix used in text input fields and for the min and max values of the slider.
|
|
3687
3806
|
* - `hidden-textfield`/`hiddenTextfield`: undefined
|
|
3688
|
-
* - `valueFormatter`:
|
|
3689
|
-
* - `tooltipFormatter`:
|
|
3690
|
-
* - `labelFormatter`:
|
|
3807
|
+
* - `valueFormatter`: Formatter for the tooltip and input mask values. (property only)
|
|
3808
|
+
* - `tooltipFormatter`: Replaces valueFormatter for the tooltip. Use in open-ended sliders to show for example "300+ hk" instead of "Max" in the tooltip. (property only)
|
|
3809
|
+
* - `labelFormatter`: Formatter for the min and max labels below the range. (property only)
|
|
3691
3810
|
* - `fieldset`: undefined (property only)
|
|
3692
3811
|
* - `_invalidMessage`: undefined (property only)
|
|
3693
3812
|
* - `_hasInternalError`: undefined (property only)
|
|
@@ -3809,8 +3928,6 @@ export type CustomElementsSolidJs = {
|
|
|
3809
3928
|
* - `over`: undefined
|
|
3810
3929
|
* - `tabIndex`: Override tabIndex setter to set _parentTabIndex (for backwards compatibility). (property only)
|
|
3811
3930
|
* - `_computedAriaSelected`: Computed aria-selected: prefers parent-managed, falls back to own property (property only) (readonly)
|
|
3812
|
-
* - `_parentTabIndex`: undefined (property only)
|
|
3813
|
-
* - `_parentAriaSelected`: undefined (property only)
|
|
3814
3931
|
*/
|
|
3815
3932
|
"w-tab": Partial<
|
|
3816
3933
|
WarpTabProps & WarpTabSolidJsProps & BaseProps<WarpTab> & BaseEvents
|
|
@@ -3828,8 +3945,6 @@ export type CustomElementsSolidJs = {
|
|
|
3828
3945
|
*
|
|
3829
3946
|
* - `active`: Whether this panel is active (visible).
|
|
3830
3947
|
* Set by parent w-tabs via the _parentActive property.
|
|
3831
|
-
* - `_parentActive`: undefined (property only)
|
|
3832
|
-
* - `_parentAriaLabelledBy`: undefined (property only)
|
|
3833
3948
|
*/
|
|
3834
3949
|
"w-tab-panel": Partial<
|
|
3835
3950
|
WarpTabPanelProps &
|
|
@@ -3862,29 +3977,40 @@ export type CustomElementsSolidJs = {
|
|
|
3862
3977
|
>;
|
|
3863
3978
|
|
|
3864
3979
|
/**
|
|
3865
|
-
* A
|
|
3980
|
+
* A multi-line text input with built-in form validation, auto-resizing, and styling support.
|
|
3866
3981
|
*
|
|
3867
|
-
*
|
|
3982
|
+
* The component automatically handles:
|
|
3983
|
+
* - Form integration
|
|
3984
|
+
* - Auto-resizing based on content and row constraints
|
|
3985
|
+
* - Built-in validation with customizable error messages
|
|
3986
|
+
* - Accessibility attributes and labeling
|
|
3868
3987
|
*
|
|
3869
3988
|
* ## Attributes & Properties
|
|
3870
3989
|
*
|
|
3871
3990
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
3872
3991
|
*
|
|
3873
|
-
* - `disabled`:
|
|
3874
|
-
*
|
|
3875
|
-
*
|
|
3876
|
-
*
|
|
3877
|
-
*
|
|
3878
|
-
* - `
|
|
3879
|
-
*
|
|
3880
|
-
*
|
|
3992
|
+
* - `disabled`: Keep in mind that using disabled in its current form is an anti-pattern.
|
|
3993
|
+
*
|
|
3994
|
+
* There 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.
|
|
3995
|
+
*
|
|
3996
|
+
* Please consider more informative alternatives before choosing to use disabled on an element.
|
|
3997
|
+
* - `invalid`: Mark the form field as invalid.
|
|
3998
|
+
*
|
|
3999
|
+
* Make sure to also set a `help-text` to help users fix the validation problem.
|
|
4000
|
+
* - `label`: Either a `label` or an `aria-label` must be provided.
|
|
4001
|
+
* - `help-text`/`helpText`: Use in combination with `invalid` to show as a validation error message,
|
|
4002
|
+
* or on its own to show a help text.
|
|
4003
|
+
* - `maximum-rows`/`maxRows`: Sets the maximum number of text rows before the content starts scrolling.
|
|
4004
|
+
* - `minimum-rows`/`minRows`: Sets the minimum number of text rows the textarea should display
|
|
4005
|
+
* - `name`: The [name](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name) of the input field when submitting the form
|
|
4006
|
+
* - `placeholder`: Set a text that is shown in the textarea when it doesn't have a value.
|
|
4007
|
+
*
|
|
4008
|
+
* Placeholder text should not be used as a substitute for labeling the element with a visible label.
|
|
3881
4009
|
* - `read-only`/`readOnly`: undefined
|
|
3882
|
-
* - `readonly`:
|
|
3883
|
-
* - `required`:
|
|
3884
|
-
* - `value`:
|
|
3885
|
-
* - `optional`:
|
|
3886
|
-
* - `minHeight`: undefined (property only)
|
|
3887
|
-
* - `maxHeight`: undefined (property only)
|
|
4010
|
+
* - `readonly`: Whether the input can be selected but not changed by the user
|
|
4011
|
+
* - `required`: Whether user input is required on the input before form submission
|
|
4012
|
+
* - `value`: Lets you set the current value
|
|
4013
|
+
* - `optional`: Show an icon behind the label indicating the field is optional
|
|
3888
4014
|
* - `validationMessage`: Returns the validation message if the textarea is invalid, otherwise an empty string (property only) (readonly)
|
|
3889
4015
|
* - `validity`: Returns the validity state of the textarea (property only) (readonly)
|
|
3890
4016
|
*
|