@oiz/stzh-components 3.4.0-beta1 → 3.4.0-beta2

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 (307) hide show
  1. package/dist/cjs/{app-globals-1074eba6.js → app-globals-d9805497.js} +2 -2
  2. package/dist/cjs/{app-globals-1074eba6.js.map → app-globals-d9805497.js.map} +1 -1
  3. package/dist/cjs/index-92254d32.js +40 -16
  4. package/dist/cjs/index.cjs.js.map +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/stzh-actions.cjs.entry.js +10 -8
  7. package/dist/cjs/stzh-actions.cjs.entry.js.map +1 -1
  8. package/dist/cjs/stzh-archivelist.cjs.entry.js +6 -16
  9. package/dist/cjs/stzh-archivelist.cjs.entry.js.map +1 -1
  10. package/dist/cjs/{stzh-card_2.cjs.entry.js → stzh-card.cjs.entry.js} +55 -143
  11. package/dist/cjs/stzh-card.cjs.entry.js.map +1 -0
  12. package/dist/cjs/{stzh-sortable.cjs.entry.js → stzh-cardlist_2.cjs.entry.js} +92 -1
  13. package/dist/cjs/stzh-cardlist_2.cjs.entry.js.map +1 -0
  14. package/dist/cjs/{stzh-checkbox_4.cjs.entry.js → stzh-checkbox_3.cjs.entry.js} +4 -91
  15. package/dist/cjs/stzh-checkbox_3.cjs.entry.js.map +1 -0
  16. package/dist/cjs/{stzh-chip_2.cjs.entry.js → stzh-chip.cjs.entry.js} +1 -215
  17. package/dist/cjs/stzh-chip.cjs.entry.js.map +1 -0
  18. package/dist/cjs/stzh-chipgroup.cjs.entry.js +25 -0
  19. package/dist/cjs/stzh-chipgroup.cjs.entry.js.map +1 -0
  20. package/dist/cjs/stzh-chipselect.cjs.entry.js +234 -0
  21. package/dist/cjs/stzh-chipselect.cjs.entry.js.map +1 -0
  22. package/dist/cjs/stzh-components.cjs.js +2 -2
  23. package/dist/cjs/stzh-dropdown.cjs.entry.js +53 -55
  24. package/dist/cjs/stzh-dropdown.cjs.entry.js.map +1 -1
  25. package/dist/cjs/stzh-fieldset.cjs.entry.js +1 -1
  26. package/dist/cjs/stzh-fieldset.cjs.entry.js.map +1 -1
  27. package/dist/cjs/stzh-geo-ref-data.cjs.entry.js +98 -41
  28. package/dist/cjs/stzh-geo-ref-data.cjs.entry.js.map +1 -1
  29. package/dist/cjs/stzh-input.cjs.entry.js +6 -2
  30. package/dist/cjs/stzh-input.cjs.entry.js.map +1 -1
  31. package/dist/cjs/{stzh-chipgroup_2.cjs.entry.js → stzh-message.cjs.entry.js} +1 -18
  32. package/dist/cjs/stzh-message.cjs.entry.js.map +1 -0
  33. package/dist/cjs/stzh-overlay.cjs.entry.js +97 -0
  34. package/dist/cjs/stzh-overlay.cjs.entry.js.map +1 -0
  35. package/dist/cjs/stzh-pi-teaser.cjs.entry.js +1 -1
  36. package/dist/cjs/stzh-pi-teaser.cjs.entry.js.map +1 -1
  37. package/dist/cjs/stzh-poicard.cjs.entry.js +52 -0
  38. package/dist/cjs/stzh-poicard.cjs.entry.js.map +1 -0
  39. package/dist/cjs/stzh-poilist.cjs.entry.js +122 -0
  40. package/dist/cjs/stzh-poilist.cjs.entry.js.map +1 -0
  41. package/dist/cjs/stzh-popover.cjs.entry.js +445 -0
  42. package/dist/cjs/stzh-popover.cjs.entry.js.map +1 -0
  43. package/dist/cjs/stzh-saptcha.cjs.entry.js +10 -9
  44. package/dist/cjs/stzh-saptcha.cjs.entry.js.map +1 -1
  45. package/dist/cjs/stzh-search.cjs.entry.js +52 -3
  46. package/dist/cjs/stzh-search.cjs.entry.js.map +1 -1
  47. package/dist/cjs/stzh-section.cjs.entry.js +1 -1
  48. package/dist/cjs/stzh-section.cjs.entry.js.map +1 -1
  49. package/dist/cjs/{stzh-popover_2.cjs.entry.js → stzh-text.cjs.entry.js} +1 -438
  50. package/dist/cjs/stzh-text.cjs.entry.js.map +1 -0
  51. package/dist/cjs/stzh-vbz-connection-finder.cjs.entry.js +1 -1
  52. package/dist/cjs/stzh-vbz-connection-finder.cjs.entry.js.map +1 -1
  53. package/dist/collection/assets/i18n/de.json +9 -0
  54. package/dist/collection/assets/i18n/en.json +9 -0
  55. package/dist/collection/collection-manifest.json +2 -0
  56. package/dist/collection/components/stzh-actions/stzh-actions.css +27 -0
  57. package/dist/collection/components/stzh-actions/stzh-actions.js +30 -10
  58. package/dist/collection/components/stzh-actions/stzh-actions.js.map +1 -1
  59. package/dist/collection/components/stzh-archivelist/stzh-archivelist.css +3 -0
  60. package/dist/collection/components/stzh-archivelist/stzh-archivelist.js +42 -16
  61. package/dist/collection/components/stzh-archivelist/stzh-archivelist.js.map +1 -1
  62. package/dist/collection/components/stzh-archivelist/stzh-archivelist.stories.js +109 -102
  63. package/dist/collection/components/stzh-card/stzh-card.css +5 -0
  64. package/dist/collection/components/stzh-card/stzh-card.js +72 -51
  65. package/dist/collection/components/stzh-card/stzh-card.js.map +1 -1
  66. package/dist/collection/components/stzh-cardlist/stzh-cardlist.css +5 -0
  67. package/dist/collection/components/stzh-chipselect/stzh-chipselect.css +8 -8
  68. package/dist/collection/components/stzh-chipselect/stzh-chipselect.js +13 -1
  69. package/dist/collection/components/stzh-chipselect/stzh-chipselect.js.map +1 -1
  70. package/dist/collection/components/stzh-dropdown/stzh-dropdown.css +11 -1
  71. package/dist/collection/components/stzh-dropdown/stzh-dropdown.js +89 -55
  72. package/dist/collection/components/stzh-dropdown/stzh-dropdown.js.map +1 -1
  73. package/dist/collection/components/stzh-fieldset/stzh-fieldset.css +120 -0
  74. package/dist/collection/components/stzh-geo-ref-data/stzh-geo-ref-data.css +2 -0
  75. package/dist/collection/components/stzh-geo-ref-data/stzh-geo-ref-data.js +156 -51
  76. package/dist/collection/components/stzh-geo-ref-data/stzh-geo-ref-data.js.map +1 -1
  77. package/dist/collection/components/stzh-geo-ref-data/stzh-geo-ref-data.stories.js +64 -63
  78. package/dist/collection/components/stzh-input/stzh-input.css +6 -0
  79. package/dist/collection/components/stzh-input/stzh-input.js +23 -1
  80. package/dist/collection/components/stzh-input/stzh-input.js.map +1 -1
  81. package/dist/collection/components/stzh-pi-teaser/stzh-pi-teaser.css +18 -3
  82. package/dist/collection/components/stzh-pi-teaser/stzh-pi-teaser.stories.js +30 -29
  83. package/dist/collection/components/stzh-poicard/stzh-poicard.css +231 -0
  84. package/dist/collection/components/stzh-poicard/stzh-poicard.e2e.js +16 -0
  85. package/dist/collection/components/stzh-poicard/stzh-poicard.e2e.js.map +1 -0
  86. package/dist/collection/components/stzh-poicard/stzh-poicard.js +86 -0
  87. package/dist/collection/components/stzh-poicard/stzh-poicard.js.map +1 -0
  88. package/dist/collection/components/stzh-poicard/stzh-poicard.stories.js +117 -0
  89. package/dist/collection/components/stzh-poilist/stzh-poilist.css +210 -0
  90. package/dist/collection/components/stzh-poilist/stzh-poilist.e2e.js +16 -0
  91. package/dist/collection/components/stzh-poilist/stzh-poilist.e2e.js.map +1 -0
  92. package/dist/collection/components/stzh-poilist/stzh-poilist.js +181 -0
  93. package/dist/collection/components/stzh-poilist/stzh-poilist.js.map +1 -0
  94. package/dist/collection/components/stzh-poilist/stzh-poilist.localization.js +2 -0
  95. package/dist/collection/components/stzh-poilist/stzh-poilist.localization.js.map +1 -0
  96. package/dist/collection/components/stzh-poilist/stzh-poilist.stories.js +31 -0
  97. package/dist/collection/components/stzh-richtext/stzh-richtext.stories.js +31 -16
  98. package/dist/collection/components/stzh-saptcha/stzh-saptcha.js +34 -17
  99. package/dist/collection/components/stzh-saptcha/stzh-saptcha.js.map +1 -1
  100. package/dist/collection/components/stzh-saptcha/stzh-saptcha.stories.js +3 -0
  101. package/dist/collection/components/stzh-search/stzh-search.css +4 -4
  102. package/dist/collection/components/stzh-search/stzh-search.js +122 -2
  103. package/dist/collection/components/stzh-search/stzh-search.js.map +1 -1
  104. package/dist/collection/components/stzh-section/stzh-section.css +19 -6
  105. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.js +1 -1
  106. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.js.map +1 -1
  107. package/dist/collection/index.js.map +1 -1
  108. package/dist/collection/pages/jobsearch/jobsearch.e2e.js +16 -0
  109. package/dist/collection/pages/jobsearch/jobsearch.e2e.js.map +1 -0
  110. package/dist/components/index.js +1 -1
  111. package/dist/components/index2.js.map +1 -1
  112. package/dist/components/stzh-actions.js +12 -9
  113. package/dist/components/stzh-actions.js.map +1 -1
  114. package/dist/components/stzh-archivelist.js +20 -22
  115. package/dist/components/stzh-archivelist.js.map +1 -1
  116. package/dist/components/stzh-card2.js +55 -51
  117. package/dist/components/stzh-card2.js.map +1 -1
  118. package/dist/components/stzh-cardlist2.js +1 -1
  119. package/dist/components/stzh-cardlist2.js.map +1 -1
  120. package/dist/components/stzh-chipselect2.js +14 -2
  121. package/dist/components/stzh-chipselect2.js.map +1 -1
  122. package/dist/components/stzh-dropdown2.js +55 -55
  123. package/dist/components/stzh-dropdown2.js.map +1 -1
  124. package/dist/components/stzh-fieldset.js +1 -1
  125. package/dist/components/stzh-fieldset.js.map +1 -1
  126. package/dist/components/stzh-geo-ref-data.js +109 -45
  127. package/dist/components/stzh-geo-ref-data.js.map +1 -1
  128. package/dist/components/stzh-input2.js +7 -2
  129. package/dist/components/stzh-input2.js.map +1 -1
  130. package/dist/components/stzh-pi-teaser.js +1 -1
  131. package/dist/components/stzh-pi-teaser.js.map +1 -1
  132. package/dist/components/stzh-poicard.d.ts +11 -0
  133. package/dist/components/stzh-poicard.js +8 -0
  134. package/dist/components/stzh-poicard.js.map +1 -0
  135. package/dist/components/stzh-poicard2.js +108 -0
  136. package/dist/components/stzh-poicard2.js.map +1 -0
  137. package/dist/components/stzh-poilist.d.ts +11 -0
  138. package/dist/components/stzh-poilist.js +246 -0
  139. package/dist/components/stzh-poilist.js.map +1 -0
  140. package/dist/components/stzh-saptcha.js +13 -14
  141. package/dist/components/stzh-saptcha.js.map +1 -1
  142. package/dist/components/stzh-search.js +57 -3
  143. package/dist/components/stzh-search.js.map +1 -1
  144. package/dist/components/stzh-section.js +1 -1
  145. package/dist/components/stzh-section.js.map +1 -1
  146. package/dist/components/stzh-vbz-connection-finder.js +1 -1
  147. package/dist/components/stzh-vbz-connection-finder.js.map +1 -1
  148. package/dist/esm/{app-globals-fbb949bd.js → app-globals-ca13b6e3.js} +2 -2
  149. package/dist/esm/{app-globals-fbb949bd.js.map → app-globals-ca13b6e3.js.map} +1 -1
  150. package/dist/esm/index-e3050b18.js +40 -16
  151. package/dist/esm/index.js.map +1 -1
  152. package/dist/esm/loader.js +2 -2
  153. package/dist/esm/stzh-actions.entry.js +10 -8
  154. package/dist/esm/stzh-actions.entry.js.map +1 -1
  155. package/dist/esm/stzh-archivelist.entry.js +6 -16
  156. package/dist/esm/stzh-archivelist.entry.js.map +1 -1
  157. package/dist/esm/{stzh-card_2.entry.js → stzh-card.entry.js} +56 -143
  158. package/dist/esm/stzh-card.entry.js.map +1 -0
  159. package/dist/esm/{stzh-sortable.entry.js → stzh-cardlist_2.entry.js} +92 -2
  160. package/dist/esm/stzh-cardlist_2.entry.js.map +1 -0
  161. package/dist/esm/{stzh-checkbox_4.entry.js → stzh-checkbox_3.entry.js} +5 -91
  162. package/dist/esm/stzh-checkbox_3.entry.js.map +1 -0
  163. package/dist/esm/{stzh-chip_2.entry.js → stzh-chip.entry.js} +3 -216
  164. package/dist/esm/stzh-chip.entry.js.map +1 -0
  165. package/dist/esm/stzh-chipgroup.entry.js +21 -0
  166. package/dist/esm/stzh-chipgroup.entry.js.map +1 -0
  167. package/dist/esm/stzh-chipselect.entry.js +230 -0
  168. package/dist/esm/stzh-chipselect.entry.js.map +1 -0
  169. package/dist/esm/stzh-components.js +2 -2
  170. package/dist/esm/stzh-dropdown.entry.js +53 -55
  171. package/dist/esm/stzh-dropdown.entry.js.map +1 -1
  172. package/dist/esm/stzh-fieldset.entry.js +1 -1
  173. package/dist/esm/stzh-fieldset.entry.js.map +1 -1
  174. package/dist/esm/stzh-geo-ref-data.entry.js +98 -41
  175. package/dist/esm/stzh-geo-ref-data.entry.js.map +1 -1
  176. package/dist/esm/stzh-input.entry.js +6 -2
  177. package/dist/esm/stzh-input.entry.js.map +1 -1
  178. package/dist/esm/{stzh-chipgroup_2.entry.js → stzh-message.entry.js} +3 -19
  179. package/dist/esm/stzh-message.entry.js.map +1 -0
  180. package/dist/esm/stzh-overlay.entry.js +93 -0
  181. package/dist/esm/stzh-overlay.entry.js.map +1 -0
  182. package/dist/esm/stzh-pi-teaser.entry.js +1 -1
  183. package/dist/esm/stzh-pi-teaser.entry.js.map +1 -1
  184. package/dist/esm/stzh-poicard.entry.js +48 -0
  185. package/dist/esm/stzh-poicard.entry.js.map +1 -0
  186. package/dist/esm/stzh-poilist.entry.js +118 -0
  187. package/dist/esm/stzh-poilist.entry.js.map +1 -0
  188. package/dist/esm/stzh-popover.entry.js +441 -0
  189. package/dist/esm/stzh-popover.entry.js.map +1 -0
  190. package/dist/esm/stzh-saptcha.entry.js +11 -10
  191. package/dist/esm/stzh-saptcha.entry.js.map +1 -1
  192. package/dist/esm/stzh-search.entry.js +52 -3
  193. package/dist/esm/stzh-search.entry.js.map +1 -1
  194. package/dist/esm/stzh-section.entry.js +1 -1
  195. package/dist/esm/stzh-section.entry.js.map +1 -1
  196. package/dist/esm/{stzh-popover_2.entry.js → stzh-text.entry.js} +3 -439
  197. package/dist/esm/stzh-text.entry.js.map +1 -0
  198. package/dist/esm/stzh-vbz-connection-finder.entry.js +1 -1
  199. package/dist/esm/stzh-vbz-connection-finder.entry.js.map +1 -1
  200. package/dist/stzh-components/assets/i18n/de.json +9 -0
  201. package/dist/stzh-components/assets/i18n/en.json +9 -0
  202. package/dist/stzh-components/index.esm.js.map +1 -1
  203. package/dist/stzh-components/{p-206ec94f.entry.js → p-0846f5a7.entry.js} +2 -2
  204. package/dist/stzh-components/p-0846f5a7.entry.js.map +1 -0
  205. package/dist/stzh-components/p-0d092d58.entry.js +2 -0
  206. package/dist/stzh-components/p-0d092d58.entry.js.map +1 -0
  207. package/dist/stzh-components/{p-38cd406c.entry.js → p-10c2c688.entry.js} +2 -2
  208. package/dist/stzh-components/p-10c2c688.entry.js.map +1 -0
  209. package/dist/stzh-components/{p-23de5712.entry.js → p-1391115f.entry.js} +2 -2
  210. package/dist/stzh-components/{p-23de5712.entry.js.map → p-1391115f.entry.js.map} +1 -1
  211. package/dist/stzh-components/p-1b2fb680.entry.js +9 -0
  212. package/dist/stzh-components/p-1b2fb680.entry.js.map +1 -0
  213. package/dist/stzh-components/p-1e121c5f.entry.js +2 -0
  214. package/dist/stzh-components/p-1e121c5f.entry.js.map +1 -0
  215. package/dist/stzh-components/p-35d842ce.entry.js +2 -0
  216. package/dist/stzh-components/p-35d842ce.entry.js.map +1 -0
  217. package/dist/stzh-components/p-3e2b4d92.entry.js +2 -0
  218. package/dist/stzh-components/p-3e2b4d92.entry.js.map +1 -0
  219. package/dist/stzh-components/p-47cb71af.entry.js +2 -0
  220. package/dist/stzh-components/p-47cb71af.entry.js.map +1 -0
  221. package/dist/stzh-components/p-4e2db8e9.entry.js +8 -0
  222. package/dist/stzh-components/p-4e2db8e9.entry.js.map +1 -0
  223. package/dist/stzh-components/{p-cded8c4a.js → p-57caee36.js} +2 -2
  224. package/dist/stzh-components/p-616ae3be.entry.js +2 -0
  225. package/dist/stzh-components/p-616ae3be.entry.js.map +1 -0
  226. package/dist/stzh-components/{p-15d008ea.entry.js → p-72c9db89.entry.js} +3 -3
  227. package/dist/stzh-components/p-72c9db89.entry.js.map +1 -0
  228. package/dist/stzh-components/p-7bb2eb4e.entry.js +2 -0
  229. package/dist/stzh-components/p-7bb2eb4e.entry.js.map +1 -0
  230. package/dist/stzh-components/p-8c4d543d.entry.js +2 -0
  231. package/dist/stzh-components/p-8c4d543d.entry.js.map +1 -0
  232. package/dist/stzh-components/p-9506f599.entry.js +2 -0
  233. package/dist/stzh-components/p-9506f599.entry.js.map +1 -0
  234. package/dist/stzh-components/p-9b1267a6.entry.js +2 -0
  235. package/dist/stzh-components/p-9b1267a6.entry.js.map +1 -0
  236. package/dist/stzh-components/p-a9216459.entry.js +2 -0
  237. package/dist/stzh-components/p-a9216459.entry.js.map +1 -0
  238. package/dist/stzh-components/p-b2920d7f.entry.js +2 -0
  239. package/dist/stzh-components/p-b2920d7f.entry.js.map +1 -0
  240. package/dist/stzh-components/p-b6f19446.entry.js +2 -0
  241. package/dist/stzh-components/p-b6f19446.entry.js.map +1 -0
  242. package/dist/stzh-components/p-b75800da.entry.js +2 -0
  243. package/dist/stzh-components/p-b75800da.entry.js.map +1 -0
  244. package/dist/stzh-components/{p-d058fc1e.entry.js → p-c4bbdbfe.entry.js} +2 -2
  245. package/dist/stzh-components/p-c4bbdbfe.entry.js.map +1 -0
  246. package/dist/stzh-components/p-c6504f41.entry.js +2 -0
  247. package/dist/stzh-components/p-c6504f41.entry.js.map +1 -0
  248. package/dist/stzh-components/p-d29fd503.entry.js +2 -0
  249. package/dist/stzh-components/p-d29fd503.entry.js.map +1 -0
  250. package/dist/stzh-components/stzh-components.esm.js +1 -1
  251. package/dist/stzh-components/stzh-components.esm.js.map +1 -1
  252. package/dist/types/components/stzh-actions/stzh-actions.d.ts +3 -1
  253. package/dist/types/components/stzh-archivelist/stzh-archivelist.d.ts +4 -0
  254. package/dist/types/components/stzh-card/stzh-card.d.ts +4 -2
  255. package/dist/types/components/stzh-dropdown/stzh-dropdown.d.ts +6 -2
  256. package/dist/types/components/stzh-geo-ref-data/stzh-geo-ref-data.d.ts +16 -2
  257. package/dist/types/components/stzh-input/stzh-input.d.ts +2 -0
  258. package/dist/types/components/stzh-poicard/stzh-poicard.d.ts +14 -0
  259. package/dist/types/components/stzh-poilist/stzh-poilist.d.ts +31 -0
  260. package/dist/types/components/stzh-poilist/stzh-poilist.localization.d.ts +10 -0
  261. package/dist/types/components/stzh-saptcha/stzh-saptcha.d.ts +5 -4
  262. package/dist/types/components/stzh-search/stzh-search.d.ts +13 -0
  263. package/dist/types/components.d.ts +190 -10
  264. package/dist/types/index.d.ts +28 -0
  265. package/dist/vscode-data.json +104 -3
  266. package/package.json +1 -1
  267. package/dist/cjs/stzh-card_2.cjs.entry.js.map +0 -1
  268. package/dist/cjs/stzh-checkbox_4.cjs.entry.js.map +0 -1
  269. package/dist/cjs/stzh-chip_2.cjs.entry.js.map +0 -1
  270. package/dist/cjs/stzh-chipgroup_2.cjs.entry.js.map +0 -1
  271. package/dist/cjs/stzh-popover_2.cjs.entry.js.map +0 -1
  272. package/dist/cjs/stzh-sortable.cjs.entry.js.map +0 -1
  273. package/dist/esm/stzh-card_2.entry.js.map +0 -1
  274. package/dist/esm/stzh-checkbox_4.entry.js.map +0 -1
  275. package/dist/esm/stzh-chip_2.entry.js.map +0 -1
  276. package/dist/esm/stzh-chipgroup_2.entry.js.map +0 -1
  277. package/dist/esm/stzh-popover_2.entry.js.map +0 -1
  278. package/dist/esm/stzh-sortable.entry.js.map +0 -1
  279. package/dist/stzh-components/p-12851c24.entry.js +0 -2
  280. package/dist/stzh-components/p-12851c24.entry.js.map +0 -1
  281. package/dist/stzh-components/p-15d008ea.entry.js.map +0 -1
  282. package/dist/stzh-components/p-1b31cd8a.entry.js +0 -2
  283. package/dist/stzh-components/p-1b31cd8a.entry.js.map +0 -1
  284. package/dist/stzh-components/p-206ec94f.entry.js.map +0 -1
  285. package/dist/stzh-components/p-38cd406c.entry.js.map +0 -1
  286. package/dist/stzh-components/p-50c32fd1.entry.js +0 -2
  287. package/dist/stzh-components/p-50c32fd1.entry.js.map +0 -1
  288. package/dist/stzh-components/p-55349f2e.entry.js +0 -2
  289. package/dist/stzh-components/p-55349f2e.entry.js.map +0 -1
  290. package/dist/stzh-components/p-9c643610.entry.js +0 -2
  291. package/dist/stzh-components/p-9c643610.entry.js.map +0 -1
  292. package/dist/stzh-components/p-9cdd5e6f.entry.js +0 -2
  293. package/dist/stzh-components/p-9cdd5e6f.entry.js.map +0 -1
  294. package/dist/stzh-components/p-a672aaea.entry.js +0 -8
  295. package/dist/stzh-components/p-a672aaea.entry.js.map +0 -1
  296. package/dist/stzh-components/p-a77b49cb.entry.js +0 -2
  297. package/dist/stzh-components/p-a77b49cb.entry.js.map +0 -1
  298. package/dist/stzh-components/p-b509dedd.entry.js +0 -2
  299. package/dist/stzh-components/p-b509dedd.entry.js.map +0 -1
  300. package/dist/stzh-components/p-b870c799.entry.js +0 -2
  301. package/dist/stzh-components/p-b870c799.entry.js.map +0 -1
  302. package/dist/stzh-components/p-d058fc1e.entry.js.map +0 -1
  303. package/dist/stzh-components/p-da043311.entry.js +0 -9
  304. package/dist/stzh-components/p-da043311.entry.js.map +0 -1
  305. package/dist/stzh-components/p-fb077fd5.entry.js +0 -2
  306. package/dist/stzh-components/p-fb077fd5.entry.js.map +0 -1
  307. /package/dist/stzh-components/{p-cded8c4a.js.map → p-57caee36.js.map} +0 -0
