@skf-design-system/ui-components 1.0.0-beta.5 → 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 (130) hide show
  1. package/dist/components/accordion/accordion-item.d.ts +1 -1
  2. package/dist/components/accordion/accordion.component.d.ts +4 -4
  3. package/dist/components/accordion/accordion.component.js +18 -17
  4. package/dist/components/accordion/accordion.styles.d.ts +1 -2
  5. package/dist/components/accordion/accordion.styles.js +5 -4
  6. package/dist/components/alert/alert.component.d.ts +3 -3
  7. package/dist/components/alert/alert.component.js +44 -33
  8. package/dist/components/alert/alert.styles.d.ts +1 -2
  9. package/dist/components/alert/alert.styles.js +29 -24
  10. package/dist/components/button/button.component.d.ts +26 -4
  11. package/dist/components/button/button.component.js +78 -54
  12. package/dist/components/button/button.styles.js +1 -0
  13. package/dist/components/card/card.component.d.ts +4 -4
  14. package/dist/components/card/card.component.js +35 -24
  15. package/dist/components/card/card.styles.d.ts +1 -2
  16. package/dist/components/card/card.styles.js +14 -12
  17. package/dist/components/checkbox/checkbox.component.d.ts +11 -12
  18. package/dist/components/checkbox/checkbox.component.js +95 -89
  19. package/dist/components/collapse/collapse.component.d.ts +8 -8
  20. package/dist/components/collapse/collapse.component.js +42 -34
  21. package/dist/components/collapse/collapse.styles.js +15 -14
  22. package/dist/components/dialog/dialog.component.d.ts +75 -0
  23. package/dist/components/dialog/dialog.component.js +189 -0
  24. package/dist/components/dialog/dialog.d.ts +8 -0
  25. package/dist/components/dialog/dialog.js +6 -0
  26. package/dist/components/dialog/dialog.styles.js +91 -0
  27. package/dist/components/divider/divider.component.d.ts +3 -3
  28. package/dist/components/divider/divider.component.js +39 -27
  29. package/dist/components/divider/divider.styles.d.ts +1 -2
  30. package/dist/components/divider/divider.styles.js +26 -26
  31. package/dist/components/heading/heading.component.d.ts +2 -2
  32. package/dist/components/icon/icon.component.d.ts +1 -1
  33. package/dist/components/input/input.component.d.ts +12 -11
  34. package/dist/components/input/input.component.js +88 -89
  35. package/dist/components/link/link.component.d.ts +6 -6
  36. package/dist/components/link/link.component.js +20 -14
  37. package/dist/components/link/link.styles.js +36 -40
  38. package/dist/components/loader/loader.component.d.ts +2 -2
  39. package/dist/components/loader/loader.component.js +32 -25
  40. package/dist/components/loader/loader.styles.js +11 -10
  41. package/dist/components/logo/logo.component.d.ts +3 -3
  42. package/dist/components/logo/logo.component.js +25 -14
  43. package/dist/components/logo/logo.styles.d.ts +1 -2
  44. package/dist/components/logo/logo.styles.js +11 -9
  45. package/dist/components/progress/progress.component.d.ts +22 -0
  46. package/dist/components/progress/progress.component.js +49 -0
  47. package/dist/components/progress/progress.d.ts +8 -0
  48. package/dist/components/progress/progress.js +6 -0
  49. package/dist/components/progress/progress.styles.js +48 -0
  50. package/dist/components/radio/radio.component.d.ts +7 -9
  51. package/dist/components/radio/radio.component.js +93 -77
  52. package/dist/components/select/select.component.d.ts +2 -2
  53. package/dist/components/select/select.component.js +16 -13
  54. package/dist/components/select/select.controllers.d.ts +1 -1
  55. package/dist/components/select-option/select-option.component.d.ts +1 -1
  56. package/dist/components/select-option/select-option.controllers.d.ts +1 -1
  57. package/dist/components/select-option-group/select-option-group.component.d.ts +1 -1
  58. package/dist/components/switch/switch.component.d.ts +2 -2
  59. package/dist/components/switch/switch.component.js +17 -7
  60. package/dist/components/switch/switch.styles.js +16 -13
  61. package/dist/components/tab/tab.component.d.ts +29 -0
  62. package/dist/components/tab/tab.component.js +57 -0
  63. package/dist/components/tab/tab.d.ts +8 -0
  64. package/dist/components/tab/tab.js +6 -0
  65. package/dist/components/tab/tab.styles.d.ts +1 -0
  66. package/dist/components/tab/tab.styles.js +123 -0
  67. package/dist/components/tab-group/tab-group.component.d.ts +43 -0
  68. package/dist/components/tab-group/tab-group.component.js +98 -0
  69. package/dist/components/tab-group/tab-group.d.ts +8 -0
  70. package/dist/components/tab-group/tab-group.js +6 -0
  71. package/dist/components/tab-group/tab-group.styles.d.ts +1 -0
  72. package/dist/components/tab-group/tab-group.styles.js +75 -0
  73. package/dist/components/tab-panel/tab-panel.component.d.ts +19 -0
  74. package/dist/components/tab-panel/tab-panel.component.js +36 -0
  75. package/dist/components/tab-panel/tab-panel.d.ts +8 -0
  76. package/dist/components/tab-panel/tab-panel.js +6 -0
  77. package/dist/components/tab-panel/tab-panel.styles.d.ts +1 -0
  78. package/dist/components/tab-panel/tab-panel.styles.js +13 -0
  79. package/dist/components/tag/tag.component.d.ts +2 -2
  80. package/dist/components/tag/tag.component.js +61 -45
  81. package/dist/components/tag/tag.styles.js +30 -28
  82. package/dist/components/textarea/textarea.component.d.ts +4 -4
  83. package/dist/components/textarea/textarea.component.js +5 -5
  84. package/dist/components/toast/toast.component.d.ts +1 -1
  85. package/dist/components/toast/toast.component.js +13 -13
  86. package/dist/components/toast/toast.singleton.d.ts +3 -3
  87. package/dist/components/toast/toast.styles.d.ts +1 -0
  88. package/dist/components/toast-item/toast-item.component.d.ts +1 -1
  89. package/dist/components/toast-item/toast-item.component.js +1 -1
  90. package/dist/components/toast-wrapper/toast-wrapper.component.d.ts +2 -2
  91. package/dist/components/toast-wrapper/toast-wrapper.component.js +1 -1
  92. package/dist/components/toast-wrapper/toast-wrapper.styles.d.ts +1 -0
  93. package/dist/custom-elements.json +1170 -511
  94. package/dist/index.d.ts +5 -0
  95. package/dist/index.js +59 -44
  96. package/dist/internal/components/formBase.d.ts +1 -0
  97. package/dist/internal/components/formBase.js +11 -11
  98. package/dist/internal/components/hint/hint.component.d.ts +2 -2
  99. package/dist/internal/components/skf-element.js +26 -25
  100. package/dist/internal/helpers/hintSeverity.d.ts +1 -1
  101. package/dist/internal/helpers/watch.d.ts +27 -0
  102. package/dist/internal/helpers/watch.js +28 -0
  103. package/dist/internal/templates/asterisk.d.ts +1 -1
  104. package/dist/internal/templates/asterisk.js +7 -6
  105. package/dist/react/index.d.ts +7 -2
  106. package/dist/react/index.js +7 -2
  107. package/dist/react/skf-button/index.d.ts +7 -1
  108. package/dist/react/skf-button/index.js +5 -1
  109. package/dist/react/skf-dialog/index.d.ts +15 -0
  110. package/dist/react/skf-dialog/index.js +19 -0
  111. package/dist/react/skf-progress/index.d.ts +3 -0
  112. package/dist/react/skf-progress/index.js +13 -0
  113. package/dist/react/skf-tab/index.d.ts +12 -0
  114. package/dist/react/skf-tab/index.js +18 -0
  115. package/dist/react/skf-tab-group/index.d.ts +3 -0
  116. package/dist/react/skf-tab-group/index.js +13 -0
  117. package/dist/react/skf-tab-panel/index.d.ts +3 -0
  118. package/dist/react/skf-tab-panel/index.js +13 -0
  119. package/dist/styles/component.styles.js +15 -2
  120. package/dist/types/jsx/custom-element-jsx.d.ts +246 -101
  121. package/dist/types/vue/index.d.ts +215 -65
  122. package/dist/vscode.html-custom-data.json +276 -182
  123. package/dist/web-types.json +556 -248
  124. package/package.json +33 -32
  125. /package/dist/components/{toast-wrapper/toast-wrapper.style.d.ts → dialog/dialog.styles.d.ts} +0 -0
  126. /package/dist/components/{toast/toast.style.d.ts → progress/progress.styles.d.ts} +0 -0
  127. /package/dist/components/toast/{toast.style.js → toast.styles.js} +0 -0
  128. /package/dist/components/toast-item/{toast-item.style.d.ts → toast-item.styles.d.ts} +0 -0
  129. /package/dist/components/toast-item/{toast-item.style.js → toast-item.styles.js} +0 -0
  130. /package/dist/components/toast-wrapper/{toast-wrapper.style.js → toast-wrapper.styles.js} +0 -0
