@skf-design-system/ui-components 1.0.0-beta.7 → 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.component.js +3 -3
- package/dist/components/alert/alert.component.d.ts +2 -2
- package/dist/components/alert/alert.component.js +32 -32
- package/dist/components/breadcrumb/breadcrumb.component.d.ts +29 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +8 -0
- package/dist/components/breadcrumb/breadcrumb.styles.d.ts +1 -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/breadcrumb-item/breadcrumb-item.styles.d.ts +1 -0
- package/dist/components/button/button.component.d.ts +3 -1
- package/dist/components/button/button.component.js +60 -47
- package/dist/components/button/button.styles.js +64 -45
- package/dist/components/card/card.component.js +4 -4
- package/dist/components/checkbox/checkbox.component.js +4 -4
- package/dist/components/dialog/dialog.component.d.ts +0 -1
- package/dist/components/dialog/dialog.component.js +21 -23
- package/dist/components/divider/divider.component.js +12 -12
- package/dist/components/heading/heading.component.js +13 -13
- package/dist/components/icon/icon.component.d.ts +1 -4
- package/dist/components/icon/icon.component.js +32 -23
- package/dist/components/icon/icon.styles.js +53 -47
- package/dist/components/link/link.component.d.ts +1 -0
- package/dist/components/link/link.component.js +42 -42
- package/dist/components/loader/loader.component.js +19 -19
- package/dist/components/logo/logo.component.js +6 -6
- 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.js +7 -7
- package/dist/components/radio/radio.component.js +4 -4
- package/dist/components/select/select.component.d.ts +8 -10
- package/dist/components/select/select.component.js +115 -118
- package/dist/components/select/select.controllers.d.ts +0 -25
- package/dist/components/select/select.controllers.js +35 -95
- 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/tab/tab.component.js +4 -4
- package/dist/components/tab-panel/tab-panel.component.js +12 -12
- package/dist/components/tag/tag.component.js +9 -9
- package/dist/components/textarea/textarea.component.js +3 -3
- package/dist/components/toast/toast.component.d.ts +7 -4
- package/dist/components/toast/toast.component.js +30 -26
- package/dist/components/toast/toast.singleton.d.ts +2 -7
- package/dist/components/toast/toast.singleton.js +25 -25
- package/dist/components/toast-item/toast-item.component.js +15 -15
- package/dist/components/toast-item/toast-item.styles.js +13 -11
- package/dist/components/toast-wrapper/toast-wrapper.component.js +10 -10
- 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 +2179 -1002
- package/dist/index.d.ts +6 -0
- package/dist/index.js +72 -54
- 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.js +13 -13
- 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 +1 -1
- package/dist/react/index.d.ts +10 -2
- package/dist/react/index.js +10 -2
- 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-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/types/jsx/custom-element-jsx.d.ts +594 -163
- package/dist/types/vue/index.d.ts +326 -74
- package/dist/vscode.html-custom-data.json +722 -390
- package/dist/web-types.json +836 -290
- package/package.json +33 -33
@@ -1,8 +1,8 @@
|
|
1
|
-
var _ = (
|
2
|
-
throw TypeError(
|
1
|
+
var _ = (o) => {
|
2
|
+
throw TypeError(o);
|
3
3
|
};
|
4
|
-
var w = (
|
5
|
-
var f = (
|
4
|
+
var w = (o, e, t) => e.has(o) || _("Cannot " + t);
|
5
|
+
var f = (o, e, t) => (w(o, e, "read from private field"), t ? t.call(o) : e.get(o)), g = (o, e, t) => e.has(o) ? _("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(o) : e.set(o, t), h = (o, e, t, a) => (w(o, e, "write to private field"), a ? a.call(o, t) : e.set(o, t), t);
|
6
6
|
import "../button/button.js";
|
7
7
|
import "../heading/heading.js";
|
8
8
|
import "../icon/icon.js";
|
@@ -13,10 +13,10 @@ import { html as b, nothing as k } from "lit";
|
|
13
13
|
import { property as c, state as m, query as P, queryAssignedElements as M } from "lit/decorators.js";
|
14
14
|
import { classMap as $ } from "lit/directives/class-map.js";
|
15
15
|
import { styles as O } from "./dialog.styles.js";
|
16
|
-
var A = Object.defineProperty, E = Object.getOwnPropertyDescriptor, i = (
|
17
|
-
for (var n = a > 1 ? void 0 : a ? E(e,
|
18
|
-
(r =
|
19
|
-
return a && n && A(e,
|
16
|
+
var A = Object.defineProperty, E = Object.getOwnPropertyDescriptor, i = (o, e, t, a) => {
|
17
|
+
for (var n = a > 1 ? void 0 : a ? E(e, t) : e, l = o.length - 1, r; l >= 0; l--)
|
18
|
+
(r = o[l]) && (n = (a ? r(e, t, n) : r(n)) || n);
|
19
|
+
return a && n && A(e, t, n), n;
|
20
20
|
}, p, u, d;
|
21
21
|
const y = class y extends v {
|
22
22
|
constructor() {
|
@@ -24,19 +24,19 @@ const y = class y extends v {
|
|
24
24
|
g(this, p);
|
25
25
|
g(this, u);
|
26
26
|
g(this, d);
|
27
|
-
h(this, p, 0), h(this, u, 20), h(this, d, !1), this.fullscreen = !1, this.noCloseButton = !1, this.noPadding = !1, this.onClose = null, this.modal = !0, this.renderFoot = !1, this.show = async () => await this.showModal(), this._handleBackdropClick = (
|
28
|
-
this._isModal ||
|
29
|
-
}, this._handleClose = (
|
30
|
-
console.log("Handle close reached"), this.onClose && this.onClose(
|
27
|
+
h(this, p, 0), h(this, u, 20), h(this, d, !1), this.fullscreen = !1, this.noCloseButton = !1, this.noPadding = !1, this.onClose = null, this.modal = !0, this.renderFoot = !1, this.show = async () => await this.showModal(), this._handleBackdropClick = (t) => {
|
28
|
+
this._isModal || t.target !== this.$dialog || this.close();
|
29
|
+
}, this._handleClose = (t) => {
|
30
|
+
console.log("Handle close reached"), this.onClose && this.onClose(t), this.close();
|
31
31
|
}, this.showModal = async () => await (async () => (console.log("%cmodal ->", "color: red", this.modal), this.$dialog.showModal(), await this._transition().entry(), this.emit("skf-dialog-open"), !0))(), this.close = async () => (console.log("close reached"), f(this, d) ? void 0 : (h(this, d, !0), await (async () => (this.emit("skf-dialog-close"), await this._transition().exit(), this.$dialog.close(), this.open = !1, h(this, d, !1), !0))()));
|
32
32
|
}
|
33
33
|
firstUpdated() {
|
34
|
-
this.$dialog.addEventListener("close", (
|
35
|
-
|
34
|
+
this.$dialog.addEventListener("close", (t) => {
|
35
|
+
t.stopPropagation(), console.log("close event detected 1", t), this.emit("close");
|
36
36
|
});
|
37
37
|
}
|
38
38
|
handleOpenChange() {
|
39
|
-
var
|
39
|
+
var t;
|
40
40
|
switch (!0) {
|
41
41
|
case (this.open === !0 && !!this.modal):
|
42
42
|
this.showModal();
|
@@ -48,11 +48,11 @@ const y = class y extends v {
|
|
48
48
|
this.close();
|
49
49
|
break;
|
50
50
|
}
|
51
|
-
this.open && (this.renderFoot = !!((
|
51
|
+
this.open && (this.renderFoot = !!((t = this.footerEls) != null && t.length));
|
52
52
|
}
|
53
53
|
/** @internal */
|
54
54
|
_transition() {
|
55
|
-
const
|
55
|
+
const t = this.fullscreen ? {} : {
|
56
56
|
translate: `${String(f(this, p))} ${String(f(this, u))}px`
|
57
57
|
};
|
58
58
|
return { entry: () => new Promise((l) => {
|
@@ -60,7 +60,7 @@ const y = class y extends v {
|
|
60
60
|
[
|
61
61
|
{
|
62
62
|
opacity: 0,
|
63
|
-
...
|
63
|
+
...t
|
64
64
|
},
|
65
65
|
{ opacity: 1, translate: "0 0" }
|
66
66
|
],
|
@@ -83,7 +83,7 @@ const y = class y extends v {
|
|
83
83
|
{ opacity: 1, translate: "0 0" },
|
84
84
|
{
|
85
85
|
opacity: 0,
|
86
|
-
...
|
86
|
+
...t
|
87
87
|
}
|
88
88
|
],
|
89
89
|
{
|
@@ -119,9 +119,7 @@ const y = class y extends v {
|
|
119
119
|
})}
|
120
120
|
>
|
121
121
|
<div class="dialog__head">
|
122
|
-
<h2 class="dialog__heading">
|
123
|
-
<slot name="heading"></slot>
|
124
|
-
</h2>
|
122
|
+
<h2 class="dialog__heading">${this.heading}</h2>
|
125
123
|
${this.noCloseButton ? k : b`
|
126
124
|
<button
|
127
125
|
@click=${this._handleClose}
|
@@ -137,7 +135,7 @@ const y = class y extends v {
|
|
137
135
|
<slot
|
138
136
|
class=${$({
|
139
137
|
dialog__foot: !0,
|
140
|
-
"dialog__foot
|
138
|
+
"dialog__foot--hidden": !this.renderFoot
|
141
139
|
})}
|
142
140
|
name="footer"
|
143
141
|
></slot>
|
@@ -1,20 +1,20 @@
|
|
1
|
-
var
|
1
|
+
var v = (r) => {
|
2
2
|
throw TypeError(r);
|
3
3
|
};
|
4
|
-
var m = (r, e, t) => e.has(r) ||
|
5
|
-
var c = (r, e, t) => (m(r, e, "read from private field"), t ? t.call(r) : e.get(r)), f = (r, e, t) => e.has(r) ?
|
4
|
+
var m = (r, e, t) => e.has(r) || v("Cannot " + t);
|
5
|
+
var c = (r, e, t) => (m(r, e, "read from private field"), t ? t.call(r) : e.get(r)), f = (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), y = (r, e, t, a) => (m(r, e, "write to private field"), a ? a.call(r, t) : e.set(r, t), t);
|
6
6
|
import { SkfElement as u } from "../../internal/components/skf-element.js";
|
7
7
|
import b from "../../styles/component.styles.js";
|
8
8
|
import { html as C } from "lit";
|
9
9
|
import { property as n } from "lit/decorators.js";
|
10
10
|
import { classMap as _ } from "lit/directives/class-map.js";
|
11
11
|
import { styles as x } from "./divider.styles.js";
|
12
|
-
var B = Object.defineProperty,
|
13
|
-
for (var o = void 0, l = r.length - 1,
|
14
|
-
(
|
12
|
+
var B = Object.defineProperty, d = (r, e, t, a) => {
|
13
|
+
for (var o = void 0, l = r.length - 1, h; l >= 0; l--)
|
14
|
+
(h = r[l]) && (o = h(e, t, o) || o);
|
15
15
|
return o && B(e, t, o), o;
|
16
16
|
}, i;
|
17
|
-
const
|
17
|
+
const p = class p extends u {
|
18
18
|
constructor() {
|
19
19
|
super();
|
20
20
|
f(this, i);
|
@@ -38,15 +38,15 @@ const d = class d extends u {
|
|
38
38
|
`;
|
39
39
|
}
|
40
40
|
};
|
41
|
-
i = new WeakMap(),
|
42
|
-
let s =
|
43
|
-
|
41
|
+
i = new WeakMap(), p.styles = [b, x];
|
42
|
+
let s = p;
|
43
|
+
d([
|
44
44
|
n({ reflect: !0 })
|
45
45
|
], s.prototype, "color");
|
46
|
-
|
46
|
+
d([
|
47
47
|
n({ type: Boolean })
|
48
48
|
], s.prototype, "decorative");
|
49
|
-
|
49
|
+
d([
|
50
50
|
n({ type: Boolean, reflect: !0 })
|
51
51
|
], s.prototype, "vertical");
|
52
52
|
export {
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { SkfElement as
|
1
|
+
import { SkfElement as f } from "../../internal/components/skf-element.js";
|
2
2
|
import u from "../../styles/component.styles.js";
|
3
3
|
import "lit";
|
4
|
-
import { property as
|
4
|
+
import { property as n } from "lit/decorators.js";
|
5
5
|
import { html as y, unsafeStatic as l } from "lit/static-html.js";
|
6
6
|
import c from "./heading.styles.js";
|
7
|
-
var
|
8
|
-
for (var t = void 0,
|
9
|
-
(m = o[
|
10
|
-
return t &&
|
7
|
+
var d = Object.defineProperty, a = (o, p, i, h) => {
|
8
|
+
for (var t = void 0, e = o.length - 1, m; e >= 0; e--)
|
9
|
+
(m = o[e]) && (t = m(p, i, t) || t);
|
10
|
+
return t && d(p, i, t), t;
|
11
11
|
};
|
12
|
-
const
|
12
|
+
const s = class s extends f {
|
13
13
|
constructor() {
|
14
14
|
super(...arguments), this.as = "h1";
|
15
15
|
}
|
@@ -21,13 +21,13 @@ const e = class e extends n {
|
|
21
21
|
`;
|
22
22
|
}
|
23
23
|
};
|
24
|
-
|
25
|
-
let r =
|
26
|
-
|
27
|
-
|
24
|
+
s.styles = [u, c];
|
25
|
+
let r = s;
|
26
|
+
a([
|
27
|
+
n({ reflect: !0 })
|
28
28
|
], r.prototype, "as");
|
29
|
-
|
30
|
-
|
29
|
+
a([
|
30
|
+
n({ attribute: "styled-as" })
|
31
31
|
], r.prototype, "styledAs");
|
32
32
|
export {
|
33
33
|
r as SkfHeading
|
@@ -10,7 +10,6 @@ import { type CSSResultGroup } from 'lit';
|
|
10
10
|
*/
|
11
11
|
export declare class SkfIcon extends SkfElement {
|
12
12
|
static styles: CSSResultGroup;
|
13
|
-
private _rootId;
|
14
13
|
/**
|
15
14
|
* Sets the color of the icon
|
16
15
|
* @type { "primary" | "inverse" | "emphasised" | "secondary" | "success" | "info" | "warning" | "error" | "alert" }
|
@@ -27,8 +26,6 @@ export declare class SkfIcon extends SkfElement {
|
|
27
26
|
* Size of the icon
|
28
27
|
* @type { "xs" | "sm" | "md" | "lg" }
|
29
28
|
*/
|
30
|
-
size
|
31
|
-
private renderDecorativeIcon;
|
32
|
-
private renderInformativeIcon;
|
29
|
+
size: IconSize;
|
33
30
|
render(): import("lit").TemplateResult<1>;
|
34
31
|
}
|
@@ -1,42 +1,51 @@
|
|
1
1
|
import { SkfElement as f } from "../../internal/components/skf-element.js";
|
2
2
|
import { ICONS as d } from "@skf-design-system/ui-assets";
|
3
|
-
import
|
4
|
-
import { html as
|
3
|
+
import u from "../../styles/component.styles.js";
|
4
|
+
import { html as c } from "lit";
|
5
5
|
import { property as t } from "lit/decorators.js";
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import
|
9
|
-
var
|
10
|
-
for (var
|
11
|
-
(a = m[i]) && (
|
12
|
-
return
|
6
|
+
import { classMap as h } from "lit/directives/class-map.js";
|
7
|
+
import { ifDefined as s } from "lit/directives/if-defined.js";
|
8
|
+
import y from "./icon.styles.js";
|
9
|
+
var $ = Object.defineProperty, o = (m, p, n, b) => {
|
10
|
+
for (var e = void 0, i = m.length - 1, a; i >= 0; i--)
|
11
|
+
(a = m[i]) && (e = a(p, n, e) || e);
|
12
|
+
return e && $(p, n, e), e;
|
13
13
|
};
|
14
|
-
const
|
14
|
+
const l = class l extends f {
|
15
15
|
constructor() {
|
16
|
-
super(...arguments), this.
|
17
|
-
<div aria-hidden="true" id=${this._rootId}>${d[this.name]}</div>
|
18
|
-
`, this.renderInformativeIcon = () => l`
|
19
|
-
<div aria-label=${c(this.label)} id=${this._rootId} role="img">${d[this.name]}</div>
|
20
|
-
`;
|
16
|
+
super(...arguments), this.color = "primary", this.size = "md";
|
21
17
|
}
|
22
18
|
render() {
|
23
|
-
return
|
19
|
+
return c`
|
20
|
+
<div
|
21
|
+
aria-hidden=${s(this.label ? void 0 : "true")}
|
22
|
+
aria-label=${s(this.label)}
|
23
|
+
class=${h({
|
24
|
+
icon: !0,
|
25
|
+
[`icon--color-${this.color}`]: !0,
|
26
|
+
[`icon--size-${this.size}`]: !0
|
27
|
+
})}
|
28
|
+
role=${s(this.label ? "img" : void 0)}
|
29
|
+
>
|
30
|
+
${d[this.name]}
|
31
|
+
</div>
|
32
|
+
`;
|
24
33
|
}
|
25
34
|
};
|
26
|
-
|
27
|
-
let
|
35
|
+
l.styles = [u, y];
|
36
|
+
let r = l;
|
28
37
|
o([
|
29
38
|
t({ reflect: !0 })
|
30
|
-
],
|
39
|
+
], r.prototype, "color");
|
31
40
|
o([
|
32
41
|
t()
|
33
|
-
],
|
42
|
+
], r.prototype, "label");
|
34
43
|
o([
|
35
44
|
t()
|
36
|
-
],
|
45
|
+
], r.prototype, "name");
|
37
46
|
o([
|
38
47
|
t({ reflect: !0 })
|
39
|
-
],
|
48
|
+
], r.prototype, "size");
|
40
49
|
export {
|
41
|
-
|
50
|
+
r as SkfIcon
|
42
51
|
};
|
@@ -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,18 +1,18 @@
|
|
1
1
|
import "../icon/icon.js";
|
2
|
-
import
|
3
|
-
import { SkfElement as
|
4
|
-
import
|
2
|
+
import u from "./link.styles.js";
|
3
|
+
import { SkfElement as m } from "../../internal/components/skf-element.js";
|
4
|
+
import y from "../../styles/component.styles.js";
|
5
5
|
import "lit";
|
6
6
|
import { property as r } from "lit/decorators.js";
|
7
7
|
import { classMap as k } from "lit/directives/class-map.js";
|
8
|
-
import { ifDefined as
|
9
|
-
import { html as f, literal as
|
10
|
-
var
|
11
|
-
for (var
|
12
|
-
(
|
13
|
-
return
|
14
|
-
};
|
15
|
-
const
|
8
|
+
import { ifDefined as c } from "lit/directives/if-defined.js";
|
9
|
+
import { html as f, literal as d } from "lit/static-html.js";
|
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 {
|
16
16
|
constructor() {
|
17
17
|
super(...arguments), this.as = "a", this.color = "primary", 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");
|
@@ -21,10 +21,10 @@ const a = class a extends d {
|
|
21
21
|
set onClick(t) {
|
22
22
|
if (!t) return;
|
23
23
|
this._onClick = t;
|
24
|
-
const
|
25
|
-
t(
|
24
|
+
const o = (l) => {
|
25
|
+
t(l, this.href ?? this.route);
|
26
26
|
};
|
27
|
-
this._assertValidOnClick(t), this.removeEventListener("click",
|
27
|
+
this._assertValidOnClick(t), this.removeEventListener("click", o), this.addEventListener("click", o);
|
28
28
|
}
|
29
29
|
get onClick() {
|
30
30
|
return this._onClick;
|
@@ -48,75 +48,75 @@ const a = class a 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=${c(this.icon)} size="sm"></skf-icon>
|
52
52
|
`;
|
53
53
|
}
|
54
54
|
render() {
|
55
|
-
const t = this.as === "a",
|
55
|
+
const t = this.as === "a", o = t ? d`a` : d`button`;
|
56
56
|
return f`
|
57
|
-
<${
|
58
|
-
?disabled=${
|
57
|
+
<${o}
|
58
|
+
?disabled=${c(t ? void 0 : this.disabled)}
|
59
59
|
@click=${this._preprocessOnClick}
|
60
60
|
class=${k({
|
61
61
|
link: !0,
|
62
62
|
"link--color-inverse": this.color === "inverse",
|
63
63
|
"link--color-primary": this.color === "primary",
|
64
64
|
"link--icon-right": this.iconPlacement === "right",
|
65
|
-
"link--stretch": this.stretch
|
65
|
+
"link--stretch": this.stretch,
|
66
|
+
...s.classMap
|
66
67
|
})}
|
67
|
-
download=${
|
68
|
-
href=${
|
69
|
-
rel=${
|
70
|
-
target=${
|
71
|
-
type=${
|
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)}
|
72
73
|
>
|
73
74
|
${this.icon && this._renderIcon()}
|
74
75
|
<slot>Default link text</slot>
|
75
|
-
</${
|
76
|
+
</${o}>
|
76
77
|
`;
|
77
78
|
}
|
78
|
-
};
|
79
|
-
|
80
|
-
let e = a;
|
81
|
-
o([
|
79
|
+
}, s.styles = [y, u], s.classMap = {}, s);
|
80
|
+
i([
|
82
81
|
r({ type: String, reflect: !0 })
|
83
82
|
], e.prototype, "as", 2);
|
84
|
-
|
83
|
+
i([
|
85
84
|
r({ type: String, reflect: !0 })
|
86
85
|
], e.prototype, "color", 2);
|
87
|
-
|
86
|
+
i([
|
88
87
|
r({ type: Boolean, reflect: !0 })
|
89
88
|
], e.prototype, "disabled", 2);
|
90
|
-
|
89
|
+
i([
|
91
90
|
r({ type: String })
|
92
91
|
], e.prototype, "download", 2);
|
93
|
-
|
92
|
+
i([
|
94
93
|
r({ type: String })
|
95
94
|
], e.prototype, "href", 2);
|
96
|
-
|
95
|
+
i([
|
97
96
|
r({ type: String })
|
98
97
|
], e.prototype, "icon", 2);
|
99
|
-
|
98
|
+
i([
|
100
99
|
r({ attribute: "icon-placement", reflect: !0 })
|
101
100
|
], e.prototype, "iconPlacement", 2);
|
102
|
-
|
101
|
+
i([
|
103
102
|
r()
|
104
103
|
], e.prototype, "rel", 2);
|
105
|
-
|
104
|
+
i([
|
106
105
|
r({ reflect: !0 })
|
107
106
|
], e.prototype, "route", 2);
|
108
|
-
|
107
|
+
i([
|
109
108
|
r({ type: Boolean, reflect: !0 })
|
110
109
|
], e.prototype, "stretch", 2);
|
111
|
-
|
110
|
+
i([
|
112
111
|
r()
|
113
112
|
], e.prototype, "target", 2);
|
114
|
-
|
113
|
+
i([
|
115
114
|
r()
|
116
115
|
], e.prototype, "type", 2);
|
117
|
-
|
116
|
+
i([
|
118
117
|
r({ attribute: !1 })
|
119
118
|
], e.prototype, "onClick", 1);
|
119
|
+
let E = e;
|
120
120
|
export {
|
121
|
-
|
121
|
+
E as SkfLink
|
122
122
|
};
|
@@ -1,24 +1,24 @@
|
|
1
|
-
var v = (
|
2
|
-
throw TypeError(
|
1
|
+
var v = (e) => {
|
2
|
+
throw TypeError(e);
|
3
3
|
};
|
4
|
-
var f = (
|
5
|
-
var
|
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
6
|
import { SkfElement as y } from "../../internal/components/skf-element.js";
|
7
7
|
import _ from "../../styles/component.styles.js";
|
8
8
|
import { html as b } from "lit";
|
9
|
-
import { property as
|
9
|
+
import { property as p } from "lit/decorators.js";
|
10
10
|
import { classMap as g } from "lit/directives/class-map.js";
|
11
11
|
import z from "./loader.styles.js";
|
12
|
-
var x = Object.defineProperty,
|
13
|
-
for (var i = void 0, o =
|
14
|
-
(m =
|
15
|
-
return i && x(
|
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;
|
16
16
|
}, s;
|
17
|
-
const
|
17
|
+
const c = class c extends y {
|
18
18
|
constructor() {
|
19
19
|
super();
|
20
20
|
h(this, s);
|
21
|
-
this.ariaLabel = "Loading...", this.invert = !1, this.size = "md", u(this, s, this.attachInternals()),
|
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";
|
22
22
|
}
|
23
23
|
render() {
|
24
24
|
return b`
|
@@ -36,16 +36,16 @@ const d = class d extends y {
|
|
36
36
|
`;
|
37
37
|
}
|
38
38
|
};
|
39
|
-
s = new WeakMap(),
|
40
|
-
let l =
|
41
|
-
|
42
|
-
|
39
|
+
s = new WeakMap(), c.styles = [_, z];
|
40
|
+
let l = c;
|
41
|
+
d([
|
42
|
+
p({ reflect: !0, attribute: "aria-label" })
|
43
43
|
], l.prototype, "ariaLabel");
|
44
|
-
|
45
|
-
|
44
|
+
d([
|
45
|
+
p({ type: Boolean })
|
46
46
|
], l.prototype, "invert");
|
47
|
-
|
48
|
-
|
47
|
+
d([
|
48
|
+
p({ type: String, reflect: !0 })
|
49
49
|
], l.prototype, "size");
|
50
50
|
export {
|
51
51
|
l as SkfLoader
|