@oiz/stzh-components 2.6.0-aalpha → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/dist/cjs/{app-globals-2de776c8.js → app-globals-4dcdf160.js} +2 -2
  2. package/dist/cjs/{app-globals-2de776c8.js.map → app-globals-4dcdf160.js.map} +1 -1
  3. package/dist/cjs/index.cjs.js.map +1 -1
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/stzh-actions.cjs.entry.js +1 -5
  6. package/dist/cjs/stzh-actions.cjs.entry.js.map +1 -1
  7. package/dist/cjs/stzh-actionset.cjs.entry.js +2 -2
  8. package/dist/cjs/stzh-actionset.cjs.entry.js.map +1 -1
  9. package/dist/cjs/stzh-amount.cjs.entry.js +74 -20
  10. package/dist/cjs/stzh-amount.cjs.entry.js.map +1 -1
  11. package/dist/cjs/stzh-badge_3.cjs.entry.js +2 -2
  12. package/dist/cjs/stzh-badge_3.cjs.entry.js.map +1 -1
  13. package/dist/cjs/stzh-checkbox.cjs.entry.js.map +1 -1
  14. package/dist/cjs/stzh-checkboxgroup.cjs.entry.js.map +1 -1
  15. package/dist/cjs/stzh-components.cjs.js +2 -2
  16. package/dist/cjs/stzh-datatable.cjs.entry.js +2 -2
  17. package/dist/cjs/stzh-datatable.cjs.entry.js.map +1 -1
  18. package/dist/cjs/stzh-datepicker_3.cjs.entry.js.map +1 -1
  19. package/dist/cjs/stzh-dropdown.cjs.entry.js +4 -4
  20. package/dist/cjs/stzh-dropdown.cjs.entry.js.map +1 -1
  21. package/dist/cjs/stzh-ghettobox_2.cjs.entry.js +1 -1
  22. package/dist/cjs/stzh-ghettobox_2.cjs.entry.js.map +1 -1
  23. package/dist/cjs/stzh-input.cjs.entry.js.map +1 -1
  24. package/dist/cjs/stzh-invert.cjs.entry.js +1 -1
  25. package/dist/cjs/stzh-invert.cjs.entry.js.map +1 -1
  26. package/dist/cjs/stzh-table.cjs.entry.js +2 -2
  27. package/dist/cjs/stzh-table.cjs.entry.js.map +1 -1
  28. package/dist/cjs/stzh-toggle.cjs.entry.js.map +1 -1
  29. package/dist/cjs/stzh-upload.cjs.entry.js +19 -7
  30. package/dist/cjs/stzh-upload.cjs.entry.js.map +1 -1
  31. package/dist/collection/assets/i18n/de.json +7 -0
  32. package/dist/collection/assets/i18n/en.json +7 -0
  33. package/dist/collection/components/stzh-actions/stzh-actions.js +1 -5
  34. package/dist/collection/components/stzh-actions/stzh-actions.js.map +1 -1
  35. package/dist/collection/components/stzh-actionset/stzh-actionset.js +2 -2
  36. package/dist/collection/components/stzh-actionset/stzh-actionset.js.map +1 -1
  37. package/dist/collection/components/stzh-amount/stzh-amount.css +1 -0
  38. package/dist/collection/components/stzh-amount/stzh-amount.js +127 -29
  39. package/dist/collection/components/stzh-amount/stzh-amount.js.map +1 -1
  40. package/dist/collection/components/stzh-amount/stzh-amount.localization.js +2 -0
  41. package/dist/collection/components/stzh-amount/stzh-amount.localization.js.map +1 -0
  42. package/dist/collection/components/stzh-amount/stzh-amount.stories.js +17 -2
  43. package/dist/collection/components/stzh-button/stzh-button.css +2 -2
  44. package/dist/collection/components/stzh-button/stzh-button.js +1 -1
  45. package/dist/collection/components/stzh-button/stzh-button.js.map +1 -1
  46. package/dist/collection/components/stzh-chart/stzh-chart.stories.js +1 -3
  47. package/dist/collection/components/stzh-checkbox/stzh-checkbox.js +1 -1
  48. package/dist/collection/components/stzh-checkbox/stzh-checkbox.js.map +1 -1
  49. package/dist/collection/components/stzh-checkboxgroup/stzh-checkboxgroup.js +1 -1
  50. package/dist/collection/components/stzh-checkboxgroup/stzh-checkboxgroup.js.map +1 -1
  51. package/dist/collection/components/stzh-datatable/stzh-datatable.css +18 -19
  52. package/dist/collection/components/stzh-datatable/stzh-datatable.js +2 -2
  53. package/dist/collection/components/stzh-datatable/stzh-datatable.js.map +1 -1
  54. package/dist/collection/components/stzh-datatable/stzh-datatable.stories.js +1 -0
  55. package/dist/collection/components/stzh-datepicker/stzh-datepicker.js +1 -1
  56. package/dist/collection/components/stzh-datepicker/stzh-datepicker.js.map +1 -1
  57. package/dist/collection/components/stzh-dropdown/stzh-dropdown.css +11 -0
  58. package/dist/collection/components/stzh-dropdown/stzh-dropdown.js +3 -3
  59. package/dist/collection/components/stzh-dropdown/stzh-dropdown.js.map +1 -1
  60. package/dist/collection/components/stzh-ghettobox/stzh-ghettobox.css +4 -4
  61. package/dist/collection/components/stzh-input/stzh-input.js +1 -1
  62. package/dist/collection/components/stzh-input/stzh-input.js.map +1 -1
  63. package/dist/collection/components/stzh-invert/stzh-invert.css +2 -2
  64. package/dist/collection/components/stzh-radio/stzh-radio.js +1 -1
  65. package/dist/collection/components/stzh-radio/stzh-radio.js.map +1 -1
  66. package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.js +1 -1
  67. package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.js.map +1 -1
  68. package/dist/collection/components/stzh-table/stzh-table.css +18 -19
  69. package/dist/collection/components/stzh-table/stzh-table.js +2 -1
  70. package/dist/collection/components/stzh-table/stzh-table.js.map +1 -1
  71. package/dist/collection/components/stzh-table/stzh-table.stories.js +1 -0
  72. package/dist/collection/components/stzh-textandimage/stzh-textandimage.stories.js +1 -1
  73. package/dist/collection/components/stzh-toggle/stzh-toggle.js +1 -1
  74. package/dist/collection/components/stzh-toggle/stzh-toggle.js.map +1 -1
  75. package/dist/collection/components/stzh-upload/stzh-upload.js +53 -3
  76. package/dist/collection/components/stzh-upload/stzh-upload.js.map +1 -1
  77. package/dist/collection/index.js.map +1 -1
  78. package/dist/collection/libraries/dropzone/dropzone-amd-module.js +11 -5
  79. package/dist/collection/libraries/dropzone/dropzone.js +11 -5
  80. package/dist/collection/libraries/dropzone/min/dropzone-amd-module.min.js +1 -1
  81. package/dist/collection/libraries/dropzone/min/dropzone.min.js +1 -1
  82. package/dist/components/index.js +1 -1
  83. package/dist/components/index2.js.map +1 -1
  84. package/dist/components/stzh-actions.js +1 -5
  85. package/dist/components/stzh-actions.js.map +1 -1
  86. package/dist/components/stzh-actionset2.js +2 -2
  87. package/dist/components/stzh-actionset2.js.map +1 -1
  88. package/dist/components/stzh-amount.js +85 -30
  89. package/dist/components/stzh-amount.js.map +1 -1
  90. package/dist/components/stzh-button2.js +2 -2
  91. package/dist/components/stzh-button2.js.map +1 -1
  92. package/dist/components/stzh-checkbox.js.map +1 -1
  93. package/dist/components/stzh-checkboxgroup.js.map +1 -1
  94. package/dist/components/stzh-datatable.js +2 -2
  95. package/dist/components/stzh-datatable.js.map +1 -1
  96. package/dist/components/stzh-datepicker2.js.map +1 -1
  97. package/dist/components/stzh-dropdown2.js +4 -4
  98. package/dist/components/stzh-dropdown2.js.map +1 -1
  99. package/dist/components/stzh-ghettobox2.js +1 -1
  100. package/dist/components/stzh-ghettobox2.js.map +1 -1
  101. package/dist/components/stzh-input2.js.map +1 -1
  102. package/dist/components/stzh-invert.js +1 -1
  103. package/dist/components/stzh-invert.js.map +1 -1
  104. package/dist/components/stzh-radio2.js.map +1 -1
  105. package/dist/components/stzh-radiogroup2.js.map +1 -1
  106. package/dist/components/stzh-table.js +2 -2
  107. package/dist/components/stzh-table.js.map +1 -1
  108. package/dist/components/stzh-toggle.js.map +1 -1
  109. package/dist/components/stzh-upload.js +22 -8
  110. package/dist/components/stzh-upload.js.map +1 -1
  111. package/dist/esm/{app-globals-08f8b108.js → app-globals-91875913.js} +2 -2
  112. package/dist/esm/{app-globals-08f8b108.js.map → app-globals-91875913.js.map} +1 -1
  113. package/dist/esm/index.js.map +1 -1
  114. package/dist/esm/loader.js +2 -2
  115. package/dist/esm/stzh-actions.entry.js +1 -5
  116. package/dist/esm/stzh-actions.entry.js.map +1 -1
  117. package/dist/esm/stzh-actionset.entry.js +2 -2
  118. package/dist/esm/stzh-actionset.entry.js.map +1 -1
  119. package/dist/esm/stzh-amount.entry.js +75 -21
  120. package/dist/esm/stzh-amount.entry.js.map +1 -1
  121. package/dist/esm/stzh-badge_3.entry.js +2 -2
  122. package/dist/esm/stzh-badge_3.entry.js.map +1 -1
  123. package/dist/esm/stzh-checkbox.entry.js.map +1 -1
  124. package/dist/esm/stzh-checkboxgroup.entry.js.map +1 -1
  125. package/dist/esm/stzh-components.js +2 -2
  126. package/dist/esm/stzh-datatable.entry.js +2 -2
  127. package/dist/esm/stzh-datatable.entry.js.map +1 -1
  128. package/dist/esm/stzh-datepicker_3.entry.js.map +1 -1
  129. package/dist/esm/stzh-dropdown.entry.js +4 -4
  130. package/dist/esm/stzh-dropdown.entry.js.map +1 -1
  131. package/dist/esm/stzh-ghettobox_2.entry.js +1 -1
  132. package/dist/esm/stzh-ghettobox_2.entry.js.map +1 -1
  133. package/dist/esm/stzh-input.entry.js.map +1 -1
  134. package/dist/esm/stzh-invert.entry.js +1 -1
  135. package/dist/esm/stzh-invert.entry.js.map +1 -1
  136. package/dist/esm/stzh-table.entry.js +2 -2
  137. package/dist/esm/stzh-table.entry.js.map +1 -1
  138. package/dist/esm/stzh-toggle.entry.js.map +1 -1
  139. package/dist/esm/stzh-upload.entry.js +19 -7
  140. package/dist/esm/stzh-upload.entry.js.map +1 -1
  141. package/dist/esm-es5/{app-globals-08f8b108.js → app-globals-91875913.js} +2 -2
  142. package/dist/esm-es5/{app-globals-08f8b108.js.map → app-globals-91875913.js.map} +1 -1
  143. package/dist/esm-es5/index.js.map +1 -1
  144. package/dist/esm-es5/loader.js +1 -1
  145. package/dist/esm-es5/loader.js.map +1 -1
  146. package/dist/esm-es5/stzh-actions.entry.js +1 -1
  147. package/dist/esm-es5/stzh-actions.entry.js.map +1 -1
  148. package/dist/esm-es5/stzh-actionset.entry.js +1 -1
  149. package/dist/esm-es5/stzh-actionset.entry.js.map +1 -1
  150. package/dist/esm-es5/stzh-amount.entry.js +1 -1
  151. package/dist/esm-es5/stzh-amount.entry.js.map +1 -1
  152. package/dist/esm-es5/stzh-badge_3.entry.js +1 -1
  153. package/dist/esm-es5/stzh-badge_3.entry.js.map +1 -1
  154. package/dist/esm-es5/stzh-checkbox.entry.js.map +1 -1
  155. package/dist/esm-es5/stzh-checkboxgroup.entry.js.map +1 -1
  156. package/dist/esm-es5/stzh-components.js +1 -1
  157. package/dist/esm-es5/stzh-components.js.map +1 -1
  158. package/dist/esm-es5/stzh-datatable.entry.js +1 -1
  159. package/dist/esm-es5/stzh-datatable.entry.js.map +1 -1
  160. package/dist/esm-es5/stzh-datepicker_3.entry.js.map +1 -1
  161. package/dist/esm-es5/stzh-dropdown.entry.js +1 -1
  162. package/dist/esm-es5/stzh-dropdown.entry.js.map +1 -1
  163. package/dist/esm-es5/stzh-ghettobox_2.entry.js +1 -1
  164. package/dist/esm-es5/stzh-ghettobox_2.entry.js.map +1 -1
  165. package/dist/esm-es5/stzh-input.entry.js.map +1 -1
  166. package/dist/esm-es5/stzh-invert.entry.js +1 -1
  167. package/dist/esm-es5/stzh-invert.entry.js.map +1 -1
  168. package/dist/esm-es5/stzh-table.entry.js +1 -1
  169. package/dist/esm-es5/stzh-table.entry.js.map +1 -1
  170. package/dist/esm-es5/stzh-toggle.entry.js.map +1 -1
  171. package/dist/esm-es5/stzh-upload.entry.js +1 -1
  172. package/dist/esm-es5/stzh-upload.entry.js.map +1 -1
  173. package/dist/stzh-components/assets/i18n/de.json +7 -0
  174. package/dist/stzh-components/assets/i18n/en.json +7 -0
  175. package/dist/stzh-components/index.esm.js.map +1 -1
  176. package/dist/stzh-components/{p-8228cd4c.system.entry.js → p-09191103.system.entry.js} +2 -2
  177. package/dist/stzh-components/{p-8228cd4c.system.entry.js.map → p-09191103.system.entry.js.map} +1 -1
  178. package/dist/stzh-components/p-0f328a2d.system.entry.js +2 -0
  179. package/dist/stzh-components/{p-12964da2.system.entry.js.map → p-0f328a2d.system.entry.js.map} +1 -1
  180. package/dist/stzh-components/{p-772ca734.entry.js → p-1cc48f98.entry.js} +5 -5
  181. package/dist/stzh-components/{p-772ca734.entry.js.map → p-1cc48f98.entry.js.map} +1 -1
  182. package/dist/stzh-components/p-2615433f.system.entry.js +2 -0
  183. package/dist/stzh-components/p-2615433f.system.entry.js.map +1 -0
  184. package/dist/stzh-components/p-2907f1b5.entry.js +2 -0
  185. package/dist/stzh-components/{p-72da8eba.entry.js.map → p-2907f1b5.entry.js.map} +1 -1
  186. package/dist/stzh-components/{p-728cc738.entry.js → p-2d25bcc8.entry.js} +2 -2
  187. package/dist/stzh-components/p-2d25bcc8.entry.js.map +1 -0
  188. package/dist/stzh-components/p-2f3add2f.system.entry.js +2 -0
  189. package/dist/stzh-components/{p-0fa1dc9b.system.entry.js.map → p-2f3add2f.system.entry.js.map} +1 -1
  190. package/dist/stzh-components/{p-8cf10d79.js → p-362af013.js} +2 -2
  191. package/dist/stzh-components/{p-8cf10d79.js.map → p-362af013.js.map} +1 -1
  192. package/dist/stzh-components/p-39a4904e.system.entry.js.map +1 -1
  193. package/dist/stzh-components/p-3aa5623c.entry.js.map +1 -1
  194. package/dist/stzh-components/p-3cb43903.entry.js.map +1 -1
  195. package/dist/stzh-components/p-3d056a49.entry.js +2 -0
  196. package/dist/stzh-components/{p-a8cd5621.entry.js.map → p-3d056a49.entry.js.map} +1 -1
  197. package/dist/stzh-components/p-3e10addb.system.js +2 -0
  198. package/dist/stzh-components/{p-4b07ade3.system.js.map → p-3e10addb.system.js.map} +1 -1
  199. package/dist/stzh-components/p-49a0420a.entry.js +2 -0
  200. package/dist/stzh-components/{p-8bbb27f2.entry.js.map → p-49a0420a.entry.js.map} +1 -1
  201. package/dist/stzh-components/p-5d8ad1f4.system.entry.js.map +1 -1
  202. package/dist/stzh-components/{p-ea158f08.system.js → p-61b66e55.system.js} +2 -2
  203. package/dist/stzh-components/{p-ea158f08.system.js.map → p-61b66e55.system.js.map} +1 -1
  204. package/dist/stzh-components/{p-6ee544b4.entry.js → p-62188444.entry.js} +2 -2
  205. package/dist/stzh-components/{p-6ee544b4.entry.js.map → p-62188444.entry.js.map} +1 -1
  206. package/dist/stzh-components/p-67b11b03.system.entry.js +2 -0
  207. package/dist/stzh-components/p-67b11b03.system.entry.js.map +1 -0
  208. package/dist/stzh-components/{p-f223ed11.system.entry.js → p-6bb83b30.system.entry.js} +4 -4
  209. package/dist/stzh-components/{p-f223ed11.system.entry.js.map → p-6bb83b30.system.entry.js.map} +1 -1
  210. package/dist/stzh-components/{p-e683abe3.system.entry.js → p-6d097e82.system.entry.js} +2 -2
  211. package/dist/stzh-components/p-6d097e82.system.entry.js.map +1 -0
  212. package/dist/stzh-components/{p-88cd596e.system.entry.js → p-80d581ac.system.entry.js} +2 -2
  213. package/dist/stzh-components/p-80d581ac.system.entry.js.map +1 -0
  214. package/dist/stzh-components/p-82e886d4.entry.js.map +1 -1
  215. package/dist/stzh-components/{p-d69b11ec.system.entry.js → p-94a5e295.system.entry.js} +2 -2
  216. package/dist/stzh-components/p-94a5e295.system.entry.js.map +1 -0
  217. package/dist/stzh-components/p-9b7d4e8d.entry.js.map +1 -1
  218. package/dist/stzh-components/p-9d46101e.entry.js +2 -0
  219. package/dist/stzh-components/p-9d46101e.entry.js.map +1 -0
  220. package/dist/stzh-components/p-a2bdc528.system.entry.js +2 -0
  221. package/dist/stzh-components/{p-7902eb77.system.entry.js.map → p-a2bdc528.system.entry.js.map} +1 -1
  222. package/dist/stzh-components/p-b05c240b.system.entry.js.map +1 -1
  223. package/dist/stzh-components/p-b8ad5f47.system.entry.js.map +1 -1
  224. package/dist/stzh-components/{p-5e09547b.entry.js → p-bcd5b20e.entry.js} +2 -2
  225. package/dist/stzh-components/p-bcd5b20e.entry.js.map +1 -0
  226. package/dist/stzh-components/p-c94f7331.entry.js +2 -0
  227. package/dist/stzh-components/p-c94f7331.entry.js.map +1 -0
  228. package/dist/stzh-components/p-cc35e963.entry.js.map +1 -1
  229. package/dist/stzh-components/{p-3c86c595.entry.js → p-d5b4d345.entry.js} +2 -2
  230. package/dist/stzh-components/p-d5b4d345.entry.js.map +1 -0
  231. package/dist/stzh-components/p-eaa65f52.system.js.map +1 -1
  232. package/dist/stzh-components/p-f2d74491.system.entry.js.map +1 -1
  233. package/dist/stzh-components/stzh-components.esm.js +1 -1
  234. package/dist/stzh-components/stzh-components.esm.js.map +1 -1
  235. package/dist/stzh-components/stzh-components.js +1 -1
  236. package/dist/types/components/stzh-amount/stzh-amount.localization.d.ts +8 -0
  237. package/dist/types/components.d.ts +38 -18
  238. package/dist/types/index.d.ts +5 -0
  239. package/dist/vscode-data.json +19 -7
  240. package/package.json +1 -1
  241. package/dist/stzh-components/p-0fa1dc9b.system.entry.js +0 -2
  242. package/dist/stzh-components/p-12964da2.system.entry.js +0 -2
  243. package/dist/stzh-components/p-3c86c595.entry.js.map +0 -1
  244. package/dist/stzh-components/p-427461c5.system.entry.js +0 -2
  245. package/dist/stzh-components/p-427461c5.system.entry.js.map +0 -1
  246. package/dist/stzh-components/p-4b07ade3.system.js +0 -2
  247. package/dist/stzh-components/p-5e09547b.entry.js.map +0 -1
  248. package/dist/stzh-components/p-66c1942a.entry.js +0 -2
  249. package/dist/stzh-components/p-66c1942a.entry.js.map +0 -1
  250. package/dist/stzh-components/p-728cc738.entry.js.map +0 -1
  251. package/dist/stzh-components/p-72da8eba.entry.js +0 -2
  252. package/dist/stzh-components/p-7902eb77.system.entry.js +0 -2
  253. package/dist/stzh-components/p-88cd596e.system.entry.js.map +0 -1
  254. package/dist/stzh-components/p-8bbb27f2.entry.js +0 -2
  255. package/dist/stzh-components/p-a8cd5621.entry.js +0 -2
  256. package/dist/stzh-components/p-d69b11ec.system.entry.js.map +0 -1
  257. package/dist/stzh-components/p-e683abe3.system.entry.js.map +0 -1
  258. package/dist/stzh-components/p-f533c689.system.entry.js +0 -2
  259. package/dist/stzh-components/p-f533c689.system.entry.js.map +0 -1
  260. package/dist/stzh-components/p-fc3e596a.entry.js +0 -2
  261. package/dist/stzh-components/p-fc3e596a.entry.js.map +0 -1
  262. package/dist/types/components/stzh-amount/stzh-amount.d.ts +0 -64
