@skf-design-system/ui-components 0.0.1-beta.3 → 1.0.0-beta.3

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 (105) hide show
  1. package/dist/components/accordion/accordion.component.d.ts +9 -5
  2. package/dist/components/accordion/accordion.component.js +22 -19
  3. package/dist/components/accordion/accordion.d.ts +1 -1
  4. package/dist/components/accordion/accordion.styles.js +3 -3
  5. package/dist/components/alert/alert.component.d.ts +7 -5
  6. package/dist/components/alert/alert.component.js +61 -0
  7. package/dist/components/alert/alert.js +6 -0
  8. package/dist/components/alert/alert.styles.js +63 -0
  9. package/dist/components/button/button.component.js +1 -1
  10. package/dist/components/button/button.styles.js +1 -1
  11. package/dist/components/card/card.component.d.ts +3 -3
  12. package/dist/components/card/card.component.js +16 -19
  13. package/dist/components/card/card.styles.js +11 -3
  14. package/dist/components/checkbox/checkbox.component.d.ts +9 -6
  15. package/dist/components/checkbox/checkbox.component.js +8 -8
  16. package/dist/components/checkbox/checkbox.styles.js +1 -1
  17. package/dist/components/checkbox/checkbox.test.d.ts +1 -0
  18. package/dist/components/collapse/collapse.component.d.ts +9 -6
  19. package/dist/components/collapse/collapse.component.js +39 -36
  20. package/dist/components/collapse/collapse.styles.js +3 -3
  21. package/dist/components/collapse/collapse.test.d.ts +1 -0
  22. package/dist/components/divider/divider.component.d.ts +13 -10
  23. package/dist/components/divider/divider.component.js +34 -29
  24. package/dist/components/divider/divider.styles.js +1 -5
  25. package/dist/components/heading/heading.component.d.ts +12 -2
  26. package/dist/components/heading/heading.component.js +34 -0
  27. package/dist/components/heading/heading.js +6 -0
  28. package/dist/components/heading/heading.styles.js +62 -0
  29. package/dist/components/icon/icon.component.d.ts +14 -8
  30. package/dist/components/icon/icon.component.js +6 -6
  31. package/dist/components/icon/icon.styles.js +1 -1
  32. package/dist/components/input/input.component.d.ts +34 -29
  33. package/dist/components/input/input.component.js +36 -36
  34. package/dist/components/link/link.component.d.ts +15 -12
  35. package/dist/components/link/link.component.js +7 -7
  36. package/dist/components/link/link.styles.js +1 -1
  37. package/dist/components/loader/loader.component.d.ts +7 -7
  38. package/dist/components/loader/loader.component.js +35 -61
  39. package/dist/components/loader/loader.styles.js +42 -10
  40. package/dist/components/logo/logo.component.d.ts +5 -3
  41. package/dist/components/logo/logo.component.js +8 -8
  42. package/dist/components/logo/logo.styles.js +2 -2
  43. package/dist/components/radio/radio.component.d.ts +15 -13
  44. package/dist/components/radio/radio.component.js +3 -3
  45. package/dist/components/radio/radio.styles.js +3 -3
  46. package/dist/components/select/select.component.d.ts +137 -0
  47. package/dist/components/select/select.component.js +311 -0
  48. package/dist/components/select/select.controllers.d.ts +59 -0
  49. package/dist/components/select/select.controllers.js +169 -0
  50. package/dist/components/select/select.d.ts +8 -0
  51. package/dist/components/select/select.js +6 -0
  52. package/dist/components/select/select.styles.d.ts +1 -0
  53. package/dist/components/select/select.styles.js +116 -0
  54. package/dist/components/select-option/select-option.component.d.ts +77 -0
  55. package/dist/components/select-option/select-option.component.js +117 -0
  56. package/dist/components/select-option/select-option.controllers.d.ts +9 -0
  57. package/dist/components/select-option/select-option.d.ts +8 -0
  58. package/dist/components/select-option/select-option.js +6 -0
  59. package/dist/components/select-option/select-option.styles.d.ts +1 -0
  60. package/dist/components/select-option/select-option.styles.js +53 -0
  61. package/dist/components/select-option-group/select-option-group.component.d.ts +16 -0
  62. package/dist/components/select-option-group/select-option-group.component.js +31 -0
  63. package/dist/components/select-option-group/select-option-group.d.ts +8 -0
  64. package/dist/components/select-option-group/select-option-group.js +6 -0
  65. package/dist/components/select-option-group/select-option-group.style.d.ts +1 -0
  66. package/dist/components/select-option-group/select-option-group.style.js +18 -0
  67. package/dist/components/switch/switch.component.d.ts +2 -3
  68. package/dist/components/switch/switch.component.js +106 -0
  69. package/dist/components/switch/switch.js +6 -0
  70. package/dist/components/switch/switch.styles.js +80 -0
  71. package/dist/components/switch/switch.test.d.ts +1 -0
  72. package/dist/components/tag/tag.component.d.ts +25 -4
  73. package/dist/components/tag/tag.component.js +66 -29
  74. package/dist/components/tag/tag.styles.js +6 -5
  75. package/dist/components/textarea/textarea.component.d.ts +26 -23
  76. package/dist/components/textarea/textarea.component.js +15 -12
  77. package/dist/custom-elements.json +960 -305
  78. package/dist/index.d.ts +6 -0
  79. package/dist/index.js +48 -30
  80. package/dist/internal/components/formBase.d.ts +18 -1
  81. package/dist/internal/components/formBase.js +25 -13
  82. package/dist/internal/components/skf-element.d.ts +4 -4
  83. package/dist/internal/components/skf-element.js +15 -19
  84. package/dist/internal/helpers/array.d.ts +4 -0
  85. package/dist/internal/helpers/findMatchingTags.d.ts +2 -0
  86. package/dist/internal/helpers/findMatchingTags.js +12 -0
  87. package/dist/internal/helpers/hintSeverity.d.ts +2 -0
  88. package/dist/internal/helpers/hintSeverity.js +6 -0
  89. package/dist/internal/helpers/raiseError.d.ts +28 -0
  90. package/dist/internal/helpers/raiseError.js +29 -0
  91. package/dist/internal/storybook/shadowRootTraverser.d.ts +16 -6
  92. package/dist/react/index.d.ts +3 -0
  93. package/dist/react/index.js +3 -0
  94. package/dist/react/skf-select/index.d.ts +21 -0
  95. package/dist/react/skf-select/index.js +21 -0
  96. package/dist/react/skf-select-option/index.d.ts +9 -0
  97. package/dist/react/skf-select-option/index.js +17 -0
  98. package/dist/react/skf-select-option-group/index.d.ts +3 -0
  99. package/dist/react/skf-select-option-group/index.js +13 -0
  100. package/dist/styles/form-field.styles.js +7 -7
  101. package/dist/types/jsx/custom-element-jsx.d.ts +290 -140
  102. package/dist/types/vue/index.d.ts +223 -90
  103. package/dist/vscode.html-custom-data.json +294 -97
  104. package/dist/web-types.json +614 -242
  105. package/package.json +34 -30
