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

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 (349) hide show
  1. package/README.md +20 -27
  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 +9 -13
  8. package/dist/components/accordion/accordion.component.js +8 -9
  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 -12
  12. package/dist/components/alert/alert.component.js +57 -55
  13. package/dist/components/alert/alert.styles.js +50 -51
  14. package/dist/components/breadcrumb/breadcrumb-item.component.js +60 -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 +7 -4
  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 +17 -14
  24. package/dist/components/button/button.component.js +73 -61
  25. package/dist/components/button/button.styles.d.ts +1 -2
  26. package/dist/components/button/button.styles.js +13 -3
  27. package/dist/components/card/card.component.d.ts +4 -1
  28. package/dist/components/card/card.component.js +46 -36
  29. package/dist/components/card/card.styles.js +36 -23
  30. package/dist/components/checkbox/checkbox.component.d.ts +17 -13
  31. package/dist/components/checkbox/checkbox.component.js +74 -61
  32. package/dist/components/checkbox/checkbox.styles.d.ts +1 -2
  33. package/dist/components/checkbox/checkbox.styles.js +1 -5
  34. package/dist/components/datepicker/datepicker-calendar.component.d.ts +80 -0
  35. package/dist/components/datepicker/datepicker-calendar.component.js +415 -0
  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/datepicker/datepicker-calendar.styles.js +202 -0
  39. package/dist/components/datepicker/datepicker-popup.component.d.ts +64 -0
  40. package/dist/components/datepicker/datepicker-popup.component.js +261 -0
  41. package/dist/components/datepicker/datepicker-popup.d.ts +8 -0
  42. package/dist/components/datepicker/datepicker-popup.helpers.d.ts +41 -0
  43. package/dist/components/datepicker/datepicker-popup.helpers.js +83 -0
  44. package/dist/components/datepicker/datepicker-popup.js +6 -0
  45. package/dist/components/datepicker/datepicker-popup.styles.js +87 -0
  46. package/dist/components/datepicker/datepicker.component.d.ts +121 -0
  47. package/dist/components/datepicker/datepicker.component.js +455 -0
  48. package/dist/components/datepicker/datepicker.d.ts +8 -0
  49. package/dist/components/datepicker/datepicker.helpers.d.ts +38 -0
  50. package/dist/components/datepicker/datepicker.helpers.js +31 -0
  51. package/dist/components/datepicker/datepicker.js +6 -0
  52. package/dist/components/datepicker/datepicker.styles.d.ts +1 -0
  53. package/dist/components/datepicker/datepicker.styles.js +18 -0
  54. package/dist/components/dialog/dialog.component.d.ts +20 -29
  55. package/dist/components/dialog/dialog.component.js +85 -75
  56. package/dist/components/dialog/dialog.d.ts +2 -2
  57. package/dist/components/dialog/dialog.styles.js +4 -4
  58. package/dist/components/divider/divider.component.d.ts +4 -8
  59. package/dist/components/divider/divider.component.js +24 -46
  60. package/dist/components/divider/divider.styles.js +34 -30
  61. package/dist/components/drawer/drawer.component.d.ts +61 -0
  62. package/dist/components/drawer/drawer.component.js +125 -0
  63. package/dist/components/drawer/drawer.d.ts +8 -0
  64. package/dist/components/drawer/drawer.js +6 -0
  65. package/dist/components/drawer/drawer.styles.js +71 -0
  66. package/dist/components/header/header.component.d.ts +46 -0
  67. package/dist/components/header/header.component.js +116 -0
  68. package/dist/components/header/header.d.ts +8 -0
  69. package/dist/components/header/header.js +6 -0
  70. package/dist/components/header/header.styles.js +68 -0
  71. package/dist/components/heading/heading.component.d.ts +8 -12
  72. package/dist/components/heading/heading.component.js +52 -24
  73. package/dist/components/heading/heading.styles.d.ts +1 -2
  74. package/dist/components/heading/heading.styles.js +35 -37
  75. package/dist/components/icon/icon.component.d.ts +19 -18
  76. package/dist/components/icon/icon.component.js +64 -43
  77. package/dist/components/icon/icon.styles.d.ts +1 -2
  78. package/dist/components/icon/icon.styles.js +61 -60
  79. package/dist/components/input/input.component.d.ts +31 -31
  80. package/dist/components/input/input.component.js +166 -146
  81. package/dist/components/input/input.controllers.d.ts +20 -6
  82. package/dist/components/input/input.controllers.js +14 -10
  83. package/dist/components/link/link.component.d.ts +12 -14
  84. package/dist/components/link/link.component.js +35 -34
  85. package/dist/components/link/link.styles.d.ts +1 -2
  86. package/dist/components/link/link.styles.js +24 -20
  87. package/dist/components/loader/loader.component.d.ts +1 -1
  88. package/dist/components/loader/loader.component.js +36 -40
  89. package/dist/components/loader/loader.styles.d.ts +1 -2
  90. package/dist/components/loader/loader.styles.js +40 -32
  91. package/dist/components/logo/logo.component.d.ts +8 -6
  92. package/dist/components/logo/logo.component.js +55 -51
  93. package/dist/components/logo/logo.styles.js +26 -16
  94. package/dist/components/menu/menu-item.component.d.ts +13 -0
  95. package/dist/components/{menu-item → menu}/menu-item.component.js +3 -3
  96. package/dist/components/{menu-item → menu}/menu-item.d.ts +2 -2
  97. package/dist/components/menu/menu.component.d.ts +10 -8
  98. package/dist/components/menu/menu.component.js +8 -10
  99. package/dist/components/menu/menu.d.ts +2 -2
  100. package/dist/components/nav/nav-item.component.d.ts +18 -0
  101. package/dist/components/nav/nav-item.component.js +38 -0
  102. package/dist/components/nav/nav-item.d.ts +8 -0
  103. package/dist/components/nav/nav-item.js +6 -0
  104. package/dist/components/nav/nav-item.styles.js +39 -0
  105. package/dist/components/nav/nav.component.d.ts +17 -0
  106. package/dist/components/nav/nav.component.js +34 -0
  107. package/dist/components/nav/nav.d.ts +8 -0
  108. package/dist/components/nav/nav.js +6 -0
  109. package/dist/components/nav/nav.styles.js +17 -0
  110. package/dist/components/popover/popover.component.d.ts +11 -8
  111. package/dist/components/popover/popover.component.js +24 -26
  112. package/dist/components/popover/popover.d.ts +2 -2
  113. package/dist/components/progress/progress.component.d.ts +2 -2
  114. package/dist/components/progress/progress.component.js +31 -37
  115. package/dist/components/progress/progress.d.ts +2 -2
  116. package/dist/components/progress/progress.styles.js +42 -35
  117. package/dist/components/radio/radio.component.d.ts +19 -13
  118. package/dist/components/radio/radio.component.js +12 -12
  119. package/dist/components/radio/radio.styles.d.ts +1 -2
  120. package/dist/components/radio/radio.styles.js +1 -1
  121. package/dist/components/segmented-button/segmented-button-item.component.d.ts +36 -0
  122. package/dist/components/segmented-button/segmented-button-item.component.js +56 -0
  123. package/dist/components/segmented-button/segmented-button-item.d.ts +8 -0
  124. package/dist/components/segmented-button/segmented-button-item.js +6 -0
  125. package/dist/components/segmented-button/segmented-button-item.styles.d.ts +1 -0
  126. package/dist/components/segmented-button/segmented-button-item.styles.js +62 -0
  127. package/dist/components/segmented-button/segmented-button.component.d.ts +30 -0
  128. package/dist/components/segmented-button/segmented-button.component.js +73 -0
  129. package/dist/components/segmented-button/segmented-button.d.ts +8 -0
  130. package/dist/components/segmented-button/segmented-button.js +6 -0
  131. package/dist/components/segmented-button/segmented-button.styles.d.ts +1 -0
  132. package/dist/components/segmented-button/segmented-button.styles.js +16 -0
  133. package/dist/components/{select-option-group → select}/select-option-group.component.js +1 -1
  134. package/dist/components/{select-option-group → select}/select-option-group.d.ts +2 -2
  135. package/dist/components/select/select-option-group.style.d.ts +1 -0
  136. package/dist/components/{select-option → select}/select-option.component.d.ts +9 -10
  137. package/dist/components/{select-option → select}/select-option.component.js +23 -23
  138. package/dist/components/select/select-option.controllers.d.ts +15 -0
  139. package/dist/components/select/select-option.styles.d.ts +1 -0
  140. package/dist/components/select/select.component.d.ts +18 -17
  141. package/dist/components/select/select.component.js +22 -23
  142. package/dist/components/select/select.controllers.d.ts +21 -10
  143. package/dist/components/select/select.controllers.js +27 -22
  144. package/dist/components/select/stories/select.stories.icons.d.ts +7 -0
  145. package/dist/components/{stepper-item → stepper}/stepper-item.component.js +48 -48
  146. package/dist/components/{stepper-item → stepper}/stepper-item.d.ts +2 -2
  147. package/dist/components/stepper/stepper-item.styles.d.ts +1 -0
  148. package/dist/components/stepper/stepper.component.d.ts +4 -3
  149. package/dist/components/stepper/stepper.component.js +15 -15
  150. package/dist/components/stepper/stepper.d.ts +2 -2
  151. package/dist/components/stepper/stepper.helpers.d.ts +1 -1
  152. package/dist/components/switch/switch.component.d.ts +7 -6
  153. package/dist/components/switch/switch.component.js +21 -21
  154. package/dist/components/switch/switch.d.ts +2 -2
  155. package/dist/components/{tab-panel → tabs}/tab-panel.component.js +1 -1
  156. package/dist/components/{tab-panel → tabs}/tab-panel.d.ts +2 -2
  157. package/dist/components/tabs/tab-panel.styles.d.ts +1 -0
  158. package/dist/components/{tab → tabs}/tab.component.d.ts +2 -2
  159. package/dist/components/{tab → tabs}/tab.component.js +1 -1
  160. package/dist/components/{tab → tabs}/tab.d.ts +2 -2
  161. package/dist/components/tabs/tab.styles.d.ts +1 -0
  162. package/dist/components/{tab-group/tab-group.component.d.ts → tabs/tabs.component.d.ts} +3 -4
  163. package/dist/components/{tab-group/tab-group.component.js → tabs/tabs.component.js} +36 -37
  164. package/dist/components/tabs/tabs.d.ts +8 -0
  165. package/dist/components/tabs/tabs.js +6 -0
  166. package/dist/components/tabs/tabs.styles.d.ts +1 -0
  167. package/dist/components/{tab-group/tab-group.styles.js → tabs/tabs.styles.js} +16 -16
  168. package/dist/components/tag/tag.component.d.ts +20 -17
  169. package/dist/components/tag/tag.component.js +68 -67
  170. package/dist/components/tag/tag.d.ts +2 -2
  171. package/dist/components/tag/tag.styles.js +63 -50
  172. package/dist/components/textarea/textarea.component.d.ts +10 -11
  173. package/dist/components/textarea/textarea.component.js +65 -67
  174. package/dist/components/{toast-item → toast}/toast-item.component.js +15 -15
  175. package/dist/components/{toast-item → toast}/toast-item.d.ts +2 -0
  176. package/dist/components/{toast-item → toast}/toast-item.js +4 -0
  177. package/dist/components/toast/toast-item.styles.js +18 -0
  178. package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.js +1 -1
  179. package/dist/components/toast/toast-wrapper.styles.d.ts +1 -0
  180. package/dist/components/toast/toast.component.d.ts +9 -5
  181. package/dist/components/toast/toast.component.js +32 -28
  182. package/dist/components/toast/toast.singleton.d.ts +6 -11
  183. package/dist/components/toast/toast.singleton.js +23 -23
  184. package/dist/components/tooltip/tooltip.component.d.ts +7 -7
  185. package/dist/components/tooltip/tooltip.component.js +16 -11
  186. package/dist/components/tooltip/tooltip.d.ts +2 -2
  187. package/dist/custom-elements.json +4091 -2539
  188. package/dist/index.d.ts +22 -9
  189. package/dist/index.js +111 -74
  190. package/dist/internal/base-classes/popover/popover.base.d.ts +24 -9
  191. package/dist/internal/base-classes/popover/popover.base.js +138 -77
  192. package/dist/internal/base-classes/popover/popover.styles.js +14 -1
  193. package/dist/internal/components/hint/hint.component.d.ts +2 -2
  194. package/dist/internal/components/hint/hint.component.js +2 -2
  195. package/dist/internal/components/hint/hint.styles.d.ts +1 -2
  196. package/dist/internal/components/hint/hint.styles.js +1 -1
  197. package/dist/internal/components/skf-element.d.ts +1 -3
  198. package/dist/internal/components/skf-element.js +4 -9
  199. package/dist/internal/constants/iconSeverity.d.ts +3 -2
  200. package/dist/internal/constants/iconSeverity.js +2 -3
  201. package/dist/internal/controllers/elementOverflowController.d.ts +13 -0
  202. package/dist/internal/controllers/popover.controller.d.ts +12 -6
  203. package/dist/internal/controllers/popover.controller.js +9 -14
  204. package/dist/internal/helpers/dateFormatter.d.ts +2 -0
  205. package/dist/internal/helpers/hintSeverity.d.ts +2 -2
  206. package/dist/internal/helpers/hintSeverity.js +1 -1
  207. package/dist/internal/helpers/stateMap.d.ts +14 -0
  208. package/dist/internal/helpers/stateMap.js +68 -0
  209. package/dist/internal/helpers/utilityTypes.d.ts +22 -0
  210. package/dist/internal/helpers/uuid.d.ts +15 -0
  211. package/dist/internal/helpers/uuid.js +14 -0
  212. package/dist/internal/helpers/watch.d.ts +1 -1
  213. package/dist/internal/helpers/watch.js +12 -12
  214. package/dist/internal/storybook/styles.d.ts +1 -0
  215. package/dist/internal/types/formField.d.ts +1 -1
  216. package/dist/internal/types.d.ts +18 -0
  217. package/dist/styles/component.styles.d.ts +1 -2
  218. package/dist/styles/component.styles.js +38 -37
  219. package/dist/styles/form-field.styles.js +11 -6
  220. package/dist/styles/global-alt.css +1 -0
  221. package/dist/styles/global.css +1 -1
  222. package/dist/types/jsx/custom-element-jsx.d.ts +740 -1294
  223. package/dist/types/vue/index.d.ts +543 -322
  224. package/dist/vscode.html-custom-data.json +526 -1076
  225. package/dist/web-types.json +1237 -761
  226. package/package.json +45 -61
  227. package/dist/components/accordion/accordion.test.d.ts +0 -1
  228. package/dist/components/checkbox/checkbox.test.d.ts +0 -1
  229. package/dist/components/collapse/collapse.component.d.ts +0 -40
  230. package/dist/components/collapse/collapse.component.js +0 -86
  231. package/dist/components/collapse/collapse.d.ts +0 -8
  232. package/dist/components/collapse/collapse.js +0 -6
  233. package/dist/components/collapse/collapse.styles.d.ts +0 -2
  234. package/dist/components/collapse/collapse.styles.js +0 -77
  235. package/dist/components/collapse/collapse.test.d.ts +0 -1
  236. package/dist/components/input/input.test.d.ts +0 -1
  237. package/dist/components/menu-item/menu-item.component.d.ts +0 -25
  238. package/dist/components/radio/radio.test.d.ts +0 -1
  239. package/dist/components/select-option/select-option.controllers.d.ts +0 -9
  240. package/dist/components/switch/switch.test.d.ts +0 -1
  241. package/dist/components/tab-group/tab-group.d.ts +0 -8
  242. package/dist/components/tab-group/tab-group.js +0 -6
  243. package/dist/components/toast-item/toast-item.styles.js +0 -16
  244. package/dist/internal/constants/heading.d.ts +0 -2
  245. package/dist/internal/playwright/index.d.ts +0 -1
  246. package/dist/react/index.d.ts +0 -35
  247. package/dist/react/index.js +0 -35
  248. package/dist/react/skf-accordion/index.d.ts +0 -3
  249. package/dist/react/skf-accordion/index.js +0 -13
  250. package/dist/react/skf-alert/index.d.ts +0 -9
  251. package/dist/react/skf-alert/index.js +0 -17
  252. package/dist/react/skf-breadcrumb/index.d.ts +0 -9
  253. package/dist/react/skf-breadcrumb/index.js +0 -17
  254. package/dist/react/skf-breadcrumb-item/index.d.ts +0 -3
  255. package/dist/react/skf-breadcrumb-item/index.js +0 -13
  256. package/dist/react/skf-button/index.d.ts +0 -9
  257. package/dist/react/skf-button/index.js +0 -17
  258. package/dist/react/skf-card/index.d.ts +0 -3
  259. package/dist/react/skf-card/index.js +0 -13
  260. package/dist/react/skf-checkbox/index.d.ts +0 -9
  261. package/dist/react/skf-checkbox/index.js +0 -17
  262. package/dist/react/skf-collapse/index.d.ts +0 -9
  263. package/dist/react/skf-collapse/index.js +0 -17
  264. package/dist/react/skf-dialog/index.d.ts +0 -15
  265. package/dist/react/skf-dialog/index.js +0 -19
  266. package/dist/react/skf-divider/index.d.ts +0 -3
  267. package/dist/react/skf-divider/index.js +0 -13
  268. package/dist/react/skf-heading/index.d.ts +0 -3
  269. package/dist/react/skf-heading/index.js +0 -13
  270. package/dist/react/skf-icon/index.d.ts +0 -3
  271. package/dist/react/skf-icon/index.js +0 -13
  272. package/dist/react/skf-input/index.d.ts +0 -12
  273. package/dist/react/skf-input/index.js +0 -18
  274. package/dist/react/skf-link/index.d.ts +0 -3
  275. package/dist/react/skf-link/index.js +0 -13
  276. package/dist/react/skf-loader/index.d.ts +0 -3
  277. package/dist/react/skf-loader/index.js +0 -13
  278. package/dist/react/skf-logo/index.d.ts +0 -3
  279. package/dist/react/skf-logo/index.js +0 -13
  280. package/dist/react/skf-menu/index.d.ts +0 -12
  281. package/dist/react/skf-menu/index.js +0 -18
  282. package/dist/react/skf-menu-item/index.d.ts +0 -27
  283. package/dist/react/skf-menu-item/index.js +0 -23
  284. package/dist/react/skf-popover/index.d.ts +0 -12
  285. package/dist/react/skf-popover/index.js +0 -18
  286. package/dist/react/skf-progress/index.d.ts +0 -3
  287. package/dist/react/skf-progress/index.js +0 -13
  288. package/dist/react/skf-radio/index.d.ts +0 -9
  289. package/dist/react/skf-radio/index.js +0 -17
  290. package/dist/react/skf-select/index.d.ts +0 -21
  291. package/dist/react/skf-select/index.js +0 -21
  292. package/dist/react/skf-select-option/index.d.ts +0 -9
  293. package/dist/react/skf-select-option/index.js +0 -17
  294. package/dist/react/skf-select-option-group/index.d.ts +0 -3
  295. package/dist/react/skf-select-option-group/index.js +0 -13
  296. package/dist/react/skf-stepper/index.d.ts +0 -9
  297. package/dist/react/skf-stepper/index.js +0 -17
  298. package/dist/react/skf-stepper-item/index.d.ts +0 -9
  299. package/dist/react/skf-stepper-item/index.js +0 -17
  300. package/dist/react/skf-switch/index.d.ts +0 -3
  301. package/dist/react/skf-switch/index.js +0 -13
  302. package/dist/react/skf-tab/index.d.ts +0 -12
  303. package/dist/react/skf-tab/index.js +0 -18
  304. package/dist/react/skf-tab-group/index.d.ts +0 -3
  305. package/dist/react/skf-tab-group/index.js +0 -13
  306. package/dist/react/skf-tab-panel/index.d.ts +0 -3
  307. package/dist/react/skf-tab-panel/index.js +0 -13
  308. package/dist/react/skf-tag/index.d.ts +0 -3
  309. package/dist/react/skf-tag/index.js +0 -13
  310. package/dist/react/skf-textarea/index.d.ts +0 -12
  311. package/dist/react/skf-textarea/index.js +0 -18
  312. package/dist/react/skf-toast/index.d.ts +0 -3
  313. package/dist/react/skf-toast/index.js +0 -13
  314. package/dist/react/skf-toast-wrapper/index.d.ts +0 -3
  315. package/dist/react/skf-toast-wrapper/index.js +0 -13
  316. package/dist/react/skf-tooltip/index.d.ts +0 -12
  317. package/dist/react/skf-tooltip/index.js +0 -18
  318. /package/dist/components/{breadcrumb-item/breadcrumb-item.styles.d.ts → accordion/accordion-item.styles.d.ts} +0 -0
  319. /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.component.d.ts +0 -0
  320. /package/dist/components/{menu-item/menu-item.styles.d.ts → breadcrumb/breadcrumb-item.styles.d.ts} +0 -0
  321. /package/dist/components/{select-option-group/select-option-group.style.d.ts → datepicker/datepicker-calendar.styles.d.ts} +0 -0
  322. /package/dist/components/{select-option/select-option.styles.d.ts → datepicker/datepicker-popup.styles.d.ts} +0 -0
  323. /package/dist/components/{stepper-item/stepper-item.styles.d.ts → drawer/drawer.styles.d.ts} +0 -0
  324. /package/dist/components/{tab-group/tab-group.styles.d.ts → header/header.styles.d.ts} +0 -0
  325. /package/dist/components/{menu-item → menu}/menu-item.js +0 -0
  326. /package/dist/components/{tab-panel/tab-panel.styles.d.ts → menu/menu-item.styles.d.ts} +0 -0
  327. /package/dist/components/{menu-item → menu}/menu-item.styles.js +0 -0
  328. /package/dist/components/{tab/tab.styles.d.ts → nav/nav-item.styles.d.ts} +0 -0
  329. /package/dist/components/{toast-wrapper/toast-wrapper.styles.d.ts → nav/nav.styles.d.ts} +0 -0
  330. /package/dist/components/{select-option-group → select}/select-option-group.component.d.ts +0 -0
  331. /package/dist/components/{select-option-group → select}/select-option-group.js +0 -0
  332. /package/dist/components/{select-option-group → select}/select-option-group.style.js +0 -0
  333. /package/dist/components/{select-option → select}/select-option.d.ts +0 -0
  334. /package/dist/components/{select-option → select}/select-option.js +0 -0
  335. /package/dist/components/{select-option → select}/select-option.styles.js +0 -0
  336. /package/dist/components/{stepper-item → stepper}/stepper-item.component.d.ts +0 -0
  337. /package/dist/components/{stepper-item → stepper}/stepper-item.js +0 -0
  338. /package/dist/components/{stepper-item → stepper}/stepper-item.styles.js +0 -0
  339. /package/dist/components/{tab-panel → tabs}/tab-panel.component.d.ts +0 -0
  340. /package/dist/components/{tab-panel → tabs}/tab-panel.js +0 -0
  341. /package/dist/components/{tab-panel → tabs}/tab-panel.styles.js +0 -0
  342. /package/dist/components/{tab → tabs}/tab.js +0 -0
  343. /package/dist/components/{tab → tabs}/tab.styles.js +0 -0
  344. /package/dist/components/{toast-item → toast}/toast-item.component.d.ts +0 -0
  345. /package/dist/components/{toast-item → toast}/toast-item.styles.d.ts +0 -0
  346. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.d.ts +0 -0
  347. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.d.ts +0 -0
  348. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.js +0 -0
  349. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.styles.js +0 -0
