@skf-design-system/ui-components 1.0.0-beta.4 → 1.0.0-beta.7
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/README.md +26 -6
- package/dist/components/accordion/accordion-item.d.ts +1 -1
- package/dist/components/accordion/accordion.component.d.ts +13 -9
- package/dist/components/accordion/accordion.component.js +34 -30
- package/dist/components/accordion/accordion.d.ts +1 -1
- package/dist/components/accordion/accordion.styles.d.ts +1 -2
- package/dist/components/accordion/accordion.styles.js +5 -4
- package/dist/components/alert/alert.component.d.ts +10 -7
- package/dist/components/alert/alert.component.js +50 -37
- package/dist/components/alert/alert.styles.d.ts +1 -2
- package/dist/components/alert/alert.styles.js +42 -34
- package/dist/components/button/button.component.d.ts +28 -4
- package/dist/components/button/button.component.js +80 -56
- package/dist/components/button/button.styles.js +2 -1
- package/dist/components/card/card.component.d.ts +1 -1
- package/dist/components/card/card.component.js +29 -21
- package/dist/components/card/card.styles.d.ts +1 -2
- package/dist/components/card/card.styles.js +22 -12
- package/dist/components/checkbox/checkbox.component.d.ts +20 -18
- package/dist/components/checkbox/checkbox.component.js +95 -89
- package/dist/components/checkbox/checkbox.styles.js +7 -2
- package/dist/components/checkbox/checkbox.test.d.ts +1 -0
- package/dist/components/collapse/collapse.component.d.ts +8 -5
- package/dist/components/collapse/collapse.component.js +50 -39
- package/dist/components/collapse/collapse.styles.js +13 -12
- package/dist/components/collapse/collapse.test.d.ts +1 -0
- package/dist/components/dialog/dialog.component.d.ts +75 -0
- package/dist/components/dialog/dialog.component.js +189 -0
- package/dist/components/dialog/dialog.d.ts +8 -0
- package/dist/components/dialog/dialog.js +6 -0
- package/dist/components/dialog/dialog.styles.d.ts +1 -0
- package/dist/components/dialog/dialog.styles.js +91 -0
- package/dist/components/divider/divider.component.d.ts +14 -11
- package/dist/components/divider/divider.component.js +46 -29
- package/dist/components/divider/divider.styles.d.ts +1 -2
- package/dist/components/divider/divider.styles.js +26 -30
- package/dist/components/heading/heading.component.d.ts +14 -4
- package/dist/components/heading/heading.component.js +14 -14
- package/dist/components/heading/heading.styles.js +1 -1
- package/dist/components/icon/icon.component.d.ts +15 -9
- package/dist/components/icon/icon.component.js +6 -6
- package/dist/components/icon/icon.styles.js +56 -54
- package/dist/components/input/input.component.d.ts +48 -33
- package/dist/components/input/input.component.js +108 -99
- package/dist/components/link/link.component.d.ts +20 -17
- package/dist/components/link/link.component.js +20 -14
- package/dist/components/link/link.styles.js +36 -40
- package/dist/components/loader/loader.component.d.ts +7 -7
- package/dist/components/loader/loader.component.js +42 -61
- package/dist/components/loader/loader.styles.js +44 -11
- package/dist/components/logo/logo.component.d.ts +7 -5
- package/dist/components/logo/logo.component.js +25 -14
- package/dist/components/logo/logo.styles.d.ts +1 -2
- package/dist/components/logo/logo.styles.js +12 -10
- package/dist/components/progress/progress.component.d.ts +22 -0
- package/dist/components/progress/progress.component.js +49 -0
- package/dist/components/progress/progress.d.ts +8 -0
- package/dist/components/progress/progress.js +6 -0
- package/dist/components/progress/progress.styles.d.ts +1 -0
- package/dist/components/progress/progress.styles.js +48 -0
- package/dist/components/radio/radio.component.d.ts +21 -21
- package/dist/components/radio/radio.component.js +94 -78
- package/dist/components/radio/radio.styles.js +6 -1
- package/dist/components/select/select.component.d.ts +14 -12
- package/dist/components/select/select.component.js +119 -103
- package/dist/components/select/select.controllers.d.ts +1 -1
- package/dist/components/select/select.controllers.js +5 -2
- package/dist/components/select/select.styles.js +18 -3
- package/dist/components/select-option/select-option.component.d.ts +3 -3
- package/dist/components/select-option/select-option.component.js +16 -10
- package/dist/components/select-option/select-option.controllers.d.ts +1 -1
- package/dist/components/select-option-group/select-option-group.component.d.ts +1 -1
- package/dist/components/switch/switch.component.d.ts +4 -5
- package/dist/components/switch/switch.component.js +17 -7
- package/dist/components/switch/switch.styles.js +19 -11
- package/dist/components/switch/switch.test.d.ts +1 -0
- package/dist/components/tab/tab.component.d.ts +29 -0
- package/dist/components/tab/tab.component.js +57 -0
- package/dist/components/tab/tab.d.ts +8 -0
- package/dist/components/tab/tab.js +6 -0
- package/dist/components/tab/tab.styles.d.ts +1 -0
- package/dist/components/tab/tab.styles.js +123 -0
- package/dist/components/tab-group/tab-group.component.d.ts +43 -0
- package/dist/components/tab-group/tab-group.component.js +98 -0
- package/dist/components/tab-group/tab-group.d.ts +8 -0
- package/dist/components/tab-group/tab-group.js +6 -0
- package/dist/components/tab-group/tab-group.styles.d.ts +1 -0
- package/dist/components/tab-group/tab-group.styles.js +75 -0
- package/dist/components/tab-panel/tab-panel.component.d.ts +19 -0
- package/dist/components/tab-panel/tab-panel.component.js +36 -0
- package/dist/components/tab-panel/tab-panel.d.ts +8 -0
- package/dist/components/tab-panel/tab-panel.js +6 -0
- package/dist/components/tab-panel/tab-panel.styles.d.ts +1 -0
- package/dist/components/tab-panel/tab-panel.styles.js +13 -0
- package/dist/components/tag/tag.component.d.ts +14 -9
- package/dist/components/tag/tag.component.js +63 -47
- package/dist/components/tag/tag.styles.js +35 -28
- package/dist/components/textarea/textarea.component.d.ts +30 -27
- package/dist/components/textarea/textarea.component.js +20 -17
- package/dist/components/toast/toast.component.d.ts +35 -0
- package/dist/components/toast/toast.component.js +52 -0
- package/dist/components/toast/toast.d.ts +8 -0
- package/dist/components/toast/toast.js +6 -0
- package/dist/components/toast/toast.singleton.d.ts +26 -0
- package/dist/components/toast/toast.singleton.js +53 -0
- package/dist/components/toast/toast.styles.d.ts +1 -0
- package/dist/components/toast/toast.styles.js +9 -0
- package/dist/components/toast-item/toast-item.component.d.ts +21 -0
- package/dist/components/toast-item/toast-item.component.js +65 -0
- package/dist/components/toast-item/toast-item.d.ts +6 -0
- package/dist/components/toast-item/toast-item.js +2 -0
- package/dist/components/toast-item/toast-item.styles.d.ts +2 -0
- package/dist/components/toast-item/toast-item.styles.js +16 -0
- package/dist/components/toast-wrapper/toast-wrapper.component.d.ts +24 -0
- package/dist/components/toast-wrapper/toast-wrapper.component.js +37 -0
- package/dist/components/toast-wrapper/toast-wrapper.d.ts +8 -0
- package/dist/components/toast-wrapper/toast-wrapper.js +6 -0
- package/dist/components/toast-wrapper/toast-wrapper.styles.d.ts +1 -0
- package/dist/components/toast-wrapper/toast-wrapper.styles.js +20 -0
- package/dist/custom-elements.json +3090 -1993
- package/dist/index.d.ts +6 -0
- package/dist/index.js +60 -42
- package/dist/internal/components/formBase.d.ts +1 -0
- package/dist/internal/components/formBase.js +11 -11
- package/dist/internal/components/hint/hint.component.d.ts +2 -2
- package/dist/internal/components/hint/hint.component.js +12 -10
- package/dist/internal/components/hint/hint.styles.js +26 -10
- package/dist/internal/components/skf-element.js +26 -25
- package/dist/internal/helpers/hintSeverity.d.ts +1 -1
- package/dist/internal/helpers/watch.d.ts +27 -0
- package/dist/internal/helpers/watch.js +28 -0
- package/dist/internal/storybook/shadowRootTraverser.d.ts +16 -8
- package/dist/internal/templates/asterisk.d.ts +1 -1
- package/dist/internal/templates/asterisk.js +7 -6
- package/dist/react/index.d.ts +10 -3
- package/dist/react/index.js +10 -3
- package/dist/react/skf-button/index.d.ts +7 -1
- package/dist/react/skf-button/index.js +5 -1
- package/dist/react/skf-dialog/index.d.ts +15 -0
- package/dist/react/skf-dialog/index.js +19 -0
- package/dist/react/skf-progress/index.d.ts +3 -0
- package/dist/react/skf-progress/index.js +13 -0
- package/dist/react/skf-tab/index.d.ts +12 -0
- package/dist/react/skf-tab/index.js +18 -0
- package/dist/react/skf-tab-group/index.d.ts +3 -0
- package/dist/react/skf-tab-group/index.js +13 -0
- package/dist/react/skf-tab-panel/index.d.ts +3 -0
- package/dist/react/skf-tab-panel/index.js +13 -0
- package/dist/react/skf-toast/index.d.ts +3 -0
- package/dist/react/skf-toast/index.js +13 -0
- package/dist/react/skf-toast-wrapper/index.d.ts +3 -0
- package/dist/react/skf-toast-wrapper/index.js +13 -0
- package/dist/styles/component.styles.js +15 -2
- package/dist/styles/form-field.styles.js +5 -1
- package/dist/types/jsx/custom-element-jsx.d.ts +300 -117
- package/dist/types/vue/index.d.ts +266 -76
- package/dist/vscode.html-custom-data.json +349 -216
- package/dist/web-types.json +686 -292
- package/package.json +33 -32
@@ -66,7 +66,7 @@ export type SkfAccordionProps = {
|
|
66
66
|
/** Defines which heading element will be rendered */
|
67
67
|
"heading-as"?: "h1" | "h2" | "h3" | "h4";
|
68
68
|
/** If true, adds a gap between each item */
|
69
|
-
gap?: boolean
|
69
|
+
gap?: boolean;
|
70
70
|
/** If true, allowes multiple accordion items to open */
|
71
71
|
multiple?: boolean | undefined;
|
72
72
|
/** If true, renders the small version */
|
@@ -75,6 +75,115 @@ export type SkfAccordionProps = {
|
|
75
75
|
truncate?: boolean | undefined;
|
76
76
|
};
|
77
77
|
|
78
|
+
export type SkfCardProps = {
|
79
|
+
/** If true, removes border */
|
80
|
+
"no-border"?: boolean;
|
81
|
+
/** If true, removes padding */
|
82
|
+
"no-padding"?: boolean;
|
83
|
+
/** If true, the Card fills the parent element height */
|
84
|
+
stretch?: boolean;
|
85
|
+
};
|
86
|
+
|
87
|
+
export type SkfCheckboxProps = {
|
88
|
+
/** If true, sets disabled state */
|
89
|
+
disabled?: boolean;
|
90
|
+
/** If true, value is required or must be checked for the form to be submittable */
|
91
|
+
required?: boolean;
|
92
|
+
/** If defined, outputs helping hints in console */
|
93
|
+
debug?: boolean | undefined;
|
94
|
+
/** If true, outputs helping hints in console */
|
95
|
+
checked?: boolean | undefined;
|
96
|
+
/** If true, forces component to invalid state until removed */
|
97
|
+
"custom-invalid"?: boolean | undefined;
|
98
|
+
/** If true and the checkbox is unchecked, the checkbox will appear indeterminate */
|
99
|
+
indeterminate?: boolean | undefined;
|
100
|
+
/** If defined, sets the input's label. Alternatively, you can use the `label` attribute. */
|
101
|
+
label?: string | undefined;
|
102
|
+
/** If defined, adds name to the input-element */
|
103
|
+
name?: string | undefined;
|
104
|
+
/** If defined, renders an alternative A11y text for the asterisk */
|
105
|
+
"required-label"?: string | undefined;
|
106
|
+
/** If defined, styles checkbox using provided severity */
|
107
|
+
severity?: "alert" | "success" | "info" | "warning";
|
108
|
+
/** If true, displays valid state after interaction */
|
109
|
+
"show-valid"?: boolean | undefined;
|
110
|
+
/** Size of the checkbox */
|
111
|
+
size?: "sm" | "md";
|
112
|
+
/** The current value of the input field */
|
113
|
+
value?: string;
|
114
|
+
|
115
|
+
/** {object} - When the value of the input changes */
|
116
|
+
onchange?: (e: CustomEvent<never>) => void;
|
117
|
+
};
|
118
|
+
|
119
|
+
export type SkfCollapseProps = {
|
120
|
+
/** If true, will animate the expand/collapse state */
|
121
|
+
animated?: boolean;
|
122
|
+
/** If true, will set the collapse to be expanded by default */
|
123
|
+
expanded?: boolean;
|
124
|
+
/** Heading for the collapse */
|
125
|
+
heading?: string | undefined;
|
126
|
+
/** Defines which heading element will be rendered */
|
127
|
+
"heading-as"?: "h2" | "h3" | "h4";
|
128
|
+
/** If true, renders the small version */
|
129
|
+
small?: boolean;
|
130
|
+
/** If true, will truncate the heading in collapsed state */
|
131
|
+
truncate?: boolean;
|
132
|
+
|
133
|
+
/** Event emitted when toggled */
|
134
|
+
"onskf-collapse-toggle"?: (e: CustomEvent<CustomEvent>) => void;
|
135
|
+
};
|
136
|
+
|
137
|
+
export type SkfDialogProps = {
|
138
|
+
/** If defined, sets the aria-label for the close button */
|
139
|
+
"close-button-aria-label"?: string | undefined;
|
140
|
+
/** Title for the modal/dialog */
|
141
|
+
heading?: string | undefined;
|
142
|
+
/** If true, makes the dialog stretch edge to edge on screen */
|
143
|
+
fullscreen?: boolean;
|
144
|
+
/** If true, removes the close button */
|
145
|
+
"no-close-button"?: boolean;
|
146
|
+
/** If defined, removes the inner padding */
|
147
|
+
"no-padding"?: boolean;
|
148
|
+
/** */
|
149
|
+
open?: boolean | null | undefined;
|
150
|
+
/** If provided, will run function on dialog close */
|
151
|
+
onClose?: ((event: Event) => void) | null | undefined;
|
152
|
+
/** Method that opens the dialog in modal state */
|
153
|
+
showModal?: string;
|
154
|
+
/** Method that closes the dialog */
|
155
|
+
close?: string;
|
156
|
+
/** Fires when the dialog is opened (after transitioned in) */
|
157
|
+
"onskf-dialog-open"?: (e: CustomEvent<never>) => void;
|
158
|
+
/** Fires when the dialog is closed (before transitioned out) */
|
159
|
+
"onskf-dialog-close"?: (e: CustomEvent<never>) => void;
|
160
|
+
/** Fires when the dialog is closed (after transitioned out) */
|
161
|
+
onclose?: (e: CustomEvent<never>) => void;
|
162
|
+
};
|
163
|
+
|
164
|
+
export type SkfAlertProps = {
|
165
|
+
/** If true, alert is being used as a toast (alertdialog) with an close button */
|
166
|
+
closeable?: boolean | undefined;
|
167
|
+
/** Close button aria-label */
|
168
|
+
"button-label"?: string;
|
169
|
+
/** If defined, displays leading icon */
|
170
|
+
icon?: SkfIcon["name"] | undefined;
|
171
|
+
/** If defined, gives the supplied appearance */
|
172
|
+
severity?: "error" | "info" | "warning" | "success" | "alert";
|
173
|
+
|
174
|
+
/** Fires when the close button is clicked */
|
175
|
+
"onskf-alert-close"?: (e: CustomEvent<never>) => void;
|
176
|
+
};
|
177
|
+
|
178
|
+
export type SkfDividerProps = {
|
179
|
+
/** Defines the Divider color */
|
180
|
+
color?: "emphasised" | "primary" | "secondary" | "tertiary" | "inverse";
|
181
|
+
/** If true, renders a div for presentational purpose instead of the semantic hr-element */
|
182
|
+
decorative?: boolean;
|
183
|
+
/** If true, renders the divider vertically */
|
184
|
+
vertical?: boolean;
|
185
|
+
};
|
186
|
+
|
78
187
|
export type SkfButtonProps = {
|
79
188
|
/** If true, gives destructive appearance. **Notice!** Only applicable if `variant` is `primary`. */
|
80
189
|
destructive?: boolean;
|
@@ -237,96 +346,17 @@ export type SkfButtonProps = {
|
|
237
346
|
"icon-position"?: "left" | "right" | undefined;
|
238
347
|
/** If true, hides text & icon and shows loading indicator. **Notice!** Only applicable if `variant` is `primary`. */
|
239
348
|
loading?: boolean;
|
349
|
+
/** */
|
350
|
+
"no-validate"?: boolean;
|
240
351
|
/** If provided, displays an alternative size */
|
241
352
|
size?: "sm" | "md" | "lg";
|
242
353
|
/** If provided, changes the button type */
|
243
354
|
type?: "button" | "submit" | "reset";
|
244
355
|
/** If provided, alters the appearance */
|
245
356
|
variant?: "primary" | "secondary";
|
246
|
-
};
|
247
|
-
|
248
|
-
export type SkfCardProps = {
|
249
|
-
/** If true, removes border */
|
250
|
-
"no-border"?: boolean | undefined;
|
251
|
-
/** If true, removes padding */
|
252
|
-
"no-padding"?: boolean | undefined;
|
253
|
-
/** If true, the Card fills the parent element height */
|
254
|
-
stretch?: boolean | undefined;
|
255
|
-
};
|
256
|
-
|
257
|
-
export type SkfAlertProps = {
|
258
|
-
/** If true, alert is being used as a toast (alertdialog) with an close button */
|
259
|
-
closeable?: boolean | undefined;
|
260
|
-
/** Close button aria-label */
|
261
|
-
"button-label"?: string;
|
262
|
-
/** If defined, displays leading icon */
|
263
|
-
icon?: SkfIcon["name"] | undefined;
|
264
|
-
/** If defined, gives the supplied appearance */
|
265
|
-
severity?: "error" | "info" | "warning" | "success" | "alert";
|
266
357
|
|
267
|
-
/** Fires when the
|
268
|
-
|
269
|
-
};
|
270
|
-
|
271
|
-
export type SkfCheckboxProps = {
|
272
|
-
/** If true, sets disabled state */
|
273
|
-
disabled?: boolean;
|
274
|
-
/** If true, value is required or must be checked for the form to be submittable */
|
275
|
-
required?: boolean;
|
276
|
-
/** If defined, outputs helping hints in console */
|
277
|
-
debug?: boolean | undefined;
|
278
|
-
/** If true, outputs helping hints in console */
|
279
|
-
checked?: boolean | undefined;
|
280
|
-
/** If true, forces component to invalid state until removed */
|
281
|
-
"custom-invalid"?: boolean | undefined;
|
282
|
-
/** If true, hides the label visually */
|
283
|
-
"hide-label"?: boolean | undefined;
|
284
|
-
/** If true and the checkbox is unchecked, the checkbox will appear indeterminate */
|
285
|
-
indeterminate?: boolean | undefined;
|
286
|
-
/** If defined, sets the input's label. Alternatively, you can use the `label` attribute. */
|
287
|
-
label?: string | undefined;
|
288
|
-
/** If defined, adds name to the input-element */
|
289
|
-
name?: string | undefined;
|
290
|
-
/** If defined, renders an alternative A11y text for the asterisk */
|
291
|
-
"required-label"?: string | undefined;
|
292
|
-
/** If defined, styles checkbox using provided severity */
|
293
|
-
severity?: "alert" | "success" | "info" | "warning";
|
294
|
-
/** If true, displays valid state after interaction */
|
295
|
-
"show-valid"?: boolean | undefined;
|
296
|
-
/** Size of the checkbox */
|
297
|
-
size?: "sm" | "md";
|
298
|
-
/** The current value of the input field */
|
299
|
-
value?: string;
|
300
|
-
|
301
|
-
/** {object} - When the value of the input changes */
|
302
|
-
onchange?: (e: CustomEvent<never>) => void;
|
303
|
-
};
|
304
|
-
|
305
|
-
export type SkfDividerProps = {
|
306
|
-
/** Defines the Divider color */
|
307
|
-
color?: "emphasised" | "primary" | "secondary" | "tertiary" | "inverse";
|
308
|
-
/** If true, renders a div for presentational purpose instead of the semantic hr-element */
|
309
|
-
decorative?: boolean | undefined;
|
310
|
-
/** If true, renders the divider vertically */
|
311
|
-
vertical?: boolean | undefined;
|
312
|
-
};
|
313
|
-
|
314
|
-
export type SkfCollapseProps = {
|
315
|
-
/** If true, will animate the expand/collapse state */
|
316
|
-
animated?: boolean | undefined;
|
317
|
-
/** If true, will set the collapse to be expanded by default */
|
318
|
-
expanded?: boolean | undefined;
|
319
|
-
/** Heading for the collapse */
|
320
|
-
heading?: string | undefined;
|
321
|
-
/** Defines which heading element will be rendered */
|
322
|
-
"heading-as"?: "h1" | "h2" | "h3" | "h4";
|
323
|
-
/** If true, renders the small version */
|
324
|
-
small?: boolean | undefined;
|
325
|
-
/** If true, will truncate the heading in collapsed state */
|
326
|
-
truncate?: boolean | undefined;
|
327
|
-
|
328
|
-
/** Event emitted when toggled */
|
329
|
-
"onskf-collapse-toggle"?: (e: CustomEvent<CustomEvent>) => void;
|
358
|
+
/** Fires when the button is clicked */
|
359
|
+
onclick?: (e: CustomEvent<never>) => void;
|
330
360
|
};
|
331
361
|
|
332
362
|
export type SkfHeadingProps = {
|
@@ -503,6 +533,8 @@ export type SkfInputProps = {
|
|
503
533
|
disabled?: boolean;
|
504
534
|
/** If true, value is required or must be checked for the form to be submittable */
|
505
535
|
required?: boolean;
|
536
|
+
/** -m } */
|
537
|
+
autocomplete?: string;
|
506
538
|
/** Custom aria-label for the clear button. **Notice!** Only applicable to type=search. */
|
507
539
|
"button-aria-label-clear"?: string;
|
508
540
|
/** Custom aria-label for the visibility button. **Notice!** Only applicable to type=password. */
|
@@ -748,12 +780,12 @@ export type SkfLinkProps = {
|
|
748
780
|
| "zoomOut";
|
749
781
|
/** Defines the position of the icon in relation to the text */
|
750
782
|
"icon-placement"?: "left" | "right";
|
751
|
-
/**
|
752
|
-
rel?: string;
|
783
|
+
/** If defined, describes the relationship between a linked resource and the current document */
|
784
|
+
rel?: string | undefined;
|
753
785
|
/** If defined, used on conjunction with onClick property, second argument */
|
754
786
|
route?: string | undefined;
|
755
787
|
/** If true, fills the parents horizontal axis */
|
756
|
-
stretch?: boolean
|
788
|
+
stretch?: boolean;
|
757
789
|
/** If defined, specifies where to open the linked document */
|
758
790
|
target?: "_blank" | "_parent" | "_self" | "_top" | undefined;
|
759
791
|
/** Defines the type of button */
|
@@ -766,7 +798,7 @@ export type SkfLoaderProps = {
|
|
766
798
|
/** Defines the aria-label */
|
767
799
|
"aria-label"?: string;
|
768
800
|
/** If true, inverts the color (to be used on colored backgrounds) */
|
769
|
-
invert?: boolean
|
801
|
+
invert?: boolean;
|
770
802
|
/** Defines the size of the loader */
|
771
803
|
size?: "md" | "sm" | undefined;
|
772
804
|
/** */
|
@@ -778,10 +810,19 @@ export type SkfLoaderProps = {
|
|
778
810
|
export type SkfLogoProps = {
|
779
811
|
/** Defines the title of the logo */
|
780
812
|
title?: string;
|
781
|
-
/**
|
813
|
+
/** Defines the color of the logo */
|
782
814
|
color?: "primary" | "secondary" | "inverse";
|
783
815
|
};
|
784
816
|
|
817
|
+
export type SkfProgressProps = {
|
818
|
+
/** If true, the progress-bar's fill value is animated */
|
819
|
+
animated?: boolean;
|
820
|
+
/** Describes how much work the task indicated by the progress element requires */
|
821
|
+
max?: number;
|
822
|
+
/** Specifies how much of the task that has been completed */
|
823
|
+
value?: number;
|
824
|
+
};
|
825
|
+
|
785
826
|
export type SkfRadioProps = {
|
786
827
|
/** If true, sets disabled state */
|
787
828
|
disabled?: boolean;
|
@@ -793,8 +834,6 @@ export type SkfRadioProps = {
|
|
793
834
|
checked?: boolean | undefined;
|
794
835
|
/** If true, forces component to invalid state until removed */
|
795
836
|
"custom-invalid"?: boolean | undefined;
|
796
|
-
/** If true, hides the label visually */
|
797
|
-
"hide-label"?: boolean | undefined;
|
798
837
|
/** If defined, sets the input's label unless the default slot is used. Alternatively, you can use the `label` attribute. */
|
799
838
|
label?: string | undefined;
|
800
839
|
/** If defined, adds name to the input-element */
|
@@ -846,9 +885,9 @@ export type SkfSelectProps = {
|
|
846
885
|
/** Size of the Select */
|
847
886
|
size?: "sm" | "md";
|
848
887
|
/** A readonly property that returns the selected value(s) in a array */
|
849
|
-
|
888
|
+
selectedValues?: string;
|
850
889
|
/** A readonly property that returns the selected slot(s) text content in a array */
|
851
|
-
|
890
|
+
selectedOptionsText?: string;
|
852
891
|
/** Read only, returns the selected value. (if multiple: in a comma separated string) */
|
853
892
|
value?: string;
|
854
893
|
/** */
|
@@ -871,7 +910,7 @@ export type SkfSelectOptionProps = {
|
|
871
910
|
/** If defined, set an icon */
|
872
911
|
icon?: SkfIcon["name"] | undefined;
|
873
912
|
/** If defined, sets provided color on the icon */
|
874
|
-
"icon-color"?:
|
913
|
+
"icon-color"?: SeverityFgColor | undefined;
|
875
914
|
/** If true, sets the option as selected */
|
876
915
|
selected?: boolean | undefined;
|
877
916
|
/** If defined, sets a short label */
|
@@ -918,6 +957,43 @@ export type SkfSwitchProps = {
|
|
918
957
|
value?: string;
|
919
958
|
};
|
920
959
|
|
960
|
+
export type SkfTabProps = {
|
961
|
+
/** The name of the tab-panel this tab is associated with. The panel must be located in the same tab group. */
|
962
|
+
panel?: string;
|
963
|
+
/** */
|
964
|
+
selected?: boolean;
|
965
|
+
/** */
|
966
|
+
variant?: SkfTabGroup["variant"];
|
967
|
+
/** */
|
968
|
+
role?: string;
|
969
|
+
/** {detail: { selected: true, tab: SkfTab }} Fires when the tab is selected */
|
970
|
+
"onskf-tab-select"?: (e: CustomEvent<CustomEvent>) => void;
|
971
|
+
/** Fired when the component is clicked */
|
972
|
+
onclick?: (e: CustomEvent<never>) => void;
|
973
|
+
};
|
974
|
+
|
975
|
+
export type SkfTabGroupProps = {
|
976
|
+
/** Sets the default selected tab */
|
977
|
+
"default-selected"?: number;
|
978
|
+
/** If true, removes border */
|
979
|
+
"no-border"?: boolean;
|
980
|
+
/** If true, removes padding */
|
981
|
+
"no-padding"?: boolean;
|
982
|
+
/** If true, component fills the parent element height */
|
983
|
+
stretch?: boolean;
|
984
|
+
/** Sets the appearance of the tabs */
|
985
|
+
variant?: "compressed" | "expanded";
|
986
|
+
};
|
987
|
+
|
988
|
+
export type SkfTabPanelProps = {
|
989
|
+
/** The tab panel's name. */
|
990
|
+
name?: string;
|
991
|
+
/** */
|
992
|
+
active?: boolean;
|
993
|
+
/** */
|
994
|
+
role?: string;
|
995
|
+
};
|
996
|
+
|
921
997
|
export type SkfTagProps = {
|
922
998
|
/** Specifies Tag size */
|
923
999
|
size?: "sm" | "md" | "lg";
|
@@ -1132,6 +1208,24 @@ export type SkfTextAreaProps = {
|
|
1132
1208
|
oninvalid?: (e: CustomEvent<never>) => void;
|
1133
1209
|
};
|
1134
1210
|
|
1211
|
+
export type SkfToastProps = {
|
1212
|
+
/** If provided, adds a close button to the toast and will not disapear until user actively dismisses it. */
|
1213
|
+
closeable?: boolean;
|
1214
|
+
/** */
|
1215
|
+
debug?: boolean;
|
1216
|
+
/** Severity of the toast. */
|
1217
|
+
severity?: "info" | "success" | "warning" | "error";
|
1218
|
+
/** Time in seconds before the toast disappears. */
|
1219
|
+
timer?: number;
|
1220
|
+
/** offsets where toasts emerge vertically */
|
1221
|
+
topOffset?: number | undefined;
|
1222
|
+
};
|
1223
|
+
|
1224
|
+
export type SkfToastWrapperProps = {
|
1225
|
+
/** */
|
1226
|
+
debug?: boolean;
|
1227
|
+
};
|
1228
|
+
|
1135
1229
|
export type CustomElements = {
|
1136
1230
|
/**
|
1137
1231
|
* The `<skf-accordion>` component consists of multiple `<skf-collapse>`, working together.
|
@@ -1146,51 +1240,81 @@ export type CustomElements = {
|
|
1146
1240
|
"skf-accordion": Partial<SkfAccordionProps & BaseProps & BaseEvents>;
|
1147
1241
|
|
1148
1242
|
/**
|
1149
|
-
*
|
1243
|
+
* The `<skf-card>` can be used to group related subjects in a container
|
1150
1244
|
* ---
|
1151
1245
|
*
|
1152
1246
|
*
|
1153
1247
|
* ### **Slots:**
|
1154
|
-
* - _default_ - The
|
1248
|
+
* - _default_ - The card's main content
|
1155
1249
|
*/
|
1156
|
-
"skf-
|
1250
|
+
"skf-card": Partial<SkfCardProps & BaseProps & BaseEvents>;
|
1157
1251
|
|
1158
1252
|
/**
|
1159
|
-
* The `<skf-
|
1253
|
+
* The `<skf-checkbox>` component is used to create a checkbox input
|
1160
1254
|
* ---
|
1161
1255
|
*
|
1162
1256
|
*
|
1257
|
+
* ### **Events:**
|
1258
|
+
* - **change** - {object} - When the value of the input changes
|
1259
|
+
*
|
1163
1260
|
* ### **Slots:**
|
1164
|
-
* - _default_ - The
|
1261
|
+
* - _default_ - The Radios label. Alternatively, you can use the `label` attribute.
|
1165
1262
|
*/
|
1166
|
-
"skf-
|
1263
|
+
"skf-checkbox": Partial<SkfCheckboxProps & BaseProps & BaseEvents>;
|
1167
1264
|
|
1168
1265
|
/**
|
1169
|
-
* The `<skf-
|
1266
|
+
* The `<skf-collapse>` component is a general purpose container for content that can be collapsed / expanded.
|
1267
|
+
*
|
1268
|
+
* See [zeroheight](https://zeroheight.com/853e936c9/p/6590bf-accordion) for design principles.
|
1170
1269
|
* ---
|
1171
1270
|
*
|
1172
1271
|
*
|
1173
1272
|
* ### **Events:**
|
1174
|
-
* - **skf-
|
1273
|
+
* - **skf-collapse-toggle** - Event emitted when toggled
|
1274
|
+
*
|
1275
|
+
* ### **Methods:**
|
1276
|
+
* - **setClose()** - Class method as alternative to manipulate attribute
|
1277
|
+
* - **setOpen()** - Class method as alternative to manipulate attribute
|
1175
1278
|
*
|
1176
1279
|
* ### **Slots:**
|
1177
|
-
* - _default_ -
|
1178
|
-
* - **link** - Slot for the link
|
1280
|
+
* - _default_ - Main content
|
1179
1281
|
*/
|
1180
|
-
"skf-
|
1282
|
+
"skf-collapse": Partial<SkfCollapseProps & BaseProps & BaseEvents>;
|
1181
1283
|
|
1182
1284
|
/**
|
1183
|
-
* The `<skf-
|
1285
|
+
* The `<skf-dialog>` is a component that open up a dialog with the content provided
|
1184
1286
|
* ---
|
1185
1287
|
*
|
1186
1288
|
*
|
1187
1289
|
* ### **Events:**
|
1188
|
-
* - **
|
1290
|
+
* - **skf-dialog-open** - Fires when the dialog is opened (after transitioned in)
|
1291
|
+
* - **skf-dialog-close** - Fires when the dialog is closed (before transitioned out)
|
1292
|
+
* - **close** - Fires when the dialog is closed (after transitioned out)
|
1189
1293
|
*
|
1190
1294
|
* ### **Slots:**
|
1191
|
-
* - _default_ - The
|
1295
|
+
* - _default_ - The dialog component's content
|
1296
|
+
* - **heading** - The dialog component's heading
|
1297
|
+
* - **footer** - The dialog component's buttons goes here
|
1298
|
+
*
|
1299
|
+
* ### **CSS Properties:**
|
1300
|
+
* - **--skf-dialog-height** - A custom height for the Dialog. Pass valid CSS **block-size** values _(default: undefined)_
|
1301
|
+
* - **--skf-dialog-width** - A custom width for the Dialog Pass valid CSS **inline-size** values _(default: undefined)_
|
1192
1302
|
*/
|
1193
|
-
"skf-
|
1303
|
+
"skf-dialog": Partial<SkfDialogProps & BaseProps & BaseEvents>;
|
1304
|
+
|
1305
|
+
/**
|
1306
|
+
* The `<skf-alert>` is a type of notification that appears in-line
|
1307
|
+
* ---
|
1308
|
+
*
|
1309
|
+
*
|
1310
|
+
* ### **Events:**
|
1311
|
+
* - **skf-alert-close** - Fires when the close button is clicked
|
1312
|
+
*
|
1313
|
+
* ### **Slots:**
|
1314
|
+
* - _default_ - Alert message. **Notice!** See design principles for approved content
|
1315
|
+
* - **link** - Slot for the link
|
1316
|
+
*/
|
1317
|
+
"skf-alert": Partial<SkfAlertProps & BaseProps & BaseEvents>;
|
1194
1318
|
|
1195
1319
|
/**
|
1196
1320
|
* The `<Divider>` component can separate items from each other, to visually emphasize their lack of a relationship between groups of information
|
@@ -1204,23 +1328,20 @@ export type CustomElements = {
|
|
1204
1328
|
"skf-divider": Partial<SkfDividerProps & BaseProps & BaseEvents>;
|
1205
1329
|
|
1206
1330
|
/**
|
1207
|
-
*
|
1208
|
-
*
|
1209
|
-
* See [zeroheight](https://zeroheight.com/853e936c9/p/6590bf-accordion) for design principles.
|
1331
|
+
* Component to be used in forms or for interactivity
|
1210
1332
|
* ---
|
1211
1333
|
*
|
1212
1334
|
*
|
1213
1335
|
* ### **Events:**
|
1214
|
-
* - **
|
1336
|
+
* - **click** - Fires when the button is clicked
|
1215
1337
|
*
|
1216
1338
|
* ### **Methods:**
|
1217
|
-
* - **
|
1218
|
-
* - **setOpen()** - Class method as alternative to manipulate attribute
|
1339
|
+
* - **click()** - Simulates a click on the button.
|
1219
1340
|
*
|
1220
1341
|
* ### **Slots:**
|
1221
|
-
* - _default_ -
|
1342
|
+
* - _default_ - The Primary content
|
1222
1343
|
*/
|
1223
|
-
"skf-
|
1344
|
+
"skf-button": Partial<SkfButtonProps & BaseProps & BaseEvents>;
|
1224
1345
|
|
1225
1346
|
/**
|
1226
1347
|
* The `<Heading>` component is to deliniate content on a page. When using, take note not to skip heading levels.<br>
|
@@ -1281,6 +1402,13 @@ export type CustomElements = {
|
|
1281
1402
|
*/
|
1282
1403
|
"skf-logo": Partial<SkfLogoProps & BaseProps & BaseEvents>;
|
1283
1404
|
|
1405
|
+
/**
|
1406
|
+
* The `<skf-progress>` element displays an indicator showing the completion progress of a task, typically displayed as a progress bar
|
1407
|
+
* ---
|
1408
|
+
*
|
1409
|
+
*/
|
1410
|
+
"skf-progress": Partial<SkfProgressProps & BaseProps & BaseEvents>;
|
1411
|
+
|
1284
1412
|
/**
|
1285
1413
|
* The `<skf-radio>` component is used to create a radio input
|
1286
1414
|
* ---
|
@@ -1345,6 +1473,41 @@ export type CustomElements = {
|
|
1345
1473
|
*/
|
1346
1474
|
"skf-switch": Partial<SkfSwitchProps & BaseProps & BaseEvents>;
|
1347
1475
|
|
1476
|
+
/**
|
1477
|
+
* The `<skf-tab>` is a component that displays a list of actions or options
|
1478
|
+
* ---
|
1479
|
+
*
|
1480
|
+
*
|
1481
|
+
* ### **Events:**
|
1482
|
+
* - **skf-tab-select** - {detail: { selected: true, tab: SkfTab }} Fires when the tab is selected
|
1483
|
+
* - **click** - Fired when the component is clicked
|
1484
|
+
*
|
1485
|
+
* ### **Slots:**
|
1486
|
+
* - _default_ - The tab's label
|
1487
|
+
*/
|
1488
|
+
"skf-tab": Partial<SkfTabProps & BaseProps & BaseEvents>;
|
1489
|
+
|
1490
|
+
/**
|
1491
|
+
* The `<skf-tab-group>` is a component that displays a list of actions or options.
|
1492
|
+
* ---
|
1493
|
+
*
|
1494
|
+
*
|
1495
|
+
* ### **Slots:**
|
1496
|
+
* - _default_ - Used for grouping tab panels in the tab group. Must be <skf-tab-panel> elements
|
1497
|
+
* - **tabs** - Used for grouping tabs in the tab group. Must be <skf-tab> elements
|
1498
|
+
*/
|
1499
|
+
"skf-tab-group": Partial<SkfTabGroupProps & BaseProps & BaseEvents>;
|
1500
|
+
|
1501
|
+
/**
|
1502
|
+
* The `<skf-tab-panel>` is a component that displays a list of actions or options.
|
1503
|
+
* ---
|
1504
|
+
*
|
1505
|
+
*
|
1506
|
+
* ### **Slots:**
|
1507
|
+
* - _default_ - The tab panel's content
|
1508
|
+
*/
|
1509
|
+
"skf-tab-panel": Partial<SkfTabPanelProps & BaseProps & BaseEvents>;
|
1510
|
+
|
1348
1511
|
/**
|
1349
1512
|
* The `<skf-tag>` is a component that displays a list of actions or options
|
1350
1513
|
* ---
|
@@ -1368,4 +1531,24 @@ export type CustomElements = {
|
|
1368
1531
|
* - _default_ - The textareas label. Alternatively, you can use the `label` attribute.
|
1369
1532
|
*/
|
1370
1533
|
"skf-textarea": Partial<SkfTextAreaProps & BaseProps & BaseEvents>;
|
1534
|
+
|
1535
|
+
/**
|
1536
|
+
* 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.
|
1537
|
+
* ---
|
1538
|
+
*
|
1539
|
+
*
|
1540
|
+
* ### **Slots:**
|
1541
|
+
* - _default_ - The component's placeholder content
|
1542
|
+
*/
|
1543
|
+
"skf-toast": Partial<SkfToastProps & BaseProps & BaseEvents>;
|
1544
|
+
|
1545
|
+
/**
|
1546
|
+
* 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.
|
1547
|
+
* ---
|
1548
|
+
*
|
1549
|
+
*
|
1550
|
+
* ### **Slots:**
|
1551
|
+
* - _default_ - The alert components that the toast creates will render here.
|
1552
|
+
*/
|
1553
|
+
"skf-toast-wrapper": Partial<SkfToastWrapperProps & BaseProps & BaseEvents>;
|
1371
1554
|
};
|