@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,37 +1,54 @@
1
- import { SkfElement as h } from "../../internal/components/skf-element.js";
2
- import m from "../../styles/component.styles.js";
3
- import { html as c } from "lit";
4
- import { property as o } from "lit/decorators.js";
5
- import { when as d } from "lit/directives/when.js";
6
- import f from "./divider.styles.js";
7
- var v = Object.defineProperty, i = (s, l, n, u) => {
8
- for (var r = void 0, t = s.length - 1, p; t >= 0; t--)
9
- (p = s[t]) && (r = p(l, n, r) || r);
10
- return r && v(l, n, r), r;
1
+ var h = (r) => {
2
+ throw TypeError(r);
11
3
  };
12
- const a = class a extends h {
4
+ var m = (r, e, t) => e.has(r) || h("Cannot " + t);
5
+ var c = (r, e, t) => (m(r, e, "read from private field"), t ? t.call(r) : e.get(r)), f = (r, e, t) => e.has(r) ? h("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), y = (r, e, t, a) => (m(r, e, "write to private field"), a ? a.call(r, t) : e.set(r, t), t);
6
+ import { SkfElement as u } from "../../internal/components/skf-element.js";
7
+ import b from "../../styles/component.styles.js";
8
+ import { html as C } from "lit";
9
+ import { property as n } from "lit/decorators.js";
10
+ import { classMap as _ } from "lit/directives/class-map.js";
11
+ import { styles as x } from "./divider.styles.js";
12
+ var B = Object.defineProperty, p = (r, e, t, a) => {
13
+ for (var o = void 0, l = r.length - 1, v; l >= 0; l--)
14
+ (v = r[l]) && (o = v(e, t, o) || o);
15
+ return o && B(e, t, o), o;
16
+ }, i;
17
+ const d = class d extends u {
13
18
  constructor() {
14
- super(...arguments), this.color = "primary", this.decorative = !1, this.vertical = !1, this.renderDecorative = () => c`
15
- <span aria-orientation=${this.vertical ? "vertical" : "horizontal"} id="divider"></span>
16
- `, this.renderDefault = () => c`
17
- <hr aria-orientation=${this.vertical ? "vertical" : "horizontal"} id="divider" />
18
- `;
19
+ super();
20
+ f(this, i);
21
+ this.color = "primary", this.decorative = !1, this.vertical = !1, y(this, i, this.attachInternals());
22
+ }
23
+ connectedCallback() {
24
+ super.connectedCallback(), c(this, i).role = this.decorative ? "generic" : "separator", c(this, i).ariaOrientation = this.vertical ? "vertical" : "horizontal";
19
25
  }
20
26
  render() {
21
- return d(this.decorative, this.renderDecorative, this.renderDefault);
27
+ return C`
28
+ <div
29
+ class=${_({
30
+ divider: !0,
31
+ "divider--color-emphasised": this.color === "emphasised",
32
+ "divider--color-inverse": this.color === "inverse",
33
+ "divider--color-secondary": this.color === "secondary",
34
+ "divider--color-tertiary": this.color === "tertiary",
35
+ "divider--vertical": this.vertical
36
+ })}
37
+ ></div>
38
+ `;
22
39
  }
23
40
  };
24
- a.styles = [m, f];
25
- let e = a;
26
- i([
27
- o({ reflect: !0 })
28
- ], e.prototype, "color");
29
- i([
30
- o({ type: Boolean })
31
- ], e.prototype, "decorative");
32
- i([
33
- o({ type: Boolean, reflect: !0 })
34
- ], e.prototype, "vertical");
41
+ i = new WeakMap(), d.styles = [b, x];
42
+ let s = d;
43
+ p([
44
+ n({ reflect: !0 })
45
+ ], s.prototype, "color");
46
+ p([
47
+ n({ type: Boolean })
48
+ ], s.prototype, "decorative");
49
+ p([
50
+ n({ type: Boolean, reflect: !0 })
51
+ ], s.prototype, "vertical");
35
52
  export {
36
- e as SkfDivider
53
+ s as SkfDivider
37
54
  };
@@ -1,2 +1 @@
1
- declare const _default: import("lit").CSSResult;
2
- export default _default;
1
+ export declare const styles: import("lit").CSSResult;
@@ -1,47 +1,43 @@
1
1
  import { css as r } from "lit";
2
- const i = r`
3
- :host {
4
- display: contents;
5
- }
6
-
7
- #divider {
8
- --_skf-divider-border-color: var(--skf-border-color-primary);
9
- --_skf-divider-border: var(--skf-border-width-sm) solid var(--_skf-divider-border-color);
2
+ const d = r`
3
+ /* stylelint-disable selector-class-pattern */
4
+ .divider {
5
+ --_skf-divider-border: var(--skf-border-width-sm) solid
6
+ var(--_skf-divider-border-color, var(--skf-border-color-primary));
10
7
 
11
8
  display: block;
12
9
 
13
- :host(:not([vertical])) & {
10
+ &:not(.divider--vertical) {
14
11
  border-top: var(--_skf-divider-border);
15
12
  margin-block: var(--skf-divider-spacing, var(--skf-spacing-100));
16
13
  margin-inline: var(--skf-divider-inset, 0);
17
14
  }
15
+ }
18
16
 
19
- :host([vertical]) & {
20
- align-self: stretch;
21
- border-left: var(--_skf-divider-border);
22
- display: inline-flex;
23
- margin-block: var(--skf-divider-inset, 0);
24
- margin-inline: var(--skf-divider-spacing, var(--skf-spacing-100));
25
- }
17
+ .divider--vertical {
18
+ block-size: 100%;
19
+ border-left: var(--_skf-divider-border);
20
+ margin-block: var(--skf-divider-inset, 0);
21
+ margin-inline: var(--skf-divider-spacing, var(--skf-spacing-100));
22
+ }
26
23
 
27
- /** Colors */
28
- :host([color='secondary']) & {
29
- --_skf-divider-border-color: var(--skf-border-color-secondary);
30
- }
24
+ /** Colors */
25
+ .divider--color-emphasised {
26
+ --_skf-divider-border-color: var(--skf-border-color-emphasised);
27
+ }
31
28
 
32
- :host([color='tertiary']) & {
33
- --_skf-divider-border-color: var(--skf-border-color-tertiary);
34
- }
29
+ .divider--color-inverse {
30
+ --_skf-divider-border-color: var(--skf-border-color-inverse);
31
+ }
35
32
 
36
- :host([color='emphasised']) & {
37
- --_skf-divider-border-color: var(--skf-border-color-emphasised);
38
- }
33
+ .divider--color-secondary {
34
+ --_skf-divider-border-color: var(--skf-border-color-secondary);
35
+ }
39
36
 
40
- :host([color='inverse']) & {
41
- --_skf-divider-border-color: var(--skf-border-color-inverse);
42
- }
37
+ .divider--color-tertiary {
38
+ --_skf-divider-border-color: var(--skf-border-color-tertiary);
43
39
  }
44
40
  `;
45
41
  export {
46
- i as default
42
+ d as styles
47
43
  };
@@ -1,17 +1,27 @@
1
- import { SkfElement } from '@internal/components/skf-element.js';
2
- import type { HeadingType } from '@internal/constants/heading.js';
1
+ import { SkfElement } from '../../internal/components/skf-element.js';
2
+ import type { HeadingType } from '../../internal/constants/heading.js';
3
3
  import { type CSSResultGroup } from 'lit';
4
4
  /**
5
5
  * The `<Heading>` component is to deliniate content on a page. When using, take note not to skip heading levels.<br>
6
6
  * It extends the interface of native html `<h1>` to `<h4>` elements.
7
7
  *
8
+ * @slot - The headings content
9
+ *
8
10
  * @tagname skf-heading
9
11
  */
10
12
  export declare class SkfHeading extends SkfElement {
11
13
  static styles: CSSResultGroup;
12
- /** Controls which heading element will be rendered. Should not be used to affect appearance. */
14
+ /**
15
+ * Controls which heading element will be rendered. Should not be used to affect appearance
16
+ *
17
+ * @type { "h1" | "h2" | "h3" | "h4" }
18
+ */
13
19
  as: HeadingType;
14
- /** If provided, changes the appearance of the heading */
20
+ /**
21
+ * If provided, changes the appearance of the heading
22
+ *
23
+ * @type { "h1" | "h2" | "h3" | "h4" }
24
+ */
15
25
  styledAs?: HeadingType;
16
26
  render(): import("lit").TemplateResult;
17
27
  }
@@ -1,32 +1,32 @@
1
- import { SkfElement as f } from "../../internal/components/skf-element.js";
1
+ import { SkfElement as n } from "../../internal/components/skf-element.js";
2
2
  import u from "../../styles/component.styles.js";
3
3
  import "lit";
4
4
  import { property as a } from "lit/decorators.js";
5
- import { html as h, unsafeStatic as l } from "lit/static-html.js";
6
- import y from "./heading.styles.js";
7
- var c = Object.defineProperty, n = (o, p, i, d) => {
8
- for (var t = void 0, e = o.length - 1, m; e >= 0; e--)
9
- (m = o[e]) && (t = m(p, i, t) || t);
10
- return t && c(p, i, t), t;
5
+ import { html as y, unsafeStatic as l } from "lit/static-html.js";
6
+ import c from "./heading.styles.js";
7
+ var h = Object.defineProperty, f = (o, p, i, d) => {
8
+ for (var t = void 0, s = o.length - 1, m; s >= 0; s--)
9
+ (m = o[s]) && (t = m(p, i, t) || t);
10
+ return t && h(p, i, t), t;
11
11
  };
12
- const s = class s extends f {
12
+ const e = class e extends n {
13
13
  constructor() {
14
14
  super(...arguments), this.as = "h1";
15
15
  }
16
16
  render() {
17
- return h`
18
- <${l(this.as)} id="heading">
17
+ return y`
18
+ <${l(this.as)} id="root">
19
19
  <slot></slot>
20
20
  </${l(this.as)}>
21
21
  `;
22
22
  }
23
23
  };
24
- s.styles = [u, y];
25
- let r = s;
26
- n([
24
+ e.styles = [u, c];
25
+ let r = e;
26
+ f([
27
27
  a({ reflect: !0 })
28
28
  ], r.prototype, "as");
29
- n([
29
+ f([
30
30
  a({ attribute: "styled-as" })
31
31
  ], r.prototype, "styledAs");
32
32
  export {
@@ -5,7 +5,7 @@ const t = s`
5
5
  display: contents;
6
6
  }
7
7
 
8
- #heading {
8
+ #root {
9
9
  color: var(--skf-text-color-primary);
10
10
  font-size: var(--_skf-heading-size);
11
11
  font-weight: var(--_skf-heading-weight);
@@ -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 Icon, type IconColor, type IconSize, type SeverityFgColor } from '@skf-design-system/ui-assets';
3
3
  import { type CSSResultGroup } from 'lit';
4
4
  /**
@@ -10,19 +10,25 @@ import { type CSSResultGroup } from 'lit';
10
10
  */
11
11
  export declare class SkfIcon extends SkfElement {
12
12
  static styles: CSSResultGroup;
13
- /** @internal */
14
13
  private _rootId;
15
- /** @type { "primary" | "inverse" | "emphasised" | "secondary" | "success" | "info" | "warning" | "error" | "alert" } */
16
- color?: IconColor | SeverityFgColor;
17
- /** If provided, adds an alternate description to use for assistive devices */
14
+ /**
15
+ * Sets the color of the icon
16
+ * @type { "primary" | "inverse" | "emphasised" | "secondary" | "success" | "info" | "warning" | "error" | "alert" }
17
+ */
18
+ color: IconColor | SeverityFgColor;
19
+ /** If defined, adds an alternate description to use for assistive devices */
18
20
  label?: string;
19
- /** @type { "arrowDown" | "arrowDownUp" | "arrowLeft" | "arrowRight" | "arrowUp" | "article" | "artificialIntelligence" | "asset" | "attachment" | "bandCursor" | "bands" | "batteryEmpty" | "batteryFull" | "batteryLow" | "bearingFault" | "book" | "bulb" | "burger" | "cPM" | "calendar" | "calendarBooked" | "calendarEmpty" | "calendarNotBooked" | "calendarRecurring" | "caretDown" | "caretUp" | "caretUpDown" | "chat" | "check" | "checkCircle" | "checkSmall" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUp" | "chevronUpDown" | "close" | "closeAllFaults" | "closeFault" | "closeSmall" | "columnGraph" | "comment" | "connection1" | "connection2" | "connection3" | "connection4" | "danger" | "defectFrequencies" | "defectFrequenciesAlternative" | "doubleChevronLeft" | "doubleChevronRight" | "download" | "draft" | "draftFilled" | "draftOutlined" | "dragNDrop" | "drop" | "duplicate" | "edit" | "emailFilled" | "emailOutlined" | "exclamation" | "eye" | "eyeHidden" | "eyeVisible" | "filter" | "forbidden" | "fullScreen" | "fullScreenExit" | "functionalLocation" | "harmonicCursor" | "heatmap" | "hierarchy" | "history" | "historyAlt" | "hourglassFramedFilled" | "hourglassFramedOutlined" | "hourglassOutlined" | "hz" | "iMX" | "image" | "infoCircleFilled" | "infoCircleOutlined" | "integration" | "kebab" | "link" | "listGroup" | "listItem" | "locationPin" | "lock" | "logOut" | "meatballs" | "microphone" | "minus" | "minusSmall" | "noData" | "o" | "openInNew" | "overlayBaseline" | "pDF" | "paper" | "pause" | "pieChart" | "pin" | "play" | "plus" | "powerOff" | "printer" | "proCollect" | "recAction" | "received" | "refresh" | "reorder" | "replace" | "reply" | "rewalkableRoute" | "routes" | "search" | "send" | "sensorA" | "sensorB" | "settings" | "sidebandCursor" | "singleCursor" | "spectrum" | "starFilled" | "starOutlined" | "statusCircle" | "stop" | "structuralVibration" | "sync" | "timewave" | "trash" | "trend" | "trendingUp" | "undo" | "unknownCircle" | "unknownDiamond" | "unlink" | "unlock" | "unscheduledAction" | "upload" | "user" | "viewFull" | "viewHorizontal" | "viewVertical" | "warning" | "warningCircle" | "warningDiamond" | "zoomIn" | "zoomOut" } */
21
+ /**
22
+ * Name of the icon to display
23
+ * @type { "arrowDown" | "arrowDownUp" | "arrowLeft" | "arrowRight" | "arrowUp" | "article" | "artificialIntelligence" | "asset" | "attachment" | "bandCursor" | "bands" | "batteryEmpty" | "batteryFull" | "batteryLow" | "bearingFault" | "book" | "bulb" | "burger" | "cPM" | "calendar" | "calendarBooked" | "calendarEmpty" | "calendarNotBooked" | "calendarRecurring" | "caretDown" | "caretUp" | "caretUpDown" | "chat" | "check" | "checkCircle" | "checkSmall" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUp" | "chevronUpDown" | "close" | "closeAllFaults" | "closeFault" | "closeSmall" | "columnGraph" | "comment" | "connection1" | "connection2" | "connection3" | "connection4" | "danger" | "defectFrequencies" | "defectFrequenciesAlternative" | "doubleChevronLeft" | "doubleChevronRight" | "download" | "draft" | "draftFilled" | "draftOutlined" | "dragNDrop" | "drop" | "duplicate" | "edit" | "emailFilled" | "emailOutlined" | "exclamation" | "eye" | "eyeHidden" | "eyeVisible" | "filter" | "forbidden" | "fullScreen" | "fullScreenExit" | "functionalLocation" | "harmonicCursor" | "heatmap" | "hierarchy" | "history" | "historyAlt" | "hourglassFramedFilled" | "hourglassFramedOutlined" | "hourglassOutlined" | "hz" | "iMX" | "image" | "infoCircleFilled" | "infoCircleOutlined" | "integration" | "kebab" | "link" | "listGroup" | "listItem" | "locationPin" | "lock" | "logOut" | "meatballs" | "microphone" | "minus" | "minusSmall" | "noData" | "o" | "openInNew" | "overlayBaseline" | "pDF" | "paper" | "pause" | "pieChart" | "pin" | "play" | "plus" | "powerOff" | "printer" | "proCollect" | "recAction" | "received" | "refresh" | "reorder" | "replace" | "reply" | "rewalkableRoute" | "routes" | "search" | "send" | "sensorA" | "sensorB" | "settings" | "sidebandCursor" | "singleCursor" | "spectrum" | "starFilled" | "starOutlined" | "statusCircle" | "stop" | "structuralVibration" | "sync" | "timewave" | "trash" | "trend" | "trendingUp" | "undo" | "unknownCircle" | "unknownDiamond" | "unlink" | "unlock" | "unscheduledAction" | "upload" | "user" | "viewFull" | "viewHorizontal" | "viewVertical" | "warning" | "warningCircle" | "warningDiamond" | "zoomIn" | "zoomOut" }
24
+ */
20
25
  name: Icon;
21
- /** @type { "xs" | "sm" | "md" | "lg" } */
26
+ /**
27
+ * Size of the icon
28
+ * @type { "xs" | "sm" | "md" | "lg" }
29
+ */
22
30
  size?: IconSize;
23
- /** @internal */
24
31
  private renderDecorativeIcon;
25
- /** @internal */
26
32
  private renderInformativeIcon;
27
33
  render(): import("lit").TemplateResult<1>;
28
34
  }
@@ -5,15 +5,15 @@ import { html as l } from "lit";
5
5
  import { property as t } from "lit/decorators.js";
6
6
  import { ifDefined as c } from "lit/directives/if-defined.js";
7
7
  import { when as v } from "lit/directives/when.js";
8
- import y from "./icon.styles.js";
9
- var u = Object.defineProperty, o = (m, n, p, I) => {
8
+ import u from "./icon.styles.js";
9
+ var y = Object.defineProperty, o = (m, n, p, I) => {
10
10
  for (var r = void 0, i = m.length - 1, a; i >= 0; i--)
11
11
  (a = m[i]) && (r = a(n, p, r) || r);
12
- return r && u(n, p, r), r;
12
+ return r && y(n, p, r), r;
13
13
  };
14
14
  const s = class s extends f {
15
15
  constructor() {
16
- super(...arguments), this._rootId = "icon", this.color = "primary", this.size = "md", this.renderDecorativeIcon = () => l`
16
+ super(...arguments), this._rootId = "root", this.color = "primary", this.size = "md", this.renderDecorativeIcon = () => l`
17
17
  <div aria-hidden="true" id=${this._rootId}>${d[this.name]}</div>
18
18
  `, this.renderInformativeIcon = () => l`
19
19
  <div aria-label=${c(this.label)} id=${this._rootId} role="img">${d[this.name]}</div>
@@ -23,7 +23,7 @@ const s = class s extends f {
23
23
  return v(!!this.label, this.renderInformativeIcon, this.renderDecorativeIcon);
24
24
  }
25
25
  };
26
- s.styles = [h, y];
26
+ s.styles = [h, u];
27
27
  let e = s;
28
28
  o([
29
29
  t({ reflect: !0 })
@@ -32,7 +32,7 @@ o([
32
32
  t()
33
33
  ], e.prototype, "label");
34
34
  o([
35
- t({ type: String })
35
+ t()
36
36
  ], e.prototype, "name");
37
37
  o([
38
38
  t({ reflect: !0 })
@@ -1,73 +1,75 @@
1
1
  import { css as o } from "lit";
2
2
  const r = o`
3
- :host {
4
- display: inline-flex;
5
- }
3
+ @layer components {
4
+ :host {
5
+ display: inline-flex;
6
+ }
6
7
 
7
- #icon {
8
- --_skf-icon-size: var(--skf-icon-size-md);
8
+ #root {
9
+ --_skf-icon-size: var(--skf-icon-size-md);
9
10
 
10
- block-size: var(--_skf-icon-size);
11
- color: var(--_skf-icon-color, var(--skf-icon-color-primary));
12
- display: inline-flex;
13
- flex-shrink: 0; /* Prevents shrink when flex-child */
14
- inline-size: var(--_skf-icon-size);
15
- pointer-events: none;
16
- user-select: none;
11
+ block-size: var(--_skf-icon-size);
12
+ color: var(--_skf-icon-color, var(--skf-icon-color-primary));
13
+ display: inline-flex;
14
+ flex-shrink: 0; /* Prevents shrink when flex-child */
15
+ inline-size: var(--_skf-icon-size);
16
+ pointer-events: none;
17
+ user-select: none;
17
18
 
18
- :host-context(.skf-icon-host) & {
19
- color: inherit;
20
- }
19
+ :host-context(.skf-icon-host) & {
20
+ color: inherit;
21
+ }
21
22
 
22
- /**
23
- * Colors
24
- */
25
- :host([color='secondary']) & {
26
- --_skf-icon-color: var(--skf-icon-color-secondary);
27
- }
23
+ /**
24
+ * Colors
25
+ */
26
+ :host([color='secondary']) & {
27
+ --_skf-icon-color: var(--skf-icon-color-secondary);
28
+ }
28
29
 
29
- :host([color='inverse']) & {
30
- --_skf-icon-color: var(--skf-icon-color-inverse);
31
- }
30
+ :host([color='inverse']) & {
31
+ --_skf-icon-color: var(--skf-icon-color-inverse);
32
+ }
32
33
 
33
- :host([color='emphasised']) & {
34
- --_skf-icon-color: var(--skf-icon-color-emphasised);
35
- }
34
+ :host([color='emphasised']) & {
35
+ --_skf-icon-color: var(--skf-icon-color-emphasised);
36
+ }
36
37
 
37
- /* Severity */
38
- :host([color='alert']) & {
39
- --_skf-icon-color: var(--skf-severity-fg-color-alert);
40
- }
38
+ /* Severity */
39
+ :host([color='alert']) & {
40
+ --_skf-icon-color: var(--skf-severity-fg-color-alert);
41
+ }
41
42
 
42
- :host([color='error']) & {
43
- --_skf-icon-color: var(--skf-severity-fg-color-error);
44
- }
43
+ :host([color='error']) & {
44
+ --_skf-icon-color: var(--skf-severity-fg-color-error);
45
+ }
45
46
 
46
- :host([color='info']) & {
47
- --_skf-icon-color: var(--skf-severity-fg-color-info);
48
- }
47
+ :host([color='info']) & {
48
+ --_skf-icon-color: var(--skf-severity-fg-color-info);
49
+ }
49
50
 
50
- :host([color='success']) & {
51
- --_skf-icon-color: var(--skf-severity-fg-color-success);
52
- }
51
+ :host([color='success']) & {
52
+ --_skf-icon-color: var(--skf-severity-fg-color-success);
53
+ }
53
54
 
54
- :host([color='warning']) & {
55
- --_skf-icon-color: var(--skf-severity-fg-color-warning);
56
- }
55
+ :host([color='warning']) & {
56
+ --_skf-icon-color: var(--skf-severity-fg-color-warning);
57
+ }
57
58
 
58
- /**
59
- * Sizes
60
- */
61
- :host([size='xs']) & {
62
- --_skf-icon-size: var(--skf-icon-size-xs);
63
- }
59
+ /**
60
+ * Sizes
61
+ */
62
+ :host([size='xs']) & {
63
+ --_skf-icon-size: var(--skf-icon-size-xs);
64
+ }
64
65
 
65
- :host([size='sm']) & {
66
- --_skf-icon-size: var(--skf-icon-size-sm);
67
- }
66
+ :host([size='sm']) & {
67
+ --_skf-icon-size: var(--skf-icon-size-sm);
68
+ }
68
69
 
69
- :host([size='lg']) & {
70
- --_skf-icon-size: var(--skf-icon-size-lg);
70
+ :host([size='lg']) & {
71
+ --_skf-icon-size: var(--skf-icon-size-lg);
72
+ }
71
73
  }
72
74
  }
73
75
  `;
@@ -1,8 +1,9 @@
1
- import '@components/icon/icon.js';
2
- import { FormBase } from '@internal/components/formBase.js';
3
- import '@internal/components/hint/hint';
4
- import type { FormFieldBaseProps } from '@internal/types/formField.js';
1
+ import '../icon/icon.js';
2
+ import { FormBase } from '../../internal/components/formBase.js';
3
+ import '../../internal/components/hint/hint';
4
+ import type { FormFieldBaseProps } from '../../internal/types/formField.js';
5
5
  import { type CSSResultGroup } from 'lit';
6
+ type AutocompleteValues = 'on' | 'off' | 'name' | 'honorific-prefix' | 'given-name' | 'additional-name' | 'family-name' | 'honorific-suffix' | 'nickname' | 'username' | 'new-password' | 'current-password' | 'one-time-code' | 'organization-title' | 'organization' | 'street-address' | 'address-line1' | 'address-line2' | 'address-line3' | 'address-level4' | 'address-level3' | 'address-level2' | 'address-level1' | 'country' | 'country-name' | 'postal-code' | 'cc-name' | 'cc-given-name' | 'cc-additional-name' | 'cc-family-name' | 'cc-number' | 'cc-exp' | 'cc-exp-month' | 'cc-exp-year' | 'cc-csc' | 'cc-type' | 'transaction-amount' | 'transaction-currency' | 'language' | 'bday' | 'bday-day' | 'bday-month' | 'bday-year' | 'sex' | 'url' | 'photo' | 'tel' | 'tel-country-code' | 'tel-national' | 'tel-area-code' | 'tel-local' | 'tel-extension' | 'email' | 'impp' | 'password' | 'webauthn' | 'work' | (string & {});
6
7
  /**
7
8
  * The skf-text-field is used to create a text input field. It can be used inside a form element or standalone.
8
9
  *
@@ -14,7 +15,7 @@ import { type CSSResultGroup } from 'lit';
14
15
  * @event change - Fires when the value of the input changes
15
16
  * @event invalid - Fires when the input is invalid
16
17
  *
17
- * @slot Default - Alternatively, you can use the `label` attribute
18
+ * @slot - The Inputs label. Alternatively, you can use the `label` attribute.
18
19
  *
19
20
  * @tagname skf-input
20
21
  *
@@ -24,57 +25,69 @@ import { type CSSResultGroup } from 'lit';
24
25
  export declare class SkfInput extends FormBase implements FormFieldBaseProps {
25
26
  static styles: CSSResultGroup;
26
27
  private customError;
27
- /** If provided, renders a custom aria-label for the clear button **Notice!** Only applicable to type=search. */
28
+ /**
29
+ * Specifies what permission the browser has to provide assistance in filling out form field values. Refer to
30
+ * [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.
31
+ * @type { -m }
32
+ */
33
+ autocomplete?: AutocompleteValues;
34
+ /** Custom aria-label for the clear button. **Notice!** Only applicable to type=search. */
28
35
  buttonAriaLabelClear: string;
29
- /** If provided, renders a custom aria-label for the visibility button. **Notice!** Only applicable to type=password. */
36
+ /** Custom aria-label for the visibility button. **Notice!** Only applicable to type=password. */
30
37
  buttonAriaLabelHide: string;
31
- /** If provided, renders a custom aria-label for the visibility button **Notice!** Only applicable to type=password. */
38
+ /** Custom aria-label for the visibility button **Notice!** Only applicable to type=password. */
32
39
  buttonAriaLabelShow: string;
33
- /** If provided, forces component to invalid state until removed. Its value is used as hint text. */
40
+ /** If defined, forces component to invalid state until removed. Its value is used as hint text. */
34
41
  set customInvalid(value: string | undefined);
35
42
  get customInvalid(): string | undefined;
36
- /** If provided, outputs helping hints in console */
37
- debug: boolean;
43
+ /** If true, outputs helping hints in console */
44
+ debug?: boolean;
38
45
  /** If true, hides the label visually */
39
- hideLabel: boolean;
40
- /** If provided, displays informational text below the field */
46
+ hideLabel?: boolean;
47
+ /** If defined, displays informational text below the field */
41
48
  hint?: string;
42
- /** If provided, tells what keyboard to use if applicable */
49
+ /** Tells what keyboard to use if applicable */
43
50
  inputmode: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
44
- /** The input's label. Alternatively, you can use the `label` attribute. */
51
+ /** If defined, sets the input's label. Alternatively, you can use the `label` attribute. */
45
52
  label?: string;
46
- /** If provided, displays a prefix/adornment before the input-element */
53
+ /** If defined, displays a prefix/adornment before the input-element */
47
54
  leading?: string;
48
- /** If provided, sets the maximum value to accept for this input */
55
+ /** If defined, sets the maximum value to accept for this input */
49
56
  max?: number | string;
50
- /** If provided, sets the maximum character length to accept for this input */
57
+ /** If defined, sets the maximum character length to accept for this input */
51
58
  maxLength?: number;
52
- /** If provided, sets the minimum value to accept for this input */
59
+ /** If defined, sets the minimum value to accept for this input */
53
60
  min?: number | string;
54
- /** If provided, sets the minimum character length to accept for this input */
61
+ /** If defined, sets the minimum character length to accept for this input */
55
62
  minLength?: number;
56
- /** If provided, adds name to the input-element */
63
+ /** If defined, adds name to the input-element */
57
64
  name?: string;
58
- /** If provided, adds name to the input-element */
65
+ /** If defined, adds name to the input-element */
59
66
  pattern?: string;
60
- /** If provided, displays placeholder text */
67
+ /** If defined, displays placeholder text */
61
68
  placeholder?: string;
62
69
  /** If true, makes the element not mutable, meaning the user can not edit the control */
63
70
  readonly?: boolean;
64
- /** If provided, renders an alternative A11y text for the asterisk */
71
+ /** If defined, renders an alternative A11y text for the asterisk */
65
72
  requiredLabel?: string;
66
- /** If provided, displays provided severity state */
73
+ /**
74
+ * If defined, displays provided severity state
75
+ * @type { "alert" | "success" | "info" | "warning" }
76
+ */
67
77
  severity?: FormFieldBaseProps['severity'];
68
- /** If provided, displays provided severity state */
78
+ /** If true, displays valid state after interaction */
69
79
  showValid?: boolean;
70
- /** If provided, displays an alternative size */
71
- size?: 'sm' | 'md';
72
- /** If provided, displays a suffix/adornment after the input-element */
80
+ /** Size of the input */
81
+ size: 'sm' | 'md';
82
+ /** If defined, displays a suffix/adornment after the input-element */
73
83
  trailing?: string;
74
- /** If provided, changes the type of form control */
84
+ /**
85
+ * Type of input control
86
+ * @type { 'button' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week' }
87
+ */
75
88
  type?: Exclude<FormFieldBaseProps['type'], 'checkbox' | 'radio'>;
76
- /** If provided, sets validation start, "input", "change" or "submit" */
77
- validateOn?: 'input' | 'change' | 'submit';
89
+ /** Sets validation start */
90
+ validateOn: 'input' | 'change' | 'submit';
78
91
  /** The current value of the input field */
79
92
  value: string;
80
93
  /** @internal */
@@ -85,10 +98,11 @@ export declare class SkfInput extends FormBase implements FormFieldBaseProps {
85
98
  /** @internal */
86
99
  $input: HTMLInputElement;
87
100
  /** @internal */
101
+ _defaultSlot: Node[];
102
+ /** @internal */
88
103
  private _numberController;
89
104
  /** @internal */
90
105
  private _passwordController;
91
- constructor();
92
106
  protected firstUpdated(): void;
93
107
  willUpdate(changedProperties: Map<string | number | symbol, unknown>): void;
94
108
  attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
@@ -121,3 +135,4 @@ export declare class SkfInput extends FormBase implements FormFieldBaseProps {
121
135
  private _onBlur;
122
136
  render(): import("lit").TemplateResult<1>;
123
137
  }
138
+ export {};