@@ -0,0 +1,75 @@
1
+ import { css as r } from "lit";
2
+ const a = r`
3
+ /* stylelint-disable selector-class-pattern */
4
+ @layer components {
5
+ :host {
6
+ contain: layout;
7
+ }
8
+
9
+ :host([stretch]) {
10
+ block-size: 100%;
11
+ }
12
+
13
+ /**
14
+ * Root
15
+ */
16
+ .tab-group {
17
+ background-color: var(--skf-bg-color-neutral-1);
18
+ }
19
+
20
+ .tab-group--expanded {
21
+ border: var(
22
+ --_skf-tab-group-border,
23
+ var(--skf-border-width-sm) solid var(--skf-border-color-tertiary)
24
+ );
25
+ border-end-end-radius: var(--skf-border-radius-sm);
26
+ border-end-start-radius: var(--skf-border-radius-sm);
27
+ box-shadow: var(--skf-shadow-md);
28
+
29
+ ::slotted(skf-tab) {
30
+ flex: 1;
31
+ }
32
+ }
33
+
34
+ .tab-group--no-border {
35
+ --_skf-tab-group-border: none;
36
+ }
37
+
38
+ .tab-group--stretch {
39
+ block-size: inherit;
40
+ display: flex;
41
+ flex-direction: column;
42
+ }
43
+
44
+ /**
45
+ * Tabs
46
+ */
47
+ .tab-group__tabs {
48
+ display: flex;
49
+
50
+ .tab-group--compressed & {
51
+ gap: var(--skf-spacing-100);
52
+ }
53
+ }
54
+
55
+ /**
56
+ * Body
57
+ */
58
+ .tab-group__body {
59
+ padding-block: var(--_skf-tab-group-body-padding-block, var(--skf-spacing-100) 0);
60
+
61
+ .tab-group--stretch & {
62
+ overflow-y: auto;
63
+ }
64
+
65
+ .tab-group--expanded:not(.tab-group--no-padding) & {
66
+ --_skf-tab-group-body-padding-block: var(--skf-spacing-100);
67
+
68
+ padding-inline: var(--skf-spacing-100);
69
+ }
70
+ }
71
+ }
72
+ `;
73
+ export {
74
+ a as styles
75
+ };
@@ -0,0 +1,19 @@
1
+ import { SkfElement } from '../../internal/components/skf-element';
2
+ import { type CSSResultGroup } from 'lit';
3
+ /**
4
+ * The `<skf-tab-panel>` is a component that displays a list of actions or options.
5
+ *
6
+ * @slot - The tab panel's content
7
+ *
8
+ * @tagname skf-tab-panel
9
+ */
10
+ export declare class SkfTabPanel extends SkfElement {
11
+ static styles: CSSResultGroup;
12
+ /** The tab panel's name. */
13
+ name: string;
14
+ active: boolean;
15
+ constructor();
16
+ /** @internal */
17
+ handleActiveChanged(): void;
18
+ render(): import("lit").TemplateResult<1>;
19
+ }
@@ -0,0 +1,36 @@
1
+ import { SkfElement as c } from "../../internal/components/skf-element.js";
2
+ import { watch as h } from "../../internal/helpers/watch.js";
3
+ import l from "../../styles/component.styles.js";
4
+ import { html as v } from "lit";
5
+ import { property as f, state as d } from "lit/decorators.js";
6
+ import { styles as y } from "./tab-panel.styles.js";
7
+ var u = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, a = (n, r, s, o) => {
8
+ for (var t = o > 1 ? void 0 : o ? _(r, s) : r, i = n.length - 1, p; i >= 0; i--)
9
+ (p = n[i]) && (t = (o ? p(r, s, t) : p(t)) || t);
10
+ return o && t && u(r, s, t), t;
11
+ };
12
+ const m = class m extends c {
13
+ constructor() {
14
+ super(), this.name = "", this.active = !1, this.role = "tabpanel";
15
+ }
16
+ handleActiveChanged() {
17
+ this.ariaHidden = this.active ? "false" : "true", this.tabIndex = this.active ? 0 : -1;
18
+ }
19
+ render() {
20
+ return v`<slot></slot>`;
21
+ }
22
+ };
23
+ m.styles = [l, y];
24
+ let e = m;
25
+ a([
26
+ f()
27
+ ], e.prototype, "name", 2);
28
+ a([
29
+ d()
30
+ ], e.prototype, "active", 2);
31
+ a([
32
+ h("active")
33
+ ], e.prototype, "handleActiveChanged", 1);
34
+ export {
35
+ e as SkfTabPanel
36
+ };
@@ -0,0 +1,8 @@
1
+ import { SkfTabPanel } from './tab-panel.component';
2
+ export * from './tab-panel.component';
3
+ export default SkfTabPanel;
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'skf-tab-panel': SkfTabPanel;
7
+ }
8
+ }
@@ -0,0 +1,6 @@
1
+ import { SkfTabPanel as a } from "./tab-panel.component.js";
2
+ a.define("skf-tab-panel");
3
+ export {
4
+ a as SkfTabPanel,
5
+ a as default
6
+ };
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,13 @@
1
+ import { css as i } from "lit";
2
+ const s = i`
3
+ :host {
4
+ content-visibility: hidden;
5
+ }
6
+
7
+ :host([aria-hidden='false']) {
8
+ content-visibility: visible;
9
+ }
10
+ `;
11
+ export {
12
+ s as styles
13
+ };
@@ -1,5 +1,5 @@
1
- import '@components/icon/icon.js';
2
- import { SkfElement } from '@internal/components/skf-element';
1
+ import '../icon/icon.js';
2
+ import { SkfElement } from '../../internal/components/skf-element';
3
3
  import type { Icon, SeverityBgColor } from '@skf-design-system/ui-assets';
