@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
@@ -38,6 +38,15 @@ Default.args = {
38
38
  heading: 'Lorem ipsum'
39
39
  };
40
40
 
41
+ export const WithDescription = Template.bind({});
42
+ WithDescription.args = {
43
+ heading: 'Lorem ipsum',
44
+ description: 'Description',
45
+ icon: 'question-help',
46
+ 'badge-empty': true,
47
+ 'badge-type': 'warning'
48
+ };
49
+
41
50
  export const WithSubtitle = Template.bind({});
42
51
  WithSubtitle.args = {
43
52
  heading: 'Lorem ipsum',
@@ -82,14 +82,6 @@ export class StzhActionset {
82
82
  this._actions = newValue;
83
83
  }
84
84
  }
85
- // handleLoad(e) {
86
- // console.log(e);
87
- // requestAnimationFrame(() => {
88
- // requestAnimationFrame(() => {
89
- // this.update();
90
- // });
91
- // });
92
- // }
93
85
  handleResize() {
94
86
  if (this.debounceResize) {
95
87
  window.cancelAnimationFrame(this.debounceResize);
@@ -144,7 +136,7 @@ export class StzhActionset {
144
136
  ? this.localization.furtherActions
145
137
  : (!this.isMedium ? this.localization.actions : "") }), h("stzh-menu", { slot: "content" }, this.actionsCollapsed.map(action => (h("stzh-menu-item", {
146
138
  // class="hide-medium show-when-collapsed"
147
- icon: action.icon, badge: action.badge, onClick: () => { this.actionClick(action); }
139
+ icon: action.icon, badge: action.badge, badgeEmpty: action.badgeEmpty, badgeType: action.badgeType, onClick: () => { this.actionClick(action); }
148
140
  }, action.label)))))))));
149
141
  }
150
142
  static get is() { return "stzh-actionset"; }
@@ -95,8 +95,23 @@
95
95
  }
96
96
 
97
97
  :host {
98
+ --color: var(--stzh-color-white);
99
+ --background-color: var(--stzh-base-color);
98
100
  display: inline-flex;
99
101
  }
102
+ :host[type=success] {
103
+ --background-color: var(--stzh-color-truegreen);
104
+ }
105
+ :host[type=warning] {
106
+ --color: var(--stzh-color-grey87);
107
+ --background-color: var(--stzh-color-warning);
108
+ }
109
+ :host[type=error] {
110
+ --background-color: var(--stzh-color-error);
111
+ }
112
+ :host[type=info] {
113
+ --background-color: var(--stzh-color-zueriblue);
114
+ }
100
115
 
101
116
  .stzh-badge {
102
117
  font-family: var(--stzh-font-family-heavy);
@@ -112,7 +127,12 @@
112
127
  box-shadow: 0 0 0 0.0625rem #fff;
113
128
  border-radius: 0.875rem;
114
129
  padding: 0.0625rem 0.375rem;
115
- background-color: var(--stzh-color-shiraz);
116
- color: var(--stzh-color-white);
130
+ background-color: var(--background-color);
131
+ color: var(--color);
117
132
  text-transform: uppercase;
133
+ }
134
+ .stzh-badge:empty {
135
+ width: 0.875rem;
136
+ height: 0.875rem;
137
+ padding: 0;
118
138
  }
@@ -6,9 +6,15 @@ export class StzhBadge {
6
6
  constructor() {
7
7
  /** Text content of the badge */
8
8
  this.label = "";
9
+ /** Type */
10
+ this.type = "default";
9
11
  }
10
12
  render() {
11
- return (h(Host, null, h("div", { class: "stzh-badge" }, this.label)));
13
+ const classes = {
14
+ "stzh-badge": true,
15
+ [`stzh-badge--type-${this.type}`]: !!this.type
16
+ };
17
+ return (h(Host, null, h("div", { class: classes }, this.label)));
12
18
  }
13
19
  static get is() { return "stzh-badge"; }
14
20
  static get encapsulation() { return "scoped"; }
@@ -41,6 +47,24 @@ export class StzhBadge {
41
47
  "attribute": "label",
42
48
  "reflect": false,
43
49
  "defaultValue": "\"\""
50
+ },
51
+ "type": {
52
+ "type": "string",
53
+ "mutable": false,
54
+ "complexType": {
55
+ "original": "\"default\" | \"success\" | \"warning\" | \"error\" | \"info\"",
56
+ "resolved": "\"default\" | \"error\" | \"info\" | \"success\" | \"warning\"",
57
+ "references": {}
58
+ },
59
+ "required": false,
60
+ "optional": false,
61
+ "docs": {
62
+ "tags": [],
63
+ "text": "Type"
64
+ },
65
+ "attribute": "type",
66
+ "reflect": true,
67
+ "defaultValue": "\"default\""
44
68
  }
45
69
  };
