@zanichelli/albe-web-components 18.7.7 → 18.8.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 (482) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/index-96af6326.js +4 -0
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/web-components-library.cjs.js +1 -1
  5. package/dist/cjs/z-alert.cjs.entry.js +1 -1
  6. package/dist/cjs/z-app-header_12.cjs.entry.js +6 -6
  7. package/dist/cjs/z-book-card.cjs.entry.js +15 -14
  8. package/dist/cjs/z-book-card.cjs.entry.js.map +1 -1
  9. package/dist/{components/placeholder-cover.js → cjs/z-book-cover.cjs.entry.js} +26 -2
  10. package/dist/cjs/z-book-cover.cjs.entry.js.map +1 -0
  11. package/dist/cjs/z-breadcrumb.cjs.entry.js +2 -2
  12. package/dist/cjs/z-button-sort.cjs.entry.js +1 -1
  13. package/dist/cjs/z-chip.cjs.entry.js +2 -2
  14. package/dist/cjs/z-combobox.cjs.entry.js +1 -1
  15. package/dist/cjs/z-cover-hero.cjs.entry.js +2 -2
  16. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +4 -4
  17. package/dist/cjs/z-ghost-loading.cjs.entry.js +1 -1
  18. package/dist/cjs/z-info-box.cjs.entry.js +1 -1
  19. package/dist/cjs/z-info-reveal.cjs.entry.js +1 -1
  20. package/dist/cjs/z-logo.cjs.entry.js +1 -1
  21. package/dist/cjs/z-myz-card-alert.cjs.entry.js +1 -1
  22. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
  23. package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +1 -1
  24. package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -1
  25. package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
  26. package/dist/cjs/z-myz-card-info.cjs.entry.js +1 -1
  27. package/dist/cjs/z-myz-card-list.cjs.entry.js +1 -1
  28. package/dist/cjs/z-myz-card_4.cjs.entry.js +4 -4
  29. package/dist/cjs/z-myz-list-item.cjs.entry.js +1 -1
  30. package/dist/cjs/z-myz-list.cjs.entry.js +1 -1
  31. package/dist/cjs/z-navigation-tabs.cjs.entry.js +2 -2
  32. package/dist/cjs/z-notification.cjs.entry.js +1 -1
  33. package/dist/cjs/z-otp.cjs.entry.js +2 -2
  34. package/dist/cjs/z-panel-elem.cjs.entry.js +2 -2
  35. package/dist/cjs/z-popover.cjs.entry.js +1 -1
  36. package/dist/cjs/z-result-card.cjs.entry.js +6 -14
  37. package/dist/cjs/z-result-card.cjs.entry.js.map +1 -1
  38. package/dist/cjs/z-select.cjs.entry.js +1 -1
  39. package/dist/cjs/z-skip-to-content.cjs.entry.js +1 -1
  40. package/dist/cjs/z-stepper-item.cjs.entry.js +1 -1
  41. package/dist/cjs/z-stepper.cjs.entry.js +1 -1
  42. package/dist/cjs/z-toast-notification-list.cjs.entry.js +1 -1
  43. package/dist/cjs/z-toast-notification.cjs.entry.js +1 -1
  44. package/dist/cjs/z-toggle-button.cjs.entry.js +2 -2
  45. package/dist/cjs/z-toggle-switch.cjs.entry.js +3 -3
  46. package/dist/cjs/z-tooltip.cjs.entry.js +1 -1
  47. package/dist/collection/collection-manifest.json +2 -1
  48. package/dist/collection/components/book-card/z-book-card/index.js +66 -29
  49. package/dist/collection/components/book-card/z-book-card/index.js.map +1 -1
  50. package/dist/collection/components/book-card/z-book-card/index.stories.js +11 -13
  51. package/dist/collection/components/book-card/z-book-card/index.stories.js.map +1 -1
  52. package/dist/collection/components/book-card/z-book-card/styles.css +35 -67
  53. package/dist/collection/components/z-book-cover/index.js +113 -0
  54. package/dist/collection/components/z-book-cover/index.js.map +1 -0
  55. package/dist/collection/components/z-book-cover/index.stories.js +31 -0
  56. package/dist/collection/components/z-book-cover/index.stories.js.map +1 -0
  57. package/dist/collection/components/z-book-cover/styles.css +95 -0
  58. package/dist/collection/components/z-breadcrumb/index.js +2 -2
  59. package/dist/collection/components/z-button-sort/index.js +1 -1
  60. package/dist/collection/components/z-chip/index.js +2 -2
  61. package/dist/collection/components/z-combobox/index.js +1 -1
  62. package/dist/collection/components/z-cover-hero/index.js +2 -2
  63. package/dist/collection/components/z-divider/index.js +1 -1
  64. package/dist/collection/components/z-ghost-loading/index.js +1 -1
  65. package/dist/collection/components/z-info-box/index.js +1 -1
  66. package/dist/collection/components/z-info-reveal/index.js +1 -1
  67. package/dist/collection/components/z-input/index.js +1 -1
  68. package/dist/collection/components/z-input-message/index.js +1 -1
  69. package/dist/collection/components/z-logo/index.js +1 -1
  70. package/dist/collection/components/z-modal/index.js +4 -4
  71. package/dist/collection/components/z-navigation-tabs/index.js +2 -2
  72. package/dist/collection/components/z-notification/index.js +1 -1
  73. package/dist/collection/components/z-offcanvas/index.js +2 -2
  74. package/dist/collection/components/z-panel-elem/index.js +2 -2
  75. package/dist/collection/components/z-popover/index.js +1 -1
  76. package/dist/collection/components/{result-card/z-result-card → z-result-card}/index.js +10 -18
  77. package/dist/collection/components/z-result-card/index.js.map +1 -0
  78. package/dist/collection/components/{result-card/z-result-card → z-result-card}/styles.css +39 -108
  79. package/dist/collection/components/z-result-card/z-result-card.stories.js.map +1 -0
  80. package/dist/collection/components/z-searchbar/index.js +1 -1
  81. package/dist/collection/components/z-select/index.js +1 -1
  82. package/dist/collection/components/z-skip-to-content/index.js +1 -1
  83. package/dist/collection/components/z-stepper/index.js +1 -1
  84. package/dist/collection/components/z-stepper-item/index.js +1 -1
  85. package/dist/collection/components/z-toast-notification/index.js +1 -1
  86. package/dist/collection/components/z-toast-notification-list/index.js +1 -1
  87. package/dist/collection/components/z-toggle-button/index.js +2 -2
  88. package/dist/collection/components/z-toggle-switch/index.js +3 -3
  89. package/dist/collection/components/z-tooltip/index.js +1 -1
  90. package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +1 -1
  91. package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +1 -1
  92. package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +1 -1
  93. package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +1 -1
  94. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
  95. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -1
  96. package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +1 -1
  97. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
  98. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +1 -1
  99. package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
  100. package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
  101. package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
  102. package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +1 -1
  103. package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
  104. package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
  105. package/dist/components/index.d.ts +3 -1
  106. package/dist/components/index.js +1 -0
  107. package/dist/components/index.js.map +1 -1
  108. package/dist/components/index10.js +24 -65
  109. package/dist/components/index10.js.map +1 -1
  110. package/dist/components/index11.js +58 -306
  111. package/dist/components/index11.js.map +1 -1
  112. package/dist/components/index12.js +311 -37
  113. package/dist/components/index12.js.map +1 -1
  114. package/dist/components/index13.js +40 -27
  115. package/dist/components/index13.js.map +1 -1
  116. package/dist/components/index14.js +23 -151
  117. package/dist/components/index14.js.map +1 -1
  118. package/dist/components/index15.js +144 -37
  119. package/dist/components/index15.js.map +1 -1
  120. package/dist/components/index16.js +42 -1008
  121. package/dist/components/index16.js.map +1 -1
  122. package/dist/components/index17.js +1012 -37
  123. package/dist/components/index17.js.map +1 -1
  124. package/dist/components/index18.js +42 -10
  125. package/dist/components/index18.js.map +1 -1
  126. package/dist/components/index19.js +10 -22
  127. package/dist/components/index19.js.map +1 -1
  128. package/dist/components/index20.js +16 -33
  129. package/dist/components/index20.js.map +1 -1
  130. package/dist/components/index21.js +39 -43
  131. package/dist/components/index21.js.map +1 -1
  132. package/dist/components/index22.js +44 -84
  133. package/dist/components/index22.js.map +1 -1
  134. package/dist/components/index23.js +60 -430
  135. package/dist/components/index23.js.map +1 -1
  136. package/dist/components/index24.js +415 -341
  137. package/dist/components/index24.js.map +1 -1
  138. package/dist/components/index25.js +376 -19
  139. package/dist/components/index25.js.map +1 -1
  140. package/dist/components/index26.js +45 -0
  141. package/dist/components/index26.js.map +1 -0
  142. package/dist/components/index3.js +1 -1
  143. package/dist/components/index4.js +23 -60
  144. package/dist/components/index4.js.map +1 -1
  145. package/dist/components/index5.js +53 -27
  146. package/dist/components/index5.js.map +1 -1
  147. package/dist/components/index6.js +34 -18
  148. package/dist/components/index6.js.map +1 -1
  149. package/dist/components/index7.js +18 -41
  150. package/dist/components/index7.js.map +1 -1
  151. package/dist/components/index8.js +41 -11
  152. package/dist/components/index8.js.map +1 -1
  153. package/dist/components/index9.js +10 -28
  154. package/dist/components/index9.js.map +1 -1
  155. package/dist/components/z-accordion.js +1 -1
  156. package/dist/components/z-anchor-navigation.js +2 -2
  157. package/dist/components/z-app-header-deprecated.js +11 -11
  158. package/dist/components/z-app-header.js +11 -11
  159. package/dist/components/z-book-card-app.js +2 -2
  160. package/dist/components/z-book-card-deprecated.js +1 -1
  161. package/dist/components/z-book-card.js +26 -17
  162. package/dist/components/z-book-card.js.map +1 -1
  163. package/dist/components/z-book-cover.d.ts +11 -0
  164. package/dist/components/z-book-cover.js +8 -0
  165. package/dist/components/z-book-cover.js.map +1 -0
  166. package/dist/components/z-breadcrumb.js +8 -8
  167. package/dist/components/z-button-sort.js +2 -2
  168. package/dist/components/z-button.js +1 -1
  169. package/dist/components/z-card.js +1 -1
  170. package/dist/components/z-carousel.js +3 -3
  171. package/dist/components/z-chip.js +1 -1
  172. package/dist/components/z-combobox.js +7 -7
  173. package/dist/components/z-cover-hero.js +2 -2
  174. package/dist/components/z-date-picker.js +3 -3
  175. package/dist/components/z-divider.js +1 -1
  176. package/dist/components/z-dragdrop-area.js +1 -1
  177. package/dist/components/z-file-upload.js +4 -4
  178. package/dist/components/z-file.js +3 -3
  179. package/dist/components/z-ghost-loading.js +1 -1
  180. package/dist/components/z-icon.js +1 -1
  181. package/dist/components/z-info-box.js +2 -2
  182. package/dist/components/z-info-reveal.js +1 -1
  183. package/dist/components/z-input-message.js +1 -1
  184. package/dist/components/z-input.js +1 -1
  185. package/dist/components/z-list-element.js +1 -1
  186. package/dist/components/z-list-group.js +1 -1
  187. package/dist/components/z-list.js +1 -1
  188. package/dist/components/z-logo.js +1 -1
  189. package/dist/components/z-menu-deprecated.js +1 -1
  190. package/dist/components/z-menu-section-deprecated.js +1 -1
  191. package/dist/components/z-menu-section.js +1 -1
  192. package/dist/components/z-menu.js +1 -1
  193. package/dist/components/z-modal.js +1 -1
  194. package/dist/components/z-myz-card-alert.js +2 -2
  195. package/dist/components/z-myz-card-body.js +1 -1
  196. package/dist/components/z-myz-card-cover.js +1 -1
  197. package/dist/components/z-myz-card-dictionary.js +7 -7
  198. package/dist/components/z-myz-card-footer-sections.js +1 -1
  199. package/dist/components/z-myz-card-footer.js +1 -1
  200. package/dist/components/z-myz-card-header.js +1 -1
  201. package/dist/components/z-myz-card-icon.js +2 -2
  202. package/dist/components/z-myz-card-info.js +3 -3
  203. package/dist/components/z-myz-card-list.js +1 -1
  204. package/dist/components/z-myz-card.js +1 -1
  205. package/dist/components/z-myz-list-item.js +1 -1
  206. package/dist/components/z-myz-list.js +3 -3
  207. package/dist/components/z-navigation-tabs.js +3 -3
  208. package/dist/components/z-notification.js +2 -2
  209. package/dist/components/z-offcanvas.js +1 -1
  210. package/dist/components/z-otp.js +4 -4
  211. package/dist/components/z-pagination.js +4 -4
  212. package/dist/components/z-panel-elem.js +3 -3
  213. package/dist/components/z-popover.js +1 -1
  214. package/dist/components/z-range-picker.js +3 -3
  215. package/dist/components/z-result-card.js +14 -16
  216. package/dist/components/z-result-card.js.map +1 -1
  217. package/dist/components/z-searchbar.js +1 -1
  218. package/dist/components/z-section-title.js +1 -1
  219. package/dist/components/z-select.js +9 -9
  220. package/dist/components/z-skip-to-content.js +1 -1
  221. package/dist/components/z-slideshow.js +1 -1
  222. package/dist/components/z-stepper-item.js +2 -2
  223. package/dist/components/z-stepper.js +1 -1
  224. package/dist/components/z-table.js +1 -1
  225. package/dist/components/z-tag.js +1 -1
  226. package/dist/components/z-td.js +3 -3
  227. package/dist/components/z-th.js +3 -3
  228. package/dist/components/z-toast-notification-list.js +1 -1
  229. package/dist/components/z-toast-notification.js +2 -2
  230. package/dist/components/z-toggle-button.js +3 -3
  231. package/dist/components/z-toggle-switch.js +4 -4
  232. package/dist/components/z-tooltip.js +2 -2
  233. package/dist/components/z-tr.js +2 -2
  234. package/dist/components/z-tree-list.js +4 -4
  235. package/dist/esm/index-c8ceadeb.js +4 -0
  236. package/dist/esm/loader.js +1 -1
  237. package/dist/esm/web-components-library.js +1 -1
  238. package/dist/esm/z-alert.entry.js +1 -1
  239. package/dist/esm/z-app-header_12.entry.js +6 -6
  240. package/dist/esm/z-book-card.entry.js +15 -14
  241. package/dist/esm/z-book-card.entry.js.map +1 -1
  242. package/dist/{cjs/placeholder-cover-b679e768.js → esm/z-book-cover.entry.js} +21 -3
  243. package/dist/esm/z-book-cover.entry.js.map +1 -0
  244. package/dist/esm/z-breadcrumb.entry.js +2 -2
  245. package/dist/esm/z-button-sort.entry.js +1 -1
  246. package/dist/esm/z-chip.entry.js +2 -2
  247. package/dist/esm/z-combobox.entry.js +1 -1
  248. package/dist/esm/z-cover-hero.entry.js +2 -2
  249. package/dist/esm/z-dragdrop-area_2.entry.js +4 -4
  250. package/dist/esm/z-ghost-loading.entry.js +1 -1
  251. package/dist/esm/z-info-box.entry.js +1 -1
  252. package/dist/esm/z-info-reveal.entry.js +1 -1
  253. package/dist/esm/z-logo.entry.js +1 -1
  254. package/dist/esm/z-myz-card-alert.entry.js +1 -1
  255. package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
  256. package/dist/esm/z-myz-card-footer-sections.entry.js +1 -1
  257. package/dist/esm/z-myz-card-footer.entry.js +1 -1
  258. package/dist/esm/z-myz-card-icon.entry.js +1 -1
  259. package/dist/esm/z-myz-card-info.entry.js +1 -1
  260. package/dist/esm/z-myz-card-list.entry.js +1 -1
  261. package/dist/esm/z-myz-card_4.entry.js +4 -4
  262. package/dist/esm/z-myz-list-item.entry.js +1 -1
  263. package/dist/esm/z-myz-list.entry.js +1 -1
  264. package/dist/esm/z-navigation-tabs.entry.js +2 -2
  265. package/dist/esm/z-notification.entry.js +1 -1
  266. package/dist/esm/z-otp.entry.js +2 -2
  267. package/dist/esm/z-panel-elem.entry.js +2 -2
  268. package/dist/esm/z-popover.entry.js +1 -1
  269. package/dist/esm/z-result-card.entry.js +6 -14
  270. package/dist/esm/z-result-card.entry.js.map +1 -1
  271. package/dist/esm/z-select.entry.js +1 -1
  272. package/dist/esm/z-skip-to-content.entry.js +1 -1
  273. package/dist/esm/z-stepper-item.entry.js +1 -1
  274. package/dist/esm/z-stepper.entry.js +1 -1
  275. package/dist/esm/z-toast-notification-list.entry.js +1 -1
  276. package/dist/esm/z-toast-notification.entry.js +1 -1
  277. package/dist/esm/z-toggle-button.entry.js +2 -2
  278. package/dist/esm/z-toggle-switch.entry.js +3 -3
  279. package/dist/esm/z-tooltip.entry.js +1 -1
  280. package/dist/types/components/book-card/z-book-card/index.d.ts +20 -16
  281. package/dist/types/components/book-card/z-book-card/index.stories.d.ts +2 -35
  282. package/dist/types/components/z-book-cover/index.d.ts +23 -0
  283. package/dist/types/components/z-book-cover/index.stories.d.ts +21 -0
  284. package/dist/types/components/{result-card/z-result-card → z-result-card}/index.d.ts +8 -26
  285. package/dist/types/components.d.ts +145 -44
  286. package/dist/web-components-library/{p-17259f80.entry.js → p-01f941c2.entry.js} +2 -2
  287. package/{www/build/p-a4e26cad.entry.js → dist/web-components-library/p-028dd72a.entry.js} +2 -2
  288. package/{www/build/p-fef12692.entry.js → dist/web-components-library/p-0990d475.entry.js} +2 -2
  289. package/dist/web-components-library/{p-fa9c35b7.entry.js → p-0a49dd1c.entry.js} +2 -2
  290. package/dist/web-components-library/{p-7faf6680.entry.js → p-240de9aa.entry.js} +2 -2
  291. package/dist/web-components-library/p-28534fb5.entry.js +2 -0
  292. package/dist/web-components-library/{p-755e5bb3.entry.js → p-28d83c86.entry.js} +2 -2
  293. package/dist/web-components-library/{p-04f578d3.entry.js → p-2ffdfbb1.entry.js} +2 -2
  294. package/dist/web-components-library/p-31bd2a1c.entry.js +2 -0
  295. package/dist/web-components-library/p-31bd2a1c.entry.js.map +1 -0
  296. package/dist/web-components-library/{p-da6ba08a.entry.js → p-460b2068.entry.js} +2 -2
  297. package/dist/web-components-library/{p-bfa7b528.entry.js → p-46ea0b2e.entry.js} +2 -2
  298. package/{www/build/p-add09050.entry.js → dist/web-components-library/p-4a257653.entry.js} +2 -2
  299. package/{www/build/p-d3a51980.entry.js → dist/web-components-library/p-4aaf0172.entry.js} +2 -2
  300. package/dist/web-components-library/{p-22056263.entry.js → p-4affbb99.entry.js} +2 -2
  301. package/dist/web-components-library/{p-9f516be2.entry.js → p-5989465b.entry.js} +2 -2
  302. package/dist/web-components-library/{p-1775f79b.entry.js → p-5a1f98a2.entry.js} +2 -2
  303. package/dist/web-components-library/{p-a25c7fdb.entry.js → p-5c5882c6.entry.js} +2 -2
  304. package/dist/web-components-library/{p-a80faa78.entry.js → p-5f94986f.entry.js} +2 -2
  305. package/dist/web-components-library/p-6cff173f.entry.js +2 -0
  306. package/dist/web-components-library/p-6cffbabc.entry.js +2 -0
  307. package/{www/build/p-5f231799.entry.js.map → dist/web-components-library/p-6cffbabc.entry.js.map} +1 -1
  308. package/dist/web-components-library/{p-9e3116b0.entry.js → p-7194003a.entry.js} +2 -2
  309. package/{www/build/p-9de4915b.entry.js → dist/web-components-library/p-78146cef.entry.js} +2 -2
  310. package/dist/web-components-library/{p-f39f6ee8.entry.js → p-7a4f6a5b.entry.js} +2 -2
  311. package/dist/web-components-library/{p-945928ff.entry.js → p-7ceddb7a.entry.js} +2 -2
  312. package/dist/web-components-library/{p-50b800e6.entry.js → p-86160fe3.entry.js} +2 -2
  313. package/dist/web-components-library/{p-2105d5ec.entry.js → p-863fd1c4.entry.js} +2 -2
  314. package/dist/web-components-library/p-8fc213c2.entry.js +2 -0
  315. package/{www/build/p-b0f80e50.entry.js.map → dist/web-components-library/p-8fc213c2.entry.js.map} +1 -1
  316. package/dist/web-components-library/{p-70aa0b22.entry.js → p-943db3a8.entry.js} +2 -2
  317. package/dist/web-components-library/{p-6d2a6434.entry.js → p-94916bdf.entry.js} +2 -2
  318. package/dist/web-components-library/{p-8e5bc362.entry.js → p-a2e87cec.entry.js} +2 -2
  319. package/dist/web-components-library/{p-fe663393.entry.js → p-ac477ae7.entry.js} +2 -2
  320. package/dist/web-components-library/p-af5e8524.entry.js +2 -0
  321. package/dist/web-components-library/{p-fb78c343.entry.js → p-b3f1b5c1.entry.js} +2 -2
  322. package/dist/web-components-library/{p-6ebaa41d.entry.js → p-d60684d5.entry.js} +2 -2
  323. package/dist/web-components-library/{p-2264883d.entry.js → p-dc086eb5.entry.js} +2 -2
  324. package/dist/web-components-library/{p-f3287280.entry.js → p-e0b88075.entry.js} +2 -2
  325. package/dist/web-components-library/p-e4bb1256.entry.js +2 -0
  326. package/dist/web-components-library/p-e4bb1256.entry.js.map +1 -0
  327. package/dist/web-components-library/{p-7eb0e121.entry.js → p-f487290e.entry.js} +2 -2
  328. package/dist/web-components-library/p-f4bac89b.entry.js +2 -0
  329. package/dist/web-components-library/p-f4bac89b.entry.js.map +1 -0
  330. package/dist/web-components-library/web-components-library.esm.js +1 -1
  331. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  332. package/package.json +1 -1
  333. package/react/components.d.ts +1 -0
  334. package/react/components.js +3 -2
  335. package/react/components.js.map +1 -1
  336. package/www/build/{p-17259f80.entry.js → p-01f941c2.entry.js} +2 -2
  337. package/{dist/web-components-library/p-a4e26cad.entry.js → www/build/p-028dd72a.entry.js} +2 -2
  338. package/{dist/web-components-library/p-fef12692.entry.js → www/build/p-0990d475.entry.js} +2 -2
  339. package/www/build/{p-fa9c35b7.entry.js → p-0a49dd1c.entry.js} +2 -2
  340. package/www/build/{p-7faf6680.entry.js → p-240de9aa.entry.js} +2 -2
  341. package/www/build/p-28534fb5.entry.js +2 -0
  342. package/www/build/{p-755e5bb3.entry.js → p-28d83c86.entry.js} +2 -2
  343. package/www/build/{p-04f578d3.entry.js → p-2ffdfbb1.entry.js} +2 -2
  344. package/www/build/p-31bd2a1c.entry.js +2 -0
  345. package/www/build/p-31bd2a1c.entry.js.map +1 -0
  346. package/www/build/{p-da6ba08a.entry.js → p-460b2068.entry.js} +2 -2
  347. package/www/build/{p-bfa7b528.entry.js → p-46ea0b2e.entry.js} +2 -2
  348. package/{dist/web-components-library/p-add09050.entry.js → www/build/p-4a257653.entry.js} +2 -2
  349. package/{dist/web-components-library/p-d3a51980.entry.js → www/build/p-4aaf0172.entry.js} +2 -2
  350. package/www/build/{p-22056263.entry.js → p-4affbb99.entry.js} +2 -2
  351. package/www/build/{p-9f516be2.entry.js → p-5989465b.entry.js} +2 -2
  352. package/www/build/{p-1775f79b.entry.js → p-5a1f98a2.entry.js} +2 -2
  353. package/www/build/{p-a25c7fdb.entry.js → p-5c5882c6.entry.js} +2 -2
  354. package/www/build/{p-a80faa78.entry.js → p-5f94986f.entry.js} +2 -2
  355. package/www/build/p-6cff173f.entry.js +2 -0
  356. package/www/build/p-6cffbabc.entry.js +2 -0
  357. package/{dist/web-components-library/p-5f231799.entry.js.map → www/build/p-6cffbabc.entry.js.map} +1 -1
  358. package/www/build/{p-9e3116b0.entry.js → p-7194003a.entry.js} +2 -2
  359. package/{dist/web-components-library/p-9de4915b.entry.js → www/build/p-78146cef.entry.js} +2 -2
  360. package/www/build/{p-f39f6ee8.entry.js → p-7a4f6a5b.entry.js} +2 -2
  361. package/www/build/{p-945928ff.entry.js → p-7ceddb7a.entry.js} +2 -2
  362. package/www/build/{p-50b800e6.entry.js → p-86160fe3.entry.js} +2 -2
  363. package/www/build/{p-2105d5ec.entry.js → p-863fd1c4.entry.js} +2 -2
  364. package/www/build/p-8fc213c2.entry.js +2 -0
  365. package/{dist/web-components-library/p-b0f80e50.entry.js.map → www/build/p-8fc213c2.entry.js.map} +1 -1
  366. package/www/build/{p-70aa0b22.entry.js → p-943db3a8.entry.js} +2 -2
  367. package/www/build/{p-6d2a6434.entry.js → p-94916bdf.entry.js} +2 -2
  368. package/www/build/{p-8e5bc362.entry.js → p-a2e87cec.entry.js} +2 -2
  369. package/www/build/{p-fe663393.entry.js → p-ac477ae7.entry.js} +2 -2
  370. package/www/build/p-af5e8524.entry.js +2 -0
  371. package/www/build/{p-fb78c343.entry.js → p-b3f1b5c1.entry.js} +2 -2
  372. package/www/build/p-b716b49c.js +2 -0
  373. package/www/build/{p-6ebaa41d.entry.js → p-d60684d5.entry.js} +2 -2
  374. package/www/build/{p-2264883d.entry.js → p-dc086eb5.entry.js} +2 -2
  375. package/www/build/{p-f3287280.entry.js → p-e0b88075.entry.js} +2 -2
  376. package/www/build/p-e4bb1256.entry.js +2 -0
  377. package/www/build/p-e4bb1256.entry.js.map +1 -0
  378. package/www/build/{p-7eb0e121.entry.js → p-f487290e.entry.js} +2 -2
  379. package/www/build/p-f4bac89b.entry.js +2 -0
  380. package/www/build/p-f4bac89b.entry.js.map +1 -0
  381. package/www/build/web-components-library.esm.js +1 -1
  382. package/www/build/web-components-library.esm.js.map +1 -1
  383. package/www/index.html +1 -1
  384. package/dist/cjs/placeholder-cover-b679e768.js.map +0 -1
  385. package/dist/collection/components/result-card/z-result-card/index.js.map +0 -1
  386. package/dist/collection/components/result-card/z-result-card/z-result-card.stories.js.map +0 -1
  387. package/dist/components/placeholder-cover.js.map +0 -1
  388. package/dist/esm/placeholder-cover-9346be8f.js +0 -5
  389. package/dist/esm/placeholder-cover-9346be8f.js.map +0 -1
  390. package/dist/web-components-library/p-165d5acc.entry.js +0 -2
  391. package/dist/web-components-library/p-165d5acc.entry.js.map +0 -1
  392. package/dist/web-components-library/p-5f231799.entry.js +0 -2
  393. package/dist/web-components-library/p-75d50d5f.entry.js +0 -2
  394. package/dist/web-components-library/p-8d923a1d.js +0 -2
  395. package/dist/web-components-library/p-8d923a1d.js.map +0 -1
  396. package/dist/web-components-library/p-970de597.entry.js +0 -2
  397. package/dist/web-components-library/p-abd17b10.entry.js +0 -2
  398. package/dist/web-components-library/p-abd17b10.entry.js.map +0 -1
  399. package/dist/web-components-library/p-b0f80e50.entry.js +0 -2
  400. package/dist/web-components-library/p-e0320349.entry.js +0 -2
  401. package/www/build/p-165d5acc.entry.js +0 -2
  402. package/www/build/p-165d5acc.entry.js.map +0 -1
  403. package/www/build/p-29dcbeae.js +0 -2
  404. package/www/build/p-5f231799.entry.js +0 -2
  405. package/www/build/p-75d50d5f.entry.js +0 -2
  406. package/www/build/p-8d923a1d.js +0 -2
  407. package/www/build/p-8d923a1d.js.map +0 -1
  408. package/www/build/p-970de597.entry.js +0 -2
  409. package/www/build/p-abd17b10.entry.js +0 -2
  410. package/www/build/p-abd17b10.entry.js.map +0 -1
  411. package/www/build/p-b0f80e50.entry.js +0 -2
  412. package/www/build/p-e0320349.entry.js +0 -2
  413. /package/dist/collection/components/{result-card/z-result-card → z-result-card}/z-result-card.stories.js +0 -0
  414. /package/dist/types/components/{result-card/z-result-card → z-result-card}/z-result-card.stories.d.ts +0 -0
  415. /package/dist/web-components-library/{p-17259f80.entry.js.map → p-01f941c2.entry.js.map} +0 -0
  416. /package/dist/web-components-library/{p-a4e26cad.entry.js.map → p-028dd72a.entry.js.map} +0 -0
  417. /package/dist/web-components-library/{p-fef12692.entry.js.map → p-0990d475.entry.js.map} +0 -0
  418. /package/dist/web-components-library/{p-fa9c35b7.entry.js.map → p-0a49dd1c.entry.js.map} +0 -0
  419. /package/dist/web-components-library/{p-7faf6680.entry.js.map → p-240de9aa.entry.js.map} +0 -0
  420. /package/dist/web-components-library/{p-970de597.entry.js.map → p-28534fb5.entry.js.map} +0 -0
  421. /package/dist/web-components-library/{p-755e5bb3.entry.js.map → p-28d83c86.entry.js.map} +0 -0
  422. /package/dist/web-components-library/{p-04f578d3.entry.js.map → p-2ffdfbb1.entry.js.map} +0 -0
  423. /package/dist/web-components-library/{p-da6ba08a.entry.js.map → p-460b2068.entry.js.map} +0 -0
  424. /package/dist/web-components-library/{p-bfa7b528.entry.js.map → p-46ea0b2e.entry.js.map} +0 -0
  425. /package/dist/web-components-library/{p-add09050.entry.js.map → p-4a257653.entry.js.map} +0 -0
  426. /package/dist/web-components-library/{p-d3a51980.entry.js.map → p-4aaf0172.entry.js.map} +0 -0
  427. /package/dist/web-components-library/{p-22056263.entry.js.map → p-4affbb99.entry.js.map} +0 -0
  428. /package/dist/web-components-library/{p-9f516be2.entry.js.map → p-5989465b.entry.js.map} +0 -0
  429. /package/dist/web-components-library/{p-1775f79b.entry.js.map → p-5a1f98a2.entry.js.map} +0 -0
  430. /package/dist/web-components-library/{p-a25c7fdb.entry.js.map → p-5c5882c6.entry.js.map} +0 -0
  431. /package/dist/web-components-library/{p-a80faa78.entry.js.map → p-5f94986f.entry.js.map} +0 -0
  432. /package/dist/web-components-library/{p-e0320349.entry.js.map → p-6cff173f.entry.js.map} +0 -0
  433. /package/dist/web-components-library/{p-9e3116b0.entry.js.map → p-7194003a.entry.js.map} +0 -0
  434. /package/dist/web-components-library/{p-9de4915b.entry.js.map → p-78146cef.entry.js.map} +0 -0
  435. /package/dist/web-components-library/{p-f39f6ee8.entry.js.map → p-7a4f6a5b.entry.js.map} +0 -0
  436. /package/dist/web-components-library/{p-945928ff.entry.js.map → p-7ceddb7a.entry.js.map} +0 -0
  437. /package/dist/web-components-library/{p-50b800e6.entry.js.map → p-86160fe3.entry.js.map} +0 -0
  438. /package/dist/web-components-library/{p-2105d5ec.entry.js.map → p-863fd1c4.entry.js.map} +0 -0
  439. /package/dist/web-components-library/{p-70aa0b22.entry.js.map → p-943db3a8.entry.js.map} +0 -0
  440. /package/dist/web-components-library/{p-6d2a6434.entry.js.map → p-94916bdf.entry.js.map} +0 -0
  441. /package/dist/web-components-library/{p-8e5bc362.entry.js.map → p-a2e87cec.entry.js.map} +0 -0
  442. /package/dist/web-components-library/{p-fe663393.entry.js.map → p-ac477ae7.entry.js.map} +0 -0
  443. /package/dist/web-components-library/{p-75d50d5f.entry.js.map → p-af5e8524.entry.js.map} +0 -0
  444. /package/dist/web-components-library/{p-fb78c343.entry.js.map → p-b3f1b5c1.entry.js.map} +0 -0
  445. /package/dist/web-components-library/{p-6ebaa41d.entry.js.map → p-d60684d5.entry.js.map} +0 -0
  446. /package/dist/web-components-library/{p-2264883d.entry.js.map → p-dc086eb5.entry.js.map} +0 -0
  447. /package/dist/web-components-library/{p-f3287280.entry.js.map → p-e0b88075.entry.js.map} +0 -0
  448. /package/dist/web-components-library/{p-7eb0e121.entry.js.map → p-f487290e.entry.js.map} +0 -0
  449. /package/www/build/{p-17259f80.entry.js.map → p-01f941c2.entry.js.map} +0 -0
  450. /package/www/build/{p-a4e26cad.entry.js.map → p-028dd72a.entry.js.map} +0 -0
  451. /package/www/build/{p-fef12692.entry.js.map → p-0990d475.entry.js.map} +0 -0
  452. /package/www/build/{p-fa9c35b7.entry.js.map → p-0a49dd1c.entry.js.map} +0 -0
  453. /package/www/build/{p-7faf6680.entry.js.map → p-240de9aa.entry.js.map} +0 -0
  454. /package/www/build/{p-970de597.entry.js.map → p-28534fb5.entry.js.map} +0 -0
  455. /package/www/build/{p-755e5bb3.entry.js.map → p-28d83c86.entry.js.map} +0 -0
  456. /package/www/build/{p-04f578d3.entry.js.map → p-2ffdfbb1.entry.js.map} +0 -0
  457. /package/www/build/{p-da6ba08a.entry.js.map → p-460b2068.entry.js.map} +0 -0
  458. /package/www/build/{p-bfa7b528.entry.js.map → p-46ea0b2e.entry.js.map} +0 -0
  459. /package/www/build/{p-add09050.entry.js.map → p-4a257653.entry.js.map} +0 -0
  460. /package/www/build/{p-d3a51980.entry.js.map → p-4aaf0172.entry.js.map} +0 -0
  461. /package/www/build/{p-22056263.entry.js.map → p-4affbb99.entry.js.map} +0 -0
  462. /package/www/build/{p-9f516be2.entry.js.map → p-5989465b.entry.js.map} +0 -0
  463. /package/www/build/{p-1775f79b.entry.js.map → p-5a1f98a2.entry.js.map} +0 -0
  464. /package/www/build/{p-a25c7fdb.entry.js.map → p-5c5882c6.entry.js.map} +0 -0
  465. /package/www/build/{p-a80faa78.entry.js.map → p-5f94986f.entry.js.map} +0 -0
  466. /package/www/build/{p-e0320349.entry.js.map → p-6cff173f.entry.js.map} +0 -0
  467. /package/www/build/{p-9e3116b0.entry.js.map → p-7194003a.entry.js.map} +0 -0
  468. /package/www/build/{p-9de4915b.entry.js.map → p-78146cef.entry.js.map} +0 -0
  469. /package/www/build/{p-f39f6ee8.entry.js.map → p-7a4f6a5b.entry.js.map} +0 -0
  470. /package/www/build/{p-945928ff.entry.js.map → p-7ceddb7a.entry.js.map} +0 -0
  471. /package/www/build/{p-50b800e6.entry.js.map → p-86160fe3.entry.js.map} +0 -0
  472. /package/www/build/{p-2105d5ec.entry.js.map → p-863fd1c4.entry.js.map} +0 -0
  473. /package/www/build/{p-70aa0b22.entry.js.map → p-943db3a8.entry.js.map} +0 -0
  474. /package/www/build/{p-6d2a6434.entry.js.map → p-94916bdf.entry.js.map} +0 -0
  475. /package/www/build/{p-8e5bc362.entry.js.map → p-a2e87cec.entry.js.map} +0 -0
  476. /package/www/build/{p-fe663393.entry.js.map → p-ac477ae7.entry.js.map} +0 -0
  477. /package/www/build/{p-75d50d5f.entry.js.map → p-af5e8524.entry.js.map} +0 -0
  478. /package/www/build/{p-fb78c343.entry.js.map → p-b3f1b5c1.entry.js.map} +0 -0
  479. /package/www/build/{p-6ebaa41d.entry.js.map → p-d60684d5.entry.js.map} +0 -0
  480. /package/www/build/{p-2264883d.entry.js.map → p-dc086eb5.entry.js.map} +0 -0
  481. /package/www/build/{p-f3287280.entry.js.map → p-e0b88075.entry.js.map} +0 -0
  482. /package/www/build/{p-7eb0e121.entry.js.map → p-f487290e.entry.js.map} +0 -0