4
4
  import { type CSSResultGroup } from 'lit';
5
5
  /**
@@ -1,36 +1,37 @@
1
1
  import "../icon/icon.js";
2
2
  import { SkfElement as u } from "../../internal/components/skf-element.js";
3
- import d from "../../styles/component.styles.js";
4
- import { html as a, nothing as m } from "lit";
5
- import { property as s, query as f } from "lit/decorators.js";
6
- import { ifDefined as v } from "lit/directives/if-defined.js";
3
+ import f from "../../styles/component.styles.js";
4
+ import { html as a, nothing as p } from "lit";
5
+ import { property as l, query as d } from "lit/decorators.js";
6
+ import { classMap as v } from "lit/directives/class-map.js";
7
+ import { ifDefined as _ } from "lit/directives/if-defined.js";
7
8
  import { styles as k } from "./tag.styles.js";
8
- var y = Object.defineProperty, C = Object.getOwnPropertyDescriptor, r = (p, e, i, n) => {
9
- for (var t = n > 1 ? void 0 : n ? C(e, i) : e, l = p.length - 1, c; l >= 0; l--)
10
- (c = p[l]) && (t = (n ? c(e, i, t) : c(t)) || t);
11
- return n && t && y(e, i, t), t;
9
+ var b = Object.defineProperty, y = Object.getOwnPropertyDescriptor, i = (m, t, s, r) => {
10
+ for (var e = r > 1 ? void 0 : r ? y(t, s) : t, n = m.length - 1, c; n >= 0; n--)
11
+ (c = m[n]) && (e = (r ? c(t, s, e) : c(e)) || e);
12
+ return r && e && b(t, s, e), e;
12
13
  };
13
14
  const h = class h extends u {
14
15
  constructor() {
15
- super(...arguments), this.size = "md", this._handleKeyDown = (e) => {
16
- (e.key === "Enter" || e.key === " ") && this.$removeButton.click();
17
- }, this._handleRemove = (e) => {
18
- this._onRemove && this._onRemove(e);
19
- }, this._handleClick = (e) => {
20
- var t;
21
- e.stopPropagation();
22
- const i = e.composedPath()[0];
23
- console.log("$clickTarget", i), i.localName === "button" ? this.remove() : (t = this.onClick) == null || t.call(this, e);
16
+ super(...arguments), this.size = "md", this._handleKeyDown = (t) => {
17
+ (t.key === "Enter" || t.key === " ") && this.$removeButton.click();
18
+ }, this._handleRemove = (t) => {
19
+ this._onRemove && this._onRemove(t);
20
+ }, this._handleClick = (t) => {
21
+ var e;
22
+ t.stopPropagation();
23
+ const s = t.composedPath()[0];
24
+ console.log("$clickTarget", s), s.localName === "button" ? this.remove() : (e = this.onClick) == null || e.call(this, t);
24
25
  };
25
26
  }
26
- set onClick(e) {
27
- e && (this._onClick = e);
27
+ set onClick(t) {
28
+ t && (this._onClick = t);
28
29
  }
29
30
  get onClick() {
30
31
  return this._onClick;
31
32
  }
32
- set onRemove(e) {
33
- e && (this._onRemove = e);
33
+ set onRemove(t) {
34
+ t && (this._onRemove = t);
34
35
  }
35
36
  get onRemove() {
36
37
  return this._onRemove;
@@ -41,47 +42,62 @@ const h = class h extends u {
41
42
  disconnectedCallback() {
42
43
  super.disconnectedCallback(), this.removeEventListener("click", this._handleClick);
43
44
  }
44
- attributeChangedCallback(e, i, n) {
45
- super.attributeChangedCallback(e, i, n), e === "removable" && n !== null ? this.addEventListener("keydown", this._handleKeyDown) : this.removeEventListener("keydown", this._handleKeyDown);
45
+ attributeChangedCallback(t, s, r) {
46
+ super.attributeChangedCallback(t, s, r), t === "removable" && r !== null ? this.addEventListener("keydown", this._handleKeyDown) : this.removeEventListener("keydown", this._handleKeyDown);
46
47
  }
47
48
  render() {
48
49
  return a`
49
- <div id="root">
50
- ${this.icon ? a`<skf-icon color=${v(this.color)} name=${this.icon} size="sm"></skf-icon>` : m}
51
- <span>
52
- <slot></slot>
53
- </span>
50
+ <div
51
+ class=${v({
52
+ tag: !0,
53
+ "tag--color-alert": this.color === "alert",
54
+ "tag--color-error": this.color === "error",
55
+ "tag--color-info": this.color === "info",
56
+ "tag--color-success": this.color === "success",
57
+ "tag--color-warning": this.color === "warning",
58
+ "tag--small": this.size === "sm"
59
+ })}
60
+ >
61
+ ${this.icon ? a`
62
+ <skf-icon
63
+ class="tag__icon"
64
+ color=${_(this.color)}
65
+ name=${this.icon}
66
+ size="sm"
67
+ ></skf-icon>
68
+ ` : p}
69
+ <slot class="tag__slot"></slot>
54
70
  ${this.removable ? a`
55
- <button @click=${this._handleRemove} type="button">
71
+ <button @click=${this._handleRemove} class="tag__btn" type="button">
56
72
  <skf-icon name="close" size="xs"></skf-icon>
57
73
  </button>
58
- ` : m}
74
+ ` : p}
59
75
  </div>
60
76
  `;
61
77
  }
62
78
  };
63
- h.styles = [d, k];
79
+ h.styles = [f, k];
64
80
  let o = h;
65
- r([
66
- s({ reflect: !0 })
81
+ i([
82
+ l({ reflect: !0 })
67
83
  ], o.prototype, "size", 2);
68
- r([
69
- s()
84
+ i([
85
+ l()
70
86
  ], o.prototype, "icon", 2);
71
- r([
72
- s({ reflect: !0 })
87
+ i([
88
+ l({ reflect: !0 })
73
89
  ], o.prototype, "color", 2);
74
- r([
75
- s({ attribute: !1 })
90
+ i([
91
+ l({ attribute: !1 })
76
92
  ], o.prototype, "onClick", 1);
77
- r([
78
- s({ attribute: !1 })
93
+ i([
94
+ l({ attribute: !1 })
79
95
  ], o.prototype, "onRemove", 1);
80
- r([
81
- s({ type: Boolean, reflect: !0 })
96
+ i([
97
+ l({ type: Boolean, reflect: !0 })
82
98
  ], o.prototype, "removable", 2);
83
- r([
84
- f("button")
99
+ i([
100
+ d("button")
85
101
  ], o.prototype, "$removeButton", 2);
86
102
  export {
87
103
  o as SkfTag
@@ -1,7 +1,8 @@
1
1
  import { css as r } from "lit";
2
2
  const s = r`
3
+ /* stylelint-disable selector-class-pattern */
3
4
  @layer components {
4
- #root {
5
+ .tag {
5
6
  align-items: center;
6
7
  background-color: var(--_skf-tag-bg-color, var(--skf-bg-color-neutral-1));
7
8
  block-size: var(--_skf-tag-height, var(--skf-size-32));
@@ -14,46 +15,47 @@ const s = r`
14
15
  gap: var(--skf-spacing-25);
15
16
  max-inline-size: 48ch;
16
17
  padding-inline: var(--skf-spacing-50);
18
+ }
17
19
 
18
- :host([color='alert']) & {
19
- --_skf-tag-bg-color: var(--skf-severity-bg-color-alert);
20
- --_skf-tag-border-color: var(--skf-severity-fg-color-alert);
21
- }
20
+ .tag--color-alert {
21
+ --_skf-tag-bg-color: var(--skf-severity-bg-color-alert);
22
+ --_skf-tag-border-color: var(--skf-severity-fg-color-alert);
23
+ }
22
24
 
23
- :host([color='error']) & {
24
- --_skf-tag-bg-color: var(--skf-severity-bg-color-error);
25
- --_skf-tag-border-color: var(--skf-severity-fg-color-error);
26
- }
25
+ .tag--color-error {
26
+ --_skf-tag-bg-color: var(--skf-severity-bg-color-error);
27
+ --_skf-tag-border-color: var(--skf-severity-fg-color-error);
28
+ }
27
29
 
28
- :host([color='info']) & {
29
- --_skf-tag-bg-color: var(--skf-severity-bg-color-info);
30
- --_skf-tag-border-color: var(--skf-severity-fg-color-info);
31
- }
30
+ .tag--color-info {
31
+ --_skf-tag-bg-color: var(--skf-severity-bg-color-info);
32
+ --_skf-tag-border-color: var(--skf-severity-fg-color-info);
33
+ }
32
34
 
33
- :host([color='success']) & {
34
- --_skf-tag-bg-color: var(--skf-severity-bg-color-success);
35
- --_skf-tag-border-color: var(--skf-severity-fg-color-success);
36
- }
35
+ .tag--color-success {
36
+ --_skf-tag-bg-color: var(--skf-severity-bg-color-success);
37
+ --_skf-tag-border-color: var(--skf-severity-fg-color-success);
38
+ }
37
39
 
38
- :host([color='warning']) & {
39
- --_skf-tag-bg-color: var(--skf-severity-bg-color-warning);
40
- --_skf-tag-border-color: var(--skf-severity-fg-color-warning);
41
- }
40
+ .tag--color-warning {
41
+ --_skf-tag-bg-color: var(--skf-severity-bg-color-warning);
42
+ --_skf-tag-border-color: var(--skf-severity-fg-color-warning);
43
+ }
42
44
 
43
- :host([size='sm']) & {
44
- --_skf-tag-border-radius: 0.25rem; /* token needed */
45
- --_skf-tag-font-size: var(--skf-font-size-25);
46
- --_skf-tag-height: var(--skf-size-24);
47
- }
45
+ .tag--small {
46
+ --_skf-tag-border-radius: 0.25rem; /* token needed */
47
+ --_skf-tag-font-size: var(--skf-font-size-25);
48
+ --_skf-tag-height: var(--skf-size-24);
48
49
  }
49
50
 
50
- span {
51
+ .tag__slot {
52
+ display: block;
51
53
  overflow: hidden;
52
54
  text-overflow: ellipsis;
53
55
  white-space: nowrap;
54
56
  }
55
57
 
56
- button {
58
+ .tag__btn {
57
59
  display: flex;
58
60
 
59
61
  &:focus-visible {
@@ -1,7 +1,7 @@
1
- import '@components/icon/icon.js';
2
- import { FormBase } from '@internal/components/formBase.js';
3
- import '@internal/components/hint/hint.js';
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.js';
4
+ import type { FormFieldBaseProps } from '../../internal/types/formField.js';
5
5
  import { type CSSResultGroup } from 'lit';
6
6
  interface SkfTextAreaProps extends Omit<FormFieldBaseProps, 'type'> {
7
7
  cols?: number;
@@ -4,7 +4,7 @@ import "../../internal/components/hint/hint.js";
4
4
  import { Asterisk as c } from "../../internal/templates/asterisk.js";
5
5
  import y from "../../styles/component.styles.js";
6
6
  import { html as p, nothing as v } from "lit";
7
- import { property as r, state as f, query as b } from "lit/decorators.js";
7
+ import { property as r, state as b, query as f } from "lit/decorators.js";
8
8
  import { ifDefined as n } from "lit/directives/if-defined.js";
9
9
  import g from "./textarea.styles.js";
10
10
  var $ = Object.defineProperty, E = Object.getOwnPropertyDescriptor, e = (h, t, s, a) => {
@@ -46,7 +46,7 @@ const u = class u extends m {
46
46
  attributeChangedCallback(t, s, a) {
47
47
  if (super.attributeChangedCallback(t, s, a), t === "value" && this._internals.setFormValue(a), t === "custom-invalid")
48
48
  if (typeof a == "string") {
49
- const o = String(a).trim();
49
+ const o = this.withFallback(a);
50
50
  this.pristine = !1, this._internals.setValidity({ customError: !0 }, o), this.invalid = !0, this.hint = o, this.checkValidity();
51
51
  } else
52
52
  this._internals.setValidity({}), this.validateInput();
@@ -69,7 +69,7 @@ const u = class u extends m {
69
69
  const o = this.hasAttribute(l) ? this.getAttribute(l) : this.$input.validationMessage;
70
70
  this._internals.setValidity(
71
71
  { [this.validationError]: !0, customError: this._internals.validity.customError },
72
- o ?? ""
72
+ this.withFallback(o)
73
73
  ), this.invalid && this.customErrorDisplay && this.checkValidity();
74
74
  }
75
75
  }
@@ -173,10 +173,10 @@ e([
173
173
  r()
174
174
  ], i.prototype, "value", 2);
175
175
  e([
176
- f()
176
+ b()
177
177
  ], i.prototype, "invalid", 2);
178
178
  e([
179
- b("textarea")
179
+ f("textarea")
180
180
  ], i.prototype, "$input", 2);
181
181
  function _(h, t) {
182
182
  return t ? "error" : h;
@@ -1,4 +1,4 @@
1
- import { SkfElement } from '@internal/components/skf-element';
1
+ import { SkfElement } from '../../internal/components/skf-element';
2
2
  import { type CSSResultGroup } from 'lit';
3
3
  /**
4
4
  * SkfToast is the only component a user (developer) interacts with to create a toast notification. Once rendered it will invoke a singleton instance to manage the toast notifications.
@@ -1,21 +1,21 @@
1
- import { Singleton as f } from "./toast.singleton.js";
2
- import { SkfElement as m } from "../../internal/components/skf-element.js";
3
- import { html as h } from "lit";
1
+ import { Singleton as h } from "./toast.singleton.js";
2
+ import { SkfElement as d } from "../../internal/components/skf-element.js";
3
+ import { html as f } from "lit";
4
4
  import { property as s, queryAssignedNodes as y } from "lit/decorators.js";
5
- import { styles as a } from "./toast.style.js";
6
- var u = Object.defineProperty, o = (l, r, n, b) => {
7
- for (var e = void 0, i = l.length - 1, d; i >= 0; i--)
8
- (d = l[i]) && (e = d(r, n, e) || e);
9
- return e && u(r, n, e), e;
5
+ import { styles as a } from "./toast.styles.js";
6
+ var u = Object.defineProperty, o = (l, i, n, b) => {
7
+ for (var e = void 0, r = l.length - 1, m; r >= 0; r--)
8
+ (m = l[r]) && (e = m(i, n, e) || e);
9
+ return e && u(i, n, e), e;
10
10
  };
11
- const p = class p extends m {
11
+ const p = class p extends d {
12
12
  constructor() {
13
13
  super(), this.closeable = !1, this.debug = !1, this.severity = "info", this.timer = 5, this._singleton = void 0;
14
14
  }
15
15
  firstUpdated() {
16
- this._singleton = new f(this.getRootNode()), this._singleton.addData({
17
- text: this._slottedText.map((r) => r.textContent).join(),
18
- timer: this.timer,
16
+ this._singleton = new h(this.getRootNode()), this._singleton.addData({
17
+ text: this._slottedText.map((i) => i.textContent).join(),
18
+ timer: this.timer = this.timer && this.timer < 5 ? 5 : this.timer,
19
19
  closeable: this.closeable,
20
20
  originEl: this,
21
21
  severity: this.severity,
@@ -24,7 +24,7 @@ const p = class p extends m {
24
24
  });
25
25
  }
26
26
  render() {
27
- return h`<slot></slot>`;
27
+ return f`<slot></slot>`;
28
28
  }
29
29
  };
30
30
  p.styles = [a];
@@ -1,6 +1,6 @@
1
- import '@components/toast-item/toast-item.js';
2
- import '@components/toast-wrapper/toast-wrapper.js';
3
- import type { SkfToast } from '@components/toast/toast.component.js';
1
+ import '../toast-item/toast-item.js';
2
+ import '../toast-wrapper/toast-wrapper.js';
3
+ import type { SkfToast } from '../toast/toast.component.js';
4
4
  interface ToastData {
5
5
  text: string;
6
6
  timer: number;
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -1,4 +1,4 @@
1
- import { SkfAlert } from '@components/alert/alert.component.js';
1
+ import { SkfAlert } from '../alert/alert.component.js';
2
2
  export declare class SkfToastItem extends SkfAlert {
3
3
  static styles: import("lit").CSSResultGroup[];
4
4
  protected _closeableInitialState: boolean;
@@ -1,7 +1,7 @@
1
1
  import { SkfAlert as l } from "../alert/alert.component.js";
2
2
  import { MOTION_DURATIONS as h } from "@skf-design-system/ui-assets";
3
3
  import { property as u } from "lit/decorators.js";
4
- import p from "./toast-item.style.js";
4
+ import p from "./toast-item.styles.js";
5
5
  var d = Object.defineProperty, f = (a, t, e, m) => {
6
6
  for (var i = void 0, r = a.length - 1, o; r >= 0; r--)
7
7
  (o = a[r]) && (i = o(t, e, i) || i);
@@ -1,5 +1,5 @@
1
- import type { SkfAlert } from '@components/alert/alert.component.js';
2
- import { SkfElement } from '@internal/components/skf-element';
1
+ import type { SkfAlert } from '../alert/alert.component.js';
2
+ import { SkfElement } from '../../internal/components/skf-element';
3
3
  import { type CSSResultGroup } from 'lit';
4
4
  /**
5
5
  * The `<skf-toast-wrapper>` is a component without UI that positions where the toast shows up on the screen. The toast-wrapper is used internally by the toast component.
@@ -2,7 +2,7 @@ import { SkfElement as h } from "../../internal/components/skf-element.js";
2
2
  import d from "../../styles/component.styles.js";
3
3
  import { html as m } from "lit";
4
4
  import { property as p, queryAssignedElements as a } from "lit/decorators.js";
5
- import { styles as u } from "./toast-wrapper.style.js";
5
+ import { styles as u } from "./toast-wrapper.styles.js";
6
6
  var y = Object.defineProperty, r = (l, i, n, g) => {
7
7
  for (var t = void 0, o = l.length - 1, f; o >= 0; o--)
8
8
  (f = l[o]) && (t = f(i, n, t) || t);
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;