@@ -835,7 +835,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
835
835
  })();
836
836
 
837
837
  const name = "@oiz/stzh-components";
838
- const version = "2.6.0-aalpha";
838
+ const version = "2.6.0";
839
839
 
840
840
  const packageName = name.substring(name.indexOf('/')+1);
841
841
 
@@ -1 +1 @@
1
- {"file":"index2.js","mappings":"AAAA;AACA;AACA;IAu+BiB,IAoMhB;AApMD,WAAiB,GAAG;EACL,oBAAgB,GAAG,QAAQ,CAAC;EAE5B,kBAAc,GAAG,QAAQ,CAAC;EAC1B,2BAAuB,GAAG,sBAAsB,CAAC;EAEjD,sBAAkB,GAAG,YAAY,CAAC;EAClC,2BAAuB,GAAG,GAAG,CAAC;EAC9B,4BAAwB,GAAG,GAAG,CAAC;EAC/B,sBAAkB,GAAG,GAAG,CAAC;EACzB,qBAAiB,GAAG,GAAG,CAAC;EACxB,mBAAe,GAAG,GAAG,CAAC;AAyLrC,CAAC,EApMgB,GAAG,KAAH,GAAG;;;;","names":[],"sources":["./src/index.ts"],"sourcesContent":["// ---\n// Global window types\n// ---\n\nimport {\n StzhLocaleFormats\n} from './utils/translation-utils';\n\nexport type WindowStzhComponents = {\n version: string\n locale: string\n pathMedia: string\n pathTranslations: string\n cacheTranslations: boolean\n formats: StzhLocaleFormats\n labels: \"flyout\" | \"fixed\"\n}\n\ndeclare global {\n interface Window {\n stzhComponents: WindowStzhComponents\n Dropzone: any\n // readspeaker lib APIs\n ReadSpeaker: any\n rspkr: any\n proj4: any\n }\n}\n\n// ---\n// Event Types\n// ---\n\n/* Sortable */\n\nexport type StzhSortableUpdateEvent = {\n component: \"stzh-sortable\"\n data: string[]\n item: HTMLElement\n newIndex: number\n oldIndex: number\n}\n\nexport type StzhSortableDisableEvent = {\n component: \"stzh-sortable\"\n disabled: boolean\n}\n\n/* Olmap */\n\nexport type OlmapLayer = {\n title?: string,\n thumbnailUrl: string,\n options: {\n url: string,\n layer: string,\n matrixSet: string,\n origin: number[],\n extent: number[]\n }\n}\n\nexport type StzhOlmapInitializedEvent = {\n component: \"stzh-olmap\"\n}\n\nexport type StzhOlmapPostRenderEvent = {\n component: \"stzh-olmap\"\n}\n\nexport type StzhOlmapMoveStartEvent = {\n component: \"stzh-olmap\"\n}\n\nexport type StzhOlmapMoveEndEvent = {\n component: \"stzh-olmap\"\n}\n\n/* Sticky */\n\nexport type StzhStickyStuckTopEvent = {\n component: \"stzh-sticky\"\n sticky: boolean\n}\n\nexport type StzhStickyStuckBottomEvent = {\n component: \"stzh-sticky\"\n sticky: boolean\n}\n\n/* Anchornav */\n\nexport type StzhAnchornavItem = {\n label: string\n href?: string\n icon?: string\n}\n\nexport type StzhAnchornavItemClickEvent = {\n component: \"stzh-anchornav\"\n item: StzhAnchornavItem\n originalEvent: MouseEvent\n}\n\n/* Actionset */\n\nexport type StzhActionsetItem = {\n id: string\n label?: string\n icon?: string\n iconPosition?: \"left\" | \"right\"\n iconOnly?: boolean\n badge?: string\n badgeEmpty?: boolean\n badgeType?: \"default\" | \"success\" | \"warning\" | \"error\" | \"info\"\n variant?: \"default\" | \"secondary\" | \"input\" | \"tertiary\"\n size?: \"default\" | \"small\" | \"tiny\"\n badgePosition?: \"icon\" | \"button\"\n tooltipContent?: string\n}\n\nexport type StzhActionsetItemClickEvent = {\n component: \"stzh-actionset\"\n action: StzhActionsetItem\n originalEvent: MouseEvent\n}\n\n/* Audio */\n\nexport type StzhAudioPlayEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioPlayingEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioPauseEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioReplayEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioEndEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioEndedEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioErrorEvent = {\n component: \"stzh-audio\"\n originalEvent: ErrorEvent\n}\n\n/* Share */\n\nexport type ShareService = \"facebook\" | \"twitter\" | \"linkedin\" | \"xing\" | \"mail\";\n\n/* Card */\n\nexport type StzhCardHeaderAction = {\n id: string\n label?: string\n icon?: string\n badge?: string\n badgeEmpty?: boolean\n badgeType?: \"default\" | \"success\" | \"warning\" | \"error\" | \"info\"\n onlyCollapseText?: boolean\n}\n\nexport type StzhCardSubtitleClickEvent = {\n component: \"stzh-card\"\n}\n\nexport type StzhCardCollapseEvent = {\n component: \"stzh-card\"\n collapsed: boolean\n}\n\nexport type StzhCardClickEvent = {\n component: \"stzh-card\"\n originalEvent: MouseEvent\n}\n\nexport type StzhCardStarClickEvent = {\n component: \"stzh-card\"\n starred: boolean\n}\n\nexport type StzhCardHeaderActionClickEvent = {\n component: \"stzh-card\"\n action: StzhCardHeaderAction\n}\n\n/* Microsite Teaserlist */\n\nexport type StzhMicrositeTeaserlistTag = {\n id: string\n name: string\n}\n\nexport type StzhMicrositeTeaserlistItem = {\n title?: string\n description?: string\n image?: string\n link: string\n tags: string[]\n teaserid: string\n}\n\n/* Card List */\n\nexport type StzhCardListCollapseAllEvent = {\n component: \"stzh-card-list\"\n allCollapsed: boolean\n}\n\n/* Calendar */\n\nexport type StzhCalendarChangeEvent = {\n component: \"stzh-calendar\"\n valueAsDate: Date\n value: string\n}\n\n/* Datepicker */\n\nexport type StzhDatepickerChangeEvent = {\n component: \"stzh-datepicker\"\n value: string,\n valueAsDate: Date\n}\n\n/* Appointments */\n\nexport type StzhAppointmentsChangeEvent = {\n component: \"stzh-appointments\"\n value: string\n}\n\n/* Checkbox */\n\nexport type StzhCheckboxChangeEvent = {\n component: \"stzh-checkbox\"\n originalEvent: InputEvent\n value: string\n checked: boolean\n}\n\nexport type StzhCheckboxFocusEvent = {\n component: \"stzh-checkbox\"\n originalEvent: FocusEvent\n}\n\nexport type StzhCheckboxBlurEvent = {\n component: \"stzh-checkbox\"\n originalEvent: FocusEvent\n}\n\n/* Toggle */\n\nexport type StzhToggleChangeEvent = {\n component: \"stzh-toggle\"\n originalEvent: InputEvent\n value: string\n checked: boolean\n}\n\nexport type StzhToggleFocusEvent = {\n component: \"stzh-toggle\"\n originalEvent: FocusEvent\n}\n\nexport type StzhToggleBlurEvent = {\n component: \"stzh-toggle\"\n originalEvent: FocusEvent\n}\n\n/* Button */\n\nexport type StzhButtonFocusEvent = {\n component: \"stzh-button\"\n originalEvent: FocusEvent\n}\n\nexport type StzhButtonBlurEvent = {\n component: \"stzh-button\"\n originalEvent: FocusEvent\n}\n\nexport type StzhButtonChangeEvent = {\n component: \"stzh-button\"\n originalEvent: InputEvent\n value: string\n checked: boolean\n}\n\n/* Link */\n\nexport type StzhLinkFocusEvent = {\n component: \"stzh-link\"\n originalEvent: FocusEvent\n}\n\nexport type StzhLinkBlurEvent = {\n component: \"stzh-link\"\n originalEvent: FocusEvent\n}\n\n/* Menu Item */\n\nexport type StzhMenuItemFocusEvent = {\n component: \"stzh-menu-item\"\n originalEvent: FocusEvent\n}\n\nexport type StzhMenuItemBlurEvent = {\n component: \"stzh-menu-item\"\n originalEvent: FocusEvent\n}\n\n/* Carousel */\n\nexport type StzhCarouselSlideStartEvent = {\n component: \"stzh-carousel\"\n index: number\n}\n\nexport type StzhCarouselSlidePassedEvent = {\n component: \"stzh-carousel\"\n index: number\n}\n\nexport type StzhCarouselSlideEndEvent = {\n component: \"stzh-carousel\"\n index: number\n}\n\n/* Chip Select */\n\nexport type StzhChipSelectChangeEvent = {\n component: \"stzh-chip-select\"\n value: string\n}\n\n/* Datalist */\n\nexport type StzhDatalistItemEntry = {\n value: string\n leadingIcon?: string\n label?: string\n meta?: string\n icon?: string\n iconLabel?: string\n iconTooltip?: string\n href?: string\n rel?: string\n target?: string\n items?: StzhDatalistItemEntry[]\n}\n\nexport type StzhDatalistDirectionChangeEvent = {\n component: \"stzh-datalist\"\n value: \"vertical\" | \"horizontal\"\n}\n\nexport type StzhDatalistHideBorderChangeEvent = {\n component: \"stzh-datalist\"\n value: boolean\n}\n\n/* Datalist Item */\n\nexport type StzhDatalistItemActionClickEvent = {\n component: \"stzh-datalist-item\"\n originalEvent: MouseEvent\n}\n\n/* Datamessagelist */\n\nexport type StzhDatamessagelistItemEntryMeta = {\n label: string\n value: string\n}\n\nexport type StzhDatamessagelistItemEntryAction = {\n id: string | number\n icon: string\n label: string,\n badge?: string\n}\n\nexport type StzhDatamessagelistItemEntryTag = {\n icon: string\n label: string\n type: \"default\" | \"important\"\n}\n\nexport type StzhDatamessagelistItemEntryLoadingStatus = {\n percent: number\n label: string\n type: \"default\" | \"success\" | \"warning\" | \"error\"\n}\n\nexport type StzhDatamessagelistItemClickEvent = {\n component: \"stzh-datamessagelist-item\",\n originalEvent: MouseEvent\n}\n\nexport type StzhDatamessagelistItemActionClickEvent = {\n component: \"stzh-datamessagelist-item\",\n action: StzhDatamessagelistItemEntryAction,\n originalEvent: MouseEvent\n}\n\n/* Chip */\n\nexport type StzhChipSelectItem = {\n label: string\n value: string\n disabled?: boolean\n variant?: \"tag\" | \"filter\" | \"input\"\n type?: \"default\" | \"secondary\"\n counter?: string\n icon?: string\n size?: \"default\" | \"small\"\n}\n\nexport type StzhChipClickEvent = {\n component: \"stzh-chip\",\n originalEvent: MouseEvent\n}\n\nexport type StzhChipRemoveEvent = {\n component: \"stzh-chip\",\n originalEvent: MouseEvent\n}\n\nexport type StzhChipFocusEvent = {\n component: \"stzh-chip\"\n originalEvent: FocusEvent\n}\n\nexport type StzhChipBlurEvent = {\n component: \"stzh-chip\"\n originalEvent: FocusEvent\n}\n\n/* VBZ Major Ticker */\n\nexport type StzhVbzMajortickerDisturbance = {\n id: string\n head: string\n text: string\n startDate: Date\n endDate: Date\n altStart: string\n altEnd: string\n infoUrl?: VbzTickerInfoUrl\n};\n\nexport type StzhVbzMajortickerDisturbanceFetchedEvent = {\n component: \"stzh-vbz-majorticker\"\n disturbance: StzhVbzMajortickerDisturbance | null\n}\n\n/* VBZ Ticker */\n\nexport type VbzTickerInfoUrl = {\n name: string\n url: string\n};\n\nexport type VbzTickerDisturbance = {\n id: string\n head: string\n startDate: Date\n endDate: Date\n altStart: string\n altEnd: string\n baseType?: string\n infoUrl?: VbzTickerInfoUrl\n category:\n | typeof VBZ.DISTURBANCE_INFORMATION\n | typeof VBZ.DISTURBANCE_CONSTRUCTION\n | typeof VBZ.DISTURBANCE_NORMAL\n | typeof VBZ.DISTURBANCE_EVENT\n | typeof VBZ.DISTURBANCE_BUS\n};\n\nexport type VbzTickerLine = {\n line: VBZ.Lines\n name: string\n disturbances: VbzTickerDisturbance[]\n // whether normal or big disturbance for this line exist\n alert: boolean\n // 2 = Fernverkehr / 16 = Schiff / 32 = S-Bahn/Reg / 64 = Bus / 128 = Bergbahn / 256 = Nachtnetz / 512 = Tram\n category: \"2\" | \"16\" | \"32\" | \"64\" | \"128\" | \"256\" | \"512\"\n};\n\n/* VBZ Line Chip */\n\nexport type StzhVbzLinechipLine = {\n color: string\n background: string\n comment?: string\n}\n\nexport type StzhVbzLinechipFocusEvent = {\n component: \"stzh-vbz-linechip\"\n originalEvent: FocusEvent\n}\n\nexport type StzhVbzLinechipBlurEvent = {\n component: \"stzh-vbz-linechip\"\n originalEvent: FocusEvent\n}\n\n/* Clamp */\n\nexport type StzhClampClampEvent = {\n component: \"stzh-clamp\"\n clamped: boolean\n}\n\nexport type StzhClampExpandEvent = {\n component: \"stzh-clamp\"\n expanded: boolean\n}\n\n/* Dialog */\n\nexport type StzhDialogOpenEvent = {\n component: \"stzh-dialog\"\n}\n\nexport type StzhDialogCloseEvent = {\n component: \"stzh-dialog\"\n}\n\n/* Contact */\n\nexport type ContactNumber = {\n type: \"tel\" | \"fax\"\n label: string\n number: string\n analyticsId?: string\n}\n\nexport type StzhContactAvailabilityItem = {\n weekday: string\n hours: string[]\n}\n\n/* Overlay */\n\nexport type StzhOverlayOpenEvent = {\n component: \"stzh-overlay\"\n}\n\nexport type StzhOverlayCloseEvent = {\n component: \"stzh-overlay\"\n}\n\n/* Message */\n\nexport type StzhMessageOpenEvent = {\n component: \"stzh-message\"\n}\n\nexport type StzhMessageCloseEvent = {\n component: \"stzh-message\"\n}\n\n/* Ghettobox */\n\nexport type StzhGhettoboxOpenEvent = {\n component: \"stzh-ghettobox\"\n}\n\nexport type StzhGhettoboxCloseEvent = {\n component: \"stzh-ghettobox\"\n}\n\n/* Input */\n\nexport type StzhInputChangeEvent = {\n component: \"stzh-input\"\n originalEvent: InputEvent | MouseEvent\n value: string\n}\n\nexport type StzhInputFocusEvent = {\n component: \"stzh-input\"\n originalEvent: FocusEvent\n}\n\nexport type StzhInputBlurEvent = {\n component: \"stzh-input\"\n originalEvent: FocusEvent\n}\n\n/* Popover */\n\nexport type StzhPopoverOpenEvent = {\n component: \"stzh-popover\"\n}\n\nexport type StzhPopoverOpenedEvent = {\n component: \"stzh-popover\"\n}\n\nexport type StzhPopoverCloseEvent = {\n component: \"stzh-popover\"\n}\n\nexport type StzhPopoverClosedEvent = {\n component: \"stzh-popover\"\n}\n\n/* Accordion */\n\nexport type StzhAccordionItemOpenEvent = {\n component: \"stzh-accordion-item\"\n}\n\nexport type StzhAccordionItemOpenedEvent = {\n component: \"stzh-accordion-item\"\n}\n\nexport type StzhAccordionItemCloseEvent = {\n component: \"stzh-accordion-item\"\n}\n\nexport type StzhAccordionItemClosedEvent = {\n component: \"stzh-accordion-item\"\n}\n\nexport type StzhAccordionItemFocusEvent = {\n component: \"stzh-accordion-item\"\n originalEvent: FocusEvent\n}\n\nexport type StzhAccordionItemBlurEvent = {\n component: \"stzh-accordion-item\"\n originalEvent: FocusEvent\n}\n\n/* Tooltip */\n\nexport type StzhTooltipOpenEvent = {\n component: \"stzh-tooltip\"\n}\n\nexport type StzhTooltipOpenedEvent = {\n component: \"stzh-tooltip\"\n}\n\nexport type StzhTooltipCloseEvent = {\n component: \"stzh-tooltip\"\n}\n\nexport type StzhTooltipClosedEvent = {\n component: \"stzh-tooltip\"\n}\n\n/* Radio */\n\nexport type StzhRadioChangeEvent = {\n component: \"stzh-radio\"\n originalEvent: InputEvent\n value: string\n checked: boolean\n}\n\nexport type StzhRadioFocusEvent = {\n component: \"stzh-radio\"\n originalEvent: FocusEvent\n}\n\nexport type StzhRadioBlurEvent = {\n component: \"stzh-radio\"\n originalEvent: FocusEvent\n}\n\n/* Langnav */\n\nexport type StzhLangnavChangeEvent = {\n component: \"stzh-langnav\",\n value: string\n}\n\n/* Dropdown */\n\nexport type StzhDropdownChangeEvent = {\n component: \"stzh-dropdown\",\n value: string\n}\n\nexport type StzhDropdownItemAddEvent = {\n component: \"stzh-dropdown\",\n value: string\n}\n\nexport type StzhDropdownItemRemoveEvent = {\n component: \"stzh-dropdown\",\n value: string\n}\n\nexport type StzhDropdownOptionAddEvent = {\n component: \"stzh-dropdown\",\n value: string\n}\n\nexport type StzhDropdownOptionRemoveEvent = {\n component: \"stzh-dropdown\",\n value: string\n}\n\nexport type StzhDropdownOpenEvent = {\n component: \"stzh-dropdown\"\n}\n\nexport type StzhDropdowCloseEvent = {\n component: \"stzh-dropdown\"\n}\n\nexport type StzhDropdownFocusEvent = {\n component: \"stzh-dropdown\"\n originalEvent: {\n target: Element\n }\n}\n\nexport type StzhDropdownBlurEvent = {\n component: \"stzh-dropdown\"\n}\n\nexport type StzhDropdowInitEvent = {\n component: \"stzh-dropdown\"\n}\n\n/** Progressbar */\n\nexport type StzhProgressbarDataItem = {\n label: string\n icon?: string\n disabled?: boolean\n analyticsId?: string\n}\n\n/* Progressbar Item */\n\nexport type StzhProgressbarItemClickEvent = {\n component: \"stzh-progressbar-item\",\n originalEvent: MouseEvent\n}\n\nexport type StzhProgressbarItemDottedClickEvent = {\n component: \"stzh-progressbar-item\",\n originalEvent: MouseEvent\n}\n\n/* Upload */\n\nexport type StzhUploadFilesItem = {\n name: string\n size: number\n [key: string]: any\n}\n\nexport type StzhUploadFile = File & {\n xhr: XMLHttpRequest,\n status: string\n upload: any\n accepted: boolean\n previewElement: HTMLElement\n}\n\nexport type StzhUploadFileAddedEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadFilesAddedEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[]\n}\n\nexport type StzhUploadFileRemoveEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadFileRemovedEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadSendingEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile,\n xhr: XMLHttpRequest,\n formData: FormData\n}\n\nexport type StzhUploadSendingMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[],\n xhr: XMLHttpRequest,\n formData: FormData\n}\n\nexport type StzhUploadProcessingEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadProcessingMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[]\n}\n\nexport type StzhUploadProgressEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile,\n progress: number,\n bytesSent: number\n}\n\nexport type StzhUploadProgressTotalEvent = {\n component: \"stzh-upload\",\n totalUploadProgress: number,\n totalBytes: number,\n totalBytesSent: number\n}\n\nexport type StzhUploadErrorEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile,\n message: string,\n xhr: XMLHttpRequest\n}\n\nexport type StzhUploadErrorMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[],\n message: string,\n xhr: XMLHttpRequest\n}\n\nexport type StzhUploadSuccessEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile,\n responseText: string,\n event: ProgressEvent\n}\n\nexport type StzhUploadSuccessMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[],\n responseText: string,\n event: ProgressEvent\n}\n\nexport type StzhUploadCanceledEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadCanceledMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[]\n}\n\nexport type StzhUploadCompleteEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadCompleteMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[]\n}\n\n// Merged Types\n\nexport type StzhFocusEvent =\n | StzhAccordionItemFocusEvent\n | StzhButtonFocusEvent\n | StzhCheckboxFocusEvent\n | StzhChipFocusEvent\n | StzhDropdownFocusEvent\n | StzhInputFocusEvent\n | StzhLinkFocusEvent\n | StzhMenuItemFocusEvent\n | StzhRadioFocusEvent\n | StzhToggleFocusEvent\n | StzhVbzLinechipFocusEvent\n\n// ---\n// Prop Types\n// ---\n\nexport type StzhCalendarDateDisabledPredicate = (date: Date) => boolean\n\nexport namespace Layout {\n export type Justify =\n | \"start\"\n | \"end\"\n | \"center\"\n | \"between\"\n | \"around\"\n | \"evenly\";\n\n export type Items =\n | \"start\"\n | \"end\"\n | \"center\"\n | \"baseline\"\n | \"stretch\";\n\n export type JustifySelf =\n | \"auto\"\n | Justify;\n\n export type AlignSelf =\n | \"auto\"\n | Items;\n}\n\nexport namespace Space {\n export type Sizes =\n | \"xxxsmall\"\n | \"xxsmall\"\n | \"xsmall\"\n | \"small\"\n | \"medium\"\n | \"large\"\n | \"xlarge\"\n | \"xxlarge\"\n | \"xxxlarge\"\n | \"xxxxlarge\"\n | \"big\"\n | \"xbig\"\n | \"huge\"\n | \"xhuge\"\n | \"none\"\n | \"inherit\";\n\n export type Curves =\n | \"tiny\"\n | \"small\"\n | \"regular\"\n | \"medium\"\n | \"large\"\n | \"big\"\n | \"huge\"\n | \"none\";\n}\n\nexport namespace Font {\n export type Fonts =\n | \"light\"\n | \"regular\"\n | \"medium\"\n | \"heavy\"\n | \"default\";\n\n export type Sizes =\n | \"pico\"\n | \"nano\"\n | \"micro\"\n | \"milli\"\n | \"centi\"\n | \"deci\"\n | \"regular\"\n | \"deca\"\n | \"hecto\"\n | \"kilo\"\n | \"mega\"\n | \"giga\"\n | \"hero\"\n | \"inherit\";\n\n export type Curves =\n | \"p1\"\n | \"p2\"\n | \"caption\"\n | \"h4\"\n | \"h3\"\n | \"h2\"\n | \"h1\"\n | \"hero\"\n | \"default\";\n}\n\nexport namespace VBZ {\n export const BASE_TYPE_GLOBAL = \"GLOBAL\";\n\n export const CHANNEL_TICKER = \"ticker\";\n export const CHANNEL_INFO_URL_FILTER = \"stadt-zuerich.ch/vbz\";\n\n export const DISTURBANCE_GLOBAL = \"__global__\";\n export const DISTURBANCE_INFORMATION = \"0\";\n export const DISTURBANCE_CONSTRUCTION = \"1\";\n export const DISTURBANCE_NORMAL = \"2\";\n export const DISTURBANCE_EVENT = \"4\";\n export const DISTURBANCE_BUS = \"5\";\n\n export type Lines =\n | \"2\"\n | \"3\"\n | \"4\"\n | \"5\"\n | \"6\"\n | \"7\"\n | \"8\"\n | \"9\"\n | \"10\"\n | \"11\"\n | \"12\"\n | \"13\"\n | \"14\"\n | \"15\"\n | \"16\"\n | \"17\"\n | \"19\"\n | \"20\"\n | \"21\"\n | \"23\"\n | \"24\"\n | \"25\"\n | \"29\"\n | \"31\"\n | \"32\"\n | \"33\"\n | \"34\"\n | \"35\"\n | \"36\"\n | \"37\"\n | \"38\"\n | \"39\"\n | \"40\"\n | \"45\"\n | \"46\"\n | \"54\"\n | \"61\"\n | \"62\"\n | \"63\"\n | \"64\"\n | \"66\"\n | \"67\"\n | \"69\"\n | \"70\"\n | \"72\"\n | \"73\"\n | \"75\"\n | \"76\"\n | \"77\"\n | \"78\"\n | \"79\"\n | \"80\"\n | \"83\"\n | \"89\"\n | \"91\"\n | \"94\"\n | \"95\"\n | \"99\"\n | \"151\"\n | \"152\"\n | \"153\"\n | \"156\"\n | \"161\"\n | \"162\"\n | \"163\"\n | \"165\"\n | \"184\"\n | \"185\"\n | \"200\"\n | \"201\"\n | \"215\"\n | \"220\"\n | \"235\"\n | \"236\"\n | \"245\"\n | \"301\"\n | \"302\"\n | \"303\"\n | \"304\"\n | \"305\"\n | \"306\"\n | \"307\"\n | \"308\"\n | \"309\"\n | \"311\"\n | \"314\"\n | \"315\"\n | \"317\"\n | \"321\"\n | \"323\"\n | \"325\"\n | \"350\"\n | \"444\"\n | \"445\"\n | \"701\"\n | \"702\"\n | \"703\"\n | \"704\"\n | \"705\"\n | \"720\"\n | \"721\"\n | \"725\"\n | \"726\"\n | \"727\"\n | \"742\"\n | \"743\"\n | \"744\"\n | \"745\"\n | \"747\"\n | \"748\"\n | \"751\"\n | \"752\"\n | \"753\"\n | \"754\"\n | \"759\"\n | \"760\"\n | \"765\"\n | \"768\"\n | \"781\"\n | \"786\"\n | \"787\"\n | \"910\"\n | \"912\"\n | \"916\"\n | \"917\"\n | \"918\"\n | \"919\"\n | \"E\"\n | \"N\"\n | \"N1\"\n | \"N2\"\n | \"N4\"\n | \"N5\"\n | \"N6\"\n | \"N7\"\n | \"N8\"\n | \"N9\"\n | \"N10\"\n | \"N11\"\n | \"N12\"\n | \"N13\"\n | \"N14\"\n | \"N15\"\n | \"N16\"\n | \"N17\"\n | \"N18\"\n | \"N19\"\n | \"N30\"\n | \"N31\"\n | \"N32\"\n | \"N33\"\n | \"N34\"\n | \"N45\"\n | \"N72\"\n | \"N78\"\n | \"SN1\"\n | \"SN4\"\n | \"SN5\"\n | \"SN6\"\n | \"SN7\"\n | \"SN8\"\n | \"SN9\"\n | \"S2\"\n | \"S3\"\n | \"S4\"\n | \"S5\"\n | \"S6\"\n | \"S7\"\n | \"S8\"\n | \"S9\"\n | \"S10\"\n | \"S11\"\n | \"S14\"\n | \"S15\"\n | \"S16\"\n | \"S18\"\n | \"S19\"\n | \"S20\"\n | \"S21\"\n | \"S23\"\n | \"S24\"\n | \"S25\"\n}\n\n// ---\n// Stencil component types\n// ---\n\nexport * from './components';\n"],"version":3}
1
+ {"file":"index2.js","mappings":"AAAA;AACA;AACA;IA++BiB,IAoMhB;AApMD,WAAiB,GAAG;EACL,oBAAgB,GAAG,QAAQ,CAAC;EAE5B,kBAAc,GAAG,QAAQ,CAAC;EAC1B,2BAAuB,GAAG,sBAAsB,CAAC;EAEjD,sBAAkB,GAAG,YAAY,CAAC;EAClC,2BAAuB,GAAG,GAAG,CAAC;EAC9B,4BAAwB,GAAG,GAAG,CAAC;EAC/B,sBAAkB,GAAG,GAAG,CAAC;EACzB,qBAAiB,GAAG,GAAG,CAAC;EACxB,mBAAe,GAAG,GAAG,CAAC;AAyLrC,CAAC,EApMgB,GAAG,KAAH,GAAG;;;;","names":[],"sources":["./src/index.ts"],"sourcesContent":["// ---\n// Global window types\n// ---\n\nimport {\n StzhLocaleFormats\n} from './utils/translation-utils';\n\nexport type WindowStzhComponents = {\n version: string\n locale: string\n pathMedia: string\n pathTranslations: string\n cacheTranslations: boolean\n formats: StzhLocaleFormats\n labels: \"flyout\" | \"fixed\"\n}\n\ndeclare global {\n interface Window {\n stzhComponents: WindowStzhComponents\n Dropzone: any\n // readspeaker lib APIs\n ReadSpeaker: any\n rspkr: any\n proj4: any\n }\n}\n\n// ---\n// Event Types\n// ---\n\n/* Sortable */\n\nexport type StzhSortableUpdateEvent = {\n component: \"stzh-sortable\"\n data: string[]\n item: HTMLElement\n newIndex: number\n oldIndex: number\n}\n\nexport type StzhSortableDisableEvent = {\n component: \"stzh-sortable\"\n disabled: boolean\n}\n\n/* Olmap */\n\nexport type OlmapLayer = {\n title?: string,\n thumbnailUrl: string,\n options: {\n url: string,\n layer: string,\n matrixSet: string,\n origin: number[],\n extent: number[]\n }\n}\n\nexport type StzhOlmapInitializedEvent = {\n component: \"stzh-olmap\"\n}\n\nexport type StzhOlmapPostRenderEvent = {\n component: \"stzh-olmap\"\n}\n\nexport type StzhOlmapMoveStartEvent = {\n component: \"stzh-olmap\"\n}\n\nexport type StzhOlmapMoveEndEvent = {\n component: \"stzh-olmap\"\n}\n\n/* Sticky */\n\nexport type StzhStickyStuckTopEvent = {\n component: \"stzh-sticky\"\n sticky: boolean\n}\n\nexport type StzhStickyStuckBottomEvent = {\n component: \"stzh-sticky\"\n sticky: boolean\n}\n\n/* Anchornav */\n\nexport type StzhAnchornavItem = {\n label: string\n href?: string\n icon?: string\n}\n\nexport type StzhAnchornavItemClickEvent = {\n component: \"stzh-anchornav\"\n item: StzhAnchornavItem\n originalEvent: MouseEvent\n}\n\n/* Actionset */\n\nexport type StzhActionsetItem = {\n id: string\n label?: string\n icon?: string\n iconPosition?: \"left\" | \"right\"\n iconOnly?: boolean\n badge?: string\n badgeEmpty?: boolean\n badgeType?: \"default\" | \"success\" | \"warning\" | \"error\" | \"info\"\n variant?: \"default\" | \"secondary\" | \"input\" | \"tertiary\"\n size?: \"default\" | \"small\" | \"tiny\"\n badgePosition?: \"icon\" | \"button\"\n tooltipContent?: string\n}\n\nexport type StzhActionsetItemClickEvent = {\n component: \"stzh-actionset\"\n action: StzhActionsetItem\n originalEvent: MouseEvent\n}\n\n/* Audio */\n\nexport type StzhAudioPlayEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioPlayingEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioPauseEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioReplayEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioEndEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioEndedEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioErrorEvent = {\n component: \"stzh-audio\"\n originalEvent: ErrorEvent\n}\n\n/* Share */\n\nexport type ShareService = \"facebook\" | \"twitter\" | \"linkedin\" | \"xing\" | \"mail\";\n\n/* Card */\n\nexport type StzhCardHeaderAction = {\n id: string\n label?: string\n icon?: string\n badge?: string\n badgeEmpty?: boolean\n badgeType?: \"default\" | \"success\" | \"warning\" | \"error\" | \"info\"\n onlyCollapseText?: boolean\n}\n\nexport type StzhCardSubtitleClickEvent = {\n component: \"stzh-card\"\n}\n\nexport type StzhCardCollapseEvent = {\n component: \"stzh-card\"\n collapsed: boolean\n}\n\nexport type StzhCardClickEvent = {\n component: \"stzh-card\"\n originalEvent: MouseEvent\n}\n\nexport type StzhCardStarClickEvent = {\n component: \"stzh-card\"\n starred: boolean\n}\n\nexport type StzhCardHeaderActionClickEvent = {\n component: \"stzh-card\"\n action: StzhCardHeaderAction\n}\n\n/* Microsite Teaserlist */\n\nexport type StzhMicrositeTeaserlistTag = {\n id: string\n name: string\n}\n\nexport type StzhMicrositeTeaserlistItem = {\n title?: string\n description?: string\n image?: string\n link: string\n tags: string[]\n teaserid: string\n}\n\n/* Card List */\n\nexport type StzhCardListCollapseAllEvent = {\n component: \"stzh-card-list\"\n allCollapsed: boolean\n}\n\n/* Calendar */\n\nexport type StzhCalendarChangeEvent = {\n component: \"stzh-calendar\"\n valueAsDate: Date\n value: string\n}\n\n/* Datepicker */\n\nexport type StzhDatepickerChangeEvent = {\n component: \"stzh-datepicker\"\n value: string,\n valueAsDate: Date\n}\n\n/* Amount */\n\nexport type StzhAmountChangeEvent = {\n component: \"stzh-amount\"\n value: string\n}\n\n/* Appointments */\n\nexport type StzhAppointmentsChangeEvent = {\n component: \"stzh-appointments\"\n value: string\n}\n\n/* Checkbox */\n\nexport type StzhCheckboxChangeEvent = {\n component: \"stzh-checkbox\"\n originalEvent: InputEvent\n value: string\n checked: boolean\n}\n\nexport type StzhCheckboxFocusEvent = {\n component: \"stzh-checkbox\"\n originalEvent: FocusEvent\n}\n\nexport type StzhCheckboxBlurEvent = {\n component: \"stzh-checkbox\"\n originalEvent: FocusEvent\n}\n\n/* Toggle */\n\nexport type StzhToggleChangeEvent = {\n component: \"stzh-toggle\"\n originalEvent: InputEvent\n value: string\n checked: boolean\n}\n\nexport type StzhToggleFocusEvent = {\n component: \"stzh-toggle\"\n originalEvent: FocusEvent\n}\n\nexport type StzhToggleBlurEvent = {\n component: \"stzh-toggle\"\n originalEvent: FocusEvent\n}\n\n/* Button */\n\nexport type StzhButtonFocusEvent = {\n component: \"stzh-button\"\n originalEvent: FocusEvent\n}\n\nexport type StzhButtonBlurEvent = {\n component: \"stzh-button\"\n originalEvent: FocusEvent\n}\n\nexport type StzhButtonChangeEvent = {\n component: \"stzh-button\"\n originalEvent: InputEvent\n value: string\n checked: boolean\n}\n\n/* Link */\n\nexport type StzhLinkFocusEvent = {\n component: \"stzh-link\"\n originalEvent: FocusEvent\n}\n\nexport type StzhLinkBlurEvent = {\n component: \"stzh-link\"\n originalEvent: FocusEvent\n}\n\n/* Menu Item */\n\nexport type StzhMenuItemFocusEvent = {\n component: \"stzh-menu-item\"\n originalEvent: FocusEvent\n}\n\nexport type StzhMenuItemBlurEvent = {\n component: \"stzh-menu-item\"\n originalEvent: FocusEvent\n}\n\n/* Carousel */\n\nexport type StzhCarouselSlideStartEvent = {\n component: \"stzh-carousel\"\n index: number\n}\n\nexport type StzhCarouselSlidePassedEvent = {\n component: \"stzh-carousel\"\n index: number\n}\n\nexport type StzhCarouselSlideEndEvent = {\n component: \"stzh-carousel\"\n index: number\n}\n\n/* Chip Select */\n\nexport type StzhChipSelectChangeEvent = {\n component: \"stzh-chip-select\"\n value: string\n}\n\n/* Datalist */\n\nexport type StzhDatalistItemEntry = {\n value: string\n leadingIcon?: string\n label?: string\n meta?: string\n icon?: string\n iconLabel?: string\n iconTooltip?: string\n href?: string\n rel?: string\n target?: string\n items?: StzhDatalistItemEntry[]\n}\n\nexport type StzhDatalistDirectionChangeEvent = {\n component: \"stzh-datalist\"\n value: \"vertical\" | \"horizontal\"\n}\n\nexport type StzhDatalistHideBorderChangeEvent = {\n component: \"stzh-datalist\"\n value: boolean\n}\n\n/* Datalist Item */\n\nexport type StzhDatalistItemActionClickEvent = {\n component: \"stzh-datalist-item\"\n originalEvent: MouseEvent\n}\n\n/* Datamessagelist */\n\nexport type StzhDatamessagelistItemEntryMeta = {\n label: string\n value: string\n}\n\nexport type StzhDatamessagelistItemEntryAction = {\n id: string | number\n icon: string\n label: string,\n badge?: string\n}\n\nexport type StzhDatamessagelistItemEntryTag = {\n icon: string\n label: string\n type: \"default\" | \"important\"\n}\n\nexport type StzhDatamessagelistItemEntryLoadingStatus = {\n percent: number\n label: string\n type: \"default\" | \"success\" | \"warning\" | \"error\"\n}\n\nexport type StzhDatamessagelistItemClickEvent = {\n component: \"stzh-datamessagelist-item\",\n originalEvent: MouseEvent\n}\n\nexport type StzhDatamessagelistItemActionClickEvent = {\n component: \"stzh-datamessagelist-item\",\n action: StzhDatamessagelistItemEntryAction,\n originalEvent: MouseEvent\n}\n\n/* Chip */\n\nexport type StzhChipSelectItem = {\n label: string\n value: string\n disabled?: boolean\n variant?: \"tag\" | \"filter\" | \"input\"\n type?: \"default\" | \"secondary\"\n counter?: string\n icon?: string\n size?: \"default\" | \"small\"\n}\n\nexport type StzhChipClickEvent = {\n component: \"stzh-chip\",\n originalEvent: MouseEvent\n}\n\nexport type StzhChipRemoveEvent = {\n component: \"stzh-chip\",\n originalEvent: MouseEvent\n}\n\nexport type StzhChipFocusEvent = {\n component: \"stzh-chip\"\n originalEvent: FocusEvent\n}\n\nexport type StzhChipBlurEvent = {\n component: \"stzh-chip\"\n originalEvent: FocusEvent\n}\n\n/* VBZ Major Ticker */\n\nexport type StzhVbzMajortickerDisturbance = {\n id: string\n head: string\n text: string\n startDate: Date\n endDate: Date\n altStart: string\n altEnd: string\n infoUrl?: VbzTickerInfoUrl\n};\n\nexport type StzhVbzMajortickerDisturbanceFetchedEvent = {\n component: \"stzh-vbz-majorticker\"\n disturbance: StzhVbzMajortickerDisturbance | null\n}\n\n/* VBZ Ticker */\n\nexport type VbzTickerInfoUrl = {\n name: string\n url: string\n};\n\nexport type VbzTickerDisturbance = {\n id: string\n head: string\n startDate: Date\n endDate: Date\n altStart: string\n altEnd: string\n baseType?: string\n infoUrl?: VbzTickerInfoUrl\n category:\n | typeof VBZ.DISTURBANCE_INFORMATION\n | typeof VBZ.DISTURBANCE_CONSTRUCTION\n | typeof VBZ.DISTURBANCE_NORMAL\n | typeof VBZ.DISTURBANCE_EVENT\n | typeof VBZ.DISTURBANCE_BUS\n};\n\nexport type VbzTickerLine = {\n line: VBZ.Lines\n name: string\n disturbances: VbzTickerDisturbance[]\n // whether normal or big disturbance for this line exist\n alert: boolean\n // 2 = Fernverkehr / 16 = Schiff / 32 = S-Bahn/Reg / 64 = Bus / 128 = Bergbahn / 256 = Nachtnetz / 512 = Tram\n category: \"2\" | \"16\" | \"32\" | \"64\" | \"128\" | \"256\" | \"512\"\n};\n\n/* VBZ Line Chip */\n\nexport type StzhVbzLinechipLine = {\n color: string\n background: string\n comment?: string\n}\n\nexport type StzhVbzLinechipFocusEvent = {\n component: \"stzh-vbz-linechip\"\n originalEvent: FocusEvent\n}\n\nexport type StzhVbzLinechipBlurEvent = {\n component: \"stzh-vbz-linechip\"\n originalEvent: FocusEvent\n}\n\n/* Clamp */\n\nexport type StzhClampClampEvent = {\n component: \"stzh-clamp\"\n clamped: boolean\n}\n\nexport type StzhClampExpandEvent = {\n component: \"stzh-clamp\"\n expanded: boolean\n}\n\n/* Dialog */\n\nexport type StzhDialogOpenEvent = {\n component: \"stzh-dialog\"\n}\n\nexport type StzhDialogCloseEvent = {\n component: \"stzh-dialog\"\n}\n\n/* Contact */\n\nexport type ContactNumber = {\n type: \"tel\" | \"fax\"\n label: string\n number: string\n analyticsId?: string\n}\n\nexport type StzhContactAvailabilityItem = {\n weekday: string\n hours: string[]\n}\n\n/* Overlay */\n\nexport type StzhOverlayOpenEvent = {\n component: \"stzh-overlay\"\n}\n\nexport type StzhOverlayCloseEvent = {\n component: \"stzh-overlay\"\n}\n\n/* Message */\n\nexport type StzhMessageOpenEvent = {\n component: \"stzh-message\"\n}\n\nexport type StzhMessageCloseEvent = {\n component: \"stzh-message\"\n}\n\n/* Ghettobox */\n\nexport type StzhGhettoboxOpenEvent = {\n component: \"stzh-ghettobox\"\n}\n\nexport type StzhGhettoboxCloseEvent = {\n component: \"stzh-ghettobox\"\n}\n\n/* Input */\n\nexport type StzhInputChangeEvent = {\n component: \"stzh-input\"\n originalEvent: InputEvent | MouseEvent\n value: string\n}\n\nexport type StzhInputFocusEvent = {\n component: \"stzh-input\"\n originalEvent: FocusEvent\n}\n\nexport type StzhInputBlurEvent = {\n component: \"stzh-input\"\n originalEvent: FocusEvent\n}\n\n/* Popover */\n\nexport type StzhPopoverOpenEvent = {\n component: \"stzh-popover\"\n}\n\nexport type StzhPopoverOpenedEvent = {\n component: \"stzh-popover\"\n}\n\nexport type StzhPopoverCloseEvent = {\n component: \"stzh-popover\"\n}\n\nexport type StzhPopoverClosedEvent = {\n component: \"stzh-popover\"\n}\n\n/* Accordion */\n\nexport type StzhAccordionItemOpenEvent = {\n component: \"stzh-accordion-item\"\n}\n\nexport type StzhAccordionItemOpenedEvent = {\n component: \"stzh-accordion-item\"\n}\n\nexport type StzhAccordionItemCloseEvent = {\n component: \"stzh-accordion-item\"\n}\n\nexport type StzhAccordionItemClosedEvent = {\n component: \"stzh-accordion-item\"\n}\n\nexport type StzhAccordionItemFocusEvent = {\n component: \"stzh-accordion-item\"\n originalEvent: FocusEvent\n}\n\nexport type StzhAccordionItemBlurEvent = {\n component: \"stzh-accordion-item\"\n originalEvent: FocusEvent\n}\n\n/* Tooltip */\n\nexport type StzhTooltipOpenEvent = {\n component: \"stzh-tooltip\"\n}\n\nexport type StzhTooltipOpenedEvent = {\n component: \"stzh-tooltip\"\n}\n\nexport type StzhTooltipCloseEvent = {\n component: \"stzh-tooltip\"\n}\n\nexport type StzhTooltipClosedEvent = {\n component: \"stzh-tooltip\"\n}\n\n/* Radio */\n\nexport type StzhRadioChangeEvent = {\n component: \"stzh-radio\"\n originalEvent: InputEvent\n value: string\n checked: boolean\n}\n\nexport type StzhRadioFocusEvent = {\n component: \"stzh-radio\"\n originalEvent: FocusEvent\n}\n\nexport type StzhRadioBlurEvent = {\n component: \"stzh-radio\"\n originalEvent: FocusEvent\n}\n\n/* Langnav */\n\nexport type StzhLangnavChangeEvent = {\n component: \"stzh-langnav\",\n value: string\n}\n\n/* Dropdown */\n\nexport type StzhDropdownChangeEvent = {\n component: \"stzh-dropdown\",\n value: string\n}\n\nexport type StzhDropdownItemAddEvent = {\n component: \"stzh-dropdown\",\n value: string\n}\n\nexport type StzhDropdownItemRemoveEvent = {\n component: \"stzh-dropdown\",\n value: string\n}\n\nexport type StzhDropdownOptionAddEvent = {\n component: \"stzh-dropdown\",\n value: string\n}\n\nexport type StzhDropdownOptionRemoveEvent = {\n component: \"stzh-dropdown\",\n value: string\n}\n\nexport type StzhDropdownOpenEvent = {\n component: \"stzh-dropdown\"\n}\n\nexport type StzhDropdowCloseEvent = {\n component: \"stzh-dropdown\"\n}\n\nexport type StzhDropdownFocusEvent = {\n component: \"stzh-dropdown\"\n originalEvent: {\n target: Element\n }\n}\n\nexport type StzhDropdownBlurEvent = {\n component: \"stzh-dropdown\"\n}\n\nexport type StzhDropdowInitEvent = {\n component: \"stzh-dropdown\"\n}\n\n/** Progressbar */\n\nexport type StzhProgressbarDataItem = {\n label: string\n icon?: string\n disabled?: boolean\n analyticsId?: string\n}\n\n/* Progressbar Item */\n\nexport type StzhProgressbarItemClickEvent = {\n component: \"stzh-progressbar-item\",\n originalEvent: MouseEvent\n}\n\nexport type StzhProgressbarItemDottedClickEvent = {\n component: \"stzh-progressbar-item\",\n originalEvent: MouseEvent\n}\n\n/* Upload */\n\nexport type StzhUploadFilesItem = {\n name: string\n size: number\n [key: string]: any\n}\n\nexport type StzhUploadFile = File & {\n xhr: XMLHttpRequest,\n status: string\n upload: any\n accepted: boolean\n previewElement: HTMLElement\n}\n\nexport type StzhUploadFileAddedEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadFilesAddedEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[]\n}\n\nexport type StzhUploadFileRemoveEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadFileRemovedEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n force: boolean\n}\n\nexport type StzhUploadSendingEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile,\n xhr: XMLHttpRequest,\n formData: FormData\n}\n\nexport type StzhUploadSendingMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[],\n xhr: XMLHttpRequest,\n formData: FormData\n}\n\nexport type StzhUploadProcessingEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadProcessingMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[]\n}\n\nexport type StzhUploadProgressEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile,\n progress: number,\n bytesSent: number\n}\n\nexport type StzhUploadProgressTotalEvent = {\n component: \"stzh-upload\",\n totalUploadProgress: number,\n totalBytes: number,\n totalBytesSent: number\n}\n\nexport type StzhUploadErrorEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile,\n message: string,\n xhr: XMLHttpRequest\n}\n\nexport type StzhUploadErrorMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[],\n message: string,\n xhr: XMLHttpRequest\n}\n\nexport type StzhUploadSuccessEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile,\n responseText: string,\n event: ProgressEvent\n}\n\nexport type StzhUploadSuccessMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[],\n responseText: string,\n event: ProgressEvent\n}\n\nexport type StzhUploadCanceledEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadCanceledMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[]\n}\n\nexport type StzhUploadCompleteEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadCompleteMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[]\n}\n\n// Merged Types\n\nexport type StzhFocusEvent =\n | StzhAccordionItemFocusEvent\n | StzhButtonFocusEvent\n | StzhCheckboxFocusEvent\n | StzhChipFocusEvent\n | StzhDropdownFocusEvent\n | StzhInputFocusEvent\n | StzhLinkFocusEvent\n | StzhMenuItemFocusEvent\n | StzhRadioFocusEvent\n | StzhToggleFocusEvent\n | StzhVbzLinechipFocusEvent\n\n// ---\n// Prop Types\n// ---\n\nexport type StzhCalendarDateDisabledPredicate = (date: Date) => boolean\n\nexport namespace Layout {\n export type Justify =\n | \"start\"\n | \"end\"\n | \"center\"\n | \"between\"\n | \"around\"\n | \"evenly\";\n\n export type Items =\n | \"start\"\n | \"end\"\n | \"center\"\n | \"baseline\"\n | \"stretch\";\n\n export type JustifySelf =\n | \"auto\"\n | Justify;\n\n export type AlignSelf =\n | \"auto\"\n | Items;\n}\n\nexport namespace Space {\n export type Sizes =\n | \"xxxsmall\"\n | \"xxsmall\"\n | \"xsmall\"\n | \"small\"\n | \"medium\"\n | \"large\"\n | \"xlarge\"\n | \"xxlarge\"\n | \"xxxlarge\"\n | \"xxxxlarge\"\n | \"big\"\n | \"xbig\"\n | \"huge\"\n | \"xhuge\"\n | \"none\"\n | \"inherit\";\n\n export type Curves =\n | \"tiny\"\n | \"small\"\n | \"regular\"\n | \"medium\"\n | \"large\"\n | \"big\"\n | \"huge\"\n | \"none\";\n}\n\nexport namespace Font {\n export type Fonts =\n | \"light\"\n | \"regular\"\n | \"medium\"\n | \"heavy\"\n | \"default\";\n\n export type Sizes =\n | \"pico\"\n | \"nano\"\n | \"micro\"\n | \"milli\"\n | \"centi\"\n | \"deci\"\n | \"regular\"\n | \"deca\"\n | \"hecto\"\n | \"kilo\"\n | \"mega\"\n | \"giga\"\n | \"hero\"\n | \"inherit\";\n\n export type Curves =\n | \"p1\"\n | \"p2\"\n | \"caption\"\n | \"h4\"\n | \"h3\"\n | \"h2\"\n | \"h1\"\n | \"hero\"\n | \"default\";\n}\n\nexport namespace VBZ {\n export const BASE_TYPE_GLOBAL = \"GLOBAL\";\n\n export const CHANNEL_TICKER = \"ticker\";\n export const CHANNEL_INFO_URL_FILTER = \"stadt-zuerich.ch/vbz\";\n\n export const DISTURBANCE_GLOBAL = \"__global__\";\n export const DISTURBANCE_INFORMATION = \"0\";\n export const DISTURBANCE_CONSTRUCTION = \"1\";\n export const DISTURBANCE_NORMAL = \"2\";\n export const DISTURBANCE_EVENT = \"4\";\n export const DISTURBANCE_BUS = \"5\";\n\n export type Lines =\n | \"2\"\n | \"3\"\n | \"4\"\n | \"5\"\n | \"6\"\n | \"7\"\n | \"8\"\n | \"9\"\n | \"10\"\n | \"11\"\n | \"12\"\n | \"13\"\n | \"14\"\n | \"15\"\n | \"16\"\n | \"17\"\n | \"19\"\n | \"20\"\n | \"21\"\n | \"23\"\n | \"24\"\n | \"25\"\n | \"29\"\n | \"31\"\n | \"32\"\n | \"33\"\n | \"34\"\n | \"35\"\n | \"36\"\n | \"37\"\n | \"38\"\n | \"39\"\n | \"40\"\n | \"45\"\n | \"46\"\n | \"54\"\n | \"61\"\n | \"62\"\n | \"63\"\n | \"64\"\n | \"66\"\n | \"67\"\n | \"69\"\n | \"70\"\n | \"72\"\n | \"73\"\n | \"75\"\n | \"76\"\n | \"77\"\n | \"78\"\n | \"79\"\n | \"80\"\n | \"83\"\n | \"89\"\n | \"91\"\n | \"94\"\n | \"95\"\n | \"99\"\n | \"151\"\n | \"152\"\n | \"153\"\n | \"156\"\n | \"161\"\n | \"162\"\n | \"163\"\n | \"165\"\n | \"184\"\n | \"185\"\n | \"200\"\n | \"201\"\n | \"215\"\n | \"220\"\n | \"235\"\n | \"236\"\n | \"245\"\n | \"301\"\n | \"302\"\n | \"303\"\n | \"304\"\n | \"305\"\n | \"306\"\n | \"307\"\n | \"308\"\n | \"309\"\n | \"311\"\n | \"314\"\n | \"315\"\n | \"317\"\n | \"321\"\n | \"323\"\n | \"325\"\n | \"350\"\n | \"444\"\n | \"445\"\n | \"701\"\n | \"702\"\n | \"703\"\n | \"704\"\n | \"705\"\n | \"720\"\n | \"721\"\n | \"725\"\n | \"726\"\n | \"727\"\n | \"742\"\n | \"743\"\n | \"744\"\n | \"745\"\n | \"747\"\n | \"748\"\n | \"751\"\n | \"752\"\n | \"753\"\n | \"754\"\n | \"759\"\n | \"760\"\n | \"765\"\n | \"768\"\n | \"781\"\n | \"786\"\n | \"787\"\n | \"910\"\n | \"912\"\n | \"916\"\n | \"917\"\n | \"918\"\n | \"919\"\n | \"E\"\n | \"N\"\n | \"N1\"\n | \"N2\"\n | \"N4\"\n | \"N5\"\n | \"N6\"\n | \"N7\"\n | \"N8\"\n | \"N9\"\n | \"N10\"\n | \"N11\"\n | \"N12\"\n | \"N13\"\n | \"N14\"\n | \"N15\"\n | \"N16\"\n | \"N17\"\n | \"N18\"\n | \"N19\"\n | \"N30\"\n | \"N31\"\n | \"N32\"\n | \"N33\"\n | \"N34\"\n | \"N45\"\n | \"N72\"\n | \"N78\"\n | \"SN1\"\n | \"SN4\"\n | \"SN5\"\n | \"SN6\"\n | \"SN7\"\n | \"SN8\"\n | \"SN9\"\n | \"S2\"\n | \"S3\"\n | \"S4\"\n | \"S5\"\n | \"S6\"\n | \"S7\"\n | \"S8\"\n | \"S9\"\n | \"S10\"\n | \"S11\"\n | \"S14\"\n | \"S15\"\n | \"S16\"\n | \"S18\"\n | \"S19\"\n | \"S20\"\n | \"S21\"\n | \"S23\"\n | \"S24\"\n | \"S25\"\n}\n\n// ---\n// Stencil component types\n// ---\n\nexport * from './components';\n"],"version":3}
@@ -9,15 +9,11 @@ const StzhActions$1 = /*@__PURE__*/ proxyCustomElement(class StzhActions extends
9
9
  this.__registerHost();
10
10
  this.init = () => {
11
11
  const secondaryButtons = this.element.querySelectorAll('stzh-button[slot="secondary"], [slot="secondary"] stzh-button');
12
- const buttons = this.element.querySelectorAll('stzh-button');
13
12
  secondaryButtons.forEach((button) => {
14
13
  setPropsIfNull(button, {
15
14
  variant: "secondary"
16
15
  });
17
16
  });
18
- buttons.forEach((button) => {
19
- button.setAttribute("role", "listitem");
20
- });
21
17
  };
22
18
  this.variant = "form";
23
19
  this.withBorder = false;
@@ -41,7 +37,7 @@ const StzhActions$1 = /*@__PURE__*/ proxyCustomElement(class StzhActions extends
41
37
  "stzh-actions--has-border": this.withBorder,
42
38
  [`stzh-actions--${this.variant}`]: !!this.variant
43
39
  };
44
- return (h(Host, null, h("div", { class: classes }, h("div", { class: "stzh-actions__actions", role: "list" }, h("div", { class: "stzh-actions__secondary-actions" }, h("slot", { name: "secondary" })), h("div", { class: "stzh-actions__primary-actions" }, h("slot", { name: "primary" }))))));
40
+ return (h(Host, null, h("div", { class: classes }, h("div", { class: "stzh-actions__actions", role: "group" }, h("div", { class: "stzh-actions__secondary-actions" }, h("slot", { name: "secondary" })), h("div", { class: "stzh-actions__primary-actions" }, h("slot", { name: "primary" }))))));
45
41
  }
