@oiz/stzh-components 2.0.0-beta → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/dist/cjs/{app-globals-58a084a9.js → app-globals-ec8cc33e.js} +1 -1
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/stzh-accordion-item.cjs.entry.js +33 -15
  4. package/dist/cjs/stzh-actionset.cjs.entry.js +1 -9
  5. package/dist/cjs/stzh-badge_3.cjs.entry.js +17 -7
  6. package/dist/cjs/stzh-card-list.cjs.entry.js +19 -20
  7. package/dist/cjs/stzh-card.cjs.entry.js +34 -16
  8. package/dist/cjs/stzh-chip-select.cjs.entry.js +52 -4
  9. package/dist/cjs/stzh-chip.cjs.entry.js +3 -1
  10. package/dist/cjs/stzh-components.cjs.js +2 -2
  11. package/dist/cjs/stzh-cspace.cjs.entry.js +1 -1
  12. package/dist/cjs/stzh-datamessagelist-item.cjs.entry.js +1 -1
  13. package/dist/cjs/stzh-datatable.cjs.entry.js +1 -1
  14. package/dist/cjs/stzh-dialog.cjs.entry.js +1 -1
  15. package/dist/cjs/stzh-ghettobox_2.cjs.entry.js +2 -2
  16. package/dist/cjs/stzh-heading.cjs.entry.js +1 -1
  17. package/dist/cjs/stzh-hspace.cjs.entry.js +1 -1
  18. package/dist/cjs/stzh-icon-sprite.cjs.entry.js +1 -1
  19. package/dist/cjs/stzh-input.cjs.entry.js +2 -2
  20. package/dist/cjs/stzh-link.cjs.entry.js +8 -4
  21. package/dist/cjs/stzh-menu_2.cjs.entry.js +6 -2
  22. package/dist/cjs/stzh-message.cjs.entry.js +1 -1
  23. package/dist/cjs/stzh-pagetitle.cjs.entry.js +1 -1
  24. package/dist/cjs/stzh-portal-mitwirken.cjs.entry.js +1 -1
  25. package/dist/cjs/stzh-saptcha.cjs.entry.js +1 -1
  26. package/dist/cjs/stzh-sortable.cjs.entry.js +3 -2
  27. package/dist/cjs/stzh-table.cjs.entry.js +1 -1
  28. package/dist/cjs/stzh-upload.cjs.entry.js +47 -4
  29. package/dist/cjs/stzh-vbz-ticker.cjs.entry.js +1 -1
  30. package/dist/cjs/stzh-vspace.cjs.entry.js +1 -1
  31. package/dist/collection/assets/icons/mono/code-window.svg +3 -0
  32. package/dist/collection/components/stzh-accordion-item/stzh-accordion-item.css +34 -8
  33. package/dist/collection/components/stzh-accordion-item/stzh-accordion-item.js +123 -14
  34. package/dist/collection/components/stzh-accordion-item/stzh-accordion-item.stories.js +9 -0
  35. package/dist/collection/components/stzh-actionset/stzh-actionset.js +1 -9
  36. package/dist/collection/components/stzh-badge/stzh-badge.css +22 -2
  37. package/dist/collection/components/stzh-badge/stzh-badge.js +25 -1
  38. package/dist/collection/components/stzh-button/stzh-button.js +45 -5
  39. package/dist/collection/components/stzh-card/stzh-card.css +2 -14
  40. package/dist/collection/components/stzh-card/stzh-card.js +37 -37
  41. package/dist/collection/components/stzh-card/stzh-card.stories.js +1 -4
  42. package/dist/collection/components/stzh-card-list/stzh-card-list.js +22 -49
  43. package/dist/collection/components/stzh-card-list/stzh-card-list.stories.js +2 -2
  44. package/dist/collection/components/stzh-chip/stzh-chip.js +38 -1
  45. package/dist/collection/components/stzh-chip-select/stzh-chip-select.css +80 -0
  46. package/dist/collection/components/stzh-chip-select/stzh-chip-select.js +213 -3
  47. package/dist/collection/components/stzh-cspace/stzh-cspace.css +87 -176
  48. package/dist/collection/components/stzh-datamessagelist-item/stzh-datamessagelist-item.css +3 -8
  49. package/dist/collection/components/stzh-datatable/stzh-datatable.css +5 -0
  50. package/dist/collection/components/stzh-dialog/stzh-dialog.css +9 -19
  51. package/dist/collection/components/stzh-ghettobox/stzh-ghettobox.css +16 -16
  52. package/dist/collection/components/stzh-heading/stzh-heading.css +5 -15
  53. package/dist/collection/components/stzh-hspace/stzh-hspace.css +19 -24
  54. package/dist/collection/components/stzh-icon-sprite/assets/svgsprites/symbol/sprite.symbol.html +45 -32
  55. package/dist/collection/components/stzh-icon-sprite/assets/svgsprites/symbol/svg/sprite.symbol.svg +1 -1
  56. package/dist/collection/components/stzh-input/stzh-input.js +2 -2
  57. package/dist/collection/components/stzh-link/stzh-link.js +44 -4
  58. package/dist/collection/components/stzh-menu-item/stzh-menu-item.js +42 -2
  59. package/dist/collection/components/stzh-message/stzh-message.css +5 -0
  60. package/dist/collection/components/stzh-pagetitle/stzh-pagetitle.css +3 -8
  61. package/dist/collection/components/stzh-portal-mitwirken/stzh-portal-mitwirken.css +226 -337
  62. package/dist/collection/components/stzh-richtext/stzh-richtext.css +88 -129
  63. package/dist/collection/components/stzh-saptcha/stzh-saptcha.css +8 -8
  64. package/dist/collection/components/stzh-sortable/stzh-sortable.css +12 -6
  65. package/dist/collection/components/stzh-sortable/stzh-sortable.js +2 -1
  66. package/dist/collection/components/stzh-table/stzh-table.css +5 -0
  67. package/dist/collection/components/stzh-upload/stzh-upload.css +16 -7
  68. package/dist/collection/components/stzh-upload/stzh-upload.js +46 -3
  69. package/dist/collection/components/stzh-upload/stzh-upload.stories.js +1 -1
  70. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.css +2 -7
  71. package/dist/collection/components/stzh-vspace/stzh-vspace.css +19 -24
  72. package/dist/collection/pages/meinkonto.stories.js +1 -1
  73. package/dist/components/index.js +1 -1
  74. package/dist/components/stzh-accordion-item.js +51 -16
  75. package/dist/components/stzh-actionset2.js +1 -9
  76. package/dist/components/stzh-badge2.js +10 -3
  77. package/dist/components/stzh-button2.js +11 -5
  78. package/dist/components/stzh-card-list.js +20 -22
  79. package/dist/components/stzh-card.js +34 -17
  80. package/dist/components/stzh-chip-select.js +63 -6
  81. package/dist/components/stzh-chip2.js +5 -1
  82. package/dist/components/stzh-cspace.js +1 -1
  83. package/dist/components/stzh-datamessagelist-item.js +1 -1
  84. package/dist/components/stzh-datatable.js +1 -1
  85. package/dist/components/stzh-dialog.js +1 -1
  86. package/dist/components/stzh-ghettobox2.js +1 -1
  87. package/dist/components/stzh-heading2.js +1 -1
  88. package/dist/components/stzh-hspace.js +1 -1
  89. package/dist/components/stzh-icon-sprite.js +1 -1
  90. package/dist/components/stzh-input2.js +2 -2
  91. package/dist/components/stzh-link2.js +10 -4
  92. package/dist/components/stzh-menu-item2.js +8 -2
  93. package/dist/components/stzh-message.js +1 -1
  94. package/dist/components/stzh-pagetitle.js +1 -1
  95. package/dist/components/stzh-portal-mitwirken.js +1 -1
  96. package/dist/components/stzh-richtext2.js +1 -1
  97. package/dist/components/stzh-saptcha.js +1 -1
  98. package/dist/components/stzh-sortable2.js +3 -2
  99. package/dist/components/stzh-table.js +1 -1
  100. package/dist/components/stzh-upload.js +47 -4
  101. package/dist/components/stzh-vbz-ticker.js +1 -1
  102. package/dist/components/stzh-vspace.js +1 -1
  103. package/dist/esm/{app-globals-6b6ff890.js → app-globals-e66420b3.js} +1 -1
  104. package/dist/esm/loader.js +2 -2
  105. package/dist/esm/stzh-accordion-item.entry.js +33 -15
  106. package/dist/esm/stzh-actionset.entry.js +1 -9
  107. package/dist/esm/stzh-badge_3.entry.js +17 -7
  108. package/dist/esm/stzh-card-list.entry.js +19 -20
  109. package/dist/esm/stzh-card.entry.js +34 -16
  110. package/dist/esm/stzh-chip-select.entry.js +52 -4
  111. package/dist/esm/stzh-chip.entry.js +3 -1
  112. package/dist/esm/stzh-components.js +2 -2
  113. package/dist/esm/stzh-cspace.entry.js +1 -1
  114. package/dist/esm/stzh-datamessagelist-item.entry.js +1 -1
  115. package/dist/esm/stzh-datatable.entry.js +1 -1
  116. package/dist/esm/stzh-dialog.entry.js +1 -1
  117. package/dist/esm/stzh-ghettobox_2.entry.js +2 -2
  118. package/dist/esm/stzh-heading.entry.js +1 -1
  119. package/dist/esm/stzh-hspace.entry.js +1 -1
  120. package/dist/esm/stzh-icon-sprite.entry.js +1 -1
  121. package/dist/esm/stzh-input.entry.js +2 -2
  122. package/dist/esm/stzh-link.entry.js +8 -4
  123. package/dist/esm/stzh-menu_2.entry.js +6 -2
  124. package/dist/esm/stzh-message.entry.js +1 -1
  125. package/dist/esm/stzh-pagetitle.entry.js +1 -1
  126. package/dist/esm/stzh-portal-mitwirken.entry.js +1 -1
  127. package/dist/esm/stzh-saptcha.entry.js +1 -1
  128. package/dist/esm/stzh-sortable.entry.js +3 -2
  129. package/dist/esm/stzh-table.entry.js +1 -1
  130. package/dist/esm/stzh-upload.entry.js +47 -4
  131. package/dist/esm/stzh-vbz-ticker.entry.js +1 -1
  132. package/dist/esm/stzh-vspace.entry.js +1 -1
  133. package/dist/esm-es5/app-globals-e66420b3.js +1 -0
  134. package/dist/esm-es5/loader.js +1 -1
  135. package/dist/esm-es5/stzh-accordion-item.entry.js +1 -1
  136. package/dist/esm-es5/stzh-actionset.entry.js +1 -1
  137. package/dist/esm-es5/stzh-badge_3.entry.js +1 -1
  138. package/dist/esm-es5/stzh-card-list.entry.js +1 -1
  139. package/dist/esm-es5/stzh-card.entry.js +1 -1
  140. package/dist/esm-es5/stzh-chip-select.entry.js +1 -1
  141. package/dist/esm-es5/stzh-chip.entry.js +1 -1
  142. package/dist/esm-es5/stzh-components.js +1 -1
  143. package/dist/esm-es5/stzh-cspace.entry.js +1 -1
  144. package/dist/esm-es5/stzh-datamessagelist-item.entry.js +1 -1
  145. package/dist/esm-es5/stzh-datatable.entry.js +1 -1
  146. package/dist/esm-es5/stzh-dialog.entry.js +1 -1
  147. package/dist/esm-es5/stzh-ghettobox_2.entry.js +1 -1
  148. package/dist/esm-es5/stzh-heading.entry.js +1 -1
  149. package/dist/esm-es5/stzh-hspace.entry.js +1 -1
  150. package/dist/esm-es5/stzh-icon-sprite.entry.js +1 -1
  151. package/dist/esm-es5/stzh-input.entry.js +1 -1
  152. package/dist/esm-es5/stzh-link.entry.js +1 -1
  153. package/dist/esm-es5/stzh-menu_2.entry.js +1 -1
  154. package/dist/esm-es5/stzh-message.entry.js +1 -1
  155. package/dist/esm-es5/stzh-pagetitle.entry.js +1 -1
  156. package/dist/esm-es5/stzh-portal-mitwirken.entry.js +1 -1
  157. package/dist/esm-es5/stzh-saptcha.entry.js +1 -1
  158. package/dist/esm-es5/stzh-sortable.entry.js +1 -1
  159. package/dist/esm-es5/stzh-table.entry.js +1 -1
  160. package/dist/esm-es5/stzh-upload.entry.js +1 -1
  161. package/dist/esm-es5/stzh-vbz-ticker.entry.js +1 -1
  162. package/dist/esm-es5/stzh-vspace.entry.js +1 -1
  163. package/dist/stzh-components/assets/icons/mono/code-window.svg +3 -0
  164. package/dist/stzh-components/assets/svgsprites/symbol/sprite.symbol.html +45 -32
  165. package/dist/stzh-components/assets/svgsprites/symbol/svg/sprite.symbol.svg +1 -1
  166. package/dist/stzh-components/{p-332e4fd3.entry.js → p-03ea86bd.entry.js} +1 -1
  167. package/dist/stzh-components/p-051bc2a8.entry.js +1 -0
  168. package/dist/stzh-components/{p-13f44000.entry.js → p-0711e511.entry.js} +1 -1
  169. package/dist/stzh-components/p-073c89b1.system.entry.js +1 -0
  170. package/dist/stzh-components/{p-8cbc987f.system.entry.js → p-1440163c.system.entry.js} +1 -1
  171. package/dist/stzh-components/p-18958371.entry.js +1 -0
  172. package/dist/stzh-components/p-20ef4a20.system.entry.js +1 -0
  173. package/dist/stzh-components/{p-8a9e588e.system.entry.js → p-21566d65.system.entry.js} +1 -1
  174. package/dist/stzh-components/{p-5975c355.system.entry.js → p-22701389.system.entry.js} +1 -1
  175. package/dist/stzh-components/p-252d3178.entry.js +1 -0
  176. package/dist/stzh-components/p-2ca4a828.system.entry.js +1 -0
  177. package/dist/stzh-components/p-3042b23e.entry.js +1 -0
  178. package/dist/stzh-components/p-3b912468.system.entry.js +1 -0
  179. package/dist/stzh-components/p-3beb58d6.system.entry.js +1 -0
  180. package/dist/stzh-components/p-3f0363db.entry.js +1 -0
  181. package/dist/stzh-components/{p-b084fcbf.system.entry.js → p-530252c6.system.entry.js} +1 -1
  182. package/dist/stzh-components/{p-3b27a43f.system.entry.js → p-5353ba86.system.entry.js} +2 -2
  183. package/dist/stzh-components/p-55cdbf79.entry.js +1 -0
  184. package/dist/stzh-components/p-562e6c52.entry.js +1 -0
  185. package/dist/stzh-components/{p-b9295dc2.entry.js → p-5f4eb46c.entry.js} +1 -1
  186. package/dist/stzh-components/p-62db1e59.entry.js +1 -0
  187. package/dist/stzh-components/{p-63d8db7b.entry.js → p-6425898c.entry.js} +1 -1
  188. package/dist/stzh-components/p-676fd54d.entry.js +1 -0
  189. package/dist/stzh-components/{p-e7a84e53.system.entry.js → p-684c345e.system.entry.js} +1 -1
  190. package/dist/stzh-components/{p-8f16b0ac.entry.js → p-713ae713.entry.js} +1 -1
  191. package/dist/stzh-components/p-764ba190.entry.js +1 -0
  192. package/dist/stzh-components/p-786a92d4.system.entry.js +1 -0
  193. package/dist/stzh-components/p-796ae62c.system.entry.js +1 -0
  194. package/dist/stzh-components/p-7ec2f3fd.entry.js +9 -0
  195. package/dist/stzh-components/p-80d70586.entry.js +1 -0
  196. package/dist/stzh-components/p-838df84a.system.entry.js +1 -0
  197. package/dist/stzh-components/p-84ab53cc.system.entry.js +1 -0
  198. package/dist/stzh-components/p-85161133.js +1 -0
  199. package/dist/stzh-components/p-864d7c50.entry.js +1 -0
  200. package/dist/stzh-components/p-8b6de2c0.system.entry.js +1 -0
  201. package/dist/stzh-components/{p-ab455116.system.entry.js → p-8c648042.system.entry.js} +1 -1
  202. package/dist/stzh-components/p-929dbdf1.system.entry.js +1 -0
  203. package/dist/stzh-components/p-9469b812.entry.js +1 -0
  204. package/dist/stzh-components/p-9e716229.entry.js +1 -0
  205. package/dist/stzh-components/p-a3fa6122.system.entry.js +1 -0
  206. package/dist/stzh-components/p-b391d962.system.entry.js +1 -0
  207. package/dist/stzh-components/p-b462a61f.entry.js +1 -0
  208. package/dist/stzh-components/{p-5987573e.system.entry.js → p-b5a85078.system.entry.js} +1 -1
  209. package/dist/stzh-components/p-b70bc70c.system.js +1 -0
  210. package/dist/stzh-components/{p-b9382599.entry.js → p-bb3c1249.entry.js} +1 -1
  211. package/dist/stzh-components/{p-b636a18a.system.entry.js → p-bbe4e3d1.system.entry.js} +1 -1
  212. package/dist/stzh-components/p-c4fc6433.system.entry.js +1 -0
  213. package/dist/stzh-components/p-cb1d4678.entry.js +1 -0
  214. package/dist/stzh-components/p-ccd30d73.system.entry.js +1 -0
  215. package/dist/stzh-components/p-cd795307.entry.js +1 -0
  216. package/dist/stzh-components/{p-c692e405.entry.js → p-cdc9e600.entry.js} +1 -1
  217. package/dist/stzh-components/p-d1552460.system.entry.js +1 -0
  218. package/dist/stzh-components/p-e3e3e88c.system.js +1 -0
  219. package/dist/stzh-components/p-eb61c369.entry.js +1 -0
  220. package/dist/stzh-components/p-ebeb8d7b.system.entry.js +1 -0
  221. package/dist/stzh-components/p-eca1732f.entry.js +1 -0
  222. package/dist/stzh-components/p-f24db7e8.system.entry.js +1 -0
  223. package/dist/stzh-components/stzh-components.css +1 -1
  224. package/dist/stzh-components/stzh-components.esm.js +1 -1
  225. package/dist/stzh-components/stzh-components.js +1 -1
  226. package/dist/types/components/stzh-badge/stzh-badge.d.ts +2 -0
  227. package/dist/types/components.d.ts +196 -28
  228. package/dist/types/index.d.ts +6 -1
  229. package/dist/vscode-data.json +180 -19
  230. package/package.json +1 -1
  231. package/dist/esm-es5/app-globals-6b6ff890.js +0 -1
  232. package/dist/stzh-components/p-0b8de542.system.entry.js +0 -1
  233. package/dist/stzh-components/p-0d5522dc.system.entry.js +0 -1
  234. package/dist/stzh-components/p-0efe125f.system.entry.js +0 -1
  235. package/dist/stzh-components/p-2818488f.entry.js +0 -1
  236. package/dist/stzh-components/p-373f79e8.entry.js +0 -1
  237. package/dist/stzh-components/p-3ac93a01.entry.js +0 -1
  238. package/dist/stzh-components/p-59c323ce.entry.js +0 -1
  239. package/dist/stzh-components/p-6354fee3.entry.js +0 -1
  240. package/dist/stzh-components/p-653c6bbc.entry.js +0 -1
  241. package/dist/stzh-components/p-67f906b1.entry.js +0 -1
  242. package/dist/stzh-components/p-6a81e64b.entry.js +0 -1
  243. package/dist/stzh-components/p-75cdc8a6.system.entry.js +0 -1
  244. package/dist/stzh-components/p-7ad87d98.system.entry.js +0 -1
  245. package/dist/stzh-components/p-7f9f9a8d.entry.js +0 -1
  246. package/dist/stzh-components/p-83b1e379.entry.js +0 -9
  247. package/dist/stzh-components/p-86bc421e.system.entry.js +0 -1
  248. package/dist/stzh-components/p-8aebb240.entry.js +0 -1
  249. package/dist/stzh-components/p-938ef748.entry.js +0 -1
  250. package/dist/stzh-components/p-9bda100f.system.js +0 -1
  251. package/dist/stzh-components/p-a99d3e97.system.entry.js +0 -1
  252. package/dist/stzh-components/p-af2664fc.system.entry.js +0 -1
  253. package/dist/stzh-components/p-b9c3f3cc.entry.js +0 -1
  254. package/dist/stzh-components/p-bd178c32.system.entry.js +0 -1
  255. package/dist/stzh-components/p-c013a00b.system.entry.js +0 -1
  256. package/dist/stzh-components/p-c456c04b.system.entry.js +0 -1
  257. package/dist/stzh-components/p-c499e04d.entry.js +0 -1
  258. package/dist/stzh-components/p-c83e4fec.system.entry.js +0 -1
  259. package/dist/stzh-components/p-ca062c11.system.js +0 -1
  260. package/dist/stzh-components/p-ce28428b.entry.js +0 -1
  261. package/dist/stzh-components/p-cfaac121.js +0 -1
  262. package/dist/stzh-components/p-d11a70e2.system.entry.js +0 -1
  263. package/dist/stzh-components/p-d1dba399.system.entry.js +0 -1
  264. package/dist/stzh-components/p-d2b5e066.entry.js +0 -1
  265. package/dist/stzh-components/p-d54f04c8.system.entry.js +0 -1
  266. package/dist/stzh-components/p-d645d645.entry.js +0 -1
  267. package/dist/stzh-components/p-da7b363e.entry.js +0 -1
  268. package/dist/stzh-components/p-de017b87.system.entry.js +0 -1
  269. package/dist/stzh-components/p-e009bfdc.entry.js +0 -1
  270. package/dist/stzh-components/p-f167eaa4.system.entry.js +0 -1
  271. package/dist/stzh-components/p-f2ee016a.entry.js +0 -1
  272. package/dist/stzh-components/p-ffa1e9dd.system.entry.js +0 -1
