@skf-design-system/ui-components 1.0.0-alpha.35 → 1.0.0-alpha.37
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/custom-elements.json +25490 -0
- package/dist/components/accordion/accordion.component.d.ts +1 -1
- package/dist/components/accordion/accordion.component.js +2 -2
- package/dist/components/card/card.component.d.ts +2 -0
- package/dist/components/card/card.styles.js +2 -1
- package/dist/components/datepicker/datepicker.component.js +1 -0
- package/dist/components/icon/icon.component.d.ts +1 -4
- package/dist/components/icon/icon.component.js +41 -53
- package/dist/components/icon/icon.styles.js +0 -1
- package/dist/components/input/input.component.js +1 -0
- package/dist/components/link/link.component.d.ts +15 -18
- package/dist/components/link/link.component.js +99 -108
- package/dist/components/link/link.styles.js +45 -45
- package/dist/components/loader/loader.component.d.ts +5 -1
- package/dist/components/loader/loader.component.js +43 -29
- package/dist/components/loader/loader.styles.js +5 -9
- package/dist/components/menu/menu-item.component.d.ts +1 -1
- package/dist/components/menu/menu-item.component.js +8 -8
- package/dist/components/menu/menu-item.styles.js +8 -5
- package/dist/components/nav/nav-item.component.d.ts +4 -0
- package/dist/components/nav/nav-item.component.js +44 -25
- package/dist/components/nav/nav-item.styles.js +29 -25
- package/dist/components/nav/nav.component.d.ts +6 -0
- package/dist/components/nav/nav.component.js +42 -21
- package/dist/components/nav/nav.styles.js +15 -9
- package/dist/components/popover/popover.component.d.ts +4 -0
- package/dist/components/popover/popover.component.js +31 -23
- package/dist/components/progress/progress.component.d.ts +2 -0
- package/dist/components/progress/progress.component.js +38 -29
- package/dist/components/progress/progress.styles.js +3 -3
- package/dist/components/select/select-option-group.component.d.ts +4 -0
- package/dist/components/select/select-option-group.component.js +37 -18
- package/dist/components/select/select-option-group.style.js +12 -6
- package/dist/components/select/select-option.component.d.ts +5 -1
- package/dist/components/select/select-option.component.js +69 -52
- package/dist/components/select/select-option.styles.js +43 -31
- package/dist/components/select/select.component.d.ts +5 -1
- package/dist/components/select/select.component.js +47 -29
- package/dist/components/select/select.controllers.js +4 -8
- package/dist/components/textarea/textarea.component.js +5 -4
- package/dist/components/toast/toast.component.js +9 -9
- package/dist/components/toast/toast.singleton.d.ts +1 -1
- package/dist/components/toast/toast.singleton.js +18 -18
- package/dist/custom-elements.json +778 -678
- package/dist/internal/base-classes/popover/popover.base.js +17 -17
- package/dist/internal/base-classes/popover/popover.styles.js +4 -5
- package/dist/internal/components/hint/hint.component.d.ts +4 -0
- package/dist/internal/components/hint/hint.component.js +47 -20
- package/dist/internal/components/hint/hint.styles.js +29 -25
- package/dist/types/jsx/custom-element-jsx.d.ts +188 -70
- package/dist/types/vue/index.d.ts +81 -69
- package/dist/vscode.html-custom-data.json +92 -96
- package/dist/web-types.json +206 -205
- package/package.json +16 -16
@@ -25,7 +25,7 @@ export declare class SkfAccordion extends SkfElement {
|
|
25
25
|
/** If true, will truncate all headings in collapsed state */
|
26
26
|
truncate: boolean;
|
27
27
|
/** @internal */
|
28
|
-
private
|
28
|
+
private _accordionItems;
|
29
29
|
protected updated(_changedProperties: PropertyValues): void;
|
30
30
|
/** @internal */
|
31
31
|
private get items();
|
@@ -22,7 +22,7 @@ const n = class n extends p {
|
|
22
22
|
}
|
23
23
|
/** @internal */
|
24
24
|
get items() {
|
25
|
-
return [...this
|
25
|
+
return [...this._accordionItems].filter((t) => t.localName === "skf-accordion-item");
|
26
26
|
}
|
27
27
|
_onChildToggle(t) {
|
28
28
|
if (this.multiple || t.defaultPrevented) return;
|
@@ -66,7 +66,7 @@ s([
|
|
66
66
|
], e.prototype, "truncate");
|
67
67
|
s([
|
68
68
|
d()
|
69
|
-
], e.prototype, "
|
69
|
+
], e.prototype, "_accordionItems");
|
70
70
|
export {
|
71
71
|
e as SkfAccordion
|
72
72
|
};
|
@@ -7,11 +7,12 @@ const a = r`
|
|
7
7
|
}
|
8
8
|
|
9
9
|
#root {
|
10
|
+
--_skf-card-bg-color: var(--mod-card-bg-color, var(--skf-bg-color-neutral-1));
|
10
11
|
--_skf-card-border-color: var(--skf-border-color-tertiary);
|
11
12
|
--_skf-card-padding: var(--skf-spacing-100);
|
12
13
|
--_skf-card-shadow: var(--skf-shadow-md);
|
13
14
|
|
14
|
-
background-color: var(--
|
15
|
+
background-color: var(--_skf-card-bg-color);
|
15
16
|
border: var(--skf-border-width-sm) solid var(--_skf-card-border-color);
|
16
17
|
border-radius: var(--skf-border-radius-sm);
|
17
18
|
box-shadow: var(--_skf-card-shadow);
|
@@ -18,15 +18,12 @@ export declare class SkfIcon extends SkfElement {
|
|
18
18
|
/** If defined, adds an alternate description to use for assistive devices */
|
19
19
|
label?: string;
|
20
20
|
/** Name of the icon to display */
|
21
|
-
name
|
21
|
+
name: Icon;
|
22
22
|
/** Size of the icon */
|
23
23
|
size: SkfIconSize;
|
24
24
|
connectedCallback(): void;
|
25
25
|
/** @internal */
|
26
26
|
_handleStateChange(property: string, _prev: unknown, next: unknown): void;
|
27
|
-
_handleNameChange(): void;
|
28
|
-
/** @internal */
|
29
|
-
_handleSlotchange: () => void;
|
30
27
|
render(): import("lit").TemplateResult<1>;
|
31
28
|
}
|
32
29
|
export {};
|
@@ -1,72 +1,60 @@
|
|
1
|
-
var u = (
|
2
|
-
throw TypeError(
|
1
|
+
var u = (t) => {
|
2
|
+
throw TypeError(t);
|
3
3
|
};
|
4
|
-
var
|
5
|
-
var c = (e, r
|
6
|
-
import { SkfElement as
|
4
|
+
var g = (t, e, r) => e.has(t) || u("Cannot " + r);
|
5
|
+
var c = (t, e, r) => (g(t, e, "read from private field"), r ? r.call(t) : e.get(t)), y = (t, e, r) => e.has(t) ? u("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), d = (t, e, r, o) => (g(t, e, "write to private field"), o ? o.call(t, r) : e.set(t, r), r);
|
6
|
+
import { SkfElement as v } from "../../internal/components/skf-element.js";
|
7
7
|
import { stateMap as b } from "../../internal/helpers/stateMap.js";
|
8
|
-
import { watch as
|
9
|
-
import { ICONS as
|
8
|
+
import { watch as _ } from "../../internal/helpers/watch.js";
|
9
|
+
import { ICONS as S } from "@skf-design-system/ui-assets";
|
10
10
|
import { componentStyles as C } from "../../styles/component.styles.js";
|
11
|
-
import { html as
|
12
|
-
import { property as
|
13
|
-
import { styles as
|
14
|
-
var z = Object.defineProperty,
|
15
|
-
for (var s = o > 1 ? void 0 : o ?
|
16
|
-
(
|
17
|
-
return o && s && z(
|
11
|
+
import { html as O } from "lit";
|
12
|
+
import { property as n } from "lit/decorators.js";
|
13
|
+
import { styles as w } from "./icon.styles.js";
|
14
|
+
var z = Object.defineProperty, P = Object.getOwnPropertyDescriptor, p = (t, e, r, o) => {
|
15
|
+
for (var s = o > 1 ? void 0 : o ? P(e, r) : e, m = t.length - 1, h; m >= 0; m--)
|
16
|
+
(h = t[m]) && (s = (o ? h(e, r, s) : h(s)) || s);
|
17
|
+
return o && s && z(e, r, s), s;
|
18
18
|
};
|
19
|
-
const
|
19
|
+
const x = {
|
20
20
|
color: ["emphasised", "error", "info", "inverse", "primary", "secondary", "success", "warning"],
|
21
21
|
size: ["lg", "md", "sm", "xs"]
|
22
22
|
};
|
23
|
-
var
|
24
|
-
const f = class f extends
|
23
|
+
var a, l;
|
24
|
+
const f = class f extends v {
|
25
25
|
constructor() {
|
26
26
|
super(...arguments);
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
var s;
|
31
|
-
const t = (s = this.shadowRoot) == null ? void 0 : s.querySelector("slot");
|
32
|
-
if (!t) throw new Error("Skf-icon is missing a slot");
|
33
|
-
if (!t.assignedElements({ flatten: !0 }).some((n) => n.tagName === "svg"))
|
34
|
-
throw new Error("Skf-icon must have a name attribute or a slotted svg");
|
35
|
-
};
|
27
|
+
y(this, a);
|
28
|
+
y(this, l);
|
29
|
+
d(this, a, this.attachInternals()), d(this, l, c(this, a).states), this.color = "primary", this.size = "md";
|
36
30
|
}
|
37
31
|
connectedCallback() {
|
38
32
|
super.connectedCallback(), this.ariaHidden = this.label ? null : "true", this.ariaLabel = this.label ?? null, this.role = this.label ? "img" : null;
|
39
33
|
}
|
40
|
-
_handleStateChange(
|
41
|
-
b(c(this,
|
42
|
-
}
|
43
|
-
_handleNameChange() {
|
44
|
-
this.name || this._handleSlotchange();
|
34
|
+
_handleStateChange(r, o, s) {
|
35
|
+
b(c(this, l), x[r]).set(s);
|
45
36
|
}
|
46
37
|
render() {
|
47
|
-
return
|
38
|
+
return O`<div id="root">${S[this.name]}</div>`;
|
48
39
|
}
|
49
40
|
};
|
50
|
-
|
51
|
-
let
|
52
|
-
|
53
|
-
|
54
|
-
],
|
55
|
-
|
56
|
-
|
57
|
-
],
|
58
|
-
|
59
|
-
|
60
|
-
],
|
61
|
-
|
62
|
-
|
63
|
-
],
|
64
|
-
|
65
|
-
|
66
|
-
],
|
67
|
-
i([
|
68
|
-
S("name", { afterUpdate: !0 })
|
69
|
-
], a.prototype, "_handleNameChange", 1);
|
41
|
+
a = new WeakMap(), l = new WeakMap(), f.styles = [C, w];
|
42
|
+
let i = f;
|
43
|
+
p([
|
44
|
+
n({ type: String })
|
45
|
+
], i.prototype, "color", 2);
|
46
|
+
p([
|
47
|
+
n({ type: String })
|
48
|
+
], i.prototype, "label", 2);
|
49
|
+
p([
|
50
|
+
n({ type: String })
|
51
|
+
], i.prototype, "name", 2);
|
52
|
+
p([
|
53
|
+
n({ type: String })
|
54
|
+
], i.prototype, "size", 2);
|
55
|
+
p([
|
56
|
+
_(["color", "size"])
|
57
|
+
], i.prototype, "_handleStateChange", 1);
|
70
58
|
export {
|
71
|
-
|
59
|
+
i as SkfIcon
|
72
60
|
};
|
@@ -2,54 +2,51 @@ import '../icon/icon.js';
|
|
2
2
|
import { SkfElement } from '../../internal/components/skf-element.js';
|
3
3
|
import type { Icon } from '../../internal/types.js';
|
4
4
|
import { type CSSResultGroup } from 'lit';
|
5
|
-
type
|
5
|
+
type Color = 'primary' | 'inverse';
|
6
6
|
/**
|
7
|
-
* The `<skf-link>` can be used as either a regular link or a
|
7
|
+
* The `<skf-link>` can be used as either a regular link or a semantic button. The button variant is
|
8
|
+
* intended to be used for triggering javascript functions, not handling forms.
|
8
9
|
*
|
9
10
|
* @documentation See [zeroheight](https://zeroheight.com/****) for design principles
|
10
11
|
*
|
12
|
+
* @event {CustomEvent} skf-link-click - Fired when the link is clicked
|
13
|
+
*
|
11
14
|
* @slot - The links' main content
|
12
15
|
*
|
13
16
|
* @tagname skf-link
|
14
17
|
*/
|
15
18
|
export declare class SkfLink extends SkfElement {
|
19
|
+
#private;
|
16
20
|
static styles: CSSResultGroup;
|
17
|
-
static classMap: {};
|
18
|
-
/** @internal */
|
19
|
-
private _onClick?;
|
20
21
|
/** Defines the semantic element to render */
|
21
|
-
as: 'button' | '
|
22
|
+
as: 'button' | 'link';
|
22
23
|
/** Defines the text-color */
|
23
|
-
color:
|
24
|
+
color: Color;
|
24
25
|
/** If true, disables the link */
|
25
26
|
disabled: boolean;
|
26
27
|
/** If defined, downloads the url */
|
27
|
-
download
|
28
|
+
download: boolean;
|
28
29
|
/** If defined, loads url on click */
|
29
30
|
href?: string;
|
30
31
|
/** If defined, renders an icon before or after the text */
|
31
32
|
icon?: Icon;
|
32
|
-
/**
|
33
|
-
|
34
|
-
/** If defined, accepts a function that runs on click. Forwards optional route as second argument. */
|
35
|
-
set onClick(onClickFn: ((event: Event, route?: string) => void) | undefined);
|
36
|
-
get onClick(): ((event: Event, route?: string) => void) | undefined;
|
33
|
+
/** If true, the icon is placed to the right in relation to the text */
|
34
|
+
iconRight: boolean;
|
37
35
|
/** If defined, describes the relationship between a linked resource and the current document */
|
38
36
|
rel?: string;
|
39
|
-
/** If defined, used on conjunction with onClick property
|
37
|
+
/** If defined, used on conjunction with onClick property. **Notice!** Only applicable to as=button. */
|
40
38
|
route?: string;
|
41
39
|
/** If true, fills the parents horizontal axis */
|
42
40
|
stretch: boolean;
|
43
41
|
/** If defined, specifies where to open the linked document */
|
44
42
|
target?: '_blank' | '_parent' | '_self' | '_top';
|
45
|
-
/** Defines the type of button */
|
46
|
-
type: SkfLinkType;
|
47
43
|
connectedCallback(): void;
|
44
|
+
_handleAsChange(): void;
|
48
45
|
/** @internal */
|
49
|
-
|
46
|
+
_handleStateChange(property: string, _prev: unknown, next: unknown): void;
|
50
47
|
/** @internal */
|
51
48
|
/** retargets click event to host */
|
52
|
-
private
|
49
|
+
private _handleClick;
|
53
50
|
/** @internal */
|
54
51
|
private _renderIcon;
|
55
52
|
render(): import("lit").TemplateResult;
|
@@ -1,123 +1,114 @@
|
|
1
|
+
var u = (e) => {
|
2
|
+
throw TypeError(e);
|
3
|
+
};
|
4
|
+
var b = (e, i, t) => i.has(e) || u("Cannot " + t);
|
5
|
+
var d = (e, i, t) => (b(e, i, "read from private field"), t ? t.call(e) : i.get(e)), f = (e, i, t) => i.has(e) ? u("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(e) : i.set(e, t), y = (e, i, t, o) => (b(e, i, "write to private field"), o ? o.call(e, t) : i.set(e, t), t);
|
1
6
|
import "../icon/icon.js";
|
2
|
-
import { SkfElement as
|
3
|
-
import {
|
4
|
-
import "
|
5
|
-
import {
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
7
|
+
import { SkfElement as C } from "../../internal/components/skf-element.js";
|
8
|
+
import { stateMap as k } from "../../internal/helpers/stateMap.js";
|
9
|
+
import { watch as v } from "../../internal/helpers/watch.js";
|
10
|
+
import { componentStyles as S } from "../../styles/component.styles.js";
|
11
|
+
import { nothing as g } from "lit";
|
12
|
+
import { property as n } from "lit/decorators.js";
|
13
|
+
import { ifDefined as x } from "lit/directives/if-defined.js";
|
14
|
+
import { html as _ } from "lit/static-html.js";
|
15
|
+
import { styles as A } from "./link.styles.js";
|
16
|
+
var D = Object.defineProperty, E = Object.getOwnPropertyDescriptor, s = (e, i, t, o) => {
|
17
|
+
for (var h = o > 1 ? void 0 : o ? E(i, t) : i, p = e.length - 1, c; p >= 0; p--)
|
18
|
+
(c = e[p]) && (h = (o ? c(i, t, h) : c(h)) || h);
|
19
|
+
return o && h && D(i, t, h), h;
|
20
|
+
};
|
21
|
+
const w = {
|
22
|
+
color: ["inverse", "primary"],
|
23
|
+
stretch: "stretch"
|
24
|
+
};
|
25
|
+
var a, l;
|
26
|
+
const m = class m extends C {
|
16
27
|
constructor() {
|
17
|
-
super(...arguments)
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
28
|
+
super(...arguments);
|
29
|
+
f(this, a);
|
30
|
+
f(this, l);
|
31
|
+
y(this, a, this.attachInternals()), y(this, l, d(this, a).states), this.as = "link", this.color = "primary", this.disabled = !1, this.download = !1, this.iconRight = !1, this.stretch = !1, this._handleClick = () => {
|
32
|
+
var t;
|
33
|
+
if (!(this.as === "button" && this.disabled) && (this.emit("skf-link-click", { detail: { href: this.href, route: this.route } }), this.as === "link" && !this.route && ((t = this.href) != null && t.trim())))
|
34
|
+
if (this.target)
|
35
|
+
window.open(this.href, this.target);
|
36
|
+
else if (this.download) {
|
37
|
+
const o = document.createElement("a");
|
38
|
+
o.href = this.href, o.download = this.href, document.body.appendChild(o), o.click(), document.body.removeChild(o);
|
39
|
+
} else
|
40
|
+
window.location.href = this.href;
|
26
41
|
};
|
27
|
-
this._assertValidOnClick(t), this.removeEventListener("click", i), this.addEventListener("click", i);
|
28
|
-
}
|
29
|
-
get onClick() {
|
30
|
-
return this._onClick;
|
31
42
|
}
|
32
43
|
connectedCallback() {
|
33
|
-
super.connectedCallback(), this.
|
34
|
-
|
35
|
-
|
44
|
+
super.connectedCallback(), this.ariaDisabled = this.as === "button" && this.disabled ? "true" : null, this.role = this.as;
|
45
|
+
const t = this.hasAttribute("tabindex") ? Number(this.getAttribute("tabindex")) : 0;
|
46
|
+
this.ariaDisabled !== "true" && (this.tabIndex = t), this.addEventListener("keydown", (o) => {
|
47
|
+
(o.key === "Enter" || o.key === " ") && this._handleClick();
|
48
|
+
}), this.addEventListener("click", this._handleClick);
|
36
49
|
}
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
);
|
50
|
+
_handleAsChange() {
|
51
|
+
this.as === "button" ? this.setAttribute("type", "button") : this.removeAttribute("type");
|
52
|
+
}
|
53
|
+
_handleStateChange(t, o, h) {
|
54
|
+
k(d(this, l), w[t]).set(h);
|
43
55
|
}
|
44
56
|
/** @internal */
|
45
57
|
_renderIcon() {
|
46
|
-
const t =
|
47
|
-
|
48
|
-
inverse: "inverse"
|
49
|
-
});
|
50
|
-
return f`
|
51
|
-
<skf-icon color=${t[this.color]} name=${l(this.icon)} size="sm"></skf-icon>
|
52
|
-
`;
|
58
|
+
const t = this.color === "inverse" ? "inverse" : "emphasised";
|
59
|
+
return _`<skf-icon color=${t} name=${x(this.icon)} size="sm"></skf-icon>`;
|
53
60
|
}
|
54
61
|
render() {
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
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=${l(t ? this.download : void 0)}
|
69
|
-
href=${l(t ? this.href : void 0)}
|
70
|
-
part="root"
|
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
|
-
>
|
75
|
-
${this.icon && this._renderIcon()}
|
76
|
-
<slot>Default link text</slot>
|
77
|
-
</${i}>
|
62
|
+
return _`
|
63
|
+
<div id="root" part="root">
|
64
|
+
${this.icon && !this.iconRight ? this._renderIcon() : g}
|
65
|
+
<slot></slot>
|
66
|
+
${this.icon && this.iconRight ? this._renderIcon() : g}
|
67
|
+
</div>
|
78
68
|
`;
|
79
69
|
}
|
80
|
-
}
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
70
|
+
};
|
71
|
+
a = new WeakMap(), l = new WeakMap(), m.styles = [S, A];
|
72
|
+
let r = m;
|
73
|
+
s([
|
74
|
+
n({ type: String })
|
75
|
+
], r.prototype, "as", 2);
|
76
|
+
s([
|
77
|
+
n({ type: String })
|
78
|
+
], r.prototype, "color", 2);
|
79
|
+
s([
|
80
|
+
n({ type: Boolean })
|
81
|
+
], r.prototype, "disabled", 2);
|
82
|
+
s([
|
83
|
+
n({ type: Boolean })
|
84
|
+
], r.prototype, "download", 2);
|
85
|
+
s([
|
86
|
+
n({ type: String })
|
87
|
+
], r.prototype, "href", 2);
|
88
|
+
s([
|
89
|
+
n({ type: String })
|
90
|
+
], r.prototype, "icon", 2);
|
91
|
+
s([
|
92
|
+
n({ type: Boolean, attribute: "icon-right" })
|
93
|
+
], r.prototype, "iconRight", 2);
|
94
|
+
s([
|
95
|
+
n({ type: String })
|
96
|
+
], r.prototype, "rel", 2);
|
97
|
+
s([
|
98
|
+
n({ type: String })
|
99
|
+
], r.prototype, "route", 2);
|
100
|
+
s([
|
101
|
+
n({ type: Boolean })
|
102
|
+
], r.prototype, "stretch", 2);
|
103
|
+
s([
|
104
|
+
n({ type: String })
|
105
|
+
], r.prototype, "target", 2);
|
106
|
+
s([
|
107
|
+
v("as")
|
108
|
+
], r.prototype, "_handleAsChange", 1);
|
109
|
+
s([
|
110
|
+
v(Object.keys(w))
|
111
|
+
], r.prototype, "_handleStateChange", 1);
|
121
112
|
export {
|
122
|
-
|
113
|
+
r as SkfLink
|
123
114
|
};
|
@@ -1,61 +1,61 @@
|
|
1
|
-
import { css as
|
2
|
-
const e =
|
3
|
-
/* stylelint-disable selector-class-pattern */
|
1
|
+
import { css as o } from "lit";
|
2
|
+
const e = o`
|
4
3
|
@layer components {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
@layer base {
|
5
|
+
:host {
|
6
|
+
contain: layout;
|
7
|
+
cursor: pointer;
|
8
|
+
display: inline;
|
9
|
+
}
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
vertical-align: top;
|
11
|
+
#root {
|
12
|
+
--_skf-link-color: var(--skf-interactive-text-color-primary);
|
13
|
+
--_skf-link-color-active: var(--skf-interactive-text-color-primary-active);
|
14
|
+
--_skf-link-color-disabled: var(--skf-interactive-text-color-disabled);
|
15
|
+
--_skf-link-color-hover: var(--skf-interactive-text-color-primary-hover);
|
16
|
+
--_skf-link-outline-color: var(--skf-interactive-text-color-primary);
|
17
17
|
|
18
|
-
|
19
|
-
|
18
|
+
align-items: center;
|
19
|
+
color: var(--_skf-link-color);
|
20
|
+
display: inline-flex;
|
21
|
+
font-weight: var(--skf-font-weight-bold);
|
22
|
+
gap: 0 var(--skf-spacing-25);
|
23
|
+
vertical-align: top;
|
20
24
|
}
|
25
|
+
}
|
21
26
|
|
22
|
-
|
23
|
-
|
24
|
-
|
27
|
+
@layer states {
|
28
|
+
:host(:focus-visible) {
|
29
|
+
outline: unset;
|
25
30
|
|
26
|
-
|
27
|
-
|
31
|
+
#root {
|
32
|
+
border-radius: var(--skf-border-radius-sm);
|
33
|
+
outline: var(--skf-border-width-md) solid var(--_skf-link-outline-color);
|
34
|
+
outline-offset: var(--skf-size-2);
|
35
|
+
}
|
28
36
|
}
|
29
37
|
|
30
|
-
|
31
|
-
|
32
|
-
outline: var(--skf-border-width-md) solid var(--_skf-link-outline-color);
|
33
|
-
outline-offset: var(--skf-size-2);
|
38
|
+
:host(:disabled) #root {
|
39
|
+
--_skf-link-color: var(--_skf-link-color-disabled);
|
34
40
|
}
|
35
|
-
}
|
36
41
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
--_skf-link-color-disabled: var(--skf-interactive-text-color-disabled);
|
41
|
-
--_skf-link-color-hover: var(--skf-interactive-text-color-primary-hover);
|
42
|
-
--_skf-link-outline-color: var(--skf-interactive-text-color-primary);
|
43
|
-
}
|
44
|
-
|
45
|
-
.link--color-inverse {
|
46
|
-
--_skf-link-color: var(--skf-interactive-text-color-inverse);
|
47
|
-
--_skf-link-color-active: var(--skf-interactive-text-color-inverse-active);
|
48
|
-
--_skf-link-color-disabled: var(--skf-interactive-text-color-disabled);
|
49
|
-
--_skf-link-color-hover: var(--skf-interactive-text-color-inverse-hover);
|
50
|
-
--_skf-link-outline-color: var(--skf-interactive-text-color-inverse);
|
42
|
+
:host(:hover) #root {
|
43
|
+
--_skf-link-color: var(--_skf-link-color-hover);
|
44
|
+
}
|
51
45
|
}
|
52
46
|
|
53
|
-
|
54
|
-
|
55
|
-
|
47
|
+
@layer mods {
|
48
|
+
:host(:state(inverse)) #root {
|
49
|
+
--_skf-link-color: var(--skf-interactive-text-color-inverse);
|
50
|
+
--_skf-link-color-active: var(--skf-interactive-text-color-inverse-active);
|
51
|
+
--_skf-link-color-disabled: var(--skf-interactive-text-color-disabled);
|
52
|
+
--_skf-link-color-hover: var(--skf-interactive-text-color-inverse-hover);
|
53
|
+
--_skf-link-outline-color: var(--skf-interactive-text-color-inverse);
|
54
|
+
}
|
56
55
|
|
57
|
-
|
58
|
-
|
56
|
+
:host(:state(stretch)) #root {
|
57
|
+
inline-size: 100%;
|
58
|
+
}
|
59
59
|
}
|
60
60
|
}
|
61
61
|
`;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { SkfElement } from '../../internal/components/skf-element.js';
|
2
2
|
import { type CSSResultGroup } from 'lit';
|
3
|
+
type Size = 'md' | 'sm';
|
3
4
|
/**
|
4
5
|
* The `<skf-loader>` component is a progress indicator that uses circular indicators for short, indeterminate activities
|
5
6
|
*
|
@@ -15,7 +16,10 @@ export declare class SkfLoader extends SkfElement {
|
|
15
16
|
/** If true, inverts the color (to be used on colored backgrounds) */
|
16
17
|
invert: boolean;
|
17
18
|
/** Defines the size of the loader */
|
18
|
-
size
|
19
|
+
size: Size;
|
19
20
|
connectedCallback(): void;
|
21
|
+
/** @internal */
|
22
|
+
_handleStateChange(property: string, _prev: unknown, next: unknown): void;
|
20
23
|
render(): import("lit").TemplateResult<1>;
|
21
24
|
}
|
25
|
+
export {};
|