@skf-design-system/ui-components 1.0.0-alpha.28 → 1.0.0-alpha.29
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.
@@ -46,7 +46,7 @@ export type ScopedElements<Prefix extends string = "", Suffix extends string = "
|
|
46
46
|
[Key in keyof CustomElements as `${Prefix}${Key}${Suffix}`]: CustomElements[Key];
|
47
47
|
};
|
48
48
|
|
49
|
-
type BaseProps = {
|
49
|
+
type BaseProps = Partial<HTMLElement> & {
|
50
50
|
/** Content added between the opening and closing tags of the element */
|
51
51
|
children?: any;
|
52
52
|
/** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
|
@@ -85,6 +85,523 @@ type BaseProps = {
|
|
85
85
|
translate?: "yes" | "no";
|
86
86
|
};
|
87
87
|
|
88
|
+
type BaseEvents = {};
|
89
|
+
|
90
|
+
export type SkfAccordionProps = {
|
91
|
+
/** If true, will animate the expand/collapse state */
|
92
|
+
animated?: SkfAccordion["animated"];
|
93
|
+
/** Defines which heading element will be rendered */
|
94
|
+
"heading-as"?: SkfAccordion["headingAs"];
|
95
|
+
/** If true, adds a gap between each item */
|
96
|
+
gap?: SkfAccordion["gap"];
|
97
|
+
/** If true, allowes multiple accordion items to open */
|
98
|
+
multiple?: SkfAccordion["multiple"];
|
99
|
+
/** If true, renders the small version */
|
100
|
+
small?: SkfAccordion["small"];
|
101
|
+
/** If true, will truncate all headings in collapsed state */
|
102
|
+
truncate?: SkfAccordion["truncate"];
|
103
|
+
};
|
104
|
+
|
105
|
+
export type SkfAlertProps = {
|
106
|
+
/** If true, alert is being used as a toast (alertdialog) with an close button */
|
107
|
+
closeable?: SkfAlert["closeable"];
|
108
|
+
/** Close button aria-label */
|
109
|
+
"button-label"?: SkfAlert["buttonLabel"];
|
110
|
+
/** If defined, displays leading icon */
|
111
|
+
icon?: SkfAlert["icon"];
|
112
|
+
/** If defined, gives the supplied appearance */
|
113
|
+
severity?: SkfAlert["severity"];
|
114
|
+
|
115
|
+
/** Fires when the close button is clicked */
|
116
|
+
"onskf-alert-close"?: (e: CustomEvent<never>) => void;
|
117
|
+
};
|
118
|
+
|
119
|
+
export type SkfButtonProps = {
|
120
|
+
/** If true, gives destructive appearance. **Notice!** Only applicable if `variant` is `primary`. */
|
121
|
+
destructive?: SkfButton["destructive"];
|
122
|
+
/** If true, removes border */
|
123
|
+
disabled?: SkfButton["disabled"];
|
124
|
+
/** If provided, renders an icon before or after the text */
|
125
|
+
icon?: SkfButton["icon"];
|
126
|
+
/** If provided, determines the positioning of the icon in relation to the text */
|
127
|
+
"icon-position"?: SkfButton["iconPosition"];
|
128
|
+
/** If true, hides text & icon and shows loading indicator. **Notice!** Only applicable if `variant` is `primary`. */
|
129
|
+
loading?: SkfButton["loading"];
|
130
|
+
/** */
|
131
|
+
"no-validate"?: SkfButton["noValidate"];
|
132
|
+
/** If provided, displays an alternative size */
|
133
|
+
size?: SkfButton["size"];
|
134
|
+
/** If provided, changes the button type */
|
135
|
+
type?: SkfButton["type"];
|
136
|
+
/** If provided, alters the appearance */
|
137
|
+
variant?: SkfButton["variant"];
|
138
|
+
|
139
|
+
/** Fires when the button is clicked */
|
140
|
+
onclick?: (e: CustomEvent<never>) => void;
|
141
|
+
};
|
142
|
+
|
143
|
+
export type SkfCardProps = {
|
144
|
+
/** If true, removes border */
|
145
|
+
"no-border"?: SkfCard["noBorder"];
|
146
|
+
/** If true, removes padding */
|
147
|
+
"no-padding"?: SkfCard["noPadding"];
|
148
|
+
/** If true, the Card fills the parent element height */
|
149
|
+
stretch?: SkfCard["stretch"];
|
150
|
+
};
|
151
|
+
|
152
|
+
export type SkfCheckboxProps = {
|
153
|
+
/** If true, sets disabled state */
|
154
|
+
disabled?: SkfCheckbox["undefined"];
|
155
|
+
/** If true, value is required or must be checked for the form to be submittable */
|
156
|
+
required?: SkfCheckbox["undefined"];
|
157
|
+
/** If defined, outputs helping hints in console */
|
158
|
+
debug?: SkfCheckbox["debug"];
|
159
|
+
/** If true, outputs helping hints in console */
|
160
|
+
checked?: SkfCheckbox["checked"];
|
161
|
+
/** If true, forces component to invalid state until removed */
|
162
|
+
"custom-invalid"?: SkfCheckbox["customInvalid"];
|
163
|
+
/** If true and the checkbox is unchecked, the checkbox will appear indeterminate */
|
164
|
+
indeterminate?: SkfCheckbox["indeterminate"];
|
165
|
+
/** If defined, sets the input's label. Alternatively, you can use the `label` attribute. */
|
166
|
+
label?: SkfCheckbox["label"];
|
167
|
+
/** If defined, adds name to the input-element */
|
168
|
+
name?: SkfCheckbox["name"];
|
169
|
+
/** If defined, renders an alternative A11y text for the asterisk */
|
170
|
+
"required-label"?: SkfCheckbox["requiredLabel"];
|
171
|
+
/** If defined, styles checkbox using provided severity */
|
172
|
+
severity?: SkfCheckbox["severity"];
|
173
|
+
/** If true, displays valid state after interaction */
|
174
|
+
"show-valid"?: SkfCheckbox["showValid"];
|
175
|
+
/** Size of the checkbox */
|
176
|
+
size?: SkfCheckbox["size"];
|
177
|
+
/** The current value of the input field */
|
178
|
+
value?: SkfCheckbox["value"];
|
179
|
+
|
180
|
+
/** {object} - When the value of the input changes */
|
181
|
+
onchange?: (e: CustomEvent<never>) => void;
|
182
|
+
};
|
183
|
+
|
184
|
+
export type SkfCollapseProps = {
|
185
|
+
/** If true, will animate the expand/collapse state */
|
186
|
+
animated?: SkfCollapse["animated"];
|
187
|
+
/** If true, will set the collapse to be expanded by default */
|
188
|
+
expanded?: SkfCollapse["expanded"];
|
189
|
+
/** Heading for the collapse */
|
190
|
+
heading?: SkfCollapse["heading"];
|
191
|
+
/** Defines which heading element will be rendered */
|
192
|
+
"heading-as"?: SkfCollapse["headingAs"];
|
193
|
+
/** If true, renders the small version */
|
194
|
+
small?: SkfCollapse["small"];
|
195
|
+
/** If true, will truncate the heading in collapsed state */
|
196
|
+
truncate?: SkfCollapse["truncate"];
|
197
|
+
|
198
|
+
/** Event emitted when toggled */
|
199
|
+
"onskf-collapse-toggle"?: (e: CustomEvent<CustomEvent>) => void;
|
200
|
+
};
|
201
|
+
|
202
|
+
export type SkfDividerProps = {
|
203
|
+
/** Defines the Divider color */
|
204
|
+
color?: SkfDivider["color"];
|
205
|
+
/** If true, renders a div for presentational purpose instead of the semantic hr-element */
|
206
|
+
decorative?: SkfDivider["decorative"];
|
207
|
+
/** If true, renders the divider vertically */
|
208
|
+
vertical?: SkfDivider["vertical"];
|
209
|
+
};
|
210
|
+
|
211
|
+
export type SkfHeadingProps = {
|
212
|
+
/** Controls which heading element will be rendered. Should not be used to affect appearance */
|
213
|
+
as?: SkfHeading["as"];
|
214
|
+
/** If provided, changes the appearance of the heading */
|
215
|
+
"styled-as"?: SkfHeading["styledAs"];
|
216
|
+
};
|
217
|
+
|
218
|
+
export type SkfIconProps = {
|
219
|
+
/** Sets the color of the icon */
|
220
|
+
color?: SkfIcon["color"];
|
221
|
+
/** If defined, adds an alternate description to use for assistive devices */
|
222
|
+
label?: SkfIcon["label"];
|
223
|
+
/** Name of the icon to display */
|
224
|
+
name?: SkfIcon["name"];
|
225
|
+
/** Size of the icon */
|
226
|
+
size?: SkfIcon["size"];
|
227
|
+
};
|
228
|
+
|
229
|
+
export type SkfInputProps = {
|
230
|
+
/** If true, sets disabled state */
|
231
|
+
disabled?: SkfInput["undefined"];
|
232
|
+
/** If true, value is required or must be checked for the form to be submittable */
|
233
|
+
required?: SkfInput["undefined"];
|
234
|
+
/** -m } */
|
235
|
+
autocomplete?: SkfInput["autocomplete"];
|
236
|
+
/** Custom aria-label for the clear button. **Notice!** Only applicable to type=search. */
|
237
|
+
"button-aria-label-clear"?: SkfInput["buttonAriaLabelClear"];
|
238
|
+
/** Custom aria-label for the visibility button. **Notice!** Only applicable to type=password. */
|
239
|
+
"button-aria-label-hide"?: SkfInput["buttonAriaLabelHide"];
|
240
|
+
/** Custom aria-label for the visibility button **Notice!** Only applicable to type=password. */
|
241
|
+
"button-aria-label-show"?: SkfInput["buttonAriaLabelShow"];
|
242
|
+
/** If defined, forces component to invalid state until removed. Its value is used as hint text. */
|
243
|
+
"custom-invalid"?: SkfInput["customInvalid"];
|
244
|
+
/** If true, outputs helping hints in console */
|
245
|
+
debug?: SkfInput["debug"];
|
246
|
+
/** If true, hides the label visually */
|
247
|
+
"hide-label"?: SkfInput["hideLabel"];
|
248
|
+
/** If defined, displays informational text below the field */
|
249
|
+
hint?: SkfInput["hint"];
|
250
|
+
/** Tells what keyboard to use if applicable */
|
251
|
+
inputmode?: SkfInput["inputmode"];
|
252
|
+
/** If defined, sets the input's label. Alternatively, you can use the `label` attribute. */
|
253
|
+
label?: SkfInput["label"];
|
254
|
+
/** If defined, displays a prefix/adornment before the input-element */
|
255
|
+
leading?: SkfInput["leading"];
|
256
|
+
/** If defined, sets the maximum value to accept for this input */
|
257
|
+
max?: SkfInput["max"];
|
258
|
+
/** If defined, sets the maximum character length to accept for this input */
|
259
|
+
maxlength?: SkfInput["maxLength"];
|
260
|
+
/** If defined, sets the minimum value to accept for this input */
|
261
|
+
min?: SkfInput["min"];
|
262
|
+
/** If defined, sets the minimum character length to accept for this input */
|
263
|
+
minlength?: SkfInput["minLength"];
|
264
|
+
/** If defined, adds name to the input-element */
|
265
|
+
name?: SkfInput["name"];
|
266
|
+
/** If defined, adds name to the input-element */
|
267
|
+
pattern?: SkfInput["pattern"];
|
268
|
+
/** If defined, displays placeholder text */
|
269
|
+
placeholder?: SkfInput["placeholder"];
|
270
|
+
/** If true, makes the element not mutable, meaning the user can not edit the control */
|
271
|
+
readonly?: SkfInput["readonly"];
|
272
|
+
/** If defined, renders an alternative A11y text for the asterisk */
|
273
|
+
"required-label"?: SkfInput["requiredLabel"];
|
274
|
+
/** If defined, displays provided severity state */
|
275
|
+
severity?: SkfInput["severity"];
|
276
|
+
/** If true, displays valid state after interaction */
|
277
|
+
"show-valid"?: SkfInput["showValid"];
|
278
|
+
/** Size of the input */
|
279
|
+
size?: SkfInput["size"];
|
280
|
+
/** If defined, displays a suffix/adornment after the input-element */
|
281
|
+
trailing?: SkfInput["trailing"];
|
282
|
+
/** Type of input control */
|
283
|
+
type?: SkfInput["type"];
|
284
|
+
/** Sets validation start */
|
285
|
+
"validate-on"?: SkfInput["validateOn"];
|
286
|
+
/** The current value of the input field */
|
287
|
+
value?: SkfInput["value"];
|
288
|
+
|
289
|
+
/** Fires when the value of the input changes */
|
290
|
+
onchange?: (e: CustomEvent<never>) => void;
|
291
|
+
/** Fires when the input is invalid */
|
292
|
+
oninvalid?: (e: CustomEvent<never>) => void;
|
293
|
+
};
|
294
|
+
|
295
|
+
export type SkfLinkProps = {
|
296
|
+
/** Defines the semantic element to render */
|
297
|
+
as?: SkfLink["as"];
|
298
|
+
/** Defines the text-color */
|
299
|
+
color?: SkfLink["color"];
|
300
|
+
/** If true, disables the link */
|
301
|
+
disabled?: SkfLink["disabled"];
|
302
|
+
/** If defined, downloads the url */
|
303
|
+
download?: SkfLink["download"];
|
304
|
+
/** If defined, loads url on click */
|
305
|
+
href?: SkfLink["href"];
|
306
|
+
/** If defined, renders an icon before or after the text */
|
307
|
+
icon?: SkfLink["icon"];
|
308
|
+
/** Defines the position of the icon in relation to the text */
|
309
|
+
"icon-placement"?: SkfLink["iconPlacement"];
|
310
|
+
/** Defines the relationship of the target object to the link object */
|
311
|
+
rel?: SkfLink["rel"];
|
312
|
+
/** If defined, used on conjunction with onClick property, second argument */
|
313
|
+
route?: SkfLink["route"];
|
314
|
+
/** If true, fills the parents horizontal axis */
|
315
|
+
stretch?: SkfLink["stretch"];
|
316
|
+
/** If defined, specifies where to open the linked document */
|
317
|
+
target?: SkfLink["target"];
|
318
|
+
/** Defines the type of button */
|
319
|
+
type?: SkfLink["type"];
|
320
|
+
/** If provided, custom function triggered by click where the second return parameter enables custom routing. */
|
321
|
+
onClick?: SkfLink["onClick"];
|
322
|
+
};
|
323
|
+
|
324
|
+
export type SkfLoaderProps = {
|
325
|
+
/** Defines the aria-label */
|
326
|
+
"aria-label"?: SkfLoader["ariaLabel"];
|
327
|
+
/** If true, inverts the color (to be used on colored backgrounds) */
|
328
|
+
invert?: SkfLoader["invert"];
|
329
|
+
/** Defines the size of the loader */
|
330
|
+
size?: SkfLoader["size"];
|
331
|
+
/** */
|
332
|
+
role?: SkfLoader["role"];
|
333
|
+
/** */
|
334
|
+
ariaLive?: SkfLoader["ariaLive"];
|
335
|
+
};
|
336
|
+
|
337
|
+
export type SkfLogoProps = {
|
338
|
+
/** Defines the title of the logo */
|
339
|
+
title?: SkfLogo["title"];
|
340
|
+
/** If defined, sets color of the logo */
|
341
|
+
color?: SkfLogo["color"];
|
342
|
+
};
|
343
|
+
|
344
|
+
export type SkfProgressProps = {
|
345
|
+
/** If true, the progress-bar's fill value is animated */
|
346
|
+
animated?: SkfProgress["animated"];
|
347
|
+
/** Describes how much work the task indicated by the progress element requires */
|
348
|
+
max?: SkfProgress["max"];
|
349
|
+
/** Specifies how much of the task that has been completed */
|
350
|
+
value?: SkfProgress["value"];
|
351
|
+
};
|
352
|
+
|
353
|
+
export type SkfRadioProps = {
|
354
|
+
/** If true, sets disabled state */
|
355
|
+
disabled?: SkfRadio["undefined"];
|
356
|
+
/** If true, value is required or must be checked for the form to be submittable */
|
357
|
+
required?: SkfRadio["undefined"];
|
358
|
+
/** If true, outputs helping hints in console */
|
359
|
+
debug?: SkfRadio["debug"];
|
360
|
+
/** If true, outputs helping hints in console */
|
361
|
+
checked?: SkfRadio["checked"];
|
362
|
+
/** If true, forces component to invalid state until removed */
|
363
|
+
"custom-invalid"?: SkfRadio["customInvalid"];
|
364
|
+
/** If defined, sets the input's label unless the default slot is used. Alternatively, you can use the `label` attribute. */
|
365
|
+
label?: SkfRadio["label"];
|
366
|
+
/** If defined, adds name to the input-element */
|
367
|
+
name?: SkfRadio["name"];
|
368
|
+
/** If defined, renders an alternative A11y text for the asterisk */
|
369
|
+
"required-label"?: SkfRadio["requiredLabel"];
|
370
|
+
/** Size of the Radio */
|
371
|
+
size?: SkfRadio["size"];
|
372
|
+
/** If defined, displays provided severity state */
|
373
|
+
severity?: SkfRadio["severity"];
|
374
|
+
/** If true, displays valid state after interaction */
|
375
|
+
"show-valid"?: SkfRadio["showValid"];
|
376
|
+
/** The current value of the input field */
|
377
|
+
value?: SkfRadio["value"];
|
378
|
+
|
379
|
+
/** {object} - When the value of the input changes */
|
380
|
+
onchange?: (e: CustomEvent<never>) => void;
|
381
|
+
};
|
382
|
+
|
383
|
+
export type SkfSelectProps = {
|
384
|
+
/** If true, the select is disabled `default: false` */
|
385
|
+
disabled?: SkfSelect["undefined"];
|
386
|
+
/** Sets the first visible text on the component */
|
387
|
+
"button-label"?: SkfSelect["buttonLabel"];
|
388
|
+
/** If defined, forces component to invalid state until removed */
|
389
|
+
"custom-invalid"?: SkfSelect["customInvalid"];
|
390
|
+
/** If true, hides the label visually */
|
391
|
+
"hide-label"?: SkfSelect["hideLabel"];
|
392
|
+
/** If true and mulltiple is true, no tags are displayed under the select */
|
393
|
+
"hide-tags"?: SkfSelect["hideTags"];
|
394
|
+
/** If defined, sets the hint text under the select component in the form */
|
395
|
+
hint?: SkfSelect["hint"];
|
396
|
+
/** If defined, displays provided label */
|
397
|
+
label?: SkfSelect["label"];
|
398
|
+
/** If defined, limits the number of selectable options */
|
399
|
+
max?: SkfSelect["max"];
|
400
|
+
/** If defined, sets the minimum number of required options */
|
401
|
+
min?: SkfSelect["min"];
|
402
|
+
/** If true, allows for multiple options to be selected */
|
403
|
+
multiple?: SkfSelect["multiple"];
|
404
|
+
/** If defined, set name of the component */
|
405
|
+
name?: SkfSelect["name"];
|
406
|
+
/** If defined, renders an alternative A11y text for the asterisk */
|
407
|
+
"required-label"?: SkfSelect["requiredLabel"];
|
408
|
+
/** If defined, displays provided severity state */
|
409
|
+
severity?: SkfSelect["severity"];
|
410
|
+
/** If true, displays valid state after interaction */
|
411
|
+
"show-valid"?: SkfSelect["showValid"];
|
412
|
+
/** Size of the Select */
|
413
|
+
size?: SkfSelect["size"];
|
414
|
+
/** A readonly property that returns the selected value(s) in a array */
|
415
|
+
selectedValues?: SkfSelect["selectedValues"];
|
416
|
+
/** A readonly property that returns the selected slot(s) text content in a array */
|
417
|
+
selectedOptionsText?: SkfSelect["selectedOptionsText"];
|
418
|
+
/** Read only, returns the selected value. (if multiple: in a comma separated string) */
|
419
|
+
value?: SkfSelect["value"];
|
420
|
+
/** */
|
421
|
+
_selectedOptions?: SkfSelect["_selectedOptions"];
|
422
|
+
/** Fired when the selected option(s) changes */
|
423
|
+
onchange?: (e: CustomEvent<never>) => void;
|
424
|
+
/** Fired when the select is invalid */
|
425
|
+
oninvalid?: (e: CustomEvent<never>) => void;
|
426
|
+
/** Fired when the form is reset */
|
427
|
+
onreset?: (e: CustomEvent<never>) => void;
|
428
|
+
/** {detail: {expanded: boolean}} Fired when the select dropdown is toggled */
|
429
|
+
"onskf-select:dropdown"?: (e: CustomEvent<never>) => void;
|
430
|
+
/** {detail: {value: string | null, option: SkfSelectOption}} Fired when the select dropdown is toggled */
|
431
|
+
"onskf-select-option:select"?: (e: CustomEvent<never>) => void;
|
432
|
+
};
|
433
|
+
|
434
|
+
export type SkfSelectOptionProps = {
|
435
|
+
/** If true, prevents interaction with the option */
|
436
|
+
disabled?: SkfSelectOption["disabled"];
|
437
|
+
/** If defined, set an icon */
|
438
|
+
icon?: SkfSelectOption["icon"];
|
439
|
+
/** If defined, sets provided color on the icon */
|
440
|
+
"icon-color"?: SkfSelectOption["iconColor"];
|
441
|
+
/** If true, sets the option as selected */
|
442
|
+
selected?: SkfSelectOption["selected"];
|
443
|
+
/** If defined, sets a short label */
|
444
|
+
"short-label"?: SkfSelectOption["shortLabel"];
|
445
|
+
/** Returns or sets the tags value. If value is omitted, defaults to the tags text. */
|
446
|
+
value?: SkfSelectOption["value"];
|
447
|
+
/** The option's label text (equivalent to the tags textContent) */
|
448
|
+
text?: SkfSelectOption["text"];
|
449
|
+
/** */
|
450
|
+
role?: SkfSelectOption["role"];
|
451
|
+
/** */
|
452
|
+
_parent?: SkfSelectOption["_parent"];
|
453
|
+
/** */
|
454
|
+
_shortcutUpdate?: SkfSelectOption["_shortcutUpdate"];
|
455
|
+
/** {detail: { value: string | null, option: SkfSelectOption }} Fires when the option is selected/deselected. */
|
456
|
+
"onskf-select-option:select"?: (e: CustomEvent<never>) => void;
|
457
|
+
};
|
458
|
+
|
459
|
+
export type SkfSelectOptionGroupProps = {
|
460
|
+
/** */
|
461
|
+
label?: SkfSelectOptionGroup["label"];
|
462
|
+
};
|
463
|
+
|
464
|
+
export type SkfSwitchProps = {
|
465
|
+
/** If true, sets disabled state */
|
466
|
+
disabled?: SkfSwitch["undefined"];
|
467
|
+
/** If true, value is required or must be checked for the form to be submittable */
|
468
|
+
required?: SkfSwitch["undefined"];
|
469
|
+
/** If true, outputs helping hints in console */
|
470
|
+
debug?: SkfSwitch["debug"];
|
471
|
+
/** If true, outputs helping hints in console */
|
472
|
+
checked?: SkfSwitch["checked"];
|
473
|
+
/** If true, hides the label visually */
|
474
|
+
"hide-label"?: SkfSwitch["hideLabel"];
|
475
|
+
/** If defined, sets the input's label unless the default slot is used. Alternatively, you can use the `label` attribute. */
|
476
|
+
label?: SkfSwitch["label"];
|
477
|
+
/** If defined, adds name to the input-element */
|
478
|
+
name?: SkfSwitch["name"];
|
479
|
+
/** If defined, renders an alternative A11y text for the asterisk */
|
480
|
+
"required-label"?: SkfSwitch["requiredLabel"];
|
481
|
+
/** Size of the Switch */
|
482
|
+
size?: SkfSwitch["size"];
|
483
|
+
/** The current value of the input field */
|
484
|
+
value?: SkfSwitch["value"];
|
485
|
+
};
|
486
|
+
|
487
|
+
export type SkfTabProps = {
|
488
|
+
/** The name of the tab-panel this tab is associated with. The panel must be located in the same tab group. */
|
489
|
+
panel?: SkfTab["panel"];
|
490
|
+
/** */
|
491
|
+
selected?: SkfTab["selected"];
|
492
|
+
/** */
|
493
|
+
variant?: SkfTab["variant"];
|
494
|
+
/** */
|
495
|
+
role?: SkfTab["role"];
|
496
|
+
/** {detail: { selected: true, tab: SkfTab }} Fires when the tab is selected */
|
497
|
+
"onskf-tab-select"?: (e: CustomEvent<CustomEvent>) => void;
|
498
|
+
/** Fired when the component is clicked */
|
499
|
+
onclick?: (e: CustomEvent<never>) => void;
|
500
|
+
};
|
501
|
+
|
502
|
+
export type SkfTabGroupProps = {
|
503
|
+
/** Sets the default selected tab */
|
504
|
+
"default-selected"?: SkfTabGroup["defaultSelected"];
|
505
|
+
/** If true, removes border */
|
506
|
+
"no-border"?: SkfTabGroup["noBorder"];
|
507
|
+
/** If true, removes padding */
|
508
|
+
"no-padding"?: SkfTabGroup["noPadding"];
|
509
|
+
/** If true, component fills the parent element height */
|
510
|
+
stretch?: SkfTabGroup["stretch"];
|
511
|
+
/** Sets the appearance of the tabs */
|
512
|
+
variant?: SkfTabGroup["variant"];
|
513
|
+
};
|
514
|
+
|
515
|
+
export type SkfTabPanelProps = {
|
516
|
+
/** The tab panel's name. */
|
517
|
+
name?: SkfTabPanel["name"];
|
518
|
+
/** */
|
519
|
+
active?: SkfTabPanel["active"];
|
520
|
+
/** */
|
521
|
+
role?: SkfTabPanel["role"];
|
522
|
+
};
|
523
|
+
|
524
|
+
export type SkfTagProps = {
|
525
|
+
/** Specifies Tag size */
|
526
|
+
size?: SkfTag["size"];
|
527
|
+
/** If defined, displays leading/provided icon */
|
528
|
+
icon?: SkfTag["icon"];
|
529
|
+
/** If defined, gives the supplied appearance */
|
530
|
+
color?: SkfTag["color"];
|
531
|
+
/** If true, adds trailing button to remove tag */
|
532
|
+
removable?: SkfTag["removable"];
|
533
|
+
/** If defined, accepts a function that runs on click */
|
534
|
+
onClick?: SkfTag["onClick"];
|
535
|
+
/** If defined, accepts a function that runs on click. Self removal can be overridden by using `event.stopPropagation()`. */
|
536
|
+
onRemove?: SkfTag["onRemove"];
|
537
|
+
};
|
538
|
+
|
539
|
+
export type SkfTextAreaProps = {
|
540
|
+
/** If true, sets disabled state */
|
541
|
+
disabled?: SkfTextArea["undefined"];
|
542
|
+
/** If true, value is required or must be checked for the form to be submittable */
|
543
|
+
required?: SkfTextArea["undefined"];
|
544
|
+
/** If defined, sets the cols of the textarea */
|
545
|
+
cols?: SkfTextArea["cols"];
|
546
|
+
/** If defined, forces component to invalid state until removed. Its value is used as hint text. */
|
547
|
+
"custom-invalid"?: SkfTextArea["customInvalid"];
|
548
|
+
/** If true, outputs helping hints in console */
|
549
|
+
debug?: SkfTextArea["debug"];
|
550
|
+
/** If true, hides the label visually */
|
551
|
+
"hide-label"?: SkfTextArea["hideLabel"];
|
552
|
+
/** If defined, displays informational text below the field */
|
553
|
+
hint?: SkfTextArea["hint"];
|
554
|
+
/** If defined, sets the input's label unless the default slot is used. Alternatively, you can use the `label` attribute. */
|
555
|
+
label?: SkfTextArea["label"];
|
556
|
+
/** If defined, adds name to the input-element */
|
557
|
+
name?: SkfTextArea["name"];
|
558
|
+
/** If defined, sets the maximum character length to accept for this input */
|
559
|
+
maxlength?: SkfTextArea["maxLength"];
|
560
|
+
/** If defined, sets the minimum character length to accept for this input */
|
561
|
+
minlength?: SkfTextArea["minLength"];
|
562
|
+
/** If defined, displays placeholder text */
|
563
|
+
placeholder?: SkfTextArea["placeholder"];
|
564
|
+
/** If true, makes the element not mutable, meaning the user can not edit the control */
|
565
|
+
readonly?: SkfTextArea["readonly"];
|
566
|
+
/** If defined, renders an alternative A11y text for the asterisk */
|
567
|
+
"required-label"?: SkfTextArea["requiredLabel"];
|
568
|
+
/** If defined, sets the rows of the textarea */
|
569
|
+
rows?: SkfTextArea["rows"];
|
570
|
+
/** If defined, displays provided severity state */
|
571
|
+
severity?: SkfTextArea["severity"];
|
572
|
+
/** If true, displays valid state after interaction */
|
573
|
+
"show-valid"?: SkfTextArea["showValid"];
|
574
|
+
/** Size of the Textarea */
|
575
|
+
size?: SkfTextArea["size"];
|
576
|
+
/** Sets validation start */
|
577
|
+
"validate-on"?: SkfTextArea["validateOn"];
|
578
|
+
/** The current value of the text area */
|
579
|
+
value?: SkfTextArea["value"];
|
580
|
+
|
581
|
+
/** Fires when the value of the input changes */
|
582
|
+
onchange?: (e: CustomEvent<never>) => void;
|
583
|
+
/** Fires when the input is invalid */
|
584
|
+
oninvalid?: (e: CustomEvent<never>) => void;
|
585
|
+
};
|
586
|
+
|
587
|
+
export type SkfToastProps = {
|
588
|
+
/** If provided, adds a close button to the toast and will not disapear until user actively dismisses it. */
|
589
|
+
closeable?: SkfToast["closeable"];
|
590
|
+
/** */
|
591
|
+
debug?: SkfToast["debug"];
|
592
|
+
/** Severity of the toast. */
|
593
|
+
severity?: SkfToast["severity"];
|
594
|
+
/** Time in seconds before the toast disappears. */
|
595
|
+
timer?: SkfToast["timer"];
|
596
|
+
/** offsets where toasts emerge vertically */
|
597
|
+
topOffset?: SkfToast["topOffset"];
|
598
|
+
};
|
599
|
+
|
600
|
+
export type SkfToastWrapperProps = {
|
601
|
+
/** */
|
602
|
+
debug?: SkfToastWrapper["debug"];
|
603
|
+
};
|
604
|
+
|
88
605
|
export type CustomElements = {
|
89
606
|
/**
|
90
607
|
* The `<skf-accordion>` component consists of multiple `<skf-collapse>`, working together.
|
@@ -96,7 +613,7 @@ export type CustomElements = {
|
|
96
613
|
* ### **Slots:**
|
97
614
|
* - _default_ - Expects one or more <skf-accordion-item> element(s)
|
98
615
|
*/
|
99
|
-
"skf-accordion": Partial<
|
616
|
+
"skf-accordion": Partial<SkfAccordionProps & BaseProps & BaseEvents>;
|
100
617
|
|
101
618
|
/**
|
102
619
|
* The `<skf-alert>` is a type of notification that appears in-line
|
@@ -110,7 +627,7 @@ export type CustomElements = {
|
|
110
627
|
* - _default_ - Alert message. **Notice!** See design principles for approved content
|
111
628
|
* - **link** - Slot for the link
|
112
629
|
*/
|
113
|
-
"skf-alert": Partial<
|
630
|
+
"skf-alert": Partial<SkfAlertProps & BaseProps & BaseEvents>;
|
114
631
|
|
115
632
|
/**
|
116
633
|
* Component to be used in forms or for interactivity
|
@@ -126,7 +643,7 @@ export type CustomElements = {
|
|
126
643
|
* ### **Slots:**
|
127
644
|
* - _default_ - The Primary content
|
128
645
|
*/
|
129
|
-
"skf-button": Partial<
|
646
|
+
"skf-button": Partial<SkfButtonProps & BaseProps & BaseEvents>;
|
130
647
|
|
131
648
|
/**
|
132
649
|
* The `<skf-card>` can be used to group related subjects in a container
|
@@ -136,7 +653,7 @@ export type CustomElements = {
|
|
136
653
|
* ### **Slots:**
|
137
654
|
* - _default_ - The card's main content
|
138
655
|
*/
|
139
|
-
"skf-card": Partial<
|
656
|
+
"skf-card": Partial<SkfCardProps & BaseProps & BaseEvents>;
|
140
657
|
|
141
658
|
/**
|
142
659
|
* The `<skf-checkbox>` component is used to create a checkbox input
|
@@ -149,7 +666,7 @@ export type CustomElements = {
|
|
149
666
|
* ### **Slots:**
|
150
667
|
* - _default_ - The Radios label. Alternatively, you can use the `label` attribute.
|
151
668
|
*/
|
152
|
-
"skf-checkbox": Partial<
|
669
|
+
"skf-checkbox": Partial<SkfCheckboxProps & BaseProps & BaseEvents>;
|
153
670
|
|
154
671
|
/**
|
155
672
|
* The `<skf-collapse>` component is a general purpose container for content that can be collapsed / expanded.
|
@@ -168,7 +685,7 @@ export type CustomElements = {
|
|
168
685
|
* ### **Slots:**
|
169
686
|
* - _default_ - Main content
|
170
687
|
*/
|
171
|
-
"skf-collapse": Partial<
|
688
|
+
"skf-collapse": Partial<SkfCollapseProps & BaseProps & BaseEvents>;
|
172
689
|
|
173
690
|
/**
|
174
691
|
* The `<Divider>` component can separate items from each other, to visually emphasize their lack of a relationship between groups of information
|
@@ -179,7 +696,7 @@ export type CustomElements = {
|
|
179
696
|
* - **--skf-divider-spacing** - The amount of space the divider occupies. Pass valid CSS **margin-block** values when horizontal and **margin-inline** when vertical _(default: undefined)_
|
180
697
|
* - **--skf-divider-inset** - The amount of space the divider should be indented. Pass valid CSS **margin-inline** values when horizontal and **margin-block** when vertical _(default: undefined)_
|
181
698
|
*/
|
182
|
-
"skf-divider": Partial<
|
699
|
+
"skf-divider": Partial<SkfDividerProps & BaseProps & BaseEvents>;
|
183
700
|
|
184
701
|
/**
|
185
702
|
* The `<Heading>` component is to deliniate content on a page. When using, take note not to skip heading levels.<br>
|
@@ -190,14 +707,14 @@ export type CustomElements = {
|
|
190
707
|
* ### **Slots:**
|
191
708
|
* - _default_ - The headings content
|
192
709
|
*/
|
193
|
-
"skf-heading": Partial<
|
710
|
+
"skf-heading": Partial<SkfHeadingProps & BaseProps & BaseEvents>;
|
194
711
|
|
195
712
|
/**
|
196
713
|
* The `<skf-icon>` component is used to clarify interface elements. When used, should always be paired with (possibly invisible) text
|
197
714
|
* ---
|
198
715
|
*
|
199
716
|
*/
|
200
|
-
"skf-icon": Partial<
|
717
|
+
"skf-icon": Partial<SkfIconProps & BaseProps & BaseEvents>;
|
201
718
|
|
202
719
|
/**
|
203
720
|
* The skf-text-field is used to create a text input field. It can be used inside a form element or standalone.
|
@@ -211,7 +728,7 @@ export type CustomElements = {
|
|
211
728
|
* ### **Slots:**
|
212
729
|
* - _default_ - The Inputs label. Alternatively, you can use the `label` attribute.
|
213
730
|
*/
|
214
|
-
"skf-input": Partial<
|
731
|
+
"skf-input": Partial<SkfInputProps & BaseProps & BaseEvents>;
|
215
732
|
|
216
733
|
/**
|
217
734
|
* The `<skf-link>` can be used as either a regular link or a link styled semantic button
|
@@ -221,14 +738,14 @@ export type CustomElements = {
|
|
221
738
|
* ### **Slots:**
|
222
739
|
* - _default_ - The links' main content
|
223
740
|
*/
|
224
|
-
"skf-link": Partial<
|
741
|
+
"skf-link": Partial<SkfLinkProps & BaseProps & BaseEvents>;
|
225
742
|
|
226
743
|
/**
|
227
744
|
* The `<skf-loader>` component is a progress indicator that uses circular indicators for short, indeterminate activities
|
228
745
|
* ---
|
229
746
|
*
|
230
747
|
*/
|
231
|
-
"skf-loader": Partial<
|
748
|
+
"skf-loader": Partial<SkfLoaderProps & BaseProps & BaseEvents>;
|
232
749
|
|
233
750
|
/**
|
234
751
|
* The `<skf-logo>` component is used to display the SKF logo.
|
@@ -238,14 +755,14 @@ export type CustomElements = {
|
|
238
755
|
* ### **CSS Properties:**
|
239
756
|
* - **--skf-logo-height** - The height of the logo _(default: undefined)_
|
240
757
|
*/
|
241
|
-
"skf-logo": Partial<
|
758
|
+
"skf-logo": Partial<SkfLogoProps & BaseProps & BaseEvents>;
|
242
759
|
|
243
760
|
/**
|
244
761
|
* The `<skf-progress>` element displays an indicator showing the completion progress of a task, typically displayed as a progress bar
|
245
762
|
* ---
|
246
763
|
*
|
247
764
|
*/
|
248
|
-
"skf-progress": Partial<
|
765
|
+
"skf-progress": Partial<SkfProgressProps & BaseProps & BaseEvents>;
|
249
766
|
|
250
767
|
/**
|
251
768
|
* The `<skf-radio>` component is used to create a radio input
|
@@ -258,7 +775,7 @@ export type CustomElements = {
|
|
258
775
|
* ### **Slots:**
|
259
776
|
* - _default_ - The radios label. Alternatively, you can use the `label` attribute.
|
260
777
|
*/
|
261
|
-
"skf-radio": Partial<
|
778
|
+
"skf-radio": Partial<SkfRadioProps & BaseProps & BaseEvents>;
|
262
779
|
|
263
780
|
/**
|
264
781
|
* The `<skf-select>` is a component that displays a list of actions or options. A click in the options list toggle the selected state of the option. Use it together with the ´skf-select-option` tag.
|
@@ -275,7 +792,7 @@ export type CustomElements = {
|
|
275
792
|
* ### **Slots:**
|
276
793
|
* - _default_ - The select's placeholder content
|
277
794
|
*/
|
278
|
-
"skf-select": Partial<
|
795
|
+
"skf-select": Partial<SkfSelectProps & BaseProps & BaseEvents>;
|
279
796
|
|
280
797
|
/**
|
281
798
|
* The `<skf-select-option>` is a component is used nested in a skf-select or skf-select-option-group.
|
@@ -289,7 +806,7 @@ export type CustomElements = {
|
|
289
806
|
* - _default_ - The option's text content
|
290
807
|
* - **icon** - The option's slot for icon or custom meta information (svg).
|
291
808
|
*/
|
292
|
-
"skf-select-option": Partial<
|
809
|
+
"skf-select-option": Partial<SkfSelectOptionProps & BaseProps & BaseEvents>;
|
293
810
|
|
294
811
|
/**
|
295
812
|
* The `<skf-select-option-group>` is a component that groups select-options
|
@@ -299,7 +816,7 @@ export type CustomElements = {
|
|
299
816
|
* ### **Slots:**
|
300
817
|
* - _default_ - The component's placeholder content
|
301
818
|
*/
|
302
|
-
"skf-select-option-group": Partial<
|
819
|
+
"skf-select-option-group": Partial<SkfSelectOptionGroupProps & BaseProps & BaseEvents>;
|
303
820
|
|
304
821
|
/**
|
305
822
|
* The `<skf-switch>` is a component that displays a list of actions or options
|
@@ -309,7 +826,7 @@ export type CustomElements = {
|
|
309
826
|
* ### **Slots:**
|
310
827
|
* - _default_ - The Switchs label. Alternatively, you can use the `label` attribute.
|
311
828
|
*/
|
312
|
-
"skf-switch": Partial<
|
829
|
+
"skf-switch": Partial<SkfSwitchProps & BaseProps & BaseEvents>;
|
313
830
|
|
314
831
|
/**
|
315
832
|
* The `<skf-tab>` is a component that displays a list of actions or options
|
@@ -323,7 +840,7 @@ export type CustomElements = {
|
|
323
840
|
* ### **Slots:**
|
324
841
|
* - _default_ - The tab's label
|
325
842
|
*/
|
326
|
-
"skf-tab": Partial<
|
843
|
+
"skf-tab": Partial<SkfTabProps & BaseProps & BaseEvents>;
|
327
844
|
|
328
845
|
/**
|
329
846
|
* The `<skf-tab-group>` is a component that displays a list of actions or options.
|
@@ -334,7 +851,7 @@ export type CustomElements = {
|
|
334
851
|
* - _default_ - Used for grouping tab panels in the tab group. Must be <skf-tab-panel> elements
|
335
852
|
* - **tabs** - Used for grouping tabs in the tab group. Must be <skf-tab> elements
|
336
853
|
*/
|
337
|
-
"skf-tab-group": Partial<
|
854
|
+
"skf-tab-group": Partial<SkfTabGroupProps & BaseProps & BaseEvents>;
|
338
855
|
|
339
856
|
/**
|
340
857
|
* The `<skf-tab-panel>` is a component that displays a list of actions or options.
|
@@ -344,7 +861,7 @@ export type CustomElements = {
|
|
344
861
|
* ### **Slots:**
|
345
862
|
* - _default_ - The tab panel's content
|
346
863
|
*/
|
347
|
-
"skf-tab-panel": Partial<
|
864
|
+
"skf-tab-panel": Partial<SkfTabPanelProps & BaseProps & BaseEvents>;
|
348
865
|
|
349
866
|
/**
|
350
867
|
* The `<skf-tag>` is a component that displays a list of actions or options
|
@@ -354,7 +871,7 @@ export type CustomElements = {
|
|
354
871
|
* ### **Slots:**
|
355
872
|
* - _default_ - The component's placeholder content
|
356
873
|
*/
|
357
|
-
"skf-tag": Partial<
|
874
|
+
"skf-tag": Partial<SkfTagProps & BaseProps & BaseEvents>;
|
358
875
|
|
359
876
|
/**
|
360
877
|
* The skf-textarea is used to create a textarea. Use it inside a form element or wherever you like.
|
@@ -368,7 +885,7 @@ export type CustomElements = {
|
|
368
885
|
* ### **Slots:**
|
369
886
|
* - _default_ - The textareas label. Alternatively, you can use the `label` attribute.
|
370
887
|
*/
|
371
|
-
"skf-textarea": Partial<
|
888
|
+
"skf-textarea": Partial<SkfTextAreaProps & BaseProps & BaseEvents>;
|
372
889
|
|
373
890
|
/**
|
374
891
|
* A simple toast component that displays a message to the user. Use by appending a <skf-toast> tag to the DOM. Position in DOM is irrelevant.
|
@@ -378,7 +895,7 @@ export type CustomElements = {
|
|
378
895
|
* ### **Slots:**
|
379
896
|
* - _default_ - The component's placeholder content
|
380
897
|
*/
|
381
|
-
"skf-toast": Partial<
|
898
|
+
"skf-toast": Partial<SkfToastProps & BaseProps & BaseEvents>;
|
382
899
|
|
383
900
|
/**
|
384
901
|
* The `<skf-toast-wrapper>` is a component without UI that positions where the toast shows up on the screen. The toast-wrapper is used internally by the toast component.
|
@@ -388,5 +905,5 @@ export type CustomElements = {
|
|
388
905
|
* ### **Slots:**
|
389
906
|
* - _default_ - The alert components that the toast creates will render here.
|
390
907
|
*/
|
391
|
-
"skf-toast-wrapper": Partial<
|
908
|
+
"skf-toast-wrapper": Partial<SkfToastWrapperProps & BaseProps & BaseEvents>;
|
392
909
|
};
|