@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
package/dist/index.d.ts
CHANGED
@@ -4,6 +4,7 @@ export { default as SkfButton } from './components/button/button.js';
|
|
4
4
|
export { default as SkfCard } from './components/card/card.js';
|
5
5
|
export { default as SkfCheckbox } from './components/checkbox/checkbox.js';
|
6
6
|
export { default as SkfCollapse } from './components/collapse/collapse.js';
|
7
|
+
export { default as SkfDialog } from './components/dialog/dialog.js';
|
7
8
|
export { default as SkfDivider } from './components/divider/divider.js';
|
8
9
|
export { default as SkfHeading } from './components/heading/heading.js';
|
9
10
|
export { default as SkfIcon } from './components/icon/icon.js';
|
@@ -11,10 +12,15 @@ export { default as SkfInput } from './components/input/input.js';
|
|
11
12
|
export { default as SkfLink } from './components/link/link.js';
|
12
13
|
export { default as SkfLoader } from './components/loader/loader.js';
|
13
14
|
export { default as SkfLogo } from './components/logo/logo.js';
|
15
|
+
export { default as SkfProgress } from './components/progress/progress.js';
|
14
16
|
export { default as SkfRadio } from './components/radio/radio.js';
|
15
17
|
export { default as SkfOptionGroup } from './components/select-option-group/select-option-group.js';
|
16
18
|
export { default as SkfOption } from './components/select-option/select-option.js';
|
17
19
|
export { default as SkfSelect } from './components/select/select.js';
|
18
20
|
export { default as SkfSwitch } from './components/switch/switch.js';
|
21
|
+
export { default as SkfTabGoup } from './components/tab-group/tab-group.js';
|
22
|
+
export { default as SkfTabPanel } from './components/tab-panel/tab-panel.js';
|
23
|
+
export { default as SkfTab } from './components/tab/tab.js';
|
19
24
|
export { default as SkfTag } from './components/tag/tag.js';
|
20
25
|
export { default as SkfTextArea } from './components/textarea/textarea.js';
|
26
|
+
export { default as SkfToast } from './components/toast/toast.js';
|
package/dist/index.js
CHANGED
@@ -4,6 +4,7 @@ import "./components/button/button.js";
|
|
4
4
|
import "./components/card/card.js";
|
5
5
|
import "./components/checkbox/checkbox.js";
|
6
6
|
import "./components/collapse/collapse.js";
|
7
|
+
import "./components/dialog/dialog.js";
|
7
8
|
import "./components/divider/divider.js";
|
8
9
|
import "./components/heading/heading.js";
|
9
10
|
import "./components/icon/icon.js";
|
@@ -11,54 +12,71 @@ import "./components/input/input.js";
|
|
11
12
|
import "./components/link/link.js";
|
12
13
|
import "./components/loader/loader.js";
|
13
14
|
import "./components/logo/logo.js";
|
15
|
+
import "./components/progress/progress.js";
|
14
16
|
import "./components/radio/radio.js";
|
15
17
|
import "./components/select-option-group/select-option-group.js";
|
16
18
|
import "./components/select-option/select-option.js";
|
17
19
|
import "./components/select/select.js";
|
18
20
|
import "./components/switch/switch.js";
|
21
|
+
import "./components/tab-group/tab-group.js";
|
22
|
+
import "./components/tab-panel/tab-panel.js";
|
23
|
+
import "./components/tab/tab.js";
|
19
24
|
import "./components/tag/tag.js";
|
20
25
|
import "./components/textarea/textarea.js";
|
21
|
-
import
|
22
|
-
import {
|
23
|
-
import {
|
24
|
-
import {
|
25
|
-
import {
|
26
|
-
import {
|
27
|
-
import {
|
28
|
-
import {
|
29
|
-
import {
|
30
|
-
import {
|
31
|
-
import {
|
32
|
-
import {
|
33
|
-
import {
|
34
|
-
import {
|
35
|
-
import {
|
36
|
-
import {
|
37
|
-
import {
|
38
|
-
import {
|
39
|
-
import {
|
40
|
-
import {
|
41
|
-
import {
|
26
|
+
import "./components/toast/toast.js";
|
27
|
+
import { SkfAccordion as D } from "./components/accordion/accordion.component.js";
|
28
|
+
import { SkfAlert as v } from "./components/alert/alert.component.js";
|
29
|
+
import { SkfButton as B } from "./components/button/button.component.js";
|
30
|
+
import { SkfCard as R } from "./components/card/card.component.js";
|
31
|
+
import { SkfCheckbox as q } from "./components/checkbox/checkbox.component.js";
|
32
|
+
import { SkfCollapse as z } from "./components/collapse/collapse.component.js";
|
33
|
+
import { SkfDialog as F } from "./components/dialog/dialog.component.js";
|
34
|
+
import { SkfDivider as K } from "./components/divider/divider.component.js";
|
35
|
+
import { SkfHeading as N } from "./components/heading/heading.component.js";
|
36
|
+
import { SkfIcon as U } from "./components/icon/icon.component.js";
|
37
|
+
import { SkfInput as W } from "./components/input/input.component.js";
|
38
|
+
import { SkfLink as Y } from "./components/link/link.component.js";
|
39
|
+
import { SkfLoader as _ } from "./components/loader/loader.component.js";
|
40
|
+
import { SkfLogo as oo } from "./components/logo/logo.component.js";
|
41
|
+
import { SkfProgress as to } from "./components/progress/progress.component.js";
|
42
|
+
import { SkfRadio as fo } from "./components/radio/radio.component.js";
|
43
|
+
import { SkfSelectOptionGroup as eo } from "./components/select-option-group/select-option-group.component.js";
|
44
|
+
import { SkfSelectOption as So } from "./components/select-option/select-option.component.js";
|
45
|
+
import { SkfSelect as xo } from "./components/select/select.component.js";
|
46
|
+
import { SkfSwitch as no } from "./components/switch/switch.component.js";
|
47
|
+
import { SkfTabGroup as lo } from "./components/tab-group/tab-group.component.js";
|
48
|
+
import { SkfTabPanel as To } from "./components/tab-panel/tab-panel.component.js";
|
49
|
+
import { SkfTab as bo } from "./components/tab/tab.component.js";
|
50
|
+
import { SkfTag as Ao } from "./components/tag/tag.component.js";
|
51
|
+
import { SkfTextArea as Oo } from "./components/textarea/textarea.component.js";
|
52
|
+
import { SkfToast as Io } from "./components/toast/toast.component.js";
|
53
|
+
import { SkfAccordionItem as ho } from "./components/accordion/accordion-item.js";
|
42
54
|
export {
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
55
|
+
D as SkfAccordion,
|
56
|
+
ho as SkfAccordionItem,
|
57
|
+
v as SkfAlert,
|
58
|
+
B as SkfButton,
|
59
|
+
R as SkfCard,
|
60
|
+
q as SkfCheckbox,
|
61
|
+
z as SkfCollapse,
|
62
|
+
F as SkfDialog,
|
63
|
+
K as SkfDivider,
|
64
|
+
N as SkfHeading,
|
65
|
+
U as SkfIcon,
|
66
|
+
W as SkfInput,
|
67
|
+
Y as SkfLink,
|
68
|
+
_ as SkfLoader,
|
69
|
+
oo as SkfLogo,
|
70
|
+
So as SkfOption,
|
71
|
+
eo as SkfOptionGroup,
|
72
|
+
to as SkfProgress,
|
73
|
+
fo as SkfRadio,
|
74
|
+
xo as SkfSelect,
|
75
|
+
no as SkfSwitch,
|
76
|
+
bo as SkfTab,
|
77
|
+
lo as SkfTabGoup,
|
78
|
+
To as SkfTabPanel,
|
79
|
+
Ao as SkfTag,
|
80
|
+
Oo as SkfTextArea,
|
81
|
+
Io as SkfToast
|
64
82
|
};
|
@@ -22,6 +22,7 @@ export declare class FormBase extends SkfElement {
|
|
22
22
|
protected customErrorDisplay: boolean;
|
23
23
|
protected pristine: boolean;
|
24
24
|
protected validateOnChange: boolean;
|
25
|
+
protected withFallback: (message?: string | null) => string;
|
25
26
|
static shadowRootOptions: {
|
26
27
|
delegatesFocus: boolean;
|
27
28
|
mode: ShadowRootMode;
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import { LitElement as c } from "lit";
|
2
2
|
import { property as d } from "lit/decorators.js";
|
3
3
|
import { SkfElement as u } from "./skf-element.js";
|
4
|
-
var p = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, h = (l, t, e,
|
4
|
+
var p = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, h = (l, t, e, r) => {
|
5
5
|
for (var i = _(t, e), n = l.length - 1, o; n >= 0; n--)
|
6
6
|
(o = l[n]) && (i = o(t, e, i) || i);
|
7
7
|
return i && p(t, e, i), i;
|
8
8
|
};
|
9
9
|
const a = class a extends u {
|
10
10
|
constructor() {
|
11
|
-
super(), this._disabled = !1, this._pristine = !0, this.validationError = "", this.customErrorDisplay = !1, this.pristine = !0, this.validateOnChange = !0, this._dispatchResetEvent = () => {
|
11
|
+
super(), this._disabled = !1, this._pristine = !0, this.validationError = "", this.customErrorDisplay = !1, this.pristine = !0, this.validateOnChange = !0, this.withFallback = (t) => String(t).trim() || "A unspecified form validation error occured.", this._dispatchResetEvent = () => {
|
12
12
|
this.dispatchEvent(new Event("reset", { bubbles: !0, composed: !0, cancelable: !1 }));
|
13
13
|
}, this._internals = this.attachInternals(), this._required = !1;
|
14
14
|
}
|
@@ -59,8 +59,8 @@ const a = class a extends u {
|
|
59
59
|
get willValidate() {
|
60
60
|
return this._internals.willValidate;
|
61
61
|
}
|
62
|
-
setValidity(t, e,
|
63
|
-
this._internals.setValidity(t, e,
|
62
|
+
setValidity(t, e, r) {
|
63
|
+
this._internals.setValidity(t, e, r);
|
64
64
|
}
|
65
65
|
setFormValue(t) {
|
66
66
|
this._internals.setFormValue(t);
|
@@ -88,20 +88,20 @@ const a = class a extends u {
|
|
88
88
|
* @returns
|
89
89
|
*/
|
90
90
|
emitEvent(t, e = {}) {
|
91
|
-
const
|
91
|
+
const r = { bubbles: !0, composed: !0, cancelable: !0 };
|
92
92
|
return t.startsWith("skf-") ? this.dispatchEvent(
|
93
|
-
new CustomEvent(t, { detail: null, ...
|
94
|
-
) : this.dispatchEvent(new Event(t, { ...
|
93
|
+
new CustomEvent(t, { detail: null, ...r, ...e })
|
94
|
+
) : this.dispatchEvent(new Event(t, { ...r, ...e }));
|
95
95
|
}
|
96
96
|
};
|
97
97
|
a.formAssociated = !0, a.shadowRootOptions = { ...c.shadowRootOptions, delegatesFocus: !0 };
|
98
|
-
let
|
98
|
+
let s = a;
|
99
99
|
h([
|
100
100
|
d({ type: Boolean })
|
101
|
-
],
|
101
|
+
], s.prototype, "required");
|
102
102
|
h([
|
103
103
|
d({ type: Boolean, attribute: "native-validation" })
|
104
|
-
],
|
104
|
+
], s.prototype, "nativeValidation");
|
105
105
|
export {
|
106
|
-
|
106
|
+
s as FormBase
|
107
107
|
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import '
|
2
|
-
import { SkfElement } from '
|
1
|
+
import '../../../components/icon/icon.js';
|
2
|
+
import { SkfElement } from '../../components/skf-element.js';
|
3
3
|
import type { SeverityFgColor } from '@skf-design-system/ui-assets';
|
4
4
|
import { type CSSResultGroup } from 'lit';
|
5
5
|
export declare class SkfHint extends SkfElement {
|
@@ -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
|
};
|
@@ -17,43 +17,44 @@ const s = class s extends d {
|
|
17
17
|
/** Custom event emitter helper function. Transmits user actions or component state change. Use composed=false for event that should not pierce shadowDom. */
|
18
18
|
emit(e, t = {}) {
|
19
19
|
if ([
|
20
|
-
"click",
|
21
|
-
"dblclick",
|
22
|
-
"mousedown",
|
23
|
-
"mouseup",
|
24
|
-
"mouseover",
|
25
|
-
"mouseout",
|
26
|
-
"mousemove",
|
27
|
-
"keydown",
|
28
|
-
"keyup",
|
29
|
-
"keypress",
|
30
|
-
"submit",
|
31
|
-
"focus",
|
32
20
|
"blur",
|
33
|
-
"
|
34
|
-
"unload",
|
35
|
-
"resize",
|
36
|
-
"scroll",
|
21
|
+
"canplay",
|
37
22
|
"change",
|
38
|
-
"
|
23
|
+
"click",
|
24
|
+
"close",
|
39
25
|
"contextmenu",
|
26
|
+
"dblclick",
|
40
27
|
"drag",
|
41
|
-
"dragstart",
|
42
28
|
"dragend",
|
43
29
|
"dragenter",
|
44
30
|
"dragleave",
|
45
31
|
"dragover",
|
32
|
+
"dragstart",
|
46
33
|
"drop",
|
47
|
-
"touchstart",
|
48
|
-
"touchend",
|
49
|
-
"touchmove",
|
50
|
-
"play",
|
51
|
-
"pause",
|
52
34
|
"ended",
|
53
|
-
"
|
35
|
+
"error",
|
36
|
+
"focus",
|
37
|
+
"input",
|
38
|
+
"keydown",
|
39
|
+
"keypress",
|
40
|
+
"keyup",
|
41
|
+
"load",
|
54
42
|
"loadeddata",
|
43
|
+
"mousedown",
|
44
|
+
"mousemove",
|
45
|
+
"mouseout",
|
46
|
+
"mouseover",
|
47
|
+
"mouseup",
|
48
|
+
"pause",
|
49
|
+
"play",
|
55
50
|
"progress",
|
56
|
-
"
|
51
|
+
"resize",
|
52
|
+
"scroll",
|
53
|
+
"submit",
|
54
|
+
"touchend",
|
55
|
+
"touchmove",
|
56
|
+
"touchstart",
|
57
|
+
"unload"
|
57
58
|
].includes(e)) {
|
58
59
|
const u = {
|
59
60
|
bubbles: !0,
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import type { FormFieldBaseProps } from '
|
1
|
+
import type { FormFieldBaseProps } from '../types/formField.js';
|
2
2
|
export declare function hintSeverity(hostSeverity: FormFieldBaseProps['severity'], invalid: boolean): "error" | ("info" | "warning" | "success" | "alert") | undefined;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import type { LitElement } from 'lit';
|
2
|
+
type UpdateHandler = (prev?: unknown, next?: unknown) => void;
|
3
|
+
type NonUndefined<A> = A extends undefined ? never : A;
|
4
|
+
type UpdateHandlerFunctionKeys<T extends object> = {
|
5
|
+
[K in keyof T]-?: NonUndefined<T[K]> extends UpdateHandler ? K : never;
|
6
|
+
}[keyof T];
|
7
|
+
interface WatchOptions {
|
8
|
+
/**
|
9
|
+
* If true, will only start watching after the initial update/render
|
10
|
+
*/
|
11
|
+
waitUntilFirstUpdate?: boolean;
|
12
|
+
afterUpdate?: boolean;
|
13
|
+
}
|
14
|
+
/**
|
15
|
+
* Runs when observed properties change, e.g. @property or @state, but before the component updates. To wait for an
|
16
|
+
* update to complete after a change occurs, use `await this.updateComplete` in the handler. To start watching after the
|
17
|
+
* initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.
|
18
|
+
*
|
19
|
+
* Usage:
|
20
|
+
*
|
21
|
+
* @watch('propName')
|
22
|
+
* handlePropChange(oldValue, newValue) {
|
23
|
+
* ...
|
24
|
+
* }
|
25
|
+
*/
|
26
|
+
export declare function watch(propertyName: string | string[], options?: WatchOptions): <ElemClass extends LitElement>(proto: ElemClass, decoratedFnName: UpdateHandlerFunctionKeys<ElemClass>) => void;
|
27
|
+
export {};
|
@@ -0,0 +1,28 @@
|
|
1
|
+
function o(f, U) {
|
2
|
+
const e = {
|
3
|
+
waitUntilFirstUpdate: !1,
|
4
|
+
afterUpdate: !1,
|
5
|
+
...U
|
6
|
+
};
|
7
|
+
return (l, c) => {
|
8
|
+
const { update: d } = l, h = Array.isArray(f) ? f : [f];
|
9
|
+
l.update = function(i) {
|
10
|
+
e.afterUpdate || h.forEach((n) => {
|
11
|
+
const t = n;
|
12
|
+
if (i.has(t)) {
|
13
|
+
const a = i.get(t), s = this[t];
|
14
|
+
a !== s && (!e.waitUntilFirstUpdate || this.hasUpdated) && this[c](a, s);
|
15
|
+
}
|
16
|
+
}), d.call(this, i), e.afterUpdate && h.forEach((n) => {
|
17
|
+
const t = n;
|
18
|
+
if (i.has(t)) {
|
19
|
+
const a = i.get(t), s = this[t];
|
20
|
+
a !== s && (!e.waitUntilFirstUpdate || this.hasUpdated) && this[c](a, s);
|
21
|
+
}
|
22
|
+
});
|
23
|
+
};
|
24
|
+
};
|
25
|
+
}
|
26
|
+
export {
|
27
|
+
o as watch
|
28
|
+
};
|
@@ -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;
|
@@ -1 +1 @@
|
|
1
|
-
export declare function Asterisk(label?: string): import("lit").TemplateResult<1>;
|
1
|
+
export declare function Asterisk(label?: string, className?: string): import("lit").TemplateResult<1>;
|
@@ -1,10 +1,11 @@
|
|
1
|
-
import { html as
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
<span
|
1
|
+
import { html as r } from "lit";
|
2
|
+
import { ifDefined as e } from "lit/directives/if-defined.js";
|
3
|
+
function t(i, s) {
|
4
|
+
return r`
|
5
|
+
<span class="visually-hidden">(${i ?? "Required"})</span>
|
6
|
+
<span aria-hidden="true" class=${e(s)} id="asterisk">*</span>
|
6
7
|
`;
|
7
8
|
}
|
8
9
|
export {
|
9
|
-
|
10
|
+
t as Asterisk
|
10
11
|
};
|
package/dist/react/index.d.ts
CHANGED
@@ -1,20 +1,27 @@
|
|
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 SkfCard } from './skf-card/index.js';
|
3
3
|
export { default as SkfCheckbox } from './skf-checkbox/index.js';
|
4
4
|
export { default as SkfCollapse } from './skf-collapse/index.js';
|
5
|
+
export { default as SkfDialog } from './skf-dialog/index.js';
|
6
|
+
export { default as SkfAlert } from './skf-alert/index.js';
|
5
7
|
export { default as SkfDivider } from './skf-divider/index.js';
|
6
|
-
export { default as SkfHeading } from './skf-heading/index.js';
|
7
8
|
export { default as SkfButton } from './skf-button/index.js';
|
8
|
-
export { default as
|
9
|
+
export { default as SkfHeading } from './skf-heading/index.js';
|
9
10
|
export { default as SkfIcon } from './skf-icon/index.js';
|
10
11
|
export { default as SkfInput } from './skf-input/index.js';
|
11
12
|
export { default as SkfLink } from './skf-link/index.js';
|
12
13
|
export { default as SkfLoader } from './skf-loader/index.js';
|
13
14
|
export { default as SkfLogo } from './skf-logo/index.js';
|
15
|
+
export { default as SkfProgress } from './skf-progress/index.js';
|
14
16
|
export { default as SkfRadio } from './skf-radio/index.js';
|
15
17
|
export { default as SkfSelect } from './skf-select/index.js';
|
16
18
|
export { default as SkfSelectOption } from './skf-select-option/index.js';
|
17
19
|
export { default as SkfSelectOptionGroup } from './skf-select-option-group/index.js';
|
18
20
|
export { default as SkfSwitch } from './skf-switch/index.js';
|
21
|
+
export { default as SkfTab } from './skf-tab/index.js';
|
22
|
+
export { default as SkfTabGroup } from './skf-tab-group/index.js';
|
23
|
+
export { default as SkfTabPanel } from './skf-tab-panel/index.js';
|
19
24
|
export { default as SkfTag } from './skf-tag/index.js';
|
20
25
|
export { default as SkfTextArea } from './skf-textarea/index.js';
|
26
|
+
export { default as SkfToast } from './skf-toast/index.js';
|
27
|
+
export { default as SkfToastWrapper } from './skf-toast-wrapper/index.js';
|
package/dist/react/index.js
CHANGED
@@ -1,20 +1,27 @@
|
|
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 SkfCard } from './skf-card/index.js';
|
3
3
|
export { default as SkfCheckbox } from './skf-checkbox/index.js';
|
4
4
|
export { default as SkfCollapse } from './skf-collapse/index.js';
|
5
|
+
export { default as SkfDialog } from './skf-dialog/index.js';
|
6
|
+
export { default as SkfAlert } from './skf-alert/index.js';
|
5
7
|
export { default as SkfDivider } from './skf-divider/index.js';
|
6
|
-
export { default as SkfHeading } from './skf-heading/index.js';
|
7
8
|
export { default as SkfButton } from './skf-button/index.js';
|
8
|
-
export { default as
|
9
|
+
export { default as SkfHeading } from './skf-heading/index.js';
|
9
10
|
export { default as SkfIcon } from './skf-icon/index.js';
|
10
11
|
export { default as SkfInput } from './skf-input/index.js';
|
11
12
|
export { default as SkfLink } from './skf-link/index.js';
|
12
13
|
export { default as SkfLoader } from './skf-loader/index.js';
|
13
14
|
export { default as SkfLogo } from './skf-logo/index.js';
|
15
|
+
export { default as SkfProgress } from './skf-progress/index.js';
|
14
16
|
export { default as SkfRadio } from './skf-radio/index.js';
|
15
17
|
export { default as SkfSelect } from './skf-select/index.js';
|
16
18
|
export { default as SkfSelectOption } from './skf-select-option/index.js';
|
17
19
|
export { default as SkfSelectOptionGroup } from './skf-select-option-group/index.js';
|
18
20
|
export { default as SkfSwitch } from './skf-switch/index.js';
|
21
|
+
export { default as SkfTab } from './skf-tab/index.js';
|
22
|
+
export { default as SkfTabGroup } from './skf-tab-group/index.js';
|
23
|
+
export { default as SkfTabPanel } from './skf-tab-panel/index.js';
|
19
24
|
export { default as SkfTag } from './skf-tag/index.js';
|
20
25
|
export { default as SkfTextArea } from './skf-textarea/index.js';
|
26
|
+
export { default as SkfToast } from './skf-toast/index.js';
|
27
|
+
export { default as SkfToastWrapper } from './skf-toast-wrapper/index.js';
|
@@ -1,3 +1,9 @@
|
|
1
1
|
import Component from '../../components/button/button.js';
|
2
|
-
|
2
|
+
import { type SkfButton } from '../../components/button/button.js';
|
3
|
+
import { type EventName } from '@lit/react';
|
4
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
|
5
|
+
onClick: EventName<Event & {
|
6
|
+
target: SkfButton;
|
7
|
+
}>;
|
8
|
+
}>;
|
3
9
|
export default reactWrapper;
|
@@ -1,13 +1,17 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { createComponent } from '@lit/react';
|
3
3
|
import Component from '../../components/button/button.js';
|
4
|
+
import {} from '../../components/button/button.js';
|
5
|
+
import {} from '@lit/react';
|
4
6
|
const tagName = 'skf-button';
|
5
7
|
Component.define('skf-button');
|
6
8
|
const reactWrapper = createComponent({
|
7
9
|
tagName,
|
8
10
|
elementClass: Component,
|
9
11
|
react: React,
|
10
|
-
events: {
|
12
|
+
events: {
|
13
|
+
onClick: 'click',
|
14
|
+
},
|
11
15
|
displayName: 'SkfButton',
|
12
16
|
});
|
13
17
|
export default reactWrapper;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import Component from '../../components/dialog/dialog.js';
|
2
|
+
import { type SkfDialog } from '../../components/dialog/dialog.js';
|
3
|
+
import { type EventName } from '@lit/react';
|
4
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
|
5
|
+
onSkfDialogOpen: EventName<Event & {
|
6
|
+
target: SkfDialog;
|
7
|
+
}>;
|
8
|
+
onSkfDialogClose: EventName<Event & {
|
9
|
+
target: SkfDialog;
|
10
|
+
}>;
|
11
|
+
onClose: EventName<Event & {
|
12
|
+
target: SkfDialog;
|
13
|
+
}>;
|
14
|
+
}>;
|
15
|
+
export default reactWrapper;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/dialog/dialog.js';
|
4
|
+
import {} from '../../components/dialog/dialog.js';
|
5
|
+
import {} from '@lit/react';
|
6
|
+
const tagName = 'skf-dialog';
|
7
|
+
Component.define('skf-dialog');
|
8
|
+
const reactWrapper = createComponent({
|
9
|
+
tagName,
|
10
|
+
elementClass: Component,
|
11
|
+
react: React,
|
12
|
+
events: {
|
13
|
+
onSkfDialogOpen: 'skf-dialog-open',
|
14
|
+
onSkfDialogClose: 'skf-dialog-close',
|
15
|
+
onClose: 'close',
|
16
|
+
},
|
17
|
+
displayName: 'SkfDialog',
|
18
|
+
});
|
19
|
+
export default reactWrapper;
|