@skf-design-system/ui-components 1.0.2-beta.1 → 1.0.2-beta.10

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 (220) hide show
  1. package/README.md +25 -1
  2. package/dist/components/accordion/accordion-item.component.js +49 -38
  3. package/dist/components/accordion/accordion.component.d.ts +2 -2
  4. package/dist/components/accordion/accordion.component.js +12 -12
  5. package/dist/components/alert/alert.component.d.ts +8 -3
  6. package/dist/components/alert/alert.component.js +59 -50
  7. package/dist/components/alert/alert.styles.js +51 -47
  8. package/dist/components/breadcrumb/breadcrumb-item.component.js +30 -32
  9. package/dist/components/breadcrumb/breadcrumb-item.d.ts +2 -2
  10. package/dist/components/breadcrumb/breadcrumb-item.styles.js +16 -15
  11. package/dist/components/breadcrumb/breadcrumb.component.d.ts +5 -2
  12. package/dist/components/breadcrumb/breadcrumb.component.js +51 -46
  13. package/dist/components/breadcrumb/breadcrumb.d.ts +2 -2
  14. package/dist/components/breadcrumb/breadcrumb.styles.js +13 -10
  15. package/dist/components/button/button.component.js +63 -67
  16. package/dist/components/button/button.styles.js +5 -4
  17. package/dist/components/card/card.component.d.ts +5 -0
  18. package/dist/components/card/card.component.js +46 -24
  19. package/dist/components/card/card.styles.js +31 -14
  20. package/dist/components/checkbox/checkbox.component.d.ts +6 -5
  21. package/dist/components/checkbox/checkbox.component.js +67 -69
  22. package/dist/components/checkbox/checkbox.styles.js +1 -1
  23. package/dist/components/{date-picker/datepicker.calendar.component.d.ts → datepicker/datepicker-calendar.component.d.ts} +8 -1
  24. package/dist/components/{date-picker/datepicker.calendar.component.js → datepicker/datepicker-calendar.component.js} +109 -115
  25. package/dist/components/datepicker/datepicker-calendar.d.ts +8 -0
  26. package/dist/components/datepicker/datepicker-calendar.js +6 -0
  27. package/dist/components/{date-picker/datepicker.component.d.ts → datepicker/datepicker-popup.component.d.ts} +9 -20
  28. package/dist/components/datepicker/datepicker-popup.component.js +272 -0
  29. package/dist/components/datepicker/datepicker-popup.d.ts +8 -0
  30. package/dist/components/{date-picker/datepicker.helpers.d.ts → datepicker/datepicker-popup.helpers.d.ts} +3 -3
  31. package/dist/components/datepicker/datepicker-popup.helpers.js +83 -0
  32. package/dist/components/datepicker/datepicker-popup.js +6 -0
  33. package/dist/components/{date-picker/datepicker.styles.js → datepicker/datepicker-popup.styles.js} +3 -3
  34. package/dist/components/{date-picker-input/datepicker-input.component.d.ts → datepicker/datepicker.component.d.ts} +21 -14
  35. package/dist/components/datepicker/datepicker.component.js +455 -0
  36. package/dist/components/datepicker/datepicker.d.ts +8 -0
  37. package/dist/components/datepicker/datepicker.js +6 -0
  38. package/dist/components/dialog/dialog.component.d.ts +3 -2
  39. package/dist/components/dialog/dialog.component.js +49 -49
  40. package/dist/components/dialog/dialog.d.ts +2 -2
  41. package/dist/components/divider/divider.component.d.ts +3 -0
  42. package/dist/components/divider/divider.component.js +43 -22
  43. package/dist/components/divider/divider.styles.js +9 -9
  44. package/dist/components/drawer/drawer.component.d.ts +12 -4
  45. package/dist/components/drawer/drawer.component.js +84 -61
  46. package/dist/components/drawer/drawer.d.ts +2 -2
  47. package/dist/components/drawer/drawer.styles.js +47 -40
  48. package/dist/components/header/header.component.d.ts +4 -2
  49. package/dist/components/header/header.component.js +64 -57
  50. package/dist/components/header/header.d.ts +2 -2
  51. package/dist/components/header/header.styles.js +2 -2
  52. package/dist/components/heading/heading.component.d.ts +5 -1
  53. package/dist/components/heading/heading.component.js +54 -27
  54. package/dist/components/heading/heading.styles.js +34 -36
  55. package/dist/components/icon/icon.component.d.ts +4 -0
  56. package/dist/components/icon/icon.component.js +62 -43
  57. package/dist/components/icon/icon.styles.js +60 -60
  58. package/dist/components/input/input.component.d.ts +4 -8
  59. package/dist/components/input/input.component.js +90 -97
  60. package/dist/components/input/input.controllers.d.ts +0 -1
  61. package/dist/components/input/input.controllers.js +14 -19
  62. package/dist/components/link/link.component.d.ts +15 -18
  63. package/dist/components/link/link.component.js +104 -107
  64. package/dist/components/link/link.styles.js +53 -45
  65. package/dist/components/loader/loader.component.d.ts +5 -3
  66. package/dist/components/loader/loader.component.js +39 -28
  67. package/dist/components/loader/loader.styles.js +6 -10
  68. package/dist/components/logo/logo.component.d.ts +4 -1
  69. package/dist/components/logo/logo.component.js +55 -51
  70. package/dist/components/logo/logo.styles.js +26 -16
  71. package/dist/components/menu/menu-item.component.d.ts +1 -1
  72. package/dist/components/menu/menu-item.component.js +8 -8
  73. package/dist/components/menu/menu-item.d.ts +2 -2
  74. package/dist/components/menu/menu-item.styles.js +13 -9
  75. package/dist/components/menu/menu.component.d.ts +5 -2
  76. package/dist/components/menu/menu.component.js +8 -8
  77. package/dist/components/menu/menu.d.ts +2 -2
  78. package/dist/components/nav/nav-item.component.d.ts +6 -2
  79. package/dist/components/nav/nav-item.component.js +44 -25
  80. package/dist/components/nav/nav-item.styles.js +29 -25
  81. package/dist/components/nav/nav.component.d.ts +9 -0
  82. package/dist/components/nav/nav.component.js +47 -21
  83. package/dist/components/nav/nav.d.ts +2 -2
  84. package/dist/components/nav/nav.styles.js +15 -9
  85. package/dist/components/popover/popover.component.d.ts +10 -3
  86. package/dist/components/popover/popover.component.js +30 -22
  87. package/dist/components/popover/popover.d.ts +2 -2
  88. package/dist/components/progress/progress.component.d.ts +2 -0
  89. package/dist/components/progress/progress.component.js +38 -29
  90. package/dist/components/progress/progress.d.ts +2 -2
  91. package/dist/components/progress/progress.styles.js +10 -8
  92. package/dist/components/radio/radio.component.d.ts +4 -2
  93. package/dist/components/radio/radio.component.js +96 -91
  94. package/dist/components/radio/radio.styles.js +1 -1
  95. package/dist/components/segmented-button/segmented-button-item.component.js +1 -1
  96. package/dist/components/segmented-button/segmented-button-item.d.ts +2 -2
  97. package/dist/components/segmented-button/segmented-button-item.styles.js +1 -1
  98. package/dist/components/segmented-button/segmented-button.component.js +22 -24
  99. package/dist/components/segmented-button/segmented-button.d.ts +2 -2
  100. package/dist/components/select/select-option-group.component.d.ts +4 -0
  101. package/dist/components/select/select-option-group.component.js +37 -18
  102. package/dist/components/select/select-option-group.d.ts +2 -2
  103. package/dist/components/select/select-option-group.style.js +12 -6
  104. package/dist/components/select/select-option.component.d.ts +9 -4
  105. package/dist/components/select/select-option.component.js +70 -58
  106. package/dist/components/select/select-option.styles.js +43 -31
  107. package/dist/components/select/select.component.d.ts +21 -12
  108. package/dist/components/select/select.component.js +125 -87
  109. package/dist/components/select/select.controllers.js +15 -20
  110. package/dist/components/select/select.styles.js +8 -2
  111. package/dist/components/stepper/stepper-item.component.d.ts +1 -1
  112. package/dist/components/stepper/stepper-item.component.js +59 -56
  113. package/dist/components/stepper/stepper-item.d.ts +2 -2
  114. package/dist/components/stepper/stepper-item.styles.js +4 -4
  115. package/dist/components/stepper/stepper.component.js +2 -3
  116. package/dist/components/stepper/stepper.d.ts +2 -2
  117. package/dist/components/stepper/stepper.helpers.js +6 -7
  118. package/dist/components/switch/switch.component.d.ts +4 -2
  119. package/dist/components/switch/switch.component.js +64 -58
  120. package/dist/components/switch/switch.d.ts +2 -2
  121. package/dist/components/switch/switch.styles.js +1 -1
  122. package/dist/components/{tab-panel → tabs}/tab-panel.component.d.ts +1 -1
  123. package/dist/components/tabs/tab-panel.component.js +39 -0
  124. package/dist/components/{tab-panel → tabs}/tab-panel.d.ts +2 -2
  125. package/dist/components/{tab → tabs}/tab.component.d.ts +3 -3
  126. package/dist/components/{tab → tabs}/tab.component.js +17 -14
  127. package/dist/components/{tab → tabs}/tab.d.ts +2 -2
  128. package/dist/components/{tab → tabs}/tab.styles.js +2 -2
  129. package/dist/components/{tab-group/tab-group.component.d.ts → tabs/tabs.component.d.ts} +3 -4
  130. package/dist/components/{tab-group/tab-group.component.js → tabs/tabs.component.js} +35 -36
  131. package/dist/components/tabs/tabs.d.ts +8 -0
  132. package/dist/components/tabs/tabs.js +6 -0
  133. package/dist/components/{tab-group/tab-group.styles.js → tabs/tabs.styles.js} +16 -16
  134. package/dist/components/tag/tag.component.d.ts +10 -2
  135. package/dist/components/tag/tag.component.js +77 -65
  136. package/dist/components/tag/tag.d.ts +2 -2
  137. package/dist/components/tag/tag.styles.js +63 -50
  138. package/dist/components/textarea/textarea.component.d.ts +4 -2
  139. package/dist/components/textarea/textarea.component.js +102 -95
  140. package/dist/components/toast/toast-item.styles.js +13 -10
  141. package/dist/components/toast/toast.component.js +9 -9
  142. package/dist/components/toast/toast.singleton.d.ts +1 -1
  143. package/dist/components/toast/toast.singleton.js +19 -20
  144. package/dist/components/tooltip/tooltip.component.d.ts +9 -2
  145. package/dist/components/tooltip/tooltip.component.js +15 -11
  146. package/dist/components/tooltip/tooltip.d.ts +2 -2
  147. package/dist/custom-elements.json +1681 -1112
  148. package/dist/index.d.ts +8 -7
  149. package/dist/index.js +96 -93
  150. package/dist/internal/base-classes/popover/popover.base.d.ts +24 -5
  151. package/dist/internal/base-classes/popover/popover.base.js +41 -44
  152. package/dist/internal/base-classes/popover/popover.styles.js +4 -5
  153. package/dist/internal/components/formBase.d.ts +1 -0
  154. package/dist/internal/components/formBase.js +11 -19
  155. package/dist/internal/components/hint/hint.component.d.ts +4 -0
  156. package/dist/internal/components/hint/hint.component.js +47 -20
  157. package/dist/internal/components/hint/hint.styles.js +29 -25
  158. package/dist/internal/components/skf-element.d.ts +1 -3
  159. package/dist/internal/components/skf-element.js +4 -9
  160. package/dist/internal/controllers/popover.controller.d.ts +2 -0
  161. package/dist/internal/controllers/popover.controller.js +11 -14
  162. package/dist/internal/helpers/stateMap.d.ts +14 -0
  163. package/dist/internal/helpers/stateMap.js +68 -0
  164. package/dist/internal/helpers/uuid.d.ts +8 -10
  165. package/dist/internal/helpers/uuid.js +4 -11
  166. package/dist/internal/helpers/watch.d.ts +1 -1
  167. package/dist/internal/helpers/watch.js +12 -12
  168. package/dist/internal/templates/asterisk.d.ts +1 -1
  169. package/dist/internal/templates/asterisk.js +4 -4
  170. package/dist/internal/types.d.ts +4 -0
  171. package/dist/styles/component.styles.js +37 -36
  172. package/dist/styles/global-alt.css +1 -0
  173. package/dist/styles/global.css +1 -1
  174. package/dist/translations/en.d.ts +3 -0
  175. package/dist/translations/en.js +27 -0
  176. package/dist/translations/es.d.ts +3 -0
  177. package/dist/translations/es.js +27 -0
  178. package/dist/translations/index.d.ts +4 -0
  179. package/dist/translations/pt.d.ts +3 -0
  180. package/dist/translations/pt.js +27 -0
  181. package/dist/translations/sv.d.ts +3 -0
  182. package/dist/translations/sv.js +27 -0
  183. package/dist/types/jsx/custom-element-jsx.d.ts +1988 -866
  184. package/dist/types/vue/index.d.ts +220 -169
  185. package/dist/utilities/localize.d.ts +28 -0
  186. package/dist/utilities/localize.js +13 -0
  187. package/dist/vscode.html-custom-data.json +265 -188
  188. package/dist/web-types.json +731 -548
  189. package/package.json +38 -51
  190. package/dist/components/accordion/accordion-item.test.d.ts +0 -1
  191. package/dist/components/accordion/accordion.test.d.ts +0 -1
  192. package/dist/components/checkbox/checkbox.test.d.ts +0 -1
  193. package/dist/components/date-picker/datepicker.component.js +0 -261
  194. package/dist/components/date-picker/datepicker.d.ts +0 -10
  195. package/dist/components/date-picker/datepicker.helpers.js +0 -76
  196. package/dist/components/date-picker/datepicker.js +0 -8
  197. package/dist/components/date-picker-input/datepicker-input.component.js +0 -442
  198. package/dist/components/date-picker-input/datepicker-input.d.ts +0 -8
  199. package/dist/components/date-picker-input/datepicker-input.js +0 -6
  200. package/dist/components/input/input.test.d.ts +0 -1
  201. package/dist/components/radio/radio.test.d.ts +0 -1
  202. package/dist/components/switch/switch.test.d.ts +0 -1
  203. package/dist/components/tab-group/tab-group.d.ts +0 -8
  204. package/dist/components/tab-group/tab-group.js +0 -6
  205. package/dist/components/tab-panel/tab-panel.component.js +0 -36
  206. package/dist/internal/playwright/index.d.ts +0 -1
  207. /package/dist/components/{date-picker/datepicker.calendar.styles.d.ts → datepicker/datepicker-calendar.styles.d.ts} +0 -0
  208. /package/dist/components/{date-picker/datepicker.calendar.styles.js → datepicker/datepicker-calendar.styles.js} +0 -0
  209. /package/dist/components/{date-picker/datepicker.styles.d.ts → datepicker/datepicker-popup.styles.d.ts} +0 -0
  210. /package/dist/components/{date-picker-input/datepicker-input.helpers.d.ts → datepicker/datepicker.helpers.d.ts} +0 -0
  211. /package/dist/components/{date-picker-input/datepicker-input.helpers.js → datepicker/datepicker.helpers.js} +0 -0
  212. /package/dist/components/{date-picker-input/datepicker-input.styles.d.ts → datepicker/datepicker.styles.d.ts} +0 -0
  213. /package/dist/components/{date-picker-input/datepicker-input.styles.js → datepicker/datepicker.styles.js} +0 -0
  214. /package/dist/components/select/{select.stories.icons.d.ts → stories/select.stories.icons.d.ts} +0 -0
  215. /package/dist/components/{tab-panel → tabs}/tab-panel.js +0 -0
  216. /package/dist/components/{tab-panel → tabs}/tab-panel.styles.d.ts +0 -0
  217. /package/dist/components/{tab-panel → tabs}/tab-panel.styles.js +0 -0
  218. /package/dist/components/{tab → tabs}/tab.js +0 -0
  219. /package/dist/components/{tab → tabs}/tab.styles.d.ts +0 -0
  220. /package/dist/components/{tab-group/tab-group.styles.d.ts → tabs/tabs.styles.d.ts} +0 -0
