@oiz/stzh-components 2.4.0-beta → 2.5.0-alpha-carousel

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 (427) hide show
  1. package/dist/cjs/{_commonjsHelpers-dcc4cf71.js → _commonjsHelpers-bcc1208a.js} +0 -16
  2. package/dist/cjs/app-globals-d7bd37fe.js +889 -0
  3. package/dist/cjs/{js.cookie-226c94ed.js → js.cookie-9c263d23.js} +1 -1
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/stzh-actions.cjs.entry.js +3 -1
  6. package/dist/cjs/stzh-actionset.cjs.entry.js +11 -6
  7. package/dist/cjs/stzh-appnav.cjs.entry.js +3 -1
  8. package/dist/cjs/stzh-badge_3.cjs.entry.js +20 -8
  9. package/dist/cjs/stzh-calendar.cjs.entry.js +1 -1
  10. package/dist/cjs/stzh-card_3.cjs.entry.js +36 -29
  11. package/dist/cjs/stzh-carousel.cjs.entry.js +522 -0
  12. package/dist/cjs/stzh-chart.cjs.entry.js +5998 -5171
  13. package/dist/cjs/stzh-checkboxgroup.cjs.entry.js +3 -1
  14. package/dist/cjs/stzh-chip_2.cjs.entry.js +82 -5
  15. package/dist/cjs/stzh-components.cjs.js +2 -2
  16. package/dist/cjs/stzh-cspace.cjs.entry.js +1 -1
  17. package/dist/cjs/stzh-datalist_2.cjs.entry.js +10 -3
  18. package/dist/cjs/stzh-datamessagelist-item.cjs.entry.js +1 -1
  19. package/dist/cjs/stzh-datatable.cjs.entry.js +16 -4
  20. package/dist/cjs/stzh-datepicker_3.cjs.entry.js +3 -1
  21. package/dist/cjs/stzh-dialog.cjs.entry.js +16 -13
  22. package/dist/cjs/stzh-dropdown.cjs.entry.js +2 -2
  23. package/dist/cjs/stzh-footer.cjs.entry.js +3 -1
  24. package/dist/cjs/stzh-ghettobox_2.cjs.entry.js +17 -4
  25. package/dist/cjs/stzh-header.cjs.entry.js +32 -27
  26. package/dist/cjs/stzh-hspace.cjs.entry.js +1 -1
  27. package/dist/cjs/stzh-input.cjs.entry.js +1 -1
  28. package/dist/cjs/stzh-invert.cjs.entry.js +1 -1
  29. package/dist/cjs/stzh-link.cjs.entry.js +15 -4
  30. package/dist/cjs/stzh-loader.cjs.entry.js +1 -1
  31. package/dist/cjs/stzh-menu_2.cjs.entry.js +2 -2
  32. package/dist/cjs/stzh-message.cjs.entry.js +2 -2
  33. package/dist/cjs/stzh-metanav.cjs.entry.js +3 -1
  34. package/dist/cjs/stzh-microsite-teaserlist.cjs.entry.js +1 -1
  35. package/dist/cjs/stzh-olmap.cjs.entry.js +1 -1
  36. package/dist/cjs/stzh-page-skiplinks.cjs.entry.js +3 -1
  37. package/dist/cjs/stzh-pagetitle-hero.cjs.entry.js +4 -2
  38. package/dist/cjs/stzh-pagetitle.cjs.entry.js +3 -1
  39. package/dist/cjs/stzh-popover.cjs.entry.js +1 -1
  40. package/dist/cjs/stzh-portal-mitwirken.cjs.entry.js +1 -1
  41. package/dist/cjs/stzh-readspeaker.cjs.entry.js +3 -1
  42. package/dist/cjs/stzh-sortable.cjs.entry.js +4 -2
  43. package/dist/cjs/stzh-space.cjs.entry.js +1 -1
  44. package/dist/cjs/stzh-sticky.cjs.entry.js +3 -1
  45. package/dist/cjs/stzh-table.cjs.entry.js +14 -4
  46. package/dist/cjs/stzh-upload.cjs.entry.js +1 -1
  47. package/dist/cjs/stzh-vbz-linechip.cjs.entry.js +1 -1
  48. package/dist/cjs/stzh-vbz-ticker.cjs.entry.js +16 -11
  49. package/dist/cjs/stzh-vspace.cjs.entry.js +1 -1
  50. package/dist/collection/assets/i18n/de.json +10 -0
  51. package/dist/collection/assets/i18n/en.json +11 -1
  52. package/dist/collection/collection-manifest.json +1 -0
  53. package/dist/collection/components/stzh-actions/stzh-actions.js +3 -1
  54. package/dist/collection/components/stzh-actionset/stzh-actionset.js +11 -33
  55. package/dist/collection/components/stzh-appnav/stzh-appnav.js +3 -1
  56. package/dist/collection/components/stzh-button/stzh-button.css +16 -1
  57. package/dist/collection/components/stzh-button/stzh-button.js +73 -7
  58. package/dist/collection/components/stzh-calendar/stzh-calendar.css +1 -1
  59. package/dist/collection/components/stzh-card/stzh-card.css +34 -9
  60. package/dist/collection/components/stzh-card/stzh-card.js +52 -54
  61. package/dist/collection/components/stzh-carousel/stzh-carousel.css +253 -0
  62. package/dist/collection/components/stzh-carousel/stzh-carousel.js +966 -0
  63. package/dist/collection/components/stzh-carousel/stzh-carousel.localization.js +1 -0
  64. package/dist/collection/components/stzh-carousel/stzh-carousel.stories.js +138 -0
  65. package/dist/collection/components/stzh-chart/stzh-chart.css +101 -54
  66. package/dist/collection/components/stzh-chart/stzh-chart.stories.js +1 -0
  67. package/dist/collection/components/stzh-checkboxgroup/stzh-checkboxgroup.js +3 -1
  68. package/dist/collection/components/stzh-chip/stzh-chip.css +19 -17
  69. package/dist/collection/components/stzh-chip/stzh-chip.js +2 -1
  70. package/dist/collection/components/stzh-chip-select/stzh-chip-select.css +1 -1
  71. package/dist/collection/components/stzh-clamp/stzh-clamp.css +46 -160
  72. package/dist/collection/components/stzh-clamp/stzh-clamp.js +218 -8
  73. package/dist/collection/components/stzh-clamp/stzh-clamp.localization.js +1 -0
  74. package/dist/collection/components/stzh-clamp/stzh-clamp.stories.js +1 -1
  75. package/dist/collection/components/stzh-cspace/stzh-cspace.css +36 -0
  76. package/dist/collection/components/stzh-datalist/stzh-datalist.js +18 -18
  77. package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.css +11 -0
  78. package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.js +28 -1
  79. package/dist/collection/components/stzh-datamessagelist-item/stzh-datamessagelist-item.css +10 -0
  80. package/dist/collection/components/stzh-datatable/stzh-datatable.js +15 -12
  81. package/dist/collection/components/stzh-dialog/stzh-dialog.css +2 -2
  82. package/dist/collection/components/stzh-dialog/stzh-dialog.js +15 -12
  83. package/dist/collection/components/stzh-dropdown/stzh-dropdown.css +1 -1
  84. package/dist/collection/components/stzh-footer/stzh-footer.js +3 -1
  85. package/dist/collection/components/stzh-ghettobox/stzh-ghettobox.js +3 -1
  86. package/dist/collection/components/stzh-header/stzh-header.js +32 -45
  87. package/dist/collection/components/stzh-hspace/stzh-hspace.css +4 -0
  88. package/dist/collection/components/stzh-input/stzh-input.css +1 -1
  89. package/dist/collection/components/stzh-input/stzh-input.stories.js +12 -12
  90. package/dist/collection/components/stzh-invert/stzh-invert.css +4 -4
  91. package/dist/collection/components/stzh-link/stzh-link.css +11 -0
  92. package/dist/collection/components/stzh-link/stzh-link.js +68 -3
  93. package/dist/collection/components/stzh-loader/stzh-loader.css +4 -4
  94. package/dist/collection/components/stzh-menu-item/stzh-menu-item.js +27 -27
  95. package/dist/collection/components/stzh-metanav/stzh-metanav.js +3 -1
  96. package/dist/collection/components/stzh-microsite-teaserlist/stzh-microsite-teaserlist.js +1 -1
  97. package/dist/collection/components/stzh-page-skiplinks/stzh-page-skiplinks.js +3 -1
  98. package/dist/collection/components/stzh-pagetitle/stzh-pagetitle.js +3 -1
  99. package/dist/collection/components/stzh-pagetitle-hero/stzh-pagetitle-hero.css +4 -4
  100. package/dist/collection/components/stzh-pagetitle-hero/stzh-pagetitle-hero.js +3 -1
  101. package/dist/collection/components/stzh-popover/stzh-popover.css +3 -3
  102. package/dist/collection/components/stzh-portal-mitwirken/stzh-portal-mitwirken.css +118 -12
  103. package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.js +3 -1
  104. package/dist/collection/components/stzh-readspeaker/stzh-readspeaker.js +3 -1
  105. package/dist/collection/components/stzh-richtext/stzh-richtext.css +14 -3
  106. package/dist/collection/components/stzh-richtext/stzh-richtext.js +32 -0
  107. package/dist/collection/components/stzh-sortable/stzh-sortable.css +1 -1
  108. package/dist/collection/components/stzh-sortable/stzh-sortable.js +3 -1
  109. package/dist/collection/components/stzh-space/stzh-space.css +4 -0
  110. package/dist/collection/components/stzh-sticky/stzh-sticky.js +3 -1
  111. package/dist/collection/components/stzh-table/stzh-table.js +14 -13
  112. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.js +16 -11
  113. package/dist/collection/components/stzh-vspace/stzh-vspace.css +4 -0
  114. package/dist/collection/global/js/script.js +2 -0
  115. package/dist/components/_commonjsHelpers.js +1 -16
  116. package/dist/components/index.d.ts +1 -0
  117. package/dist/components/index.js +835 -1
  118. package/dist/components/stzh-actions.js +3 -1
  119. package/dist/components/stzh-actionset2.js +12 -7
  120. package/dist/components/stzh-appnav.js +3 -1
  121. package/dist/components/stzh-button2.js +23 -8
  122. package/dist/components/stzh-calendar2.js +1 -1
  123. package/dist/components/stzh-card2.js +37 -29
  124. package/dist/components/stzh-carousel.d.ts +11 -0
  125. package/dist/components/stzh-carousel.js +568 -0
  126. package/dist/components/stzh-chart.js +5995 -5168
  127. package/dist/components/stzh-checkboxgroup.js +3 -1
  128. package/dist/components/stzh-chip-select2.js +21 -9
  129. package/dist/components/stzh-chip2.js +19 -6
  130. package/dist/components/stzh-clamp2.js +110 -11
  131. package/dist/components/stzh-cspace.js +1 -1
  132. package/dist/components/stzh-datalist-item2.js +10 -2
  133. package/dist/components/stzh-datalist2.js +3 -3
  134. package/dist/components/stzh-datamessagelist-item.js +17 -11
  135. package/dist/components/stzh-datatable.js +16 -4
  136. package/dist/components/stzh-dialog.js +16 -13
  137. package/dist/components/stzh-dropdown2.js +1 -1
  138. package/dist/components/stzh-footer.js +3 -1
  139. package/dist/components/stzh-ghettobox2.js +3 -1
  140. package/dist/components/stzh-header.js +33 -28
  141. package/dist/components/stzh-hspace.js +1 -1
  142. package/dist/components/stzh-input2.js +1 -1
  143. package/dist/components/stzh-invert.js +1 -1
  144. package/dist/components/stzh-link2.js +18 -4
  145. package/dist/components/stzh-loader2.js +1 -1
  146. package/dist/components/stzh-menu-item2.js +4 -4
  147. package/dist/components/stzh-metanav.js +3 -1
  148. package/dist/components/stzh-microsite-teaserlist.js +1 -1
  149. package/dist/components/stzh-page-skiplinks.js +3 -1
  150. package/dist/components/stzh-pagetitle-hero.js +4 -2
  151. package/dist/components/stzh-pagetitle.js +3 -1
  152. package/dist/components/stzh-popover2.js +1 -1
  153. package/dist/components/stzh-portal-mitwirken.js +1 -1
  154. package/dist/components/stzh-radiogroup2.js +3 -1
  155. package/dist/components/stzh-readspeaker.js +3 -1
  156. package/dist/components/stzh-richtext2.js +14 -1
  157. package/dist/components/stzh-sortable2.js +4 -2
  158. package/dist/components/stzh-space.js +1 -1
  159. package/dist/components/stzh-sticky.js +3 -1
  160. package/dist/components/stzh-table.js +15 -5
  161. package/dist/components/stzh-upload.js +1 -1
  162. package/dist/components/stzh-vbz-ticker.js +16 -11
  163. package/dist/components/stzh-vspace.js +1 -1
  164. package/dist/esm/{_commonjsHelpers-f9dc4873.js → _commonjsHelpers-ba3f0406.js} +1 -16
  165. package/dist/esm/app-globals-62e1178d.js +887 -0
  166. package/dist/esm/{js.cookie-53735b72.js → js.cookie-28a40640.js} +1 -1
  167. package/dist/esm/loader.js +2 -2
  168. package/dist/esm/stzh-actions.entry.js +3 -1
  169. package/dist/esm/stzh-actionset.entry.js +11 -6
  170. package/dist/esm/stzh-appnav.entry.js +3 -1
  171. package/dist/esm/stzh-badge_3.entry.js +20 -8
  172. package/dist/esm/stzh-calendar.entry.js +1 -1
  173. package/dist/esm/stzh-card_3.entry.js +36 -29
  174. package/dist/esm/stzh-carousel.entry.js +518 -0
  175. package/dist/esm/stzh-chart.entry.js +5995 -5168
  176. package/dist/esm/stzh-checkboxgroup.entry.js +3 -1
  177. package/dist/esm/stzh-chip_2.entry.js +82 -5
  178. package/dist/esm/stzh-components.js +2 -2
  179. package/dist/esm/stzh-cspace.entry.js +1 -1
  180. package/dist/esm/stzh-datalist_2.entry.js +10 -3
  181. package/dist/esm/stzh-datamessagelist-item.entry.js +1 -1
  182. package/dist/esm/stzh-datatable.entry.js +16 -4
  183. package/dist/esm/stzh-datepicker_3.entry.js +3 -1
  184. package/dist/esm/stzh-dialog.entry.js +16 -13
  185. package/dist/esm/stzh-dropdown.entry.js +2 -2
  186. package/dist/esm/stzh-footer.entry.js +3 -1
  187. package/dist/esm/stzh-ghettobox_2.entry.js +17 -4
  188. package/dist/esm/stzh-header.entry.js +32 -27
  189. package/dist/esm/stzh-hspace.entry.js +1 -1
  190. package/dist/esm/stzh-input.entry.js +1 -1
  191. package/dist/esm/stzh-invert.entry.js +1 -1
  192. package/dist/esm/stzh-link.entry.js +15 -4
  193. package/dist/esm/stzh-loader.entry.js +1 -1
  194. package/dist/esm/stzh-menu_2.entry.js +2 -2
  195. package/dist/esm/stzh-message.entry.js +2 -2
  196. package/dist/esm/stzh-metanav.entry.js +3 -1
  197. package/dist/esm/stzh-microsite-teaserlist.entry.js +1 -1
  198. package/dist/esm/stzh-olmap.entry.js +1 -1
  199. package/dist/esm/stzh-page-skiplinks.entry.js +3 -1
  200. package/dist/esm/stzh-pagetitle-hero.entry.js +4 -2
  201. package/dist/esm/stzh-pagetitle.entry.js +3 -1
  202. package/dist/esm/stzh-popover.entry.js +1 -1
  203. package/dist/esm/stzh-portal-mitwirken.entry.js +1 -1
  204. package/dist/esm/stzh-readspeaker.entry.js +3 -1
  205. package/dist/esm/stzh-sortable.entry.js +4 -2
  206. package/dist/esm/stzh-space.entry.js +1 -1
  207. package/dist/esm/stzh-sticky.entry.js +3 -1
  208. package/dist/esm/stzh-table.entry.js +14 -4
  209. package/dist/esm/stzh-upload.entry.js +1 -1
  210. package/dist/esm/stzh-vbz-linechip.entry.js +1 -1
  211. package/dist/esm/stzh-vbz-ticker.entry.js +16 -11
  212. package/dist/esm/stzh-vspace.entry.js +1 -1
  213. package/dist/esm-es5/_commonjsHelpers-ba3f0406.js +1 -0
  214. package/dist/esm-es5/app-globals-62e1178d.js +1 -0
  215. package/dist/esm-es5/{js.cookie-53735b72.js → js.cookie-28a40640.js} +1 -1
  216. package/dist/esm-es5/loader.js +1 -1
  217. package/dist/esm-es5/stzh-actions.entry.js +1 -1
  218. package/dist/esm-es5/stzh-actionset.entry.js +1 -1
  219. package/dist/esm-es5/stzh-appnav.entry.js +1 -1
  220. package/dist/esm-es5/stzh-badge_3.entry.js +1 -1
  221. package/dist/esm-es5/stzh-calendar.entry.js +1 -1
  222. package/dist/esm-es5/stzh-card_3.entry.js +1 -1
  223. package/dist/esm-es5/stzh-carousel.entry.js +1 -0
  224. package/dist/esm-es5/stzh-chart.entry.js +3 -3
  225. package/dist/esm-es5/stzh-checkboxgroup.entry.js +1 -1
  226. package/dist/esm-es5/stzh-chip_2.entry.js +1 -1
  227. package/dist/esm-es5/stzh-components.js +1 -1
  228. package/dist/esm-es5/stzh-cspace.entry.js +1 -1
  229. package/dist/esm-es5/stzh-datalist_2.entry.js +1 -1
  230. package/dist/esm-es5/stzh-datamessagelist-item.entry.js +1 -1
  231. package/dist/esm-es5/stzh-datatable.entry.js +2 -2
  232. package/dist/esm-es5/stzh-datepicker_3.entry.js +1 -1
  233. package/dist/esm-es5/stzh-dialog.entry.js +1 -1
  234. package/dist/esm-es5/stzh-dropdown.entry.js +2 -2
  235. package/dist/esm-es5/stzh-footer.entry.js +1 -1
  236. package/dist/esm-es5/stzh-ghettobox_2.entry.js +1 -1
  237. package/dist/esm-es5/stzh-header.entry.js +1 -1
  238. package/dist/esm-es5/stzh-hspace.entry.js +1 -1
  239. package/dist/esm-es5/stzh-input.entry.js +1 -1
  240. package/dist/esm-es5/stzh-invert.entry.js +1 -1
  241. package/dist/esm-es5/stzh-link.entry.js +1 -1
  242. package/dist/esm-es5/stzh-loader.entry.js +1 -1
  243. package/dist/esm-es5/stzh-menu_2.entry.js +1 -1
  244. package/dist/esm-es5/stzh-message.entry.js +1 -1
  245. package/dist/esm-es5/stzh-metanav.entry.js +1 -1
  246. package/dist/esm-es5/stzh-microsite-teaserlist.entry.js +1 -1
  247. package/dist/esm-es5/stzh-olmap.entry.js +1 -1
  248. package/dist/esm-es5/stzh-page-skiplinks.entry.js +1 -1
  249. package/dist/esm-es5/stzh-pagetitle-hero.entry.js +1 -1
  250. package/dist/esm-es5/stzh-pagetitle.entry.js +1 -1
  251. package/dist/esm-es5/stzh-popover.entry.js +1 -1
  252. package/dist/esm-es5/stzh-portal-mitwirken.entry.js +1 -1
  253. package/dist/esm-es5/stzh-readspeaker.entry.js +1 -1
  254. package/dist/esm-es5/stzh-sortable.entry.js +2 -2
  255. package/dist/esm-es5/stzh-space.entry.js +1 -1
  256. package/dist/esm-es5/stzh-sticky.entry.js +1 -1
  257. package/dist/esm-es5/stzh-table.entry.js +1 -1
  258. package/dist/esm-es5/stzh-upload.entry.js +1 -1
  259. package/dist/esm-es5/stzh-vbz-linechip.entry.js +1 -1
  260. package/dist/esm-es5/stzh-vbz-ticker.entry.js +1 -1
  261. package/dist/esm-es5/stzh-vspace.entry.js +1 -1
  262. package/dist/stzh-components/assets/i18n/de.json +10 -0
  263. package/dist/stzh-components/assets/i18n/en.json +11 -1
  264. package/dist/stzh-components/p-0a408348.entry.js +1 -0
  265. package/dist/stzh-components/{p-ff328114.system.entry.js → p-0c779613.system.entry.js} +1 -1
  266. package/dist/stzh-components/{p-55752bd5.system.entry.js → p-0e690e3e.system.entry.js} +1 -1
  267. package/dist/stzh-components/p-10b4fedd.system.entry.js +1 -0
  268. package/dist/stzh-components/p-14729939.entry.js +1 -0
  269. package/dist/stzh-components/p-1494b502.entry.js +1 -0
  270. package/dist/stzh-components/p-14d5a56d.entry.js +1 -0
  271. package/dist/stzh-components/p-205f5111.system.entry.js +1 -0
  272. package/dist/stzh-components/{p-c8cc2563.system.entry.js → p-263fd0bb.system.entry.js} +1 -1
  273. package/dist/stzh-components/p-2ed20db5.entry.js +1 -0
  274. package/dist/stzh-components/p-322e74e9.system.entry.js +1 -0
  275. package/dist/stzh-components/p-353294ce.entry.js +1 -0
  276. package/dist/stzh-components/p-396697db.system.entry.js +1 -0
  277. package/dist/stzh-components/p-3a73b8b5.system.js +1 -0
  278. package/dist/stzh-components/p-3af95b5d.entry.js +1 -0
  279. package/dist/stzh-components/p-3e8ff66b.js +1 -0
  280. package/dist/stzh-components/p-3f80ce87.entry.js +1 -0
  281. package/dist/stzh-components/{p-c2f909c1.system.entry.js → p-3fc51ad1.system.entry.js} +1 -1
  282. package/dist/stzh-components/p-4453449f.entry.js +1 -0
  283. package/dist/stzh-components/{p-6a94e520.system.entry.js → p-454e50f8.system.entry.js} +1 -1
  284. package/dist/stzh-components/{p-d54ff4d4.system.entry.js → p-47175c6f.system.entry.js} +1 -1
  285. package/dist/stzh-components/p-48d40c7c.system.entry.js +1 -0
  286. package/dist/stzh-components/{p-5c72664e.system.entry.js → p-4acb6752.system.entry.js} +1 -1
  287. package/dist/stzh-components/{p-b1ffc2a9.system.entry.js → p-4b995fe4.system.entry.js} +1 -1
  288. package/dist/stzh-components/{p-be97cb22.entry.js → p-4da7ebff.entry.js} +1 -1
  289. package/dist/stzh-components/p-4f8085e5.entry.js +1 -0
  290. package/dist/stzh-components/{p-2f4448c9.system.entry.js → p-558f336d.system.entry.js} +1 -1
  291. package/dist/stzh-components/p-5a4aef52.entry.js +1 -0
  292. package/dist/stzh-components/{p-484a366f.system.js → p-5db542ae.system.js} +1 -1
  293. package/dist/stzh-components/{p-72a62d0d.system.entry.js → p-6659b6f6.system.entry.js} +1 -1
  294. package/dist/stzh-components/{p-f3276ca5.system.entry.js → p-6a109ce9.system.entry.js} +1 -1
  295. package/dist/stzh-components/{p-1a98470f.system.entry.js → p-6a26c9eb.system.entry.js} +1 -1
  296. package/dist/stzh-components/p-6bc7f44a.entry.js +1 -0
  297. package/dist/stzh-components/{p-02d51685.entry.js → p-6ee87986.entry.js} +1 -1
  298. package/dist/stzh-components/p-7ff1640c.entry.js +1 -0
  299. package/dist/stzh-components/{p-26889a91.entry.js → p-814e5ae7.entry.js} +2 -2
  300. package/dist/stzh-components/p-821ca4af.system.entry.js +1 -0
  301. package/dist/stzh-components/{p-2b67b0b3.system.entry.js → p-884793dd.system.entry.js} +2 -2
  302. package/dist/stzh-components/{p-a32ae73a.system.entry.js → p-88fbb2fc.system.entry.js} +2 -2
  303. package/dist/stzh-components/p-8b16550d.entry.js +1 -0
  304. package/dist/stzh-components/{p-963a7526.system.entry.js → p-8c371d1d.system.entry.js} +1 -1
  305. package/dist/stzh-components/p-8eda017e.entry.js +1 -0
  306. package/dist/stzh-components/p-949f7885.system.js +1 -0
  307. package/dist/stzh-components/{p-6adc5f0c.system.entry.js → p-95bfbf67.system.entry.js} +1 -1
  308. package/dist/stzh-components/p-99d85a97.entry.js +1 -0
  309. package/dist/stzh-components/p-9a94b249.system.entry.js +1 -0
  310. package/dist/stzh-components/{p-32a03d1c.entry.js → p-9ed30a9f.entry.js} +1 -1
  311. package/dist/stzh-components/{p-febba79b.entry.js → p-9f29e6c3.entry.js} +1 -1
  312. package/dist/stzh-components/{p-67816aa4.entry.js → p-a0b2739a.entry.js} +1 -1
  313. package/dist/stzh-components/p-a2121744.system.entry.js +1 -0
  314. package/dist/stzh-components/p-a22ac109.entry.js +1 -0
  315. package/dist/stzh-components/p-a3bf419d.entry.js +1 -0
  316. package/dist/stzh-components/{p-c9c7d88a.entry.js → p-a47e205f.entry.js} +1 -1
  317. package/dist/stzh-components/p-aa2c81e6.system.entry.js +3 -0
  318. package/dist/stzh-components/{p-088b16c6.system.entry.js → p-abf13db9.system.entry.js} +1 -1
  319. package/dist/stzh-components/p-ad96eb50.entry.js +1 -0
  320. package/dist/stzh-components/p-ae7255f6.entry.js +1 -0
  321. package/dist/stzh-components/p-af05718d.system.entry.js +1 -0
  322. package/dist/stzh-components/p-af9aac53.entry.js +3 -0
  323. package/dist/stzh-components/{p-24b8df26.js → p-b10682ee.js} +1 -1
  324. package/dist/stzh-components/p-b4c28bf5.entry.js +1 -0
  325. package/dist/stzh-components/p-b4db3558.js +1 -0
  326. package/dist/stzh-components/p-b61f7404.entry.js +1 -0
  327. package/dist/stzh-components/p-b9adebdc.entry.js +1 -0
  328. package/dist/stzh-components/{p-c4c620fa.system.entry.js → p-b9bd42e6.system.entry.js} +1 -1
  329. package/dist/stzh-components/p-b9f784e4.system.entry.js +1 -0
  330. package/dist/stzh-components/{p-b92734db.entry.js → p-bcfba21f.entry.js} +1 -1
  331. package/dist/stzh-components/p-bd1a5d6d.system.entry.js +1 -0
  332. package/dist/stzh-components/p-c457dad2.system.entry.js +1 -0
  333. package/dist/stzh-components/{p-f8feb07b.entry.js → p-c80a9d50.entry.js} +1 -1
  334. package/dist/stzh-components/p-c9940c35.entry.js +1 -0
  335. package/dist/stzh-components/p-cab1a192.entry.js +1 -0
  336. package/dist/stzh-components/p-cd59cead.system.js +1 -0
  337. package/dist/stzh-components/{p-102e2bcd.system.entry.js → p-cd979ce9.system.entry.js} +1 -1
  338. package/dist/stzh-components/{p-512c38b3.system.entry.js → p-ce5db779.system.entry.js} +1 -1
  339. package/dist/stzh-components/p-d29fd401.entry.js +1 -0
  340. package/dist/stzh-components/{p-7e4261ce.system.entry.js → p-d5514e5b.system.entry.js} +1 -1
  341. package/dist/stzh-components/{p-51b3a560.system.entry.js → p-d585e8fd.system.entry.js} +1 -1
  342. package/dist/stzh-components/p-d5994419.system.entry.js +1 -0
  343. package/dist/stzh-components/p-d6e5f396.system.entry.js +1 -0
  344. package/dist/stzh-components/{p-444b2baf.entry.js → p-e085a0a0.entry.js} +1 -1
  345. package/dist/stzh-components/p-e1501622.system.entry.js +1 -0
  346. package/dist/stzh-components/p-e2d80ee3.entry.js +1 -0
  347. package/dist/stzh-components/p-e4aa12ba.system.entry.js +1 -0
  348. package/dist/stzh-components/p-e54f66ea.system.entry.js +1 -0
  349. package/dist/stzh-components/{p-d9ae09b5.entry.js → p-eb16ad0d.entry.js} +2 -2
  350. package/dist/stzh-components/p-eb1ea7f0.entry.js +1 -0
  351. package/dist/stzh-components/{p-e1b2785b.entry.js → p-ec87506f.entry.js} +1 -1
  352. package/dist/stzh-components/{p-309fc559.system.entry.js → p-ee20b95b.system.entry.js} +1 -1
  353. package/dist/stzh-components/p-f122e15d.system.entry.js +1 -0
  354. package/dist/stzh-components/{p-809ed955.system.entry.js → p-f27d1a06.system.entry.js} +1 -1
  355. package/dist/stzh-components/p-f449f909.entry.js +1 -0
  356. package/dist/stzh-components/{p-af67ea5e.entry.js → p-f4c0d928.entry.js} +1 -1
  357. package/dist/stzh-components/p-f725921a.entry.js +1 -0
  358. package/dist/stzh-components/p-fe1c8047.system.entry.js +1 -0
  359. package/dist/stzh-components/stzh-components.css +1 -1
  360. package/dist/stzh-components/stzh-components.esm.js +1 -1
  361. package/dist/stzh-components/stzh-components.js +1 -1
  362. package/dist/types/components/stzh-carousel/stzh-carousel.localization.d.ts +5 -0
  363. package/dist/types/components/stzh-clamp/stzh-clamp.localization.d.ts +5 -0
  364. package/dist/types/components.d.ts +250 -2
  365. package/dist/types/index.d.ts +20 -0
  366. package/dist/types/utils/translation-utils.d.ts +2 -0
  367. package/dist/vscode-data.json +106 -17
  368. package/package.json +6 -4
  369. package/dist/cjs/app-globals-57922fc2.js +0 -56
  370. package/dist/esm/app-globals-b848652e.js +0 -54
  371. package/dist/esm-es5/_commonjsHelpers-f9dc4873.js +0 -1
  372. package/dist/esm-es5/app-globals-b848652e.js +0 -1
  373. package/dist/stzh-components/p-07dc23a3.system.entry.js +0 -1
  374. package/dist/stzh-components/p-0ba944ab.entry.js +0 -1
  375. package/dist/stzh-components/p-12856e02.system.entry.js +0 -1
  376. package/dist/stzh-components/p-16c0b9ae.entry.js +0 -3
  377. package/dist/stzh-components/p-18e20038.entry.js +0 -1
  378. package/dist/stzh-components/p-1bcda13d.system.entry.js +0 -1
  379. package/dist/stzh-components/p-1d435dd8.system.entry.js +0 -1
  380. package/dist/stzh-components/p-1f74846f.entry.js +0 -1
  381. package/dist/stzh-components/p-29e9ad9f.system.entry.js +0 -1
  382. package/dist/stzh-components/p-30a9de85.system.entry.js +0 -1
  383. package/dist/stzh-components/p-37920e74.system.entry.js +0 -1
  384. package/dist/stzh-components/p-4633b93d.entry.js +0 -1
  385. package/dist/stzh-components/p-4c60da30.entry.js +0 -1
  386. package/dist/stzh-components/p-4eee30ea.system.entry.js +0 -1
  387. package/dist/stzh-components/p-532b4218.entry.js +0 -1
  388. package/dist/stzh-components/p-5d55a672.system.entry.js +0 -1
  389. package/dist/stzh-components/p-64cdef2f.entry.js +0 -1
  390. package/dist/stzh-components/p-65918f6f.system.js +0 -1
  391. package/dist/stzh-components/p-761ee059.entry.js +0 -1
  392. package/dist/stzh-components/p-798ac79c.entry.js +0 -1
  393. package/dist/stzh-components/p-7f857e56.entry.js +0 -1
  394. package/dist/stzh-components/p-84a6e023.system.entry.js +0 -1
  395. package/dist/stzh-components/p-89bd0d46.entry.js +0 -1
  396. package/dist/stzh-components/p-8caafed2.system.entry.js +0 -1
  397. package/dist/stzh-components/p-923dffc7.entry.js +0 -1
  398. package/dist/stzh-components/p-94662bed.system.js +0 -1
  399. package/dist/stzh-components/p-951b04ab.entry.js +0 -1
  400. package/dist/stzh-components/p-990f395b.entry.js +0 -1
  401. package/dist/stzh-components/p-99b82949.entry.js +0 -1
  402. package/dist/stzh-components/p-9be21c72.entry.js +0 -1
  403. package/dist/stzh-components/p-9c35c9cd.entry.js +0 -1
  404. package/dist/stzh-components/p-9c90535a.system.js +0 -1
  405. package/dist/stzh-components/p-9de8b25b.entry.js +0 -1
  406. package/dist/stzh-components/p-a11ef2d6.system.entry.js +0 -1
  407. package/dist/stzh-components/p-a691fe87.js +0 -1
  408. package/dist/stzh-components/p-a6be6aca.system.entry.js +0 -1
  409. package/dist/stzh-components/p-a6d4a8b1.js +0 -1
  410. package/dist/stzh-components/p-a7eb3e02.system.entry.js +0 -1
  411. package/dist/stzh-components/p-ae38f1d2.entry.js +0 -1
  412. package/dist/stzh-components/p-b04a9d0f.system.entry.js +0 -1
  413. package/dist/stzh-components/p-b422041d.entry.js +0 -1
  414. package/dist/stzh-components/p-b9372a2a.entry.js +0 -1
  415. package/dist/stzh-components/p-bb698e26.entry.js +0 -1
  416. package/dist/stzh-components/p-bc545121.entry.js +0 -1
  417. package/dist/stzh-components/p-c2a22eb8.entry.js +0 -1
  418. package/dist/stzh-components/p-cc722b35.system.entry.js +0 -3
  419. package/dist/stzh-components/p-d1cfe06b.entry.js +0 -1
  420. package/dist/stzh-components/p-d943e02c.system.entry.js +0 -1
  421. package/dist/stzh-components/p-db306e24.entry.js +0 -1
  422. package/dist/stzh-components/p-e4a8f1bc.system.entry.js +0 -1
  423. package/dist/stzh-components/p-ed783154.system.entry.js +0 -1
  424. package/dist/stzh-components/p-ee4b939a.entry.js +0 -1
  425. package/dist/stzh-components/p-f0e2a32d.entry.js +0 -1
  426. package/dist/stzh-components/p-fd15cc86.entry.js +0 -1
  427. package/dist/types/components/stzh-clamp/stzh-clamp.d.ts +0 -16
