@skf-design-system/ui-components 1.0.2-beta.0 → 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 (297) hide show
  1. package/README.md +37 -9
  2. package/dist/components/accordion/accordion-item.component.d.ts +36 -0
  3. package/dist/components/accordion/accordion-item.component.js +98 -0
  4. package/dist/components/accordion/accordion-item.d.ts +3 -3
  5. package/dist/components/accordion/accordion-item.js +4 -5
  6. package/dist/components/accordion/accordion-item.styles.js +77 -0
  7. package/dist/components/accordion/accordion.component.d.ts +6 -10
  8. package/dist/components/accordion/accordion.component.js +9 -10
  9. package/dist/components/accordion/accordion.d.ts +0 -1
  10. package/dist/components/accordion/accordion.js +0 -2
  11. package/dist/components/alert/alert.component.d.ts +12 -10
  12. package/dist/components/alert/alert.component.js +59 -51
  13. package/dist/components/alert/alert.styles.js +50 -51
  14. package/dist/components/breadcrumb/breadcrumb-item.component.js +59 -0
  15. package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.d.ts +2 -2
  16. package/dist/components/breadcrumb/breadcrumb-item.js +6 -0
  17. package/dist/components/breadcrumb/breadcrumb-item.styles.js +63 -0
  18. package/dist/components/breadcrumb/breadcrumb.component.d.ts +6 -3
  19. package/dist/components/breadcrumb/breadcrumb.component.js +65 -0
  20. package/dist/components/breadcrumb/breadcrumb.d.ts +2 -2
  21. package/dist/components/breadcrumb/breadcrumb.js +6 -0
  22. package/dist/components/breadcrumb/breadcrumb.styles.js +25 -0
  23. package/dist/components/button/button.component.d.ts +13 -10
  24. package/dist/components/button/button.component.js +69 -66
  25. package/dist/components/button/button.styles.d.ts +1 -2
  26. package/dist/components/button/button.styles.js +6 -5
  27. package/dist/components/card/card.component.d.ts +6 -1
  28. package/dist/components/card/card.component.js +46 -24
  29. package/dist/components/card/card.styles.js +31 -14
  30. package/dist/components/checkbox/checkbox.component.d.ts +14 -11
  31. package/dist/components/checkbox/checkbox.component.js +67 -69
  32. package/dist/components/checkbox/checkbox.styles.d.ts +1 -2
  33. package/dist/components/checkbox/checkbox.styles.js +2 -6
  34. package/dist/components/{date-picker/datepicker.calendar.component.d.ts → datepicker/datepicker-calendar.component.d.ts} +8 -1
  35. package/dist/components/{date-picker/datepicker.calendar.component.js → datepicker/datepicker-calendar.component.js} +109 -115
  36. package/dist/components/datepicker/datepicker-calendar.d.ts +8 -0
  37. package/dist/components/datepicker/datepicker-calendar.js +6 -0
  38. package/dist/components/{date-picker/datepicker.component.d.ts → datepicker/datepicker-popup.component.d.ts} +9 -20
  39. package/dist/components/datepicker/datepicker-popup.component.js +272 -0
  40. package/dist/components/datepicker/datepicker-popup.d.ts +8 -0
  41. package/dist/components/{date-picker/datepicker.helpers.d.ts → datepicker/datepicker-popup.helpers.d.ts} +3 -3
  42. package/dist/components/datepicker/datepicker-popup.helpers.js +83 -0
  43. package/dist/components/datepicker/datepicker-popup.js +6 -0
  44. package/dist/components/{date-picker/datepicker.styles.js → datepicker/datepicker-popup.styles.js} +3 -3
  45. package/dist/components/{date-picker-input/datepicker-input.component.d.ts → datepicker/datepicker.component.d.ts} +22 -14
  46. package/dist/components/datepicker/datepicker.component.js +455 -0
  47. package/dist/components/datepicker/datepicker.d.ts +8 -0
  48. package/dist/components/datepicker/datepicker.js +6 -0
  49. package/dist/components/dialog/dialog.component.d.ts +8 -6
  50. package/dist/components/dialog/dialog.component.js +67 -67
  51. package/dist/components/dialog/dialog.d.ts +2 -2
  52. package/dist/components/dialog/dialog.styles.js +4 -4
  53. package/dist/components/divider/divider.component.d.ts +3 -0
  54. package/dist/components/divider/divider.component.js +43 -22
  55. package/dist/components/divider/divider.styles.js +9 -9
  56. package/dist/components/drawer/drawer.component.d.ts +24 -12
  57. package/dist/components/drawer/drawer.component.js +87 -63
  58. package/dist/components/drawer/drawer.d.ts +2 -2
  59. package/dist/components/drawer/drawer.styles.js +47 -40
  60. package/dist/components/header/header.component.d.ts +7 -4
  61. package/dist/components/header/header.component.js +68 -55
  62. package/dist/components/header/header.d.ts +2 -2
  63. package/dist/components/header/header.styles.js +2 -2
  64. package/dist/components/heading/heading.component.d.ts +8 -6
  65. package/dist/components/heading/heading.component.js +52 -24
  66. package/dist/components/heading/heading.styles.js +34 -36
  67. package/dist/components/icon/icon.component.d.ts +15 -17
  68. package/dist/components/icon/icon.component.js +62 -43
  69. package/dist/components/icon/icon.styles.d.ts +1 -2
  70. package/dist/components/icon/icon.styles.js +60 -60
  71. package/dist/components/input/input.component.d.ts +34 -39
  72. package/dist/components/input/input.component.js +159 -153
  73. package/dist/components/input/input.controllers.d.ts +0 -1
  74. package/dist/components/input/input.controllers.js +14 -19
  75. package/dist/components/link/link.component.d.ts +20 -25
  76. package/dist/components/link/link.component.js +104 -107
  77. package/dist/components/link/link.styles.d.ts +1 -2
  78. package/dist/components/link/link.styles.js +54 -46
  79. package/dist/components/loader/loader.component.d.ts +6 -4
  80. package/dist/components/loader/loader.component.js +49 -42
  81. package/dist/components/loader/loader.styles.d.ts +1 -2
  82. package/dist/components/loader/loader.styles.js +34 -30
  83. package/dist/components/logo/logo.component.d.ts +8 -6
  84. package/dist/components/logo/logo.component.js +55 -51
  85. package/dist/components/logo/logo.styles.js +26 -16
  86. package/dist/components/menu/menu-item.component.d.ts +13 -0
  87. package/dist/components/menu/menu-item.component.js +13 -0
  88. package/dist/components/{menu-item → menu}/menu-item.d.ts +2 -2
  89. package/dist/components/menu/menu-item.styles.js +23 -0
  90. package/dist/components/menu/menu.component.d.ts +14 -8
  91. package/dist/components/menu/menu.component.js +10 -12
  92. package/dist/components/menu/menu.d.ts +2 -2
  93. package/dist/components/{nav-item → nav}/nav-item.component.d.ts +6 -4
  94. package/dist/components/nav/nav-item.component.js +57 -0
  95. package/dist/components/nav/nav-item.styles.js +43 -0
  96. package/dist/components/nav/nav.component.d.ts +9 -0
  97. package/dist/components/nav/nav.component.js +47 -21
  98. package/dist/components/nav/nav.d.ts +2 -2
  99. package/dist/components/nav/nav.styles.js +15 -9
  100. package/dist/components/popover/popover.component.d.ts +17 -6
  101. package/dist/components/popover/popover.component.js +22 -16
  102. package/dist/components/popover/popover.d.ts +2 -2
  103. package/dist/components/progress/progress.component.d.ts +4 -2
  104. package/dist/components/progress/progress.component.js +38 -35
  105. package/dist/components/progress/progress.d.ts +2 -2
  106. package/dist/components/progress/progress.styles.js +42 -35
  107. package/dist/components/radio/radio.component.d.ts +13 -9
  108. package/dist/components/radio/radio.component.js +96 -91
  109. package/dist/components/radio/radio.styles.js +1 -1
  110. package/dist/components/{segmented-button-item → segmented-button}/segmented-button-item.component.d.ts +4 -4
  111. package/dist/components/segmented-button/segmented-button-item.component.js +56 -0
  112. package/dist/components/{segmented-button-item → segmented-button}/segmented-button-item.d.ts +2 -2
  113. package/dist/components/segmented-button/segmented-button-item.js +6 -0
  114. package/dist/components/segmented-button/segmented-button-item.styles.js +62 -0
  115. package/dist/components/segmented-button/segmented-button.component.d.ts +0 -2
  116. package/dist/components/segmented-button/segmented-button.component.js +71 -0
  117. package/dist/components/segmented-button/segmented-button.d.ts +2 -2
  118. package/dist/components/segmented-button/segmented-button.js +6 -0
  119. package/dist/components/segmented-button/segmented-button.styles.js +16 -0
  120. package/dist/components/{select-option-group → select}/select-option-group.component.d.ts +4 -0
  121. package/dist/components/select/select-option-group.component.js +50 -0
  122. package/dist/components/{select-option-group → select}/select-option-group.d.ts +2 -2
  123. package/dist/components/select/select-option-group.style.js +24 -0
  124. package/dist/components/{select-option → select}/select-option.component.d.ts +16 -12
  125. package/dist/components/select/select-option.component.js +135 -0
  126. package/dist/components/select/select-option.styles.js +65 -0
  127. package/dist/components/select/select.component.d.ts +35 -25
  128. package/dist/components/select/select.component.js +126 -88
  129. package/dist/components/select/select.controllers.d.ts +1 -1
  130. package/dist/components/select/select.controllers.js +16 -18
  131. package/dist/components/select/select.styles.js +8 -2
  132. package/dist/components/select/stories/select.stories.icons.d.ts +7 -0
  133. package/dist/components/{stepper-item → stepper}/stepper-item.component.d.ts +1 -1
  134. package/dist/components/stepper/stepper-item.component.js +116 -0
  135. package/dist/components/{stepper-item → stepper}/stepper-item.d.ts +2 -2
  136. package/dist/components/{stepper-item → stepper}/stepper-item.styles.js +4 -4
  137. package/dist/components/stepper/stepper.component.d.ts +2 -2
  138. package/dist/components/stepper/stepper.component.js +17 -18
  139. package/dist/components/stepper/stepper.d.ts +2 -2
  140. package/dist/components/stepper/stepper.helpers.d.ts +1 -1
  141. package/dist/components/stepper/stepper.helpers.js +6 -7
  142. package/dist/components/switch/switch.component.d.ts +4 -2
  143. package/dist/components/switch/switch.component.js +64 -58
  144. package/dist/components/switch/switch.d.ts +2 -2
  145. package/dist/components/switch/switch.styles.js +1 -1
  146. package/dist/components/{tab-panel → tabs}/tab-panel.component.d.ts +1 -1
  147. package/dist/components/tabs/tab-panel.component.js +39 -0
  148. package/dist/components/{tab-panel → tabs}/tab-panel.d.ts +2 -2
  149. package/dist/components/{tab → tabs}/tab.component.d.ts +3 -3
  150. package/dist/components/{tab → tabs}/tab.component.js +18 -15
  151. package/dist/components/{tab → tabs}/tab.d.ts +2 -2
  152. package/dist/components/{tab → tabs}/tab.styles.js +2 -2
  153. package/dist/components/{tab-group/tab-group.component.d.ts → tabs/tabs.component.d.ts} +3 -4
  154. package/dist/components/{tab-group/tab-group.component.js → tabs/tabs.component.js} +36 -37
  155. package/dist/components/tabs/tabs.d.ts +8 -0
  156. package/dist/components/tabs/tabs.js +6 -0
  157. package/dist/components/{tab-group/tab-group.styles.js → tabs/tabs.styles.js} +16 -16
  158. package/dist/components/tag/tag.component.d.ts +20 -16
  159. package/dist/components/tag/tag.component.js +74 -65
  160. package/dist/components/tag/tag.d.ts +2 -2
  161. package/dist/components/tag/tag.styles.js +63 -50
  162. package/dist/components/textarea/textarea.component.d.ts +14 -13
  163. package/dist/components/textarea/textarea.component.js +77 -72
  164. package/dist/components/{toast-item → toast}/toast-item.d.ts +2 -0
  165. package/dist/components/{toast-item → toast}/toast-item.js +4 -0
  166. package/dist/components/toast/toast-item.styles.js +21 -0
  167. package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.js +1 -1
  168. package/dist/components/toast/toast-wrapper.styles.d.ts +1 -0
  169. package/dist/components/toast/toast.component.d.ts +5 -4
  170. package/dist/components/toast/toast.component.js +16 -16
  171. package/dist/components/toast/toast.singleton.d.ts +5 -5
  172. package/dist/components/toast/toast.singleton.js +28 -29
  173. package/dist/components/tooltip/tooltip.component.d.ts +11 -3
  174. package/dist/components/tooltip/tooltip.component.js +18 -9
  175. package/dist/components/tooltip/tooltip.d.ts +2 -2
  176. package/dist/custom-elements.json +2202 -1720
  177. package/dist/index.d.ts +19 -12
  178. package/dist/index.js +108 -89
  179. package/dist/internal/base-classes/popover/popover.base.d.ts +30 -6
  180. package/dist/internal/base-classes/popover/popover.base.js +83 -69
  181. package/dist/internal/base-classes/popover/popover.styles.js +4 -5
  182. package/dist/internal/components/formBase.d.ts +1 -0
  183. package/dist/internal/components/formBase.js +11 -19
  184. package/dist/internal/components/hint/hint.component.d.ts +6 -2
  185. package/dist/internal/components/hint/hint.component.js +47 -20
  186. package/dist/internal/components/hint/hint.styles.d.ts +1 -2
  187. package/dist/internal/components/hint/hint.styles.js +30 -26
  188. package/dist/internal/components/skf-element.d.ts +1 -3
  189. package/dist/internal/components/skf-element.js +4 -9
  190. package/dist/internal/constants/iconSeverity.d.ts +3 -2
  191. package/dist/internal/constants/iconSeverity.js +2 -3
  192. package/dist/internal/controllers/popover.controller.d.ts +2 -0
  193. package/dist/internal/controllers/popover.controller.js +11 -14
  194. package/dist/internal/helpers/hintSeverity.d.ts +2 -2
  195. package/dist/internal/helpers/hintSeverity.js +1 -1
  196. package/dist/internal/helpers/stateMap.d.ts +14 -0
  197. package/dist/internal/helpers/stateMap.js +68 -0
  198. package/dist/internal/helpers/uuid.d.ts +8 -10
  199. package/dist/internal/helpers/uuid.js +4 -11
  200. package/dist/internal/helpers/watch.d.ts +1 -1
  201. package/dist/internal/helpers/watch.js +12 -12
  202. package/dist/internal/templates/asterisk.d.ts +1 -1
  203. package/dist/internal/templates/asterisk.js +4 -4
  204. package/dist/internal/types/formField.d.ts +1 -1
  205. package/dist/internal/types.d.ts +22 -0
  206. package/dist/styles/component.styles.d.ts +1 -2
  207. package/dist/styles/component.styles.js +38 -37
  208. package/dist/styles/global-alt.css +1 -0
  209. package/dist/styles/global.css +1 -1
  210. package/dist/translations/en.d.ts +3 -0
  211. package/dist/translations/en.js +27 -0
  212. package/dist/translations/es.d.ts +3 -0
  213. package/dist/translations/es.js +27 -0
  214. package/dist/translations/index.d.ts +4 -0
  215. package/dist/translations/pt.d.ts +3 -0
  216. package/dist/translations/pt.js +27 -0
  217. package/dist/translations/sv.d.ts +3 -0
  218. package/dist/translations/sv.js +27 -0
  219. package/dist/types/jsx/custom-element-jsx.d.ts +2031 -927
  220. package/dist/types/vue/index.d.ts +357 -324
  221. package/dist/utilities/localize.d.ts +28 -0
  222. package/dist/utilities/localize.js +13 -0
  223. package/dist/vscode.html-custom-data.json +360 -1241
  224. package/dist/web-types.json +932 -805
  225. package/package.json +38 -52
  226. package/dist/components/accordion/accordion.test.d.ts +0 -1
  227. package/dist/components/checkbox/checkbox.test.d.ts +0 -1
  228. package/dist/components/collapse/collapse.component.d.ts +0 -40
  229. package/dist/components/collapse/collapse.component.js +0 -86
  230. package/dist/components/collapse/collapse.d.ts +0 -8
  231. package/dist/components/collapse/collapse.js +0 -6
  232. package/dist/components/collapse/collapse.styles.d.ts +0 -2
  233. package/dist/components/collapse/collapse.styles.js +0 -77
  234. package/dist/components/collapse/collapse.test.d.ts +0 -1
  235. package/dist/components/date-picker/datepicker.component.js +0 -261
  236. package/dist/components/date-picker/datepicker.d.ts +0 -10
  237. package/dist/components/date-picker/datepicker.helpers.js +0 -76
  238. package/dist/components/date-picker/datepicker.js +0 -8
  239. package/dist/components/date-picker-input/datepicker-input.component.js +0 -441
  240. package/dist/components/date-picker-input/datepicker-input.d.ts +0 -8
  241. package/dist/components/date-picker-input/datepicker-input.js +0 -6
  242. package/dist/components/input/input.test.d.ts +0 -1
  243. package/dist/components/menu-item/menu-item.component.d.ts +0 -25
  244. package/dist/components/menu-item/menu-item.component.js +0 -13
  245. package/dist/components/menu-item/menu-item.styles.js +0 -19
  246. package/dist/components/nav-item/nav-item.component.js +0 -38
  247. package/dist/components/nav-item/nav-item.styles.js +0 -39
  248. package/dist/components/radio/radio.test.d.ts +0 -1
  249. package/dist/components/select-option/select-option.component.js +0 -123
  250. package/dist/components/select-option/select-option.styles.js +0 -53
  251. package/dist/components/select-option-group/select-option-group.component.js +0 -31
  252. package/dist/components/select-option-group/select-option-group.style.js +0 -18
  253. package/dist/components/stepper-item/stepper-item.component.js +0 -113
  254. package/dist/components/switch/switch.test.d.ts +0 -1
  255. package/dist/components/tab-group/tab-group.d.ts +0 -8
  256. package/dist/components/tab-group/tab-group.js +0 -6
  257. package/dist/components/tab-panel/tab-panel.component.js +0 -36
  258. package/dist/components/toast-item/toast-item.styles.js +0 -18
  259. package/dist/internal/constants/heading.d.ts +0 -2
  260. package/dist/internal/playwright/index.d.ts +0 -1
  261. /package/dist/components/{breadcrumb-item/breadcrumb-item.styles.d.ts → accordion/accordion-item.styles.d.ts} +0 -0
  262. /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.component.d.ts +0 -0
  263. /package/dist/components/{date-picker/datepicker.calendar.styles.d.ts → breadcrumb/breadcrumb-item.styles.d.ts} +0 -0
  264. /package/dist/components/{date-picker/datepicker.styles.d.ts → datepicker/datepicker-calendar.styles.d.ts} +0 -0
  265. /package/dist/components/{date-picker/datepicker.calendar.styles.js → datepicker/datepicker-calendar.styles.js} +0 -0
  266. /package/dist/components/{menu-item/menu-item.styles.d.ts → datepicker/datepicker-popup.styles.d.ts} +0 -0
  267. /package/dist/components/{date-picker-input/datepicker-input.helpers.d.ts → datepicker/datepicker.helpers.d.ts} +0 -0
  268. /package/dist/components/{date-picker-input/datepicker-input.helpers.js → datepicker/datepicker.helpers.js} +0 -0
  269. /package/dist/components/{date-picker-input/datepicker-input.styles.d.ts → datepicker/datepicker.styles.d.ts} +0 -0
  270. /package/dist/components/{date-picker-input/datepicker-input.styles.js → datepicker/datepicker.styles.js} +0 -0
  271. /package/dist/components/{menu-item → menu}/menu-item.js +0 -0
  272. /package/dist/components/{nav-item/nav-item.styles.d.ts → menu/menu-item.styles.d.ts} +0 -0
  273. /package/dist/components/{nav-item → nav}/nav-item.d.ts +0 -0
  274. /package/dist/components/{nav-item → nav}/nav-item.js +0 -0
  275. /package/dist/components/{segmented-button-item/segmented-button-item.styles.d.ts → nav/nav-item.styles.d.ts} +0 -0
  276. /package/dist/components/{select-option-group/select-option-group.style.d.ts → segmented-button/segmented-button-item.styles.d.ts} +0 -0
  277. /package/dist/components/{select-option-group → select}/select-option-group.js +0 -0
  278. /package/dist/components/{select-option/select-option.styles.d.ts → select/select-option-group.style.d.ts} +0 -0
  279. /package/dist/components/{select-option → select}/select-option.controllers.d.ts +0 -0
  280. /package/dist/components/{select-option → select}/select-option.d.ts +0 -0
  281. /package/dist/components/{select-option → select}/select-option.js +0 -0
  282. /package/dist/components/{stepper-item/stepper-item.styles.d.ts → select/select-option.styles.d.ts} +0 -0
  283. /package/dist/components/{stepper-item → stepper}/stepper-item.js +0 -0
  284. /package/dist/components/{tab-group/tab-group.styles.d.ts → stepper/stepper-item.styles.d.ts} +0 -0
  285. /package/dist/components/{tab-panel → tabs}/tab-panel.js +0 -0
  286. /package/dist/components/{tab-panel → tabs}/tab-panel.styles.d.ts +0 -0
  287. /package/dist/components/{tab-panel → tabs}/tab-panel.styles.js +0 -0
  288. /package/dist/components/{tab → tabs}/tab.js +0 -0
  289. /package/dist/components/{tab → tabs}/tab.styles.d.ts +0 -0
  290. /package/dist/components/{toast-wrapper/toast-wrapper.styles.d.ts → tabs/tabs.styles.d.ts} +0 -0
  291. /package/dist/components/{toast-item → toast}/toast-item.component.d.ts +0 -0
  292. /package/dist/components/{toast-item → toast}/toast-item.component.js +0 -0
  293. /package/dist/components/{toast-item → toast}/toast-item.styles.d.ts +0 -0
  294. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.d.ts +0 -0
  295. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.d.ts +0 -0
  296. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.js +0 -0
  297. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.styles.js +0 -0
