@skf-design-system/ui-components 0.0.1-beta.4 → 1.0.0-alpha.27

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 (104) 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 -4
  6. package/dist/components/alert/alert.component.js +1 -1
  7. package/dist/components/alert/alert.styles.js +1 -1
  8. package/dist/components/button/button.component.js +1 -1
  9. package/dist/components/button/button.styles.js +1 -1
  10. package/dist/components/card/card.component.d.ts +3 -3
  11. package/dist/components/card/card.component.js +16 -19
  12. package/dist/components/card/card.styles.js +11 -3
  13. package/dist/components/checkbox/checkbox.component.d.ts +16 -9
  14. package/dist/components/checkbox/checkbox.component.js +32 -31
  15. package/dist/components/checkbox/checkbox.styles.js +7 -2
  16. package/dist/components/checkbox/checkbox.test.d.ts +1 -0
  17. package/dist/components/collapse/collapse.component.d.ts +9 -6
  18. package/dist/components/collapse/collapse.component.js +39 -36
  19. package/dist/components/collapse/collapse.styles.js +3 -3
  20. package/dist/components/collapse/collapse.test.d.ts +1 -0
  21. package/dist/components/divider/divider.component.d.ts +13 -10
  22. package/dist/components/divider/divider.component.js +34 -29
  23. package/dist/components/divider/divider.styles.js +1 -5
  24. package/dist/components/heading/heading.component.d.ts +12 -2
  25. package/dist/components/heading/heading.component.js +14 -14
  26. package/dist/components/heading/heading.styles.js +1 -1
  27. package/dist/components/icon/icon.component.d.ts +14 -8
  28. package/dist/components/icon/icon.component.js +6 -6
  29. package/dist/components/icon/icon.styles.js +56 -54
  30. package/dist/components/input/input.component.d.ts +34 -29
  31. package/dist/components/input/input.component.js +43 -43
  32. package/dist/components/link/link.component.d.ts +15 -12
  33. package/dist/components/link/link.component.js +7 -7
  34. package/dist/components/link/link.styles.js +1 -1
  35. package/dist/components/loader/loader.component.d.ts +7 -7
  36. package/dist/components/loader/loader.component.js +35 -61
  37. package/dist/components/loader/loader.styles.js +42 -10
  38. package/dist/components/logo/logo.component.d.ts +5 -3
  39. package/dist/components/logo/logo.component.js +8 -8
  40. package/dist/components/logo/logo.styles.js +2 -2
  41. package/dist/components/radio/radio.component.d.ts +15 -13
  42. package/dist/components/radio/radio.component.js +3 -3
  43. package/dist/components/radio/radio.styles.js +6 -1
  44. package/dist/components/select/select.component.d.ts +137 -0
  45. package/dist/components/select/select.component.js +312 -0
  46. package/dist/components/select/select.controllers.d.ts +59 -0
  47. package/dist/components/select/select.controllers.js +169 -0
  48. package/dist/components/select/select.d.ts +8 -0
  49. package/dist/components/select/select.js +6 -0
  50. package/dist/components/select/select.styles.d.ts +1 -0
  51. package/dist/components/select/select.styles.js +131 -0
  52. package/dist/components/select-option/select-option.component.d.ts +77 -0
  53. package/dist/components/select-option/select-option.component.js +123 -0
  54. package/dist/components/select-option/select-option.controllers.d.ts +9 -0
  55. package/dist/components/select-option/select-option.d.ts +8 -0
  56. package/dist/components/select-option/select-option.js +6 -0
  57. package/dist/components/select-option/select-option.styles.d.ts +1 -0
  58. package/dist/components/select-option/select-option.styles.js +53 -0
  59. package/dist/components/select-option-group/select-option-group.component.d.ts +16 -0
  60. package/dist/components/select-option-group/select-option-group.component.js +31 -0
  61. package/dist/components/select-option-group/select-option-group.d.ts +8 -0
  62. package/dist/components/select-option-group/select-option-group.js +6 -0
  63. package/dist/components/select-option-group/select-option-group.style.d.ts +1 -0
  64. package/dist/components/select-option-group/select-option-group.style.js +18 -0
  65. package/dist/components/switch/switch.component.d.ts +2 -3
  66. package/dist/components/switch/switch.component.js +1 -1
  67. package/dist/components/switch/switch.styles.js +6 -1
  68. package/dist/components/switch/switch.test.d.ts +1 -0
  69. package/dist/components/tag/tag.component.d.ts +25 -4
  70. package/dist/components/tag/tag.component.js +66 -29
  71. package/dist/components/tag/tag.styles.js +6 -5
  72. package/dist/components/textarea/textarea.component.d.ts +26 -23
  73. package/dist/components/textarea/textarea.component.js +15 -12
  74. package/dist/custom-elements.json +969 -295
  75. package/dist/index.d.ts +3 -0
  76. package/dist/index.js +39 -30
  77. package/dist/internal/components/formBase.d.ts +18 -1
  78. package/dist/internal/components/formBase.js +25 -13
  79. package/dist/internal/components/hint/hint.component.js +12 -10
  80. package/dist/internal/components/hint/hint.styles.js +26 -10
  81. package/dist/internal/components/skf-element.d.ts +4 -4
  82. package/dist/internal/components/skf-element.js +15 -19
  83. package/dist/internal/helpers/array.d.ts +4 -0
  84. package/dist/internal/helpers/findMatchingTags.d.ts +2 -0
  85. package/dist/internal/helpers/findMatchingTags.js +12 -0
  86. package/dist/internal/helpers/hintSeverity.d.ts +2 -0
  87. package/dist/internal/helpers/hintSeverity.js +6 -0
  88. package/dist/internal/helpers/raiseError.d.ts +28 -0
  89. package/dist/internal/helpers/raiseError.js +29 -0
  90. package/dist/internal/storybook/shadowRootTraverser.d.ts +16 -6
  91. package/dist/react/index.d.ts +3 -0
  92. package/dist/react/index.js +3 -0
  93. package/dist/react/skf-select/index.d.ts +21 -0
  94. package/dist/react/skf-select/index.js +21 -0
  95. package/dist/react/skf-select-option/index.d.ts +9 -0
  96. package/dist/react/skf-select-option/index.js +17 -0
  97. package/dist/react/skf-select-option-group/index.d.ts +3 -0
  98. package/dist/react/skf-select-option-group/index.js +13 -0
  99. package/dist/styles/form-field.styles.js +11 -7
  100. package/dist/types/jsx/custom-element-jsx.d.ts +292 -140
  101. package/dist/types/vue/index.d.ts +225 -90
  102. package/dist/vscode.html-custom-data.json +299 -97
  103. package/dist/web-types.json +624 -242
  104. 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
  }
@@ -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);
@@ -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
  `;