@skf-design-system/ui-components 1.0.2-beta.5 → 1.0.2-beta.7

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 (124) hide show
  1. package/README.md +18 -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/alert/alert.component.d.ts +3 -2
  5. package/dist/components/alert/alert.component.js +39 -33
  6. package/dist/components/button/button.styles.js +3 -3
  7. package/dist/components/checkbox/checkbox.component.d.ts +4 -2
  8. package/dist/components/checkbox/checkbox.component.js +73 -65
  9. package/dist/components/checkbox/checkbox.styles.js +1 -1
  10. package/dist/components/datepicker/datepicker-calendar.component.d.ts +4 -0
  11. package/dist/components/datepicker/datepicker-calendar.component.js +134 -127
  12. package/dist/components/datepicker/datepicker-popup.component.d.ts +4 -0
  13. package/dist/components/datepicker/datepicker-popup.component.js +100 -88
  14. package/dist/components/datepicker/datepicker.component.d.ts +4 -2
  15. package/dist/components/datepicker/datepicker.component.js +151 -140
  16. package/dist/components/dialog/dialog.component.d.ts +3 -2
  17. package/dist/components/dialog/dialog.component.js +39 -37
  18. package/dist/components/divider/divider.component.d.ts +3 -0
  19. package/dist/components/divider/divider.component.js +43 -22
  20. package/dist/components/divider/divider.styles.js +9 -9
  21. package/dist/components/drawer/drawer.component.d.ts +11 -4
  22. package/dist/components/drawer/drawer.component.js +77 -55
  23. package/dist/components/drawer/drawer.styles.js +47 -40
  24. package/dist/components/header/header.component.d.ts +4 -2
  25. package/dist/components/header/header.component.js +66 -57
  26. package/dist/components/header/header.styles.js +2 -2
  27. package/dist/components/icon/icon.component.js +7 -7
  28. package/dist/components/icon/icon.styles.js +2 -2
  29. package/dist/components/input/input.component.d.ts +4 -8
  30. package/dist/components/input/input.component.js +147 -147
  31. package/dist/components/input/input.controllers.d.ts +0 -1
  32. package/dist/components/input/input.controllers.js +12 -12
  33. package/dist/components/link/link.component.d.ts +15 -18
  34. package/dist/components/link/link.component.js +105 -107
  35. package/dist/components/link/link.styles.js +53 -45
  36. package/dist/components/loader/loader.component.d.ts +5 -3
  37. package/dist/components/loader/loader.component.js +39 -28
  38. package/dist/components/loader/loader.styles.js +6 -10
  39. package/dist/components/menu/menu-item.component.d.ts +1 -1
  40. package/dist/components/menu/menu-item.component.js +8 -8
  41. package/dist/components/menu/menu-item.styles.js +13 -9
  42. package/dist/components/menu/menu.component.d.ts +5 -2
  43. package/dist/components/menu/menu.component.js +8 -8
  44. package/dist/components/nav/nav-item.component.d.ts +4 -0
  45. package/dist/components/nav/nav-item.component.js +44 -25
  46. package/dist/components/nav/nav-item.styles.js +29 -25
  47. package/dist/components/nav/nav.component.d.ts +9 -0
  48. package/dist/components/nav/nav.component.js +47 -21
  49. package/dist/components/nav/nav.styles.js +15 -9
  50. package/dist/components/popover/popover.component.d.ts +10 -3
  51. package/dist/components/popover/popover.component.js +30 -22
  52. package/dist/components/progress/progress.component.d.ts +2 -0
  53. package/dist/components/progress/progress.component.js +38 -29
  54. package/dist/components/progress/progress.styles.js +4 -4
  55. package/dist/components/radio/radio.component.d.ts +4 -2
  56. package/dist/components/radio/radio.component.js +91 -83
  57. package/dist/components/radio/radio.styles.js +1 -1
  58. package/dist/components/segmented-button/segmented-button-item.component.js +1 -1
  59. package/dist/components/segmented-button/segmented-button-item.styles.js +1 -1
  60. package/dist/components/select/select-option-group.component.d.ts +4 -0
  61. package/dist/components/select/select-option-group.component.js +37 -18
  62. package/dist/components/select/select-option-group.style.js +12 -6
  63. package/dist/components/select/select-option.component.d.ts +7 -2
  64. package/dist/components/select/select-option.component.js +70 -53
  65. package/dist/components/select/select-option.styles.js +43 -31
  66. package/dist/components/select/select.component.d.ts +18 -10
  67. package/dist/components/select/select.component.js +175 -132
  68. package/dist/components/select/select.controllers.js +2 -1
  69. package/dist/components/select/select.styles.js +8 -2
  70. package/dist/components/stepper/stepper-item.component.d.ts +1 -1
  71. package/dist/components/stepper/stepper-item.component.js +26 -23
  72. package/dist/components/stepper/stepper-item.styles.js +4 -4
  73. package/dist/components/switch/switch.component.d.ts +4 -2
  74. package/dist/components/switch/switch.component.js +64 -56
  75. package/dist/components/switch/switch.styles.js +1 -1
  76. package/dist/components/tabs/tab-panel.component.d.ts +1 -1
  77. package/dist/components/tabs/tab-panel.component.js +19 -16
  78. package/dist/components/tabs/tab.component.d.ts +1 -1
  79. package/dist/components/tabs/tab.component.js +17 -14
  80. package/dist/components/tabs/tab.styles.js +2 -2
  81. package/dist/components/tag/tag.component.d.ts +3 -0
  82. package/dist/components/tag/tag.component.js +50 -41
  83. package/dist/components/textarea/textarea.component.d.ts +4 -2
  84. package/dist/components/textarea/textarea.component.js +127 -118
  85. package/dist/components/toast/toast-item.styles.js +13 -10
  86. package/dist/components/toast/toast.component.js +9 -9
  87. package/dist/components/toast/toast.singleton.d.ts +1 -1
  88. package/dist/components/toast/toast.singleton.js +18 -18
  89. package/dist/components/tooltip/tooltip.component.d.ts +9 -2
  90. package/dist/components/tooltip/tooltip.component.js +13 -7
  91. package/dist/custom-elements.json +1305 -946
  92. package/dist/index.d.ts +2 -2
  93. package/dist/index.js +20 -20
  94. package/dist/internal/base-classes/popover/popover.base.d.ts +24 -5
  95. package/dist/internal/base-classes/popover/popover.base.js +28 -29
  96. package/dist/internal/base-classes/popover/popover.styles.js +4 -5
  97. package/dist/internal/components/hint/hint.component.d.ts +4 -0
  98. package/dist/internal/components/hint/hint.component.js +47 -20
  99. package/dist/internal/components/hint/hint.styles.js +29 -25
  100. package/dist/internal/controllers/popover.controller.d.ts +2 -0
  101. package/dist/internal/helpers/uuid.d.ts +8 -10
  102. package/dist/internal/helpers/uuid.js +4 -11
  103. package/dist/internal/helpers/watch.d.ts +1 -1
  104. package/dist/internal/templates/asterisk.d.ts +1 -1
  105. package/dist/internal/templates/asterisk.js +4 -4
  106. package/dist/internal/types.d.ts +4 -0
  107. package/dist/styles/global-alt.css +1 -1
  108. package/dist/styles/global.css +1 -1
  109. package/dist/translations/en.d.ts +3 -0
  110. package/dist/translations/en.js +27 -0
  111. package/dist/translations/es.d.ts +3 -0
  112. package/dist/translations/es.js +27 -0
  113. package/dist/translations/index.d.ts +4 -0
  114. package/dist/translations/pt.d.ts +3 -0
  115. package/dist/translations/pt.js +27 -0
  116. package/dist/translations/sv.d.ts +3 -0
  117. package/dist/translations/sv.js +27 -0
  118. package/dist/types/jsx/custom-element-jsx.d.ts +243 -128
  119. package/dist/types/vue/index.d.ts +136 -127
  120. package/dist/utilities/localize.d.ts +28 -0
  121. package/dist/utilities/localize.js +13 -0
  122. package/dist/vscode.html-custom-data.json +168 -177
  123. package/dist/web-types.json +411 -381
  124. package/package.json +34 -41
