@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
@@ -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
  };
@@ -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
  }
@@ -1,38 +1,57 @@
1
- import "../link/link.js";
2
- import { SkfElement as m } from "../../internal/components/skf-element.js";
3
- import { componentStyles as c } from "../../styles/component.styles.js";
4
- import { html as h } from "lit";
5
- import { property as f } from "lit/decorators.js";
6
- import { ifDefined as u } from "lit/directives/if-defined.js";
7
- import { styles as a } from "./nav-item.styles.js";
8
- var d = Object.defineProperty, p = (i, s, n, y) => {
9
- for (var r = void 0, t = i.length - 1, l; t >= 0; t--)
10
- (l = i[t]) && (r = l(s, n, r) || r);
11
- return r && d(s, n, r), r;
1
+ var y = (t) => {
2
+ throw TypeError(t);
12
3
  };
13
- const o = class o extends m {
4
+ var u = (t, e, r) => e.has(t) || y("Cannot " + r);
5
+ var h = (t, e, r) => (u(t, e, "read from private field"), r ? r.call(t) : e.get(t)), f = (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), m = (t, e, r, s) => (u(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r);
6
+ import "../link/link.js";
7
+ import { SkfElement as d } from "../../internal/components/skf-element.js";
8
+ import { stateMap as g } from "../../internal/helpers/stateMap.js";
9
+ import { watch as C } from "../../internal/helpers/watch.js";
10
+ import { componentStyles as b } from "../../styles/component.styles.js";
11
+ import { html as O } from "lit";
12
+ import { property as _, state as P } from "lit/decorators.js";
13
+ import { ifDefined as S } from "lit/directives/if-defined.js";
14
+ import { styles as w } from "./nav-item.styles.js";
15
+ var D = Object.defineProperty, j = Object.getOwnPropertyDescriptor, l = (t, e, r, s) => {
16
+ for (var o = s > 1 ? void 0 : s ? j(e, r) : e, a = t.length - 1, c; a >= 0; a--)
17
+ (c = t[a]) && (o = (s ? c(e, r, o) : c(o)) || o);
18
+ return s && o && D(e, r, o), o;
19
+ }, n, p;
20
+ const v = class v extends d {
14
21
  constructor() {
15
- super(...arguments), this.href = "#";
22
+ super(...arguments);
23
+ f(this, n);
24
+ f(this, p);
25
+ m(this, n, this.attachInternals()), m(this, p, h(this, n).states), this.href = "", this.vertical = !1;
16
26
  }
17
27
  connectedCallback() {
18
- super.connectedCallback(), this.role = "menuitem";
28
+ super.connectedCallback(), this.role = "listitem";
29
+ }
30
+ _handleStateChange() {
31
+ g(h(this, p), "vertical").set(this.vertical);
19
32
  }
20
33
  render() {
21
- return h`
22
- <skf-link color="inverse" href=${this.href} icon=${u(this.icon)}>
34
+ return O`
35
+ <skf-link color="inverse" href=${this.href} icon=${S(this.icon)}>
23
36
  <slot></slot>
24
37
  </skf-link>
25
38
  `;
26
39
  }
27
40
  };
28
- o.styles = [c, a];
29
- let e = o;
30
- p([
31
- f({ reflect: !0 })
32
- ], e.prototype, "href");
33
- p([
34
- f()
35
- ], e.prototype, "icon");
41
+ n = new WeakMap(), p = new WeakMap(), v.styles = [b, w];
42
+ let i = v;
43
+ l([
44
+ _({ type: String })
45
+ ], i.prototype, "href", 2);
46
+ l([
47
+ _({ type: String })
48
+ ], i.prototype, "icon", 2);
49
+ l([
50
+ P()
51
+ ], i.prototype, "vertical", 2);
52
+ l([
53
+ C("vertical")
54
+ ], i.prototype, "_handleStateChange", 1);
36
55
  export {
37
- e as SkfNavItem
56
+ i as SkfNavItem
38
57
  };
@@ -1,36 +1,40 @@
1
1
  import { css as t } from "lit";
2
2
  const s = t`
3
3
  @layer components {
4
- skf-link::part(root) {
5
- block-size: var(--skf-header-height);
6
- display: flex;
7
- padding-inline: var(--skf-spacing-100);
8
- position: relative;
9
- }
4
+ @layer base {
5
+ skf-link::part(root) {
6
+ block-size: var(--skf-header-height);
7
+ display: flex;
8
+ padding-inline: var(--skf-spacing-100);
9
+ position: relative;
10
+ }
10
11
 
11
- skf-link::part(root)::after {
12
- content: '';
13
- position: absolute;
14
- transition: translate calc(var(--skf-motion-duration-fast) * 1ms)
15
- var(--skf-motion-easing-ease-in);
16
- }
12
+ skf-link::part(root)::after {
13
+ content: '';
14
+ position: absolute;
15
+ transition: translate calc(var(--skf-motion-duration-fast) * 1ms)
16
+ var(--skf-motion-easing-ease-in);
17
+ }
17
18
 
18
- skf-link::part(root):hover::after {
19
- --_skf-nav-link-translate: 0;
20
- }
19
+ skf-link::part(root):hover::after {
20
+ --_skf-nav-link-translate: 0;
21
+ }
21
22
 
22
- :host-context(skf-nav:not([vertical])) skf-link::part(root)::after {
23
- border-bottom: var(--skf-size-4) solid var(--skf-border-color-inverse);
24
- inset-block-end: 0;
25
- inset-inline: 0;
26
- translate: 0 var(--_skf-nav-link-translate, 100%);
23
+ :host(:not(:state(vertical))) skf-link::part(root)::after {
24
+ border-bottom: var(--skf-size-4) solid var(--skf-border-color-inverse);
25
+ inset-block-end: 0;
26
+ inset-inline: 0;
27
+ translate: 0 var(--_skf-nav-link-translate, 100%);
28
+ }
27
29
  }
28
30
 
29
- :host-context(skf-nav[vertical]) skf-link::part(root)::after {
30
- border-left: var(--skf-size-4) solid var(--skf-border-color-inverse);
31
- inset-block: 0;
32
- inset-inline-start: 0;
33
- translate: var(--_skf-nav-link-translate, -100%) 0;
31
+ @layer mods {
32
+ :host(:state(vertical)) skf-link::part(root)::after {
33
+ border-left: var(--skf-size-4) solid var(--skf-border-color-inverse);
34
+ inset-block: 0;
35
+ inset-inline-start: 0;
36
+ translate: var(--_skf-nav-link-translate, -100%) 0;
37
+ }
34
38
  }
35
39
  }
36
40
  `;
@@ -10,8 +10,14 @@ import { type CSSResultGroup } from 'lit';
10
10
  * @tagname skf-nav
11
11
  */
12
12
  export declare class SkfNav extends SkfElement {
13
+ #private;
13
14
  static styles: CSSResultGroup;
15
+ /** If true, the navigation will be displayed vertically */
14
16
  vertical: boolean;
17
+ /** @internal */
18
+ private _items;
15
19
  connectedCallback(): void;
20
+ /** @internal */
21
+ _handleStateChange(): void;
16
22
  render(): import("lit").TemplateResult<1>;
17
23
  }
@@ -1,34 +1,55 @@
1
- import { SkfElement as s } from "../../internal/components/skf-element.js";
2
- import { componentStyles as m } from "../../styles/component.styles.js";
3
- import { html as p } from "lit";
4
- import { property as c } from "lit/decorators.js";
5
- import { ifDefined as f } from "lit/directives/if-defined.js";
6
- import { styles as u } from "./nav.styles.js";
7
- var v = Object.defineProperty, d = (i, a, l, h) => {
8
- for (var e = void 0, r = i.length - 1, n; r >= 0; r--)
9
- (n = i[r]) && (e = n(a, l, e) || e);
10
- return e && v(a, l, e), e;
1
+ var u = (t) => {
2
+ throw TypeError(t);
11
3
  };
12
- const o = class o extends s {
4
+ var y = (t, e, r) => e.has(t) || u("Cannot " + r);
5
+ var c = (t, e, r) => (y(t, e, "read from private field"), r ? r.call(t) : e.get(t)), m = (t, e, r) => e.has(t) ? u("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), h = (t, e, r, i) => (y(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 d } from "../../internal/helpers/stateMap.js";
8
+ import { watch as b } from "../../internal/helpers/watch.js";
9
+ import { componentStyles as g } from "../../styles/component.styles.js";
10
+ import { html as C } from "lit";
11
+ import { property as O, queryAssignedElements as P } from "lit/decorators.js";
12
+ import { ifDefined as w } from "lit/directives/if-defined.js";
13
+ import { styles as D } from "./nav.styles.js";
14
+ var E = Object.defineProperty, j = Object.getOwnPropertyDescriptor, f = (t, e, r, i) => {
15
+ for (var s = i > 1 ? void 0 : i ? j(e, r) : e, n = t.length - 1, p; n >= 0; n--)
16
+ (p = t[n]) && (s = (i ? p(e, r, s) : p(s)) || s);
17
+ return i && s && E(e, r, s), s;
18
+ }, o, l;
19
+ const v = class v extends _ {
13
20
  constructor() {
14
- super(...arguments), this.vertical = !1;
21
+ super(...arguments);
22
+ m(this, o);
23
+ m(this, l);
24
+ h(this, o, this.attachInternals()), h(this, l, c(this, o).states), this.vertical = !1;
15
25
  }
16
26
  connectedCallback() {
17
- super.connectedCallback(), this.ariaLabel = this.ariaLabel ?? "Main navigation", this.role = "nav";
27
+ super.connectedCallback(), this.ariaLabel = this.ariaLabel ?? "Main navigation", this.role = "navigation";
28
+ }
29
+ _handleStateChange() {
30
+ d(c(this, l), "vertical").set(this.vertical), this._items.forEach((r) => {
31
+ r.vertical = this.vertical;
32
+ });
18
33
  }
19
34
  render() {
20
- return p`
21
- <ul aria-orientation=${f(this.vertical ? "vertical" : void 0)} role="menubar">
35
+ return C`
36
+ <ul aria-orientation=${w(this.vertical ? "vertical" : void 0)}>
22
37
  <slot></slot>
23
38
  </ul>
24
39
  `;
25
40
  }
26
41
  };
27
- o.styles = [m, u];
28
- let t = o;
29
- d([
30
- c({ type: Boolean, reflect: !0 })
31
- ], t.prototype, "vertical");
42
+ o = new WeakMap(), l = new WeakMap(), v.styles = [g, D];
43
+ let a = v;
44
+ f([
45
+ O({ type: Boolean })
46
+ ], a.prototype, "vertical", 2);
47
+ f([
48
+ P({ selector: "skf-nav-item" })
49
+ ], a.prototype, "_items", 2);
50
+ f([
51
+ b("vertical")
52
+ ], a.prototype, "_handleStateChange", 1);
32
53
  export {
33
- t as SkfNav
54
+ a as SkfNav
34
55
  };
@@ -1,17 +1,23 @@
1
1
  import { css as t } from "lit";
2
- const e = t`
3
- :host(:not([vertical])) {
4
- width: fit-content;
5
- }
2
+ const o = t`
3
+ @layer components {
4
+ @layer base {
5
+ :host(:not(:state(vertical))) {
6
+ width: fit-content;
7
+ }
6
8
 
7
- ul {
8
- display: flex;
9
+ ul {
10
+ display: flex;
11
+ }
12
+ }
9
13
 
10
- :host([vertical]) & {
11
- flex-direction: column;
14
+ @layer mods {
15
+ :host(:state(vertical)) ul {
16
+ flex-direction: column;
17
+ }
12
18
  }
13
19
  }
14
20
  `;
15
21
  export {
16
- e as styles
22
+ o as styles
17
23
  };
@@ -28,5 +28,9 @@ export declare class SkfPopover extends SkfPopoverBase {
28
28
  /** @internal */
29
29
  hideArrowChanged(): void;
30
30
  /** @internal */
31
+ openExtended(): void;
32
+ /** @internal */
31
33
  addEventListeners($element: HTMLElement | Element): void;
34
+ /** @internal */
35
+ _checkClickOutside: (e: Event) => void;
32
36
  }
@@ -1,35 +1,43 @@
1
- import { SkfPopoverBase as h } from "../../internal/base-classes/popover/popover.base.js";
2
- import { watch as f } from "../../internal/helpers/watch.js";
3
- import { property as d } from "lit/decorators.js";
1
+ import { SkfPopoverBase as p } from "../../internal/base-classes/popover/popover.base.js";
2
+ import { watch as l } from "../../internal/helpers/watch.js";
3
+ import { property as c } from "lit/decorators.js";
4
4
  import { styles as w } from "./popover.styles.js";
5
- var c = Object.defineProperty, m = Object.getOwnPropertyDescriptor, a = (l, r, o, s) => {
6
- for (var t = s > 1 ? void 0 : s ? m(r, o) : r, i = l.length - 1, p; i >= 0; i--)
7
- (p = l[i]) && (t = (s ? p(r, o, t) : p(t)) || t);
8
- return s && t && c(r, o, t), t;
5
+ var f = Object.defineProperty, v = Object.getOwnPropertyDescriptor, n = (d, t, r, s) => {
6
+ for (var e = s > 1 ? void 0 : s ? v(t, r) : t, o = d.length - 1, h; o >= 0; o--)
7
+ (h = d[o]) && (e = (s ? h(t, r, e) : h(e)) || e);
8
+ return s && e && f(t, r, e), e;
9
9
  };
10
- const n = class n extends h {
10
+ const a = class a extends p {
11
11
  constructor() {
12
- super(), this.offset = 8, this.hideArrow = !1, this.arrow = !this.hideArrow, this.placement = "bottom-start", this.triggerEvent = "click", this.variant = "popup", h.classMap = { popover: !0 };
12
+ super(), this.offset = 8, this.hideArrow = !1, this._checkClickOutside = (t) => {
13
+ this.isOpen && !this.contains(t.target) && this.close();
14
+ }, this.arrow = !this.hideArrow, this.placement = "bottom-start", this.triggerEvent = "click", this.variant = "popup", p.classMap = { popover: !0 };
13
15
  }
14
16
  hideArrowChanged() {
15
17
  this.arrow = !this.hideArrow;
16
18
  }
17
19
  /** @internal */
18
- addEventListeners(r) {
19
- r.addEventListener(this.triggerEvent, this.open.bind(this), { signal: this.signal });
20
+ openExtended() {
21
+ window.top && window.self !== window.top && window.top.addEventListener("click", this._checkClickOutside, {
22
+ signal: this.signal
23
+ });
24
+ }
25
+ /** @internal */
26
+ addEventListeners(t) {
27
+ t.addEventListener(this.triggerEvent, this.open.bind(this), { signal: this.signal });
20
28
  }
21
29
  };
22
- n.styles = [h.styles, w];
23
- let e = n;
24
- a([
25
- d({ type: Number })
26
- ], e.prototype, "offset", 2);
27
- a([
28
- d({ type: Boolean })
29
- ], e.prototype, "hideArrow", 2);
30
- a([
31
- f("hideArrow")
32
- ], e.prototype, "hideArrowChanged", 1);
30
+ a.styles = [p.styles, w];
31
+ let i = a;
32
+ n([
33
+ c({ type: Number })
34
+ ], i.prototype, "offset", 2);
35
+ n([
36
+ c({ type: Boolean })
37
+ ], i.prototype, "hideArrow", 2);
38
+ n([
39
+ l("hideArrow")
40
+ ], i.prototype, "hideArrowChanged", 1);
33
41
  export {
34
- e as SkfPopover
42
+ i as SkfPopover
35
43
  };
@@ -18,5 +18,7 @@ export declare class SkfProgress extends SkfElement {
18
18
  /** Specifies how much of the task that has been completed */
19
19
  value: number;
20
20
  connectedCallback(): void;
21
+ /** @internal */
22
+ _handleStateChange(): void;
21
23
  render(): import("lit").TemplateResult<1>;
22
24
  }
@@ -1,43 +1,52 @@
1
- var u = (t) => {
1
+ var v = (t) => {
2
2
  throw TypeError(t);
3
3
  };
4
- var d = (t, e, r) => e.has(t) || u("Cannot " + r);
5
- var h = (t, e, r) => (d(t, e, "read from private field"), r ? r.call(t) : e.get(t)), f = (t, e, r) => e.has(t) ? u("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), v = (t, e, r, l) => (d(t, e, "write to private field"), l ? l.call(t, r) : e.set(t, r), r);
6
- import { SkfElement as y } from "../../internal/components/skf-element.js";
7
- import { componentStyles as b } from "../../styles/component.styles.js";
8
- import { html as x } from "lit";
9
- import { property as n } from "lit/decorators.js";
10
- import { styles as C } from "./progress.styles.js";
11
- var _ = Object.defineProperty, m = (t, e, r, l) => {
12
- for (var s = void 0, p = t.length - 1, c; p >= 0; p--)
13
- (c = t[p]) && (s = c(e, r, s) || s);
14
- return s && _(e, r, s), s;
15
- }, a;
16
- const i = class i extends y {
4
+ var y = (t, e, r) => e.has(t) || v("Cannot " + r);
5
+ var c = (t, e, r) => (y(t, e, "read from private field"), r ? r.call(t) : e.get(t)), u = (t, e, r) => e.has(t) ? v("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), d = (t, e, r, a) => (y(t, e, "write to private field"), a ? a.call(t, r) : e.set(t, r), r);
6
+ import { SkfElement as b } from "../../internal/components/skf-element.js";
7
+ import { stateMap as _ } from "../../internal/helpers/stateMap.js";
8
+ import { watch as x } from "../../internal/helpers/watch.js";
9
+ import { componentStyles as C } from "../../styles/component.styles.js";
10
+ import { html as O } from "lit";
11
+ import { property as f } from "lit/decorators.js";
12
+ import { styles as g } from "./progress.styles.js";
13
+ var w = Object.defineProperty, j = Object.getOwnPropertyDescriptor, n = (t, e, r, a) => {
14
+ for (var s = a > 1 ? void 0 : a ? j(e, r) : e, l = t.length - 1, h; l >= 0; l--)
15
+ (h = t[l]) && (s = (a ? h(e, r, s) : h(s)) || s);
16
+ return a && s && w(e, r, s), s;
17
+ }, i, p;
18
+ const m = class m extends b {
17
19
  constructor() {
18
20
  super(...arguments);
19
- f(this, a);
20
- v(this, a, this.attachInternals()), this.animated = !1, this.max = 1, this.value = 0;
21
+ u(this, i);
22
+ u(this, p);
23
+ d(this, i, this.attachInternals()), d(this, p, c(this, i).states), this.animated = !1, this.max = 1, this.value = 0;
21
24
  }
22
25
  connectedCallback() {
23
- super.connectedCallback(), h(this, a).role = "progressbar";
26
+ super.connectedCallback(), this.role = "progressbar";
27
+ }
28
+ _handleStateChange() {
29
+ _(c(this, p), "animated").set(this.animated);
24
30
  }
25
31
  render() {
26
32
  const r = this.value / this.max * 100;
27
- return x`<div id="root" style="--_skf-progress-value: ${r}%"></div>`;
33
+ return O`<div id="root" style="--_skf-progress-value: ${r}%"></div>`;
28
34
  }
29
35
  };
30
- a = new WeakMap(), i.styles = [b, C], i.formAssociated = !0;
31
- let o = i;
32
- m([
33
- n({ type: Boolean, reflect: !0 })
34
- ], o.prototype, "animated");
35
- m([
36
- n({ type: Number })
37
- ], o.prototype, "max");
38
- m([
39
- n({ type: Number })
40
- ], o.prototype, "value");
36
+ i = new WeakMap(), p = new WeakMap(), m.styles = [C, g], m.formAssociated = !0;
37
+ let o = m;
38
+ n([
39
+ f({ type: Boolean })
40
+ ], o.prototype, "animated", 2);
41
+ n([
42
+ f({ type: Number })
43
+ ], o.prototype, "max", 2);
44
+ n([
45
+ f({ type: Number })
46
+ ], o.prototype, "value", 2);
47
+ n([
48
+ x("animated")
49
+ ], o.prototype, "_handleStateChange", 1);
41
50
  export {
42
51
  o as SkfProgress
43
52
  };