@skf-design-system/ui-components 1.0.2-beta.5 → 1.0.2-beta.6
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/datepicker/datepicker.component.js +1 -0
- package/dist/components/divider/divider.component.d.ts +3 -0
- package/dist/components/divider/divider.component.js +43 -22
- package/dist/components/divider/divider.styles.js +8 -8
- package/dist/components/drawer/drawer.component.d.ts +8 -2
- package/dist/components/drawer/drawer.component.js +74 -54
- package/dist/components/drawer/drawer.styles.js +47 -40
- 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/menu/menu.component.d.ts +1 -1
- package/dist/components/menu/menu.component.js +8 -8
- 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 +30 -22
- 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 +6 -1
- package/dist/components/select/select-option.component.js +73 -53
- 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 +2 -1
- package/dist/components/select/select.styles.js +8 -2
- package/dist/components/stepper/stepper-item.component.d.ts +1 -1
- package/dist/components/stepper/stepper-item.component.js +26 -23
- package/dist/components/tabs/tab-panel.component.d.ts +1 -1
- package/dist/components/tabs/tab-panel.component.js +19 -16
- package/dist/components/tabs/tab.component.d.ts +1 -1
- package/dist/components/tabs/tab.component.js +17 -14
- package/dist/components/textarea/textarea.component.js +5 -4
- package/dist/components/toast/toast-item.styles.js +13 -10
- 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/components/tooltip/tooltip.component.d.ts +1 -0
- package/dist/components/tooltip/tooltip.component.js +10 -7
- package/dist/custom-elements.json +803 -704
- package/dist/index.d.ts +2 -2
- package/dist/index.js +20 -20
- package/dist/internal/base-classes/popover/popover.base.d.ts +3 -3
- package/dist/internal/base-classes/popover/popover.base.js +27 -26
- 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/internal/types.d.ts +4 -0
- package/dist/types/jsx/custom-element-jsx.d.ts +184 -81
- package/dist/types/vue/index.d.ts +77 -80
- package/dist/vscode.html-custom-data.json +93 -97
- package/dist/web-types.json +210 -215
- package/package.json +28 -28
@@ -1,17 +1,20 @@
|
|
1
|
-
import { SkfElement as
|
2
|
-
import { watch as
|
3
|
-
import { componentStyles as
|
1
|
+
import { SkfElement as l } from "../../internal/components/skf-element.js";
|
2
|
+
import { watch as m } from "../../internal/helpers/watch.js";
|
3
|
+
import { componentStyles as h } from "../../styles/component.styles.js";
|
4
4
|
import { html as v } from "lit";
|
5
5
|
import { property as f, state as d } from "lit/decorators.js";
|
6
|
-
import { styles as
|
7
|
-
var
|
8
|
-
for (var t = o > 1 ? void 0 : o ?
|
9
|
-
(
|
10
|
-
return o && t &&
|
6
|
+
import { styles as u } from "./tab-panel.styles.js";
|
7
|
+
var y = Object.defineProperty, C = Object.getOwnPropertyDescriptor, p = (n, r, s, o) => {
|
8
|
+
for (var t = o > 1 ? void 0 : o ? C(r, s) : r, a = n.length - 1, i; a >= 0; a--)
|
9
|
+
(i = n[a]) && (t = (o ? i(r, s, t) : i(t)) || t);
|
10
|
+
return o && t && y(r, s, t), t;
|
11
11
|
};
|
12
|
-
const
|
12
|
+
const c = class c extends l {
|
13
13
|
constructor() {
|
14
|
-
super(), this.name = "", this.active = !1
|
14
|
+
super(...arguments), this.name = "", this.active = !1;
|
15
|
+
}
|
16
|
+
connectedCallback() {
|
17
|
+
super.connectedCallback(), this.role = "tabpanel";
|
15
18
|
}
|
16
19
|
handleActiveChanged() {
|
17
20
|
this.ariaHidden = this.active ? "false" : "true", this.tabIndex = this.active ? 0 : -1;
|
@@ -20,16 +23,16 @@ const m = class m extends c {
|
|
20
23
|
return v`<slot></slot>`;
|
21
24
|
}
|
22
25
|
};
|
23
|
-
|
24
|
-
let e =
|
25
|
-
|
26
|
+
c.styles = [h, u];
|
27
|
+
let e = c;
|
28
|
+
p([
|
26
29
|
f()
|
27
30
|
], e.prototype, "name", 2);
|
28
|
-
|
31
|
+
p([
|
29
32
|
d()
|
30
33
|
], e.prototype, "active", 2);
|
31
|
-
|
32
|
-
|
34
|
+
p([
|
35
|
+
m("active")
|
33
36
|
], e.prototype, "handleActiveChanged", 1);
|
34
37
|
export {
|
35
38
|
e as SkfTabPanel
|
@@ -1,24 +1,27 @@
|
|
1
|
-
import { SkfElement as
|
1
|
+
import { SkfElement as d } from "../../internal/components/skf-element.js";
|
2
2
|
import { watch as h } from "../../internal/helpers/watch.js";
|
3
3
|
import { componentStyles as m } from "../../styles/component.styles.js";
|
4
4
|
import { html as f } from "lit";
|
5
|
-
import { property as v, state as
|
5
|
+
import { property as v, state as n } from "lit/decorators.js";
|
6
6
|
import { classMap as b } from "lit/directives/class-map.js";
|
7
|
-
import { styles as
|
8
|
-
var
|
9
|
-
for (var e = r > 1 ? void 0 : r ? y(s, l) : s, i =
|
10
|
-
(o =
|
11
|
-
return r && e &&
|
7
|
+
import { styles as u } from "./tab.styles.js";
|
8
|
+
var _ = Object.defineProperty, y = Object.getOwnPropertyDescriptor, a = (p, s, l, r) => {
|
9
|
+
for (var e = r > 1 ? void 0 : r ? y(s, l) : s, i = p.length - 1, o; i >= 0; i--)
|
10
|
+
(o = p[i]) && (e = (r ? o(s, l, e) : o(e)) || e);
|
11
|
+
return r && e && _(s, l, e), e;
|
12
12
|
};
|
13
|
-
const
|
13
|
+
const c = class c extends d {
|
14
14
|
constructor() {
|
15
|
-
super(), this.panel = "", this.selected = !1, this.variant = "expanded", this._handleClick = () => {
|
15
|
+
super(...arguments), this.panel = "", this.selected = !1, this.variant = "expanded", this._handleClick = () => {
|
16
16
|
this.emit("skf-tab-select", {
|
17
17
|
detail: {
|
18
18
|
tab: this
|
19
19
|
}
|
20
20
|
});
|
21
|
-
}
|
21
|
+
};
|
22
|
+
}
|
23
|
+
connectedCallback() {
|
24
|
+
super.connectedCallback(), this.role = "tab", this.addEventListener("click", this._handleClick);
|
22
25
|
}
|
23
26
|
handleSelectedChange() {
|
24
27
|
this.ariaSelected = this.selected ? "true" : "false", this.tabIndex = this.selected ? 0 : -1;
|
@@ -38,16 +41,16 @@ const p = class p extends n {
|
|
38
41
|
`;
|
39
42
|
}
|
40
43
|
};
|
41
|
-
|
42
|
-
let t =
|
44
|
+
c.styles = [m, u];
|
45
|
+
let t = c;
|
43
46
|
a([
|
44
47
|
v({ reflect: !0 })
|
45
48
|
], t.prototype, "panel", 2);
|
46
49
|
a([
|
47
|
-
|
50
|
+
n()
|
48
51
|
], t.prototype, "selected", 2);
|
49
52
|
a([
|
50
|
-
|
53
|
+
n()
|
51
54
|
], t.prototype, "variant", 2);
|
52
55
|
a([
|
53
56
|
h("selected")
|
@@ -3,9 +3,9 @@ import { FormBase as m } from "../../internal/components/formBase.js";
|
|
3
3
|
import "../../internal/components/hint/hint.js";
|
4
4
|
import { hintSeverity as c } from "../../internal/helpers/hintSeverity.js";
|
5
5
|
import { Asterisk as y } from "../../internal/templates/asterisk.js";
|
6
|
-
import { componentStyles as
|
6
|
+
import { componentStyles as b } from "../../styles/component.styles.js";
|
7
7
|
import { nothing as u, html as v } from "lit";
|
8
|
-
import { property as r, state as
|
8
|
+
import { property as r, state as f, query as g } from "lit/decorators.js";
|
9
9
|
import { ifDefined as o } from "lit/directives/if-defined.js";
|
10
10
|
import $ from "./textarea.styles.js";
|
11
11
|
var E = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, e = (p, i, s, a) => {
|
@@ -106,6 +106,7 @@ const d = class d extends m {
|
|
106
106
|
</label>
|
107
107
|
${this.hint && v`
|
108
108
|
<skf-hint
|
109
|
+
?disabled=${this.disabled}
|
109
110
|
aria-live=${this.invalid ? "assertive" : "polite"}
|
110
111
|
id="hint"
|
111
112
|
severity=${o(c(this.invalid, this.severity))}
|
@@ -117,7 +118,7 @@ const d = class d extends m {
|
|
117
118
|
`;
|
118
119
|
}
|
119
120
|
};
|
120
|
-
d.styles = [
|
121
|
+
d.styles = [b, $];
|
121
122
|
let t = d;
|
122
123
|
e([
|
123
124
|
r({ type: Number })
|
@@ -174,7 +175,7 @@ e([
|
|
174
175
|
r()
|
175
176
|
], t.prototype, "value", 2);
|
176
177
|
e([
|
177
|
-
|
178
|
+
f()
|
178
179
|
], t.prototype, "invalid", 2);
|
179
180
|
e([
|
180
181
|
g("textarea")
|
@@ -1,18 +1,21 @@
|
|
1
1
|
import { css as o } from "lit";
|
2
|
-
const
|
2
|
+
const e = o`
|
3
3
|
@layer components {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
@layer overrides {
|
5
|
+
:host {
|
6
|
+
overflow: hidden; /* Enable mask transition */
|
7
|
+
padding-block-end: 3px; /* Make room for box-shadow */
|
8
|
+
}
|
9
|
+
|
10
|
+
#root {
|
11
|
+
--_skf-alert-bg-color: var(--skf-bg-color-neutral-1);
|
8
12
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
var(--_skf-alert-border-color, var(--skf-border-color-primary));
|
13
|
+
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
14
|
+
border-inline-start: var(--skf-size-8) solid var(--_skf-alert-border-color);
|
15
|
+
}
|
13
16
|
}
|
14
17
|
}
|
15
18
|
`;
|
16
19
|
export {
|
17
|
-
|
20
|
+
e as default
|
18
21
|
};
|
@@ -1,25 +1,25 @@
|
|
1
1
|
import { SkfElement as l } from "../../internal/components/skf-element.js";
|
2
2
|
import { html as f } from "lit";
|
3
|
-
import { property as i, queryAssignedNodes as
|
4
|
-
import { SkfToastSingleton as
|
3
|
+
import { property as i, queryAssignedNodes as y } from "lit/decorators.js";
|
4
|
+
import { SkfToastSingleton as d } from "./toast.singleton.js";
|
5
5
|
import { styles as a } from "./toast.styles.js";
|
6
|
-
var u = Object.defineProperty, e = (n,
|
7
|
-
for (var s = void 0,
|
8
|
-
(
|
9
|
-
return s && u(
|
6
|
+
var u = Object.defineProperty, e = (n, r, m, g) => {
|
7
|
+
for (var s = void 0, o = n.length - 1, h; o >= 0; o--)
|
8
|
+
(h = n[o]) && (s = h(r, m, s) || s);
|
9
|
+
return s && u(r, m, s), s;
|
10
10
|
};
|
11
11
|
const p = class p extends l {
|
12
12
|
constructor() {
|
13
13
|
super(), this.debug = !1, this.persistent = !1, this.severity = "info", this.timer = 5, this._singleton = void 0;
|
14
14
|
}
|
15
15
|
firstUpdated() {
|
16
|
-
this._singleton = new
|
16
|
+
this._singleton = new d(), this._singleton.addData({
|
17
17
|
debug: this.debug,
|
18
18
|
icon: this.icon,
|
19
19
|
originEl: this,
|
20
20
|
persistent: this.persistent,
|
21
21
|
severity: this.severity,
|
22
|
-
text: this._slottedText.map((
|
22
|
+
text: this._slottedText.map((r) => r.textContent).join(),
|
23
23
|
timer: this.timer = this.timer && this.timer < 5 ? 5 : this.timer,
|
24
24
|
topOffset: this.topOffset
|
25
25
|
});
|
@@ -49,7 +49,7 @@ e([
|
|
49
49
|
i({ type: Number })
|
50
50
|
], t.prototype, "topOffset");
|
51
51
|
e([
|
52
|
-
|
52
|
+
y()
|
53
53
|
], t.prototype, "_slottedText");
|
54
54
|
export {
|
55
55
|
t as SkfToast
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import "./toast-item.js";
|
2
2
|
import "./toast-wrapper.js";
|
3
3
|
class s {
|
4
|
-
constructor(
|
5
|
-
if (this.data = [], this.root =
|
4
|
+
constructor() {
|
5
|
+
if (this.data = [], this.root = globalThis.document, this.usePopover = !0, this.root.nodeType !== Node.DOCUMENT_NODE)
|
6
6
|
throw new Error("Root node must be a document node");
|
7
7
|
return s.instance || (s.instance = this), s.instance;
|
8
8
|
}
|
@@ -15,31 +15,31 @@ class s {
|
|
15
15
|
getData() {
|
16
16
|
return this.data;
|
17
17
|
}
|
18
|
-
setData(
|
19
|
-
this.data =
|
18
|
+
setData(o) {
|
19
|
+
this.data = o;
|
20
20
|
}
|
21
|
-
addData(
|
22
|
-
this.data = [...this.data,
|
21
|
+
addData(o) {
|
22
|
+
this.data = [...this.data, o], this.udpateUI();
|
23
23
|
}
|
24
24
|
udpateUI() {
|
25
|
-
const
|
26
|
-
this.usePopover &&
|
25
|
+
const o = c(this.root, this.usePopover);
|
26
|
+
this.usePopover && o.showPopover(), u();
|
27
27
|
function u() {
|
28
|
-
const
|
29
|
-
for (;
|
30
|
-
const t =
|
28
|
+
const i = new s();
|
29
|
+
for (; i.hasToasts(); ) {
|
30
|
+
const t = i.popToast();
|
31
31
|
if (!t) return;
|
32
|
-
t.debug && (
|
33
|
-
const
|
34
|
-
|
32
|
+
t.debug && (o.debug = !0);
|
33
|
+
const e = document.createElement("skf-toast-item");
|
34
|
+
e.className = "toast-item", e.timer = t.timer, e.severity = t.severity, e.icon = t.icon, t.persistent && e.setAttribute("persistent", "true"), e.originEl = t.originEl, e.innerText = String(t.text);
|
35
35
|
const a = document.createElement("div");
|
36
|
-
a.classList.add("toast-item-wrapper"), a.appendChild(
|
36
|
+
a.classList.add("toast-item-wrapper"), a.appendChild(e), o.prepend(a);
|
37
37
|
}
|
38
38
|
}
|
39
|
-
function c(
|
39
|
+
function c(i, t) {
|
40
40
|
var p;
|
41
|
-
const a = ((p = new s(
|
42
|
-
let r =
|
41
|
+
const a = ((p = new s().getData()[0]) == null ? void 0 : p.topOffset) ?? null, n = i.querySelector("body");
|
42
|
+
let r = n == null ? void 0 : n.querySelector("skf-toast-wrapper");
|
43
43
|
if (!r) {
|
44
44
|
if (r = document.createElement("skf-toast-wrapper"), !r) throw new Error("Could not create toast wrapper element");
|
45
45
|
t && r.setAttribute("popover", "auto"), a && r.setAttribute("top-offset", a.toString()), document.body.appendChild(r);
|
@@ -18,6 +18,7 @@ import type { CSSResultGroup } from 'lit';
|
|
18
18
|
export declare class SkfTooltip extends SkfPopoverBase {
|
19
19
|
static styles: CSSResultGroup;
|
20
20
|
constructor();
|
21
|
+
connectedCallback(): void;
|
21
22
|
openExtended(): void;
|
22
23
|
closeExtended(): void;
|
23
24
|
addEventListeners($element: HTMLElement | Element): void;
|
@@ -1,8 +1,11 @@
|
|
1
|
-
import { styles as
|
1
|
+
import { styles as a } from "./tooltip.styles.js";
|
2
2
|
import { SkfPopoverBase as t } from "../../internal/base-classes/popover/popover.base.js";
|
3
|
-
const
|
3
|
+
const e = class e extends t {
|
4
4
|
constructor() {
|
5
|
-
super(), this.
|
5
|
+
super(), this.arrow = !0, this.offset = 8, this.placement = "top", this.variant = "tooltip", t.classMap = { tooltip: !0 };
|
6
|
+
}
|
7
|
+
connectedCallback() {
|
8
|
+
super.connectedCallback(), this.role = "tooltip";
|
6
9
|
}
|
7
10
|
openExtended() {
|
8
11
|
var s;
|
@@ -13,11 +16,11 @@ const i = class i extends t {
|
|
13
16
|
(s = this.$anchor) == null || s.removeAttribute("aria-describedby");
|
14
17
|
}
|
15
18
|
addEventListeners(s) {
|
16
|
-
s.addEventListener("blur", this.close
|
19
|
+
s.addEventListener("blur", this.close, { signal: this.signal }), s.addEventListener("focus", this.open, { signal: this.signal }), s.addEventListener("mouseenter", this.open, { signal: this.signal }), s.addEventListener("mouseleave", this.close, { signal: this.signal });
|
17
20
|
}
|
18
21
|
};
|
19
|
-
|
20
|
-
let
|
22
|
+
e.styles = [t.styles, a];
|
23
|
+
let i = e;
|
21
24
|
export {
|
22
|
-
|
25
|
+
i as SkfTooltip
|
23
26
|
};
|