@skf-design-system/ui-components 1.0.2-beta.0 → 1.0.2-beta.1
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 +12 -8
- package/dist/components/accordion/accordion-item.component.d.ts +36 -0
- package/dist/components/accordion/accordion-item.component.js +87 -0
- package/dist/components/accordion/accordion-item.d.ts +3 -3
- package/dist/components/accordion/accordion-item.js +4 -5
- package/dist/components/accordion/accordion-item.styles.js +77 -0
- package/dist/components/accordion/accordion.component.d.ts +5 -9
- package/dist/components/accordion/accordion.component.js +4 -5
- package/dist/components/accordion/accordion.d.ts +0 -1
- package/dist/components/accordion/accordion.js +0 -2
- package/dist/components/alert/alert.component.d.ts +4 -7
- package/dist/components/alert/alert.component.js +8 -9
- package/dist/components/alert/alert.styles.js +0 -5
- package/dist/components/breadcrumb/breadcrumb-item.component.js +61 -0
- package/dist/components/breadcrumb/breadcrumb-item.js +6 -0
- package/dist/components/breadcrumb/breadcrumb-item.styles.js +62 -0
- package/dist/components/breadcrumb/breadcrumb.component.d.ts +1 -1
- package/dist/components/breadcrumb/breadcrumb.component.js +60 -0
- package/dist/components/breadcrumb/breadcrumb.js +6 -0
- package/dist/components/breadcrumb/breadcrumb.styles.js +22 -0
- package/dist/components/button/button.component.d.ts +13 -10
- package/dist/components/button/button.component.js +83 -76
- package/dist/components/button/button.styles.d.ts +1 -2
- package/dist/components/button/button.styles.js +1 -1
- package/dist/components/card/card.component.d.ts +1 -1
- package/dist/components/card/card.component.js +1 -1
- package/dist/components/checkbox/checkbox.component.d.ts +8 -6
- package/dist/components/checkbox/checkbox.component.js +2 -2
- package/dist/components/checkbox/checkbox.styles.d.ts +1 -2
- package/dist/components/checkbox/checkbox.styles.js +1 -5
- package/dist/components/date-picker/datepicker.calendar.component.js +1 -1
- package/dist/components/date-picker/datepicker.component.js +1 -1
- package/dist/components/date-picker-input/datepicker-input.component.d.ts +1 -0
- package/dist/components/date-picker-input/datepicker-input.component.js +3 -2
- package/dist/components/dialog/dialog.component.d.ts +5 -4
- package/dist/components/dialog/dialog.component.js +44 -44
- package/dist/components/dialog/dialog.styles.js +4 -4
- package/dist/components/divider/divider.component.js +1 -1
- package/dist/components/drawer/drawer.component.d.ts +12 -8
- package/dist/components/drawer/drawer.component.js +5 -4
- package/dist/components/header/header.component.d.ts +3 -2
- package/dist/components/header/header.component.js +34 -28
- package/dist/components/heading/heading.component.d.ts +3 -5
- package/dist/components/heading/heading.component.js +22 -21
- package/dist/components/icon/icon.component.d.ts +11 -17
- package/dist/components/icon/icon.component.js +2 -2
- package/dist/components/icon/icon.styles.d.ts +1 -2
- package/dist/components/icon/icon.styles.js +1 -1
- package/dist/components/input/input.component.d.ts +30 -31
- package/dist/components/input/input.component.js +136 -123
- package/dist/components/link/link.component.d.ts +12 -14
- package/dist/components/link/link.component.js +34 -34
- package/dist/components/link/link.styles.d.ts +1 -2
- package/dist/components/link/link.styles.js +2 -2
- package/dist/components/loader/loader.component.d.ts +1 -1
- package/dist/components/loader/loader.component.js +36 -40
- package/dist/components/loader/loader.styles.d.ts +1 -2
- package/dist/components/loader/loader.styles.js +40 -32
- package/dist/components/logo/logo.component.d.ts +4 -5
- package/dist/components/logo/logo.component.js +1 -1
- package/dist/components/menu/menu-item.component.d.ts +13 -0
- package/dist/components/{menu-item → menu}/menu-item.component.js +3 -3
- package/dist/components/menu/menu.component.d.ts +9 -6
- package/dist/components/menu/menu.component.js +8 -10
- package/dist/components/{nav-item → nav}/nav-item.component.d.ts +0 -2
- package/dist/components/{nav-item → nav}/nav-item.component.js +1 -1
- package/dist/components/nav/nav.component.js +1 -1
- package/dist/components/popover/popover.component.d.ts +10 -6
- package/dist/components/popover/popover.component.js +22 -24
- package/dist/components/progress/progress.component.d.ts +2 -2
- package/dist/components/progress/progress.component.js +31 -37
- package/dist/components/progress/progress.styles.js +40 -35
- package/dist/components/radio/radio.component.d.ts +9 -7
- package/dist/components/radio/radio.component.js +2 -2
- package/dist/components/{segmented-button-item → segmented-button}/segmented-button-item.component.d.ts +4 -4
- package/dist/components/segmented-button/segmented-button-item.component.js +56 -0
- package/dist/components/segmented-button/segmented-button-item.js +6 -0
- package/dist/components/segmented-button/segmented-button-item.styles.js +62 -0
- package/dist/components/segmented-button/segmented-button.component.d.ts +0 -2
- package/dist/components/segmented-button/segmented-button.component.js +73 -0
- package/dist/components/segmented-button/segmented-button.js +6 -0
- package/dist/components/segmented-button/segmented-button.styles.js +16 -0
- package/dist/components/{select-option-group → select}/select-option-group.component.js +1 -1
- package/dist/components/{select-option → select}/select-option.component.d.ts +7 -8
- package/dist/components/{select-option → select}/select-option.component.js +15 -15
- package/dist/components/select/select.component.d.ts +16 -15
- package/dist/components/select/select.component.js +17 -17
- package/dist/components/select/select.controllers.d.ts +1 -1
- package/dist/components/select/select.controllers.js +14 -11
- package/dist/components/select/select.stories.icons.d.ts +7 -0
- package/dist/components/{stepper-item → stepper}/stepper-item.component.js +8 -8
- package/dist/components/stepper/stepper.component.d.ts +2 -2
- package/dist/components/stepper/stepper.component.js +15 -15
- package/dist/components/stepper/stepper.helpers.d.ts +1 -1
- package/dist/components/switch/switch.component.js +15 -15
- package/dist/components/tab/tab.component.js +1 -1
- package/dist/components/tab-group/tab-group.component.js +1 -1
- package/dist/components/tab-panel/tab-panel.component.js +1 -1
- package/dist/components/tag/tag.component.d.ts +10 -14
- package/dist/components/tag/tag.component.js +32 -35
- package/dist/components/textarea/textarea.component.d.ts +10 -11
- package/dist/components/textarea/textarea.component.js +62 -64
- package/dist/components/{toast-item → toast}/toast-item.d.ts +2 -0
- package/dist/components/{toast-item → toast}/toast-item.js +4 -0
- package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.js +1 -1
- package/dist/components/toast/toast-wrapper.styles.d.ts +1 -0
- package/dist/components/toast/toast.component.d.ts +5 -4
- package/dist/components/toast/toast.component.js +15 -15
- package/dist/components/toast/toast.singleton.d.ts +4 -4
- package/dist/components/toast/toast.singleton.js +12 -12
- package/dist/components/tooltip/tooltip.component.d.ts +2 -1
- package/dist/components/tooltip/tooltip.component.js +15 -10
- package/dist/custom-elements.json +733 -820
- package/dist/index.d.ts +13 -7
- package/dist/index.js +100 -84
- package/dist/internal/base-classes/popover/popover.base.d.ts +10 -5
- package/dist/internal/base-classes/popover/popover.base.js +77 -60
- package/dist/internal/components/hint/hint.component.d.ts +2 -2
- package/dist/internal/components/hint/hint.component.js +2 -2
- package/dist/internal/components/hint/hint.styles.d.ts +1 -2
- package/dist/internal/components/hint/hint.styles.js +1 -1
- package/dist/internal/constants/iconSeverity.d.ts +3 -2
- package/dist/internal/constants/iconSeverity.js +2 -3
- package/dist/internal/helpers/hintSeverity.d.ts +2 -2
- package/dist/internal/helpers/hintSeverity.js +1 -1
- package/dist/internal/types/formField.d.ts +1 -1
- package/dist/internal/types.d.ts +18 -0
- package/dist/styles/component.styles.d.ts +1 -2
- package/dist/styles/component.styles.js +1 -1
- package/dist/styles/global.css +1 -1
- package/dist/types/jsx/custom-element-jsx.d.ts +162 -180
- package/dist/types/vue/index.d.ts +162 -180
- package/dist/vscode.html-custom-data.json +133 -1091
- package/dist/web-types.json +368 -424
- package/package.json +24 -25
- package/dist/components/collapse/collapse.component.d.ts +0 -40
- package/dist/components/collapse/collapse.component.js +0 -86
- package/dist/components/collapse/collapse.d.ts +0 -8
- package/dist/components/collapse/collapse.js +0 -6
- package/dist/components/collapse/collapse.styles.d.ts +0 -2
- package/dist/components/collapse/collapse.styles.js +0 -77
- package/dist/components/menu-item/menu-item.component.d.ts +0 -25
- package/dist/internal/constants/heading.d.ts +0 -2
- /package/dist/components/{breadcrumb-item/breadcrumb-item.styles.d.ts → accordion/accordion-item.styles.d.ts} +0 -0
- /package/dist/components/{collapse/collapse.test.d.ts → accordion/accordion-item.test.d.ts} +0 -0
- /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.component.d.ts +0 -0
- /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.d.ts +0 -0
- /package/dist/components/{menu-item/menu-item.styles.d.ts → breadcrumb/breadcrumb-item.styles.d.ts} +0 -0
- /package/dist/components/{menu-item → menu}/menu-item.d.ts +0 -0
- /package/dist/components/{menu-item → menu}/menu-item.js +0 -0
- /package/dist/components/{nav-item/nav-item.styles.d.ts → menu/menu-item.styles.d.ts} +0 -0
- /package/dist/components/{menu-item → menu}/menu-item.styles.js +0 -0
- /package/dist/components/{nav-item → nav}/nav-item.d.ts +0 -0
- /package/dist/components/{nav-item → nav}/nav-item.js +0 -0
- /package/dist/components/{segmented-button-item/segmented-button-item.styles.d.ts → nav/nav-item.styles.d.ts} +0 -0
- /package/dist/components/{nav-item → nav}/nav-item.styles.js +0 -0
- /package/dist/components/{segmented-button-item → segmented-button}/segmented-button-item.d.ts +0 -0
- /package/dist/components/{select-option-group/select-option-group.style.d.ts → segmented-button/segmented-button-item.styles.d.ts} +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.component.d.ts +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.d.ts +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.js +0 -0
- /package/dist/components/{select-option/select-option.styles.d.ts → select/select-option-group.style.d.ts} +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.style.js +0 -0
- /package/dist/components/{select-option → select}/select-option.controllers.d.ts +0 -0
- /package/dist/components/{select-option → select}/select-option.d.ts +0 -0
- /package/dist/components/{select-option → select}/select-option.js +0 -0
- /package/dist/components/{stepper-item/stepper-item.styles.d.ts → select/select-option.styles.d.ts} +0 -0
- /package/dist/components/{select-option → select}/select-option.styles.js +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.component.d.ts +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.d.ts +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.js +0 -0
- /package/dist/components/{toast-wrapper/toast-wrapper.styles.d.ts → stepper/stepper-item.styles.d.ts} +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.styles.js +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.component.d.ts +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.component.js +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.styles.d.ts +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.styles.js +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.d.ts +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.d.ts +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.js +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.styles.js +0 -0
@@ -1,28 +1,28 @@
|
|
1
1
|
import "../icon/icon.js";
|
2
|
-
import
|
3
|
-
import {
|
4
|
-
import u from "../../styles/component.styles.js";
|
2
|
+
import { SkfElement as m } from "../../internal/components/skf-element.js";
|
3
|
+
import { componentStyles as y } from "../../styles/component.styles.js";
|
5
4
|
import "lit";
|
6
5
|
import { property as r } from "lit/decorators.js";
|
7
|
-
import { classMap as
|
8
|
-
import { ifDefined as
|
9
|
-
import { html as f, literal as
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
6
|
+
import { classMap as u } from "lit/directives/class-map.js";
|
7
|
+
import { ifDefined as l } from "lit/directives/if-defined.js";
|
8
|
+
import { html as f, literal as d } from "lit/static-html.js";
|
9
|
+
import { styles as k } from "./link.styles.js";
|
10
|
+
var v = Object.defineProperty, b = Object.getOwnPropertyDescriptor, o = (h, t, i, n) => {
|
11
|
+
for (var c = n > 1 ? void 0 : n ? b(t, i) : t, p = h.length - 1, a; p >= 0; p--)
|
12
|
+
(a = h[p]) && (c = (n ? a(t, i, c) : a(c)) || c);
|
13
|
+
return n && c && v(t, i, c), c;
|
14
14
|
}, s;
|
15
|
-
const e = (s = class extends
|
15
|
+
const e = (s = class extends m {
|
16
16
|
constructor() {
|
17
|
-
super(...arguments), this.as = "a", this.color = "primary", this.iconPlacement = "left", this.stretch = !1, this.type = "button", this._preprocessOnClick = (t) => {
|
17
|
+
super(...arguments), this.as = "a", this.color = "primary", this.disabled = !1, this.iconPlacement = "left", this.stretch = !1, this.type = "button", this._preprocessOnClick = (t) => {
|
18
18
|
this.as === "a" && this.onClick && t.preventDefault(), t.stopPropagation(), this.emit("click");
|
19
19
|
};
|
20
20
|
}
|
21
21
|
set onClick(t) {
|
22
22
|
if (!t) return;
|
23
23
|
this._onClick = t;
|
24
|
-
const i = (
|
25
|
-
t(
|
24
|
+
const i = (n) => {
|
25
|
+
t(n, this.href ?? this.route);
|
26
26
|
};
|
27
27
|
this._assertValidOnClick(t), this.removeEventListener("click", i), this.addEventListener("click", i);
|
28
28
|
}
|
@@ -48,16 +48,16 @@ const e = (s = class extends d {
|
|
48
48
|
inverse: "inverse"
|
49
49
|
});
|
50
50
|
return f`
|
51
|
-
<skf-icon color=${t[this.color]} name=${
|
51
|
+
<skf-icon color=${t[this.color]} name=${l(this.icon)} size="sm"></skf-icon>
|
52
52
|
`;
|
53
53
|
}
|
54
54
|
render() {
|
55
|
-
const t = this.as === "a", i = t ?
|
55
|
+
const t = this.as === "a", i = t ? d`a` : d`button`;
|
56
56
|
return f`
|
57
57
|
<${i}
|
58
|
-
?disabled=${
|
58
|
+
?disabled=${l(t ? void 0 : this.disabled)}
|
59
59
|
@click=${this._preprocessOnClick}
|
60
|
-
class=${
|
60
|
+
class=${u({
|
61
61
|
link: !0,
|
62
62
|
"link--color-inverse": this.color === "inverse",
|
63
63
|
"link--color-primary": this.color === "primary",
|
@@ -65,40 +65,43 @@ const e = (s = class extends d {
|
|
65
65
|
"link--stretch": this.stretch,
|
66
66
|
...s.classMap
|
67
67
|
})}
|
68
|
-
download=${
|
69
|
-
href=${
|
68
|
+
download=${l(t ? this.download : void 0)}
|
69
|
+
href=${l(t ? this.href : void 0)}
|
70
70
|
part="root"
|
71
|
-
rel=${
|
72
|
-
target=${
|
73
|
-
type=${
|
71
|
+
rel=${l(t ? this.rel : void 0)}
|
72
|
+
target=${l(t ? this.target : void 0)}
|
73
|
+
type=${l(t ? void 0 : this.type)}
|
74
74
|
>
|
75
75
|
${this.icon && this._renderIcon()}
|
76
76
|
<slot>Default link text</slot>
|
77
77
|
</${i}>
|
78
78
|
`;
|
79
79
|
}
|
80
|
-
}, s.styles = [
|
80
|
+
}, s.styles = [y, k], s.classMap = {}, s);
|
81
81
|
o([
|
82
|
-
r({
|
82
|
+
r({ reflect: !0 })
|
83
83
|
], e.prototype, "as", 2);
|
84
84
|
o([
|
85
|
-
r({
|
85
|
+
r({ reflect: !0 })
|
86
86
|
], e.prototype, "color", 2);
|
87
87
|
o([
|
88
88
|
r({ type: Boolean, reflect: !0 })
|
89
89
|
], e.prototype, "disabled", 2);
|
90
90
|
o([
|
91
|
-
r(
|
91
|
+
r()
|
92
92
|
], e.prototype, "download", 2);
|
93
93
|
o([
|
94
|
-
r(
|
94
|
+
r()
|
95
95
|
], e.prototype, "href", 2);
|
96
96
|
o([
|
97
|
-
r(
|
97
|
+
r()
|
98
98
|
], e.prototype, "icon", 2);
|
99
99
|
o([
|
100
100
|
r({ attribute: "icon-placement", reflect: !0 })
|
101
101
|
], e.prototype, "iconPlacement", 2);
|
102
|
+
o([
|
103
|
+
r({ type: Object, attribute: !1 })
|
104
|
+
], e.prototype, "onClick", 1);
|
102
105
|
o([
|
103
106
|
r()
|
104
107
|
], e.prototype, "rel", 2);
|
@@ -114,10 +117,7 @@ o([
|
|
114
117
|
o([
|
115
118
|
r()
|
116
119
|
], e.prototype, "type", 2);
|
117
|
-
|
118
|
-
r({ attribute: !1 })
|
119
|
-
], e.prototype, "onClick", 1);
|
120
|
-
let E = e;
|
120
|
+
let L = e;
|
121
121
|
export {
|
122
|
-
|
122
|
+
L as SkfLink
|
123
123
|
};
|
@@ -1,2 +1 @@
|
|
1
|
-
declare const
|
2
|
-
export default _default;
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -1,52 +1,48 @@
|
|
1
|
-
var
|
2
|
-
throw TypeError(
|
1
|
+
var m = (t) => {
|
2
|
+
throw TypeError(t);
|
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
|
-
var
|
13
|
-
|
14
|
-
|
15
|
-
return i && x(e, t, i), i;
|
4
|
+
var f = (t, e, r) => e.has(t) || m("Cannot " + r);
|
5
|
+
var n = (t, e, r) => (f(t, e, "read from private field"), r ? r.call(t) : e.get(t)), h = (t, e, r) => e.has(t) ? m("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), u = (t, e, r, l) => (f(t, e, "write to private field"), l ? l.call(t, r) : e.set(t, r), r);
|
6
|
+
import { SkfElement as b } from "../../internal/components/skf-element.js";
|
7
|
+
import { componentStyles as y } from "../../styles/component.styles.js";
|
8
|
+
import { html as g } from "lit";
|
9
|
+
import { property as c } from "lit/decorators.js";
|
10
|
+
import { styles as C } from "./loader.styles.js";
|
11
|
+
var _ = Object.defineProperty, p = (t, e, r, l) => {
|
12
|
+
for (var i = void 0, o = t.length - 1, v; o >= 0; o--)
|
13
|
+
(v = t[o]) && (i = v(e, r, i) || i);
|
14
|
+
return i && _(e, r, i), i;
|
16
15
|
}, s;
|
17
|
-
const d = class d extends
|
16
|
+
const d = class d extends b {
|
18
17
|
constructor() {
|
19
|
-
super();
|
18
|
+
super(...arguments);
|
20
19
|
h(this, s);
|
21
|
-
|
20
|
+
u(this, s, this.attachInternals()), this.ariaLabel = "Loading...", this.invert = !1, this.size = "md";
|
21
|
+
}
|
22
|
+
connectedCallback() {
|
23
|
+
super.connectedCallback(), n(this, s).role = "progressbar", n(this, s).ariaLive = "polite";
|
22
24
|
}
|
23
25
|
render() {
|
24
|
-
return
|
25
|
-
<div
|
26
|
-
class
|
27
|
-
|
28
|
-
|
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>
|
26
|
+
return g`
|
27
|
+
<div id="root">
|
28
|
+
<div class="circle"></div>
|
29
|
+
<div class="circle"></div>
|
30
|
+
<div class="circle"></div>
|
35
31
|
</div>
|
36
32
|
`;
|
37
33
|
}
|
38
34
|
};
|
39
|
-
s = new WeakMap(), d.styles = [
|
40
|
-
let
|
41
|
-
|
42
|
-
|
43
|
-
],
|
44
|
-
|
45
|
-
|
46
|
-
],
|
47
|
-
|
48
|
-
|
49
|
-
],
|
35
|
+
s = new WeakMap(), d.styles = [y, C];
|
36
|
+
let a = d;
|
37
|
+
p([
|
38
|
+
c({ reflect: !0, attribute: "aria-label" })
|
39
|
+
], a.prototype, "ariaLabel");
|
40
|
+
p([
|
41
|
+
c({ type: Boolean })
|
42
|
+
], a.prototype, "invert");
|
43
|
+
p([
|
44
|
+
c({ reflect: !0 })
|
45
|
+
], a.prototype, "size");
|
50
46
|
export {
|
51
|
-
|
47
|
+
a as SkfLoader
|
52
48
|
};
|
@@ -1,2 +1 @@
|
|
1
|
-
declare const
|
2
|
-
export default _default;
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -1,51 +1,59 @@
|
|
1
1
|
import { css as a } from "lit";
|
2
|
-
const
|
3
|
-
/* stylelint-disable selector-class-pattern */
|
2
|
+
const o = a`
|
4
3
|
@layer components {
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
@layer base {
|
5
|
+
:host {
|
6
|
+
display: inline-flex;
|
7
|
+
}
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
#root {
|
10
|
+
--_skf-loader-color: var(--skf-bg-color-emphasised);
|
11
|
+
--_skf-loader-gap: var(--skf-spacing-50);
|
12
|
+
--_skf-loader-size: var(--skf-size-12);
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
display: flex;
|
15
|
+
gap: var(--_skf-loader-gap);
|
16
|
+
}
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
18
|
+
.circle {
|
19
|
+
animation: skf-loader 0.5s infinite ease-in alternate;
|
20
|
+
aspect-ratio: 1;
|
21
|
+
background-color: var(--_skf-loader-color);
|
22
|
+
border-radius: 50%;
|
23
|
+
inline-size: var(--_skf-loader-size);
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
&:nth-child(2) {
|
26
|
+
animation-delay: 0.1s;
|
27
|
+
}
|
28
28
|
|
29
|
-
|
30
|
-
|
29
|
+
&:nth-child(3) {
|
30
|
+
animation-delay: 0.2s;
|
31
|
+
}
|
31
32
|
}
|
33
|
+
}
|
32
34
|
|
33
|
-
|
34
|
-
|
35
|
+
@layer mods {
|
36
|
+
:host([invert]) {
|
37
|
+
#root {
|
38
|
+
--_skf-loader-color: var(--skf-bg-color-neutral-1);
|
39
|
+
}
|
35
40
|
}
|
36
41
|
|
37
|
-
|
38
|
-
|
42
|
+
:host([size='sm']) {
|
43
|
+
#root {
|
44
|
+
--_skf-loader-gap: var(--skf-spacing-25);
|
45
|
+
--_skf-loader-size: var(--skf-size-4);
|
46
|
+
}
|
39
47
|
}
|
40
48
|
}
|
49
|
+
}
|
41
50
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
}
|
51
|
+
@keyframes skf-loader {
|
52
|
+
to {
|
53
|
+
opacity: 0;
|
46
54
|
}
|
47
55
|
}
|
48
56
|
`;
|
49
57
|
export {
|
50
|
-
|
58
|
+
o as styles
|
51
59
|
};
|
@@ -1,6 +1,7 @@
|
|
1
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
|
+
type SkfLogoColor = Logo;
|
4
5
|
/**
|
5
6
|
* The `<skf-logo>` component is used to display the SKF logo.
|
6
7
|
*
|
@@ -12,10 +13,8 @@ export declare class SkfLogo extends SkfElement {
|
|
12
13
|
static styles: CSSResultGroup;
|
13
14
|
/** Defines the title of the logo */
|
14
15
|
title: string;
|
15
|
-
/**
|
16
|
-
|
17
|
-
* @type { "primary" | "secondary" | "inverse" }
|
18
|
-
*/
|
19
|
-
color: Logo;
|
16
|
+
/** Defines the color of the logo */
|
17
|
+
color: SkfLogoColor;
|
20
18
|
render(): import("lit").TemplateResult<1>;
|
21
19
|
}
|
20
|
+
export {};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { SkfElement as i } from "../../internal/components/skf-element.js";
|
2
|
-
import m from "../../styles/component.styles.js";
|
2
|
+
import { componentStyles as m } from "../../styles/component.styles.js";
|
3
3
|
import { html as n } from "lit";
|
4
4
|
import { property as p } from "lit/decorators.js";
|
5
5
|
import { classMap as a } from "lit/directives/class-map.js";
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { SkfLink } from '../link/link.component.js';
|
2
|
+
import { type CSSResultGroup } from 'lit';
|
3
|
+
/**
|
4
|
+
* The `<skf-menu-item>` is used in conjunction with the `<skf-menu>` component
|
5
|
+
*
|
6
|
+
* @slot - The component's main content
|
7
|
+
*
|
8
|
+
* @tagname skf-menu-item
|
9
|
+
*/
|
10
|
+
export declare class SkfMenuItem extends SkfLink {
|
11
|
+
static styles: CSSResultGroup;
|
12
|
+
constructor();
|
13
|
+
}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { SkfLink as s } from "../link/link.component.js";
|
2
2
|
import "lit";
|
3
|
-
import { styles as
|
3
|
+
import { styles as e } from "./menu-item.styles.js";
|
4
4
|
const t = class t extends s {
|
5
5
|
constructor() {
|
6
|
-
super(), s.classMap = { "menu-item": !0 };
|
6
|
+
super(), this.role = "menuitem", s.classMap = { "menu-item": !0 };
|
7
7
|
}
|
8
8
|
};
|
9
|
-
t.styles = [s.styles,
|
9
|
+
t.styles = [s.styles, e];
|
10
10
|
let r = t;
|
11
11
|
export {
|
12
12
|
r as SkfMenuItem
|
@@ -1,15 +1,18 @@
|
|
1
1
|
import { SkfPopoverBase } from '../../internal/base-classes/popover/popover.base.js';
|
2
2
|
import type { CSSResultGroup } from 'lit';
|
3
3
|
/**
|
4
|
-
*
|
4
|
+
* For a popover menu like skf-menu containing skf-menu-item elements, the correct ARIA role is menu. This role indicates that the element represents a menu, typically triggered by a button or another interactive element, like in a popover context. The menu role is suitable for context menus or secondary menus. Each skf-menu-item will implicitly have the correct menuitem role. It's important to make sure the menu is properly linked to its trigger using ARIA attributes like aria-haspopup and aria-expanded on the trigger and aria-controls on the menu to establish the relationship between the trigger and the menu for assistive technologies. Setting the menu role directly on the skf-menu element is the right way to go here.
|
5
|
+
*/
|
6
|
+
/**
|
7
|
+
* The `<skf-menu>` is a component that displays a list of actions or options
|
5
8
|
*
|
6
|
-
*
|
9
|
+
* See [zeroheight](https://zeroheight.com/853e936c9/p/983e5d-popover) for design principles
|
7
10
|
*
|
8
11
|
* @attribute {"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
|
-
* @attribute {string}
|
12
|
+
* @attribute {string} anchor - The id of the element the menu will be anchored to
|
10
13
|
*
|
11
|
-
* @event skf-opened - Fired when the menu is opened
|
12
|
-
* @event skf-closed - Fired when the menu is closed
|
14
|
+
* @event {CustomEvent} skf-opened - Fired when the menu is opened
|
15
|
+
* @event {CustomEvent} skf-closed - Fired when the menu is closed
|
13
16
|
*
|
14
17
|
* @slot - The menu popover content
|
15
18
|
*
|
@@ -18,6 +21,6 @@ import type { CSSResultGroup } from 'lit';
|
|
18
21
|
export declare class SkfMenu extends SkfPopoverBase {
|
19
22
|
static styles: CSSResultGroup;
|
20
23
|
constructor();
|
24
|
+
/** @internal */
|
21
25
|
addEventListeners($element: HTMLElement | Element): void;
|
22
|
-
removeEventListeners($element: HTMLElement | Element): void;
|
23
26
|
}
|
@@ -1,18 +1,16 @@
|
|
1
1
|
import { SkfPopoverBase as t } from "../../internal/base-classes/popover/popover.base.js";
|
2
|
-
import { styles as
|
2
|
+
import { styles as r } from "./menu.styles.js";
|
3
3
|
const s = class s extends t {
|
4
4
|
constructor() {
|
5
|
-
super(), this.placement = "bottom-start", this.triggerEvent = "click", t.classMap = { menu: !0 };
|
5
|
+
super(), this.placement = "bottom-start", this.role = "menu", this.triggerEvent = "click", this.variant = "menu", t.classMap = { menu: !0 };
|
6
6
|
}
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
removeEventListeners(e) {
|
11
|
-
e.removeEventListener("mouseenter", this.open);
|
7
|
+
/** @internal */
|
8
|
+
addEventListeners(i) {
|
9
|
+
i.addEventListener(this.triggerEvent, this.open.bind(this), { signal: this.signal });
|
12
10
|
}
|
13
11
|
};
|
14
|
-
s.styles = [t.styles,
|
15
|
-
let
|
12
|
+
s.styles = [t.styles, r];
|
13
|
+
let e = s;
|
16
14
|
export {
|
17
|
-
|
15
|
+
e as SkfMenu
|
18
16
|
};
|
@@ -5,8 +5,6 @@ import { type CSSResultGroup } from 'lit';
|
|
5
5
|
/**
|
6
6
|
* The `<skf-nav>` is a component that displays a list of <nav-items>.
|
7
7
|
*
|
8
|
-
* @documentation See [zeroheight](https://zeroheight.com/****) for design principles
|
9
|
-
*
|
10
8
|
* @slot - The component's main content
|
11
9
|
*
|
12
10
|
* @tagname skf-nav-item
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import "../link/link.js";
|
2
2
|
import { SkfElement as m } from "../../internal/components/skf-element.js";
|
3
|
-
import c from "../../styles/component.styles.js";
|
3
|
+
import { componentStyles as c } from "../../styles/component.styles.js";
|
4
4
|
import { html as h } from "lit";
|
5
5
|
import { property as f } from "lit/decorators.js";
|
6
6
|
import { ifDefined as u } from "lit/directives/if-defined.js";
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { SkfElement as s } from "../../internal/components/skf-element.js";
|
2
|
-
import m from "../../styles/component.styles.js";
|
2
|
+
import { componentStyles as m } from "../../styles/component.styles.js";
|
3
3
|
import { html as p } from "lit";
|
4
4
|
import { property as c } from "lit/decorators.js";
|
5
5
|
import { ifDefined as f } from "lit/directives/if-defined.js";
|
@@ -1,15 +1,18 @@
|
|
1
1
|
import { SkfPopoverBase } from '../../internal/base-classes/popover/popover.base.js';
|
2
2
|
import type { CSSResultGroup } from 'lit';
|
3
|
+
/**
|
4
|
+
* The most appropriate ARIA role is dialog. Even though it's light-dismissible, the presence of an interactive element (the link) suggests it functions more like a dialog presenting options or actions. Since it is light-dismissible and not truly modal (doesn't prevent interaction with the rest of the page while open), you should also set aria-modal="false" to accurately reflect its behavior. Don't forget to include a label with aria-labelledby (pointing to a visible label) or aria-label if a visible label isn't present.
|
5
|
+
*/
|
3
6
|
/**
|
4
7
|
* The `<skf-popover>` is a general purpose component that displays the slot content in a popover.
|
5
8
|
*
|
6
|
-
*
|
9
|
+
* See [zeroheight](https://zeroheight.com/853e936c9/p/983e5d-popover) for design principles
|
7
10
|
*
|
8
|
-
* @attribute {"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
|
9
|
-
* @attribute {string}
|
11
|
+
* @attribute {"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 popover
|
12
|
+
* @attribute {string} anchor - The id of the element the menu will be anchored to
|
10
13
|
*
|
11
|
-
* @event skf-opened - Fired when the menu is opened
|
12
|
-
* @event skf-closed - Fired when the menu is closed
|
14
|
+
* @event {CustomEvent} skf-opened - Fired when the menu is opened
|
15
|
+
* @event {CustomEvent} skf-closed - Fired when the menu is closed
|
13
16
|
*
|
14
17
|
* @slot - The popover content
|
15
18
|
*
|
@@ -22,7 +25,8 @@ export declare class SkfPopover extends SkfPopoverBase {
|
|
22
25
|
/** If true, hides the arrow */
|
23
26
|
hideArrow: boolean;
|
24
27
|
constructor();
|
28
|
+
/** @internal */
|
25
29
|
hideArrowChanged(): void;
|
30
|
+
/** @internal */
|
26
31
|
addEventListeners($element: HTMLElement | Element): void;
|
27
|
-
removeEventListeners($element: HTMLElement | Element): void;
|
28
32
|
}
|
@@ -1,37 +1,35 @@
|
|
1
1
|
import { SkfPopoverBase as h } from "../../internal/base-classes/popover/popover.base.js";
|
2
2
|
import { watch as f } from "../../internal/helpers/watch.js";
|
3
|
-
import { property as
|
4
|
-
import { styles as
|
5
|
-
var
|
6
|
-
for (var t = s > 1 ? void 0 : s ?
|
7
|
-
(p =
|
8
|
-
return s && t &&
|
3
|
+
import { property as d } from "lit/decorators.js";
|
4
|
+
import { styles as w } from "./popover.styles.js";
|
5
|
+
var c = Object.defineProperty, m = Object.getOwnPropertyDescriptor, a = (l, r, o, s) => {
|
6
|
+
for (var t = s > 1 ? void 0 : s ? m(r, o) : r, i = l.length - 1, p; i >= 0; i--)
|
7
|
+
(p = l[i]) && (t = (s ? p(r, o, t) : p(t)) || t);
|
8
|
+
return s && t && c(r, o, t), t;
|
9
9
|
};
|
10
|
-
const
|
10
|
+
const n = class n extends h {
|
11
11
|
constructor() {
|
12
|
-
super(), this.offset = 8, this.hideArrow = !1, this.arrow = !this.hideArrow, this.placement = "bottom-start", this.triggerEvent = "click", h.classMap = { popover: !0 };
|
12
|
+
super(), this.offset = 8, this.hideArrow = !1, this.ariaModal = "false", this.arrow = !this.hideArrow, this.placement = "bottom-start", this.role = "dialog", this.triggerEvent = "click", this.variant = "popup", h.classMap = { popover: !0 };
|
13
13
|
}
|
14
14
|
hideArrowChanged() {
|
15
15
|
this.arrow = !this.hideArrow;
|
16
16
|
}
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
removeEventListeners(e) {
|
21
|
-
e.removeEventListener(this.triggerEvent, this.open);
|
17
|
+
/** @internal */
|
18
|
+
addEventListeners(r) {
|
19
|
+
r.addEventListener(this.triggerEvent, this.open.bind(this), { signal: this.signal });
|
22
20
|
}
|
23
21
|
};
|
24
|
-
|
25
|
-
let
|
26
|
-
|
27
|
-
|
28
|
-
],
|
29
|
-
|
30
|
-
|
31
|
-
],
|
32
|
-
|
22
|
+
n.styles = [h.styles, w];
|
23
|
+
let e = n;
|
24
|
+
a([
|
25
|
+
d({ type: Number })
|
26
|
+
], e.prototype, "offset", 2);
|
27
|
+
a([
|
28
|
+
d({ type: Boolean })
|
29
|
+
], e.prototype, "hideArrow", 2);
|
30
|
+
a([
|
33
31
|
f("hideArrow")
|
34
|
-
],
|
32
|
+
], e.prototype, "hideArrowChanged", 1);
|
35
33
|
export {
|
36
|
-
|
34
|
+
e as SkfPopover
|
37
35
|
};
|
@@ -3,7 +3,7 @@ import { type CSSResultGroup } from 'lit';
|
|
3
3
|
/**
|
4
4
|
* The `<skf-progress>` element displays an indicator showing the completion progress of a task, typically displayed as a progress bar
|
5
5
|
*
|
6
|
-
* @documentation See [zeroheight](https://zeroheight.com
|
6
|
+
* @documentation See [zeroheight](https://zeroheight.com/853e936c9/p/36d674-progress-bar) for design principles
|
7
7
|
*
|
8
8
|
* @tagname skf-progress
|
9
9
|
*/
|
@@ -17,6 +17,6 @@ export declare class SkfProgress extends SkfElement {
|
|
17
17
|
max: number;
|
18
18
|
/** Specifies how much of the task that has been completed */
|
19
19
|
value: number;
|
20
|
-
|
20
|
+
connectedCallback(): void;
|
21
21
|
render(): import("lit").TemplateResult<1>;
|
22
22
|
}
|