@skf-design-system/ui-components 1.0.0-beta.4 → 1.0.0-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 (159) hide show
  1. package/README.md +26 -6
  2. package/dist/components/accordion/accordion-item.d.ts +1 -1
  3. package/dist/components/accordion/accordion.component.d.ts +13 -9
  4. package/dist/components/accordion/accordion.component.js +34 -30
  5. package/dist/components/accordion/accordion.d.ts +1 -1
  6. package/dist/components/accordion/accordion.styles.d.ts +1 -2
  7. package/dist/components/accordion/accordion.styles.js +5 -4
  8. package/dist/components/alert/alert.component.d.ts +10 -7
  9. package/dist/components/alert/alert.component.js +50 -37
  10. package/dist/components/alert/alert.styles.d.ts +1 -2
  11. package/dist/components/alert/alert.styles.js +42 -34
  12. package/dist/components/button/button.component.d.ts +28 -4
  13. package/dist/components/button/button.component.js +80 -56
  14. package/dist/components/button/button.styles.js +2 -1
  15. package/dist/components/card/card.component.d.ts +1 -1
  16. package/dist/components/card/card.component.js +29 -21
  17. package/dist/components/card/card.styles.d.ts +1 -2
  18. package/dist/components/card/card.styles.js +22 -12
  19. package/dist/components/checkbox/checkbox.component.d.ts +20 -18
  20. package/dist/components/checkbox/checkbox.component.js +95 -89
  21. package/dist/components/checkbox/checkbox.styles.js +7 -2
  22. package/dist/components/checkbox/checkbox.test.d.ts +1 -0
  23. package/dist/components/collapse/collapse.component.d.ts +8 -5
  24. package/dist/components/collapse/collapse.component.js +50 -39
  25. package/dist/components/collapse/collapse.styles.js +13 -12
  26. package/dist/components/collapse/collapse.test.d.ts +1 -0
  27. package/dist/components/dialog/dialog.component.d.ts +75 -0
  28. package/dist/components/dialog/dialog.component.js +189 -0
  29. package/dist/components/dialog/dialog.d.ts +8 -0
  30. package/dist/components/dialog/dialog.js +6 -0
  31. package/dist/components/dialog/dialog.styles.d.ts +1 -0
  32. package/dist/components/dialog/dialog.styles.js +91 -0
  33. package/dist/components/divider/divider.component.d.ts +14 -11
  34. package/dist/components/divider/divider.component.js +46 -29
  35. package/dist/components/divider/divider.styles.d.ts +1 -2
  36. package/dist/components/divider/divider.styles.js +26 -30
  37. package/dist/components/heading/heading.component.d.ts +14 -4
  38. package/dist/components/heading/heading.component.js +14 -14
  39. package/dist/components/heading/heading.styles.js +1 -1
  40. package/dist/components/icon/icon.component.d.ts +15 -9
  41. package/dist/components/icon/icon.component.js +6 -6
  42. package/dist/components/icon/icon.styles.js +56 -54
  43. package/dist/components/input/input.component.d.ts +48 -33
  44. package/dist/components/input/input.component.js +108 -99
  45. package/dist/components/link/link.component.d.ts +20 -17
  46. package/dist/components/link/link.component.js +20 -14
  47. package/dist/components/link/link.styles.js +36 -40
  48. package/dist/components/loader/loader.component.d.ts +7 -7
  49. package/dist/components/loader/loader.component.js +42 -61
  50. package/dist/components/loader/loader.styles.js +44 -11
  51. package/dist/components/logo/logo.component.d.ts +7 -5
  52. package/dist/components/logo/logo.component.js +25 -14
  53. package/dist/components/logo/logo.styles.d.ts +1 -2
  54. package/dist/components/logo/logo.styles.js +12 -10
  55. package/dist/components/progress/progress.component.d.ts +22 -0
  56. package/dist/components/progress/progress.component.js +49 -0
  57. package/dist/components/progress/progress.d.ts +8 -0
  58. package/dist/components/progress/progress.js +6 -0
  59. package/dist/components/progress/progress.styles.d.ts +1 -0
  60. package/dist/components/progress/progress.styles.js +48 -0
  61. package/dist/components/radio/radio.component.d.ts +21 -21
  62. package/dist/components/radio/radio.component.js +94 -78
  63. package/dist/components/radio/radio.styles.js +6 -1
  64. package/dist/components/select/select.component.d.ts +14 -12
  65. package/dist/components/select/select.component.js +119 -103
  66. package/dist/components/select/select.controllers.d.ts +1 -1
  67. package/dist/components/select/select.controllers.js +5 -2
  68. package/dist/components/select/select.styles.js +18 -3
  69. package/dist/components/select-option/select-option.component.d.ts +3 -3
  70. package/dist/components/select-option/select-option.component.js +16 -10
  71. package/dist/components/select-option/select-option.controllers.d.ts +1 -1
  72. package/dist/components/select-option-group/select-option-group.component.d.ts +1 -1
  73. package/dist/components/switch/switch.component.d.ts +4 -5
  74. package/dist/components/switch/switch.component.js +17 -7
  75. package/dist/components/switch/switch.styles.js +19 -11
  76. package/dist/components/switch/switch.test.d.ts +1 -0
  77. package/dist/components/tab/tab.component.d.ts +29 -0
  78. package/dist/components/tab/tab.component.js +57 -0
  79. package/dist/components/tab/tab.d.ts +8 -0
  80. package/dist/components/tab/tab.js +6 -0
  81. package/dist/components/tab/tab.styles.d.ts +1 -0
  82. package/dist/components/tab/tab.styles.js +123 -0
  83. package/dist/components/tab-group/tab-group.component.d.ts +43 -0
  84. package/dist/components/tab-group/tab-group.component.js +98 -0
  85. package/dist/components/tab-group/tab-group.d.ts +8 -0
  86. package/dist/components/tab-group/tab-group.js +6 -0
  87. package/dist/components/tab-group/tab-group.styles.d.ts +1 -0
  88. package/dist/components/tab-group/tab-group.styles.js +75 -0
  89. package/dist/components/tab-panel/tab-panel.component.d.ts +19 -0
  90. package/dist/components/tab-panel/tab-panel.component.js +36 -0
  91. package/dist/components/tab-panel/tab-panel.d.ts +8 -0
  92. package/dist/components/tab-panel/tab-panel.js +6 -0
  93. package/dist/components/tab-panel/tab-panel.styles.d.ts +1 -0
  94. package/dist/components/tab-panel/tab-panel.styles.js +13 -0
  95. package/dist/components/tag/tag.component.d.ts +14 -9
  96. package/dist/components/tag/tag.component.js +63 -47
  97. package/dist/components/tag/tag.styles.js +35 -28
  98. package/dist/components/textarea/textarea.component.d.ts +30 -27
  99. package/dist/components/textarea/textarea.component.js +20 -17
  100. package/dist/components/toast/toast.component.d.ts +35 -0
  101. package/dist/components/toast/toast.component.js +52 -0
  102. package/dist/components/toast/toast.d.ts +8 -0
  103. package/dist/components/toast/toast.js +6 -0
  104. package/dist/components/toast/toast.singleton.d.ts +26 -0
  105. package/dist/components/toast/toast.singleton.js +53 -0
  106. package/dist/components/toast/toast.styles.d.ts +1 -0
  107. package/dist/components/toast/toast.styles.js +9 -0
  108. package/dist/components/toast-item/toast-item.component.d.ts +21 -0
  109. package/dist/components/toast-item/toast-item.component.js +65 -0
  110. package/dist/components/toast-item/toast-item.d.ts +6 -0
  111. package/dist/components/toast-item/toast-item.js +2 -0
  112. package/dist/components/toast-item/toast-item.styles.d.ts +2 -0
  113. package/dist/components/toast-item/toast-item.styles.js +16 -0
  114. package/dist/components/toast-wrapper/toast-wrapper.component.d.ts +24 -0
  115. package/dist/components/toast-wrapper/toast-wrapper.component.js +37 -0
  116. package/dist/components/toast-wrapper/toast-wrapper.d.ts +8 -0
  117. package/dist/components/toast-wrapper/toast-wrapper.js +6 -0
  118. package/dist/components/toast-wrapper/toast-wrapper.styles.d.ts +1 -0
  119. package/dist/components/toast-wrapper/toast-wrapper.styles.js +20 -0
  120. package/dist/custom-elements.json +3090 -1993
  121. package/dist/index.d.ts +6 -0
  122. package/dist/index.js +60 -42
  123. package/dist/internal/components/formBase.d.ts +1 -0
  124. package/dist/internal/components/formBase.js +11 -11
  125. package/dist/internal/components/hint/hint.component.d.ts +2 -2
  126. package/dist/internal/components/hint/hint.component.js +12 -10
  127. package/dist/internal/components/hint/hint.styles.js +26 -10
  128. package/dist/internal/components/skf-element.js +26 -25
  129. package/dist/internal/helpers/hintSeverity.d.ts +1 -1
  130. package/dist/internal/helpers/watch.d.ts +27 -0
  131. package/dist/internal/helpers/watch.js +28 -0
  132. package/dist/internal/storybook/shadowRootTraverser.d.ts +16 -8
  133. package/dist/internal/templates/asterisk.d.ts +1 -1
  134. package/dist/internal/templates/asterisk.js +7 -6
  135. package/dist/react/index.d.ts +10 -3
  136. package/dist/react/index.js +10 -3
  137. package/dist/react/skf-button/index.d.ts +7 -1
  138. package/dist/react/skf-button/index.js +5 -1
  139. package/dist/react/skf-dialog/index.d.ts +15 -0
  140. package/dist/react/skf-dialog/index.js +19 -0
  141. package/dist/react/skf-progress/index.d.ts +3 -0
  142. package/dist/react/skf-progress/index.js +13 -0
  143. package/dist/react/skf-tab/index.d.ts +12 -0
  144. package/dist/react/skf-tab/index.js +18 -0
  145. package/dist/react/skf-tab-group/index.d.ts +3 -0
  146. package/dist/react/skf-tab-group/index.js +13 -0
  147. package/dist/react/skf-tab-panel/index.d.ts +3 -0
  148. package/dist/react/skf-tab-panel/index.js +13 -0
  149. package/dist/react/skf-toast/index.d.ts +3 -0
  150. package/dist/react/skf-toast/index.js +13 -0
  151. package/dist/react/skf-toast-wrapper/index.d.ts +3 -0
  152. package/dist/react/skf-toast-wrapper/index.js +13 -0
  153. package/dist/styles/component.styles.js +15 -2
  154. package/dist/styles/form-field.styles.js +5 -1
  155. package/dist/types/jsx/custom-element-jsx.d.ts +300 -117
  156. package/dist/types/vue/index.d.ts +266 -76
  157. package/dist/vscode.html-custom-data.json +349 -216
  158. package/dist/web-types.json +686 -292
  159. package/package.json +33 -32