package/README.md CHANGED
@@ -42,13 +42,11 @@ The SKF UI Library is a collection of components that is meant to visually align
42
42
 
43
43
  The SKF UI Library is created using Lit/native web components in order to support as many frameworks as possible. It works out of the box for all frameworks, including React >= 19.
44
44
 
45
- For those who use React 18, we provide React wrappers that can be used in your application.
45
+ ## Philosophy
46
46
 
47
- ## Reporting issues
48
-
49
- Reporting issues requires an skf email and github access. [See this section](#skf-email)
47
+ We like to stay as close to how native compoments works as possible albeit adding extra features on top. The rationale behind is that it either makes easier to absorb the api or learn something that is usable in the world outside as well. Adding looped, repeated content is done declaratively by component specific child components.
50
48
 
51
- We are working on a solution to report issues without an explicit skf email, which will be publicly available.
49
+ <!-- For those who use React 18, we provide React wrappers that can be used in your application.-->
52
50
 
53
51
  ## 🏃 Getting started
54
52
 
@@ -89,10 +87,16 @@ How you get started using our components is of course a bit different depending
89
87
 
90
88
  In order for our components to work as intended you need to import our global styles where appropiate e.g. App.tsx.
91
89
 
92
- ```tsx
90
+ ```ts
93
91
  import '@skf-design-system/ui-components/styles/global.css';
94
92
  ```
95
93
 
94
+ If you want to handle the loading of the SKF fonts yourself, you can use the alternative global css file:
95
+
96
+ ```ts
97
+ import '@skf-design-system/ui-components/styles/global-alt.css';
98
+ ```
99
+
96
100
  ### Angular
97
101
 
98
102
  In order for our components to get the correct styling you need add our global styling to your project. In angular you can do that in the angular.json like this:
@@ -152,11 +156,11 @@ export class AppComponent {
152
156
 
153
157
  ```
154
158
 
155
- ### React 19 beta / Next 15 beta
159
+ ### React 19 / Nextjs 15
156
160
 
157
- Web Components will become first class citizens in React 19. Should you want to use them in a version prior to 19 you have to wrap them in React, which essentially converts the native event to React Syntactic events. Long story short, use React 19 (when released) and your off the hook.
161
+ Web Components is first class citizens in React 19. Should you want to use them in a version prior to 19 you have to wrap them in React wrappers, which essentially converts the native event to React Syntactic events. Long story short, use React 19 and your off the hook.
158
162
 
159
- If you want to proceed to use the React 19 beta together with typescript, see [React 19 RC upgrade guide](https://react.dev/blog/2024/04/25/react-19-upgrade-guide).
163
+ If you want to proceed to use the React 19 together with typescript, see [React 19 upgrade guide](https://react.dev/blog/2024/04/25/react-19-upgrade-guide).
160
164
 
161
165
  You will also have to declare a global type for the web components to get it to play nice with JSX.
162
166
 
@@ -221,24 +225,7 @@ import { SkfInput } from "@skf-design-system/ui-components";
221
225
  <skf-input name="input" onchange={(e) => console.log((e.target as unknown as SkfInput).value)}></skf-input>
222
226
  ```
223
227
 
224
- ### React 18
225
-
226
- > Note, for React 18 it is not necessary to install an extra plugin to get code completion since you are writing in react
227
-
228
- React 18 does not support native web components out of the box. If you want to use SKF UI components with React 18 you will have to use our generated wrappers in order to do so.
229
-
230
- ```tsx
231
- import { SkfInput } from "@skf-design-system/ui-components/react/index.js";
232
-
233
- ...
234
-
235
- <SkfInput
236
- name="input"
237
- onChange={(e) => {
238
- console.log( e.target.value );
239
- }}
240
- />
241
- ```
228
+ ⚠️ **React 18** does not support native web components. If you want to use this library you must upgrade React to version 19.
242
229
 
243
230
  ### Setting up code completion
244
231
 
@@ -321,6 +308,12 @@ steps:
321
308
 
322
309
  In this example a token has been added with the name `ACCESS_TOKEN_SECRET`, but you can give it any name you like ✨. If you want to know more about secret generation and usage you can read more about it in [GitHub's docs](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions).
323
310
 
311
+ ## Reporting issues
312
+
313
+ Reporting issues requires an skf email and github access. [See this section](#skf-email)
314
+
315
+ We are working on a solution to report issues without an explicit skf email, which will be publicly available.
316
+
324
317
  ## 📖 Further reading
325
318
 
326
319
  ### 🎁 Contributing
@@ -0,0 +1,36 @@
1
+ import '../icon/icon.js';
2
+ import { SkfElement } from '../../internal/components/skf-element.js';
3
+ import type { HeadingType } from '../../internal/types.js';
4
+ import type { CSSResultGroup } from 'lit';
5
+ export type SkfAccordionItemHeadingType = Exclude<HeadingType, 'h1'>;
6
+ /**
7
+ * The `<skf-accordion-item>` is used in conjunction with the `<skf-accordion>` component
8
+ *
9
+ * @event {CustomEvent} skf-accordion-item-toggle - Event emitted when toggled
10
+ *
11
+ * @slot - Main content
12
+ *
13
+ * @tagname skf-accordion-item
14
+ */
15
+ export declare class SkfAccordionItem extends SkfElement {
16
+ static styles: CSSResultGroup;
17
+ /** If true, will animate the expand/accordion-item state */
18
+ animated: boolean;
19
+ /** If true, will set the accordion-item to be expanded by default */
20
+ expanded: boolean;
21
+ /** Heading for the accordion-item */
22
+ heading?: string;
23
+ /** Defines which heading element will be rendered */
24
+ headingAs: SkfAccordionItemHeadingType;
25
+ /** If true, renders the small version */
26
+ small: boolean;
27
+ /** If true, will truncate the heading in accordion-item state */
28
+ truncate: boolean;
29
+ /** Class method as alternative to manipulate attribute */
30
+ setClose(): void;
31
+ /** Class method as alternative to manipulate attribute */
32
+ setOpen(): void;
33
+ /** @internal */
34
+ private _toggle;
35
+ render(): import("lit").TemplateResult;
36
+ }
@@ -0,0 +1,98 @@
1
+ import "../icon/icon.js";
2
+ import { SkfElement as p } from "../../internal/components/skf-element.js";
3
+ import { componentStyles as m } from "../../styles/component.styles.js";
4
+ import { property as i } from "lit/decorators.js";
5
+ import { classMap as h } from "lit/directives/class-map.js";
6
+ import { ifDefined as u } from "lit/directives/if-defined.js";
7
+ import { literal as r, html as f } from "lit/static-html.js";
8
+ import { styles as _ } from "./accordion-item.styles.js";
9
+ var g = Object.defineProperty, s = (d, e, c, y) => {
10
+ for (var a = void 0, o = d.length - 1, l; o >= 0; o--)
11
+ (l = d[o]) && (a = l(e, c, a) || a);
12
+ return a && g(e, c, a), a;
13
+ };
14
+ const n = class n extends p {
15
+ constructor() {
16
+ super(...arguments), this.animated = !1, this.expanded = !1, this.headingAs = "h2", this.small = !1, this.truncate = !1, this._toggle = () => {
17
+ this.dispatchEvent(
18
+ new CustomEvent("skf-accordion-item-toggle", {
19
+ bubbles: !0,
20
+ composed: !0,
21
+ cancelable: !0
22
+ })
23
+ ), this.expanded = !this.expanded;
24
+ };
25
+ }
26
+ /** Class method as alternative to manipulate attribute */
27
+ setClose() {
28
+ this.expanded = !1;
29
+ }
30
+ /** Class method as alternative to manipulate attribute */
31
+ setOpen() {
32
+ this.expanded = !0;
33
+ }
34
+ render() {
35
+ let e;
36
+ switch (!0) {
37
+ case this.headingAs === "h3":
38
+ e = r`h3`;
39
+ break;
40
+ case this.headingAs === "h4":
41
+ e = r`h4`;
42
+ break;
43
+ default:
44
+ e = r`h2`;
45
+ break;
46
+ }
47
+ return f`
48
+ <div class=${h({
49
+ "accordion-item": !0,
50
+ "accordion-item--animated": this.animated,
51
+ "accordion-item--expanded": this.expanded,
52
+ "accordion-item--small": this.small,
53
+ "accordion-item--truncate": this.truncate
54
+ })}>
55
+ <${e} class="accordion-item__heading">
56
+ <button
57
+ @click=${this._toggle}
58
+ aria-controls="main"
59
+ aria-expanded=${u(this.expanded ? "true" : "false")}
60
+ class="accordion-item__btn"
61
+ type="button"
62
+ >
63
+ <span class="accordion-item__label">${this.heading}</span>
64
+ <skf-icon class="accordion-item__icon" name=${this.expanded ? "caretUp" : "caretDown"}></skf-icon>
65
+ </button>
66
+ </${e}>
67
+ <div class="accordion-item__body">
68
+ <div class="accordion-item__main" data-testid="main" id="main">
69
+ <slot></slot>
70
+ </div>
71
+ </div>
72
+ </div>
73
+ `;
74
+ }
75
+ };
76
+ n.styles = [m, _];
77
+ let t = n;
78
+ s([
79
+ i({ type: Boolean, reflect: !0 })
80
+ ], t.prototype, "animated");
81
+ s([
82
+ i({ type: Boolean, reflect: !0 })
83
+ ], t.prototype, "expanded");
84
+ s([
85
+ i()
86
+ ], t.prototype, "heading");
87
+ s([
88
+ i({ attribute: "heading-as" })
89
+ ], t.prototype, "headingAs");
90
+ s([
91
+ i({ type: Boolean, reflect: !0 })
92
+ ], t.prototype, "small");
93
+ s([
94
+ i({ type: Boolean, reflect: !0 })
95
+ ], t.prototype, "truncate");
96
+ export {
97
+ t as SkfAccordionItem
98
+ };
@@ -1,6 +1,6 @@
1
- import { SkfCollapse } from '../collapse/collapse.component.js';
2
- export declare class SkfAccordionItem extends SkfCollapse {
3
- }
1
+ import { SkfAccordionItem } from './accordion-item.component.js';
2
+ export * from './accordion-item.component.js';
3
+ export default SkfAccordionItem;
4
4
  declare global {
5
5
  interface HTMLElementTagNameMap {
6
6
  'skf-accordion-item': SkfAccordionItem;
@@ -1,7 +1,6 @@
1
- import { SkfCollapse as e } from "../collapse/collapse.component.js";
2
- class f extends e {
3
- }
4
- e.define("skf-accordion-item");
1
+ import { SkfAccordionItem as o } from "./accordion-item.component.js";
2
+ o.define("skf-accordion-item");
5
3
  export {
6
- f as SkfAccordionItem
4
+ o as SkfAccordionItem,
5
+ o as default
7
6
  };
@@ -0,0 +1,77 @@
1
+ import { css as i } from "lit";
2
+ const e = i`
3
+ /* stylelint-disable selector-class-pattern */
4
+ @layer components {
5
+ .accordion-item {
6
+ background: var(--skf-bg-color-neutral-1);
7
+ border-bottom: var(--skf-border-width-sm) solid var(--skf-border-color-tertiary);
8
+ }
9
+
10
+ .accordion-item__heading {
11
+ font-size: var(--_skf-accordion-item-heading-size, var(--skf-font-size-100));
12
+ font-weight: var(--_skf-accordion-item-heading-weight, normal);
13
+
14
+ .accordion-item--small & {
15
+ --_skf-accordion-item-heading-size: var(--skf-font-size-75);
16
+ --_skf-accordion-item-heading-weight: var(--skf-font-weight-medium);
17
+ }
18
+ }
19
+
20
+ .accordion-item__btn {
21
+ align-items: center;
22
+ display: flex;
23
+ padding-block: var(--_skf-accordion-item-button-padding-block, var(--skf-spacing-50));
24
+ padding-inline: var(--skf-spacing-75);
25
+ width: 100%;
26
+
27
+ &:focus-visible {
28
+ outline: var(--skf-border-width-md) solid var(--skf-interactive-border-color-focus);
29
+ outline-offset: -2px;
30
+ }
31
+
32
+ .accordion-item--small & {
33
+ --_skf-accordion-item-button-padding-block: var(--skf-spacing-25);
34
+ }
35
+ }
36
+
37
+ .accordion-item__label {
38
+ .accordion-item--truncate:not(.accordion-item--expanded) & {
39
+ overflow: hidden;
40
+ text-overflow: ellipsis;
41
+ white-space: nowrap;
42
+ }
43
+ }
44
+
45
+ .accordion-item__icon {
46
+ margin-inline-start: auto;
47
+ }
48
+
49
+ .accordion-item__body {
50
+ display: grid;
51
+ grid-template-rows: var(--_skf-accordion-item-body-height, 0fr);
52
+ padding-inline: var(--skf-spacing-75);
53
+
54
+ .accordion-item--animated & {
55
+ transition: grid-template-rows calc(var(--skf-motion-duration-normal) * 1ms)
56
+ var(--skf-motion-easing-ease-in);
57
+ }
58
+
59
+ .accordion-item--expanded & {
60
+ --_skf-accordion-item-body-height: 1fr;
61
+ }
62
+ }
63
+
64
+ .accordion-item__main {
65
+ overflow: hidden;
66
+
67
+ &::after {
68
+ content: '';
69
+ display: block;
70
+ padding-block-end: var(--skf-spacing-100);
71
+ }
72
+ }
73
+ }
74
+ `;
75
+ export {
76
+ e as styles
77
+ };
@@ -1,11 +1,10 @@
1
- import '../collapse/collapse.js';
2
1
  import { SkfElement } from '../../internal/components/skf-element.js';
3
- import type { HeadingType } from '../../internal/constants/heading.js';
4
2
  import { type CSSResultGroup, type PropertyValues } from 'lit';
3
+ import type { SkfAccordionItemHeadingType } from './accordion-item.component.js';
5
4
  /**
6
- * The `<skf-accordion>` component consists of multiple `<skf-collapse>`, working together.
5
+ * The `<skf-accordion>` component consists of one or more `<skf-accordion-item>` item(s) working together
7
6
  *
8
- * See [zeroheight](https://zeroheight.com/853e936c9/p/6590bf-accordion) for design principles.
7
+ * See [zeroheight](https://zeroheight.com/853e936c9/p/6590bf-accordion) for design principles
9
8
  *
10
9
  * @slot - Expects one or more <skf-accordion-item> element(s)
11
10
  *
@@ -14,20 +13,17 @@ import { type CSSResultGroup, type PropertyValues } from 'lit';
14
13
  export declare class SkfAccordion extends SkfElement {
15
14
  static styles: CSSResultGroup;
16
15
  /** If true, will animate the expand/collapse state */
17
- animated?: boolean;
18
- /**
19
- * Defines which heading element will be rendered
20
- * @type { "h1" | "h2" | "h3" | "h4" }
21
- */
22
- headingAs: Exclude<HeadingType, 'h1'>;
16
+ animated: boolean;
17
+ /** Defines which heading element will be rendered */
18
+ headingAs: SkfAccordionItemHeadingType;
23
19
  /** If true, adds a gap between each item */
24
20
  gap: boolean;
25
21
  /** If true, allowes multiple accordion items to open */
26
- multiple?: boolean;
22
+ multiple: boolean;
27
23
  /** If true, renders the small version */
28
- small?: boolean;
24
+ small: boolean;
29
25
  /** If true, will truncate all headings in collapsed state */
30
- truncate?: boolean;
26
+ truncate: boolean;
31
27
  /** @internal */
32
28
  private $accordionItems;
33
29
  protected updated(_changedProperties: PropertyValues): void;
@@ -1,18 +1,17 @@
1
- import "../collapse/collapse.js";
2
- import { SkfElement as h } from "../../internal/components/skf-element.js";
3
- import m from "../../styles/component.styles.js";
1
+ import { SkfElement as p } from "../../internal/components/skf-element.js";
2
+ import { componentStyles as m } from "../../styles/component.styles.js";
4
3
  import { html as f } from "lit";
5
4
  import { property as a, queryAssignedNodes as d } from "lit/decorators.js";
6
5
  import { classMap as c } from "lit/directives/class-map.js";
7
6
  import { styles as g } from "./accordion.styles.js";
8
- var y = Object.defineProperty, s = (p, t, i, o) => {
9
- for (var r = void 0, l = p.length - 1, u; l >= 0; l--)
10
- (u = p[l]) && (r = u(t, i, r) || r);
7
+ var y = Object.defineProperty, s = (u, t, i, o) => {
8
+ for (var r = void 0, l = u.length - 1, h; l >= 0; l--)
9
+ (h = u[l]) && (r = h(t, i, r) || r);
11
10
  return r && y(t, i, r), r;
12
11
  };
13
- const n = class n extends h {
12
+ const n = class n extends p {
14
13
  constructor() {
15
- super(...arguments), this.headingAs = "h2", this.gap = !1, this._setItemAttributes = () => {
14
+ super(...arguments), this.animated = !1, this.headingAs = "h2", this.gap = !1, this.multiple = !1, this.small = !1, this.truncate = !1, this._setItemAttributes = () => {
16
15
  this.items.forEach((t) => {
17
16
  t.setAttribute("heading-as", this.headingAs), this.animated ? t.setAttribute("animated", "") : t.hasAttribute("animated") && t.removeAttribute("animated"), this.small ? t.setAttribute("small", "") : t.hasAttribute("small") && t.removeAttribute("small"), this.truncate ? t.setAttribute("truncate", "") : t.hasAttribute("truncate") && t.removeAttribute("truncate");
18
17
  });
@@ -36,7 +35,7 @@ const n = class n extends h {
36
35
  return f`
37
36
  <div class=${c({ "accordion--gap": this.gap })}>
38
37
  <slot
39
- @skf-collapse-toggle=${(t) => {
38
+ @skf-accordion-item-toggle=${(t) => {
40
39
  this._onChildToggle(t);
41
40
  }}
42
41
  @slotchange=${this._setItemAttributes}
@@ -1,5 +1,4 @@
1
1
  import { SkfAccordion } from './accordion.component.js';
2
- export * from './accordion-item.js';
3
2
  export * from './accordion.component.js';
4
3
  export default SkfAccordion;
5
4
  declare global {
@@ -1,8 +1,6 @@
1
1
  import { SkfAccordion as o } from "./accordion.component.js";
2
- import { SkfAccordionItem as e } from "./accordion-item.js";
3
2
  o.define("skf-accordion");
4
3
  export {
5
4
  o as SkfAccordion,
6
- e as SkfAccordionItem,
7
5
  o as default
8
6
  };
@@ -1,14 +1,13 @@
1
- import type { SkfIcon } from '../icon/icon.component.js';
2
1
  import '../icon/icon.js';
3
2
  import { SkfElement } from '../../internal/components/skf-element.js';
4
- import type { SeverityFgColor } from '@skf-design-system/ui-assets';
3
+ import type { Icon, Severity } from '../../internal/types.js';
5
4
  import { type CSSResultGroup } from 'lit';
6
5
  /**
7
6
  * The `<skf-alert>` is a type of notification that appears in-line
8
7
  *
9
- * @documentation See [zeroheight](https://zeroheight.com/853e936c9/p/990ec5-alert) for design principles
8
+ * See [zeroheight](https://zeroheight.com/853e936c9/p/990ec5-alert) for design principles
10
9
  *
11
- * @event skf-alert-close - Fires when the close button is clicked
10
+ * @event {CustomEvent} skf-alert-close - Fires when the close button is clicked
12
11
  *
13
12
  * @slot - Alert message. **Notice!** See design principles for approved content
14
13
  * @slot link - Slot for the link
@@ -16,18 +15,19 @@ import { type CSSResultGroup } from 'lit';
16
15
  * @tagname skf-alert
17
16
  */
18
17
  export declare class SkfAlert extends SkfElement {
18
+ #private;
19
19
  static styles: CSSResultGroup;
20
- /** If true, alert is being used as a toast (alertdialog) with an close button */
21
- closeable?: boolean;
22
20
  /** Close button aria-label */
23
21
  buttonLabel: string;
24
22
  /** If defined, displays leading icon */
25
- icon?: SkfIcon['name'];
26
- /**
27
- * If defined, gives the supplied appearance
28
- * @type { "error" | "info" | "warning" | "success" | "alert" }
29
- */
30
- severity?: SeverityFgColor;
23
+ icon?: Icon;
24
+ /** If true, renders with an close button and sets aria-role to `status` */
25
+ persistent: boolean;
26
+ /** If defined, gives the supplied appearance */
27
+ severity?: Severity;
28
+ connectedCallback(): void;
29
+ /** @internal */
30
+ _handleStateChange(): void;
31
31
  /** @internal */
32
32
  private _handleClose;
33
33
  render(): import("lit").TemplateResult<1>;
@@ -1,74 +1,76 @@
1
- import "../icon/icon.js";
2
- import { SkfElement as y } from "../../internal/components/skf-element.js";
3
- import b from "../../styles/component.styles.js";
4
- import { html as p, nothing as f } from "lit";
5
- import { property as r } from "lit/decorators.js";
6
- import { classMap as h } from "lit/directives/class-map.js";
7
- import { ifDefined as o } from "lit/directives/if-defined.js";
8
- import { styles as v } from "./alert.styles.js";
9
- var u = Object.defineProperty, s = (a, n, c, d) => {
10
- for (var e = void 0, i = a.length - 1, m; i >= 0; i--)
11
- (m = a[i]) && (e = m(n, c, e) || e);
12
- return e && u(n, c, e), e;
1
+ var u = (t) => {
2
+ throw TypeError(t);
13
3
  };
14
- const l = class l extends y {
4
+ var d = (t, e, s) => e.has(t) || u("Cannot " + s);
5
+ var m = (t, e, s) => (d(t, e, "read from private field"), s ? s.call(t) : e.get(t)), f = (t, e, s) => e.has(t) ? u("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), y = (t, e, s, o) => (d(t, e, "write to private field"), o ? o.call(t, s) : e.set(t, s), s);
6
+ import "../icon/icon.js";
7
+ import { SkfElement as g } from "../../internal/components/skf-element.js";
8
+ import { stateMap as C } from "../../internal/helpers/stateMap.js";
9
+ import { watch as S } from "../../internal/helpers/watch.js";
10
+ import { componentStyles as $ } from "../../styles/component.styles.js";
11
+ import { nothing as w, html as v } from "lit";
12
+ import { property as p } from "lit/decorators.js";
13
+ import { ifDefined as _ } from "lit/directives/if-defined.js";
14
+ import { styles as O } from "./alert.styles.js";
15
+ var P = Object.defineProperty, k = Object.getOwnPropertyDescriptor, l = (t, e, s, o) => {
16
+ for (var i = o > 1 ? void 0 : o ? k(e, s) : e, c = t.length - 1, h; c >= 0; c--)
17
+ (h = t[c]) && (i = (o ? h(e, s, i) : h(i)) || i);
18
+ return o && i && P(e, s, i), i;
19
+ }, n, a;
20
+ const b = class b extends g {
15
21
  constructor() {
16
- super(...arguments), this.buttonLabel = "Close", this._handleClose = () => {
22
+ super(...arguments);
23
+ f(this, n);
24
+ f(this, a);
25
+ y(this, n, this.attachInternals()), y(this, a, m(this, n).states), this.buttonLabel = "Close", this.persistent = !1, this._handleClose = () => {
17
26
  this.emit("skf-alert-close");
18
27
  };
19
28
  }
29
+ connectedCallback() {
30
+ super.connectedCallback(), this.role = this.persistent ? "status" : "alert";
31
+ }
32
+ _handleStateChange() {
33
+ const s = ["error", "info", "success", "warning"];
34
+ C(m(this, a), s).set(this.severity);
35
+ }
20
36
  render() {
21
- return p`
22
- <div
23
- aria-describedby="main"
24
- aria-modal=${o(this.closeable && "true")}
25
- class=${h({
26
- alert: !0,
27
- "alert--severity-alert": this.severity === "alert",
28
- "alert--severity-error": this.severity === "error",
29
- "alert--severity-info": this.severity === "info",
30
- "alert--severity-success": this.severity === "success",
31
- "alert--severity-warning": this.severity === "warning"
32
- })}
33
- role=${this.closeable ? "alertdialog" : "alert"}
34
- >
37
+ return v`
38
+ <div id="root">
35
39
  <skf-icon
36
- color=${o(this.severity ?? "secondary")}
37
- name=${o(this.icon)}
40
+ color=${_(this.severity ?? "secondary")}
41
+ name=${_(this.icon ?? "info")}
38
42
  size="sm"
39
43
  ></skf-icon>
40
- <div class="alert__body">
41
- <slot class="alert__main" id="main"></slot>
44
+ <div id="body">
45
+ <slot id="main"></slot>
42
46
  <slot name="link"></slot>
43
47
  </div>
44
- ${this.closeable ? p`
45
- <button
46
- @click="${this._handleClose}"
47
- aria-label=${this.buttonLabel}
48
- class="alert__btn"
49
- type="button"
50
- >
48
+ ${this.persistent ? v`
49
+ <button @click="${this._handleClose}" aria-label=${this.buttonLabel} type="button">
51
50
  <skf-icon name="close" size="sm"></skf-icon>
52
51
  </button>
53
- ` : f}
52
+ ` : w}
54
53
  </div>
55
54
  `;
56
55
  }
57
56
  };
58
- l.styles = [b, v];
59
- let t = l;
60
- s([
61
- r({ type: Boolean, reflect: !0 })
62
- ], t.prototype, "closeable");
63
- s([
64
- r({ attribute: "button-label" })
65
- ], t.prototype, "buttonLabel");
66
- s([
67
- r()
68
- ], t.prototype, "icon");
69
- s([
70
- r({ reflect: !0 })
71
- ], t.prototype, "severity");
57
+ n = new WeakMap(), a = new WeakMap(), b.styles = [$, O];
58
+ let r = b;
59
+ l([
60
+ p({ type: String, attribute: "button-label" })
61
+ ], r.prototype, "buttonLabel", 2);
62
+ l([
63
+ p({ type: String })
64
+ ], r.prototype, "icon", 2);
65
+ l([
66
+ p({ type: Boolean })
67
+ ], r.prototype, "persistent", 2);
68
+ l([
69
+ p({ type: String })
70
+ ], r.prototype, "severity", 2);
71
+ l([
72
+ S("severity")
73
+ ], r.prototype, "_handleStateChange", 1);
72
74
  export {
73
- t as SkfAlert
75
+ r as SkfAlert
74
76
  };