@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.
Files changed (71) 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/datepicker/datepicker.component.js +1 -0
  5. package/dist/components/divider/divider.component.d.ts +3 -0
  6. package/dist/components/divider/divider.component.js +43 -22
  7. package/dist/components/divider/divider.styles.js +8 -8
  8. package/dist/components/drawer/drawer.component.d.ts +8 -2
  9. package/dist/components/drawer/drawer.component.js +74 -54
  10. package/dist/components/drawer/drawer.styles.js +47 -40
  11. package/dist/components/input/input.component.js +1 -0
  12. package/dist/components/link/link.component.d.ts +15 -18
  13. package/dist/components/link/link.component.js +99 -108
  14. package/dist/components/link/link.styles.js +45 -45
  15. package/dist/components/loader/loader.component.d.ts +5 -1
  16. package/dist/components/loader/loader.component.js +43 -29
  17. package/dist/components/loader/loader.styles.js +5 -9
  18. package/dist/components/menu/menu-item.component.d.ts +1 -1
  19. package/dist/components/menu/menu-item.component.js +8 -8
  20. package/dist/components/menu/menu-item.styles.js +8 -5
  21. package/dist/components/menu/menu.component.d.ts +1 -1
  22. package/dist/components/menu/menu.component.js +8 -8
  23. package/dist/components/nav/nav-item.component.d.ts +4 -0
  24. package/dist/components/nav/nav-item.component.js +44 -25
  25. package/dist/components/nav/nav-item.styles.js +29 -25
  26. package/dist/components/nav/nav.component.d.ts +6 -0
  27. package/dist/components/nav/nav.component.js +42 -21
  28. package/dist/components/nav/nav.styles.js +15 -9
  29. package/dist/components/popover/popover.component.d.ts +4 -0
  30. package/dist/components/popover/popover.component.js +30 -22
  31. package/dist/components/progress/progress.component.d.ts +2 -0
  32. package/dist/components/progress/progress.component.js +38 -29
  33. package/dist/components/progress/progress.styles.js +3 -3
  34. package/dist/components/select/select-option-group.component.d.ts +4 -0
  35. package/dist/components/select/select-option-group.component.js +37 -18
  36. package/dist/components/select/select-option-group.style.js +12 -6
  37. package/dist/components/select/select-option.component.d.ts +6 -1
  38. package/dist/components/select/select-option.component.js +73 -53
  39. package/dist/components/select/select-option.styles.js +43 -31
  40. package/dist/components/select/select.component.d.ts +5 -1
  41. package/dist/components/select/select.component.js +47 -29
  42. package/dist/components/select/select.controllers.js +2 -1
  43. package/dist/components/select/select.styles.js +8 -2
  44. package/dist/components/stepper/stepper-item.component.d.ts +1 -1
  45. package/dist/components/stepper/stepper-item.component.js +26 -23
  46. package/dist/components/tabs/tab-panel.component.d.ts +1 -1
  47. package/dist/components/tabs/tab-panel.component.js +19 -16
  48. package/dist/components/tabs/tab.component.d.ts +1 -1
  49. package/dist/components/tabs/tab.component.js +17 -14
  50. package/dist/components/textarea/textarea.component.js +5 -4
  51. package/dist/components/toast/toast-item.styles.js +13 -10
  52. package/dist/components/toast/toast.component.js +9 -9
  53. package/dist/components/toast/toast.singleton.d.ts +1 -1
  54. package/dist/components/toast/toast.singleton.js +18 -18
  55. package/dist/components/tooltip/tooltip.component.d.ts +1 -0
  56. package/dist/components/tooltip/tooltip.component.js +10 -7
  57. package/dist/custom-elements.json +803 -704
  58. package/dist/index.d.ts +2 -2
  59. package/dist/index.js +20 -20
  60. package/dist/internal/base-classes/popover/popover.base.d.ts +3 -3
  61. package/dist/internal/base-classes/popover/popover.base.js +27 -26
  62. package/dist/internal/base-classes/popover/popover.styles.js +4 -5
  63. package/dist/internal/components/hint/hint.component.d.ts +4 -0
  64. package/dist/internal/components/hint/hint.component.js +47 -20
  65. package/dist/internal/components/hint/hint.styles.js +29 -25
  66. package/dist/internal/types.d.ts +4 -0
  67. package/dist/types/jsx/custom-element-jsx.d.ts +184 -81
  68. package/dist/types/vue/index.d.ts +77 -80
  69. package/dist/vscode.html-custom-data.json +93 -97
  70. package/dist/web-types.json +210 -215
  71. package/package.json +28 -28