@@ -0,0 +1,181 @@
1
+ import { Fragment, h, Host, } from "@stencil/core";
2
+ import axios from "axios";
3
+ export class StzhPoilist {
4
+ constructor() {
5
+ this.handleMoreClick = async () => {
6
+ this.loadingText = this.localization.dataLoading;
7
+ this.isLoading = true;
8
+ this.currentOffset++;
9
+ const { data } = await axios.get(this.getCurrentApiUrl());
10
+ this.meta = data.meta;
11
+ this.items = this.items.concat(data.items);
12
+ this.isLoading = false;
13
+ };
14
+ this.onSortChange = async (e) => {
15
+ this.activeSorting = e.detail.value;
16
+ this.currentOffset = 0;
17
+ this.items = [];
18
+ await this.apiWatcher(this.api);
19
+ };
20
+ this.localization = undefined;
21
+ this.api = undefined;
22
+ this.currentOffset = 0;
23
+ this.meta = undefined;
24
+ this.items = [];
25
+ this.isLoading = true;
26
+ this.dropdownOptions = [];
27
+ this.activeSorting = undefined;
28
+ this.latitude = 47.3714332;
29
+ this.longitude = 8.542093;
30
+ this.geopositionError = "";
31
+ this.loadingText = "";
32
+ }
33
+ async apiWatcher(newValue) {
34
+ this.loadingText = this.localization.dataLoading;
35
+ if (!newValue) {
36
+ return;
37
+ }
38
+ // load data from API
39
+ const { data } = await axios.get(this.getCurrentApiUrl());
40
+ this.meta = data.meta;
41
+ this.items = data.items;
42
+ this.isLoading = false;
43
+ }
44
+ getCurrentApiUrl() {
45
+ return `${this.api}?offset=${this.currentOffset}&sort=${this.activeSorting}:DESC&latitude=${this.latitude}&longitude=${this.longitude}`;
46
+ }
47
+ getNumberOfLoadedItems() {
48
+ if (this.meta.currentPage !== this.meta.totalPages) {
49
+ return this.meta.itemsPerPage * this.meta.currentPage;
50
+ }
51
+ else {
52
+ return this.meta.totalItems;
53
+ }
54
+ }
55
+ async getUserPosition() {
56
+ this.loadingText = this.localization.geopositionLoading;
57
+ try {
58
+ const position = await this.getPositionAsync();
59
+ this.latitude = position.coords.latitude;
60
+ this.longitude = position.coords.longitude;
61
+ }
62
+ catch (geopositionNotFoundException) {
63
+ console.error("geopositionNotFoundException", geopositionNotFoundException);
64
+ this.geopositionError = this.localization.geopositionError;
65
+ }
66
+ }
67
+ getPositionAsync() {
68
+ return new Promise((resolve, reject) => {
69
+ if (navigator.geolocation) {
70
+ navigator.geolocation.getCurrentPosition((position) => resolve(position), (error) => reject(error));
71
+ }
72
+ else {
73
+ reject(new Error("Geolocation is not supported by this browser."));
74
+ }
75
+ });
76
+ }
77
+ async componentWillLoad() {
78
+ if (!this.localization) {
79
+ this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, "poilist");
80
+ }
81
+ this.dropdownOptions = [
82
+ {
83
+ text: this.localization.sortByDistance,
84
+ value: "distance",
85
+ },
86
+ {
87
+ text: this.localization.sortByName,
88
+ value: "name",
89
+ },
90
+ ];
91
+ this.activeSorting = this.dropdownOptions[0].value;
92
+ }
93
+ async componentDidLoad() {
94
+ await this.getUserPosition();
95
+ await this.apiWatcher(this.api);
96
+ }
97
+ render() {
98
+ const classes = {
99
+ "stzh-poilist": true,
100
+ };
101
+ return (h(Host, null, h("div", { class: classes }, h("stzh-overlay", { open: this.isLoading }, h("stzh-loader", { label: this.loadingText })), this.geopositionError && (h("stzh-message", { type: "error", label: this.geopositionError })), (this.items.length > 0 || this.meta) && (h(Fragment, null, h("div", { class: "stzh-poilist__header" }, h("stzh-text", { size: "micro" }, this.getNumberOfLoadedItems(), " ", this.localization.of, " ", this.meta.totalItems), h("stzh-dropdown", { label: "Sortierung", "hide-optional": true, variant: "plain", noSearch: true, inline: true, noWrap: true, onStzhChange: this.onSortChange, items: Array.isArray(this.activeSorting)
102
+ ? this.activeSorting
103
+ : [this.activeSorting], options: this.dropdownOptions })), h("stzh-cardlist", { layout: "teasers" }, this.items.map((item) => (h("stzh-poicard", { item: item })))), this.meta.currentPage !== this.meta.totalPages && (h("div", { class: "stzh-poilist__show-more" }, h("stzh-button", { variant: "secondary", label: this.localization.showMore, onClick: this.handleMoreClick }))))))));
104
+ }
105
+ static get is() { return "stzh-poilist"; }
106
+ static get encapsulation() { return "scoped"; }
107
+ static get originalStyleUrls() {
108
+ return {
109
+ "$": ["stzh-poilist.scss"]
110
+ };
111
+ }
112
+ static get styleUrls() {
113
+ return {
114
+ "$": ["stzh-poilist.css"]
115
+ };
116
+ }
117
+ static get properties() {
118
+ return {
119
+ "localization": {
120
+ "type": "unknown",
121
+ "mutable": false,
122
+ "complexType": {
123
+ "original": "StzhPoilistLocalizedText",
124
+ "resolved": "StzhLocaleComponent & { showMore: string; of: string; sortByDistance: string; sortByName: string; geopositionError: string; geopositionLoading: string; dataLoading: string; }",
125
+ "references": {
126
+ "StzhPoilistLocalizedText": {
127
+ "location": "import",
128
+ "path": "./stzh-poilist.localization",
129
+ "id": "src/components/stzh-poilist/stzh-poilist.localization.ts::StzhPoilistLocalizedText"
130
+ }
131
+ }
132
+ },
133
+ "required": false,
134
+ "optional": false,
135
+ "docs": {
136
+ "tags": [],
137
+ "text": "Translation strings"
138
+ }
139
+ },
140
+ "api": {
141
+ "type": "string",
142
+ "mutable": false,
143
+ "complexType": {
144
+ "original": "string",
145
+ "resolved": "string",
146
+ "references": {}
147
+ },
148
+ "required": false,
149
+ "optional": false,
150
+ "docs": {
151
+ "tags": [],
152
+ "text": "API URL (`{lang}` is replaced in the URL)"
153
+ },
154
+ "attribute": "api",
155
+ "reflect": false
156
+ }
157
+ };
158
+ }
159
+ static get states() {
160
+ return {
161
+ "currentOffset": {},
162
+ "meta": {},
163
+ "items": {},
164
+ "isLoading": {},
165
+ "dropdownOptions": {},
166
+ "activeSorting": {},
167
+ "latitude": {},
168
+ "longitude": {},
169
+ "geopositionError": {},
170
+ "loadingText": {}
171
+ };
172
+ }
173
+ static get elementRef() { return "element"; }
174
+ static get watchers() {
175
+ return [{
176
+ "propName": "api",
177
+ "methodName": "apiWatcher"
178
+ }];
179
+ }
180
+ }
181
+ //# sourceMappingURL=stzh-poilist.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stzh-poilist.js","sourceRoot":"","sources":["../../../../src/components/stzh-poilist/stzh-poilist.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,QAAQ,EACR,CAAC,EACD,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,KAAK,GACN,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,MAAM,OAAO,CAAC;AAiB1B,MAAM,OAAO,WAAW;;IA2Cd,oBAAe,GAAG,KAAK,IAAI,EAAE;MACnC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC;MACjD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;MACtB,IAAI,CAAC,aAAa,EAAE,CAAC;MACrB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,KAAK,CAAC,GAAG,CAAkB,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC;MAC3E,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;MACtB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;MAC3C,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACzB,CAAC,CAAC;IAUM,iBAAY,GAAG,KAAK,EAC1B,CAAmD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CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,EAE1B,OAAO,EAAE,IAAI,CAAC,eAAe,GACd,CACb;UAEN,qBAAe,MAAM,EAAC,SAAS,IAC5B,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACxB,oBAAc,IAAI,EAAE,IAAI,GAAiB,CAC1C,CAAC,CACY;UAEf,IAAI,CAAC,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,CACjD,WAAK,KAAK,EAAC,yBAAyB;YAClC,mBACE,OAAO,EAAC,WAAW,EACnB,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,EACjC,OAAO,EAAE,IAAI,CAAC,eAAe,GAChB,CACX,CACP,CACQ,CACZ,CACG,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Fragment,\n h,\n Host,\n Prop,\n State,\n Watch,\n} from \"@stencil/core\";\n\nimport axios from \"axios\";\n\nimport {\n StzhDropdownChangeEvent,\n StzhDropdownCustomEvent,\n StzhDropdownOption,\n StzhPoiCardItemData,\n StzhPoiListData,\n StzhPoiListMetaData,\n} from \"../../index\";\nimport { StzhPoilistLocalizedText } from \"./stzh-poilist.localization\"; // export type StzhPoiListMetaData = {\n\n@Component({\n tag: \"stzh-poilist\",\n styleUrl: \"stzh-poilist.scss\",\n scoped: true,\n})\nexport class StzhPoilist {\n /** Translation strings */\n @Prop() localization: StzhPoilistLocalizedText;\n\n /** API URL (`{lang}` is replaced in the URL) */\n @Prop() api: string;\n\n @Element() element: HTMLStzhPoilistElement;\n\n @State() currentOffset: number = 0;\n @State() meta: StzhPoiListMetaData;\n @State() items: StzhPoiCardItemData[] = [];\n @State() isLoading: boolean = true;\n\n /** Sorting */\n @State() dropdownOptions: StzhDropdownOption[] = [];\n @State() activeSorting: string | string[];\n\n /** Geoposition (STZH Rathaus by default) */\n @State() latitude: number = 47.3714332;\n @State() longitude: number = 8.542093;\n @State() geopositionError: string = \"\";\n\n @State() loadingText: string = \"\";\n\n @Watch(\"api\")\n async apiWatcher(newValue: string) {\n this.loadingText = this.localization.dataLoading;\n if (!newValue) {\n return;\n }\n\n // load data from API\n const { data } = await axios.get<StzhPoiListData>(this.getCurrentApiUrl());\n this.meta = data.meta;\n this.items = data.items;\n this.isLoading = false;\n }\n\n private getCurrentApiUrl() {\n return `${this.api}?offset=${this.currentOffset}&sort=${this.activeSorting}:DESC&latitude=${this.latitude}&longitude=${this.longitude}`;\n }\n\n private handleMoreClick = async () => {\n this.loadingText = this.localization.dataLoading;\n this.isLoading = true;\n this.currentOffset++;\n const { data } = await axios.get<StzhPoiListData>(this.getCurrentApiUrl());\n this.meta = data.meta;\n this.items = this.items.concat(data.items);\n this.isLoading = false;\n };\n\n private getNumberOfLoadedItems(): number {\n if (this.meta.currentPage !== this.meta.totalPages) {\n return this.meta.itemsPerPage * this.meta.currentPage;\n } else {\n return this.meta.totalItems;\n }\n }\n\n private onSortChange = async (\n e: StzhDropdownCustomEvent<StzhDropdownChangeEvent>\n ) => {\n this.activeSorting = e.detail.value;\n this.currentOffset = 0;\n this.items = [];\n await this.apiWatcher(this.api);\n };\n\n private async getUserPosition() {\n this.loadingText = this.localization.geopositionLoading;\n try {\n const position = await this.getPositionAsync();\n this.latitude = position.coords.latitude;\n this.longitude = position.coords.longitude;\n } catch (geopositionNotFoundException) {\n console.error(\n \"geopositionNotFoundException\",\n geopositionNotFoundException\n );\n this.geopositionError = this.localization.geopositionError;\n }\n }\n\n private getPositionAsync(): Promise<GeolocationPosition> {\n return new Promise((resolve, reject) => {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(\n (position) => resolve(position),\n (error) => reject(error)\n );\n } else {\n reject(new Error(\"Geolocation is not supported by this browser.\"));\n }\n });\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(\n this.element,\n \"poilist\"\n );\n }\n this.dropdownOptions = [\n {\n text: this.localization.sortByDistance,\n value: \"distance\",\n },\n {\n text: this.localization.sortByName,\n value: \"name\",\n },\n ];\n this.activeSorting = this.dropdownOptions[0].value;\n }\n\n async componentDidLoad() {\n await this.getUserPosition();\n await this.apiWatcher(this.api);\n }\n\n render() {\n const classes = {\n \"stzh-poilist\": true,\n };\n\n return (\n <Host>\n <div class={classes}>\n <stzh-overlay open={this.isLoading}>\n <stzh-loader label={this.loadingText}></stzh-loader>\n </stzh-overlay>\n\n {this.geopositionError && (\n <stzh-message\n type=\"error\"\n label={this.geopositionError}\n ></stzh-message>\n )}\n\n {(this.items.length > 0 || this.meta) && (\n <Fragment>\n <div class=\"stzh-poilist__header\">\n <stzh-text size=\"micro\">\n {this.getNumberOfLoadedItems()} {this.localization.of}{\" \"}\n {this.meta.totalItems}\n </stzh-text>\n <stzh-dropdown\n label=\"Sortierung\"\n hide-optional={true}\n variant=\"plain\"\n noSearch={true}\n inline={true}\n noWrap={true}\n onStzhChange={this.onSortChange}\n items={\n Array.isArray(this.activeSorting)\n ? this.activeSorting\n : [this.activeSorting]\n }\n options={this.dropdownOptions}\n ></stzh-dropdown>\n </div>\n\n <stzh-cardlist layout=\"teasers\">\n {this.items.map((item) => (\n <stzh-poicard item={item}></stzh-poicard>\n ))}\n </stzh-cardlist>\n\n {this.meta.currentPage !== this.meta.totalPages && (\n <div class=\"stzh-poilist__show-more\">\n <stzh-button\n variant=\"secondary\"\n label={this.localization.showMore}\n onClick={this.handleMoreClick}\n ></stzh-button>\n </div>\n )}\n </Fragment>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=stzh-poilist.localization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stzh-poilist.localization.js","sourceRoot":"","sources":["../../../../src/components/stzh-poilist/stzh-poilist.localization.ts"],"names":[],"mappings":"","sourcesContent":["import { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\nexport type StzhPoilistLocalizedText = StzhLocaleComponent & {\n showMore: string;\n of: string;\n sortByDistance: string;\n sortByName: string;\n geopositionError: string;\n geopositionLoading: string;\n dataLoading: string;\n};\n"]}
@@ -0,0 +1,31 @@
1
+ import { createComponentStory } from "../../utils/story-utils";
2
+ import { withActions } from "@storybook/addon-actions/decorator";
3
+ import readme from "./readme.md?raw";
4
+
5
+ const COMPONENT_NAME = "stzh-poilist";
6
+ const story = createComponentStory(COMPONENT_NAME);
7
+
8
+ const TEMPLATE = `
9
+ <stzh-poilist></stzh-poilist>
10
+ `;
11
+
12
+ export default {
13
+ title: "Components/Poilist",
14
+ component: COMPONENT_NAME,
15
+ parameters: {
16
+ layout: "padded",
17
+ docs: {
18
+ description: {
19
+ component: readme,
20
+ },
21
+ },
22
+ },
23
+ decorators: [withActions],
24
+ };
25
+
26
+ export const Default = {
27
+ render: (args) => story(args, TEMPLATE),
28
+ args: {
29
+ api: "mock/poilist.json",
30
+ },
31
+ };
@@ -1,10 +1,10 @@
1
- import { createComponentStory } from '../../utils/story-utils';
2
- import { withActions } from '@storybook/addon-actions/decorator';
3
- import readme from './readme.md?raw';
4
- import { withDesign } from 'storybook-addon-designs';
5
- import { getFigmaLink } from '../../../figma';
1
+ import { createComponentStory } from "../../utils/story-utils";
2
+ import { withActions } from "@storybook/addon-actions/decorator";
3
+ import readme from "./readme.md?raw";
4
+ import { withDesign } from "storybook-addon-designs";
5
+ import { getFigmaLink } from "../../../figma";
6
6
 
