@skf-design-system/ui-components 1.0.0-beta.5 → 1.0.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/accordion-item.d.ts +1 -1
- package/dist/components/accordion/accordion.component.d.ts +4 -4
- package/dist/components/accordion/accordion.component.js +18 -17
- 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 +5 -5
- package/dist/components/alert/alert.component.js +46 -35
- package/dist/components/alert/alert.styles.d.ts +1 -2
- package/dist/components/alert/alert.styles.js +29 -24
- package/dist/components/breadcrumb/breadcrumb.component.d.ts +29 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +8 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.component.d.ts +25 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.d.ts +8 -0
- package/dist/components/button/button.component.d.ts +29 -5
- package/dist/components/button/button.component.js +89 -52
- package/dist/components/button/button.styles.js +65 -45
- package/dist/components/card/card.component.d.ts +4 -4
- package/dist/components/card/card.component.js +35 -24
- package/dist/components/card/card.styles.d.ts +1 -2
- package/dist/components/card/card.styles.js +14 -12
- package/dist/components/checkbox/checkbox.component.d.ts +11 -12
- package/dist/components/checkbox/checkbox.component.js +96 -90
- package/dist/components/collapse/collapse.component.d.ts +8 -8
- package/dist/components/collapse/collapse.component.js +42 -34
- package/dist/components/collapse/collapse.styles.js +15 -14
- package/dist/components/dialog/dialog.component.d.ts +74 -0
- package/dist/components/dialog/dialog.component.js +187 -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 +3 -3
- package/dist/components/divider/divider.component.js +39 -27
- package/dist/components/divider/divider.styles.d.ts +1 -2
- package/dist/components/divider/divider.styles.js +26 -26
- package/dist/components/heading/heading.component.d.ts +2 -2
- package/dist/components/heading/heading.component.js +13 -13
- package/dist/components/icon/icon.component.d.ts +2 -5
- package/dist/components/icon/icon.component.js +32 -23
- package/dist/components/icon/icon.styles.js +53 -47
- package/dist/components/input/input.component.d.ts +12 -11
- package/dist/components/input/input.component.js +88 -89
- package/dist/components/link/link.component.d.ts +7 -6
- package/dist/components/link/link.component.js +49 -43
- package/dist/components/link/link.styles.js +36 -40
- package/dist/components/loader/loader.component.d.ts +2 -2
- package/dist/components/loader/loader.component.js +39 -32
- package/dist/components/loader/loader.styles.js +11 -10
- package/dist/components/logo/logo.component.d.ts +3 -3
- package/dist/components/logo/logo.component.js +28 -17
- package/dist/components/logo/logo.styles.d.ts +1 -2
- package/dist/components/logo/logo.styles.js +11 -9
- package/dist/components/menu/menu.component.d.ts +24 -0
- package/dist/components/menu/menu.component.js +18 -0
- package/dist/components/menu/menu.d.ts +8 -0
- package/dist/components/menu/menu.js +6 -0
- package/dist/components/menu/menu.styles.d.ts +1 -0
- package/dist/components/menu/menu.styles.js +11 -0
- package/dist/components/menu-item/menu-item.component.d.ts +25 -0
- package/dist/components/menu-item/menu-item.component.js +13 -0
- package/dist/components/menu-item/menu-item.d.ts +8 -0
- package/dist/components/menu-item/menu-item.js +6 -0
- package/dist/components/menu-item/menu-item.styles.d.ts +1 -0
- package/dist/components/menu-item/menu-item.styles.js +19 -0
- package/dist/components/popover/popover.component.d.ts +29 -0
- package/dist/components/popover/popover.component.js +37 -0
- package/dist/components/popover/popover.d.ts +8 -0
- package/dist/components/popover/popover.js +6 -0
- package/dist/components/popover/popover.styles.d.ts +1 -0
- package/dist/components/popover/popover.styles.js +12 -0
- 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 +7 -9
- package/dist/components/radio/radio.component.js +95 -79
- package/dist/components/select/select.component.d.ts +10 -12
- package/dist/components/select/select.component.js +120 -120
- package/dist/components/select/select.controllers.d.ts +1 -26
- package/dist/components/select/select.controllers.js +35 -95
- package/dist/components/select-option/select-option.component.d.ts +1 -1
- 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/select-option-group/select-option-group.component.js +9 -9
- package/dist/components/stepper/stepper.component.d.ts +38 -0
- package/dist/components/stepper/stepper.component.js +91 -0
- package/dist/components/stepper/stepper.d.ts +8 -0
- package/dist/components/stepper/stepper.helpers.d.ts +16 -0
- package/dist/components/stepper/stepper.helpers.js +18 -0
- package/dist/components/stepper/stepper.js +6 -0
- package/dist/components/stepper/stepper.styles.d.ts +1 -0
- package/dist/components/stepper/stepper.styles.js +15 -0
- package/dist/components/stepper-item/stepper-item.component.d.ts +47 -0
- package/dist/components/stepper-item/stepper-item.component.js +113 -0
- package/dist/components/stepper-item/stepper-item.d.ts +8 -0
- package/dist/components/stepper-item/stepper-item.js +6 -0
- package/dist/components/stepper-item/stepper-item.styles.d.ts +1 -0
- package/dist/components/stepper-item/stepper-item.styles.js +98 -0
- package/dist/components/switch/switch.component.d.ts +2 -2
- package/dist/components/switch/switch.component.js +17 -7
- package/dist/components/switch/switch.styles.js +16 -13
- 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 +2 -2
- package/dist/components/tag/tag.component.js +61 -45
- package/dist/components/tag/tag.styles.js +30 -28
- package/dist/components/textarea/textarea.component.d.ts +4 -4
- package/dist/components/textarea/textarea.component.js +2 -2
- package/dist/components/toast/toast.component.d.ts +8 -5
- package/dist/components/toast/toast.component.js +30 -26
- package/dist/components/toast/toast.singleton.d.ts +5 -10
- package/dist/components/toast/toast.singleton.js +25 -25
- package/dist/components/toast/toast.styles.d.ts +1 -0
- package/dist/components/toast-item/toast-item.component.d.ts +1 -1
- package/dist/components/toast-item/toast-item.component.js +15 -15
- package/dist/components/toast-item/toast-item.styles.js +18 -0
- package/dist/components/toast-wrapper/toast-wrapper.component.d.ts +2 -2
- package/dist/components/toast-wrapper/toast-wrapper.component.js +11 -11
- package/dist/components/toast-wrapper/toast-wrapper.styles.d.ts +1 -0
- package/dist/components/tooltip/tooltip.component.d.ts +24 -0
- package/dist/components/tooltip/tooltip.component.js +18 -0
- package/dist/components/tooltip/tooltip.d.ts +8 -0
- package/dist/components/tooltip/tooltip.js +6 -0
- package/dist/components/tooltip/tooltip.styles.d.ts +1 -0
- package/dist/components/tooltip/tooltip.styles.js +12 -0
- package/dist/custom-elements.json +2465 -629
- package/dist/index.d.ts +11 -0
- package/dist/index.js +77 -44
- package/dist/internal/base-classes/popover/popover.base.d.ts +29 -0
- package/dist/internal/base-classes/popover/popover.base.js +116 -0
- package/dist/internal/base-classes/popover/popover.styles.d.ts +1 -0
- package/dist/internal/base-classes/popover/popover.styles.js +29 -0
- 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 +13 -13
- package/dist/internal/components/skf-element.js +26 -25
- package/dist/internal/controllers/popover.controller.d.ts +16 -0
- package/dist/internal/controllers/popover.controller.js +44 -0
- package/dist/internal/helpers/hintSeverity.d.ts +2 -2
- package/dist/internal/helpers/watch.d.ts +27 -0
- package/dist/internal/helpers/watch.js +28 -0
- package/dist/internal/templates/asterisk.d.ts +1 -1
- package/dist/internal/templates/asterisk.js +7 -6
- package/dist/react/index.d.ts +13 -0
- package/dist/react/index.js +13 -0
- package/dist/react/skf-breadcrumb/index.d.ts +9 -0
- package/dist/react/skf-breadcrumb/index.js +17 -0
- package/dist/react/skf-breadcrumb-item/index.d.ts +3 -0
- package/dist/react/skf-breadcrumb-item/index.js +13 -0
- 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-menu/index.d.ts +12 -0
- package/dist/react/skf-menu/index.js +18 -0
- package/dist/react/skf-menu-item/index.d.ts +27 -0
- package/dist/react/skf-menu-item/index.js +23 -0
- package/dist/react/skf-popover/index.d.ts +12 -0
- package/dist/react/skf-popover/index.js +18 -0
- package/dist/react/skf-progress/index.d.ts +3 -0
- package/dist/react/skf-progress/index.js +13 -0
- package/dist/react/skf-stepper/index.d.ts +9 -0
- package/dist/react/skf-stepper/index.js +17 -0
- package/dist/react/skf-stepper-item/index.d.ts +9 -0
- package/dist/react/skf-stepper-item/index.js +17 -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-tooltip/index.d.ts +12 -0
- package/dist/react/skf-tooltip/index.js +18 -0
- package/dist/styles/component.styles.js +15 -2
- package/dist/types/jsx/custom-element-jsx.d.ts +603 -27
- package/dist/types/vue/index.d.ts +413 -11
- package/dist/vscode.html-custom-data.json +462 -36
- package/dist/web-types.json +944 -90
- package/package.json +43 -42
- package/dist/components/toast-item/toast-item.style.js +0 -16
- /package/dist/components/{toast/toast.style.d.ts → breadcrumb/breadcrumb.styles.d.ts} +0 -0
- /package/dist/components/{toast-wrapper/toast-wrapper.style.d.ts → breadcrumb-item/breadcrumb-item.styles.d.ts} +0 -0
- /package/dist/components/toast/{toast.style.js → toast.styles.js} +0 -0
- /package/dist/components/toast-item/{toast-item.style.d.ts → toast-item.styles.d.ts} +0 -0
- /package/dist/components/toast-wrapper/{toast-wrapper.style.js → toast-wrapper.styles.js} +0 -0
@@ -1,29 +1,30 @@
|
|
1
1
|
import "../icon/icon.js";
|
2
|
-
import
|
2
|
+
import u from "./link.styles.js";
|
3
3
|
import { SkfElement as m } from "../../internal/components/skf-element.js";
|
4
|
-
import
|
4
|
+
import y from "../../styles/component.styles.js";
|
5
5
|
import "lit";
|
6
6
|
import { property as r } from "lit/decorators.js";
|
7
|
-
import {
|
7
|
+
import { classMap as k } from "lit/directives/class-map.js";
|
8
|
+
import { ifDefined as c } from "lit/directives/if-defined.js";
|
8
9
|
import { html as f, literal as d } from "lit/static-html.js";
|
9
|
-
var
|
10
|
-
for (var
|
11
|
-
(
|
12
|
-
return
|
13
|
-
};
|
14
|
-
const
|
10
|
+
var g = Object.defineProperty, b = Object.getOwnPropertyDescriptor, i = (h, t, o, l) => {
|
11
|
+
for (var n = l > 1 ? void 0 : l ? b(t, o) : t, p = h.length - 1, a; p >= 0; p--)
|
12
|
+
(a = h[p]) && (n = (l ? a(t, o, n) : a(n)) || n);
|
13
|
+
return l && n && g(t, o, n), n;
|
14
|
+
}, s;
|
15
|
+
const e = (s = class extends m {
|
15
16
|
constructor() {
|
16
|
-
super(...arguments), this.as = "a", this.color = "primary", this.iconPlacement = "left", this.
|
17
|
+
super(...arguments), this.as = "a", this.color = "primary", this.iconPlacement = "left", this.stretch = !1, this.type = "button", this._preprocessOnClick = (t) => {
|
17
18
|
this.as === "a" && this.onClick && t.preventDefault(), t.stopPropagation(), this.emit("click");
|
18
19
|
};
|
19
20
|
}
|
20
21
|
set onClick(t) {
|
21
22
|
if (!t) return;
|
22
23
|
this._onClick = t;
|
23
|
-
const
|
24
|
-
t(
|
24
|
+
const o = (l) => {
|
25
|
+
t(l, this.href ?? this.route);
|
25
26
|
};
|
26
|
-
this._assertValidOnClick(t), this.removeEventListener("click",
|
27
|
+
this._assertValidOnClick(t), this.removeEventListener("click", o), this.addEventListener("click", o);
|
27
28
|
}
|
28
29
|
get onClick() {
|
29
30
|
return this._onClick;
|
@@ -47,70 +48,75 @@ const a = class a extends m {
|
|
47
48
|
inverse: "inverse"
|
48
49
|
});
|
49
50
|
return f`
|
50
|
-
<skf-icon color=${t[this.color]} name=${
|
51
|
+
<skf-icon color=${t[this.color]} name=${c(this.icon)} size="sm"></skf-icon>
|
51
52
|
`;
|
52
53
|
}
|
53
54
|
render() {
|
54
|
-
const t = this.as === "a",
|
55
|
+
const t = this.as === "a", o = t ? d`a` : d`button`;
|
55
56
|
return f`
|
56
|
-
<${
|
57
|
-
?disabled=${
|
57
|
+
<${o}
|
58
|
+
?disabled=${c(t ? void 0 : this.disabled)}
|
58
59
|
@click=${this._preprocessOnClick}
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
60
|
+
class=${k({
|
61
|
+
link: !0,
|
62
|
+
"link--color-inverse": this.color === "inverse",
|
63
|
+
"link--color-primary": this.color === "primary",
|
64
|
+
"link--icon-right": this.iconPlacement === "right",
|
65
|
+
"link--stretch": this.stretch,
|
66
|
+
...s.classMap
|
67
|
+
})}
|
68
|
+
download=${c(t ? this.download : void 0)}
|
69
|
+
href=${c(t ? this.href : void 0)}
|
70
|
+
rel=${c(t ? this.rel : void 0)}
|
71
|
+
target=${c(t ? this.target : void 0)}
|
72
|
+
type=${c(t ? void 0 : this.type)}
|
66
73
|
>
|
67
74
|
${this.icon && this._renderIcon()}
|
68
75
|
<slot>Default link text</slot>
|
69
|
-
</${
|
76
|
+
</${o}>
|
70
77
|
`;
|
71
78
|
}
|
72
|
-
};
|
73
|
-
|
74
|
-
let e = a;
|
75
|
-
o([
|
79
|
+
}, s.styles = [y, u], s.classMap = {}, s);
|
80
|
+
i([
|
76
81
|
r({ type: String, reflect: !0 })
|
77
82
|
], e.prototype, "as", 2);
|
78
|
-
|
83
|
+
i([
|
79
84
|
r({ type: String, reflect: !0 })
|
80
85
|
], e.prototype, "color", 2);
|
81
|
-
|
86
|
+
i([
|
82
87
|
r({ type: Boolean, reflect: !0 })
|
83
88
|
], e.prototype, "disabled", 2);
|
84
|
-
|
89
|
+
i([
|
85
90
|
r({ type: String })
|
86
91
|
], e.prototype, "download", 2);
|
87
|
-
|
88
|
-
r({ type: String
|
92
|
+
i([
|
93
|
+
r({ type: String })
|
89
94
|
], e.prototype, "href", 2);
|
90
|
-
|
95
|
+
i([
|
91
96
|
r({ type: String })
|
92
97
|
], e.prototype, "icon", 2);
|
93
|
-
|
98
|
+
i([
|
94
99
|
r({ attribute: "icon-placement", reflect: !0 })
|
95
100
|
], e.prototype, "iconPlacement", 2);
|
96
|
-
|
101
|
+
i([
|
97
102
|
r()
|
98
103
|
], e.prototype, "rel", 2);
|
99
|
-
|
104
|
+
i([
|
100
105
|
r({ reflect: !0 })
|
101
106
|
], e.prototype, "route", 2);
|
102
|
-
|
107
|
+
i([
|
103
108
|
r({ type: Boolean, reflect: !0 })
|
104
109
|
], e.prototype, "stretch", 2);
|
105
|
-
|
110
|
+
i([
|
106
111
|
r()
|
107
112
|
], e.prototype, "target", 2);
|
108
|
-
|
113
|
+
i([
|
109
114
|
r()
|
110
115
|
], e.prototype, "type", 2);
|
111
|
-
|
116
|
+
i([
|
112
117
|
r({ attribute: !1 })
|
113
118
|
], e.prototype, "onClick", 1);
|
119
|
+
let E = e;
|
114
120
|
export {
|
115
|
-
|
121
|
+
E as SkfLink
|
116
122
|
};
|
@@ -1,36 +1,36 @@
|
|
1
1
|
import { css as r } from "lit";
|
2
|
-
const
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
2
|
+
const o = r`
|
3
|
+
/* stylelint-disable selector-class-pattern */
|
4
|
+
@layer components {
|
5
|
+
.link {
|
6
|
+
align-items: center;
|
7
|
+
color: var(--state-color, var(--color));
|
8
|
+
display: inline-flex;
|
9
|
+
flex-direction: var(--flex-direction, rows);
|
10
|
+
font-weight: var(--skf-font-weight-bold);
|
11
|
+
gap: var(--skf-spacing-50);
|
12
|
+
justify-content: flex-start;
|
13
|
+
|
14
|
+
&:is(a) {
|
15
|
+
text-decoration: none;
|
16
|
+
}
|
17
|
+
|
18
|
+
&:disabled {
|
19
|
+
--state-color: var(--color-disabled);
|
20
|
+
}
|
21
|
+
|
22
|
+
&:hover {
|
23
|
+
--state-color: var(--color-hover);
|
24
|
+
}
|
25
|
+
|
26
|
+
&:focus-visible {
|
27
|
+
border-radius: var(--skf-border-radius-sm);
|
28
|
+
outline: var(--skf-border-width-md) solid var(--outline-color);
|
29
|
+
outline-offset: var(--skf-size-2);
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
.link--color-primary {
|
34
34
|
--color: var(--skf-interactive-text-color-primary);
|
35
35
|
--color-active: var(--skf-interactive-text-color-primary-active);
|
36
36
|
--color-disabled: var(--skf-interactive-text-color-disabled);
|
@@ -38,7 +38,7 @@ const e = r`
|
|
38
38
|
--outline-color: var(--skf-interactive-text-color-primary);
|
39
39
|
}
|
40
40
|
|
41
|
-
|
41
|
+
.link--color-inverse {
|
42
42
|
--color: var(--skf-interactive-text-color-inverse);
|
43
43
|
--color-active: var(--skf-interactive-text-color-inverse-active);
|
44
44
|
--color-disabled: var(--skf-interactive-text-color-disabled);
|
@@ -46,19 +46,15 @@ const e = r`
|
|
46
46
|
--outline-color: var(--skf-interactive-text-color-inverse);
|
47
47
|
}
|
48
48
|
|
49
|
-
|
50
|
-
text-decoration: none;
|
51
|
-
}
|
52
|
-
|
53
|
-
:host([icon-placement='right']) & {
|
49
|
+
.link--icon-right {
|
54
50
|
--flex-direction: row-reverse;
|
55
51
|
}
|
56
52
|
|
57
|
-
|
53
|
+
.link--stretch {
|
58
54
|
inline-size: 100%;
|
59
55
|
}
|
60
56
|
}
|
61
57
|
`;
|
62
58
|
export {
|
63
|
-
|
59
|
+
o as default
|
64
60
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { SkfElement } from '
|
1
|
+
import { SkfElement } from '../../internal/components/skf-element.js';
|
2
2
|
import { type CSSResultGroup } from 'lit';
|
3
3
|
/**
|
4
4
|
* The `<skf-loader>` component is a progress indicator that uses circular indicators for short, indeterminate activities
|
@@ -13,7 +13,7 @@ export declare class SkfLoader extends SkfElement {
|
|
13
13
|
/** Defines the aria-label */
|
14
14
|
ariaLabel: string;
|
15
15
|
/** If true, inverts the color (to be used on colored backgrounds) */
|
16
|
-
invert
|
16
|
+
invert: boolean;
|
17
17
|
/** Defines the size of the loader */
|
18
18
|
size?: 'md' | 'sm';
|
19
19
|
constructor();
|
@@ -1,45 +1,52 @@
|
|
1
|
-
var
|
2
|
-
throw TypeError(
|
1
|
+
var v = (e) => {
|
2
|
+
throw TypeError(e);
|
3
3
|
};
|
4
|
-
var f = (
|
5
|
-
var
|
6
|
-
import { SkfElement as
|
7
|
-
import
|
8
|
-
import { html as
|
9
|
-
import { property as
|
10
|
-
import
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
4
|
+
var f = (e, r, t) => r.has(e) || v("Cannot " + t);
|
5
|
+
var n = (e, r, t) => (f(e, r, "read from private field"), t ? t.call(e) : r.get(e)), h = (e, r, t) => r.has(e) ? v("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(e) : r.set(e, t), u = (e, r, t, a) => (f(e, r, "write to private field"), a ? a.call(e, t) : r.set(e, t), t);
|
6
|
+
import { SkfElement as y } from "../../internal/components/skf-element.js";
|
7
|
+
import _ from "../../styles/component.styles.js";
|
8
|
+
import { html as b } from "lit";
|
9
|
+
import { property as p } from "lit/decorators.js";
|
10
|
+
import { classMap as g } from "lit/directives/class-map.js";
|
11
|
+
import z from "./loader.styles.js";
|
12
|
+
var x = Object.defineProperty, d = (e, r, t, a) => {
|
13
|
+
for (var i = void 0, o = e.length - 1, m; o >= 0; o--)
|
14
|
+
(m = e[o]) && (i = m(r, t, i) || i);
|
15
|
+
return i && x(r, t, i), i;
|
15
16
|
}, s;
|
16
|
-
const
|
17
|
+
const c = class c extends y {
|
17
18
|
constructor() {
|
18
19
|
super();
|
19
20
|
h(this, s);
|
20
|
-
this.ariaLabel = "Loading...", this.size = "md",
|
21
|
+
this.ariaLabel = "Loading...", this.invert = !1, this.size = "md", u(this, s, this.attachInternals()), n(this, s).role = "progressbar", n(this, s).ariaLive = "polite";
|
21
22
|
}
|
22
23
|
render() {
|
23
|
-
return
|
24
|
-
<div
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
return b`
|
25
|
+
<div
|
26
|
+
class=${g({
|
27
|
+
loader: !0,
|
28
|
+
"loader--invert": this.invert,
|
29
|
+
"loader--small": this.size === "sm"
|
30
|
+
})}
|
31
|
+
>
|
32
|
+
<div class="loader__circle"></div>
|
33
|
+
<div class="loader__circle"></div>
|
34
|
+
<div class="loader__circle"></div>
|
28
35
|
</div>
|
29
36
|
`;
|
30
37
|
}
|
31
38
|
};
|
32
|
-
s = new WeakMap(),
|
33
|
-
let
|
34
|
-
|
35
|
-
|
36
|
-
],
|
37
|
-
|
38
|
-
|
39
|
-
],
|
40
|
-
|
41
|
-
|
42
|
-
],
|
39
|
+
s = new WeakMap(), c.styles = [_, z];
|
40
|
+
let l = c;
|
41
|
+
d([
|
42
|
+
p({ reflect: !0, attribute: "aria-label" })
|
43
|
+
], l.prototype, "ariaLabel");
|
44
|
+
d([
|
45
|
+
p({ type: Boolean })
|
46
|
+
], l.prototype, "invert");
|
47
|
+
d([
|
48
|
+
p({ type: String, reflect: !0 })
|
49
|
+
], l.prototype, "size");
|
43
50
|
export {
|
44
|
-
|
51
|
+
l as SkfLoader
|
45
52
|
};
|
@@ -1,20 +1,21 @@
|
|
1
|
-
import { css as
|
2
|
-
const
|
1
|
+
import { css as a } from "lit";
|
2
|
+
const s = a`
|
3
|
+
/* stylelint-disable selector-class-pattern */
|
3
4
|
@layer components {
|
4
5
|
:host {
|
5
6
|
display: inline-flex;
|
6
7
|
}
|
7
8
|
|
8
|
-
|
9
|
+
.loader {
|
9
10
|
display: flex;
|
10
11
|
gap: var(--_skf-loader-gap, var(--skf-spacing-50));
|
12
|
+
}
|
11
13
|
|
12
|
-
|
13
|
-
|
14
|
-
}
|
14
|
+
.loader--small {
|
15
|
+
--_skf-loader-gap: var(--skf-spacing-25);
|
15
16
|
}
|
16
17
|
|
17
|
-
.
|
18
|
+
.loader__circle {
|
18
19
|
animation: skf-loader 0.5s infinite ease-in alternate;
|
19
20
|
aspect-ratio: 1;
|
20
21
|
background-color: var(--_skf-loader-color, var(--skf-bg-color-emphasised));
|
@@ -29,11 +30,11 @@ const e = s`
|
|
29
30
|
animation-delay: 0.2s;
|
30
31
|
}
|
31
32
|
|
32
|
-
|
33
|
+
.loader--invert & {
|
33
34
|
--_skf-loader-color: var(--skf-bg-color-neutral-1);
|
34
35
|
}
|
35
36
|
|
36
|
-
|
37
|
+
.loader--small & {
|
37
38
|
--_skf-loader-size: var(--skf-size-4);
|
38
39
|
}
|
39
40
|
}
|
@@ -46,5 +47,5 @@ const e = s`
|
|
46
47
|
}
|
47
48
|
`;
|
48
49
|
export {
|
49
|
-
|
50
|
+
s as default
|
50
51
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { SkfElement } from '
|
1
|
+
import { SkfElement } from '../../internal/components/skf-element.js';
|
2
2
|
import type { Logo } from '@skf-design-system/ui-assets';
|
3
3
|
import { type CSSResultGroup } from 'lit';
|
4
4
|
/**
|
@@ -13,9 +13,9 @@ export declare class SkfLogo extends SkfElement {
|
|
13
13
|
/** Defines the title of the logo */
|
14
14
|
title: string;
|
15
15
|
/**
|
16
|
-
*
|
16
|
+
* Defines the color of the logo
|
17
17
|
* @type { "primary" | "secondary" | "inverse" }
|
18
18
|
*/
|
19
|
-
color
|
19
|
+
color: Logo;
|
20
20
|
render(): import("lit").TemplateResult<1>;
|
21
21
|
}
|
@@ -1,20 +1,31 @@
|
|
1
1
|
import { SkfElement as i } from "../../internal/components/skf-element.js";
|
2
|
-
import
|
3
|
-
import { html as
|
4
|
-
import { property as
|
5
|
-
import a from "
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
2
|
+
import n from "../../styles/component.styles.js";
|
3
|
+
import { html as m } from "lit";
|
4
|
+
import { property as p } from "lit/decorators.js";
|
5
|
+
import { classMap as a } from "lit/directives/class-map.js";
|
6
|
+
import { styles as d } from "./logo.styles.js";
|
7
|
+
var f = Object.defineProperty, v = (e, l, s, g) => {
|
8
|
+
for (var c = void 0, r = e.length - 1, h; r >= 0; r--)
|
9
|
+
(h = e[r]) && (c = h(l, s, c) || c);
|
10
|
+
return c && f(l, s, c), c;
|
10
11
|
};
|
11
|
-
const
|
12
|
+
const o = class o extends i {
|
12
13
|
constructor() {
|
13
14
|
super(...arguments), this.title = "SKF logotype", this.color = "primary";
|
14
15
|
}
|
15
16
|
render() {
|
16
|
-
return
|
17
|
-
<svg
|
17
|
+
return m`
|
18
|
+
<svg
|
19
|
+
class=${a({
|
20
|
+
logo: !0,
|
21
|
+
"logo--color-inverse": this.color === "inverse",
|
22
|
+
"logo--color-secondary": this.color === "secondary"
|
23
|
+
})}
|
24
|
+
viewBox="0 0 1300 300"
|
25
|
+
xmlns="http://www.w3.org/2000/svg"
|
26
|
+
x="0px"
|
27
|
+
y="0px"
|
28
|
+
>
|
18
29
|
<title>${this.title}</title>
|
19
30
|
<g>
|
20
31
|
<g>
|
@@ -55,13 +66,13 @@ c0,5.8-4.3,6.1-9.1,6.1H1230.9z"
|
|
55
66
|
`;
|
56
67
|
}
|
57
68
|
};
|
58
|
-
|
59
|
-
let t =
|
60
|
-
|
61
|
-
|
69
|
+
o.styles = [n, d];
|
70
|
+
let t = o;
|
71
|
+
v([
|
72
|
+
p()
|
62
73
|
], t.prototype, "title");
|
63
|
-
|
64
|
-
|
74
|
+
v([
|
75
|
+
p()
|
65
76
|
], t.prototype, "color");
|
66
77
|
export {
|
67
78
|
t as SkfLogo
|
@@ -1,2 +1 @@
|
|
1
|
-
declare const
|
2
|
-
export default _default;
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -1,23 +1,25 @@
|
|
1
1
|
import { css as o } from "lit";
|
2
|
-
const
|
2
|
+
const s = o`
|
3
|
+
/* stylelint-disable selector-class-pattern */
|
4
|
+
|
3
5
|
:host {
|
4
6
|
display: inline-flex;
|
5
7
|
}
|
6
8
|
|
7
|
-
|
9
|
+
.logo {
|
8
10
|
aspect-ratio: 13 / 3;
|
9
11
|
block-size: var(--skf-logo-height, var(--skf-size-32));
|
10
12
|
fill: var(--_skf-logo-color, var(--skf-logo-primary));
|
13
|
+
}
|
11
14
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
+
.logo--color-secondary {
|
16
|
+
--_skf-logo-color: var(--skf-logo-secondary);
|
17
|
+
}
|
15
18
|
|
16
|
-
|
17
|
-
|
18
|
-
}
|
19
|
+
.logo--color-inverse {
|
20
|
+
--_skf-logo-color: var(--skf-logo-inverse);
|
19
21
|
}
|
20
22
|
`;
|
21
23
|
export {
|
22
|
-
|
24
|
+
s as styles
|
23
25
|
};
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { SkfPopoverBase } from '../../internal/base-classes/popover/popover.base.js';
|
2
|
+
import type { CSSResultGroup } from 'lit';
|
3
|
+
/**
|
4
|
+
* The `<skf-menu>` is a component that displays a list of actions or options.
|
5
|
+
*
|
6
|
+
* @documentation See [zeroheight](https://zeroheight.com/****) for design principles
|
7
|
+
*
|
8
|
+
* @property {"top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end"} [placement='bottom-start'] - The placement of the menu
|
9
|
+
* @property {boolean} [isOpen=false] - Whether the menu is open
|
10
|
+
* @property {string} [anchor] - The id of the element the menu will be anchored to
|
11
|
+
*
|
12
|
+
* @event open - Fired when the menu is opened
|
13
|
+
* @event close - Fired when the menu is closed
|
14
|
+
*
|
15
|
+
* @slot - The menu popover content
|
16
|
+
*
|
17
|
+
* @tagname skf-menu
|
18
|
+
*/
|
19
|
+
export declare class SkfMenu extends SkfPopoverBase {
|
20
|
+
static styles: CSSResultGroup;
|
21
|
+
constructor();
|
22
|
+
addEventListeners($element: HTMLElement | Element): void;
|
23
|
+
removeEventListeners($element: HTMLElement | Element): void;
|
24
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { SkfPopoverBase as t } from "../../internal/base-classes/popover/popover.base.js";
|
2
|
+
import { styles as o } from "./menu.styles.js";
|
3
|
+
const s = class s extends t {
|
4
|
+
constructor() {
|
5
|
+
super(), this.placement = "bottom-start", t.classMap = { menu: !0 };
|
6
|
+
}
|
7
|
+
addEventListeners(e) {
|
8
|
+
e.addEventListener("mouseenter", this.open);
|
9
|
+
}
|
10
|
+
removeEventListeners(e) {
|
11
|
+
e.removeEventListener("mouseenter", this.open);
|
12
|
+
}
|
13
|
+
};
|
14
|
+
s.styles = [t.styles, o];
|
15
|
+
let r = s;
|
16
|
+
export {
|
17
|
+
r as SkfMenu
|
18
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { SkfLink } from '../link/link.component.js';
|
2
|
+
import { type CSSResultGroup } from 'lit';
|
3
|
+
/**
|
4
|
+
* The `<skf-menu-item>` is a component that displays a list of actions or options.
|
5
|
+
*
|
6
|
+
* @documentation See [zeroheight](https://zeroheight.com/****) for design principles
|
7
|
+
*
|
8
|
+
* @event {CustomEvent} my-tag-my-event - Fired when something happens
|
9
|
+
*
|
10
|
+
* @event click - Fired when the component is clicked
|
11
|
+
* @event mouseover - Fired when the mouse is over the component
|
12
|
+
* @event mouseout - Fired when the mouse is out of the component
|
13
|
+
* @event focus - Fired when the component is focused
|
14
|
+
* @event blur - Fired when the component is blurred
|
15
|
+
* @event change - Fired when the component's value changes
|
16
|
+
*
|
17
|
+
* @slot - The component's main content
|
18
|
+
* @slot my-named-slot - A named slot of the component
|
19
|
+
*
|
20
|
+
* @tagname skf-menu-item
|
21
|
+
*/
|
22
|
+
export declare class SkfMenuItem extends SkfLink {
|
23
|
+
static styles: CSSResultGroup;
|
24
|
+
constructor();
|
25
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { SkfLink as s } from "../link/link.component.js";
|
2
|
+
import "lit";
|
3
|
+
import { styles as o } from "./menu-item.styles.js";
|
4
|
+
const t = class t extends s {
|
5
|
+
constructor() {
|
6
|
+
super(), s.classMap = { "menu-item": !0 };
|
7
|
+
}
|
8
|
+
};
|
9
|
+
t.styles = [s.styles, o];
|
10
|
+
let r = t;
|
11
|
+
export {
|
12
|
+
r as SkfMenuItem
|
13
|
+
};
|