@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,522 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-83d427ee.js');
6
+ const utils = require('./utils-a2ff9f84.js');
7
+ const translationUtils = require('./translation-utils-73073e44.js');
8
+ const mediaUtils = require('./media-utils-8cfc8591.js');
9
+
10
+ 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}";
11
+
12
+ const reducedMotionMedia = window.matchMedia("(prefers-reduced-motion: reduce)");
13
+ let carouselCounter = 0;
14
+ const StzhCarousel = class {
15
+ constructor(hostRef) {
16
+ index.registerInstance(this, hostRef);
17
+ this.stzhSlideStart = index.createEvent(this, "stzhSlideStart", 7);
18
+ this.stzhSlidePassed = index.createEvent(this, "stzhSlidePassed", 7);
19
+ this.stzhSlideEnd = index.createEvent(this, "stzhSlideEnd", 7);
20
+ /** Current scroll position */
21
+ this.slideScrollLeft = 0;
22
+ /** Flag whether scrolling was done by user or not */
23
+ this.scrolledByAutoplay = false;
24
+ /** Timeout ID used to catch the end of scroll events */
25
+ this.scrollTimeoutId = null;
26
+ /** Last drag event position */
27
+ this.lastX = null;
28
+ /** Where the dragging started */
29
+ this.startX = null;
30
+ /** Where the dragging started scroll position */
31
+ this.startScrollLeft = null;
32
+ /** Timeout ID for a smooth drag release */
33
+ this.disableTimeoutId = null;
34
+ /** Whether user has just stopped dragging */
35
+ this.stoppedDragging = false;
36
+ this.onReducedMotionMediaChange = () => {
37
+ this.autoplayDisabledByMotionMedia = reducedMotionMedia.matches;
38
+ };
39
+ this.onMouseenter = () => {
40
+ this.autoplayDisabledByMouse = true;
41
+ };
42
+ this.onMouseleave = () => {
43
+ this.autoplayDisabledByMouse = false;
44
+ };
45
+ this.onFocusin = () => {
46
+ this.autoplayDisabledByFocus = true;
47
+ };
48
+ this.onFocusout = () => {
49
+ this.autoplayDisabledByFocus = false;
50
+ };
51
+ this.onPreviousClick = () => {
52
+ this.scrollToPreviousSnapPoint();
53
+ };
54
+ this.onNextClick = () => {
55
+ this.scrollToNextSnapPoint();
56
+ };
57
+ this.onSlideResize = () => {
58
+ if (this.scrollElement) {
59
+ this.itemSize = this.sizingMethod();
60
+ }
61
+ };
62
+ this.onMutation = () => {
63
+ if (!this.scrollElement) {
64
+ return;
65
+ }
66
+ this.slideElements = Array.from(this.scrollElement.children);
67
+ this.slideElements.forEach((slide, index) => {
68
+ slide.setAttribute("role", "group");
69
+ slide.setAttribute("aria-roledescription", "slide");
70
+ slide.setAttribute("aria-label", this.localization.slideLabel
71
+ .replace(/\{current\}/gi, (index + 1).toString())
72
+ .replace(/\{total\}/gi, this.slideElements.length.toString()));
73
+ });
74
+ this.previousElements = Array.from(this.element.querySelectorAll("[data-stzh-carousel-previous]"));
75
+ this.nextElements = Array.from(this.element.querySelectorAll("[data-stzh-carousel-next]"));
76
+ this.navigationTextElements = Array.from(this.element.querySelectorAll("[data-stzh-carousel-navigation-text]"));
77
+ };
78
+ this.onScroll = () => {
79
+ if (this.scrollTimeoutId === null) {
80
+ const direction = (this.scrollElement.scrollLeft > this.slideScrollLeft) ? 1 : -1;
81
+ this.scrolling = true;
82
+ if (!this.scrolledByAutoplay) {
83
+ this.autoplay = false;
84
+ }
85
+ this.stzhSlideStart.emit({
86
+ component: "stzh-carousel",
87
+ index: this.slide + direction
88
+ });
89
+ }
90
+ if (this.slide !== this.calculateSlide()) {
91
+ this.update();
92
+ this.stzhSlidePassed.emit({
93
+ component: "stzh-carousel",
94
+ index: this.slide
95
+ });
96
+ }
97
+ this.scrollTimeoutId && window.clearTimeout(this.scrollTimeoutId);
98
+ this.scrollTimeoutId = window.setTimeout(this.onScrollEnd, this.scrollTimeout);
99
+ };
100
+ this.onScrollEnd = () => {
101
+ this.scrollTimeoutId = null;
102
+ this.update();
103
+ this.scrolling = false;
104
+ this.scrolledByAutoplay = false;
105
+ if (this.stoppedDragging) {
106
+ this.stoppedDragging = false;
107
+ this.scrollElement.style.removeProperty("scroll-behavior");
108
+ this.scrollElement.style.removeProperty("scroll-snap-type");
109
+ }
110
+ if (this.tabThrough || this.variant === "cards") {
111
+ this.ariaLive = "";
112
+ }
113
+ else {
114
+ this.ariaLive = (this.currentSlides > 1 ? this.localization.slidesLabel : this.localization.slideLabel)
115
+ .replace(/\{(current|from)\}/gi, (this.slide + 1).toString())
116
+ .replace(/\{to\}/gi, (this.slide + this.currentSlides).toString())
117
+ .replace(/\{total\}/gi, this.slideElements.length.toString());
118
+ }
119
+ this.stzhSlideEnd.emit({
120
+ component: "stzh-carousel",
121
+ index: this.slide
122
+ });
123
+ };
124
+ this.onMediaChange = () => {
125
+ const ultra = mediaUtils.media("ultra").matches;
126
+ const large = mediaUtils.media("large").matches;
127
+ const medium = mediaUtils.media("medium").matches;
128
+ const small = mediaUtils.media("small").matches;
129
+ if (ultra && this.slidesUltra !== 0) {
130
+ this.currentSlides = this.slidesUltra;
131
+ }
132
+ else if (large && this.slidesLarge !== 0) {
133
+ this.currentSlides = this.slidesLarge;
134
+ }
135
+ else if (medium && this.slidesMedium !== 0) {
136
+ this.currentSlides = this.slidesMedium;
137
+ }
138
+ else if (small && this.slidesSmall !== 0) {
139
+ this.currentSlides = this.slidesSmall;
140
+ }
141
+ else {
142
+ this.currentSlides = this.slides;
143
+ }
144
+ // if (ultra && this.swipeSlidesUltra !== 0) {
145
+ // this.currentSwipeSlides = this.swipeSlidesUltra;
146
+ // } else if (large && this.swipeSlidesLarge !== 0) {
147
+ // this.currentSwipeSlides = this.swipeSlidesLarge;
148
+ // } else if (medium && this.swipeSlidesMedium !== 0) {
149
+ // this.currentSwipeSlides = this.swipeSlidesMedium;
150
+ // } else if (small && this.swipeSlidesSmall !== 0) {
151
+ // this.currentSwipeSlides = this.swipeSlidesSmall;
152
+ // } else {
153
+ // this.currentSwipeSlides = this.swipeSlides;
154
+ // }
155
+ this.currentSwipeSlides = this.currentSlides;
156
+ };
157
+ /** Scroll the slider the appropriate amount of pixels and update the last event position */
158
+ this.mouseMove = (event) => {
159
+ const distance = this.lastX - event.clientX;
160
+ this.lastX = event.clientX;
161
+ this.scrollElement.scrollLeft += distance;
162
+ };
163
+ /** Clear disable timeout, set up variables and styles and attach the listener. */
164
+ this.startDragging = (event) => {
165
+ event.preventDefault();
166
+ this.disableTimeoutId && window.clearTimeout(this.disableTimeoutId);
167
+ this.disableTimeoutId = null;
168
+ this.startX = this.lastX = event.clientX;
169
+ this.startScrollLeft = this.scrollElement.scrollLeft;
170
+ this.scrollElement.style.setProperty("scroll-behavior", "auto");
171
+ this.scrollElement.style.setProperty("scroll-snap-type", "unset");
172
+ this.dragging = true;
173
+ this.autoplay = false;
174
+ window.addEventListener("mousemove", this.mouseMove);
175
+ window.addEventListener("mouseup", this.stopDragging, { capture: true });
176
+ window.addEventListener("click", this.checkClick, { capture: true });
177
+ };
178
+ /** User stopped dragging */
179
+ this.stopDragging = (event) => {
180
+ event.preventDefault();
181
+ const distance = Math.abs(this.startX - this.lastX);
182
+ const minimumReached = distance > this.distanceQuickSwipe;
183
+ const direction = (this.lastX > this.startX) ? 1 : -1;
184
+ this.dragging = false;
185
+ const endDraddingLeft = this.scrollElement.scrollLeft;
186
+ this.scrollElement.style.removeProperty("scroll-snap-type");
187
+ const finalLeft = this.scrollElement.scrollLeft;
188
+ this.scrollElement.style.setProperty("scroll-snap-type", "unset");
189
+ this.scrollElement.scrollTo({ left: endDraddingLeft, behavior: "auto" });
190
+ if (finalLeft !== this.startScrollLeft || !minimumReached) {
191
+ this.scrollElement.scrollTo({ left: finalLeft, behavior: reducedMotionMedia.matches ? "auto" : "smooth" });
192
+ }
193
+ else if (direction === 1) {
194
+ this.slideToPrevious();
195
+ }
196
+ else {
197
+ this.slideToNext();
198
+ }
199
+ window.removeEventListener("mousemove", this.mouseMove);
200
+ window.removeEventListener("mouseup", this.stopDragging, { capture: true });
201
+ this.stoppedDragging = true;
202
+ };
203
+ this.checkClick = (event) => {
204
+ const distance = Math.abs(this.startX - this.lastX);
205
+ const minimumReached = distance > this.distancePreventClick;
206
+ if (minimumReached) {
207
+ event.preventDefault();
208
+ }
209
+ this.lastX = null;
210
+ window.removeEventListener("click", this.checkClick, { capture: true });
211
+ };
212
+ this.autoplayInterval = () => {
213
+ this.scrolledByAutoplay = true;
214
+ if (this.hasReachedLastSlide()) {
215
+ this.slideTo(0);
216
+ }
217
+ else {
218
+ this.slideToNext();
219
+ }
220
+ };
221
+ this.localization = undefined;
222
+ this.variant = "default";
223
+ this.disabled = false;
224
+ this.slides = 1;
225
+ this.slidesSmall = 0;
226
+ this.slidesMedium = 0;
227
+ this.slidesLarge = 0;
228
+ this.slidesUltra = 0;
229
+ this.slide = 0;
230
+ this.autoplay = false;
231
+ this.tabThrough = false;
232
+ this.preventMouseDrag = false;
233
+ this.scrollTimeout = 100;
234
+ this.autoplayTimeout = 3000;
235
+ this.distanceQuickSwipe = 40;
236
+ this.distancePreventClick = 6;
237
+ this.autoplayRunning = false;
238
+ this.autoplayDisabledByMotionMedia = false;
239
+ this.autoplayDisabledByMouse = false;
240
+ this.autoplayDisabledByFocus = false;
241
+ this.dragging = false;
242
+ this.scrolling = false;
243
+ this.ariaLive = "";
244
+ this.currentSlides = 1;
245
+ this.currentSwipeSlides = 1;
246
+ this.slideElements = [];
247
+ this.previousElements = [];
248
+ this.nextElements = [];
249
+ this.navigationTextElements = [];
250
+ }
251
+ /** Scroll to a slide by index */
252
+ async slideTo(index, behaviour = "smooth") {
253
+ this.scrollToSlide(index, behaviour);
254
+ }
255
+ /** Scroll to previous snap point */
256
+ async slideToPrevious(behaviour = "smooth") {
257
+ this.scrollToPreviousSnapPoint(behaviour);
258
+ }
259
+ /** Scroll to next snap point */
260
+ async slideToNext(behaviour = "smooth") {
261
+ this.scrollToNextSnapPoint(behaviour);
262
+ }
263
+ disabledWatcher() {
264
+ if (this.disabled) {
265
+ this.scrollElement && this.scrollElement.removeEventListener("scroll", this.onScroll);
266
+ this.scrollTimeoutId && window.clearTimeout(this.scrollTimeoutId);
267
+ this.scrollTimeoutId = null;
268
+ this.element.removeEventListener("mouseenter", this.onMouseenter);
269
+ this.element.removeEventListener("mouseleave", this.onMouseleave);
270
+ this.element.removeEventListener("focusin", this.onFocusin);
271
+ this.element.removeEventListener("focusout", this.onFocusout);
272
+ this.onReducedMotionMediaChange();
273
+ reducedMotionMedia && reducedMotionMedia.removeEventListener("change", this.onReducedMotionMediaChange);
274
+ }
275
+ else {
276
+ this.scrollElement && this.scrollElement.addEventListener("scroll", this.onScroll, { passive: true });
277
+ this.element.addEventListener("mouseenter", this.onMouseenter);
278
+ this.element.addEventListener("mouseleave", this.onMouseleave);
279
+ this.element.addEventListener("focusin", this.onFocusin);
280
+ this.element.addEventListener("focusout", this.onFocusout);
281
+ reducedMotionMedia && reducedMotionMedia.addEventListener("change", this.onReducedMotionMediaChange);
282
+ }
283
+ }
284
+ preventMouseDragWatcher() {
285
+ if (this.preventMouseDrag || this.disabled) {
286
+ this.disableTimeoutId && window.clearTimeout(this.disableTimeoutId);
287
+ this.disableTimeoutId = null;
288
+ this.scrollElement && this.scrollElement.removeEventListener("mousedown", this.startDragging);
289
+ this.lastX = null;
290
+ }
291
+ else {
292
+ this.scrollElement && this.scrollElement.addEventListener("mousedown", this.startDragging);
293
+ }
294
+ }
295
+ autoplayRunningWatcher() {
296
+ if (!this.autoplay
297
+ || this.disabled
298
+ || this.autoplayDisabledByMotionMedia
299
+ || this.autoplayDisabledByMouse
300
+ || this.autoplayDisabledByFocus) {
301
+ this.autoplayIntervalId && window.clearInterval(this.autoplayIntervalId);
302
+ this.autoplayIntervalId = null;
303
+ this.autoplayRunning = false;
304
+ }
305
+ else {
306
+ this.autoplayIntervalId && window.clearInterval(this.autoplayIntervalId);
307
+ this.autoplayIntervalId = window.setInterval(this.autoplayInterval, this.autoplayTimeout);
308
+ this.autoplayRunning = true;
309
+ }
310
+ }
311
+ snapAlignWatcher() {
312
+ this.slideElements.forEach((slide, index) => {
313
+ const shouldSnap = (index - this.currentSwipeSlides) % this.currentSwipeSlides === 0;
314
+ if (shouldSnap) {
315
+ slide.style.removeProperty("scroll-snap-align");
316
+ }
317
+ else {
318
+ slide.style.setProperty("scroll-snap-align", "none");
319
+ }
320
+ });
321
+ }
322
+ inertWatcher() {
323
+ this.slideElements.forEach((slide, index) => {
324
+ const isActive = this.tabThrough
325
+ || this.variant === "cards"
326
+ || index >= this.slide && index < this.slide + this.currentSlides;
327
+ slide.inert = !isActive;
328
+ if (isActive) {
329
+ slide.removeAttribute("aria-hidden");
330
+ }
331
+ else {
332
+ slide.setAttribute("aria-hidden", isActive ? "false" : "true");
333
+ }
334
+ });
335
+ }
336
+ prevNextNavigationWatcher() {
337
+ const tabThrough = this.tabThrough || this.variant === "cards";
338
+ const setAriaAttributes = (element) => {
339
+ const isStzh = utils.isStzhElement(element);
340
+ if (tabThrough) {
341
+ element.setAttribute("aria-hidden", "true");
342
+ element.setAttribute(isStzh ? "a11y-tabindex" : "tabindex", "-1");
343
+ }
344
+ else {
345
+ element.removeAttribute("aria-hidden");
346
+ element.removeAttribute(isStzh ? "a11y-tabindex" : "tabindex");
347
+ }
348
+ };
349
+ this.nextElements.forEach(setAriaAttributes);
350
+ this.previousElements.forEach(setAriaAttributes);
351
+ }
352
+ prevNextHiddenWatcher() {
353
+ const hideElements = this.slideElements.length <= this.currentSlides;
354
+ const setHiddenAttribute = (element) => {
355
+ if (hideElements) {
356
+ element.setAttribute("hidden", "");
357
+ }
358
+ else {
359
+ element.removeAttribute("hidden");
360
+ }
361
+ };
362
+ this.navigationTextElements.forEach(setHiddenAttribute);
363
+ this.nextElements.forEach(setHiddenAttribute);
364
+ this.previousElements.forEach(setHiddenAttribute);
365
+ }
366
+ nextPrevDisabledWatcher() {
367
+ if (!this.scrollElement) {
368
+ return;
369
+ }
370
+ const reachedFirstSlide = this.slide === 0;
371
+ const reachedLastSlide = this.hasReachedLastSlide();
372
+ this.nextElements.forEach((element) => {
373
+ const isStzh = utils.isStzhElement(element);
374
+ element.setAttribute(isStzh ? "a11y-disabled" : "aria-disabled", reachedLastSlide ? "true" : "false");
375
+ });
376
+ this.previousElements.forEach((element) => {
377
+ const isStzh = utils.isStzhElement(element);
378
+ element.setAttribute(isStzh ? "a11y-disabled" : "aria-disabled", reachedFirstSlide ? "true" : "false");
379
+ });
380
+ }
381
+ nextElementsWatcher() {
382
+ this.nextElements.forEach((nextElement) => {
383
+ const isStzh = utils.isStzhElement(nextElement);
384
+ nextElement.addEventListener("click", this.onNextClick);
385
+ nextElement.setAttribute(isStzh ? "a11y-controls" : "aria-controls", `${this.carouselId}-scroll`);
386
+ });
387
+ }
388
+ previousElementsWatcher() {
389
+ this.previousElements.forEach((previousElement) => {
390
+ const isStzh = utils.isStzhElement(previousElement);
391
+ previousElement.addEventListener("click", this.onPreviousClick);
392
+ previousElement.setAttribute(isStzh ? "a11y-controls" : "aria-controls", `${this.carouselId}-scroll`);
393
+ });
394
+ }
395
+ scrollToSlide(index, behaviour = "smooth") {
396
+ if (this.disabled) {
397
+ return;
398
+ }
399
+ this.scrollElement.scrollTo({
400
+ left: index * this.itemSize,
401
+ behavior: reducedMotionMedia.matches ? "auto" : behaviour
402
+ });
403
+ }
404
+ /** Width of a slide */
405
+ sizingMethod() {
406
+ const css = window.getComputedStyle(this.scrollElement);
407
+ return this.scrollElement.firstElementChild.offsetWidth
408
+ + parseInt(css.getPropertyValue("column-gap"), 10);
409
+ }
410
+ /**
411
+ * Calculates the active slide.
412
+ * The scroll-snap-type property makes sure that the container snaps perfectly to integer multiples.
413
+ */
414
+ calculateSlide() {
415
+ // Math.round: Dispatch 'stzhSlidePassed' events around the center of each slide
416
+ // Math.ceil: Dispatch 'stzhSlidePassed' events as soon as the next one is visible
417
+ // Math.floor: Dispatch 'stzhSlidePassed' events only when the next one is fully visible
418
+ return Math.floor(this.scrollElement.scrollLeft / this.itemSize);
419
+ }
420
+ scrollToPreviousSnapPoint(behaviour = "smooth") {
421
+ if (this.disabled) {
422
+ return;
423
+ }
424
+ let previousIndex = this.slide;
425
+ let canSnap = false;
426
+ while (!canSnap && previousIndex > 0) {
427
+ previousIndex = previousIndex - 1;
428
+ canSnap = (previousIndex - this.currentSwipeSlides) % this.currentSwipeSlides === 0;
429
+ }
430
+ this.slideTo(previousIndex, behaviour);
431
+ }
432
+ scrollToNextSnapPoint(behaviour = "smooth") {
433
+ if (this.disabled) {
434
+ return;
435
+ }
436
+ this.slideTo(this.slide + this.currentSwipeSlides, behaviour);
437
+ }
438
+ update() {
439
+ this.slide = this.calculateSlide();
440
+ this.slideScrollLeft = this.slide * this.itemSize;
441
+ this.onMutation();
442
+ }
443
+ hasReachedLastSlide() {
444
+ const { scrollLeft, offsetWidth, scrollWidth } = this.scrollElement;
445
+ return Math.ceil(scrollLeft + offsetWidth) >= scrollWidth;
446
+ }
447
+ async componentWillLoad() {
448
+ this.carouselId = `stzh-carousel-${carouselCounter++}`;
449
+ this.onMediaChange();
450
+ if (!this.localization) {
451
+ this.localization = await translationUtils.fetchTranslations(this.element, "carousel");
452
+ }
453
+ }
454
+ componentDidLoad() {
455
+ this.itemSize = this.sizingMethod();
456
+ this.update();
457
+ this.disabledWatcher();
458
+ this.preventMouseDragWatcher();
459
+ this.autoplayRunningWatcher();
460
+ }
461
+ connectedCallback() {
462
+ mediaUtils.addMediaChangeListener(this.onMediaChange);
463
+ this.resizeObserver = new ResizeObserver(this.onSlideResize);
464
+ this.resizeObserver.observe(this.element);
465
+ this.mutationObserver = new MutationObserver(this.onMutation);
466
+ this.mutationObserver.observe(this.element, {
467
+ childList: true,
468
+ subtree: true
469
+ });
470
+ }
471
+ disconnectedCallback() {
472
+ this.scrollTimeoutId && window.clearTimeout(this.scrollTimeoutId);
473
+ this.scrollTimeoutId = null;
474
+ this.disabled = true;
475
+ mediaUtils.removeMediaChangeListener(this.onMediaChange);
476
+ if (this.resizeObserver) {
477
+ this.resizeObserver.disconnect();
478
+ }
479
+ if (this.mutationObserver) {
480
+ this.mutationObserver.disconnect();
481
+ }
482
+ }
483
+ render() {
484
+ const classes = {
485
+ "stzh-carousel": true,
486
+ "stzh-carousel--is-disabled": this.disabled,
487
+ "stzh-carousel--is-draggable": !this.preventMouseDrag,
488
+ "stzh-carousel--is-dragging": this.dragging,
489
+ "stzh-carousel--is-scrolling": this.scrolling,
490
+ "stzh-carousel--has-autoplay": this.autoplay,
491
+ "stzh-carousel--is-autoplay-running": this.autoplayRunning,
492
+ "stzh-carousel--is-autoplay-disabled-by-motion-media": this.autoplayDisabledByMotionMedia,
493
+ "stzh-carousel--is-autoplay-disabled-by-mouse": this.autoplayDisabledByMouse,
494
+ "stzh-carousel--is-autoplay-disabled-by-focus": this.autoplayDisabledByFocus
495
+ };
496
+ return (index.h(index.Host, { "aria-roledescription": "carousel", style: {
497
+ '--slides': this.currentSlides.toString()
498
+ } }, index.h("div", { class: classes }, index.h("slot", { name: "actions" }), index.h("div", { class: "stzh-carousel__vhidden", "aria-live": this.autoplayDisabledByFocus || this.autoplayDisabledByMouse ? "polite" : "off" }, this.ariaLive), index.h("div", { ref: (el) => (this.scrollElement = el), id: `${this.carouselId}-scroll`, class: "stzh-carousel__scroll" }, index.h("slot", null)))));
499
+ }
500
+ get element() { return index.getElement(this); }
501
+ static get watchers() { return {
502
+ "disabled": ["disabledWatcher", "preventMouseDragWatcher", "autoplayRunningWatcher"],
503
+ "preventMouseDrag": ["preventMouseDragWatcher"],
504
+ "autoplay": ["autoplayRunningWatcher"],
505
+ "autoplayDisabledByMotionMedia": ["autoplayRunningWatcher"],
506
+ "autoplayDisabledByMouse": ["autoplayRunningWatcher"],
507
+ "autoplayDisabledByFocus": ["autoplayRunningWatcher"],
508
+ "autoplayTimeout": ["autoplayRunningWatcher"],
509
+ "slideElements": ["snapAlignWatcher", "inertWatcher", "prevNextHiddenWatcher", "nextPrevDisabledWatcher"],
510
+ "currentSwipeSlides": ["snapAlignWatcher"],
511
+ "slide": ["inertWatcher", "nextPrevDisabledWatcher"],
512
+ "variant": ["inertWatcher", "prevNextNavigationWatcher"],
513
+ "currentSlides": ["inertWatcher", "prevNextHiddenWatcher", "nextPrevDisabledWatcher"],
514
+ "tabThrough": ["inertWatcher", "prevNextNavigationWatcher"],
515
+ "nextElements": ["prevNextNavigationWatcher", "prevNextHiddenWatcher", "nextPrevDisabledWatcher", "nextElementsWatcher"],
516
+ "previousElements": ["prevNextNavigationWatcher", "prevNextHiddenWatcher", "nextPrevDisabledWatcher", "previousElementsWatcher"],
517
+ "navigationTextElements": ["prevNextHiddenWatcher"]
518
+ }; }
519
+ };
520
+ StzhCarousel.style = stzhCarouselCss;
521
+
522
+ exports.stzh_carousel = StzhCarousel;