46
42
  get element() { return this; }
47
43
  static get style() { return stzhActionsCss; }
@@ -1 +1 @@
1
- {"file":"stzh-actions.js","mappings":";;;AAAA,MAAM,cAAc,GAAG,2qDAA2qD;;MCmBrrDA,aAAW;;;;IAWd,SAAI,GAAG;MACb,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,CACpD,+DAA+D,CAChE,CAAC;MAEF,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;MAE7D,gBAAgB,CAAC,OAAO,CAAC,CAAC,MAAM;QAC9B,cAAc,CAAC,MAAM,EAAE;UACrB,OAAO,EAAE,WAAW;SACI,CAAC,CAAA;OAC5B,CAAC,CAAC;MAEH,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM;QACrB,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;OACzC,CAAC,CAAC;KACJ,CAAA;mBAzByE,MAAM;sBAGjC,KAAK;;EAwBpD,iBAAiB;IACf,IAAI,CAAC,IAAI,EAAE,CAAC;IAEZ,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChD,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE;MAClC,SAAS,EAAE,IAAI;MACf,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;GACJ;EAED,oBAAoB;IAClB,IAAI,IAAI,CAAC,QAAQ,EAAE;MACjB,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;KAC5B;GACF;EAED,MAAM;IACJ,MAAM,OAAO,GAAG;MACd,cAAc,EAAE,IAAI;MACpB,0BAA0B,EAAE,IAAI,CAAC,UAAU;MAC3C,CAAC,iBAAiB,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO;KAClD,CAAC;IAEF,QACE,EAAC,IAAI,QACH,WAAK,KAAK,EAAE,OAAO,IACjB,WAAK,KAAK,EAAC,uBAAuB,EAAC,IAAI,EAAC,MAAM,IAC5C,WAAK,KAAK,EAAC,iCAAiC,IAC1C,YAAM,IAAI,EAAC,WAAW,GAAQ,CAC1B,EACN,WAAK,KAAK,EAAC,+BAA+B,IACxC,YAAM,IAAI,EAAC,SAAS,GAAQ,CACxB,CACF,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["StzhActions"],"sources":["./src/components/stzh-actions/stzh-actions.scss?tag=stzh-actions&encapsulation=scoped","./src/components/stzh-actions/stzh-actions.tsx"],"sourcesContent":[":host {\n ::slotted([slot=\"primary\"]),\n ::slotted([slot=\"secondary\"]) {\n flex-grow: 1;\n margin: space('xxsmall');\n }\n\n &[variant=\"cta\"] ::slotted([slot=\"primary\"]),\n &[variant=\"cta\"] ::slotted([slot=\"secondary\"]) {\n flex-grow: 0;\n }\n}\n\n.stzh-actions {\n &__actions {\n display: flex;\n flex-direction: column;\n margin: calc(#{space('xxsmall')} * -1);\n\n @include mq($from: small) {\n flex-direction: row;\n }\n }\n\n &__primary-actions,\n &__secondary-actions {\n display: flex;\n }\n\n &--dialog &__actions {\n justify-content: flex-end;\n }\n\n &--process &__actions {\n justify-content: space-between;\n }\n\n &--has-border {\n padding-top: space('medium');\n border-top: 1px solid $baseBorderColor;\n }\n}\n","import {\n Component,\n Host,\n Prop,\n h,\n Element\n} from \"@stencil/core\";\n\nimport { setPropsIfNull } from \"../../utils/utils\";\n\n/**\n * @slot primary - Slot for primary button\n * @slot secondary - Slot for secondary button\n */\n@Component({\n tag: \"stzh-actions\",\n styleUrl: \"stzh-actions.scss\",\n scoped: true\n})\nexport class StzhActions {\n /** Variant determining what position the action buttons are */\n @Prop({ reflect: true }) variant: \"form\" | \"dialog\" | \"process\" | \"cta\" = \"form\";\n\n /** With border separator */\n @Prop({ reflect: true }) withBorder: boolean = false;\n\n @Element() element: HTMLStzhActionsElement;\n\n private observer: MutationObserver;\n\n private init = () => {\n const secondaryButtons = this.element.querySelectorAll(\n 'stzh-button[slot=\"secondary\"], [slot=\"secondary\"] stzh-button'\n );\n\n const buttons = this.element.querySelectorAll('stzh-button');\n\n secondaryButtons.forEach((button) => {\n setPropsIfNull(button, {\n variant: \"secondary\"\n } as HTMLStzhButtonElement)\n });\n\n buttons.forEach((button) => {\n button.setAttribute(\"role\", \"listitem\");\n });\n }\n\n connectedCallback() {\n this.init();\n\n this.observer = new MutationObserver(this.init);\n this.observer.observe(this.element, {\n childList: true,\n subtree: true\n });\n }\n\n disconnectedCallback() {\n if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n render() {\n const classes = {\n \"stzh-actions\": true,\n \"stzh-actions--has-border\": this.withBorder,\n [`stzh-actions--${this.variant}`]: !!this.variant\n };\n\n return (\n <Host>\n <div class={classes}>\n <div class=\"stzh-actions__actions\" role=\"list\">\n <div class=\"stzh-actions__secondary-actions\">\n <slot name=\"secondary\"></slot>\n </div>\n <div class=\"stzh-actions__primary-actions\">\n <slot name=\"primary\"></slot>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"stzh-actions.js","mappings":";;;AAAA,MAAM,cAAc,GAAG,2qDAA2qD;;MCmBrrDA,aAAW;;;;IAWd,SAAI,GAAG;MACb,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,CACpD,+DAA+D,CAChE,CAAC;MAEF,gBAAgB,CAAC,OAAO,CAAC,CAAC,MAAM;QAC9B,cAAc,CAAC,MAAM,EAAE;UACrB,OAAO,EAAE,WAAW;SACI,CAAC,CAAA;OAC5B,CAAC,CAAC;KAEJ,CAAA;mBApByE,MAAM;sBAGjC,KAAK;;EAmBpD,iBAAiB;IACf,IAAI,CAAC,IAAI,EAAE,CAAC;IAEZ,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChD,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE;MAClC,SAAS,EAAE,IAAI;MACf,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;GACJ;EAED,oBAAoB;IAClB,IAAI,IAAI,CAAC,QAAQ,EAAE;MACjB,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;KAC5B;GACF;EAED,MAAM;IACJ,MAAM,OAAO,GAAG;MACd,cAAc,EAAE,IAAI;MACpB,0BAA0B,EAAE,IAAI,CAAC,UAAU;MAC3C,CAAC,iBAAiB,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO;KAClD,CAAC;IAEF,QACE,EAAC,IAAI,QACH,WAAK,KAAK,EAAE,OAAO,IACjB,WAAK,KAAK,EAAC,uBAAuB,EAAC,IAAI,EAAC,OAAO,IAC7C,WAAK,KAAK,EAAC,iCAAiC,IAC1C,YAAM,IAAI,EAAC,WAAW,GAAQ,CAC1B,EACN,WAAK,KAAK,EAAC,+BAA+B,IACxC,YAAM,IAAI,EAAC,SAAS,GAAQ,CACxB,CACF,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["StzhActions"],"sources":["./src/components/stzh-actions/stzh-actions.scss?tag=stzh-actions&encapsulation=scoped","./src/components/stzh-actions/stzh-actions.tsx"],"sourcesContent":[":host {\n ::slotted([slot=\"primary\"]),\n ::slotted([slot=\"secondary\"]) {\n flex-grow: 1;\n margin: space('xxsmall');\n }\n\n &[variant=\"cta\"] ::slotted([slot=\"primary\"]),\n &[variant=\"cta\"] ::slotted([slot=\"secondary\"]) {\n flex-grow: 0;\n }\n}\n\n.stzh-actions {\n &__actions {\n display: flex;\n flex-direction: column;\n margin: calc(#{space('xxsmall')} * -1);\n\n @include mq($from: small) {\n flex-direction: row;\n }\n }\n\n &__primary-actions,\n &__secondary-actions {\n display: flex;\n }\n\n &--dialog &__actions {\n justify-content: flex-end;\n }\n\n &--process &__actions {\n justify-content: space-between;\n }\n\n &--has-border {\n padding-top: space('medium');\n border-top: 1px solid $baseBorderColor;\n }\n}\n","import {\n Component,\n Host,\n Prop,\n h,\n Element\n} from \"@stencil/core\";\n\nimport { setPropsIfNull } from \"../../utils/utils\";\n\n/**\n * @slot primary - Slot for primary button\n * @slot secondary - Slot for secondary button\n */\n@Component({\n tag: \"stzh-actions\",\n styleUrl: \"stzh-actions.scss\",\n scoped: true\n})\nexport class StzhActions {\n /** Variant determining what position the action buttons are */\n @Prop({ reflect: true }) variant: \"form\" | \"dialog\" | \"process\" | \"cta\" = \"form\";\n\n /** With border separator */\n @Prop({ reflect: true }) withBorder: boolean = false;\n\n @Element() element: HTMLStzhActionsElement;\n\n private observer: MutationObserver;\n\n private init = () => {\n const secondaryButtons = this.element.querySelectorAll(\n 'stzh-button[slot=\"secondary\"], [slot=\"secondary\"] stzh-button'\n );\n\n secondaryButtons.forEach((button) => {\n setPropsIfNull(button, {\n variant: \"secondary\"\n } as HTMLStzhButtonElement)\n });\n\n }\n\n connectedCallback() {\n this.init();\n\n this.observer = new MutationObserver(this.init);\n this.observer.observe(this.element, {\n childList: true,\n subtree: true\n });\n }\n\n disconnectedCallback() {\n if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n render() {\n const classes = {\n \"stzh-actions\": true,\n \"stzh-actions--has-border\": this.withBorder,\n [`stzh-actions--${this.variant}`]: !!this.variant\n };\n\n return (\n <Host>\n <div class={classes}>\n <div class=\"stzh-actions__actions\" role=\"group\">\n <div class=\"stzh-actions__secondary-actions\">\n <slot name=\"secondary\"></slot>\n </div>\n <div class=\"stzh-actions__primary-actions\">\n <slot name=\"primary\"></slot>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -136,7 +136,7 @@ const StzhActionset = /*@__PURE__*/ proxyCustomElement(class StzhActionset exten
136
136
  // "show-medium": !action.onlyCollapseText,
137
137
  // "hide-when-collapsed": !action.onlyCollapseText,
138
138
  // "hide-text-when-collapsed": action.onlyCollapseText
139
- }, role: "listitem", icon: action.icon, iconPosition: action.iconPosition, iconOnly: action.iconOnly, badge: action.badge, variant: action.variant
139
+ }, icon: action.icon, iconPosition: action.iconPosition, iconOnly: action.iconOnly, badge: action.badge, variant: action.variant
140
140
  ? action.variant
141
141
  : (this.variant === "stack" ? "secondary" : "tertiary"), size: action.size
142
142
  ? action.size
@@ -144,7 +144,7 @@ const StzhActionset = /*@__PURE__*/ proxyCustomElement(class StzhActionset exten
144
144
  // "show-medium": action.onlyCollapseText,
145
145
  // "hide-when-collapsed": action.onlyCollapseText
146
146
  } }, action.label)));