7
- const COMPONENT_NAME = 'stzh-richtext';
7
+ const COMPONENT_NAME = "stzh-richtext";
8
8
  const story = createComponentStory(COMPONENT_NAME);
9
9
 
10
10
  const TEMPLATE = `
@@ -25,6 +25,21 @@ const TEMPLATE = `
25
25
  <p>HTML Entity 8308 &#8308; (4)</p>
26
26
  <p>HTML Entity 8309 &#8309; (5)</p>
27
27
  <p>HTML Entity 8310 &#8310; (6)</p>
28
+
29
+ <h2>H2: Subscript/Superscript</h2>
30
+ <p>Test Subscript 1 <sub>1</sub></p>
31
+ <p>Test Subscript 2 <sub>2</sub></p>
32
+ <p>Test Subscript 3 <sub>3</sub></p>
33
+ <p>Test Subscript 4 <sub>4</sub></p>
34
+ <p>Test Subscript 5 <sub>5</sub></p>
35
+ <p>Test Subscript 6 <sub>6</sub></p>
36
+ <p>Test Superscript 1 <sup>1</sup></p>
37
+ <p>Test Superscript 2 <sup>2</sup></p>
38
+ <p>Test Superscript 3 <sup>3</sup></p>
39
+ <p>Test Superscript 4 <sup>4</sup></p>
40
+ <p>Test Superscript 5 <sup>5</sup></p>
41
+ <p>Test Superscript 6 <sup>6</sup></p>
42
+
28
43
  <p>Laboris laborum aute id laboris culpa esse aliquip nisi anim velit. Minim sunt eiusmod do laborum amet ut magna. Labore dolore id nostrud enim Lorem pariatur ad dolore id eiusmod adipisicing laboris laborum minim.</p>