@@ -1,17 +1,20 @@
1
- import { SkfElement as c } from "../../internal/components/skf-element.js";
2
- import { watch as h } from "../../internal/helpers/watch.js";
3
- import { componentStyles as l } from "../../styles/component.styles.js";
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 y } from "./tab-panel.styles.js";
7
- var u = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, a = (n, r, s, o) => {
8
- for (var t = o > 1 ? void 0 : o ? _(r, s) : r, i = n.length - 1, p; i >= 0; i--)
9
- (p = n[i]) && (t = (o ? p(r, s, t) : p(t)) || t);
10
- return o && t && u(r, s, t), 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 m = class m extends c {
12
+ const c = class c extends l {
13
13
  constructor() {
14
- super(), this.name = "", this.active = !1, this.role = "tabpanel";
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
- m.styles = [l, y];
24
- let e = m;
25
- a([
26
+ c.styles = [h, u];
27
+ let e = c;
28
+ p([
26
29
  f()
27
30
  ], e.prototype, "name", 2);
28
- a([
31
+ p([
29
32
  d()
30
33
  ], e.prototype, "active", 2);
31
- a([
32
- h("active")
34
+ p([
35
+ m("active")
33
36
  ], e.prototype, "handleActiveChanged", 1);
34
37
  export {
35
38
  e as SkfTabPanel
@@ -20,7 +20,7 @@ export declare class SkfTab extends SkfElement {
20
20
  panel: string;
21
21
  selected: boolean;
22
22
  variant: SkfTabs['variant'];
23
- constructor();
23
+ connectedCallback(): void;
24
24
  /** @internal */
25
25
  handleSelectedChange(): void;
26
26
  /** @internal */
@@ -1,24 +1,27 @@
1
- import { SkfElement as n } from "../../internal/components/skf-element.js";
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 d } from "lit/decorators.js";
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 _ } from "./tab.styles.js";
8
- var u = Object.defineProperty, y = Object.getOwnPropertyDescriptor, a = (c, s, l, r) => {
9
- for (var e = r > 1 ? void 0 : r ? y(s, l) : s, i = c.length - 1, o; i >= 0; i--)
10
- (o = c[i]) && (e = (r ? o(s, l, e) : o(e)) || e);
11
- return r && e && u(s, l, e), 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 p = class p extends n {
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
- }, this.role = "tab", this.addEventListener("click", this._handleClick);
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
- p.styles = [m, _];
42
- let t = p;
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
- d()
50
+ n()
48
51
  ], t.prototype, "selected", 2);
49
52
  a([
50
- d()
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 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,18 +1,21 @@
1
1
  import { css as o } from "lit";
2
- const a = o`
2
+ const e = o`
3
3
  @layer components {
4
- :host {
5
- overflow: hidden; /* Enable mask transition */
6
- padding-block-end: 3px; /* Make room for box-shadow */
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
- .toast-item {
10
- background-color: var(--skf-bg-color-neutral-1);
11
- border-inline-start: var(--skf-size-8) solid
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
- a as default
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 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);
@@ -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 n } from "./tooltip.styles.js";
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 i = class i extends t {
3
+ const e = class e extends t {
4
4
  constructor() {
5
- super(), this.role = "tooltip", this.arrow = !0, this.offset = 8, this.placement = "top", this.variant = "tooltip", t.classMap = { tooltip: !0 };
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.bind(this), { signal: this.signal }), s.addEventListener("focus", this.open.bind(this), { signal: this.signal }), s.addEventListener("mouseenter", this.open.bind(this), { signal: this.signal }), s.addEventListener("mouseleave", this.close.bind(this), { signal: this.signal });
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
- i.styles = [t.styles, n];
20
- let e = i;
22
+ e.styles = [t.styles, a];
23
+ let i = e;
21
24
  export {
22
- e as SkfTooltip
25
+ i as SkfTooltip
23
26
  };