46
70
  }
@@ -8,8 +8,12 @@ export class StzhButton {
8
8
  constructor() {
9
9
  /** Display a badge aligned to button or icons */
10
10
  this.badge = "";
11
+ /** Badge type */
12
+ this.badgeType = "default";
11
13
  /** Badge position */
12
14
  this.badgePosition = "button";
15
+ /** Whether badge should be displayed empty */
16
+ this.badgeEmpty = false;
13
17
  /** Whether the button is full width */
14
18
  this.fullwidth = false;
15
19
  /** Size variant */
@@ -94,16 +98,16 @@ export class StzhButton {
94
98
  return (h("div", { class: "stzh-button__icon-wrapper" }, this.icon ?
95
99
  h("stzh-icon", { class: "stzh-button__icon", name: this.icon })
96
100
  :
97
- h("slot", { name: "icon" }), this.badge && this.badgePosition === "icon" && iconUsed &&
98
- h("stzh-badge", { class: "stzh-button__badge", label: this.badge })));
101
+ h("slot", { name: "icon" }), (this.badge || this.badgeEmpty) && this.badgePosition === "icon" && iconUsed &&
102
+ h("stzh-badge", { class: "stzh-button__badge", label: this.badge, type: this.badgeType })));
99
103
  }
100
104
  renderContent() {
101
105
  return (h("div", { class: "stzh-button__text" }, this.label ? this.label : h("slot", null)));
102
106
  }
103
107
  renderInner(iconUsed) {
104
108
  return (h(Fragment, null, h("div", { class: "stzh-button__inner", onClick: this.onClick }, this.type === "radio" &&
105
- h("div", { class: "stzh-button__mark" }, h("div", { class: "stzh-button__check" })), this.iconPosition === "left" && this.renderIcon(iconUsed), this.renderContent(), this.iconPosition === "right" && this.renderIcon(iconUsed)), this.badge && (this.badgePosition === "button" || !iconUsed) &&
106
- h("stzh-badge", { class: "stzh-button__badge", label: this.badge, onClick: this.onClick })));
109
+ h("div", { class: "stzh-button__mark" }, h("div", { class: "stzh-button__check" })), this.iconPosition === "left" && this.renderIcon(iconUsed), this.renderContent(), this.iconPosition === "right" && this.renderIcon(iconUsed)), (this.badge || this.badgeEmpty) && (this.badgePosition === "button" || !iconUsed) &&
110
+ h("stzh-badge", { class: "stzh-button__badge", label: this.badge, type: this.badgeType, onClick: this.onClick })));
107
111
  }
108
112
  render() {
109
113
  const iconUsed = hasSlot(this.element, "icon") || !!this.icon;
@@ -128,7 +132,7 @@ export class StzhButton {
128
132
  this.type === "radio" ?
129
133
  h("label", { ref: (el) => (this.button = el), class: classes, onClick: this.onClick }, h("input", { ref: (el) => (this.input = el), type: "radio", class: "stzh-button__input", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, "aria-label": this.a11yLabel, onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, onInput: this.onInput }), this.renderInner(iconUsed))
130
134
  :
131
- h("button", { ref: (el) => (this.button = el), class: classes, type: this.type, disabled: this.disabled, "aria-label": this.a11yLabel, onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick }, this.renderInner(iconUsed))));
135
+ h("button", { ref: (el) => (this.button = el), class: classes, type: this.type, disabled: this.disabled, "aria-label": this.a11yLabel, "aria-describedby": this.a11yDescribedby, onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick }, this.renderInner(iconUsed))));
132
136
  }
133
137
  static get is() { return "stzh-button"; }
134
138
  static get encapsulation() { return "scoped"; }
@@ -162,6 +166,24 @@ export class StzhButton {
162
166
  "reflect": false,
163
167
  "defaultValue": "\"\""
164
168
  },
