@skf-design-system/ui-components 1.0.0-alpha.35 → 1.0.0-alpha.36

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 (52) hide show
  1. package/custom-elements.json +25490 -0
  2. package/dist/components/accordion/accordion.component.d.ts +1 -1
  3. package/dist/components/accordion/accordion.component.js +2 -2
  4. package/dist/components/card/card.component.d.ts +2 -0
  5. package/dist/components/card/card.styles.js +2 -1
  6. package/dist/components/datepicker/datepicker.component.js +1 -0
  7. package/dist/components/icon/icon.component.d.ts +1 -4
  8. package/dist/components/icon/icon.component.js +41 -53
  9. package/dist/components/icon/icon.styles.js +0 -1
  10. package/dist/components/input/input.component.js +1 -0
  11. package/dist/components/link/link.component.d.ts +15 -18
  12. package/dist/components/link/link.component.js +99 -108
  13. package/dist/components/link/link.styles.js +45 -45
  14. package/dist/components/menu/menu-item.component.d.ts +1 -1
  15. package/dist/components/menu/menu-item.component.js +8 -8
  16. package/dist/components/menu/menu-item.styles.js +8 -5
  17. package/dist/components/nav/nav-item.component.d.ts +4 -0
  18. package/dist/components/nav/nav-item.component.js +44 -25
  19. package/dist/components/nav/nav-item.styles.js +29 -25
  20. package/dist/components/nav/nav.component.d.ts +6 -0
  21. package/dist/components/nav/nav.component.js +42 -21
  22. package/dist/components/nav/nav.styles.js +15 -9
  23. package/dist/components/popover/popover.component.d.ts +4 -0
  24. package/dist/components/popover/popover.component.js +31 -23
  25. package/dist/components/progress/progress.component.d.ts +2 -0
  26. package/dist/components/progress/progress.component.js +38 -29
  27. package/dist/components/progress/progress.styles.js +3 -3
  28. package/dist/components/select/select-option-group.component.d.ts +4 -0
  29. package/dist/components/select/select-option-group.component.js +37 -18
  30. package/dist/components/select/select-option-group.style.js +12 -6
  31. package/dist/components/select/select-option.component.d.ts +5 -1
  32. package/dist/components/select/select-option.component.js +69 -52
  33. package/dist/components/select/select-option.styles.js +43 -31
  34. package/dist/components/select/select.component.d.ts +5 -1
  35. package/dist/components/select/select.component.js +47 -29
  36. package/dist/components/select/select.controllers.js +2 -1
  37. package/dist/components/textarea/textarea.component.js +5 -4
  38. package/dist/components/toast/toast.component.js +9 -9
  39. package/dist/components/toast/toast.singleton.d.ts +1 -1
  40. package/dist/components/toast/toast.singleton.js +18 -18
  41. package/dist/custom-elements.json +758 -678
  42. package/dist/internal/base-classes/popover/popover.base.d.ts +2 -2
  43. package/dist/internal/base-classes/popover/popover.base.js +17 -17
  44. package/dist/internal/base-classes/popover/popover.styles.js +4 -5
  45. package/dist/internal/components/hint/hint.component.d.ts +4 -0
  46. package/dist/internal/components/hint/hint.component.js +47 -20
  47. package/dist/internal/components/hint/hint.styles.js +29 -25
  48. package/dist/types/jsx/custom-element-jsx.d.ts +188 -70
  49. package/dist/types/vue/index.d.ts +81 -69
  50. package/dist/vscode.html-custom-data.json +91 -95
  51. package/dist/web-types.json +204 -203
  52. package/package.json +13 -13
