@skf-design-system/ui-components 1.0.2-beta.9 → 2.0.0-alpha.0

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 (388) hide show
  1. package/README.md +2 -2
  2. package/dist/components/accordion/accordion.css.js +4 -0
  3. package/dist/components/accordion/accordion.d.ts +31 -3
  4. package/dist/components/accordion/accordion.js +56 -4
  5. package/dist/components/accordion-item/accordion-item.css.js +4 -0
  6. package/dist/components/accordion-item/accordion-item.d.ts +43 -0
  7. package/dist/components/accordion-item/accordion-item.js +79 -0
  8. package/dist/components/alert/alert.css.js +4 -0
  9. package/dist/components/alert/alert.d.ts +38 -3
  10. package/dist/components/alert/alert.js +79 -4
  11. package/dist/components/badge/badge.css.js +4 -0
  12. package/dist/components/badge/badge.d.ts +28 -0
  13. package/dist/components/badge/badge.js +43 -0
  14. package/dist/components/breadcrumb/breadcrumb.css.js +4 -0
  15. package/dist/components/breadcrumb/breadcrumb.d.ts +32 -3
  16. package/dist/components/breadcrumb/breadcrumb.js +69 -4
  17. package/dist/components/breadcrumb-item/breadcrumb-item.css.js +4 -0
  18. package/dist/components/breadcrumb-item/breadcrumb-item.d.ts +24 -0
  19. package/dist/components/breadcrumb-item/breadcrumb-item.js +39 -0
  20. package/dist/components/button/button.css.js +4 -0
  21. package/dist/components/button/button.d.ts +67 -3
  22. package/dist/components/button/button.js +106 -3
  23. package/dist/components/card/card.css.js +4 -0
  24. package/dist/components/card/card.d.ts +33 -3
  25. package/dist/components/card/card.js +70 -4
  26. package/dist/components/fieldset/fieldset.css.js +4 -0
  27. package/dist/components/fieldset/fieldset.d.ts +49 -0
  28. package/dist/components/fieldset/fieldset.js +100 -0
  29. package/dist/components/heading/heading.css.js +4 -0
  30. package/dist/components/heading/heading.d.ts +24 -3
  31. package/dist/components/heading/heading.js +43 -4
  32. package/dist/components/hint/hint.css.js +4 -0
  33. package/dist/components/hint/hint.d.ts +32 -0
  34. package/dist/components/hint/hint.js +56 -0
  35. package/dist/components/icon/icon.css.js +4 -0
  36. package/dist/components/icon/icon.d.ts +27 -3
  37. package/dist/components/icon/icon.js +63 -4
  38. package/dist/components/input/input.css.js +4 -0
  39. package/dist/components/input/input.d.ts +79 -3
  40. package/dist/components/input/input.js +175 -4
  41. package/dist/components/logo/logo.css.js +4 -0
  42. package/dist/components/logo/logo.d.ts +18 -3
  43. package/dist/components/logo/logo.js +49 -4
  44. package/dist/components/radio/radio.css.js +4 -0
  45. package/dist/components/radio/radio.d.ts +30 -3
  46. package/dist/components/radio/radio.js +68 -4
  47. package/dist/components/spinner/spinner.css.js +4 -0
  48. package/dist/components/spinner/spinner.d.ts +21 -0
  49. package/dist/components/spinner/spinner.js +42 -0
  50. package/dist/components/tag/tag.css.js +4 -0
  51. package/dist/components/tag/tag.d.ts +28 -3
  52. package/dist/components/tag/tag.js +48 -4
  53. package/dist/components/text-button/text-button.css.js +4 -0
  54. package/dist/components/text-button/text-button.d.ts +61 -0
  55. package/dist/components/text-button/text-button.js +94 -0
  56. package/dist/custom-elements.json +1656 -6623
  57. package/dist/index.d.ts +18 -45
  58. package/dist/index.js +36 -135
  59. package/dist/internal/helpers/{dateFormatter.d.ts → skfDateFormatter.d.ts} +1 -1
  60. package/dist/internal/skf-element.d.ts +29 -0
  61. package/dist/internal/skf-element.js +43 -0
  62. package/dist/internal/skf-form-base.d.ts +27 -0
  63. package/dist/internal/skf-form-base.js +24 -0
  64. package/dist/internal/storybook/shadowRootTraverser.d.ts +5 -12
  65. package/dist/internal/templates/asterisk.d.ts +1 -1
  66. package/dist/internal/templates/asterisk.js +8 -7
  67. package/dist/internal/types.d.ts +6 -7
  68. package/dist/internal/utilities/slot.d.ts +13 -0
  69. package/dist/internal/utilities/slot.js +37 -0
  70. package/dist/styles/component/host.css.js +4 -0
  71. package/dist/styles/global-alt.css +1 -1
  72. package/dist/styles/global.css +1 -1
  73. package/dist/styles/utilities/variants.css.js +4 -0
  74. package/dist/styles/utilities/visually-hidden.css.js +4 -0
  75. package/dist/translations/en.d.ts +1 -1
  76. package/dist/translations/en.js +9 -16
  77. package/dist/translations/es.d.ts +1 -1
  78. package/dist/translations/es.js +8 -15
  79. package/dist/translations/index.d.ts +4 -4
  80. package/dist/translations/pt.d.ts +1 -1
  81. package/dist/translations/pt.js +10 -17
  82. package/dist/translations/sv.d.ts +1 -1
  83. package/dist/translations/sv.js +10 -17
  84. package/dist/types/jsx/custom-element-jsx.d.ts +422 -1911
  85. package/dist/utilities/anchorPositioningPolyfill.d.ts +54 -0
  86. package/dist/utilities/localize.d.ts +5 -12
  87. package/package.json +46 -44
  88. package/dist/components/accordion/accordion-item.component.d.ts +0 -36
  89. package/dist/components/accordion/accordion-item.component.js +0 -98
  90. package/dist/components/accordion/accordion-item.d.ts +0 -8
  91. package/dist/components/accordion/accordion-item.js +0 -6
  92. package/dist/components/accordion/accordion-item.styles.d.ts +0 -1
  93. package/dist/components/accordion/accordion-item.styles.js +0 -77
  94. package/dist/components/accordion/accordion.component.d.ts +0 -36
  95. package/dist/components/accordion/accordion.component.js +0 -72
  96. package/dist/components/accordion/accordion.styles.d.ts +0 -1
  97. package/dist/components/accordion/accordion.styles.js +0 -14
  98. package/dist/components/alert/alert.component.d.ts +0 -35
  99. package/dist/components/alert/alert.component.js +0 -82
  100. package/dist/components/alert/alert.styles.d.ts +0 -1
  101. package/dist/components/alert/alert.styles.js +0 -70
  102. package/dist/components/breadcrumb/breadcrumb-item.component.d.ts +0 -25
  103. package/dist/components/breadcrumb/breadcrumb-item.component.js +0 -60
  104. package/dist/components/breadcrumb/breadcrumb-item.d.ts +0 -8
  105. package/dist/components/breadcrumb/breadcrumb-item.js +0 -6
  106. package/dist/components/breadcrumb/breadcrumb-item.styles.d.ts +0 -1
  107. package/dist/components/breadcrumb/breadcrumb-item.styles.js +0 -63
  108. package/dist/components/breadcrumb/breadcrumb.component.d.ts +0 -32
  109. package/dist/components/breadcrumb/breadcrumb.component.js +0 -65
  110. package/dist/components/breadcrumb/breadcrumb.styles.d.ts +0 -1
  111. package/dist/components/breadcrumb/breadcrumb.styles.js +0 -25
  112. package/dist/components/button/button.component.d.ts +0 -77
  113. package/dist/components/button/button.component.js +0 -142
  114. package/dist/components/button/button.styles.d.ts +0 -1
  115. package/dist/components/button/button.styles.js +0 -133
  116. package/dist/components/card/card.component.d.ts +0 -26
  117. package/dist/components/card/card.component.js +0 -54
  118. package/dist/components/card/card.styles.d.ts +0 -1
  119. package/dist/components/card/card.styles.js +0 -50
  120. package/dist/components/checkbox/checkbox.component.d.ts +0 -72
  121. package/dist/components/checkbox/checkbox.component.js +0 -151
  122. package/dist/components/checkbox/checkbox.d.ts +0 -8
  123. package/dist/components/checkbox/checkbox.js +0 -6
  124. package/dist/components/checkbox/checkbox.styles.d.ts +0 -1
  125. package/dist/components/checkbox/checkbox.styles.js +0 -110
  126. package/dist/components/datepicker/datepicker-calendar.component.d.ts +0 -84
  127. package/dist/components/datepicker/datepicker-calendar.component.js +0 -422
  128. package/dist/components/datepicker/datepicker-calendar.d.ts +0 -8
  129. package/dist/components/datepicker/datepicker-calendar.js +0 -6
  130. package/dist/components/datepicker/datepicker-calendar.styles.d.ts +0 -1
  131. package/dist/components/datepicker/datepicker-calendar.styles.js +0 -202
  132. package/dist/components/datepicker/datepicker-popup.component.d.ts +0 -68
  133. package/dist/components/datepicker/datepicker-popup.component.js +0 -273
  134. package/dist/components/datepicker/datepicker-popup.d.ts +0 -8
  135. package/dist/components/datepicker/datepicker-popup.helpers.d.ts +0 -41
  136. package/dist/components/datepicker/datepicker-popup.helpers.js +0 -83
  137. package/dist/components/datepicker/datepicker-popup.js +0 -6
  138. package/dist/components/datepicker/datepicker-popup.styles.d.ts +0 -1
  139. package/dist/components/datepicker/datepicker-popup.styles.js +0 -87
  140. package/dist/components/datepicker/datepicker.component.d.ts +0 -123
  141. package/dist/components/datepicker/datepicker.component.js +0 -466
  142. package/dist/components/datepicker/datepicker.d.ts +0 -8
  143. package/dist/components/datepicker/datepicker.helpers.d.ts +0 -38
  144. package/dist/components/datepicker/datepicker.helpers.js +0 -31
  145. package/dist/components/datepicker/datepicker.js +0 -6
  146. package/dist/components/datepicker/datepicker.styles.d.ts +0 -1
  147. package/dist/components/datepicker/datepicker.styles.js +0 -18
  148. package/dist/components/dialog/dialog.component.d.ts +0 -66
  149. package/dist/components/dialog/dialog.component.js +0 -199
  150. package/dist/components/dialog/dialog.d.ts +0 -8
  151. package/dist/components/dialog/dialog.js +0 -6
  152. package/dist/components/dialog/dialog.styles.d.ts +0 -1
  153. package/dist/components/dialog/dialog.styles.js +0 -91
  154. package/dist/components/divider/divider.component.d.ts +0 -28
  155. package/dist/components/divider/divider.component.js +0 -53
  156. package/dist/components/divider/divider.d.ts +0 -8
  157. package/dist/components/divider/divider.js +0 -6
  158. package/dist/components/divider/divider.styles.d.ts +0 -1
  159. package/dist/components/divider/divider.styles.js +0 -47
  160. package/dist/components/drawer/drawer.component.d.ts +0 -68
  161. package/dist/components/drawer/drawer.component.js +0 -147
  162. package/dist/components/drawer/drawer.d.ts +0 -8
  163. package/dist/components/drawer/drawer.js +0 -6
  164. package/dist/components/drawer/drawer.styles.d.ts +0 -1
  165. package/dist/components/drawer/drawer.styles.js +0 -78
  166. package/dist/components/header/header.component.d.ts +0 -48
  167. package/dist/components/header/header.component.js +0 -125
  168. package/dist/components/header/header.d.ts +0 -8
  169. package/dist/components/header/header.js +0 -6
  170. package/dist/components/header/header.styles.d.ts +0 -1
  171. package/dist/components/header/header.styles.js +0 -68
  172. package/dist/components/heading/heading.component.d.ts +0 -23
  173. package/dist/components/heading/heading.component.js +0 -62
  174. package/dist/components/heading/heading.styles.d.ts +0 -1
  175. package/dist/components/heading/heading.styles.js +0 -60
  176. package/dist/components/icon/icon.component.d.ts +0 -29
  177. package/dist/components/icon/icon.component.js +0 -70
  178. package/dist/components/icon/icon.styles.d.ts +0 -1
  179. package/dist/components/icon/icon.styles.js +0 -84
  180. package/dist/components/input/input.component.d.ts +0 -134
  181. package/dist/components/input/input.component.js +0 -307
  182. package/dist/components/input/input.controllers.d.ts +0 -47
  183. package/dist/components/input/input.controllers.js +0 -41
  184. package/dist/components/input/input.styles.d.ts +0 -2
  185. package/dist/components/input/input.styles.js +0 -6
  186. package/dist/components/link/link.component.d.ts +0 -54
  187. package/dist/components/link/link.component.js +0 -121
  188. package/dist/components/link/link.d.ts +0 -8
  189. package/dist/components/link/link.js +0 -6
  190. package/dist/components/link/link.styles.d.ts +0 -1
  191. package/dist/components/link/link.styles.js +0 -72
  192. package/dist/components/loader/loader.component.d.ts +0 -23
  193. package/dist/components/loader/loader.component.js +0 -59
  194. package/dist/components/loader/loader.d.ts +0 -8
  195. package/dist/components/loader/loader.js +0 -6
  196. package/dist/components/loader/loader.styles.d.ts +0 -1
  197. package/dist/components/loader/loader.styles.js +0 -55
  198. package/dist/components/logo/logo.component.d.ts +0 -23
  199. package/dist/components/logo/logo.component.js +0 -83
  200. package/dist/components/logo/logo.styles.d.ts +0 -1
  201. package/dist/components/logo/logo.styles.js +0 -35
  202. package/dist/components/menu/menu-item.component.d.ts +0 -13
  203. package/dist/components/menu/menu-item.component.js +0 -13
  204. package/dist/components/menu/menu-item.d.ts +0 -8
  205. package/dist/components/menu/menu-item.js +0 -6
  206. package/dist/components/menu/menu-item.styles.d.ts +0 -1
  207. package/dist/components/menu/menu-item.styles.js +0 -23
  208. package/dist/components/menu/menu.component.d.ts +0 -29
  209. package/dist/components/menu/menu.component.js +0 -16
  210. package/dist/components/menu/menu.d.ts +0 -8
  211. package/dist/components/menu/menu.js +0 -6
  212. package/dist/components/menu/menu.styles.d.ts +0 -1
  213. package/dist/components/menu/menu.styles.js +0 -11
  214. package/dist/components/nav/nav-item.component.d.ts +0 -22
  215. package/dist/components/nav/nav-item.component.js +0 -57
  216. package/dist/components/nav/nav-item.d.ts +0 -8
  217. package/dist/components/nav/nav-item.js +0 -6
  218. package/dist/components/nav/nav-item.styles.d.ts +0 -1
  219. package/dist/components/nav/nav-item.styles.js +0 -43
  220. package/dist/components/nav/nav.component.d.ts +0 -26
  221. package/dist/components/nav/nav.component.js +0 -60
  222. package/dist/components/nav/nav.d.ts +0 -8
  223. package/dist/components/nav/nav.js +0 -6
  224. package/dist/components/nav/nav.styles.d.ts +0 -1
  225. package/dist/components/nav/nav.styles.js +0 -23
  226. package/dist/components/popover/popover.component.d.ts +0 -39
  227. package/dist/components/popover/popover.component.js +0 -43
  228. package/dist/components/popover/popover.d.ts +0 -8
  229. package/dist/components/popover/popover.js +0 -6
  230. package/dist/components/popover/popover.styles.d.ts +0 -1
  231. package/dist/components/popover/popover.styles.js +0 -12
  232. package/dist/components/progress/progress.component.d.ts +0 -24
  233. package/dist/components/progress/progress.component.js +0 -52
  234. package/dist/components/progress/progress.d.ts +0 -8
  235. package/dist/components/progress/progress.js +0 -6
  236. package/dist/components/progress/progress.styles.d.ts +0 -1
  237. package/dist/components/progress/progress.styles.js +0 -55
  238. package/dist/components/radio/radio.component.d.ts +0 -71
  239. package/dist/components/radio/radio.component.js +0 -158
  240. package/dist/components/radio/radio.styles.d.ts +0 -1
  241. package/dist/components/radio/radio.styles.js +0 -103
  242. package/dist/components/segmented-button/segmented-button-item.component.d.ts +0 -36
  243. package/dist/components/segmented-button/segmented-button-item.component.js +0 -56
  244. package/dist/components/segmented-button/segmented-button-item.d.ts +0 -8
  245. package/dist/components/segmented-button/segmented-button-item.js +0 -6
  246. package/dist/components/segmented-button/segmented-button-item.styles.d.ts +0 -1
  247. package/dist/components/segmented-button/segmented-button-item.styles.js +0 -62
  248. package/dist/components/segmented-button/segmented-button.component.d.ts +0 -30
  249. package/dist/components/segmented-button/segmented-button.component.js +0 -73
  250. package/dist/components/segmented-button/segmented-button.d.ts +0 -8
  251. package/dist/components/segmented-button/segmented-button.js +0 -6
  252. package/dist/components/segmented-button/segmented-button.styles.d.ts +0 -1
  253. package/dist/components/segmented-button/segmented-button.styles.js +0 -16
  254. package/dist/components/select/select-option-group.component.d.ts +0 -20
  255. package/dist/components/select/select-option-group.component.js +0 -50
  256. package/dist/components/select/select-option-group.d.ts +0 -8
  257. package/dist/components/select/select-option-group.js +0 -6
  258. package/dist/components/select/select-option-group.style.d.ts +0 -1
  259. package/dist/components/select/select-option-group.style.js +0 -24
  260. package/dist/components/select/select-option.component.d.ts +0 -81
  261. package/dist/components/select/select-option.component.js +0 -140
  262. package/dist/components/select/select-option.controllers.d.ts +0 -15
  263. package/dist/components/select/select-option.d.ts +0 -8
  264. package/dist/components/select/select-option.js +0 -6
  265. package/dist/components/select/select-option.styles.d.ts +0 -1
  266. package/dist/components/select/select-option.styles.js +0 -65
  267. package/dist/components/select/select.component.d.ts +0 -147
  268. package/dist/components/select/select.component.js +0 -366
  269. package/dist/components/select/select.controllers.d.ts +0 -45
  270. package/dist/components/select/select.controllers.js +0 -118
  271. package/dist/components/select/select.d.ts +0 -8
  272. package/dist/components/select/select.js +0 -6
  273. package/dist/components/select/select.styles.d.ts +0 -1
  274. package/dist/components/select/select.styles.js +0 -137
  275. package/dist/components/select/stories/select.stories.icons.d.ts +0 -7
  276. package/dist/components/stepper/stepper-item.component.d.ts +0 -47
  277. package/dist/components/stepper/stepper-item.component.js +0 -116
  278. package/dist/components/stepper/stepper-item.d.ts +0 -8
  279. package/dist/components/stepper/stepper-item.js +0 -6
  280. package/dist/components/stepper/stepper-item.styles.d.ts +0 -1
  281. package/dist/components/stepper/stepper-item.styles.js +0 -98
  282. package/dist/components/stepper/stepper.component.d.ts +0 -39
  283. package/dist/components/stepper/stepper.component.js +0 -91
  284. package/dist/components/stepper/stepper.d.ts +0 -8
  285. package/dist/components/stepper/stepper.helpers.d.ts +0 -16
  286. package/dist/components/stepper/stepper.helpers.js +0 -18
  287. package/dist/components/stepper/stepper.js +0 -6
  288. package/dist/components/stepper/stepper.styles.d.ts +0 -1
  289. package/dist/components/stepper/stepper.styles.js +0 -15
  290. package/dist/components/switch/switch.component.d.ts +0 -57
  291. package/dist/components/switch/switch.component.js +0 -124
  292. package/dist/components/switch/switch.d.ts +0 -8
  293. package/dist/components/switch/switch.js +0 -6
  294. package/dist/components/switch/switch.styles.d.ts +0 -1
  295. package/dist/components/switch/switch.styles.js +0 -88
  296. package/dist/components/tabs/tab-panel.component.d.ts +0 -19
  297. package/dist/components/tabs/tab-panel.component.js +0 -39
  298. package/dist/components/tabs/tab-panel.d.ts +0 -8
  299. package/dist/components/tabs/tab-panel.js +0 -6
  300. package/dist/components/tabs/tab-panel.styles.d.ts +0 -1
  301. package/dist/components/tabs/tab-panel.styles.js +0 -13
  302. package/dist/components/tabs/tab.component.d.ts +0 -29
  303. package/dist/components/tabs/tab.component.js +0 -60
  304. package/dist/components/tabs/tab.d.ts +0 -8
  305. package/dist/components/tabs/tab.js +0 -6
  306. package/dist/components/tabs/tab.styles.d.ts +0 -1
  307. package/dist/components/tabs/tab.styles.js +0 -123
  308. package/dist/components/tabs/tabs.component.d.ts +0 -42
  309. package/dist/components/tabs/tabs.component.js +0 -97
  310. package/dist/components/tabs/tabs.d.ts +0 -8
  311. package/dist/components/tabs/tabs.js +0 -6
  312. package/dist/components/tabs/tabs.styles.d.ts +0 -1
  313. package/dist/components/tabs/tabs.styles.js +0 -75
  314. package/dist/components/tag/tag.component.d.ts +0 -54
  315. package/dist/components/tag/tag.component.js +0 -114
  316. package/dist/components/tag/tag.styles.d.ts +0 -1
  317. package/dist/components/tag/tag.styles.js +0 -83
  318. package/dist/components/textarea/textarea.component.d.ts +0 -87
  319. package/dist/components/textarea/textarea.component.js +0 -193
  320. package/dist/components/textarea/textarea.d.ts +0 -8
  321. package/dist/components/textarea/textarea.js +0 -6
  322. package/dist/components/textarea/textarea.styles.d.ts +0 -2
  323. package/dist/components/textarea/textarea.styles.js +0 -6
  324. package/dist/components/toast/toast-item.component.d.ts +0 -21
  325. package/dist/components/toast/toast-item.component.js +0 -65
  326. package/dist/components/toast/toast-item.d.ts +0 -8
  327. package/dist/components/toast/toast-item.js +0 -6
  328. package/dist/components/toast/toast-item.styles.d.ts +0 -2
  329. package/dist/components/toast/toast-item.styles.js +0 -21
  330. package/dist/components/toast/toast-wrapper.component.d.ts +0 -24
  331. package/dist/components/toast/toast-wrapper.component.js +0 -37
  332. package/dist/components/toast/toast-wrapper.d.ts +0 -8
  333. package/dist/components/toast/toast-wrapper.js +0 -6
  334. package/dist/components/toast/toast-wrapper.styles.d.ts +0 -1
  335. package/dist/components/toast/toast-wrapper.styles.js +0 -20
  336. package/dist/components/toast/toast.component.d.ts +0 -39
  337. package/dist/components/toast/toast.component.js +0 -56
  338. package/dist/components/toast/toast.d.ts +0 -8
  339. package/dist/components/toast/toast.js +0 -6
  340. package/dist/components/toast/toast.singleton.d.ts +0 -21
  341. package/dist/components/toast/toast.singleton.js +0 -53
  342. package/dist/components/toast/toast.styles.d.ts +0 -1
  343. package/dist/components/toast/toast.styles.js +0 -9
  344. package/dist/components/tooltip/tooltip.component.d.ts +0 -31
  345. package/dist/components/tooltip/tooltip.component.js +0 -29
  346. package/dist/components/tooltip/tooltip.d.ts +0 -8
  347. package/dist/components/tooltip/tooltip.js +0 -6
  348. package/dist/components/tooltip/tooltip.styles.d.ts +0 -1
  349. package/dist/components/tooltip/tooltip.styles.js +0 -12
  350. package/dist/internal/base-classes/popover/popover.base.d.ts +0 -63
  351. package/dist/internal/base-classes/popover/popover.base.js +0 -176
  352. package/dist/internal/base-classes/popover/popover.styles.d.ts +0 -1
  353. package/dist/internal/base-classes/popover/popover.styles.js +0 -41
  354. package/dist/internal/components/formBase.d.ts +0 -69
  355. package/dist/internal/components/formBase.js +0 -99
  356. package/dist/internal/components/hint/hint.component.d.ts +0 -13
  357. package/dist/internal/components/hint/hint.component.js +0 -60
  358. package/dist/internal/components/hint/hint.d.ts +0 -8
  359. package/dist/internal/components/hint/hint.js +0 -6
  360. package/dist/internal/components/hint/hint.styles.d.ts +0 -1
  361. package/dist/internal/components/hint/hint.styles.js +0 -42
  362. package/dist/internal/components/skf-element.d.ts +0 -8
  363. package/dist/internal/components/skf-element.js +0 -81
  364. package/dist/internal/constants/iconSeverity.d.ts +0 -5
  365. package/dist/internal/constants/iconSeverity.js +0 -9
  366. package/dist/internal/controllers/elementOverflowController.d.ts +0 -13
  367. package/dist/internal/controllers/popover.controller.d.ts +0 -24
  368. package/dist/internal/controllers/popover.controller.js +0 -39
  369. package/dist/internal/helpers/array.d.ts +0 -4
  370. package/dist/internal/helpers/findMatchingTags.js +0 -12
  371. package/dist/internal/helpers/hintSeverity.d.ts +0 -2
  372. package/dist/internal/helpers/hintSeverity.js +0 -6
  373. package/dist/internal/helpers/raiseError.d.ts +0 -28
  374. package/dist/internal/helpers/raiseError.js +0 -29
  375. package/dist/internal/helpers/stateMap.js +0 -68
  376. package/dist/internal/helpers/utilityTypes.d.ts +0 -22
  377. package/dist/internal/helpers/uuid.js +0 -7
  378. package/dist/internal/storybook/styles.d.ts +0 -1
  379. package/dist/internal/types/formField.d.ts +0 -27
  380. package/dist/styles/component.styles.d.ts +0 -1
  381. package/dist/styles/component.styles.js +0 -53
  382. package/dist/styles/form-field.styles.d.ts +0 -2
  383. package/dist/styles/form-field.styles.js +0 -214
  384. package/dist/styles/util.styles.d.ts +0 -1
  385. package/dist/styles/util.styles.js +0 -16
  386. package/dist/types/vue/index.d.ts +0 -1393
  387. package/dist/vscode.html-custom-data.json +0 -1598
  388. package/dist/web-types.json +0 -3583