147
- return (h(Host, { "has-collapsed-items": this.actionsCollapsed.length > 0 }, h("div", { class: classes }, h("div", { class: "stzh-actionset__actions", role: "list" }, h("div", { ref: (el) => (this.actionsElement = el), class: "stzh-actionset__actions-wrapper" }, this._actions.map(action => ((this.dynamicActions
147
+ return (h(Host, { "has-collapsed-items": this.actionsCollapsed.length > 0 }, h("div", { class: classes }, h("div", { class: "stzh-actionset__actions", role: "group" }, h("div", { ref: (el) => (this.actionsElement = el), class: "stzh-actionset__actions-wrapper" }, this._actions.map(action => ((this.dynamicActions
148
148
  || (!this.dynamicActions &&
149
149
  this.actionsCollapsed.indexOf(action) === -1))
150
150
  &&
@@ -1 +1 @@
1
- {"file":"stzh-actionset2.js","mappings":";;;;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,m2EAAm2E;;MCqC/2E,aAAa;;;;;IAsBhB,aAAQ,GAAwB,EAAE,CAAC;IAyBnC,gBAAW,GAAG,CAAC,MAAyB,EAAE,aAAyB;MACzE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;QACxB,SAAS,EAAE,gBAAgB;QAC3B,MAAM;QACN,aA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AU,EAAE,MAAM,CAAC,UAAU,EAC7B,SAAS,EAAE,MAAM,CAAC,SAAS,EAC3B,OAAO,EAAE,CAAC,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA,EAAE;OAE9C,MAAM,CAAC,KAAK,CACE,CAClB,CAAC,CACQ,CACC,CACX,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/stzh-actionset/stzh-actionset.scss?tag=stzh-actionset&encapsulation=scoped","./src/components/stzh-actionset/stzh-actionset.tsx"],"sourcesContent":[":host {\n\n}\n\n.stzh-actionset {\n &__actions {\n display: flex;\n align-items: center;\n }\n\n &__actions-wrapper {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n overflow: hidden;\n }\n\n &__action {\n &:not(:last-child) {\n margin-right: space('xsmall');\n }\n }\n\n &__action-popover {\n opacity: 0;\n }\n\n &--has-collapsed-items &__action-popover {\n --width: auto;\n opacity: 1;\n }\n\n /* Overflow variant */\n\n &--overflow &__action {\n @include mq($from: medium) {\n --white-space: nowrap;\n }\n }\n\n /* Stack variant */\n\n &--stack &__actions {\n @include mq($to: small) {\n flex-direction: column;\n align-items: stretch;\n }\n }\n\n &--stack &__actions-wrapper { \n @include mq($to: small) {\n flex-direction: column;\n align-items: stretch;\n }\n }\n\n &--stack &__action {\n @include mq($from: small) {\n --white-space: nowrap;\n }\n\n &:not(:last-child) {\n @include mq($to: small) {\n margin-bottom: space('xsmall');\n margin-right: 0;\n }\n }\n }\n\n &--stack &__action-popover {\n @include mq($to: small) {\n margin-top: space('xsmall');\n }\n }\n\n // Hide more action popover on small if it has no collapsed items\n\n &--stack:not(#{&}--has-collapsed-items) &__action-popover {\n @include mq($to: small) {\n display: none;\n }\n }\n}\n","import {\n Component,\n Host,\n Prop,\n h,\n Element,\n Watch,\n Event,\n EventEmitter,\n State\n} from \"@stencil/core\";\n\nimport {\n StzhActionsetItem,\n StzhActionsetItemClickEvent\n} from \"../../index\";\n\nimport { fetchTranslations } from \"../../utils/translation-utils\";\nimport { StzhActionsetLocalizedText } from './stzh-actionset.localization';\n\nimport {\n media,\n addMediaChangeListener,\n removeMediaChangeListener\n} from '../../utils/media-utils';\n\nimport {\n Placement,\n} from \"@floating-ui/dom\";\n\n/**\n */\n@Component({\n tag: \"stzh-actionset\",\n styleUrl: \"stzh-actionset.scss\",\n scoped: true\n})\nexport class StzhActionset {\n /** Translation strings */\n @Prop() localization: StzhActionsetLocalizedText;\n\n /** Variant determining what position the action buttons are */\n @Prop({ reflect: true }) variant: \"stack\" | \"overflow\" = \"stack\";\n\n /** Button variant of popover button (button thats holds collapsed actions) */\n @Prop({ reflect: true }) popoverButtonVariant: \"\" | \"default\" | \"secondary\" | \"input\" | \"tertiary\" = \"\";\n\n /** Button size of popover button (button that holds collapsed actions) */\n @Prop({ reflect: true }) popoverButtonSize: \"\" | \"default\" | \"small\" | \"tiny\" = \"\";\n\n /** Popover placement of button that holds collapsed actions */\n @Prop({ reflect: true }) popoverPlacement: Placement = \"bottom-end\";\n\n /**\n * Card header actions.\n * Array of objects that can include the button attributes `id`, `variant`, `icon`, `size`, `iconPosition`, `iconOnly`, `label` or `badge`:\n * `[{\"id\":\"action-1\", \"icon\": \"alarm-bell\", \"label\": \"Lorem\"}, {\"id\":\"action-2\", \"icon\": \"mail\", \"label\": \"Lorem\"}]`\n */\n @Prop() actions: StzhActionsetItem[] | string = [];\n private _actions: StzhActionsetItem[] = [];\n\n /** Header action click event */\n @Event() stzhActionClick: EventEmitter<StzhActionsetItemClickEvent>;\n\n @Element() element: HTMLStzhActionsetElement;\n\n @Watch(\"actions\")\n actionsWatcher(newValue: StzhActionsetItem[] | string) {\n if (typeof newValue === \"string\") {\n this._actions = JSON.parse(newValue);\n } else {\n this._actions = newValue;\n }\n }\n\n @State() actionsCollapsed: StzhActionsetItem[] = [];\n @State() dynamicActions: boolean;\n @State() isSmall: boolean;\n @State() isMedium: boolean;\n\n private actionsElement: HTMLElement;\n private debounceResize: number;\n private resizeObserver: ResizeObserver;\n\n private actionClick = (action: StzhActionsetItem, originalEvent: MouseEvent) => {\n this.stzhActionClick.emit({\n component: \"stzh-actionset\",\n action,\n originalEvent\n });\n }\n\n private update = () => {\n this.isSmall = media(\"small\").matches;\n this.isMedium = media(\"medium\").matches;\n\n if (!this.actionsElement) {\n return;\n }\n\n Object.assign(this.actionsElement.style, {\n width: null,\n height: null\n });\n\n let newActionsVisible = 0;\n\n if (\n this.variant === \"overflow\" && this.isMedium\n || this.variant === \"stack\" && this.isSmall\n ) {\n this.dynamicActions = true;\n\n let newActionsHeight = 0;\n let newActionsWidth = 0;\n\n // update height and width\n Array.from(this.actionsElement.children).forEach((child: HTMLElement) => {\n // check which item is visible and\n if (child.offsetTop === 0) {\n newActionsVisible++;\n\n const style = getComputedStyle(child);\n const marginLeft = parseInt(style.marginLeft);\n const marginRight = parseInt(style.marginRight);\n const marginTop = parseInt(style.marginTop);\n const marginBottom = parseInt(style.marginBottom);\n\n const childWidth = child.offsetWidth + marginLeft + marginRight;\n const childHeight = child.offsetHeight + marginTop + marginBottom;\n\n if (newActionsHeight < childHeight) {\n newActionsHeight = childHeight;\n }\n\n newActionsWidth = newActionsWidth + childWidth + 1;\n }\n });\n\n Object.assign(this.actionsElement.style, {\n width: `${newActionsWidth}px`,\n height: `${newActionsHeight}px`\n });\n } else {\n this.dynamicActions = false;\n\n if (this.variant === \"overflow\") {\n newActionsVisible = 0;\n } else if (this.variant === \"stack\") {\n newActionsVisible = this._actions.length <= 3 ? this._actions.length : 2;\n }\n }\n\n this.actionsCollapsed = this._actions.slice(newActionsVisible);\n }\n\n private handleResize = () => {\n if (this.debounceResize) {\n window.cancelAnimationFrame(this.debounceResize);\n }\n\n this.debounceResize = requestAnimationFrame(this.update);\n }\n\n private mediaChangeHandler = () => {\n this.actionsCollapsed = [];\n requestAnimationFrame(this.update);\n }\n\n async componentWillLoad() {\n this.actionsWatcher(this.actions);\n\n if (!this.localization) {\n this.localization = await fetchTranslations(this.element, \"actionset\");\n }\n }\n\n connectedCallback() {\n addMediaChangeListener(this.mediaChangeHandler);\n\n this.resizeObserver = new ResizeObserver(this.handleResize);\n this.resizeObserver.observe(this.element);\n }\n\n disconnectedCallback() {\n removeMediaChangeListener(this.mediaChangeHandler);\n\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n }\n\n componentDidLoad() {\n this.update();\n }\n\n render() {\n const classes = {\n \"stzh-actionset\": true,\n // \"stzh-actionset--has-dynamic-actions\": this.dynamicActions,\n \"stzh-actionset--has-collapsed-items\": this.actionsCollapsed.length > 0,\n [`stzh-actionset--${this.variant}`]: !!this.variant\n };\n\n const Action = (action: StzhActionsetItem) => (\n <stzh-button\n class={{\n \"stzh-actionset__action\": true,\n \"is-button\": true,\n // \"show-medium\": !action.onlyCollapseText,\n // \"hide-when-collapsed\": !action.onlyCollapseText,\n // \"hide-text-when-collapsed\": action.onlyCollapseText\n }}\n role=\"listitem\"\n icon={action.icon}\n iconPosition={action.iconPosition}\n iconOnly={action.iconOnly}\n badge={action.badge}\n variant={action.variant\n ? action.variant\n : (this.variant === \"stack\" ? \"secondary\" : \"tertiary\")}\n size={action.size\n ? action.size\n : (this.variant === \"stack\" ? \"default\" : \"tiny\")}\n badgePosition=\"icon\"\n onClick={(e) => { this.actionClick(action, e) }}\n >\n <span\n class={{\n // \"show-medium\": action.onlyCollapseText,\n // \"hide-when-collapsed\": action.onlyCollapseText\n }}\n >\n {action.label}\n </span>\n </stzh-button>\n );\n\n return (\n <Host has-collapsed-items={this.actionsCollapsed.length > 0}>\n <div class={classes}>\n <div class=\"stzh-actionset__actions\" role=\"list\">\n <div\n ref={(el) => (this.actionsElement = el as HTMLElement)}\n class=\"stzh-actionset__actions-wrapper\"\n >\n {this._actions.map(action => (\n (this.dynamicActions\n || (!this.dynamicActions &&\n this.actionsCollapsed.indexOf(action) === -1))\n &&\n (action.tooltipContent\n ?\n <stzh-tooltip\n strategy=\"fixed\"\n content={action.tooltipContent}\n >\n {Action(action)}\n </stzh-tooltip>\n :\n Action(action))\n ))}\n </div>\n\n <stzh-popover\n label={this.variant === \"stack\"\n ? this.localization.furtherActions\n : (!this.isMedium ? this.localization.actions : \"\")}\n strategy=\"fixed\"\n placement={this.popoverPlacement}\n class=\"stzh-actionset__action-popover\"\n >\n <stzh-button\n fullwidth\n disabled={this.actionsCollapsed.length === 0}\n class=\"stzh-actionset__action is-further\"\n variant={this.popoverButtonVariant !== \"\"\n ? this.popoverButtonVariant\n : (this.variant === \"stack\" ? \"secondary\" : \"tertiary\")}\n size={this.popoverButtonSize !== \"\"\n ? this.popoverButtonSize\n : (this.variant === \"stack\" ? \"default\" : \"tiny\")}\n icon={this.variant === \"stack\" ? \"angle-down\" : \"more-vertical\"}\n iconOnly={this.variant === \"overflow\" && this.isMedium}\n iconPosition=\"right\"\n label={this.variant === \"stack\"\n ? this.localization.furtherActions\n : (!this.isMedium ? this.localization.actions : \"\")}\n ></stzh-button>\n <stzh-menu slot=\"content\">\n {this.actionsCollapsed.map(action => (\n <stzh-menu-item\n // class=\"hide-medium show-when-collapsed\"\n icon={action.icon}\n badge={action.badge}\n badgeEmpty={action.badgeEmpty}\n badgeType={action.badgeType}\n onClick={(e) => { this.actionClick(action, e) }}\n >\n {action.label}\n </stzh-menu-item>\n ))}\n </stzh-menu>\n </stzh-popover>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"stzh-actionset2.js","mappings":";;;;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,m2EAAm2E;;MCqC/2E,aAAa;;;;;IAsBhB,aAAQ,GAAwB,EAAE,CAAC;IAyBnC,gBAAW,GAAG,CAAC,MAAyB,EAAE,aAAyB;MACzE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;QACxB,SAAS,EAAE,gBAAgB;QAC3B,MAAM;QACN,aAAa;OACd,CAAC,CAAC;K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E,MAAM,CAAC,SAAS,EAC3B,OAAO,EAAE,CAAC,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA,EAAE;OAE9C,MAAM,CAAC,KAAK,CACE,CAClB,CAAC,CACQ,CACC,CACX,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/stzh-actionset/stzh-actionset.scss?tag=stzh-actionset&encapsulation=scoped","./src/components/stzh-actionset/stzh-actionset.tsx"],"sourcesContent":[":host {\n\n}\n\n.stzh-actionset {\n &__actions {\n display: flex;\n align-items: center;\n }\n\n &__actions-wrapper {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n overflow: hidden;\n }\n\n &__action {\n &:not(:last-child) {\n margin-right: space('xsmall');\n }\n }\n\n &__action-popover {\n opacity: 0;\n }\n\n &--has-collapsed-items &__action-popover {\n --width: auto;\n opacity: 1;\n }\n\n /* Overflow variant */\n\n &--overflow &__action {\n @include mq($from: medium) {\n --white-space: nowrap;\n }\n }\n\n /* Stack variant */\n\n &--stack &__actions {\n @include mq($to: small) {\n flex-direction: column;\n align-items: stretch;\n }\n }\n\n &--stack &__actions-wrapper { \n @include mq($to: small) {\n flex-direction: column;\n align-items: stretch;\n }\n }\n\n &--stack &__action {\n @include mq($from: small) {\n --white-space: nowrap;\n }\n\n &:not(:last-child) {\n @include mq($to: small) {\n margin-bottom: space('xsmall');\n margin-right: 0;\n }\n }\n }\n\n &--stack &__action-popover {\n @include mq($to: small) {\n margin-top: space('xsmall');\n }\n }\n\n // Hide more action popover on small if it has no collapsed items\n\n &--stack:not(#{&}--has-collapsed-items) &__action-popover {\n @include mq($to: small) {\n display: none;\n }\n }\n}\n","import {\n Component,\n Host,\n Prop,\n h,\n Element,\n Watch,\n Event,\n EventEmitter,\n State\n} from \"@stencil/core\";\n\nimport {\n StzhActionsetItem,\n StzhActionsetItemClickEvent\n} from \"../../index\";\n\nimport { fetchTranslations } from \"../../utils/translation-utils\";\nimport { StzhActionsetLocalizedText } from './stzh-actionset.localization';\n\nimport {\n media,\n addMediaChangeListener,\n removeMediaChangeListener\n} from '../../utils/media-utils';\n\nimport {\n Placement,\n} from \"@floating-ui/dom\";\n\n/**\n */\n@Component({\n tag: \"stzh-actionset\",\n styleUrl: \"stzh-actionset.scss\",\n scoped: true\n})\nexport class StzhActionset {\n /** Translation strings */\n @Prop() localization: StzhActionsetLocalizedText;\n\n /** Variant determining what position the action buttons are */\n @Prop({ reflect: true }) variant: \"stack\" | \"overflow\" = \"stack\";\n\n /** Button variant of popover button (button thats holds collapsed actions) */\n @Prop({ reflect: true }) popoverButtonVariant: \"\" | \"default\" | \"secondary\" | \"input\" | \"tertiary\" = \"\";\n\n /** Button size of popover button (button that holds collapsed actions) */\n @Prop({ reflect: true }) popoverButtonSize: \"\" | \"default\" | \"small\" | \"tiny\" = \"\";\n\n /** Popover placement of button that holds collapsed actions */\n @Prop({ reflect: true }) popoverPlacement: Placement = \"bottom-end\";\n\n /**\n * Card header actions.\n * Array of objects that can include the button attributes `id`, `variant`, `icon`, `size`, `iconPosition`, `iconOnly`, `label` or `badge`:\n * `[{\"id\":\"action-1\", \"icon\": \"alarm-bell\", \"label\": \"Lorem\"}, {\"id\":\"action-2\", \"icon\": \"mail\", \"label\": \"Lorem\"}]`\n */\n @Prop() actions: StzhActionsetItem[] | string = [];\n private _actions: StzhActionsetItem[] = [];\n\n /** Header action click event */\n @Event() stzhActionClick: EventEmitter<StzhActionsetItemClickEvent>;\n\n @Element() element: HTMLStzhActionsetElement;\n\n @Watch(\"actions\")\n actionsWatcher(newValue: StzhActionsetItem[] | string) {\n if (typeof newValue === \"string\") {\n this._actions = JSON.parse(newValue);\n } else {\n this._actions = newValue;\n }\n }\n\n @State() actionsCollapsed: StzhActionsetItem[] = [];\n @State() dynamicActions: boolean;\n @State() isSmall: boolean;\n @State() isMedium: boolean;\n\n private actionsElement: HTMLElement;\n private debounceResize: number;\n private resizeObserver: ResizeObserver;\n\n private actionClick = (action: StzhActionsetItem, originalEvent: MouseEvent) => {\n this.stzhActionClick.emit({\n component: \"stzh-actionset\",\n action,\n originalEvent\n });\n }\n\n private update = () => {\n this.isSmall = media(\"small\").matches;\n this.isMedium = media(\"medium\").matches;\n\n if (!this.actionsElement) {\n return;\n }\n\n Object.assign(this.actionsElement.style, {\n width: null,\n height: null\n });\n\n let newActionsVisible = 0;\n\n if (\n this.variant === \"overflow\" && this.isMedium\n || this.variant === \"stack\" && this.isSmall\n ) {\n this.dynamicActions = true;\n\n let newActionsHeight = 0;\n let newActionsWidth = 0;\n\n // update height and width\n Array.from(this.actionsElement.children).forEach((child: HTMLElement) => {\n // check which item is visible and\n if (child.offsetTop === 0) {\n newActionsVisible++;\n\n const style = getComputedStyle(child);\n const marginLeft = parseInt(style.marginLeft);\n const marginRight = parseInt(style.marginRight);\n const marginTop = parseInt(style.marginTop);\n const marginBottom = parseInt(style.marginBottom);\n\n const childWidth = child.offsetWidth + marginLeft + marginRight;\n const childHeight = child.offsetHeight + marginTop + marginBottom;\n\n if (newActionsHeight < childHeight) {\n newActionsHeight = childHeight;\n }\n\n newActionsWidth = newActionsWidth + childWidth + 1;\n }\n });\n\n Object.assign(this.actionsElement.style, {\n width: `${newActionsWidth}px`,\n height: `${newActionsHeight}px`\n });\n } else {\n this.dynamicActions = false;\n\n if (this.variant === \"overflow\") {\n newActionsVisible = 0;\n } else if (this.variant === \"stack\") {\n newActionsVisible = this._actions.length <= 3 ? this._actions.length : 2;\n }\n }\n\n this.actionsCollapsed = this._actions.slice(newActionsVisible);\n }\n\n private handleResize = () => {\n if (this.debounceResize) {\n window.cancelAnimationFrame(this.debounceResize);\n }\n\n this.debounceResize = requestAnimationFrame(this.update);\n }\n\n private mediaChangeHandler = () => {\n this.actionsCollapsed = [];\n requestAnimationFrame(this.update);\n }\n\n async componentWillLoad() {\n this.actionsWatcher(this.actions);\n\n if (!this.localization) {\n this.localization = await fetchTranslations(this.element, \"actionset\");\n }\n }\n\n connectedCallback() {\n addMediaChangeListener(this.mediaChangeHandler);\n\n this.resizeObserver = new ResizeObserver(this.handleResize);\n this.resizeObserver.observe(this.element);\n }\n\n disconnectedCallback() {\n removeMediaChangeListener(this.mediaChangeHandler);\n\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n }\n\n componentDidLoad() {\n this.update();\n }\n\n render() {\n const classes = {\n \"stzh-actionset\": true,\n // \"stzh-actionset--has-dynamic-actions\": this.dynamicActions,\n \"stzh-actionset--has-collapsed-items\": this.actionsCollapsed.length > 0,\n [`stzh-actionset--${this.variant}`]: !!this.variant\n };\n\n const Action = (action: StzhActionsetItem) => (\n <stzh-button\n class={{\n \"stzh-actionset__action\": true,\n \"is-button\": true,\n // \"show-medium\": !action.onlyCollapseText,\n // \"hide-when-collapsed\": !action.onlyCollapseText,\n // \"hide-text-when-collapsed\": action.onlyCollapseText\n }}\n icon={action.icon}\n iconPosition={action.iconPosition}\n iconOnly={action.iconOnly}\n badge={action.badge}\n variant={action.variant\n ? action.variant\n : (this.variant === \"stack\" ? \"secondary\" : \"tertiary\")}\n size={action.size\n ? action.size\n : (this.variant === \"stack\" ? \"default\" : \"tiny\")}\n badgePosition=\"icon\"\n onClick={(e) => { this.actionClick(action, e) }}\n >\n <span\n class={{\n // \"show-medium\": action.onlyCollapseText,\n // \"hide-when-collapsed\": action.onlyCollapseText\n }}\n >\n {action.label}\n </span>\n </stzh-button>\n );\n\n return (\n <Host has-collapsed-items={this.actionsCollapsed.length > 0}>\n <div class={classes}>\n <div class=\"stzh-actionset__actions\" role=\"group\">\n <div\n ref={(el) => (this.actionsElement = el as HTMLElement)}\n class=\"stzh-actionset__actions-wrapper\"\n >\n {this._actions.map(action => (\n (this.dynamicActions\n || (!this.dynamicActions &&\n this.actionsCollapsed.indexOf(action) === -1))\n &&\n (action.tooltipContent\n ?\n <stzh-tooltip\n strategy=\"fixed\"\n content={action.tooltipContent}\n >\n {Action(action)}\n </stzh-tooltip>\n :\n Action(action))\n ))}\n </div>\n\n <stzh-popover\n label={this.variant === \"stack\"\n ? this.localization.furtherActions\n : (!this.isMedium ? this.localization.actions : \"\")}\n strategy=\"fixed\"\n placement={this.popoverPlacement}\n class=\"stzh-actionset__action-popover\"\n >\n <stzh-button\n fullwidth\n disabled={this.actionsCollapsed.length === 0}\n class=\"stzh-actionset__action is-further\"\n variant={this.popoverButtonVariant !== \"\"\n ? this.popoverButtonVariant\n : (this.variant === \"stack\" ? \"secondary\" : \"tertiary\")}\n size={this.popoverButtonSize !== \"\"\n ? this.popoverButtonSize\n : (this.variant === \"stack\" ? \"default\" : \"tiny\")}\n icon={this.variant === \"stack\" ? \"angle-down\" : \"more-vertical\"}\n iconOnly={this.variant === \"overflow\" && this.isMedium}\n iconPosition=\"right\"\n label={this.variant === \"stack\"\n ? this.localization.furtherActions\n : (!this.isMedium ? this.localization.actions : \"\")}\n ></stzh-button>\n <stzh-menu slot=\"content\">\n {this.actionsCollapsed.map(action => (\n <stzh-menu-item\n // class=\"hide-medium show-when-collapsed\"\n icon={action.icon}\n badge={action.badge}\n badgeEmpty={action.badgeEmpty}\n badgeType={action.badgeType}\n onClick={(e) => { this.actionClick(action, e) }}\n >\n {action.label}\n </stzh-menu-item>\n ))}\n </stzh-menu>\n </stzh-popover>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
- import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { S as StzhInputDescription } from './stzh-input-description.js';
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { f as fetchTranslations } from './translation-utils.js';
3
3
  import { d as defineCustomElement$7 } from './stzh-badge2.js';
4
4
  import { d as defineCustomElement$6 } from './stzh-button2.js';
5
5
  import { d as defineCustomElement$5 } from './stzh-dropdown2.js';
@@ -7,7 +7,7 @@ import { d as defineCustomElement$4 } from './stzh-icon2.js';
7
7
  import { d as defineCustomElement$3 } from './stzh-input2.js';
8
8
  import { d as defineCustomElement$2 } from './stzh-popover2.js';
9
9
 
10
- const stzhAmountCss = ":host{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}:host[hidden]{display:none}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.stzh-amount__marker-symbol{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal}.stzh-amount__marker-text{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-amount__description-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.stzh-amount__error,.stzh-amount__description{font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height);color:var(--stzh-base-color)}.stzh-amount__error{color:var(--stzh-color-error)}.stzh-amount__error-list{list-style:none;margin:0;padding:0}.stzh-amount__description{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.stzh-amount__description-long{margin-left:var(--stzh-space-xxsmall);margin-top:0.1875rem}.stzh-amount__description-long-popover{--width:auto;--max-width:27.3125rem}.stzh-amount__description-long-popover[open]:not([open=false]) .stzh-amount__description-long-button{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-amount__description-long-button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-family:inherit;padding:0;border:none;background-color:transparent;border-radius:0.5rem;cursor:pointer;-webkit-transition:color var(--stzh-base-transition-animation-speed);transition:color var(--stzh-base-transition-animation-speed);color:var(--stzh-base-lead-color)}.stzh-amount__description-long-button:hover{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-amount stzh-icon.stzh-amount__description-long-icon{--size:var(--stzh-icon-size-xsmall)}.stzh-amount--has-error .stzh-amount__error,.stzh-amount--has-description .stzh-amount__description{margin-top:var(--stzh-space-xxsmall)}.stzh-amount__stepper-wrapper{display:-ms-flexbox;display:flex;gap:var(--stzh-space-xxsmall)}.stzh-amount stzh-input.stzh-amount__stepper-input{--text-align:center;width:100%}";
10
+ const stzhAmountCss = ":host{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}:host[hidden]{display:none}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.stzh-amount__marker-symbol{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:normal}.stzh-amount__marker-text{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-amount__description-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.stzh-amount__error,.stzh-amount__description{font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height);color:var(--stzh-base-color)}.stzh-amount__error{color:var(--stzh-color-error)}.stzh-amount__error-list{list-style:none;margin:0;padding:0}.stzh-amount__description{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.stzh-amount__description-long{margin-left:var(--stzh-space-xxsmall);margin-top:0.1875rem}.stzh-amount__description-long-popover{--width:auto;--max-width:27.3125rem}.stzh-amount__description-long-popover[open]:not([open=false]) .stzh-amount__description-long-button{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-amount__description-long-button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-family:inherit;padding:0;border:none;background-color:transparent;border-radius:0.5rem;cursor:pointer;-webkit-transition:color var(--stzh-base-transition-animation-speed);transition:color var(--stzh-base-transition-animation-speed);color:var(--stzh-base-lead-color)}.stzh-amount__description-long-button:hover{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-amount stzh-icon.stzh-amount__description-long-icon{--size:var(--stzh-icon-size-xsmall)}.stzh-amount--has-error .stzh-amount__error,.stzh-amount--has-description .stzh-amount__description{margin-top:var(--stzh-space-xxsmall)}.stzh-amount__stepper-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;gap:var(--stzh-space-xxsmall)}.stzh-amount stzh-input.stzh-amount__stepper-input{--text-align:center;width:100%}";
11
11
 
12
12
  const DROPDOWN_ITEM_PLUS_OPTION_VALUE = "stzh-amount__dropdown-plus-option";
13
13
  let amountCounter = 0;
@@ -15,6 +15,7 @@ const StzhAmount$1 = /*@__PURE__*/ proxyCustomElement(class StzhAmount extends H
15
15
  constructor() {
16
16
  super();
17
17
  this.__registerHost();
18
+ this.stzhChange = createEvent(this, "stzhChange", 7);
18
19
  this._showDropdown = !Number.isNaN(this.minValueDropdown) && !Number.isNaN(this.maxValueDropdown)
19
20
  && this.minValueDropdown < this.maxValueDropdown;
20
21
  /** Handling dropdown changes (switch to input stepper if the plus option is selected in the dropdown). */
@@ -26,28 +27,36 @@ const StzhAmount$1 = /*@__PURE__*/ proxyCustomElement(class StzhAmount extends H
26
27
  else {
27
28
  this.value = (+event.detail.value).toString();
28
29
  }
30
+ this.stzhChange.emit({
31
+ component: "stzh-amount",
32
+ value: this.value
33
+ });
29
34
  };
30
35
  /** Handling the minus button. */
31
36
  this.onInputMinusStepClick = () => {
32
37
  this.value = (+this.value - this.step).toString();
33
38
  this.value = this.roundToStep(+this.value).toString();
39
+ this.stzhChange.emit({
40
+ component: "stzh-amount",
41
+ value: this.value
42
+ });
34
43
  };
35
44
  /** Handling the plus button. */
36
45
  this.onInputPlusStepClick = () => {
37
46
  this.value = (+this.value + this.step).toString();
38
47
  this.value = this.roundToStep(+this.value).toString();
48
+ this.stzhChange.emit({
49
+ component: "stzh-amount",
50
+ value: this.value
51
+ });
39
52
  };
40
53
  /** Handling manual value change of the stepper input. */
41
54
  this.onStepperInputChange = (event) => {
42
- let newValue = event.detail.value;
43
- newValue = this.roundToStep(+newValue).toString();
44
- if (+newValue > this.maxValue) {
45
- newValue = this.maxValue.toString();
46
- }
47
- else if (+newValue < this.minValue) {
48
- newValue = this.minValue.toString();
49
- }
50
- this.value = newValue;
55
+ this.value = event.detail.value;
56
+ this.stzhChange.emit({
57
+ component: "stzh-amount",
58
+ value: this.value
59
+ });
51
60
  };
52
61
  this.minValue = -9007199254740991;
53
62
  this.maxValue = 9007199254740991;
@@ -68,6 +77,7 @@ const StzhAmount$1 = /*@__PURE__*/ proxyCustomElement(class StzhAmount extends H
68
77
  this.descriptionLong = undefined;
69
78
  this.error = undefined;
70
79
  this.a11yDescribedby = '';
80
+ this.localization = undefined;
71
81
  }
72
82
  minValueDropdownWatcher() {
73
83
  this.setDropdownOptions();
@@ -89,14 +99,17 @@ const StzhAmount$1 = /*@__PURE__*/ proxyCustomElement(class StzhAmount extends H
89
99
  }
90
100
  }
91
101
  }
92
- else if (newValue) {
93
- this._error = newValue;
94
- }
95
102
  else {
96
- this._error = [];
103
+ this._error = newValue || [];
97
104
  }
98
105
  this.invalid = this._error.length > 0;
99
106
  }
107
+ /** Update stepper button a11y-labels when value has changed */
108
+ valueWatcher(newValue) {
109
+ if (!this._showDropdown) {
110
+ this.handleOutOfRangeValue(newValue);
111
+ }
112
+ }
100
113
  /** Fill the dropdown with options according to maxValueDropdown & minValueDropdown. */
101
114
  setDropdownOptions() {
102
115
  if (this._showDropdown) {
@@ -110,6 +123,36 @@ const StzhAmount$1 = /*@__PURE__*/ proxyCustomElement(class StzhAmount extends H
110
123
  this._dropdownOptions = JSON.stringify(options);
111
124
  }
112
125
  }
126
+ /** Handling manual value change of the stepper input. */
127
+ handleOutOfRangeValue(newValue) {
128
+ var _a, _b;
129
+ if (!this.localization) {
130
+ return;
131
+ }
132
+ let currentErrors = [];
133
+ if (typeof this.error === "string") {
134
+ currentErrors.push(this.error);
135
+ }
136
+ else if (this.error) {
137
+ currentErrors = [...this.error];
138
+ }
139
+ const maxValueError = (_a = this.localization.amountTooGreatError) === null || _a === void 0 ? void 0 : _a.replace(/{maxValue}/gi, this.maxValue.toString());
140
+ const minValueError = (_b = this.localization.amountTooSmallError) === null || _b === void 0 ? void 0 : _b.replace(/{minValue}/gi, this.minValue.toString());
141
+ if (+newValue > this.maxValue) {
142
+ if (!currentErrors.includes(maxValueError)) {
143
+ currentErrors.push(maxValueError);
144
+ }
145
+ }
146
+ else if (+newValue < this.minValue) {
147
+ if (!currentErrors.includes(minValueError)) {
148
+ currentErrors.push(minValueError);
149
+ }
150
+ }
151
+ else {
152
+ currentErrors = currentErrors.filter(e => e !== maxValueError && e !== minValueError);
153
+ }
154
+ this.error = currentErrors.length > 0 ? currentErrors : [];
155
+ }
113
156
  /** Making sure, that the value is rounded correctly according to the step */
114
157
  roundToStep(input) {
115
158
  const decimals = Math.max(0, -Math.floor(Math.log10(this.step)));
@@ -118,10 +161,18 @@ const StzhAmount$1 = /*@__PURE__*/ proxyCustomElement(class StzhAmount extends H
118
161
  return Number((rounded * factor / factor).toFixed(decimals));
119
162
  }
120
163
  async componentWillLoad() {
121
- this.amountId = `stzh-amount-${amountCounter++}`;
122
- this.stepperInputId = `${this.amountId}-stepper-input`;
123
- this.setDropdownOptions();
124
164
  this.errorWatcher(this.error);
165
+ this.valueWatcher(this.value);
166
+ if (!this.localization) {
167
+ this.localization = await fetchTranslations(this.element, "amount");
168
+ }
169
+ this.amountId = `stzh-amount-${amountCounter++}`;
170
+ if (this._showDropdown) {
171
+ this.setDropdownOptions();
172
+ }
173
+ else {
174
+ this.stepperInputId = `${this.amountId}-stepper-input`;
175
+ }
125
176
  }
126
177
  renderDropdown() {
127
178
  const classes = {
@@ -131,7 +182,7 @@ const StzhAmount$1 = /*@__PURE__*/ proxyCustomElement(class StzhAmount extends H
131
182
  return (h("div", { class: classes }, h("stzh-dropdown", { options: this._dropdownOptions, items: [this.value], label: this.label, required: this.required, disabled: this.disabled, description: this.description, descriptionLong: this.descriptionLong, error: this.error, popoverPlacement: this.popoverPlacement, a11yDescribedby: this.a11yDescribedby, name: this.name, size: this.size, invalid: this.invalid, showMarker: this.showMarker, onStzhChange: this.onDropdownChange })));
132
183
  }
133
184
  renderInputStepper() {
134
- return (h("div", { class: "stzh-amount__stepper" }, h("div", { class: "stzh-amount__stepper-wrapper" }, h("stzh-button", { class: "stzh-amount__stepper-minus", onClick: this.onInputMinusStepClick, variant: "secondary", icon: "minus", iconOnly: true, a11yControls: this.stepperInputId, a11yDescribedby: this.a11yDescribedby, size: this.size, disabled: +this.value <= +this.minValue || this.disabled }), h("stzh-input", { class: "stzh-amount__stepper-input", value: this.value, type: "number", label: this.label, min: this.minValue, max: this.maxValue, invalid: this.invalid, name: this.name, id: this.stepperInputId, size: this.size, step: this.step, showMarker: this.showMarker, descriptionLong: this.descriptionLong, clearable: this.clearable, disabled: this.disabled, a11yDescribedby: this.a11yDescribedby, onStzhChange: this.onStepperInputChange }), h("stzh-button", { class: "stzh-amount__stepper-plus", onClick: this.onInputPlusStepClick, variant: "secondary", icon: "plus", iconOnly: true, a11yControls: this.stepperInputId, a11yDescribedby: this.a11yDescribedby, size: this.size, disabled: +this.value >= +this.maxValue || this.disabled })), h(StzhInputDescription, { classPrefix: "stzh-amount", id: `${this.amountId}-description`, error: this._error, description: this.description, descriptionLong: this.descriptionLong })));
185
+ return (h("div", { class: "stzh-amount__stepper" }, h("div", { class: "stzh-amount__stepper-wrapper" }, h("stzh-button", { class: "stzh-amount__stepper-minus", onClick: this.onInputMinusStepClick, variant: "secondary", icon: "minus", iconOnly: true, a11yControls: this.stepperInputId, a11yDescribedby: this.a11yDescribedby, a11yLabel: `${this.label} ${this.localization.stepperMinusLabel}, ${this.localization.selectedAmountMessage} ${this.value}`, size: this.size, disabled: +this.value <= +this.minValue || this.disabled, tabindex: this.disabled ? null : "-1" }), h("stzh-input", { class: "stzh-amount__stepper-input", value: this.value, type: "number", label: this.label, min: this.minValue, max: this.maxValue, invalid: this.invalid, error: this._error, required: this.required, name: this.name, id: this.stepperInputId, size: this.size, step: this.step, showMarker: this.showMarker, description: this.description, descriptionLong: this.descriptionLong, clearable: this.clearable, disabled: this.disabled, a11yDescribedby: this.a11yDescribedby, onStzhChange: this.onStepperInputChange }), h("stzh-button", { class: "stzh-amount__stepper-plus", onClick: this.onInputPlusStepClick, variant: "secondary", icon: "plus", iconOnly: true, a11yControls: this.stepperInputId, a11yDescribedby: this.a11yDescribedby, a11yLabel: `${this.label} ${this.localization.stepperPlusLabel}, ${this.localization.selectedAmountMessage} ${this.value}`, size: this.size, disabled: +this.value >= +this.maxValue || this.disabled, tabindex: this.disabled ? null : "-1" }))));
135
186
  }
136
187
  render() {
137
188
  const classes = {
@@ -139,25 +190,28 @@ const StzhAmount$1 = /*@__PURE__*/ proxyCustomElement(class StzhAmount extends H
139
190
  "stzh-amount--has-description": !!this.description,
140
191
  "stzh-amount--has-description-long": !!this.descriptionLong,
141
192
  "stzh-amount--has-error": !!this.error,
193
+ "stzh-amount--is-required": !!this.required,
142
194
  };
143
195
  return (h(Host, null, h("div", { class: classes, id: this.amountId }, this._showDropdown ?
144
196
  this.renderDropdown()
145
197
  :
146
198
  this.renderInputStepper())));
147
199
  }
200
+ get element() { return this; }
148
201
  static get watchers() { return {
149
202
  "minValueDropdown": ["minValueDropdownWatcher"],
150
203
  "maxValueDropdown": ["maxValueDropdownWatcher"],
151
- "error": ["errorWatcher"]
204
+ "error": ["errorWatcher"],
205
+ "value": ["valueWatcher"]
152
206
  }; }
153
207
  static get style() { return stzhAmountCss; }
154
- }, [4, "stzh-amount", {
155
- "minValue": [514, "min-value"],
156
- "maxValue": [514, "max-value"],
157
- "minValueDropdown": [514, "min-value-dropdown"],
158
- "maxValueDropdown": [514, "max-value-dropdown"],
159
- "value": [513],
160
- "step": [514],
208
+ }, [0, "stzh-amount", {
209
+ "minValue": [2, "min-value"],
210
+ "maxValue": [2, "max-value"],
211
+ "minValueDropdown": [2, "min-value-dropdown"],
212
+ "maxValueDropdown": [2, "max-value-dropdown"],
213
+ "value": [1025],
214
+ "step": [2],
161
215
  "name": [513],
162
216
  "size": [513],
163
217
  "disabled": [516],
@@ -169,8 +223,9 @@ const StzhAmount$1 = /*@__PURE__*/ proxyCustomElement(class StzhAmount extends H
169
223
  "showMarker": [516, "show-marker"],
170
224
  "description": [1],
171
225
  "descriptionLong": [1, "description-long"],
172
- "error": [1],
173
- "a11yDescribedby": [1, "a11y-describedby"]
226
+ "error": [1025],
227
+ "a11yDescribedby": [1, "a11y-describedby"],
228
+ "localization": [16]
174
229
  }]);
175
230
  function defineCustomElement$1() {
176
231
  if (typeof customElements === "undefined") {