@@ -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
  `;
@@ -1,4 +1,5 @@
1
1
  import { SkfElement } from '../../internal/components/skf-element';
2
+ import { type Language } from '../../utilities/localize.js';
2
3
  import { type CSSResultGroup } from 'lit';
3
4
  /**
4
5
  * The `<skf-nav>` is a component that displays a list of <nav-items>.
@@ -10,8 +11,16 @@ import { type CSSResultGroup } from 'lit';
10
11
  * @tagname skf-nav
11
12
  */
12
13
  export declare class SkfNav extends SkfElement {
14
+ #private;
13
15
  static styles: CSSResultGroup;
16
+ /** Sets the internal language of the component */
17
+ lang: Language;
18
+ /** If true, the navigation will be displayed vertically */
14
19
  vertical: boolean;
20
+ /** @internal */
21
+ private _items;
15
22
  connectedCallback(): void;
23
+ /** @internal */
24
+ _handleStateChange(): void;
16
25
  render(): import("lit").TemplateResult<1>;
17
26
  }
@@ -1,34 +1,60 @@
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 g = (t, e, r) => e.has(t) || u("Cannot " + r);
5
+ var p = (t, e, r) => (g(t, e, "read from private field"), r ? r.call(t) : e.get(t)), c = (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), m = (t, e, r, i) => (g(t, e, "write to private field"), i ? i.call(t, r) : e.set(t, r), r);
6
+ import { SkfElement as d } from "../../internal/components/skf-element.js";
7
+ import { stateMap as C } from "../../internal/helpers/stateMap.js";
8
+ import { watch as b } from "../../internal/helpers/watch.js";
9
+ import { componentStyles as w } from "../../styles/component.styles.js";
10
+ import { LocalizeController as O } from "../../utilities/localize.js";
11
+ import { html as P } from "lit";
12
+ import { property as _, queryAssignedElements as D } from "lit/decorators.js";
13
+ import { ifDefined as E } from "lit/directives/if-defined.js";
14
+ import { styles as S } from "./nav.styles.js";
15
+ var j = Object.defineProperty, x = Object.getOwnPropertyDescriptor, h = (t, e, r, i) => {
16
+ for (var o = i > 1 ? void 0 : i ? x(e, r) : e, f = t.length - 1, v; f >= 0; f--)
17
+ (v = t[f]) && (o = (i ? v(e, r, o) : v(o)) || o);
18
+ return i && o && j(e, r, o), o;
19
+ }, a, l, n;
20
+ const y = class y extends d {
13
21
  constructor() {
14
- super(...arguments), this.vertical = !1;
22
+ super(...arguments);
23
+ c(this, a);
24
+ c(this, l);
25
+ c(this, n);
26
+ m(this, a, new O(this)), m(this, l, this.attachInternals()), m(this, n, p(this, l).states), this.lang = "en", this.vertical = !1;
15
27
  }
16
28
  connectedCallback() {
17
- super.connectedCallback(), this.ariaLabel = this.ariaLabel ?? "Main navigation", this.role = "nav";
29
+ super.connectedCallback(), this.ariaLabel = p(this, a).term("mainNavigation"), this.role = "navigation";
30
+ }
31
+ _handleStateChange() {
32
+ C(p(this, n), "vertical").set(this.vertical), this._items.forEach((r) => {
33
+ r.vertical = this.vertical;
34
+ });
18
35
  }
19
36
  render() {
20
- return p`
21
- <ul aria-orientation=${f(this.vertical ? "vertical" : void 0)} role="menubar">
37
+ return P`
38
+ <ul aria-orientation=${E(this.vertical ? "vertical" : void 0)}>
22
39
  <slot></slot>
23
40
  </ul>
24
41
  `;
