@skf-design-system/ui-components 1.0.0-beta.4 → 1.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -6
- package/dist/components/accordion/accordion.component.d.ts +9 -5
- package/dist/components/accordion/accordion.component.js +22 -19
- package/dist/components/accordion/accordion.d.ts +1 -1
- package/dist/components/accordion/accordion.styles.js +3 -3
- package/dist/components/alert/alert.component.d.ts +7 -4
- package/dist/components/alert/alert.component.js +21 -19
- package/dist/components/alert/alert.styles.js +50 -47
- package/dist/components/button/button.component.d.ts +2 -0
- package/dist/components/button/button.component.js +6 -6
- package/dist/components/button/button.styles.js +1 -1
- package/dist/components/card/card.component.d.ts +3 -3
- package/dist/components/card/card.component.js +16 -19
- package/dist/components/card/card.styles.js +11 -3
- package/dist/components/checkbox/checkbox.component.d.ts +9 -6
- package/dist/components/checkbox/checkbox.component.js +7 -7
- 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 +9 -6
- package/dist/components/collapse/collapse.component.js +39 -36
- package/dist/components/collapse/collapse.styles.js +3 -3
- package/dist/components/collapse/collapse.test.d.ts +1 -0
- package/dist/components/divider/divider.component.d.ts +13 -10
- package/dist/components/divider/divider.component.js +34 -29
- package/dist/components/divider/divider.styles.js +1 -5
- package/dist/components/heading/heading.component.d.ts +12 -2
- 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 +14 -8
- 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 +43 -29
- package/dist/components/input/input.component.js +46 -36
- package/dist/components/link/link.component.d.ts +15 -12
- package/dist/components/link/link.component.js +7 -7
- package/dist/components/link/link.styles.js +1 -1
- package/dist/components/loader/loader.component.d.ts +7 -7
- package/dist/components/loader/loader.component.js +35 -61
- package/dist/components/loader/loader.styles.js +42 -10
- package/dist/components/logo/logo.component.d.ts +5 -3
- package/dist/components/logo/logo.component.js +8 -8
- package/dist/components/logo/logo.styles.js +2 -2
- package/dist/components/radio/radio.component.d.ts +15 -13
- package/dist/components/radio/radio.component.js +3 -3
- package/dist/components/radio/radio.styles.js +6 -1
- package/dist/components/select/select.component.d.ts +12 -10
- package/dist/components/select/select.component.js +113 -100
- 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 +2 -2
- package/dist/components/select-option/select-option.component.js +16 -10
- package/dist/components/switch/switch.component.d.ts +2 -3
- package/dist/components/switch/switch.component.js +1 -1
- package/dist/components/switch/switch.styles.js +6 -1
- package/dist/components/switch/switch.test.d.ts +1 -0
- package/dist/components/tag/tag.component.d.ts +12 -7
- package/dist/components/tag/tag.component.js +24 -24
- package/dist/components/tag/tag.styles.js +6 -1
- package/dist/components/textarea/textarea.component.d.ts +26 -23
- package/dist/components/textarea/textarea.component.js +15 -12
- 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.style.d.ts +1 -0
- package/dist/components/toast/toast.style.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.style.d.ts +2 -0
- package/dist/components/toast-item/toast-item.style.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.style.d.ts +1 -0
- package/dist/components/toast-wrapper/toast-wrapper.style.js +20 -0
- package/dist/custom-elements.json +676 -238
- package/dist/index.d.ts +1 -0
- package/dist/index.js +43 -40
- package/dist/internal/components/hint/hint.component.js +12 -10
- package/dist/internal/components/hint/hint.styles.js +26 -10
- package/dist/internal/storybook/shadowRootTraverser.d.ts +16 -8
- package/dist/react/index.d.ts +5 -3
- package/dist/react/index.js +5 -3
- 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/form-field.styles.js +5 -1
- package/dist/types/jsx/custom-element-jsx.d.ts +88 -50
- package/dist/types/vue/index.d.ts +91 -51
- package/dist/vscode.html-custom-data.json +101 -62
- package/dist/web-types.json +208 -122
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
@@ -18,3 +18,4 @@ export { default as SkfSelect } from './components/select/select.js';
|
|
18
18
|
export { default as SkfSwitch } from './components/switch/switch.js';
|
19
19
|
export { default as SkfTag } from './components/tag/tag.js';
|
20
20
|
export { default as SkfTextArea } from './components/textarea/textarea.js';
|
21
|
+
export { default as SkfToast } from './components/toast/toast.js';
|
package/dist/index.js
CHANGED
@@ -18,47 +18,50 @@ import "./components/select/select.js";
|
|
18
18
|
import "./components/switch/switch.js";
|
19
19
|
import "./components/tag/tag.js";
|
20
20
|
import "./components/textarea/textarea.js";
|
21
|
-
import
|
21
|
+
import "./components/toast/toast.js";
|
22
|
+
import { SkfAccordion as L } from "./components/accordion/accordion.component.js";
|
22
23
|
import { SkfAlert as h } from "./components/alert/alert.component.js";
|
23
|
-
import { SkfButton as
|
24
|
-
import { SkfCard as
|
25
|
-
import { SkfCheckbox as
|
26
|
-
import { SkfCollapse as
|
27
|
-
import { SkfDivider as
|
28
|
-
import { SkfHeading as
|
29
|
-
import { SkfIcon as
|
30
|
-
import { SkfInput as
|
31
|
-
import { SkfLink as
|
32
|
-
import { SkfLoader as
|
33
|
-
import { SkfLogo as
|
34
|
-
import { SkfRadio as
|
35
|
-
import { SkfSelectOptionGroup as
|
36
|
-
import { SkfSelectOption as
|
37
|
-
import { SkfSelect as
|
38
|
-
import { SkfSwitch as
|
39
|
-
import { SkfTag as
|
40
|
-
import { SkfTextArea as
|
41
|
-
import {
|
24
|
+
import { SkfButton as b } from "./components/button/button.component.js";
|
25
|
+
import { SkfCard as w } from "./components/card/card.component.js";
|
26
|
+
import { SkfCheckbox as D } from "./components/checkbox/checkbox.component.js";
|
27
|
+
import { SkfCollapse as R } from "./components/collapse/collapse.component.js";
|
28
|
+
import { SkfDivider as q } from "./components/divider/divider.component.js";
|
29
|
+
import { SkfHeading as z } from "./components/heading/heading.component.js";
|
30
|
+
import { SkfIcon as F } from "./components/icon/icon.component.js";
|
31
|
+
import { SkfInput as K } from "./components/input/input.component.js";
|
32
|
+
import { SkfLink as N } from "./components/link/link.component.js";
|
33
|
+
import { SkfLoader as Q } from "./components/loader/loader.component.js";
|
34
|
+
import { SkfLogo as V } from "./components/logo/logo.component.js";
|
35
|
+
import { SkfRadio as X } from "./components/radio/radio.component.js";
|
36
|
+
import { SkfSelectOptionGroup as Z } from "./components/select-option-group/select-option-group.component.js";
|
37
|
+
import { SkfSelectOption as $ } from "./components/select-option/select-option.component.js";
|
38
|
+
import { SkfSelect as ro } from "./components/select/select.component.js";
|
39
|
+
import { SkfSwitch as po } from "./components/switch/switch.component.js";
|
40
|
+
import { SkfTag as mo } from "./components/tag/tag.component.js";
|
41
|
+
import { SkfTextArea as io } from "./components/textarea/textarea.component.js";
|
42
|
+
import { SkfToast as ko } from "./components/toast/toast.component.js";
|
43
|
+
import { SkfAccordionItem as no } from "./components/accordion/accordion-item.js";
|
42
44
|
export {
|
43
|
-
|
44
|
-
|
45
|
+
L as SkfAccordion,
|
46
|
+
no as SkfAccordionItem,
|
45
47
|
h as SkfAlert,
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
48
|
+
b as SkfButton,
|
49
|
+
w as SkfCard,
|
50
|
+
D as SkfCheckbox,
|
51
|
+
R as SkfCollapse,
|
52
|
+
q as SkfDivider,
|
53
|
+
z as SkfHeading,
|
54
|
+
F as SkfIcon,
|
55
|
+
K as SkfInput,
|
56
|
+
N as SkfLink,
|
57
|
+
Q as SkfLoader,
|
58
|
+
V as SkfLogo,
|
59
|
+
$ as SkfOption,
|
60
|
+
Z as SkfOptionGroup,
|
61
|
+
X as SkfRadio,
|
62
|
+
ro as SkfSelect,
|
63
|
+
po as SkfSwitch,
|
64
|
+
mo as SkfTag,
|
65
|
+
io as SkfTextArea,
|
66
|
+
ko as SkfToast
|
64
67
|
};
|
@@ -4,26 +4,28 @@ import { ICON_SEVERITY as n } from "../../constants/iconSeverity.js";
|
|
4
4
|
import v from "../../../styles/component.styles.js";
|
5
5
|
import { html as f } from "lit";
|
6
6
|
import { property as y } from "lit/decorators.js";
|
7
|
-
import
|
8
|
-
var
|
7
|
+
import d from "./hint.styles.js";
|
8
|
+
var a = Object.defineProperty, c = (s, i, m, h) => {
|
9
9
|
for (var r = void 0, t = s.length - 1, p; t >= 0; t--)
|
10
10
|
(p = s[t]) && (r = p(i, m, r) || r);
|
11
|
-
return r &&
|
11
|
+
return r && a(i, m, r), r;
|
12
12
|
};
|
13
13
|
const o = class o extends l {
|
14
14
|
render() {
|
15
15
|
return f`
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
16
|
+
<div id="root">
|
17
|
+
${this.severity && f`
|
18
|
+
<skf-icon color=${this.severity} name="${n[this.severity]}" size="xs">
|
19
|
+
</skf-icon>
|
20
|
+
`}
|
21
|
+
<slot></slot>
|
22
|
+
</div>
|
21
23
|
`;
|
22
24
|
}
|
23
25
|
};
|
24
|
-
o.styles = [v,
|
26
|
+
o.styles = [v, d];
|
25
27
|
let e = o;
|
26
|
-
|
28
|
+
c([
|
27
29
|
y()
|
28
30
|
], e.prototype, "severity");
|
29
31
|
export {
|
@@ -1,22 +1,38 @@
|
|
1
|
-
import { css as
|
2
|
-
const
|
3
|
-
|
1
|
+
import { css as r } from "lit";
|
2
|
+
const s = r`
|
3
|
+
#root {
|
4
4
|
align-items: center;
|
5
5
|
color: var(--_skf-hint-color, var(--skf-text-color-secondary));
|
6
6
|
display: flex;
|
7
7
|
font-size: var(--skf-font-size-75);
|
8
8
|
font-weight: var(--skf-font-weight-medium);
|
9
9
|
gap: var(--skf-spacing-25);
|
10
|
-
}
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
:host-context(:disabled) & {
|
12
|
+
color: inherit;
|
13
|
+
}
|
14
|
+
|
15
|
+
:host([severity='alert']) & {
|
16
|
+
--_skf-hint-color: var(--skf-severity-fg-color-alert);
|
17
|
+
}
|
18
|
+
|
19
|
+
:host([severity='error']) & {
|
20
|
+
--_skf-hint-color: var(--skf-severity-fg-color-error);
|
21
|
+
}
|
22
|
+
|
23
|
+
:host([severity='info']) & {
|
24
|
+
--_skf-hint-color: var(--skf-severity-fg-color-info);
|
25
|
+
}
|
26
|
+
|
27
|
+
:host([severity='success']) & {
|
28
|
+
--_skf-hint-color: var(--skf-severity-fg-color-success);
|
29
|
+
}
|
15
30
|
|
16
|
-
|
17
|
-
|
31
|
+
:host([severity='warning']) & {
|
32
|
+
--_skf-hint-color: var(--skf-severity-fg-color-warning);
|
33
|
+
}
|
18
34
|
}
|
19
35
|
`;
|
20
36
|
export {
|
21
|
-
|
37
|
+
s as default
|
22
38
|
};
|
@@ -1,10 +1,18 @@
|
|
1
|
-
import { queries, within } from '@storybook/test';
|
2
|
-
type WithinShadowRootPromise = Promise<ReturnType<typeof within<typeof queries>>>;
|
3
1
|
/**
|
4
|
-
* Workaround solution
|
5
|
-
*
|
2
|
+
* Workaround solution to get shadow DOM elements. Throws an error if the element is not found.
|
3
|
+
*
|
4
|
+
* @usage getWithinShadowRoot(canvasElement, 'my-custom-element', 'button')
|
6
5
|
*/
|
7
|
-
export declare
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
export declare const getWithinShadowRoot: (canvasElement: HTMLElement, ...selectors: string[]) => {
|
7
|
+
element: HTMLElement;
|
8
|
+
shadowRoot: HTMLElement;
|
9
|
+
};
|
10
|
+
/**
|
11
|
+
* Workaround solution to get shadow DOM elements. Returns undefined if the element is not found.
|
12
|
+
*
|
13
|
+
* @usage findWithinShadowRoot(canvasElement, 'my-custom-element', 'button')
|
14
|
+
*/
|
15
|
+
export declare const findWithinShadowRoot: (canvasElement: HTMLElement, ...selectors: string[]) => {
|
16
|
+
element: HTMLElement;
|
17
|
+
shadowRoot: HTMLElement;
|
18
|
+
} | undefined;
|
package/dist/react/index.d.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
export { default as SkfCard } from './skf-card/index.js';
|
2
1
|
export { default as SkfAccordion } from './skf-accordion/index.js';
|
2
|
+
export { default as SkfAlert } from './skf-alert/index.js';
|
3
|
+
export { default as SkfButton } from './skf-button/index.js';
|
4
|
+
export { default as SkfCard } from './skf-card/index.js';
|
3
5
|
export { default as SkfCheckbox } from './skf-checkbox/index.js';
|
4
6
|
export { default as SkfCollapse } from './skf-collapse/index.js';
|
5
7
|
export { default as SkfDivider } from './skf-divider/index.js';
|
6
8
|
export { default as SkfHeading } from './skf-heading/index.js';
|
7
|
-
export { default as SkfButton } from './skf-button/index.js';
|
8
|
-
export { default as SkfAlert } from './skf-alert/index.js';
|
9
9
|
export { default as SkfIcon } from './skf-icon/index.js';
|
10
10
|
export { default as SkfInput } from './skf-input/index.js';
|
11
11
|
export { default as SkfLink } from './skf-link/index.js';
|
@@ -18,3 +18,5 @@ export { default as SkfSelectOptionGroup } from './skf-select-option-group/index
|
|
18
18
|
export { default as SkfSwitch } from './skf-switch/index.js';
|
19
19
|
export { default as SkfTag } from './skf-tag/index.js';
|
20
20
|
export { default as SkfTextArea } from './skf-textarea/index.js';
|
21
|
+
export { default as SkfToast } from './skf-toast/index.js';
|
22
|
+
export { default as SkfToastWrapper } from './skf-toast-wrapper/index.js';
|
package/dist/react/index.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
export { default as SkfCard } from './skf-card/index.js';
|
2
1
|
export { default as SkfAccordion } from './skf-accordion/index.js';
|
2
|
+
export { default as SkfAlert } from './skf-alert/index.js';
|
3
|
+
export { default as SkfButton } from './skf-button/index.js';
|
4
|
+
export { default as SkfCard } from './skf-card/index.js';
|
3
5
|
export { default as SkfCheckbox } from './skf-checkbox/index.js';
|
4
6
|
export { default as SkfCollapse } from './skf-collapse/index.js';
|
5
7
|
export { default as SkfDivider } from './skf-divider/index.js';
|
6
8
|
export { default as SkfHeading } from './skf-heading/index.js';
|
7
|
-
export { default as SkfButton } from './skf-button/index.js';
|
8
|
-
export { default as SkfAlert } from './skf-alert/index.js';
|
9
9
|
export { default as SkfIcon } from './skf-icon/index.js';
|
10
10
|
export { default as SkfInput } from './skf-input/index.js';
|
11
11
|
export { default as SkfLink } from './skf-link/index.js';
|
@@ -18,3 +18,5 @@ export { default as SkfSelectOptionGroup } from './skf-select-option-group/index
|
|
18
18
|
export { default as SkfSwitch } from './skf-switch/index.js';
|
19
19
|
export { default as SkfTag } from './skf-tag/index.js';
|
20
20
|
export { default as SkfTextArea } from './skf-textarea/index.js';
|
21
|
+
export { default as SkfToast } from './skf-toast/index.js';
|
22
|
+
export { default as SkfToastWrapper } from './skf-toast-wrapper/index.js';
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/toast/toast.js';
|
4
|
+
const tagName = 'skf-toast';
|
5
|
+
Component.define('skf-toast');
|
6
|
+
const reactWrapper = createComponent({
|
7
|
+
tagName,
|
8
|
+
elementClass: Component,
|
9
|
+
react: React,
|
10
|
+
events: {},
|
11
|
+
displayName: 'SkfToast',
|
12
|
+
});
|
13
|
+
export default reactWrapper;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/toast-wrapper/toast-wrapper.js';
|
4
|
+
const tagName = 'skf-toast-wrapper';
|
5
|
+
Component.define('skf-toast-wrapper');
|
6
|
+
const reactWrapper = createComponent({
|
7
|
+
tagName,
|
8
|
+
elementClass: Component,
|
9
|
+
react: React,
|
10
|
+
events: {},
|
11
|
+
displayName: 'SkfToastWrapper',
|
12
|
+
});
|
13
|
+
export default reactWrapper;
|
@@ -6,11 +6,15 @@ const i = e`
|
|
6
6
|
}
|
7
7
|
|
8
8
|
/* stylelint-disable no-descending-specificity */
|
9
|
-
#
|
9
|
+
#root {
|
10
10
|
color: var(--_skf-field-color, var(--skf-text-color-primary));
|
11
11
|
display: grid;
|
12
12
|
gap: var(--skf-spacing-25);
|
13
13
|
|
14
|
+
:host([disabled]) & {
|
15
|
+
--_skf-field-color: var(--skf-interactive-text-color-disabled);
|
16
|
+
}
|
17
|
+
|
14
18
|
:host([size='sm']) & {
|
15
19
|
font-size: var(--skf-font-size-75);
|
16
20
|
font-weight: var(--skf-font-weight-medium);
|
@@ -75,6 +75,20 @@ export type SkfAccordionProps = {
|
|
75
75
|
truncate?: boolean | undefined;
|
76
76
|
};
|
77
77
|
|
78
|
+
export type SkfAlertProps = {
|
79
|
+
/** If true, alert is being used as a toast (alertdialog) with an close button */
|
80
|
+
closeable?: boolean | undefined;
|
81
|
+
/** Close button aria-label */
|
82
|
+
"button-label"?: string;
|
83
|
+
/** If defined, displays leading icon */
|
84
|
+
icon?: SkfIcon["name"] | undefined;
|
85
|
+
/** If defined, gives the supplied appearance */
|
86
|
+
severity?: "error" | "info" | "warning" | "success" | "alert";
|
87
|
+
|
88
|
+
/** Fires when the close button is clicked */
|
89
|
+
"onskf-alert-close"?: (e: CustomEvent<never>) => void;
|
90
|
+
};
|
91
|
+
|
78
92
|
export type SkfButtonProps = {
|
79
93
|
/** If true, gives destructive appearance. **Notice!** Only applicable if `variant` is `primary`. */
|
80
94
|
destructive?: boolean;
|
@@ -254,20 +268,6 @@ export type SkfCardProps = {
|
|
254
268
|
stretch?: boolean | undefined;
|
255
269
|
};
|
256
270
|
|
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
|
-
|
267
|
-
/** Fires when the close button is clicked */
|
268
|
-
"onskf-alert-close"?: (e: CustomEvent<never>) => void;
|
269
|
-
};
|
270
|
-
|
271
271
|
export type SkfCheckboxProps = {
|
272
272
|
/** If true, sets disabled state */
|
273
273
|
disabled?: boolean;
|
@@ -302,15 +302,6 @@ export type SkfCheckboxProps = {
|
|
302
302
|
onchange?: (e: CustomEvent<never>) => void;
|
303
303
|
};
|
304
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
305
|
export type SkfCollapseProps = {
|
315
306
|
/** If true, will animate the expand/collapse state */
|
316
307
|
animated?: boolean | undefined;
|
@@ -329,6 +320,15 @@ export type SkfCollapseProps = {
|
|
329
320
|
"onskf-collapse-toggle"?: (e: CustomEvent<CustomEvent>) => void;
|
330
321
|
};
|
331
322
|
|
323
|
+
export type SkfDividerProps = {
|
324
|
+
/** Defines the Divider color */
|
325
|
+
color?: "emphasised" | "primary" | "secondary" | "tertiary" | "inverse";
|
326
|
+
/** If true, renders a div for presentational purpose instead of the semantic hr-element */
|
327
|
+
decorative?: boolean | undefined;
|
328
|
+
/** If true, renders the divider vertically */
|
329
|
+
vertical?: boolean | undefined;
|
330
|
+
};
|
331
|
+
|
332
332
|
export type SkfHeadingProps = {
|
333
333
|
/** Controls which heading element will be rendered. Should not be used to affect appearance */
|
334
334
|
as?: "h1" | "h2" | "h3" | "h4";
|
@@ -846,9 +846,9 @@ export type SkfSelectProps = {
|
|
846
846
|
/** Size of the Select */
|
847
847
|
size?: "sm" | "md";
|
848
848
|
/** A readonly property that returns the selected value(s) in a array */
|
849
|
-
|
849
|
+
selectedValues?: string;
|
850
850
|
/** A readonly property that returns the selected slot(s) text content in a array */
|
851
|
-
|
851
|
+
selectedOptionsText?: string;
|
852
852
|
/** Read only, returns the selected value. (if multiple: in a comma separated string) */
|
853
853
|
value?: string;
|
854
854
|
/** */
|
@@ -871,7 +871,7 @@ export type SkfSelectOptionProps = {
|
|
871
871
|
/** If defined, set an icon */
|
872
872
|
icon?: SkfIcon["name"] | undefined;
|
873
873
|
/** If defined, sets provided color on the icon */
|
874
|
-
"icon-color"?:
|
874
|
+
"icon-color"?: SeverityFgColor | undefined;
|
875
875
|
/** If true, sets the option as selected */
|
876
876
|
selected?: boolean | undefined;
|
877
877
|
/** If defined, sets a short label */
|
@@ -1132,6 +1132,24 @@ export type SkfTextAreaProps = {
|
|
1132
1132
|
oninvalid?: (e: CustomEvent<never>) => void;
|
1133
1133
|
};
|
1134
1134
|
|
1135
|
+
export type SkfToastProps = {
|
1136
|
+
/** If provided, adds a close button to the toast and will not disapear until user actively dismisses it. */
|
1137
|
+
closeable?: boolean;
|
1138
|
+
/** */
|
1139
|
+
debug?: boolean;
|
1140
|
+
/** Severity of the toast. */
|
1141
|
+
severity?: "info" | "success" | "warning" | "error";
|
1142
|
+
/** Time in seconds before the toast disappears. */
|
1143
|
+
timer?: number;
|
1144
|
+
/** offsets where toasts emerge vertically */
|
1145
|
+
topOffset?: number | undefined;
|
1146
|
+
};
|
1147
|
+
|
1148
|
+
export type SkfToastWrapperProps = {
|
1149
|
+
/** */
|
1150
|
+
debug?: boolean;
|
1151
|
+
};
|
1152
|
+
|
1135
1153
|
export type CustomElements = {
|
1136
1154
|
/**
|
1137
1155
|
* The `<skf-accordion>` component consists of multiple `<skf-collapse>`, working together.
|
@@ -1146,38 +1164,38 @@ export type CustomElements = {
|
|
1146
1164
|
"skf-accordion": Partial<SkfAccordionProps & BaseProps & BaseEvents>;
|
1147
1165
|
|
1148
1166
|
/**
|
1149
|
-
*
|
1167
|
+
* The `<skf-alert>` is a type of notification that appears in-line
|
1150
1168
|
* ---
|
1151
1169
|
*
|
1152
1170
|
*
|
1171
|
+
* ### **Events:**
|
1172
|
+
* - **skf-alert-close** - Fires when the close button is clicked
|
1173
|
+
*
|
1153
1174
|
* ### **Slots:**
|
1154
|
-
* - _default_ -
|
1175
|
+
* - _default_ - Alert message. **Notice!** See design principles for approved content
|
1176
|
+
* - **link** - Slot for the link
|
1155
1177
|
*/
|
1156
|
-
"skf-
|
1178
|
+
"skf-alert": Partial<SkfAlertProps & BaseProps & BaseEvents>;
|
1157
1179
|
|
1158
1180
|
/**
|
1159
|
-
*
|
1181
|
+
* Component to be used in forms or for interactivity
|
1160
1182
|
* ---
|
1161
1183
|
*
|
1162
1184
|
*
|
1163
1185
|
* ### **Slots:**
|
1164
|
-
* - _default_ - The
|
1186
|
+
* - _default_ - The Primary content
|
1165
1187
|
*/
|
1166
|
-
"skf-
|
1188
|
+
"skf-button": Partial<SkfButtonProps & BaseProps & BaseEvents>;
|
1167
1189
|
|
1168
1190
|
/**
|
1169
|
-
* The `<skf-
|
1191
|
+
* The `<skf-card>` can be used to group related subjects in a container
|
1170
1192
|
* ---
|
1171
1193
|
*
|
1172
1194
|
*
|
1173
|
-
* ### **Events:**
|
1174
|
-
* - **skf-alert-close** - Fires when the close button is clicked
|
1175
|
-
*
|
1176
1195
|
* ### **Slots:**
|
1177
|
-
* - _default_ -
|
1178
|
-
* - **link** - Slot for the link
|
1196
|
+
* - _default_ - The card's main content
|
1179
1197
|
*/
|
1180
|
-
"skf-
|
1198
|
+
"skf-card": Partial<SkfCardProps & BaseProps & BaseEvents>;
|
1181
1199
|
|
1182
1200
|
/**
|
1183
1201
|
* The `<skf-checkbox>` component is used to create a checkbox input
|
@@ -1192,17 +1210,6 @@ export type CustomElements = {
|
|
1192
1210
|
*/
|
1193
1211
|
"skf-checkbox": Partial<SkfCheckboxProps & BaseProps & BaseEvents>;
|
1194
1212
|
|
1195
|
-
/**
|
1196
|
-
* The `<Divider>` component can separate items from each other, to visually emphasize their lack of a relationship between groups of information
|
1197
|
-
* ---
|
1198
|
-
*
|
1199
|
-
*
|
1200
|
-
* ### **CSS Properties:**
|
1201
|
-
* - **--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)_
|
1202
|
-
* - **--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)_
|
1203
|
-
*/
|
1204
|
-
"skf-divider": Partial<SkfDividerProps & BaseProps & BaseEvents>;
|
1205
|
-
|
1206
1213
|
/**
|
1207
1214
|
* The `<skf-collapse>` component is a general purpose container for content that can be collapsed / expanded.
|
1208
1215
|
*
|
@@ -1222,6 +1229,17 @@ export type CustomElements = {
|
|
1222
1229
|
*/
|
1223
1230
|
"skf-collapse": Partial<SkfCollapseProps & BaseProps & BaseEvents>;
|
1224
1231
|
|
1232
|
+
/**
|
1233
|
+
* The `<Divider>` component can separate items from each other, to visually emphasize their lack of a relationship between groups of information
|
1234
|
+
* ---
|
1235
|
+
*
|
1236
|
+
*
|
1237
|
+
* ### **CSS Properties:**
|
1238
|
+
* - **--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)_
|
1239
|
+
* - **--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)_
|
1240
|
+
*/
|
1241
|
+
"skf-divider": Partial<SkfDividerProps & BaseProps & BaseEvents>;
|
1242
|
+
|
1225
1243
|
/**
|
1226
1244
|
* The `<Heading>` component is to deliniate content on a page. When using, take note not to skip heading levels.<br>
|
1227
1245
|
* It extends the interface of native html `<h1>` to `<h4>` elements.
|
@@ -1368,4 +1386,24 @@ export type CustomElements = {
|
|
1368
1386
|
* - _default_ - The textareas label. Alternatively, you can use the `label` attribute.
|
1369
1387
|
*/
|
1370
1388
|
"skf-textarea": Partial<SkfTextAreaProps & BaseProps & BaseEvents>;
|
1389
|
+
|
1390
|
+
/**
|
1391
|
+
* 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.
|
1392
|
+
* ---
|
1393
|
+
*
|
1394
|
+
*
|
1395
|
+
* ### **Slots:**
|
1396
|
+
* - _default_ - The component's placeholder content
|
1397
|
+
*/
|
1398
|
+
"skf-toast": Partial<SkfToastProps & BaseProps & BaseEvents>;
|
1399
|
+
|
1400
|
+
/**
|
1401
|
+
* 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.
|
1402
|
+
* ---
|
1403
|
+
*
|
1404
|
+
*
|
1405
|
+
* ### **Slots:**
|
1406
|
+
* - _default_ - The alert components that the toast creates will render here.
|
1407
|
+
*/
|
1408
|
+
"skf-toast-wrapper": Partial<SkfToastWrapperProps & BaseProps & BaseEvents>;
|
1371
1409
|
};
|