169
+ "badgeType": {
170
+ "type": "string",
171
+ "mutable": false,
172
+ "complexType": {
173
+ "original": "\"default\" | \"success\" | \"warning\" | \"error\" | \"info\"",
174
+ "resolved": "\"default\" | \"error\" | \"info\" | \"success\" | \"warning\"",
175
+ "references": {}
176
+ },
177
+ "required": false,
178
+ "optional": false,
179
+ "docs": {
180
+ "tags": [],
181
+ "text": "Badge type"
182
+ },
183
+ "attribute": "badge-type",
184
+ "reflect": true,
185
+ "defaultValue": "\"default\""
186
+ },
165
187
  "badgePosition": {
166
188
  "type": "string",
167
189
  "mutable": false,
@@ -180,6 +202,24 @@ export class StzhButton {
180
202
  "reflect": true,
181
203
  "defaultValue": "\"button\""
182
204
  },
205
+ "badgeEmpty": {
206
+ "type": "boolean",
207
+ "mutable": false,
208
+ "complexType": {
209
+ "original": "boolean",
210
+ "resolved": "boolean",
211
+ "references": {}
212
+ },
213
+ "required": false,
214
+ "optional": false,
215
+ "docs": {
216
+ "tags": [],
217
+ "text": "Whether badge should be displayed empty"
218
+ },
219
+ "attribute": "badge-empty",
220
+ "reflect": true,
221
+ "defaultValue": "false"
222
+ },
183
223
  "fullwidth": {
184
224
  "type": "boolean",
185
225
  "mutable": false,
@@ -159,7 +159,6 @@
159
159
  border: var(--border);
160
160
  transition: box-shadow var(--stzh-base-transition-animation-speed);
161
161
  /* Interactive Subtitle */
162
- /* Type Alert */
163
162
  /* Collapsed (Header) */
164
163
  /* Starred */
165
164
  /** Hidden header / footer border */
@@ -230,19 +229,14 @@
230
229
  .stzh-card__header-right {
231
230
  padding-left: var(--stzh-space-xsmall);
232
231
  }
233
- @media screen and (min-width: 600px) {
234
- .stzh-card__header-right {
235
- padding-left: var(--stzh-space-small);
236
- }
237
- }
238
232
  @media screen and (min-width: 1024px) {
239
233
  .stzh-card__header-right {
240
- padding-left: var(--stzh-space-medium);
234
+ padding-left: var(--stzh-space-small);
241
235
  }
242
236
  }
243
237
  @media screen and (min-width: 1260px) {
244
238
  .stzh-card__header-right {
245
- padding-left: var(--stzh-space-large);
239
+ padding-left: var(--stzh-space-medium);
246
240
  }
247
241
  }
248
242
  .stzh-card__left {
@@ -373,12 +367,6 @@
373
367
  .stzh-card--has-subtitle-interactive .stzh-card__subtitle:hover, .stzh-card--has-subtitle-interactive .stzh-card__subtitle:focus {
374
368
  color: var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark));
375
369
  }
376
- .stzh-card--type-alert .stzh-card__subtitle {
377
- color: var(--stzh-color-error);
378
- }
379
- .stzh-card--type-alert .stzh-card__subtitle:hover, .stzh-card--type-alert .stzh-card__subtitle:focus {
380
- color: var(--stzh-color-error);
381
- }
382
370
  .stzh-card--is-collapsed .hide-when-collapsed, .stzh-card--has-collapsed-header .stzh-card__header .hide-when-collapsed {
383
371
  display: none;
384
372
  }
@@ -13,7 +13,10 @@ export class StzhCard {
13
13
  this.collapsed = false;
14
14
  /** Whether card was starred */
15
15
  this.starred = false;
16
- /** Whether card star is displayed */
16
+ /**
17
+ * Whether card star is displayed (with tooltip and menu-item in mobile popover).
18
+ * The tooltip / menu-item text can be adjusted in the translations file (`actionAdd` & `actionRemove`).
19
+ */
17
20
  this.starrable = false;
18
21
  /** Whether card is selectable */
19
22
  this.selectable = false;
@@ -32,13 +35,18 @@ export class StzhCard {
32
35
  this._subtitles = [];
33
36
  /** Card header actions */
34
37
  this.headerActions = [];
35
- /** Card footer actions */
38
+ /**
39
+ * Card footer actions.
40
+ * The [`stzh-actionset`](?path=/story/components-actionset) component is used internally.
41
+ * You can listen to clicks with the `stzhActionClick` event.
42
+ */
36
43
  this.footerActions = [];
37
44
  /** Whether subtitle should be rendered as button and event `stzhSubtitleClick` executed on click */
38
45
  this.subtitleInteractive = false;
39
- /** Type */
40
- this.type = "default";
41
- /** Whether sorting should be disabled */
46
+ /**
47
+ * Whether sorting should be disabled.
48
+ * Has no effect if card is not inside a `card-list` element, which has `sortableEnabled` property set to true.
49
+ */
42
50
  this.sortableDisabled = false;
43
51
  /** Whether card is collapsible */
44
52
  this.collapsible = false;
@@ -46,7 +54,10 @@ export class StzhCard {
46
54
  this.hideHeaderBorder = false;
47
55
  /** Whether to hide footer separation border */
48
56
  this.hideFooterBorder = false;
49
- /** Whether movement menu items should be shown */
57
+ /**
58
+ * Whether movement menu items should be shown.
59
+ * Has no effect if card is not inside a `card-list` element, which has `sortableEnabled` property set to true.
60
+ */
50
61
  this.hideMovementActions = false;
51
62
  this.nodeChange = (entries) => {
52
63
  let changeInSlot = false;
@@ -147,7 +158,6 @@ export class StzhCard {
147
158
  };
148
159
  this.handleSelectionChange = (event) => {
149
160
  this.checked = event.detail.checked;
150
- console.log(this.element, this.checked);
151
161
  };
152
162
  }
153
163
  handleResize() {
@@ -242,8 +252,7 @@ export class StzhCard {
242
252
  "stzh-card--has-hidden-footer-border": this.hideFooterBorder,
243
253
  "stzh-card--is-collapsed": this.collapsed,
244
254
  "stzh-card--is-starred": this.starred,
245
- "stzh-card--is-checked": this.checked,
246
- [`stzh-card--type-${this.type}`]: !!this.type,
255
+ "stzh-card--is-checked": this.checked
247
256
  };
248
257
  const Subtitle = `${this.subtitleInteractive ? 'button' : 'span'}`;
249
258
  const sortableChildElement = this.findSortableChildElement();
@@ -253,6 +262,11 @@ export class StzhCard {
253
262
  const isLastItemInSortable = (sortableChildElement === null || sortableChildElement === void 0 ? void 0 : sortableChildElement.parentElement)
254
263
  && Array.from((_b = sortableChildElement === null || sortableChildElement === void 0 ? void 0 : sortableChildElement.parentElement) === null || _b === void 0 ? void 0 : _b.children)
255
264
  .indexOf(sortableChildElement) === ((_c = sortableChildElement === null || sortableChildElement === void 0 ? void 0 : sortableChildElement.parentElement) === null || _c === void 0 ? void 0 : _c.children.length) - 1;
265
+ const sortableActionsEnabled = !this.sortableDisabled
266
+ && !this.hideMovementActions
267
+ && this.sortable
268
+ && !this.sortable.disabled;
269
+ const nonCollapsingTextHeaderActions = this._headerActions.filter(action => !action.onlyCollapseText);
256
270
  // const headerActions = [
257
271
  // ...this._headerActions
258
272
  // ];
@@ -263,15 +277,19 @@ export class StzhCard {
263
277
  "show-medium": !action.onlyCollapseText,
264
278
  "hide-when-collapsed": !action.onlyCollapseText,
265
279
  "hide-text-when-collapsed": action.onlyCollapseText
266
- }, icon: action.icon, badge: action.badge, variant: "tertiary", size: "tiny", badgePosition: "icon", onClick: () => { this.actionClick(action); } }, h("span", { class: {
280
+ }, icon: action.icon, badge: action.badge, badgeEmpty: action.badgeEmpty, badgeType: action.badgeType, variant: "tertiary", size: "tiny", badgePosition: "icon", onClick: () => { this.actionClick(action); } }, h("span", { class: {
267
281
  "show-medium": action.onlyCollapseText,
268
282
  "hide-when-collapsed": action.onlyCollapseText
269
283
  } }, action.label)))), this.starrable &&
270
- h("stzh-tooltip", null, h("stzh-button", { class: "stzh-card__card-action is-star", icon: this.starred ? "star-filled" : "star", variant: "tertiary", size: "tiny", iconOnly: true, onClick: this.starToggleClick }), h("div", { slot: "content" }, this.starred ? this.localization.actionRemove : this.localization.actionAdd)), h("stzh-popover", { label: this.localization.actionsPopoverLabel, placement: "bottom-end", class: "stzh-card__card-action-popover" }, h("stzh-button", { class: "stzh-card__card-action is-further", variant: "tertiary", size: "tiny", icon: "more-vertical", iconOnly: true }), h("stzh-menu", { slot: "content" }, this.starrable &&
271
- h("stzh-menu-item", { icon: this.starred ? "star-filled" : "star", onClick: this.starToggleClick }, this.starred ? this.localization.actionRemove : this.localization.actionAdd), this._headerActions.filter(action => !action.onlyCollapseText).map(action => (h("stzh-menu-item", { class: "hide-medium show-when-collapsed", icon: action.icon, badge: action.badge, onClick: () => { this.actionClick(action); } }, action.label))), (!this.sortableDisabled && !this.hideMovementActions && this.sortable && !this.sortable.disabled) &&
272
- h(Fragment, null, !isFirstItemInSortable &&
273
- h("stzh-menu-item", { icon: "arrow-up", onClick: this.arrowUpClick }, this.localization.actionMoveUp), !isLastItemInSortable &&
274
- h("stzh-menu-item", { icon: "arrow-down", onClick: this.arrowDownClick }, this.localization.actionMoveDown))))))), h("div", { class: "stzh-card__header-meta" }, h("slot", { name: "meta" }))), h("div", { class: "stzh-card__content hide-when-collapsed" }, h("slot", { name: "content" })), h("div", { class: "stzh-card__footer hide-when-collapsed" }, this._footerActions.length > 0 &&
284
+ h("stzh-tooltip", null, h("stzh-button", { class: "stzh-card__card-action is-star", icon: this.starred ? "star-filled" : "star", variant: "tertiary", size: "tiny", iconOnly: true, onClick: this.starToggleClick }), h("div", { slot: "content" }, this.starred ? this.localization.actionRemove : this.localization.actionAdd)), (nonCollapsingTextHeaderActions.length > 0 || this.starrable || sortableActionsEnabled) &&
285
+ h("stzh-popover", { label: this.localization.actionsPopoverLabel, placement: "bottom-end", class: {
286
+ "stzh-card__card-action-popover": true,
287
+ "hide-medium show-when-collapsed": !this.starrable && !sortableActionsEnabled
288
+ } }, h("stzh-button", { class: "stzh-card__card-action is-further", variant: "tertiary", size: "tiny", icon: "more-vertical", iconOnly: true }), h("stzh-menu", { slot: "content" }, this.starrable &&
289
+ h("stzh-menu-item", { icon: this.starred ? "star-filled" : "star", onClick: this.starToggleClick }, this.starred ? this.localization.actionRemove : this.localization.actionAdd), nonCollapsingTextHeaderActions.map(action => (h("stzh-menu-item", { class: "hide-medium show-when-collapsed", icon: action.icon, badge: action.badge, badgeEmpty: action.badgeEmpty, badgeType: action.badgeType, onClick: () => { this.actionClick(action); } }, action.label))), sortableActionsEnabled &&
290
+ h(Fragment, null, !isFirstItemInSortable &&
291
+ h("stzh-menu-item", { icon: "arrow-up", onClick: this.arrowUpClick }, this.localization.actionMoveUp), !isLastItemInSortable &&
292
+ h("stzh-menu-item", { icon: "arrow-down", onClick: this.arrowDownClick }, this.localization.actionMoveDown))))))), h("div", { class: "stzh-card__header-meta" }, h("slot", { name: "meta" }))), h("div", { class: "stzh-card__content hide-when-collapsed" }, h("slot", { name: "content" })), h("div", { class: "stzh-card__footer hide-when-collapsed" }, this._footerActions.length > 0 &&
275
293
  h("stzh-actionset", { actions: this._footerActions }), this.selectable &&
276
294
  h("stzh-button", { fullwidth: true, type: "radio", variant: "secondary", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, label: this.localization.select, onStzhChange: this.handleSelectionChange }))))));