29
44
  <p><strong>Laboris laborum aute</strong> id laboris culpa esse <strong>aliquip nisi anim</strong> velit. Minim sunt eiusmod do laborum amet ut magna. Labore dolore id nostrud enim Lorem pariatur ad dolore id eiusmod adipisicing laboris laborum minim.</p>
30
45
  <ul>
@@ -87,27 +102,27 @@ const TEMPLATE = `
87
102
  `;
88
103
 
89
104
  export default {
90
- title: 'Components/Richtext',
105
+ title: "Components/Richtext",
91
106
  component: COMPONENT_NAME,
92
107
  parameters: {
93
108
  actions: {
94
- handles: []
109
+ handles: [],
95
110
  },
96
111
  docs: {
97
112
  description: {
98
- component: readme
99
- }
113
+ component: readme,
114
+ },
100
115
  },
101
116
  design: {
102
- type: 'figma',
103
- url: getFigmaLink('richtext'),
104
- allowFullscreen: true
105
- }
117
+ type: "figma",
118
+ url: getFigmaLink("richtext"),
119
+ allowFullscreen: true,
120
+ },
106
121
  },
107
- decorators: [withActions, withDesign]
122
+ decorators: [withActions, withDesign],
108
123
  };
109
124
 
110
125
  export const Default = {
111
126
  render: (args) => story(args, TEMPLATE),
112
- args: {}
127
+ args: {},
113
128
  };
