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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (355) hide show
  1. package/README.md +20 -27
  2. package/custom-elements.json +25490 -0
  3. package/dist/components/accordion/accordion-item.component.d.ts +36 -0
  4. package/dist/components/accordion/accordion-item.component.js +98 -0
  5. package/dist/components/accordion/accordion-item.d.ts +3 -3
  6. package/dist/components/accordion/accordion-item.js +4 -5
  7. package/dist/components/accordion/accordion-item.styles.js +77 -0
  8. package/dist/components/accordion/accordion.component.d.ts +10 -14
  9. package/dist/components/accordion/accordion.component.js +10 -11
  10. package/dist/components/accordion/accordion.d.ts +0 -1
  11. package/dist/components/accordion/accordion.js +0 -2
  12. package/dist/components/alert/alert.component.d.ts +12 -12
  13. package/dist/components/alert/alert.component.js +57 -55
  14. package/dist/components/alert/alert.styles.js +50 -51
  15. package/dist/components/breadcrumb/breadcrumb-item.component.js +60 -0
  16. package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.d.ts +2 -2
  17. package/dist/components/breadcrumb/breadcrumb-item.js +6 -0
  18. package/dist/components/breadcrumb/breadcrumb-item.styles.js +63 -0
  19. package/dist/components/breadcrumb/breadcrumb.component.d.ts +7 -4
  20. package/dist/components/breadcrumb/breadcrumb.component.js +65 -0
  21. package/dist/components/breadcrumb/breadcrumb.d.ts +2 -2
  22. package/dist/components/breadcrumb/breadcrumb.js +6 -0
  23. package/dist/components/breadcrumb/breadcrumb.styles.js +25 -0
  24. package/dist/components/button/button.component.d.ts +17 -14
  25. package/dist/components/button/button.component.js +73 -61
  26. package/dist/components/button/button.styles.d.ts +1 -2
  27. package/dist/components/button/button.styles.js +13 -3
  28. package/dist/components/card/card.component.d.ts +6 -1
  29. package/dist/components/card/card.component.js +46 -36
  30. package/dist/components/card/card.styles.js +37 -23
  31. package/dist/components/checkbox/checkbox.component.d.ts +17 -13
  32. package/dist/components/checkbox/checkbox.component.js +74 -61
  33. package/dist/components/checkbox/checkbox.styles.d.ts +1 -2
  34. package/dist/components/checkbox/checkbox.styles.js +1 -5
  35. package/dist/components/datepicker/datepicker-calendar.component.d.ts +80 -0
  36. package/dist/components/datepicker/datepicker-calendar.component.js +415 -0
  37. package/dist/components/datepicker/datepicker-calendar.d.ts +8 -0
  38. package/dist/components/datepicker/datepicker-calendar.js +6 -0
  39. package/dist/components/datepicker/datepicker-calendar.styles.js +202 -0
  40. package/dist/components/datepicker/datepicker-popup.component.d.ts +64 -0
  41. package/dist/components/datepicker/datepicker-popup.component.js +261 -0
  42. package/dist/components/datepicker/datepicker-popup.d.ts +8 -0
  43. package/dist/components/datepicker/datepicker-popup.helpers.d.ts +41 -0
  44. package/dist/components/datepicker/datepicker-popup.helpers.js +83 -0
  45. package/dist/components/datepicker/datepicker-popup.js +6 -0
  46. package/dist/components/datepicker/datepicker-popup.styles.js +87 -0
  47. package/dist/components/datepicker/datepicker.component.d.ts +121 -0
  48. package/dist/components/datepicker/datepicker.component.js +456 -0
  49. package/dist/components/datepicker/datepicker.d.ts +8 -0
  50. package/dist/components/datepicker/datepicker.helpers.d.ts +38 -0
  51. package/dist/components/datepicker/datepicker.helpers.js +31 -0
  52. package/dist/components/datepicker/datepicker.js +6 -0
  53. package/dist/components/datepicker/datepicker.styles.d.ts +1 -0
  54. package/dist/components/datepicker/datepicker.styles.js +18 -0
  55. package/dist/components/dialog/dialog.component.d.ts +20 -29
  56. package/dist/components/dialog/dialog.component.js +85 -75
  57. package/dist/components/dialog/dialog.d.ts +2 -2
  58. package/dist/components/dialog/dialog.styles.js +4 -4
  59. package/dist/components/divider/divider.component.d.ts +4 -8
  60. package/dist/components/divider/divider.component.js +24 -46
  61. package/dist/components/divider/divider.styles.js +34 -30
  62. package/dist/components/drawer/drawer.component.d.ts +61 -0
  63. package/dist/components/drawer/drawer.component.js +125 -0
  64. package/dist/components/drawer/drawer.d.ts +8 -0
  65. package/dist/components/drawer/drawer.js +6 -0
  66. package/dist/components/drawer/drawer.styles.js +71 -0
  67. package/dist/components/header/header.component.d.ts +46 -0
  68. package/dist/components/header/header.component.js +116 -0
  69. package/dist/components/header/header.d.ts +8 -0
  70. package/dist/components/header/header.js +6 -0
  71. package/dist/components/header/header.styles.js +68 -0
  72. package/dist/components/heading/heading.component.d.ts +8 -12
  73. package/dist/components/heading/heading.component.js +52 -24
  74. package/dist/components/heading/heading.styles.d.ts +1 -2
  75. package/dist/components/heading/heading.styles.js +35 -37
  76. package/dist/components/icon/icon.component.d.ts +15 -17
  77. package/dist/components/icon/icon.component.js +52 -43
  78. package/dist/components/icon/icon.styles.d.ts +1 -2
  79. package/dist/components/icon/icon.styles.js +60 -60
  80. package/dist/components/input/input.component.d.ts +31 -31
  81. package/dist/components/input/input.component.js +167 -146
  82. package/dist/components/input/input.controllers.d.ts +20 -6
  83. package/dist/components/input/input.controllers.js +14 -10
  84. package/dist/components/link/link.component.d.ts +20 -25
  85. package/dist/components/link/link.component.js +99 -107
  86. package/dist/components/link/link.styles.d.ts +1 -2
  87. package/dist/components/link/link.styles.js +47 -43
  88. package/dist/components/loader/loader.component.d.ts +1 -1
  89. package/dist/components/loader/loader.component.js +36 -40
  90. package/dist/components/loader/loader.styles.d.ts +1 -2
  91. package/dist/components/loader/loader.styles.js +40 -32
  92. package/dist/components/logo/logo.component.d.ts +8 -6
  93. package/dist/components/logo/logo.component.js +55 -51
  94. package/dist/components/logo/logo.styles.js +26 -16
  95. package/dist/components/menu/menu-item.component.d.ts +13 -0
  96. package/dist/components/menu/menu-item.component.js +13 -0
  97. package/dist/components/{menu-item → menu}/menu-item.d.ts +2 -2
  98. package/dist/components/{menu-item → menu}/menu-item.styles.js +8 -5
  99. package/dist/components/menu/menu.component.d.ts +10 -8
  100. package/dist/components/menu/menu.component.js +8 -10
  101. package/dist/components/menu/menu.d.ts +2 -2
  102. package/dist/components/nav/nav-item.component.d.ts +22 -0
  103. package/dist/components/nav/nav-item.component.js +57 -0
  104. package/dist/components/nav/nav-item.d.ts +8 -0
  105. package/dist/components/nav/nav-item.js +6 -0
  106. package/dist/components/nav/nav-item.styles.js +43 -0
  107. package/dist/components/nav/nav.component.d.ts +23 -0
  108. package/dist/components/nav/nav.component.js +55 -0
  109. package/dist/components/nav/nav.d.ts +8 -0
  110. package/dist/components/nav/nav.js +6 -0
  111. package/dist/components/nav/nav.styles.js +23 -0
  112. package/dist/components/popover/popover.component.d.ts +15 -8
  113. package/dist/components/popover/popover.component.js +29 -23
  114. package/dist/components/popover/popover.d.ts +2 -2
  115. package/dist/components/progress/progress.component.d.ts +4 -2
  116. package/dist/components/progress/progress.component.js +38 -35
  117. package/dist/components/progress/progress.d.ts +2 -2
  118. package/dist/components/progress/progress.styles.js +40 -33
  119. package/dist/components/radio/radio.component.d.ts +19 -13
  120. package/dist/components/radio/radio.component.js +12 -12
  121. package/dist/components/radio/radio.styles.d.ts +1 -2
  122. package/dist/components/radio/radio.styles.js +1 -1
  123. package/dist/components/segmented-button/segmented-button-item.component.d.ts +36 -0
  124. package/dist/components/segmented-button/segmented-button-item.component.js +56 -0
  125. package/dist/components/segmented-button/segmented-button-item.d.ts +8 -0
  126. package/dist/components/segmented-button/segmented-button-item.js +6 -0
  127. package/dist/components/segmented-button/segmented-button-item.styles.d.ts +1 -0
  128. package/dist/components/segmented-button/segmented-button-item.styles.js +62 -0
  129. package/dist/components/segmented-button/segmented-button.component.d.ts +30 -0
  130. package/dist/components/segmented-button/segmented-button.component.js +73 -0
  131. package/dist/components/segmented-button/segmented-button.d.ts +8 -0
  132. package/dist/components/segmented-button/segmented-button.js +6 -0
  133. package/dist/components/segmented-button/segmented-button.styles.d.ts +1 -0
  134. package/dist/components/segmented-button/segmented-button.styles.js +16 -0
  135. package/dist/components/{select-option-group → select}/select-option-group.component.d.ts +4 -0
  136. package/dist/components/select/select-option-group.component.js +50 -0
  137. package/dist/components/{select-option-group → select}/select-option-group.d.ts +2 -2
  138. package/dist/components/select/select-option-group.style.d.ts +1 -0
  139. package/dist/components/select/select-option-group.style.js +24 -0
  140. package/dist/components/{select-option → select}/select-option.component.d.ts +14 -11
  141. package/dist/components/select/select-option.component.js +140 -0
  142. package/dist/components/select/select-option.controllers.d.ts +15 -0
  143. package/dist/components/select/select-option.styles.d.ts +1 -0
  144. package/dist/components/select/select-option.styles.js +65 -0
  145. package/dist/components/select/select.component.d.ts +22 -17
  146. package/dist/components/select/select.component.js +62 -45
  147. package/dist/components/select/select.controllers.d.ts +21 -10
  148. package/dist/components/select/select.controllers.js +29 -23
  149. package/dist/components/select/stories/select.stories.icons.d.ts +7 -0
  150. package/dist/components/{stepper-item → stepper}/stepper-item.component.js +48 -48
  151. package/dist/components/{stepper-item → stepper}/stepper-item.d.ts +2 -2
  152. package/dist/components/stepper/stepper-item.styles.d.ts +1 -0
  153. package/dist/components/stepper/stepper.component.d.ts +4 -3
  154. package/dist/components/stepper/stepper.component.js +15 -15
  155. package/dist/components/stepper/stepper.d.ts +2 -2
  156. package/dist/components/stepper/stepper.helpers.d.ts +1 -1
  157. package/dist/components/switch/switch.component.d.ts +7 -6
  158. package/dist/components/switch/switch.component.js +21 -21
  159. package/dist/components/switch/switch.d.ts +2 -2
  160. package/dist/components/{tab-panel → tabs}/tab-panel.component.js +1 -1
  161. package/dist/components/{tab-panel → tabs}/tab-panel.d.ts +2 -2
  162. package/dist/components/tabs/tab-panel.styles.d.ts +1 -0
  163. package/dist/components/{tab → tabs}/tab.component.d.ts +2 -2
  164. package/dist/components/{tab → tabs}/tab.component.js +1 -1
  165. package/dist/components/{tab → tabs}/tab.d.ts +2 -2
  166. package/dist/components/tabs/tab.styles.d.ts +1 -0
  167. package/dist/components/{tab-group/tab-group.component.d.ts → tabs/tabs.component.d.ts} +3 -4
  168. package/dist/components/{tab-group/tab-group.component.js → tabs/tabs.component.js} +36 -37
  169. package/dist/components/tabs/tabs.d.ts +8 -0
  170. package/dist/components/tabs/tabs.js +6 -0
  171. package/dist/components/tabs/tabs.styles.d.ts +1 -0
  172. package/dist/components/{tab-group/tab-group.styles.js → tabs/tabs.styles.js} +16 -16
  173. package/dist/components/tag/tag.component.d.ts +20 -17
  174. package/dist/components/tag/tag.component.js +68 -67
  175. package/dist/components/tag/tag.d.ts +2 -2
  176. package/dist/components/tag/tag.styles.js +63 -50
  177. package/dist/components/textarea/textarea.component.d.ts +10 -11
  178. package/dist/components/textarea/textarea.component.js +67 -68
  179. package/dist/components/{toast-item → toast}/toast-item.component.js +15 -15
  180. package/dist/components/{toast-item → toast}/toast-item.d.ts +2 -0
  181. package/dist/components/{toast-item → toast}/toast-item.js +4 -0
  182. package/dist/components/toast/toast-item.styles.js +18 -0
  183. package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.js +1 -1
  184. package/dist/components/toast/toast-wrapper.styles.d.ts +1 -0
  185. package/dist/components/toast/toast.component.d.ts +9 -5
  186. package/dist/components/toast/toast.component.js +31 -27
  187. package/dist/components/toast/toast.singleton.d.ts +7 -12
  188. package/dist/components/toast/toast.singleton.js +26 -26
  189. package/dist/components/tooltip/tooltip.component.d.ts +7 -7
  190. package/dist/components/tooltip/tooltip.component.js +16 -11
  191. package/dist/components/tooltip/tooltip.d.ts +2 -2
  192. package/dist/custom-elements.json +3980 -2348
  193. package/dist/index.d.ts +22 -9
  194. package/dist/index.js +111 -74
  195. package/dist/internal/base-classes/popover/popover.base.d.ts +24 -9
  196. package/dist/internal/base-classes/popover/popover.base.js +140 -79
  197. package/dist/internal/base-classes/popover/popover.styles.js +17 -5
  198. package/dist/internal/components/hint/hint.component.d.ts +6 -2
  199. package/dist/internal/components/hint/hint.component.js +47 -20
  200. package/dist/internal/components/hint/hint.styles.d.ts +1 -2
  201. package/dist/internal/components/hint/hint.styles.js +30 -26
  202. package/dist/internal/components/skf-element.d.ts +1 -3
  203. package/dist/internal/components/skf-element.js +4 -9
  204. package/dist/internal/constants/iconSeverity.d.ts +3 -2
  205. package/dist/internal/constants/iconSeverity.js +2 -3
  206. package/dist/internal/controllers/elementOverflowController.d.ts +13 -0
  207. package/dist/internal/controllers/popover.controller.d.ts +12 -6
  208. package/dist/internal/controllers/popover.controller.js +9 -14
  209. package/dist/internal/helpers/dateFormatter.d.ts +2 -0
  210. package/dist/internal/helpers/hintSeverity.d.ts +2 -2
  211. package/dist/internal/helpers/hintSeverity.js +1 -1
  212. package/dist/internal/helpers/stateMap.d.ts +14 -0
  213. package/dist/internal/helpers/stateMap.js +68 -0
  214. package/dist/internal/helpers/utilityTypes.d.ts +22 -0
  215. package/dist/internal/helpers/uuid.d.ts +15 -0
  216. package/dist/internal/helpers/uuid.js +14 -0
  217. package/dist/internal/helpers/watch.d.ts +1 -1
  218. package/dist/internal/helpers/watch.js +12 -12
  219. package/dist/internal/storybook/styles.d.ts +1 -0
  220. package/dist/internal/types/formField.d.ts +1 -1
  221. package/dist/internal/types.d.ts +18 -0
  222. package/dist/styles/component.styles.d.ts +1 -2
  223. package/dist/styles/component.styles.js +38 -37
  224. package/dist/styles/form-field.styles.js +11 -6
  225. package/dist/styles/global-alt.css +1 -0
  226. package/dist/styles/global.css +1 -1
  227. package/dist/types/jsx/custom-element-jsx.d.ts +871 -1307
  228. package/dist/types/vue/index.d.ts +593 -360
  229. package/dist/vscode.html-custom-data.json +630 -1184
  230. package/dist/web-types.json +1422 -945
  231. package/package.json +47 -63
  232. package/dist/components/accordion/accordion.test.d.ts +0 -1
  233. package/dist/components/checkbox/checkbox.test.d.ts +0 -1
  234. package/dist/components/collapse/collapse.component.d.ts +0 -40
  235. package/dist/components/collapse/collapse.component.js +0 -86
  236. package/dist/components/collapse/collapse.d.ts +0 -8
  237. package/dist/components/collapse/collapse.js +0 -6
  238. package/dist/components/collapse/collapse.styles.d.ts +0 -2
  239. package/dist/components/collapse/collapse.styles.js +0 -77
  240. package/dist/components/collapse/collapse.test.d.ts +0 -1
  241. package/dist/components/input/input.test.d.ts +0 -1
  242. package/dist/components/menu-item/menu-item.component.d.ts +0 -25
  243. package/dist/components/menu-item/menu-item.component.js +0 -13
  244. package/dist/components/radio/radio.test.d.ts +0 -1
  245. package/dist/components/select-option/select-option.component.js +0 -123
  246. package/dist/components/select-option/select-option.controllers.d.ts +0 -9
  247. package/dist/components/select-option/select-option.styles.js +0 -53
  248. package/dist/components/select-option-group/select-option-group.component.js +0 -31
  249. package/dist/components/select-option-group/select-option-group.style.js +0 -18
  250. package/dist/components/switch/switch.test.d.ts +0 -1
  251. package/dist/components/tab-group/tab-group.d.ts +0 -8
  252. package/dist/components/tab-group/tab-group.js +0 -6
  253. package/dist/components/toast-item/toast-item.styles.js +0 -16
  254. package/dist/internal/constants/heading.d.ts +0 -2
  255. package/dist/internal/playwright/index.d.ts +0 -1
  256. package/dist/react/index.d.ts +0 -35
  257. package/dist/react/index.js +0 -35
  258. package/dist/react/skf-accordion/index.d.ts +0 -3
  259. package/dist/react/skf-accordion/index.js +0 -13
  260. package/dist/react/skf-alert/index.d.ts +0 -9
  261. package/dist/react/skf-alert/index.js +0 -17
  262. package/dist/react/skf-breadcrumb/index.d.ts +0 -9
  263. package/dist/react/skf-breadcrumb/index.js +0 -17
  264. package/dist/react/skf-breadcrumb-item/index.d.ts +0 -3
  265. package/dist/react/skf-breadcrumb-item/index.js +0 -13
  266. package/dist/react/skf-button/index.d.ts +0 -9
  267. package/dist/react/skf-button/index.js +0 -17
  268. package/dist/react/skf-card/index.d.ts +0 -3
  269. package/dist/react/skf-card/index.js +0 -13
  270. package/dist/react/skf-checkbox/index.d.ts +0 -9
  271. package/dist/react/skf-checkbox/index.js +0 -17
  272. package/dist/react/skf-collapse/index.d.ts +0 -9
  273. package/dist/react/skf-collapse/index.js +0 -17
  274. package/dist/react/skf-dialog/index.d.ts +0 -15
  275. package/dist/react/skf-dialog/index.js +0 -19
  276. package/dist/react/skf-divider/index.d.ts +0 -3
  277. package/dist/react/skf-divider/index.js +0 -13
  278. package/dist/react/skf-heading/index.d.ts +0 -3
  279. package/dist/react/skf-heading/index.js +0 -13
  280. package/dist/react/skf-icon/index.d.ts +0 -3
  281. package/dist/react/skf-icon/index.js +0 -13
  282. package/dist/react/skf-input/index.d.ts +0 -12
  283. package/dist/react/skf-input/index.js +0 -18
  284. package/dist/react/skf-link/index.d.ts +0 -3
  285. package/dist/react/skf-link/index.js +0 -13
  286. package/dist/react/skf-loader/index.d.ts +0 -3
  287. package/dist/react/skf-loader/index.js +0 -13
  288. package/dist/react/skf-logo/index.d.ts +0 -3
  289. package/dist/react/skf-logo/index.js +0 -13
  290. package/dist/react/skf-menu/index.d.ts +0 -12
  291. package/dist/react/skf-menu/index.js +0 -18
  292. package/dist/react/skf-menu-item/index.d.ts +0 -27
  293. package/dist/react/skf-menu-item/index.js +0 -23
  294. package/dist/react/skf-popover/index.d.ts +0 -12
  295. package/dist/react/skf-popover/index.js +0 -18
  296. package/dist/react/skf-progress/index.d.ts +0 -3
  297. package/dist/react/skf-progress/index.js +0 -13
  298. package/dist/react/skf-radio/index.d.ts +0 -9
  299. package/dist/react/skf-radio/index.js +0 -17
  300. package/dist/react/skf-select/index.d.ts +0 -21
  301. package/dist/react/skf-select/index.js +0 -21
  302. package/dist/react/skf-select-option/index.d.ts +0 -9
  303. package/dist/react/skf-select-option/index.js +0 -17
  304. package/dist/react/skf-select-option-group/index.d.ts +0 -3
  305. package/dist/react/skf-select-option-group/index.js +0 -13
  306. package/dist/react/skf-stepper/index.d.ts +0 -9
  307. package/dist/react/skf-stepper/index.js +0 -17
  308. package/dist/react/skf-stepper-item/index.d.ts +0 -9
  309. package/dist/react/skf-stepper-item/index.js +0 -17
  310. package/dist/react/skf-switch/index.d.ts +0 -3
  311. package/dist/react/skf-switch/index.js +0 -13
  312. package/dist/react/skf-tab/index.d.ts +0 -12
  313. package/dist/react/skf-tab/index.js +0 -18
  314. package/dist/react/skf-tab-group/index.d.ts +0 -3
  315. package/dist/react/skf-tab-group/index.js +0 -13
  316. package/dist/react/skf-tab-panel/index.d.ts +0 -3
  317. package/dist/react/skf-tab-panel/index.js +0 -13
  318. package/dist/react/skf-tag/index.d.ts +0 -3
  319. package/dist/react/skf-tag/index.js +0 -13
  320. package/dist/react/skf-textarea/index.d.ts +0 -12
  321. package/dist/react/skf-textarea/index.js +0 -18
  322. package/dist/react/skf-toast/index.d.ts +0 -3
  323. package/dist/react/skf-toast/index.js +0 -13
  324. package/dist/react/skf-toast-wrapper/index.d.ts +0 -3
  325. package/dist/react/skf-toast-wrapper/index.js +0 -13
  326. package/dist/react/skf-tooltip/index.d.ts +0 -12
  327. package/dist/react/skf-tooltip/index.js +0 -18
  328. /package/dist/components/{breadcrumb-item/breadcrumb-item.styles.d.ts → accordion/accordion-item.styles.d.ts} +0 -0
  329. /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.component.d.ts +0 -0
  330. /package/dist/components/{menu-item/menu-item.styles.d.ts → breadcrumb/breadcrumb-item.styles.d.ts} +0 -0
  331. /package/dist/components/{select-option-group/select-option-group.style.d.ts → datepicker/datepicker-calendar.styles.d.ts} +0 -0
  332. /package/dist/components/{select-option/select-option.styles.d.ts → datepicker/datepicker-popup.styles.d.ts} +0 -0
  333. /package/dist/components/{stepper-item/stepper-item.styles.d.ts → drawer/drawer.styles.d.ts} +0 -0
  334. /package/dist/components/{tab-group/tab-group.styles.d.ts → header/header.styles.d.ts} +0 -0
  335. /package/dist/components/{menu-item → menu}/menu-item.js +0 -0
  336. /package/dist/components/{tab-panel/tab-panel.styles.d.ts → menu/menu-item.styles.d.ts} +0 -0
  337. /package/dist/components/{tab/tab.styles.d.ts → nav/nav-item.styles.d.ts} +0 -0
  338. /package/dist/components/{toast-wrapper/toast-wrapper.styles.d.ts → nav/nav.styles.d.ts} +0 -0
  339. /package/dist/components/{select-option-group → select}/select-option-group.js +0 -0
  340. /package/dist/components/{select-option → select}/select-option.d.ts +0 -0
  341. /package/dist/components/{select-option → select}/select-option.js +0 -0
  342. /package/dist/components/{stepper-item → stepper}/stepper-item.component.d.ts +0 -0
  343. /package/dist/components/{stepper-item → stepper}/stepper-item.js +0 -0
  344. /package/dist/components/{stepper-item → stepper}/stepper-item.styles.js +0 -0
  345. /package/dist/components/{tab-panel → tabs}/tab-panel.component.d.ts +0 -0
  346. /package/dist/components/{tab-panel → tabs}/tab-panel.js +0 -0
  347. /package/dist/components/{tab-panel → tabs}/tab-panel.styles.js +0 -0
  348. /package/dist/components/{tab → tabs}/tab.js +0 -0
  349. /package/dist/components/{tab → tabs}/tab.styles.js +0 -0
  350. /package/dist/components/{toast-item → toast}/toast-item.component.d.ts +0 -0
  351. /package/dist/components/{toast-item → toast}/toast-item.styles.d.ts +0 -0
  352. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.d.ts +0 -0
  353. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.d.ts +0 -0
  354. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.js +0 -0
  355. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.styles.js +0 -0