@@ -1,7 +1,9 @@
1
1
  import '../icon/icon.js';
2
2
  import { FormBase } from '../../internal/components/formBase.js';
3
3
  import '../../internal/components/hint/hint.js';
4
+ import type { FormFieldSeverity } from '../../internal/types.js';
4
5
  import type { FormFieldBaseProps } from '../../internal/types/formField.js';
6
+ import { type Language } from '../../utilities/localize.js';
5
7
  import { type CSSResultGroup } from 'lit';
6
8
  interface SkfTextAreaProps extends Omit<FormFieldBaseProps, 'type'> {
7
9
  cols?: number;
@@ -14,8 +16,8 @@ interface SkfTextAreaProps extends Omit<FormFieldBaseProps, 'type'> {
14
16
  *
15
17
  * @documentation See [zeroheight](https://zeroheight.com/853e936c9/p/143f9d-text-area) for design principles.
16
18
  *
17
- * @attribute {boolean} disabled - If true, sets disabled state
18
- * @attribute {boolean} required - If true, value is required or must be checked for the form to be submittable
19
+ * @attribute {boolean} [disabled=false] - If true, sets disabled state
20
+ * @attribute {boolean} [required=false] - If true, value is required or must be checked for the form to be submittable
19
21
  *
20
22
  * @event change - Fires when the value of the input changes
21
23
  * @event invalid - Fires when the input is invalid
@@ -25,7 +27,9 @@ interface SkfTextAreaProps extends Omit<FormFieldBaseProps, 'type'> {
25
27
  * @tagname skf-textarea
26
28
  */
27
29
  export declare class SkfTextArea extends FormBase implements SkfTextAreaProps {
30
+ #private;
28
31
  static styles: CSSResultGroup;
32
+ /** @internal */
29
33
  private customError;
30
34
  /** If defined, sets the cols of the textarea */
31
35
  cols?: number;
@@ -33,13 +37,15 @@ export declare class SkfTextArea extends FormBase implements SkfTextAreaProps {
33
37
  set customInvalid(value: string | undefined);
34
38
  get customInvalid(): string | undefined;
35
39
  /** If true, outputs helping hints in console */
36
- debug?: boolean;
40
+ debug: boolean;
37
41
  /** If true, hides the label visually */
38
- hideLabel?: boolean;
42
+ hideLabel: boolean;
39
43
  /** If defined, displays informational text below the field */
40
44
  hint?: string;
41
45
  /** If defined, sets the input's label unless the default slot is used. Alternatively, you can use the `label` attribute. */
42
46
  label?: string;
47
+ /** Sets the internal language of the component */
48
+ lang: Language;
43
49
  /** If defined, adds name to the input-element */
44
50
  name?: string;
45
51
  /** If defined, sets the maximum character length to accept for this input */
@@ -49,18 +55,13 @@ export declare class SkfTextArea extends FormBase implements SkfTextAreaProps {
49
55
  /** If defined, displays placeholder text */
50
56
  placeholder?: string;
51
57
  /** If true, makes the element not mutable, meaning the user can not edit the control */
52
- readonly?: boolean;
53
- /** If defined, renders an alternative A11y text for the asterisk */
54
- requiredLabel?: string;
58
+ readonly: boolean;
55
59
  /** If defined, sets the rows of the textarea */
56
60
  rows?: number;
57
- /**
58
- * If defined, displays provided severity state
59
- * @type {"success" | "info" | "warning" | "alert"}
60
- */
61
- severity?: SkfTextAreaProps['severity'];
61
+ /** If defined, displays provided severity state */
62
+ severity?: FormFieldSeverity;
62
63
  /** If true, displays valid state after interaction */
63
- showValid?: boolean;
64
+ showValid: boolean;
64
65
  /** Size of the Textarea */
65
66
  size?: 'sm' | 'md';
66
67
  /** Sets validation start */
@@ -1,22 +1,30 @@
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 { Asterisk as c } from "../../internal/templates/asterisk.js";
5
- import y from "../../styles/component.styles.js";
6
- import { nothing as p, html as v } from "lit";
7
- import { property as r, state as b, query as f } from "lit/decorators.js";
8
- import { ifDefined as n } from "lit/directives/if-defined.js";
9
- import g from "./textarea.styles.js";
10
- var $ = Object.defineProperty, E = Object.getOwnPropertyDescriptor, e = (h, t, s, a) => {
11
- for (var l = a > 1 ? void 0 : a ? E(t, s) : t, o = h.length - 1, d; o >= 0; o--)
12
- (d = h[o]) && (l = (a ? d(t, s, l) : d(l)) || l);
13
- return a && l && $(t, s, l), l;
14
- };
15
- const u = class u 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 $ {
16
23
  constructor() {
17
- super(...arguments), this.size = "md", this.validateOn = "change", this.value = "", this.invalid = !1, this._resetValue = (t) => {
18
- var s;
19
- t.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();
20
28
  }, this._handleInput = () => {
21
29
  this.value = this.$input.value || "", this.validateOn === "input" && (this.pristine = !1, this.validateInput());
22
30
  };
@@ -38,50 +46,49 @@ const u = class u extends m {
38
46
  if (t.has("invalid"))
39
47
  if (this.invalid) {
40
48
  this.setAttribute("invalid", ""), this.showValid || this.removeAttribute("valid");
41
- const s = this._internals.validationMessage;
42
- 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();
43
51
  } else
44
52
  this.removeAttribute("invalid"), !this.pristine && this.showValid && this.setAttribute("valid", "true"), this.hint = this.getAttribute("hint") ?? "";
45
53
  }
46
- attributeChangedCallback(t, s, a) {
47
- if (super.attributeChangedCallback(t, s, a), t === "value" && this._internals.setFormValue(a), t === "custom-invalid")
54
+ attributeChangedCallback(t, o, a) {
55
+ if (super.attributeChangedCallback(t, o, a), t === "value" && this._internals.setFormValue(a), t === "custom-invalid")
48
56
  if (typeof a == "string") {
49
- const o = this.withFallback(a);
50
- this.pristine = !1, this._internals.setValidity({ customError: !0 }, o), this.invalid = !0, this.hint = o, 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();
51
59
  } else
52
60
  this._internals.setValidity({}), this.validateInput();
53
61
  }
54
62
  /** @internal */
55
63
  validateInput() {
56
64
  if (this._internals.validity.customError) return;
57
- const s = this.$input.validity;
58
- if (this.invalid = !1, s.valid)
65
+ const o = this.$input.validity;
66
+ if (this.invalid = !1, o.valid)
59
67
  this._internals.setValidity({ customError: this._internals.validity.customError });
60
68
  else {
61
- this.invalid = !this.pristine && !s.valid;
69
+ this.invalid = !this.pristine && !o.valid;
62
70
  let a;
63
- for (a in s) {
64
- const l = `data-${a.toString()}`;
65
- if (s[a] && !this.hasAttribute(l) && this.debug && console.log(
66
- `Add custom message on ${this.localName} using attribute: ${l.toUpperCase()}="Your custom message"`
67
- ), 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]) {
68
76
  this.validationError = a.toString();
69
- const o = this.hasAttribute(l) ? this.getAttribute(l) : this.$input.validationMessage;
77
+ const d = this.hasAttribute(n) ? this.getAttribute(n) : this.$input.validationMessage;
70
78
  this._internals.setValidity(
71
79
  { [this.validationError]: !0, customError: this._internals.validity.customError },
72
- this.withFallback(o)
80
+ this.withFallback(d)
73
81
  ), this.invalid && this.customErrorDisplay && this.checkValidity();
74
82
  }
75
83
  }
76
84
  }
77
85
  }
78
86
  render() {
79
- var t, s;
80
- return v`
87
+ return g`
81
88
  <div id="root">
82
89
  <label>
83
90
  <div class=${this.hideLabel ? "visually-hidden" : ""} id="label">
84
- <slot>${this.label}</slot> ${this.required ? c(this.requiredLabel) : null}
91
+ <slot>${this.label}</slot> ${this.required ? _(y(this, p).term("required")) : u}
85
92
  </div>
86
93
  <div id="input">
87
94
  <textarea
@@ -90,24 +97,25 @@ const u = class u extends m {
90
97
  ?required=${this.required}
91
98
  .value=${this.value}
92
99
  @input=${this._handleInput}
93
- aria-describedby=${n((t = this.hint) != null && t.trim() ? "hint" : p)}
94
- aria-errormessage=${n((s = this.hint) != null && s.trim() ? "hint" : p)}
100
+ aria-describedby=${h(this.hint?.trim() ? "hint" : u)}
101
+ aria-errormessage=${h(this.hint?.trim() ? "hint" : u)}
95
102
  aria-invalid=${!!this.invalid}
96
- cols=${n(this.cols)}
97
- maxlength=${n(this.maxLength)}
98
- minlength=${n(this.minLength)}
99
- name=${n(this.name)}
100
- placeholder=${n(this.placeholder)}
101
- rows=${n(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)}
102
109
  >
103
110
  </textarea>
104
111
  </div>
105
112
  </label>
106
- ${this.hint && v`
113
+ ${this.hint && g`
107
114
  <skf-hint
115
+ ?disabled=${this.disabled}
108
116
  aria-live=${this.invalid ? "assertive" : "polite"}
109
117
  id="hint"
110
- severity=${n(_(this.severity, this.invalid))}
118
+ severity=${h(E(this.invalid, this.severity))}
111
119
  >
112
120
  ${this.customInvalid ?? this.hint}
113
121
  </skf-hint>
@@ -116,71 +124,68 @@ const u = class u extends m {
116
124
  `;
117
125
  }
118
126
  };
119
- u.styles = [y, g];
120
- let i = u;
127
+ p = new WeakMap(), v.styles = [V, L];
128
+ let i = v;
121
129
  e([
122
- r({ type: Number })
130
+ l({ type: Number })
123
131
  ], i.prototype, "cols", 2);
124
132
  e([
125
- r({ attribute: "custom-invalid", reflect: !0 })
133
+ l({ attribute: "custom-invalid", reflect: !0 })
126
134
  ], i.prototype, "customInvalid", 1);
127
135
  e([
128
- r({ type: Boolean })
136
+ l({ type: Boolean })
129
137
  ], i.prototype, "debug", 2);
130
138
  e([
131
- r({ type: Boolean, attribute: "hide-label" })
139
+ l({ type: Boolean, attribute: "hide-label" })
132
140
  ], i.prototype, "hideLabel", 2);
133
141
  e([
134
- r()
142
+ l()
135
143
  ], i.prototype, "hint", 2);
136
144
  e([
137
- r()
145
+ l()
138
146
  ], i.prototype, "label", 2);
139
147
  e([
140
- r()
148
+ l({ type: String })
149
+ ], i.prototype, "lang", 2);
150
+ e([
151
+ l()
141
152
  ], i.prototype, "name", 2);
142
153
  e([
143
- r({ type: Number, attribute: "maxlength" })
154
+ l({ type: Number, attribute: "maxlength" })
144
155
  ], i.prototype, "maxLength", 2);
145
156
  e([
146
- r({ type: Number, attribute: "minlength" })
157
+ l({ type: Number, attribute: "minlength" })
147
158
  ], i.prototype, "minLength", 2);
148
159
  e([
149
- r()
160
+ l()
150
161
  ], i.prototype, "placeholder", 2);
151
162
  e([
152
- r({ type: Boolean })
163
+ l({ type: Boolean })
153
164
  ], i.prototype, "readonly", 2);
154
165
  e([
155
- r({ attribute: "required-label" })
156
- ], i.prototype, "requiredLabel", 2);
157
- e([
158
- r({ type: Number })
166
+ l({ type: Number })
159
167
  ], i.prototype, "rows", 2);
160
168
  e([
161
- r()
169
+ l()
162
170
  ], i.prototype, "severity", 2);
163
171
  e([
164
- r({ type: Boolean, attribute: "show-valid" })
172
+ l({ type: Boolean, attribute: "show-valid" })
165
173
  ], i.prototype, "showValid", 2);
166
174
  e([
167
- r({ reflect: !0 })
175
+ l({ reflect: !0 })
168
176
  ], i.prototype, "size", 2);
169
177
  e([
170
- r({ type: String, attribute: "validate-on" })
178
+ l({ attribute: "validate-on" })
171
179
  ], i.prototype, "validateOn", 2);
172
180
  e([
173
- r()
181
+ l()
174
182
  ], i.prototype, "value", 2);
175
183
  e([
176
- b()
184
+ x()
177
185
  ], i.prototype, "invalid", 2);
178
186
  e([
179
- f("textarea")
187
+ I("textarea")
180
188
  ], i.prototype, "$input", 2);
181
- function _(h, t) {
182
- return t ? "error" : h;
183
- }
184
189
  export {
185
190
  i as SkfTextArea
186
191
  };
@@ -1,4 +1,6 @@
1
1
  import { SkfToastItem } from './toast-item.component.js';
2
+ export * from './toast-item.component';
3
+ export default SkfToastItem;
2
4
  declare global {
3
5
  interface HTMLElementTagNameMap {
4
6
  'skf-toast-item': SkfToastItem;
@@ -1,2 +1,6 @@
1
1
  import { SkfToastItem as t } from "./toast-item.component.js";
2
2
  t.define("skf-toast-item");
3
+ export {
4
+ t as SkfToastItem,
5
+ t as default
6
+ };
@@ -0,0 +1,21 @@
1
+ import { css as o } from "lit";
2
+ const e = o`
3
+ @layer components {
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);
12
+
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
+ }
16
+ }
17
+ }
18
+ `;
19
+ export {
20
+ e as default
21
+ };
@@ -1,5 +1,5 @@
1
1
  import { SkfElement as h } from "../../internal/components/skf-element.js";
2
- import d from "../../styles/component.styles.js";
2
+ import { componentStyles as 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
5
  import { styles as u } from "./toast-wrapper.styles.js";
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -1,5 +1,5 @@
1
- import type { SkfAlert } from '../alert/alert.component.js';
2
1
  import { SkfElement } from '../../internal/components/skf-element';
2
+ import type { Icon, Severity } from '../../internal/types.js';
3
3
  import { type CSSResultGroup } from 'lit';
4
4
  /**
5
5
  * 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.
@@ -18,14 +18,15 @@ import { type CSSResultGroup } from 'lit';
18
18
  */
19
19
  export declare class SkfToast extends SkfElement {
20
20
  static styles: CSSResultGroup;
21
+ /** @internal */
21
22
  private _singleton?;
22
23
  debug: boolean;
23
24
  /** If defined, displays leading icon */
24
- icon?: SkfAlert['icon'];
25
+ icon?: Icon;
25
26
  /** If true, renders with an close button and sets aria-role to `status` */
26
- persistent: SkfAlert['persistent'];
27
+ persistent: boolean;
27
28
  /** If defined, gives the supplied appearance */
28
- severity: SkfAlert['severity'];
29
+ severity: Severity;
29
30
  /** Time in seconds before the toast disappears. */
30
31
  timer: number;
31
32
  /** offsets where toasts emerge vertically */
@@ -1,25 +1,25 @@
1
- import { Singleton as l } from "./toast.singleton.js";
2
- import { SkfElement as d } from "../../internal/components/skf-element.js";
1
+ import { SkfElement as l } from "../../internal/components/skf-element.js";
3
2
  import { html as f } from "lit";
4
- import { property as s, queryAssignedNodes as y } from "lit/decorators.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 i = void 0, r = n.length - 1, m; r >= 0; r--)
8
- (m = n[r]) && (i = m(o, h, i) || i);
9
- return i && u(o, h, i), i;
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
- const p = class p extends d {
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 l(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
  });
@@ -31,22 +31,22 @@ const p = class p extends d {
31
31
  p.styles = [a];
32
32
  let t = p;
33
33
  e([
34
- s({ type: Boolean })
34
+ i({ type: Boolean })
35
35
  ], t.prototype, "debug");
36
36
  e([
37
- s()
37
+ i()
38
38
  ], t.prototype, "icon");
39
39
  e([
40
- s({ type: Boolean })
40
+ i({ type: Boolean })
41
41
  ], t.prototype, "persistent");
42
42
  e([
43
- s()
43
+ i()
44
44
  ], t.prototype, "severity");
45
45
  e([
46
- s({ type: Number })
46
+ i({ type: Number })
47
47
  ], t.prototype, "timer");
48
48
  e([
49
- s({ type: Number })
49
+ i({ type: Number })
50
50
  ], t.prototype, "topOffset");
51
51
  e([
52
52
  y()
@@ -1,16 +1,16 @@
1
- import '../toast-item/toast-item.js';
2
- import '../toast-wrapper/toast-wrapper.js';
3
- import type { SkfToast } from '../toast/toast.component.js';
1
+ import './toast-item.js';
2
+ import './toast-wrapper.js';
3
+ import type { SkfToast } from './toast.component.js';
4
4
  interface ToastData extends Pick<SkfToast, 'debug' | 'icon' | 'persistent' | 'severity' | 'timer' | 'topOffset'> {
5
5
  originEl: SkfToast;
6
6
  text: string;
7
7
  }
8
- export declare class Singleton {
8
+ export declare class SkfToastSingleton {
9
9
  private static instance?;
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,10 +1,10 @@
1
- import "../toast-item/toast-item.js";
2
- import "../toast-wrapper/toast-wrapper.js";
3
- class r {
4
- constructor(e) {
5
- if (this.data = [], this.root = e, this.usePopover = !0, this.root.nodeType !== Node.DOCUMENT_NODE)
1
+ import "./toast-item.js";
2
+ import "./toast-wrapper.js";
3
+ class s {
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
- return r.instance || (r.instance = this), r.instance;
7
+ return s.instance || (s.instance = this), s.instance;
8
8
  }
9
9
  hasToasts() {
10
10
  return this.data.length > 0;
@@ -15,39 +15,38 @@ class r {
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 r(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 r(document).getData()[0]) == null ? void 0 : p.topOffset) ?? null, i = n.querySelector("body");
42
- let s = i == null ? void 0 : i.querySelector("skf-toast-wrapper");
43
- if (!s) {
44
- if (s = document.createElement("skf-toast-wrapper"), !s) throw new Error("Could not create toast wrapper element");
45
- t && s.setAttribute("popover", "auto"), a && s.setAttribute("top-offset", a.toString()), document.body.appendChild(s);
39
+ function p(i, t) {
40
+ const a = new s().getData()[0]?.topOffset ?? null;
41
+ let r = i.querySelector("body")?.querySelector("skf-toast-wrapper");
42
+ if (!r) {
43
+ if (r = document.createElement("skf-toast-wrapper"), !r) throw new Error("Could not create toast wrapper element");
44
+ t && r.setAttribute("popover", "auto"), a && r.setAttribute("top-offset", a.toString()), document.body.appendChild(r);
46
45
  }
47
- return s;
46
+ return r;
48
47
  }
49
48
  }
50
49
  }
51
50
  export {
52
- r as Singleton
51
+ s as SkfToastSingleton
53
52
  };
@@ -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,6 +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 */
26
+ openExtended(): void;
27
+ /** @internal */
28
+ closeExtended(): void;
29
+ /** @internal */
21
30
  addEventListeners($element: HTMLElement | Element): void;
22
- removeEventListeners($element: HTMLElement | Element): void;
23
31
  }
@@ -1,18 +1,27 @@
1
- import { styles as n } from "./tooltip.styles.js";
2
- import { SkfPopoverBase as e } from "../../internal/base-classes/popover/popover.base.js";
3
- const t = class t extends e {
1
+ import { styles as a } from "./tooltip.styles.js";
2
+ import { SkfPopoverBase as t } from "../../internal/base-classes/popover/popover.base.js";
3
+ const e = class e extends t {
4
4
  constructor() {
5
- super(), this.arrow = !0, this.offset = 8, this.placement = "top", e.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 */
11
+ openExtended() {
12
+ this.$anchor?.setAttribute("aria-describedby", this.id);
13
+ }
14
+ /** @internal */
15
+ closeExtended() {
16
+ this.$anchor?.removeAttribute("aria-describedby");
17
+ }
18
+ /** @internal */
7
19
  addEventListeners(s) {
8
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 });
9
21
  }
10
- removeEventListeners(s) {
11
- s.addEventListener("blur", this.close), s.addEventListener("focus", this.open), s.removeEventListener("mouseenter", this.open), s.removeEventListener("mouseleave", this.close);
12
- }
13
22
  };
14
- t.styles = [e.styles, n];
15
- let i = t;
23
+ e.styles = [t.styles, a];
24
+ let i = e;
16
25
  export {
17
26
  i as SkfTooltip
18
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 {