@@ -0,0 +1,518 @@
1
+ import { r as registerInstance, e as createEvent, h, c as Host, g as getElement } from './index-319b7c49.js';
2
+ import { i as isStzhElement } from './utils-51148d9a.js';
3
+ import { f as fetchTranslations } from './translation-utils-2623783f.js';
4
+ import { a as addMediaChangeListener, r as removeMediaChangeListener, m as media } from './media-utils-9b041ceb.js';
5
+
6
+ const stzhCarouselCss = ".sc-stzh-carousel-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal;color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-carousel-h{display:none}.sc-stzh-carousel-h *.sc-stzh-carousel,.sc-stzh-carousel-h *.sc-stzh-carousel::before,.sc-stzh-carousel-h *.sc-stzh-carousel::after{-webkit-box-sizing:border-box;box-sizing:border-box}.sc-stzh-carousel-h{--peek:calc(var(--peek-in, 0px) + var(--peek-out, 0px));--peek-out:1.25rem;--padding-top:0px;--padding-bottom:0px;--gutter:var(--stzh-space-xxxsmall);--snap-stop:always;--slides:1;--slide-size:calc((100% - (var(--slides) - 1) * var(--gutter)) / var(--slides))}@media screen and (min-width: 600px){.sc-stzh-carousel-h{--peek-out:0px}}[variant=cards].sc-stzh-carousel-h{--padding-top:0.25rem;--padding-bottom:0.25rem;--gutter:var(--stzh-space-xsmall)}@media screen and (min-width: 600px){[variant=cards].sc-stzh-carousel-h{--peek-out:2rem}}@media screen and (min-width: 1024px){[variant=cards].sc-stzh-carousel-h{--peek-out:2.5rem;--gutter:var(--stzh-space-small)}}@media screen and (min-width: 1260px){[variant=cards].sc-stzh-carousel-h{--peek-out:5.5rem;--gutter:var(--stzh-space-medium)}}@media screen and (min-width: 1440px){[variant=cards].sc-stzh-carousel-h{--peek-out:calc((100vw - 78.75rem - var(--stzh-scrollbar-width, 0px)) / 2)}}.sc-stzh-carousel-h .sc-stzh-carousel-s>*{width:100%;height:100%;-ms-flex-negative:0;flex-shrink:0;scroll-snap-align:start;scroll-snap-stop:var(--snap-stop)}.sc-stzh-carousel-h .sc-stzh-carousel-s img{-webkit-user-drag:none;user-drag:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.sc-stzh-carousel-h .sc-stzh-carousel-s>[slot=actions]{position:absolute;top:0;left:0;z-index:1;pointer-events:none;padding:0 var(--peek)}.sc-stzh-carousel-h .sc-stzh-carousel-s>[slot=actions] stzh-text{width:auto}.sc-stzh-carousel-h .sc-stzh-carousel-s>[slot=actions] stzh-button{pointer-events:all}.sc-stzh-carousel-h .sc-stzh-carousel-s>[slot=actions] stzh-button[data-stzh-carousel-previous]{--border-radius:var(--stzh-button-border-radius) 0 0 var(--stzh-button-border-radius);--border-width:0.0625rem 0 0.0625rem 0.0625rem}.sc-stzh-carousel-h .sc-stzh-carousel-s>[slot=actions] stzh-button[data-stzh-carousel-next]{--border-radius:0 var(--stzh-button-border-radius) var(--stzh-button-border-radius) 0}.sc-stzh-carousel-h .sc-stzh-carousel-s>stzh-ratio[slot=actions] stzh-space,.sc-stzh-carousel-h .sc-stzh-carousel-s>stzh-ratio[slot=actions] stzh-hspace,.sc-stzh-carousel-h .sc-stzh-carousel-s>stzh-ratio[slot=actions] stzh-vspace{padding:var(--stzh-space-xsmall)}.sc-stzh-carousel-h .sc-stzh-carousel-s>stzh-ratio[slot=actions]{--background-color:transparent}.sc-stzh-carousel-h[variant=cards] .sc-stzh-carousel-s>[slot=actions]{position:relative;-ms-flex-order:1;order:1;margin-top:calc(var(--stzh-space-medium) - var(--padding-bottom))}.stzh-carousel.sc-stzh-carousel{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:calc(100% + var(--peek-out) * 2);margin-left:calc(var(--peek-out) / -1);margin-right:calc(var(--peek-out) / -1)}.stzh-carousel__vhidden.sc-stzh-carousel{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-carousel__scroll.sc-stzh-carousel{position:relative;grid-area:slides;display:grid;width:100%;height:100%;place-items:center;overflow-x:auto;overflow-y:visible;grid-auto-flow:column;grid-auto-columns:var(--slide-size);grid-auto-rows:100%;-moz-column-gap:var(--gutter);-webkit-column-gap:var(--gutter);column-gap:var(--gutter);-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none;scroll-behavior:smooth;overscroll-behavior-x:contain;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;scroll-padding:0 var(--peek);padding:var(--padding-top) var(--peek) var(--padding-bottom)}@media (prefers-reduced-motion: reduce){.stzh-carousel__scroll.sc-stzh-carousel{scroll-behavior:auto}}.stzh-carousel__scroll.sc-stzh-carousel::-webkit-scrollbar{display:none}.stzh-carousel--is-draggable.sc-stzh-carousel .stzh-carousel__scroll.sc-stzh-carousel{cursor:-webkit-grab;cursor:grab}.stzh-carousel--is-dragging.sc-stzh-carousel .stzh-carousel__scroll.sc-stzh-carousel{cursor:-webkit-grabbing;cursor:grabbing}.stzh-carousel--is-disabled.sc-stzh-carousel .stzh-carousel__scroll.sc-stzh-carousel{cursor:not-allowed;overflow:hidden}";
7
+
8
+ const reducedMotionMedia = window.matchMedia("(prefers-reduced-motion: reduce)");
9
+ let carouselCounter = 0;
10
+ const StzhCarousel = class {
11
+ constructor(hostRef) {
12
+ registerInstance(this, hostRef);
13
+ this.stzhSlideStart = createEvent(this, "stzhSlideStart", 7);
14
+ this.stzhSlidePassed = createEvent(this, "stzhSlidePassed", 7);
15
+ this.stzhSlideEnd = createEvent(this, "stzhSlideEnd", 7);
16
+ /** Current scroll position */
17
+ this.slideScrollLeft = 0;
18
+ /** Flag whether scrolling was done by user or not */
19
+ this.scrolledByAutoplay = false;
20
+ /** Timeout ID used to catch the end of scroll events */
21
+ this.scrollTimeoutId = null;
22
+ /** Last drag event position */
23
+ this.lastX = null;
24
+ /** Where the dragging started */
25
+ this.startX = null;
26
+ /** Where the dragging started scroll position */
27
+ this.startScrollLeft = null;
28
+ /** Timeout ID for a smooth drag release */
29
+ this.disableTimeoutId = null;
30
+ /** Whether user has just stopped dragging */
31
+ this.stoppedDragging = false;
32
+ this.onReducedMotionMediaChange = () => {
33
+ this.autoplayDisabledByMotionMedia = reducedMotionMedia.matches;
34
+ };
35
+ this.onMouseenter = () => {
36
+ this.autoplayDisabledByMouse = true;
37
+ };
38
+ this.onMouseleave = () => {
39
+ this.autoplayDisabledByMouse = false;
40
+ };
41
+ this.onFocusin = () => {
42
+ this.autoplayDisabledByFocus = true;
43
+ };
44
+ this.onFocusout = () => {
45
+ this.autoplayDisabledByFocus = false;
46
+ };
47
+ this.onPreviousClick = () => {
48
+ this.scrollToPreviousSnapPoint();
49
+ };
50
+ this.onNextClick = () => {
51
+ this.scrollToNextSnapPoint();
52
+ };
53
+ this.onSlideResize = () => {
54
+ if (this.scrollElement) {
55
+ this.itemSize = this.sizingMethod();
56
+ }
57
+ };
58
+ this.onMutation = () => {
59
+ if (!this.scrollElement) {
60
+ return;
61
+ }
62
+ this.slideElements = Array.from(this.scrollElement.children);
63
+ this.slideElements.forEach((slide, index) => {
64
+ slide.setAttribute("role", "group");
65
+ slide.setAttribute("aria-roledescription", "slide");
66
+ slide.setAttribute("aria-label", this.localization.slideLabel
67
+ .replace(/\{current\}/gi, (index + 1).toString())
68
+ .replace(/\{total\}/gi, this.slideElements.length.toString()));
69
+ });
70
+ this.previousElements = Array.from(this.element.querySelectorAll("[data-stzh-carousel-previous]"));
71
+ this.nextElements = Array.from(this.element.querySelectorAll("[data-stzh-carousel-next]"));
72
+ this.navigationTextElements = Array.from(this.element.querySelectorAll("[data-stzh-carousel-navigation-text]"));
73
+ };
74
+ this.onScroll = () => {
75
+ if (this.scrollTimeoutId === null) {
76
+ const direction = (this.scrollElement.scrollLeft > this.slideScrollLeft) ? 1 : -1;
77
+ this.scrolling = true;
78
+ if (!this.scrolledByAutoplay) {
79
+ this.autoplay = false;
80
+ }
81
+ this.stzhSlideStart.emit({
82
+ component: "stzh-carousel",
83
+ index: this.slide + direction
84
+ });
85
+ }
86
+ if (this.slide !== this.calculateSlide()) {
87
+ this.update();
88
+ this.stzhSlidePassed.emit({
89
+ component: "stzh-carousel",
90
+ index: this.slide
91
+ });
92
+ }
93
+ this.scrollTimeoutId && window.clearTimeout(this.scrollTimeoutId);
94
+ this.scrollTimeoutId = window.setTimeout(this.onScrollEnd, this.scrollTimeout);
95
+ };
96
+ this.onScrollEnd = () => {
97
+ this.scrollTimeoutId = null;
98
+ this.update();
99
+ this.scrolling = false;
100
+ this.scrolledByAutoplay = false;
101
+ if (this.stoppedDragging) {
102
+ this.stoppedDragging = false;
103
+ this.scrollElement.style.removeProperty("scroll-behavior");
104
+ this.scrollElement.style.removeProperty("scroll-snap-type");
105
+ }
106
+ if (this.tabThrough || this.variant === "cards") {
107
+ this.ariaLive = "";
108
+ }
109
+ else {
110
+ this.ariaLive = (this.currentSlides > 1 ? this.localization.slidesLabel : this.localization.slideLabel)
111
+ .replace(/\{(current|from)\}/gi, (this.slide + 1).toString())
112
+ .replace(/\{to\}/gi, (this.slide + this.currentSlides).toString())
113
+ .replace(/\{total\}/gi, this.slideElements.length.toString());
114
+ }
115
+ this.stzhSlideEnd.emit({
116
+ component: "stzh-carousel",
117
+ index: this.slide
118
+ });
119
+ };
120
+ this.onMediaChange = () => {
121
+ const ultra = media("ultra").matches;
122
+ const large = media("large").matches;
123
+ const medium = media("medium").matches;
124
+ const small = media("small").matches;
125
+ if (ultra && this.slidesUltra !== 0) {
126
+ this.currentSlides = this.slidesUltra;
127
+ }
128
+ else if (large && this.slidesLarge !== 0) {
129
+ this.currentSlides = this.slidesLarge;
130
+ }
131
+ else if (medium && this.slidesMedium !== 0) {
132
+ this.currentSlides = this.slidesMedium;
133
+ }
134
+ else if (small && this.slidesSmall !== 0) {
135
+ this.currentSlides = this.slidesSmall;
136
+ }
137
+ else {
138
+ this.currentSlides = this.slides;
139
+ }
140
+ // if (ultra && this.swipeSlidesUltra !== 0) {
141
+ // this.currentSwipeSlides = this.swipeSlidesUltra;
142
+ // } else if (large && this.swipeSlidesLarge !== 0) {
143
+ // this.currentSwipeSlides = this.swipeSlidesLarge;
144
+ // } else if (medium && this.swipeSlidesMedium !== 0) {
145
+ // this.currentSwipeSlides = this.swipeSlidesMedium;
146
+ // } else if (small && this.swipeSlidesSmall !== 0) {
147
+ // this.currentSwipeSlides = this.swipeSlidesSmall;
148
+ // } else {
149
+ // this.currentSwipeSlides = this.swipeSlides;
150
+ // }
151
+ this.currentSwipeSlides = this.currentSlides;
152
+ };
153
+ /** Scroll the slider the appropriate amount of pixels and update the last event position */
154
+ this.mouseMove = (event) => {
155
+ const distance = this.lastX - event.clientX;
156
+ this.lastX = event.clientX;
157
+ this.scrollElement.scrollLeft += distance;
158
+ };
159
+ /** Clear disable timeout, set up variables and styles and attach the listener. */
160
+ this.startDragging = (event) => {
161
+ event.preventDefault();
162
+ this.disableTimeoutId && window.clearTimeout(this.disableTimeoutId);
163
+ this.disableTimeoutId = null;
164
+ this.startX = this.lastX = event.clientX;
165
+ this.startScrollLeft = this.scrollElement.scrollLeft;
166
+ this.scrollElement.style.setProperty("scroll-behavior", "auto");
167
+ this.scrollElement.style.setProperty("scroll-snap-type", "unset");
168
+ this.dragging = true;
169
+ this.autoplay = false;
170
+ window.addEventListener("mousemove", this.mouseMove);
171
+ window.addEventListener("mouseup", this.stopDragging, { capture: true });
172
+ window.addEventListener("click", this.checkClick, { capture: true });
173
+ };
174
+ /** User stopped dragging */
175
+ this.stopDragging = (event) => {
176
+ event.preventDefault();
177
+ const distance = Math.abs(this.startX - this.lastX);
178
+ const minimumReached = distance > this.distanceQuickSwipe;
179
+ const direction = (this.lastX > this.startX) ? 1 : -1;
180
+ this.dragging = false;
181
+ const endDraddingLeft = this.scrollElement.scrollLeft;
182
+ this.scrollElement.style.removeProperty("scroll-snap-type");
183
+ const finalLeft = this.scrollElement.scrollLeft;
184
+ this.scrollElement.style.setProperty("scroll-snap-type", "unset");
185
+ this.scrollElement.scrollTo({ left: endDraddingLeft, behavior: "auto" });
186
+ if (finalLeft !== this.startScrollLeft || !minimumReached) {
187
+ this.scrollElement.scrollTo({ left: finalLeft, behavior: reducedMotionMedia.matches ? "auto" : "smooth" });
188
+ }
189
+ else if (direction === 1) {
190
+ this.slideToPrevious();
191
+ }
192
+ else {
193
+ this.slideToNext();
194
+ }
195
+ window.removeEventListener("mousemove", this.mouseMove);
196
+ window.removeEventListener("mouseup", this.stopDragging, { capture: true });
197
+ this.stoppedDragging = true;
198
+ };
199
+ this.checkClick = (event) => {
200
+ const distance = Math.abs(this.startX - this.lastX);
201
+ const minimumReached = distance > this.distancePreventClick;
202
+ if (minimumReached) {
203
+ event.preventDefault();
204
+ }
205
+ this.lastX = null;
206
+ window.removeEventListener("click", this.checkClick, { capture: true });
207
+ };
208
+ this.autoplayInterval = () => {
209
+ this.scrolledByAutoplay = true;
210
+ if (this.hasReachedLastSlide()) {
211
+ this.slideTo(0);
212
+ }
213
+ else {
214
+ this.slideToNext();
215
+ }
216
+ };
217
+ this.localization = undefined;
218
+ this.variant = "default";
219
+ this.disabled = false;
220
+ this.slides = 1;
221
+ this.slidesSmall = 0;
222
+ this.slidesMedium = 0;
223
+ this.slidesLarge = 0;
224
+ this.slidesUltra = 0;
225
+ this.slide = 0;
226
+ this.autoplay = false;
227
+ this.tabThrough = false;
228
+ this.preventMouseDrag = false;
229
+ this.scrollTimeout = 100;
230
+ this.autoplayTimeout = 3000;
231
+ this.distanceQuickSwipe = 40;
232
+ this.distancePreventClick = 6;
233
+ this.autoplayRunning = false;
234
+ this.autoplayDisabledByMotionMedia = false;
235
+ this.autoplayDisabledByMouse = false;
236
+ this.autoplayDisabledByFocus = false;
237
+ this.dragging = false;
238
+ this.scrolling = false;
239
+ this.ariaLive = "";
240
+ this.currentSlides = 1;
241
+ this.currentSwipeSlides = 1;
242
+ this.slideElements = [];
243
+ this.previousElements = [];
244
+ this.nextElements = [];
245
+ this.navigationTextElements = [];
246
+ }
247
+ /** Scroll to a slide by index */
248
+ async slideTo(index, behaviour = "smooth") {
249
+ this.scrollToSlide(index, behaviour);
250
+ }
251
+ /** Scroll to previous snap point */
252
+ async slideToPrevious(behaviour = "smooth") {
253
+ this.scrollToPreviousSnapPoint(behaviour);
254
+ }
255
+ /** Scroll to next snap point */
256
+ async slideToNext(behaviour = "smooth") {
257
+ this.scrollToNextSnapPoint(behaviour);
258
+ }
259
+ disabledWatcher() {
260
+ if (this.disabled) {
261
+ this.scrollElement && this.scrollElement.removeEventListener("scroll", this.onScroll);
262
+ this.scrollTimeoutId && window.clearTimeout(this.scrollTimeoutId);
263
+ this.scrollTimeoutId = null;
264
+ this.element.removeEventListener("mouseenter", this.onMouseenter);
265
+ this.element.removeEventListener("mouseleave", this.onMouseleave);
266
+ this.element.removeEventListener("focusin", this.onFocusin);
267
+ this.element.removeEventListener("focusout", this.onFocusout);
268
+ this.onReducedMotionMediaChange();
269
+ reducedMotionMedia && reducedMotionMedia.removeEventListener("change", this.onReducedMotionMediaChange);
270
+ }
271
+ else {
272
+ this.scrollElement && this.scrollElement.addEventListener("scroll", this.onScroll, { passive: true });
273
+ this.element.addEventListener("mouseenter", this.onMouseenter);
274
+ this.element.addEventListener("mouseleave", this.onMouseleave);
275
+ this.element.addEventListener("focusin", this.onFocusin);
276
+ this.element.addEventListener("focusout", this.onFocusout);
277
+ reducedMotionMedia && reducedMotionMedia.addEventListener("change", this.onReducedMotionMediaChange);
278
+ }
279
+ }
280
+ preventMouseDragWatcher() {
281
+ if (this.preventMouseDrag || this.disabled) {
282
+ this.disableTimeoutId && window.clearTimeout(this.disableTimeoutId);
283
+ this.disableTimeoutId = null;
284
+ this.scrollElement && this.scrollElement.removeEventListener("mousedown", this.startDragging);
285
+ this.lastX = null;
286
+ }
287
+ else {
288
+ this.scrollElement && this.scrollElement.addEventListener("mousedown", this.startDragging);
289
+ }
290
+ }
291
+ autoplayRunningWatcher() {
292
+ if (!this.autoplay
293
+ || this.disabled
294
+ || this.autoplayDisabledByMotionMedia
295
+ || this.autoplayDisabledByMouse
296
+ || this.autoplayDisabledByFocus) {
297
+ this.autoplayIntervalId && window.clearInterval(this.autoplayIntervalId);
298
+ this.autoplayIntervalId = null;
299
+ this.autoplayRunning = false;
300
+ }
301
+ else {
302
+ this.autoplayIntervalId && window.clearInterval(this.autoplayIntervalId);
303
+ this.autoplayIntervalId = window.setInterval(this.autoplayInterval, this.autoplayTimeout);
304
+ this.autoplayRunning = true;
305
+ }
306
+ }
307
+ snapAlignWatcher() {
308
+ this.slideElements.forEach((slide, index) => {
309
+ const shouldSnap = (index - this.currentSwipeSlides) % this.currentSwipeSlides === 0;
310
+ if (shouldSnap) {
311
+ slide.style.removeProperty("scroll-snap-align");
312
+ }
313
+ else {
314
+ slide.style.setProperty("scroll-snap-align", "none");
315
+ }
316
+ });
317
+ }
318
+ inertWatcher() {
319
+ this.slideElements.forEach((slide, index) => {
320
+ const isActive = this.tabThrough
321
+ || this.variant === "cards"
322
+ || index >= this.slide && index < this.slide + this.currentSlides;
323
+ slide.inert = !isActive;
324
+ if (isActive) {
325
+ slide.removeAttribute("aria-hidden");
326
+ }
327
+ else {
328
+ slide.setAttribute("aria-hidden", isActive ? "false" : "true");
329
+ }
330
+ });
331
+ }
332
+ prevNextNavigationWatcher() {
333
+ const tabThrough = this.tabThrough || this.variant === "cards";
334
+ const setAriaAttributes = (element) => {
335
+ const isStzh = isStzhElement(element);
336
+ if (tabThrough) {
337
+ element.setAttribute("aria-hidden", "true");
338
+ element.setAttribute(isStzh ? "a11y-tabindex" : "tabindex", "-1");
339
+ }
340
+ else {
341
+ element.removeAttribute("aria-hidden");
342
+ element.removeAttribute(isStzh ? "a11y-tabindex" : "tabindex");
343
+ }
344
+ };
345
+ this.nextElements.forEach(setAriaAttributes);
346
+ this.previousElements.forEach(setAriaAttributes);
347
+ }
348
+ prevNextHiddenWatcher() {
349
+ const hideElements = this.slideElements.length <= this.currentSlides;
350
+ const setHiddenAttribute = (element) => {
351
+ if (hideElements) {
352
+ element.setAttribute("hidden", "");
353
+ }
354
+ else {
355
+ element.removeAttribute("hidden");
356
+ }
357
+ };
358
+ this.navigationTextElements.forEach(setHiddenAttribute);
359
+ this.nextElements.forEach(setHiddenAttribute);
360
+ this.previousElements.forEach(setHiddenAttribute);
361
+ }
362
+ nextPrevDisabledWatcher() {
363
+ if (!this.scrollElement) {
364
+ return;
365
+ }
366
+ const reachedFirstSlide = this.slide === 0;
367
+ const reachedLastSlide = this.hasReachedLastSlide();
368
+ this.nextElements.forEach((element) => {
369
+ const isStzh = isStzhElement(element);
370
+ element.setAttribute(isStzh ? "a11y-disabled" : "aria-disabled", reachedLastSlide ? "true" : "false");
371
+ });
372
+ this.previousElements.forEach((element) => {
373
+ const isStzh = isStzhElement(element);
374
+ element.setAttribute(isStzh ? "a11y-disabled" : "aria-disabled", reachedFirstSlide ? "true" : "false");
375
+ });
376
+ }
377
+ nextElementsWatcher() {
378
+ this.nextElements.forEach((nextElement) => {
379
+ const isStzh = isStzhElement(nextElement);
380
+ nextElement.addEventListener("click", this.onNextClick);
381
+ nextElement.setAttribute(isStzh ? "a11y-controls" : "aria-controls", `${this.carouselId}-scroll`);
382
+ });
383
+ }
384
+ previousElementsWatcher() {
385
+ this.previousElements.forEach((previousElement) => {
386
+ const isStzh = isStzhElement(previousElement);
387
+ previousElement.addEventListener("click", this.onPreviousClick);
388
+ previousElement.setAttribute(isStzh ? "a11y-controls" : "aria-controls", `${this.carouselId}-scroll`);
389
+ });
390
+ }
391
+ scrollToSlide(index, behaviour = "smooth") {
392
+ if (this.disabled) {
393
+ return;
394
+ }
395
+ this.scrollElement.scrollTo({
396
+ left: index * this.itemSize,
397
+ behavior: reducedMotionMedia.matches ? "auto" : behaviour
398
+ });
399
+ }
400
+ /** Width of a slide */
401
+ sizingMethod() {
402
+ const css = window.getComputedStyle(this.scrollElement);
403
+ return this.scrollElement.firstElementChild.offsetWidth
404
+ + parseInt(css.getPropertyValue("column-gap"), 10);
405
+ }
406
+ /**
407
+ * Calculates the active slide.
408
+ * The scroll-snap-type property makes sure that the container snaps perfectly to integer multiples.
409
+ */
410
+ calculateSlide() {
411
+ // Math.round: Dispatch 'stzhSlidePassed' events around the center of each slide
412
+ // Math.ceil: Dispatch 'stzhSlidePassed' events as soon as the next one is visible
413
+ // Math.floor: Dispatch 'stzhSlidePassed' events only when the next one is fully visible
414
+ return Math.floor(this.scrollElement.scrollLeft / this.itemSize);
415
+ }
416
+ scrollToPreviousSnapPoint(behaviour = "smooth") {
417
+ if (this.disabled) {
418
+ return;
419
+ }
420
+ let previousIndex = this.slide;
421
+ let canSnap = false;
422
+ while (!canSnap && previousIndex > 0) {
423
+ previousIndex = previousIndex - 1;
424
+ canSnap = (previousIndex - this.currentSwipeSlides) % this.currentSwipeSlides === 0;
425
+ }
426
+ this.slideTo(previousIndex, behaviour);
427
+ }
428
+ scrollToNextSnapPoint(behaviour = "smooth") {
429
+ if (this.disabled) {
430
+ return;
431
+ }
432
+ this.slideTo(this.slide + this.currentSwipeSlides, behaviour);
433
+ }
434
+ update() {
435
+ this.slide = this.calculateSlide();
436
+ this.slideScrollLeft = this.slide * this.itemSize;
437
+ this.onMutation();
438
+ }
439
+ hasReachedLastSlide() {
440
+ const { scrollLeft, offsetWidth, scrollWidth } = this.scrollElement;
441
+ return Math.ceil(scrollLeft + offsetWidth) >= scrollWidth;
442
+ }
443
+ async componentWillLoad() {
444
+ this.carouselId = `stzh-carousel-${carouselCounter++}`;
445
+ this.onMediaChange();
446
+ if (!this.localization) {
447
+ this.localization = await fetchTranslations(this.element, "carousel");
448
+ }
449
+ }
450
+ componentDidLoad() {
451
+ this.itemSize = this.sizingMethod();
452
+ this.update();
453
+ this.disabledWatcher();
454
+ this.preventMouseDragWatcher();
455
+ this.autoplayRunningWatcher();
456
+ }
457
+ connectedCallback() {
458
+ addMediaChangeListener(this.onMediaChange);
459
+ this.resizeObserver = new ResizeObserver(this.onSlideResize);
460
+ this.resizeObserver.observe(this.element);
461
+ this.mutationObserver = new MutationObserver(this.onMutation);
462
+ this.mutationObserver.observe(this.element, {
463
+ childList: true,
464
+ subtree: true
465
+ });
466
+ }
467
+ disconnectedCallback() {
468
+ this.scrollTimeoutId && window.clearTimeout(this.scrollTimeoutId);
469
+ this.scrollTimeoutId = null;
470
+ this.disabled = true;
471
+ removeMediaChangeListener(this.onMediaChange);
472
+ if (this.resizeObserver) {
473
+ this.resizeObserver.disconnect();
474
+ }
475
+ if (this.mutationObserver) {
476
+ this.mutationObserver.disconnect();
477
+ }
478
+ }
479
+ render() {
480
+ const classes = {
481
+ "stzh-carousel": true,
482
+ "stzh-carousel--is-disabled": this.disabled,
483
+ "stzh-carousel--is-draggable": !this.preventMouseDrag,
484
+ "stzh-carousel--is-dragging": this.dragging,
485
+ "stzh-carousel--is-scrolling": this.scrolling,
486
+ "stzh-carousel--has-autoplay": this.autoplay,
487
+ "stzh-carousel--is-autoplay-running": this.autoplayRunning,
488
+ "stzh-carousel--is-autoplay-disabled-by-motion-media": this.autoplayDisabledByMotionMedia,
489
+ "stzh-carousel--is-autoplay-disabled-by-mouse": this.autoplayDisabledByMouse,
490
+ "stzh-carousel--is-autoplay-disabled-by-focus": this.autoplayDisabledByFocus
491
+ };
492
+ return (h(Host, { "aria-roledescription": "carousel", style: {
493
+ '--slides': this.currentSlides.toString()
494
+ } }, h("div", { class: classes }, h("slot", { name: "actions" }), h("div", { class: "stzh-carousel__vhidden", "aria-live": this.autoplayDisabledByFocus || this.autoplayDisabledByMouse ? "polite" : "off" }, this.ariaLive), h("div", { ref: (el) => (this.scrollElement = el), id: `${this.carouselId}-scroll`, class: "stzh-carousel__scroll" }, h("slot", null)))));
495
+ }
496
+ get element() { return getElement(this); }
497
+ static get watchers() { return {
498
+ "disabled": ["disabledWatcher", "preventMouseDragWatcher", "autoplayRunningWatcher"],
499
+ "preventMouseDrag": ["preventMouseDragWatcher"],
500
+ "autoplay": ["autoplayRunningWatcher"],
501
+ "autoplayDisabledByMotionMedia": ["autoplayRunningWatcher"],
502
+ "autoplayDisabledByMouse": ["autoplayRunningWatcher"],
503
+ "autoplayDisabledByFocus": ["autoplayRunningWatcher"],
504
+ "autoplayTimeout": ["autoplayRunningWatcher"],
505
+ "slideElements": ["snapAlignWatcher", "inertWatcher", "prevNextHiddenWatcher", "nextPrevDisabledWatcher"],
506
+ "currentSwipeSlides": ["snapAlignWatcher"],
507
+ "slide": ["inertWatcher", "nextPrevDisabledWatcher"],
508
+ "variant": ["inertWatcher", "prevNextNavigationWatcher"],
509
+ "currentSlides": ["inertWatcher", "prevNextHiddenWatcher", "nextPrevDisabledWatcher"],
510
+ "tabThrough": ["inertWatcher", "prevNextNavigationWatcher"],
511
+ "nextElements": ["prevNextNavigationWatcher", "prevNextHiddenWatcher", "nextPrevDisabledWatcher", "nextElementsWatcher"],
512
+ "previousElements": ["prevNextNavigationWatcher", "prevNextHiddenWatcher", "nextPrevDisabledWatcher", "previousElementsWatcher"],
513
+ "navigationTextElements": ["prevNextHiddenWatcher"]
514
+ }; }
515
+ };
516
+ StzhCarousel.style = stzhCarouselCss;
517
+
518
+ export { StzhCarousel as stzh_carousel };