@@ -1,21 +1,21 @@
1
- import { SkfElement } from '@internal/components/skf-element.js';
1
+ import { SkfElement } from '../../internal/components/skf-element.js';
2
2
  import { type CSSResultGroup } from 'lit';
3
3
  /**
4
- * The `<skf-loader>` component is a progress indicator that uses circular indicators for short, indeterminate activities.
4
+ * The `<skf-loader>` component is a progress indicator that uses circular indicators for short, indeterminate activities
5
5
  *
6
- * @documentation See [InVision DSM](https://skf.invisionapp.com/dsm/ab-skf/4-web-applications/nav/5fa7caf78c01200018354495/asset/619e4125b3d2147c0c584b11) for design principles.
6
+ * @documentation See [zeroheight](https://zeroheight.com/853e936c9/p/8188a9-loader) for design principles
7
7
  *
8
8
  * @tagname skf-loader
9
9
  */
10
10
  export declare class SkfLoader extends SkfElement {
11
+ #private;
11
12
  static styles: CSSResultGroup;
13
+ /** Defines the aria-label */
12
14
  ariaLabel: string;
13
15
  /** If true, inverts the color (to be used on colored backgrounds) */
14
16
  invert: boolean;
15
- /** If provided, displays an alternative size */
17
+ /** Defines the size of the loader */
16
18
  size?: 'md' | 'sm';
17
- connectedCallback(): void;
18
- /** @internal */
19
- private getCircle;
19
+ constructor();
20
20
  render(): import("lit").TemplateResult<1>;
21
21
  }