25
42
  }
26
43
  };
27
- o.styles = [m, u];
28
- let t = o;
29
- d([
30
- c({ type: Boolean, reflect: !0 })
31
- ], t.prototype, "vertical");
44
+ a = new WeakMap(), l = new WeakMap(), n = new WeakMap(), y.styles = [w, S];
45
+ let s = y;
46
+ h([
47
+ _({ type: String })
48
+ ], s.prototype, "lang", 2);
49
+ h([
50
+ _({ type: Boolean })
51
+ ], s.prototype, "vertical", 2);
52
+ h([
53
+ D({ selector: "skf-nav-item" })
54
+ ], s.prototype, "_items", 2);
55
+ h([
56
+ b("vertical")
57
+ ], s.prototype, "_handleStateChange", 1);
32
58
  export {
33
- t as SkfNav
59
+ s as SkfNav
34
60
  };
@@ -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
  };
@@ -9,10 +9,13 @@ import type { CSSResultGroup } from 'lit';
9
9
  * See [zeroheight](https://zeroheight.com/853e936c9/p/983e5d-popover) for design principles
10
10
  *
11
11
  * @attribute {"top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end"} [placement='bottom-start'] - The placement of the popover
12
- * @attribute {string} anchor - The id of the element the menu will be anchored to
12
+ * @attribute {string} anchor - The id of the element the popover will be anchored to
13
13
  *
14
- * @event {CustomEvent} skf-opened - Fired when the menu is opened
15
- * @event {CustomEvent} skf-closed - Fired when the menu is closed
14
+ * @property {(void) => void} open() - Method that opens the popover
15
+ * @property {(void) => void} close() - Method that closes the popover
16
+ *
17
+ * @event {CustomEvent} skf-opened - Fired when the popover is opened
18
+ * @event {CustomEvent} skf-closed - Fired when the popover is closed
16
19
  *
17
20
  * @slot - The popover content
18
21
  *
@@ -28,5 +31,9 @@ export declare class SkfPopover extends SkfPopoverBase {
28
31
  /** @internal */
29
32
  hideArrowChanged(): void;
30
33
  /** @internal */
34
+ openExtended(): void;
35
+ /** @internal */
31
36
  addEventListeners($element: HTMLElement | Element): void;
37
+ /** @internal */
38
+ _checkClickOutside: (e: Event) => void;
32
39
  }
@@ -1,35 +1,43 @@
1
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";
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, i, s) => {
6
+ for (var e = s > 1 ? void 0 : s ? v(t, i) : t, o = d.length - 1, p; o >= 0; o--)
7
+ (p = d[o]) && (e = (s ? p(t, i, e) : p(e)) || e);
8
+ return s && e && f(t, i, e), e;
9
9
  };