@@ -1,45 +1,47 @@
1
1
  import "../icon/icon.js";
2
- import { FormBase as b } from "../../internal/components/formBase.js";
2
+ import { FormBase as c } from "../../internal/components/formBase.js";
3
3
  import "../../internal/components/hint/hint.js";
4
- import { hintSeverity as v } from "../../internal/helpers/hintSeverity.js";
5
- import { Asterisk as y } from "../../internal/templates/asterisk.js";
6
- import f from "../../styles/component.styles.js";
7
- import { html as h, nothing as d } from "lit";
8
- import { property as e, state as c, query as _, queryAssignedNodes as $ } from "lit/decorators.js";
4
+ import { hintSeverity as b } from "../../internal/helpers/hintSeverity.js";
5
+ import { watch as y } from "../../internal/helpers/watch.js";
6
+ import { Asterisk as f } from "../../internal/templates/asterisk.js";
7
+ import { componentStyles as _ } from "../../styles/component.styles.js";
8
+ import { html as h, nothing as u } from "lit";
9
+ import { state as p, property as s, query as $, queryAssignedNodes as g } from "lit/decorators.js";
9
10
  import { ifDefined as n } from "lit/directives/if-defined.js";
10
- import { live as g } from "lit/directives/live.js";
11
- import { InputNumberController as w, InputPasswordController as E } from "./input.controllers.js";
11
+ import { live as w } from "lit/directives/live.js";
12
+ import { InputNumberController as E, InputPasswordController as C } from "./input.controllers.js";
12
13
  import A from "./input.styles.js";