package/README.md CHANGED
@@ -22,8 +22,8 @@
22
22
  <a href="https://teams.microsoft.com/l/team/19%3A15d8521717e14c419998b0fed71289a5%40thread.tacv2/conversations?groupId=286b39ed-ed94-43da-8a3f-383319f6c9dc&tenantId=41875f2b-33e8-4670-92a8-f643afbb243a">
23
23
  <img alt="MS Teams" src="https://img.shields.io/badge/MS Teams-4E5FBF?style=for-the-badge&logo=windows&logoColor=white">
24
24
  </a>
25
- <a href="https://beta--641c13cdbf6bbfbd6da88a83.chromatic.com">
26
- <img alt="Storybook - Stable" src="https://img.shields.io/badge/Stable-FF4785?style=for-the-badge&logo=storybook&logoColor=white">
25
+ <a href="https://develop--661e8ae0ef9b24dadeea9b18.chromatic.com/">
26
+ <img alt="Storybook" src="https://img.shields.io/badge/Storybook-FF4785?style=for-the-badge&logo=storybook&logoColor=white">
27
27
  </a>
28
28
  <a href="https://zeroheight.com/853e936c9/p/07d378-component-overview">
29
29
  <img alt="Storybook - Beta" src="https://img.shields.io/badge/zeroheight-F63E7C?style=for-the-badge">
