@oiz/stzh-components 4.0.0-beta3 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (459) hide show
  1. package/dist/cjs/{app-globals-17244c89.js → app-globals-89889638.js} +2 -2
  2. package/dist/cjs/{app-globals-17244c89.js.map → app-globals-89889638.js.map} +1 -1
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/stzh-audio.cjs.entry.js +1 -1
  5. package/dist/cjs/stzh-audio.cjs.entry.js.map +1 -1
  6. package/dist/cjs/stzh-breadcrumb_2.cjs.entry.js +1 -1
  7. package/dist/cjs/stzh-card-searchresult.cjs.entry.js +1 -1
  8. package/dist/cjs/stzh-card-searchresult.cjs.entry.js.map +1 -1
  9. package/dist/cjs/stzh-card.cjs.entry.js +11 -8
  10. package/dist/cjs/stzh-card.cjs.entry.js.map +1 -1
  11. package/dist/cjs/stzh-cardlist_3.cjs.entry.js +1 -1
  12. package/dist/cjs/stzh-components.cjs.js +2 -2
  13. package/dist/cjs/stzh-datalist_2.cjs.entry.js +3 -3
  14. package/dist/cjs/stzh-datalist_2.cjs.entry.js.map +1 -1
  15. package/dist/cjs/stzh-ghettobox_3.cjs.entry.js +3 -3
  16. package/dist/cjs/stzh-popover.cjs.entry.js +1 -1
  17. package/dist/cjs/stzh-popover.cjs.entry.js.map +1 -1
  18. package/dist/cjs/stzh-print_2.cjs.entry.js +1 -1
  19. package/dist/cjs/stzh-ratio.cjs.entry.js +1 -1
  20. package/dist/cjs/stzh-ratio.cjs.entry.js.map +1 -1
  21. package/dist/cjs/stzh-readspeaker.cjs.entry.js +3 -3
  22. package/dist/cjs/stzh-readspeaker.cjs.entry.js.map +1 -1
  23. package/dist/cjs/stzh-row.cjs.entry.js +2 -2
  24. package/dist/cjs/stzh-saptcha.cjs.entry.js +2 -2
  25. package/dist/cjs/stzh-scrollup.cjs.entry.js +1 -1
  26. package/dist/cjs/stzh-search.cjs.entry.js +2 -2
  27. package/dist/cjs/stzh-section.cjs.entry.js +2 -2
  28. package/dist/cjs/stzh-sitemap.cjs.entry.js +1 -1
  29. package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js +2 -2
  30. package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js.map +1 -1
  31. package/dist/cjs/stzh-skin-storybook-preview.cjs.entry.js +1 -1
  32. package/dist/cjs/stzh-skiplink.cjs.entry.js +1 -1
  33. package/dist/cjs/stzh-socialmediastream-item.cjs.entry.js +1 -1
  34. package/dist/cjs/stzh-socialmediastream.cjs.entry.js +1 -1
  35. package/dist/cjs/stzh-space.cjs.entry.js +2 -2
  36. package/dist/cjs/stzh-status.cjs.entry.js +4 -4
  37. package/dist/cjs/stzh-stepper-item.cjs.entry.js +4 -4
  38. package/dist/cjs/stzh-stepper.cjs.entry.js +2 -2
  39. package/dist/cjs/stzh-sticky-actions.cjs.entry.js +1 -1
  40. package/dist/cjs/stzh-sticky.cjs.entry.js +1 -1
  41. package/dist/cjs/stzh-table.cjs.entry.js +1 -1
  42. package/dist/cjs/stzh-text.cjs.entry.js +2 -2
  43. package/dist/cjs/stzh-textandimage.cjs.entry.js +1 -1
  44. package/dist/cjs/stzh-timeline-item.cjs.entry.js +3 -3
  45. package/dist/cjs/stzh-timeline.cjs.entry.js +1 -1
  46. package/dist/cjs/stzh-timepicker.cjs.entry.js +1 -1
  47. package/dist/cjs/stzh-toast_2.cjs.entry.js +4 -4
  48. package/dist/cjs/stzh-toggle.cjs.entry.js +4 -4
  49. package/dist/cjs/stzh-tooltip.cjs.entry.js +2 -2
  50. package/dist/cjs/stzh-tooltip.cjs.entry.js.map +1 -1
  51. package/dist/cjs/stzh-twocolumns.cjs.entry.js +1 -1
  52. package/dist/cjs/stzh-upload.cjs.entry.js +2 -2
  53. package/dist/cjs/stzh-vbz-carousel.cjs.entry.js +1 -1
  54. package/dist/cjs/stzh-vbz-connection-finder.cjs.entry.js +1 -1
  55. package/dist/cjs/stzh-vbz-intro.cjs.entry.js +1 -1
  56. package/dist/cjs/stzh-vbz-linechip.cjs.entry.js +2 -2
  57. package/dist/cjs/stzh-vbz-majorticker.cjs.entry.js +2 -2
  58. package/dist/cjs/stzh-vbz-ticker.cjs.entry.js +2 -2
  59. package/dist/cjs/stzh-visuallyhidden.cjs.entry.js +2 -2
  60. package/dist/cjs/stzh-vspace.cjs.entry.js +2 -2
  61. package/dist/cjs/stzh-youtube.cjs.entry.js +1 -1
  62. package/dist/collection/components/stzh-audio/stzh-audio.css +2 -2
  63. package/dist/collection/components/stzh-card/stzh-card.css +10 -1
  64. package/dist/collection/components/stzh-card/stzh-card.js +28 -7
  65. package/dist/collection/components/stzh-card/stzh-card.js.map +1 -1
  66. package/dist/collection/components/stzh-card-searchresult/stzh-card-searchresult.js +1 -1
  67. package/dist/collection/components/stzh-card-searchresult/stzh-card-searchresult.js.map +1 -1
  68. package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.css +12 -10
  69. package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.js +5 -5
  70. package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.js.map +1 -1
  71. package/dist/collection/components/stzh-popover/stzh-popover.css +2 -2
  72. package/dist/collection/components/stzh-ratio/stzh-ratio.js +1 -1
  73. package/dist/collection/components/stzh-ratio/stzh-ratio.js.map +1 -1
  74. package/dist/collection/components/stzh-readspeaker/stzh-readspeaker.css +4 -4
  75. package/dist/collection/components/stzh-readspeaker/stzh-readspeaker.js +2 -2
  76. package/dist/collection/components/stzh-richtext/stzh-richtext.js +1 -1
  77. package/dist/collection/components/stzh-row/stzh-row.js +2 -2
  78. package/dist/collection/components/stzh-saptcha/stzh-saptcha.js +2 -2
  79. package/dist/collection/components/stzh-scrollup/stzh-scrollup.js +1 -1
  80. package/dist/collection/components/stzh-search/stzh-search.js +2 -2
  81. package/dist/collection/components/stzh-section/stzh-section.js +2 -2
  82. package/dist/collection/components/stzh-share/stzh-share.js +1 -1
  83. package/dist/collection/components/stzh-show/stzh-show.js +2 -2
  84. package/dist/collection/components/stzh-sitemap/stzh-sitemap.js +1 -1
  85. package/dist/collection/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.css +168 -4
  86. package/dist/collection/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.js +1 -1
  87. package/dist/collection/components/stzh-skin-storybook-preview/stzh-skin-storybook-preview.js +1 -1
  88. package/dist/collection/components/stzh-skiplink/stzh-skiplink.js +1 -1
  89. package/dist/collection/components/stzh-socialmediastream/stzh-socialmediastream.js +1 -1
  90. package/dist/collection/components/stzh-socialmediastream-item/stzh-socialmediastream-item.js +1 -1
  91. package/dist/collection/components/stzh-sortable/stzh-sortable.js +1 -1
  92. package/dist/collection/components/stzh-space/stzh-space.js +2 -2
  93. package/dist/collection/components/stzh-status/stzh-status.js +4 -4
  94. package/dist/collection/components/stzh-stepper/stzh-stepper.component.js +2 -2
  95. package/dist/collection/components/stzh-stepper-item/stzh-stepper-item.js +4 -4
  96. package/dist/collection/components/stzh-sticky/stzh-sticky.js +1 -1
  97. package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.js +1 -1
  98. package/dist/collection/components/stzh-table/stzh-table.js +1 -1
  99. package/dist/collection/components/stzh-tag/stzh-tag.js +1 -1
  100. package/dist/collection/components/stzh-text/stzh-text.js +2 -2
  101. package/dist/collection/components/stzh-textandimage/stzh-textandimage.js +1 -1
  102. package/dist/collection/components/stzh-timeline/stzh-timeline.js +1 -1
  103. package/dist/collection/components/stzh-timeline-item/stzh-timeline-item.js +3 -3
  104. package/dist/collection/components/stzh-timepicker/stzh-timepicker.js +1 -1
  105. package/dist/collection/components/stzh-toast/stzh-toast.js +3 -3
  106. package/dist/collection/components/stzh-toastbar/stzh-toastbar.js +1 -1
  107. package/dist/collection/components/stzh-toggle/stzh-toggle.js +4 -4
  108. package/dist/collection/components/stzh-tooltip/stzh-tooltip.css +2 -2
  109. package/dist/collection/components/stzh-tooltip/stzh-tooltip.js +1 -1
  110. package/dist/collection/components/stzh-twocolumns/stzh-twocolumns.js +1 -1
  111. package/dist/collection/components/stzh-upload/stzh-upload.js +2 -2
  112. package/dist/collection/components/stzh-vbz-carousel/stzh-vbz-carousel.js +1 -1
  113. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.js +1 -1
  114. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.js +1 -1
  115. package/dist/collection/components/stzh-vbz-linechip/stzh-vbz-linechip.js +2 -2
  116. package/dist/collection/components/stzh-vbz-majorticker/stzh-vbz-majorticker.js +2 -2
  117. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.js +2 -2
  118. package/dist/collection/components/stzh-visuallyhidden/stzh-visuallyhidden.js +2 -2
  119. package/dist/collection/components/stzh-vspace/stzh-vspace.js +2 -2
  120. package/dist/collection/components/stzh-youtube/stzh-youtube.js +1 -1
  121. package/dist/components/index.js +1 -1
  122. package/dist/components/{p-84f171a0.js → p-02bdd12e.js} +2 -2
  123. package/dist/components/{p-84f171a0.js.map → p-02bdd12e.js.map} +1 -1
  124. package/dist/components/{p-324831e2.js → p-0dae7190.js} +3 -3
  125. package/dist/components/{p-324831e2.js.map → p-0dae7190.js.map} +1 -1
  126. package/dist/components/{p-631b7bfa.js → p-123ddd01.js} +5 -5
  127. package/dist/components/{p-631b7bfa.js.map → p-123ddd01.js.map} +1 -1
  128. package/dist/components/{p-18ad2006.js → p-1e02d63c.js} +17 -13
  129. package/dist/components/p-1e02d63c.js.map +1 -0
  130. package/dist/components/{p-ef28cd34.js → p-1fe5af54.js} +3 -3
  131. package/dist/components/{p-ef28cd34.js.map → p-1fe5af54.js.map} +1 -1
  132. package/dist/components/{p-0b0557e7.js → p-55042ae5.js} +4 -4
  133. package/dist/components/{p-0b0557e7.js.map → p-55042ae5.js.map} +1 -1
  134. package/dist/components/{p-48a20e2d.js → p-6c821944.js} +5 -5
  135. package/dist/components/{p-48a20e2d.js.map → p-6c821944.js.map} +1 -1
  136. package/dist/components/{p-3d24141a.js → p-7eced0db.js} +2 -2
  137. package/dist/components/{p-3d24141a.js.map → p-7eced0db.js.map} +1 -1
  138. package/dist/components/{p-e5a0d7ce.js → p-84f3d0c4.js} +6 -6
  139. package/dist/components/{p-e5a0d7ce.js.map → p-84f3d0c4.js.map} +1 -1
  140. package/dist/components/{p-875cd549.js → p-86473146.js} +2 -2
  141. package/dist/components/{p-875cd549.js.map → p-86473146.js.map} +1 -1
  142. package/dist/components/{p-8123a294.js → p-87537095.js} +2 -2
  143. package/dist/components/{p-8123a294.js.map → p-87537095.js.map} +1 -1
  144. package/dist/components/{p-1ee94681.js → p-877e658f.js} +3 -3
  145. package/dist/components/{p-1ee94681.js.map → p-877e658f.js.map} +1 -1
  146. package/dist/components/{p-0c5f315f.js → p-8c4ca44f.js} +3 -3
  147. package/dist/components/{p-0c5f315f.js.map → p-8c4ca44f.js.map} +1 -1
  148. package/dist/components/{p-70aa77ed.js → p-978466ee.js} +4 -4
  149. package/dist/components/{p-70aa77ed.js.map → p-978466ee.js.map} +1 -1
  150. package/dist/components/{p-043132df.js → p-9c27b812.js} +2 -2
  151. package/dist/components/{p-043132df.js.map → p-9c27b812.js.map} +1 -1
  152. package/dist/components/{p-6a5f4569.js → p-9fd614bc.js} +3 -3
  153. package/dist/components/{p-6a5f4569.js.map → p-9fd614bc.js.map} +1 -1
  154. package/dist/components/{p-da29e441.js → p-a518f263.js} +4 -4
  155. package/dist/components/{p-da29e441.js.map → p-a518f263.js.map} +1 -1
  156. package/dist/components/{p-d8b73add.js → p-a74ffd15.js} +4 -4
  157. package/dist/components/{p-d8b73add.js.map → p-a74ffd15.js.map} +1 -1
  158. package/dist/components/{p-1036baa8.js → p-a93fe963.js} +2 -2
  159. package/dist/components/{p-1036baa8.js.map → p-a93fe963.js.map} +1 -1
  160. package/dist/components/{p-b5d9d5a1.js → p-adf66b29.js} +4 -4
  161. package/dist/components/{p-b5d9d5a1.js.map → p-adf66b29.js.map} +1 -1
  162. package/dist/components/{p-adc06dc4.js → p-ae7adee7.js} +3 -3
  163. package/dist/components/{p-adc06dc4.js.map → p-ae7adee7.js.map} +1 -1
  164. package/dist/components/{p-a367fa4a.js → p-b4ffee20.js} +2 -2
  165. package/dist/components/p-b4ffee20.js.map +1 -0
  166. package/dist/components/{p-8bab76e0.js → p-bed8abab.js} +5 -5
  167. package/dist/components/{p-8bab76e0.js.map → p-bed8abab.js.map} +1 -1
  168. package/dist/components/{p-6be31cce.js → p-c056c339.js} +3 -3
  169. package/dist/components/{p-6be31cce.js.map → p-c056c339.js.map} +1 -1
  170. package/dist/components/{p-c06d0057.js → p-d19eef5f.js} +4 -4
  171. package/dist/components/{p-c06d0057.js.map → p-d19eef5f.js.map} +1 -1
  172. package/dist/components/{p-ded0ad1c.js → p-d40751ba.js} +4 -4
  173. package/dist/components/{p-ded0ad1c.js.map → p-d40751ba.js.map} +1 -1
  174. package/dist/components/{p-3e69bb48.js → p-e48a4be2.js} +3 -3
  175. package/dist/components/{p-3e69bb48.js.map → p-e48a4be2.js.map} +1 -1
  176. package/dist/components/{p-d9bd5b30.js → p-f0db184a.js} +3 -3
  177. package/dist/components/{p-d9bd5b30.js.map → p-f0db184a.js.map} +1 -1
  178. package/dist/components/{p-5748d860.js → p-f254ab81.js} +8 -8
  179. package/dist/components/p-f254ab81.js.map +1 -0
  180. package/dist/components/{p-7d72e50c.js → p-fd0fbd98.js} +2 -2
  181. package/dist/components/{p-7d72e50c.js.map → p-fd0fbd98.js.map} +1 -1
  182. package/dist/components/{p-af0ed46a.js → p-fe546990.js} +3 -3
  183. package/dist/components/{p-af0ed46a.js.map → p-fe546990.js.map} +1 -1
  184. package/dist/components/{p-3d684a4f.js → p-fef8bda1.js} +2 -2
  185. package/dist/components/{p-3d684a4f.js.map → p-fef8bda1.js.map} +1 -1
  186. package/dist/components/stzh-actionset.js +1 -1
  187. package/dist/components/stzh-amount.js +4 -4
  188. package/dist/components/stzh-appointments.js +8 -8
  189. package/dist/components/stzh-audio.js +3 -3
  190. package/dist/components/stzh-audio.js.map +1 -1
  191. package/dist/components/stzh-calendar.js +1 -1
  192. package/dist/components/stzh-card-searchresult.js +8 -8
  193. package/dist/components/stzh-card-searchresult.js.map +1 -1
  194. package/dist/components/stzh-card-superteaser.js +7 -7
  195. package/dist/components/stzh-card.js +1 -1
  196. package/dist/components/stzh-cardlist.js +1 -1
  197. package/dist/components/stzh-checkbox.js +1 -1
  198. package/dist/components/stzh-checkboxgroup.js +2 -2
  199. package/dist/components/stzh-chipselect.js +1 -1
  200. package/dist/components/stzh-contact-cv.js +1 -1
  201. package/dist/components/stzh-cta.js +1 -1
  202. package/dist/components/stzh-datalist-item.js +1 -1
  203. package/dist/components/stzh-datalist.js +1 -1
  204. package/dist/components/stzh-datamessagelist-item.js +2 -2
  205. package/dist/components/stzh-datatable.js +9 -9
  206. package/dist/components/stzh-datepicker.js +1 -1
  207. package/dist/components/stzh-dropdown.js +1 -1
  208. package/dist/components/stzh-feedreader.js +1 -1
  209. package/dist/components/stzh-gallery.js +1 -1
  210. package/dist/components/stzh-geo-ref-data.js +9 -9
  211. package/dist/components/stzh-header.js +1 -1
  212. package/dist/components/stzh-homepage-service-highlights.js +1 -1
  213. package/dist/components/stzh-http-error.js +1 -1
  214. package/dist/components/stzh-input.js +1 -1
  215. package/dist/components/stzh-microsite-teaserlist.js +9 -9
  216. package/dist/components/stzh-monthyearpicker.js +3 -3
  217. package/dist/components/stzh-offline-indicator.js +2 -2
  218. package/dist/components/stzh-pagebottom.js +3 -3
  219. package/dist/components/stzh-pagetitle-home.js +1 -1
  220. package/dist/components/stzh-pagetitle.js +1 -1
  221. package/dist/components/stzh-pagination.js +1 -1
  222. package/dist/components/stzh-panorama.js +5 -5
  223. package/dist/components/stzh-pi-content-navigation.js +1 -1
  224. package/dist/components/stzh-pi-pagetitle.js +1 -1
  225. package/dist/components/stzh-pi-teaser.js +1 -1
  226. package/dist/components/stzh-poicard.js +1 -1
  227. package/dist/components/stzh-poilist.js +6 -6
  228. package/dist/components/stzh-popover.js +1 -1
  229. package/dist/components/stzh-radio.js +1 -1
  230. package/dist/components/stzh-radiogroup.js +1 -1
  231. package/dist/components/stzh-ratio.js +1 -1
  232. package/dist/components/stzh-readspeaker.js +3 -3
  233. package/dist/components/stzh-readspeaker.js.map +1 -1
  234. package/dist/components/stzh-richtext.js +1 -1
  235. package/dist/components/stzh-row.js +2 -2
  236. package/dist/components/stzh-saptcha.js +5 -5
  237. package/dist/components/stzh-scrollup.js +1 -1
  238. package/dist/components/stzh-search.js +6 -6
  239. package/dist/components/stzh-section.js +2 -2
  240. package/dist/components/stzh-share.js +1 -1
  241. package/dist/components/stzh-show.js +1 -1
  242. package/dist/components/stzh-sitemap.js +6 -6
  243. package/dist/components/stzh-skin-portal-mitwirken.js +2 -2
  244. package/dist/components/stzh-skin-portal-mitwirken.js.map +1 -1
  245. package/dist/components/stzh-skin-storybook-preview.js +1 -1
  246. package/dist/components/stzh-skiplink.js +1 -1
  247. package/dist/components/stzh-socialmediastream-item.js +1 -1
  248. package/dist/components/stzh-socialmediastream.js +4 -4
  249. package/dist/components/stzh-sortable.js +1 -1
  250. package/dist/components/stzh-space.js +2 -2
  251. package/dist/components/stzh-status.js +1 -1
  252. package/dist/components/stzh-stepper-item.js +1 -1
  253. package/dist/components/stzh-stepper.js +3 -3
  254. package/dist/components/stzh-sticky-actions.js +2 -2
  255. package/dist/components/stzh-sticky.js +1 -1
  256. package/dist/components/stzh-table.js +1 -1
  257. package/dist/components/stzh-tag.js +1 -1
  258. package/dist/components/stzh-text.js +1 -1
  259. package/dist/components/stzh-textandimage.js +1 -1
  260. package/dist/components/stzh-timeline-item.js +3 -3
  261. package/dist/components/stzh-timeline.js +1 -1
  262. package/dist/components/stzh-timepicker.js +4 -4
  263. package/dist/components/stzh-toast.js +1 -1
  264. package/dist/components/stzh-toastbar.js +1 -1
  265. package/dist/components/stzh-toggle.js +6 -6
  266. package/dist/components/stzh-tooltip.js +1 -1
  267. package/dist/components/stzh-twocolumns.js +1 -1
  268. package/dist/components/stzh-upload.js +6 -6
  269. package/dist/components/stzh-vbz-carousel.js +1 -1
  270. package/dist/components/stzh-vbz-connection-finder.js +1 -1
  271. package/dist/components/stzh-vbz-intro.js +1 -1
  272. package/dist/components/stzh-vbz-linechip.js +1 -1
  273. package/dist/components/stzh-vbz-majorticker.js +4 -4
  274. package/dist/components/stzh-vbz-ticker.js +5 -5
  275. package/dist/components/stzh-visuallyhidden.js +2 -2
  276. package/dist/components/stzh-vspace.js +2 -2
  277. package/dist/components/stzh-youtube.js +2 -2
  278. package/dist/esm/{app-globals-4169aa9e.js → app-globals-069a4797.js} +2 -2
  279. package/dist/esm/{app-globals-4169aa9e.js.map → app-globals-069a4797.js.map} +1 -1
  280. package/dist/esm/loader.js +2 -2
  281. package/dist/esm/stzh-audio.entry.js +1 -1
  282. package/dist/esm/stzh-audio.entry.js.map +1 -1
  283. package/dist/esm/stzh-breadcrumb_2.entry.js +1 -1
  284. package/dist/esm/stzh-card-searchresult.entry.js +1 -1
  285. package/dist/esm/stzh-card-searchresult.entry.js.map +1 -1
  286. package/dist/esm/stzh-card.entry.js +11 -8
  287. package/dist/esm/stzh-card.entry.js.map +1 -1
  288. package/dist/esm/stzh-cardlist_3.entry.js +1 -1
  289. package/dist/esm/stzh-components.js +2 -2
  290. package/dist/esm/stzh-datalist_2.entry.js +3 -3
  291. package/dist/esm/stzh-datalist_2.entry.js.map +1 -1
  292. package/dist/esm/stzh-ghettobox_3.entry.js +3 -3
  293. package/dist/esm/stzh-popover.entry.js +1 -1
  294. package/dist/esm/stzh-popover.entry.js.map +1 -1
  295. package/dist/esm/stzh-print_2.entry.js +1 -1
  296. package/dist/esm/stzh-ratio.entry.js +1 -1
  297. package/dist/esm/stzh-ratio.entry.js.map +1 -1
  298. package/dist/esm/stzh-readspeaker.entry.js +3 -3
  299. package/dist/esm/stzh-readspeaker.entry.js.map +1 -1
  300. package/dist/esm/stzh-row.entry.js +2 -2
  301. package/dist/esm/stzh-saptcha.entry.js +2 -2
  302. package/dist/esm/stzh-scrollup.entry.js +1 -1
  303. package/dist/esm/stzh-search.entry.js +2 -2
  304. package/dist/esm/stzh-section.entry.js +2 -2
  305. package/dist/esm/stzh-sitemap.entry.js +1 -1
  306. package/dist/esm/stzh-skin-portal-mitwirken.entry.js +2 -2
  307. package/dist/esm/stzh-skin-portal-mitwirken.entry.js.map +1 -1
  308. package/dist/esm/stzh-skin-storybook-preview.entry.js +1 -1
  309. package/dist/esm/stzh-skiplink.entry.js +1 -1
  310. package/dist/esm/stzh-socialmediastream-item.entry.js +1 -1
  311. package/dist/esm/stzh-socialmediastream.entry.js +1 -1
  312. package/dist/esm/stzh-space.entry.js +2 -2
  313. package/dist/esm/stzh-status.entry.js +4 -4
  314. package/dist/esm/stzh-stepper-item.entry.js +4 -4
  315. package/dist/esm/stzh-stepper.entry.js +2 -2
  316. package/dist/esm/stzh-sticky-actions.entry.js +1 -1
  317. package/dist/esm/stzh-sticky.entry.js +1 -1
  318. package/dist/esm/stzh-table.entry.js +1 -1
  319. package/dist/esm/stzh-text.entry.js +2 -2
  320. package/dist/esm/stzh-textandimage.entry.js +1 -1
  321. package/dist/esm/stzh-timeline-item.entry.js +3 -3
  322. package/dist/esm/stzh-timeline.entry.js +1 -1
  323. package/dist/esm/stzh-timepicker.entry.js +1 -1
  324. package/dist/esm/stzh-toast_2.entry.js +4 -4
  325. package/dist/esm/stzh-toggle.entry.js +4 -4
  326. package/dist/esm/stzh-tooltip.entry.js +2 -2
  327. package/dist/esm/stzh-tooltip.entry.js.map +1 -1
  328. package/dist/esm/stzh-twocolumns.entry.js +1 -1
  329. package/dist/esm/stzh-upload.entry.js +2 -2
  330. package/dist/esm/stzh-vbz-carousel.entry.js +1 -1
  331. package/dist/esm/stzh-vbz-connection-finder.entry.js +1 -1
  332. package/dist/esm/stzh-vbz-intro.entry.js +1 -1
  333. package/dist/esm/stzh-vbz-linechip.entry.js +2 -2
  334. package/dist/esm/stzh-vbz-majorticker.entry.js +2 -2
  335. package/dist/esm/stzh-vbz-ticker.entry.js +2 -2
  336. package/dist/esm/stzh-visuallyhidden.entry.js +2 -2
  337. package/dist/esm/stzh-vspace.entry.js +2 -2
  338. package/dist/esm/stzh-youtube.entry.js +1 -1
  339. package/dist/stzh-components/{p-96fe4abd.entry.js → p-043ad510.entry.js} +2 -2
  340. package/dist/stzh-components/{p-bb73cb7c.entry.js → p-0a9f2a26.entry.js} +2 -2
  341. package/dist/stzh-components/{p-fc5fd4e3.entry.js → p-0c454ed4.entry.js} +2 -2
  342. package/dist/stzh-components/{p-5b908c23.entry.js → p-0c7abc07.entry.js} +2 -2
  343. package/dist/stzh-components/{p-7026a4fd.entry.js → p-12ea12f4.entry.js} +2 -2
  344. package/dist/stzh-components/p-17d26a11.entry.js +2 -0
  345. package/dist/stzh-components/{p-404ba037.entry.js.map → p-17d26a11.entry.js.map} +1 -1
  346. package/dist/stzh-components/{p-adb98a13.entry.js → p-24c37b16.entry.js} +2 -2
  347. package/dist/stzh-components/{p-c2837379.entry.js → p-263f1fc6.entry.js} +2 -2
  348. package/dist/stzh-components/p-29ff3759.entry.js +2 -0
  349. package/dist/stzh-components/{p-6b57e800.entry.js.map → p-29ff3759.entry.js.map} +1 -1
  350. package/dist/stzh-components/{p-0971c453.entry.js → p-2b22da62.entry.js} +2 -2
  351. package/dist/stzh-components/{p-e5935628.entry.js → p-3edb8127.entry.js} +2 -2
  352. package/dist/stzh-components/p-43390ffd.entry.js +2 -0
  353. package/dist/stzh-components/p-43390ffd.entry.js.map +1 -0
  354. package/dist/stzh-components/{p-cb78d001.entry.js → p-44860eb8.entry.js} +2 -2
  355. package/dist/stzh-components/{p-c63ce489.entry.js → p-4a0e5c91.entry.js} +2 -2
  356. package/dist/stzh-components/{p-e4083254.entry.js → p-52b21470.entry.js} +2 -2
  357. package/dist/stzh-components/{p-4423fbf1.entry.js → p-5ea61577.entry.js} +2 -2
  358. package/dist/stzh-components/p-5ea61577.entry.js.map +1 -0
  359. package/dist/stzh-components/{p-dce69ebb.entry.js → p-628b2a1b.entry.js} +2 -2
  360. package/dist/stzh-components/{p-28f4fd43.entry.js → p-6f71f9a1.entry.js} +2 -2
  361. package/dist/stzh-components/p-705fb85c.entry.js +2 -0
  362. package/dist/stzh-components/{p-e0743aaf.entry.js.map → p-705fb85c.entry.js.map} +1 -1
  363. package/dist/stzh-components/{p-da065baa.entry.js → p-7467c517.entry.js} +2 -2
  364. package/dist/stzh-components/{p-46d8ebf9.entry.js → p-77c64b4b.entry.js} +2 -2
  365. package/dist/stzh-components/{p-46d8ebf9.entry.js.map → p-77c64b4b.entry.js.map} +1 -1
  366. package/dist/stzh-components/{p-a128eb07.entry.js → p-79a63bd9.entry.js} +2 -2
  367. package/dist/stzh-components/p-836ee7e5.entry.js +2 -0
  368. package/dist/stzh-components/p-836ee7e5.entry.js.map +1 -0
  369. package/dist/stzh-components/{p-1a3a2442.entry.js → p-84ae023f.entry.js} +2 -2
  370. package/dist/stzh-components/{p-3c60c70f.entry.js → p-976d5ab9.entry.js} +2 -2
  371. package/dist/stzh-components/{p-04669d52.entry.js → p-99d39d04.entry.js} +2 -2
  372. package/dist/stzh-components/{p-2b75dc62.entry.js → p-a08056c1.entry.js} +2 -2
  373. package/dist/stzh-components/{p-c6552960.entry.js → p-ab439c71.entry.js} +2 -2
  374. package/dist/stzh-components/{p-c6552960.entry.js.map → p-ab439c71.entry.js.map} +1 -1
  375. package/dist/stzh-components/{p-71886cdf.entry.js → p-ac4b1753.entry.js} +2 -2
  376. package/dist/stzh-components/{p-444ba687.entry.js → p-b0d12ac9.entry.js} +2 -2
  377. package/dist/stzh-components/p-b159d0bc.entry.js +2 -0
  378. package/dist/stzh-components/{p-624be23e.entry.js.map → p-b159d0bc.entry.js.map} +1 -1
  379. package/dist/stzh-components/p-b40a0635.js +2 -0
  380. package/dist/stzh-components/{p-1c01ddd2.js.map → p-b40a0635.js.map} +1 -1
  381. package/dist/stzh-components/{p-fb73afa9.entry.js → p-b6b39492.entry.js} +2 -2
  382. package/dist/stzh-components/{p-97e2a5ae.entry.js → p-c26e45c7.entry.js} +2 -2
  383. package/dist/stzh-components/{p-68dccf19.entry.js → p-c34c7f87.entry.js} +2 -2
  384. package/dist/stzh-components/{p-5ca3df89.entry.js → p-cd9be844.entry.js} +2 -2
  385. package/dist/stzh-components/{p-592452c5.entry.js → p-d12700c1.entry.js} +2 -2
  386. package/dist/stzh-components/{p-6802415a.entry.js → p-d17b4c21.entry.js} +2 -2
  387. package/dist/stzh-components/{p-8060775b.entry.js → p-d83dbb08.entry.js} +2 -2
  388. package/dist/stzh-components/p-d83dbb08.entry.js.map +1 -0
  389. package/dist/stzh-components/{p-549b5a54.entry.js → p-d98330d6.entry.js} +2 -2
  390. package/dist/stzh-components/p-dcf670a7.entry.js +2 -0
  391. package/dist/stzh-components/{p-8d664896.entry.js.map → p-dcf670a7.entry.js.map} +1 -1
  392. package/dist/stzh-components/{p-9c76b2dd.entry.js → p-dde1ffb8.entry.js} +2 -2
  393. package/dist/stzh-components/{p-420e839d.entry.js → p-e19dd2da.entry.js} +2 -2
  394. package/dist/stzh-components/{p-97fa8644.entry.js → p-e452b478.entry.js} +2 -2
  395. package/dist/stzh-components/{p-9130582f.entry.js → p-e496eb1a.entry.js} +2 -2
  396. package/dist/stzh-components/{p-6872230d.entry.js → p-e8a87eaf.entry.js} +2 -2
  397. package/dist/stzh-components/{p-ecb3ab05.entry.js → p-ec7f8a5a.entry.js} +2 -2
  398. package/dist/stzh-components/{p-824068d6.entry.js → p-f957fa77.entry.js} +2 -2
  399. package/dist/stzh-components/{p-7d590d24.entry.js → p-f9e3c785.entry.js} +2 -2
  400. package/dist/stzh-components/stzh-components.css +168 -4
  401. package/dist/stzh-components/stzh-components.esm.js +1 -1
  402. package/dist/stzh-components/stzh-components.esm.js.map +1 -1
  403. package/dist/types/components/stzh-card/stzh-card.d.ts +2 -0
  404. package/dist/types/components/stzh-datalist-item/stzh-datalist-item.d.ts +2 -2
  405. package/dist/types/components.d.ts +16 -8
  406. package/dist/vscode-data.json +16 -4
  407. package/package.json +1 -1
  408. package/dist/components/p-18ad2006.js.map +0 -1
  409. package/dist/components/p-5748d860.js.map +0 -1
  410. package/dist/components/p-a367fa4a.js.map +0 -1
  411. package/dist/stzh-components/p-1c01ddd2.js +0 -2
  412. package/dist/stzh-components/p-404ba037.entry.js +0 -2
  413. package/dist/stzh-components/p-4423fbf1.entry.js.map +0 -1
  414. package/dist/stzh-components/p-6042015f.entry.js +0 -2
  415. package/dist/stzh-components/p-6042015f.entry.js.map +0 -1
  416. package/dist/stzh-components/p-624be23e.entry.js +0 -2
  417. package/dist/stzh-components/p-6b57e800.entry.js +0 -2
  418. package/dist/stzh-components/p-8060775b.entry.js.map +0 -1
  419. package/dist/stzh-components/p-8d664896.entry.js +0 -2
  420. package/dist/stzh-components/p-b35032a8.entry.js +0 -2
  421. package/dist/stzh-components/p-b35032a8.entry.js.map +0 -1
  422. package/dist/stzh-components/p-e0743aaf.entry.js +0 -2
  423. /package/dist/stzh-components/{p-96fe4abd.entry.js.map → p-043ad510.entry.js.map} +0 -0
  424. /package/dist/stzh-components/{p-bb73cb7c.entry.js.map → p-0a9f2a26.entry.js.map} +0 -0
  425. /package/dist/stzh-components/{p-fc5fd4e3.entry.js.map → p-0c454ed4.entry.js.map} +0 -0
  426. /package/dist/stzh-components/{p-5b908c23.entry.js.map → p-0c7abc07.entry.js.map} +0 -0
  427. /package/dist/stzh-components/{p-7026a4fd.entry.js.map → p-12ea12f4.entry.js.map} +0 -0
  428. /package/dist/stzh-components/{p-adb98a13.entry.js.map → p-24c37b16.entry.js.map} +0 -0
  429. /package/dist/stzh-components/{p-c2837379.entry.js.map → p-263f1fc6.entry.js.map} +0 -0
  430. /package/dist/stzh-components/{p-0971c453.entry.js.map → p-2b22da62.entry.js.map} +0 -0
  431. /package/dist/stzh-components/{p-e5935628.entry.js.map → p-3edb8127.entry.js.map} +0 -0
  432. /package/dist/stzh-components/{p-cb78d001.entry.js.map → p-44860eb8.entry.js.map} +0 -0
  433. /package/dist/stzh-components/{p-c63ce489.entry.js.map → p-4a0e5c91.entry.js.map} +0 -0
  434. /package/dist/stzh-components/{p-e4083254.entry.js.map → p-52b21470.entry.js.map} +0 -0
  435. /package/dist/stzh-components/{p-dce69ebb.entry.js.map → p-628b2a1b.entry.js.map} +0 -0
  436. /package/dist/stzh-components/{p-28f4fd43.entry.js.map → p-6f71f9a1.entry.js.map} +0 -0
  437. /package/dist/stzh-components/{p-da065baa.entry.js.map → p-7467c517.entry.js.map} +0 -0
  438. /package/dist/stzh-components/{p-a128eb07.entry.js.map → p-79a63bd9.entry.js.map} +0 -0
  439. /package/dist/stzh-components/{p-1a3a2442.entry.js.map → p-84ae023f.entry.js.map} +0 -0
  440. /package/dist/stzh-components/{p-3c60c70f.entry.js.map → p-976d5ab9.entry.js.map} +0 -0
  441. /package/dist/stzh-components/{p-04669d52.entry.js.map → p-99d39d04.entry.js.map} +0 -0
  442. /package/dist/stzh-components/{p-2b75dc62.entry.js.map → p-a08056c1.entry.js.map} +0 -0
  443. /package/dist/stzh-components/{p-71886cdf.entry.js.map → p-ac4b1753.entry.js.map} +0 -0
  444. /package/dist/stzh-components/{p-444ba687.entry.js.map → p-b0d12ac9.entry.js.map} +0 -0
  445. /package/dist/stzh-components/{p-fb73afa9.entry.js.map → p-b6b39492.entry.js.map} +0 -0
  446. /package/dist/stzh-components/{p-97e2a5ae.entry.js.map → p-c26e45c7.entry.js.map} +0 -0
  447. /package/dist/stzh-components/{p-68dccf19.entry.js.map → p-c34c7f87.entry.js.map} +0 -0
  448. /package/dist/stzh-components/{p-5ca3df89.entry.js.map → p-cd9be844.entry.js.map} +0 -0
  449. /package/dist/stzh-components/{p-592452c5.entry.js.map → p-d12700c1.entry.js.map} +0 -0
  450. /package/dist/stzh-components/{p-6802415a.entry.js.map → p-d17b4c21.entry.js.map} +0 -0
  451. /package/dist/stzh-components/{p-549b5a54.entry.js.map → p-d98330d6.entry.js.map} +0 -0
  452. /package/dist/stzh-components/{p-9c76b2dd.entry.js.map → p-dde1ffb8.entry.js.map} +0 -0
  453. /package/dist/stzh-components/{p-420e839d.entry.js.map → p-e19dd2da.entry.js.map} +0 -0
  454. /package/dist/stzh-components/{p-97fa8644.entry.js.map → p-e452b478.entry.js.map} +0 -0
  455. /package/dist/stzh-components/{p-9130582f.entry.js.map → p-e496eb1a.entry.js.map} +0 -0
  456. /package/dist/stzh-components/{p-6872230d.entry.js.map → p-e8a87eaf.entry.js.map} +0 -0
  457. /package/dist/stzh-components/{p-ecb3ab05.entry.js.map → p-ec7f8a5a.entry.js.map} +0 -0
  458. /package/dist/stzh-components/{p-824068d6.entry.js.map → p-f957fa77.entry.js.map} +0 -0
  459. /package/dist/stzh-components/{p-7d590d24.entry.js.map → p-f9e3c785.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"p-8123a294.js","mappings":";;;AAAA,MAAM,eAAe,GAAG,y+rCAAy+rC,CAAC;AAClgsC,2BAAe,eAAe;;ACE9B,MAAM,mBAAmB,GAAG,8BAA8B,CAAC;AAC3D,MAAM,2BAA2B,GAAG,sCAAsC,CAAC;AAC3E,MAAM,mBAAmB,GAAG,8BAA8B,CAAC;AAC3D,MAAM,sBAAsB,GAAG,iCAAiC,CAAC;MAUpD,YAAY;;;;;;;oCAWgB,0CAA0C;gCAG9C,eAAe;;IAM1C,oBAAoB;QAC1B,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY;YACrC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;;YAGhD,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,sBAAsB,EAAE,CAAC,EAAE;gBAC7D,MAAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;gBACxD,gBAAgB,CAAC,SAAS,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;gBACvD,gBAAgB,CAAC,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,Q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,GAAG,IAAI,CAAC,iBAAiB,GAAG,IAAI,4BAC5E,OAAO,IAAI,CAAC,gBAAgB,KAAK,SAAS,GAAG,IAAI,CAAC,gBAAgB,GAAG,IAAI,IAEjG,4DAAK,KAAK,EAAE,OAAO,IACjB,4DAAK,KAAK,EAAC,qBAAqB,IAC9B,8DAAa,CACT,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-richtext/stzh-richtext.scss?tag=stzh-richtext&encapsulation=scoped","src/components/stzh-richtext/stzh-richtext.tsx"],"sourcesContent":[":host {\n @include richtext-host;\n\n --display: var(--stzh-richtext-display, block);\n\n --grid-template-areas: var(\n --stzh-richtext-grid-template-areas,\n \"text text text text\"\n );\n\n --grid-template-columns: var(\n --stzh-richtext-grid-template-columns,\n #{$gridColumns}\n );\n\n @include mq($from: small) {\n --grid-template-areas: var(\n --stzh-richtext-grid-template-areas,\n \"text text text text\"\n );\n }\n\n @include mq($from: medium) {\n --grid-template-areas: var(\n --stzh-richtext-grid-template-areas,\n \"text text text text text text text text\"\n );\n\n --grid-template-columns: var(\n --stzh-richtext-grid-template-columns,\n #{$gridColumnsMedium}\n );\n }\n\n ::slotted(*) {\n @include richtext-slotted;\n }\n\n &[has-hidden-first-margin] ::slotted(*:first-child) {\n margin-top: 0 !important;\n }\n\n &[has-hidden-last-margin] ::slotted(*:last-child) {\n margin-bottom: 0 !important;\n }\n}\n\n.stzh-richtext {\n @include gridGutter;\n display: var(--display);\n grid-template-areas: var(--grid-template-areas);\n grid-template-columns: var(--grid-template-columns);\n\n &__text {\n grid-area: text;\n display: grid;\n }\n}\n","import { Component, Element, h, Host, Prop } from \"@stencil/core\";\nimport { StzhLocaleComponent } from \"../../index\";\n\nconst CLASS_EXTERNAL_LINK = \"stzh-richtext__external-link\";\nconst CLASS_EXTERNAL_ICON_WRAPPER = \"stzh-richtext__external-icon-wrapper\";\nconst CLASS_EXTERNAL_ICON = \"stzh-richtext__external-icon\";\nconst CLASS_EXTERNAL_VHIDDEN = \"stzh-richtext__external-vhidden\";\n\n/**\n * @slot - Text content that should be styled\n */\n@Component({\n tag: \"stzh-richtext\",\n styleUrl: \"stzh-richtext.scss\",\n scoped: true,\n})\nexport class StzhRichtext {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Whether first top margin of first child should be set to 0. */\n @Prop({ reflect: true }) removeFirstMargin: boolean;\n\n /** Whether last bottom margin of last child should be set to 0. */\n @Prop({ reflect: true }) removeLastMargin: boolean;\n\n /** Selector to recognize external link and attach an icon */\n @Prop() externalLinkSelector: string = 'a[rel*=\"external\"], a.external, a.extern';\n\n /** Icon used for marking external links */\n @Prop() externalLinkIcon: string = \"external-link\";\n\n @Element() element: HTMLStzhRichtextElement;\n\n private externalLinks: HTMLElement[];\n\n private addExternalLinkIcons() {\n this.externalLinks.forEach(externalLink => {\n externalLink.classList.add(CLASS_EXTERNAL_LINK);\n\n // Check if screenreaderText already exists\n if (!externalLink.querySelector(`.${CLASS_EXTERNAL_VHIDDEN}`)) {\n const screenreaderText = document.createElement(\"span\");\n screenreaderText.classList.add(CLASS_EXTERNAL_VHIDDEN);\n screenreaderText.innerText = this.localization.$globals.externalLinkLabel;\n externalLink.prepend(screenreaderText);\n }\n\n // Check if iconWrapper already exists\n if (!externalLink.querySelector(`.${CLASS_EXTERNAL_ICON_WRAPPER}`)) {\n const iconWrapper = document.createElement(\"span\");\n iconWrapper.classList.add(CLASS_EXTERNAL_ICON_WRAPPER);\n\n const icon = document.createElement(\"stzh-icon\");\n icon.classList.add(CLASS_EXTERNAL_ICON);\n icon.name = this.externalLinkIcon;\n iconWrapper.appendChild(icon);\n\n externalLink.appendChild(iconWrapper);\n }\n });\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"richtext\");\n }\n }\n\n componentDidRender() {\n this.externalLinks = Array.from(this.element.querySelectorAll(this.externalLinkSelector));\n if (this.externalLinks && this.externalLinks.length > 0) {\n this.addExternalLinkIcons();\n }\n }\n\n render() {\n const classes = {\n \"stzh-richtext\": true,\n };\n\n return (\n <Host\n has-hidden-first-margin={typeof this.removeFirstMargin === \"boolean\" ? this.removeFirstMargin : true}\n has-hidden-last-margin={typeof this.removeLastMargin === \"boolean\" ? this.removeLastMargin : true}\n >\n <div class={classes}>\n <div class=\"stzh-richtext__text\">\n <slot></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-87537095.js","mappings":";;;AAAA,MAAM,eAAe,GAAG,y+rCAAy+rC,CAAC;AAClgsC,2BAAe,eAAe;;ACE9B,MAAM,mBAAmB,GAAG,8BAA8B,CAAC;AAC3D,MAAM,2BAA2B,GAAG,sCAAsC,CAAC;AAC3E,MAAM,mBAAmB,GAAG,8BAA8B,CAAC;AAC3D,MAAM,sBAAsB,GAAG,iCAAiC,CAAC;MAUpD,YAAY;;;;;;;oCAWgB,0CAA0C;gCAG9C,eAAe;;IAM1C,oBAAoB;QAC1B,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY;YACrC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;;YAGhD,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,sBAAsB,EAAE,CAAC,EAAE;gBAC7D,MAAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;gBACxD,gBAAgB,CAAC,SAAS,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;gBACvD,gBAAgB,CAAC,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,iBAAiB,CAAC;gBAC1E,YAAY,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;aACxC;;YAGD,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,2BAA2B,EAAE,CAAC,EAAE;gBAClE,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC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CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-richtext/stzh-richtext.scss?tag=stzh-richtext&encapsulation=scoped","src/components/stzh-richtext/stzh-richtext.tsx"],"sourcesContent":[":host {\n @include richtext-host;\n\n --display: var(--stzh-richtext-display, block);\n\n --grid-template-areas: var(\n --stzh-richtext-grid-template-areas,\n \"text text text text\"\n );\n\n --grid-template-columns: var(\n --stzh-richtext-grid-template-columns,\n #{$gridColumns}\n );\n\n @include mq($from: small) {\n --grid-template-areas: var(\n --stzh-richtext-grid-template-areas,\n \"text text text text\"\n );\n }\n\n @include mq($from: medium) {\n --grid-template-areas: var(\n --stzh-richtext-grid-template-areas,\n \"text text text text text text text text\"\n );\n\n --grid-template-columns: var(\n --stzh-richtext-grid-template-columns,\n #{$gridColumnsMedium}\n );\n }\n\n ::slotted(*) {\n @include richtext-slotted;\n }\n\n &[has-hidden-first-margin] ::slotted(*:first-child) {\n margin-top: 0 !important;\n }\n\n &[has-hidden-last-margin] ::slotted(*:last-child) {\n margin-bottom: 0 !important;\n }\n}\n\n.stzh-richtext {\n @include gridGutter;\n display: var(--display);\n grid-template-areas: var(--grid-template-areas);\n grid-template-columns: var(--grid-template-columns);\n\n &__text {\n grid-area: text;\n display: grid;\n }\n}\n","import { Component, Element, h, Host, Prop } from \"@stencil/core\";\nimport { StzhLocaleComponent } from \"../../index\";\n\nconst CLASS_EXTERNAL_LINK = \"stzh-richtext__external-link\";\nconst CLASS_EXTERNAL_ICON_WRAPPER = \"stzh-richtext__external-icon-wrapper\";\nconst CLASS_EXTERNAL_ICON = \"stzh-richtext__external-icon\";\nconst CLASS_EXTERNAL_VHIDDEN = \"stzh-richtext__external-vhidden\";\n\n/**\n * @slot - Text content that should be styled\n */\n@Component({\n tag: \"stzh-richtext\",\n styleUrl: \"stzh-richtext.scss\",\n scoped: true,\n})\nexport class StzhRichtext {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Whether first top margin of first child should be set to 0. */\n @Prop({ reflect: true }) removeFirstMargin: boolean;\n\n /** Whether last bottom margin of last child should be set to 0. */\n @Prop({ reflect: true }) removeLastMargin: boolean;\n\n /** Selector to recognize external link and attach an icon */\n @Prop() externalLinkSelector: string = 'a[rel*=\"external\"], a.external, a.extern';\n\n /** Icon used for marking external links */\n @Prop() externalLinkIcon: string = \"external-link\";\n\n @Element() element: HTMLStzhRichtextElement;\n\n private externalLinks: HTMLElement[];\n\n private addExternalLinkIcons() {\n this.externalLinks.forEach(externalLink => {\n externalLink.classList.add(CLASS_EXTERNAL_LINK);\n\n // Check if screenreaderText already exists\n if (!externalLink.querySelector(`.${CLASS_EXTERNAL_VHIDDEN}`)) {\n const screenreaderText = document.createElement(\"span\");\n screenreaderText.classList.add(CLASS_EXTERNAL_VHIDDEN);\n screenreaderText.innerText = this.localization.$globals.externalLinkLabel;\n externalLink.prepend(screenreaderText);\n }\n\n // Check if iconWrapper already exists\n if (!externalLink.querySelector(`.${CLASS_EXTERNAL_ICON_WRAPPER}`)) {\n const iconWrapper = document.createElement(\"span\");\n iconWrapper.classList.add(CLASS_EXTERNAL_ICON_WRAPPER);\n\n const icon = document.createElement(\"stzh-icon\");\n icon.classList.add(CLASS_EXTERNAL_ICON);\n icon.name = this.externalLinkIcon;\n iconWrapper.appendChild(icon);\n\n externalLink.appendChild(iconWrapper);\n }\n });\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"richtext\");\n }\n }\n\n componentDidRender() {\n this.externalLinks = Array.from(this.element.querySelectorAll(this.externalLinkSelector));\n if (this.externalLinks && this.externalLinks.length > 0) {\n this.addExternalLinkIcons();\n }\n }\n\n render() {\n const classes = {\n \"stzh-richtext\": true,\n };\n\n return (\n <Host\n has-hidden-first-margin={typeof this.removeFirstMargin === \"boolean\" ? this.removeFirstMargin : true}\n has-hidden-last-margin={typeof this.removeLastMargin === \"boolean\" ? this.removeLastMargin : true}\n >\n <div class={classes}>\n <div class=\"stzh-richtext__text\">\n <slot></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -2,8 +2,8 @@ import { p as proxyCustomElement, H, h, d as Host } from './p-8f01554b.js';
2
2
  import { c as camelCase, h as hasSlot } from './p-d1f98854.js';
3
3
  import { S as StzhInputDescription } from './p-6393ca35.js';
4
4
  import { d as defineCustomElement$3 } from './p-8d12a95f.js';
5
- import { d as defineCustomElement$2 } from './p-3d24141a.js';
6
- import { d as defineCustomElement$1 } from './p-adc06dc4.js';
5
+ import { d as defineCustomElement$2 } from './p-7eced0db.js';
6
+ import { d as defineCustomElement$1 } from './p-ae7adee7.js';
7
7
 
8
8
  const stzhRadiogroupCss = ".sc-stzh-radiogroup-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-radiogroup-h,[stzh-hidden].sc-stzh-radiogroup-h{display:none}.sc-stzh-radiogroup-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-radiogroup-h *.sc-stzh-radiogroup,.sc-stzh-radiogroup-h *.sc-stzh-radiogroup::before,.sc-stzh-radiogroup-h *.sc-stzh-radiogroup::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-radiogroup-h .has-focus.sc-stzh-radiogroup{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-radiogroup-h .stzh-fylingfocus-focused.sc-stzh-radiogroup{outline-style:none !important}.sc-stzh-radiogroup-h .stzh-fylingfocus-focused.sc-stzh-radiogroup::-moz-focus-inner{border:0 !important}.sc-stzh-radiogroup-h{--legend-color:var(--stzh-radio-group-legend-color, var(--stzh-heading-color))}[disabled].sc-stzh-radiogroup-h:not([disabled=false]){--description-color:var(--stzh-color-grey70)}.stzh-radiogroup.sc-stzh-radiogroup{margin:0;padding:0;border:none}.stzh-radiogroup__marker-symbol.sc-stzh-radiogroup{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium)}.stzh-radiogroup__marker-text.sc-stzh-radiogroup{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-radiogroup__description-wrapper.sc-stzh-radiogroup{display:flex;flex-direction:column-reverse;min-height:var(--description-min-height, var(--stzh-description-min-height, none))}.stzh-radiogroup__error.sc-stzh-radiogroup,.stzh-radiogroup__description.sc-stzh-radiogroup{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height)}.stzh-radiogroup__error.sc-stzh-radiogroup{color:var(--stzh-color-error60)}.stzh-radiogroup__error-list.sc-stzh-radiogroup{list-style:none;margin:0;padding:0}.stzh-radiogroup__description.sc-stzh-radiogroup{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-radiogroup__description-long.sc-stzh-radiogroup{margin-right:var(--stzh-space-xxsmall);margin-top:0.125rem}@supports (font: -apple-system-body) and (-webkit-appearance: none){.stzh-radiogroup__description-long.sc-stzh-radiogroup{margin-top:0}}.stzh-radiogroup__description-long-popover.sc-stzh-radiogroup{--width:auto;--max-width:27.3125rem}.stzh-radiogroup__description-long-button.sc-stzh-radiogroup{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-radiogroup.sc-stzh-radiogroup stzh-icon.stzh-radiogroup__description-long-icon.sc-stzh-radiogroup{--size:var(--stzh-icon-size-xsmall)}.stzh-radiogroup--has-error.sc-stzh-radiogroup .stzh-radiogroup__error.sc-stzh-radiogroup,.stzh-radiogroup--has-description.sc-stzh-radiogroup .stzh-radiogroup__description.sc-stzh-radiogroup{margin-top:var(--stzh-space-xxxsmall)}.stzh-radiogroup__fields.sc-stzh-radiogroup{display:flex;align-items:flex-start;flex-direction:column;gap:var(--stzh-space-medium)}.stzh-radiogroup__legend.sc-stzh-radiogroup{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);color:var(--legend-color);padding:0;margin-bottom:var(--stzh-space-xsmall)}.stzh-radiogroup__marker.sc-stzh-radiogroup{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-radiogroup--hide-legend.sc-stzh-radiogroup .stzh-radiogroup__legend.sc-stzh-radiogroup{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-radiogroup--is-invalid.sc-stzh-radiogroup .stzh-radiogroup__legend.sc-stzh-radiogroup,.stzh-radiogroup--has-error.sc-stzh-radiogroup .stzh-radiogroup__legend.sc-stzh-radiogroup{color:var(--stzh-color-error60)}.stzh-radiogroup--is-disabled.sc-stzh-radiogroup .stzh-radiogroup__legend.sc-stzh-radiogroup{color:var(--stzh-color-grey60)}.stzh-radiogroup--direction-horizontal.sc-stzh-radiogroup .stzh-radiogroup__fields.sc-stzh-radiogroup{flex-wrap:wrap;flex-direction:row;row-gap:var(--stzh-space-medium);column-gap:var(--stzh-space-xxlarge)}";
9
9
  const StzhRadiogroupStyle0 = stzhRadiogroupCss;
@@ -255,4 +255,4 @@ function defineCustomElement() {
255
255
 
256
256
  export { StzhRadiogroup as S, defineCustomElement as d };
257
257
 
258
- //# sourceMappingURL=p-1ee94681.js.map
258
+ //# sourceMappingURL=p-877e658f.js.map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CAAC,YAAY,CAAC,QAAQ,CAAC,iBAAiB,CAC3C,CACF,CACR,CACM,CACV,EACD,4DAAK,KAAK,EAAC,yBAAyB,IAClC,8DAAa,CACT,EACL,CAAC,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,MAAM,IAAG,CAAC,IAAI,IAAI,CAAC,WAAW,MAC3C,EAAC,oBAAoB,qDACnB,WAAW,EAAC,iBAAiB,EAC7B,EAAE,EAAE,GAAG,IAAI,CAAC,YAAY,cAAc,EACtC,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,CACH,CACQ,CACN,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-radiogroup/stzh-radiogroup.scss?tag=stzh-radiogroup&encapsulation=scoped","src/components/stzh-radiogroup/stzh-radiogroup.tsx"],"sourcesContent":[":host {\n --legend-color: var(--stzh-radio-group-legend-color, #{$headingColor});\n\n &[disabled]:not([disabled=\"false\"]) {\n --description-color: #{$formDisabledColor};\n }\n}\n\n.stzh-radiogroup {\n @include input-description;\n margin: 0;\n padding: 0;\n border: none;\n\n &__fields {\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n gap: space('medium');\n }\n\n &__legend {\n @include font('heavy');\n @include fontSize('micro');\n color: var(--legend-color);\n padding: 0;\n margin-bottom: space('xsmall');\n }\n\n &__marker {\n @include fontSize('nano');\n margin-left: calc(-0.25em + #{space('xsmall')});\n }\n\n &--hide-legend &__legend {\n @include visuallyhidden;\n }\n\n &--is-invalid &__legend,\n &--has-error &__legend {\n color: $colorError60;\n }\n\n &--is-disabled &__legend {\n color: $colorGrey60;\n }\n\n &--direction-horizontal &__fields {\n flex-wrap: wrap;\n flex-direction: row;\n row-gap: space('medium');\n column-gap: space('xxlarge');\n }\n}\n","import { Component, Element, h, Host, Listen, Prop, Watch } from \"@stencil/core\";\n\nimport { StzhRadioChangeEvent } from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { camelCase } from \"../../utils/string-utils\";\nimport { StzhLocaleComponent } from \"../../index\";\n\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\nconst SELECTOR_RADIO = \"stzh-radio, stzh-button[type=radio], stzh-card\";\n\nlet radiogroupCounter = 0;\n\n/**\n * @slot - Slot for `stzh-radio`, `stzh-button[type=\"radio\"]` or `stzh-card` 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-radiogroup\",\n styleUrl: \"stzh-radiogroup.scss\",\n scoped: true,\n})\nexport class StzhRadiogroup {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** The name of the input radio elements, will define the radio group. If you have more than one radio group on a page, every group needs to have its own unique name */\n @Prop({ reflect: true }) name: string;\n\n /** The legend */\n @Prop() legend: string;\n\n /** Hide legend to show only for screenreaders */\n @Prop({ reflect: true }) hideLegend: boolean = false;\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Hide `(optional)` label (or use `required` inside form to hide it) */\n @Prop({ reflect: true }) hideOptional: boolean = false;\n\n /** Select a radio by value */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** Default value (used by reset) */\n @Prop({ mutable: true }) defaultValue: string = \"\";\n\n /** Direction */\n @Prop({ reflect: true }) direction: \"vertical\" | \"horizontal\" = \"vertical\";\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 /** 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 /** Current checked radio element (readonly) */\n @Prop() checkedRadio: HTMLStzhRadioElement | null = null;\n\n /** Prevent updating certain properties of radio elements (possible values inside array: disabled, invalid, required, hide-marker) */\n @Prop() preventUpdateProperties: string[] | string = [];\n private _preventUpdateProperties: string[] = [];\n\n /** Host element */\n @Element() element: HTMLElement;\n\n @Watch(\"name\")\n watchName(newValue: string) {\n this.updateRadiosProperty(\"name\", newValue);\n }\n\n @Watch(\"disabled\")\n watchDisabled(newValue: boolean) {\n this.updateRadiosProperty(\"disabled\", newValue);\n }\n\n @Watch(\"required\")\n watchRequired(newValue: boolean) {\n this.updateRadiosProperty(\"required\", newValue);\n }\n\n @Watch(\"value\")\n watchValue(newValue: string) {\n this.updateCheckedRadioByValue(newValue);\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 @Watch(\"preventUpdateProperties\")\n preventUpdatePropertiesWatcher(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n this._preventUpdateProperties = JSON.parse(newValue);\n } else {\n this._preventUpdateProperties = newValue;\n }\n }\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 @Listen(\"stzhChange\")\n onChange(event: CustomEvent<StzhRadioChangeEvent>) {\n this.value = event.detail.value;\n }\n\n /** Radio elements */\n private radios: HTMLStzhRadioElement[];\n private radiogroupId: string;\n private observer: MutationObserver;\n\n private updateRadiosProperty(prop: string, value: any) {\n this.radios.forEach((radio: HTMLStzhRadioElement) => {\n if (prop === \"disabled\") {\n // Only set the disabled if the radio is not already disabled\n if (!radio.disabled) {\n radio.disabled = value;\n }\n } else if (prop === \"name\" || this._preventUpdateProperties.indexOf(prop) === -1) {\n radio[camelCase(prop)] = value;\n }\n });\n }\n\n private get errorUsed(): boolean {\n return hasSlot(this.element, \"error\") || this._error?.length > 0;\n }\n\n private updateCheckedRadioByValue(value: string) {\n this.checkedRadio = this.radios.find(radio => radio.value === value);\n\n if (this.checkedRadio) {\n this.checkedRadio.checked = true;\n }\n\n this.uncheckRadios();\n }\n\n private uncheckRadios() {\n // make sure that no other radios are checked than the current one or no one\n this.radios.forEach((radio: HTMLStzhRadioElement) => {\n if (!this.checkedRadio || radio !== this.checkedRadio) {\n radio.checked = false;\n }\n });\n }\n\n private handleReset = async () => {\n this.value = this.defaultValue;\n };\n\n private init = () => {\n // update radios\n this.radios = Array.from(this.element.querySelectorAll(SELECTOR_RADIO));\n\n this.updateRadiosProperty(\"hide-optional\", true);\n this.updateRadiosProperty(\"a11y-describedby\", `${this.radiogroupId}-description`);\n this.updateRadiosProperty(\"invalid\", this.invalid || this.errorUsed);\n\n this.watchValue(this.value);\n this.watchName(this.name);\n this.watchDisabled(this.disabled);\n this.watchRequired(this.required);\n };\n\n componentDidLoad() {\n this.defaultValue = this.defaultValue ? this.defaultValue : this.value;\n }\n\n async componentWillLoad() {\n this.radiogroupId = `stzh-radiogroup-${radiogroupCounter++}`;\n this.errorWatcher(this.error);\n this.preventUpdatePropertiesWatcher(this.preventUpdateProperties);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"radiogroup\");\n }\n }\n\n componentShouldUpdate(_newValue, _oldValue, prop: string) {\n return prop !== \"checkedRadio\";\n }\n\n componentDidRender() {\n this.init();\n }\n\n connectedCallback() {\n if (!this.value) {\n this.radios = Array.from(this.element.querySelectorAll(SELECTOR_RADIO));\n\n // try to find a checkbox that might has checked set to true\n const checkedRadio = this.radios.find(radio => radio.checked);\n\n if (checkedRadio) {\n this.value = checkedRadio.value;\n }\n }\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 descriptionUsed = hasSlot(this.element, \"description\") || !!this.description;\n const descriptionLongUsed = hasSlot(this.element, \"description-long\") || !!this.descriptionLong;\n\n const classes = {\n \"stzh-radiogroup\": true,\n \"stzh-radiogroup--has-description\": descriptionUsed,\n \"stzh-radiogroup--has-description-long\": descriptionLongUsed,\n \"stzh-radiogroup--has-error\": this.errorUsed,\n \"stzh-radiogroup--is-required\": this.required,\n \"stzh-radiogroup--is-disabled\": this.disabled,\n \"stzh-radiogroup--is-invalid\": this.invalid || this.errorUsed,\n \"stzh-radiogroup--hide-legend\": this.hideLegend,\n [`stzh-radiogroup--direction-${this.direction}`]: !!this.direction,\n };\n\n return (\n <Host is-invalid={this.invalid || this.errorUsed}>\n <fieldset class={classes}>\n {this.legend && (\n <legend class=\"stzh-radiogroup__legend\">\n {this.legend}\n {!this.hideOptional && (\n <span class=\"stzh-radiogroup__marker\">\n <span class=\"stzh-radiogroup__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker}\n </span>\n <span class=\"stzh-radiogroup__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText}\n </span>\n </span>\n )}\n </legend>\n )}\n <div class=\"stzh-radiogroup__fields\">\n <slot></slot>\n </div>\n {(this._error?.length > 0 || this.description) && (\n <StzhInputDescription\n classPrefix=\"stzh-radiogroup\"\n id={`${this.radiogroupId}-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 </fieldset>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-877e658f.js","mappings":";;;;;;;AAAA,MAAM,iBAAiB,GAAG,61JAA61J,CAAC;AACx3J,6BAAe,iBAAiB;;ACShC,MAAM,cAAc,GAAG,gDAAgD,CAAC;AAExE,IAAI,iBAAiB,GAAG,CAAC,CAAC;MAcb,cAAc;;;;QAoDjB,6BAAwB,GAAa,EAAE,CAAC;QA4GxC,gBAAW,GAAG;YACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC;SAChC,CAAC;QAEM,SAAI,GAAG;;YAEb,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC;YAExE,IAAI,CAAC,oBAAoB,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;YACjD,IAAI,CAAC,oBAAoB,CAAC,kBAAkB,EAAE,GAAG,IAAI,CAAC,YAAY,cAAc,CAAC,CAAC;YAClF,IAAI,CAAC,oBAAoB,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;YAErE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC5B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC1B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAClC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACnC,CAAC;;wBA3K2C,KAAK;;;0BASH,KAAK;uBAGR,KAAK;wBAGJ,KAAK;4BAGD,KAAK;qBAGb,EAAE;4BAGK,EAAE;yBAGc,UAAU;;;;;4BAgBtB,IAAI;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7C,EACP,6DAAM,KAAK,EAAC,8BAA8B,IACvC,IAAI,CAAC,QAAQ;cACV,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,iBAAiB;cAC5C,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,iBAAiB,CAC3C,CACF,CACR,CACM,CACV,EACD,4DAAK,KAAK,EAAC,yBAAyB,IAClC,8DAAa,CACT,EACL,CAAC,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,MAAM,IAAG,CAAC,IAAI,IAAI,CAAC,WAAW,MAC3C,EAAC,oBAAoB,qDACnB,WAAW,EAAC,iBAAiB,EAC7B,EAAE,EAAE,GAAG,IAAI,CAAC,YAAY,cAAc,EACtC,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,CACH,CACQ,CACN,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-radiogroup/stzh-radiogroup.scss?tag=stzh-radiogroup&encapsulation=scoped","src/components/stzh-radiogroup/stzh-radiogroup.tsx"],"sourcesContent":[":host {\n --legend-color: var(--stzh-radio-group-legend-color, #{$headingColor});\n\n &[disabled]:not([disabled=\"false\"]) {\n --description-color: #{$formDisabledColor};\n }\n}\n\n.stzh-radiogroup {\n @include input-description;\n margin: 0;\n padding: 0;\n border: none;\n\n &__fields {\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n gap: space('medium');\n }\n\n &__legend {\n @include font('heavy');\n @include fontSize('micro');\n color: var(--legend-color);\n padding: 0;\n margin-bottom: space('xsmall');\n }\n\n &__marker {\n @include fontSize('nano');\n margin-left: calc(-0.25em + #{space('xsmall')});\n }\n\n &--hide-legend &__legend {\n @include visuallyhidden;\n }\n\n &--is-invalid &__legend,\n &--has-error &__legend {\n color: $colorError60;\n }\n\n &--is-disabled &__legend {\n color: $colorGrey60;\n }\n\n &--direction-horizontal &__fields {\n flex-wrap: wrap;\n flex-direction: row;\n row-gap: space('medium');\n column-gap: space('xxlarge');\n }\n}\n","import { Component, Element, h, Host, Listen, Prop, Watch } from \"@stencil/core\";\n\nimport { StzhRadioChangeEvent } from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { camelCase } from \"../../utils/string-utils\";\nimport { StzhLocaleComponent } from \"../../index\";\n\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\nconst SELECTOR_RADIO = \"stzh-radio, stzh-button[type=radio], stzh-card\";\n\nlet radiogroupCounter = 0;\n\n/**\n * @slot - Slot for `stzh-radio`, `stzh-button[type=\"radio\"]` or `stzh-card` 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-radiogroup\",\n styleUrl: \"stzh-radiogroup.scss\",\n scoped: true,\n})\nexport class StzhRadiogroup {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** The name of the input radio elements, will define the radio group. If you have more than one radio group on a page, every group needs to have its own unique name */\n @Prop({ reflect: true }) name: string;\n\n /** The legend */\n @Prop() legend: string;\n\n /** Hide legend to show only for screenreaders */\n @Prop({ reflect: true }) hideLegend: boolean = false;\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Hide `(optional)` label (or use `required` inside form to hide it) */\n @Prop({ reflect: true }) hideOptional: boolean = false;\n\n /** Select a radio by value */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** Default value (used by reset) */\n @Prop({ mutable: true }) defaultValue: string = \"\";\n\n /** Direction */\n @Prop({ reflect: true }) direction: \"vertical\" | \"horizontal\" = \"vertical\";\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 /** 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 /** Current checked radio element (readonly) */\n @Prop() checkedRadio: HTMLStzhRadioElement | null = null;\n\n /** Prevent updating certain properties of radio elements (possible values inside array: disabled, invalid, required, hide-marker) */\n @Prop() preventUpdateProperties: string[] | string = [];\n private _preventUpdateProperties: string[] = [];\n\n /** Host element */\n @Element() element: HTMLElement;\n\n @Watch(\"name\")\n watchName(newValue: string) {\n this.updateRadiosProperty(\"name\", newValue);\n }\n\n @Watch(\"disabled\")\n watchDisabled(newValue: boolean) {\n this.updateRadiosProperty(\"disabled\", newValue);\n }\n\n @Watch(\"required\")\n watchRequired(newValue: boolean) {\n this.updateRadiosProperty(\"required\", newValue);\n }\n\n @Watch(\"value\")\n watchValue(newValue: string) {\n this.updateCheckedRadioByValue(newValue);\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 @Watch(\"preventUpdateProperties\")\n preventUpdatePropertiesWatcher(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n this._preventUpdateProperties = JSON.parse(newValue);\n } else {\n this._preventUpdateProperties = newValue;\n }\n }\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 @Listen(\"stzhChange\")\n onChange(event: CustomEvent<StzhRadioChangeEvent>) {\n this.value = event.detail.value;\n }\n\n /** Radio elements */\n private radios: HTMLStzhRadioElement[];\n private radiogroupId: string;\n private observer: MutationObserver;\n\n private updateRadiosProperty(prop: string, value: any) {\n this.radios.forEach((radio: HTMLStzhRadioElement) => {\n if (prop === \"disabled\") {\n // Only set the disabled if the radio is not already disabled\n if (!radio.disabled) {\n radio.disabled = value;\n }\n } else if (prop === \"name\" || this._preventUpdateProperties.indexOf(prop) === -1) {\n radio[camelCase(prop)] = value;\n }\n });\n }\n\n private get errorUsed(): boolean {\n return hasSlot(this.element, \"error\") || this._error?.length > 0;\n }\n\n private updateCheckedRadioByValue(value: string) {\n this.checkedRadio = this.radios.find(radio => radio.value === value);\n\n if (this.checkedRadio) {\n this.checkedRadio.checked = true;\n }\n\n this.uncheckRadios();\n }\n\n private uncheckRadios() {\n // make sure that no other radios are checked than the current one or no one\n this.radios.forEach((radio: HTMLStzhRadioElement) => {\n if (!this.checkedRadio || radio !== this.checkedRadio) {\n radio.checked = false;\n }\n });\n }\n\n private handleReset = async () => {\n this.value = this.defaultValue;\n };\n\n private init = () => {\n // update radios\n this.radios = Array.from(this.element.querySelectorAll(SELECTOR_RADIO));\n\n this.updateRadiosProperty(\"hide-optional\", true);\n this.updateRadiosProperty(\"a11y-describedby\", `${this.radiogroupId}-description`);\n this.updateRadiosProperty(\"invalid\", this.invalid || this.errorUsed);\n\n this.watchValue(this.value);\n this.watchName(this.name);\n this.watchDisabled(this.disabled);\n this.watchRequired(this.required);\n };\n\n componentDidLoad() {\n this.defaultValue = this.defaultValue ? this.defaultValue : this.value;\n }\n\n async componentWillLoad() {\n this.radiogroupId = `stzh-radiogroup-${radiogroupCounter++}`;\n this.errorWatcher(this.error);\n this.preventUpdatePropertiesWatcher(this.preventUpdateProperties);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"radiogroup\");\n }\n }\n\n componentShouldUpdate(_newValue, _oldValue, prop: string) {\n return prop !== \"checkedRadio\";\n }\n\n componentDidRender() {\n this.init();\n }\n\n connectedCallback() {\n if (!this.value) {\n this.radios = Array.from(this.element.querySelectorAll(SELECTOR_RADIO));\n\n // try to find a checkbox that might has checked set to true\n const checkedRadio = this.radios.find(radio => radio.checked);\n\n if (checkedRadio) {\n this.value = checkedRadio.value;\n }\n }\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 descriptionUsed = hasSlot(this.element, \"description\") || !!this.description;\n const descriptionLongUsed = hasSlot(this.element, \"description-long\") || !!this.descriptionLong;\n\n const classes = {\n \"stzh-radiogroup\": true,\n \"stzh-radiogroup--has-description\": descriptionUsed,\n \"stzh-radiogroup--has-description-long\": descriptionLongUsed,\n \"stzh-radiogroup--has-error\": this.errorUsed,\n \"stzh-radiogroup--is-required\": this.required,\n \"stzh-radiogroup--is-disabled\": this.disabled,\n \"stzh-radiogroup--is-invalid\": this.invalid || this.errorUsed,\n \"stzh-radiogroup--hide-legend\": this.hideLegend,\n [`stzh-radiogroup--direction-${this.direction}`]: !!this.direction,\n };\n\n return (\n <Host is-invalid={this.invalid || this.errorUsed}>\n <fieldset class={classes}>\n {this.legend && (\n <legend class=\"stzh-radiogroup__legend\">\n {this.legend}\n {!this.hideOptional && (\n <span class=\"stzh-radiogroup__marker\">\n <span class=\"stzh-radiogroup__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker}\n </span>\n <span class=\"stzh-radiogroup__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText}\n </span>\n </span>\n )}\n </legend>\n )}\n <div class=\"stzh-radiogroup__fields\">\n <slot></slot>\n </div>\n {(this._error?.length > 0 || this.description) && (\n <StzhInputDescription\n classPrefix=\"stzh-radiogroup\"\n id={`${this.radiogroupId}-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 </fieldset>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -4,8 +4,8 @@ import { S as StzhInputDescription } from './p-6393ca35.js';
4
4
  import { d as defineCustomElement$5 } from './p-26f6521e.js';
5
5
  import { d as defineCustomElement$4 } from './p-f57f18a3.js';
6
6
  import { d as defineCustomElement$3 } from './p-8d12a95f.js';
7
- import { d as defineCustomElement$2 } from './p-3d24141a.js';
8
- import { d as defineCustomElement$1 } from './p-adc06dc4.js';
7
+ import { d as defineCustomElement$2 } from './p-7eced0db.js';
8
+ import { d as defineCustomElement$1 } from './p-ae7adee7.js';
9
9
 
10
10
  const stzhInputCss = ".sc-stzh-input-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-input-h,[stzh-hidden].sc-stzh-input-h{display:none}.sc-stzh-input-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-input-h *.sc-stzh-input,.sc-stzh-input-h *.sc-stzh-input::before,.sc-stzh-input-h *.sc-stzh-input::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-input-h .has-focus.sc-stzh-input{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-input-h .stzh-fylingfocus-focused.sc-stzh-input{outline-style:none !important}.sc-stzh-input-h .stzh-fylingfocus-focused.sc-stzh-input::-moz-focus-inner{border:0 !important}.sc-stzh-input-h{--text-align:left;--color:var(--stzh-input-color, var(--stzh-color-secondary60));--border-color:var(--stzh-color-grey70);--border-radius:var(--stzh-form-input-border-radius);--background-color:var(--stzh-color-white);--padding-top:var(--stzh-space-xsmall);--padding-bottom:var(--stzh-space-xsmall);--padding-left:var(--stzh-space-medium);--padding-right:var(--stzh-space-medium);--height:var(--stzh-form-input-height);--input-width:100%;--label-color:var(--stzh-input-label-color, var(--stzh-color-primary));--placeholder-color:var(--stzh-color-grey70);--button-right-color:var(--stzh-color-grey80);--hover-color:var(--stzh-input-hover-color, var(--stzh-color-secondary60));--hover-border-color:var(--stzh-input-hover-border-color, var(--stzh-color-secondary50));--hover-background-color:var(--stzh-color-white);--hover-button-right-color:var(--stzh-color-primary70);--focus-color:var(--stzh-color-black);--focus-border-color:var(--stzh-color-secondary50);--focus-background-color:var(--stzh-color-secondary20);--focus-button-right-color:var(--stzh-color-primary70);--text-selection-background-color:var(--stzh-color-secondary30);width:100%}[type=hidden].sc-stzh-input-h{position:absolute;top:-624.9375rem;left:-624.9375rem;visibility:hidden}[size=small].sc-stzh-input-h{--height:var(--stzh-form-input-small-height)}[is-filled].sc-stzh-input-h:not([is-filled=false]){--button-right-color:var(--stzh-color-primary70);--hover-button-right-color:var(--stzh-color-primary70);--focus-button-right-color:var(--stzh-color-black)}[is-invalid].sc-stzh-input-h{--color:var(--stzh-color-error60);--border-color:var(--stzh-color-error60);--background-color:var(--stzh-color-white);--label-color:var(--stzh-color-error60);--placeholder-color:var(--stzh-color-error60);--button-right-color:var(--stzh-color-error60);--hover-color:var(--stzh-color-error60);--hover-border-color:var(--stzh-color-error60);--hover-background-color:var(--stzh-color-white);--hover-button-right-color:var(--stzh-color-error60);--focus-color:var(--stzh-color-error60);--focus-border-color:var(--stzh-color-error60);--focus-background-color:var(--stzh-color-white);--focus-button-right-color:var(--stzh-color-error60)}[readonly].sc-stzh-input-h:not([readonly=false]),[disabled].sc-stzh-input-h:not([disabled=false]){--color:var(--stzh-color-grey70);--border-color:var(--stzh-color-grey70);--background-color:var(--stzh-color-grey10);--label-color:var(--stzh-color-grey70);--placeholder-color:var(--stzh-color-grey70);--description-color:var(--stzh-color-grey70);--button-right-color:var(--stzh-color-grey70);--hover-color:var(--stzh-color-grey70);--hover-border-color:var(--stzh-color-grey70);--hover-background-color:var(--stzh-color-grey10);--hover-button-right-color:var(--stzh-color-grey70);--focus-color:var(--stzh-color-grey70);--focus-border-color:var(--stzh-color-grey70);--focus-background-color:var(--stzh-color-grey10);--focus-button-right-color:var(--stzh-color-grey70)}.sc-stzh-input-h:is(:has(.stzh-input__input:hover)){--button-right-color:var(--hover-button-right-color)}.sc-stzh-input-h:is(:has(.stzh-input__input:focus)){--button-right-color:var(--focus-button-right-color)}.sc-stzh-input-h.sc-stzh-input-s>[slot=button-right],.sc-stzh-input-h .sc-stzh-input-s>[slot=button-right],.stzh-input__button-right.sc-stzh-input{position:absolute;top:0px;right:0px}.sc-stzh-input-h.sc-stzh-input-s>stzh-popover[slot=button-right],.sc-stzh-input-h .sc-stzh-input-s>stzh-popover[slot=button-right],.sc-stzh-input-h.sc-stzh-input-s>[slot=button-right],.sc-stzh-input-h.sc-stzh-input-s>[slot=button-right] stzh-popover,.sc-stzh-input-h .sc-stzh-input-s>[slot=button-right] stzh-popover{display:block}.sc-stzh-input-h.sc-stzh-input-s>stzh-button[slot=button-right],.sc-stzh-input-h .sc-stzh-input-s>stzh-button[slot=button-right],.sc-stzh-input-h.sc-stzh-input-s>stzh-button[slot=button-right][disabled]:not([disabled=false]),.sc-stzh-input-h .sc-stzh-input-s>stzh-button[slot=button-right][disabled]:not([disabled=false]),.sc-stzh-input-h.sc-stzh-input-s>stzh-popover[slot=button-right],.sc-stzh-input-h.sc-stzh-input-s>stzh-popover[slot=button-right] .stzh-popover__trigger stzh-button,.sc-stzh-input-h .sc-stzh-input-s>stzh-popover[slot=button-right] .stzh-popover__trigger stzh-button,.sc-stzh-input-h.sc-stzh-input-s>stzh-popover[slot=button-right] .stzh-popover__trigger stzh-button[disabled]:not([disabled=false]),.sc-stzh-input-h .sc-stzh-input-s>stzh-popover[slot=button-right] .stzh-popover__trigger stzh-button[disabled]:not([disabled=false]),.sc-stzh-input-h.sc-stzh-input-s>stzh-tooltip[slot=button-right] .stzh-tooltip__trigger stzh-button,.sc-stzh-input-h .sc-stzh-input-s>stzh-tooltip[slot=button-right] .stzh-tooltip__trigger stzh-button,.sc-stzh-input-h.sc-stzh-input-s>stzh-tooltip[slot=button-right] .stzh-tooltip__trigger stzh-button[disabled]:not([disabled=false]),.sc-stzh-input-h .sc-stzh-input-s>stzh-tooltip[slot=button-right] .stzh-tooltip__trigger stzh-button[disabled]:not([disabled=false]),.stzh-input__button-right.sc-stzh-input,.stzh-input__button-right[disabled].sc-stzh-input:not([disabled=false]){--color:var(--button-right-color);--background-color:transparent;--border-color:transparent;--hover-color:var(--button-right-color);--hover-background-color:transparent;--hover-border-color:transparent}.sc-stzh-input-h.sc-stzh-input-s>stzh-button[slot=button-right],.sc-stzh-input-h.sc-stzh-input-s>stzh-button[slot=button-right][size=default][icon-only]:not([icon-only=false]),.sc-stzh-input-h .sc-stzh-input-s>stzh-button[slot=button-right][size=default][icon-only]:not([icon-only=false]),.sc-stzh-input-h.sc-stzh-input-s>stzh-popover[slot=button-right],.sc-stzh-input-h.sc-stzh-input-s>stzh-popover[slot=button-right] .stzh-popover__trigger stzh-button,.sc-stzh-input-h.sc-stzh-input-s>stzh-popover[slot=button-right] .stzh-popover__trigger stzh-button[icon-only][size=default]:not([icon-only=false]),.sc-stzh-input-h .sc-stzh-input-s>stzh-popover[slot=button-right] .stzh-popover__trigger stzh-button[icon-only][size=default]:not([icon-only=false]),.sc-stzh-input-h.sc-stzh-input-s>stzh-tooltip[slot=button-right] .stzh-tooltip__trigger stzh-button,.sc-stzh-input-h.sc-stzh-input-s>stzh-tooltip[slot=button-right] .stzh-tooltip__trigger stzh-button[icon-only][size=default]:not([icon-only=false]),.sc-stzh-input-h .sc-stzh-input-s>stzh-tooltip[slot=button-right] .stzh-tooltip__trigger stzh-button[icon-only][size=default]:not([icon-only=false]),.stzh-input__button-right[size=default][icon-only].sc-stzh-input:not([icon-only=false]){--icon-size:var(--stzh-icon-size-medium)}.stzh-input__marker-symbol.sc-stzh-input{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium)}.stzh-input__marker-text.sc-stzh-input{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-input__description-wrapper.sc-stzh-input{display:flex;flex-direction:column-reverse;min-height:var(--description-min-height, var(--stzh-description-min-height, none))}.stzh-input__error.sc-stzh-input,.stzh-input__description.sc-stzh-input{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height)}.stzh-input__error.sc-stzh-input{color:var(--stzh-color-error60)}.stzh-input__error-list.sc-stzh-input{list-style:none;margin:0;padding:0}.stzh-input__description.sc-stzh-input{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-input__description-long.sc-stzh-input{margin-right:var(--stzh-space-xxsmall);margin-top:0.125rem}@supports (font: -apple-system-body) and (-webkit-appearance: none){.stzh-input__description-long.sc-stzh-input{margin-top:0}}.stzh-input__description-long-popover.sc-stzh-input{--width:auto;--max-width:27.3125rem}.stzh-input__description-long-button.sc-stzh-input{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-input.sc-stzh-input stzh-icon.stzh-input__description-long-icon.sc-stzh-input{--size:var(--stzh-icon-size-xsmall)}.stzh-input--has-error.sc-stzh-input .stzh-input__error.sc-stzh-input,.stzh-input--has-description.sc-stzh-input .stzh-input__description.sc-stzh-input{margin-top:var(--stzh-space-xxxsmall)}.stzh-input.sc-stzh-input .sc-stzh-input::selection{background:var(--text-selection-background-color)}.stzh-input__field-wrapper.sc-stzh-input{position:relative;display:flex;width:var(--input-width)}.stzh-input__input.sc-stzh-input{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-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);border:0.125rem solid var(--border-color);transition-property:color, border-color, background-color;transition-duration:var(--stzh-base-transition-animation-speed);border-radius:var(--border-radius);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);padding-left:var(--padding-left);padding-right:var(--padding-right);margin:0;width:100%;color:var(--color);background-color:var(--background-color);appearance:none;text-align:var(--text-align)}.stzh-input__input.sc-stzh-input::-webkit-input-placeholder{color:var(--placeholder-color)}.stzh-input__input.sc-stzh-input:-moz-placeholder{color:var(--placeholder-color)}.stzh-input__input.sc-stzh-input::-moz-placeholder{color:var(--placeholder-color)}.stzh-input__input.sc-stzh-input:-ms-input-placeholder{color:var(--placeholder-color)}.stzh-input__input.sc-stzh-input:hover{color:var(--hover-color);border-color:var(--hover-border-color);background-color:var(--hover-background-color)}.stzh-input__input.sc-stzh-input:focus{color:var(--focus-color);border-color:var(--focus-border-color);background-color:var(--focus-background-color)}.stzh-input__input.sc-stzh-input:-webkit-autofill{background-clip:text}.stzh-input__input.sc-stzh-input:placeholder-shown{text-overflow:ellipsis}.stzh-input__input[type=search].sc-stzh-input::-webkit-search-decoration,.stzh-input__input[type=search].sc-stzh-input::-webkit-search-cancel-button,.stzh-input__input[type=search].sc-stzh-input::-webkit-search-results-button,.stzh-input__input[type=search].sc-stzh-input::-webkit-search-results-decoration{-webkit-appearance:none}.stzh-input__input--input.sc-stzh-input{height:var(--height)}.stzh-input__input--textarea.sc-stzh-input{min-height:var(--height);resize:vertical}.stzh-input__label.sc-stzh-input{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;display:block;color:var(--label-color);width:auto;max-width:100%;margin-bottom:var(--stzh-space-xxxsmall)}.stzh-input__label.no-label-truncate.sc-stzh-input{text-overflow:clip;white-space:normal;overflow:visible}.stzh-input__label.sc-stzh-input:empty{display:none}.stzh-input__marker.sc-stzh-input{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-input--type-password.stzh-input--is-not-filled.sc-stzh-input .stzh-input__button-right.sc-stzh-input,.stzh-input--type-password.stzh-input--is-readonly.sc-stzh-input .stzh-input__button-right.sc-stzh-input,.stzh-input--type-password.stzh-input--is-disabled.sc-stzh-input .stzh-input__button-right.sc-stzh-input,.stzh-input--type-search.stzh-input--is-not-clearable.sc-stzh-input .stzh-input__button-right.sc-stzh-input,.stzh-input--type-search.stzh-input--is-not-filled.sc-stzh-input .stzh-input__button-right.sc-stzh-input,.stzh-input--type-search.stzh-input--is-readonly.sc-stzh-input .stzh-input__button-right.sc-stzh-input,.stzh-input--type-search.stzh-input--is-disabled.sc-stzh-input .stzh-input__button-right.sc-stzh-input{pointer-events:none}.stzh-input--has-button-right.sc-stzh-input .stzh-input__input.sc-stzh-input{padding-right:var(--height)}.stzh-input--size-small.sc-stzh-input .stzh-input__input.sc-stzh-input{font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height)}.stzh-input.sc-stzh-input:not(.stzh-input--has-spin) .stzh-input__input.sc-stzh-input::-webkit-outer-spin-button,.stzh-input.sc-stzh-input:not(.stzh-input--has-spin) .stzh-input__input.sc-stzh-input::-webkit-inner-spin-button{appearance:none;margin:0}.stzh-input.sc-stzh-input:not(.stzh-input--has-spin) .stzh-input__input[type=number].sc-stzh-input{appearance:textfield}.stzh-input--has-label-hidden.sc-stzh-input .stzh-input__label.sc-stzh-input{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-input--is-readonly.sc-stzh-input .stzh-input__input.sc-stzh-input,.stzh-input--is-disabled.sc-stzh-input .stzh-input__input.sc-stzh-input,.stzh-input--is-readonly.sc-stzh-input .stzh-input__label.sc-stzh-input,.stzh-input--is-disabled.sc-stzh-input .stzh-input__label.sc-stzh-input{cursor:not-allowed}";
11
11
  const StzhInputStyle0 = stzhInputCss;
@@ -318,4 +318,4 @@ function defineCustomElement() {
318
318
 
319
319
  export { StzhInput as S, defineCustomElement as d };
320
320
 
321
- //# sourceMappingURL=p-0c5f315f.js.map
321
+ //# sourceMappingURL=p-8c4ca44f.js.map
@@ -1 +1 @@
1
- {"file":"p-0c5f315f.js","mappings":";;;;;;;;;AAAA,MAAM,YAAY,GAAG,mqcAAmqc,CAAC;AACzrc,wBAAe,YAAY;;ACQ3B,IAAI,YAAY,GAAG,CAAC,CAAC;MAeR,SAAS;;;;;;;;QAsKZ,mBAAc,GAAY,KAAK,CAAC;QAOhC,iBAAY,GAAG,OAAO,KAAiB;YAC7C,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;YAChB,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YAEnB,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAE/B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;gBACnB,SAAS,EAAE,YAAY;gBACvB,aAAa,EAAE,KAAK;gBACpB,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CAAC;YAEH,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;gBACpB,SAAS,EAAE,YAAY;gBACvB,aAAa,EAAE,KAAK;gBACpB,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CAAC;SACJ,CAAC;QAEM,oCAA+B,GAAG;YACxC,IAAI,CAAC,YAAY,GAAG,CA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,EAAC,OAAO,EACZ,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,QAAQ,EAAE,IAAI,EACd,OAAO,EAAE,IAAI,CAAC,YAAY,EAC1B,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,gBAAgB,mBACvC,IAAI,CAAC,OAAO,GACd,KAEf,YAAM,IAAI,EAAC,cAAc,GAAQ,CAClC,KAED,YAAM,IAAI,EAAC,cAAc,GAAQ,CAClC,CACG,EACL,CAAC,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,MAAM,IAAG,CAAC,IAAI,IAAI,CAAC,WAAW,MAC3C,EAAC,oBAAoB,qDACnB,WAAW,EAAC,YAAY,EACxB,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,cAAc,EACjC,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,CACH,CACG,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-input/stzh-input.scss?tag=stzh-input&encapsulation=scoped","src/components/stzh-input/stzh-input.tsx"],"sourcesContent":["/**\n * @prop --text-align: Text align of field\n * @prop --input-width: Width of of field\n * @prop --padding-top: Padding top of field\n * @prop --padding-bottom: Padding bottom of field\n * @prop --padding-left: Padding left of field\n * @prop --padding-right: Padding right of field\n *\n * @prop --stzh-form-input-height: **Global**: Height of fields & buttons\n * @prop --stzh-form-input-small-height: **Global**: Height of fields & buttons when small variant is used\n * @prop --stzh-form-input-tiny-height: **Global**: Height of fields & buttons when tiny variant is used\n */\n\n:host {\n --text-align: left;\n --color: var(--stzh-input-color, #{$formColor});\n --border-color: #{$formBorderColor};\n --border-radius: #{$formInputBorderRadius};\n --background-color: #{$formBackgroundColor};\n --padding-top: #{space('xsmall')};\n --padding-bottom: #{space('xsmall')};\n --padding-left: #{space('medium')};\n --padding-right: #{space('medium')};\n --height: #{$formInputHeight};\n --input-width: 100%;\n --label-color: var(--stzh-input-label-color, #{$formLabelColor});\n --placeholder-color: #{$formInputPlaceholderColor};\n --button-right-color: #{$colorGrey80};\n\n --hover-color: var(--stzh-input-hover-color, #{$formHoverColor});\n --hover-border-color: var(--stzh-input-hover-border-color, #{$formHoverBorderColor});\n --hover-background-color: #{$formHoverBackgroundColor};\n --hover-button-right-color: #{$colorPrimary70};\n\n --focus-color: #{$formFocusColor};\n --focus-border-color: #{$formFocusBorderColor};\n --focus-background-color: #{$formFocusBackgroundColor};\n --focus-button-right-color: #{$colorPrimary70};\n\n --text-selection-background-color: #{$colorSecondary30};\n\n &[type=\"hidden\"] {\n position: absolute;\n top: -9999px;\n left: -9999px;\n visibility: hidden;\n }\n\n width: 100%;\n\n &[size=\"small\"] {\n --height: #{$formInputHeightSmall};\n }\n\n /* Filled */\n\n &[is-filled]:not([is-filled=\"false\"]) {\n --button-right-color: #{$colorPrimary70};\n --hover-button-right-color: #{$colorPrimary70};\n --focus-button-right-color: #{$formFocusColor};\n }\n\n /* Invalid */\n\n &[is-invalid] {\n --color: #{$colorError60};\n --border-color: #{$colorError60};\n --background-color: #{$colorWhite};\n --label-color: #{$colorError60};\n --placeholder-color: #{$colorError60};\n --button-right-color: #{$colorError60};\n\n --hover-color: #{$colorError60};\n --hover-border-color: #{$colorError60};\n --hover-background-color: #{$colorWhite};\n --hover-button-right-color: #{$colorError60};\n\n --focus-color: #{$colorError60};\n --focus-border-color: #{$colorError60};\n --focus-background-color: #{$colorWhite};\n --focus-button-right-color: #{$colorError60};\n }\n\n &[readonly]:not([readonly=\"false\"]),\n &[disabled]:not([disabled=\"false\"]) {\n --color: #{$formDisabledColor};\n --border-color: #{$formDisabledBorderColor};\n --background-color: #{$formDisabledBackgroundColor};\n --label-color: #{$formDisabledColor};\n --placeholder-color: #{$formDisabledColor};\n --description-color: #{$formDisabledColor};\n --button-right-color: #{$colorGrey70};\n\n --hover-color: #{$formDisabledColor};\n --hover-border-color: #{$formDisabledBorderColor};\n --hover-background-color: #{$formDisabledBackgroundColor};\n --hover-button-right-color: #{$colorGrey70};\n\n --focus-color: #{$formDisabledColor};\n --focus-border-color: #{$formDisabledBorderColor};\n --focus-background-color: #{$formDisabledBackgroundColor};\n --focus-button-right-color: #{$colorGrey70};\n }\n\n /* Internal (Hover / Focus) */\n\n &:is(:has(.stzh-input__input:hover)) {\n --button-right-color: var(--hover-button-right-color);\n }\n\n &:is(:has(.stzh-input__input:focus)) {\n --button-right-color: var(--focus-button-right-color);\n }\n}\n\n:host ::slotted([slot=\"button-right\"]),\n.stzh-input__button-right {\n position: absolute;\n top: 0px;\n right: 0px;\n}\n\n:host ::slotted(stzh-popover[slot=\"button-right\"]),\n:host ::slotted([slot=\"button-right\"]) stzh-popover {\n display: block;\n}\n\n:host ::slotted(stzh-button[slot=\"button-right\"]),\n:host ::slotted(stzh-button[slot=\"button-right\"][disabled]:not([disabled=\"false\"])),\n:host ::slotted(stzh-popover[slot=\"button-right\"]) .stzh-popover__trigger stzh-button,\n:host ::slotted(stzh-popover[slot=\"button-right\"]) .stzh-popover__trigger stzh-button[disabled]:not([disabled=\"false\"]),\n:host ::slotted(stzh-tooltip[slot=\"button-right\"]) .stzh-tooltip__trigger stzh-button,\n:host ::slotted(stzh-tooltip[slot=\"button-right\"]) .stzh-tooltip__trigger stzh-button[disabled]:not([disabled=\"false\"]),\n.stzh-input__button-right,\n.stzh-input__button-right[disabled]:not([disabled=\"false\"]) {\n --color: var(--button-right-color);\n --background-color: transparent;\n --border-color: transparent;\n\n --hover-color: var(--button-right-color);\n --hover-background-color: transparent;\n --hover-border-color: transparent;\n}\n\n// :host ::slotted(stzh-button[slot=\"button-right\"][disabled]:not([disabled=\"false\"])),\n// :host ::slotted([slot=\"button-right\"]) stzh-button[disabled]:not([disabled=\"false\"]),\n// .stzh-input__button-right[disabled]:not([disabled=\"false\"]) {\n// --hover-color: #{$colorGrey80};\n// }\n\n:host ::slotted(stzh-button[slot=\"button-right\"][size=\"default\"][icon-only]:not([icon-only=\"false\"])),\n:host ::slotted(stzh-popover[slot=\"button-right\"]) .stzh-popover__trigger stzh-button[icon-only][size=\"default\"]:not([icon-only=\"false\"]),\n:host ::slotted(stzh-tooltip[slot=\"button-right\"]) .stzh-tooltip__trigger stzh-button[icon-only][size=\"default\"]:not([icon-only=\"false\"]),\n.stzh-input__button-right[size=\"default\"][icon-only]:not([icon-only=\"false\"]) {\n --icon-size: #{iconSize('medium')};\n}\n\n.stzh-input {\n @include input-description;\n\n ::selection {\n background: var(--text-selection-background-color);\n }\n\n &__field-wrapper {\n position: relative;\n display: flex;\n width: var(--input-width);\n }\n\n &__input {\n @include font;\n @include fontSize('milli');\n border: 2px solid var(--border-color);\n transition-property: color, border-color, background-color;\n transition-duration: $baseTransitionAnimationSpeed;\n border-radius: var(--border-radius);\n padding-top: var(--padding-top);\n padding-bottom: var(--padding-bottom);\n padding-left: var(--padding-left);\n padding-right: var(--padding-right);\n margin: 0;\n width: 100%;\n color: var(--color);\n background-color: var(--background-color);\n appearance: none;\n text-align: var(--text-align);\n\n @include placeholder {\n color: var(--placeholder-color);\n }\n\n &:hover {\n color: var(--hover-color);\n border-color: var(--hover-border-color);\n background-color: var(--hover-background-color);\n }\n\n &:focus {\n color: var(--focus-color);\n border-color: var(--focus-border-color);\n background-color: var(--focus-background-color);\n }\n\n // prevent ugly autofill background color in chrome\n &:-webkit-autofill {\n background-clip: text;\n }\n\n // show ellipsis for placeholders that are too long\n &:placeholder-shown {\n text-overflow: ellipsis;\n }\n\n // hide search clear icon on chrome\n &[type=\"search\"]::-webkit-search-decoration,\n &[type=\"search\"]::-webkit-search-cancel-button,\n &[type=\"search\"]::-webkit-search-results-button,\n &[type=\"search\"]::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n\n /* Normal inputs */\n\n &--input {\n height: var(--height);\n }\n\n /* Textarea */\n\n &--textarea {\n min-height: var(--height);\n resize: vertical;\n }\n }\n\n &__label {\n @include font('heavy');\n @include fontSize('micro');\n @include truncate;\n display: block;\n color: var(--label-color);\n width: auto;\n max-width: 100%;\n margin-bottom: space('xxxsmall');\n // position: absolute;\n // top: calc(#{$formInputHeight} / 2);\n // // padding-left (medium) + border-left\n // left: calc(#{space('medium')} + 1px);\n // max-width: calc(100% - #{space('medium')} * 2);\n // transform: translateY(-50%);\n // transition: all $baseTransitionAnimationSpeed;\n // pointer-events: none;\n\n &.no-label-truncate {\n @include resetTruncate;\n }\n\n &:empty {\n display: none;\n }\n\n // &::before {\n // content: '';\n // display: none;\n // background: $colorWhite;\n // position: absolute;\n // width: 100%;\n // z-index: -1;\n // left: 0;\n // top: 50%;\n // // prevent white line not fully overlaping border of input\n // margin-top: -0.5px;\n // height: 2px;\n // }\n }\n\n &__marker {\n @include fontSize('nano');\n margin-left: calc(-0.25em + #{space('xsmall')});\n }\n\n /* Clearable / Search input / Password */\n\n &--type-password#{&}--is-not-filled &__button-right,\n &--type-password#{&}--is-readonly &__button-right,\n &--type-password#{&}--is-disabled &__button-right,\n &--type-search#{&}--is-not-clearable &__button-right,\n &--type-search#{&}--is-not-filled &__button-right,\n &--type-search#{&}--is-readonly &__button-right,\n &--type-search#{&}--is-disabled &__button-right {\n pointer-events: none;\n }\n\n /* Styles for floating label */\n\n // &:not(#{&}--is-readonly):not(#{&}--is-disabled) &__input:focus + &__label,\n // &--has-fixed-label &__label,\n // &--is-filled &__label,\n // &--is-readonly &__label,\n // &--is-disabled &__label,\n // &--is-invalid &__label {\n // display: block;\n // top: 0;\n // // padding-left (input field medium) - padding-left\n // left: calc(#{space('medium')} - #{space('xxsmall')});\n // height: 20px; // dividable by two (so before element is always positioned correctly)\n // line-height: 20px;\n // padding: 0 space('xxsmall');\n // max-width: calc(100% - #{space('small')} * 2);\n // pointer-events: all;\n\n // &:not(:empty)::before {\n // display: block;\n // }\n // }\n\n /* Button Right Variant */\n\n &--has-button-right &__input {\n // distance to icon + icon button width\n padding-right: var(--height);\n }\n\n // &--has-button-right &__label {\n // // 100% - ((padding left of normal variant + border 1px) * 2) - icon button width\n // max-width: calc(100% - (#{space('medium')} + 1px) * 2 - #{$formInputHeight});\n // }\n\n // &--has-button-right#{&}:not(#{&}--is-readonly):not(#{&}--is-disabled) &__input:focus + &__label,\n // &--has-button-right#{&}--has-fixed-label &__label,\n // &--has-button-right#{&}--is-filled &__label,\n // &--has-button-right#{&}--is-readonly &__label,\n // &--has-button-right#{&}--is-disabled &__label,\n // &--has-button-right#{&}--is-invalid &__label {\n // // 100% - left distance to text + 1px border + padding label right side - icon button width\n // max-width: calc(100% - #{space('medium')} - #{space('xxsmall')} - 1px + #{space('xxsmall')} - #{$formInputHeight});\n // }\n\n /* Size variants */\n\n &--size-small &__input {\n @include fontSize('micro');\n }\n\n // &--size-small &__label {\n // top: calc(#{$formInputHeightSmall} / 2);\n // }\n\n // &--size-small#{&}:not(#{&}--is-readonly):not(#{&}--is-disabled) &__input:focus + &__label,\n // &--size-small#{&}--has-fixed-label &__label,\n // &--size-small#{&}--is-filled &__label,\n // &--size-small#{&}--is-readonly &__label,\n // &--size-small#{&}--is-disabled &__label,\n // &--size-small#{&}--is-invalid &__label {\n // top: 0;\n // }\n\n // &--size-small#{&}--has-button-right &__label {\n // max-width: calc(100% - (#{space('medium')} + 1px) * 2 - #{$formInputHeightSmall});\n // }\n\n // &--size-small#{&}--has-button-right#{&}:not(#{&}--is-readonly):not(#{&}--is-disabled) &__input:focus + &__label,\n // &--size-small#{&}--has-button-right#{&}--has-fixed-label &__label,\n // &--size-small#{&}--has-button-right#{&}--is-filled &__label,\n // &--size-small#{&}--has-button-right#{&}--is-readonly &__label,\n // &--size-small#{&}--has-button-right#{&}--is-disabled &__label,\n // &--size-small#{&}--has-button-right#{&}--is-invalid &__label {\n // max-width: calc(100% - #{space('medium')} - #{space('xxsmall')} - 1px + #{space('xsmall')} - #{$formInputHeightSmall});\n // }\n\n /* Spin button */\n\n &:not(#{&}--has-spin) &__input {\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n appearance: none;\n margin: 0;\n }\n\n &[type=\"number\"] {\n appearance: textfield;\n }\n }\n\n /* Hidden label */\n\n &--has-label-hidden &__label {\n @include visuallyhidden;\n }\n\n /* Readonly / Disabled */\n\n &--is-readonly &__input,\n &--is-disabled &__input,\n &--is-readonly &__label,\n &--is-disabled &__label {\n cursor: not-allowed;\n }\n\n // &--is-readonly &__label,\n // &--is-disabled &__label {\n // &::before {\n // background: transparent;\n // }\n // }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Listen, Prop, State, Watch } from \"@stencil/core\";\n\nimport { StzhInputBlurEvent, StzhInputChangedEvent, StzhInputChangeEvent, StzhInputFocusEvent } from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../index\";\n\nimport { StzhInputDescription } from \"./stzh-input-description\";\n\nlet inputCounter = 0;\n\n/**\n * @slot - Slot for label content\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 * @slot button-right - Slot for right button\n */\n@Component({\n tag: \"stzh-input\",\n styleUrl: \"stzh-input.scss\",\n scoped: true,\n})\nexport class StzhInput {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Whether the input is a textarea or an input field */\n @Prop() multiline: boolean = false;\n\n /** Rows attribute if input element is textarea */\n @Prop() rows: number;\n\n /** If input field, this defines the type (if `search`, a search icon will be displayed) */\n @Prop({ reflect: true }) type: \"text\" | \"search\" | \"password\" | \"email\" | \"url\" | \"tel\" | \"number\" | \"hidden\" =\n \"text\";\n\n /** If input type is number, this will be the step size */\n @Prop() step: number = 1;\n\n /** If input type is number, this will be the minimum step number */\n @Prop() min: number;\n\n /** If input type is number, this will be the maximum step number */\n @Prop() max: number;\n\n /** If input type is number and this property is true, this will show the spin buttons on hover/focus */\n @Prop({ reflect: true }) showSpin: boolean = false;\n\n /** Whether the element is readonly or not */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Whether clearable button is showing when input field has value and is enabled (button-right slot not usable anymore when true) */\n @Prop({ reflect: true }) clearable: boolean = false;\n\n /** Hide `(optional)` label (or use `required` inside form to hide it) */\n @Prop({ reflect: true }) hideOptional: boolean = false;\n\n /** Minimum of characters */\n @Prop() minlength: number;\n\n /** Maxlength of characters */\n @Prop() maxlength: number;\n\n /** The name of the input element */\n @Prop({ reflect: true }) name: string;\n\n /** The value of the input element */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** Default value (used by reset) */\n @Prop({ mutable: true }) defaultValue: 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 /** 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 /**\n * Specify inputmode.\n * See [MDN](https://developer.mozilla.org/de/docs/Web/HTML/Global_attributes/inputmode) for possible values\n */\n @Prop() inputmode: string;\n\n /**\n * Specify what the user agent has to provide as automated assistance.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for possible values\n */\n @Prop() autocomplete: string = \"on\";\n\n /** Whether autocomplete should be turned off */\n @Prop() noAutocomplete: boolean = false;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Whether label should be truncate or not */\n @Prop() noLabelTruncate: boolean = false; \n\n /** Whether label should be visually hidden. */\n @Prop() labelHidden: boolean = false;\n\n /** Size variant */\n @Prop({ reflect: true }) size: \"default\" | \"small\" = \"default\";\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 /** Whether the input is filled or not */\n @State() filled: boolean;\n\n /** Whether to show the password or not */\n @State() showPassword: boolean;\n\n @Element() element: HTMLStzhInputElement;\n\n /** Input change event */\n @Event() stzhChange: EventEmitter<StzhInputChangeEvent>;\n\n /** Input changed event */\n @Event() stzhChanged: EventEmitter<StzhInputChangedEvent>;\n\n /** Input focus event */\n @Event() stzhFocus: EventEmitter<StzhInputFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhInputBlurEvent>;\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) {\n this.filled = newValue !== \"\";\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 @Watch(\"type\")\n typeWatcher(newValue: string) {\n const types = [\"text\", \"search\", \"password\", \"email\", \"url\", \"tel\", \"number\", \"hidden\"];\n\n if (!this.multiline && !types.includes(newValue)) {\n throw new Error(`Type ${newValue} not supported`);\n }\n }\n\n private input: HTMLInputElement | HTMLTextAreaElement;\n private inputId: string;\n private focusedByInput: boolean = false;\n private renderPromiseResolve: (value?: unknown) => void;\n\n private waitForNextRender() {\n return new Promise(resolve => (this.renderPromiseResolve = resolve));\n }\n\n private onClearClick = async (event: MouseEvent) => {\n this.value = \"\";\n this.input.focus();\n\n await this.waitForNextRender();\n\n this.stzhChange.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value,\n });\n\n this.stzhChanged.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value,\n });\n };\n\n private onTogglePasswordVisibilityClick = async () => {\n this.showPassword = !this.showPassword;\n };\n\n private handleReset = async () => {\n this.value = this.defaultValue;\n // we also update value, since render doesn't get executed sometimes\n this.input.value = this.defaultValue;\n\n // TODO: check if we need own reset event or trigger the change event\n // (custom browser behaviour doesn't send change event, when reset is executed)\n // this.stzhChange.emit({\n // component: \"stzh-input\",\n // originalEvent: event,\n // value: this.value\n // });\n };\n\n private onInput = (event: InputEvent) => {\n this.value = this.input.value;\n\n this.stzhChange.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value,\n });\n };\n\n private onChange = (event: InputEvent) => {\n this.value = this.input.value;\n\n this.stzhChanged.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value,\n });\n };\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.input.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-input\",\n originalEvent: event,\n });\n };\n\n private onBlur = (event: FocusEvent) => {\n // fixes weird bug where autofill selection doesn't get removed\n this.input.value = this.input.value;\n\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-input\",\n originalEvent: event,\n });\n };\n\n private renderTextarea(): HTMLTextAreaElement {\n return (\n <textarea\n class=\"stzh-input__input stzh-input__input--textarea\"\n ref={el => (this.input = el as HTMLTextAreaElement)}\n id={this.inputId}\n name={this.name}\n value={this.value}\n rows={this.rows}\n disabled={this.disabled}\n readonly={this.readonly}\n minlength={this.minlength}\n maxlength={this.maxlength}\n aria-describedby={`${this.inputId}-description ${this.a11yDescribedby}`}\n aria-required={this.required ? \"true\" : \"false\"}\n aria-invalid={this.invalid ? \"true\" : \"false\"}\n onChange={this.onChange}\n onInput={this.onInput}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n ></textarea>\n );\n }\n\n private renderInput(): HTMLInputElement {\n return (\n <input\n class=\"stzh-input__input stzh-input__input--input\"\n ref={el => (this.input = el as HTMLInputElement)}\n id={this.inputId}\n type={this.showPassword ? \"text\" : this.type}\n name={this.name}\n value={this.value}\n defaultValue={this.defaultValue}\n min={this.min}\n max={this.max}\n step={this.step}\n inputmode={this.inputmode}\n disabled={this.disabled}\n readonly={this.readonly}\n minlength={this.minlength}\n maxlength={this.maxlength}\n autocomplete={this.noAutocomplete ? \"off\" : this.autocomplete}\n aria-autocomplete={this.noAutocomplete ? \"none\" : undefined}\n aria-describedby={`${this.inputId}-description ${this.a11yDescribedby}`}\n aria-required={this.required ? \"true\" : \"false\"}\n aria-invalid={this.invalid ? \"true\" : \"false\"}\n onChange={this.onChange}\n onInput={this.onInput}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n />\n );\n }\n\n componentDidRender() {\n if (this.renderPromiseResolve) {\n this.renderPromiseResolve();\n }\n }\n\n async componentWillLoad() {\n this.inputId = `stzh-input-${inputCounter++}`;\n this.typeWatcher(this.type);\n this.valueWatcher(this.value);\n this.errorWatcher(this.error);\n\n this.defaultValue = this.defaultValue || this.value;\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"input\");\n }\n }\n\n render() {\n const buttonRightSlotUsed = hasSlot(this.element, \"button-right\");\n const descriptionUsed = hasSlot(this.element, \"description\") || !!this.description;\n const descriptionLongUsed = hasSlot(this.element, \"description-long\") || !!this.descriptionLong;\n const errorUsed = hasSlot(this.element, \"error\") || this._error?.length > 0;\n\n const classes = {\n \"stzh-input\": true,\n \"stzh-input--has-button-right\":\n buttonRightSlotUsed ||\n this.type === \"search\" ||\n (this.clearable && this.filled && !this.readonly && !this.disabled),\n \"stzh-input--has-description\": descriptionUsed,\n \"stzh-input--has-description-long\": descriptionLongUsed,\n \"stzh-input--has-error\": errorUsed,\n \"stzh-input--has-spin\": this.showSpin,\n \"stzh-input--is-invalid\": this.invalid || errorUsed,\n \"stzh-input--is-disabled\": this.disabled,\n \"stzh-input--is-readonly\": this.readonly,\n \"stzh-input--is-required\": this.required,\n \"stzh-input--is-filled\": this.filled,\n \"stzh-input--is-not-filled\": !this.filled,\n \"stzh-input--is-clearable\": this.clearable,\n \"stzh-input--is-not-clearable\": !this.clearable,\n \"stzh-input--has-label-hidden\": this.labelHidden,\n [`stzh-input--size-${this.size}`]: !!this.size,\n [`stzh-input--type-${this.type}`]: !!this.type,\n };\n\n return (\n <Host\n is-invalid={this.invalid || errorUsed}\n tabindex={this.disabled ? null : \"-1\"}\n onFocus={this.onRootFocus}\n is-filled={this.filled}\n >\n <div class={classes}>\n <label \n class={{\n \"stzh-input__label\": true,\n \"no-label-truncate\": this.noLabelTruncate,\n }} \n htmlFor={this.inputId}\n >\n {this.label ? this.label : <slot></slot>}\n {!this.hideOptional && (\n <span class=\"stzh-input__marker\">\n <span class=\"stzh-input__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker}\n </span>\n <span class=\"stzh-input__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText}\n </span>\n </span>\n )}\n </label>\n <div class=\"stzh-input__field-wrapper\">\n {this.multiline ? this.renderTextarea() : this.renderInput()}\n {this.clearable || this.type === \"search\" || this.type === \"password\" ? (\n (!this.clearable || this.disabled || this.readonly || !this.filled) &&\n (this.type === \"search\" || this.type === \"password\") ? (\n <stzh-button\n class=\"stzh-input__button-right\"\n icon={this.type === \"search\" ? \"search\" : \"view\"}\n size={this.size}\n iconOnly={true}\n onClick={this.onTogglePasswordVisibilityClick}\n disabled={this.disabled || this.readonly}\n ></stzh-button>\n ) : this.filled ? (\n <stzh-button\n class=\"stzh-input__button-right\"\n icon=\"close\"\n size={this.size}\n iconOnly={true}\n onClick={this.onClearClick}\n a11yLabel={this.localization.$globals.clearButtonLabel}\n aria-controls={this.inputId}\n ></stzh-button>\n ) : (\n <slot name=\"button-right\"></slot>\n )\n ) : (\n <slot name=\"button-right\"></slot>\n )}\n </div>\n {(this._error?.length > 0 || this.description) && (\n <StzhInputDescription\n classPrefix=\"stzh-input\"\n id={`${this.inputId}-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 </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-8c4ca44f.js","mappings":";;;;;;;;;AAAA,MAAM,YAAY,GAAG,mqcAAmqc,CAAC;AACzrc,wBAAe,YAAY;;ACQ3B,IAAI,YAAY,GAAG,CAAC,CAAC;MAeR,SAAS;;;;;;;;QAsKZ,mBAAc,GAAY,KAAK,CAAC;QAOhC,iBAAY,GAAG,OAAO,KAAiB;YAC7C,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;YAChB,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YAEnB,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAE/B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;gBACnB,SAAS,EAAE,YAAY;gBACvB,aAAa,EAAE,KAAK;gBACpB,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CAAC;YAEH,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;gBACpB,SAAS,EAAE,YAAY;gBACvB,aAAa,EAAE,KAAK;gBACpB,KAAK,EAAE,I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,IAAI,IAAI,CAAC,QAAQ,GAC3B,IACb,IAAI,CAAC,MAAM,IACb,mBACE,KAAK,EAAC,0BAA0B,EAChC,IAAI,EAAC,OAAO,EACZ,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,QAAQ,EAAE,IAAI,EACd,OAAO,EAAE,IAAI,CAAC,YAAY,EAC1B,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,gBAAgB,mBACvC,IAAI,CAAC,OAAO,GACd,KAEf,YAAM,IAAI,EAAC,cAAc,GAAQ,CAClC,KAED,YAAM,IAAI,EAAC,cAAc,GAAQ,CAClC,CACG,EACL,CAAC,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,MAAM,IAAG,CAAC,IAAI,IAAI,CAAC,WAAW,MAC3C,EAAC,oBAAoB,qDACnB,WAAW,EAAC,YAAY,EACxB,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,cAAc,EACjC,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,CACH,CACG,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-input/stzh-input.scss?tag=stzh-input&encapsulation=scoped","src/components/stzh-input/stzh-input.tsx"],"sourcesContent":["/**\n * @prop --text-align: Text align of field\n * @prop --input-width: Width of of field\n * @prop --padding-top: Padding top of field\n * @prop --padding-bottom: Padding bottom of field\n * @prop --padding-left: Padding left of field\n * @prop --padding-right: Padding right of field\n *\n * @prop --stzh-form-input-height: **Global**: Height of fields & buttons\n * @prop --stzh-form-input-small-height: **Global**: Height of fields & buttons when small variant is used\n * @prop --stzh-form-input-tiny-height: **Global**: Height of fields & buttons when tiny variant is used\n */\n\n:host {\n --text-align: left;\n --color: var(--stzh-input-color, #{$formColor});\n --border-color: #{$formBorderColor};\n --border-radius: #{$formInputBorderRadius};\n --background-color: #{$formBackgroundColor};\n --padding-top: #{space('xsmall')};\n --padding-bottom: #{space('xsmall')};\n --padding-left: #{space('medium')};\n --padding-right: #{space('medium')};\n --height: #{$formInputHeight};\n --input-width: 100%;\n --label-color: var(--stzh-input-label-color, #{$formLabelColor});\n --placeholder-color: #{$formInputPlaceholderColor};\n --button-right-color: #{$colorGrey80};\n\n --hover-color: var(--stzh-input-hover-color, #{$formHoverColor});\n --hover-border-color: var(--stzh-input-hover-border-color, #{$formHoverBorderColor});\n --hover-background-color: #{$formHoverBackgroundColor};\n --hover-button-right-color: #{$colorPrimary70};\n\n --focus-color: #{$formFocusColor};\n --focus-border-color: #{$formFocusBorderColor};\n --focus-background-color: #{$formFocusBackgroundColor};\n --focus-button-right-color: #{$colorPrimary70};\n\n --text-selection-background-color: #{$colorSecondary30};\n\n &[type=\"hidden\"] {\n position: absolute;\n top: -9999px;\n left: -9999px;\n visibility: hidden;\n }\n\n width: 100%;\n\n &[size=\"small\"] {\n --height: #{$formInputHeightSmall};\n }\n\n /* Filled */\n\n &[is-filled]:not([is-filled=\"false\"]) {\n --button-right-color: #{$colorPrimary70};\n --hover-button-right-color: #{$colorPrimary70};\n --focus-button-right-color: #{$formFocusColor};\n }\n\n /* Invalid */\n\n &[is-invalid] {\n --color: #{$colorError60};\n --border-color: #{$colorError60};\n --background-color: #{$colorWhite};\n --label-color: #{$colorError60};\n --placeholder-color: #{$colorError60};\n --button-right-color: #{$colorError60};\n\n --hover-color: #{$colorError60};\n --hover-border-color: #{$colorError60};\n --hover-background-color: #{$colorWhite};\n --hover-button-right-color: #{$colorError60};\n\n --focus-color: #{$colorError60};\n --focus-border-color: #{$colorError60};\n --focus-background-color: #{$colorWhite};\n --focus-button-right-color: #{$colorError60};\n }\n\n &[readonly]:not([readonly=\"false\"]),\n &[disabled]:not([disabled=\"false\"]) {\n --color: #{$formDisabledColor};\n --border-color: #{$formDisabledBorderColor};\n --background-color: #{$formDisabledBackgroundColor};\n --label-color: #{$formDisabledColor};\n --placeholder-color: #{$formDisabledColor};\n --description-color: #{$formDisabledColor};\n --button-right-color: #{$colorGrey70};\n\n --hover-color: #{$formDisabledColor};\n --hover-border-color: #{$formDisabledBorderColor};\n --hover-background-color: #{$formDisabledBackgroundColor};\n --hover-button-right-color: #{$colorGrey70};\n\n --focus-color: #{$formDisabledColor};\n --focus-border-color: #{$formDisabledBorderColor};\n --focus-background-color: #{$formDisabledBackgroundColor};\n --focus-button-right-color: #{$colorGrey70};\n }\n\n /* Internal (Hover / Focus) */\n\n &:is(:has(.stzh-input__input:hover)) {\n --button-right-color: var(--hover-button-right-color);\n }\n\n &:is(:has(.stzh-input__input:focus)) {\n --button-right-color: var(--focus-button-right-color);\n }\n}\n\n:host ::slotted([slot=\"button-right\"]),\n.stzh-input__button-right {\n position: absolute;\n top: 0px;\n right: 0px;\n}\n\n:host ::slotted(stzh-popover[slot=\"button-right\"]),\n:host ::slotted([slot=\"button-right\"]) stzh-popover {\n display: block;\n}\n\n:host ::slotted(stzh-button[slot=\"button-right\"]),\n:host ::slotted(stzh-button[slot=\"button-right\"][disabled]:not([disabled=\"false\"])),\n:host ::slotted(stzh-popover[slot=\"button-right\"]) .stzh-popover__trigger stzh-button,\n:host ::slotted(stzh-popover[slot=\"button-right\"]) .stzh-popover__trigger stzh-button[disabled]:not([disabled=\"false\"]),\n:host ::slotted(stzh-tooltip[slot=\"button-right\"]) .stzh-tooltip__trigger stzh-button,\n:host ::slotted(stzh-tooltip[slot=\"button-right\"]) .stzh-tooltip__trigger stzh-button[disabled]:not([disabled=\"false\"]),\n.stzh-input__button-right,\n.stzh-input__button-right[disabled]:not([disabled=\"false\"]) {\n --color: var(--button-right-color);\n --background-color: transparent;\n --border-color: transparent;\n\n --hover-color: var(--button-right-color);\n --hover-background-color: transparent;\n --hover-border-color: transparent;\n}\n\n// :host ::slotted(stzh-button[slot=\"button-right\"][disabled]:not([disabled=\"false\"])),\n// :host ::slotted([slot=\"button-right\"]) stzh-button[disabled]:not([disabled=\"false\"]),\n// .stzh-input__button-right[disabled]:not([disabled=\"false\"]) {\n// --hover-color: #{$colorGrey80};\n// }\n\n:host ::slotted(stzh-button[slot=\"button-right\"][size=\"default\"][icon-only]:not([icon-only=\"false\"])),\n:host ::slotted(stzh-popover[slot=\"button-right\"]) .stzh-popover__trigger stzh-button[icon-only][size=\"default\"]:not([icon-only=\"false\"]),\n:host ::slotted(stzh-tooltip[slot=\"button-right\"]) .stzh-tooltip__trigger stzh-button[icon-only][size=\"default\"]:not([icon-only=\"false\"]),\n.stzh-input__button-right[size=\"default\"][icon-only]:not([icon-only=\"false\"]) {\n --icon-size: #{iconSize('medium')};\n}\n\n.stzh-input {\n @include input-description;\n\n ::selection {\n background: var(--text-selection-background-color);\n }\n\n &__field-wrapper {\n position: relative;\n display: flex;\n width: var(--input-width);\n }\n\n &__input {\n @include font;\n @include fontSize('milli');\n border: 2px solid var(--border-color);\n transition-property: color, border-color, background-color;\n transition-duration: $baseTransitionAnimationSpeed;\n border-radius: var(--border-radius);\n padding-top: var(--padding-top);\n padding-bottom: var(--padding-bottom);\n padding-left: var(--padding-left);\n padding-right: var(--padding-right);\n margin: 0;\n width: 100%;\n color: var(--color);\n background-color: var(--background-color);\n appearance: none;\n text-align: var(--text-align);\n\n @include placeholder {\n color: var(--placeholder-color);\n }\n\n &:hover {\n color: var(--hover-color);\n border-color: var(--hover-border-color);\n background-color: var(--hover-background-color);\n }\n\n &:focus {\n color: var(--focus-color);\n border-color: var(--focus-border-color);\n background-color: var(--focus-background-color);\n }\n\n // prevent ugly autofill background color in chrome\n &:-webkit-autofill {\n background-clip: text;\n }\n\n // show ellipsis for placeholders that are too long\n &:placeholder-shown {\n text-overflow: ellipsis;\n }\n\n // hide search clear icon on chrome\n &[type=\"search\"]::-webkit-search-decoration,\n &[type=\"search\"]::-webkit-search-cancel-button,\n &[type=\"search\"]::-webkit-search-results-button,\n &[type=\"search\"]::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n\n /* Normal inputs */\n\n &--input {\n height: var(--height);\n }\n\n /* Textarea */\n\n &--textarea {\n min-height: var(--height);\n resize: vertical;\n }\n }\n\n &__label {\n @include font('heavy');\n @include fontSize('micro');\n @include truncate;\n display: block;\n color: var(--label-color);\n width: auto;\n max-width: 100%;\n margin-bottom: space('xxxsmall');\n // position: absolute;\n // top: calc(#{$formInputHeight} / 2);\n // // padding-left (medium) + border-left\n // left: calc(#{space('medium')} + 1px);\n // max-width: calc(100% - #{space('medium')} * 2);\n // transform: translateY(-50%);\n // transition: all $baseTransitionAnimationSpeed;\n // pointer-events: none;\n\n &.no-label-truncate {\n @include resetTruncate;\n }\n\n &:empty {\n display: none;\n }\n\n // &::before {\n // content: '';\n // display: none;\n // background: $colorWhite;\n // position: absolute;\n // width: 100%;\n // z-index: -1;\n // left: 0;\n // top: 50%;\n // // prevent white line not fully overlaping border of input\n // margin-top: -0.5px;\n // height: 2px;\n // }\n }\n\n &__marker {\n @include fontSize('nano');\n margin-left: calc(-0.25em + #{space('xsmall')});\n }\n\n /* Clearable / Search input / Password */\n\n &--type-password#{&}--is-not-filled &__button-right,\n &--type-password#{&}--is-readonly &__button-right,\n &--type-password#{&}--is-disabled &__button-right,\n &--type-search#{&}--is-not-clearable &__button-right,\n &--type-search#{&}--is-not-filled &__button-right,\n &--type-search#{&}--is-readonly &__button-right,\n &--type-search#{&}--is-disabled &__button-right {\n pointer-events: none;\n }\n\n /* Styles for floating label */\n\n // &:not(#{&}--is-readonly):not(#{&}--is-disabled) &__input:focus + &__label,\n // &--has-fixed-label &__label,\n // &--is-filled &__label,\n // &--is-readonly &__label,\n // &--is-disabled &__label,\n // &--is-invalid &__label {\n // display: block;\n // top: 0;\n // // padding-left (input field medium) - padding-left\n // left: calc(#{space('medium')} - #{space('xxsmall')});\n // height: 20px; // dividable by two (so before element is always positioned correctly)\n // line-height: 20px;\n // padding: 0 space('xxsmall');\n // max-width: calc(100% - #{space('small')} * 2);\n // pointer-events: all;\n\n // &:not(:empty)::before {\n // display: block;\n // }\n // }\n\n /* Button Right Variant */\n\n &--has-button-right &__input {\n // distance to icon + icon button width\n padding-right: var(--height);\n }\n\n // &--has-button-right &__label {\n // // 100% - ((padding left of normal variant + border 1px) * 2) - icon button width\n // max-width: calc(100% - (#{space('medium')} + 1px) * 2 - #{$formInputHeight});\n // }\n\n // &--has-button-right#{&}:not(#{&}--is-readonly):not(#{&}--is-disabled) &__input:focus + &__label,\n // &--has-button-right#{&}--has-fixed-label &__label,\n // &--has-button-right#{&}--is-filled &__label,\n // &--has-button-right#{&}--is-readonly &__label,\n // &--has-button-right#{&}--is-disabled &__label,\n // &--has-button-right#{&}--is-invalid &__label {\n // // 100% - left distance to text + 1px border + padding label right side - icon button width\n // max-width: calc(100% - #{space('medium')} - #{space('xxsmall')} - 1px + #{space('xxsmall')} - #{$formInputHeight});\n // }\n\n /* Size variants */\n\n &--size-small &__input {\n @include fontSize('micro');\n }\n\n // &--size-small &__label {\n // top: calc(#{$formInputHeightSmall} / 2);\n // }\n\n // &--size-small#{&}:not(#{&}--is-readonly):not(#{&}--is-disabled) &__input:focus + &__label,\n // &--size-small#{&}--has-fixed-label &__label,\n // &--size-small#{&}--is-filled &__label,\n // &--size-small#{&}--is-readonly &__label,\n // &--size-small#{&}--is-disabled &__label,\n // &--size-small#{&}--is-invalid &__label {\n // top: 0;\n // }\n\n // &--size-small#{&}--has-button-right &__label {\n // max-width: calc(100% - (#{space('medium')} + 1px) * 2 - #{$formInputHeightSmall});\n // }\n\n // &--size-small#{&}--has-button-right#{&}:not(#{&}--is-readonly):not(#{&}--is-disabled) &__input:focus + &__label,\n // &--size-small#{&}--has-button-right#{&}--has-fixed-label &__label,\n // &--size-small#{&}--has-button-right#{&}--is-filled &__label,\n // &--size-small#{&}--has-button-right#{&}--is-readonly &__label,\n // &--size-small#{&}--has-button-right#{&}--is-disabled &__label,\n // &--size-small#{&}--has-button-right#{&}--is-invalid &__label {\n // max-width: calc(100% - #{space('medium')} - #{space('xxsmall')} - 1px + #{space('xsmall')} - #{$formInputHeightSmall});\n // }\n\n /* Spin button */\n\n &:not(#{&}--has-spin) &__input {\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n appearance: none;\n margin: 0;\n }\n\n &[type=\"number\"] {\n appearance: textfield;\n }\n }\n\n /* Hidden label */\n\n &--has-label-hidden &__label {\n @include visuallyhidden;\n }\n\n /* Readonly / Disabled */\n\n &--is-readonly &__input,\n &--is-disabled &__input,\n &--is-readonly &__label,\n &--is-disabled &__label {\n cursor: not-allowed;\n }\n\n // &--is-readonly &__label,\n // &--is-disabled &__label {\n // &::before {\n // background: transparent;\n // }\n // }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Listen, Prop, State, Watch } from \"@stencil/core\";\n\nimport { StzhInputBlurEvent, StzhInputChangedEvent, StzhInputChangeEvent, StzhInputFocusEvent } from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../index\";\n\nimport { StzhInputDescription } from \"./stzh-input-description\";\n\nlet inputCounter = 0;\n\n/**\n * @slot - Slot for label content\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 * @slot button-right - Slot for right button\n */\n@Component({\n tag: \"stzh-input\",\n styleUrl: \"stzh-input.scss\",\n scoped: true,\n})\nexport class StzhInput {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Whether the input is a textarea or an input field */\n @Prop() multiline: boolean = false;\n\n /** Rows attribute if input element is textarea */\n @Prop() rows: number;\n\n /** If input field, this defines the type (if `search`, a search icon will be displayed) */\n @Prop({ reflect: true }) type: \"text\" | \"search\" | \"password\" | \"email\" | \"url\" | \"tel\" | \"number\" | \"hidden\" =\n \"text\";\n\n /** If input type is number, this will be the step size */\n @Prop() step: number = 1;\n\n /** If input type is number, this will be the minimum step number */\n @Prop() min: number;\n\n /** If input type is number, this will be the maximum step number */\n @Prop() max: number;\n\n /** If input type is number and this property is true, this will show the spin buttons on hover/focus */\n @Prop({ reflect: true }) showSpin: boolean = false;\n\n /** Whether the element is readonly or not */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Whether clearable button is showing when input field has value and is enabled (button-right slot not usable anymore when true) */\n @Prop({ reflect: true }) clearable: boolean = false;\n\n /** Hide `(optional)` label (or use `required` inside form to hide it) */\n @Prop({ reflect: true }) hideOptional: boolean = false;\n\n /** Minimum of characters */\n @Prop() minlength: number;\n\n /** Maxlength of characters */\n @Prop() maxlength: number;\n\n /** The name of the input element */\n @Prop({ reflect: true }) name: string;\n\n /** The value of the input element */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** Default value (used by reset) */\n @Prop({ mutable: true }) defaultValue: 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 /** 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 /**\n * Specify inputmode.\n * See [MDN](https://developer.mozilla.org/de/docs/Web/HTML/Global_attributes/inputmode) for possible values\n */\n @Prop() inputmode: string;\n\n /**\n * Specify what the user agent has to provide as automated assistance.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for possible values\n */\n @Prop() autocomplete: string = \"on\";\n\n /** Whether autocomplete should be turned off */\n @Prop() noAutocomplete: boolean = false;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Whether label should be truncate or not */\n @Prop() noLabelTruncate: boolean = false; \n\n /** Whether label should be visually hidden. */\n @Prop() labelHidden: boolean = false;\n\n /** Size variant */\n @Prop({ reflect: true }) size: \"default\" | \"small\" = \"default\";\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 /** Whether the input is filled or not */\n @State() filled: boolean;\n\n /** Whether to show the password or not */\n @State() showPassword: boolean;\n\n @Element() element: HTMLStzhInputElement;\n\n /** Input change event */\n @Event() stzhChange: EventEmitter<StzhInputChangeEvent>;\n\n /** Input changed event */\n @Event() stzhChanged: EventEmitter<StzhInputChangedEvent>;\n\n /** Input focus event */\n @Event() stzhFocus: EventEmitter<StzhInputFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhInputBlurEvent>;\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) {\n this.filled = newValue !== \"\";\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 @Watch(\"type\")\n typeWatcher(newValue: string) {\n const types = [\"text\", \"search\", \"password\", \"email\", \"url\", \"tel\", \"number\", \"hidden\"];\n\n if (!this.multiline && !types.includes(newValue)) {\n throw new Error(`Type ${newValue} not supported`);\n }\n }\n\n private input: HTMLInputElement | HTMLTextAreaElement;\n private inputId: string;\n private focusedByInput: boolean = false;\n private renderPromiseResolve: (value?: unknown) => void;\n\n private waitForNextRender() {\n return new Promise(resolve => (this.renderPromiseResolve = resolve));\n }\n\n private onClearClick = async (event: MouseEvent) => {\n this.value = \"\";\n this.input.focus();\n\n await this.waitForNextRender();\n\n this.stzhChange.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value,\n });\n\n this.stzhChanged.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value,\n });\n };\n\n private onTogglePasswordVisibilityClick = async () => {\n this.showPassword = !this.showPassword;\n };\n\n private handleReset = async () => {\n this.value = this.defaultValue;\n // we also update value, since render doesn't get executed sometimes\n this.input.value = this.defaultValue;\n\n // TODO: check if we need own reset event or trigger the change event\n // (custom browser behaviour doesn't send change event, when reset is executed)\n // this.stzhChange.emit({\n // component: \"stzh-input\",\n // originalEvent: event,\n // value: this.value\n // });\n };\n\n private onInput = (event: InputEvent) => {\n this.value = this.input.value;\n\n this.stzhChange.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value,\n });\n };\n\n private onChange = (event: InputEvent) => {\n this.value = this.input.value;\n\n this.stzhChanged.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value,\n });\n };\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.input.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-input\",\n originalEvent: event,\n });\n };\n\n private onBlur = (event: FocusEvent) => {\n // fixes weird bug where autofill selection doesn't get removed\n this.input.value = this.input.value;\n\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-input\",\n originalEvent: event,\n });\n };\n\n private renderTextarea(): HTMLTextAreaElement {\n return (\n <textarea\n class=\"stzh-input__input stzh-input__input--textarea\"\n ref={el => (this.input = el as HTMLTextAreaElement)}\n id={this.inputId}\n name={this.name}\n value={this.value}\n rows={this.rows}\n disabled={this.disabled}\n readonly={this.readonly}\n minlength={this.minlength}\n maxlength={this.maxlength}\n aria-describedby={`${this.inputId}-description ${this.a11yDescribedby}`}\n aria-required={this.required ? \"true\" : \"false\"}\n aria-invalid={this.invalid ? \"true\" : \"false\"}\n onChange={this.onChange}\n onInput={this.onInput}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n ></textarea>\n );\n }\n\n private renderInput(): HTMLInputElement {\n return (\n <input\n class=\"stzh-input__input stzh-input__input--input\"\n ref={el => (this.input = el as HTMLInputElement)}\n id={this.inputId}\n type={this.showPassword ? \"text\" : this.type}\n name={this.name}\n value={this.value}\n defaultValue={this.defaultValue}\n min={this.min}\n max={this.max}\n step={this.step}\n inputmode={this.inputmode}\n disabled={this.disabled}\n readonly={this.readonly}\n minlength={this.minlength}\n maxlength={this.maxlength}\n autocomplete={this.noAutocomplete ? \"off\" : this.autocomplete}\n aria-autocomplete={this.noAutocomplete ? \"none\" : undefined}\n aria-describedby={`${this.inputId}-description ${this.a11yDescribedby}`}\n aria-required={this.required ? \"true\" : \"false\"}\n aria-invalid={this.invalid ? \"true\" : \"false\"}\n onChange={this.onChange}\n onInput={this.onInput}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n />\n );\n }\n\n componentDidRender() {\n if (this.renderPromiseResolve) {\n this.renderPromiseResolve();\n }\n }\n\n async componentWillLoad() {\n this.inputId = `stzh-input-${inputCounter++}`;\n this.typeWatcher(this.type);\n this.valueWatcher(this.value);\n this.errorWatcher(this.error);\n\n this.defaultValue = this.defaultValue || this.value;\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"input\");\n }\n }\n\n render() {\n const buttonRightSlotUsed = hasSlot(this.element, \"button-right\");\n const descriptionUsed = hasSlot(this.element, \"description\") || !!this.description;\n const descriptionLongUsed = hasSlot(this.element, \"description-long\") || !!this.descriptionLong;\n const errorUsed = hasSlot(this.element, \"error\") || this._error?.length > 0;\n\n const classes = {\n \"stzh-input\": true,\n \"stzh-input--has-button-right\":\n buttonRightSlotUsed ||\n this.type === \"search\" ||\n (this.clearable && this.filled && !this.readonly && !this.disabled),\n \"stzh-input--has-description\": descriptionUsed,\n \"stzh-input--has-description-long\": descriptionLongUsed,\n \"stzh-input--has-error\": errorUsed,\n \"stzh-input--has-spin\": this.showSpin,\n \"stzh-input--is-invalid\": this.invalid || errorUsed,\n \"stzh-input--is-disabled\": this.disabled,\n \"stzh-input--is-readonly\": this.readonly,\n \"stzh-input--is-required\": this.required,\n \"stzh-input--is-filled\": this.filled,\n \"stzh-input--is-not-filled\": !this.filled,\n \"stzh-input--is-clearable\": this.clearable,\n \"stzh-input--is-not-clearable\": !this.clearable,\n \"stzh-input--has-label-hidden\": this.labelHidden,\n [`stzh-input--size-${this.size}`]: !!this.size,\n [`stzh-input--type-${this.type}`]: !!this.type,\n };\n\n return (\n <Host\n is-invalid={this.invalid || errorUsed}\n tabindex={this.disabled ? null : \"-1\"}\n onFocus={this.onRootFocus}\n is-filled={this.filled}\n >\n <div class={classes}>\n <label \n class={{\n \"stzh-input__label\": true,\n \"no-label-truncate\": this.noLabelTruncate,\n }} \n htmlFor={this.inputId}\n >\n {this.label ? this.label : <slot></slot>}\n {!this.hideOptional && (\n <span class=\"stzh-input__marker\">\n <span class=\"stzh-input__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker}\n </span>\n <span class=\"stzh-input__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText}\n </span>\n </span>\n )}\n </label>\n <div class=\"stzh-input__field-wrapper\">\n {this.multiline ? this.renderTextarea() : this.renderInput()}\n {this.clearable || this.type === \"search\" || this.type === \"password\" ? (\n (!this.clearable || this.disabled || this.readonly || !this.filled) &&\n (this.type === \"search\" || this.type === \"password\") ? (\n <stzh-button\n class=\"stzh-input__button-right\"\n icon={this.type === \"search\" ? \"search\" : \"view\"}\n size={this.size}\n iconOnly={true}\n onClick={this.onTogglePasswordVisibilityClick}\n disabled={this.disabled || this.readonly}\n ></stzh-button>\n ) : this.filled ? (\n <stzh-button\n class=\"stzh-input__button-right\"\n icon=\"close\"\n size={this.size}\n iconOnly={true}\n onClick={this.onClearClick}\n a11yLabel={this.localization.$globals.clearButtonLabel}\n aria-controls={this.inputId}\n ></stzh-button>\n ) : (\n <slot name=\"button-right\"></slot>\n )\n ) : (\n <slot name=\"button-right\"></slot>\n )}\n </div>\n {(this._error?.length > 0 || this.description) && (\n <StzhInputDescription\n classPrefix=\"stzh-input\"\n id={`${this.inputId}-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 </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -5,9 +5,9 @@ import { d as defineCustomElement$7 } from './p-f57f18a3.js';
5
5
  import { d as defineCustomElement$6 } from './p-8d12a95f.js';
6
6
  import { d as defineCustomElement$5 } from './p-18d44ffb.js';
7
7
  import { d as defineCustomElement$4 } from './p-0310b26a.js';
8
- import { d as defineCustomElement$3 } from './p-3d24141a.js';
9
- import { d as defineCustomElement$2 } from './p-adc06dc4.js';
10
- import { d as defineCustomElement$1 } from './p-da29e441.js';
8
+ import { d as defineCustomElement$3 } from './p-7eced0db.js';
9
+ import { d as defineCustomElement$2 } from './p-ae7adee7.js';
10
+ import { d as defineCustomElement$1 } from './p-a518f263.js';
11
11
 
12
12
  const stzhActionsetCss = ".sc-stzh-actionset-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-actionset-h,[stzh-hidden].sc-stzh-actionset-h{display:none}.sc-stzh-actionset-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-actionset-h *.sc-stzh-actionset,.sc-stzh-actionset-h *.sc-stzh-actionset::before,.sc-stzh-actionset-h *.sc-stzh-actionset::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-actionset-h .has-focus.sc-stzh-actionset{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-actionset-h .stzh-fylingfocus-focused.sc-stzh-actionset{outline-style:none !important}.sc-stzh-actionset-h .stzh-fylingfocus-focused.sc-stzh-actionset::-moz-focus-inner{border:0 !important}.stzh-actionset__actions.sc-stzh-actionset{display:flex;align-items:center}.stzh-actionset__actions-wrapper.sc-stzh-actionset{position:relative;display:flex;flex-wrap:wrap;overflow:hidden}.stzh-actionset__action.sc-stzh-actionset:not(:last-child){margin-right:var(--stzh-space-xsmall)}.stzh-actionset__action-popover-wrapper.sc-stzh-actionset{opacity:0}.stzh-actionset--has-collapsed-items.sc-stzh-actionset .stzh-actionset__action-popover-wrapper.sc-stzh-actionset{opacity:1}.stzh-actionset--has-collapsed-items.sc-stzh-actionset .stzh-actionset__action-popover.sc-stzh-actionset{--width:auto}@media screen and (min-width: 900px){.stzh-actionset--overflow.sc-stzh-actionset .stzh-actionset__action.sc-stzh-actionset{--white-space:nowrap}}@media screen and (max-width: 599px){.stzh-actionset--stack.sc-stzh-actionset .stzh-actionset__actions.sc-stzh-actionset{flex-direction:column;align-items:stretch}}@media screen and (max-width: 599px){.stzh-actionset--stack.sc-stzh-actionset .stzh-actionset__actions-wrapper.sc-stzh-actionset{flex-direction:column;align-items:stretch}}@media screen and (min-width: 600px){.stzh-actionset--stack.sc-stzh-actionset .stzh-actionset__action.sc-stzh-actionset{--white-space:nowrap}}@media screen and (max-width: 599px){.stzh-actionset--stack.sc-stzh-actionset .stzh-actionset__action.sc-stzh-actionset:not(:last-child){margin-bottom:var(--stzh-space-xsmall);margin-right:0}}@media screen and (max-width: 599px){.stzh-actionset--stack.sc-stzh-actionset .stzh-actionset__action-popover-wrapper.sc-stzh-actionset{margin-top:var(--stzh-space-xsmall)}}@media screen and (max-width: 599px){.stzh-actionset--stack.sc-stzh-actionset:not(.stzh-actionset--has-collapsed-items) .stzh-actionset__action-popover-wrapper.sc-stzh-actionset{display:none}}";
13
13
  const StzhActionsetStyle0 = stzhActionsetCss;
@@ -236,4 +236,4 @@ function defineCustomElement() {
236
236
 
237
237
  export { StzhActionset as S, defineCustomElement as d };
238
238
 
239
- //# sourceMappingURL=p-70aa77ed.js.map
239
+ //# sourceMappingURL=p-978466ee.js.map
@@ -1 +1 @@
1
- {"file":"p-70aa77ed.js","mappings":";;;;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,g4FAAg4F,CAAC;AAC15F,4BAAe,gBAAgB;;MCmClB,aAAa;;;;;QAsBhB,aAAQ,GAAwB,EAAE,CAAC;QAyBnC,gBAAW,GAAG,CAAC,MAAyB,EAAE,aAAyB;YACzE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;gBACxB,SAAS,EAAE,gBAAgB;gBAC3B,MAAM;gBACN,aAAa;aACd,CAAC,CAAC;SACJ,CAAA;QAEO,WAAM,GAAG;YACf,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;YACtC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC;YAExC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;gBACxB,OAAO;aACR;YAED,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,EAA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AAW,IAAI,EAAC,SAAS,IACtB,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,KAC/B;;YAEE,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,UAAU,EAAE,MAAM,CAAC,UAAU,EAC7B,SAAS,EAAE,MAAM,CAAC,SAAS,EAC3B,OAAO,EAAE,CAAC,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA,EAAE;WAE9C,MAAM,CAAC,KAAK,CACE,CAClB,CAAC,CACQ,CACC,CACX,CACF,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-actionset/stzh-actionset.scss?tag=stzh-actionset&encapsulation=scoped","src/components/stzh-actionset/stzh-actionset.tsx"],"sourcesContent":[":host {\n\n}\n\n.stzh-actionset {\n &__actions {\n display: flex;\n align-items: center;\n }\n\n &__actions-wrapper {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n overflow: hidden;\n }\n\n &__action {\n &:not(:last-child) {\n margin-right: space('xsmall');\n }\n }\n\n &__action-popover-wrapper {\n opacity: 0;\n }\n\n &--has-collapsed-items &__action-popover-wrapper {\n opacity: 1;\n }\n\n &--has-collapsed-items &__action-popover {\n --width: auto;\n }\n\n /* Overflow variant */\n\n &--overflow &__action {\n @include mq($from: medium) {\n --white-space: nowrap;\n }\n }\n\n /* Stack variant */\n\n &--stack &__actions {\n @include mq($to: small) {\n flex-direction: column;\n align-items: stretch;\n }\n }\n\n &--stack &__actions-wrapper { \n @include mq($to: small) {\n flex-direction: column;\n align-items: stretch;\n }\n }\n\n &--stack &__action {\n @include mq($from: small) {\n --white-space: nowrap;\n }\n\n &:not(:last-child) {\n @include mq($to: small) {\n margin-bottom: space('xsmall');\n margin-right: 0;\n }\n }\n }\n\n &--stack &__action-popover-wrapper {\n @include mq($to: small) {\n margin-top: space('xsmall');\n }\n }\n\n // Hide more action popover on small if it has no collapsed items\n\n &--stack:not(#{&}--has-collapsed-items) &__action-popover-wrapper {\n @include mq($to: small) {\n display: none;\n }\n }\n}\n","import {\n Component,\n Host,\n Prop,\n h,\n Element,\n Watch,\n Event,\n EventEmitter,\n State\n} from \"@stencil/core\";\n\nimport {\n StzhActionsetItem,\n StzhActionsetItemClickEvent\n} from \"../../index\";\n\nimport { StzhActionsetLocalizedText } from './stzh-actionset.localization';\n\nimport {\n media,\n addMediaChangeListener,\n removeMediaChangeListener\n} from '../../utils/media-utils';\n\nimport {\n Placement,\n} from \"@floating-ui/dom\";\n\n/**\n */\n@Component({\n tag: \"stzh-actionset\",\n styleUrl: \"stzh-actionset.scss\",\n scoped: true\n})\nexport class StzhActionset {\n /** Translation strings */\n @Prop() localization: StzhActionsetLocalizedText;\n\n /** Variant determining what position the action buttons are */\n @Prop({ reflect: true }) variant: \"stack\" | \"overflow\" = \"stack\";\n\n /** Button variant of popover button (button thats holds collapsed actions) */\n @Prop({ reflect: true }) popoverButtonVariant: \"\" | \"default\" | \"secondary\" | \"tertiary\" = \"\";\n\n /** Button size of popover button (button that holds collapsed actions) */\n @Prop({ reflect: true }) popoverButtonSize: \"\" | \"default\" | \"small\" | \"tiny\" = \"\";\n\n /** Popover placement of button that holds collapsed actions */\n @Prop({ reflect: true }) popoverPlacement: Placement = \"bottom-end\";\n\n /**\n * Card header actions.\n * Array of objects that can include the button attributes `id`, `variant`, `icon`, `size`, `iconPosition`, `iconOnly`, `label` or `badge`:\n * `[{\"id\":\"action-1\", \"icon\": \"alarm-bell\", \"label\": \"Lorem\"}, {\"id\":\"action-2\", \"icon\": \"mail\", \"label\": \"Lorem\"}]`\n */\n @Prop() actions: StzhActionsetItem[] | string = [];\n private _actions: StzhActionsetItem[] = [];\n\n /** Header action click event */\n @Event() stzhActionClick: EventEmitter<StzhActionsetItemClickEvent>;\n\n @Element() element: HTMLStzhActionsetElement;\n\n @Watch(\"actions\")\n actionsWatcher(newValue: StzhActionsetItem[] | string) {\n if (typeof newValue === \"string\") {\n this._actions = JSON.parse(newValue);\n } else {\n this._actions = newValue;\n }\n }\n\n @State() actionsCollapsed: StzhActionsetItem[] = [];\n @State() dynamicActions: boolean;\n @State() isSmall: boolean;\n @State() isMedium: boolean;\n\n private actionsElement: HTMLElement;\n private debounceResize: number;\n private resizeObserver: ResizeObserver;\n\n private actionClick = (action: StzhActionsetItem, originalEvent: MouseEvent) => {\n this.stzhActionClick.emit({\n component: \"stzh-actionset\",\n action,\n originalEvent\n });\n }\n\n private update = () => {\n this.isSmall = media(\"small\").matches;\n this.isMedium = media(\"medium\").matches;\n\n if (!this.actionsElement) {\n return;\n }\n\n Object.assign(this.actionsElement.style, {\n width: null,\n height: null\n });\n\n let newActionsVisible = 0;\n\n if (\n this.variant === \"overflow\" && this.isMedium\n || this.variant === \"stack\" && this.isSmall\n ) {\n this.dynamicActions = true;\n\n let newActionsHeight = 0;\n let newActionsWidth = 0;\n\n // update height and width\n Array.from(this.actionsElement.children).forEach((child: HTMLElement) => {\n // check which item is visible and\n if (child.offsetTop === 0) {\n newActionsVisible++;\n\n const { width, height } = child.getBoundingClientRect();\n\n const style = getComputedStyle(child);\n const marginLeft = parseInt(style.marginLeft);\n const marginRight = parseInt(style.marginRight);\n const marginTop = parseInt(style.marginTop);\n const marginBottom = parseInt(style.marginBottom);\n\n const childWidth = width + marginLeft + marginRight;\n const childHeight = height + marginTop + marginBottom;\n\n if (newActionsHeight < childHeight) {\n newActionsHeight = childHeight;\n }\n\n newActionsWidth = newActionsWidth + childWidth;\n }\n });\n\n Object.assign(this.actionsElement.style, {\n width: `${newActionsWidth}px`,\n height: `${newActionsHeight}px`\n });\n } else {\n this.dynamicActions = false;\n\n if (this.variant === \"overflow\") {\n newActionsVisible = 0;\n } else if (this.variant === \"stack\") {\n newActionsVisible = this._actions.length <= 3 ? this._actions.length : 2;\n }\n }\n\n this.actionsCollapsed = this._actions.slice(newActionsVisible);\n }\n\n private handleResize = () => {\n if (this.debounceResize) {\n window.cancelAnimationFrame(this.debounceResize);\n }\n\n this.debounceResize = requestAnimationFrame(this.update);\n }\n\n private mediaChangeHandler = () => {\n this.actionsCollapsed = [];\n requestAnimationFrame(this.update);\n }\n\n async componentWillLoad() {\n this.actionsWatcher(this.actions);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"actionset\");\n }\n }\n\n connectedCallback() {\n addMediaChangeListener(this.mediaChangeHandler);\n\n this.resizeObserver = new ResizeObserver(this.handleResize);\n this.resizeObserver.observe(this.element);\n }\n\n disconnectedCallback() {\n removeMediaChangeListener(this.mediaChangeHandler);\n\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n }\n\n componentDidLoad() {\n this.update();\n }\n\n render() {\n const classes = {\n \"stzh-actionset\": true,\n // \"stzh-actionset--has-dynamic-actions\": this.dynamicActions,\n \"stzh-actionset--has-collapsed-items\": this.actionsCollapsed.length > 0,\n [`stzh-actionset--${this.variant}`]: !!this.variant\n };\n\n const Action = (action: StzhActionsetItem, disableTabbing: boolean) => (\n <stzh-button\n a11yTabindex={disableTabbing ? \"-1\" : null}\n class={{\n \"stzh-actionset__action\": true,\n \"is-button\": true\n }}\n label={action.label}\n icon={action.icon}\n iconPosition={action.iconPosition}\n iconOnly={action.iconOnly}\n badge={action.badge}\n variant={action.variant\n ? action.variant\n : (this.variant === \"stack\" ? \"secondary\" : \"tertiary\")}\n size={action.size\n ? action.size\n : (this.variant === \"stack\" ? \"small\" : \"tiny\")}\n badgePosition=\"icon\"\n onClick={(e) => { this.actionClick(action, e) }}\n ></stzh-button>\n );\n\n return (\n <Host has-collapsed-items={this.actionsCollapsed.length > 0}>\n <div class={classes}>\n <div class=\"stzh-actionset__actions\" role=\"group\">\n <div\n ref={(el) => (this.actionsElement = el as HTMLElement)}\n class=\"stzh-actionset__actions-wrapper\"\n >\n {this._actions.map(action => (\n (this.dynamicActions\n || (!this.dynamicActions &&\n this.actionsCollapsed.indexOf(action) === -1))\n &&\n (action.tooltipContent\n ?\n <stzh-tooltip\n strategy=\"fixed\"\n content={action.tooltipContent}\n >\n {Action(action, this.dynamicActions && this.actionsCollapsed.indexOf(action) > -1)}\n </stzh-tooltip>\n :\n Action(action, this.dynamicActions && this.actionsCollapsed.indexOf(action) > -1)\n )\n ))}\n </div>\n\n <div class=\"stzh-actionset__action-popover-wrapper\">\n <stzh-popover\n label={this.variant === \"stack\"\n ? this.localization.furtherActions\n : (!this.isMedium ? this.localization.actions : \"\")}\n strategy=\"fixed\"\n placement={this.popoverPlacement}\n class=\"stzh-actionset__action-popover\"\n >\n <stzh-button\n fullwidth\n disabled={this.actionsCollapsed.length === 0}\n class=\"stzh-actionset__action is-further\"\n variant={this.popoverButtonVariant !== \"\"\n ? this.popoverButtonVariant\n : (this.variant === \"stack\" ? \"secondary\" : \"tertiary\")}\n size={this.popoverButtonSize !== \"\"\n ? this.popoverButtonSize\n : (this.variant === \"stack\" ? \"small\" : \"tiny\")}\n icon={this.variant === \"stack\" ? \"angle-down\" : \"more-vertical\"}\n iconOnly={this.variant === \"overflow\" && this.isMedium}\n iconPosition=\"right\"\n label={this.variant === \"stack\"\n ? this.localization.furtherActions\n : (!this.isMedium ? this.localization.actions : \"\")}\n a11yLabel={this.variant === \"overflow\" && this.localization.actions}\n ></stzh-button>\n <stzh-menu slot=\"content\">\n {this.actionsCollapsed.map(action => (\n <stzh-menu-item\n // class=\"hide-medium show-when-collapsed\"\n icon={action.icon}\n badge={action.badge}\n badgeEmpty={action.badgeEmpty}\n badgeType={action.badgeType}\n onClick={(e) => { this.actionClick(action, e) }}\n >\n {action.label}\n </stzh-menu-item>\n ))}\n </stzh-menu>\n </stzh-popover>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-978466ee.js","mappings":";;;;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,g4FAAg4F,CAAC;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C/B,IAAI,CAAC,iBAAiB;mBACrB,IAAI,CAAC,OAAO,KAAK,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC,EACjD,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO,GAAG,YAAY,GAAG,eAAe,EAC/D,QAAQ,EAAE,IAAI,CAAC,OAAO,KAAK,UAAU,IAAI,IAAI,CAAC,QAAQ,EACtD,YAAY,EAAC,OAAO,EACpB,KAAK,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO;kBAC3B,IAAI,CAAC,YAAY,CAAC,cAAc;mBAC/B,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,GAAG,EAAE,CAAC,EACrD,SAAS,EAAE,IAAI,CAAC,OAAO,KAAK,UAAU,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,GACtD,EACf,kEAAW,IAAI,EAAC,SAAS,IACtB,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,KAC/B;;YAEE,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,UAAU,EAAE,MAAM,CAAC,UAAU,EAC7B,SAAS,EAAE,MAAM,CAAC,SAAS,EAC3B,OAAO,EAAE,CAAC,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA,EAAE;WAE9C,MAAM,CAAC,KAAK,CACE,CAClB,CAAC,CACQ,CACC,CACX,CACF,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-actionset/stzh-actionset.scss?tag=stzh-actionset&encapsulation=scoped","src/components/stzh-actionset/stzh-actionset.tsx"],"sourcesContent":[":host {\n\n}\n\n.stzh-actionset {\n &__actions {\n display: flex;\n align-items: center;\n }\n\n &__actions-wrapper {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n overflow: hidden;\n }\n\n &__action {\n &:not(:last-child) {\n margin-right: space('xsmall');\n }\n }\n\n &__action-popover-wrapper {\n opacity: 0;\n }\n\n &--has-collapsed-items &__action-popover-wrapper {\n opacity: 1;\n }\n\n &--has-collapsed-items &__action-popover {\n --width: auto;\n }\n\n /* Overflow variant */\n\n &--overflow &__action {\n @include mq($from: medium) {\n --white-space: nowrap;\n }\n }\n\n /* Stack variant */\n\n &--stack &__actions {\n @include mq($to: small) {\n flex-direction: column;\n align-items: stretch;\n }\n }\n\n &--stack &__actions-wrapper { \n @include mq($to: small) {\n flex-direction: column;\n align-items: stretch;\n }\n }\n\n &--stack &__action {\n @include mq($from: small) {\n --white-space: nowrap;\n }\n\n &:not(:last-child) {\n @include mq($to: small) {\n margin-bottom: space('xsmall');\n margin-right: 0;\n }\n }\n }\n\n &--stack &__action-popover-wrapper {\n @include mq($to: small) {\n margin-top: space('xsmall');\n }\n }\n\n // Hide more action popover on small if it has no collapsed items\n\n &--stack:not(#{&}--has-collapsed-items) &__action-popover-wrapper {\n @include mq($to: small) {\n display: none;\n }\n }\n}\n","import {\n Component,\n Host,\n Prop,\n h,\n Element,\n Watch,\n Event,\n EventEmitter,\n State\n} from \"@stencil/core\";\n\nimport {\n StzhActionsetItem,\n StzhActionsetItemClickEvent\n} from \"../../index\";\n\nimport { StzhActionsetLocalizedText } from './stzh-actionset.localization';\n\nimport {\n media,\n addMediaChangeListener,\n removeMediaChangeListener\n} from '../../utils/media-utils';\n\nimport {\n Placement,\n} from \"@floating-ui/dom\";\n\n/**\n */\n@Component({\n tag: \"stzh-actionset\",\n styleUrl: \"stzh-actionset.scss\",\n scoped: true\n})\nexport class StzhActionset {\n /** Translation strings */\n @Prop() localization: StzhActionsetLocalizedText;\n\n /** Variant determining what position the action buttons are */\n @Prop({ reflect: true }) variant: \"stack\" | \"overflow\" = \"stack\";\n\n /** Button variant of popover button (button thats holds collapsed actions) */\n @Prop({ reflect: true }) popoverButtonVariant: \"\" | \"default\" | \"secondary\" | \"tertiary\" = \"\";\n\n /** Button size of popover button (button that holds collapsed actions) */\n @Prop({ reflect: true }) popoverButtonSize: \"\" | \"default\" | \"small\" | \"tiny\" = \"\";\n\n /** Popover placement of button that holds collapsed actions */\n @Prop({ reflect: true }) popoverPlacement: Placement = \"bottom-end\";\n\n /**\n * Card header actions.\n * Array of objects that can include the button attributes `id`, `variant`, `icon`, `size`, `iconPosition`, `iconOnly`, `label` or `badge`:\n * `[{\"id\":\"action-1\", \"icon\": \"alarm-bell\", \"label\": \"Lorem\"}, {\"id\":\"action-2\", \"icon\": \"mail\", \"label\": \"Lorem\"}]`\n */\n @Prop() actions: StzhActionsetItem[] | string = [];\n private _actions: StzhActionsetItem[] = [];\n\n /** Header action click event */\n @Event() stzhActionClick: EventEmitter<StzhActionsetItemClickEvent>;\n\n @Element() element: HTMLStzhActionsetElement;\n\n @Watch(\"actions\")\n actionsWatcher(newValue: StzhActionsetItem[] | string) {\n if (typeof newValue === \"string\") {\n this._actions = JSON.parse(newValue);\n } else {\n this._actions = newValue;\n }\n }\n\n @State() actionsCollapsed: StzhActionsetItem[] = [];\n @State() dynamicActions: boolean;\n @State() isSmall: boolean;\n @State() isMedium: boolean;\n\n private actionsElement: HTMLElement;\n private debounceResize: number;\n private resizeObserver: ResizeObserver;\n\n private actionClick = (action: StzhActionsetItem, originalEvent: MouseEvent) => {\n this.stzhActionClick.emit({\n component: \"stzh-actionset\",\n action,\n originalEvent\n });\n }\n\n private update = () => {\n this.isSmall = media(\"small\").matches;\n this.isMedium = media(\"medium\").matches;\n\n if (!this.actionsElement) {\n return;\n }\n\n Object.assign(this.actionsElement.style, {\n width: null,\n height: null\n });\n\n let newActionsVisible = 0;\n\n if (\n this.variant === \"overflow\" && this.isMedium\n || this.variant === \"stack\" && this.isSmall\n ) {\n this.dynamicActions = true;\n\n let newActionsHeight = 0;\n let newActionsWidth = 0;\n\n // update height and width\n Array.from(this.actionsElement.children).forEach((child: HTMLElement) => {\n // check which item is visible and\n if (child.offsetTop === 0) {\n newActionsVisible++;\n\n const { width, height } = child.getBoundingClientRect();\n\n const style = getComputedStyle(child);\n const marginLeft = parseInt(style.marginLeft);\n const marginRight = parseInt(style.marginRight);\n const marginTop = parseInt(style.marginTop);\n const marginBottom = parseInt(style.marginBottom);\n\n const childWidth = width + marginLeft + marginRight;\n const childHeight = height + marginTop + marginBottom;\n\n if (newActionsHeight < childHeight) {\n newActionsHeight = childHeight;\n }\n\n newActionsWidth = newActionsWidth + childWidth;\n }\n });\n\n Object.assign(this.actionsElement.style, {\n width: `${newActionsWidth}px`,\n height: `${newActionsHeight}px`\n });\n } else {\n this.dynamicActions = false;\n\n if (this.variant === \"overflow\") {\n newActionsVisible = 0;\n } else if (this.variant === \"stack\") {\n newActionsVisible = this._actions.length <= 3 ? this._actions.length : 2;\n }\n }\n\n this.actionsCollapsed = this._actions.slice(newActionsVisible);\n }\n\n private handleResize = () => {\n if (this.debounceResize) {\n window.cancelAnimationFrame(this.debounceResize);\n }\n\n this.debounceResize = requestAnimationFrame(this.update);\n }\n\n private mediaChangeHandler = () => {\n this.actionsCollapsed = [];\n requestAnimationFrame(this.update);\n }\n\n async componentWillLoad() {\n this.actionsWatcher(this.actions);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"actionset\");\n }\n }\n\n connectedCallback() {\n addMediaChangeListener(this.mediaChangeHandler);\n\n this.resizeObserver = new ResizeObserver(this.handleResize);\n this.resizeObserver.observe(this.element);\n }\n\n disconnectedCallback() {\n removeMediaChangeListener(this.mediaChangeHandler);\n\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n }\n\n componentDidLoad() {\n this.update();\n }\n\n render() {\n const classes = {\n \"stzh-actionset\": true,\n // \"stzh-actionset--has-dynamic-actions\": this.dynamicActions,\n \"stzh-actionset--has-collapsed-items\": this.actionsCollapsed.length > 0,\n [`stzh-actionset--${this.variant}`]: !!this.variant\n };\n\n const Action = (action: StzhActionsetItem, disableTabbing: boolean) => (\n <stzh-button\n a11yTabindex={disableTabbing ? \"-1\" : null}\n class={{\n \"stzh-actionset__action\": true,\n \"is-button\": true\n }}\n label={action.label}\n icon={action.icon}\n iconPosition={action.iconPosition}\n iconOnly={action.iconOnly}\n badge={action.badge}\n variant={action.variant\n ? action.variant\n : (this.variant === \"stack\" ? \"secondary\" : \"tertiary\")}\n size={action.size\n ? action.size\n : (this.variant === \"stack\" ? \"small\" : \"tiny\")}\n badgePosition=\"icon\"\n onClick={(e) => { this.actionClick(action, e) }}\n ></stzh-button>\n );\n\n return (\n <Host has-collapsed-items={this.actionsCollapsed.length > 0}>\n <div class={classes}>\n <div class=\"stzh-actionset__actions\" role=\"group\">\n <div\n ref={(el) => (this.actionsElement = el as HTMLElement)}\n class=\"stzh-actionset__actions-wrapper\"\n >\n {this._actions.map(action => (\n (this.dynamicActions\n || (!this.dynamicActions &&\n this.actionsCollapsed.indexOf(action) === -1))\n &&\n (action.tooltipContent\n ?\n <stzh-tooltip\n strategy=\"fixed\"\n content={action.tooltipContent}\n >\n {Action(action, this.dynamicActions && this.actionsCollapsed.indexOf(action) > -1)}\n </stzh-tooltip>\n :\n Action(action, this.dynamicActions && this.actionsCollapsed.indexOf(action) > -1)\n )\n ))}\n </div>\n\n <div class=\"stzh-actionset__action-popover-wrapper\">\n <stzh-popover\n label={this.variant === \"stack\"\n ? this.localization.furtherActions\n : (!this.isMedium ? this.localization.actions : \"\")}\n strategy=\"fixed\"\n placement={this.popoverPlacement}\n class=\"stzh-actionset__action-popover\"\n >\n <stzh-button\n fullwidth\n disabled={this.actionsCollapsed.length === 0}\n class=\"stzh-actionset__action is-further\"\n variant={this.popoverButtonVariant !== \"\"\n ? this.popoverButtonVariant\n : (this.variant === \"stack\" ? \"secondary\" : \"tertiary\")}\n size={this.popoverButtonSize !== \"\"\n ? this.popoverButtonSize\n : (this.variant === \"stack\" ? \"small\" : \"tiny\")}\n icon={this.variant === \"stack\" ? \"angle-down\" : \"more-vertical\"}\n iconOnly={this.variant === \"overflow\" && this.isMedium}\n iconPosition=\"right\"\n label={this.variant === \"stack\"\n ? this.localization.furtherActions\n : (!this.isMedium ? this.localization.actions : \"\")}\n a11yLabel={this.variant === \"overflow\" && this.localization.actions}\n ></stzh-button>\n <stzh-menu slot=\"content\">\n {this.actionsCollapsed.map(action => (\n <stzh-menu-item\n // class=\"hide-medium show-when-collapsed\"\n icon={action.icon}\n badge={action.badge}\n badgeEmpty={action.badgeEmpty}\n badgeType={action.badgeType}\n onClick={(e) => { this.actionClick(action, e) }}\n >\n {action.label}\n </stzh-menu-item>\n ))}\n </stzh-menu>\n </stzh-popover>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -5,7 +5,7 @@ import { d as defineCustomElement$5 } from './p-5d65de9f.js';
5
5
  import { d as defineCustomElement$4 } from './p-982f7927.js';
6
6
  import { d as defineCustomElement$3 } from './p-8d12a95f.js';
7
7
  import { d as defineCustomElement$2 } from './p-499f5b56.js';
8
- import { d as defineCustomElement$1 } from './p-adc06dc4.js';
8
+ import { d as defineCustomElement$1 } from './p-ae7adee7.js';
9
9
 
10
10
  const stzhPoicardCss = ".sc-stzh-poicard-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-poicard-h,[stzh-hidden].sc-stzh-poicard-h{display:none}.sc-stzh-poicard-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-poicard-h *.sc-stzh-poicard,.sc-stzh-poicard-h *.sc-stzh-poicard::before,.sc-stzh-poicard-h *.sc-stzh-poicard::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-poicard-h .has-focus.sc-stzh-poicard{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-poicard-h .stzh-fylingfocus-focused.sc-stzh-poicard{outline-style:none !important}.sc-stzh-poicard-h .stzh-fylingfocus-focused.sc-stzh-poicard::-moz-focus-inner{border:0 !important}.sc-stzh-poicard-h{--background-color:var(--stzh-color-grey10);--hover-background-color:var(--stzh-color-grey20);--title-color:var(--stzh-color-primary70);--title-hover-color:var(--stzh-color-primary80);--title-background-color:var(--stzh-color-secondary20);--title-hover-background-color:var(--stzh-color-secondary30)}.stzh-poicard.sc-stzh-poicard{display:block;background-color:var(--background-color);text-decoration:none;height:100%}.stzh-poicard.sc-stzh-poicard:hover{--title-color:var(--title-hover-color);--title-background-color:var(--title-hover-background-color);--background-color:var(--hover-background-color)}.stzh-poicard__content.sc-stzh-poicard{display:flex;flex-direction:column;gap:var(--stzh-space-small)}.stzh-poicard__content-with-icon.sc-stzh-poicard,.stzh-poicard__content-with-badge.sc-stzh-poicard{display:flex;align-items:center;gap:var(--stzh-space-xxsmall)}.stzh-poicard__content-with-icon.sc-stzh-poicard stzh-text.sc-stzh-poicard{width:auto;--color:var(--stzh-color-primary70)}.stzh-poicard__content-with-icon.sc-stzh-poicard stzh-icon.sc-stzh-poicard{--color:var(--stzh-color-primary70)}.stzh-poicard__content-with-badge.sc-stzh-poicard stzh-text.sc-stzh-poicard{width:auto;--color:var(--stzh-color-grey80)}.stzh-poicard__content-head.sc-stzh-poicard{display:flex;align-items:center;padding:var(--stzh-space-xsmall) var(--stzh-space-medium) var(--stzh-space-small);--color:var(--title-color);background-color:var(--title-background-color)}.stzh-poicard__content-head.sc-stzh-poicard stzh-icon.sc-stzh-poicard{--color:var(--stzh-color-primary)}.stzh-poicard__content-title.sc-stzh-poicard{width:100%;--color:var(--stzh-color-grey80)}.stzh-poicard.sc-stzh-poicard:hover .stzh-poicard__content-title.sc-stzh-poicard{--color:var(--stzh-color-black)}.stzh-poicard__content-body.sc-stzh-poicard{padding:var(--stzh-space-xsmall) var(--stzh-space-medium) var(--stzh-space-medium);display:flex;flex-direction:column;gap:var(--stzh-space-xsmall)}";
11
11
  const StzhPoicardStyle0 = stzhPoicardCss;
@@ -106,4 +106,4 @@ function defineCustomElement() {
106
106
 
107
107
  export { StzhPoicard as S, defineCustomElement as d };
108
108
 
109
- //# sourceMappingURL=p-043132df.js.map
109
+ //# sourceMappingURL=p-9c27b812.js.map
@@ -1 +1 @@
1
- {"file":"p-043132df.js","mappings":";;;;;;;;;AAAA,MAAM,cAAc,GAAG,iiGAAiiG,CAAC;AACzjG,0BAAe,cAAc;;MCUhB,WAAW;;;;QAsBd,SAAI,GAAG;YACb,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC7B,CAAC;oBApB2C,EAAE;;IAI/C,WAAW,CAAC,QAAsC;QAChD,IAAI,CAAC,QAAQ,EAAE;YACb,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;SACxB;aAAM,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;YACvC,IAAI;gBACF,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;aACnC;YAAC,OAAO,CAAC,EAAE;gBACV,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;aACxB;SACF;aAAM;YACL,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;SACvB;KACF;IAMD,iBAAiB;QACf,IAAI,CAAC,IAAI,EAAE,CAAC;KACb;IAED,MAAM;QACJ,MAAM,OAAO,GAAG;YACd,cAAc,EAAE,IAAI;SACrB,CAAC;QAEF,QACE,EAAC,IAAI,uDACH,0DAAG,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAC,QAAQ,IACtD,4DAAK,KAAK,EAAC,uBAAuB,IAChC,4DAAK,KAAK,EAAC,4BAA4B,IACrC,uEAAe,IAAI,CAAC,KAAK,CAAC,KAAK,CAAgB,CAC3C,EACN,4DAAK,KAAK,EAAC,4BAA4B,IACpC,IAAI,CAAC,KAAK,CAAC,QAAQ,KAClB,4DAAK,KAAK,EAAC,iCAAiC,IAC1C,kEAAW,IAAI,EAAC,KAAK,GAAa,EAClC,oEAAY,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAa,CACxC,CACP,EAEA,IAAI,CAAC,KAAK,CAAC,IAAI,KACd,4DAAK,KAAK,EAAC,iCAAiC,IAC1C,kEAAW,IAAI,EAAC,aAAa,GAAa,EAC1C,oEAAY,IAAI,CAAC,KAAK,CAAC,IAAI,CAAa,CACpC,CACP,EAEA,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB;YAC/B,IAAI,CAAC,KAAK,CAAC,aAAa,MACxB,4DAAK,KAAK,EAAC,kCAAkC,IAC1C,IAAI,CAAC,KAAK,CAAC,aAAa,KACvB,kEAAW,IAAI,EAAC,OAAO,IACpB,IAAI,CAAC,KAAK,CAAC,aAAa,CACf,CACb,EACA,IAAI,CAAC,KAAK,CAAC,oBAAoB,KAC9B,kEACE,OAAO,EAAC,KAAK,EACb,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,IAAI,EACd,IAAI,EAAC,EAAE,EACP,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,GAAG,OAAO,EAC9C,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,oBAAoB,GAC3B,CACd,CACG,CACP,CACG,CACF,CACJ,CACC,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-poicard/stzh-poicard.scss?tag=stzh-poicard&encapsulation=scoped","src/components/stzh-poicard/stzh-poicard.tsx"],"sourcesContent":[":host {\n --background-color: var(--stzh-color-grey10);\n --hover-background-color: var(--stzh-color-grey20);\n --title-color: var(--stzh-color-primary70);\n --title-hover-color: var(--stzh-color-primary80);\n --title-background-color: var(--stzh-color-secondary20);\n --title-hover-background-color: var(--stzh-color-secondary30);\n}\n\n.stzh-poicard {\n display: block;\n background-color: var(--background-color);\n text-decoration: none;\n height: 100%;\n\n &:hover {\n --title-color: var(--title-hover-color);\n --title-background-color: var(--title-hover-background-color);\n --background-color: var(--hover-background-color);\n }\n\n /* Content */\n\n &__content {\n display: flex;\n flex-direction: column;\n gap: var(--stzh-space-small);\n }\n\n &__content-with-icon,\n &__content-with-badge {\n display: flex;\n align-items: center;\n gap: var(--stzh-space-xxsmall);\n }\n\n &__content-with-icon stzh-text {\n width: auto;\n --color: var(--stzh-color-primary70);\n }\n\n &__content-with-icon stzh-icon {\n --color: var(--stzh-color-primary70);\n }\n\n &__content-with-badge stzh-text {\n width: auto;\n --color: var(--stzh-color-grey80);\n }\n\n /* Content head */\n\n &__content-head {\n display: flex;\n align-items: center;\n padding: var(--stzh-space-xsmall) var(--stzh-space-medium) var(--stzh-space-small);\n --color: var(--title-color);\n background-color: var(--title-background-color);\n }\n\n &__content-head stzh-icon {\n --color: var(--stzh-color-primary);\n }\n\n &__content-title {\n width: 100%;\n --color: var(--stzh-color-grey80);\n }\n\n &:hover &__content-title {\n --color: var(--stzh-color-black);\n }\n\n /* Content Body */\n\n &__content-body {\n padding: var(--stzh-space-xsmall) var(--stzh-space-medium) var(--stzh-space-medium);\n display: flex;\n flex-direction: column;\n gap: var(--stzh-space-xsmall);\n }\n}\n","import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\";\nimport { StzhPoiCardItemData } from \"../../index\";\n\n/**\n *\n */\n@Component({\n tag: \"stzh-poicard\",\n styleUrl: \"stzh-poicard.scss\",\n scoped: true,\n})\nexport class StzhPoicard {\n @Element() element: HTMLStzhPoicardElement;\n\n /** Socialmediastream item */\n @Prop() item: StzhPoiCardItemData | string = \"\";\n private _item: StzhPoiCardItemData | undefined;\n\n @Watch(\"item\")\n itemWatcher(newValue: StzhPoiCardItemData | string) {\n if (!newValue) {\n this._item = undefined;\n } else if (typeof newValue === \"string\") {\n try {\n this._item = JSON.parse(newValue);\n } catch (e) {\n this._item = undefined;\n }\n } else {\n this._item = newValue;\n }\n }\n\n private init = () => {\n this.itemWatcher(this.item);\n };\n\n connectedCallback() {\n this.init();\n }\n\n render() {\n const classes = {\n \"stzh-poicard\": true,\n };\n\n return (\n <Host>\n <a class={classes} href={this._item.url} target=\"_blank\">\n <div class=\"stzh-poicard__content\">\n <div class=\"stzh-poicard__content-head\">\n <stzh-heading>{this._item.title}</stzh-heading>\n </div>\n <div class=\"stzh-poicard__content-body\">\n {this._item.distance && (\n <div class=\"stzh-poicard__content-with-icon\">\n <stzh-icon name=\"pin\"></stzh-icon>\n <stzh-text>{this._item.distance}</stzh-text>\n </div>\n )}\n\n {this._item.temp && (\n <div class=\"stzh-poicard__content-with-icon\">\n <stzh-icon name=\"thermometer\"></stzh-icon>\n <stzh-text>{this._item.temp}</stzh-text>\n </div>\n )}\n\n {(this._item.statusMessageContent ||\n this._item.statusMessage) && (\n <div class=\"stzh-poicard__content-with-badge\">\n {this._item.statusMessage && (\n <stzh-text size=\"milli\">\n {this._item.statusMessage}\n </stzh-text>\n )}\n {this._item.statusMessageContent && (\n <stzh-chip\n variant=\"tag\"\n size=\"small\"\n inverted={true}\n icon=\"\"\n type={this._item.success ? \"default\" : \"error\"}\n label={this._item.statusMessageContent}\n ></stzh-chip>\n )}\n </div>\n )}\n </div>\n </div>\n </a>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-9c27b812.js","mappings":";;;;;;;;;AAAA,MAAM,cAAc,GAAG,iiGAAiiG,CAAC;AACzjG,0BAAe,cAAc;;MCUhB,WAAW;;;;QAsBd,SAAI,GAAG;YACb,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC7B,CAAC;oBApB2C,EAAE;;IAI/C,WAAW,CAAC,QAAsC;QAChD,IAAI,CAAC,QAAQ,EAAE;YACb,IAAI,CAAC,KAA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ACpB,IAAI,CAAC,KAAK,CAAC,aAAa,CACf,CACb,EACA,IAAI,CAAC,KAAK,CAAC,oBAAoB,KAC9B,kEACE,OAAO,EAAC,KAAK,EACb,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,IAAI,EACd,IAAI,EAAC,EAAE,EACP,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,GAAG,OAAO,EAC9C,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,oBAAoB,GAC3B,CACd,CACG,CACP,CACG,CACF,CACJ,CACC,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-poicard/stzh-poicard.scss?tag=stzh-poicard&encapsulation=scoped","src/components/stzh-poicard/stzh-poicard.tsx"],"sourcesContent":[":host {\n --background-color: var(--stzh-color-grey10);\n --hover-background-color: var(--stzh-color-grey20);\n --title-color: var(--stzh-color-primary70);\n --title-hover-color: var(--stzh-color-primary80);\n --title-background-color: var(--stzh-color-secondary20);\n --title-hover-background-color: var(--stzh-color-secondary30);\n}\n\n.stzh-poicard {\n display: block;\n background-color: var(--background-color);\n text-decoration: none;\n height: 100%;\n\n &:hover {\n --title-color: var(--title-hover-color);\n --title-background-color: var(--title-hover-background-color);\n --background-color: var(--hover-background-color);\n }\n\n /* Content */\n\n &__content {\n display: flex;\n flex-direction: column;\n gap: var(--stzh-space-small);\n }\n\n &__content-with-icon,\n &__content-with-badge {\n display: flex;\n align-items: center;\n gap: var(--stzh-space-xxsmall);\n }\n\n &__content-with-icon stzh-text {\n width: auto;\n --color: var(--stzh-color-primary70);\n }\n\n &__content-with-icon stzh-icon {\n --color: var(--stzh-color-primary70);\n }\n\n &__content-with-badge stzh-text {\n width: auto;\n --color: var(--stzh-color-grey80);\n }\n\n /* Content head */\n\n &__content-head {\n display: flex;\n align-items: center;\n padding: var(--stzh-space-xsmall) var(--stzh-space-medium) var(--stzh-space-small);\n --color: var(--title-color);\n background-color: var(--title-background-color);\n }\n\n &__content-head stzh-icon {\n --color: var(--stzh-color-primary);\n }\n\n &__content-title {\n width: 100%;\n --color: var(--stzh-color-grey80);\n }\n\n &:hover &__content-title {\n --color: var(--stzh-color-black);\n }\n\n /* Content Body */\n\n &__content-body {\n padding: var(--stzh-space-xsmall) var(--stzh-space-medium) var(--stzh-space-medium);\n display: flex;\n flex-direction: column;\n gap: var(--stzh-space-xsmall);\n }\n}\n","import { Component, Element, h, Host, Prop, Watch } from \"@stencil/core\";\nimport { StzhPoiCardItemData } from \"../../index\";\n\n/**\n *\n */\n@Component({\n tag: \"stzh-poicard\",\n styleUrl: \"stzh-poicard.scss\",\n scoped: true,\n})\nexport class StzhPoicard {\n @Element() element: HTMLStzhPoicardElement;\n\n /** Socialmediastream item */\n @Prop() item: StzhPoiCardItemData | string = \"\";\n private _item: StzhPoiCardItemData | undefined;\n\n @Watch(\"item\")\n itemWatcher(newValue: StzhPoiCardItemData | string) {\n if (!newValue) {\n this._item = undefined;\n } else if (typeof newValue === \"string\") {\n try {\n this._item = JSON.parse(newValue);\n } catch (e) {\n this._item = undefined;\n }\n } else {\n this._item = newValue;\n }\n }\n\n private init = () => {\n this.itemWatcher(this.item);\n };\n\n connectedCallback() {\n this.init();\n }\n\n render() {\n const classes = {\n \"stzh-poicard\": true,\n };\n\n return (\n <Host>\n <a class={classes} href={this._item.url} target=\"_blank\">\n <div class=\"stzh-poicard__content\">\n <div class=\"stzh-poicard__content-head\">\n <stzh-heading>{this._item.title}</stzh-heading>\n </div>\n <div class=\"stzh-poicard__content-body\">\n {this._item.distance && (\n <div class=\"stzh-poicard__content-with-icon\">\n <stzh-icon name=\"pin\"></stzh-icon>\n <stzh-text>{this._item.distance}</stzh-text>\n </div>\n )}\n\n {this._item.temp && (\n <div class=\"stzh-poicard__content-with-icon\">\n <stzh-icon name=\"thermometer\"></stzh-icon>\n <stzh-text>{this._item.temp}</stzh-text>\n </div>\n )}\n\n {(this._item.statusMessageContent ||\n this._item.statusMessage) && (\n <div class=\"stzh-poicard__content-with-badge\">\n {this._item.statusMessage && (\n <stzh-text size=\"milli\">\n {this._item.statusMessage}\n </stzh-text>\n )}\n {this._item.statusMessageContent && (\n <stzh-chip\n variant=\"tag\"\n size=\"small\"\n inverted={true}\n icon=\"\"\n type={this._item.success ? \"default\" : \"error\"}\n label={this._item.statusMessageContent}\n ></stzh-chip>\n )}\n </div>\n )}\n </div>\n </div>\n </a>\n </Host>\n );\n }\n}\n"],"version":3}