@@ -1,29 +1,36 @@
1
+ var m = (s) => {
2
+ throw TypeError(s);
3
+ };
4
+ var c = (s, r, t) => r.has(s) || m("Cannot " + t);
5
+ var y = (s, r, t) => (c(s, r, "read from private field"), t ? t.call(s) : r.get(s)), f = (s, r, t) => r.has(s) ? m("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(s) : r.set(s, t), b = (s, r, t, o) => (c(s, r, "write to private field"), o ? o.call(s, t) : r.set(s, t), t);
1
6
  import "../icon/icon.js";
2
- import { FormBase as m } from "../../internal/components/formBase.js";
7
+ import { FormBase as $ } from "../../internal/components/formBase.js";
3
8
  import "../../internal/components/hint/hint.js";
4
- import { hintSeverity as c } from "../../internal/helpers/hintSeverity.js";
5
- import { Asterisk as y } from "../../internal/templates/asterisk.js";
6
- import { componentStyles as f } from "../../styles/component.styles.js";
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";
9
- import { ifDefined as o } from "lit/directives/if-defined.js";
10
- import $ from "./textarea.styles.js";
11
- var E = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, e = (p, i, s, a) => {
12
- for (var l = a > 1 ? void 0 : a ? _(i, s) : i, n = p.length - 1, h; n >= 0; n--)
13
- (h = p[n]) && (l = (a ? h(i, s, l) : h(l)) || l);
14
- return a && l && E(i, s, l), l;
15
- };
16
- const d = class d extends m {
9
+ import { hintSeverity as E } from "../../internal/helpers/hintSeverity.js";
10
+ import { Asterisk as _ } from "../../internal/templates/asterisk.js";
11
+ import { componentStyles as V } from "../../styles/component.styles.js";
12
+ import { LocalizeController as w } from "../../utilities/localize.js";
13
+ import { nothing as u, html as g } from "lit";
14
+ import { property as l, state as x, query as I } from "lit/decorators.js";
15
+ import { ifDefined as h } from "lit/directives/if-defined.js";
16
+ import L from "./textarea.styles.js";
17
+ var A = Object.defineProperty, O = Object.getOwnPropertyDescriptor, e = (s, r, t, o) => {
18
+ for (var a = o > 1 ? void 0 : o ? O(r, t) : r, n = s.length - 1, d; n >= 0; n--)
19
+ (d = s[n]) && (a = (o ? d(r, t, a) : d(a)) || a);
20
+ return o && a && A(r, t, a), a;
21
+ }, p;
22
+ const v = class v extends $ {
17
23
  constructor() {
18
- super(...arguments), this.debug = !1, this.hideLabel = !1, this.readonly = !1, this.showValid = !1, this.size = "md", this.validateOn = "change", this.value = "", this.invalid = !1, this._resetValue = (i) => {
19
- var s;
20
- i.stopPropagation(), this.value = ((s = this.getAttribute("value")) == null ? void 0 : s.trim()) ?? "", this._internals.setFormValue(this.value), this.$input.focus();
24
+ super(...arguments);
25
+ f(this, p);
26
+ b(this, p, new w(this)), this.debug = !1, this.hideLabel = !1, this.lang = "en", this.readonly = !1, this.showValid = !1, this.size = "md", this.validateOn = "change", this.value = "", this.invalid = !1, this._resetValue = (t) => {
27
+ t.stopPropagation(), this.value = this.getAttribute("value")?.trim() ?? "", this._internals.setFormValue(this.value), this.$input.focus();
21
28
  }, this._handleInput = () => {
22
29
  this.value = this.$input.value || "", this.validateOn === "input" && (this.pristine = !1, this.validateInput());
23
30
  };
24
31
  }
25
- set customInvalid(i) {
26
- this.customError = i ?? "";
32
+ set customInvalid(t) {
33
+ this.customError = t ?? "";
27
34
  }
28
35
  get customInvalid() {
29
36
  return this.customError;
@@ -31,58 +38,57 @@ const d = class d extends m {
31
38
  firstUpdated() {
32
39
  this.$input.addEventListener("change", () => {
33
40
  this.validateOn === "change" && (this.validateOn = "input", this.pristine = !1), this._internals.setFormValue(this.$input.value || ""), this.emitEvent("change"), this.validateInput();
34
- }), this.addEventListener("invalid", (i) => {
35
- this.pristine = !1, this.invalid = !0, this.customErrorDisplay && i.preventDefault();
41
+ }), this.addEventListener("invalid", (t) => {
42
+ this.pristine = !1, this.invalid = !0, this.customErrorDisplay && t.preventDefault();
36
43
  }), this.addEventListener("reset", this._resetValue), this.validateInput();
37
44
  }
38
- willUpdate(i) {
39
- if (i.has("invalid"))
45
+ willUpdate(t) {
46
+ if (t.has("invalid"))
40
47
  if (this.invalid) {
41
48
  this.setAttribute("invalid", ""), this.showValid || this.removeAttribute("valid");
42
- const s = this._internals.validationMessage;
43
- this.hint = s !== "" ? this._internals.validationMessage : "unspecified error", this.checkValidity();
49
+ const o = this._internals.validationMessage;
50
+ this.hint = o !== "" ? this._internals.validationMessage : "unspecified error", this.checkValidity();
44
51
  } else
45
52
  this.removeAttribute("invalid"), !this.pristine && this.showValid && this.setAttribute("valid", "true"), this.hint = this.getAttribute("hint") ?? "";
46
53
  }
47
- attributeChangedCallback(i, s, a) {
48
- if (super.attributeChangedCallback(i, s, a), i === "value" && this._internals.setFormValue(a), i === "custom-invalid")
54
+ attributeChangedCallback(t, o, a) {
55
+ if (super.attributeChangedCallback(t, o, a), t === "value" && this._internals.setFormValue(a), t === "custom-invalid")
49
56
  if (typeof a == "string") {
50
- const n = this.withFallback(a);
51
- this.pristine = !1, this._internals.setValidity({ customError: !0 }, n), this.invalid = !0, this.hint = n, this.checkValidity();
57
+ const d = this.withFallback(a);
58
+ this.pristine = !1, this._internals.setValidity({ customError: !0 }, d), this.invalid = !0, this.hint = d, this.checkValidity();
52
59
  } else
53
60
  this._internals.setValidity({}), this.validateInput();
54
61
  }
55
62
  /** @internal */
56
63
  validateInput() {
57
64
  if (this._internals.validity.customError) return;
58
- const s = this.$input.validity;
59
- if (this.invalid = !1, s.valid)
65
+ const o = this.$input.validity;
66
+ if (this.invalid = !1, o.valid)
60
67
  this._internals.setValidity({ customError: this._internals.validity.customError });
61
68
  else {
62
- this.invalid = !this.pristine && !s.valid;
69
+ this.invalid = !this.pristine && !o.valid;
63
70
  let a;
64
- for (a in s) {
65
- const l = `data-${a.toString()}`;
66
- if (s[a] && !this.hasAttribute(l) && this.debug && console.log(
67
- `Add custom message on ${this.localName} using attribute: ${l.toUpperCase()}="Your custom message"`
68
- ), s[a]) {
71
+ for (a in o) {
72
+ const n = `data-${a.toString()}`;
73
+ if (o[a] && !this.hasAttribute(n) && this.debug && console.log(
74
+ `Add custom message on ${this.localName} using attribute: ${n.toUpperCase()}="Your custom message"`
75
+ ), o[a]) {
69
76
  this.validationError = a.toString();
70
- const n = this.hasAttribute(l) ? this.getAttribute(l) : this.$input.validationMessage;
77
+ const d = this.hasAttribute(n) ? this.getAttribute(n) : this.$input.validationMessage;
71
78
  this._internals.setValidity(
72
79
  { [this.validationError]: !0, customError: this._internals.validity.customError },
73
- this.withFallback(n)
80
+ this.withFallback(d)
74
81
  ), this.invalid && this.customErrorDisplay && this.checkValidity();
75
82
  }
76
83
  }
77
84
  }
78
85
  }
79
86
  render() {
80
- var i, s;
81
- return v`
87
+ return g`
82
88
  <div id="root">
83
89
  <label>
84
90
  <div class=${this.hideLabel ? "visually-hidden" : ""} id="label">
85
- <slot>${this.label}</slot> ${this.required ? y(this.requiredLabel) : null}
91
+ <slot>${this.label}</slot> ${this.required ? _(y(this, p).term("required")) : u}
86
92
  </div>
87
93
  <div id="input">
88
94
  <textarea
@@ -91,24 +97,25 @@ const d = class d extends m {
91
97
  ?required=${this.required}
92
98
  .value=${this.value}
93
99
  @input=${this._handleInput}
94
- aria-describedby=${o((i = this.hint) != null && i.trim() ? "hint" : u)}
95
- aria-errormessage=${o((s = this.hint) != null && s.trim() ? "hint" : u)}
100
+ aria-describedby=${h(this.hint?.trim() ? "hint" : u)}
101
+ aria-errormessage=${h(this.hint?.trim() ? "hint" : u)}
96
102
  aria-invalid=${!!this.invalid}
97
- cols=${o(this.cols)}
98
- maxlength=${o(this.maxLength)}
99
- minlength=${o(this.minLength)}
100
- name=${o(this.name)}
101
- placeholder=${o(this.placeholder)}
102
- rows=${o(this.rows)}
103
+ cols=${h(this.cols)}
104
+ maxlength=${h(this.maxLength)}
105
+ minlength=${h(this.minLength)}
106
+ name=${h(this.name)}
107
+ placeholder=${h(this.placeholder)}
108
+ rows=${h(this.rows)}
103
109
  >
104
110
  </textarea>
105
111
  </div>
106
112
  </label>
107
- ${this.hint && v`
113
+ ${this.hint && g`
108
114
  <skf-hint
115
+ ?disabled=${this.disabled}
109
116
  aria-live=${this.invalid ? "assertive" : "polite"}
110
117
  id="hint"
111
- severity=${o(c(this.invalid, this.severity))}
118
+ severity=${h(E(this.invalid, this.severity))}
112
119
  >
113
120
  ${this.customInvalid ?? this.hint}
114
121
  </skf-hint>
@@ -117,68 +124,68 @@ const d = class d extends m {
117
124
  `;
118
125
  }
119
126
  };
120
- d.styles = [f, $];
121
- let t = d;
127
+ p = new WeakMap(), v.styles = [V, L];
128
+ let i = v;
122
129
  e([
123
- r({ type: Number })
124
- ], t.prototype, "cols", 2);
130
+ l({ type: Number })
131
+ ], i.prototype, "cols", 2);
125
132
  e([
126
- r({ attribute: "custom-invalid", reflect: !0 })
127
- ], t.prototype, "customInvalid", 1);
133
+ l({ attribute: "custom-invalid", reflect: !0 })
134
+ ], i.prototype, "customInvalid", 1);
128
135
  e([
129
- r({ type: Boolean })
130
- ], t.prototype, "debug", 2);
136
+ l({ type: Boolean })
137
+ ], i.prototype, "debug", 2);
131
138
  e([
132
- r({ type: Boolean, attribute: "hide-label" })
133
- ], t.prototype, "hideLabel", 2);
139
+ l({ type: Boolean, attribute: "hide-label" })
140
+ ], i.prototype, "hideLabel", 2);
134
141
  e([
135
- r()
136
- ], t.prototype, "hint", 2);
142
+ l()
143
+ ], i.prototype, "hint", 2);
137
144
  e([
138
- r()
139
- ], t.prototype, "label", 2);
145
+ l()
146
+ ], i.prototype, "label", 2);
140
147
  e([
141
- r()
142
- ], t.prototype, "name", 2);
148
+ l({ type: String })
149
+ ], i.prototype, "lang", 2);
143
150
  e([
144
- r({ type: Number, attribute: "maxlength" })
145
- ], t.prototype, "maxLength", 2);
151
+ l()
152
+ ], i.prototype, "name", 2);
146
153
  e([
147
- r({ type: Number, attribute: "minlength" })
148
- ], t.prototype, "minLength", 2);
154
+ l({ type: Number, attribute: "maxlength" })
155
+ ], i.prototype, "maxLength", 2);
149
156
  e([
150
- r()
151
- ], t.prototype, "placeholder", 2);
157
+ l({ type: Number, attribute: "minlength" })
158
+ ], i.prototype, "minLength", 2);
152
159
  e([
153
- r({ type: Boolean })
154
- ], t.prototype, "readonly", 2);
160
+ l()
161
+ ], i.prototype, "placeholder", 2);
155
162
  e([
156
- r({ attribute: "required-label" })
157
- ], t.prototype, "requiredLabel", 2);
163
+ l({ type: Boolean })
164
+ ], i.prototype, "readonly", 2);
158
165
  e([
159
- r({ type: Number })
160
- ], t.prototype, "rows", 2);
166
+ l({ type: Number })
167
+ ], i.prototype, "rows", 2);
161
168
  e([
162
- r()
163
- ], t.prototype, "severity", 2);
169
+ l()
170
+ ], i.prototype, "severity", 2);
164
171
  e([
165
- r({ type: Boolean, attribute: "show-valid" })
166
- ], t.prototype, "showValid", 2);
172
+ l({ type: Boolean, attribute: "show-valid" })
173
+ ], i.prototype, "showValid", 2);
167
174
  e([
168
- r({ reflect: !0 })
169
- ], t.prototype, "size", 2);
175
+ l({ reflect: !0 })
176
+ ], i.prototype, "size", 2);
170
177
  e([
171
- r({ attribute: "validate-on" })
172
- ], t.prototype, "validateOn", 2);
178
+ l({ attribute: "validate-on" })
179
+ ], i.prototype, "validateOn", 2);
173
180
  e([
174
- r()
175
- ], t.prototype, "value", 2);
181
+ l()
182
+ ], i.prototype, "value", 2);
176
183
  e([
177
- b()
178
- ], t.prototype, "invalid", 2);
184
+ x()
185
+ ], i.prototype, "invalid", 2);
179
186
  e([
180
- g("textarea")
181
- ], t.prototype, "$input", 2);
187
+ I("textarea")
188
+ ], i.prototype, "$input", 2);
182
189
  export {
183
- t as SkfTextArea
190
+ i as SkfTextArea
184
191
  };
@@ -1,18 +1,21 @@
1
1
  import { css as o } from "lit";
2
- const a = o`
2
+ const e = o`
3
3
  @layer components {
4
- :host {
5
- overflow: hidden; /* Enable mask transition */
6
- padding-block-end: 3px; /* Make room for box-shadow */
7
- }
4
+ @layer overrides {
5
+ :host {
6
+ overflow: hidden; /* Enable mask transition */
7
+ padding-block-end: 3px; /* Make room for box-shadow */
8
+ }
9
+
10
+ #root {
11
+ --_skf-alert-bg-color: var(--skf-bg-color-neutral-1);
8
12
 
9
- .toast-item {
10
- background-color: var(--skf-bg-color-neutral-1);
11
- border-inline-start: var(--skf-size-8) solid
12
- var(--_skf-alert-border-color, var(--skf-border-color-primary));
13
+ /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
14
+ border-inline-start: var(--skf-size-8) solid var(--_skf-alert-border-color);
15
+ }
13
16
  }
14
17
  }
15
18
  `;
16
19
  export {
17
- a as default
20
+ e as default
18
21
  };
@@ -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,30 @@ 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();
27
- function u() {
28
- const n = new s(document);
29
- for (; n.hasToasts(); ) {
30
- const t = n.popToast();
25
+ const o = p(this.root, this.usePopover);
26
+ this.usePopover && o.showPopover(), n();
27
+ function n() {
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) {
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");
39
+ function p(i, t) {
40
+ const a = new s().getData()[0]?.topOffset ?? null;
41
+ let r = i.querySelector("body")?.querySelector("skf-toast-wrapper");
43
42
  if (!r) {
44
43
  if (r = document.createElement("skf-toast-wrapper"), !r) throw new Error("Could not create toast wrapper element");
45
44
  t && r.setAttribute("popover", "auto"), a && r.setAttribute("top-offset", a.toString()), document.body.appendChild(r);
@@ -8,8 +8,11 @@ import type { CSSResultGroup } from 'lit';
8
8
  * @attribute {"top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end"} [placement='bottom-start'] - The placement of the dropdown
9
9
  * @attribute {string} [anchor] - The id of the element the dropdown will be anchored to
10
10
  *
11
- * @event skf-opened - Fired when the dropdown is opened
12
- * @event skf-closed - Fired when the dropdown is closed
11
+ * @property {(void) => void} open() - Method that opens the tooltip
12
+ * @property {(void) => void} close() - Method that closes the tooltip
13
+ *
14
+ * @event {CustomEvent} skf-opened - Fired when the tooltip is opened
15
+ * @event {CustomEvent} skf-closed - Fired when the tooltip is closed
13
16
  *
14
17
  * @slot - The tooltip popover content
15
18
  *
@@ -18,7 +21,11 @@ import type { CSSResultGroup } from 'lit';
18
21
  export declare class SkfTooltip extends SkfPopoverBase {
19
22
  static styles: CSSResultGroup;
20
23
  constructor();
24
+ connectedCallback(): void;
25
+ /** @internal */
21
26
  openExtended(): void;
27
+ /** @internal */
22
28
  closeExtended(): void;
29
+ /** @internal */
23
30
  addEventListeners($element: HTMLElement | Element): void;
24
31
  }
@@ -1,23 +1,27 @@
1
- import { styles as n } from "./tooltip.styles.js";
1
+ import { styles as a } from "./tooltip.styles.js";
2
2
  import { SkfPopoverBase as t } from "../../internal/base-classes/popover/popover.base.js";
3
- const i = class i extends t {
3
+ const e = class e extends t {
4
4
  constructor() {
5
- super(), this.role = "tooltip", this.arrow = !0, this.offset = 8, this.placement = "top", this.variant = "tooltip", t.classMap = { tooltip: !0 };
5
+ super(), this.arrow = !0, this.offset = 8, this.placement = "top", this.variant = "tooltip", t.classMap = { tooltip: !0 };
6
6
  }
7
+ connectedCallback() {
8
+ super.connectedCallback(), this.role = "tooltip";
9
+ }
10
+ /** @internal */
7
11
  openExtended() {
8
- var s;
9
- (s = this.$anchor) == null || s.setAttribute("aria-describedby", this.id);
12
+ this.$anchor?.setAttribute("aria-describedby", this.id);
10
13
  }
14
+ /** @internal */
11
15
  closeExtended() {
12
- var s;
13
- (s = this.$anchor) == null || s.removeAttribute("aria-describedby");
16
+ this.$anchor?.removeAttribute("aria-describedby");
14
17
  }
18
+ /** @internal */
15
19
  addEventListeners(s) {
16
- s.addEventListener("blur", this.close.bind(this), { signal: this.signal }), s.addEventListener("focus", this.open.bind(this), { signal: this.signal }), s.addEventListener("mouseenter", this.open.bind(this), { signal: this.signal }), s.addEventListener("mouseleave", this.close.bind(this), { signal: this.signal });
20
+ s.addEventListener("blur", this.close, { signal: this.signal }), s.addEventListener("focus", this.open, { signal: this.signal }), s.addEventListener("mouseenter", this.open, { signal: this.signal }), s.addEventListener("mouseleave", this.close, { signal: this.signal });
17
21
  }
18
22
  };
19
- i.styles = [t.styles, n];
20
- let e = i;
23
+ e.styles = [t.styles, a];
24
+ let i = e;
21
25
  export {
22
- e as SkfTooltip
26
+ i as SkfTooltip
23
27
  };
@@ -1,5 +1,5 @@
1
- import { SkfTooltip } from './tooltip.component';
2
- export * from './tooltip.component';
1
+ import { SkfTooltip } from './tooltip.component.js';
2
+ export * from './tooltip.component.js';
3
3
  export default SkfTooltip;
4
4
  declare global {
5
5
  interface HTMLElementTagNameMap {