@@ -94,6 +94,78 @@
94
94
  box-sizing: border-box;
95
95
  }
96
96
 
97
+ .stzh-chip-select__marker-symbol {
98
+ font-family: var(--stzh-font-family-regular);
99
+ font-weight: var(--stzh-font-weight-regular);
100
+ font-style: normal;
101
+ }
102
+ .stzh-chip-select__marker-text {
103
+ border: 0;
104
+ clip: rect(0 0 0 0);
105
+ -webkit-clip-path: inset(100%);
106
+ clip-path: inset(100%);
107
+ width: 0.0625rem;
108
+ height: 0.0625rem;
109
+ overflow: hidden;
110
+ padding: 0;
111
+ position: absolute;
112
+ }
113
+ .stzh-chip-select__description-wrapper {
114
+ display: flex;
115
+ flex-direction: column-reverse;
116
+ }
117
+ .stzh-chip-select__error, .stzh-chip-select__description {
118
+ font-size: var(--stzh-font-micro-font-size);
119
+ line-height: var(--stzh-font-micro-text-line-height);
120
+ color: var(--stzh-base-color);
121
+ }
122
+ .stzh-chip-select__error {
123
+ color: var(--stzh-color-error);
124
+ }
125
+ .stzh-chip-select__error-list {
126
+ list-style: none;
127
+ margin: 0;
128
+ padding: 0;
129
+ }
130
+ .stzh-chip-select__description {
131
+ display: flex;
132
+ align-items: flex-start;
133
+ }
134
+ .stzh-chip-select__description-long {
135
+ margin-left: var(--stzh-space-xxsmall);
136
+ margin-top: 0.1875rem;
137
+ }
138
+ .stzh-chip-select__description-long-popover {
139
+ --width: auto;
140
+ --max-width: 27.3125rem;
141
+ }
142
+ .stzh-chip-select__description-long-popover[open]:not([open=false]) .stzh-chip-select__description-long-button {
143
+ color: var(--stzh-color-primary, var(--stzh-color-zueriblue));
144
+ }
145
+ .stzh-chip-select__description-long-button {
146
+ display: flex;
147
+ justify-content: center;
148
+ align-items: center;
149
+ -webkit-appearance: none;
150
+ -moz-appearance: none;
151
+ appearance: none;
152
+ padding: 0;
153
+ border: none;
154
+ background-color: transparent;
155
+ border-radius: 0.5rem;
156
+ cursor: pointer;
157
+ transition: color var(--stzh-base-transition-animation-speed);
158
+ color: var(--stzh-base-lead-color);
159
+ }
160
+ .stzh-chip-select__description-long-button:hover {
161
+ color: var(--stzh-color-primary, var(--stzh-color-zueriblue));
162
+ }
163
+ .stzh-chip-select stzh-icon.stzh-chip-select__description-long-icon {
164
+ --size: var(--stzh-icon-size-xsmall);
165
+ }
166
+ .stzh-chip-select--has-error .stzh-chip-select__error, .stzh-chip-select--has-description .stzh-chip-select__description {
167
+ margin-top: var(--stzh-space-xxsmall);
168
+ }
97
169
  .stzh-chip-select__chips {
98
170
  display: flex;
99
171
  align-items: center;
@@ -112,4 +184,12 @@
112
184
  .stzh-chip-select__dropdown {
113
185
  display: none;
114
186
  }
187
+ }
188
+ @media screen and (max-width: 1023px) {
189
+ .stzh-chip-select__description-wrapper {
190
+ display: none;
191
+ }
192
+ }
193
+ .stzh-chip-select--has-error .stzh-chip-select__error, .stzh-chip-select--has-description .stzh-chip-select__description {
194
+ margin-top: var(--stzh-space-xsmall);
115
195
  }
