@skf-design-system/ui-components 1.0.0-alpha.28 → 1.0.0-alpha.30
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 +3 -3
- package/dist/components/alert/alert.component.js +44 -33
- package/dist/components/alert/alert.styles.d.ts +1 -2
- package/dist/components/alert/alert.styles.js +29 -24
- package/dist/components/button/button.component.d.ts +6 -4
- package/dist/components/button/button.component.js +59 -47
- package/dist/components/button/button.styles.js +55 -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 +3 -3
- 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 +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 +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/icon/icon.component.d.ts +3 -6
- package/dist/components/icon/icon.component.js +28 -19
- package/dist/components/icon/icon.styles.js +53 -47
- package/dist/components/input/input.component.d.ts +4 -4
- package/dist/components/link/link.component.d.ts +7 -6
- package/dist/components/link/link.component.js +33 -27
- 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 +32 -25
- 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 +25 -14
- 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 +2 -2
- package/dist/components/progress/progress.component.js +31 -22
- package/dist/components/progress/progress.styles.js +19 -18
- package/dist/components/radio/radio.component.d.ts +3 -3
- package/dist/components/select/select.component.d.ts +10 -12
- package/dist/components/select/select.component.js +115 -118
- 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/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 +13 -6
- package/dist/components/switch/switch.styles.js +16 -13
- package/dist/components/tab/tab.component.d.ts +2 -2
- package/dist/components/tab-group/tab-group.component.d.ts +2 -2
- package/dist/components/tab-panel/tab-panel.component.d.ts +1 -1
- 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/toast/toast.component.d.ts +1 -1
- package/dist/components/toast/toast.singleton.d.ts +3 -3
- package/dist/components/toast-item/toast-item.component.d.ts +1 -1
- package/dist/components/toast-wrapper/toast-wrapper.component.d.ts +2 -2
- 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 +1316 -79
- package/dist/index.d.ts +7 -0
- package/dist/index.js +73 -52
- 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/hint/hint.component.d.ts +2 -2
- 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/templates/asterisk.d.ts +1 -1
- package/dist/internal/templates/asterisk.js +7 -6
- package/dist/react/index.d.ts +7 -0
- package/dist/react/index.js +7 -0
- 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-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-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 +1605 -53
- package/dist/types/vue/index.d.ts +260 -2
- package/dist/vscode.html-custom-data.json +335 -8
- package/dist/web-types.json +623 -38
- package/package.json +31 -30
- package/custom-elements.json +0 -18265
@@ -1,78 +1,84 @@
|
|
1
1
|
import { css as o } from "lit";
|
2
|
-
const
|
2
|
+
const i = o`
|
3
|
+
/* stylelint-disable selector-class-pattern */
|
3
4
|
@layer components {
|
4
5
|
:host {
|
5
6
|
display: inline-flex;
|
6
7
|
}
|
7
8
|
|
8
|
-
|
9
|
-
|
9
|
+
:host-context(.skf-icon-host) {
|
10
|
+
color: inherit;
|
11
|
+
}
|
10
12
|
|
13
|
+
.icon {
|
11
14
|
block-size: var(--_skf-icon-size);
|
12
|
-
color: var(--_skf-icon-color, var(--skf-icon-color-primary));
|
13
15
|
display: inline-flex;
|
14
16
|
flex-shrink: 0; /* Prevents shrink when flex-child */
|
15
17
|
inline-size: var(--_skf-icon-size);
|
16
18
|
pointer-events: none;
|
17
19
|
user-select: none;
|
18
20
|
|
19
|
-
:host-context(.skf-icon-host) & {
|
20
|
-
color:
|
21
|
+
:not(:host-context(.skf-icon-host)) & {
|
22
|
+
color: var(--_skf-icon-color, var(--skf-icon-color-primary));
|
21
23
|
}
|
24
|
+
}
|
22
25
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
/**
|
27
|
+
* Colors
|
28
|
+
*/
|
29
|
+
.icon--color-secondary {
|
30
|
+
--_skf-icon-color: var(--skf-icon-color-secondary);
|
31
|
+
}
|
29
32
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
+
.icon--color-inverse {
|
34
|
+
--_skf-icon-color: var(--skf-icon-color-inverse);
|
35
|
+
}
|
33
36
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
+
.icon--color-emphasised {
|
38
|
+
--_skf-icon-color: var(--skf-icon-color-emphasised);
|
39
|
+
}
|
37
40
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
41
|
+
/* Severity */
|
42
|
+
.icon--color-alert {
|
43
|
+
--_skf-icon-color: var(--skf-severity-fg-color-alert);
|
44
|
+
}
|
42
45
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
+
.icon--color-error {
|
47
|
+
--_skf-icon-color: var(--skf-severity-fg-color-error);
|
48
|
+
}
|
46
49
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
+
.icon--color-info {
|
51
|
+
--_skf-icon-color: var(--skf-severity-fg-color-info);
|
52
|
+
}
|
50
53
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
+
.icon--color-success {
|
55
|
+
--_skf-icon-color: var(--skf-severity-fg-color-success);
|
56
|
+
}
|
54
57
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
+
.icon--color-warning {
|
59
|
+
--_skf-icon-color: var(--skf-severity-fg-color-warning);
|
60
|
+
}
|
58
61
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
62
|
+
/**
|
63
|
+
* Sizes
|
64
|
+
*/
|
65
|
+
.icon--size-xs {
|
66
|
+
--_skf-icon-size: var(--skf-icon-size-xs);
|
67
|
+
}
|
65
68
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
+
.icon--size-sm {
|
70
|
+
--_skf-icon-size: var(--skf-icon-size-sm);
|
71
|
+
}
|
69
72
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
+
.icon--size-md {
|
74
|
+
--_skf-icon-size: var(--skf-icon-size-md);
|
75
|
+
}
|
76
|
+
|
77
|
+
.icon--size-lg {
|
78
|
+
--_skf-icon-size: var(--skf-icon-size-lg);
|
73
79
|
}
|
74
80
|
}
|
75
81
|
`;
|
76
82
|
export {
|
77
|
-
|
83
|
+
i as default
|
78
84
|
};
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import '
|
2
|
-
import { FormBase } from '
|
3
|
-
import '
|
4
|
-
import type { FormFieldBaseProps } from '
|
1
|
+
import '../icon/icon.js';
|
2
|
+
import { FormBase } from '../../internal/components/formBase.js';
|
3
|
+
import '../../internal/components/hint/hint';
|
4
|
+
import type { FormFieldBaseProps } from '../../internal/types/formField.js';
|
5
5
|
import { type CSSResultGroup } from 'lit';
|
6
6
|
type AutocompleteValues = 'on' | 'off' | 'name' | 'honorific-prefix' | 'given-name' | 'additional-name' | 'family-name' | 'honorific-suffix' | 'nickname' | 'username' | 'new-password' | 'current-password' | 'one-time-code' | 'organization-title' | 'organization' | 'street-address' | 'address-line1' | 'address-line2' | 'address-line3' | 'address-level4' | 'address-level3' | 'address-level2' | 'address-level1' | 'country' | 'country-name' | 'postal-code' | 'cc-name' | 'cc-given-name' | 'cc-additional-name' | 'cc-family-name' | 'cc-number' | 'cc-exp' | 'cc-exp-month' | 'cc-exp-year' | 'cc-csc' | 'cc-type' | 'transaction-amount' | 'transaction-currency' | 'language' | 'bday' | 'bday-day' | 'bday-month' | 'bday-year' | 'sex' | 'url' | 'photo' | 'tel' | 'tel-country-code' | 'tel-national' | 'tel-area-code' | 'tel-local' | 'tel-extension' | 'email' | 'impp' | 'password' | 'webauthn' | 'work' | (string & {});
|
7
7
|
/**
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import type { SkfIcon } from '
|
2
|
-
import '
|
3
|
-
import { SkfElement } from '
|
1
|
+
import type { SkfIcon } from '../icon/icon.component.js';
|
2
|
+
import '../icon/icon.js';
|
3
|
+
import { SkfElement } from '../../internal/components/skf-element.js';
|
4
4
|
import { type CSSResultGroup } from 'lit';
|
5
5
|
/**
|
6
6
|
* The `<skf-link>` can be used as either a regular link or a link styled semantic button
|
@@ -15,6 +15,7 @@ import { type CSSResultGroup } from 'lit';
|
|
15
15
|
*/
|
16
16
|
export declare class SkfLink extends SkfElement {
|
17
17
|
static styles: CSSResultGroup;
|
18
|
+
static classMap: {};
|
18
19
|
private _onClick?;
|
19
20
|
/** Defines the semantic element to render */
|
20
21
|
as: 'button' | 'a';
|
@@ -33,12 +34,12 @@ export declare class SkfLink extends SkfElement {
|
|
33
34
|
icon?: SkfIcon['name'];
|
34
35
|
/** Defines the position of the icon in relation to the text */
|
35
36
|
iconPlacement: 'left' | 'right';
|
36
|
-
/**
|
37
|
-
rel
|
37
|
+
/** If defined, describes the relationship between a linked resource and the current document */
|
38
|
+
rel?: string;
|
38
39
|
/** If defined, used on conjunction with onClick property, second argument */
|
39
40
|
route?: string;
|
40
41
|
/** If true, fills the parents horizontal axis */
|
41
|
-
stretch
|
42
|
+
stretch: boolean;
|
42
43
|
/** If defined, specifies where to open the linked document */
|
43
44
|
target?: '_blank' | '_parent' | '_self' | '_top';
|
44
45
|
/** Defines the type of button */
|
@@ -1,27 +1,28 @@
|
|
1
1
|
import "../icon/icon.js";
|
2
2
|
import y from "./link.styles.js";
|
3
|
-
import { SkfElement as
|
3
|
+
import { SkfElement as d } from "../../internal/components/skf-element.js";
|
4
4
|
import u from "../../styles/component.styles.js";
|
5
5
|
import "lit";
|
6
6
|
import { property as r } from "lit/decorators.js";
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
7
|
+
import { classMap as k } from "lit/directives/class-map.js";
|
8
|
+
import { ifDefined as c } from "lit/directives/if-defined.js";
|
9
|
+
import { html as f, literal as m } from "lit/static-html.js";
|
10
|
+
var v = Object.defineProperty, g = Object.getOwnPropertyDescriptor, o = (h, t, i, l) => {
|
11
|
+
for (var n = l > 1 ? void 0 : l ? g(t, i) : t, p = h.length - 1, a; p >= 0; p--)
|
12
|
+
(a = h[p]) && (n = (l ? a(t, i, n) : a(n)) || n);
|
13
|
+
return l && n && v(t, i, n), n;
|
14
|
+
}, s;
|
15
|
+
const e = (s = class extends d {
|
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 i = (
|
24
|
-
t(
|
24
|
+
const i = (l) => {
|
25
|
+
t(l, this.href ?? this.route);
|
25
26
|
};
|
26
27
|
this._assertValidOnClick(t), this.removeEventListener("click", i), this.addEventListener("click", i);
|
27
28
|
}
|
@@ -47,31 +48,35 @@ 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", i = t ?
|
55
|
+
const t = this.as === "a", i = t ? m`a` : m`button`;
|
55
56
|
return f`
|
56
57
|
<${i}
|
57
|
-
?disabled=${
|
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
|
</${i}>
|
70
77
|
`;
|
71
78
|
}
|
72
|
-
};
|
73
|
-
a.styles = [u, y];
|
74
|
-
let e = a;
|
79
|
+
}, s.styles = [u, y], s.classMap = {}, s);
|
75
80
|
o([
|
76
81
|
r({ type: String, reflect: !0 })
|
77
82
|
], e.prototype, "as", 2);
|
@@ -85,7 +90,7 @@ o([
|
|
85
90
|
r({ type: String })
|
86
91
|
], e.prototype, "download", 2);
|
87
92
|
o([
|
88
|
-
r({ type: String
|
93
|
+
r({ type: String })
|
89
94
|
], e.prototype, "href", 2);
|
90
95
|
o([
|
91
96
|
r({ type: String })
|
@@ -111,6 +116,7 @@ o([
|
|
111
116
|
o([
|
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 = (r) => {
|
2
|
+
throw TypeError(r);
|
3
3
|
};
|
4
|
-
var f = (
|
5
|
-
var p = (
|
6
|
-
import { SkfElement as
|
7
|
-
import
|
8
|
-
import { html as
|
4
|
+
var f = (r, e, t) => e.has(r) || v("Cannot " + t);
|
5
|
+
var p = (r, e, t) => (f(r, e, "read from private field"), t ? t.call(r) : e.get(r)), h = (r, e, t) => e.has(r) ? v("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), u = (r, e, t, a) => (f(r, e, "write to private field"), a ? a.call(r, t) : e.set(r, 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
9
|
import { property as n } from "lit/decorators.js";
|
10
|
-
import
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
import { classMap as g } from "lit/directives/class-map.js";
|
11
|
+
import z from "./loader.styles.js";
|
12
|
+
var x = Object.defineProperty, c = (r, e, t, a) => {
|
13
|
+
for (var i = void 0, o = r.length - 1, m; o >= 0; o--)
|
14
|
+
(m = r[o]) && (i = m(e, t, i) || i);
|
15
|
+
return i && x(e, t, i), i;
|
15
16
|
}, s;
|
16
|
-
const
|
17
|
+
const d = class d 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()), p(this, s).role = "progressbar", p(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
|
39
|
+
s = new WeakMap(), d.styles = [_, z];
|
40
|
+
let l = d;
|
34
41
|
c([
|
35
42
|
n({ reflect: !0, attribute: "aria-label" })
|
36
|
-
],
|
43
|
+
], l.prototype, "ariaLabel");
|
37
44
|
c([
|
38
45
|
n({ type: Boolean })
|
39
|
-
],
|
46
|
+
], l.prototype, "invert");
|
40
47
|
c([
|
41
48
|
n({ type: String, reflect: !0 })
|
42
|
-
],
|
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
2
|
import m from "../../styles/component.styles.js";
|
3
3
|
import { html as n } from "lit";
|
4
|
-
import { property as
|
5
|
-
import a from "
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
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 g = Object.defineProperty, v = (e, l, s, y) => {
|
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 && g(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
17
|
return n`
|
17
|
-
<svg
|
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 = [m, 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
|
};
|