@@ -1,71 +1,52 @@
1
- import { SkfElement as u } from "../../internal/components/skf-element.js";
2
- import { COLORS as c } from "@skf-design-system/ui-assets";
3
- import m from "../../styles/component.styles.js";
4
- import { svg as d, html as h } from "lit";
5
- import { property as a } from "lit/decorators.js";
6
- import v from "./loader.styles.js";
7
- var f = Object.defineProperty, o = (l, t, i, g) => {
8
- for (var e = void 0, s = l.length - 1, p; s >= 0; s--)
9
- (p = l[s]) && (e = p(t, i, e) || e);
10
- return e && f(t, i, e), e;
1
+ var v = (r) => {
2
+ throw TypeError(r);
11
3
  };
12
- const n = class n extends u {
4
+ var f = (r, e, t) => e.has(r) || v("Cannot " + t);
5
+ var p = (r, e, t) => (f(r, e, "read from private field"), t ? t.call(r) : e.get(r)), h = (r, e, t) => e.has(r) ? v("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), u = (r, e, t, a) => (f(r, e, "write to private field"), a ? a.call(r, t) : e.set(r, t), t);
6
+ import { SkfElement as y } from "../../internal/components/skf-element.js";
7
+ import _ from "../../styles/component.styles.js";
8
+ import { html as b } from "lit";
9
+ import { property as n } from "lit/decorators.js";
10
+ import { classMap as g } from "lit/directives/class-map.js";
11
+ import z from "./loader.styles.js";
12
+ var x = Object.defineProperty, c = (r, e, t, a) => {
13
+ for (var i = void 0, o = r.length - 1, m; o >= 0; o--)
14
+ (m = r[o]) && (i = m(e, t, i) || i);
15
+ return i && x(e, t, i), i;
16
+ }, s;
17
+ const d = class d extends y {
13
18
  constructor() {
14
- super(...arguments), this.ariaLabel = "Loading...", this.invert = !1, this.size = "md";
15
- }
16
- connectedCallback() {
17
- super.connectedCallback(), this.setAttribute("role", "progressbar"), this.setAttribute("aria-live", "polite");
18
- }
19
- /** @internal */
20
- getCircle(t, i) {
21
- return d`
22
- <circle
23
- cx=${t}
24
- cy="26"
25
- fill=${this.invert ? c.neutralWhite : c.brandBase}
26
- key=${t}
27
- r="6"
28
- stroke="none"
29
- >
30
- <animate
31
- attributeName="opacity"
32
- begin=${i}
33
- dur="1s"
34
- repeatCount="indefinite"
35
- values="0;1;0"
36
- />
37
- </circle>
38
- `;
19
+ super();
20
+ h(this, s);
21
+ this.ariaLabel = "Loading...", this.invert = !1, this.size = "md", u(this, s, this.attachInternals()), p(this, s).role = "progressbar", p(this, s).ariaLive = "polite";
39
22
  }
40
23
  render() {
41
- return h`
42
- <div aria-hidden="true" id="loader">
43
- <svg
44
- enableBackground="new 0 0 0 0"
45
- height="100%"
46
- version="1.1"
47
- viewBox="0 0 52 52"
48
- width="100%"
49
- x="0px"
50
- y="0px"
51
- >
52
- ${[this.getCircle(6, 0.1), this.getCircle(26, 0.2), this.getCircle(46, 0.3)]}
53
- </svg>
24
+ return b`
25
+ <div
26
+ class=${g({
27
+ loader: !0,
28
+ "loader--invert": this.invert,
29
+ "loader--small": this.size === "sm"
30
+ })}
31
+ >
32
+ <div class="loader__circle"></div>
33
+ <div class="loader__circle"></div>
34
+ <div class="loader__circle"></div>
54
35
  </div>
55
36
  `;
56
37
  }
57
38
  };
58
- n.styles = [m, v];
59
- let r = n;
60
- o([
61
- a({ type: String, reflect: !0, attribute: "aria-label" })
62
- ], r.prototype, "ariaLabel");
63
- o([
64
- a({ type: Boolean })
65
- ], r.prototype, "invert");
66
- o([
67
- a({ type: String, reflect: !0 })
68
- ], r.prototype, "size");
39
+ s = new WeakMap(), d.styles = [_, z];
40
+ let l = d;
41
+ c([
42
+ n({ reflect: !0, attribute: "aria-label" })
43
+ ], l.prototype, "ariaLabel");
44
+ c([
45
+ n({ type: Boolean })
46
+ ], l.prototype, "invert");
47
+ c([
48
+ n({ type: String, reflect: !0 })
49
+ ], l.prototype, "size");
69
50
  export {
70
- r as SkfLoader
51
+ l as SkfLoader
71
52
  };
@@ -1,18 +1,51 @@
1
- import { css as s } from "lit";
2
- const a = s`
3
- :host {
4
- display: inline-flex;
5
- }
1
+ import { css as a } from "lit";
2
+ const s = a`
3
+ /* stylelint-disable selector-class-pattern */
4
+ @layer components {
5
+ :host {
6
+ display: inline-flex;
7
+ }
8
+
9
+ .loader {
10
+ display: flex;
11
+ gap: var(--_skf-loader-gap, var(--skf-spacing-50));
12
+ }
13
+
14
+ .loader--small {
15
+ --_skf-loader-gap: var(--skf-spacing-25);
16
+ }
6
17
 
7
- #loader {
8
- aspect-ratio: 1;
9
- block-size: var(--_skf-loader-size, var(--skf-size-48));
18
+ .loader__circle {
19
+ animation: skf-loader 0.5s infinite ease-in alternate;
20
+ aspect-ratio: 1;
21
+ background-color: var(--_skf-loader-color, var(--skf-bg-color-emphasised));
22
+ border-radius: 50%;
23
+ inline-size: var(--_skf-loader-size, var(--skf-size-12));
24
+
25
+ &:nth-child(2) {
26
+ animation-delay: 0.1s;
27
+ }
28
+
29
+ &:nth-child(3) {
30
+ animation-delay: 0.2s;
31
+ }
32
+
33
+ .loader--invert & {
34
+ --_skf-loader-color: var(--skf-bg-color-neutral-1);
35
+ }
36
+
37
+ .loader--small & {
38
+ --_skf-loader-size: var(--skf-size-4);
39
+ }
40
+ }
10
41
 
11
- :host([size='sm']) & {
12
- --_skf-loader-size: var(--skf-size-24);
42
+ @keyframes skf-loader {
43
+ to {
44
+ opacity: 0;
45
+ }
13
46
  }
14
47
  }
15
48
  `;
16
49
  export {
17
- a as default
50
+ s as default
18
51
  };
@@ -1,4 +1,4 @@
1
- import { SkfElement } from '@internal/components/skf-element.js';
1
+ import { SkfElement } from '../../internal/components/skf-element.js';
2
2
  import type { Logo } from '@skf-design-system/ui-assets';
3
3
  import { type CSSResultGroup } from 'lit';
4
4
  /**
@@ -10,10 +10,12 @@ import { type CSSResultGroup } from 'lit';
10
10
  */
11
11
  export declare class SkfLogo extends SkfElement {
12
12
  static styles: CSSResultGroup;
13
- /** The title of the logo */
13
+ /** Defines the title of the logo */
14
14
  title: string;
15
- /** If provided, sets color of the logo */
16
- /** @type { "primary" | "secondary" | "inverse" } */
17
- color?: Logo;
15
+ /**
16
+ * Defines the color of the logo
17
+ * @type { "primary" | "secondary" | "inverse" }
18
+ */
19
+ color: Logo;
18
20
  render(): import("lit").TemplateResult<1>;
19
21
  }
@@ -1,20 +1,31 @@
1
1
  import { SkfElement as i } from "../../internal/components/skf-element.js";
2
2
  import m from "../../styles/component.styles.js";
3
3
  import { html as n } from "lit";
4
- import { property as v } from "lit/decorators.js";
5
- import a from "./logo.styles.js";
6
- var d = Object.defineProperty, s = (h, o, l, f) => {
7
- for (var c = void 0, r = h.length - 1, p; r >= 0; r--)
8
- (p = h[r]) && (c = p(o, l, c) || c);
9
- return c && d(o, l, c), c;
4
+ import { property as p } from "lit/decorators.js";
5
+ import { classMap as a } from "lit/directives/class-map.js";
6
+ import { styles as d } from "./logo.styles.js";
7
+ var g = Object.defineProperty, v = (e, l, s, y) => {
8
+ for (var c = void 0, r = e.length - 1, h; r >= 0; r--)
9
+ (h = e[r]) && (c = h(l, s, c) || c);
10
+ return c && g(l, s, c), c;
10
11
  };
11
- const e = class e extends i {
12
+ const o = class o extends i {
12
13
  constructor() {
13
14
  super(...arguments), this.title = "SKF logotype", this.color = "primary";
14
15
  }
15
16
  render() {
16
17
  return n`
17
- <svg id="logo" viewBox="0 0 1300 300" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px">
18
+ <svg
19
+ class=${a({
20
+ logo: !0,
21
+ "logo--color-inverse": this.color === "inverse",
22
+ "logo--color-secondary": this.color === "secondary"
23
+ })}
24
+ viewBox="0 0 1300 300"
25
+ xmlns="http://www.w3.org/2000/svg"
26
+ x="0px"
27
+ y="0px"
28
+ >
18
29
  <title>${this.title}</title>
19
30
  <g>
20
31
  <g>
@@ -55,13 +66,13 @@ c0,5.8-4.3,6.1-9.1,6.1H1230.9z"
55
66
  `;
56
67
  }
57
68
  };
58
- e.styles = [m, a];
59
- let t = e;
60
- s([
61
- v()
69
+ o.styles = [m, d];
70
+ let t = o;
71
+ v([
72
+ p()
62
73
  ], t.prototype, "title");
63
- s([
64
- v()
74
+ v([
75
+ p()
65
76
  ], t.prototype, "color");
66
77
  export {
67
78
  t as SkfLogo
@@ -1,2 +1 @@
1
- declare const _default: import("lit").CSSResult;
2
- export default _default;
1
+ export declare const styles: import("lit").CSSResult;
@@ -1,23 +1,25 @@
1
1
  import { css as o } from "lit";
2
- const r = o`
2
+ const s = o`
3
+ /* stylelint-disable selector-class-pattern */
4
+
3
5
  :host {
4
- display: contents;
6
+ display: inline-flex;
5
7
  }
6
8
 
7
- #logo {
9
+ .logo {
8
10
  aspect-ratio: 13 / 3;
9
11
  block-size: var(--skf-logo-height, var(--skf-size-32));
10
12
  fill: var(--_skf-logo-color, var(--skf-logo-primary));
13
+ }
11
14
 
12
- :host([color='secondary']) & {
13
- --_skf-logo-color: var(--skf-logo-secondary);
14
- }
15
+ .logo--color-secondary {
16
+ --_skf-logo-color: var(--skf-logo-secondary);
17
+ }
15
18
 
16
- :host([color='inverse']) & {
17
- --_skf-logo-color: var(--skf-logo-inverse);
18
- }
19
+ .logo--color-inverse {
20
+ --_skf-logo-color: var(--skf-logo-inverse);
19
21
  }
20
22
  `;
21
23
  export {
22
- r as default
24
+ s as styles
23
25
  };
@@ -0,0 +1,22 @@
1
+ import { SkfElement } from '../../internal/components/skf-element';
2
+ import { type CSSResultGroup } from 'lit';
3
+ /**
4
+ * The `<skf-progress>` element displays an indicator showing the completion progress of a task, typically displayed as a progress bar
5
+ *
6
+ * @documentation See [zeroheight](https://zeroheight.com/****) for design principles
7
+ *
8
+ * @tagname skf-progress
9
+ */
10
+ export declare class SkfProgress extends SkfElement {
11
+ #private;
12
+ static styles: CSSResultGroup;
13
+ static formAssociated: boolean;
14
+ /** If true, the progress-bar's fill value is animated */
15
+ animated: boolean;
16
+ /** Describes how much work the task indicated by the progress element requires */
17
+ max: number;
18
+ /** Specifies how much of the task that has been completed */
19
+ value: number;
20
+ constructor();
21
+ render(): import("lit").TemplateResult<1>;
22
+ }
@@ -0,0 +1,49 @@
1
+ var h = (t) => {
2
+ throw TypeError(t);
3
+ };
4
+ var f = (t, e, r) => e.has(t) || h("Cannot " + r);
5
+ var c = (t, e, r) => (f(t, e, "read from private field"), r ? r.call(t) : e.get(t)), d = (t, e, r) => e.has(t) ? h("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), v = (t, e, r, p) => (f(t, e, "write to private field"), p ? p.call(t, r) : e.set(t, r), r);
6
+ import { SkfElement as y } from "../../internal/components/skf-element.js";
7
+ import x from "../../styles/component.styles.js";
8
+ import { html as b } from "lit";
9
+ import { property as l } from "lit/decorators.js";
10
+ import { classMap as _ } from "lit/directives/class-map.js";
11
+ import { styles as g } from "./progress.styles.js";
12
+ var N = Object.defineProperty, n = (t, e, r, p) => {
13
+ for (var s = void 0, m = t.length - 1, u; m >= 0; m--)
14
+ (u = t[m]) && (s = u(e, r, s) || s);
15
+ return s && N(e, r, s), s;
16
+ }, o;
17
+ const i = class i extends y {
18
+ constructor() {
19
+ super();
20
+ d(this, o);
21
+ this.animated = !1, this.max = 1, this.value = 0, v(this, o, this.attachInternals()), c(this, o).role = "progressbar";
22
+ }
23
+ render() {
24
+ const r = this.value / this.max * 100;
25
+ return b`
26
+ <div
27
+ class=${_({
28
+ progress: !0,
29
+ "progress--animated": this.animated
30
+ })}
31
+ style="--_skf-progress-value: ${r}%"
32
+ ></div>
33
+ `;
34
+ }
35
+ };
36
+ o = new WeakMap(), i.styles = [x, g], i.formAssociated = !0;
37
+ let a = i;
38
+ n([
39
+ l({ type: Boolean, reflect: !0 })
40
+ ], a.prototype, "animated");
41
+ n([
42
+ l({ type: Number })
43
+ ], a.prototype, "max");
44
+ n([
45
+ l({ type: Number })
46
+ ], a.prototype, "value");
47
+ export {
48
+ a as SkfProgress
49
+ };
@@ -0,0 +1,8 @@
1
+ import { SkfProgress } from './progress.component';
2
+ export * from './progress.component';
3
+ export default SkfProgress;
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'skf-progress': SkfProgress;
7
+ }
8
+ }
@@ -0,0 +1,6 @@
1
+ import { SkfProgress as r } from "./progress.component.js";
2
+ r.define("skf-progress");
3
+ export {
4
+ r as SkfProgress,
5
+ r as default
6
+ };
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,48 @@
1
+ import { css as r } from "lit";
2
+ const s = r`
3
+ /* stylelint-disable selector-class-pattern */
4
+ @layer components {
5
+ .progress {
6
+ background: var(--skf-bg-color-neutral-3);
7
+ block-size: var(--skf-size-8);
8
+ border-radius: 0.25rem; /* Missing token */
9
+ overflow: hidden;
10
+
11
+ &::after {
12
+ background-color: var(--skf-bg-color-emphasised);
13
+ block-size: inherit;
14
+ border-radius: inherit;
15
+ content: '';
16
+ display: block;
17
+ inline-size: var(--_skf-progress-value, auto);
18
+ transition: inline-size calc(var(--skf-motion-duration-slow) * 1ms)
19
+ cubic-bezier(0.4, 0.93, 0.71, 0.89);
20
+ }
21
+ }
22
+
23
+ .progress--animated::after {
24
+ animation: skf-progress-animation calc(var(--skf-motion-duration-slow) * 1ms) linear infinite
25
+ reverse;
26
+ background-image: linear-gradient(
27
+ -45deg,
28
+ rgba(255 255 255 / 20%) 25%,
29
+ transparent 25%,
30
+ transparent 50%,
31
+ rgba(255 255 255 / 20%) 50%,
32
+ rgba(255 255 255 / 20%) 75%,
33
+ transparent 75%,
34
+ transparent
35
+ );
36
+ background-size: 50px 50px;
37
+ }
38
+
39
+ @keyframes skf-progress-animation {
40
+ to {
41
+ background-position: 50px 50px;
42
+ }
43
+ }
44
+ }
45
+ `;
46
+ export {
47
+ s as styles
48
+ };
@@ -1,44 +1,44 @@
1
- import '@components/icon/icon.js';
2
- import { FormBase } from '@internal/components/formBase.js';
3
- import type { FormFieldBaseProps } from '@internal/types/formField.js';
1
+ import '../icon/icon.js';
2
+ import { FormBase } from '../../internal/components/formBase.js';
3
+ import type { FormFieldBaseProps } from '../../internal/types/formField.js';
4
4
  import { type CSSResultGroup } from 'lit';
5
5
  /**
6
6
  * The `<skf-radio>` component is used to create a radio input
7
7
  *
8
- * @documentation See [InVision DSM](https://skf.invisionapp.com/dsm/ab-skf/4-web-applications/nav/5fa7caf78c01200018354495/asset/6229d63d9fe16020a60657e5) for design principles
8
+ * @documentation See [zeroheight](https://zeroheight.com/853e936c9/p/78d5dd-radio-button) for design principles
9
9
  *
10
10
  * @attribute {boolean} disabled - If true, sets disabled state
11
11
  * @attribute {boolean} required - If true, value is required or must be checked for the form to be submittable
12
12
  *
13
13
  * @event change {object} - When the value of the input changes
14
14
  *
15
- * @slot Default - Alternatively, you can use the `label` attribute
15
+ * @slot - The radios label. Alternatively, you can use the `label` attribute.
16
16
  *
17
17
  * @tagname skf-radio
18
18
  */
19
19
  export declare class SkfRadio extends FormBase implements FormFieldBaseProps {
20
20
  static styles: CSSResultGroup;
21
- /** @internal */
22
21
  private _initialChecked;
23
- /** If provided, outputs helping hints in console */
24
- debug?: boolean | undefined;
22
+ /** If true, outputs helping hints in console */
23
+ debug?: boolean;
25
24
  /** If true, outputs helping hints in console */
26
25
  checked?: boolean;
27
26
  /** If true, forces component to invalid state until removed */
28
27
  customInvalid?: boolean;
29
- /** If true, hides the label visually */
30
- hideLabel: boolean;
31
- /** The input's label. Alternatively, you can use the `label` attribute. */
28
+ /** If defined, sets the input's label unless the default slot is used. Alternatively, you can use the `label` attribute. */
32
29
  label?: string;
33
- /** If provided, adds name to the input-element */
30
+ /** If defined, adds name to the input-element */
34
31
  name?: string;
35
- /** If provided, renders an alternative A11y text for the asterisk */
32
+ /** If defined, renders an alternative A11y text for the asterisk */
36
33
  requiredLabel?: string;
37
- /** If provided, displays an alternative size */
38
- size?: 'sm' | 'md';
39
- /** If provided, displays provided severity state */
34
+ /** Size of the Radio */
35
+ size: 'sm' | 'md';
36
+ /**
37
+ * If defined, displays provided severity state
38
+ * @type {"success" | "info" | "warning" | "alert"}
39
+ */
40
40
  severity?: FormFieldBaseProps['severity'];
41
- /** If provided, displays valid state after interaction */
41
+ /** If true, displays valid state after interaction */
42
42
  showValid?: boolean;
43
43
  /** The current value of the input field */
44
44
  value: string;
@@ -48,11 +48,11 @@ export declare class SkfRadio extends FormBase implements FormFieldBaseProps {
48
48
  /** @internal */
49
49
  private $input?;
50
50
  connectedCallback(): void;
51
- willUpdate(changedProperties: Map<string | number | symbol, unknown>): void;
52
51
  protected firstUpdated(): void;
53
- updated(changedProperties: Map<string | number | symbol, unknown>): void;
54
- attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
55
- debugOutput(): void;
52
+ handleInvalidChange(): void;
53
+ handleDebugInvalid(): void;
54
+ handleCheckedChanged(): void;
55
+ handleCustomInvalidChange(): void;
56
56
  /** @internal */
57
57
  private _resetValue;
58
58
  /** @internal */