@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.
Files changed (54) hide show
  1. package/custom-elements.json +25490 -0
  2. package/dist/components/accordion/accordion.component.d.ts +1 -1
  3. package/dist/components/accordion/accordion.component.js +2 -2
  4. package/dist/components/card/card.component.d.ts +2 -0
  5. package/dist/components/card/card.styles.js +2 -1
  6. package/dist/components/datepicker/datepicker.component.js +1 -0
  7. package/dist/components/icon/icon.component.d.ts +1 -4
  8. package/dist/components/icon/icon.component.js +41 -53
  9. package/dist/components/icon/icon.styles.js +0 -1
  10. package/dist/components/input/input.component.js +1 -0
  11. package/dist/components/link/link.component.d.ts +15 -18
  12. package/dist/components/link/link.component.js +99 -108
  13. package/dist/components/link/link.styles.js +45 -45
  14. package/dist/components/loader/loader.component.d.ts +5 -1
  15. package/dist/components/loader/loader.component.js +43 -29
  16. package/dist/components/loader/loader.styles.js +5 -9
  17. package/dist/components/menu/menu-item.component.d.ts +1 -1
  18. package/dist/components/menu/menu-item.component.js +8 -8
  19. package/dist/components/menu/menu-item.styles.js +8 -5
  20. package/dist/components/nav/nav-item.component.d.ts +4 -0
  21. package/dist/components/nav/nav-item.component.js +44 -25
  22. package/dist/components/nav/nav-item.styles.js +29 -25
  23. package/dist/components/nav/nav.component.d.ts +6 -0
  24. package/dist/components/nav/nav.component.js +42 -21
  25. package/dist/components/nav/nav.styles.js +15 -9
  26. package/dist/components/popover/popover.component.d.ts +4 -0
  27. package/dist/components/popover/popover.component.js +31 -23
  28. package/dist/components/progress/progress.component.d.ts +2 -0
  29. package/dist/components/progress/progress.component.js +38 -29
  30. package/dist/components/progress/progress.styles.js +3 -3
  31. package/dist/components/select/select-option-group.component.d.ts +4 -0
  32. package/dist/components/select/select-option-group.component.js +37 -18
  33. package/dist/components/select/select-option-group.style.js +12 -6
  34. package/dist/components/select/select-option.component.d.ts +5 -1
  35. package/dist/components/select/select-option.component.js +69 -52
  36. package/dist/components/select/select-option.styles.js +43 -31
  37. package/dist/components/select/select.component.d.ts +5 -1
  38. package/dist/components/select/select.component.js +47 -29
  39. package/dist/components/select/select.controllers.js +4 -8
  40. package/dist/components/textarea/textarea.component.js +5 -4
  41. package/dist/components/toast/toast.component.js +9 -9
  42. package/dist/components/toast/toast.singleton.d.ts +1 -1
  43. package/dist/components/toast/toast.singleton.js +18 -18
  44. package/dist/custom-elements.json +778 -678
  45. package/dist/internal/base-classes/popover/popover.base.js +17 -17
  46. package/dist/internal/base-classes/popover/popover.styles.js +4 -5
  47. package/dist/internal/components/hint/hint.component.d.ts +4 -0
  48. package/dist/internal/components/hint/hint.component.js +47 -20
  49. package/dist/internal/components/hint/hint.styles.js +29 -25
  50. package/dist/types/jsx/custom-element-jsx.d.ts +188 -70
  51. package/dist/types/vue/index.d.ts +81 -69
  52. package/dist/vscode.html-custom-data.json +92 -96
  53. package/dist/web-types.json +206 -205
  54. 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 f } from "../../styles/component.styles.js";
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 b, query as g } from "lit/decorators.js";
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 = [f, $];
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
- b()
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 d } from "lit/decorators.js";
4
- import { SkfToastSingleton as y } from "./toast.singleton.js";
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, o, h, g) => {
7
- for (var s = void 0, r = n.length - 1, m; r >= 0; r--)
8
- (m = n[r]) && (s = m(o, h, s) || s);
9
- return s && u(o, h, s), s;
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 y(this.getRootNode()), this._singleton.addData({
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((o) => o.textContent).join(),
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
- d()
52
+ y()
53
53
  ], t.prototype, "_slottedText");
54
54
  export {
55
55
  t as SkfToast
@@ -10,7 +10,7 @@ export declare class SkfToastSingleton {
10
10
  data: ToastData[];
11
11
  root: Document;
12
12
  usePopover: boolean;
13
- constructor(root: Document);
13
+ constructor();
14
14
  hasToasts(): boolean;
15
15
  popToast(): ToastData | undefined;
16
16
  getData(): ToastData[];
@@ -1,8 +1,8 @@
1
1
  import "./toast-item.js";
2
2
  import "./toast-wrapper.js";
3
3
  class s {
4
- constructor(e) {
5
- if (this.data = [], this.root = e, this.usePopover = !0, this.root.nodeType !== Node.DOCUMENT_NODE)
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(e) {
19
- this.data = e;
18
+ setData(o) {
19
+ this.data = o;
20
20
  }
21
- addData(e) {
22
- this.data = [...this.data, e], this.udpateUI();
21
+ addData(o) {
22
+ this.data = [...this.data, o], this.udpateUI();
23
23
  }
24
24
  udpateUI() {
25
- const e = c(this.root, this.usePopover);
26
- this.usePopover && e.showPopover(), u();
25
+ const o = c(this.root, this.usePopover);
26
+ this.usePopover && o.showPopover(), u();
27
27
  function u() {
28
- const n = new s(document);
29
- for (; n.hasToasts(); ) {
30
- const t = n.popToast();
28
+ const i = new s();
29
+ for (; i.hasToasts(); ) {
30
+ const t = i.popToast();
31
31
  if (!t) return;
32
- t.debug && (e.debug = !0);
33
- const o = document.createElement("skf-toast-item");
34
- o.className = "toast-item", o.timer = t.timer, o.severity = t.severity, o.icon = t.icon, t.persistent && o.setAttribute("persistent", "true"), o.originEl = t.originEl, o.innerText = String(t.text);
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(o), e.prepend(a);
36
+ a.classList.add("toast-item-wrapper"), a.appendChild(e), o.prepend(a);
37
37
  }
38
38
  }
39
- function c(n, t) {
39
+ function c(i, t) {
40
40
  var p;
41
- const a = ((p = new s(document).getData()[0]) == null ? void 0 : p.topOffset) ?? null, i = n.querySelector("body");
42
- let r = i == null ? void 0 : i.querySelector("skf-toast-wrapper");
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);