13
- var C = Object.defineProperty, S = Object.getOwnPropertyDescriptor, i = (m, s, r, a) => {
14
- for (var o = a > 1 ? void 0 : a ? S(s, r) : s, l = m.length - 1, u; l >= 0; l--)
15
- (u = m[l]) && (o = (a ? u(s, r, o) : u(o)) || o);
16
- return a && o && C(s, r, o), o;
14
+ var L = Object.defineProperty, P = Object.getOwnPropertyDescriptor, e = (v, t, r, a) => {
15
+ for (var o = a > 1 ? void 0 : a ? P(t, r) : t, l = v.length - 1, d; l >= 0; l--)
16
+ (d = v[l]) && (o = (a ? d(t, r, o) : d(o)) || o);
17
+ return a && o && L(t, r, o), o;
17
18
  };
18
- const p = class p extends b {
19
+ const m = class m extends c {
19
20
  constructor() {
20
- super(...arguments), this.buttonAriaLabelClear = "Clear input", this.buttonAriaLabelHide = "Hide password", this.buttonAriaLabelShow = "Show password", this.inputmode = "text", this.size = "md", this.type = "text", this.validateOn = "change", this.value = "", this.invalid = !1, this._buttonDown = !1, this._numberController = new w(this), this._passwordController = new E(this), this._handleInput = () => {
21
- this.value = this.$input.value || "", this.validateOn === "input" && (this._pristine = !1, this.validateInput());
22
- }, this._resetValue = (s) => {
23
- var r;
24
- s.stopPropagation(), this.value = ((r = this.getAttribute("value")) == null ? void 0 : r.trim()) ?? "", this._internals.setFormValue(this.value), this.$input.focus();
25
- }, this._handlePressStart = (s) => {
26
- this._buttonDown = !0, this.type === "number" && this._numberController.handleActionBtnLongPressStart(s);
21
+ super(...arguments), this._value = "", this.buttonAriaLabelClear = "Clear input", this.buttonAriaLabelHide = "Hide password", this.buttonAriaLabelShow = "Show password", this.debug = !1, this.hideLabel = !1, this.inputmode = "text", this.readonly = !1, this.showValid = !1, this.size = "md", this.type = "text", this.validateOn = "change", this.invalid = !1, this._buttonDown = !1, this._numberController = new E(this), this._passwordController = new C(this), this._handleInput = () => {
22
+ var t;
23
+ this._value = ((t = this.$input) == null ? void 0 : t.value) ?? "", this.validateOn === "input" && (this._pristine = !1, this.validateInput());
24
+ }, this._resetValue = (t) => {
25
+ var r, a;
26
+ t.stopPropagation(), this.value = ((r = this.getAttribute("value")) == null ? void 0 : r.trim()) ?? "", this._value = this.value, this._internals.setFormValue(this.value), (a = this.$input) == null || a.focus();
27
+ }, this._handlePressStart = (t) => {
28
+ this._buttonDown = !0, this.type === "number" && this._numberController.handleActionBtnLongPressStart(t);
27
29
  }, this._handlePressEnd = () => {
28
30
  this._buttonDown = !1, this.type === "number" && this._numberController.handleActionBtnLongPressEnd();
29
- }, this._renderNumberButton = (s) => h`
31
+ }, this._renderNumberButton = (t) => h`
30
32
  <button
31
33
  ?disabled=${this.disabled}
32
34
  @click=${(r) => {
33
- this._numberController.handleActionBtnClick(r, s);
35
+ this._numberController.handleActionBtnClick(r, t);
34
36
  }}
35
37
  @mousedown=${this._handlePressStart}
36
38
  @mouseup=${this._handlePressEnd}
37
39
  @mouseleave=${this._handlePressEnd}
38
- aria-label="${s === "inc" ? "Increment" : "Decrement"}"
40
+ aria-label="${t === "inc" ? "Increment" : "Decrement"}"
39
41
  class="number skf-icon-host"
40
42
  type="button"
41
43
  >
42
- <skf-icon name="${s === "inc" ? "chevronUp" : "chevronDown"}" size="sm"></skf-icon>
44
+ <skf-icon name="${t === "inc" ? "chevronUp" : "chevronDown"}" size="sm"></skf-icon>
43
45
  </button>
44
46
  `, this._renderPasswordButton = () => h`
45
47
  <button
@@ -66,24 +68,34 @@ const p = class p extends b {
66
68
  <skf-icon name="close" size="sm"></skf-icon>
67
69
  </button>
68
70
  `, this._onBlur = () => {
69
- this._buttonDown && this.$input.focus();
71
+ var t;
72
+ this._buttonDown && ((t = this.$input) == null || t.focus());
70
73
  };
71
74
  }
72
- set customInvalid(s) {
73
- this.customError = s || "";
75
+ set customInvalid(t) {
76
+ this.customError = t ?? "";
74
77
  }
75
78
  get customInvalid() {
76
79
  return this.customError;
77
80
  }
81
+ set value(t) {
82
+ this.$input && (this.$input.value = t, this._value = t, this._internals.setFormValue(t), this.validateInput());
83
+ }
84
+ get value() {
85
+ var t;
86
+ return ((t = this.$input) == null ? void 0 : t.value) ?? "";
87
+ }
78
88
  firstUpdated() {
79
- this.$input.addEventListener("change", () => {
80
- this.validateOn === "change" && (this.validateOn = "input", this._pristine = !1), this._internals.setFormValue(this.$input.value || ""), this.emitEvent("change"), this.validateInput();
81
- }), this.addEventListener("invalid", (s) => {
82
- this._pristine = !1, this.invalid = !0, this.customErrorDisplay && s.preventDefault();
89
+ var t;
90
+ (t = this.$input) == null || t.addEventListener("change", () => {
91
+ var r;
92
+ this.validateOn === "change" && (this.validateOn = "input", this._pristine = !1), this._internals.setFormValue(((r = this.$input) == null ? void 0 : r.value) ?? ""), this.emitEvent("change"), this.validateInput();
93
+ }), this.addEventListener("invalid", (r) => {
94
+ this._pristine = !1, this.invalid = !0, this.customErrorDisplay && r.preventDefault();
83
95
  }), this.addEventListener("reset", this._resetValue), this.validateInput();
84
96
  }
85
- willUpdate(s) {
86
- if (s.has("invalid"))
97
+ willUpdate(t) {
98
+ if (t.has("invalid"))
87
99
  if (this.invalid) {
88
100
  this.setAttribute("invalid", ""), this.showValid || this.removeAttribute("valid");
89
101
  const r = this._internals.validationMessage;
@@ -91,8 +103,11 @@ const p = class p extends b {
91
103
  } else
92
104
  this.removeAttribute("invalid"), !this._pristine && this.showValid && this.setAttribute("valid", "true"), this.hint = this.getAttribute("hint") ?? "";
93
105
  }
94
- attributeChangedCallback(s, r, a) {
95
- if (super.attributeChangedCallback(s, r, a), s === "value" && this._internals.setFormValue(a), s === "custom-invalid")
106
+ valueChanged() {
107
+ this._internals.setFormValue(this.value), this.validateInput();
108
+ }
109
+ attributeChangedCallback(t, r, a) {
110
+ if (super.attributeChangedCallback(t, r, a), t === "value" && this._internals.setFormValue(a), t === "custom-invalid")
96
111
  if (typeof a == "string") {
97
112
  const l = this.withFallback(a);
98
113
  this._pristine = !1, this._internals.setValidity({ customError: !0 }, l), this.invalid = !0, this.hint = l, this.checkValidity();
@@ -101,7 +116,7 @@ const p = class p extends b {
101
116
  }
102
117
  /** @internal */
103
118
  validateInput() {
104
- if (this._internals.validity.customError) return;
119
+ if (this._internals.validity.customError || !this.$input) return;
105
120
  const r = this.$input.validity;
106
121
  if (this.invalid = !1, r.valid)
107
122
  this._internals.setValidity({ customError: this._internals.validity.customError });
@@ -125,16 +140,16 @@ const p = class p extends b {
125
140
  }
126
141
  render() {
127
142
  var r, a, o, l;
128
- const s = (this._defaultSlot.length === 0 || !((a = (r = this._defaultSlot[0]) == null ? void 0 : r.textContent) != null && a.trim())) && !this.label;
143
+ const t = (this._defaultSlot.length === 0 || !((a = (r = this._defaultSlot[0]) == null ? void 0 : r.textContent) != null && a.trim())) && !this.label;
129
144
  return h`
130
145
  <div id="root">
131
146
  <label>
132
- <div class=${this.hideLabel ? "visually-hidden" : ""} ?hidden=${s} id="label">
147
+ <div class=${this.hideLabel ? "visually-hidden" : ""} ?hidden=${t} id="label">
133
148
  <slot>${this.label}</slot>
134
- ${this.required ? y(this.requiredLabel) : null}
149
+ ${this.required ? f(this.requiredLabel) : null}
135
150
  </div>
136
151
  <div id="input">
137
- ${this.type === "search" ? h`<skf-icon class="skf-icon-host" name="search" size="sm"></skf-icon>` : d}
152
+ ${this.type === "search" ? h`<skf-icon class="skf-icon-host" name="search" size="sm"></skf-icon>` : u}
138
153
  <div
139
154
  data-leading=${n(this.leading)}
140
155
  data-trailing=${n(this.trailing)}
@@ -144,14 +159,13 @@ const p = class p extends b {
144
159
  ?disabled=${this.disabled}
145
160
  ?readonly=${this.readonly}
146
161
  ?required=${this.required}
147
- .value=${g(this.value)}
162
+ .autocomplete=${this.autocomplete ?? "off"}
163
+ .value=${w(this.value)}
148
164
  @blur=${this._onBlur}
149
165
  @input=${this._handleInput}
150
- autocomplete=${this.autocomplete}
151
- aria-describedby=${n((o = this.hint) != null && o.trim() ? "hint" : d)}
152
- aria-errormessage=${n((l = this.hint) != null && l.trim() ? "hint" : d)}
166
+ aria-describedby=${n((o = this.hint) != null && o.trim() ? "hint" : u)}
167
+ aria-errormessage=${n((l = this.hint) != null && l.trim() ? "hint" : u)}
153
168
  aria-invalid=${!!this.invalid}
154
- autocomplete="off"
155
169
  data-testid="field-input"
156
170
  inputmode=${n(this.inputMode)}
157
171
  max=${n(this.max)}
@@ -170,118 +184,125 @@ const p = class p extends b {
170
184
  <div id="action">
171
185
  ${this._renderNumberButton("inc")} ${this._renderNumberButton("dec")}
172
186
  </div>
173
- ` : d}
174
- ${this.type === "password" ? this._renderPasswordButton() : d}
175
- ${this.type === "search" && this.value.length > 0 ? this._renderSearchButton() : d}
187
+ ` : u}
188
+ ${this.type === "password" ? this._renderPasswordButton() : u}
189
+ ${this.type === "search" && this._value.length > 0 ? this._renderSearchButton() : u}
176
190
  </div>
177
191
  </label>
178
192
  ${this.hint && h`
179
193
  <skf-hint
194
+ ?disabled=${this.disabled}
180
195
  aria-live=${this.invalid ? "assertive" : "polite"}
181
196
  id="hint"
182
- severity=${n(v(this.severity, this.invalid))}
183
- >${this.customInvalid ? this.customInvalid : this.hint}
197
+ severity=${n(b(this.invalid, this.severity))}
198
+ >${this.customInvalid ?? this.hint}
184
199
  </skf-hint>
185
200
  `}
186
201
  </div>
187
202
  `;
188
203
  }
189
204
  };
190
- p.styles = [f, A];
191
- let t = p;
192
- i([
193
- e({ type: String })
194
- ], t.prototype, "autocomplete", 2);
195
- i([
196
- e({ attribute: "button-aria-label-clear" })
197
- ], t.prototype, "buttonAriaLabelClear", 2);
198
- i([
199
- e({ attribute: "button-aria-label-hide" })
200
- ], t.prototype, "buttonAriaLabelHide", 2);
201
- i([
202
- e({ attribute: "button-aria-label-show" })
203
- ], t.prototype, "buttonAriaLabelShow", 2);
204
- i([
205
- e({ attribute: "custom-invalid", reflect: !0 })
206
- ], t.prototype, "customInvalid", 1);
207
- i([
208
- e({ type: Boolean })
209
- ], t.prototype, "debug", 2);
210
- i([
211
- e({ type: Boolean, attribute: "hide-label" })
212
- ], t.prototype, "hideLabel", 2);
213
- i([
214
- e()
215
- ], t.prototype, "hint", 2);
216
- i([
217
- e({ type: String })
218
- ], t.prototype, "inputmode", 2);
219
- i([
220
- e()
221
- ], t.prototype, "label", 2);
222
- i([
223
- e()
224
- ], t.prototype, "leading", 2);
225
- i([
226
- e()
227
- ], t.prototype, "max", 2);
228
- i([
229
- e({ type: Number, attribute: "maxlength" })
230
- ], t.prototype, "maxLength", 2);
231
- i([
232
- e()
233
- ], t.prototype, "min", 2);
234
- i([
235
- e({ type: Number, attribute: "minlength" })
236
- ], t.prototype, "minLength", 2);
237
- i([
238
- e()
239
- ], t.prototype, "name", 2);
240
- i([
241
- e()
242
- ], t.prototype, "pattern", 2);
243
- i([
244
- e()
245
- ], t.prototype, "placeholder", 2);
246
- i([
247
- e({ type: Boolean })
248
- ], t.prototype, "readonly", 2);
249
- i([
250
- e({ attribute: "required-label" })
251
- ], t.prototype, "requiredLabel", 2);
252
- i([
253
- e({ reflect: !0 })
254
- ], t.prototype, "severity", 2);
255
- i([
256
- e({ type: Boolean, attribute: "show-valid" })
257
- ], t.prototype, "showValid", 2);
258
- i([
259
- e({ reflect: !0 })
260
- ], t.prototype, "size", 2);
261
- i([
262
- e()
263
- ], t.prototype, "trailing", 2);
264
- i([
265
- e()
266
- ], t.prototype, "type", 2);
267
- i([
268
- e({ type: String, attribute: "validate-on" })
269
- ], t.prototype, "validateOn", 2);
270
- i([
271
- e()
272
- ], t.prototype, "value", 2);
273
- i([
274
- c()
275
- ], t.prototype, "invalid", 2);
276
- i([
277
- c()
278
- ], t.prototype, "_buttonDown", 2);
279
- i([
280
- _("input")
281
- ], t.prototype, "$input", 2);
282
- i([
283
- $({ flatten: !0 })
284
- ], t.prototype, "_defaultSlot", 2);
205
+ m.styles = [_, A];
206
+ let i = m;
207
+ e([
208
+ p()
209
+ ], i.prototype, "_value", 2);
210
+ e([
211
+ s()
212
+ ], i.prototype, "autocomplete", 2);
213
+ e([
214
+ s({ attribute: "button-aria-label-clear" })
215
+ ], i.prototype, "buttonAriaLabelClear", 2);
216
+ e([
217
+ s({ attribute: "button-aria-label-hide" })
218
+ ], i.prototype, "buttonAriaLabelHide", 2);
219
+ e([
220
+ s({ attribute: "button-aria-label-show" })
221
+ ], i.prototype, "buttonAriaLabelShow", 2);
222
+ e([
223
+ s({ attribute: "custom-invalid", reflect: !0 })
224
+ ], i.prototype, "customInvalid", 1);
225
+ e([
226
+ s({ type: Boolean })
227
+ ], i.prototype, "debug", 2);
228
+ e([
229
+ s({ type: Boolean, attribute: "hide-label" })
230
+ ], i.prototype, "hideLabel", 2);
231
+ e([
232
+ s()
233
+ ], i.prototype, "hint", 2);
234
+ e([
235
+ s()
236
+ ], i.prototype, "inputmode", 2);
237
+ e([
238
+ s()
239
+ ], i.prototype, "label", 2);
240
+ e([
241
+ s()
242
+ ], i.prototype, "leading", 2);
243
+ e([
244
+ s()
245
+ ], i.prototype, "max", 2);
246
+ e([
247
+ s({ type: Number, attribute: "maxlength" })
248
+ ], i.prototype, "maxLength", 2);
249
+ e([
250
+ s()
251
+ ], i.prototype, "min", 2);
252
+ e([
253
+ s({ type: Number, attribute: "minlength" })
254
+ ], i.prototype, "minLength", 2);
255
+ e([
256
+ s({ reflect: !0 })
257
+ ], i.prototype, "name", 2);
258
+ e([
259
+ s()
260
+ ], i.prototype, "pattern", 2);
261
+ e([
262
+ s()
263
+ ], i.prototype, "placeholder", 2);
264
+ e([
265
+ s({ type: Boolean })
266
+ ], i.prototype, "readonly", 2);
267
+ e([
268
+ s({ attribute: "required-label" })
269
+ ], i.prototype, "requiredLabel", 2);
270
+ e([
271
+ s({ reflect: !0 })
272
+ ], i.prototype, "severity", 2);
273
+ e([
274
+ s({ type: Boolean, attribute: "show-valid" })
275
+ ], i.prototype, "showValid", 2);
276
+ e([
277
+ s({ reflect: !0 })
278
+ ], i.prototype, "size", 2);
279
+ e([
280
+ s()
281
+ ], i.prototype, "trailing", 2);
282
+ e([
283
+ s()
284
+ ], i.prototype, "type", 2);
285
+ e([
286
+ s({ attribute: "validate-on" })
287
+ ], i.prototype, "validateOn", 2);
288
+ e([
289
+ s({})
290
+ ], i.prototype, "value", 1);
291
+ e([
292
+ p()
293
+ ], i.prototype, "invalid", 2);
294
+ e([
295
+ p()
296
+ ], i.prototype, "_buttonDown", 2);
297
+ e([
298
+ $("input")
299
+ ], i.prototype, "$input", 2);
300
+ e([
301
+ g({ flatten: !0 })
302
+ ], i.prototype, "_defaultSlot", 2);
303
+ e([
304
+ y("value", { waitUntilFirstUpdate: !0, afterUpdate: !0 })
305
+ ], i.prototype, "valueChanged", 1);
285
306
  export {
286
- t as SkfInput
307
+ i as SkfInput
287
308
  };
@@ -1,17 +1,31 @@
1
1
  import type { Icon } from '@skf-design-system/ui-assets';
2
- import type { ReactiveController } from 'lit';
2
+ import type { ReactiveController, ReactiveControllerHost } from 'lit';
3
3
  import type { SkfInput } from './input.component.js';
4
- type InputControllerHost = SkfInput;
4
+ /**
5
+ * Workaround for storybook helper not being able to import types
6
+ * E.g type ControllerHost = SkfInput;
7
+ */
8
+ interface ControllerHostProps {
9
+ $input?: HTMLInputElement;
10
+ _internals: ElementInternals;
11
+ value: string;
12
+ validateInput: () => void;
13
+ buttonAriaLabelShow: string;
14
+ buttonAriaLabelHide: string;
15
+ _handleInput: () => void;
16
+ _manageRequired: () => void;
17
+ _setFormValue: (value: string) => void;
18
+ }
5
19
  /**
6
20
  * Number
7
21
  */
8
22
  export type IncrementDecrement = 'inc' | 'dec';
9
23
  export declare class InputNumberController implements ReactiveController {
10
- host: InputControllerHost;
24
+ host?: ReactiveControllerHost & Partial<ControllerHostProps>;
11
25
  private _longPressId?;
12
26
  private _repeaterId?;
13
27
  private _inputElement?;
14
- constructor(host: InputControllerHost);
28
+ constructor(host: ReactiveControllerHost);
15
29
  hostUpdated(): void;
16
30
  handleActionBtnClick: (_: Event, type: IncrementDecrement) => void;
17
31
  handleActionBtnLongPressStart: (e: Event) => void;
@@ -21,12 +35,12 @@ export declare class InputNumberController implements ReactiveController {
21
35
  * password
22
36
  */
23
37
  export declare class InputPasswordController implements ReactiveController {
24
- host: InputControllerHost;
38
+ host?: ReactiveControllerHost & Partial<ControllerHostProps>;
25
39
  _inputElement?: HTMLInputElement;
26
40
  _icon: Extract<Icon, 'visibility' | 'visibilityOff'>;
27
41
  _buttonAriaLabel: string;
28
42
  _type: Extract<SkfInput['type'], 'password' | 'text'>;
29
- constructor(host: InputControllerHost);
43
+ constructor(host: ReactiveControllerHost);
30
44
  hostUpdated(): void;
31
45
  handleFieldLoaded: () => void;
32
46
  toggleVisibility: () => void;
@@ -1,9 +1,9 @@
1
1
  class l {
2
2
  constructor(t) {
3
3
  this.handleActionBtnClick = (i, s) => {
4
- var n;
4
+ var h, n;
5
5
  const e = this._inputElement;
6
- e && (s === "inc" ? e.stepUp() : e.stepDown(), this.host.value = ((n = this._inputElement) == null ? void 0 : n.value) ?? "", this.host._internals.setFormValue(this.host.value), this.host.validateInput());
6
+ !e || !this.host || (s === "inc" ? e.stepUp() : e.stepDown(), this.host.value = ((h = this._inputElement) == null ? void 0 : h.value) ?? "", (n = this.host._internals) == null || n.setFormValue(this.host.value), this.host.validateInput && this.host.validateInput());
7
7
  }, this.handleActionBtnLongPressStart = (i) => {
8
8
  const s = i.target.getAttribute("aria-label") === "Increment" ? "inc" : "dec";
9
9
  this._longPressId = setTimeout(() => {
@@ -13,25 +13,29 @@ class l {
13
13
  }, 400);
14
14
  }, this.handleActionBtnLongPressEnd = () => {
15
15
  clearTimeout(this._longPressId), clearInterval(this._repeaterId);
16
- }, this.host = t, t.addController(this);
16
+ }, (this.host = t).addController(this);
17
17
  }
18
18
  hostUpdated() {
19
- this._inputElement = this.host.$input;
19
+ var t;
20
+ this._inputElement = (t = this.host) == null ? void 0 : t.$input;
20
21
  }
21
22
  }
22
- class o {
23
+ class a {
23
24
  constructor(t) {
24
25
  this._icon = "visibility", this._type = "password", this.handleFieldLoaded = () => {
25
- this._inputElement && (this.host.value = this._inputElement.value, this.host._handleInput());
26
+ var i;
27
+ !this._inputElement || !((i = this.host) != null && i._handleInput) || (this.host.value = this._inputElement.value, this.host._handleInput());
26
28
  }, this.toggleVisibility = () => {
27
- this._inputElement && (this.host._handleInput(), this._type === "text" ? (this._buttonAriaLabel = this.host.buttonAriaLabelShow, this._icon = "visibility", this._type = "password") : (this._buttonAriaLabel = this.host.buttonAriaLabelHide, this._icon = "visibilityOff", this._type = "text"), this.host.requestUpdate(), this._inputElement.value = this.host.value);
28
- }, this.host = t, t.addController(this), this._buttonAriaLabel = this.host.buttonAriaLabelShow;
29
+ var i;
30
+ !this._inputElement || !((i = this.host) != null && i._handleInput) || (this.host._handleInput(), this._type === "text" ? (this._buttonAriaLabel = this.host.buttonAriaLabelShow ?? "", this._icon = "visibility", this._type = "password") : (this._buttonAriaLabel = this.host.buttonAriaLabelHide ?? "", this._icon = "visibilityOff", this._type = "text"), this.host.requestUpdate(), this._inputElement.value = this.host.value ?? "");
31
+ }, (this.host = t).addController(this), this._buttonAriaLabel = this.host.buttonAriaLabelShow ?? "";
29
32
  }
30
33
  hostUpdated() {
31
- this._inputElement = this.host.$input;
34
+ var t;
35
+ this._inputElement = (t = this.host) == null ? void 0 : t.$input;
32
36
  }
33
37
  }
34
38
  export {
35
39
  l as InputNumberController,
36
- o as InputPasswordController
40
+ a as InputPasswordController
37
41
  };
@@ -1,59 +1,54 @@
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';
3
+ import type { Icon } from '../../internal/types.js';
4
4
  import { type CSSResultGroup } from 'lit';
5
+ type Color = 'primary' | 'inverse';
5
6
  /**
6
- * The `<skf-link>` can be used as either a regular link or a link styled semantic button
7
+ * The `<skf-link>` can be used as either a regular link or a semantic button. The button variant is
8
+ * intended to be used for triggering javascript functions, not handling forms.
7
9
  *
8
- * @documentation See [InVision DSM](https://skf.invisionapp.com/dsm/ab-skf/4-web-applications/nav/5fa7caf78c01200018354495/folder/619626129069cd5f9510528f) for design principles
10
+ * @documentation See [zeroheight](https://zeroheight.com/****) for design principles
9
11
  *
10
- * @property {function} onClick - If provided, custom function triggered by click where the second return parameter enables custom routing.
12
+ * @event {CustomEvent} skf-link-click - Fired when the link is clicked
11
13
  *
12
14
  * @slot - The links' main content
13
15
  *
14
16
  * @tagname skf-link
15
17
  */
16
18
  export declare class SkfLink extends SkfElement {
19
+ #private;
17
20
  static styles: CSSResultGroup;
18
- static classMap: {};
19
- private _onClick?;
20
21
  /** Defines the semantic element to render */
21
- as: 'button' | 'a';
22
+ as: 'button' | 'link';
22
23
  /** Defines the text-color */
23
- color: 'primary' | 'inverse';
24
+ color: Color;
24
25
  /** If true, disables the link */
25
- disabled?: boolean;
26
+ disabled: boolean;
26
27
  /** If defined, downloads the url */
27
- download?: string;
28
+ download: boolean;
28
29
  /** If defined, loads url on click */
29
30
  href?: string;
30
- /**
31
- * If defined, renders an icon before or after the text
32
- * @type { "arrowDown" | "arrowDownUp" | "arrowLeft" | "arrowRight" | "arrowUp" | "article" | "artificialIntelligence" | "asset" | "attachment" | "bandCursor" | "bands" | "batteryEmpty" | "batteryFull" | "batteryLow" | "bearingFault" | "book" | "bulb" | "burger" | "cPM" | "calendar" | "calendarBooked" | "calendarEmpty" | "calendarNotBooked" | "calendarRecurring" | "caretDown" | "caretUp" | "caretUpDown" | "chat" | "check" | "checkCircle" | "checkSmall" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUp" | "chevronUpDown" | "close" | "closeAllFaults" | "closeFault" | "closeSmall" | "columnGraph" | "comment" | "connection1" | "connection2" | "connection3" | "connection4" | "danger" | "defectFrequencies" | "defectFrequenciesAlternative" | "doubleChevronLeft" | "doubleChevronRight" | "download" | "draft" | "draftFilled" | "draftOutlined" | "dragNDrop" | "drop" | "duplicate" | "edit" | "emailFilled" | "emailOutlined" | "exclamation" | "eye" | "eyeHidden" | "eyeVisible" | "filter" | "forbidden" | "fullScreen" | "fullScreenExit" | "functionalLocation" | "harmonicCursor" | "heatmap" | "hierarchy" | "history" | "historyAlt" | "hourglassFramedFilled" | "hourglassFramedOutlined" | "hourglassOutlined" | "hz" | "iMX" | "image" | "infoCircleFilled" | "infoCircleOutlined" | "integration" | "kebab" | "link" | "listGroup" | "listItem" | "locationPin" | "lock" | "logOut" | "meatballs" | "microphone" | "minus" | "minusSmall" | "noData" | "o" | "openInNew" | "overlayBaseline" | "pDF" | "paper" | "pause" | "pieChart" | "pin" | "play" | "plus" | "powerOff" | "printer" | "proCollect" | "recAction" | "received" | "refresh" | "reorder" | "replace" | "reply" | "rewalkableRoute" | "routes" | "search" | "send" | "sensorA" | "sensorB" | "settings" | "sidebandCursor" | "singleCursor" | "spectrum" | "starFilled" | "starOutlined" | "statusCircle" | "stop" | "structuralVibration" | "sync" | "timewave" | "trash" | "trend" | "trendingUp" | "undo" | "unknownCircle" | "unknownDiamond" | "unlink" | "unlock" | "unscheduledAction" | "upload" | "user" | "viewFull" | "viewHorizontal" | "viewVertical" | "warning" | "warningCircle" | "warningDiamond" | "zoomIn" | "zoomOut" }
33
- */
34
- icon?: SkfIcon['name'];
35
- /** Defines the position of the icon in relation to the text */
36
- iconPlacement: 'left' | 'right';
31
+ /** If defined, renders an icon before or after the text */
32
+ icon?: Icon;
33
+ /** If true, the icon is placed to the right in relation to the text */
34
+ iconRight: boolean;
37
35
  /** If defined, describes the relationship between a linked resource and the current document */
38
36
  rel?: string;
39
- /** If defined, used on conjunction with onClick property, second argument */
37
+ /** If defined, used on conjunction with onClick property. **Notice!** Only applicable to as=button. */
40
38
  route?: string;
41
39
  /** If true, fills the parents horizontal axis */
42
40
  stretch: boolean;
43
41
  /** If defined, specifies where to open the linked document */
44
42
  target?: '_blank' | '_parent' | '_self' | '_top';
45
- /** Defines the type of button */
46
- type: 'button' | 'submit' | 'reset';
47
- /** If defined, accepts a function that runs on click. Forwards optional route as second argument. */
48
- set onClick(onClickFn: ((event: Event, route?: string) => void) | undefined);
49
- get onClick(): ((event: Event, route?: string) => void) | undefined;
50
43
  connectedCallback(): void;
44
+ _handleAsChange(): void;
51
45
  /** @internal */
52
- private _assertValidOnClick;
46
+ _handleStateChange(property: string, _prev: unknown, next: unknown): void;
53
47
  /** @internal */
54
48
  /** retargets click event to host */
55
- private _preprocessOnClick;
49
+ private _handleClick;
56
50
  /** @internal */
57
51
  private _renderIcon;
58
52
  render(): import("lit").TemplateResult;
59
53
  }
54
+ export {};