@oiz/stzh-components 4.1.0 → 4.1.1-beta

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 (556) hide show
  1. package/dist/.build/test/utils.js +8 -3
  2. package/dist/.build/test/utils.js.map +1 -1
  3. package/dist/cjs/{app-globals-b0a11ad2.js → app-globals-07208237.js} +2 -2
  4. package/dist/cjs/{app-globals-b0a11ad2.js.map → app-globals-07208237.js.map} +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/stzh-accordion_3.cjs.entry.js +2 -2
  7. package/dist/cjs/stzh-accordion_3.cjs.entry.js.map +1 -1
  8. package/dist/cjs/stzh-actions.cjs.entry.js +1 -1
  9. package/dist/cjs/stzh-anchornav.cjs.entry.js +1 -1
  10. package/dist/cjs/stzh-anchornav.cjs.entry.js.map +1 -1
  11. package/dist/cjs/stzh-appointments.cjs.entry.js +1 -1
  12. package/dist/cjs/stzh-audio.cjs.entry.js +1 -1
  13. package/dist/cjs/stzh-badge_3.cjs.entry.js +1 -1
  14. package/dist/cjs/stzh-bathstatus-list.cjs.entry.js +1 -1
  15. package/dist/cjs/stzh-breadcrumb_2.cjs.entry.js +1 -1
  16. package/dist/cjs/stzh-breadcrumb_2.cjs.entry.js.map +1 -1
  17. package/dist/cjs/stzh-card-navigation.cjs.entry.js +1 -1
  18. package/dist/cjs/stzh-card-searchresult.cjs.entry.js +1 -1
  19. package/dist/cjs/stzh-card-superteaser.cjs.entry.js +2 -2
  20. package/dist/cjs/stzh-card-superteaser.cjs.entry.js.map +1 -1
  21. package/dist/cjs/stzh-card.cjs.entry.js +1 -1
  22. package/dist/cjs/stzh-carousel.cjs.entry.js +1 -1
  23. package/dist/cjs/stzh-checkbox_3.cjs.entry.js +2 -2
  24. package/dist/cjs/stzh-checkbox_3.cjs.entry.js.map +1 -1
  25. package/dist/cjs/stzh-checkboxgroup.cjs.entry.js +1 -1
  26. package/dist/cjs/stzh-components.cjs.js +2 -2
  27. package/dist/cjs/stzh-contact-cv.cjs.entry.js +1 -1
  28. package/dist/cjs/stzh-contact.cjs.entry.js +1 -1
  29. package/dist/cjs/stzh-cspace.cjs.entry.js +1 -1
  30. package/dist/cjs/stzh-cta.cjs.entry.js +1 -1
  31. package/dist/cjs/stzh-datalist_2.cjs.entry.js +1 -1
  32. package/dist/cjs/stzh-datatable.cjs.entry.js +1 -1
  33. package/dist/cjs/stzh-datepicker_3.cjs.entry.js +1 -1
  34. package/dist/cjs/stzh-daterange.cjs.entry.js +1 -1
  35. package/dist/cjs/stzh-details.cjs.entry.js +1 -1
  36. package/dist/cjs/stzh-dialog.cjs.entry.js +1 -1
  37. package/dist/cjs/stzh-disturber.cjs.entry.js +1 -1
  38. package/dist/cjs/stzh-dropdown.cjs.entry.js +1 -1
  39. package/dist/cjs/stzh-eventinfo.cjs.entry.js +1 -1
  40. package/dist/cjs/stzh-feedreader-item.cjs.entry.js +1 -1
  41. package/dist/cjs/stzh-feedreader.cjs.entry.js +1 -1
  42. package/dist/cjs/stzh-figure.cjs.entry.js +1 -1
  43. package/dist/cjs/stzh-footer.cjs.entry.js +1 -1
  44. package/dist/cjs/stzh-ghettobox_3.cjs.entry.js +1 -1
  45. package/dist/cjs/stzh-heading.cjs.entry.js +1 -1
  46. package/dist/cjs/stzh-heading.cjs.entry.js.map +1 -1
  47. package/dist/cjs/stzh-homepage-service-highlights.cjs.entry.js +17 -8
  48. package/dist/cjs/stzh-homepage-service-highlights.cjs.entry.js.map +1 -1
  49. package/dist/cjs/stzh-input.cjs.entry.js +1 -1
  50. package/dist/cjs/stzh-link.cjs.entry.js +1 -1
  51. package/dist/cjs/stzh-menu_2.cjs.entry.js +1 -1
  52. package/dist/cjs/stzh-pagecontent.cjs.entry.js +1 -1
  53. package/dist/cjs/stzh-pagetitle-hero.cjs.entry.js +1 -1
  54. package/dist/cjs/stzh-pagetitle-home.cjs.entry.js +22 -12
  55. package/dist/cjs/stzh-pagetitle-home.cjs.entry.js.map +1 -1
  56. package/dist/cjs/stzh-pagetitle.cjs.entry.js +1 -1
  57. package/dist/cjs/stzh-pi-content-navigation.cjs.entry.js +1 -1
  58. package/dist/cjs/stzh-pi-pagetitle.cjs.entry.js +1 -1
  59. package/dist/cjs/stzh-pi-teaser.cjs.entry.js +1 -1
  60. package/dist/cjs/stzh-popover.cjs.entry.js +1 -1
  61. package/dist/cjs/stzh-print_2.cjs.entry.js +1 -1
  62. package/dist/cjs/stzh-readspeaker.cjs.entry.js +1 -1
  63. package/dist/cjs/stzh-scrollup.cjs.entry.js +1 -1
  64. package/dist/cjs/stzh-search.cjs.entry.js +1 -1
  65. package/dist/cjs/stzh-section.cjs.entry.js +1 -1
  66. package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js +1 -1
  67. package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js.map +1 -1
  68. package/dist/cjs/stzh-socialmediastream.cjs.entry.js +1 -1
  69. package/dist/cjs/stzh-sticky-actions.cjs.entry.js +1 -1
  70. package/dist/cjs/stzh-sticky.cjs.entry.js +1 -1
  71. package/dist/cjs/stzh-table.cjs.entry.js +1 -1
  72. package/dist/cjs/stzh-text.cjs.entry.js +1 -1
  73. package/dist/cjs/stzh-text.cjs.entry.js.map +1 -1
  74. package/dist/cjs/stzh-textandimage.cjs.entry.js +1 -1
  75. package/dist/cjs/stzh-timeline-item.cjs.entry.js +1 -1
  76. package/dist/cjs/stzh-toast_2.cjs.entry.js +1 -1
  77. package/dist/cjs/stzh-toggle.cjs.entry.js +1 -1
  78. package/dist/cjs/stzh-tooltip.cjs.entry.js +1 -1
  79. package/dist/cjs/stzh-twocolumns.cjs.entry.js +1 -1
  80. package/dist/cjs/stzh-upload.cjs.entry.js +1 -1
  81. package/dist/cjs/stzh-vbz-intro.cjs.entry.js +1 -1
  82. package/dist/cjs/stzh-vbz-intro.cjs.entry.js.map +1 -1
  83. package/dist/cjs/{utils-5a53d7eb.js → utils-c0aaa7ec.js} +6 -53
  84. package/dist/cjs/utils-c0aaa7ec.js.map +1 -0
  85. package/dist/collection/components/CMS/VBZ/stzh-vbz-intro/stzh-vbz-intro.css +4 -4
  86. package/dist/collection/components/CMS/stzh-card-superteaser/stzh-card-superteaser.css +13 -5
  87. package/dist/collection/components/CMS/stzh-homepage-service-highlights/stzh-homepage-service-highlights.css +17 -9
  88. package/dist/collection/components/CMS/stzh-homepage-service-highlights/stzh-homepage-service-highlights.js +20 -7
  89. package/dist/collection/components/CMS/stzh-homepage-service-highlights/stzh-homepage-service-highlights.js.map +1 -1
  90. package/dist/collection/components/CMS/stzh-page-skiplinks/stzh-page-skiplinks.e2e.js +1 -1
  91. package/dist/collection/components/CMS/stzh-page-skiplinks/stzh-page-skiplinks.e2e.js.map +1 -1
  92. package/dist/collection/components/CMS/stzh-pagetitle-home/stzh-pagetitle-home.css +4 -4
  93. package/dist/collection/components/CMS/stzh-pagetitle-home/stzh-pagetitle-home.js +21 -11
  94. package/dist/collection/components/CMS/stzh-pagetitle-home/stzh-pagetitle-home.js.map +1 -1
  95. package/dist/collection/components/stzh-accordion-item/stzh-accordion-item.css +6 -2
  96. package/dist/collection/components/stzh-anchornav/stzh-anchornav.css +8 -1
  97. package/dist/collection/components/stzh-breadcrumb/stzh-breadcrumb.css +1 -1
  98. package/dist/collection/components/stzh-header/stzh-header.css +16 -9
  99. package/dist/collection/components/stzh-heading/stzh-heading.css +33 -0
  100. package/dist/collection/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.css +181 -77
  101. package/dist/collection/components/stzh-text/stzh-text.css +33 -0
  102. package/dist/collection/pages/CMS/PKZH/pkzh.e2e.js +18 -0
  103. package/dist/collection/pages/CMS/PKZH/pkzh.e2e.js.map +1 -0
  104. package/dist/collection/utils/utils.js +4 -52
  105. package/dist/collection/utils/utils.js.map +1 -1
  106. package/dist/components/index.js +1 -1
  107. package/dist/components/{p-bf205f26.js → p-167acbe1.js} +5 -5
  108. package/dist/components/{p-bf205f26.js.map → p-167acbe1.js.map} +1 -1
  109. package/dist/components/{p-f0a46fac.js → p-1b9eaa71.js} +5 -5
  110. package/dist/components/{p-f0a46fac.js.map → p-1b9eaa71.js.map} +1 -1
  111. package/dist/components/{p-d1f98854.js → p-1c261255.js} +6 -54
  112. package/dist/components/p-1c261255.js.map +1 -0
  113. package/dist/components/{p-eb282891.js → p-1fa6272f.js} +2 -2
  114. package/dist/components/{p-eb282891.js.map → p-1fa6272f.js.map} +1 -1
  115. package/dist/components/{p-483a5750.js → p-250a1491.js} +2 -2
  116. package/dist/components/{p-483a5750.js.map → p-250a1491.js.map} +1 -1
  117. package/dist/components/{p-1d1ed4be.js → p-2d6ea1ff.js} +2 -2
  118. package/dist/components/{p-1d1ed4be.js.map → p-2d6ea1ff.js.map} +1 -1
  119. package/dist/components/{p-1a89c45a.js → p-2e72ad15.js} +5 -5
  120. package/dist/components/{p-1a89c45a.js.map → p-2e72ad15.js.map} +1 -1
  121. package/dist/components/{p-00414366.js → p-32847b38.js} +2 -2
  122. package/dist/components/{p-00414366.js.map → p-32847b38.js.map} +1 -1
  123. package/dist/components/{p-d0b793f2.js → p-3a5a5b65.js} +3 -3
  124. package/dist/components/{p-d0b793f2.js.map → p-3a5a5b65.js.map} +1 -1
  125. package/dist/components/{p-1cb87437.js → p-3bb470ce.js} +2 -2
  126. package/dist/components/{p-1cb87437.js.map → p-3bb470ce.js.map} +1 -1
  127. package/dist/components/{p-24ec14c6.js → p-3dffb214.js} +2 -2
  128. package/dist/components/{p-24ec14c6.js.map → p-3dffb214.js.map} +1 -1
  129. package/dist/components/{p-0d9775f9.js → p-411f8f60.js} +4 -4
  130. package/dist/components/{p-0d9775f9.js.map → p-411f8f60.js.map} +1 -1
  131. package/dist/components/{p-fb0977f0.js → p-4640fde3.js} +4 -4
  132. package/dist/components/{p-fb0977f0.js.map → p-4640fde3.js.map} +1 -1
  133. package/dist/components/{p-a6a7fe17.js → p-5959959c.js} +5 -5
  134. package/dist/components/{p-a6a7fe17.js.map → p-5959959c.js.map} +1 -1
  135. package/dist/components/{p-c28490de.js → p-5a4e00c6.js} +8 -8
  136. package/dist/components/p-5a4e00c6.js.map +1 -0
  137. package/dist/components/{p-5e0a644a.js → p-66c944a4.js} +4 -4
  138. package/dist/components/{p-5e0a644a.js.map → p-66c944a4.js.map} +1 -1
  139. package/dist/components/{p-630a1165.js → p-71b15229.js} +3 -3
  140. package/dist/components/{p-630a1165.js.map → p-71b15229.js.map} +1 -1
  141. package/dist/components/{p-d8730e10.js → p-71f94b81.js} +2 -2
  142. package/dist/components/{p-d8730e10.js.map → p-71f94b81.js.map} +1 -1
  143. package/dist/components/{p-c522aec2.js → p-8063d484.js} +2 -2
  144. package/dist/components/{p-c522aec2.js.map → p-8063d484.js.map} +1 -1
  145. package/dist/components/{p-71668a26.js → p-839b43f8.js} +2 -2
  146. package/dist/components/{p-71668a26.js.map → p-839b43f8.js.map} +1 -1
  147. package/dist/components/{p-9562b4bd.js → p-978cf208.js} +2 -2
  148. package/dist/components/{p-9562b4bd.js.map → p-978cf208.js.map} +1 -1
  149. package/dist/components/{p-4c350868.js → p-a46dcfa3.js} +2 -2
  150. package/dist/components/{p-4c350868.js.map → p-a46dcfa3.js.map} +1 -1
  151. package/dist/components/{p-b3ca3adb.js → p-a8384df3.js} +2 -2
  152. package/dist/components/{p-b3ca3adb.js.map → p-a8384df3.js.map} +1 -1
  153. package/dist/components/{p-047a8cfd.js → p-b1b69ae9.js} +2 -2
  154. package/dist/components/p-b1b69ae9.js.map +1 -0
  155. package/dist/components/{p-e9868942.js → p-b1c378de.js} +6 -6
  156. package/dist/components/{p-e9868942.js.map → p-b1c378de.js.map} +1 -1
  157. package/dist/components/{p-bcc02189.js → p-b51c7e54.js} +2 -2
  158. package/dist/components/p-b51c7e54.js.map +1 -0
  159. package/dist/components/{p-f62b89ed.js → p-b9a4f7b2.js} +3 -3
  160. package/dist/components/{p-f62b89ed.js.map → p-b9a4f7b2.js.map} +1 -1
  161. package/dist/components/{p-57d566ab.js → p-b9b96873.js} +5 -5
  162. package/dist/components/{p-57d566ab.js.map → p-b9b96873.js.map} +1 -1
  163. package/dist/components/{p-292d0fcd.js → p-b9d5a920.js} +8 -8
  164. package/dist/components/{p-292d0fcd.js.map → p-b9d5a920.js.map} +1 -1
  165. package/dist/components/{p-3eb3db1e.js → p-ba74cae2.js} +4 -4
  166. package/dist/components/{p-3eb3db1e.js.map → p-ba74cae2.js.map} +1 -1
  167. package/dist/components/{p-234a6c0a.js → p-beefcccd.js} +6 -6
  168. package/dist/components/{p-234a6c0a.js.map → p-beefcccd.js.map} +1 -1
  169. package/dist/components/{p-af8a3a03.js → p-c087b441.js} +2 -2
  170. package/dist/components/{p-af8a3a03.js.map → p-c087b441.js.map} +1 -1
  171. package/dist/components/{p-5ff5bde3.js → p-c1795d8b.js} +5 -5
  172. package/dist/components/{p-5ff5bde3.js.map → p-c1795d8b.js.map} +1 -1
  173. package/dist/components/{p-dca85cea.js → p-c6e9ea56.js} +3 -3
  174. package/dist/components/p-c6e9ea56.js.map +1 -0
  175. package/dist/components/{p-8f5849c3.js → p-c8b9cba7.js} +8 -8
  176. package/dist/components/{p-8f5849c3.js.map → p-c8b9cba7.js.map} +1 -1
  177. package/dist/components/{p-f39503f3.js → p-cbee9daa.js} +2 -2
  178. package/dist/components/{p-f39503f3.js.map → p-cbee9daa.js.map} +1 -1
  179. package/dist/components/{p-05e1fb77.js → p-ccbd3cdf.js} +3 -3
  180. package/dist/components/{p-05e1fb77.js.map → p-ccbd3cdf.js.map} +1 -1
  181. package/dist/components/{p-d5254d48.js → p-d1badd5b.js} +2 -2
  182. package/dist/components/{p-d5254d48.js.map → p-d1badd5b.js.map} +1 -1
  183. package/dist/components/{p-7de53368.js → p-d99aa7e6.js} +6 -6
  184. package/dist/components/{p-7de53368.js.map → p-d99aa7e6.js.map} +1 -1
  185. package/dist/components/{p-93c4bf04.js → p-e4568321.js} +3 -3
  186. package/dist/components/{p-93c4bf04.js.map → p-e4568321.js.map} +1 -1
  187. package/dist/components/{p-d2858a06.js → p-e973d4dc.js} +2 -2
  188. package/dist/components/{p-d2858a06.js.map → p-e973d4dc.js.map} +1 -1
  189. package/dist/components/{p-cd56033a.js → p-ea55bd3b.js} +2 -2
  190. package/dist/components/{p-cd56033a.js.map → p-ea55bd3b.js.map} +1 -1
  191. package/dist/components/{p-e9c5a9aa.js → p-ee40eddf.js} +2 -2
  192. package/dist/components/{p-e9c5a9aa.js.map → p-ee40eddf.js.map} +1 -1
  193. package/dist/components/{p-4480cb87.js → p-ee851c65.js} +3 -3
  194. package/dist/components/{p-4480cb87.js.map → p-ee851c65.js.map} +1 -1
  195. package/dist/components/{p-cc02c4c8.js → p-fd043b82.js} +4 -4
  196. package/dist/components/{p-cc02c4c8.js.map → p-fd043b82.js.map} +1 -1
  197. package/dist/components/stzh-accordion-item.js +1 -1
  198. package/dist/components/stzh-accordion.js +1 -1
  199. package/dist/components/stzh-actions.js +1 -1
  200. package/dist/components/stzh-actionset.js +1 -1
  201. package/dist/components/stzh-amount.js +5 -5
  202. package/dist/components/stzh-anchornav.js +3 -3
  203. package/dist/components/stzh-anchornav.js.map +1 -1
  204. package/dist/components/stzh-app-nav.js +1 -1
  205. package/dist/components/stzh-appointments.js +11 -11
  206. package/dist/components/stzh-archivelist.js +4 -4
  207. package/dist/components/stzh-audio.js +3 -3
  208. package/dist/components/stzh-banner.js +1 -1
  209. package/dist/components/stzh-bathstatus-item.js +1 -1
  210. package/dist/components/stzh-bathstatus-list.js +3 -3
  211. package/dist/components/stzh-breadcrumb.js +1 -1
  212. package/dist/components/stzh-button.js +1 -1
  213. package/dist/components/stzh-calendar.js +1 -1
  214. package/dist/components/stzh-card-navigation.js +1 -1
  215. package/dist/components/stzh-card-searchresult.js +10 -10
  216. package/dist/components/stzh-card-superteaser.js +11 -11
  217. package/dist/components/stzh-card-superteaser.js.map +1 -1
  218. package/dist/components/stzh-card.js +1 -1
  219. package/dist/components/stzh-cardlist.js +1 -1
  220. package/dist/components/stzh-carousel.js +1 -1
  221. package/dist/components/stzh-checkbox.js +1 -1
  222. package/dist/components/stzh-checkboxgroup.js +3 -3
  223. package/dist/components/stzh-chip.js +1 -1
  224. package/dist/components/stzh-chipselect.js +1 -1
  225. package/dist/components/stzh-clamp.js +1 -1
  226. package/dist/components/stzh-contact-cv.js +2 -2
  227. package/dist/components/stzh-contact.js +3 -3
  228. package/dist/components/stzh-cspace.js +1 -1
  229. package/dist/components/stzh-cta.js +2 -2
  230. package/dist/components/stzh-datalist-item.js +1 -1
  231. package/dist/components/stzh-datalist.js +1 -1
  232. package/dist/components/stzh-datamessagelist-item.js +6 -6
  233. package/dist/components/stzh-datatable.js +13 -13
  234. package/dist/components/stzh-datepicker.js +1 -1
  235. package/dist/components/stzh-daterange.js +2 -2
  236. package/dist/components/stzh-details.js +1 -1
  237. package/dist/components/stzh-dialog.js +1 -1
  238. package/dist/components/stzh-disturber.js +2 -2
  239. package/dist/components/stzh-dropdown.js +1 -1
  240. package/dist/components/stzh-editor.js +1 -1
  241. package/dist/components/stzh-eventinfo.js +3 -3
  242. package/dist/components/stzh-feedreader-item.js +1 -1
  243. package/dist/components/stzh-feedreader.js +6 -6
  244. package/dist/components/stzh-fieldset.js +1 -1
  245. package/dist/components/stzh-figure.js +1 -1
  246. package/dist/components/stzh-footer.js +2 -2
  247. package/dist/components/stzh-gallery.js +3 -3
  248. package/dist/components/stzh-geo-ref-data.js +15 -15
  249. package/dist/components/stzh-ghettobox.js +1 -1
  250. package/dist/components/stzh-header.js +1 -1
  251. package/dist/components/stzh-heading.js +1 -1
  252. package/dist/components/stzh-homepage-service-highlights.js +21 -12
  253. package/dist/components/stzh-homepage-service-highlights.js.map +1 -1
  254. package/dist/components/stzh-http-error.js +3 -3
  255. package/dist/components/stzh-iframe.js +1 -1
  256. package/dist/components/stzh-input.js +1 -1
  257. package/dist/components/stzh-link.js +1 -1
  258. package/dist/components/stzh-menu-item.js +1 -1
  259. package/dist/components/stzh-message.js +1 -1
  260. package/dist/components/stzh-microsite-teaserlist.js +12 -12
  261. package/dist/components/stzh-monthyearpicker.js +3 -3
  262. package/dist/components/stzh-offline-indicator.js +3 -3
  263. package/dist/components/stzh-pagebottom.js +5 -5
  264. package/dist/components/stzh-pagecontent.js +1 -1
  265. package/dist/components/stzh-pagetitle-hero.js +1 -1
  266. package/dist/components/stzh-pagetitle-home.js +22 -12
  267. package/dist/components/stzh-pagetitle-home.js.map +1 -1
  268. package/dist/components/stzh-pagetitle.js +1 -1
  269. package/dist/components/stzh-pagination.js +1 -1
  270. package/dist/components/stzh-panorama.js +7 -7
  271. package/dist/components/stzh-pi-content-navigation.js +1 -1
  272. package/dist/components/stzh-pi-pagetitle.js +1 -1
  273. package/dist/components/stzh-pi-teaser.js +1 -1
  274. package/dist/components/stzh-poicard.js +1 -1
  275. package/dist/components/stzh-poilist.js +11 -11
  276. package/dist/components/stzh-popover.js +1 -1
  277. package/dist/components/stzh-print.js +1 -1
  278. package/dist/components/stzh-radio.js +1 -1
  279. package/dist/components/stzh-radiogroup.js +1 -1
  280. package/dist/components/stzh-readspeaker.js +2 -2
  281. package/dist/components/stzh-saptcha.js +4 -4
  282. package/dist/components/stzh-scrollup.js +1 -1
  283. package/dist/components/stzh-search.js +12 -12
  284. package/dist/components/stzh-section.js +1 -1
  285. package/dist/components/stzh-share.js +1 -1
  286. package/dist/components/stzh-sitemap.js +5 -5
  287. package/dist/components/stzh-skin-portal-mitwirken.js +1 -1
  288. package/dist/components/stzh-skin-portal-mitwirken.js.map +1 -1
  289. package/dist/components/stzh-socialmediastream-item.js +1 -1
  290. package/dist/components/stzh-socialmediastream.js +4 -4
  291. package/dist/components/stzh-sticky-actions.js +2 -2
  292. package/dist/components/stzh-sticky.js +1 -1
  293. package/dist/components/stzh-table.js +1 -1
  294. package/dist/components/stzh-tag.js +1 -1
  295. package/dist/components/stzh-text.js +1 -1
  296. package/dist/components/stzh-textandimage.js +1 -1
  297. package/dist/components/stzh-timeline-item.js +1 -1
  298. package/dist/components/stzh-timepicker.js +3 -3
  299. package/dist/components/stzh-toast.js +1 -1
  300. package/dist/components/stzh-toastbar.js +1 -1
  301. package/dist/components/stzh-toggle.js +3 -3
  302. package/dist/components/stzh-tooltip.js +1 -1
  303. package/dist/components/stzh-twocolumns.js +1 -1
  304. package/dist/components/stzh-upload.js +10 -10
  305. package/dist/components/stzh-vbz-carousel.js +1 -1
  306. package/dist/components/stzh-vbz-intro.js +3 -3
  307. package/dist/components/stzh-vbz-intro.js.map +1 -1
  308. package/dist/components/stzh-vbz-majorticker.js +3 -3
  309. package/dist/components/stzh-vbz-ticker.js +3 -3
  310. package/dist/components/stzh-youtube.js +2 -2
  311. package/dist/esm/{app-globals-dc4e2dd7.js → app-globals-993885c2.js} +2 -2
  312. package/dist/esm/{app-globals-dc4e2dd7.js.map → app-globals-993885c2.js.map} +1 -1
  313. package/dist/esm/loader.js +2 -2
  314. package/dist/esm/stzh-accordion_3.entry.js +2 -2
  315. package/dist/esm/stzh-accordion_3.entry.js.map +1 -1
  316. package/dist/esm/stzh-actions.entry.js +1 -1
  317. package/dist/esm/stzh-anchornav.entry.js +1 -1
  318. package/dist/esm/stzh-anchornav.entry.js.map +1 -1
  319. package/dist/esm/stzh-appointments.entry.js +1 -1
  320. package/dist/esm/stzh-audio.entry.js +1 -1
  321. package/dist/esm/stzh-badge_3.entry.js +1 -1
  322. package/dist/esm/stzh-bathstatus-list.entry.js +1 -1
  323. package/dist/esm/stzh-breadcrumb_2.entry.js +1 -1
  324. package/dist/esm/stzh-breadcrumb_2.entry.js.map +1 -1
  325. package/dist/esm/stzh-card-navigation.entry.js +1 -1
  326. package/dist/esm/stzh-card-searchresult.entry.js +1 -1
  327. package/dist/esm/stzh-card-superteaser.entry.js +2 -2
  328. package/dist/esm/stzh-card-superteaser.entry.js.map +1 -1
  329. package/dist/esm/stzh-card.entry.js +1 -1
  330. package/dist/esm/stzh-carousel.entry.js +1 -1
  331. package/dist/esm/stzh-checkbox_3.entry.js +2 -2
  332. package/dist/esm/stzh-checkbox_3.entry.js.map +1 -1
  333. package/dist/esm/stzh-checkboxgroup.entry.js +1 -1
  334. package/dist/esm/stzh-components.js +2 -2
  335. package/dist/esm/stzh-contact-cv.entry.js +1 -1
  336. package/dist/esm/stzh-contact.entry.js +1 -1
  337. package/dist/esm/stzh-cspace.entry.js +1 -1
  338. package/dist/esm/stzh-cta.entry.js +1 -1
  339. package/dist/esm/stzh-datalist_2.entry.js +1 -1
  340. package/dist/esm/stzh-datatable.entry.js +1 -1
  341. package/dist/esm/stzh-datepicker_3.entry.js +1 -1
  342. package/dist/esm/stzh-daterange.entry.js +1 -1
  343. package/dist/esm/stzh-details.entry.js +1 -1
  344. package/dist/esm/stzh-dialog.entry.js +1 -1
  345. package/dist/esm/stzh-disturber.entry.js +1 -1
  346. package/dist/esm/stzh-dropdown.entry.js +1 -1
  347. package/dist/esm/stzh-eventinfo.entry.js +1 -1
  348. package/dist/esm/stzh-feedreader-item.entry.js +1 -1
  349. package/dist/esm/stzh-feedreader.entry.js +1 -1
  350. package/dist/esm/stzh-figure.entry.js +1 -1
  351. package/dist/esm/stzh-footer.entry.js +1 -1
  352. package/dist/esm/stzh-ghettobox_3.entry.js +1 -1
  353. package/dist/esm/stzh-heading.entry.js +1 -1
  354. package/dist/esm/stzh-heading.entry.js.map +1 -1
  355. package/dist/esm/stzh-homepage-service-highlights.entry.js +17 -8
  356. package/dist/esm/stzh-homepage-service-highlights.entry.js.map +1 -1
  357. package/dist/esm/stzh-input.entry.js +1 -1
  358. package/dist/esm/stzh-link.entry.js +1 -1
  359. package/dist/esm/stzh-menu_2.entry.js +1 -1
  360. package/dist/esm/stzh-pagecontent.entry.js +1 -1
  361. package/dist/esm/stzh-pagetitle-hero.entry.js +1 -1
  362. package/dist/esm/stzh-pagetitle-home.entry.js +22 -12
  363. package/dist/esm/stzh-pagetitle-home.entry.js.map +1 -1
  364. package/dist/esm/stzh-pagetitle.entry.js +1 -1
  365. package/dist/esm/stzh-pi-content-navigation.entry.js +1 -1
  366. package/dist/esm/stzh-pi-pagetitle.entry.js +1 -1
  367. package/dist/esm/stzh-pi-teaser.entry.js +1 -1
  368. package/dist/esm/stzh-popover.entry.js +1 -1
  369. package/dist/esm/stzh-print_2.entry.js +1 -1
  370. package/dist/esm/stzh-readspeaker.entry.js +1 -1
  371. package/dist/esm/stzh-scrollup.entry.js +1 -1
  372. package/dist/esm/stzh-search.entry.js +1 -1
  373. package/dist/esm/stzh-section.entry.js +1 -1
  374. package/dist/esm/stzh-skin-portal-mitwirken.entry.js +1 -1
  375. package/dist/esm/stzh-skin-portal-mitwirken.entry.js.map +1 -1
  376. package/dist/esm/stzh-socialmediastream.entry.js +1 -1
  377. package/dist/esm/stzh-sticky-actions.entry.js +1 -1
  378. package/dist/esm/stzh-sticky.entry.js +1 -1
  379. package/dist/esm/stzh-table.entry.js +1 -1
  380. package/dist/esm/stzh-text.entry.js +1 -1
  381. package/dist/esm/stzh-text.entry.js.map +1 -1
  382. package/dist/esm/stzh-textandimage.entry.js +1 -1
  383. package/dist/esm/stzh-timeline-item.entry.js +1 -1
  384. package/dist/esm/stzh-toast_2.entry.js +1 -1
  385. package/dist/esm/stzh-toggle.entry.js +1 -1
  386. package/dist/esm/stzh-tooltip.entry.js +1 -1
  387. package/dist/esm/stzh-twocolumns.entry.js +1 -1
  388. package/dist/esm/stzh-upload.entry.js +1 -1
  389. package/dist/esm/stzh-vbz-intro.entry.js +1 -1
  390. package/dist/esm/stzh-vbz-intro.entry.js.map +1 -1
  391. package/dist/esm/{utils-a756a0c9.js → utils-2ad42b77.js} +6 -54
  392. package/dist/esm/utils-2ad42b77.js.map +1 -0
  393. package/dist/stzh-components/{p-c804ddf2.entry.js → p-020bc473.entry.js} +2 -2
  394. package/dist/stzh-components/p-06a4df88.entry.js +2 -0
  395. package/dist/stzh-components/{p-c32b673d.entry.js.map → p-06a4df88.entry.js.map} +1 -1
  396. package/dist/stzh-components/{p-24caf6c1.js → p-09b5eb01.js} +2 -2
  397. package/dist/stzh-components/p-09b5eb01.js.map +1 -0
  398. package/dist/stzh-components/p-0e4fb1f6.entry.js +2 -0
  399. package/dist/stzh-components/p-0e4fb1f6.entry.js.map +1 -0
  400. package/dist/stzh-components/{p-003bfdda.entry.js → p-10a74052.entry.js} +2 -2
  401. package/dist/stzh-components/{p-4840a0f7.entry.js → p-13a77a74.entry.js} +2 -2
  402. package/dist/stzh-components/{p-98c1b82e.entry.js → p-16e70122.entry.js} +2 -2
  403. package/dist/stzh-components/{p-1ca34f18.entry.js → p-1f2a3ae6.entry.js} +2 -2
  404. package/dist/stzh-components/p-221194a4.js +2 -0
  405. package/dist/stzh-components/{p-19d6b43e.js.map → p-221194a4.js.map} +1 -1
  406. package/dist/stzh-components/{p-d4d8e3b8.entry.js → p-23aa2f5e.entry.js} +2 -2
  407. package/dist/stzh-components/{p-1f741338.entry.js → p-26aee6b2.entry.js} +2 -2
  408. package/dist/stzh-components/p-26aee6b2.entry.js.map +1 -0
  409. package/dist/stzh-components/p-2b59864c.entry.js +2 -0
  410. package/dist/stzh-components/p-2b59864c.entry.js.map +1 -0
  411. package/dist/stzh-components/{p-8485a36a.entry.js → p-2d453802.entry.js} +2 -2
  412. package/dist/stzh-components/{p-20b8f661.entry.js → p-3221e8e5.entry.js} +2 -2
  413. package/dist/stzh-components/{p-645f4d03.entry.js → p-34c56740.entry.js} +2 -2
  414. package/dist/stzh-components/{p-0d166cca.entry.js → p-3ef0956b.entry.js} +2 -2
  415. package/dist/stzh-components/{p-21a029ec.entry.js → p-41778942.entry.js} +2 -2
  416. package/dist/stzh-components/{p-d9dd1c3e.entry.js → p-429af819.entry.js} +2 -2
  417. package/dist/stzh-components/{p-caa73f07.entry.js → p-44018d4b.entry.js} +2 -2
  418. package/dist/stzh-components/{p-aa045255.entry.js → p-47e10f01.entry.js} +2 -2
  419. package/dist/stzh-components/p-47e10f01.entry.js.map +1 -0
  420. package/dist/stzh-components/{p-f9a412d8.entry.js → p-50e8431f.entry.js} +2 -2
  421. package/dist/stzh-components/{p-970c4474.entry.js → p-5178ea62.entry.js} +2 -2
  422. package/dist/stzh-components/{p-7f1b1ac4.entry.js → p-5939a40a.entry.js} +2 -2
  423. package/dist/stzh-components/{p-7f1b1ac4.entry.js.map → p-5939a40a.entry.js.map} +1 -1
  424. package/dist/stzh-components/{p-e45134ff.entry.js → p-59984acf.entry.js} +2 -2
  425. package/dist/stzh-components/{p-66fc9e64.entry.js → p-5b715075.entry.js} +2 -2
  426. package/dist/stzh-components/{p-a9ae4450.entry.js → p-5c6ec1b8.entry.js} +2 -2
  427. package/dist/stzh-components/p-5dc20152.entry.js +2 -0
  428. package/dist/stzh-components/p-5dc20152.entry.js.map +1 -0
  429. package/dist/stzh-components/{p-4c24fe27.entry.js → p-7a3be0f1.entry.js} +2 -2
  430. package/dist/stzh-components/{p-a1202b5f.entry.js → p-82c0d7be.entry.js} +2 -2
  431. package/dist/stzh-components/{p-dd5d4c39.entry.js → p-8516eea3.entry.js} +2 -2
  432. package/dist/stzh-components/{p-e945b00e.entry.js → p-8a0e7cdd.entry.js} +2 -2
  433. package/dist/stzh-components/{p-27fe663d.entry.js → p-94764282.entry.js} +2 -2
  434. package/dist/stzh-components/{p-ad754693.entry.js → p-95a0a398.entry.js} +2 -2
  435. package/dist/stzh-components/{p-111800e9.entry.js → p-9a776f85.entry.js} +2 -2
  436. package/dist/stzh-components/{p-70707b8e.entry.js → p-a28b5894.entry.js} +2 -2
  437. package/dist/stzh-components/{p-61be006b.entry.js → p-a5709e94.entry.js} +2 -2
  438. package/dist/stzh-components/{p-61be006b.entry.js.map → p-a5709e94.entry.js.map} +1 -1
  439. package/dist/stzh-components/{p-0bfc528d.entry.js → p-a5d557ac.entry.js} +2 -2
  440. package/dist/stzh-components/{p-1ce029b5.entry.js → p-a61538b1.entry.js} +2 -2
  441. package/dist/stzh-components/{p-adde0fce.entry.js → p-ac14e15c.entry.js} +2 -2
  442. package/dist/stzh-components/p-ae029763.entry.js +2 -0
  443. package/dist/stzh-components/p-ae029763.entry.js.map +1 -0
  444. package/dist/stzh-components/{p-fecffdfc.entry.js → p-b6ea1a1c.entry.js} +2 -2
  445. package/dist/stzh-components/{p-8adab188.entry.js → p-b7363fe1.entry.js} +2 -2
  446. package/dist/stzh-components/{p-aafeeae9.entry.js → p-ba551ad7.entry.js} +2 -2
  447. package/dist/stzh-components/{p-909e12d3.entry.js → p-bed50961.entry.js} +2 -2
  448. package/dist/stzh-components/{p-aefe968c.entry.js → p-c27e6b43.entry.js} +2 -2
  449. package/dist/stzh-components/{p-b26ca94e.entry.js → p-c80885e9.entry.js} +2 -2
  450. package/dist/stzh-components/{p-29fd8bc1.entry.js → p-cd5641a5.entry.js} +2 -2
  451. package/dist/stzh-components/{p-0460eba4.entry.js → p-cde3a344.entry.js} +2 -2
  452. package/dist/stzh-components/{p-77e044d8.entry.js → p-d5206c53.entry.js} +2 -2
  453. package/dist/stzh-components/{p-fb22b090.entry.js → p-da489363.entry.js} +2 -2
  454. package/dist/stzh-components/p-db4fddd7.entry.js +2 -0
  455. package/dist/stzh-components/p-db4fddd7.entry.js.map +1 -0
  456. package/dist/stzh-components/{p-52cbf6d6.entry.js → p-dbc45bd8.entry.js} +2 -2
  457. package/dist/stzh-components/{p-8421ff45.entry.js → p-dd9feb46.entry.js} +2 -2
  458. package/dist/stzh-components/{p-2b35e2a8.entry.js → p-e2f24462.entry.js} +2 -2
  459. package/dist/stzh-components/{p-0d5b8b1e.entry.js → p-e63a6dce.entry.js} +2 -2
  460. package/dist/stzh-components/{p-cb5740f3.entry.js → p-eccdd8b7.entry.js} +2 -2
  461. package/dist/stzh-components/{p-37ada736.entry.js → p-ee83fbac.entry.js} +2 -2
  462. package/dist/stzh-components/{p-f4122c15.entry.js → p-ef2e8303.entry.js} +2 -2
  463. package/dist/stzh-components/{p-c7ef6356.entry.js → p-f109bce4.entry.js} +2 -2
  464. package/dist/stzh-components/{p-2944edb9.entry.js → p-f36a7102.entry.js} +2 -2
  465. package/dist/stzh-components/{p-60964d4f.entry.js → p-f4bd536b.entry.js} +2 -2
  466. package/dist/stzh-components/{p-34ce5dc9.entry.js → p-f53341ce.entry.js} +2 -2
  467. package/dist/stzh-components/{p-b61dd422.entry.js → p-f91f7483.entry.js} +2 -2
  468. package/dist/stzh-components/{p-828b7874.entry.js → p-f94a05c6.entry.js} +2 -2
  469. package/dist/stzh-components/{p-85d44b8a.entry.js → p-fabd85ee.entry.js} +2 -2
  470. package/dist/stzh-components/{p-8854272d.entry.js → p-fbde302d.entry.js} +2 -2
  471. package/dist/stzh-components/p-ffb0f6e6.entry.js +2 -0
  472. package/dist/stzh-components/p-ffb0f6e6.entry.js.map +1 -0
  473. package/dist/stzh-components/stzh-components.css +181 -77
  474. package/dist/stzh-components/stzh-components.esm.js +1 -1
  475. package/dist/stzh-components/stzh-components.esm.js.map +1 -1
  476. package/dist/types/components/CMS/stzh-homepage-service-highlights/stzh-homepage-service-highlights.d.ts +3 -1
  477. package/dist/types/utils/utils.d.ts +1 -0
  478. package/package.json +1 -1
  479. package/dist/cjs/utils-5a53d7eb.js.map +0 -1
  480. package/dist/components/p-047a8cfd.js.map +0 -1
  481. package/dist/components/p-bcc02189.js.map +0 -1
  482. package/dist/components/p-c28490de.js.map +0 -1
  483. package/dist/components/p-d1f98854.js.map +0 -1
  484. package/dist/components/p-dca85cea.js.map +0 -1
  485. package/dist/esm/utils-a756a0c9.js.map +0 -1
  486. package/dist/stzh-components/p-1784d8e9.entry.js +0 -2
  487. package/dist/stzh-components/p-1784d8e9.entry.js.map +0 -1
  488. package/dist/stzh-components/p-19d6b43e.js +0 -2
  489. package/dist/stzh-components/p-1f741338.entry.js.map +0 -1
  490. package/dist/stzh-components/p-24caf6c1.js.map +0 -1
  491. package/dist/stzh-components/p-7265a57d.entry.js +0 -2
  492. package/dist/stzh-components/p-7265a57d.entry.js.map +0 -1
  493. package/dist/stzh-components/p-aa045255.entry.js.map +0 -1
  494. package/dist/stzh-components/p-c32b673d.entry.js +0 -2
  495. package/dist/stzh-components/p-c568ad41.entry.js +0 -2
  496. package/dist/stzh-components/p-c568ad41.entry.js.map +0 -1
  497. package/dist/stzh-components/p-d40c54da.entry.js +0 -2
  498. package/dist/stzh-components/p-d40c54da.entry.js.map +0 -1
  499. package/dist/stzh-components/p-ea7f260b.entry.js +0 -2
  500. package/dist/stzh-components/p-ea7f260b.entry.js.map +0 -1
  501. package/dist/stzh-components/p-eb6e4974.entry.js +0 -2
  502. package/dist/stzh-components/p-eb6e4974.entry.js.map +0 -1
  503. /package/dist/stzh-components/{p-c804ddf2.entry.js.map → p-020bc473.entry.js.map} +0 -0
  504. /package/dist/stzh-components/{p-003bfdda.entry.js.map → p-10a74052.entry.js.map} +0 -0
  505. /package/dist/stzh-components/{p-4840a0f7.entry.js.map → p-13a77a74.entry.js.map} +0 -0
  506. /package/dist/stzh-components/{p-98c1b82e.entry.js.map → p-16e70122.entry.js.map} +0 -0
  507. /package/dist/stzh-components/{p-1ca34f18.entry.js.map → p-1f2a3ae6.entry.js.map} +0 -0
  508. /package/dist/stzh-components/{p-d4d8e3b8.entry.js.map → p-23aa2f5e.entry.js.map} +0 -0
  509. /package/dist/stzh-components/{p-8485a36a.entry.js.map → p-2d453802.entry.js.map} +0 -0
  510. /package/dist/stzh-components/{p-20b8f661.entry.js.map → p-3221e8e5.entry.js.map} +0 -0
  511. /package/dist/stzh-components/{p-645f4d03.entry.js.map → p-34c56740.entry.js.map} +0 -0
  512. /package/dist/stzh-components/{p-0d166cca.entry.js.map → p-3ef0956b.entry.js.map} +0 -0
  513. /package/dist/stzh-components/{p-21a029ec.entry.js.map → p-41778942.entry.js.map} +0 -0
  514. /package/dist/stzh-components/{p-d9dd1c3e.entry.js.map → p-429af819.entry.js.map} +0 -0
  515. /package/dist/stzh-components/{p-caa73f07.entry.js.map → p-44018d4b.entry.js.map} +0 -0
  516. /package/dist/stzh-components/{p-f9a412d8.entry.js.map → p-50e8431f.entry.js.map} +0 -0
  517. /package/dist/stzh-components/{p-970c4474.entry.js.map → p-5178ea62.entry.js.map} +0 -0
  518. /package/dist/stzh-components/{p-e45134ff.entry.js.map → p-59984acf.entry.js.map} +0 -0
  519. /package/dist/stzh-components/{p-66fc9e64.entry.js.map → p-5b715075.entry.js.map} +0 -0
  520. /package/dist/stzh-components/{p-a9ae4450.entry.js.map → p-5c6ec1b8.entry.js.map} +0 -0
  521. /package/dist/stzh-components/{p-4c24fe27.entry.js.map → p-7a3be0f1.entry.js.map} +0 -0
  522. /package/dist/stzh-components/{p-a1202b5f.entry.js.map → p-82c0d7be.entry.js.map} +0 -0
  523. /package/dist/stzh-components/{p-dd5d4c39.entry.js.map → p-8516eea3.entry.js.map} +0 -0
  524. /package/dist/stzh-components/{p-e945b00e.entry.js.map → p-8a0e7cdd.entry.js.map} +0 -0
  525. /package/dist/stzh-components/{p-27fe663d.entry.js.map → p-94764282.entry.js.map} +0 -0
  526. /package/dist/stzh-components/{p-ad754693.entry.js.map → p-95a0a398.entry.js.map} +0 -0
  527. /package/dist/stzh-components/{p-111800e9.entry.js.map → p-9a776f85.entry.js.map} +0 -0
  528. /package/dist/stzh-components/{p-70707b8e.entry.js.map → p-a28b5894.entry.js.map} +0 -0
  529. /package/dist/stzh-components/{p-0bfc528d.entry.js.map → p-a5d557ac.entry.js.map} +0 -0
  530. /package/dist/stzh-components/{p-1ce029b5.entry.js.map → p-a61538b1.entry.js.map} +0 -0
  531. /package/dist/stzh-components/{p-adde0fce.entry.js.map → p-ac14e15c.entry.js.map} +0 -0
  532. /package/dist/stzh-components/{p-fecffdfc.entry.js.map → p-b6ea1a1c.entry.js.map} +0 -0
  533. /package/dist/stzh-components/{p-8adab188.entry.js.map → p-b7363fe1.entry.js.map} +0 -0
  534. /package/dist/stzh-components/{p-aafeeae9.entry.js.map → p-ba551ad7.entry.js.map} +0 -0
  535. /package/dist/stzh-components/{p-909e12d3.entry.js.map → p-bed50961.entry.js.map} +0 -0
  536. /package/dist/stzh-components/{p-aefe968c.entry.js.map → p-c27e6b43.entry.js.map} +0 -0
  537. /package/dist/stzh-components/{p-b26ca94e.entry.js.map → p-c80885e9.entry.js.map} +0 -0
  538. /package/dist/stzh-components/{p-29fd8bc1.entry.js.map → p-cd5641a5.entry.js.map} +0 -0
  539. /package/dist/stzh-components/{p-0460eba4.entry.js.map → p-cde3a344.entry.js.map} +0 -0
  540. /package/dist/stzh-components/{p-77e044d8.entry.js.map → p-d5206c53.entry.js.map} +0 -0
  541. /package/dist/stzh-components/{p-fb22b090.entry.js.map → p-da489363.entry.js.map} +0 -0
  542. /package/dist/stzh-components/{p-52cbf6d6.entry.js.map → p-dbc45bd8.entry.js.map} +0 -0
  543. /package/dist/stzh-components/{p-8421ff45.entry.js.map → p-dd9feb46.entry.js.map} +0 -0
  544. /package/dist/stzh-components/{p-2b35e2a8.entry.js.map → p-e2f24462.entry.js.map} +0 -0
  545. /package/dist/stzh-components/{p-0d5b8b1e.entry.js.map → p-e63a6dce.entry.js.map} +0 -0
  546. /package/dist/stzh-components/{p-cb5740f3.entry.js.map → p-eccdd8b7.entry.js.map} +0 -0
  547. /package/dist/stzh-components/{p-37ada736.entry.js.map → p-ee83fbac.entry.js.map} +0 -0
  548. /package/dist/stzh-components/{p-f4122c15.entry.js.map → p-ef2e8303.entry.js.map} +0 -0
  549. /package/dist/stzh-components/{p-c7ef6356.entry.js.map → p-f109bce4.entry.js.map} +0 -0
  550. /package/dist/stzh-components/{p-2944edb9.entry.js.map → p-f36a7102.entry.js.map} +0 -0
  551. /package/dist/stzh-components/{p-60964d4f.entry.js.map → p-f4bd536b.entry.js.map} +0 -0
  552. /package/dist/stzh-components/{p-34ce5dc9.entry.js.map → p-f53341ce.entry.js.map} +0 -0
  553. /package/dist/stzh-components/{p-b61dd422.entry.js.map → p-f91f7483.entry.js.map} +0 -0
  554. /package/dist/stzh-components/{p-828b7874.entry.js.map → p-f94a05c6.entry.js.map} +0 -0
  555. /package/dist/stzh-components/{p-85d44b8a.entry.js.map → p-fabd85ee.entry.js.map} +0 -0
  556. /package/dist/stzh-components/{p-8854272d.entry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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-link/stzh-link.scss?tag=stzh-link&encapsulation=scoped","src/components/stzh-link/stzh-link.tsx"],"sourcesContent":["/**\n * @prop --color: Color of link\n * @prop --hover-color: Hover color of link\n * @prop --text-decoration-line: Text decoration of link\n * @prop --hover-text-decoration-line: Hover text decoration of link\n * @prop --icon-size: Size of icon next to link\n * @prop --min-height: Min height of link\n *\n * @prop --stzh-link-color: **Global**: Color of link\n * @prop --stzh-link-hover-color: **Global**: Hover color of link\n * @prop --stzh-link-text-decoration-line: **Global**: Text decoration of link\n * @prop --stzh-link-hover-text-decoration-line: **Global**: Text decoration of link\n * @prop --stzh-link-icon-size: **Global**: Size of icon next to link\n * @prop --stzh-link-text-decoration-thickness: **Global**: Text decoration thickness\n * @prop --stzh-link-text-decoration-skip-ink: **Global**: Whether to skip ink in text decoration\n * @prop --stzh-link-text-underline-offset: **Global**: Text underline offset\n */\n\n@mixin link--size-default() {\n --font-size: var(--stzh-font-milli-font-size);\n --line-height: var(--stzh-font-milli-text-line-height);\n --letter-spacing: normal;\n\n @include mq($from: medium) {\n --font-size: var(--stzh-font-centi-font-size);\n --line-height: var(--stzh-font-centi-text-line-height);\n --letter-spacing: normal;\n }\n}\n\n@mixin link--size-small() {\n --font-size: var(--stzh-font-micro-font-size);\n --line-height: var(--stzh-font-micro-text-line-height);\n --letter-spacing: normal;\n}\n\n@mixin link--size-inherit() {\n --font-size: inherit;\n --line-height: inherit;\n --letter-spacing: inherit;\n}\n\n:host {\n //@include link--size-default;\n --color: #{$linkColor};\n --text-decoration-line: #{$linkTextDecorationLine};\n --icon-wrapper-height: #{$linkIconWrapperHeight};\n --icon-size: #{$linkIconSize};\n --height: var(--stzh-link-height, 40px);\n\n --hover-color: #{$linkHoverColor};\n --hover-text-decoration-line: #{$linkHoverTextDecorationLine};\n\n @include mq($from: medium) {\n --height: var(--stzh-link-height, auto);\n }\n\n color: var(--color);\n display: inline-grid;\n width: auto;\n min-height: var(--height);\n pointer-events: var(--stzh-link-pointer-events, auto);\n\n &[height=\"auto\"] {\n --height: var(--stzh-link-auto-height, auto);\n }\n\n &[fullwidth]:not([fullwidth=\"false\"]) {\n width: 100%;\n display: grid;\n }\n\n &[variant=\"secondary\"] {\n --color: #{$linkSecondaryColor};\n --hover-color: #{$linkSecondaryHoverColor};\n }\n\n &[variant=\"back\"] {\n --text-decoration-line: none;\n --hover-color: var(--color);\n }\n\n &[active]:not([active=\"false\"]) {\n --color: var(--hover-color);\n }\n\n &[disabled]:not([disabled=\"false\"]) {\n --color: #{$colorGrey60};\n --hover-color: #{$colorGrey60};\n }\n}\n\n:host(:where([size=\"small\"])) {\n @include link--size-small;\n}\n\n:host(:where([size=\"inherit\"])) {\n @include link--size-inherit;\n}\n\n//@each $breakpoint, $size in $breakpoints {\n// @include mq($from: $breakpoint) {\n// :host(:where([size-#{$breakpoint}=\"default\"])) {\n// @include link--size-default;\n// }\n//\n// :host(:where([size-#{$breakpoint}=\"small\"])) {\n// @include link--size-small;\n// }\n//\n// :host(:where([size-#{$breakpoint}=\"inherit\"])) {\n// @include link--size-inherit;\n// }\n// }\n//}\n\n.stzh-link {\n font-size: var(--font-size);\n line-height: var(--line-height);\n letter-spacing: var(--letter-spacing);\n font-family: inherit;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: stretch;\n appearance: none;\n border: none;\n color: var(--color);\n transition: color $baseTransitionAnimationSpeed;\n cursor: pointer;\n width: 100%;\n text-decoration-line: none;\n background-color: transparent;\n padding: 0;\n border-radius: $buttonBorderRadius;\n text-align: left;\n\n &:hover {\n color: var(--hover-color);\n\n @media (hover: none) {\n color: inherit;\n }\n }\n\n &:hover &__text {\n text-decoration-line: var(--hover-text-decoration-line);\n }\n\n &__vhidden {\n @include visuallyhidden;\n }\n\n &__inner {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-grow: 1;\n }\n\n &__icon-wrapper {\n --stzh-icon-size: var(--icon-size);\n\n display: none;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: auto;\n height: var(--icon-wrapper-height);\n }\n\n &__text {\n --stzh-base-color: initial;\n\n text-decoration-line: var(--text-decoration-line);\n }\n\n &__icon-wrapper:not(:empty) + &__text:not(:empty),\n &__text:not(:empty) + &__icon-wrapper:not(:empty) {\n margin-left: space('xxsmall');\n }\n\n &__badge {\n position: absolute;\n z-index: 1;\n top: 0;\n right: 0;\n }\n\n &--has-icon &__icon-wrapper {\n display: inline-flex;\n }\n\n /* Variant if link only has icon */\n\n &--has-icon-only &__text {\n @include visuallyhidden;\n }\n\n /* Badge positioning variants */\n\n &--badge-position-link &__icon-wrapper {\n position: static;\n }\n\n &__badge,\n &--badge-position-link &__badge {\n top: calc(#{space('xxsmall')} * -1);\n right: calc(#{space('large')} * -1);\n }\n\n &--badge-position-icon#{&}--has-icon &__icon-wrapper {\n position: relative;\n }\n\n &--badge-position-icon#{&}--has-icon &__badge {\n top: calc(#{space('xsmall')} * -1);\n right: calc(#{space('small')} * -1);;\n }\n\n &--badge-position-icon#{&}--has-icon#{&}--has-badge &__icon-wrapper + &__text:not(:empty) {\n margin-left: space('small');\n }\n\n /* Alignment variants */\n\n &--align-left &__inner {\n justify-content: flex-start;\n }\n\n &--align-right &__inner {\n justify-content: flex-end;\n }\n\n &--align-center &__inner {\n justify-content: center;\n }\n\n &--align-space-between &__inner {\n justify-content: space-between;\n }\n\n /* Disabled variant */\n\n &--is-disabled {\n cursor: not-allowed;\n }\n}\n","import {\n Component,\n Host,\n Fragment,\n Element,\n h,\n Prop,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\nimport {\n StzhLinkFocusEvent,\n StzhLinkBlurEvent,\n StzhLinkSize,\n StzhBadgeType,\n StzhLinkClickEvent\n} from \"../../index\";\n\nimport { StzhLinkLocalizedText } from \"./stzh-link.localization\";\nimport { hasSlot, addWordBreakToLinks } from \"../../utils/utils\";\n\n/**\n * @slot icon - Slot for icon element\n * @slot - Slot for label/text content\n */\n@Component({\n tag: \"stzh-link\",\n styleUrl: \"stzh-link.scss\",\n scoped: true\n})\nexport class StzhLink {\n /** Translation strings */\n @Prop() localization: StzhLinkLocalizedText;\n\n /** Icon (use instead of icon slot) */\n @Prop() icon: string = \"\";\n\n /** Icon Position */\n @Prop({ reflect: true }) iconPosition: \"left\" | \"right\" = \"left\";\n\n /** Height variant (none prevent setting min-height for mikro and small breakpoint) */\n @Prop({ reflect: true }) height: \"default\" | \"auto\" = \"default\";\n\n /** Size variant */\n @Prop({ reflect: true }) size: StzhLinkSize = \"default\";\n\n /** Size variant (above small breakpoint) */\n @Prop({ reflect: true }) sizeSmall: StzhLinkSize;\n\n /** Size variant (above medium breakpoint) */\n @Prop({ reflect: true }) sizeMedium: StzhLinkSize;\n\n /** Size variant (above large breakpoint) */\n @Prop({ reflect: true }) sizeLarge: StzhLinkSize;\n\n /** Size variant (above ultra breakpoint) */\n @Prop({ reflect: true }) sizeUltra: StzhLinkSize;\n\n /** href attribute of the link */\n @Prop() href: string = \"\";\n\n /** Rel (if href is used) */\n @Prop() rel: string;\n\n /** target if the button is used as link (if href used) */\n @Prop() target: string = \"\";\n\n /** Download attribute of link (if `href` used) */\n @Prop() download: string;\n\n /** type of the button, if used as button (if no href used) */\n @Prop() type: \"button\" | \"submit\" | \"reset\" = \"button\";\n\n /** Variant style */\n @Prop({ reflect: true }) variant: \"default\" | \"secondary\" | \"back\" = \"default\";\n\n /** Whether the link is full width */\n @Prop({ reflect: true }) fullwidth: boolean = false;\n\n /** Text alignment */\n @Prop({ reflect: true }) textAlign: \"left\" | \"center\" | \"right\" | \"space-between\" | \"default\" = \"default\";\n\n /** Badge text */\n @Prop() badge: string = \"\";\n\n /** Badge type */\n @Prop({ reflect: true }) badgeType: StzhBadgeType = \"default\";\n\n /** Whether badge should be displayed empty */\n @Prop({ reflect: true }) badgeEmpty: boolean = false;\n\n /** Badge position */\n @Prop({ reflect: true }) badgePosition: \"icon\" | \"link\" = \"icon\";\n\n /** Disabled status */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Active status */\n @Prop({ reflect: true }) active: boolean = false;\n\n /** Whether only an icon is used inside the link */\n @Prop({ reflect: true }) iconOnly: boolean = false;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Access key of link (usually a number e.g. 1) */\n @Prop() linkAccesskey: string;\n\n /** ID of link element */\n @Prop() linkId: string;\n\n /** Accessible label for screen readers to replace visible text */\n @Prop({ attribute: \"a11y-label\" }) a11yLabel: string;\n\n /** Id for element which describes the button (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n /** Aria expanded of link/button */\n @Prop({ reflect: true, attribute: \"a11y-expanded\" }) a11yExpanded: boolean;\n\n /** Aria disabled of link/button */\n @Prop({ reflect: true, attribute: \"a11y-disabled\" }) a11yDisabled: boolean;\n\n /** Aria controls of link/button */\n @Prop({ attribute: \"a11y-controls\" }) a11yControls: string;\n\n /** Tabindex of link/button */\n @Prop({ attribute: \"a11y-tabindex\" }) a11yTabindex: string;\n\n /** Aria current of link/button */\n @Prop({ attribute: \"a11y-current\" }) a11yCurrent: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link/button element.\n * Default value will be taken from `label` prop or default slot.\n */\n @Prop() analyticsId: string;\n\n @Element() element: HTMLStzhLinkElement;\n\n /** Click event */\n @Event() stzhClick: EventEmitter<StzhLinkClickEvent>;\n\n /** Focus event */\n @Event() stzhFocus: EventEmitter<StzhLinkFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhLinkBlurEvent>;\n\n private link: HTMLButtonElement | HTMLAnchorElement;\n private text: HTMLDivElement;\n private focusedByInput: boolean = false;\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"link\");\n }\n }\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.link.focus();\n }\n\n this.focusedByInput = false;\n }\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\n const focusEvent = new FocusEvent(\"focus\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(focusEvent);\n this.stzhFocus.emit({\n component: \"stzh-link\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\n const blurEvent = new FocusEvent(\"blur\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(blurEvent);\n this.stzhBlur.emit({\n component: \"stzh-link\",\n originalEvent: event\n });\n }\n\n private onClick = (event: MouseEvent) => {\n this.stzhClick.emit({\n component: \"stzh-link\",\n originalEvent: event,\n href: this.href\n });\n }\n\n private addWordBreakToLinks() {\n const links = Array.from(\n this.element?.getElementsByClassName(\"stzh-link\") || []\n );\n addWordBreakToLinks(links as HTMLElement[]);\n }\n\n private renderIcon(): HTMLInputElement {\n return (\n <div class=\"stzh-link__icon-wrapper\">\n {this.icon ?\n <stzh-icon class=\"stzh-link__icon\" name={this.icon}></stzh-icon>\n :\n <slot name=\"icon\"></slot>\n }\n {(this.badge || this.badgeEmpty) &&\n <stzh-badge class=\"stzh-link__badge\" label={this.badge} type={this.badgeType}></stzh-badge>\n }\n </div>\n );\n }\n\n private renderContent(): HTMLDivElement {\n return (\n <div class=\"stzh-link__text\">\n {this.rel && this.rel.includes('external') && <div class=\"stzh-link__vhidden\">{this.localization.$globals.externalLinkLabel}</div>}\n {this.download && <div class=\"stzh-link__vhidden\">{this.localization.$globals.downloadLinkLabel}</div>}\n <div ref={(el) => (this.text = el as HTMLDivElement)}>{this.label ? this.label : <slot></slot>}</div>\n </div>\n );\n }\n\n private renderInner(iconUsed: boolean): DocumentFragment {\n return (\n <Fragment>\n <div class=\"stzh-link__inner\">\n {this.iconPosition === \"left\" && this.renderIcon()}\n {this.renderContent()}\n {this.iconPosition === \"right\" && this.renderIcon()}\n </div>\n {(this.badge || this.badgeEmpty) && !iconUsed &&\n <stzh-badge class=\"stzh-link__badge\" label={this.badge} type={this.badgeType}></stzh-badge>\n }\n </Fragment>\n );\n }\n\n async componentDidLoad() {\n this.addWordBreakToLinks();\n }\n\n componentDidRender() {\n requestAnimationFrame(() => {\n this.link?.setAttribute(\"s-object-id\", this.analyticsId || this.text.innerText);\n });\n }\n\n render() {\n const iconUsed = hasSlot(this.element, \"icon\") || !!this.icon;\n const classes = {\n \"stzh-link\": true,\n \"stzh-link--has-icon\": iconUsed,\n \"stzh-link--has-icon-only\": this.iconOnly,\n \"stzh-link--has-badge\": !!this.badge,\n \"stzh-link--is-fullwidth\": this.fullwidth,\n \"stzh-link--is-disabled\": this.disabled,\n \"stzh-link--is-active\": this.active,\n [`stzh-link--badge-position-${this.badgePosition}`]: !!this.badgePosition,\n [`stzh-link--align-${this.textAlign}`]: !!this.textAlign,\n [`stzh-link--${this.variant}`]: !!this.variant,\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n {this.href ?\n <a\n ref={(el) => (this.link = el as HTMLAnchorElement)}\n href={this.disabled ? null : this.href}\n download={this.download}\n rel={this.rel}\n target={this.target}\n class={classes}\n id={this.linkId}\n accessKey={this.linkAccesskey}\n tabindex={this.a11yTabindex}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n aria-disabled={typeof this.a11yDisabled !== \"undefined\"\n ? (this.a11yDisabled ? \"true\" : \"false\") : null}\n aria-expanded={typeof this.a11yExpanded !== \"undefined\"\n ? (this.a11yExpanded ? \"true\" : \"false\") : null}\n aria-controls={this.a11yControls || null}\n aria-current={this.a11yCurrent || null}\n onClick={this.onClick}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner(iconUsed)}\n </a>\n :\n <button\n ref={(el) => (this.link = el as HTMLButtonElement)}\n class={classes}\n type={this.type}\n disabled={this.disabled}\n id={this.linkId}\n accessKey={this.linkAccesskey}\n tabindex={this.a11yTabindex}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n aria-disabled={typeof this.a11yDisabled !== \"undefined\"\n ? (this.a11yDisabled ? \"true\" : \"false\") : null}\n aria-expanded={typeof this.a11yExpanded !== \"undefined\"\n ? (this.a11yExpanded ? \"true\" : \"false\") : null}\n aria-controls={this.a11yControls || null}\n aria-current={this.a11yCurrent || null}\n onClick={this.onClick}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner(iconUsed)}\n </button>\n }\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-d1badd5b.js","mappings":";;;;;AAAA,MAAM,WAAW,GAAG,qmLAAqmL,CAAC;AAC1nL,uBAAe,WAAW;;MC8Bb,QAAQ;;;;;;;QA2HX,mBAAc,GAAY,KAAK,CAAC;QAQhC,gBAAW,GAAG;YACpB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;gBACxB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;aACnB;YAED,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;SAC7B,CAAA;QAEO,YAAO,GAAG,CAAC,KAAiB;YAClC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;YAE3B,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,OAAO,EAAE;gBACzC,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,KAAK;gBACd,UAAU,EAAE,KAAK;aAClB,CAAC,CAAC;YAEH,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YACvC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;gBAClB,SAAS,EAAE,WAAW;gBACtB,aAAa,EAAE,KAAK;aACrB,CAAC,CAAC;SACJ,CAAA;QAEO,WAAM,GAAG,CAAC,KAAiB;YACjC,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,MAAM,EAAE;gBACvC,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,KAAK;gBACd,UAAU,EAAE,KAAK;aAClB,C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AO,IAAI,IAAI,mBAClC,IAAI,CAAC,YAAY,IAAI,IAAI,kBAC1B,IAAI,CAAC,WAAW,IAAI,IAAI,EACtC,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,MAAM,EAAE,IAAI,CAAC,MAAM,IAElB,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CACpB,CAEN,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-link/stzh-link.scss?tag=stzh-link&encapsulation=scoped","src/components/stzh-link/stzh-link.tsx"],"sourcesContent":["/**\n * @prop --color: Color of link\n * @prop --hover-color: Hover color of link\n * @prop --text-decoration-line: Text decoration of link\n * @prop --hover-text-decoration-line: Hover text decoration of link\n * @prop --icon-size: Size of icon next to link\n * @prop --min-height: Min height of link\n *\n * @prop --stzh-link-color: **Global**: Color of link\n * @prop --stzh-link-hover-color: **Global**: Hover color of link\n * @prop --stzh-link-text-decoration-line: **Global**: Text decoration of link\n * @prop --stzh-link-hover-text-decoration-line: **Global**: Text decoration of link\n * @prop --stzh-link-icon-size: **Global**: Size of icon next to link\n * @prop --stzh-link-text-decoration-thickness: **Global**: Text decoration thickness\n * @prop --stzh-link-text-decoration-skip-ink: **Global**: Whether to skip ink in text decoration\n * @prop --stzh-link-text-underline-offset: **Global**: Text underline offset\n */\n\n@mixin link--size-default() {\n --font-size: var(--stzh-font-milli-font-size);\n --line-height: var(--stzh-font-milli-text-line-height);\n --letter-spacing: normal;\n\n @include mq($from: medium) {\n --font-size: var(--stzh-font-centi-font-size);\n --line-height: var(--stzh-font-centi-text-line-height);\n --letter-spacing: normal;\n }\n}\n\n@mixin link--size-small() {\n --font-size: var(--stzh-font-micro-font-size);\n --line-height: var(--stzh-font-micro-text-line-height);\n --letter-spacing: normal;\n}\n\n@mixin link--size-inherit() {\n --font-size: inherit;\n --line-height: inherit;\n --letter-spacing: inherit;\n}\n\n:host {\n //@include link--size-default;\n --color: #{$linkColor};\n --text-decoration-line: #{$linkTextDecorationLine};\n --icon-wrapper-height: #{$linkIconWrapperHeight};\n --icon-size: #{$linkIconSize};\n --height: var(--stzh-link-height, 40px);\n\n --hover-color: #{$linkHoverColor};\n --hover-text-decoration-line: #{$linkHoverTextDecorationLine};\n\n @include mq($from: medium) {\n --height: var(--stzh-link-height, auto);\n }\n\n color: var(--color);\n display: inline-grid;\n width: auto;\n min-height: var(--height);\n pointer-events: var(--stzh-link-pointer-events, auto);\n\n &[height=\"auto\"] {\n --height: var(--stzh-link-auto-height, auto);\n }\n\n &[fullwidth]:not([fullwidth=\"false\"]) {\n width: 100%;\n display: grid;\n }\n\n &[variant=\"secondary\"] {\n --color: #{$linkSecondaryColor};\n --hover-color: #{$linkSecondaryHoverColor};\n }\n\n &[variant=\"back\"] {\n --text-decoration-line: none;\n --hover-color: var(--color);\n }\n\n &[active]:not([active=\"false\"]) {\n --color: var(--hover-color);\n }\n\n &[disabled]:not([disabled=\"false\"]) {\n --color: #{$colorGrey60};\n --hover-color: #{$colorGrey60};\n }\n}\n\n:host(:where([size=\"small\"])) {\n @include link--size-small;\n}\n\n:host(:where([size=\"inherit\"])) {\n @include link--size-inherit;\n}\n\n//@each $breakpoint, $size in $breakpoints {\n// @include mq($from: $breakpoint) {\n// :host(:where([size-#{$breakpoint}=\"default\"])) {\n// @include link--size-default;\n// }\n//\n// :host(:where([size-#{$breakpoint}=\"small\"])) {\n// @include link--size-small;\n// }\n//\n// :host(:where([size-#{$breakpoint}=\"inherit\"])) {\n// @include link--size-inherit;\n// }\n// }\n//}\n\n.stzh-link {\n font-size: var(--font-size);\n line-height: var(--line-height);\n letter-spacing: var(--letter-spacing);\n font-family: inherit;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: stretch;\n appearance: none;\n border: none;\n color: var(--color);\n transition: color $baseTransitionAnimationSpeed;\n cursor: pointer;\n width: 100%;\n text-decoration-line: none;\n background-color: transparent;\n padding: 0;\n border-radius: $buttonBorderRadius;\n text-align: left;\n\n &:hover {\n color: var(--hover-color);\n\n @media (hover: none) {\n color: inherit;\n }\n }\n\n &:hover &__text {\n text-decoration-line: var(--hover-text-decoration-line);\n }\n\n &__vhidden {\n @include visuallyhidden;\n }\n\n &__inner {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-grow: 1;\n }\n\n &__icon-wrapper {\n --stzh-icon-size: var(--icon-size);\n\n display: none;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: auto;\n height: var(--icon-wrapper-height);\n }\n\n &__text {\n --stzh-base-color: initial;\n\n text-decoration-line: var(--text-decoration-line);\n }\n\n &__icon-wrapper:not(:empty) + &__text:not(:empty),\n &__text:not(:empty) + &__icon-wrapper:not(:empty) {\n margin-left: space('xxsmall');\n }\n\n &__badge {\n position: absolute;\n z-index: 1;\n top: 0;\n right: 0;\n }\n\n &--has-icon &__icon-wrapper {\n display: inline-flex;\n }\n\n /* Variant if link only has icon */\n\n &--has-icon-only &__text {\n @include visuallyhidden;\n }\n\n /* Badge positioning variants */\n\n &--badge-position-link &__icon-wrapper {\n position: static;\n }\n\n &__badge,\n &--badge-position-link &__badge {\n top: calc(#{space('xxsmall')} * -1);\n right: calc(#{space('large')} * -1);\n }\n\n &--badge-position-icon#{&}--has-icon &__icon-wrapper {\n position: relative;\n }\n\n &--badge-position-icon#{&}--has-icon &__badge {\n top: calc(#{space('xsmall')} * -1);\n right: calc(#{space('small')} * -1);;\n }\n\n &--badge-position-icon#{&}--has-icon#{&}--has-badge &__icon-wrapper + &__text:not(:empty) {\n margin-left: space('small');\n }\n\n /* Alignment variants */\n\n &--align-left &__inner {\n justify-content: flex-start;\n }\n\n &--align-right &__inner {\n justify-content: flex-end;\n }\n\n &--align-center &__inner {\n justify-content: center;\n }\n\n &--align-space-between &__inner {\n justify-content: space-between;\n }\n\n /* Disabled variant */\n\n &--is-disabled {\n cursor: not-allowed;\n }\n}\n","import {\n Component,\n Host,\n Fragment,\n Element,\n h,\n Prop,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\nimport {\n StzhLinkFocusEvent,\n StzhLinkBlurEvent,\n StzhLinkSize,\n StzhBadgeType,\n StzhLinkClickEvent\n} from \"../../index\";\n\nimport { StzhLinkLocalizedText } from \"./stzh-link.localization\";\nimport { hasSlot, addWordBreakToLinks } from \"../../utils/utils\";\n\n/**\n * @slot icon - Slot for icon element\n * @slot - Slot for label/text content\n */\n@Component({\n tag: \"stzh-link\",\n styleUrl: \"stzh-link.scss\",\n scoped: true\n})\nexport class StzhLink {\n /** Translation strings */\n @Prop() localization: StzhLinkLocalizedText;\n\n /** Icon (use instead of icon slot) */\n @Prop() icon: string = \"\";\n\n /** Icon Position */\n @Prop({ reflect: true }) iconPosition: \"left\" | \"right\" = \"left\";\n\n /** Height variant (none prevent setting min-height for mikro and small breakpoint) */\n @Prop({ reflect: true }) height: \"default\" | \"auto\" = \"default\";\n\n /** Size variant */\n @Prop({ reflect: true }) size: StzhLinkSize = \"default\";\n\n /** Size variant (above small breakpoint) */\n @Prop({ reflect: true }) sizeSmall: StzhLinkSize;\n\n /** Size variant (above medium breakpoint) */\n @Prop({ reflect: true }) sizeMedium: StzhLinkSize;\n\n /** Size variant (above large breakpoint) */\n @Prop({ reflect: true }) sizeLarge: StzhLinkSize;\n\n /** Size variant (above ultra breakpoint) */\n @Prop({ reflect: true }) sizeUltra: StzhLinkSize;\n\n /** href attribute of the link */\n @Prop() href: string = \"\";\n\n /** Rel (if href is used) */\n @Prop() rel: string;\n\n /** target if the button is used as link (if href used) */\n @Prop() target: string = \"\";\n\n /** Download attribute of link (if `href` used) */\n @Prop() download: string;\n\n /** type of the button, if used as button (if no href used) */\n @Prop() type: \"button\" | \"submit\" | \"reset\" = \"button\";\n\n /** Variant style */\n @Prop({ reflect: true }) variant: \"default\" | \"secondary\" | \"back\" = \"default\";\n\n /** Whether the link is full width */\n @Prop({ reflect: true }) fullwidth: boolean = false;\n\n /** Text alignment */\n @Prop({ reflect: true }) textAlign: \"left\" | \"center\" | \"right\" | \"space-between\" | \"default\" = \"default\";\n\n /** Badge text */\n @Prop() badge: string = \"\";\n\n /** Badge type */\n @Prop({ reflect: true }) badgeType: StzhBadgeType = \"default\";\n\n /** Whether badge should be displayed empty */\n @Prop({ reflect: true }) badgeEmpty: boolean = false;\n\n /** Badge position */\n @Prop({ reflect: true }) badgePosition: \"icon\" | \"link\" = \"icon\";\n\n /** Disabled status */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Active status */\n @Prop({ reflect: true }) active: boolean = false;\n\n /** Whether only an icon is used inside the link */\n @Prop({ reflect: true }) iconOnly: boolean = false;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Access key of link (usually a number e.g. 1) */\n @Prop() linkAccesskey: string;\n\n /** ID of link element */\n @Prop() linkId: string;\n\n /** Accessible label for screen readers to replace visible text */\n @Prop({ attribute: \"a11y-label\" }) a11yLabel: string;\n\n /** Id for element which describes the button (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n /** Aria expanded of link/button */\n @Prop({ reflect: true, attribute: \"a11y-expanded\" }) a11yExpanded: boolean;\n\n /** Aria disabled of link/button */\n @Prop({ reflect: true, attribute: \"a11y-disabled\" }) a11yDisabled: boolean;\n\n /** Aria controls of link/button */\n @Prop({ attribute: \"a11y-controls\" }) a11yControls: string;\n\n /** Tabindex of link/button */\n @Prop({ attribute: \"a11y-tabindex\" }) a11yTabindex: string;\n\n /** Aria current of link/button */\n @Prop({ attribute: \"a11y-current\" }) a11yCurrent: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link/button element.\n * Default value will be taken from `label` prop or default slot.\n */\n @Prop() analyticsId: string;\n\n @Element() element: HTMLStzhLinkElement;\n\n /** Click event */\n @Event() stzhClick: EventEmitter<StzhLinkClickEvent>;\n\n /** Focus event */\n @Event() stzhFocus: EventEmitter<StzhLinkFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhLinkBlurEvent>;\n\n private link: HTMLButtonElement | HTMLAnchorElement;\n private text: HTMLDivElement;\n private focusedByInput: boolean = false;\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"link\");\n }\n }\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.link.focus();\n }\n\n this.focusedByInput = false;\n }\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\n const focusEvent = new FocusEvent(\"focus\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(focusEvent);\n this.stzhFocus.emit({\n component: \"stzh-link\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\n const blurEvent = new FocusEvent(\"blur\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(blurEvent);\n this.stzhBlur.emit({\n component: \"stzh-link\",\n originalEvent: event\n });\n }\n\n private onClick = (event: MouseEvent) => {\n this.stzhClick.emit({\n component: \"stzh-link\",\n originalEvent: event,\n href: this.href\n });\n }\n\n private addWordBreakToLinks() {\n const links = Array.from(\n this.element?.getElementsByClassName(\"stzh-link\") || []\n );\n addWordBreakToLinks(links as HTMLElement[]);\n }\n\n private renderIcon(): HTMLInputElement {\n return (\n <div class=\"stzh-link__icon-wrapper\">\n {this.icon ?\n <stzh-icon class=\"stzh-link__icon\" name={this.icon}></stzh-icon>\n :\n <slot name=\"icon\"></slot>\n }\n {(this.badge || this.badgeEmpty) &&\n <stzh-badge class=\"stzh-link__badge\" label={this.badge} type={this.badgeType}></stzh-badge>\n }\n </div>\n );\n }\n\n private renderContent(): HTMLDivElement {\n return (\n <div class=\"stzh-link__text\">\n {this.rel && this.rel.includes('external') && <div class=\"stzh-link__vhidden\">{this.localization.$globals.externalLinkLabel}</div>}\n {this.download && <div class=\"stzh-link__vhidden\">{this.localization.$globals.downloadLinkLabel}</div>}\n <div ref={(el) => (this.text = el as HTMLDivElement)}>{this.label ? this.label : <slot></slot>}</div>\n </div>\n );\n }\n\n private renderInner(iconUsed: boolean): DocumentFragment {\n return (\n <Fragment>\n <div class=\"stzh-link__inner\">\n {this.iconPosition === \"left\" && this.renderIcon()}\n {this.renderContent()}\n {this.iconPosition === \"right\" && this.renderIcon()}\n </div>\n {(this.badge || this.badgeEmpty) && !iconUsed &&\n <stzh-badge class=\"stzh-link__badge\" label={this.badge} type={this.badgeType}></stzh-badge>\n }\n </Fragment>\n );\n }\n\n async componentDidLoad() {\n this.addWordBreakToLinks();\n }\n\n componentDidRender() {\n requestAnimationFrame(() => {\n this.link?.setAttribute(\"s-object-id\", this.analyticsId || this.text.innerText);\n });\n }\n\n render() {\n const iconUsed = hasSlot(this.element, \"icon\") || !!this.icon;\n const classes = {\n \"stzh-link\": true,\n \"stzh-link--has-icon\": iconUsed,\n \"stzh-link--has-icon-only\": this.iconOnly,\n \"stzh-link--has-badge\": !!this.badge,\n \"stzh-link--is-fullwidth\": this.fullwidth,\n \"stzh-link--is-disabled\": this.disabled,\n \"stzh-link--is-active\": this.active,\n [`stzh-link--badge-position-${this.badgePosition}`]: !!this.badgePosition,\n [`stzh-link--align-${this.textAlign}`]: !!this.textAlign,\n [`stzh-link--${this.variant}`]: !!this.variant,\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n {this.href ?\n <a\n ref={(el) => (this.link = el as HTMLAnchorElement)}\n href={this.disabled ? null : this.href}\n download={this.download}\n rel={this.rel}\n target={this.target}\n class={classes}\n id={this.linkId}\n accessKey={this.linkAccesskey}\n tabindex={this.a11yTabindex}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n aria-disabled={typeof this.a11yDisabled !== \"undefined\"\n ? (this.a11yDisabled ? \"true\" : \"false\") : null}\n aria-expanded={typeof this.a11yExpanded !== \"undefined\"\n ? (this.a11yExpanded ? \"true\" : \"false\") : null}\n aria-controls={this.a11yControls || null}\n aria-current={this.a11yCurrent || null}\n onClick={this.onClick}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner(iconUsed)}\n </a>\n :\n <button\n ref={(el) => (this.link = el as HTMLButtonElement)}\n class={classes}\n type={this.type}\n disabled={this.disabled}\n id={this.linkId}\n accessKey={this.linkAccesskey}\n tabindex={this.a11yTabindex}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n aria-disabled={typeof this.a11yDisabled !== \"undefined\"\n ? (this.a11yDisabled ? \"true\" : \"false\") : null}\n aria-expanded={typeof this.a11yExpanded !== \"undefined\"\n ? (this.a11yExpanded ? \"true\" : \"false\") : null}\n aria-controls={this.a11yControls || null}\n aria-current={this.a11yCurrent || null}\n onClick={this.onClick}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner(iconUsed)}\n </button>\n }\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,12 +1,12 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, F as Fragment, d as Host } from './p-8f01554b.js';
2
2
  import { S as StzhInputDescription } from './p-6393ca35.js';
3
3
  import { d as defineCustomElement$7 } from './p-486f6cb3.js';
4
- import { d as defineCustomElement$6 } from './p-d0b793f2.js';
5
- import { d as defineCustomElement$5 } from './p-4c350868.js';
4
+ import { d as defineCustomElement$6 } from './p-3a5a5b65.js';
5
+ import { d as defineCustomElement$5 } from './p-a46dcfa3.js';
6
6
  import { d as defineCustomElement$4 } from './p-0300f421.js';
7
- import { d as defineCustomElement$3 } from './p-d5254d48.js';
8
- import { d as defineCustomElement$2 } from './p-b3ca3adb.js';
9
- import { d as defineCustomElement$1 } from './p-71668a26.js';
7
+ import { d as defineCustomElement$3 } from './p-d1badd5b.js';
8
+ import { d as defineCustomElement$2 } from './p-a8384df3.js';
9
+ import { d as defineCustomElement$1 } from './p-839b43f8.js';
10
10
 
11
11
  const stzhChipselectCss = ".sc-stzh-chipselect-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-chipselect-h,[stzh-hidden].sc-stzh-chipselect-h{display:none}.sc-stzh-chipselect-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-chipselect-h *.sc-stzh-chipselect,.sc-stzh-chipselect-h *.sc-stzh-chipselect::before,.sc-stzh-chipselect-h *.sc-stzh-chipselect::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-chipselect-h .has-focus.sc-stzh-chipselect{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-chipselect-h .stzh-fylingfocus-focused.sc-stzh-chipselect{outline-style:none !important}.sc-stzh-chipselect-h .stzh-fylingfocus-focused.sc-stzh-chipselect::-moz-focus-inner{border:0 !important}[disabled].sc-stzh-chipselect-h:not([disabled=false]){--description-color:var(--stzh-color-grey70)}.stzh-chipselect__marker-symbol.sc-stzh-chipselect{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium)}.stzh-chipselect__marker-text.sc-stzh-chipselect{border:0;clip:rect(0 0 0 0);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-chipselect__description-wrapper.sc-stzh-chipselect{display:flex;flex-direction:column-reverse;min-height:var(--description-min-height, var(--stzh-description-min-height, none))}.stzh-chipselect__error.sc-stzh-chipselect,.stzh-chipselect__description.sc-stzh-chipselect{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height)}.stzh-chipselect__error.sc-stzh-chipselect{color:var(--stzh-color-error60)}.stzh-chipselect__error-list.sc-stzh-chipselect{list-style:none;margin:0;padding:0}.stzh-chipselect__description.sc-stzh-chipselect{display:flex;align-items:flex-start;color:var(--stzh-input-description-color, var(--description-color, var(--stzh-color-coolgrey70)));transition:color var(--stzh-base-transition-animation-speed)}.stzh-chipselect__description-long.sc-stzh-chipselect{margin-right:var(--stzh-space-xxsmall);margin-top:0.125rem}@supports (font: -apple-system-body) and (-webkit-appearance: none){.stzh-chipselect__description-long.sc-stzh-chipselect{margin-top:0}}.stzh-chipselect__description-long-popover.sc-stzh-chipselect{--width:auto;--max-width:27.3125rem}.stzh-chipselect__description-long-button.sc-stzh-chipselect{display:flex;justify-content:center;align-items:center;appearance:none;font-family:inherit;padding:0;border:none;background-color:transparent;border-radius:0.5rem;cursor:pointer}.stzh-chipselect.sc-stzh-chipselect stzh-icon.stzh-chipselect__description-long-icon.sc-stzh-chipselect{--size:var(--stzh-icon-size-xsmall)}.stzh-chipselect--has-error.sc-stzh-chipselect .stzh-chipselect__error.sc-stzh-chipselect,.stzh-chipselect--has-description.sc-stzh-chipselect .stzh-chipselect__description.sc-stzh-chipselect{margin-top:var(--stzh-space-xxxsmall)}.stzh-chipselect__label.sc-stzh-chipselect{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color:var(--stzh-heading-color);display:block;margin-bottom:var(--stzh-space-xsmall)}.stzh-chipselect__label.sc-stzh-chipselect:empty{display:none}.stzh-chipselect__marker.sc-stzh-chipselect{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height);margin-left:calc(-0.25em + var(--stzh-space-xsmall))}.stzh-chipselect__chips.sc-stzh-chipselect{display:flex;align-items:center;flex-wrap:wrap;border-radius:var(--stzh-button-border-radius);gap:var(--stzh-space-medium)}.stzh-chipselect__chips.sc-stzh-chipselect:focus-within .is-focused[active].sc-stzh-chipselect{--background-color:var(--stzh-color-primary90)}@media (forced-colors: active), (-ms-high-contrast: active){.stzh-chipselect__chips.sc-stzh-chipselect:focus-within .is-focused[active].sc-stzh-chipselect{--background-color:Canvas}}.stzh-chipselect__chip.is-focused.sc-stzh-chipselect{--background-color:var(--stzh-color-secondary40)}@media (forced-colors: active), (-ms-high-contrast: active){.stzh-chipselect__chip.is-focused.sc-stzh-chipselect{--background-color:Highlight}}.stzh-chipselect--has-error.sc-stzh-chipselect .stzh-chipselect__error.sc-stzh-chipselect,.stzh-chipselect--has-description.sc-stzh-chipselect .stzh-chipselect__description.sc-stzh-chipselect{margin-top:var(--stzh-space-xsmall)}.stzh-chipselect--has-label-hidden.sc-stzh-chipselect .stzh-chipselect__label.sc-stzh-chipselect{border:0;clip:rect(0 0 0 0);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-chipselect--is-disabled.sc-stzh-chipselect .stzh-chipselect__chips.sc-stzh-chipselect,.stzh-chipselect--is-disabled.sc-stzh-chipselect .stzh-chipselect__label.sc-stzh-chipselect{cursor:not-allowed}";
12
12
  const StzhChipselectStyle0 = stzhChipselectCss;
@@ -318,4 +318,4 @@ function defineCustomElement() {
318
318
 
319
319
  export { StzhChipselect as S, defineCustomElement as d };
320
320
 
321
- //# sourceMappingURL=p-7de53368.js.map
321
+ //# sourceMappingURL=p-d99aa7e6.js.map
@@ -1 +1 @@
1
- {"file":"p-7de53368.js","mappings":";;;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,oyKAAoyK,CAAC;AAC/zK,6BAAe,iBAAiB;;ACwBhC,IAAI,iBAAiB,GAAG,CAAC,CAAC;MAcb,cAAc;;;;;QAMjB,UAAK,GAAyB,EAAE,CAAC;QAiBjC,WAAM,GAAa,EAAE,CAAC;QAuHtB,gBAAW,GAAG;YACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,CA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;wBACrF,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;sBAClH,MAAM,GAAG,OAAO,EAEtB,EAAE,EAAE,GAAG,IAAI,CAAC,EAAE,WAAW,KAAK,EAAE,EAChC,YAAY,EAAC,IAAI,EACjB,OAAO,EAAE,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,GACrC,CACd,CAAC,CACE,EAEN,EAAC,oBAAoB,qDACnB,WAAW,EAAC,iBAAiB,EAC7B,EAAE,EAAE,GAAG,IAAI,CAAC,EAAE,cAAc,EAC5B,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAC/C,mBAAmB,EAAE,mBAAmB,EACxC,mBAAmB,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,mBAAmB,GACnE,CAkBO,CAET,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-chipselect/stzh-chipselect.scss?tag=stzh-chipselect&encapsulation=scoped","src/components/stzh-chipselect/stzh-chipselect.tsx"],"sourcesContent":[":host {\n &[disabled]:not([disabled=\"false\"]) {\n --description-color: #{$formDisabledColor};\n }\n}\n\n.stzh-chipselect {\n @include input-description;\n\n &__label {\n @include font('heavy');\n @include fontSize('micro');\n @include truncate;\n color: $headingColor;\n display: block;\n margin-bottom: space('xsmall');\n\n &:empty {\n display: none;\n }\n }\n\n &__marker {\n @include fontSize('nano');\n margin-left: calc(-0.25em + #{space('xsmall')});\n }\n\n &__chips {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n border-radius: $buttonBorderRadius;\n gap: space('medium');\n\n &:focus-within {\n .is-focused[active] {\n --background-color: #{$colorPrimary90};\n\n @include highContrast() {\n --background-color: Canvas;\n }\n }\n }\n }\n\n &__chip {\n &.is-focused {\n --background-color: #{$colorSecondary40};\n\n @include highContrast() {\n --background-color: Highlight;\n }\n }\n }\n\n // &__dropdown {\n // @include mq($from: medium) {\n // display: none;\n // }\n // }\n\n // &__description-wrapper {\n // @include mq($to: medium) {\n // display: none;\n // }\n // }\n\n &--has-error &__error,\n &--has-description &__description {\n margin-top: space('xsmall');\n }\n\n /* Hidden label */\n\n &--has-label-hidden &__label {\n @include visuallyhidden;\n }\n\n /* Disabled */\n\n &--is-disabled &__chips,\n &--is-disabled &__label {\n cursor: not-allowed;\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Watch,\n Event,\n EventEmitter,\n State,\n Fragment,\n Listen,\n} from \"@stencil/core\";\n\nimport {\n StzhChipselectItem,\n StzhChipselectChangeEvent,\n // StzhDropdownChangeEvent\n} from \"../../index\";\n\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\n// import { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../index\";\n\nlet chipselectCounter = 0;\n\n/**\n * @slot - Slot for `stzh-checkbox` elements\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot description-long-title - Slot for long description title (in popover) / instead of descriptionLongTitle or description property\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-chipselect\",\n styleUrl: \"stzh-chipselect.scss\",\n scoped: true\n})\nexport class StzhChipselect {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** The list of chips */\n @Prop() data: string | StzhChipselectItem[] = [];\n private _data: StzhChipselectItem[] = [];\n // private _dataDropdown: any[] = [];\n\n /** The name of the input element */\n @Prop({ reflect: true }) name: string;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Whether label is hidden. */\n @Prop() labelHidden: boolean = false;\n\n /** Multiple */\n @Prop({ mutable: true }) multiple: boolean = false;\n\n /** Value */\n @Prop({ mutable: true }) value: string | string[] = \"\";\n private _value: string[] = [];\n\n /** Default value (used by reset) */\n @Prop({ mutable: true }) defaultValue: string | string[] = \"\";\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /**\n * **Do not use this property. It will be deprecated with the next major release.**\n * Long description title appearing in a popover (use description-long-title slot as or description property alternative) */\n @Prop() descriptionLongTitle: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Whether all chips are disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Hide `(optional)` label (or use `required` inside form to hide it) */\n @Prop({ reflect: true }) hideOptional: boolean = false;\n\n /** Id for element which describes the input (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n @State() activeFocusOptionIndex: number = 0;\n\n @Element() element: HTMLStzhChipselectElement;\n\n /** Change event */\n @Event() stzhChange: EventEmitter<StzhChipselectChangeEvent>;\n\n @Listen(\"reset\", { target: \"document\" })\n resetListener(event: Event) {\n if ((event.target as HTMLElement).contains(this.element)) {\n requestAnimationFrame(() => {\n this.handleReset();\n });\n }\n }\n\n @Watch(\"value\")\n valueWatcher(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n try {\n const parsedValue = JSON.parse(newValue); // since parsing a number like string (i.e. \"1\") will return a number and parsing a boolean like string (i.e. \"true\") will return a boolean we need to check if the parsed value is indeed an array.\n if (Array.isArray(parsedValue)) {\n this._value = parsedValue;\n }\n else {\n this._value = newValue ? [newValue] : [];\n }\n } catch (ex) {\n this._value = newValue ? [newValue] : [];\n }\n } else {\n this._value = newValue ? newValue : [];\n }\n }\n\n @Watch(\"data\")\n dataWatcher(newValue: StzhChipselectItem[] | string) {\n if (typeof newValue === \"string\") {\n this._data = JSON.parse(newValue);\n } else {\n this._data = newValue;\n }\n\n this._data.map((dataEntry) => {\n if (typeof dataEntry.value !== \"string\"){\n throw new TypeError(`${dataEntry.value} is not a string. The data prop only accepts arrays (or stringified arrays), where the value property is a string. Consult the StzhChipselectItem type definition for more information.`);\n }\n });\n // this._dataDropdown = this._data.map((data) => {\n // return {\n // text: data.counter\n // ? `${data.label} (${data.counter})`\n // : data.label,\n // value: data.value\n // }\n // });\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n }\n\n private id: string;\n private renderPromiseResolve: (value?: unknown) => void;\n\n private waitForNextRender() {\n return new Promise(resolve => this.renderPromiseResolve = resolve);\n }\n\n private handleReset = async () => {\n this.value = this.defaultValue;\n\n // this.stzhChange.emit({\n // component: \"stzh-chipselect\",\n // value: this.value\n // });\n }\n\n private handleChipClick = async (data: StzhChipselectItem, index: number) => {\n if (this.multiple) {\n if (data.value === \"\" && this._value.length > 0 && !(this._value.length === 1 && this._value[0] === \"\")) {\n this.value = [];\n } else if (data.value !== \"\") {\n this.value = this._value.includes(data.value)\n ? this._value.filter(value => value !== data.value)\n : [...this._value, data.value];\n }\n } else {\n this.value = data.value;\n }\n\n this.activeFocusOptionIndex = index;\n\n await this.waitForNextRender();\n\n this.stzhChange.emit({\n component: \"stzh-chipselect\",\n value: this.multiple ? this._value : this._value[0]\n });\n }\n\n // private handleDropdownChange = async (event: CustomEvent<StzhDropdownChangeEvent>) => {\n // this.value = Array.isArray(event.detail.value) ? event.detail.value[0] : event.detail.value;\n\n // this.activeFocusOptionIndex = this._data.findIndex(data => {\n // return data.value === this.value;\n // });\n\n // await this.waitForNextRender();\n\n // this.stzhChange.emit({\n // component: \"stzh-chipselect\",\n // value: this.value\n // })\n // }\n\n private handleKeydown = (event: KeyboardEvent) => {\n let newActiveIndex: number = null;\n const activeOptionIndex = this.activeFocusOptionIndex;\n\n if (event.key === \"ArrowUp\" || event.key === \"ArrowLeft\") {\n event.preventDefault();\n\n if (activeOptionIndex > 0) {\n newActiveIndex = activeOptionIndex - 1;\n }\n } else if (event.key === \"ArrowDown\" || event.key === \"ArrowRight\") {\n event.preventDefault();\n\n if (activeOptionIndex < this._data.length - 1) {\n newActiveIndex = activeOptionIndex + 1;\n }\n } else if (event.key === \" \" || event.key === \"Enter\") {\n event.preventDefault();\n if (this.multiple) {\n if (this._data[activeOptionIndex].value === \"\" && this._value.length > 0 && !(this._value.length === 1 && this._value[0] === \"\")) {\n this.value = [];\n } else if (this._data[activeOptionIndex].value !== \"\") {\n this.value = this._value.includes(this._data[activeOptionIndex].value)\n ? this._value.filter(value => value !== this._data[activeOptionIndex].value)\n : [...this._value, this._data[activeOptionIndex].value];\n }\n } else {\n this.value = this._data[activeOptionIndex].value; //HERE\n }\n this.stzhChange.emit({\n component: \"stzh-chipselect\",\n value: this.value\n });\n }\n\n if (newActiveIndex !== null) {\n this.activeFocusOptionIndex = newActiveIndex;\n }\n }\n\n componentDidRender() {\n if (this.renderPromiseResolve) {\n this.renderPromiseResolve();\n }\n }\n\n async componentWillLoad() {\n this.id = `stzh-chipselect-${chipselectCounter++}`;\n\n this.dataWatcher(this.data);\n this.errorWatcher(this.error);\n this.valueWatcher(this.value);\n\n this.defaultValue = this.defaultValue || this.value;\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"chipselect\");\n }\n }\n\n render() {\n const descriptionUsed = !!this.description;\n const descriptionLongUsed = !!this.descriptionLong;\n const errorUsed = !!this.error;\n\n const classes = {\n \"stzh-chipselect\": true,\n \"stzh-chipselect--has-description\": descriptionUsed,\n \"stzh-chipselect--has-description-long\": descriptionLongUsed,\n \"stzh-chipselect--has-error\": errorUsed,\n \"stzh-chipselect--is-invalid\": this.invalid || errorUsed,\n \"stzh-chipselect--is-disabled\": this.disabled,\n \"stzh-chipselect--is-required\": this.required,\n \"stzh-chipselect--has-label-hidden\": this.labelHidden,\n };\n\n return (\n <Host is-invalid={this.invalid || errorUsed}>\n <div class={classes}>\n {this.multiple\n ?\n <Fragment>\n {this._value.map((value) =>\n <input type=\"hidden\" name={this.name} value={value} />\n )}\n </Fragment>\n :\n <input\n type=\"hidden\"\n name={this.name}\n value={this.value}\n />\n }\n\n <label class=\"stzh-chipselect__label\" htmlFor={this.id}>\n {this.label ? this.label : <slot></slot>}\n {!this.hideOptional &&\n <span class=\"stzh-chipselect__marker\">\n <span class=\"stzh-chipselect__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker\n }\n </span>\n <span class=\"stzh-chipselect__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText\n }\n </span>\n </span>\n }\n </label>\n\n {this._data.length > 0 &&\n <Fragment>\n <div\n id={this.id}\n class=\"stzh-chipselect__chips\"\n role=\"listbox\"\n tabindex=\"0\"\n aria-multiselectable={this.multiple ? \"true\" : \"false\"}\n aria-activedescendant={`${this.id}-option-${this.activeFocusOptionIndex}`}\n aria-describedby={`${this.id}-description ${this.a11yDescribedby}`}\n onKeyDown={this.handleKeydown}\n >\n {this._data.map((data, index) => (\n <stzh-chip\n role=\"option\"\n class={{\n \"stzh-chipselect__chip\": true,\n \"is-focused\": this.activeFocusOptionIndex === index\n }}\n label={data.label}\n counter={data.counter}\n icon={data.icon}\n type={data.type}\n inverted={data.inverted}\n variant={data.variant}\n size={data.size || \"small\"}\n disabled={this.disabled || data.disabled}\n active={\n this._value.includes(data.value)\n || (!this.multiple && !data.value && (this._value.length === 0 || this._value[0] === \"\"))\n || (!data.value && this.multiple && (this._value.length === 0 || (this._value.length === 1 && this._value[0] === \"\")))\n }\n aria-selected={\n this._value.includes(data.value)\n || (!this.multiple && !data.value && (this._value.length === 0 || this._value[0] === \"\"))\n || (!data.value && this.multiple && (this._value.length === 0 || (this._value.length === 1 && this._value[0] === \"\")))\n ? \"true\" : \"false\"\n }\n id={`${this.id}-option-${index}`}\n a11yTabindex=\"-1\"\n onClick={() => this.handleChipClick(data, index)}\n ></stzh-chip>\n ))}\n </div>\n\n <StzhInputDescription\n classPrefix=\"stzh-chipselect\"\n id={`${this.id}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongTitle={this.descriptionLongTitle}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\n />\n\n {/* <stzh-dropdown\n class=\"stzh-chipselect__dropdown\"\n multiple={this.multiple}\n disabled={this.disabled}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n required={this.required}\n invalid={this.invalid}\n items={[this.value]}\n label={this.label}\n labelHidden={this.labelHidden}\n options={this._dataDropdown}\n hideOptional={this.hideOptional}\n onStzhChange={this.handleDropdownChange}\n ></stzh-dropdown> */}\n </Fragment>\n }\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-d99aa7e6.js","mappings":";;;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,oyKAAoyK,CAAC;AAC/zK,6BAAe,iBAAiB;;ACwBhC,IAAI,iBAAiB,GAAG,CAAC,CAAC;MAcb,cAAc;;;;;QAMjB,UAAK,GAAyB,EAAE,CAAC;QAiBjC,WAAM,GAAa,EAAE,CAAC;QAuHtB,gBAAW,GAAG;YACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC;;;;;SAMhC,CAAA;QAEO,oBAAe,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AI,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;sBAClH,MAAM,GAAG,OAAO,EAEtB,EAAE,EAAE,GAAG,IAAI,CAAC,EAAE,WAAW,KAAK,EAAE,EAChC,YAAY,EAAC,IAAI,EACjB,OAAO,EAAE,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,GACrC,CACd,CAAC,CACE,EAEN,EAAC,oBAAoB,qDACnB,WAAW,EAAC,iBAAiB,EAC7B,EAAE,EAAE,GAAG,IAAI,CAAC,EAAE,cAAc,EAC5B,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAC/C,mBAAmB,EAAE,mBAAmB,EACxC,mBAAmB,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,mBAAmB,GACnE,CAkBO,CAET,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-chipselect/stzh-chipselect.scss?tag=stzh-chipselect&encapsulation=scoped","src/components/stzh-chipselect/stzh-chipselect.tsx"],"sourcesContent":[":host {\n &[disabled]:not([disabled=\"false\"]) {\n --description-color: #{$formDisabledColor};\n }\n}\n\n.stzh-chipselect {\n @include input-description;\n\n &__label {\n @include font('heavy');\n @include fontSize('micro');\n @include truncate;\n color: $headingColor;\n display: block;\n margin-bottom: space('xsmall');\n\n &:empty {\n display: none;\n }\n }\n\n &__marker {\n @include fontSize('nano');\n margin-left: calc(-0.25em + #{space('xsmall')});\n }\n\n &__chips {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n border-radius: $buttonBorderRadius;\n gap: space('medium');\n\n &:focus-within {\n .is-focused[active] {\n --background-color: #{$colorPrimary90};\n\n @include highContrast() {\n --background-color: Canvas;\n }\n }\n }\n }\n\n &__chip {\n &.is-focused {\n --background-color: #{$colorSecondary40};\n\n @include highContrast() {\n --background-color: Highlight;\n }\n }\n }\n\n // &__dropdown {\n // @include mq($from: medium) {\n // display: none;\n // }\n // }\n\n // &__description-wrapper {\n // @include mq($to: medium) {\n // display: none;\n // }\n // }\n\n &--has-error &__error,\n &--has-description &__description {\n margin-top: space('xsmall');\n }\n\n /* Hidden label */\n\n &--has-label-hidden &__label {\n @include visuallyhidden;\n }\n\n /* Disabled */\n\n &--is-disabled &__chips,\n &--is-disabled &__label {\n cursor: not-allowed;\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Watch,\n Event,\n EventEmitter,\n State,\n Fragment,\n Listen,\n} from \"@stencil/core\";\n\nimport {\n StzhChipselectItem,\n StzhChipselectChangeEvent,\n // StzhDropdownChangeEvent\n} from \"../../index\";\n\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\n// import { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../index\";\n\nlet chipselectCounter = 0;\n\n/**\n * @slot - Slot for `stzh-checkbox` elements\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot description-long-title - Slot for long description title (in popover) / instead of descriptionLongTitle or description property\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-chipselect\",\n styleUrl: \"stzh-chipselect.scss\",\n scoped: true\n})\nexport class StzhChipselect {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** The list of chips */\n @Prop() data: string | StzhChipselectItem[] = [];\n private _data: StzhChipselectItem[] = [];\n // private _dataDropdown: any[] = [];\n\n /** The name of the input element */\n @Prop({ reflect: true }) name: string;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Whether label is hidden. */\n @Prop() labelHidden: boolean = false;\n\n /** Multiple */\n @Prop({ mutable: true }) multiple: boolean = false;\n\n /** Value */\n @Prop({ mutable: true }) value: string | string[] = \"\";\n private _value: string[] = [];\n\n /** Default value (used by reset) */\n @Prop({ mutable: true }) defaultValue: string | string[] = \"\";\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /**\n * **Do not use this property. It will be deprecated with the next major release.**\n * Long description title appearing in a popover (use description-long-title slot as or description property alternative) */\n @Prop() descriptionLongTitle: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Whether all chips are disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Hide `(optional)` label (or use `required` inside form to hide it) */\n @Prop({ reflect: true }) hideOptional: boolean = false;\n\n /** Id for element which describes the input (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n @State() activeFocusOptionIndex: number = 0;\n\n @Element() element: HTMLStzhChipselectElement;\n\n /** Change event */\n @Event() stzhChange: EventEmitter<StzhChipselectChangeEvent>;\n\n @Listen(\"reset\", { target: \"document\" })\n resetListener(event: Event) {\n if ((event.target as HTMLElement).contains(this.element)) {\n requestAnimationFrame(() => {\n this.handleReset();\n });\n }\n }\n\n @Watch(\"value\")\n valueWatcher(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n try {\n const parsedValue = JSON.parse(newValue); // since parsing a number like string (i.e. \"1\") will return a number and parsing a boolean like string (i.e. \"true\") will return a boolean we need to check if the parsed value is indeed an array.\n if (Array.isArray(parsedValue)) {\n this._value = parsedValue;\n }\n else {\n this._value = newValue ? [newValue] : [];\n }\n } catch (ex) {\n this._value = newValue ? [newValue] : [];\n }\n } else {\n this._value = newValue ? newValue : [];\n }\n }\n\n @Watch(\"data\")\n dataWatcher(newValue: StzhChipselectItem[] | string) {\n if (typeof newValue === \"string\") {\n this._data = JSON.parse(newValue);\n } else {\n this._data = newValue;\n }\n\n this._data.map((dataEntry) => {\n if (typeof dataEntry.value !== \"string\"){\n throw new TypeError(`${dataEntry.value} is not a string. The data prop only accepts arrays (or stringified arrays), where the value property is a string. Consult the StzhChipselectItem type definition for more information.`);\n }\n });\n // this._dataDropdown = this._data.map((data) => {\n // return {\n // text: data.counter\n // ? `${data.label} (${data.counter})`\n // : data.label,\n // value: data.value\n // }\n // });\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n }\n\n private id: string;\n private renderPromiseResolve: (value?: unknown) => void;\n\n private waitForNextRender() {\n return new Promise(resolve => this.renderPromiseResolve = resolve);\n }\n\n private handleReset = async () => {\n this.value = this.defaultValue;\n\n // this.stzhChange.emit({\n // component: \"stzh-chipselect\",\n // value: this.value\n // });\n }\n\n private handleChipClick = async (data: StzhChipselectItem, index: number) => {\n if (this.multiple) {\n if (data.value === \"\" && this._value.length > 0 && !(this._value.length === 1 && this._value[0] === \"\")) {\n this.value = [];\n } else if (data.value !== \"\") {\n this.value = this._value.includes(data.value)\n ? this._value.filter(value => value !== data.value)\n : [...this._value, data.value];\n }\n } else {\n this.value = data.value;\n }\n\n this.activeFocusOptionIndex = index;\n\n await this.waitForNextRender();\n\n this.stzhChange.emit({\n component: \"stzh-chipselect\",\n value: this.multiple ? this._value : this._value[0]\n });\n }\n\n // private handleDropdownChange = async (event: CustomEvent<StzhDropdownChangeEvent>) => {\n // this.value = Array.isArray(event.detail.value) ? event.detail.value[0] : event.detail.value;\n\n // this.activeFocusOptionIndex = this._data.findIndex(data => {\n // return data.value === this.value;\n // });\n\n // await this.waitForNextRender();\n\n // this.stzhChange.emit({\n // component: \"stzh-chipselect\",\n // value: this.value\n // })\n // }\n\n private handleKeydown = (event: KeyboardEvent) => {\n let newActiveIndex: number = null;\n const activeOptionIndex = this.activeFocusOptionIndex;\n\n if (event.key === \"ArrowUp\" || event.key === \"ArrowLeft\") {\n event.preventDefault();\n\n if (activeOptionIndex > 0) {\n newActiveIndex = activeOptionIndex - 1;\n }\n } else if (event.key === \"ArrowDown\" || event.key === \"ArrowRight\") {\n event.preventDefault();\n\n if (activeOptionIndex < this._data.length - 1) {\n newActiveIndex = activeOptionIndex + 1;\n }\n } else if (event.key === \" \" || event.key === \"Enter\") {\n event.preventDefault();\n if (this.multiple) {\n if (this._data[activeOptionIndex].value === \"\" && this._value.length > 0 && !(this._value.length === 1 && this._value[0] === \"\")) {\n this.value = [];\n } else if (this._data[activeOptionIndex].value !== \"\") {\n this.value = this._value.includes(this._data[activeOptionIndex].value)\n ? this._value.filter(value => value !== this._data[activeOptionIndex].value)\n : [...this._value, this._data[activeOptionIndex].value];\n }\n } else {\n this.value = this._data[activeOptionIndex].value; //HERE\n }\n this.stzhChange.emit({\n component: \"stzh-chipselect\",\n value: this.value\n });\n }\n\n if (newActiveIndex !== null) {\n this.activeFocusOptionIndex = newActiveIndex;\n }\n }\n\n componentDidRender() {\n if (this.renderPromiseResolve) {\n this.renderPromiseResolve();\n }\n }\n\n async componentWillLoad() {\n this.id = `stzh-chipselect-${chipselectCounter++}`;\n\n this.dataWatcher(this.data);\n this.errorWatcher(this.error);\n this.valueWatcher(this.value);\n\n this.defaultValue = this.defaultValue || this.value;\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"chipselect\");\n }\n }\n\n render() {\n const descriptionUsed = !!this.description;\n const descriptionLongUsed = !!this.descriptionLong;\n const errorUsed = !!this.error;\n\n const classes = {\n \"stzh-chipselect\": true,\n \"stzh-chipselect--has-description\": descriptionUsed,\n \"stzh-chipselect--has-description-long\": descriptionLongUsed,\n \"stzh-chipselect--has-error\": errorUsed,\n \"stzh-chipselect--is-invalid\": this.invalid || errorUsed,\n \"stzh-chipselect--is-disabled\": this.disabled,\n \"stzh-chipselect--is-required\": this.required,\n \"stzh-chipselect--has-label-hidden\": this.labelHidden,\n };\n\n return (\n <Host is-invalid={this.invalid || errorUsed}>\n <div class={classes}>\n {this.multiple\n ?\n <Fragment>\n {this._value.map((value) =>\n <input type=\"hidden\" name={this.name} value={value} />\n )}\n </Fragment>\n :\n <input\n type=\"hidden\"\n name={this.name}\n value={this.value}\n />\n }\n\n <label class=\"stzh-chipselect__label\" htmlFor={this.id}>\n {this.label ? this.label : <slot></slot>}\n {!this.hideOptional &&\n <span class=\"stzh-chipselect__marker\">\n <span class=\"stzh-chipselect__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker\n }\n </span>\n <span class=\"stzh-chipselect__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText\n }\n </span>\n </span>\n }\n </label>\n\n {this._data.length > 0 &&\n <Fragment>\n <div\n id={this.id}\n class=\"stzh-chipselect__chips\"\n role=\"listbox\"\n tabindex=\"0\"\n aria-multiselectable={this.multiple ? \"true\" : \"false\"}\n aria-activedescendant={`${this.id}-option-${this.activeFocusOptionIndex}`}\n aria-describedby={`${this.id}-description ${this.a11yDescribedby}`}\n onKeyDown={this.handleKeydown}\n >\n {this._data.map((data, index) => (\n <stzh-chip\n role=\"option\"\n class={{\n \"stzh-chipselect__chip\": true,\n \"is-focused\": this.activeFocusOptionIndex === index\n }}\n label={data.label}\n counter={data.counter}\n icon={data.icon}\n type={data.type}\n inverted={data.inverted}\n variant={data.variant}\n size={data.size || \"small\"}\n disabled={this.disabled || data.disabled}\n active={\n this._value.includes(data.value)\n || (!this.multiple && !data.value && (this._value.length === 0 || this._value[0] === \"\"))\n || (!data.value && this.multiple && (this._value.length === 0 || (this._value.length === 1 && this._value[0] === \"\")))\n }\n aria-selected={\n this._value.includes(data.value)\n || (!this.multiple && !data.value && (this._value.length === 0 || this._value[0] === \"\"))\n || (!data.value && this.multiple && (this._value.length === 0 || (this._value.length === 1 && this._value[0] === \"\")))\n ? \"true\" : \"false\"\n }\n id={`${this.id}-option-${index}`}\n a11yTabindex=\"-1\"\n onClick={() => this.handleChipClick(data, index)}\n ></stzh-chip>\n ))}\n </div>\n\n <StzhInputDescription\n classPrefix=\"stzh-chipselect\"\n id={`${this.id}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongTitle={this.descriptionLongTitle}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\n />\n\n {/* <stzh-dropdown\n class=\"stzh-chipselect__dropdown\"\n multiple={this.multiple}\n disabled={this.disabled}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n required={this.required}\n invalid={this.invalid}\n items={[this.value]}\n label={this.label}\n labelHidden={this.labelHidden}\n options={this._dataDropdown}\n hideOptional={this.hideOptional}\n onStzhChange={this.handleDropdownChange}\n ></stzh-dropdown> */}\n </Fragment>\n }\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,9 +1,9 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-8f01554b.js';
2
- import { s as setPropsIfNull, h as hasSlot } from './p-d1f98854.js';
2
+ import { s as setPropsIfNull, h as hasSlot } from './p-1c261255.js';
3
3
  import { w as waitForEvent } from './p-70ec7e79.js';
4
4
  import { s as stopAnimations, a as animateTo, b as shimKeyframesAutoValues } from './p-2c0bec3e.js';
5
5
  import { d as defineCustomElement$3 } from './p-486f6cb3.js';
6
- import { d as defineCustomElement$2 } from './p-c522aec2.js';
6
+ import { d as defineCustomElement$2 } from './p-8063d484.js';
7
7
  import { d as defineCustomElement$1 } from './p-0300f421.js';
8
8
 
9
9
  const stzhToastCss = ":host{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block;}:host[hidden],:host[stzh-hidden]{display:none}:host::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}:host *,:host *::before,:host *::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}:host{pointer-events:all;--label-font-family:var(--stzh-toast-label-font-family);--label-font-weight:var(--stzh-toast-label-font-weight);--label-font-style:var(--stzh-toast-label-font-style);--label-color:var(--stzh-toast-label-color);--background-color:var(--stzh-toast-background-color);--close-color:var(--stzh-toast-close-color);--button-color:var(--stzh-toast-button-color);--icon-color:var(--stzh-toast-icon-color)}:host([type=success]){--icon-color:var(--stzh-toast-success-icon-color)}:host([type=warning]){--icon-color:var(--stzh-toast-warning-icon-color)}:host([type=error]){--icon-color:var(--stzh-toast-error-icon-color)}.stzh-toast{position:relative;display:flex;box-shadow:var(--stzh-box-shadow-message);background-color:var(--background-color);border-radius:var(--stzh-button-border-radius);transition:background-color var(--stzh-base-transition-animation-speed);}@media (forced-colors: active), (-ms-high-contrast: active){.stzh-toast{border:0.0625rem solid Highlight}}.stzh-toast__content{flex-grow:1;display:flex;gap:var(--stzh-space-small);padding:var(--stzh-space-medium)}.stzh-toast__icon-wrapper{flex-shrink:0;display:flex}.stzh-toast__icon{color:var(--icon-color)}.stzh-toast__text-wrapper{flex-grow:1}.stzh-toast__label{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);color:var(--label-color);font-family:var(--label-font-family);font-weight:var(--label-font-weight);font-style:var(--label-font-style);transition:color var(--stzh-base-transition-animation-speed);padding-right:var(--stzh-space-xxlarge)}@media screen and (min-width: 600px){.stzh-toast__label{padding-right:var(--stzh-space-xxxlarge)}}.stzh-toast__close-wrapper{flex-shrink:0}.stzh-toast__link{--stzh-button-tertiary-color:var(--button-color);display:flex;justify-content:flex-end}.stzh-toast__close[variant=tertiary]{--color:var(--close-color);position:absolute;top:0;right:0}.stzh-toast--has-link .stzh-toast__label:not(:empty)+.stzh-toast__link{margin-top:var(--stzh-space-xsmall)}";
@@ -230,4 +230,4 @@ function defineCustomElement() {
230
230
 
231
231
  export { StzhToast as S, defineCustomElement as d };
232
232
 
233
- //# sourceMappingURL=p-93c4bf04.js.map
233
+ //# sourceMappingURL=p-e4568321.js.map
@@ -1 +1 @@
1
- {"file":"p-93c4bf04.js","mappings":";;;;;;;;AAAA,MAAM,YAAY,GAAG,k7FAAk7F,CAAC;AACx8F,wBAAe,YAAY;;ACwB3B,MAAM,cAAc,GAAG;IACrB,SAAS,EAAE;QACT,EAAE,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE;QAC/E,EAAE,SAAS,EAAE,iBAAiB,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE;KACrF;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,GAAG;QACb,MAAM,EAAE,UAAU;KACnB;CACF,CAAC;AAEF,MAAM,cAAc,GAAG;IACrB,SAAS,EAAE;QACT,EAAE,SAAS,EAAE,iBAAiB,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE;QACpF,EAAE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B,GAEnC,CACT,EACN,4DAAK,KAAK,EAAC,0BAA0B,IACnC,4DAAK,KAAK,EAAC,mBAAmB,IAC3B,IAAI,CAAC,KAAK,CACP,EACN,4DAAK,KAAK,EAAC,kBAAkB,IAC3B,6DAAM,IAAI,EAAC,MAAM,EAAC,YAAY,EAAE,IAAI,CAAC,oBAAoB,GAAS,CAC9D,CACF,CACF,EAEL,CAAC,IAAI,CAAC,SAAS;YACd,4DAAK,KAAK,EAAC,2BAA2B,IACpC,oEACE,KAAK,EAAC,mBAAmB,EACzB,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAChC,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,EAC9B,OAAO,EAAC,UAAU,EAClB,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,IAAI,EACd,IAAI,EAAC,WAAW,GACH,CACX,CAEJ,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-toast/stzh-toast.scss?tag=stzh-toast&encapsulation=shadow","src/components/stzh-toast/stzh-toast.tsx"],"sourcesContent":["/**\n * @prop --background-color: Background color of toast\n */\n\n:host {\n pointer-events: all;\n\n --label-font-family: #{$toastLabelFontFamily};\n --label-font-weight: #{$toastLabelFontWeight};\n --label-font-style: #{$toastLabelFontStyle};\n\n --label-color: #{$toastLabelColor};\n --background-color: #{$toastBackgroundColor};\n --close-color: #{$toastCloseColor};\n --button-color: #{$toastButtonColor};\n --icon-color: #{$toastIconColor};\n}\n\n:host([type=\"success\"]) {\n --icon-color: #{$toastSuccessIconColor};\n}\n\n:host([type=\"warning\"]) {\n --icon-color: #{$toastWarningIconColor};\n}\n\n:host([type=\"error\"]) {\n --icon-color: #{$toastErrorIconColor};\n}\n\n.stzh-toast {\n position: relative;\n display: flex;\n box-shadow: $boxShadowMessage;\n background-color: var(--background-color);\n border-radius: #{$buttonBorderRadius};\n transition: background-color $baseTransitionAnimationSpeed;\n\n @include highContrast() {\n border: 1px solid Highlight;\n }\n\n &__content {\n flex-grow: 1;\n display: flex;\n gap: space('small');\n padding: space('medium');\n }\n\n &__icon-wrapper {\n flex-shrink: 0;\n display: flex;\n }\n\n &__icon {\n color: var(--icon-color);\n }\n\n &__text-wrapper {\n flex-grow: 1;\n }\n\n &__label {\n @include fontSize('milli');\n color: var(--label-color);\n font-family: var(--label-font-family);\n font-weight: var(--label-font-weight);\n font-style: var(--label-font-style);\n transition: color $baseTransitionAnimationSpeed;\n padding-right: space('xxlarge');\n\n @include mq($from: small) {\n padding-right: space('xxxlarge');\n }\n }\n\n &__close-wrapper {\n flex-shrink: 0;\n }\n\n &__link {\n --stzh-button-tertiary-color: var(--button-color);\n \n display: flex;\n justify-content: flex-end;\n }\n\n &__close[variant=\"tertiary\"] {\n --color: var(--close-color);\n\n position: absolute;\n top: 0;\n right: 0;\n }\n\n /* Has link */\n\n &--has-link &__label:not(:empty) + &__link {\n margin-top: space('xsmall');\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Event,\n EventEmitter,\n Method,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n StzhToastOpenEvent,\n StzhToastOpenedEvent,\n StzhToastCloseEvent,\n StzhToastClosedEvent,\n StzhToastType,\n} from \"../../index\";\n\nimport { StzhToastLocalizedText } from \"./stzh-toast.localization\"\nimport { hasSlot, setPropsIfNull } from \"../../utils/utils\";\nimport { waitForEvent } from \"../../utils/event-utils\";\nimport { animateTo, shimKeyframesAutoValues, stopAnimations } from \"../../utils/animation-utils\";\n\nconst ANIMATION_SHOW = {\n keyframes: [\n { transform: \"translateY(100%)\", opacity: \"0\", height: \"0\", marginBottom: '0' },\n { transform: \"translateY(0px)\", opacity: \"1\", height: \"auto\", marginBottom: 'auto' },\n ],\n options: {\n duration: 300,\n easing: \"ease-out\"\n }\n};\n\nconst ANIMATION_HIDE = {\n keyframes: [\n { transform: \"translateX(0px)\", opacity: \"1\", height: \"auto\", marginBottom: 'auto' },\n { transform: \"translateX(-100%)\", opacity: \"0\", height: \"auto\", marginBottom: 'auto' },\n { transform: \"translateX(-100%)\", opacity: \"0\", height: \"0\", marginBottom: '0' },\n // { transform: \"translateY(0px)\", opacity: \"1\", height: \"auto\", marginBottom: 'auto' },\n // { transform: \"translateY(-100%)\", opacity: \"0\", height: \"0\", marginBottom: '0' },\n ],\n options: {\n duration: 300,\n easing: \"ease-in\"\n }\n};\n\n/**\n * @slot link - Slot for optional stzh-link element\n */\n@Component({\n tag: \"stzh-toast\",\n styleUrl: \"stzh-toast.scss\",\n shadow: true\n})\nexport class StzhToast {\n /** Label */\n @Prop() label: string = \"\";\n\n /** Type */\n @Prop({ reflect: true }) type: StzhToastType = \"info\";\n\n /** Whether to hide close button */\n @Prop({ reflect: true }) hideClose: boolean = false;\n\n /** Open state */\n @Prop({ reflect: true }) open: boolean = true;\n\n /** Whether open animation should be played initially. */\n @Prop() initialOpenAnimation = false;\n\n /** Translation strings. */\n @Prop() localization: StzhToastLocalizedText;\n\n /** Toast open event */\n @Event() stzhOpen: EventEmitter<StzhToastOpenEvent>;\n\n /** Toast opened event (after animation) */\n @Event() stzhOpened: EventEmitter<StzhToastOpenedEvent>;\n\n /** Toast close event */\n @Event() stzhClose: EventEmitter<StzhToastCloseEvent>;\n\n /** Toast closed event (after animation) */\n @Event() stzhClosed: EventEmitter<StzhToastClosedEvent>;\n\n @Element() element: HTMLStzhToastElement;\n\n @Watch(\"open\")\n async openWatcher(newValue: boolean) {\n if (!this.rootElement) {\n return;\n }\n\n if (newValue) {\n if (this.toggledByMethod) {\n this.stzhOpen.emit({\n component: \"stzh-toast\",\n });\n }\n\n await stopAnimations(this.element);\n\n // this.element.style.willChange = \"transform, opacity, height\";\n this.element.hidden = false;\n\n const computedStyle = getComputedStyle(this.element, null);\n\n await animateTo(\n this.element,\n shimKeyframesAutoValues(ANIMATION_SHOW.keyframes,{\n height: this.element.scrollHeight,\n marginTop: parseInt(computedStyle['margin-top']),\n marginBottom: parseInt(computedStyle['margin-bottom']),\n }),\n ANIMATION_SHOW.options\n );\n\n this.element.style.height = \"auto\";\n this.element.style.opacity = \"1\";\n // this.element.style.willChange = \"auto\";\n\n if (this.toggledByMethod) {\n this.stzhOpened.emit({\n component: \"stzh-toast\"\n });\n }\n } else {\n if (this.toggledByMethod) {\n this.stzhClose.emit({\n component: \"stzh-toast\",\n });\n }\n\n await stopAnimations(this.element);\n\n // this.element.style.willChange = \"transform, opacity, height\";\n\n const computedStyle = getComputedStyle(this.element, null);\n\n await animateTo(\n this.element,\n shimKeyframesAutoValues(ANIMATION_HIDE.keyframes, {\n height: this.element.scrollHeight,\n marginTop: parseInt(computedStyle['margin-top']),\n marginBottom: parseInt(computedStyle['margin-bottom']),\n }),\n ANIMATION_HIDE.options\n );\n\n this.element.style.height = \"0px\";\n this.element.style.opacity = \"0\";\n this.element.hidden = true;\n // this.element.style.willChange = \"auto\";\n\n if (this.toggledByMethod) {\n this.stzhClosed.emit({\n component: \"stzh-toast\"\n });\n }\n }\n\n this.toggledByMethod = false;\n }\n\n @Method()\n async show() {\n if (this.open) {\n return;\n }\n\n this.toggledByMethod = true;\n this.open = true;\n return waitForEvent(this.element, \"stzhOpened\");\n }\n\n @Method()\n async hide() {\n if (!this.open) {\n return;\n }\n\n this.toggledByMethod = true;\n this.open = false;\n return waitForEvent(this.element, \"stzhClosed\");\n }\n\n // private observer: MutationObserver;\n private toggledByMethod: boolean;\n private rootElement: HTMLElement;\n\n private handleLinkSlotchange = () => {\n const host = (this.element.getRootNode() as ShadowRoot)?.host || this.element;\n const buttons = host.querySelectorAll(\n 'stzh-button[slot=\"link\"], [slot=\"link\"] stzh-button'\n );\n\n buttons.forEach((link) => {\n setPropsIfNull(link, {\n size: \"small\",\n variant: \"tertiary\"\n } as HTMLStzhButtonElement)\n });\n }\n\n private onCloseButtonClick = () => {\n this.hide();\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"toast\");\n }\n }\n\n componentDidLoad() {\n if (this.initialOpenAnimation && this.open) {\n // hide first so the open animation will be shown\n this.element.hidden = true;\n this.element.style.height = \"0px\";\n this.element.style.opacity = \"0\";\n\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n this.openWatcher(true);\n });\n });\n } else {\n this.element.hidden = !this.open;\n this.element.style.height = this.open ? \"auto\" : \"0px\";\n this.element.style.opacity = this.open ? \"1\" : \"0\";\n }\n }\n\n // connectedCallback() {\n // this.init();\n\n // this.observer = new MutationObserver(this.init);\n // this.observer.observe(this.element, {\n // childList: true,\n // subtree: true\n // });\n // }\n\n // disconnectedCallback() {\n // if (this.observer) {\n // this.observer.disconnect();\n // }\n // }\n\n render() {\n const linkUsed = hasSlot(this.element, \"link\");\n\n const classes = {\n \"stzh-toast\": true,\n \"stzh-toast--has-link\": linkUsed,\n \"stzh-toast--has-close-hidden\": this.hideClose,\n [`stzh-toast--type-${this.type}`]: !!this.type,\n };\n\n return (\n <Host>\n <div\n ref={(el) => (this.rootElement = el as HTMLElement)}\n class={classes}\n >\n <div class=\"stzh-toast__content\">\n <div class=\"stzh-toast__icon-wrapper\">\n <stzh-icon\n class=\"stzh-toast__icon\"\n name={\n this.type === 'info' && \"info-help-filled\"\n || this.type === 'success' && \"checkmark-circle-filled\"\n || this.type === 'warning' && \"important-warning-filled\"\n || this.type === 'error' && \"warning-filled\"\n }\n ></stzh-icon>\n </div>\n <div class=\"stzh-toast__text-wrapper\">\n <div class=\"stzh-toast__label\">\n {this.label}\n </div>\n <div class=\"stzh-toast__link\">\n <slot name=\"link\" onSlotchange={this.handleLinkSlotchange}></slot>\n </div>\n </div>\n </div>\n\n {!this.hideClose &&\n <div class=\"stzh-toast__close-wrapper\">\n <stzh-button\n class=\"stzh-toast__close\"\n onClick={this.onCloseButtonClick}\n label={this.localization.close}\n variant=\"tertiary\"\n size=\"small\"\n iconOnly={true}\n icon=\"close-big\"\n ></stzh-button>\n </div>\n }\n </div>\n </Host>\n );\n }\n}\n"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],"sources":["src/components/stzh-toast/stzh-toast.scss?tag=stzh-toast&encapsulation=shadow","src/components/stzh-toast/stzh-toast.tsx"],"sourcesContent":["/**\n * @prop --background-color: Background color of toast\n */\n\n:host {\n pointer-events: all;\n\n --label-font-family: #{$toastLabelFontFamily};\n --label-font-weight: #{$toastLabelFontWeight};\n --label-font-style: #{$toastLabelFontStyle};\n\n --label-color: #{$toastLabelColor};\n --background-color: #{$toastBackgroundColor};\n --close-color: #{$toastCloseColor};\n --button-color: #{$toastButtonColor};\n --icon-color: #{$toastIconColor};\n}\n\n:host([type=\"success\"]) {\n --icon-color: #{$toastSuccessIconColor};\n}\n\n:host([type=\"warning\"]) {\n --icon-color: #{$toastWarningIconColor};\n}\n\n:host([type=\"error\"]) {\n --icon-color: #{$toastErrorIconColor};\n}\n\n.stzh-toast {\n position: relative;\n display: flex;\n box-shadow: $boxShadowMessage;\n background-color: var(--background-color);\n border-radius: #{$buttonBorderRadius};\n transition: background-color $baseTransitionAnimationSpeed;\n\n @include highContrast() {\n border: 1px solid Highlight;\n }\n\n &__content {\n flex-grow: 1;\n display: flex;\n gap: space('small');\n padding: space('medium');\n }\n\n &__icon-wrapper {\n flex-shrink: 0;\n display: flex;\n }\n\n &__icon {\n color: var(--icon-color);\n }\n\n &__text-wrapper {\n flex-grow: 1;\n }\n\n &__label {\n @include fontSize('milli');\n color: var(--label-color);\n font-family: var(--label-font-family);\n font-weight: var(--label-font-weight);\n font-style: var(--label-font-style);\n transition: color $baseTransitionAnimationSpeed;\n padding-right: space('xxlarge');\n\n @include mq($from: small) {\n padding-right: space('xxxlarge');\n }\n }\n\n &__close-wrapper {\n flex-shrink: 0;\n }\n\n &__link {\n --stzh-button-tertiary-color: var(--button-color);\n \n display: flex;\n justify-content: flex-end;\n }\n\n &__close[variant=\"tertiary\"] {\n --color: var(--close-color);\n\n position: absolute;\n top: 0;\n right: 0;\n }\n\n /* Has link */\n\n &--has-link &__label:not(:empty) + &__link {\n margin-top: space('xsmall');\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Event,\n EventEmitter,\n Method,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n StzhToastOpenEvent,\n StzhToastOpenedEvent,\n StzhToastCloseEvent,\n StzhToastClosedEvent,\n StzhToastType,\n} from \"../../index\";\n\nimport { StzhToastLocalizedText } from \"./stzh-toast.localization\"\nimport { hasSlot, setPropsIfNull } from \"../../utils/utils\";\nimport { waitForEvent } from \"../../utils/event-utils\";\nimport { animateTo, shimKeyframesAutoValues, stopAnimations } from \"../../utils/animation-utils\";\n\nconst ANIMATION_SHOW = {\n keyframes: [\n { transform: \"translateY(100%)\", opacity: \"0\", height: \"0\", marginBottom: '0' },\n { transform: \"translateY(0px)\", opacity: \"1\", height: \"auto\", marginBottom: 'auto' },\n ],\n options: {\n duration: 300,\n easing: \"ease-out\"\n }\n};\n\nconst ANIMATION_HIDE = {\n keyframes: [\n { transform: \"translateX(0px)\", opacity: \"1\", height: \"auto\", marginBottom: 'auto' },\n { transform: \"translateX(-100%)\", opacity: \"0\", height: \"auto\", marginBottom: 'auto' },\n { transform: \"translateX(-100%)\", opacity: \"0\", height: \"0\", marginBottom: '0' },\n // { transform: \"translateY(0px)\", opacity: \"1\", height: \"auto\", marginBottom: 'auto' },\n // { transform: \"translateY(-100%)\", opacity: \"0\", height: \"0\", marginBottom: '0' },\n ],\n options: {\n duration: 300,\n easing: \"ease-in\"\n }\n};\n\n/**\n * @slot link - Slot for optional stzh-link element\n */\n@Component({\n tag: \"stzh-toast\",\n styleUrl: \"stzh-toast.scss\",\n shadow: true\n})\nexport class StzhToast {\n /** Label */\n @Prop() label: string = \"\";\n\n /** Type */\n @Prop({ reflect: true }) type: StzhToastType = \"info\";\n\n /** Whether to hide close button */\n @Prop({ reflect: true }) hideClose: boolean = false;\n\n /** Open state */\n @Prop({ reflect: true }) open: boolean = true;\n\n /** Whether open animation should be played initially. */\n @Prop() initialOpenAnimation = false;\n\n /** Translation strings. */\n @Prop() localization: StzhToastLocalizedText;\n\n /** Toast open event */\n @Event() stzhOpen: EventEmitter<StzhToastOpenEvent>;\n\n /** Toast opened event (after animation) */\n @Event() stzhOpened: EventEmitter<StzhToastOpenedEvent>;\n\n /** Toast close event */\n @Event() stzhClose: EventEmitter<StzhToastCloseEvent>;\n\n /** Toast closed event (after animation) */\n @Event() stzhClosed: EventEmitter<StzhToastClosedEvent>;\n\n @Element() element: HTMLStzhToastElement;\n\n @Watch(\"open\")\n async openWatcher(newValue: boolean) {\n if (!this.rootElement) {\n return;\n }\n\n if (newValue) {\n if (this.toggledByMethod) {\n this.stzhOpen.emit({\n component: \"stzh-toast\",\n });\n }\n\n await stopAnimations(this.element);\n\n // this.element.style.willChange = \"transform, opacity, height\";\n this.element.hidden = false;\n\n const computedStyle = getComputedStyle(this.element, null);\n\n await animateTo(\n this.element,\n shimKeyframesAutoValues(ANIMATION_SHOW.keyframes,{\n height: this.element.scrollHeight,\n marginTop: parseInt(computedStyle['margin-top']),\n marginBottom: parseInt(computedStyle['margin-bottom']),\n }),\n ANIMATION_SHOW.options\n );\n\n this.element.style.height = \"auto\";\n this.element.style.opacity = \"1\";\n // this.element.style.willChange = \"auto\";\n\n if (this.toggledByMethod) {\n this.stzhOpened.emit({\n component: \"stzh-toast\"\n });\n }\n } else {\n if (this.toggledByMethod) {\n this.stzhClose.emit({\n component: \"stzh-toast\",\n });\n }\n\n await stopAnimations(this.element);\n\n // this.element.style.willChange = \"transform, opacity, height\";\n\n const computedStyle = getComputedStyle(this.element, null);\n\n await animateTo(\n this.element,\n shimKeyframesAutoValues(ANIMATION_HIDE.keyframes, {\n height: this.element.scrollHeight,\n marginTop: parseInt(computedStyle['margin-top']),\n marginBottom: parseInt(computedStyle['margin-bottom']),\n }),\n ANIMATION_HIDE.options\n );\n\n this.element.style.height = \"0px\";\n this.element.style.opacity = \"0\";\n this.element.hidden = true;\n // this.element.style.willChange = \"auto\";\n\n if (this.toggledByMethod) {\n this.stzhClosed.emit({\n component: \"stzh-toast\"\n });\n }\n }\n\n this.toggledByMethod = false;\n }\n\n @Method()\n async show() {\n if (this.open) {\n return;\n }\n\n this.toggledByMethod = true;\n this.open = true;\n return waitForEvent(this.element, \"stzhOpened\");\n }\n\n @Method()\n async hide() {\n if (!this.open) {\n return;\n }\n\n this.toggledByMethod = true;\n this.open = false;\n return waitForEvent(this.element, \"stzhClosed\");\n }\n\n // private observer: MutationObserver;\n private toggledByMethod: boolean;\n private rootElement: HTMLElement;\n\n private handleLinkSlotchange = () => {\n const host = (this.element.getRootNode() as ShadowRoot)?.host || this.element;\n const buttons = host.querySelectorAll(\n 'stzh-button[slot=\"link\"], [slot=\"link\"] stzh-button'\n );\n\n buttons.forEach((link) => {\n setPropsIfNull(link, {\n size: \"small\",\n variant: \"tertiary\"\n } as HTMLStzhButtonElement)\n });\n }\n\n private onCloseButtonClick = () => {\n this.hide();\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"toast\");\n }\n }\n\n componentDidLoad() {\n if (this.initialOpenAnimation && this.open) {\n // hide first so the open animation will be shown\n this.element.hidden = true;\n this.element.style.height = \"0px\";\n this.element.style.opacity = \"0\";\n\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n this.openWatcher(true);\n });\n });\n } else {\n this.element.hidden = !this.open;\n this.element.style.height = this.open ? \"auto\" : \"0px\";\n this.element.style.opacity = this.open ? \"1\" : \"0\";\n }\n }\n\n // connectedCallback() {\n // this.init();\n\n // this.observer = new MutationObserver(this.init);\n // this.observer.observe(this.element, {\n // childList: true,\n // subtree: true\n // });\n // }\n\n // disconnectedCallback() {\n // if (this.observer) {\n // this.observer.disconnect();\n // }\n // }\n\n render() {\n const linkUsed = hasSlot(this.element, \"link\");\n\n const classes = {\n \"stzh-toast\": true,\n \"stzh-toast--has-link\": linkUsed,\n \"stzh-toast--has-close-hidden\": this.hideClose,\n [`stzh-toast--type-${this.type}`]: !!this.type,\n };\n\n return (\n <Host>\n <div\n ref={(el) => (this.rootElement = el as HTMLElement)}\n class={classes}\n >\n <div class=\"stzh-toast__content\">\n <div class=\"stzh-toast__icon-wrapper\">\n <stzh-icon\n class=\"stzh-toast__icon\"\n name={\n this.type === 'info' && \"info-help-filled\"\n || this.type === 'success' && \"checkmark-circle-filled\"\n || this.type === 'warning' && \"important-warning-filled\"\n || this.type === 'error' && \"warning-filled\"\n }\n ></stzh-icon>\n </div>\n <div class=\"stzh-toast__text-wrapper\">\n <div class=\"stzh-toast__label\">\n {this.label}\n </div>\n <div class=\"stzh-toast__link\">\n <slot name=\"link\" onSlotchange={this.handleLinkSlotchange}></slot>\n </div>\n </div>\n </div>\n\n {!this.hideClose &&\n <div class=\"stzh-toast__close-wrapper\">\n <stzh-button\n class=\"stzh-toast__close\"\n onClick={this.onCloseButtonClick}\n label={this.localization.close}\n variant=\"tertiary\"\n size=\"small\"\n iconOnly={true}\n icon=\"close-big\"\n ></stzh-button>\n </div>\n }\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-8f01554b.js';
2
- import { d as defineCustomElement$1 } from './p-bcc02189.js';
2
+ import { d as defineCustomElement$1 } from './p-b51c7e54.js';
3
3
 
4
4
  const stzhAccordionCss = ":host{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block;}:host[hidden],:host[stzh-hidden]{display:none}:host::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}:host *,:host *::before,:host *::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}:host{--stzh-section-padding-top:0px;--stzh-section-padding-bottom:0px;--stzh-section-margin-top:0px;--stzh-section-margin-bottom:0px;--margin-left:inherit;--margin-right:inherit}.stzh-accordion{display:grid;gap:var(--stzh-space-xsmall);margin-left:var(--margin-left);margin-right:var(--margin-left);}.stzh-accordion__heading{margin-bottom:var(--stzh-space-xsmall)}@media screen and (min-width: 600px){.stzh-accordion__heading{margin-bottom:var(--stzh-space-small)}}@media screen and (min-width: 900px){.stzh-accordion__heading{margin-bottom:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-accordion__heading{margin-bottom:var(--stzh-space-xlarge)}}.stzh-accordion--is-nested{margin-left:calc(var(--stzh-space-medium) * -1);margin-right:calc(var(--stzh-space-medium) * -1)}@media screen and (min-width: 600px){.stzh-accordion--is-nested{margin-left:calc(var(--stzh-space-large) * -1)}}@media screen and (min-width: 900px){.stzh-accordion--is-nested{margin-left:calc(var(--stzh-space-xlarge) * -1)}}@media screen and (min-width: 1260px){.stzh-accordion--is-nested{margin-left:calc(var(--stzh-space-xxlarge) * -1)}}@media screen and (min-width: 600px){.stzh-accordion--is-nested{margin-right:calc(var(--stzh-space-large) * -1)}}@media screen and (min-width: 900px){.stzh-accordion--is-nested{margin-right:calc(var(--stzh-space-xlarge) * -1)}}@media screen and (min-width: 1260px){.stzh-accordion--is-nested{margin-right:calc(var(--stzh-space-xxlarge) * -1)}}";
5
5
  const StzhAccordionStyle0 = stzhAccordionCss;
@@ -126,4 +126,4 @@ function defineCustomElement() {
126
126
 
127
127
  export { StzhAccordion as S, defineCustomElement as d };
128
128
 
129
- //# sourceMappingURL=p-d2858a06.js.map
129
+ //# sourceMappingURL=p-e973d4dc.js.map
@@ -1 +1 @@
1
- {"file":"p-d2858a06.js","mappings":";;;AAAA,MAAM,gBAAgB,GAAG,u1EAAu1E,CAAC;AACj3E,4BAAe,gBAAgB;;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BAA2B,EAAE,IAAI,CAAC,QAAQ;SAC3C,CAAC;QAEF,QACE,EAAC,IAAI,uDACH,4DAAK,KAAK,EAAE,OAAO,IAChB,IAAI,CAAC,OAAO,KACX,4DAAK,KAAK,EAAC,yBAAyB,IAClC,qEAAc,KAAK,EAAC,GAAG,IAAE,IAAI,CAAC,OAAO,CAAgB,CACjD,CACP,EACD,8DAAa,CACT,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-accordion/stzh-accordion.scss?tag=stzh-accordion&encapsulation=shadow","src/components/stzh-accordion/stzh-accordion.tsx"],"sourcesContent":[":host {\n // disable section paddings and margins\n --stzh-section-padding-top: 0px;\n --stzh-section-padding-bottom: 0px;\n --stzh-section-margin-top: 0px;\n --stzh-section-margin-bottom: 0px;\n\n --margin-left: inherit;\n --margin-right: inherit;\n}\n\n.stzh-accordion {\n display: grid;\n gap: space('xsmall');\n margin-left: var(--margin-left);\n margin-right: var(--margin-left);\n\n &__heading {\n @include spaceCurve('margin-bottom', 'small');\n }\n\n /* is nested within another accordion */\n\n &--is-nested {\n @include spaceCurve('margin-left', 'regular', true);\n @include spaceCurve('margin-right', 'regular', true);\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Listen, Method, Prop, State, Watch } from \"@stencil/core\";\n\nimport { StzhAccordionItemOpenEvent, StzhAccordionVariant, StzhAccordionVariantChangeEvent } from \"../../index\";\n\n/**\n * @slot - Slot for `stzh-accordion-item` elements\n */\n@Component({\n tag: \"stzh-accordion\",\n styleUrl: \"stzh-accordion.scss\",\n shadow: true,\n})\nexport class StzhAccordion {\n /** Variant */\n @Prop({ reflect: true }) variant: StzhAccordionVariant = \"default\";\n\n /** Heading */\n @Prop({ reflect: true }) heading: string = \"\";\n\n /** Whether folds are collapsible */\n @Prop() collapsible: boolean = true;\n\n /** Whether multiple folds can be opened at once */\n @Prop() multiselectable: boolean = true;\n\n @Element() element: HTMLStzhAccordionElement;\n\n /** Variant change event */\n @Event() stzhVariantChange: EventEmitter<StzhAccordionVariantChangeEvent>;\n\n @State() isNested: boolean;\n\n @Watch(\"variant\")\n variantWatcher(newValue: StzhAccordionVariant) {\n this.stzhVariantChange.emit({\n component: \"stzh-accordion\",\n value: newValue,\n });\n }\n\n @Listen(\"stzhOpen\")\n openListener(event: CustomEvent<StzhAccordionItemOpenEvent>) {\n const accordionItemOpened = event.target as HTMLStzhAccordionItemElement;\n const accordionOpened = accordionItemOpened.closest(\"stzh-accordion\");\n\n if (\n this.multiselectable ||\n (event.detail && event.detail.component !== \"stzh-accordion-item\") ||\n accordionOpened !== this.element\n ) {\n return;\n }\n\n const items: HTMLStzhAccordionItemElement[] = Array.from(accordionOpened.querySelectorAll(\"stzh-accordion-item\"));\n items.forEach(item => {\n if (item !== accordionItemOpened) {\n item.hide();\n }\n });\n }\n\n /** Set focus to accordion item */\n @Method()\n async setItemFocus(accordionItem: HTMLStzhAccordionItemElement, action: string) {\n const accordion = accordionItem.closest(\"stzh-accordion\");\n\n if (accordion !== this.element) {\n return;\n }\n\n const items = (\n Array.from(accordion.querySelectorAll(\":scope > stzh-accordion-item\")) as HTMLStzhAccordionItemElement[]\n ).filter(item => !item.disabled);\n\n const currentIndex = items.indexOf(accordionItem);\n\n if ((action === \"prev\" || action === \"next\") && currentIndex === null) {\n action = action === \"prev\" ? \"last\" : \"first\";\n }\n\n if (action === \"prev\" && currentIndex === 0) {\n action = \"last\";\n }\n\n if (action === \"next\" && currentIndex === items.length - 1) {\n action = \"first\";\n }\n\n if (action === \"prev\") {\n items[currentIndex - 1].focus();\n } else if (action === \"next\") {\n items[currentIndex + 1].focus();\n } else if (action === \"last\") {\n items[items.length - 1].focus();\n } else if (action === \"first\") {\n items[0].focus();\n } else {\n accordionItem.focus();\n }\n }\n\n private checkIfNested() {\n let parentElement = this.element.parentElement;\n\n while (parentElement) {\n if (parentElement.tagName.toLowerCase() === \"stzh-accordion\") {\n this.isNested = true;\n break;\n }\n parentElement = parentElement.parentElement;\n }\n }\n\n componentDidLoad() {\n this.checkIfNested();\n }\n\n render() {\n const classes = {\n \"stzh-accordion\": true,\n \"stzh-accordion--is-nested\": this.isNested,\n };\n\n return (\n <Host>\n <div class={classes}>\n {this.heading && (\n <div class=\"stzh-accordion__heading\">\n <stzh-heading level=\"2\">{this.heading}</stzh-heading>\n </div>\n )}\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-e973d4dc.js","mappings":";;;AAAA,MAAM,gBAAgB,GAAG,u1EAAu1E,CAAC;AACj3E,4BAAe,gBAAgB;;MCWlB,aAAa;;;;;;uBAEiC,SAAS;uBAGvB,EAAE;2BAGd,IAAI;+BAGA,IAAI;;;IAUvC,cAAc,CAAC,QAA8B;QAC3C,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC;YAC1B,SAAS,EAAE,gBAAgB;YAC3B,KAAK,EAAE,QAAQ;SAChB,CAAC,CAAC;KACJ;IAGD,YAAY,CAAC,KAA8C;QACzD,MAAM,mBAAmB,GAAG,KAAK,CAAC,MAAsC,CAAC;QACzE,MAAM,eAAe,GAAG,mBAAmB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;QAEtE,IACE,IAAI,CAAC,eAAe;aACnB,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,SAAS,KAAK,qBAAqB,CAAC;YAClE,eAAe,KAAK,IAAI,CAAC,OAAO,EAChC;YACA,OAAO;SACR;QAED,MAAM,KAAK,GAAmC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC,CAAC;QAClH,KAAK,CAAC,OAAO,CAAC,IAAI;YAChB,IAAI,IAAI,KAAK,mBAAmB,EAAE;gBAChC,IAAI,CAAC,IAAI,EAAE,CAAC;aACb;SACF,CAAC,CAAC;KACJ;;IAID,MAAM,YAAY,CAAC,aAA2C,EAAE,MAAc;QAC5E,MAAM,SAAS,GAAG,a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Aa,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;QAE/C,OAAO,aAAa,EAAE;YACpB,IAAI,aAAa,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,gBAAgB,EAAE;gBAC5D,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;gBACrB,MAAM;aACP;YACD,aAAa,GAAG,aAAa,CAAC,aAAa,CAAC;SAC7C;KACF;IAED,gBAAgB;QACd,IAAI,CAAC,aAAa,EAAE,CAAC;KACtB;IAED,MAAM;QACJ,MAAM,OAAO,GAAG;YACd,gBAAgB,EAAE,IAAI;YACtB,2BAA2B,EAAE,IAAI,CAAC,QAAQ;SAC3C,CAAC;QAEF,QACE,EAAC,IAAI,uDACH,4DAAK,KAAK,EAAE,OAAO,IAChB,IAAI,CAAC,OAAO,KACX,4DAAK,KAAK,EAAC,yBAAyB,IAClC,qEAAc,KAAK,EAAC,GAAG,IAAE,IAAI,CAAC,OAAO,CAAgB,CACjD,CACP,EACD,8DAAa,CACT,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-accordion/stzh-accordion.scss?tag=stzh-accordion&encapsulation=shadow","src/components/stzh-accordion/stzh-accordion.tsx"],"sourcesContent":[":host {\n // disable section paddings and margins\n --stzh-section-padding-top: 0px;\n --stzh-section-padding-bottom: 0px;\n --stzh-section-margin-top: 0px;\n --stzh-section-margin-bottom: 0px;\n\n --margin-left: inherit;\n --margin-right: inherit;\n}\n\n.stzh-accordion {\n display: grid;\n gap: space('xsmall');\n margin-left: var(--margin-left);\n margin-right: var(--margin-left);\n\n &__heading {\n @include spaceCurve('margin-bottom', 'small');\n }\n\n /* is nested within another accordion */\n\n &--is-nested {\n @include spaceCurve('margin-left', 'regular', true);\n @include spaceCurve('margin-right', 'regular', true);\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Listen, Method, Prop, State, Watch } from \"@stencil/core\";\n\nimport { StzhAccordionItemOpenEvent, StzhAccordionVariant, StzhAccordionVariantChangeEvent } from \"../../index\";\n\n/**\n * @slot - Slot for `stzh-accordion-item` elements\n */\n@Component({\n tag: \"stzh-accordion\",\n styleUrl: \"stzh-accordion.scss\",\n shadow: true,\n})\nexport class StzhAccordion {\n /** Variant */\n @Prop({ reflect: true }) variant: StzhAccordionVariant = \"default\";\n\n /** Heading */\n @Prop({ reflect: true }) heading: string = \"\";\n\n /** Whether folds are collapsible */\n @Prop() collapsible: boolean = true;\n\n /** Whether multiple folds can be opened at once */\n @Prop() multiselectable: boolean = true;\n\n @Element() element: HTMLStzhAccordionElement;\n\n /** Variant change event */\n @Event() stzhVariantChange: EventEmitter<StzhAccordionVariantChangeEvent>;\n\n @State() isNested: boolean;\n\n @Watch(\"variant\")\n variantWatcher(newValue: StzhAccordionVariant) {\n this.stzhVariantChange.emit({\n component: \"stzh-accordion\",\n value: newValue,\n });\n }\n\n @Listen(\"stzhOpen\")\n openListener(event: CustomEvent<StzhAccordionItemOpenEvent>) {\n const accordionItemOpened = event.target as HTMLStzhAccordionItemElement;\n const accordionOpened = accordionItemOpened.closest(\"stzh-accordion\");\n\n if (\n this.multiselectable ||\n (event.detail && event.detail.component !== \"stzh-accordion-item\") ||\n accordionOpened !== this.element\n ) {\n return;\n }\n\n const items: HTMLStzhAccordionItemElement[] = Array.from(accordionOpened.querySelectorAll(\"stzh-accordion-item\"));\n items.forEach(item => {\n if (item !== accordionItemOpened) {\n item.hide();\n }\n });\n }\n\n /** Set focus to accordion item */\n @Method()\n async setItemFocus(accordionItem: HTMLStzhAccordionItemElement, action: string) {\n const accordion = accordionItem.closest(\"stzh-accordion\");\n\n if (accordion !== this.element) {\n return;\n }\n\n const items = (\n Array.from(accordion.querySelectorAll(\":scope > stzh-accordion-item\")) as HTMLStzhAccordionItemElement[]\n ).filter(item => !item.disabled);\n\n const currentIndex = items.indexOf(accordionItem);\n\n if ((action === \"prev\" || action === \"next\") && currentIndex === null) {\n action = action === \"prev\" ? \"last\" : \"first\";\n }\n\n if (action === \"prev\" && currentIndex === 0) {\n action = \"last\";\n }\n\n if (action === \"next\" && currentIndex === items.length - 1) {\n action = \"first\";\n }\n\n if (action === \"prev\") {\n items[currentIndex - 1].focus();\n } else if (action === \"next\") {\n items[currentIndex + 1].focus();\n } else if (action === \"last\") {\n items[items.length - 1].focus();\n } else if (action === \"first\") {\n items[0].focus();\n } else {\n accordionItem.focus();\n }\n }\n\n private checkIfNested() {\n let parentElement = this.element.parentElement;\n\n while (parentElement) {\n if (parentElement.tagName.toLowerCase() === \"stzh-accordion\") {\n this.isNested = true;\n break;\n }\n parentElement = parentElement.parentElement;\n }\n }\n\n componentDidLoad() {\n this.checkIfNested();\n }\n\n render() {\n const classes = {\n \"stzh-accordion\": true,\n \"stzh-accordion--is-nested\": this.isNested,\n };\n\n return (\n <Host>\n <div class={classes}>\n {this.heading && (\n <div class=\"stzh-accordion__heading\">\n <stzh-heading level=\"2\">{this.heading}</stzh-heading>\n </div>\n )}\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  import { p as proxyCustomElement, H, h, d as Host } from './p-8f01554b.js';
2
- import { h as hasSlot } from './p-d1f98854.js';
2
+ import { h as hasSlot } from './p-1c261255.js';
3
3
 
4
4
  const stzhFigureCss = ".sc-stzh-figure-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-figure-h,[stzh-hidden].sc-stzh-figure-h{display:none}.sc-stzh-figure-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-figure-h *.sc-stzh-figure,.sc-stzh-figure-h *.sc-stzh-figure::before,.sc-stzh-figure-h *.sc-stzh-figure::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-figure-h .has-focus.sc-stzh-figure{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-figure-h .stzh-fylingfocus-focused.sc-stzh-figure{outline-style:none !important}.sc-stzh-figure-h .stzh-fylingfocus-focused.sc-stzh-figure::-moz-focus-inner{border:0 !important}.sc-stzh-figure-h{--caption-opacity:1}.sc-stzh-figure-h.sc-stzh-figure-s>*,.sc-stzh-figure-h .sc-stzh-figure-s>*{max-width:100%}.sc-stzh-figure-h[fullwidth]:not([fullwidth=false]).sc-stzh-figure-s>:not(map),.sc-stzh-figure-h[fullwidth]:not([fullwidth=false]) .sc-stzh-figure-s>:not(map){width:100%}.stzh-figure.sc-stzh-figure{display:flex;flex-direction:column;margin:0}.stzh-figure__element.sc-stzh-figure{display:flex}@media print{.stzh-figure__element.sc-stzh-figure{page-break-inside:avoid;break-inside:avoid}}.stzh-figure__caption-wrapper.sc-stzh-figure{font-size:var(--stzh-font-curve-caption-default-font-size, var(--stzh-font-nano-font-size));line-height:var(--stzh-font-curve-caption-default-text-line-height, var(--stzh-font-nano-text-line-height));display:flex;flex-direction:column;opacity:var(--caption-opacity);transition:opacity var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 900px){.stzh-figure__caption-wrapper.sc-stzh-figure{font-size:var(--stzh-font-curve-caption-medium-font-size, var(--stzh-font-micro-font-size));line-height:var(--stzh-font-curve-caption-medium-text-line-height, var(--stzh-font-micro-text-line-height))}}.stzh-figure__heading-wrapper.sc-stzh-figure{display:flow-root}.stzh-figure__counter.sc-stzh-figure{float:left;color:var(--stzh-color-secondary60)}.stzh-figure__counter.sc-stzh-figure:not(:empty){margin-right:var(--stzh-space-xsmall)}.stzh-figure__counter.sc-stzh-figure,.stzh-figure__heading.sc-stzh-figure{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);display:block}.stzh-figure__copyright.sc-stzh-figure{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);font-size:var(--stzh-font-femto-font-size);line-height:var(--stzh-font-femto-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);color:var(--stzh-color-grey80)}.stzh-figure__copyright.sc-stzh-figure:not(:empty){margin-top:var(--stzh-space-xxsmall)}.stzh-figure--has-caption.sc-stzh-figure .stzh-figure__caption-wrapper.sc-stzh-figure{margin-top:var(--stzh-space-small)}";
5
5
  const StzhFigureStyle0 = stzhFigureCss;
@@ -53,4 +53,4 @@ function defineCustomElement() {
53
53
 
54
54
  export { StzhFigure as S, defineCustomElement as d };
55
55
 
56
- //# sourceMappingURL=p-cd56033a.js.map
56
+ //# sourceMappingURL=p-ea55bd3b.js.map
@@ -1 +1 @@
1
- {"file":"p-cd56033a.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,ouGAAouG,CAAC;AAC3vG,yBAAe,aAAa;;MCqBf,UAAU;;;;uBAEK,EAAE;yBAGA,EAAE;uBAGJ,EAAE;uBAGF,EAAE;yBAGkB,IAAI;;IAIlD,MAAM;QACJ,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACzD,MAAM,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QAC7D,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACzD,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAEzD,MAAM,OAAO,GAAG;YACd,aAAa,EAAE,IAAI;YACnB,0BAA0B,EACxB,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,eAAe;mBAC9B,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,iBAAiB;mBACrC,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,eAAe;mBACjC,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,eAAe;SACvC,CAAC;QAEF,QACE,EAAC,IAAI,uDACH,+DAAQ,KAAK,EAAE,OAAO,IACpB,4DAAK,KAAK,EAAC,sBAAsB,IAC/B,8DAAa,CACT,EACN,mEAAY,KAAK,EAAC,8BAA8B,IAC9C,4DAAK,KAAK,EAAC,8BAA8B,IACvC,4DAAK,KAAK,EAAC,sBAAsB,IAC9B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,GAAG,YAAM,IAAI,EAAC,SAAS,GAAQ,CACvD,EACN,4DAAK,KAAK,EAAC,sBAAsB,IAC9B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,GAAG,YAAM,IAAI,EAAC,SAAS,GAAQ,CACvD,CACF,EACN,4DAAK,KAAK,EAAC,sBAAsB,IAC/B,4DAAK,KAAK,EAAC,2BAA2B,IACnC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,GAAG,YAAM,IAAI,EAAC,SAAS,GAAQ,CACvD,EACN,4DAAK,KAAK,EAAC,wBAAwB,IAChC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,YAAM,IAAI,EAAC,WAAW,GAAQ,CAC7D,CACF,CACK,CACN,CACJ,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-figure/stzh-figure.scss?tag=stzh-figure&encapsulation=scoped","src/components/stzh-figure/stzh-figure.tsx"],"sourcesContent":[":host {\n --caption-opacity: 1;\n\n ::slotted(*) {\n max-width: 100%;\n }\n}\n\n:host([fullwidth]:not([fullwidth=\"false\"])) ::slotted(:not(map)) {\n width: 100%;\n}\n\n.stzh-figure {\n display: flex;\n flex-direction: column;\n margin: 0;\n\n &__element {\n display: flex;\n\n @media print {\n page-break-inside: avoid;\n break-inside: avoid;\n }\n }\n\n &__caption-wrapper {\n @include fontCurve('caption');\n display: flex;\n flex-direction: column;\n opacity: var(--caption-opacity);\n transition: opacity $baseTransitionAnimationSpeed;\n }\n\n &__heading-wrapper {\n display: flow-root;\n }\n\n &__counter {\n float: left;\n color: $colorSecondary60;\n\n &:not(:empty) {\n margin-right: space('xsmall');\n }\n }\n\n &__counter,\n &__heading {\n @include font('heavy');\n display: block;\n }\n\n &__copyright {\n @include font;\n @include fontSize('femto');\n color: $colorGrey80;\n\n &:not(:empty) {\n margin-top: space('xxsmall');\n }\n }\n\n /* Has caption content */\n\n &--has-caption &__caption-wrapper {\n margin-top: space('small');\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n} from \"@stencil/core\";\n\nimport { hasSlot } from \"../../utils/utils\";\n\n/**\n * @slot - Slot for e.g. image or video\n * @slot caption - Slot for a caption as alternative for attribute\n * @slot copyright - Slot for a copyright as alternative for attribute\n * @slot counter - Slot for a counter as alternative for attribute\n * @slot heading - Slot for a heading as alternative for attribute\n */\n@Component({\n tag: \"stzh-figure\",\n styleUrl: \"stzh-figure.scss\",\n scoped: true\n})\nexport class StzhFigure {\n /** Caption */\n @Prop() caption: string = \"\";\n\n /** Copyright */\n @Prop() copyright: string = \"\";\n\n /** Counter */\n @Prop() counter: string = \"\";\n\n /** Heading */\n @Prop() heading: string = \"\";\n\n /** Whether to stretch slotted content to fullwidth */\n @Prop({ reflect: true }) fullwidth: boolean = true;\n\n @Element() element: HTMLStzhFigureElement;\n\n render() {\n const captionSlotUsed = hasSlot(this.element, 'caption');\n const copyrightSlotUsed = hasSlot(this.element, 'copyright');\n const counterSlotUsed = hasSlot(this.element, 'counter');\n const headingSlotUsed = hasSlot(this.element, 'heading');\n\n const classes = {\n \"stzh-figure\": true,\n \"stzh-figure--has-caption\":\n !!this.caption || captionSlotUsed\n || !!this.copyright || copyrightSlotUsed\n || !!this.counter || counterSlotUsed\n || !!this.heading || headingSlotUsed\n };\n\n return (\n <Host>\n <figure class={classes}>\n <div class=\"stzh-figure__element\">\n <slot></slot>\n </div>\n <figcaption class=\"stzh-figure__caption-wrapper\">\n <div class=\"stzh-figure__heading-wrapper\">\n <div class=\"stzh-figure__counter\">\n {this.counter ? this.counter : <slot name=\"counter\"></slot>}\n </div>\n <div class=\"stzh-figure__heading\">\n {this.heading ? this.heading : <slot name=\"heading\"></slot>}\n </div>\n </div>\n <div class=\"stzh-figure__caption\">\n <div class=\"stzh-figure__caption-text\">\n {this.caption ? this.caption : <slot name=\"caption\"></slot>}\n </div>\n <div class=\"stzh-figure__copyright\">\n {this.copyright ? this.copyright : <slot name=\"copyright\"></slot>}\n </div>\n </div>\n </figcaption>\n </figure>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-ea55bd3b.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,ouGAAouG,CAAC;AAC3vG,yBAAe,aAAa;;MCqBf,UAAU;;;;uBAEK,EAAE;yBAGA,EAAE;uBAGJ,EAAE;uBAGF,EAAE;yBAGkB,IAAI;;IAIlD,MAAM;QACJ,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACzD,MAAM,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QAC7D,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACzD,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAEzD,MAAM,OAAO,GAAG;YACd,aAAa,EAAE,IAAI;YACnB,0BAA0B,EACxB,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,eAAe;mBAC9B,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,iBAAiB;mBACrC,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,eAAe;mBACjC,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,eAAe;SACvC,CAAC;QAEF,QACE,EAAC,IAAI,uDACH,+DAAQ,KAAK,EAAE,OAAO,IACpB,4DAAK,KAAK,EAAC,sBAAsB,IAC/B,8DAAa,CACT,EACN,mEAAY,KAAK,EAAC,8BAA8B,IAC9C,4DAAK,KAAK,EAAC,8BAA8B,IACvC,4DAAK,KAAK,EAAC,sBAAsB,IAC9B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,GAAG,YAAM,IAAI,EAAC,SAAS,GAAQ,CACvD,EACN,4DAAK,KAAK,EAAC,sBAAsB,IAC9B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,GAAG,YAAM,IAAI,EAAC,SAAS,GAAQ,CACvD,CACF,EACN,4DAAK,KAAK,EAAC,sBAAsB,IAC/B,4DAAK,KAAK,EAAC,2BAA2B,IACnC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,GAAG,YAAM,IAAI,EAAC,SAAS,GAAQ,CACvD,EACN,4DAAK,KAAK,EAAC,wBAAwB,IAChC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,YAAM,IAAI,EAAC,WAAW,GAAQ,CAC7D,CACF,CACK,CACN,CACJ,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-figure/stzh-figure.scss?tag=stzh-figure&encapsulation=scoped","src/components/stzh-figure/stzh-figure.tsx"],"sourcesContent":[":host {\n --caption-opacity: 1;\n\n ::slotted(*) {\n max-width: 100%;\n }\n}\n\n:host([fullwidth]:not([fullwidth=\"false\"])) ::slotted(:not(map)) {\n width: 100%;\n}\n\n.stzh-figure {\n display: flex;\n flex-direction: column;\n margin: 0;\n\n &__element {\n display: flex;\n\n @media print {\n page-break-inside: avoid;\n break-inside: avoid;\n }\n }\n\n &__caption-wrapper {\n @include fontCurve('caption');\n display: flex;\n flex-direction: column;\n opacity: var(--caption-opacity);\n transition: opacity $baseTransitionAnimationSpeed;\n }\n\n &__heading-wrapper {\n display: flow-root;\n }\n\n &__counter {\n float: left;\n color: $colorSecondary60;\n\n &:not(:empty) {\n margin-right: space('xsmall');\n }\n }\n\n &__counter,\n &__heading {\n @include font('heavy');\n display: block;\n }\n\n &__copyright {\n @include font;\n @include fontSize('femto');\n color: $colorGrey80;\n\n &:not(:empty) {\n margin-top: space('xxsmall');\n }\n }\n\n /* Has caption content */\n\n &--has-caption &__caption-wrapper {\n margin-top: space('small');\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n} from \"@stencil/core\";\n\nimport { hasSlot } from \"../../utils/utils\";\n\n/**\n * @slot - Slot for e.g. image or video\n * @slot caption - Slot for a caption as alternative for attribute\n * @slot copyright - Slot for a copyright as alternative for attribute\n * @slot counter - Slot for a counter as alternative for attribute\n * @slot heading - Slot for a heading as alternative for attribute\n */\n@Component({\n tag: \"stzh-figure\",\n styleUrl: \"stzh-figure.scss\",\n scoped: true\n})\nexport class StzhFigure {\n /** Caption */\n @Prop() caption: string = \"\";\n\n /** Copyright */\n @Prop() copyright: string = \"\";\n\n /** Counter */\n @Prop() counter: string = \"\";\n\n /** Heading */\n @Prop() heading: string = \"\";\n\n /** Whether to stretch slotted content to fullwidth */\n @Prop({ reflect: true }) fullwidth: boolean = true;\n\n @Element() element: HTMLStzhFigureElement;\n\n render() {\n const captionSlotUsed = hasSlot(this.element, 'caption');\n const copyrightSlotUsed = hasSlot(this.element, 'copyright');\n const counterSlotUsed = hasSlot(this.element, 'counter');\n const headingSlotUsed = hasSlot(this.element, 'heading');\n\n const classes = {\n \"stzh-figure\": true,\n \"stzh-figure--has-caption\":\n !!this.caption || captionSlotUsed\n || !!this.copyright || copyrightSlotUsed\n || !!this.counter || counterSlotUsed\n || !!this.heading || headingSlotUsed\n };\n\n return (\n <Host>\n <figure class={classes}>\n <div class=\"stzh-figure__element\">\n <slot></slot>\n </div>\n <figcaption class=\"stzh-figure__caption-wrapper\">\n <div class=\"stzh-figure__heading-wrapper\">\n <div class=\"stzh-figure__counter\">\n {this.counter ? this.counter : <slot name=\"counter\"></slot>}\n </div>\n <div class=\"stzh-figure__heading\">\n {this.heading ? this.heading : <slot name=\"heading\"></slot>}\n </div>\n </div>\n <div class=\"stzh-figure__caption\">\n <div class=\"stzh-figure__caption-text\">\n {this.caption ? this.caption : <slot name=\"caption\"></slot>}\n </div>\n <div class=\"stzh-figure__copyright\">\n {this.copyright ? this.copyright : <slot name=\"copyright\"></slot>}\n </div>\n </div>\n </figcaption>\n </figure>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-8f01554b.js';
2
- import { b as isVisible, o as offset } from './p-d1f98854.js';
2
+ import { b as isVisible, o as offset } from './p-1c261255.js';
3
3
  import { d as debounce_1, i as isObject_1 } from './p-6997324b.js';
4
4
 
5
5
  var debounce = debounce_1,
@@ -417,4 +417,4 @@ function defineCustomElement() {
417
417
 
418
418
  export { StzhSticky as S, defineCustomElement as d, throttle_1 as t };
419
419
 
420
- //# sourceMappingURL=p-e9c5a9aa.js.map
420
+ //# sourceMappingURL=p-ee40eddf.js.map