@@ -1,181 +1,53 @@
1
- import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { j as ExpandableListButtonAlign, l as ListDividerType, D as DividerSize, E as ExpandableListStyle, i as ListSize, m as ListType, g as KeyboardCode } from './index2.js';
3
- import { d as defineCustomElement$2 } from './index6.js';
4
- import { d as defineCustomElement$1 } from './index9.js';
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { i as ListSize, m as ListType } from './index2.js';
5
3
 
6
- const stylesCss = ":host{outline:none}:host>.container{display:flex;box-sizing:border-box;flex-direction:column;justify-content:center;background-color:var(--background-color-list-element, var(--color-surface01));font-family:var(--font-family-sans);font-weight:var(--font-rg);outline:none}:host([size=\"small\"])>.container{min-height:calc(var(--space-unit) * 4);padding:calc(var(--space-unit) / 2) 0}:host([size=\"medium\"])>.container{min-height:calc(var(--space-unit) * 5);padding:var(--space-unit) 0}:host([size=\"medium\"])>.tree-element-container{padding-top:var(--space-unit);padding-bottom:0}:host([size=\"large\"])>.container{min-height:calc(var(--space-unit) * 7);padding:calc(var(--space-unit) * 2) 0}:host([size=\"x-large\"])>.container{min-height:calc(var(--space-unit) * 9);padding:calc(var(--space-unit) * 3) 0}:host([expandable])>.container,:host([clickable])>.container{cursor:pointer}:host([expandable]:hover)>.container,:host([clickable]:hover)>.container{background-color:var(--background-hover-color-list-element, var(--color-background))}:host([expandable]:focus:focus-visible)>.container,:host([clickable]:focus:focus-visible)>.container{position:relative;z-index:1;box-shadow:var(--shadow-focus-primary)}:host([expandable]:active)>.container,:host([clickable]:active)>.container{background-color:var(--background-active-color-list-element, var(--color-background))}:host([align-button=\"left\"][expandable])>.container>.z-list-element-container{display:flex}:host([align-button=\"right\"][expandable])>.container>.z-list-element-container{display:flex;flex-direction:row-reverse;justify-content:space-between}:host([align-button=\"left\"][expandable])>.container>.z-list-element-container>z-icon{margin-right:var(--space-unit)}:host([align-button=\"right\"][expandable])>.container>.z-list-element-container>z-icon{margin-left:var(--space-unit)}:host>.container>.z-list-element-inner-container{display:none}:host>.container>.z-list-element-inner-container.expanded{display:block}.z-list-content-container{display:flex;align-items:center}:host .z-tree-list-divider{position:absolute;z-index:100;left:0}:host([disabled])>.container{color:var(--color-form-disabled03);cursor:default}";
7
- const ZListElementStyle0 = stylesCss;
4
+ const stylesCss = ":host{display:flex;flex-direction:column;font-family:var(--font-family-sans);font-weight:var(--font-rg)}";
5
+ const ZListStyle0 = stylesCss;
8
6
 