@@ -1,6 +1,9 @@
1
1
  import { Host, h } from "@stencil/core";
2
+ import { StzhInputDescription } from "../stzh-input/stzh-input-description";
3
+ // import { hasSlot } from "../../utils/utils";
4
+ import { fetchTranslations } from "../../utils/translation-utils";
5
+ let chipSelectCounter = 0;
2
6
  /**
3
- *
4
7
  */
5
8
  export class StzhChipSelect {
6
9
  constructor() {
@@ -12,6 +15,14 @@ export class StzhChipSelect {
12
15
  this.label = "";
13
16
  /** Value */
14
17
  this.value = "";
18
+ /** Invalid status */
19
+ this.invalid = false;
20
+ /** Required status */
21
+ this.required = false;
22
+ /** Whether the element is disabled or not */
23
+ this.disabled = false;
24
+ /** Id for element which describes the input (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */
25
+ this.a11yDescribedby = "";
15
26
  this.chipClick = (data) => {
16
27
  this.value = data.value;
17
28
  this.stzhChange.emit({
@@ -41,14 +52,50 @@ export class StzhChipSelect {
41
52
  };
42
53
  });
43
54
  }
55
+ errorWatcher(newValue) {
56
+ if (typeof newValue === "string") {
57
+ try {
58
+ this._error = JSON.parse(newValue);
59
+ }
60
+ catch (e) {
61
+ if (newValue) {
62
+ this._error = [newValue];
63
+ }
64
+ else {
65
+ this._error = [];
66
+ }
67
+ }
68
+ }
69
+ else if (newValue) {
70
+ this._error = newValue;
71
+ }
72
+ else {
73
+ this._error = [];
74
+ }
75
+ this.invalid = this._error.length > 0;
76
+ }
44
77
  async componentWillLoad() {
78
+ this.inputId = `stzh-chip-select-${chipSelectCounter++}`;
45
79
  this.dataWatcher(this.data);
80
+ this.errorWatcher(this.error);
81
+ if (!this.localization) {
82
+ this.localization = await fetchTranslations(this.element, "chip-select");
83
+ }
46
84
  }
47
85
  render() {
86
+ const descriptionUsed = !!this.description;
87
+ const descriptionLongUsed = !!this.descriptionLong;
88
+ const errorUsed = !!this.error;
48
89
  const classes = {
49
- "stzh-chip-select": true
90
+ "stzh-chip-select": true,
91
+ "stzh-chip-select--has-description": descriptionUsed,
92
+ "stzh-chip-select--has-description-long": descriptionLongUsed,
93
+ "stzh-chip-select--has-error": errorUsed,
94
+ "stzh-chip-select--is-invalid": this.invalid,
95
+ "stzh-chip-select--is-disabled": this.disabled,
96
+ "stzh-chip-select--is-required": this.required
50
97
  };
51
- return (h(Host, null, h("div", { class: classes }, h("div", { class: "stzh-chip-select__chips", role: "list" }, this._data.map((data) => (h("stzh-chip", { role: "listitem", class: "stzh-chip-select__chip", label: data.label, counter: data.counter, icon: data.icon, type: data.type, variant: data.variant, size: data.size, active: this.value === data.value, onClick: () => this.chipClick(data) })))), h("stzh-dropdown", { class: "stzh-chip-select__dropdown", items: [this.value], label: this.label, options: this._dataDropdown, onStzhChange: this.onDropdownChange }))));
98
+ return (h(Host, null, h("div", { class: classes }, h("input", { type: "hidden", name: this.name, value: this.value }), h("div", { class: "stzh-chip-select__chips", role: "listbox" }, this._data.map((data) => (h("stzh-chip", { role: "option", class: "stzh-chip-select__chip", label: data.label, counter: data.counter, icon: data.icon, type: data.type, variant: data.variant, size: data.size, disabled: this.disabled || data.disabled, active: this.value === data.value, "aria-selected": this.value === data.value ? "true" : null, a11yDescribedby: `${this.inputId}-description ${this.a11yDescribedby}`, onClick: () => this.chipClick(data) })))), h(StzhInputDescription, { classPrefix: "stzh-chip-select", id: `${this.inputId}-description`, error: this._error, description: this.description, descriptionLong: this.descriptionLong, descriptionLongUsed: descriptionLongUsed, moreInfoButtonLabel: this.localization.$globals.moreInfoButtonLabel }), h("stzh-dropdown", { class: "stzh-chip-select__dropdown", disabled: this.disabled, error: this._error, description: this.description, descriptionLong: this.descriptionLong, required: this.required, invalid: this.invalid, items: [this.value], label: this.label, options: this._dataDropdown, onStzhChange: this.onDropdownChange }))));
52
99
  }
53
100
  static get is() { return "stzh-chip-select"; }
54
101
  static get encapsulation() { return "scoped"; }
@@ -64,6 +111,26 @@ export class StzhChipSelect {
64
111
  }
65
112
  static get properties() {
66
113
  return {
114
+ "localization": {
115
+ "type": "unknown",
116
+ "mutable": false,
117
+ "complexType": {
118
+ "original": "StzhLocaleComponent",
119
+ "resolved": "{ $locale: \"de\" | \"en\"; $formats: StzhLocaleFormats; $globals: StzhLocaleGlobals; }",
120
+ "references": {
121
+ "StzhLocaleComponent": {
122
+ "location": "import",
123
+ "path": "../../utils/translation-utils"
124
+ }
125
+ }
126
+ },
127
+ "required": false,
128
+ "optional": false,
129
+ "docs": {
130
+ "tags": [],
131
+ "text": "Translation strings"
132
+ }
133
+ },
67
134
  "data": {
68
135
  "type": "string",
69
136
  "mutable": false,
@@ -87,6 +154,23 @@ export class StzhChipSelect {
87
154
  "reflect": false,
88
155
  "defaultValue": "[]"
89
156
  },
157
+ "name": {
158
+ "type": "string",
159
+ "mutable": false,
160
+ "complexType": {
161
+ "original": "string",
162
+ "resolved": "string",
163
+ "references": {}
164
+ },
165
+ "required": false,
166
+ "optional": false,
167
+ "docs": {
168
+ "tags": [],
169
+ "text": "The name of the input element"
170
+ },
171
+ "attribute": "name",
172
+ "reflect": true
173
+ },
90
174
  "label": {
91
175
  "type": "string",
92
176
  "mutable": false,
@@ -122,6 +206,129 @@ export class StzhChipSelect {
122
206
  "attribute": "value",
123
207
  "reflect": false,
124
208
  "defaultValue": "\"\""
209
+ },
210
+ "description": {
211
+ "type": "string",
212
+ "mutable": false,
213
+ "complexType": {
214
+ "original": "string",
215
+ "resolved": "string",
216
+ "references": {}
217
+ },
218
+ "required": false,
219
+ "optional": false,
220
+ "docs": {
221
+ "tags": [],
222
+ "text": "Description message (use description slot as alternative)"
223
+ },
224
+ "attribute": "description",
225
+ "reflect": false
226
+ },
227
+ "descriptionLong": {
228
+ "type": "string",
229
+ "mutable": false,
230
+ "complexType": {
231
+ "original": "string",
232
+ "resolved": "string",
233
+ "references": {}
234
+ },
235
+ "required": false,
236
+ "optional": false,
237
+ "docs": {
238
+ "tags": [],
239
+ "text": "Long description message appearing in a popover (use description-long slot as alternative)"
240
+ },
241
+ "attribute": "description-long",
242
+ "reflect": false
243
+ },
244
+ "error": {
245
+ "type": "string",
246
+ "mutable": false,
247
+ "complexType": {
248
+ "original": "string | string[]",
249
+ "resolved": "string | string[]",
250
+ "references": {}
251
+ },
252
+ "required": false,
253
+ "optional": false,
254
+ "docs": {
255
+ "tags": [],
256
+ "text": "One or multiple error message (use error slot as alternative)"
257
+ },
258
+ "attribute": "error",
259
+ "reflect": false
260
+ },
261
+ "invalid": {
262
+ "type": "boolean",
263
+ "mutable": false,
264
+ "complexType": {
265
+ "original": "boolean",
266
+ "resolved": "boolean",
267
+ "references": {}
268
+ },
269
+ "required": false,
270
+ "optional": false,
271
+ "docs": {
272
+ "tags": [],
273
+ "text": "Invalid status"
274
+ },
275
+ "attribute": "invalid",
276
+ "reflect": true,
277
+ "defaultValue": "false"
278
+ },
279
+ "required": {
280
+ "type": "boolean",
281
+ "mutable": false,
282
+ "complexType": {
283
+ "original": "boolean",
284
+ "resolved": "boolean",
285
+ "references": {}
286
+ },
287
+ "required": false,
288
+ "optional": false,
289
+ "docs": {
290
+ "tags": [],
291
+ "text": "Required status"
292
+ },
293
+ "attribute": "required",
294
+ "reflect": true,
295
+ "defaultValue": "false"
296
+ },
297
+ "disabled": {
298
+ "type": "boolean",
299
+ "mutable": false,
300
+ "complexType": {
301
+ "original": "boolean",
302
+ "resolved": "boolean",
303
+ "references": {}
304
+ },
305
+ "required": false,
306
+ "optional": false,
307
+ "docs": {
308
+ "tags": [],
309
+ "text": "Whether the element is disabled or not"
310
+ },
311
+ "attribute": "disabled",
312
+ "reflect": true,
313
+ "defaultValue": "false"
314
+ },
315
+ "a11yDescribedby": {
316
+ "type": "string",
317
+ "mutable": false,
318
+ "complexType": {
319
+ "original": "string",
320
+ "resolved": "string",
321
+ "references": {}
322
+ },
323
+ "required": false,
324
+ "optional": false,
325
+ "docs": {
326
+ "tags": [],
327
+ "text": "Id for element which describes the input (this will be overwritten if description prop or slot is used, used by stzh-radiogroup)"
328
+ },
329
+ "attribute": "a11y-describedby",
330
+ "reflect": false,
331
+ "defaultValue": "\"\""
125
332
  }
126
333
  };
127
334
  }
@@ -153,6 +360,9 @@ export class StzhChipSelect {
153
360
  return [{
154
361
  "propName": "data",
155
362
  "methodName": "dataWatcher"
363
+ }, {
364
+ "propName": "error",
365
+ "methodName": "errorWatcher"
156
366
  }];
157
367
  }
158
368
  }