@@ -1,4 +1,4 @@
1
- import { Host, h } from "@stencil/core";
1
+ import { Host, h, } from "@stencil/core";
2
2
  let saptchaCounter = 0;
3
3
  /**
4
4
  * @slot - Slot for content
@@ -6,6 +6,14 @@ let saptchaCounter = 0;
6
6
  export class StzhSaptcha {
7
7
  constructor() {
8
8
  this._numbers = [];
9
+ this.onInputChange = (event) => {
10
+ this.value = event.detail.value;
11
+ this.stzhChange.emit({
12
+ component: "stzh-saptcha",
13
+ originalEvent: event,
14
+ value: this.value
15
+ });
16
+ };
9
17
  this.localization = undefined;
10
18
  this.numbers = [];
11
19
  this.value = "";
@@ -13,10 +21,6 @@ export class StzhSaptcha {
13
21
  this.error = undefined;
14
22
  this.invalid = false;
15
23
  this.disabled = false;
16
- this.inputValue = "";
17
- }
18
- valueWatcher(newValue) {
19
- this.inputValue = newValue;
20
24
  }
21
25
  numbersWatcher(newValue) {
22
26
  if (typeof newValue === "string") {
@@ -47,9 +51,6 @@ export class StzhSaptcha {
47
51
  this._error = [];
48
52
  }
49
53
  }
50
- componentDidLoad() {
51
- this.inputValue = this.value;
52
- }
53
54
  async componentWillLoad() {
54
55
  this.saptchaId = `stzh-saptcha-${saptchaCounter++}`;
55
56
  this.numbersWatcher(this.numbers);
@@ -65,7 +66,7 @@ export class StzhSaptcha {
65
66
  return (h(Host, { "is-invalid": this.invalid || this._error.length > 0 }, h("div", { class: classes }, h("div", { class: "stzh-saptcha__box" }, h("div", { class: "stzh-saptcha__info", id: `${this.saptchaId}-info` }, this.localization.info, " ", this.localization.question), h("div", { class: "stzh-saptcha__answer", id: `${this.saptchaId}-answer` }, this._numbers.map((number, index) => h("span", { class: "stzh-saptcha__number" }, number, index < this._numbers.length - 1 &&
66
67
  (index === this._numbers.length - 2
67
68
  ? this.localization.answerOr
68
- : ", ")))), h("stzh-input", { class: "stzh-saptcha__input", label: this.localization.answer, name: this.name, invalid: this.invalid, error: this.error, disabled: this.disabled, value: this.inputValue, required: true, a11yDescribedby: `${this.saptchaId}-info ${this.saptchaId}-answer` })))));
69
+ : ", ")))), h("stzh-input", { class: "stzh-saptcha__input", label: this.localization.answer, name: this.name, invalid: this.invalid, error: this.error, disabled: this.disabled, value: this.value, onStzhChange: this.onInputChange, required: true, a11yDescribedby: `${this.saptchaId}-info ${this.saptchaId}-answer` })))));
69
70
  }
70
71
  static get is() { return "stzh-saptcha"; }
71
72
  static get encapsulation() { return "scoped"; }
@@ -122,7 +123,7 @@ export class StzhSaptcha {
122
123
  },
123
124
  "value": {
124
125
  "type": "string",
125
- "mutable": false,
126
+ "mutable": true,
126
127
  "complexType": {
127
128
  "original": "string",
128
129
  "resolved": "string",
@@ -211,17 +212,33 @@ export class StzhSaptcha {
211
212
  }
212
213
  };
213
214
  }
214
- static get states() {
215
- return {
216
- "inputValue": {}
217
- };
215
+ static get events() {
216
+ return [{
217
+ "method": "stzhChange",
218
+ "name": "stzhChange",
219
+ "bubbles": true,
220
+ "cancelable": true,
221
+ "composed": true,
222
+ "docs": {
223
+ "tags": [],
224
+ "text": "Saptcha change event"
225
+ },
226
+ "complexType": {
227
+ "original": "StzhSaptchaChangeEvent",
228
+ "resolved": "{ component: \"stzh-saptcha\"; originalEvent: CustomEvent<any>; value: string; }",
229
+ "references": {
230
+ "StzhSaptchaChangeEvent": {
231
+ "location": "import",
232
+ "path": "../../index",
233
+ "id": "src/index.ts::StzhSaptchaChangeEvent"
234
+ }
235
+ }
236
+ }
237
+ }];
218
238
  }
219
239
  static get elementRef() { return "element"; }
220
240
  static get watchers() {
221
241
  return [{
222
- "propName": "value",
223
- "methodName": "valueWatcher"
224
- }, {
225
242
  "propName": "numbers",
226
243
  "methodName": "numbersWatcher"
227
244
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"stzh-saptcha.js","sourceRoot":"","sources":["../../../../src/components/stzh-saptcha/stzh-saptcha.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ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I,EACf,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,KAAK,EAAE,IAAI,CAAC,UAAU,EACtB,QAAQ,QACR,eAAe,EAAE,GAAG,IAAI,CAAC,SAAS,SAAS,IAAI,CAAC,SAAS,SAAS,GACtD,CACV,CACF,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Watch,\n State\n} from \"@stencil/core\";\n\nimport { StzhSaptchaLocalizedText } from './stzh-saptcha.localization';\n\nlet saptchaCounter = 0;\n\n/**\n * @slot - Slot for content\n */\n@Component({\n tag: \"stzh-saptcha\",\n styleUrl: \"stzh-saptcha.scss\",\n scoped: true\n})\nexport class StzhSaptcha {\n /** Translation strings */\n @Prop() localization: StzhSaptchaLocalizedText;\n\n /** Numbers shown to user for selection */\n @Prop() numbers: number[] | string = [];\n private _numbers: number[] = [];\n\n /** The value of the input element */\n @Prop() value: string = \"\";\n\n /** Name of input */\n @Prop({ reflect: true }) name: string = \"saptcha\";\n\n /** One or multiple error message */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Mutable input state updated by the value prop */\n @State() inputValue: string = \"\";\n\n @Element() element: HTMLStzhSaptchaElement;\n\n @Watch('value')\n valueWatcher(newValue: string) {\n this.inputValue = newValue;\n }\n\n @Watch(\"numbers\")\n numbersWatcher(newValue: number[] | string) {\n if (typeof newValue === \"string\") {\n this._numbers = JSON.parse(newValue);\n } else {\n this._numbers = newValue;\n }\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n }\n\n private saptchaId: string;\n\n componentDidLoad() {\n this.inputValue = this.value;\n }\n\n async componentWillLoad() {\n this.saptchaId = `stzh-saptcha-${saptchaCounter++}`;\n\n this.numbersWatcher(this.numbers);\n this.errorWatcher(this.error);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, 'saptcha');\n }\n }\n\n render() {\n const classes = {\n \"stzh-saptcha\": true\n };\n\n return (\n <Host is-invalid={this.invalid || this._error.length > 0}>\n <div class={classes}>\n <div class=\"stzh-saptcha__box\">\n <div class=\"stzh-saptcha__info\" id={`${this.saptchaId}-info`}>\n {this.localization.info} {this.localization.question}\n </div>\n <div class=\"stzh-saptcha__answer\" id={`${this.saptchaId}-answer`}>\n {this._numbers.map((number, index) =>\n <span class=\"stzh-saptcha__number\">\n {number}\n {index < this._numbers.length - 1 &&\n (index === this._numbers.length - 2\n ? this.localization.answerOr\n : \", \")\n }\n </span>\n )}\n </div>\n <stzh-input\n class=\"stzh-saptcha__input\"\n label={this.localization.answer}\n name={this.name}\n invalid={this.invalid}\n error={this.error}\n disabled={this.disabled}\n value={this.inputValue}\n required\n a11yDescribedby={`${this.saptchaId}-info ${this.saptchaId}-answer`}\n ></stzh-input>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"stzh-saptcha.js","sourceRoot":"","sources":["../../../../src/components/stzh-saptcha/stzh-saptcha.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,OAAO,EACP,KAAK,EACL,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CAAC;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,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,YAAY,EAAE,IAAI,CAAC,aAAa,EAChC,QAAQ,QACR,eAAe,EAAE,GAAG,IAAI,CAAC,SAAS,SAAS,IAAI,CAAC,SAAS,SAAS,GACtD,CACV,CACF,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Element,\n Event,\n Prop,\n Watch, EventEmitter,\n} from \"@stencil/core\";\n\nimport { StzhSaptchaLocalizedText } from './stzh-saptcha.localization';\nimport {StzhInputChangeEvent, StzhSaptchaChangeEvent} from '../../index';\n\nlet saptchaCounter = 0;\n\n/**\n * @slot - Slot for content\n */\n@Component({\n tag: \"stzh-saptcha\",\n styleUrl: \"stzh-saptcha.scss\",\n scoped: true\n})\nexport class StzhSaptcha {\n /** Translation strings */\n @Prop() localization: StzhSaptchaLocalizedText;\n\n /** Numbers shown to user for selection */\n @Prop() numbers: number[] | string = [];\n private _numbers: number[] = [];\n\n /** The value of the input element */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** Name of input */\n @Prop({ reflect: true }) name: string = \"saptcha\";\n\n /** One or multiple error message */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n @Element() element: HTMLStzhSaptchaElement;\n\n /** Saptcha change event */\n @Event() stzhChange: EventEmitter<StzhSaptchaChangeEvent>;\n\n @Watch(\"numbers\")\n numbersWatcher(newValue: number[] | string) {\n if (typeof newValue === \"string\") {\n this._numbers = JSON.parse(newValue);\n } else {\n this._numbers = newValue;\n }\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n }\n\n private saptchaId: string;\n\n private onInputChange = (event: CustomEvent<StzhInputChangeEvent>) => {\n this.value = event.detail.value;\n\n this.stzhChange.emit({\n component: \"stzh-saptcha\",\n originalEvent: event,\n value: this.value\n });\n }\n\n async componentWillLoad() {\n this.saptchaId = `stzh-saptcha-${saptchaCounter++}`;\n\n this.numbersWatcher(this.numbers);\n this.errorWatcher(this.error);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, 'saptcha');\n }\n }\n\n render() {\n const classes = {\n \"stzh-saptcha\": true\n };\n\n return (\n <Host is-invalid={this.invalid || this._error.length > 0}>\n <div class={classes}>\n <div class=\"stzh-saptcha__box\">\n <div class=\"stzh-saptcha__info\" id={`${this.saptchaId}-info`}>\n {this.localization.info} {this.localization.question}\n </div>\n <div class=\"stzh-saptcha__answer\" id={`${this.saptchaId}-answer`}>\n {this._numbers.map((number, index) =>\n <span class=\"stzh-saptcha__number\">\n {number}\n {index < this._numbers.length - 1 &&\n (index === this._numbers.length - 2\n ? this.localization.answerOr\n : \", \")\n }\n </span>\n )}\n </div>\n <stzh-input\n class=\"stzh-saptcha__input\"\n label={this.localization.answer}\n name={this.name}\n invalid={this.invalid}\n error={this.error}\n disabled={this.disabled}\n value={this.value}\n onStzhChange={this.onInputChange}\n required\n a11yDescribedby={`${this.saptchaId}-info ${this.saptchaId}-answer`}\n ></stzh-input>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -21,6 +21,9 @@ export default {
21
21
  component: readme
22
22
  }