@@ -0,0 +1,4 @@
1
+ const o = "@layer skf-wc.components{:host{border-block-start:1px solid var(--skf-border-color-base-primary)}}";
2
+ export {
3
+ o as default
4
+ };
@@ -1,6 +1,34 @@
1
- import { SkfAccordion } from './accordion.component.js';
2
- export * from './accordion.component.js';
3
- export default SkfAccordion;
1
+ import type { SkfAccordionItemHeadingType } from '../accordion-item/accordion-item';
2
+ import { SkfElement } from '../../internal/skf-element';
3
+ import { type PropertyValues } from 'lit';
4
+ /**
5
+ * The `<skf-accordion>` component consists of one or more `<skf-accordion-item>` item(s) working together
6
+ *
7
+ * See [zeroheight](https://zeroheight.com/853e936c9/p/6590bf-accordion) for design principles
8
+ *
9
+ * @event {Event} toggle - Emitted when an item is toggled
10
+ *
11
+ * @slot - Expects one or more <skf-accordion-item> element(s)
12
+ *
13
+ * @tagname skf-accordion
14
+ */
15
+ export default class SkfAccordion extends SkfElement {
16
+ static css: string;
17
+ /** Defines which heading element will be rendered */
18
+ headingAs?: SkfAccordionItemHeadingType;
19
+ /** If true, allows multiple accordion items to open */
20
+ multiple: boolean;
21
+ /** If true, will truncate all headings in collapsed state */
22
+ truncate: boolean;
23
+ /** @internal */
24
+ private _items?;
25
+ protected updated(_changedProperties: PropertyValues): void;
26
+ /** @internal */
27
+ private _setItemAttributes;
28
+ /** @internal */
29
+ private _onChildToggle;
30
+ render(): import("lit").TemplateResult<1>;
31
+ }
4
32
  declare global {
5
33
  interface HTMLElementTagNameMap {
6
34
  'skf-accordion': SkfAccordion;
@@ -1,6 +1,58 @@
1
- import { SkfAccordion as o } from "./accordion.component.js";
2
- o.define("skf-accordion");
1
+ import { SkfElement as h } from "../../internal/skf-element.js";
2
+ import { html as f } from "lit";
3
+ import { property as u, queryAssignedElements as p, customElement as c } from "lit/decorators.js";
4
+ import g from "./accordion.css.js";
5
+ var m = Object.defineProperty, d = Object.getOwnPropertyDescriptor, o = (t, i, e, a) => {
6
+ for (var s = a > 1 ? void 0 : a ? d(i, e) : i, n = t.length - 1, l; n >= 0; n--)
7
+ (l = t[n]) && (s = (a ? l(i, e, s) : l(s)) || s);
8
+ return a && s && m(i, e, s), s;
9
+ };
10
+ let r = class extends h {
11
+ constructor() {
12
+ super(...arguments), this.multiple = !1, this.truncate = !1, this._setItemAttributes = () => {
13
+ this._items?.forEach((t) => {
14
+ this.headingAs ? t.setAttribute("heading-as", this.headingAs) : t.hasAttribute("heading-as") && t.removeAttribute("heading-as"), this.truncate ? t.setAttribute("truncate", "") : t.hasAttribute("truncate") && t.removeAttribute("truncate");
15
+ });
16
+ };
17
+ }
18
+ updated(t) {
19
+ (t.has("headingAs") || t.has("truncate")) && this._setItemAttributes();
20
+ }
21
+ /** @internal */
22
+ _onChildToggle(t) {
23
+ if (this.multiple || t.defaultPrevented) return;
24
+ const i = t.target;
25
+ this._items?.length && this._items.forEach((e) => {
26
+ e !== i && e.open && e.setClose();
27
+ });
28
+ }
29
+ render() {
30
+ return f`
31
+ <slot
32
+ @toggle=${(t) => {
33
+ this._onChildToggle(t);
34
+ }}
35
+ @slotchange=${this._setItemAttributes}
36
+ ></slot>
37
+ `;
38
+ }
39
+ };
40
+ r.css = g;
41
+ o([
42
+ u({ type: String, attribute: "heading-as" })
43
+ ], r.prototype, "headingAs", 2);
44
+ o([
45
+ u({ type: Boolean })
46
+ ], r.prototype, "multiple", 2);
47
+ o([
48
+ u({ type: Boolean })
49
+ ], r.prototype, "truncate", 2);
50
+ o([
51
+ p({ selector: "skf-accordion-item" })
52
+ ], r.prototype, "_items", 2);
53
+ r = o([
54
+ c("skf-accordion")
55
+ ], r);
3
56
  export {
4
- o as SkfAccordion,
5
- o as default
57
+ r as default
6
58
  };
@@ -0,0 +1,4 @@
1
+ const e = '@layer skf-wc.components{@layer base{:host{border-block-end:1px solid var(--skf-border-color-base-primary);interpolate-size:allow-keywords}summary{align-items:center;cursor:pointer;display:flex;gap:var(--skf-spacing-100);justify-content:space-between;padding:var(--skf-spacing-100) 0;-webkit-user-select:none;user-select:none}summary::marker{content:""}#heading{font-size:var(--skf-body-font-size-xl);font-weight:var(--skf-body-font-weight-base)}:host([truncate]) details:not([open]) #heading{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#body{padding-block-end:var(--skf-spacing-100)}::details-content{block-size:0;overflow:hidden;transition:block-size var(--skf-motion-duration-slow) ease,content-visibility var(--skf-motion-duration-slow) ease allow-discrete}}@layer states{[open]::details-content{block-size:auto}}}';
2
+ export {
3
+ e as default
4
+ };
@@ -0,0 +1,43 @@
1
+ import '../heading/heading';
2
+ import type { SkfHeadingType } from '../heading/heading';
3
+ import '../icon/icon';
4
+ import { SkfElement } from '../../internal/skf-element';
5
+ export type SkfAccordionItemHeadingType = Exclude<SkfHeadingType, 'h1'>;
6
+ /**
7
+ * The `<skf-accordion-item>` is used in conjunction with the `<skf-accordion>` component
8
+ *
9
+ * @event {Event} toggle - Event emitted when toggled
10
+ *
11
+ * @slot - Main content
12
+ *
13
+ * @tagname skf-accordion-item
14
+ */
15
+ export default class SkfAccordionItem extends SkfElement {
16
+ #private;
17
+ static css: string;
18
+ /** Heading for the details/summary */
19
+ heading: string;
20
+ /** Defines which heading element will be rendered */
21
+ headingAs?: SkfAccordionItemHeadingType;
22
+ /** If true, will set the accordion-item to be open by default */
23
+ open: boolean;
24
+ /** If true, will truncate the heading in accordion-item state */
25
+ truncate: boolean;
26
+ /** @internal */
27
+ private $details?;
28
+ protected firstUpdated(): void;
29
+ /** @internal */
30
+ _handleOpenChange(): void;
31
+ /** @internal */
32
+ private _handleClick;
33
+ /** Class method as alternative to manipulate attribute */
34
+ setClose(): void;
35
+ /** Class method as alternative to manipulate attribute */
36
+ setOpen(): void;
37
+ render(): import("lit").TemplateResult;
38
+ }
39
+ declare global {
40
+ interface HTMLElementTagNameMap {
41
+ 'skf-accordion-item': SkfAccordionItem;
42
+ }
43
+ }
@@ -0,0 +1,79 @@
1
+ import "../heading/heading.js";
2
+ import "../icon/icon.js";
3
+ import { watch as m } from "../../internal/helpers/watch.js";
4
+ import { SkfElement as _ } from "../../internal/skf-element.js";
5
+ import { property as p, query as u, customElement as v } from "lit/decorators.js";
6
+ import { ifDefined as g } from "lit/directives/if-defined.js";
7
+ import { html as y } from "lit/static-html.js";
8
+ import $ from "./accordion-item.css.js";
9
+ var C = Object.defineProperty, k = Object.getOwnPropertyDescriptor, f = (t) => {
10
+ throw TypeError(t);
11
+ }, a = (t, e, i, o) => {
12
+ for (var r = o > 1 ? void 0 : o ? k(e, i) : e, h = t.length - 1, d; h >= 0; h--)
13
+ (d = t[h]) && (r = (o ? d(e, i, r) : d(r)) || r);
14
+ return o && r && C(e, i, r), r;
15
+ }, c = (t, e, i) => e.has(t) || f("Cannot " + i), O = (t, e, i) => (c(t, e, "read from private field"), e.get(t)), w = (t, e, i) => e.has(t) ? f("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), l = (t, e, i, o) => (c(t, e, "write to private field"), e.set(t, i), i), n;
16
+ let s = class extends _ {
17
+ constructor() {
18
+ super(...arguments), w(this, n, !1), this.heading = "", this.open = !1, this.truncate = !1, this._handleClick = () => {
19
+ this.emit("toggle"), l(this, n, !0), this.open = !this.open;
20
+ };
21
+ }
22
+ firstUpdated() {
23
+ this.open && this.$details && (this.$details.open = this.open);
24
+ }
25
+ _handleOpenChange() {
26
+ if (O(this, n)) {
27
+ l(this, n, !1);
28
+ return;
29
+ }
30
+ this.$details && (this.$details.open = this.open);
31
+ }
32
+ /** Class method as alternative to manipulate attribute */
33
+ setClose() {
34
+ this.open = !1, this.$details && (this.$details.open = !1);
35
+ }
36
+ /** Class method as alternative to manipulate attribute */
37
+ setOpen() {
38
+ this.open = !0, this.$details && (this.$details.open = !0);
39
+ }
40
+ render() {
41
+ return y`
42
+ <details>
43
+ <summary @click=${this._handleClick}>
44
+ <skf-heading as=${g(this.headingAs)} id="heading">${this.heading}</skf-heading>
45
+ <skf-icon name=${this.open ? "minus" : "plus"} size="xl"></skf-icon>
46
+ </summary>
47
+ <div id="body">
48
+ <slot></slot>
49
+ </div>
50
+ </details>
51
+ `;
52
+ }
53
+ };
54
+ n = /* @__PURE__ */ new WeakMap();
55
+ s.css = $;
56
+ a([
57
+ p({ type: String })
58
+ ], s.prototype, "heading", 2);
59
+ a([
60
+ p({ type: String, attribute: "heading-as" })
61
+ ], s.prototype, "headingAs", 2);
62
+ a([
63
+ p({ type: Boolean, reflect: !0 })
64
+ ], s.prototype, "open", 2);
65
+ a([
66
+ p({ type: Boolean })
67
+ ], s.prototype, "truncate", 2);
68
+ a([
69
+ u("details")
70
+ ], s.prototype, "$details", 2);
71
+ a([
72
+ m("open")
73
+ ], s.prototype, "_handleOpenChange", 1);
74
+ s = a([
75
+ v("skf-accordion-item")
76
+ ], s);
77
+ export {
78
+ s as default
79
+ };
@@ -0,0 +1,4 @@
1
+ const o = '@layer skf-wc.components{:host{--mod-icon-color: currentcolor;--_skf-alert-bg-color: var(--_skf-color-bg-base, var(--skf-bg-color-info-primary));--_skf-alert-color: var(--_skf-color-on-base, var(--skf-text-color-on-info));--_skf-alert-grid-areas: "icon slot button";background-color:var(--_skf-alert-bg-color);color:var(--_skf-alert-color);display:grid;gap:var(--skf-spacing-050) var(--skf-spacing-100);grid:var(--_skf-alert-grid-areas) / auto 1fr auto;padding:var(--skf-spacing-100)}:host:has(skf-heading){--_skf-alert-grid-areas: "icon heading button" "icon slot button"}#icon{grid-area:icon}skf-heading{color:var(--_skf-alert-color);grid-area:heading}slot{display:block;font-size:var(--skf-body-font-size-md);grid-area:slot;line-height:var(--skf-body-line-height-md)}::slotted(a){color:var(--_skf-alert-color)}#close-btn{block-size:var(--skf-icon-size-xl);grid-area:button}#close-btn:focus-visible{outline:var(--skf-border-width-lg) solid var(--skf-border-color-focus);outline-offset:3px}}';
2
+ export {
3
+ o as default
4
+ };
@@ -1,8 +1,43 @@
1
- import { SkfAlert } from './alert.component.js';
2
- export * from './alert.component.js';
3
- export default SkfAlert;
1
+ import '../heading/heading';
2
+ import '../icon/icon';
3
+ import { SkfElement } from '../../internal/skf-element';
4
+ import type { HeadingType, Icon, Variant } from '../../internal/types';
5
+ type SkfAlertHeadingType = Exclude<HeadingType, 'h1'>;
6
+ type SkfAlertVariant = Exclude<Variant, 'brand' | 'neutral'>;
7
+ /**
8
+ * The `<skf-alert>` is a component that displays a list of actions or options
9
+ *
10
+ * See [zeroheight](https://zeroheight.com/4a3b1cae8/v/latest/p/701447-alert) for design principles
11
+ *
12
+ * @event {CustomEvent} skf-alert-remove - Fired when the Alert is removed. Convenient to use together with the `vdom` property to avoid bypassing internal state management/React Virtual DOM
13
+ *
14
+ * @slot - The component's default slot
15
+ *
16
+ * @tagname skf-alert
17
+ */
18
+ export default class SkfAlert extends SkfElement {
19
+ #private;
20
+ static css: string[];
21
+ /** If defined, renders a heading */
22
+ heading?: string;
23
+ /** If defined, controlls which element the heading will be rendered as */
24
+ headingAs?: SkfAlertHeadingType;
25
+ /** If defined, displays an alternative icon */
26
+ icon?: Icon;
27
+ /** Defines the alert's theme variant */
28
+ variant: SkfAlertVariant;
29
+ /** If true, prevents DOM updates. I.e in React, Preact handle self removal externally. */
30
+ vdom: boolean;
31
+ connectedCallback(): void;
32
+ /** @internal */
33
+ private _handleClick;
34
+ /** @internal */
35
+ private _setDefaultIcon;
36
+ render(): import("lit").TemplateResult<1>;
37
+ }
4
38
  declare global {
5
39
  interface HTMLElementTagNameMap {
6
40
  'skf-alert': SkfAlert;
7
41
  }
8
42
  }
43
+ export {};
@@ -1,6 +1,81 @@
1
- import { SkfAlert as e } from "./alert.component.js";
2
- e.define("skf-alert");
1
+ import "../heading/heading.js";
2
+ import "../icon/icon.js";
3
+ import { SkfElement as d } from "../../internal/skf-element.js";
4
+ import { LocalizeController as v } from "../../utilities/localize.js";
5
+ import { nothing as g, html as p } from "lit";
6
+ import { property as o, customElement as u } from "lit/decorators.js";
7
+ import { ifDefined as _ } from "lit/directives/if-defined.js";
8
+ import y from "../../styles/utilities/variants.css.js";
9
+ import k from "./alert.css.js";
10
+ var C = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, f = (t) => {
11
+ throw TypeError(t);
12
+ }, n = (t, e, r, s) => {
13
+ for (var a = s > 1 ? void 0 : s ? $(e, r) : e, c = t.length - 1, h; c >= 0; c--)
14
+ (h = t[c]) && (a = (s ? h(e, r, a) : h(a)) || a);
15
+ return s && a && C(e, r, a), a;
16
+ }, w = (t, e, r) => e.has(t) || f("Cannot " + r), m = (t, e, r) => (w(t, e, "read from private field"), r ? r.call(t) : e.get(t)), S = (t, e, r) => e.has(t) ? f("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), l;
17
+ let i = class extends d {
18
+ constructor() {
19
+ super(...arguments), S(this, l, new v(this)), this.variant = "info", this.vdom = !1, this._handleClick = () => {
20
+ this.emit("skf-alert-remove"), this.vdom || this.remove();
21
+ };
22
+ }
23
+ connectedCallback() {
24
+ super.connectedCallback(), this.internals.role = "status";
25
+ }
26
+ /** @internal */
27
+ _setDefaultIcon() {
28
+ return {
29
+ success: "checkmark",
30
+ warning: "triangleExclamation",
31
+ error: "warningDiamond",
32
+ info: "bulb"
33
+ }[this.variant];
34
+ }
35
+ render() {
36
+ return p`
37
+ <skf-icon
38
+ id="icon"
39
+ name=${this.icon ?? this._setDefaultIcon()}
40
+ size=${this.heading ? "xl" : "md"}
41
+ ></skf-icon>
42
+ ${this.heading ? p`
43
+ <skf-heading as=${_(this.headingAs)} styled-as="h4">
44
+ ${this.heading}
45
+ </skf-heading>
46
+ ` : g}
47
+ <slot></slot>
48
+ <button
49
+ @click=${this._handleClick}
50
+ aria-label="${m(this, l).term("close")} / ${m(this, l).term("remove")}"
51
+ id="close-btn"
52
+ type="button"
53
+ >
54
+ <skf-icon name="xmark" size=${this.heading ? "xl" : "md"}></skf-icon>
55
+ </button>
56
+ `;
57
+ }
58
+ };
59
+ l = /* @__PURE__ */ new WeakMap();
60
+ i.css = [k, y];
61
+ n([
62
+ o({ type: String })
63
+ ], i.prototype, "heading", 2);
64
+ n([
65
+ o({ type: String, attribute: "heading-as" })
66
+ ], i.prototype, "headingAs", 2);
67
+ n([
68
+ o({ type: String })
69
+ ], i.prototype, "icon", 2);
70
+ n([
71
+ o({ type: String })
72
+ ], i.prototype, "variant", 2);
73
+ n([
74
+ o({ type: Boolean })
75
+ ], i.prototype, "vdom", 2);
76
+ i = n([
77
+ u("skf-alert")
78
+ ], i);
3
79
  export {
4
- e as SkfAlert,
5
- e as default
80
+ i as default
6
81
  };
@@ -0,0 +1,4 @@
1
+ const r = '@layer skf-wc.components{@layer base{:host{--mod-icon-color: currentcolor;--_skf-badge-bg-color: var(--_skf-color-bg-base, var(--skf-bg-color-brand-primary));--_skf-badge-color: var(--_skf-color-on-base, var(--skf-text-color-on-brand));--_skf-badge-border-radius: var(--skf-radius-md);border-radius:var(--_skf-badge-border-radius)}:host(:not([appearance="marker"])){align-items:center;block-size:var(--skf-ui-size-150);color:var(--_skf-badge-color);display:inline-flex;font-size:var(--skf-body-font-size-sm);gap:var(--skf-spacing-025);padding-inline:var(--skf-spacing-0375)}:host(:not([appearance="ghost"])){background-color:var(--_skf-badge-bg-color)}}@layer mods{:host([appearance="ghost"]){--_skf-badge-color: var(--_skf-color-on-null, var(--skf-text-color-brand-primary))}:host([appearance="marker"]){--_skf-badge-border-radius: 100%;aspect-ratio:1;flex-shrink:0;inline-size:var(--skf-icon-size-sm)}}}';
2
+ export {
3
+ r as default
4
+ };
@@ -0,0 +1,28 @@
1
+ import '../icon/icon';
2
+ import { SkfElement } from '../../internal/skf-element';
3
+ import type { Icon, Variant } from '../../internal/types';
4
+ /**
5
+ * The `<skf-badge>` is used to notifying users of a change in information or status
6
+ *
7
+ * See [zeroheight](https://zeroheight.com/4a3b1cae8/v/latest/p/39c01f-badge) for design principles
8
+ *
9
+ * @slot - The component's default slot
10
+ *
11
+ * @tagname skf-badge
12
+ */
13
+ export default class SkfBadge extends SkfElement {
14
+ static css: string[];
15
+ /** Defines the visual appearance */
16
+ appearance: 'filled' | 'ghost' | 'marker';
17
+ /** If defined, the icon will be displayed */
18
+ icon?: Icon;
19
+ /** If defined, sets the badge's theme variant */
20
+ variant?: Variant;
21
+ connectedCallback(): void;
22
+ render(): import("lit").TemplateResult<1>;
23
+ }
24
+ declare global {
25
+ interface HTMLElementTagNameMap {
26
+ 'skf-badge': SkfBadge;
27
+ }
28
+ }
@@ -0,0 +1,43 @@
1
+ import "../icon/icon.js";
2
+ import { SkfElement as f } from "../../internal/skf-element.js";
3
+ import { nothing as m, html as i } from "lit";
4
+ import { property as c, customElement as u } from "lit/decorators.js";
5
+ import y from "../../styles/utilities/variants.css.js";
6
+ import h from "./badge.css.js";
7
+ var g = Object.defineProperty, v = Object.getOwnPropertyDescriptor, s = (l, r, n, o) => {
8
+ for (var e = o > 1 ? void 0 : o ? v(r, n) : r, p = l.length - 1, a; p >= 0; p--)
9
+ (a = l[p]) && (e = (o ? a(r, n, e) : a(e)) || e);
10
+ return o && e && g(r, n, e), e;
11
+ };
12
+ let t = class extends f {
13
+ constructor() {
14
+ super(...arguments), this.appearance = "filled";
15
+ }
16
+ connectedCallback() {
17
+ super.connectedCallback(), this.internals.role = "status";
18
+ }
19
+ render() {
20
+ return i`
21
+ ${this.appearance === "marker" ? m : i`
22
+ ${this.icon ? i`<skf-icon name=${this.icon} size="sm"></skf-icon>` : m}
23
+ <slot></slot>
24
+ `}
25
+ `;
26
+ }
27
+ };
28
+ t.css = [h, y];
29
+ s([
30
+ c({ type: String, reflect: !0 })
31
+ ], t.prototype, "appearance", 2);
32
+ s([
33
+ c({ type: String })
34
+ ], t.prototype, "icon", 2);
35
+ s([
36
+ c({ type: String })
37
+ ], t.prototype, "variant", 2);
38
+ t = s([
39
+ u("skf-badge")
40
+ ], t);
41
+ export {
42
+ t as default
43
+ };
@@ -0,0 +1,4 @@
1
+ const e = '@layer skf-wc.components{@layer base{ol{display:flex;gap:var(--skf-spacing-050)}}@layer states{:host(:state(overflowing)) ol{flex-wrap:wrap}:host(:state(overflowing)):has(skf-breadcrumb-item:nth-child(4)) ::slotted(skf-breadcrumb-item:first-of-type):after{color:var(--skf-text-color-base-primary);content:"/ ..."}}}';
2
+ export {
3
+ e as default
4
+ };
@@ -1,6 +1,35 @@
1
- import { SkfBreadcrumb } from './breadcrumb.component.js';
2
- export * from './breadcrumb.component.js';
3
- export default SkfBreadcrumb;
1
+ import type SkfBreadcrumbItem from '../breadcrumb-item/breadcrumb-item';
2
+ import { SkfElement } from '../../internal/skf-element';
3
+ /**
4
+ * The `<skf-breadcrumb>` is a component that displays a list of actions or options
5
+ *
6
+ * See [zeroheight](https://zeroheight.com/4a3b1cae8/v/latest/p/034788-breadcrumbs) for design principles
7
+ *
8
+ * @slot - The component's default slot
9
+ *
10
+ * @tagname skf-breadcrumb
11
+ */
12
+ export default class SkfBreadcrumb extends SkfElement {
13
+ #private;
14
+ static css: string;
15
+ /** @internal */
16
+ _isOverflowing: boolean;
17
+ /** @internal */
18
+ _items: SkfBreadcrumbItem[];
19
+ /** @internal */
20
+ private $list;
21
+ connectedCallback(): void;
22
+ firstUpdated(): void;
23
+ /** @internal */
24
+ private _handleSlotChange;
25
+ /** @internal */
26
+ private _toggleItemVisibility;
27
+ /** @internal */
28
+ private _observeHostWidth;
29
+ /** @internal */
30
+ private _observeNavContainer;
31
+ render(): import("lit").TemplateResult<1>;
32
+ }
4
33
  declare global {
5
34
  interface HTMLElementTagNameMap {
6
35
  'skf-breadcrumb': SkfBreadcrumb;
@@ -1,6 +1,71 @@
1
- import { SkfBreadcrumb as r } from "./breadcrumb.component.js";
2
- r.define("skf-breadcrumb");
1
+ import { SkfElement as g } from "../../internal/skf-element.js";
2
+ import { html as m } from "lit";
3
+ import { state as u, queryAssignedElements as w, query as b, customElement as y } from "lit/decorators.js";
4
+ import O from "./breadcrumb.css.js";
5
+ var C = Object.defineProperty, W = Object.getOwnPropertyDescriptor, f = (e) => {
6
+ throw TypeError(e);
7
+ }, v = (e, t, s, o) => {
8
+ for (var r = o > 1 ? void 0 : o ? W(t, s) : t, _ = e.length - 1, c; _ >= 0; _--)
9
+ (c = e[_]) && (r = (o ? c(t, s, r) : c(r)) || r);
10
+ return o && r && C(t, s, r), r;
11
+ }, p = (e, t, s) => t.has(e) || f("Cannot " + s), l = (e, t, s) => (p(e, t, "read from private field"), s ? s.call(e) : t.get(e)), d = (e, t, s) => t.has(e) ? f("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s), h = (e, t, s, o) => (p(e, t, "write to private field"), t.set(e, s), s), n, i;
12
+ let a = class extends g {
13
+ constructor() {
14
+ super(...arguments), d(this, n), d(this, i), this._isOverflowing = !1, this._handleSlotChange = () => {
15
+ this._items.forEach((e, t) => {
16
+ e._isCurrent = t === this._items.length - 1;
17
+ });
18
+ }, this._toggleItemVisibility = () => {
19
+ this._items.forEach((e, t) => {
20
+ const s = this._items.length - 2;
21
+ e.classList.toggle(
22
+ "visually-hidden",
23
+ !!(t > 0 && t < s && this._isOverflowing)
24
+ );
25
+ });
26
+ };
27
+ }
28
+ connectedCallback() {
29
+ super.connectedCallback(), this.internals.role = "navigation", this.role = "navigation", this.ariaLabel = this.ariaLabel ?? "Breadcrumb";
30
+ }
31
+ firstUpdated() {
32
+ this._handleSlotChange(), this._observeHostWidth();
33
+ }
34
+ /** @internal */
35
+ _observeHostWidth() {
36
+ h(this, i, new ResizeObserver(() => {
37
+ this.clientWidth > (l(this, n) ?? 0) && (h(this, n, null), l(this, i)?.disconnect(), this._isOverflowing = !1, this.internals.states.delete("overflowing"), this._toggleItemVisibility(), this._observeNavContainer());
38
+ })), l(this, i).observe(this);
39
+ }
40
+ /** @internal */
41
+ _observeNavContainer() {
42
+ h(this, i, new ResizeObserver(() => {
43
+ this.$list.clientWidth < this.$list.scrollWidth && (h(this, n, this.clientWidth), l(this, i)?.disconnect(), this._isOverflowing = !0, this.internals.states.add("overflowing"), this._toggleItemVisibility(), this._observeHostWidth());
44
+ })), l(this, i).observe(this.$list);
45
+ }
46
+ render() {
47
+ return m`
48
+ <ol>
49
+ <slot></slot>
50
+ </ol>
51
+ `;
52
+ }
53
+ };
54
+ n = /* @__PURE__ */ new WeakMap();
55
+ i = /* @__PURE__ */ new WeakMap();
56
+ a.css = O;
57
+ v([
58
+ u()
59
+ ], a.prototype, "_isOverflowing", 2);
60
+ v([
61
+ w()
62
+ ], a.prototype, "_items", 2);
63
+ v([
64
+ b("ol")
65
+ ], a.prototype, "$list", 2);
66
+ a = v([
67
+ y("skf-breadcrumb")
68
+ ], a);
3
69
  export {
4
- r as SkfBreadcrumb,
5
- r as default
70
+ a as default
6
71
  };
@@ -0,0 +1,4 @@
1
+ const r = '@layer skf-wc.components{@layer base{:host{display:flex;gap:var(--skf-spacing-050);white-space:nowrap}:host(:not(:first-of-type)):before{color:var(--skf-text-color-base-primary);content:"/"}a{--_skf-breadcrumb-item-link-color: var(--skf-text-color-brand-primary);color:var(--_skf-breadcrumb-item-link-color);font-size:var(--skf-body-font-size-sm);min-inline-size:var(--skf-ui-size-125);text-align:center;text-decoration:none}a[aria-current=page]{--_skf-breadcrumb-item-link-color: var(--skf-text-color-base-primary);font-weight:var(--skf-body-font-weight-strong)}}@layer states{a:hover{--_skf-breadcrumb-item-link-color: var(--skf-text-color-brand-hover)}a:focus-visible{outline:var(--skf-border-width-lg) solid var(--skf-border-color-focus);outline-offset:3px}}}';
2
+ export {
3
+ r as default
4
+ };
@@ -0,0 +1,24 @@
1
+ import { SkfElement } from '../../internal/skf-element';
2
+ /**
3
+ * The `<skf-breadcrumb-item>` is a component that displays a list of actions or options
4
+ *
5
+ * See [zeroheight](https://zeroheight.com/****) for design principles
6
+ *
7
+ * @slot - The Breadcrumb Items's default slot
8
+ *
9
+ * @tagname skf-breadcrumb-item
10
+ */
11
+ export default class SkfBreadcrumbItem extends SkfElement {
12
+ static css: string[];
13
+ /** The URL that the hyperlink points to */
14
+ href: string;
15
+ /** @internal */
16
+ _isCurrent: boolean;
17
+ connectedCallback(): void;
18
+ render(): import("lit").TemplateResult<1>;
19
+ }
20
+ declare global {
21
+ interface HTMLElementTagNameMap {
22
+ 'skf-breadcrumb-item': SkfBreadcrumbItem;
23
+ }
24
+ }
@@ -0,0 +1,39 @@
1
+ import { SkfElement as n } from "../../internal/skf-element.js";
2
+ import p from "../../styles/utilities/visually-hidden.css.js";
3
+ import { html as a } from "lit";
4
+ import { property as c, state as u, customElement as h } from "lit/decorators.js";
5
+ import { ifDefined as d } from "lit/directives/if-defined.js";
6
+ import _ from "./breadcrumb-item.css.js";
7
+ var v = Object.defineProperty, b = Object.getOwnPropertyDescriptor, m = (f, t, o, s) => {
8
+ for (var r = s > 1 ? void 0 : s ? b(t, o) : t, i = f.length - 1, l; i >= 0; i--)
9
+ (l = f[i]) && (r = (s ? l(t, o, r) : l(r)) || r);
10
+ return s && r && v(t, o, r), r;
11
+ };
12
+ let e = class extends n {
13
+ constructor() {
14
+ super(...arguments), this.href = "", this._isCurrent = !1;
15
+ }
16
+ connectedCallback() {
17
+ super.connectedCallback(), this.internals.role = "listitem", this.role = "listitem";
18
+ }
19
+ render() {
20
+ return a`
21
+ <a aria-current=${d(this._isCurrent ? "page" : void 0)} href=${this.href}>
22
+ <slot></slot>
23
+ </a>
24
+ `;
25
+ }
26
+ };
27
+ e.css = [_, p];
28
+ m([
29
+ c({ type: String })
30
+ ], e.prototype, "href", 2);
31
+ m([
32
+ u()
33
+ ], e.prototype, "_isCurrent", 2);
34
+ e = m([
35
+ h("skf-breadcrumb-item")
36
+ ], e);
37
+ export {
38
+ e as default
39
+ };