9
- const ZListElement = /*@__PURE__*/ proxyCustomElement(class ZListElement extends HTMLElement {
10
- accessibleFocusHandler(e) {
11
- if (this.listElementId === e.detail) {
12
- const toFocus = this.host.shadowRoot.getElementById(`z-list-element-id-${e.detail}`);
13
- toFocus.focus();
14
- }
15
- }
16
- /**
17
- * Constructor.
18
- */
7
+ const ZList = /*@__PURE__*/ proxyCustomElement(class ZList extends HTMLElement {
19
8
  constructor() {
20
9
  super();
21
10
  this.__registerHost();
22
11
  this.__attachShadow();
23
- this.accessibleFocus = createEvent(this, "accessibleFocus", 7);
24
- this.ariaDescendantFocus = createEvent(this, "ariaDescendantFocus", 7);
25
- this.clickItem = createEvent(this, "clickItem", 7);
26
- this.openElementConfig = {
27
- accordion: {
28
- open: "minus-circled",
29
- close: "plus-circled",
30
- },
31
- menu: {
32
- open: "chevron-up",
33
- close: "chevron-down",
34
- },
35
- };
36
- this.alignButton = ExpandableListButtonAlign.LEFT;
37
- this.clickable = false;
38
- this.dividerColor = "color-surface03";
39
- this.dividerType = ListDividerType.NONE;
40
- this.dividerSize = DividerSize.SMALL;
41
- this.expandable = false;
42
- this.expandableStyle = ExpandableListStyle.ACCORDION;
43
- this.listElementId = undefined;
44
12
  this.size = ListSize.MEDIUM;
45
- this.color = "none";
46
- this.disabled = false;
47
- this.listElementPosition = "0";
48
13
  this.listType = ListType.NONE;
49
- this.hasTreeItems = undefined;
50
- this.role = "listitem";
51
- this.htmlTabindex = 0;
52
- this.showInnerContent = false;
53
- this.handleClick = this.handleClick.bind(this);
54
- this.handleKeyDown = this.handleKeyDown.bind(this);
55
- }
56
- /**
57
- * Handler for click on element. If element is expandable, change state.
58
- * @returns void
59
- */
60
- handleClick() {
61
- if (this.disabled) {
62
- return;
63
- }
64
- this.clickItem.emit(this.listElementId);
65
- if (!this.expandable) {
66
- return;
67
- }
68
- this.showInnerContent = !this.showInnerContent;
14
+ this.role = "list";
69
15
  }
70
- handleKeyDown(event) {
71
- const expandByKey = event.code === KeyboardCode.ENTER;
72
- switch (event.code) {
73
- case KeyboardCode.ARROW_DOWN:
74
- event.preventDefault();
75
- this.accessibleFocus.emit(this.listElementId + 1);
76
- break;
77
- case KeyboardCode.ARROW_UP:
78
- event.preventDefault();
79
- this.accessibleFocus.emit(this.listElementId - 1);
80
- break;
81
- case KeyboardCode.ENTER:
82
- event.preventDefault();
83
- this.clickItem.emit(this.listElementId);
84
- break;
16
+ setChildrenSizeType() {
17
+ const children = this.host.children;
18
+ for (let i = 0; i < children.length; i++) {
19
+ children[i].setAttribute("size", this.size);
20
+ children[i].setAttribute("list-type", this.listType);
21
+ children[i].setAttribute("list-element-position", (i + 1).toString());
85
22
  }
86
- if (!this.expandable || !expandByKey) {
87
- return;
88
- }
89
- this.showInnerContent = !this.showInnerContent;
90
23
  }
91
- /**
92
- * Renders button to expand element.
93
- * @returns expadable button
94
- */
95
- renderExpandableButton() {
96
- if (!this.expandable) {
97
- return null;
98
- }
99
- return (h("z-icon", { name: this.showInnerContent
100
- ? this.openElementConfig[this.expandableStyle].open
101
- : this.openElementConfig[this.expandableStyle].close }));
102
- }
103
- /**
104
- * Renders expanded content if element is expandable.
105
- * @returns expanded content
106
- */
107
- renderExpandedContent() {
108
- if (!this.expandable) {
109
- return null;
110
- }
111
- return (h("div", { class: {
112
- "z-list-element-inner-container": true,
113
- "expanded": this.showInnerContent,
114
- } }, h("slot", { name: "inner-content" })));
115
- }
116
- /**
117
- * Renders content of the z-list-element
118
- * @returns list content
119
- */
120
- renderContent() {
121
- if (this.listType === ListType.NONE) {
122
- return h("slot", null);
123
- }
124
- if (this.listType === ListType.ORDERED) {
125
- return (h("div", { class: "z-list-content-container" }, h("div", null, this.listElementPosition, ".\u2003"), h("slot", null)));
126
- }
127
- if (this.listType === ListType.UNORDERED) {
128
- return (h("div", { class: "z-list-content-container" }, h("span", null, "\u2022\u2003"), h("slot", null)));
129
- }
24
+ componentDidLoad() {
25
+ this.setChildrenSizeType();
130
26
  }
131
27
  render() {
132
- return (h(Host, { key: '12acb475e6134ca269fa048ec922b41f853e4f44', "aria-expanded": this.expandable ? this.showInnerContent : null, onClick: this.handleClick, onFocus: () => this.ariaDescendantFocus.emit(this.listElementId), onKeyDown: this.handleKeyDown, clickable: this.clickable && !this.disabled, tabIndex: this.hasTreeItems ? undefined : this.htmlTabindex, role: this.hasTreeItems ? "none" : this.role }, h("div", { key: '01120e1b207b2d2271e9c71d5bc04a97842b92ed', class: this.hasTreeItems ? "tree-element-container" : "container", style: !this.disabled && { color: `var(--${this.color})` }, tabindex: "-1", id: `z-list-element-id-${this.listElementId}`, part: "list-item-container" }, h("div", { key: '97e8f8a0cffd91ce225f95eb64fc032d69b530cf', class: "z-list-element-container" }, this.renderExpandableButton(), this.renderContent()), this.renderExpandedContent()), this.dividerType === ListDividerType.ELEMENT && (h("z-divider", { key: 'b6daab61d570d5b9aaf9ab8b735e7704e5075f7c', class: { "z-tree-list-divider": this.hasTreeItems }, color: this.dividerColor, size: this.dividerSize }))));
28
+ return (h(Host, { key: 'f178d7e0463f0e0495aa3029dd8a14b3947770ad' }, h("slot", { key: '9f177d9529829d8eb48329cfc969c739c24c5a52' })));
133
29
  }
134
30
  get host() { return this; }
135
- static get style() { return ZListElementStyle0; }
136
- }, [1, "z-list-element", {
137
- "alignButton": [513, "align-button"],
138
- "clickable": [516],
139
- "dividerColor": [1, "divider-color"],
140
- "dividerType": [1, "divider-type"],
141
- "dividerSize": [1, "divider-size"],
142
- "expandable": [516],
143
- "expandableStyle": [1, "expandable-style"],
144
- "listElementId": [514, "list-element-id"],
31
+ static get style() { return ZListStyle0; }
32
+ }, [1, "z-list", {
145
33
  "size": [513],
146
- "color": [513],
147
- "disabled": [516],
148
- "listElementPosition": [513, "list-element-position"],
149
34
  "listType": [513, "list-type"],
150
- "hasTreeItems": [4, "has-tree-items"],
151
- "role": [513],
152
- "htmlTabindex": [2, "html-tabindex"],
153
- "showInnerContent": [32]
154
- }, [[4, "accessibleFocus", "accessibleFocusHandler"]]]);
35
+ "role": [513]
36
+ }]);
155
37
  function defineCustomElement() {
156
38
  if (typeof customElements === "undefined") {
157
39
  return;
158
40
  }
159
- const components = ["z-list-element", "z-divider", "z-icon"];
41
+ const components = ["z-list"];
160
42
  components.forEach(tagName => { switch (tagName) {
161
- case "z-list-element":
162
- if (!customElements.get(tagName)) {
163
- customElements.define(tagName, ZListElement);
164
- }
165
- break;
166
- case "z-divider":
167
- if (!customElements.get(tagName)) {
168
- defineCustomElement$2();
169
- }
170
- break;
171
- case "z-icon":
43
+ case "z-list":
172
44
  if (!customElements.get(tagName)) {
173
- defineCustomElement$1();
45
+ customElements.define(tagName, ZList);
174
46
  }
175
47
  break;
176
48
  } });
177
49
  }
178
50
 
179
- export { ZListElement as Z, defineCustomElement as d };
51
+ export { ZList as Z, defineCustomElement as d };
180
52
 
181
53
  //# sourceMappingURL=index14.js.map
@@ -1 +1 @@
1
- {"file":"index14.js","mappings":";;;;;AAAA,MAAM,SAAS,GAAG,2oEAA2oE,CAAC;AAC9pE,2BAAe,SAAS;;MCeX,YAAY;IA+BvB,sBAAsB,CAAC,CAAc;QACnC,IAAI,IAAI,CAAC,aAAa,KAAK,CAAC,CAAC,MAAM,EAAE;YACnC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;YACrF,OAAO,CAAC,KA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,EACjD,KAAK,EAAE,IAAI,CAAC,YAAY,EACxB,IAAI,EAAE,IAAI,CAAC,WAAW,GACtB,CACH,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/list/z-list-element/styles.css?tag=z-list-element&encapsulation=shadow","src/components/list/z-list-element/index.tsx"],"sourcesContent":[":host {\n outline: none;\n}\n\n:host > .container {\n --background-color-list-element: ;\n --background-hover-color-list-element: ;\n --background-active-color-list-element: ;\n\n display: flex;\n box-sizing: border-box;\n flex-direction: column;\n justify-content: center;\n background-color: var(--background-color-list-element, var(--color-surface01));\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n outline: none;\n}\n\n/* z-list-element size */\n\n:host([size=\"small\"]) > .container {\n min-height: calc(var(--space-unit) * 4);\n padding: calc(var(--space-unit) / 2) 0;\n}\n\n:host([size=\"medium\"]) > .container {\n min-height: calc(var(--space-unit) * 5);\n padding: var(--space-unit) 0;\n}\n\n:host([size=\"medium\"]) > .tree-element-container {\n padding-top: var(--space-unit);\n padding-bottom: 0;\n}\n\n:host([size=\"large\"]) > .container {\n min-height: calc(var(--space-unit) * 7);\n padding: calc(var(--space-unit) * 2) 0;\n}\n\n:host([size=\"x-large\"]) > .container {\n min-height: calc(var(--space-unit) * 9);\n padding: calc(var(--space-unit) * 3) 0;\n}\n\n/* ----------------- */\n\n:host([expandable]) > .container,\n:host([clickable]) > .container {\n cursor: pointer;\n}\n\n:host([expandable]:hover) > .container,\n:host([clickable]:hover) > .container {\n background-color: var(--background-hover-color-list-element, var(--color-background));\n}\n\n:host([expandable]:focus:focus-visible) > .container,\n:host([clickable]:focus:focus-visible) > .container {\n position: relative;\n z-index: 1;\n box-shadow: var(--shadow-focus-primary);\n}\n\n:host([expandable]:active) > .container,\n:host([clickable]:active) > .container {\n background-color: var(--background-active-color-list-element, var(--color-background));\n}\n\n:host([align-button=\"left\"][expandable]) > .container > .z-list-element-container {\n display: flex;\n}\n\n:host([align-button=\"right\"][expandable]) > .container > .z-list-element-container {\n display: flex;\n flex-direction: row-reverse;\n justify-content: space-between;\n}\n\n:host([align-button=\"left\"][expandable]) > .container > .z-list-element-container > z-icon {\n margin-right: var(--space-unit);\n}\n\n:host([align-button=\"right\"][expandable]) > .container > .z-list-element-container > z-icon {\n margin-left: var(--space-unit);\n}\n\n:host > .container > .z-list-element-inner-container {\n display: none;\n}\n\n:host > .container > .z-list-element-inner-container.expanded {\n display: block;\n}\n\n.z-list-content-container {\n display: flex;\n align-items: center;\n}\n\n:host .z-tree-list-divider {\n position: absolute;\n z-index: 100;\n left: 0;\n}\n\n:host([disabled]) > .container {\n color: var(--color-form-disabled03);\n cursor: default;\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Listen, Prop, State} from \"@stencil/core\";\nimport {\n DividerSize,\n ExpandableListButtonAlign,\n ExpandableListStyle,\n KeyboardCode,\n ListDividerType,\n ListSize,\n ListType,\n} from \"../../../beans\";\n\n@Component({\n tag: \"z-list-element\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZListElement {\n @Element() host: HTMLZListElementElement;\n\n /** remove filter click event, returns filterid */\n @Event({\n eventName: \"accessibleFocus\",\n composed: true,\n cancelable: true,\n bubbles: true,\n })\n accessibleFocus: EventEmitter<number>;\n\n /** set parent aria-activedescendant on focus event, returns filterid */\n @Event({\n eventName: \"ariaDescendantFocus\",\n composed: true,\n cancelable: true,\n bubbles: true,\n })\n ariaDescendantFocus: EventEmitter<number>;\n\n /** remove filter click event, returns filterid */\n @Event({\n eventName: \"clickItem\",\n composed: true,\n cancelable: true,\n bubbles: true,\n })\n clickItem: EventEmitter;\n\n @Listen(\"accessibleFocus\", {target: \"document\"})\n accessibleFocusHandler(e: CustomEvent): void {\n if (this.listElementId === e.detail) {\n const toFocus = this.host.shadowRoot.getElementById(`z-list-element-id-${e.detail}`);\n toFocus.focus();\n }\n }\n\n /**\n * [optional] Align expandable button left or right.\n */\n @Prop({reflect: true})\n alignButton?: ExpandableListButtonAlign = ExpandableListButtonAlign.LEFT;\n\n /**\n * [optional] Sets element clickable.\n */\n @Prop({reflect: true})\n clickable?: boolean = false;\n\n /**\n * [optional] Sets the divider color.\n */\n @Prop()\n dividerColor?: string = \"color-surface03\";\n\n /**\n * [optional] Sets the position where to insert the divider.\n */\n @Prop()\n dividerType?: ListDividerType = ListDividerType.NONE;\n\n /**\n * [optional] Sets the divider size.\n */\n @Prop()\n dividerSize?: DividerSize = DividerSize.SMALL;\n\n /**\n * [optional] Sets element as expandable.\n */\n @Prop({reflect: true})\n expandable?: boolean = false;\n\n /**\n * [optional] Sets expandable style to element.\n */\n @Prop()\n expandableStyle?: ExpandableListStyle = ExpandableListStyle.ACCORDION;\n\n /**\n * [optional] List element id.\n */\n @Prop({reflect: true})\n listElementId?: number;\n\n /**\n * [optional] Sets size of inside elements.\n */\n @Prop({reflect: true})\n size?: ListSize = ListSize.MEDIUM;\n\n /**\n * [optional] Sets text color of the element.\n */\n @Prop({reflect: true})\n color?: string = \"none\";\n\n /**\n * [optional] Sets disabled style of the element.\n */\n @Prop({reflect: true})\n disabled?: boolean = false;\n\n /**\n * [optional] position of the list element inside the list or the group\n */\n @Prop({reflect: true})\n listElementPosition?: string = \"0\";\n\n /**\n * [optional] type of the list marker for each element\n */\n @Prop({reflect: true})\n listType?: ListType = ListType.NONE;\n\n /**\n * [optional] Sets element as tree item.\n */\n @Prop()\n hasTreeItems?: boolean;\n\n /**\n * Sets element role.\n */\n @Prop({reflect: true})\n role = \"listitem\";\n\n /** set tabindex to Host tag (optional). Defaults to 0. */\n @Prop()\n htmlTabindex?: number | null = 0;\n\n @State()\n showInnerContent = false;\n\n private openElementConfig = {\n accordion: {\n open: \"minus-circled\",\n close: \"plus-circled\",\n },\n menu: {\n open: \"chevron-up\",\n close: \"chevron-down\",\n },\n };\n\n /**\n * Constructor.\n */\n constructor() {\n this.handleClick = this.handleClick.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n }\n\n /**\n * Handler for click on element. If element is expandable, change state.\n * @returns void\n */\n private handleClick(): void {\n if (this.disabled) {\n return;\n }\n\n this.clickItem.emit(this.listElementId);\n if (!this.expandable) {\n return;\n }\n this.showInnerContent = !this.showInnerContent;\n }\n\n private handleKeyDown(event): void {\n const expandByKey = event.code === KeyboardCode.ENTER;\n switch (event.code) {\n case KeyboardCode.ARROW_DOWN:\n event.preventDefault();\n this.accessibleFocus.emit(this.listElementId + 1);\n break;\n case KeyboardCode.ARROW_UP:\n event.preventDefault();\n this.accessibleFocus.emit(this.listElementId - 1);\n break;\n case KeyboardCode.ENTER:\n event.preventDefault();\n this.clickItem.emit(this.listElementId);\n break;\n default:\n break;\n }\n\n if (!this.expandable || !expandByKey) {\n return;\n }\n this.showInnerContent = !this.showInnerContent;\n }\n\n /**\n * Renders button to expand element.\n * @returns expadable button\n */\n private renderExpandableButton(): HTMLZIconElement {\n if (!this.expandable) {\n return null;\n }\n\n return (\n <z-icon\n name={\n this.showInnerContent\n ? this.openElementConfig[this.expandableStyle].open\n : this.openElementConfig[this.expandableStyle].close\n }\n />\n );\n }\n\n /**\n * Renders expanded content if element is expandable.\n * @returns expanded content\n */\n private renderExpandedContent(): HTMLDivElement {\n if (!this.expandable) {\n return null;\n }\n\n return (\n <div\n class={{\n \"z-list-element-inner-container\": true,\n \"expanded\": this.showInnerContent,\n }}\n >\n <slot name=\"inner-content\" />\n </div>\n );\n }\n\n /**\n * Renders content of the z-list-element\n * @returns list content\n */\n private renderContent(): HTMLDivElement {\n if (this.listType === ListType.NONE) {\n return <slot />;\n }\n\n if (this.listType === ListType.ORDERED) {\n return (\n <div class=\"z-list-content-container\">\n <div>{this.listElementPosition}.&emsp;</div>\n <slot />\n </div>\n );\n }\n\n if (this.listType === ListType.UNORDERED) {\n return (\n <div class=\"z-list-content-container\">\n <span>&bull;&emsp;</span>\n <slot />\n </div>\n );\n }\n }\n\n render(): HTMLZListElementElement {\n return (\n <Host\n aria-expanded={this.expandable ? this.showInnerContent : null}\n onClick={this.handleClick}\n onFocus={() => this.ariaDescendantFocus.emit(this.listElementId)}\n onKeyDown={this.handleKeyDown}\n clickable={this.clickable && !this.disabled}\n tabIndex={this.hasTreeItems ? undefined : this.htmlTabindex}\n role={this.hasTreeItems ? \"none\" : this.role}\n >\n <div\n class={this.hasTreeItems ? \"tree-element-container\" : \"container\"}\n style={!this.disabled && {color: `var(--${this.color})`}}\n tabindex=\"-1\"\n id={`z-list-element-id-${this.listElementId}`}\n part=\"list-item-container\"\n >\n <div class=\"z-list-element-container\">\n {this.renderExpandableButton()}\n {this.renderContent()}\n </div>\n {this.renderExpandedContent()}\n </div>\n {this.dividerType === ListDividerType.ELEMENT && (\n <z-divider\n class={{\"z-tree-list-divider\": this.hasTreeItems}}\n color={this.dividerColor}\n size={this.dividerSize}\n />\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"index14.js","mappings":";;;AAAA,MAAM,SAAS,GAAG,0GAA0G,CAAC;AAC7H,oBAAe,SAAS;;MCOX,KAAK;;;;;oBAOE,QAAQ,CAAC,MAAM;wBAMX,QAAQ,CAAC,IAAI;oBAM5B,MAAM;;IAEL,mBAAmB;QACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;QACpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACxC,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YAC5C,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YACrD,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,uBAAuB,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;SACvE;KACF;IAED,gBAAgB;QACd,IAAI,CAAC,mBAAmB,EAAE,CAAC;KAC5B;IAED,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,8DAAQ,CACH,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/list/z-list/styles.css?tag=z-list&encapsulation=shadow","src/components/list/z-list/index.tsx"],"sourcesContent":[":host {\n display: flex;\n flex-direction: column;\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n","import {Component, Element, Host, Prop, h} from \"@stencil/core\";\nimport {ListSize, ListType} from \"../../../beans\";\n\n@Component({\n tag: \"z-list\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZList {\n @Element() host: HTMLZListElement;\n\n /**\n * [optional] Sets size of inside elements.\n */\n @Prop({reflect: true})\n size?: ListSize = ListSize.MEDIUM;\n\n /**\n * [optional] type of the list marker for each element\n */\n @Prop({reflect: true})\n listType?: ListType = ListType.NONE;\n\n /**\n * Sets role of the element.\n */\n @Prop({reflect: true})\n role = \"list\";\n\n private setChildrenSizeType(): void {\n const children = this.host.children;\n for (let i = 0; i < children.length; i++) {\n children[i].setAttribute(\"size\", this.size);\n children[i].setAttribute(\"list-type\", this.listType);\n children[i].setAttribute(\"list-element-position\", (i + 1).toString());\n }\n }\n\n componentDidLoad(): void {\n this.setChildrenSizeType();\n }\n\n render(): HTMLZListElement {\n return (\n <Host>\n <slot />\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,67 +1,174 @@
1
- import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { i as ListSize, l as ListDividerType, D as DividerSize, m as ListType } from './index2.js';
3
- import { d as defineCustomElement$1 } from './index6.js';
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { j as ExpandableListButtonAlign, l as ListDividerType, D as DividerSize, E as ExpandableListStyle, i as ListSize, m as ListType, g as KeyboardCode } from './index2.js';
3
+ import { d as defineCustomElement$2 } from './index7.js';
4
+ import { d as defineCustomElement$1 } from './index10.js';
4
5
 
5
- const stylesCss = ":host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.z-list-group-header-container{color:var(--gray700);font-size:var(--font-size-2);font-weight:var(--font-sb) !important;letter-spacing:0.16px;line-height:1.4}:host>.z-list-group-header-container.has-header{padding-top:var(--space-unit);padding-bottom:var(--space-unit)}:host>.z-list-group-header-container.has-header>z-divider{margin-top:var(--space-unit)}:host>.grouped-tree-list-header{padding-top:var(--space-unit);padding-bottom:0}";
6
- const ZListGroupStyle0 = stylesCss;
6
+ const stylesCss = ":host{outline:none}:host>.container{display:flex;box-sizing:border-box;flex-direction:column;justify-content:center;background-color:var(--background-color-list-element, var(--color-surface01));font-family:var(--font-family-sans);font-weight:var(--font-rg);outline:none}:host([size=\"small\"])>.container{min-height:calc(var(--space-unit) * 4);padding:calc(var(--space-unit) / 2) 0}:host([size=\"medium\"])>.container{min-height:calc(var(--space-unit) * 5);padding:var(--space-unit) 0}:host([size=\"medium\"])>.tree-element-container{padding-top:var(--space-unit);padding-bottom:0}:host([size=\"large\"])>.container{min-height:calc(var(--space-unit) * 7);padding:calc(var(--space-unit) * 2) 0}:host([size=\"x-large\"])>.container{min-height:calc(var(--space-unit) * 9);padding:calc(var(--space-unit) * 3) 0}:host([expandable])>.container,:host([clickable])>.container{cursor:pointer}:host([expandable]:hover)>.container,:host([clickable]:hover)>.container{background-color:var(--background-hover-color-list-element, var(--color-background))}:host([expandable]:focus:focus-visible)>.container,:host([clickable]:focus:focus-visible)>.container{position:relative;z-index:1;box-shadow:var(--shadow-focus-primary)}:host([expandable]:active)>.container,:host([clickable]:active)>.container{background-color:var(--background-active-color-list-element, var(--color-background))}:host([align-button=\"left\"][expandable])>.container>.z-list-element-container{display:flex}:host([align-button=\"right\"][expandable])>.container>.z-list-element-container{display:flex;flex-direction:row-reverse;justify-content:space-between}:host([align-button=\"left\"][expandable])>.container>.z-list-element-container>z-icon{margin-right:var(--space-unit)}:host([align-button=\"right\"][expandable])>.container>.z-list-element-container>z-icon{margin-left:var(--space-unit)}:host>.container>.z-list-element-inner-container{display:none}:host>.container>.z-list-element-inner-container.expanded{display:block}.z-list-content-container{display:flex;align-items:center}:host .z-tree-list-divider{position:absolute;z-index:100;left:0}:host([disabled])>.container{color:var(--color-form-disabled03);cursor:default}";
7
+ const ZListElementStyle0 = stylesCss;
7
8
 
8
- const ZListGroup = /*@__PURE__*/ proxyCustomElement(class ZListGroup extends HTMLElement {
9
+ const ZListElement = /*@__PURE__*/ proxyCustomElement(class ZListElement extends HTMLElement {
10
+ accessibleFocusHandler(e) {
11
+ if (this.listElementId === e.detail) {
12
+ const toFocus = this.host.shadowRoot.getElementById(`z-list-element-id-${e.detail}`);
13
+ toFocus.focus();
14
+ }
15
+ }
16
+ /**
17
+ * Constructor.
18
+ */
9
19
  constructor() {
10
20
  super();
11
21
  this.__registerHost();
12
22
  this.__attachShadow();
13
- this.size = ListSize.MEDIUM;
23
+ this.accessibleFocus = createEvent(this, "accessibleFocus", 7);
24
+ this.ariaDescendantFocus = createEvent(this, "ariaDescendantFocus", 7);
25
+ this.clickItem = createEvent(this, "clickItem", 7);
26
+ this.openElementConfig = {
27
+ accordion: {
28
+ open: "minus-circled",
29
+ close: "plus-circled",
30
+ },
31
+ menu: {
32
+ open: "chevron-up",
33
+ close: "chevron-down",
34
+ },
35
+ };
36
+ this.alignButton = ExpandableListButtonAlign.LEFT;
37
+ this.clickable = false;
38
+ this.dividerColor = "color-surface03";
14
39
  this.dividerType = ListDividerType.NONE;
15
40
  this.dividerSize = DividerSize.SMALL;
16
- this.dividerColor = "gray200";
41
+ this.expandable = false;
42
+ this.expandableStyle = ExpandableListStyle.ACCORDION;
43
+ this.listElementId = undefined;
44
+ this.size = ListSize.MEDIUM;
45
+ this.color = "none";
46
+ this.disabled = false;
47
+ this.listElementPosition = "0";
17
48
  this.listType = ListType.NONE;
18
49
  this.hasTreeItems = undefined;
50
+ this.role = "listitem";
51
+ this.htmlTabindex = 0;
52
+ this.showInnerContent = false;
53
+ this.handleClick = this.handleClick.bind(this);
54
+ this.handleKeyDown = this.handleKeyDown.bind(this);
19
55
  }
20
- componentDidLoad() {
21
- const children = this.host.children;
22
- for (let i = 0; i < children.length; i++) {
23
- if (children.length - 1 > i) {
24
- children[i].setAttribute("divider-type", this.dividerType);
25
- children[i].setAttribute("divider-size", this.dividerSize);
26
- children[i].setAttribute("divider-color", this.dividerColor);
27
- }
28
- children[i].setAttribute("size", this.size);
29
- children[i].setAttribute("list-type", this.listType);
30
- children[i].setAttribute("list-element-position", i.toString());
56
+ /**
57
+ * Handler for click on element. If element is expandable, change state.
58
+ * @returns void
59
+ */
60
+ handleClick() {
61
+ if (this.disabled) {
62
+ return;
31
63
  }
64
+ this.clickItem.emit(this.listElementId);
65
+ if (!this.expandable) {
66
+ return;
67
+ }
68
+ this.showInnerContent = !this.showInnerContent;
32
69
  }
33
- componentWillLoad() {
34
- this.hasHeader = !!this.host.querySelector('[slot="header-title"]');
70
+ handleKeyDown(event) {
71
+ const expandByKey = event.code === KeyboardCode.ENTER;
72
+ switch (event.code) {
73
+ case KeyboardCode.ARROW_DOWN:
74
+ event.preventDefault();
75
+ this.accessibleFocus.emit(this.listElementId + 1);
76
+ break;
77
+ case KeyboardCode.ARROW_UP:
78
+ event.preventDefault();
79
+ this.accessibleFocus.emit(this.listElementId - 1);
80
+ break;
81
+ case KeyboardCode.ENTER:
82
+ event.preventDefault();
83
+ this.clickItem.emit(this.listElementId);
84
+ break;
85
+ }
86
+ if (!this.expandable || !expandByKey) {
87
+ return;
88
+ }
89
+ this.showInnerContent = !this.showInnerContent;
90
+ }
91
+ /**
92
+ * Renders button to expand element.
93
+ * @returns expadable button
94
+ */
95
+ renderExpandableButton() {
96
+ if (!this.expandable) {
97
+ return null;
98
+ }
99
+ return (h("z-icon", { name: this.showInnerContent
100
+ ? this.openElementConfig[this.expandableStyle].open
101
+ : this.openElementConfig[this.expandableStyle].close }));
102
+ }
103
+ /**
104
+ * Renders expanded content if element is expandable.
105
+ * @returns expanded content
106
+ */
107
+ renderExpandedContent() {
108
+ if (!this.expandable) {
109
+ return null;
110
+ }
111
+ return (h("div", { class: {
112
+ "z-list-element-inner-container": true,
113
+ "expanded": this.showInnerContent,
114
+ } }, h("slot", { name: "inner-content" })));
115
+ }
116
+ /**
117
+ * Renders content of the z-list-element
118
+ * @returns list content
119
+ */
120
+ renderContent() {
121
+ if (this.listType === ListType.NONE) {
122
+ return h("slot", null);
123
+ }
124
+ if (this.listType === ListType.ORDERED) {
125
+ return (h("div", { class: "z-list-content-container" }, h("div", null, this.listElementPosition, ".\u2003"), h("slot", null)));
126
+ }
127
+ if (this.listType === ListType.UNORDERED) {
128
+ return (h("div", { class: "z-list-content-container" }, h("span", null, "\u2022\u2003"), h("slot", null)));
129
+ }
35
130
  }
36
131
  render() {
37
- return (h(Host, { key: '1e3229205e55482b92dc8d0a972d9f9e1805ba56', role: "group" }, h("div", { key: 'ede88ef3d1845e0c432b7a00b8f9dc959ce258e6', class: {
38
- "z-list-group-header-container": true,
39
- "has-header": this.hasHeader && !this.hasTreeItems,
40
- "grouped-tree-list-header": this.hasTreeItems,
41
- } }, h("slot", { key: 'd6c2cef7568424ebab1ae5d3dc572d4bc2aba61c', name: "header-title" }), this.dividerType === ListDividerType.HEADER && (h("z-divider", { key: '5e45b81c54db4f623d366e62817f2a60ede8fa19', color: this.dividerColor, size: this.dividerSize }))), h("slot", { key: '2a1a7ad0e3f8b56dd4880b8215ab79bd27981804' })));
132
+ return (h(Host, { key: '12acb475e6134ca269fa048ec922b41f853e4f44', "aria-expanded": this.expandable ? this.showInnerContent : null, onClick: this.handleClick, onFocus: () => this.ariaDescendantFocus.emit(this.listElementId), onKeyDown: this.handleKeyDown, clickable: this.clickable && !this.disabled, tabIndex: this.hasTreeItems ? undefined : this.htmlTabindex, role: this.hasTreeItems ? "none" : this.role }, h("div", { key: '01120e1b207b2d2271e9c71d5bc04a97842b92ed', class: this.hasTreeItems ? "tree-element-container" : "container", style: !this.disabled && { color: `var(--${this.color})` }, tabindex: "-1", id: `z-list-element-id-${this.listElementId}`, part: "list-item-container" }, h("div", { key: '97e8f8a0cffd91ce225f95eb64fc032d69b530cf', class: "z-list-element-container" }, this.renderExpandableButton(), this.renderContent()), this.renderExpandedContent()), this.dividerType === ListDividerType.ELEMENT && (h("z-divider", { key: 'b6daab61d570d5b9aaf9ab8b735e7704e5075f7c', class: { "z-tree-list-divider": this.hasTreeItems }, color: this.dividerColor, size: this.dividerSize }))));
42
133
  }
43
134
  get host() { return this; }
44
- static get style() { return ZListGroupStyle0; }
45
- }, [1, "z-list-group", {
135
+ static get style() { return ZListElementStyle0; }
136
+ }, [1, "z-list-element", {
137
+ "alignButton": [513, "align-button"],
138
+ "clickable": [516],
139
+ "dividerColor": [1, "divider-color"],
140
+ "dividerType": [1, "divider-type"],
141
+ "dividerSize": [1, "divider-size"],
142
+ "expandable": [516],
143
+ "expandableStyle": [1, "expandable-style"],
144
+ "listElementId": [514, "list-element-id"],
46
145
  "size": [513],
47
- "dividerType": [513, "divider-type"],
48
- "dividerSize": [513, "divider-size"],
49
- "dividerColor": [513, "divider-color"],
146
+ "color": [513],
147
+ "disabled": [516],
148
+ "listElementPosition": [513, "list-element-position"],
50
149
  "listType": [513, "list-type"],
51
- "hasTreeItems": [4, "has-tree-items"]
52
- }]);
150
+ "hasTreeItems": [4, "has-tree-items"],
151
+ "role": [513],
152
+ "htmlTabindex": [2, "html-tabindex"],
153
+ "showInnerContent": [32]
154
+ }, [[4, "accessibleFocus", "accessibleFocusHandler"]]]);
53
155
  function defineCustomElement() {
54
156
  if (typeof customElements === "undefined") {
55
157
  return;
56
158
  }
57
- const components = ["z-list-group", "z-divider"];
159
+ const components = ["z-list-element", "z-divider", "z-icon"];
58
160
  components.forEach(tagName => { switch (tagName) {
59
- case "z-list-group":
161
+ case "z-list-element":
60
162
  if (!customElements.get(tagName)) {
61
- customElements.define(tagName, ZListGroup);
163
+ customElements.define(tagName, ZListElement);
62
164
  }
63
165
  break;
64
166
  case "z-divider":
167
+ if (!customElements.get(tagName)) {
168
+ defineCustomElement$2();
169
+ }
170
+ break;
171
+ case "z-icon":
65
172
  if (!customElements.get(tagName)) {
66
173
  defineCustomElement$1();
67
174
  }
@@ -69,6 +176,6 @@ function defineCustomElement() {
69
176
  } });
70
177
  }
71
178
 
72
- export { ZListGroup as Z, defineCustomElement as d };
179
+ export { ZListElement as Z, defineCustomElement as d };
73
180
 
74
181
  //# sourceMappingURL=index15.js.map
@@ -1 +1 @@
1
- {"file":"index15.js","mappings":";;;;AAAA,MAAM,SAAS,GAAG,+fAA+f,CAAC;AAClhB,yBAAe,SAAS;;MCOX,UAAU;;;;;oBAOH,QAAQ,CAAC,MAAM;2BAMD,eAAe,CAAC,IAAI;2BAMxB,WAAW,CAAC,KAAK;4BAMrB,SAAS;wBAMX,QAAQ,CAAC,IAAI;;;IAUnC,gBAAgB;QACd,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;QACpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACxC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,EAAE;gBAC3B,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,cAAc,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC3D,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,cAAc,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC3D,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,eAAe,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;aAC9D;YACD,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YAC5C,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YACrD,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,uBAAuB,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;SACjE;KACF;IAED,iBAAiB;QACf,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC;KACrE;IAED,MAAM;QACJ,QACE,EAAC,IAAI,qDAAC,IAAI,EAAC,OAAO,IAChB,4DACE,KAAK,EAAE;gBACL,+BAA+B,EAAE,IAAI;gBACrC,YAAY,EAAE,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,YAAY;gBAClD,0BAA0B,EAAE,IAAI,CAAC,YAAY;aAC9C,IAED,6DAAM,IAAI,EAAC,cAAc,GAAG,EAC3B,IAAI,CAAC,WAAW,KAAK,eAAe,CAAC,MAAM,KAC1C,kEACE,KAAK,EAAE,IAAI,CAAC,YAAY,EACxB,IAAI,EAAE,IAAI,CAAC,WAAW,GACtB,CACH,CACG,EACN,8DAAQ,CACH,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/list/z-list-group/styles.css?tag=z-list-group&encapsulation=shadow","src/components/list/z-list-group/index.tsx"],"sourcesContent":[":host {\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\n:host > .z-list-group-header-container {\n color: var(--gray700);\n font-size: var(--font-size-2);\n font-weight: var(--font-sb) !important;\n letter-spacing: 0.16px;\n line-height: 1.4;\n}\n\n:host > .z-list-group-header-container.has-header {\n padding-top: var(--space-unit);\n padding-bottom: var(--space-unit);\n}\n\n:host > .z-list-group-header-container.has-header > z-divider {\n margin-top: var(--space-unit);\n}\n\n:host > .grouped-tree-list-header {\n padding-top: var(--space-unit);\n padding-bottom: 0;\n}\n","import {Component, Element, h, Host, Prop} from \"@stencil/core\";\nimport {DividerSize, ListDividerType, ListSize, ListType} from \"../../../beans\";\n\n@Component({\n tag: \"z-list-group\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZListGroup {\n @Element() host: HTMLZListGroupElement;\n\n /**\n * [optional] Sets size of inside elements.\n */\n @Prop({reflect: true})\n size?: ListSize = ListSize.MEDIUM;\n\n /**\n * [optional] Sets the position where to insert the divider.\n */\n @Prop({reflect: true})\n dividerType?: ListDividerType = ListDividerType.NONE;\n\n /**\n * [optional] Sets the divider size.\n */\n @Prop({reflect: true})\n dividerSize?: DividerSize = DividerSize.SMALL;\n\n /**\n * [optional] Sets the divider color.\n */\n @Prop({reflect: true})\n dividerColor?: string = \"gray200\";\n\n /**\n * [optional] type of the list marker for each element\n */\n @Prop({reflect: true})\n listType?: ListType = ListType.NONE;\n\n /**\n * [optional] check for tree items in grouped lists\n */\n @Prop()\n hasTreeItems?: boolean;\n\n private hasHeader: boolean;\n\n componentDidLoad(): void {\n const children = this.host.children;\n for (let i = 0; i < children.length; i++) {\n if (children.length - 1 > i) {\n children[i].setAttribute(\"divider-type\", this.dividerType);\n children[i].setAttribute(\"divider-size\", this.dividerSize);\n children[i].setAttribute(\"divider-color\", this.dividerColor);\n }\n children[i].setAttribute(\"size\", this.size);\n children[i].setAttribute(\"list-type\", this.listType);\n children[i].setAttribute(\"list-element-position\", i.toString());\n }\n }\n\n componentWillLoad(): void {\n this.hasHeader = !!this.host.querySelector('[slot=\"header-title\"]');\n }\n\n render(): HTMLZListGroupElement {\n return (\n <Host role=\"group\">\n <div\n class={{\n \"z-list-group-header-container\": true,\n \"has-header\": this.hasHeader && !this.hasTreeItems,\n \"grouped-tree-list-header\": this.hasTreeItems,\n }}\n >\n <slot name=\"header-title\" />\n {this.dividerType === ListDividerType.HEADER && (\n <z-divider\n color={this.dividerColor}\n size={this.dividerSize}\n />\n )}\n </div>\n <slot />\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"index15.js","mappings":";;;;;AAAA,MAAM,SAAS,GAAG,2oEAA2oE,CAAC;AAC9pE,2BAAe,SAAS;;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,EAAC,0BAA0B,IAClC,IAAI,CAAC,sBAAsB,EAAE,EAC7B,IAAI,CAAC,aAAa,EAAE,CACjB,EACL,IAAI,CAAC,qBAAqB,EAAE,CACzB,EACL,IAAI,CAAC,WAAW,KAAK,eAAe,CAAC,OAAO,KAC3C,kEACE,KAAK,EAAE,EAAC,qBAAqB,EAAE,IAAI,CAAC,YAAY,EAAC,EACjD,KAAK,EAAE,IAAI,CAAC,YAAY,EACxB,IAAI,EAAE,IAAI,CAAC,WAAW,GACtB,CACH,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/list/z-list-element/styles.css?tag=z-list-element&encapsulation=shadow","src/components/list/z-list-element/index.tsx"],"sourcesContent":[":host {\n outline: none;\n}\n\n:host > .container {\n --background-color-list-element: ;\n --background-hover-color-list-element: ;\n --background-active-color-list-element: ;\n\n display: flex;\n box-sizing: border-box;\n flex-direction: column;\n justify-content: center;\n background-color: var(--background-color-list-element, var(--color-surface01));\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n outline: none;\n}\n\n/* z-list-element size */\n\n:host([size=\"small\"]) > .container {\n min-height: calc(var(--space-unit) * 4);\n padding: calc(var(--space-unit) / 2) 0;\n}\n\n:host([size=\"medium\"]) > .container {\n min-height: calc(var(--space-unit) * 5);\n padding: var(--space-unit) 0;\n}\n\n:host([size=\"medium\"]) > .tree-element-container {\n padding-top: var(--space-unit);\n padding-bottom: 0;\n}\n\n:host([size=\"large\"]) > .container {\n min-height: calc(var(--space-unit) * 7);\n padding: calc(var(--space-unit) * 2) 0;\n}\n\n:host([size=\"x-large\"]) > .container {\n min-height: calc(var(--space-unit) * 9);\n padding: calc(var(--space-unit) * 3) 0;\n}\n\n/* ----------------- */\n\n:host([expandable]) > .container,\n:host([clickable]) > .container {\n cursor: pointer;\n}\n\n:host([expandable]:hover) > .container,\n:host([clickable]:hover) > .container {\n background-color: var(--background-hover-color-list-element, var(--color-background));\n}\n\n:host([expandable]:focus:focus-visible) > .container,\n:host([clickable]:focus:focus-visible) > .container {\n position: relative;\n z-index: 1;\n box-shadow: var(--shadow-focus-primary);\n}\n\n:host([expandable]:active) > .container,\n:host([clickable]:active) > .container {\n background-color: var(--background-active-color-list-element, var(--color-background));\n}\n\n:host([align-button=\"left\"][expandable]) > .container > .z-list-element-container {\n display: flex;\n}\n\n:host([align-button=\"right\"][expandable]) > .container > .z-list-element-container {\n display: flex;\n flex-direction: row-reverse;\n justify-content: space-between;\n}\n\n:host([align-button=\"left\"][expandable]) > .container > .z-list-element-container > z-icon {\n margin-right: var(--space-unit);\n}\n\n:host([align-button=\"right\"][expandable]) > .container > .z-list-element-container > z-icon {\n margin-left: var(--space-unit);\n}\n\n:host > .container > .z-list-element-inner-container {\n display: none;\n}\n\n:host > .container > .z-list-element-inner-container.expanded {\n display: block;\n}\n\n.z-list-content-container {\n display: flex;\n align-items: center;\n}\n\n:host .z-tree-list-divider {\n position: absolute;\n z-index: 100;\n left: 0;\n}\n\n:host([disabled]) > .container {\n color: var(--color-form-disabled03);\n cursor: default;\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Listen, Prop, State} from \"@stencil/core\";\nimport {\n DividerSize,\n ExpandableListButtonAlign,\n ExpandableListStyle,\n KeyboardCode,\n ListDividerType,\n ListSize,\n ListType,\n} from \"../../../beans\";\n\n@Component({\n tag: \"z-list-element\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZListElement {\n @Element() host: HTMLZListElementElement;\n\n /** remove filter click event, returns filterid */\n @Event({\n eventName: \"accessibleFocus\",\n composed: true,\n cancelable: true,\n bubbles: true,\n })\n accessibleFocus: EventEmitter<number>;\n\n /** set parent aria-activedescendant on focus event, returns filterid */\n @Event({\n eventName: \"ariaDescendantFocus\",\n composed: true,\n cancelable: true,\n bubbles: true,\n })\n ariaDescendantFocus: EventEmitter<number>;\n\n /** remove filter click event, returns filterid */\n @Event({\n eventName: \"clickItem\",\n composed: true,\n cancelable: true,\n bubbles: true,\n })\n clickItem: EventEmitter;\n\n @Listen(\"accessibleFocus\", {target: \"document\"})\n accessibleFocusHandler(e: CustomEvent): void {\n if (this.listElementId === e.detail) {\n const toFocus = this.host.shadowRoot.getElementById(`z-list-element-id-${e.detail}`);\n toFocus.focus();\n }\n }\n\n /**\n * [optional] Align expandable button left or right.\n */\n @Prop({reflect: true})\n alignButton?: ExpandableListButtonAlign = ExpandableListButtonAlign.LEFT;\n\n /**\n * [optional] Sets element clickable.\n */\n @Prop({reflect: true})\n clickable?: boolean = false;\n\n /**\n * [optional] Sets the divider color.\n */\n @Prop()\n dividerColor?: string = \"color-surface03\";\n\n /**\n * [optional] Sets the position where to insert the divider.\n */\n @Prop()\n dividerType?: ListDividerType = ListDividerType.NONE;\n\n /**\n * [optional] Sets the divider size.\n */\n @Prop()\n dividerSize?: DividerSize = DividerSize.SMALL;\n\n /**\n * [optional] Sets element as expandable.\n */\n @Prop({reflect: true})\n expandable?: boolean = false;\n\n /**\n * [optional] Sets expandable style to element.\n */\n @Prop()\n expandableStyle?: ExpandableListStyle = ExpandableListStyle.ACCORDION;\n\n /**\n * [optional] List element id.\n */\n @Prop({reflect: true})\n listElementId?: number;\n\n /**\n * [optional] Sets size of inside elements.\n */\n @Prop({reflect: true})\n size?: ListSize = ListSize.MEDIUM;\n\n /**\n * [optional] Sets text color of the element.\n */\n @Prop({reflect: true})\n color?: string = \"none\";\n\n /**\n * [optional] Sets disabled style of the element.\n */\n @Prop({reflect: true})\n disabled?: boolean = false;\n\n /**\n * [optional] position of the list element inside the list or the group\n */\n @Prop({reflect: true})\n listElementPosition?: string = \"0\";\n\n /**\n * [optional] type of the list marker for each element\n */\n @Prop({reflect: true})\n listType?: ListType = ListType.NONE;\n\n /**\n * [optional] Sets element as tree item.\n */\n @Prop()\n hasTreeItems?: boolean;\n\n /**\n * Sets element role.\n */\n @Prop({reflect: true})\n role = \"listitem\";\n\n /** set tabindex to Host tag (optional). Defaults to 0. */\n @Prop()\n htmlTabindex?: number | null = 0;\n\n @State()\n showInnerContent = false;\n\n private openElementConfig = {\n accordion: {\n open: \"minus-circled\",\n close: \"plus-circled\",\n },\n menu: {\n open: \"chevron-up\",\n close: \"chevron-down\",\n },\n };\n\n /**\n * Constructor.\n */\n constructor() {\n this.handleClick = this.handleClick.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n }\n\n /**\n * Handler for click on element. If element is expandable, change state.\n * @returns void\n */\n private handleClick(): void {\n if (this.disabled) {\n return;\n }\n\n this.clickItem.emit(this.listElementId);\n if (!this.expandable) {\n return;\n }\n this.showInnerContent = !this.showInnerContent;\n }\n\n private handleKeyDown(event): void {\n const expandByKey = event.code === KeyboardCode.ENTER;\n switch (event.code) {\n case KeyboardCode.ARROW_DOWN:\n event.preventDefault();\n this.accessibleFocus.emit(this.listElementId + 1);\n break;\n case KeyboardCode.ARROW_UP:\n event.preventDefault();\n this.accessibleFocus.emit(this.listElementId - 1);\n break;\n case KeyboardCode.ENTER:\n event.preventDefault();\n this.clickItem.emit(this.listElementId);\n break;\n default:\n break;\n }\n\n if (!this.expandable || !expandByKey) {\n return;\n }\n this.showInnerContent = !this.showInnerContent;\n }\n\n /**\n * Renders button to expand element.\n * @returns expadable button\n */\n private renderExpandableButton(): HTMLZIconElement {\n if (!this.expandable) {\n return null;\n }\n\n return (\n <z-icon\n name={\n this.showInnerContent\n ? this.openElementConfig[this.expandableStyle].open\n : this.openElementConfig[this.expandableStyle].close\n }\n />\n );\n }\n\n /**\n * Renders expanded content if element is expandable.\n * @returns expanded content\n */\n private renderExpandedContent(): HTMLDivElement {\n if (!this.expandable) {\n return null;\n }\n\n return (\n <div\n class={{\n \"z-list-element-inner-container\": true,\n \"expanded\": this.showInnerContent,\n }}\n >\n <slot name=\"inner-content\" />\n </div>\n );\n }\n\n /**\n * Renders content of the z-list-element\n * @returns list content\n */\n private renderContent(): HTMLDivElement {\n if (this.listType === ListType.NONE) {\n return <slot />;\n }\n\n if (this.listType === ListType.ORDERED) {\n return (\n <div class=\"z-list-content-container\">\n <div>{this.listElementPosition}.&emsp;</div>\n <slot />\n </div>\n );\n }\n\n if (this.listType === ListType.UNORDERED) {\n return (\n <div class=\"z-list-content-container\">\n <span>&bull;&emsp;</span>\n <slot />\n </div>\n );\n }\n }\n\n render(): HTMLZListElementElement {\n return (\n <Host\n aria-expanded={this.expandable ? this.showInnerContent : null}\n onClick={this.handleClick}\n onFocus={() => this.ariaDescendantFocus.emit(this.listElementId)}\n onKeyDown={this.handleKeyDown}\n clickable={this.clickable && !this.disabled}\n tabIndex={this.hasTreeItems ? undefined : this.htmlTabindex}\n role={this.hasTreeItems ? \"none\" : this.role}\n >\n <div\n class={this.hasTreeItems ? \"tree-element-container\" : \"container\"}\n style={!this.disabled && {color: `var(--${this.color})`}}\n tabindex=\"-1\"\n id={`z-list-element-id-${this.listElementId}`}\n part=\"list-item-container\"\n >\n <div class=\"z-list-element-container\">\n {this.renderExpandableButton()}\n {this.renderContent()}\n </div>\n {this.renderExpandedContent()}\n </div>\n {this.dividerType === ListDividerType.ELEMENT && (\n <z-divider\n class={{\"z-tree-list-divider\": this.hasTreeItems}}\n color={this.dividerColor}\n size={this.dividerSize}\n />\n )}\n </Host>\n );\n }\n}\n"],"version":3}