@@ -20,6 +20,7 @@ export interface SelectOptionEvent {
20
20
  * @tagname skf-select-option
21
21
  */
22
22
  export declare class SkfSelectOption extends SkfElement {
23
+ #private;
23
24
  static styles: CSSResultGroup;
24
25
  static shadowRootOptions: {
25
26
  delegatesFocus: boolean;
@@ -53,16 +54,19 @@ export declare class SkfSelectOption extends SkfElement {
53
54
  /** Returns or sets the tags value. If value is omitted, defaults to the tags text. */
54
55
  set value(optionValue: string);
55
56
  get value(): string;
57
+ small: boolean;
56
58
  /** @internal */
57
59
  private _assignedNodes?;
58
60
  constructor();
59
61
  updated(changedProperties: Map<string | number | symbol, unknown>): void;
62
+ /** @internal */
63
+ _handleStateChange(): void;
60
64
  /**
61
65
  * @internal
62
66
  * This internal setter is to change selected state without emitting events triggering other side effects,
63
67
  * e.g deselecting previous selected in a single select. Is used by skf-select in single select mode.
64
68
  */
65
- set setSelectedDiscrete(value: boolean);
69
+ set setSelectedDiscrete(isSelected: boolean);
66
70
  /**
67
71
  * @internal
68
72
  * Returns the slotted content as a string. If no slotted content, returns an empty string.
@@ -1,22 +1,30 @@
1
- import "../icon/icon.js";
2
- import { SkfElement as u } from "../../internal/components/skf-element.js";
3
- import { componentStyles as f } from "../../styles/component.styles.js";
4
- import { LitElement as m, html as d } from "lit";
5
- import { property as l, queryAssignedNodes as _ } from "lit/decorators.js";
6
- import { ifDefined as p } from "lit/directives/if-defined.js";
7
- import { styles as y } from "./select-option.styles.js";
8
- var v = Object.defineProperty, b = Object.getOwnPropertyDescriptor, o = (h, t, s, i) => {
9
- for (var r = i > 1 ? void 0 : i ? b(t, s) : t, a = h.length - 1, c; a >= 0; a--)
10
- (c = h[a]) && (r = (i ? c(t, s, r) : c(r)) || r);
11
- return i && r && v(t, s, r), r;
1
+ var y = (e) => {
2
+ throw TypeError(e);
12
3
  };
13
- const n = class n extends u {
4
+ var v = (e, s, t) => s.has(e) || y("Cannot " + t);
5
+ var u = (e, s, t) => (v(e, s, "read from private field"), t ? t.call(e) : s.get(e)), m = (e, s, t) => s.has(e) ? y("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), f = (e, s, t, i) => (v(e, s, "write to private field"), i ? i.call(e, t) : s.set(e, t), t);
6
+ import "../icon/icon.js";
7
+ import { SkfElement as C } from "../../internal/components/skf-element.js";
8
+ import { stateMap as x } from "../../internal/helpers/stateMap.js";
9
+ import { watch as g } from "../../internal/helpers/watch.js";
10
+ import { componentStyles as N } from "../../styles/component.styles.js";
11
+ import { LitElement as T, html as _ } from "lit";
12
+ import { property as a, state as $, queryAssignedNodes as O } from "lit/decorators.js";
13
+ import { ifDefined as b } from "lit/directives/if-defined.js";
14
+ import { styles as E } from "./select-option.styles.js";
15
+ var w = Object.defineProperty, D = Object.getOwnPropertyDescriptor, l = (e, s, t, i) => {
16
+ for (var r = i > 1 ? void 0 : i ? D(s, t) : s, d = e.length - 1, p; d >= 0; d--)
17
+ (p = e[d]) && (r = (i ? p(s, t, r) : p(r)) || r);
18
+ return i && r && w(s, t, r), r;
19
+ }, n, h;
20
+ const c = class c extends C {
14
21
  constructor() {
15
- super(), this._shortcutUpdate = !1, this.disabled = !1, this.selected = !1, this._handleClick = (s) => {
16
- s.stopPropagation(), this.selected = !this.selected;
17
- };
18
- const t = this.attachInternals();
19
- t.role = "option", this._parent = this.closest("skf-select"), this._shortcutUpdate = !1;
22
+ super();
23
+ m(this, n);
24
+ m(this, h);
25
+ f(this, n, this.attachInternals()), f(this, h, u(this, n).states), this._shortcutUpdate = !1, this.disabled = !1, this.selected = !1, this.small = !1, this._handleClick = (t) => {
26
+ t.stopPropagation(), this.selected = !this.selected;
27
+ }, this.role = "option", this._parent = this.closest("skf-select"), this._shortcutUpdate = !1;
20
28
  }
21
29
  set text(t) {
22
30
  this.textContent = t.trim();
@@ -40,6 +48,9 @@ const n = class n extends u {
40
48
  }
41
49
  });
42
50
  }
51
+ _handleStateChange() {
52
+ x(u(this, h), "small").set(this.small);
53
+ }
43
54
  /**
44
55
  * @internal
45
56
  * This internal setter is to change selected state without emitting events triggering other side effects,
@@ -60,14 +71,14 @@ const n = class n extends u {
60
71
  /** @internal */
61
72
  get _slotContainsOnlyText() {
62
73
  return this._assignedNodes ? [...this._assignedNodes].every(
63
- (s) => {
64
- var i;
65
- return s.nodeType === Node.TEXT_NODE && ((i = s.textContent) == null ? void 0 : i.trim()) !== "";
74
+ (i) => {
75
+ var r;
76
+ return i.nodeType === Node.TEXT_NODE && ((r = i.textContent) == null ? void 0 : r.trim()) !== "";
66
77
  }
67
78
  ) : "";
68
79
  }
69
80
  render() {
70
- return d`
81
+ return _`
71
82
  <button
72
83
  ?disabled=${this.disabled}
73
84
  @click=${this._handleClick}
@@ -78,46 +89,52 @@ const n = class n extends u {
78
89
  <slot>${this.text}</slot>
79
90
  <div id="adornments">
80
91
  <slot name="icon">
81
- ${this.icon && d`
92
+ ${this.icon && _`
82
93
  <skf-icon
83
- color=${p(this.iconColor)}
84
- data-color=${p((this.disabled || !this.iconColor) && "custom")}
94
+ color=${b(this.iconColor)}
95
+ data-color=${b((this.disabled || !this.iconColor) && "custom")}
85
96
  name=${this.icon}
86
97
  ></skf-icon>
87
98
  `}
88
99
  </slot>
89
- ${this.shortLabel && d`<div id="short-label">${this.shortLabel}</div>`}
100
+ ${this.shortLabel && _`<div id="short-label">${this.shortLabel}</div>`}
90
101
  </div>
91
102
  </button>
92
103
  `;
93
104
  }
94
105
  };
95
- n.styles = [f, y], n.shadowRootOptions = { ...m.shadowRootOptions, delegatesFocus: !0 };
96
- let e = n;
97
- o([
98
- l({ type: Boolean, reflect: !0 })
99
- ], e.prototype, "disabled", 2);
100
- o([
101
- l({ reflect: !0 })
102
- ], e.prototype, "icon", 2);
103
- o([
104
- l({ reflect: !0, attribute: "icon-color" })
105
- ], e.prototype, "iconColor", 2);
106
- o([
107
- l({ type: Boolean, reflect: !0 })
108
- ], e.prototype, "selected", 2);
109
- o([
110
- l({ reflect: !0, attribute: "short-label" })
111
- ], e.prototype, "shortLabel", 2);
112
- o([
113
- l({ attribute: !1 })
114
- ], e.prototype, "text", 1);
115
- o([
116
- l({ reflect: !0 })
117
- ], e.prototype, "value", 1);
118
- o([
119
- _({ flatten: !0 })
120
- ], e.prototype, "_assignedNodes", 2);
106
+ n = new WeakMap(), h = new WeakMap(), c.styles = [N, E], c.shadowRootOptions = { ...T.shadowRootOptions, delegatesFocus: !0 };
107
+ let o = c;
108
+ l([
109
+ a({ type: Boolean, reflect: !0 })
110
+ ], o.prototype, "disabled", 2);
111
+ l([
112
+ a({ reflect: !0 })
113
+ ], o.prototype, "icon", 2);
114
+ l([
115
+ a({ reflect: !0, attribute: "icon-color" })
116
+ ], o.prototype, "iconColor", 2);
117
+ l([
118
+ a({ type: Boolean, reflect: !0 })
119
+ ], o.prototype, "selected", 2);
120
+ l([
121
+ a({ reflect: !0, attribute: "short-label" })
122
+ ], o.prototype, "shortLabel", 2);
123
+ l([
124
+ a({ attribute: !1 })
125
+ ], o.prototype, "text", 1);
126
+ l([
127
+ a({ reflect: !0 })
128
+ ], o.prototype, "value", 1);
129
+ l([
130
+ $()
131
+ ], o.prototype, "small", 2);
132
+ l([
133
+ O({ flatten: !0 })
134
+ ], o.prototype, "_assignedNodes", 2);
135
+ l([
136
+ g("small")
137
+ ], o.prototype, "_handleStateChange", 1);
121
138
  export {
122
- e as SkfSelectOption
139
+ o as SkfSelectOption
123
140
  };
@@ -1,50 +1,62 @@
1
1
  import { css as e } from "lit";
2
2
  const o = e`
3
3
  @layer components {
4
- button {
5
- align-items: center;
6
- background-color: var(--_skf-select-option-bg, var(--skf-interactive-bg-color-secondary));
7
- block-size: var(--_skf-select-option-height, var(--skf-size-44));
8
- color: var(--_skf-select-option-color, inherit);
9
- display: flex;
10
- gap: var(--skf-spacing-50);
11
- padding-inline: var(--skf-spacing-50);
12
- width: 100%;
13
-
14
- &:disabled {
15
- --_skf-select-option-color: var(--skf-interactive-text-color-disabled);
4
+ @layer base {
5
+ button {
6
+ --_skf-select-option-bg: var(--skf-interactive-bg-color-secondary);
7
+ --_skf-select-option-color: inherit;
8
+ --_skf-select-option-height: var(--skf-size-44);
9
+
10
+ align-items: center;
11
+ background-color: var(--_skf-select-option-bg);
12
+ block-size: var(--_skf-select-option-height);
13
+ color: var(--_skf-select-option-color);
14
+ display: flex;
15
+ gap: var(--skf-spacing-50);
16
+ padding-inline: var(--skf-spacing-50);
17
+ width: 100%;
16
18
  }
17
19
 
18
- &:is(:hover, :focus):not(:disabled) {
19
- --_skf-select-option-bg: var(--skf-interactive-bg-color-secondary-hover);
20
+ #icon-check {
21
+ opacity: 0;
22
+
23
+ :host([selected]) & {
24
+ opacity: 1;
25
+ }
20
26
  }
21
27
 
22
- &:active:not(:disabled) {
23
- --_skf-select-option-bg: var(--skf-interactive-bg-color-secondary-active);
28
+ #adornments {
29
+ align-items: inherit;
30
+ display: inherit;
31
+ gap: inherit;
32
+ margin-inline-start: auto;
24
33
  }
25
34
 
26
- :host-context(skf-select[size='sm']) & {
27
- --_skf-select-option-height: var(--skf-size-32);
35
+ #short-label {
36
+ color: var(--skf-text-color-tertiary);
28
37
  }
29
38
  }
30
39
 
31
- #icon-check {
32
- opacity: 0;
40
+ @layer states {
41
+ button {
42
+ &:disabled {
43
+ --_skf-select-option-color: var(--skf-interactive-text-color-disabled);
44
+ }
33
45
 
34
- :host([selected]) & {
35
- opacity: 1;
36
- }
37
- }
46
+ &:is(:hover, :focus):not(:disabled) {
47
+ --_skf-select-option-bg: var(--skf-interactive-bg-color-secondary-hover);
48
+ }
38
49
 
39
- #adornments {
40
- align-items: inherit;
41
- display: inherit;
42
- gap: inherit;
43
- margin-inline-start: auto;
50
+ &:active:not(:disabled) {
51
+ --_skf-select-option-bg: var(--skf-interactive-bg-color-secondary-active);
52
+ }
53
+ }
44
54
  }
45
55
 
46
- #short-label {
47
- color: var(--skf-text-color-tertiary);
56
+ @layer mods {
57
+ :host(:state(small)) button {
58
+ --_skf-select-option-height: var(--skf-size-32);
59
+ }
48
60
  }
49
61
  }
50
62
  `;
@@ -1,10 +1,11 @@
1
+ import { SkfSelectOptionGroup } from '../select/select-option-group.component.js';
1
2
  import '../tag/tag.js';
2
3
  import { FormBase } from '../../internal/components/formBase.js';
3
4
  import '../../internal/components/hint/hint.js';
4
5
  import { PopoverController } from '../../internal/controllers/popover.controller.js';
5
6
  import type { FormFieldSeverity } from '../../internal/types.js';
6
7
  import { type CSSResultGroup } from 'lit';
7
- import type { SelectOptionEvent, SkfSelectOption } from './select-option.component.js';
8
+ import { SkfSelectOption, type SelectOptionEvent } from './select-option.component.js';
8
9
  import { DeveloperFeedbackController, GlobalClickController, KeyboardNavigationController } from './select.controllers.js';
9
10
  /**
10
11
  * TODO: abstract the popover logic to a separate component/helper/partial, and use it in both select and in input[datalist], combobox etc
@@ -92,6 +93,8 @@ export declare class SkfSelect extends FormBase {
92
93
  /** @internal */
93
94
  $popover: HTMLDivElement;
94
95
  /** @internal */
96
+ _slottedItems: SkfSelectOption[] | SkfSelectOptionGroup[];
97
+ /** @internal */
95
98
  protected globalClickController: GlobalClickController;
96
99
  /** @internal */
97
100
  protected keyboardNavController: KeyboardNavigationController;
@@ -102,6 +105,7 @@ export declare class SkfSelect extends FormBase {
102
105
  constructor();
103
106
  willUpdate(changedProperties: Map<string | number | symbol, unknown>): void;
104
107
  firstUpdated(): void;
108
+ _handleSizeUpdate(): void;
105
109
  handleExpandedChange(): void;
106
110
  attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
107
111
  disconnectedCallback(): void;
@@ -1,28 +1,30 @@
1
+ import { SkfSelectOptionGroup as v } from "./select-option-group.component.js";
1
2
  import "../tag/tag.js";
2
- import { computePosition as v, flip as f, shift as _, offset as g } from "@floating-ui/dom";
3
- import { FormBase as b } from "../../internal/components/formBase.js";
3
+ import { computePosition as _, flip as g, shift as b, offset as y } from "@floating-ui/dom";
4
+ import { FormBase as O } from "../../internal/components/formBase.js";
4
5
  import "../../internal/components/hint/hint.js";
5
- import { PopoverController as y } from "../../internal/controllers/popover.controller.js";
6
- import { findMatchingTags as O } from "../../internal/helpers/findMatchingTags.js";
7
- import { hintSeverity as x } from "../../internal/helpers/hintSeverity.js";
8
- import { raiseError as w } from "../../internal/helpers/raiseError.js";
9
- import { watch as $ } from "../../internal/helpers/watch.js";
6
+ import { PopoverController as x } from "../../internal/controllers/popover.controller.js";
7
+ import { findMatchingTags as w } from "../../internal/helpers/findMatchingTags.js";
8
+ import { hintSeverity as S } from "../../internal/helpers/hintSeverity.js";
9
+ import { raiseError as $ } from "../../internal/helpers/raiseError.js";
10
+ import { watch as f } from "../../internal/helpers/watch.js";
10
11
  import { Asterisk as V } from "../../internal/templates/asterisk.js";
11
- import { componentStyles as S } from "../../styles/component.styles.js";
12
- import { nothing as C, html as n } from "lit";
13
- import { property as o, state as h, query as p } from "lit/decorators.js";
14
- import { classMap as E } from "lit/directives/class-map.js";
12
+ import { componentStyles as C } from "../../styles/component.styles.js";
13
+ import { nothing as E, html as n } from "lit";
14
+ import { property as o, state as h, query as p, queryAssignedElements as L } from "lit/decorators.js";
15
+ import { classMap as k } from "lit/directives/class-map.js";
15
16
  import { ifDefined as m } from "lit/directives/if-defined.js";
16
- import { GlobalClickController as L, KeyboardNavigationController as k, DeveloperFeedbackController as A } from "./select.controllers.js";
17
- import { styles as P } from "./select.styles.js";
18
- var T = Object.defineProperty, D = Object.getOwnPropertyDescriptor, s = (u, t, e, l) => {
19
- for (var r = l > 1 ? void 0 : l ? D(t, e) : t, a = u.length - 1, d; a >= 0; a--)
17
+ import { SkfSelectOption as A } from "./select-option.component.js";
18
+ import { GlobalClickController as P, KeyboardNavigationController as T, DeveloperFeedbackController as D } from "./select.controllers.js";
19
+ import { styles as F } from "./select.styles.js";
20
+ var U = Object.defineProperty, M = Object.getOwnPropertyDescriptor, s = (u, t, e, l) => {
21
+ for (var r = l > 1 ? void 0 : l ? M(t, e) : t, a = u.length - 1, d; a >= 0; a--)
20
22
  (d = u[a]) && (r = (l ? d(t, e, r) : d(r)) || r);
21
- return l && r && T(t, e, r), r;
23
+ return l && r && U(t, e, r), r;
22
24
  };
23
- const c = class c extends b {
25
+ const c = class c extends O {
24
26
  constructor() {
25
- super(), this.selectDelay = 200, this._optionsList = [], this.buttonLabel = "Select an option", this.hideLabel = !1, this.hideTags = !1, this.multiple = !1, this.showValid = !1, this.size = "md", this._expanded = !1, this._invalid = !1, this.globalClickController = new L(this), this.keyboardNavController = new k(this), this.developerFeedbackController = new A(this), this.popoverController = new y(this), this._handleOptionSelected = (t) => {
27
+ super(), this.selectDelay = 200, this._optionsList = [], this.buttonLabel = "Select an option", this.hideLabel = !1, this.hideTags = !1, this.multiple = !1, this.showValid = !1, this.size = "md", this._expanded = !1, this._invalid = !1, this.globalClickController = new P(this), this.keyboardNavController = new T(this), this.developerFeedbackController = new D(this), this.popoverController = new x(this), this._handleOptionSelected = (t) => {
26
28
  this._pristine = !1;
27
29
  const e = this._selectedOptions.length > 0;
28
30
  this.setFormValue(e ? this.selectedValues.join(",") : null), this._updateState(t);
@@ -33,9 +35,9 @@ const c = class c extends b {
33
35
  this.$popover.style.setProperty("--select-width", `${String(this.offsetWidth)}px`);
34
36
  }, 50);
35
37
  }, this.reposition = async () => {
36
- const { x: t, y: e } = await v(this.$anchor, this.$popover, {
38
+ const { x: t, y: e } = await _(this.$anchor, this.$popover, {
37
39
  placement: "bottom",
38
- middleware: [f(), _({ padding: 5 }), g(2)],
40
+ middleware: [g(), b({ padding: 5 }), y(2)],
39
41
  strategy: "fixed"
40
42
  });
41
43
  Object.assign(this.$popover.style, {
@@ -68,7 +70,7 @@ const c = class c extends b {
68
70
  (e || l !== t) && l.removeAttribute("selected");
69
71
  });
70
72
  }, this._handleSlotChange = () => {
71
- this._collectSlotOptionTags(), this._validateInput();
73
+ this._handleSizeUpdate(), this._collectSlotOptionTags(), this._validateInput();
72
74
  }, this._computeVisibleValue = () => {
73
75
  var t, e;
74
76
  return (t = this.$selectedValue) == null || t.classList.add("contains-meta-info"), this._selectedOptions.length > 1 ? `(${String(this._selectedOptions.length)} items selected)` : this.value ? ((e = this.$selectedValue) == null || e.classList.remove("contains-meta-info"), this.value) : this.buttonLabel;
@@ -89,8 +91,12 @@ const c = class c extends b {
89
91
  return this._selectedOptions.map((t) => t.textContent ?? "");
90
92
  }
91
93
  set value(t) {
92
- const e = t.split(",").map((l) => l.trim());
93
- this._selectedOptions = this._optionsList.filter((l) => e.includes(l.value.trim()));
94
+ let e = [];
95
+ this.multiple ? e = t.split(",").map((l) => l.toLowerCase().trim()) : e = [t.toLowerCase().trim()], this._selectedOptions = this._optionsList.filter(
96
+ (l) => e.includes(l.value.toLowerCase().trim())
97
+ ), this._optionsList.forEach((l) => {
98
+ l.selected && (l.setSelectedDiscrete = !1);
99
+ }), this._selectedOptions.forEach((l) => l.setSelectedDiscrete = !0), this._setValue();
94
100
  }
95
101
  get value() {
96
102
  return this._selectedOptions.length ? this._selectedOptions.length === 1 ? this._selectedOptions[0].value.trim() : this._selectedOptions.map((t) => t.value.trim()).join(",") : "";
@@ -123,6 +129,11 @@ const c = class c extends b {
123
129
  var t;
124
130
  this.addEventListener("skf-select-option-select", this._handleOptionSelected), (t = this._internals.form) == null || t.addEventListener("reset", this._handleReset), this.onUpdateComplete(), this._validateInput();
125
131
  }
132
+ _handleSizeUpdate() {
133
+ this._slottedItems.forEach((t) => {
134
+ (t instanceof A || t instanceof v) && (t.small = this.size === "sm");
135
+ });
136
+ }
126
137
  handleExpandedChange() {
127
138
  this._expanded ? (this.$popover.togglePopover(this._expanded), this.popoverController.start()) : (this.$popover.togglePopover(this._expanded), this.popoverController.stop().catch((t) => {
128
139
  console.error(t);
@@ -159,7 +170,7 @@ const c = class c extends b {
159
170
  /** @internal */
160
171
  /** Filter out elements other than skf-select-option and store in this._optionsList */
161
172
  _collectSlotOptionTags() {
162
- this._optionsList = O(this, "skf-select-option"), this._selectedOptions = this._optionsList.filter((t) => t.selected), w({
173
+ this._optionsList = w(this, "skf-select-option"), this._selectedOptions = this._optionsList.filter((t) => t.selected), $({
163
174
  assert: this._optionsList.length > 0,
164
175
  reason: "no-children",
165
176
  replaceStrings: [this.localName, "skf-select-option"]
@@ -204,7 +215,7 @@ const c = class c extends b {
204
215
  >
205
216
  <span
206
217
  id="selected-value"
207
- class=${E({ "selected-value": !0, "contains-meta-info": !this.value })}>
218
+ class=${k({ "selected-value": !0, "contains-meta-info": !this.value })}>
208
219
  ${this._computeVisibleValue()}
209
220
  </span>
210
221
  <skf-icon class="arrow" data-color="custom" name="chevronDown"></skf-icon>
@@ -229,12 +240,13 @@ const c = class c extends b {
229
240
  `
230
241
  )}
231
242
  </div>
232
- ` : C}
243
+ ` : E}
233
244
  ${this.hint && n`
234
245
  <skf-hint
246
+ ?disabled=${this.disabled}
235
247
  aria-live=${this._invalid ? "assertive" : "polite"}
236
248
  id="hint"
237
- severity=${m(x(this._invalid, this.severity))}
249
+ severity=${m(S(this._invalid, this.severity))}
238
250
  >
239
251
  ${this.customInvalid ?? this.hint}
240
252
  </skf-hint>
@@ -244,7 +256,7 @@ const c = class c extends b {
244
256
  `;
245
257
  }
246
258
  };
247
- c.styles = [S, P];
259
+ c.styles = [C, F];
248
260
  let i = c;
249
261
  s([
250
262
  o({ type: String, reflect: !0, attribute: "button-label" })
@@ -316,7 +328,13 @@ s([
316
328
  p("#select-dropdown")
317
329
  ], i.prototype, "$popover", 2);
318
330
  s([
319
- $("_expanded", { afterUpdate: !0 })
331
+ L()
332
+ ], i.prototype, "_slottedItems", 2);
333
+ s([
334
+ f("size", { waitUntilFirstUpdate: !0 })
335
+ ], i.prototype, "_handleSizeUpdate", 1);
336
+ s([
337
+ f("_expanded", { afterUpdate: !0 })
320
338
  ], i.prototype, "handleExpandedChange", 1);
321
339
  export {
322
340
  i as SkfSelect
@@ -104,7 +104,8 @@ class b {
104
104
  reason: "attribute-mismatch",
105
105
  replaceStrings: [t, "min or max", "together with multiple"]
106
106
  }), a({
107
- assert: (this.host.hideTags && this.host.multiple) ?? !this.host.hideTags,
107
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
108
+ assert: this.host.hideTags && this.host.multiple || !this.host.hideTags,
108
109
  reason: "attribute-mismatch",
109
110
  replaceStrings: [t, "hide-tags", "together with multiple"]
110
111
  });
@@ -3,9 +3,9 @@ import { FormBase as m } from "../../internal/components/formBase.js";
3
3
  import "../../internal/components/hint/hint.js";
4
4
  import { hintSeverity as c } from "../../internal/helpers/hintSeverity.js";
5
5
  import { Asterisk as y } from "../../internal/templates/asterisk.js";
6
- import { componentStyles as f } from "../../styles/component.styles.js";
6
+ import { componentStyles as b } from "../../styles/component.styles.js";
7
7
  import { nothing as u, html as v } from "lit";
8
- import { property as r, state as b, query as g } from "lit/decorators.js";
8
+ import { property as r, state as f, query as g } from "lit/decorators.js";
9
9
  import { ifDefined as o } from "lit/directives/if-defined.js";
10
10
  import $ from "./textarea.styles.js";
11
11
  var E = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, e = (p, i, s, a) => {
@@ -106,6 +106,7 @@ const d = class d extends m {
106
106
  </label>
107
107
  ${this.hint && v`
108
108
  <skf-hint
109
+ ?disabled=${this.disabled}
109
110
  aria-live=${this.invalid ? "assertive" : "polite"}
110
111
  id="hint"
111
112
  severity=${o(c(this.invalid, this.severity))}
@@ -117,7 +118,7 @@ const d = class d extends m {
117
118
  `;
118
119
  }
119
120
  };
120
- d.styles = [f, $];
121
+ d.styles = [b, $];
121
122
  let t = d;
122
123
  e([
123
124
  r({ type: Number })
@@ -174,7 +175,7 @@ e([
174
175
  r()
175
176
  ], t.prototype, "value", 2);
176
177
  e([
177
- b()
178
+ f()
178
179
  ], t.prototype, "invalid", 2);
179
180
  e([
180
181
  g("textarea")
@@ -1,25 +1,25 @@
1
1
  import { SkfElement as l } from "../../internal/components/skf-element.js";
2
2
  import { html as f } from "lit";
3
- import { property as i, queryAssignedNodes as d } from "lit/decorators.js";
4
- import { SkfToastSingleton as y } from "./toast.singleton.js";
3
+ import { property as i, queryAssignedNodes as y } from "lit/decorators.js";
4
+ import { SkfToastSingleton as d } from "./toast.singleton.js";
5
5
  import { styles as a } from "./toast.styles.js";
6
- var u = Object.defineProperty, e = (n, o, h, g) => {
7
- for (var s = void 0, r = n.length - 1, m; r >= 0; r--)
8
- (m = n[r]) && (s = m(o, h, s) || s);
9
- return s && u(o, h, s), s;
6
+ var u = Object.defineProperty, e = (n, r, m, g) => {
7
+ for (var s = void 0, o = n.length - 1, h; o >= 0; o--)
8
+ (h = n[o]) && (s = h(r, m, s) || s);
9
+ return s && u(r, m, s), s;
10
10
  };
11
11
  const p = class p extends l {
12
12
  constructor() {
13
13
  super(), this.debug = !1, this.persistent = !1, this.severity = "info", this.timer = 5, this._singleton = void 0;
14
14
  }
15
15
  firstUpdated() {
16
- this._singleton = new y(this.getRootNode()), this._singleton.addData({
16
+ this._singleton = new d(), this._singleton.addData({
17
17
  debug: this.debug,
18
18
  icon: this.icon,
19
19
  originEl: this,
20
20
  persistent: this.persistent,
21
21
  severity: this.severity,
22
- text: this._slottedText.map((o) => o.textContent).join(),
22
+ text: this._slottedText.map((r) => r.textContent).join(),
23
23
  timer: this.timer = this.timer && this.timer < 5 ? 5 : this.timer,
24
24
  topOffset: this.topOffset
25
25
  });
@@ -49,7 +49,7 @@ e([
49
49
  i({ type: Number })
50
50
  ], t.prototype, "topOffset");
51
51
  e([
52
- d()
52
+ y()
53
53
  ], t.prototype, "_slottedText");
54
54
  export {
55
55
  t as SkfToast
@@ -10,7 +10,7 @@ export declare class SkfToastSingleton {
10
10
  data: ToastData[];
11
11
  root: Document;
12
12
  usePopover: boolean;
13
- constructor(root: Document);
13
+ constructor();
14
14
  hasToasts(): boolean;
15
15
  popToast(): ToastData | undefined;
16
16
  getData(): ToastData[];
@@ -1,8 +1,8 @@
1
1
  import "./toast-item.js";
2
2
  import "./toast-wrapper.js";
3
3
  class s {
4
- constructor(e) {
5
- if (this.data = [], this.root = e, this.usePopover = !0, this.root.nodeType !== Node.DOCUMENT_NODE)
4
+ constructor() {
5
+ if (this.data = [], this.root = globalThis.document, this.usePopover = !0, this.root.nodeType !== Node.DOCUMENT_NODE)
6
6
  throw new Error("Root node must be a document node");
7
7
  return s.instance || (s.instance = this), s.instance;
8
8
  }
@@ -15,31 +15,31 @@ class s {
15
15
  getData() {
16
16
  return this.data;
17
17
  }
18
- setData(e) {
19
- this.data = e;
18
+ setData(o) {
19
+ this.data = o;
20
20
  }
21
- addData(e) {
22
- this.data = [...this.data, e], this.udpateUI();
21
+ addData(o) {
22
+ this.data = [...this.data, o], this.udpateUI();
23
23
  }
24
24
  udpateUI() {
25
- const e = c(this.root, this.usePopover);
26
- this.usePopover && e.showPopover(), u();
25
+ const o = c(this.root, this.usePopover);
26
+ this.usePopover && o.showPopover(), u();
27
27
  function u() {
28
- const n = new s(document);
29
- for (; n.hasToasts(); ) {
30
- const t = n.popToast();
28
+ const i = new s();
29
+ for (; i.hasToasts(); ) {
30
+ const t = i.popToast();
31
31
  if (!t) return;
32
- t.debug && (e.debug = !0);
33
- const o = document.createElement("skf-toast-item");
34
- o.className = "toast-item", o.timer = t.timer, o.severity = t.severity, o.icon = t.icon, t.persistent && o.setAttribute("persistent", "true"), o.originEl = t.originEl, o.innerText = String(t.text);
32
+ t.debug && (o.debug = !0);
33
+ const e = document.createElement("skf-toast-item");
34
+ e.className = "toast-item", e.timer = t.timer, e.severity = t.severity, e.icon = t.icon, t.persistent && e.setAttribute("persistent", "true"), e.originEl = t.originEl, e.innerText = String(t.text);
35
35
  const a = document.createElement("div");
36
- a.classList.add("toast-item-wrapper"), a.appendChild(o), e.prepend(a);
36
+ a.classList.add("toast-item-wrapper"), a.appendChild(e), o.prepend(a);
37
37
  }
38
38
  }
39
- function c(n, t) {
39
+ function c(i, t) {
40
40
  var p;
41
- const a = ((p = new s(document).getData()[0]) == null ? void 0 : p.topOffset) ?? null, i = n.querySelector("body");
42
- let r = i == null ? void 0 : i.querySelector("skf-toast-wrapper");
41
+ const a = ((p = new s().getData()[0]) == null ? void 0 : p.topOffset) ?? null, n = i.querySelector("body");
42
+ let r = n == null ? void 0 : n.querySelector("skf-toast-wrapper");
43
43
  if (!r) {
44
44
  if (r = document.createElement("skf-toast-wrapper"), !r) throw new Error("Could not create toast wrapper element");
45
45
  t && r.setAttribute("popover", "auto"), a && r.setAttribute("top-offset", a.toString()), document.body.appendChild(r);