@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
@@ -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,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);
|