277
295
  }
@@ -357,7 +375,7 @@ export class StzhCard {
357
375
  "optional": false,
358
376
  "docs": {
359
377
  "tags": [],
360
- "text": "Whether card star is displayed"
378
+ "text": "Whether card star is displayed (with tooltip and menu-item in mobile popover).\nThe tooltip / menu-item text can be adjusted in the translations file (`actionAdd` & `actionRemove`)."
361
379
  },
362
380
  "attribute": "starrable",
363
381
  "reflect": true,
@@ -529,7 +547,7 @@ export class StzhCard {
529
547
  "optional": false,
530
548
  "docs": {
531
549
  "tags": [],
532
- "text": "Card footer actions"
550
+ "text": "Card footer actions.\nThe [`stzh-actionset`](?path=/story/components-actionset) component is used internally.\nYou can listen to clicks with the `stzhActionClick` event."
533
551
  },
534
552
  "attribute": "footer-actions",
535
553
  "reflect": false,
@@ -553,24 +571,6 @@ export class StzhCard {
553
571
  "reflect": false,
554
572
  "defaultValue": "false"
555
573
  },
556
- "type": {
557
- "type": "string",
558
- "mutable": false,
559
- "complexType": {
560
- "original": "\"default\" | \"alert\"",
561
- "resolved": "\"alert\" | \"default\"",
562
- "references": {}
563
- },
564
- "required": false,
565
- "optional": false,
566
- "docs": {
567
- "tags": [],
568
- "text": "Type"
569
- },
570
- "attribute": "type",
571
- "reflect": true,
572
- "defaultValue": "\"default\""
573
- },
574
574
  "sortableDisabled": {
575
575
  "type": "boolean",
576
576
  "mutable": false,
@@ -583,7 +583,7 @@ export class StzhCard {
583
583
  "optional": false,
584
584
  "docs": {
585
585
  "tags": [],
586
- "text": "Whether sorting should be disabled"
586
+ "text": "Whether sorting should be disabled.\nHas no effect if card is not inside a `card-list` element, which has `sortableEnabled` property set to true."
587
587
  },
588
588
  "attribute": "sortable-disabled",
589
589
  "reflect": true,
@@ -655,7 +655,7 @@ export class StzhCard {
655
655
  "optional": false,
656
656
  "docs": {
657
657
  "tags": [],
658
- "text": "Whether movement menu items should be shown"
658
+ "text": "Whether movement menu items should be shown.\nHas no effect if card is not inside a `card-list` element, which has `sortableEnabled` property set to true."
659
659
  },
660
660
  "attribute": "hide-movement-actions",
661
661
  "reflect": false,
@@ -102,16 +102,13 @@ export const Default = Template.bind({});
102
102
  Default.args = {
103
103
  heading: 'Lorem ipsum',
104
104
  subtitle: 'Dolor si',
105
- status: {
106
- label: 'Test'
107
- },
108
105
  'header-actions': headerActions,
109
106
  'footer-actions': `[
110
107
  {
111
108
  "id": "action-1",
112
109
  "icon": "arrow-right",
113
110
  "label": "Lorem",
114
- "variant": "primary",
111
+ "variant": "default",
115
112
  "iconPosition": "right"
116
113
  }
117
114
  ]`
@@ -9,27 +9,10 @@ export class StzhCardList {
9
9
  constructor() {
10
10
  /** Whether collapse/expand toggle link */
11
11
  this.showToggleLink = false;
12
- /** Whether sorting should be disabled */
13
- this.sortableDisabled = false;
12
+ /** Whether sorting should be enabled */
13
+ this.sortableEnabled = false;
14
14
  /** HTML attribute that is used by the `toArray()` of sortable method */
15
15
  this.sortableDataIdAttribute = "data-id";
16
- /** Algorithm how the ghost element will be cloned */
17
- this.sortableGhostClone = (dragElement) => {
18
- const [clonedElement, clonedStzhElement, originalStzhElement] = cloneElement(dragElement);
19
- if (clonedStzhElement
20
- && originalStzhElement
21
- && clonedStzhElement.tagName.toLowerCase() === "stzh-card") {
22
- const clonedStzhElementCard = clonedStzhElement;
23
- const originalStzhElementCard = originalStzhElement;
24
- // copy every property that is not reflected to its attribute
25
- clonedStzhElementCard.heading = originalStzhElementCard.heading;
26
- clonedStzhElementCard.subtitle = originalStzhElementCard.subtitle;
27
- clonedStzhElementCard.headerActions = originalStzhElementCard.headerActions;
28
- clonedStzhElementCard.footerActions = originalStzhElementCard.footerActions;
29
- clonedStzhElementCard.hideMovementActions = originalStzhElementCard.hideMovementActions;
30
- }
31
- return clonedElement;
32
- };
33
16
  this.allCollapsed = false;
34
17
  this.collapseClick = () => {
35
18
  const cards = Array.from(this.element.querySelectorAll("stzh-card"));
@@ -48,6 +31,22 @@ export class StzhCardList {
48
31
  const cards = Array.from(this.element.querySelectorAll("stzh-card"));
49
32
  this.allCollapsed = !cards.some(card => !card.collapsed);
50
33
  };
34
+ this.sortableGhostClone = (dragElement) => {
35
+ const [clonedElement, clonedStzhElement, originalStzhElement] = cloneElement(dragElement);
36
+ if (clonedStzhElement
37
+ && originalStzhElement
38
+ && clonedStzhElement.tagName.toLowerCase() === "stzh-card") {
39
+ const clonedStzhElementCard = clonedStzhElement;
40
+ const originalStzhElementCard = originalStzhElement;
41
+ // copy every property that is not reflected to its attribute
42
+ clonedStzhElementCard.heading = originalStzhElementCard.heading;
43
+ clonedStzhElementCard.subtitle = originalStzhElementCard.subtitle;
44
+ clonedStzhElementCard.headerActions = originalStzhElementCard.headerActions;
45
+ clonedStzhElementCard.footerActions = originalStzhElementCard.footerActions;
46
+ clonedStzhElementCard.hideMovementActions = originalStzhElementCard.hideMovementActions;
47
+ }
48
+ return clonedElement;
49
+ };
51
50
  }
52
51
  collapseListener() {
53
52
  this.updateCollapsedState();
@@ -65,7 +64,7 @@ export class StzhCardList {
65
64
  "stzh-card-list": true
66
65
  };
67
66
  return (h(Host, null, h("div", { class: classes }, h("div", { class: "stzh-card-list__header" }, h("div", { class: "stzh-card-list__description" }, h("slot", { name: "description" })), this.showToggleLink &&
68
- h("stzh-link", { class: "stzh-card-list__switch", icon: this.allCollapsed ? "list-expanded" : "list-shrinked", label: this.allCollapsed ? this.localization.expandAll : this.localization.collapseAll, onClick: this.collapseClick })), h("stzh-sortable", { disabled: this.sortableDisabled, dataIdAttribute: this.sortableDataIdAttribute, ghostClone: this.sortableGhostClone }, h("div", { class: "stzh-card-list__cards", role: "list" }, h("slot", null))))));
67
+ h("stzh-link", { class: "stzh-card-list__switch", icon: this.allCollapsed ? "list-expanded" : "list-shrinked", label: this.allCollapsed ? this.localization.expandAll : this.localization.collapseAll, onClick: this.collapseClick })), h("stzh-sortable", { disabled: !this.sortableEnabled, dataIdAttribute: this.sortableDataIdAttribute, ghostClone: this.sortableGhostClone }, h("div", { class: "stzh-card-list__cards", role: "list" }, h("slot", null))))));
69
68
  }
70
69
  static get is() { return "stzh-card-list"; }
71
70
  static get encapsulation() { return "scoped"; }
@@ -119,7 +118,7 @@ export class StzhCardList {
119
118
  "reflect": true,
120
119
  "defaultValue": "false"
121
120
  },
122
- "sortableDisabled": {
121
+ "sortableEnabled": {
123
122
  "type": "boolean",
124
123
  "mutable": false,
125
124
  "complexType": {
@@ -131,9 +130,9 @@ export class StzhCardList {
131
130
  "optional": false,
132
131
  "docs": {
133
132
  "tags": [],
134
- "text": "Whether sorting should be disabled"
133
+ "text": "Whether sorting should be enabled"
135
134
  },
136
- "attribute": "sortable-disabled",
135
+ "attribute": "sortable-enabled",
137
136
  "reflect": false,
138
137
  "defaultValue": "false"
139
138
  },
@@ -154,32 +153,6 @@ export class StzhCardList {
154
153
  "attribute": "sortable-data-id-attribute",
155
154
  "reflect": false,
156
155
  "defaultValue": "\"data-id\""
157
- },
158
- "sortableGhostClone": {
159
- "type": "unknown",
160
- "mutable": false,
161
- "complexType": {
162
- "original": "Function",
163
- "resolved": "Function",
164
- "references": {
165
- "Function": {
166
- "location": "global"
167
- },
168
- "HTMLElement": {
169
- "location": "global"
170
- },
171
- "HTMLStzhCardElement": {
172
- "location": "global"
173
- }
174
- }
175
- },
176
- "required": false,
177
- "optional": false,
178
- "docs": {
179
- "tags": [],
180
- "text": "Algorithm how the ghost element will be cloned"
181
- },
182
- "defaultValue": "(dragElement: HTMLElement) => {\n const [clonedElement, clonedStzhElement, originalStzhElement] = cloneElement(dragElement);\n\n if (\n clonedStzhElement\n && originalStzhElement\n && clonedStzhElement.tagName.toLowerCase() === \"stzh-card\"\n ) {\n const clonedStzhElementCard: HTMLStzhCardElement = clonedStzhElement as HTMLStzhCardElement;\n const originalStzhElementCard: HTMLStzhCardElement = originalStzhElement as HTMLStzhCardElement;\n\n // copy every property that is not reflected to its attribute\n clonedStzhElementCard.heading = originalStzhElementCard.heading;\n clonedStzhElementCard.subtitle = originalStzhElementCard.subtitle;\n clonedStzhElementCard.headerActions = originalStzhElementCard.headerActions;\n clonedStzhElementCard.footerActions = originalStzhElementCard.footerActions;\n clonedStzhElementCard.hideMovementActions = originalStzhElementCard.hideMovementActions;\n }\n\n return clonedElement;\n }"
183
156
  }
184
157
  };
185
158
  }
@@ -116,7 +116,7 @@ const Template = (args) => (
116
116
  <stzh-card collapsible starrable heading="Lorem ipsum 3" subtitle="Dolor si 3" footer-actions={actions2}>
117
117
  <div slot="content">Content</div>
118
118
  </stzh-card>
119
- <stzh-card collapsible starrable heading="Lorem ipsum 4">
119
+ <stzh-card collapsible heading="Lorem ipsum 4">
120
120
  <stzh-cspace slot="content">
121
121
  <p>Content with Input:</p>
122
122
  <stzh-input></stzh-input>
@@ -128,5 +128,5 @@ const Template = (args) => (
128
128
 
129
129
  export const Default = Template.bind({});
130
130
  Default.args = {
131
- 'show-toggle-Link': true
131
+ 'show-toggle-link': true
132
132
  };
@@ -27,6 +27,8 @@ export class StzhChip {
27
27
  this.disabled = false;
28
28
  /** Invert (only available for tag variant) */
29
29
  this.invert = false;
30
+ /** Id for element which describes the button */
31
+ this.a11yDescribedby = "";
30
32
  this.onFocus = (event) => {
31
33
  const focusEvent = new FocusEvent("focus", {
32
34
  view: window,
@@ -80,7 +82,7 @@ export class StzhChip {
80
82
  [`stzh-chip--${this.variant}`]: !!this.variant
81
83
  };
82
84
  return (h(Host, null, h("div", { class: classes }, this.removable &&
83
- h("button", { class: "stzh-chip__remove", onClick: this.onRemoveClick, disabled: this.disabled, "aria-label": this.removeLabel, type: "button" }, h("stzh-icon", { class: "stzh-chip__remove-icon", name: "close" })), h("button", { class: "stzh-chip__button", onClick: this.onClick, onFocus: this.onFocus, onBlur: this.onBlur, disabled: this.disabled, type: "button" }, h("div", { class: "stzh-chip__icon-wrapper" }, this.icon ?
85
+ h("button", { class: "stzh-chip__remove", onClick: this.onRemoveClick, disabled: this.disabled, "aria-label": this.removeLabel, type: "button" }, h("stzh-icon", { class: "stzh-chip__remove-icon", name: "close" })), h("button", { class: "stzh-chip__button", onClick: this.onClick, onFocus: this.onFocus, onBlur: this.onBlur, disabled: this.disabled, type: "button", "aria-label": this.a11yLabel, "aria-describedby": this.a11yDescribedby }, h("div", { class: "stzh-chip__icon-wrapper" }, this.icon ?
84
86
  h("stzh-icon", { class: "stzh-chip__icon", name: this.icon })
85
87
  :
86
88
  h("slot", { name: "icon" })), h("div", { class: "stzh-chip__label" }, this.label ? this.label : h("slot", null)), this.counter &&
@@ -297,6 +299,41 @@ export class StzhChip {
297
299
  "attribute": "invert",
298
300
  "reflect": true,
299
301
  "defaultValue": "false"
302
+ },
303
+ "a11yLabel": {
304
+ "type": "string",
305
+ "mutable": false,
306
+ "complexType": {
307
+ "original": "string",
308
+ "resolved": "string",
309
+ "references": {}
310
+ },
311
+ "required": false,
312
+ "optional": false,
313
+ "docs": {
314
+ "tags": [],
315
+ "text": "Accessible label for screen readers to replace visible text"
316
+ },
317
+ "attribute": "a11y-label",
318
+ "reflect": false
319
+ },
320
+ "a11yDescribedby": {
321
+ "type": "string",
322
+ "mutable": false,
323
+ "complexType": {
324
+ "original": "string",
325
+ "resolved": "string",
326
+ "references": {}
327
+ },
328
+ "required": false,
329
+ "optional": false,
330
+ "docs": {
331
+ "tags": [],
332
+ "text": "Id for element which describes the button"
333
+ },
334
+ "attribute": "a11y-describedby",
335
+ "reflect": false,
336
+ "defaultValue": "\"\""
300
337
  }
301
338
  };
302
339
  }