10
- const n = class n extends h {
10
+ const a = class a extends h {
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", h.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, { 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 = [h.styles, w];
31
+ let r = a;
32
+ n([
33
+ c({ type: Number })
34
+ ], r.prototype, "offset", 2);
35
+ n([
36
+ c({ type: Boolean })
37
+ ], r.prototype, "hideArrow", 2);
38
+ n([
39
+ l("hideArrow")
40
+ ], r.prototype, "hideArrowChanged", 1);
33
41
  export {
34
- e as SkfPopover
42
+ r 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
  };
@@ -1,5 +1,5 @@
1
1
  import { css as r } from "lit";
2
- const o = r`
2
+ const a = r`
3
3
  @layer components {
4
4
  @layer base {
5
5
  #root {
@@ -11,7 +11,7 @@ const o = r`
11
11
  overflow: hidden;
12
12
 
13
13
  &::after {
14
- background-color: var(--skf-bg-color-emphasised);
14
+ background-color: var(--skf-bg-color-emphasized);
15
15
  block-size: inherit;
16
16
  border-radius: inherit;
17
17
  content: '';
@@ -24,7 +24,7 @@ const o = r`
24
24
  }
25
25
 
26
26
  @layer mods {
27
- :host([animated]) {
27
+ :host(:state(animated)) {
28
28
  #root::after {
29
29
  animation: skf-progress-animation calc(var(--skf-motion-duration-slow) * 1ms) linear
30
30
  infinite reverse;
@@ -51,5 +51,5 @@ const o = r`
51
51
  }
52
52
  `;
53
53
  export {
54
- o as styles
54
+ a as styles
55
55
  };
@@ -2,6 +2,7 @@ import '../icon/icon.js';
2
2
  import { FormBase } from '../../internal/components/formBase.js';
3
3
  import type { FormFieldSeverity } from '../../internal/types.js';
4
4
  import type { FormFieldBaseProps } from '../../internal/types/formField.js';
5
+ import { type Language } from '../../utilities/localize.js';
5
6
  import { type CSSResultGroup } from 'lit';
6
7
  /**
7
8
  * The `<skf-radio>` component is used to create a radio input
@@ -18,6 +19,7 @@ import { type CSSResultGroup } from 'lit';
18
19
  * @tagname skf-radio
19
20
  */
20
21
  export declare class SkfRadio extends FormBase implements FormFieldBaseProps {
22
+ #private;
21
23
  static styles: CSSResultGroup;
22
24
  /**
23
25
  * @internal
@@ -32,10 +34,10 @@ export declare class SkfRadio extends FormBase implements FormFieldBaseProps {
32
34
  customInvalid: boolean;
33
35
  /** If defined, sets the input's label unless the default slot is used. Alternatively, you can use the `label` attribute. */
34
36
  label?: string;
37
+ /** Sets the internal language of the component */
38
+ lang: Language;
35
39
  /** If defined, adds name to the input-element */
36
40
  name?: string;
37
- /** If defined, renders an alternative A11y text for the asterisk */
38
- requiredLabel?: string;
39
41
  /** Size of the Radio */
40
42
  size: 'sm' | 'md';
41
43
  /** If defined, displays provided severity state */