23
23
  },
24
+ actions: {
25
+ handles: ['stzhChange', 'stzhFocus', 'stzhBlur']
26
+ },
24
27
  design: {
25
28
  type: 'figma',
26
29
  url: getFigmaLink('saptcha'),
@@ -394,21 +394,21 @@ stzh-search:where([has-aside-filters]:not([hide-aside-filters]:not([hide-aside-f
394
394
  transition-property: opacity;
395
395
  transition-duration: var(--stzh-base-transition-animation-speed);
396
396
  }
397
- .stzh-search__results-heading {
397
+ .stzh-search__results-heading, .stzh-search__results-text, .stzh-search__results-subscribe {
398
398
  margin-bottom: var(--stzh-space-medium);
399
399
  }
400
400
  @media screen and (min-width: 600px) {
401
- .stzh-search__results-heading {
401
+ .stzh-search__results-heading, .stzh-search__results-text, .stzh-search__results-subscribe {
402
402
  margin-bottom: var(--stzh-space-large);
403
403
  }
404
404
  }
405
405
  @media screen and (min-width: 900px) {
406
- .stzh-search__results-heading {
406
+ .stzh-search__results-heading, .stzh-search__results-text, .stzh-search__results-subscribe {
407
407
  margin-bottom: var(--stzh-space-xlarge);
408
408
  }
409
409
  }
410
410
  @media screen and (min-width: 1260px) {
411
- .stzh-search__results-heading {
411
+ .stzh-search__results-heading, .stzh-search__results-text, .stzh-search__results-subscribe {
412
412
  margin-bottom: var(--stzh-space-xxlarge);
413
413
  }
414
414
  }