@@ -1,17 +1,18 @@
1
1
  import "../icon/icon.js";
2
2
  import { SkfElement as h } from "../../internal/components/skf-element.js";
3
3
  import m from "../../styles/component.styles.js";
4
- import { property as a } from "lit/decorators.js";
5
- import { html as c, unsafeStatic as l } from "lit/static-html.js";
6
- import u from "./collapse.styles.js";
7
- var f = Object.defineProperty, s = (o, r, d, y) => {
8
- for (var t = void 0, i = o.length - 1, p; i >= 0; i--)
9
- (p = o[i]) && (t = p(r, d, t) || t);
10
- return t && f(r, d, t), t;
4
+ import { property as i } from "lit/decorators.js";
5
+ import { ifDefined as c } from "lit/directives/if-defined.js";
6
+ import { html as u, unsafeStatic as l } from "lit/static-html.js";
7
+ import f from "./collapse.styles.js";
8
+ var y = Object.defineProperty, o = (a, s, d, g) => {
9
+ for (var t = void 0, r = a.length - 1, p; r >= 0; r--)
10
+ (p = a[r]) && (t = p(s, d, t) || t);
11
+ return t && y(s, d, t), t;
11
12
  };
12
13
  const n = class n extends h {
13
14
  constructor() {
14
- super(...arguments), this.animated = !1, this.expanded = !1, this.headingAs = "h2", this.small = !1, this.truncate = !1, this._toggle = () => {
15
+ super(...arguments), this.headingAs = "h2", this._toggle = () => {
15
16
  this.dispatchEvent(
16
17
  new CustomEvent("skf-collapse-toggle", {
17
18
  bubbles: !0,
@@ -30,45 +31,47 @@ const n = class n extends h {
30
31
  this.expanded = !0;
31
32
  }
32
33
  render() {
33
- return c`
34
- <${l(this.headingAs)} id="heading">
35
- <button
36
- @click=${this._toggle}
37
- aria-controls="main"
38
- aria-expanded=${this.expanded}
39
- type="button"
40
- >
41
- <span id="label">${this.heading}</span>
42
- <skf-icon name=${this.expanded ? "caretUp" : "caretDown"}></skf-icon>
43
- </button>
44
- </${l(this.headingAs)}>
45
- <div id="body">
46
- <div id="main" data-testid="main">
47
- <slot></slot>
34
+ return u`
35
+ <div id="root">
36
+ <${l(this.headingAs)} id="heading">
37
+ <button
38
+ @click=${this._toggle}
39
+ aria-controls="main"
40
+ aria-expanded=${c(this.expanded ? "true" : "false")}
41
+ type="button"
42
+ >
43
+ <span id="label">${this.heading}</span>
44
+ <skf-icon name=${this.expanded ? "caretUp" : "caretDown"}></skf-icon>
45
+ </button>
46
+ </${l(this.headingAs)}>
47
+ <div id="body">
48
+ <div id="main" data-testid="main">
49
+ <slot></slot>
50
+ </div>
48
51
  </div>
49
52
  </div>
50
53
  `;
51
54
  }
52
55
  };
53
- n.styles = [m, u];
56
+ n.styles = [m, f];
54
57
  let e = n;
55
- s([
56
- a({ type: Boolean, reflect: !0 })
58
+ o([
59
+ i({ type: Boolean, reflect: !0 })
57
60
  ], e.prototype, "animated");
58
- s([
59
- a({ type: Boolean, reflect: !0 })
61
+ o([
62
+ i({ type: Boolean, reflect: !0 })
60
63
  ], e.prototype, "expanded");
61
- s([
62
- a()
64
+ o([
65
+ i()
63
66
  ], e.prototype, "heading");
64
- s([
65
- a({ attribute: "heading-as" })
67
+ o([
68
+ i({ attribute: "heading-as" })
66
69
  ], e.prototype, "headingAs");
67
- s([
68
- a({ type: Boolean, reflect: !0 })
70
+ o([
71
+ i({ type: Boolean, reflect: !0 })
69
72
  ], e.prototype, "small");
70
- s([
71
- a({ type: Boolean, reflect: !0 })
73
+ o([
74
+ i({ type: Boolean, reflect: !0 })
72
75
  ], e.prototype, "truncate");
73
76
  export {
74
77
  e as SkfCollapse
@@ -1,7 +1,7 @@
1
- import { css as a } from "lit";
2
- const s = a`
1
+ import { css as o } from "lit";
2
+ const s = o`
3
3
  @layer components {
4
- :host {
4
+ #root {
5
5
  background: var(--skf-bg-color-neutral-1);
6
6
  border-bottom: var(--skf-border-width-sm) solid var(--skf-border-color-tertiary);
7
7
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -2,7 +2,9 @@ import { SkfElement } from '@internal/components/skf-element.js';
2
2
  import type { BorderColor } from '@skf-design-system/ui-assets';
3
3
  import { type CSSResultGroup } from 'lit';
4
4
  /**
5
- * The `<Divider>` component can separate items from each other, to visually emphasize their lack of a relationship between groups of information.
5
+ * The `<Divider>` component can separate items from each other, to visually emphasize their lack of a relationship between groups of information
6
+ *
7
+ * @documentation See [zeroheight](https://zeroheight.com/853e936c9/p/3831f1-divider) for design principles
6
8
  *
7
9
  * @cssproperty --skf-divider-spacing - The amount of space the divider occupies. Pass valid CSS **margin-block** values when horizontal and **margin-inline** when vertical
8
10
  * @cssproperty --skf-divider-inset - The amount of space the divider should be indented. Pass valid CSS **margin-inline** values when horizontal and **margin-block** when vertical
@@ -10,17 +12,18 @@ import { type CSSResultGroup } from 'lit';
10
12
  * @tagname skf-divider
11
13
  */
12
14
  export declare class SkfDivider extends SkfElement {
15
+ #private;
13
16
  static styles: CSSResultGroup;
14
- /** If provided, alters the Divider color */
15
- /** @type { "emphasised" | "primary" | "secondary" | "tertiary" | "inverse" } */
16
- color?: BorderColor;
17
+ /**
18
+ * Defines the Divider color
19
+ * @type { "emphasised" | "primary" | "secondary" | "tertiary" | "inverse" }
20
+ */
21
+ color: BorderColor;
17
22
  /** If true, renders a div for presentational purpose instead of the semantic hr-element */
18
- decorative?: boolean | undefined;
23
+ decorative?: boolean;
19
24
  /** If true, renders the divider vertically */
20
- vertical?: boolean | undefined;
21
- /** @internal */
22
- private renderDecorative;
23
- /** @internal */
24
- private renderDefault;
25
+ vertical?: boolean;
26
+ constructor();
27
+ connectedCallback(): void;
25
28
  render(): import("lit").TemplateResult<1>;
26
29
  }
@@ -1,37 +1,42 @@
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 f = (t) => {
2
+ throw TypeError(t);
11
3
  };
12
- const a = class a extends h {
4
+ var d = (t, r, e) => r.has(t) || f("Cannot " + e);
5
+ var s = (t, r, e) => (d(t, r, "read from private field"), e ? e.call(t) : r.get(t)), v = (t, r, e) => r.has(t) ? f("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(t) : r.set(t, e), y = (t, r, e, l) => (d(t, r, "write to private field"), l ? l.call(t, e) : r.set(t, e), e);
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 p } from "lit/decorators.js";
10
+ import _ from "./divider.styles.js";
11
+ var x = Object.defineProperty, c = (t, r, e, l) => {
12
+ for (var o = void 0, n = t.length - 1, h; n >= 0; n--)
13
+ (h = t[n]) && (o = h(r, e, o) || o);
14
+ return o && x(r, e, o), o;
15
+ }, i;
16
+ const m = class m extends u {
13
17
  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
- `;
18
+ super();
19
+ v(this, i);
20
+ this.color = "primary", y(this, i, this.attachInternals());
21
+ }
22
+ connectedCallback() {
23
+ super.connectedCallback(), s(this, i).role = this.decorative ? "generic" : "separator", s(this, i).ariaOrientation = this.vertical ? "vertical" : "horizontal";
19
24
  }
20
25
  render() {
21
- return d(this.decorative, this.renderDecorative, this.renderDefault);
26
+ return C`<div id="root"></div>`;
22
27
  }
23
28
  };
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");
29
+ i = new WeakMap(), m.styles = [b, _];
30
+ let a = m;
31
+ c([
32
+ p({ reflect: !0 })
33
+ ], a.prototype, "color");
34
+ c([
35
+ p({ type: Boolean })
36
+ ], a.prototype, "decorative");
37
+ c([
38
+ p({ type: Boolean, reflect: !0 })
39
+ ], a.prototype, "vertical");
35
40
  export {
36
- e as SkfDivider
41
+ a as SkfDivider
37
42
  };
@@ -1,10 +1,6 @@
1
1
  import { css as r } from "lit";
2
2
  const i = r`
3
- :host {
4
- display: contents;
5
- }
6
-
7
- #divider {
3
+ #root {
8
4
  --_skf-divider-border-color: var(--skf-border-color-primary);
9
5
  --_skf-divider-border: var(--skf-border-width-sm) solid var(--_skf-divider-border-color);
10
6
 
@@ -5,13 +5,23 @@ import { type CSSResultGroup } from 'lit';
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
  }
@@ -0,0 +1,34 @@
1
+ import { SkfElement as n } from "../../internal/components/skf-element.js";
2
+ import u from "../../styles/component.styles.js";
3
+ import "lit";
4
+ import { property as a } from "lit/decorators.js";
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
+ };
12
+ const e = class e extends n {
13
+ constructor() {
14
+ super(...arguments), this.as = "h1";
15
+ }
16
+ render() {
17
+ return y`
18
+ <${l(this.as)} id="root">
19
+ <slot></slot>
20
+ </${l(this.as)}>
21
+ `;
22
+ }
23
+ };
24
+ e.styles = [u, c];
25
+ let r = e;
26
+ f([
27
+ a({ reflect: !0 })
28
+ ], r.prototype, "as");
29
+ f([
30
+ a({ attribute: "styled-as" })
31
+ ], r.prototype, "styledAs");
32
+ export {
33
+ r as SkfHeading
34
+ };
@@ -0,0 +1,6 @@
1
+ import { SkfHeading as e } from "./heading.component.js";
2
+ e.define("skf-heading");
3
+ export {
4
+ e as SkfHeading,
5
+ e as default
6
+ };
@@ -0,0 +1,62 @@
1
+ import { css as s } from "lit";
2
+ const t = s`
3
+ @layer components {
4
+ :host {
5
+ display: contents;
6
+ }
7
+
8
+ #root {
9
+ color: var(--skf-text-color-primary);
10
+ font-size: var(--_skf-heading-size);
11
+ font-weight: var(--_skf-heading-weight);
12
+ line-height: 1.2;
13
+
14
+ /* Defaults */
15
+ :host([as='h1']) & {
16
+ --_skf-heading-size: var(--skf-font-size-700);
17
+ --_skf-heading-weight: var(--skf-font-weight-regular);
18
+ }
19
+
20
+ :host(:is([as='h2'], [as='h3'], [as='h4'])) & {
21
+ --_skf-heading-weight: var(--skf-font-weight-bold);
22
+ }
23
+
24
+ :host([as='h2']) & {
25
+ --_skf-heading-size: var(--skf-font-size-300);
26
+ }
27
+
28
+ :host([as='h3']) & {
29
+ --_skf-heading-size: var(--skf-font-size-200);
30
+ }
31
+
32
+ :host([as='h4']) & {
33
+ --_skf-heading-size: var(--skf-font-size-200);
34
+ }
35
+
36
+ /** Styled As */
37
+ :host([styled-as='h1']) & {
38
+ --_skf-heading-size: var(--skf-font-size-700);
39
+ --_skf-heading-weight: var(--skf-font-weight-regular);
40
+ }
41
+
42
+ :host(:is([styled-as='h2'], [styled-as='h3'], [styled-as='h4'])) & {
43
+ --_skf-heading-weight: var(--skf-font-weight-bold);
44
+ }
45
+
46
+ :host([styled-as='h2']) & {
47
+ --_skf-heading-size: var(--skf-font-size-300);
48
+ }
49
+
50
+ :host([styled-as='h3']) & {
51
+ --_skf-heading-size: var(--skf-font-size-200);
52
+ }
53
+
54
+ :host([styled-as='h4']) & {
55
+ --_skf-heading-size: var(--skf-font-size-200);
56
+ }
57
+ }
58
+ }
59
+ `;
60
+ export {
61
+ t as default
62
+ };
@@ -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 })
@@ -4,7 +4,7 @@ const r = o`
4
4
  display: inline-flex;
5
5
  }
6
6
 
7
- #icon {
7
+ #root {
8
8
  --_skf-icon-size: var(--skf-icon-size-md);
9
9
 
10
10
  block-size: var(--_skf-icon-size);
@@ -14,7 +14,7 @@ import { type CSSResultGroup } from 'lit';
14
14
  * @event change - Fires when the value of the input changes
15
15
  * @event invalid - Fires when the input is invalid
16
16
  *
17
- * @slot Default - Alternatively, you can use the `label` attribute
17
+ * @slot - The Inputs label. Alternatively, you can use the `label` attribute.
18
18
  *
19
19
  * @tagname skf-input
20
20
  *
@@ -24,57 +24,63 @@ import { type CSSResultGroup } from 'lit';
24
24
  export declare class SkfInput extends FormBase implements FormFieldBaseProps {
25
25
  static styles: CSSResultGroup;
26
26
  private customError;
27
- /** If provided, renders a custom aria-label for the clear button **Notice!** Only applicable to type=search. */
27
+ /** Custom aria-label for the clear button. **Notice!** Only applicable to type=search. */
28
28
  buttonAriaLabelClear: string;
29
- /** If provided, renders a custom aria-label for the visibility button. **Notice!** Only applicable to type=password. */
29
+ /** Custom aria-label for the visibility button. **Notice!** Only applicable to type=password. */
30
30
  buttonAriaLabelHide: string;
31
- /** If provided, renders a custom aria-label for the visibility button **Notice!** Only applicable to type=password. */
31
+ /** Custom aria-label for the visibility button **Notice!** Only applicable to type=password. */
32
32
  buttonAriaLabelShow: string;
33
- /** If provided, forces component to invalid state until removed. Its value is used as hint text. */
33
+ /** If defined, forces component to invalid state until removed. Its value is used as hint text. */
34
34
  set customInvalid(value: string | undefined);
35
35
  get customInvalid(): string | undefined;
36
- /** If provided, outputs helping hints in console */
37
- debug: boolean;
36
+ /** If true, outputs helping hints in console */
37
+ debug?: boolean;
38
38
  /** If true, hides the label visually */
39
- hideLabel: boolean;
40
- /** If provided, displays informational text below the field */
39
+ hideLabel?: boolean;
40
+ /** If defined, displays informational text below the field */
41
41
  hint?: string;
42
- /** If provided, tells what keyboard to use if applicable */
42
+ /** Tells what keyboard to use if applicable */
43
43
  inputmode: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
44
- /** The input's label. Alternatively, you can use the `label` attribute. */
44
+ /** If defined, sets the input's label. Alternatively, you can use the `label` attribute. */
45
45
  label?: string;
46
- /** If provided, displays a prefix/adornment before the input-element */
46
+ /** If defined, displays a prefix/adornment before the input-element */
47
47
  leading?: string;
48
- /** If provided, sets the maximum value to accept for this input */
48
+ /** If defined, sets the maximum value to accept for this input */
49
49
  max?: number | string;
50
- /** If provided, sets the maximum character length to accept for this input */
50
+ /** If defined, sets the maximum character length to accept for this input */
51
51
  maxLength?: number;
52
- /** If provided, sets the minimum value to accept for this input */
52
+ /** If defined, sets the minimum value to accept for this input */
53
53
  min?: number | string;
54
- /** If provided, sets the minimum character length to accept for this input */
54
+ /** If defined, sets the minimum character length to accept for this input */
55
55
  minLength?: number;
56
- /** If provided, adds name to the input-element */
56
+ /** If defined, adds name to the input-element */
57
57
  name?: string;
58
- /** If provided, adds name to the input-element */
58
+ /** If defined, adds name to the input-element */
59
59
  pattern?: string;
60
- /** If provided, displays placeholder text */
60
+ /** If defined, displays placeholder text */
61
61
  placeholder?: string;
62
62
  /** If true, makes the element not mutable, meaning the user can not edit the control */
63
63
  readonly?: boolean;
64
- /** If provided, renders an alternative A11y text for the asterisk */
64
+ /** If defined, renders an alternative A11y text for the asterisk */
65
65
  requiredLabel?: string;
66
- /** If provided, displays provided severity state */
66
+ /**
67
+ * If defined, displays provided severity state
68
+ * @type { "alert" | "success" | "info" | "warning" }
69
+ */
67
70
  severity?: FormFieldBaseProps['severity'];
68
- /** If provided, displays provided severity state */
71
+ /** If true, displays valid state after interaction */
69
72
  showValid?: boolean;
70
- /** If provided, displays an alternative size */
71
- size?: 'sm' | 'md';
72
- /** If provided, displays a suffix/adornment after the input-element */
73
+ /** Size of the input */
74
+ size: 'sm' | 'md';
75
+ /** If defined, displays a suffix/adornment after the input-element */
73
76
  trailing?: string;
74
- /** If provided, changes the type of form control */
77
+ /**
78
+ * Type of input control
79
+ * @type { 'button' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week' }
80
+ */
75
81
  type?: Exclude<FormFieldBaseProps['type'], 'checkbox' | 'radio'>;
76
- /** If provided, sets validation start, "input", "change" or "submit" */
77
- validateOn?: 'input' | 'change' | 'submit';
82
+ /** Sets validation start */
83
+ validateOn: 'input' | 'change' | 'submit';
78
84
  /** The current value of the input field */
79
85
  value: string;
80
86
  /** @internal */
@@ -88,7 +94,6 @@ export declare class SkfInput extends FormBase implements FormFieldBaseProps {
88
94
  private _numberController;
89
95
  /** @internal */
90
96
  private _passwordController;
91
- constructor();
92
97
  protected firstUpdated(): void;
93
98
  willUpdate(changedProperties: Map<string | number | symbol, unknown>): void;
94
99
  attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;