@skf-design-system/ui-components 1.0.2-beta.4 → 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,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 m } from "../../internal/components/skf-element.js";
3
- import { componentStyles as y } from "../../styles/component.styles.js";
4
- import "lit";
5
- import { property as r } from "lit/decorators.js";
6
- import { classMap as u } from "lit/directives/class-map.js";
7
- import { ifDefined as l } from "lit/directives/if-defined.js";
8
- import { html as f, literal as d } from "lit/static-html.js";
9
- import { styles as k } from "./link.styles.js";
10
- var v = Object.defineProperty, b = Object.getOwnPropertyDescriptor, o = (h, t, i, n) => {
11
- for (var c = n > 1 ? void 0 : n ? b(t, i) : t, p = h.length - 1, a; p >= 0; p--)
12
- (a = h[p]) && (c = (n ? a(t, i, c) : a(c)) || c);
13
- return n && c && v(t, i, c), c;
14
- }, s;
15
- const e = (s = class extends m {
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), this.as = "a", this.color = "primary", this.disabled = !1, this.iconPlacement = "left", this.stretch = !1, this.type = "button", this._preprocessOnClick = (t) => {
18
- this.as === "a" && this.onClick && t.preventDefault(), t.stopPropagation(), this.emit("click");
19
- };
20
- }
21
- set onClick(t) {
22
- if (!t) return;
23
- this._onClick = t;
24
- const i = (n) => {
25
- t(n, this.href ?? this.route);
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.addEventListener("keydown", (t) => {
34
- (t.key === "Enter" || t.key === " ") && this._preprocessOnClick(t);
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
- /** @internal */
38
- _assertValidOnClick(t) {
39
- console.assert(
40
- typeof t == "function",
41
- `${this.localName}: onClick must be a function. Set the onClick tag property instead of through the attribute API. Read the documentation for more info.`
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 = Object.freeze({
47
- primary: "emphasised",
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
- const t = this.as === "a", i = t ? d`a` : d`button`;
56
- return f`
57
- <${i}
58
- ?disabled=${l(t ? void 0 : this.disabled)}
59
- @click=${this._preprocessOnClick}
60
- class=${u({
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
- }, s.styles = [y, k], s.classMap = {}, s);
81
- o([
82
- r({ reflect: !0 })
83
- ], e.prototype, "as", 2);
84
- o([
85
- r({ reflect: !0 })
86
- ], e.prototype, "color", 2);
87
- o([
88
- r({ type: Boolean, reflect: !0 })
89
- ], e.prototype, "disabled", 2);
90
- o([
91
- r()
92
- ], e.prototype, "download", 2);
93
- o([
94
- r()
95
- ], e.prototype, "href", 2);
96
- o([
97
- r()
98
- ], e.prototype, "icon", 2);
99
- o([
100
- r({ attribute: "icon-placement", reflect: !0 })
101
- ], e.prototype, "iconPlacement", 2);
102
- o([
103
- r({ type: Object, attribute: !1 })
104
- ], e.prototype, "onClick", 1);
105
- o([
106
- r()
107
- ], e.prototype, "rel", 2);
108
- o([
109
- r({ reflect: !0 })
110
- ], e.prototype, "route", 2);
111
- o([
112
- r({ type: Boolean, reflect: !0 })
113
- ], e.prototype, "stretch", 2);
114
- o([
115
- r()
116
- ], e.prototype, "target", 2);
117
- o([
118
- r()
119
- ], e.prototype, "type", 2);
120
- let L = e;
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
- L as SkfLink
113
+ r as SkfLink
123
114
  };
@@ -1,61 +1,61 @@
1
- import { css as r } from "lit";
2
- const e = r`
3
- /* stylelint-disable selector-class-pattern */
1
+ import { css as o } from "lit";
2
+ const e = o`
4
3
  @layer components {
5
- :host {
6
- contain: layout;
7
- display: inline;
8
- }
4
+ @layer base {
5
+ :host {
6
+ contain: layout;
7
+ cursor: pointer;
8
+ display: inline;
9
+ }
9
10
 
10
- .link {
11
- align-items: center;
12
- color: var(--_skf-link-state-color, var(--_skf-link-color));
13
- display: inline-flex;
14
- font-weight: var(--skf-font-weight-bold);
15
- gap: 0 var(--skf-spacing-25);
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
- &:is(a) {
19
- text-decoration: none;
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
- &:disabled {
23
- --_skf-link-state-color: var(--_skf-link-color-disabled);
24
- }
27
+ @layer states {
28
+ :host(:focus-visible) {
29
+ outline: unset;
25
30
 
26
- &:hover {
27
- --_skf-link-state-color: var(--_skf-link-color-hover);
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
- &:focus-visible {
31
- border-radius: var(--skf-border-radius-sm);
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
- .link--color-primary {
38
- --_skf-link-color: var(--skf-interactive-text-color-primary);
39
- --_skf-link-color-active: var(--skf-interactive-text-color-primary-active);
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
- .link--icon-right {
54
- flex-direction: row-reverse;
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
- .link--stretch {
58
- inline-size: 100%;
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?: 'md' | 'sm';
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 {};
@@ -1,29 +1,40 @@
1
- var m = (t) => {
1
+ var y = (t) => {
2
2
  throw TypeError(t);
3
3
  };
4
- var f = (t, e, r) => e.has(t) || m("Cannot " + r);
5
- var n = (t, e, r) => (f(t, e, "read from private field"), r ? r.call(t) : e.get(t)), h = (t, e, r) => e.has(t) ? m("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), u = (t, e, r, l) => (f(t, e, "write to private field"), l ? l.call(t, r) : e.set(t, r), r);
6
- import { SkfElement as b } from "../../internal/components/skf-element.js";
7
- import { componentStyles as y } from "../../styles/component.styles.js";
8
- import { html as g } from "lit";
9
- import { property as c } from "lit/decorators.js";
10
- import { styles as C } from "./loader.styles.js";
11
- var _ = Object.defineProperty, p = (t, e, r, l) => {
12
- for (var i = void 0, o = t.length - 1, v; o >= 0; o--)
13
- (v = t[o]) && (i = v(e, r, i) || i);
14
- return i && _(e, r, i), i;
15
- }, s;
16
- const d = class d extends b {
4
+ var b = (t, e, r) => e.has(t) || y("Cannot " + r);
5
+ var m = (t, e, r) => (b(t, e, "read from private field"), r ? r.call(t) : e.get(t)), v = (t, e, r) => e.has(t) ? y("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), h = (t, e, r, i) => (b(t, e, "write to private field"), i ? i.call(t, r) : e.set(t, r), r);
6
+ import { SkfElement as _ } from "../../internal/components/skf-element.js";
7
+ import { stateMap as g } from "../../internal/helpers/stateMap.js";
8
+ import { watch as C } from "../../internal/helpers/watch.js";
9
+ import { componentStyles as O } from "../../styles/component.styles.js";
10
+ import { html as P } from "lit";
11
+ import { property as d } from "lit/decorators.js";
12
+ import { styles as S } from "./loader.styles.js";
13
+ var j = Object.defineProperty, w = Object.getOwnPropertyDescriptor, l = (t, e, r, i) => {
14
+ for (var s = i > 1 ? void 0 : i ? w(e, r) : e, n = t.length - 1, c; n >= 0; n--)
15
+ (c = t[n]) && (s = (i ? c(e, r, s) : c(s)) || s);
16
+ return i && s && j(e, r, s), s;
17
+ };
18
+ const u = {
19
+ invert: "invert",
20
+ size: ["md", "sm"]
21
+ };
22
+ var o, p;
23
+ const f = class f extends _ {
17
24
  constructor() {
18
25
  super(...arguments);
19
- h(this, s);
20
- u(this, s, this.attachInternals()), this.ariaLabel = "Loading...", this.invert = !1, this.size = "md";
26
+ v(this, o);
27
+ v(this, p);
28
+ h(this, o, this.attachInternals()), h(this, p, m(this, o).states), this.ariaLabel = "Loading...", this.invert = !1, this.size = "md";
21
29
  }
22
30
  connectedCallback() {
23
- super.connectedCallback(), n(this, s).role = "progressbar", n(this, s).ariaLive = "polite";
31
+ super.connectedCallback(), this.role = "progressbar", this.ariaLive = "polite";
32
+ }
33
+ _handleStateChange(r, i, s) {
34
+ g(m(this, p), u[r]).set(s);
24
35
  }
25
36
  render() {
26
- return g`
37
+ return P`
27
38
  <div id="root">
28
39
  <div class="circle"></div>
29
40
  <div class="circle"></div>
@@ -32,17 +43,20 @@ const d = class d extends b {
32
43
  `;
33
44
  }
34
45
  };
35
- s = new WeakMap(), d.styles = [y, C];
36
- let a = d;
37
- p([
38
- c({ reflect: !0, attribute: "aria-label" })
39
- ], a.prototype, "ariaLabel");
40
- p([
41
- c({ type: Boolean })
42
- ], a.prototype, "invert");
43
- p([
44
- c({ reflect: !0 })
45
- ], a.prototype, "size");
46
+ o = new WeakMap(), p = new WeakMap(), f.styles = [O, S];
47
+ let a = f;
48
+ l([
49
+ d({ type: String, attribute: "aria-label" })
50
+ ], a.prototype, "ariaLabel", 2);
51
+ l([
52
+ d({ type: Boolean })
53
+ ], a.prototype, "invert", 2);
54
+ l([
55
+ d({ type: String })
56
+ ], a.prototype, "size", 2);
57
+ l([
58
+ C(Object.keys(u))
59
+ ], a.prototype, "_handleStateChange", 1);
46
60
  export {
47
61
  a as SkfLoader
48
62
  };
@@ -33,17 +33,13 @@ const o = a`
33
33
  }
34
34
 
35
35
  @layer mods {
36
- :host([invert]) {
37
- #root {
38
- --_skf-loader-color: var(--skf-bg-color-neutral-1);
39
- }
36
+ :host(:state(invert)) #root {
37
+ --_skf-loader-color: var(--skf-bg-color-neutral-1);
40
38
  }
41
39
 
42
- :host([size='sm']) {
43
- #root {
44
- --_skf-loader-gap: var(--skf-spacing-25);
45
- --_skf-loader-size: var(--skf-size-4);
46
- }
40
+ :host(:state(sm)) #root {
41
+ --_skf-loader-gap: var(--skf-spacing-25);
42
+ --_skf-loader-size: var(--skf-size-4);
47
43
  }
48
44
  }
49
45
  }
@@ -9,5 +9,5 @@ import { type CSSResultGroup } from 'lit';
9
9
  */
10
10
  export declare class SkfMenuItem extends SkfLink {
11
11
  static styles: CSSResultGroup;
12
- constructor();
12
+ connectedCallback(): void;
13
13
  }
@@ -1,13 +1,13 @@
1
- import { SkfLink as s } from "../link/link.component.js";
1
+ import { SkfLink as t } from "../link/link.component.js";
2
2
  import "lit";
3
- import { styles as e } from "./menu-item.styles.js";
4
- const t = class t extends s {
5
- constructor() {
6
- super(), this.role = "menuitem", s.classMap = { "menu-item": !0 };
3
+ import { styles as l } from "./menu-item.styles.js";
4
+ const s = class s extends t {
5
+ connectedCallback() {
6
+ super.connectedCallback(), this.role = "menuitem";
7
7
  }
8
8
  };
9
- t.styles = [s.styles, e];
10
- let r = t;
9
+ s.styles = [t.styles, l];
10
+ let e = s;
11
11
  export {
12
- r as SkfMenuItem
12
+ e as SkfMenuItem
13
13
  };
@@ -1,9 +1,12 @@
1
- import { css as e } from "lit";
2
- const s = e`
1
+ import { css as o } from "lit";
2
+ const e = o`
3
3
  @layer components {
4
- .menu-item {
4
+ :host {
5
+ display: block;
6
+ }
7
+
8
+ #root {
5
9
  block-size: var(--skf-size-44);
6
- display: flex;
7
10
  padding-inline: var(--skf-spacing-75);
8
11
 
9
12
  @media screen and (any-hover: hover) {
@@ -15,5 +18,5 @@ const s = e`
15
18
  }
16
19
  `;
17
20
  export {
18
- s as styles
21
+ e as styles
19
22
  };
@@ -20,7 +20,7 @@ import type { CSSResultGroup } from 'lit';
20
20
  */
21
21
  export declare class SkfMenu extends SkfPopoverBase {
22
22
  static styles: CSSResultGroup;
23
- constructor();
23
+ connectedCallback(): void;
24
24
  /** @internal */
25
25
  addEventListeners($element: HTMLElement | Element): void;
26
26
  }
@@ -1,16 +1,16 @@
1
1
  import { SkfPopoverBase as t } from "../../internal/base-classes/popover/popover.base.js";
2
- import { styles as r } from "./menu.styles.js";
3
- const s = class s extends t {
4
- constructor() {
5
- super(), this.placement = "bottom-start", this.role = "menu", this.triggerEvent = "click", this.variant = "menu", t.classMap = { menu: !0 };
2
+ import { styles as a } from "./menu.styles.js";
3
+ const e = class e extends t {
4
+ connectedCallback() {
5
+ super.connectedCallback(), this.placement = "bottom-start", this.role = "menu", this.triggerEvent = "click", this.variant = "menu", t.classMap = { menu: !0 };
6
6
  }
7
7
  /** @internal */
8
8
  addEventListeners(i) {
9
- i.addEventListener(this.triggerEvent, this.open.bind(this), { signal: this.signal });
9
+ i.addEventListener(this.triggerEvent, this.open, { signal: this.signal });
10
10
  }
11
11
  };
12
- s.styles = [t.styles, r];
13
- let e = s;
12
+ e.styles = [t.styles, a];
13
+ let s = e;
14
14
  export {
15
- e as SkfMenu
15
+ s as SkfMenu
16
16
  };
@@ -10,9 +10,13 @@ import { type CSSResultGroup } from 'lit';
10
10
  * @tagname skf-nav-item
11
11
  */
12
12
  export declare class SkfNavItem extends SkfElement {
13
+ #private;
13
14
  static styles: CSSResultGroup;
14
15
  href: string;
15
16
  icon?: Icon;
17
+ vertical: boolean;
16
18
  connectedCallback(): void;
19
+ /** @internal */
20
+ _handleStateChange(): void;
17
21
  render(): import("lit").TemplateResult<1>;
18
22
  }