@zanichelli/albe-web-components 4.2.0 → 5.1.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 (273) hide show
  1. package/dist/cjs/{index-0e75c8cc.js → index-bc9a5c2b.js} +53 -13
  2. package/dist/cjs/index.cjs.js +2 -2
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{utils-97262bbd.js → utils-2fa62b67.js} +1 -1
  5. package/dist/cjs/{utils-155eec04.js → utils-40bb75b1.js} +1 -2
  6. package/dist/cjs/web-components-library.cjs.js +1 -1
  7. package/dist/cjs/z-app-switcher_9.cjs.entry.js +3 -3
  8. package/dist/cjs/z-aria-alert.cjs.entry.js +1 -1
  9. package/dist/cjs/z-avatar.cjs.entry.js +1 -1
  10. package/dist/cjs/z-button-deprecated.cjs.entry.js +1 -1
  11. package/dist/cjs/z-button.cjs.entry.js +4 -6
  12. package/dist/cjs/z-card.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 +2 -2
  15. package/dist/cjs/z-contextual-menu.cjs.entry.js +3 -3
  16. package/dist/cjs/z-cookiebar.cjs.entry.js +1 -1
  17. package/dist/cjs/z-date-picker.cjs.entry.js +2 -2
  18. package/dist/cjs/z-file-upload.cjs.entry.js +2 -2
  19. package/dist/cjs/z-file.cjs.entry.js +2 -2
  20. package/dist/cjs/z-footer.cjs.entry.js +1 -1
  21. package/dist/cjs/z-info-reveal.cjs.entry.js +64 -0
  22. package/dist/cjs/z-input-deprecated.cjs.entry.js +2 -2
  23. package/dist/cjs/z-input-label_2.cjs.entry.js +2 -2
  24. package/dist/cjs/z-list-group.cjs.entry.js +1 -1
  25. package/dist/cjs/z-list_2.cjs.entry.js +1 -1
  26. package/dist/cjs/z-menu-dropdown_2.cjs.entry.js +2 -2
  27. package/dist/cjs/z-messages-pocket.cjs.entry.js +1 -1
  28. package/dist/cjs/z-modal-login.cjs.entry.js +1 -1
  29. package/dist/cjs/z-myz-card-alert.cjs.entry.js +1 -1
  30. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
  31. package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -1
  32. package/dist/cjs/z-myz-card-info.cjs.entry.js +3 -3
  33. package/dist/cjs/z-myz-card_4.cjs.entry.js +1 -1
  34. package/dist/cjs/z-myz-list-item.cjs.entry.js +2 -2
  35. package/dist/cjs/z-myz-topbar.cjs.entry.js +1 -1
  36. package/dist/cjs/z-navigation-tab-link.cjs.entry.js +1 -1
  37. package/dist/cjs/z-navigation-tab.cjs.entry.js +1 -1
  38. package/dist/cjs/z-navigation-tabs.cjs.entry.js +1 -1
  39. package/dist/cjs/z-offcanvas.cjs.entry.js +1 -1
  40. package/dist/cjs/z-otp.cjs.entry.js +1 -1
  41. package/dist/cjs/z-pagination-bar.cjs.entry.js +2 -2
  42. package/dist/cjs/z-pocket_3.cjs.entry.js +2 -2
  43. package/dist/cjs/z-popover-deprecated.cjs.entry.js +97 -303
  44. package/dist/cjs/z-popover.cjs.entry.js +26 -29
  45. package/dist/cjs/z-section-title.cjs.entry.js +1 -1
  46. package/dist/cjs/z-skip-to-content.cjs.entry.js +2 -2
  47. package/dist/cjs/z-slideshow.cjs.entry.js +2 -2
  48. package/dist/cjs/z-status-tag.cjs.entry.js +1 -1
  49. package/dist/cjs/z-table-cell.cjs.entry.js +1 -1
  50. package/dist/cjs/z-table-header.cjs.entry.js +3 -3
  51. package/dist/cjs/z-table-row.cjs.entry.js +1 -1
  52. package/dist/cjs/z-table.cjs.entry.js +1 -1
  53. package/dist/cjs/z-toast-notification-list.cjs.entry.js +1 -1
  54. package/dist/cjs/z-toast-notification.cjs.entry.js +1 -1
  55. package/dist/cjs/z-toggle-switch.cjs.entry.js +2 -2
  56. package/dist/cjs/z-tooltip-deprecated.cjs.entry.js +26 -26
  57. package/dist/cjs/z-tooltip.cjs.entry.js +2 -2
  58. package/dist/collection/beans/index.js +53 -13
  59. package/dist/collection/collection-manifest.json +1 -0
  60. package/dist/collection/components/buttons/z-button/index.js +5 -7
  61. package/dist/collection/components/buttons/z-button/styles.css +23 -23
  62. package/dist/collection/components/file-upload/z-file/index.js +1 -1
  63. package/dist/collection/components/notification/z-tooltip/index.js +3 -3
  64. package/dist/collection/components/z-contextual-menu/index.js +3 -3
  65. package/dist/collection/components/z-contextual-menu/styles.css +5 -1
  66. package/dist/collection/components/z-info-reveal/index.js +143 -0
  67. package/dist/collection/components/z-info-reveal/styles.css +97 -0
  68. package/dist/collection/components/z-popover/index.js +30 -32
  69. package/dist/collection/components/z-table/z-table-header/index.js +1 -1
  70. package/dist/collection/deprecated/z-popover-deprecated/index.js +173 -368
  71. package/dist/collection/deprecated/z-popover-deprecated/styles.css +188 -86
  72. package/dist/collection/deprecated/z-tooltip-deprecated/index.js +27 -27
  73. package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
  74. package/dist/esm/{index-c1ce8cab.js → index-e3640537.js} +54 -14
  75. package/dist/esm/index.js +2 -2
  76. package/dist/esm/loader.js +1 -1
  77. package/dist/esm/{utils-fa9f38ec.js → utils-c1f651ae.js} +1 -2
  78. package/dist/esm/{utils-99c70c57.js → utils-f3d44cb3.js} +1 -1
  79. package/dist/esm/web-components-library.js +1 -1
  80. package/dist/esm/z-app-switcher_9.entry.js +3 -3
  81. package/dist/esm/z-aria-alert.entry.js +1 -1
  82. package/dist/esm/z-avatar.entry.js +1 -1
  83. package/dist/esm/z-button-deprecated.entry.js +1 -1
  84. package/dist/esm/z-button.entry.js +4 -6
  85. package/dist/esm/z-card.entry.js +1 -1
  86. package/dist/esm/z-chip.entry.js +2 -2
  87. package/dist/esm/z-combobox.entry.js +2 -2
  88. package/dist/esm/z-contextual-menu.entry.js +3 -3
  89. package/dist/esm/z-cookiebar.entry.js +1 -1
  90. package/dist/esm/z-date-picker.entry.js +2 -2
  91. package/dist/esm/z-file-upload.entry.js +2 -2
  92. package/dist/esm/z-file.entry.js +2 -2
  93. package/dist/esm/z-footer.entry.js +1 -1
  94. package/dist/esm/z-info-reveal.entry.js +60 -0
  95. package/dist/esm/z-input-deprecated.entry.js +2 -2
  96. package/dist/esm/z-input-label_2.entry.js +2 -2
  97. package/dist/esm/z-list-group.entry.js +1 -1
  98. package/dist/esm/z-list_2.entry.js +1 -1
  99. package/dist/esm/z-menu-dropdown_2.entry.js +2 -2
  100. package/dist/esm/z-messages-pocket.entry.js +1 -1
  101. package/dist/esm/z-modal-login.entry.js +1 -1
  102. package/dist/esm/z-myz-card-alert.entry.js +1 -1
  103. package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
  104. package/dist/esm/z-myz-card-footer.entry.js +1 -1
  105. package/dist/esm/z-myz-card-info.entry.js +3 -3
  106. package/dist/esm/z-myz-card_4.entry.js +1 -1
  107. package/dist/esm/z-myz-list-item.entry.js +2 -2
  108. package/dist/esm/z-myz-topbar.entry.js +1 -1
  109. package/dist/esm/z-navigation-tab-link.entry.js +1 -1
  110. package/dist/esm/z-navigation-tab.entry.js +1 -1
  111. package/dist/esm/z-navigation-tabs.entry.js +1 -1
  112. package/dist/esm/z-offcanvas.entry.js +1 -1
  113. package/dist/esm/z-otp.entry.js +1 -1
  114. package/dist/esm/z-pagination-bar.entry.js +2 -2
  115. package/dist/esm/z-pocket_3.entry.js +2 -2
  116. package/dist/esm/z-popover-deprecated.entry.js +98 -304
  117. package/dist/esm/z-popover.entry.js +26 -29
  118. package/dist/esm/z-section-title.entry.js +1 -1
  119. package/dist/esm/z-skip-to-content.entry.js +2 -2
  120. package/dist/esm/z-slideshow.entry.js +2 -2
  121. package/dist/esm/z-status-tag.entry.js +1 -1
  122. package/dist/esm/z-table-cell.entry.js +1 -1
  123. package/dist/esm/z-table-header.entry.js +3 -3
  124. package/dist/esm/z-table-row.entry.js +1 -1
  125. package/dist/esm/z-table.entry.js +1 -1
  126. package/dist/esm/z-toast-notification-list.entry.js +1 -1
  127. package/dist/esm/z-toast-notification.entry.js +1 -1
  128. package/dist/esm/z-toggle-switch.entry.js +2 -2
  129. package/dist/esm/z-tooltip-deprecated.entry.js +26 -26
  130. package/dist/esm/z-tooltip.entry.js +2 -2
  131. package/dist/types/beans/index.d.ts +50 -13
  132. package/dist/types/components/buttons/z-button/index.d.ts +2 -3
  133. package/dist/types/components/z-info-reveal/index.d.ts +28 -0
  134. package/dist/types/components/z-popover/index.d.ts +3 -3
  135. package/dist/types/components.d.ts +61 -26
  136. package/dist/types/deprecated/z-popover-deprecated/index.d.ts +27 -51
  137. package/dist/web-components-library/index.esm.js +1 -1
  138. package/{www/build/p-78df5dbf.entry.js → dist/web-components-library/p-057981fe.entry.js} +1 -1
  139. package/dist/web-components-library/p-07949b90.entry.js +1 -0
  140. package/dist/web-components-library/p-0c37f467.entry.js +1 -0
  141. package/{www/build/p-cd88cead.entry.js → dist/web-components-library/p-0f185eb0.entry.js} +1 -1
  142. package/dist/web-components-library/{p-b9cc2dfc.entry.js → p-12125ca9.entry.js} +1 -1
  143. package/dist/web-components-library/{p-4be52491.entry.js → p-139b5241.entry.js} +1 -1
  144. package/dist/web-components-library/p-20d02305.js +1 -0
  145. package/dist/web-components-library/{p-8ddbbe24.entry.js → p-242501d5.entry.js} +1 -1
  146. package/dist/web-components-library/{p-1b1717c9.entry.js → p-26e314bc.entry.js} +1 -1
  147. package/dist/web-components-library/{p-b359a3b4.entry.js → p-28ecb1ae.entry.js} +1 -1
  148. package/{www/build/p-dd0efdbf.entry.js → dist/web-components-library/p-2931f7bc.entry.js} +1 -1
  149. package/dist/web-components-library/p-2954396f.entry.js +1 -0
  150. package/dist/web-components-library/{p-0f6edb58.entry.js → p-2c17e016.entry.js} +1 -1
  151. package/dist/web-components-library/{p-1eb357e8.entry.js → p-3496bd33.entry.js} +1 -1
  152. package/dist/web-components-library/{p-897f9491.entry.js → p-38716520.entry.js} +1 -1
  153. package/{www/build/p-870dabdc.entry.js → dist/web-components-library/p-3ab957bb.entry.js} +1 -1
  154. package/dist/web-components-library/p-3e564afc.entry.js +1 -0
  155. package/{www/build/p-55f09348.entry.js → dist/web-components-library/p-45810268.entry.js} +1 -1
  156. package/dist/web-components-library/{p-1d5aa37b.entry.js → p-46f58c91.entry.js} +1 -1
  157. package/{www/build/p-1a76a57d.entry.js → dist/web-components-library/p-4c857706.entry.js} +1 -1
  158. package/dist/web-components-library/{p-53dade4b.entry.js → p-5332ba48.entry.js} +1 -1
  159. package/{www/build/p-91ec5eb4.entry.js → dist/web-components-library/p-57888e02.entry.js} +1 -1
  160. package/dist/web-components-library/{p-99a562cb.entry.js → p-57f2ceae.entry.js} +1 -1
  161. package/dist/web-components-library/{p-fdd91263.entry.js → p-5889ec85.entry.js} +1 -1
  162. package/dist/web-components-library/{p-970bd07c.entry.js → p-598f6761.entry.js} +1 -1
  163. package/dist/web-components-library/{p-46aecb12.entry.js → p-6f731dfa.entry.js} +1 -1
  164. package/dist/web-components-library/{p-28e4abc4.entry.js → p-7a3cdf12.entry.js} +1 -1
  165. package/dist/web-components-library/{p-c042e745.entry.js → p-7aa19a55.entry.js} +1 -1
  166. package/dist/web-components-library/{p-805af37b.entry.js → p-7dfe73cf.entry.js} +1 -1
  167. package/dist/web-components-library/{p-d04f3cb6.entry.js → p-83f0796d.entry.js} +1 -1
  168. package/dist/web-components-library/{p-10be0462.entry.js → p-85bd1ff2.entry.js} +1 -1
  169. package/dist/web-components-library/{p-7f1cc90f.js → p-8c4c18e1.js} +1 -1
  170. package/dist/web-components-library/{p-15fa8ca4.entry.js → p-90a4883b.entry.js} +1 -1
  171. package/dist/web-components-library/p-967401ab.js +1 -0
  172. package/dist/web-components-library/{p-f78d6123.entry.js → p-969652eb.entry.js} +1 -1
  173. package/dist/web-components-library/{p-8ce4b2c4.entry.js → p-98298391.entry.js} +1 -1
  174. package/dist/web-components-library/p-a2e54d19.entry.js +1 -0
  175. package/dist/web-components-library/{p-bfc78a89.entry.js → p-adbca438.entry.js} +1 -1
  176. package/dist/web-components-library/{p-659fc25e.entry.js → p-b3e7dfbd.entry.js} +1 -1
  177. package/dist/web-components-library/{p-6bbd53ec.entry.js → p-b43e7b60.entry.js} +1 -1
  178. package/{www/build/p-eca4cb15.entry.js → dist/web-components-library/p-b4c75519.entry.js} +1 -1
  179. package/dist/web-components-library/{p-990b8236.entry.js → p-b8e8220f.entry.js} +1 -1
  180. package/{www/build/p-4d6f2f01.entry.js → dist/web-components-library/p-c07bcbd3.entry.js} +1 -1
  181. package/dist/web-components-library/{p-41f33f7b.entry.js → p-c1ebd436.entry.js} +1 -1
  182. package/{www/build/p-fbfaa699.entry.js → dist/web-components-library/p-c4892336.entry.js} +1 -1
  183. package/dist/web-components-library/{p-caa21a6f.entry.js → p-d09b89da.entry.js} +1 -1
  184. package/dist/web-components-library/{p-c8383456.entry.js → p-d5844db1.entry.js} +1 -1
  185. package/dist/web-components-library/{p-5dcbba4e.entry.js → p-d641ea46.entry.js} +1 -1
  186. package/dist/web-components-library/{p-6c52ed1b.entry.js → p-dad7bc20.entry.js} +1 -1
  187. package/dist/web-components-library/{p-e74b3fd9.entry.js → p-e3840215.entry.js} +1 -1
  188. package/{www/build/p-d6361790.entry.js → dist/web-components-library/p-e768fe51.entry.js} +1 -1
  189. package/dist/web-components-library/{p-053846df.entry.js → p-e815e82b.entry.js} +1 -1
  190. package/dist/web-components-library/{p-ff4a0f6f.entry.js → p-fde7105a.entry.js} +1 -1
  191. package/dist/web-components-library/{p-92895bce.entry.js → p-fed999af.entry.js} +1 -1
  192. package/dist/web-components-library/web-components-library.css +1 -1
  193. package/dist/web-components-library/web-components-library.esm.js +1 -1
  194. package/package.json +2 -2
  195. package/react/components.d.ts +1 -0
  196. package/react/components.js +4 -3
  197. package/react/components.js.map +1 -1
  198. package/www/build/index.esm.js +1 -1
  199. package/{dist/web-components-library/p-78df5dbf.entry.js → www/build/p-057981fe.entry.js} +1 -1
  200. package/www/build/p-07949b90.entry.js +1 -0
  201. package/www/build/p-0c37f467.entry.js +1 -0
  202. package/{dist/web-components-library/p-cd88cead.entry.js → www/build/p-0f185eb0.entry.js} +1 -1
  203. package/www/build/{p-b9cc2dfc.entry.js → p-12125ca9.entry.js} +1 -1
  204. package/www/build/{p-4be52491.entry.js → p-139b5241.entry.js} +1 -1
  205. package/www/build/p-20d02305.js +1 -0
  206. package/www/build/{p-8ddbbe24.entry.js → p-242501d5.entry.js} +1 -1
  207. package/www/build/{p-1b1717c9.entry.js → p-26e314bc.entry.js} +1 -1
  208. package/www/build/{p-b359a3b4.entry.js → p-28ecb1ae.entry.js} +1 -1
  209. package/{dist/web-components-library/p-dd0efdbf.entry.js → www/build/p-2931f7bc.entry.js} +1 -1
  210. package/www/build/p-2954396f.entry.js +1 -0
  211. package/www/build/{p-0f6edb58.entry.js → p-2c17e016.entry.js} +1 -1
  212. package/www/build/{p-1eb357e8.entry.js → p-3496bd33.entry.js} +1 -1
  213. package/www/build/{p-897f9491.entry.js → p-38716520.entry.js} +1 -1
  214. package/{dist/web-components-library/p-870dabdc.entry.js → www/build/p-3ab957bb.entry.js} +1 -1
  215. package/www/build/p-3e564afc.entry.js +1 -0
  216. package/www/build/p-418e5795.js +1 -0
  217. package/{dist/web-components-library/p-55f09348.entry.js → www/build/p-45810268.entry.js} +1 -1
  218. package/www/build/{p-1d5aa37b.entry.js → p-46f58c91.entry.js} +1 -1
  219. package/{dist/web-components-library/p-1a76a57d.entry.js → www/build/p-4c857706.entry.js} +1 -1
  220. package/www/build/p-4c9c83c0.css +1 -0
  221. package/www/build/{p-53dade4b.entry.js → p-5332ba48.entry.js} +1 -1
  222. package/{dist/web-components-library/p-91ec5eb4.entry.js → www/build/p-57888e02.entry.js} +1 -1
  223. package/www/build/{p-99a562cb.entry.js → p-57f2ceae.entry.js} +1 -1
  224. package/www/build/{p-fdd91263.entry.js → p-5889ec85.entry.js} +1 -1
  225. package/www/build/{p-970bd07c.entry.js → p-598f6761.entry.js} +1 -1
  226. package/www/build/{p-46aecb12.entry.js → p-6f731dfa.entry.js} +1 -1
  227. package/www/build/{p-28e4abc4.entry.js → p-7a3cdf12.entry.js} +1 -1
  228. package/www/build/{p-c042e745.entry.js → p-7aa19a55.entry.js} +1 -1
  229. package/www/build/{p-805af37b.entry.js → p-7dfe73cf.entry.js} +1 -1
  230. package/www/build/{p-d04f3cb6.entry.js → p-83f0796d.entry.js} +1 -1
  231. package/www/build/{p-10be0462.entry.js → p-85bd1ff2.entry.js} +1 -1
  232. package/www/build/{p-7f1cc90f.js → p-8c4c18e1.js} +1 -1
  233. package/www/build/{p-15fa8ca4.entry.js → p-90a4883b.entry.js} +1 -1
  234. package/www/build/p-967401ab.js +1 -0
  235. package/www/build/{p-f78d6123.entry.js → p-969652eb.entry.js} +1 -1
  236. package/www/build/{p-8ce4b2c4.entry.js → p-98298391.entry.js} +1 -1
  237. package/www/build/p-a2e54d19.entry.js +1 -0
  238. package/www/build/{p-bfc78a89.entry.js → p-adbca438.entry.js} +1 -1
  239. package/www/build/{p-659fc25e.entry.js → p-b3e7dfbd.entry.js} +1 -1
  240. package/www/build/{p-6bbd53ec.entry.js → p-b43e7b60.entry.js} +1 -1
  241. package/{dist/web-components-library/p-eca4cb15.entry.js → www/build/p-b4c75519.entry.js} +1 -1
  242. package/www/build/{p-990b8236.entry.js → p-b8e8220f.entry.js} +1 -1
  243. package/{dist/web-components-library/p-4d6f2f01.entry.js → www/build/p-c07bcbd3.entry.js} +1 -1
  244. package/www/build/{p-41f33f7b.entry.js → p-c1ebd436.entry.js} +1 -1
  245. package/{dist/web-components-library/p-fbfaa699.entry.js → www/build/p-c4892336.entry.js} +1 -1
  246. package/www/build/{p-caa21a6f.entry.js → p-d09b89da.entry.js} +1 -1
  247. package/www/build/{p-c8383456.entry.js → p-d5844db1.entry.js} +1 -1
  248. package/www/build/{p-5dcbba4e.entry.js → p-d641ea46.entry.js} +1 -1
  249. package/www/build/{p-6c52ed1b.entry.js → p-dad7bc20.entry.js} +1 -1
  250. package/www/build/{p-e74b3fd9.entry.js → p-e3840215.entry.js} +1 -1
  251. package/{dist/web-components-library/p-d6361790.entry.js → www/build/p-e768fe51.entry.js} +1 -1
  252. package/www/build/{p-053846df.entry.js → p-e815e82b.entry.js} +1 -1
  253. package/www/build/{p-ff4a0f6f.entry.js → p-fde7105a.entry.js} +1 -1
  254. package/www/build/{p-92895bce.entry.js → p-fed999af.entry.js} +1 -1
  255. package/www/build/web-components-library.css +1 -1
  256. package/www/build/web-components-library.esm.js +1 -1
  257. package/www/index.html +1 -1
  258. package/CHANGELOG.md +0 -1788
  259. package/dist/web-components-library/p-514719d2.entry.js +0 -1
  260. package/dist/web-components-library/p-b6cd034b.js +0 -1
  261. package/dist/web-components-library/p-e007cd0b.entry.js +0 -1
  262. package/dist/web-components-library/p-ed1cd6b1.js +0 -1
  263. package/dist/web-components-library/p-f26251dd.entry.js +0 -1
  264. package/dist/web-components-library/p-f61fd81e.entry.js +0 -1
  265. package/src-react/index.ts +0 -1
  266. package/www/build/p-514719d2.entry.js +0 -1
  267. package/www/build/p-975e9d42.js +0 -129
  268. package/www/build/p-b6cd034b.js +0 -1
  269. package/www/build/p-e007cd0b.entry.js +0 -1
  270. package/www/build/p-ed1cd6b1.js +0 -1
  271. package/www/build/p-f26251dd.entry.js +0 -1
  272. package/www/build/p-f61fd81e.entry.js +0 -1
  273. package/www/build/p-fcff1237.css +0 -812
@@ -0,0 +1,143 @@
1
+ import { Component, h, Prop, State, Watch, Element, Host, } from '@stencil/core';
2
+ import { InfoRevealPosition } from "../../beans";
3
+ /**
4
+ * Info reveal component.
5
+ *
6
+ * @slot - info to display in the info box. If more than one element has been slotted,
7
+ * by clicking on the panel it switches to the next info element.
8
+ * @cssprop --z-info-reveal-theme--surface - background color of the info reveal panel.
9
+ * @cssprop --z-info-reveal-theme--text - foreground color of the info reveal panel.
10
+ * @cssprop --z-info-reveal-shadow - shadow of the info reveal panel.
11
+ * @cssprop --z-info-reveal-max-width - max width of the info reveal panel.
12
+ */
13
+ export class ZInfoReveal {
14
+ constructor() {
15
+ /** Name of the icon for the open button */
16
+ this.icon = 'informationsource';
17
+ this.position = InfoRevealPosition.bottom_right;
18
+ /** Whether the info panel is open. */
19
+ this.open = false;
20
+ /** Current index for the info queue. */
21
+ this.currentIndex = null;
22
+ }
23
+ watchItems() {
24
+ Array.from(this.el.children).forEach((child, index) => {
25
+ if (this.currentIndex === index) {
26
+ child.setAttribute('data-current', '');
27
+ }
28
+ else {
29
+ child.removeAttribute('data-current');
30
+ }
31
+ });
32
+ }
33
+ /**
34
+ * Open the info box.
35
+ */
36
+ openInfoBox() {
37
+ this.currentIndex = 0;
38
+ this.open = true;
39
+ }
40
+ /**
41
+ * Close the info box.
42
+ */
43
+ closeInfoBox() {
44
+ this.open = false;
45
+ }
46
+ /**
47
+ * Navigate slotted info.
48
+ * It closes the info box after the last info has been navigated.
49
+ */
50
+ next() {
51
+ this.currentIndex = this.currentIndex + 1;
52
+ if (this.currentIndex === this.el.children.length) {
53
+ this.closeInfoBox();
54
+ }
55
+ }
56
+ render() {
57
+ return h(Host, { open: this.open },
58
+ h("button", { class: "z-info-reveal-trigger", onClick: this.openInfoBox.bind(this) },
59
+ this.label && h("span", { class: "z-info-reveal-label" }, this.label),
60
+ h("z-icon", { name: this.icon })),
61
+ this.open && h("div", { class: "info-box", onClick: this.next.bind(this), tabIndex: 0 },
62
+ h("slot", null),
63
+ h("button", { class: "z-info-reveal-close", onClick: this.closeInfoBox.bind(this) },
64
+ h("z-icon", { name: "close" }))));
65
+ }
66
+ static get is() { return "z-info-reveal"; }
67
+ static get encapsulation() { return "shadow"; }
68
+ static get originalStyleUrls() { return {
69
+ "$": ["styles.css"]
70
+ }; }
71
+ static get styleUrls() { return {
72
+ "$": ["styles.css"]
73
+ }; }
74
+ static get properties() { return {
75
+ "icon": {
76
+ "type": "string",
77
+ "mutable": false,
78
+ "complexType": {
79
+ "original": "string",
80
+ "resolved": "string",
81
+ "references": {}
82
+ },
83
+ "required": false,
84
+ "optional": true,
85
+ "docs": {
86
+ "tags": [],
87
+ "text": "Name of the icon for the open button"
88
+ },
89
+ "attribute": "icon",
90
+ "reflect": false,
91
+ "defaultValue": "'informationsource'"
92
+ },
93
+ "position": {
94
+ "type": "string",
95
+ "mutable": false,
96
+ "complexType": {
97
+ "original": "InfoRevealPositionBean",
98
+ "resolved": "\"bottom_left\" | \"bottom_right\" | \"top_left\" | \"top_right\"",
99
+ "references": {
100
+ "InfoRevealPositionBean": {
101
+ "location": "import",
102
+ "path": "../../beans"
103
+ }
104
+ }
105
+ },
106
+ "required": false,
107
+ "optional": true,
108
+ "docs": {
109
+ "tags": [],
110
+ "text": ""
111
+ },
112
+ "attribute": "position",
113
+ "reflect": true,
114
+ "defaultValue": "InfoRevealPosition.bottom_right"
115
+ },
116
+ "label": {
117
+ "type": "string",
118
+ "mutable": false,
119
+ "complexType": {
120
+ "original": "string",
121
+ "resolved": "string",
122
+ "references": {}
123
+ },
124
+ "required": false,
125
+ "optional": true,
126
+ "docs": {
127
+ "tags": [],
128
+ "text": "Text that appears on closed panel next to the open button."
129
+ },
130
+ "attribute": "label",
131
+ "reflect": false
132
+ }
133
+ }; }
134
+ static get states() { return {
135
+ "open": {},
136
+ "currentIndex": {}
137
+ }; }
138
+ static get elementRef() { return "el"; }
139
+ static get watchers() { return [{
140
+ "propName": "currentIndex",
141
+ "methodName": "watchItems"
142
+ }]; }
143
+ }
@@ -0,0 +1,97 @@
1
+ :host {
2
+ --z-info-reveal-theme--surface: var(--color-black);
3
+ --z-info-reveal-theme--text: var(--color-white);
4
+ --z-info-reveal-shadow: var(--shadow-2);
5
+ --z-info-reveal-max-width: 375px; /* defaults to average width of mobile devices */
6
+
7
+ position: relative;
8
+ display: flex;
9
+ width: fit-content;
10
+ background-color: var(--z-info-reveal-theme--surface);
11
+ color: var(--z-info-reveal-theme--text);
12
+ font-size: var(--font-size-3);
13
+ font-weight: var(--font-rg);
14
+ line-height: 1.5;
15
+ letter-spacing: 0;
16
+ }
17
+
18
+ button {
19
+ padding: 0;
20
+ background-color: transparent;
21
+ cursor: pointer;
22
+ border: none;
23
+ border-radius: 0;
24
+ color: inherit;
25
+ fill: currentColor;
26
+ font-family: inherit;
27
+ font-size: inherit;
28
+ font-weight: inherit;
29
+ line-height: inherit;
30
+ letter-spacing: inherit;
31
+ }
32
+
33
+ z-icon {
34
+ --z-icon-width: calc(var(--space-unit) * 3);
35
+ --z-icon-height: calc(var(--space-unit) * 3);
36
+ display: flex;
37
+ }
38
+
39
+ .z-info-reveal-trigger {
40
+ display: flex;
41
+ align-items: center;
42
+ width: fit-content;
43
+ height: 100%;
44
+ column-gap: calc(var(--space-unit) / 2);
45
+ padding: calc(var(--space-unit) / 2);
46
+ box-shadow: var(--z-info-reveal-shadow);
47
+ }
48
+
49
+ :host([position="top_left"]) .z-info-reveal-trigger,
50
+ :host([position="bottom_left"]) .z-info-reveal-trigger {
51
+ flex-direction: row-reverse;
52
+ }
53
+
54
+ :host([open]) .z-info-reveal-trigger {
55
+ box-shadow: none;
56
+ }
57
+
58
+ .info-box {
59
+ position: absolute;
60
+ display: flex;
61
+ max-width: var(--z-info-reveal-max-width);
62
+ column-gap: calc(var(--space-unit) / 2);
63
+ padding: calc(var(--space-unit) / 2);
64
+ background-color: var(--z-info-reveal-theme--surface);
65
+ box-shadow: var(--z-info-reveal-shadow);
66
+ cursor: pointer;
67
+ }
68
+
69
+ :host([position="top_right"]) .info-box,
70
+ :host([position="bottom_right"]) .info-box {
71
+ right: 0;
72
+ }
73
+
74
+ :host([position="top_left"]) .info-box,
75
+ :host([position="bottom_left"]) .info-box {
76
+ left: 0;
77
+ flex-direction: row-reverse;
78
+ }
79
+
80
+ ::slotted(*) {
81
+ display: none;
82
+ width: max-content;
83
+ }
84
+
85
+ ::slotted([data-current]) {
86
+ display: block;
87
+ }
88
+
89
+ :host([position="top_left"]) .z-info-reveal-close,
90
+ :host([position="top_right"]) .z-info-reveal-close {
91
+ align-self: flex-start;
92
+ }
93
+
94
+ :host([position="bottom_left"]) .z-info-reveal-close,
95
+ :host([position="bottom_right"]) .z-info-reveal-close {
96
+ align-self: flex-end;
97
+ }
@@ -1,6 +1,5 @@
1
1
  import { Component, Prop, h, Watch, Listen, Element, State, Event, } from "@stencil/core";
2
2
  import { PopoverPositions, KeyboardKeys } from "../../beans";
3
- import { getElementTree } from "../../utils/utils";
4
3
  const documentElement = document.documentElement;
5
4
  function getParentElement(element) {
6
5
  if (element.parentNode.host) {
@@ -99,7 +98,7 @@ function computeOffset(element, targetParentOffset) {
99
98
  export class ZPopover {
100
99
  constructor() {
101
100
  /** Popover position. */
102
- this.position = PopoverPositions.AUTO;
101
+ this.position = PopoverPositions.auto;
103
102
  /**
104
103
  * The open state of the popover.
105
104
  */
@@ -126,8 +125,7 @@ export class ZPopover {
126
125
  if (!this.closable) {
127
126
  return;
128
127
  }
129
- const tree = getElementTree(e.target);
130
- const parent = tree.find((elem) => elem.nodeName.toLowerCase() === "z-popover");
128
+ const parent = e.path.find((elem) => elem === this.host);
131
129
  if (!parent) {
132
130
  this.open = false;
133
131
  this.positionChange.emit({ position: this.currentPosition });
@@ -135,8 +133,8 @@ export class ZPopover {
135
133
  }
136
134
  validatePosition(newValue) {
137
135
  if (newValue &&
138
- Object.values(PopoverPositions).every((position) => newValue !== position)) {
139
- this.position = PopoverPositions.AUTO;
136
+ !Object.values(PopoverPositions).includes(newValue)) {
137
+ this.position = PopoverPositions.auto;
140
138
  }
141
139
  this.currentPosition = this.position;
142
140
  this.positionChange.emit({ position: this.currentPosition });
@@ -210,28 +208,28 @@ export class ZPopover {
210
208
  const availableWidth = availableLeft + availableRight + boundingRect.width;
211
209
  let position = this.currentPosition;
212
210
  const positions = [];
213
- if (this.position === PopoverPositions.AUTO) {
211
+ if (this.position === PopoverPositions.auto) {
214
212
  /**
215
213
  * The `AUTO` position tries to place the popover in the 'safest' area,
216
214
  * where there's more space available.
217
215
  */
218
216
  if (availableLeft / availableWidth > 0.6) {
219
- positions.push(PopoverPositions.LEFT);
217
+ positions.push(PopoverPositions.left);
220
218
  }
221
219
  else if (availableLeft / availableWidth < 0.4) {
222
- positions.push(PopoverPositions.RIGHT);
220
+ positions.push(PopoverPositions.right);
223
221
  }
224
222
  if (availableTop / availableHeight > 0.9) {
225
- positions.unshift(PopoverPositions.TOP);
223
+ positions.unshift(PopoverPositions.top);
226
224
  }
227
225
  else if (availableTop / availableHeight > 0.6) {
228
- positions.push(PopoverPositions.TOP);
226
+ positions.push(PopoverPositions.top);
229
227
  }
230
228
  else if (availableTop / availableHeight < 0.1) {
231
- positions.unshift(PopoverPositions.BOTTOM);
229
+ positions.unshift(PopoverPositions.bottom);
232
230
  }
233
231
  else {
234
- positions.push(PopoverPositions.BOTTOM);
232
+ positions.push(PopoverPositions.bottom);
235
233
  }
236
234
  position = positions.join("_");
237
235
  }
@@ -243,18 +241,18 @@ export class ZPopover {
243
241
  const offsetLeft = boundingRect.left - relativeBoundingRect.left;
244
242
  const offsetModifier = this.center ? 0.5 : 0;
245
243
  const sizeModifier = this.center ? 0.5 : 0;
246
- if (position === PopoverPositions.TOP ||
247
- position === PopoverPositions.TOP_RIGHT) {
244
+ if (position === PopoverPositions.top ||
245
+ position === PopoverPositions.top_right) {
248
246
  style.top = "auto";
249
247
  style.right = "auto";
250
248
  style.bottom = `${offsetBottom + boundingRect.height}px`;
251
249
  style.left = `${offsetLeft + boundingRect.width * offsetModifier}px`;
252
250
  style.maxHeight = `${availableTop}px`;
253
- if (position === PopoverPositions.TOP_RIGHT) {
251
+ if (position === PopoverPositions.top_right) {
254
252
  style.maxWidth = `${availableRight + boundingRect.width * sizeModifier}px`;
255
253
  }
256
254
  }
257
- else if (position === PopoverPositions.TOP_LEFT) {
255
+ else if (position === PopoverPositions.top_left) {
258
256
  style.top = "auto";
259
257
  style.right = `${offsetRight + boundingRect.width * offsetModifier}px`;
260
258
  style.bottom = `${offsetBottom + boundingRect.height}px`;
@@ -262,18 +260,18 @@ export class ZPopover {
262
260
  style.maxWidth = `${availableLeft}px`;
263
261
  style.maxHeight = `${availableTop}px`;
264
262
  }
265
- else if (position === PopoverPositions.BOTTOM ||
266
- position === PopoverPositions.BOTTOM_RIGHT) {
263
+ else if (position === PopoverPositions.bottom ||
264
+ position === PopoverPositions.bottom_right) {
267
265
  style.top = `${offsetTop + boundingRect.height}px`;
268
266
  style.right = "auto";
269
267
  style.bottom = "auto";
270
268
  style.left = `${offsetLeft + boundingRect.width * offsetModifier}px`;
271
269
  style.maxHeight = `${availableBottom}px`;
272
- if (position === PopoverPositions.BOTTOM_RIGHT) {
270
+ if (position === PopoverPositions.bottom_right) {
273
271
  style.maxWidth = `${availableRight + boundingRect.width * sizeModifier}px`;
274
272
  }
275
273
  }
276
- else if (position === PopoverPositions.BOTTOM_LEFT) {
274
+ else if (position === PopoverPositions.bottom_left) {
277
275
  style.top = `${offsetTop + boundingRect.height}px`;
278
276
  style.right = `${offsetRight + boundingRect.width * offsetModifier}px`;
279
277
  style.bottom = "auto";
@@ -281,8 +279,8 @@ export class ZPopover {
281
279
  style.maxWidth = `${availableLeft}px`;
282
280
  style.maxHeight = `${availableBottom}px`;
283
281
  }
284
- else if (position === PopoverPositions.RIGHT ||
285
- position === PopoverPositions.RIGHT_BOTTOM) {
282
+ else if (position === PopoverPositions.right ||
283
+ position === PopoverPositions.right_bottom) {
286
284
  style.top = `${offsetTop + boundingRect.height * offsetModifier}px`;
287
285
  style.right = "auto";
288
286
  style.bottom = "auto";
@@ -290,7 +288,7 @@ export class ZPopover {
290
288
  style.maxWidth = `${availableRight}px`;
291
289
  style.maxHeight = `${availableBottom + boundingRect.height * sizeModifier}px`;
292
290
  }
293
- else if (position === PopoverPositions.RIGHT_TOP) {
291
+ else if (position === PopoverPositions.right_top) {
294
292
  style.top = "auto";
295
293
  style.right = "auto";
296
294
  style.bottom = `${offsetBottom + boundingRect.height * offsetModifier}px`;
@@ -298,8 +296,8 @@ export class ZPopover {
298
296
  style.maxWidth = `${availableRight}px`;
299
297
  style.maxHeight = `${availableTop + boundingRect.height * sizeModifier}px`;
300
298
  }
301
- else if (position === PopoverPositions.LEFT ||
302
- position === PopoverPositions.LEFT_BOTTOM) {
299
+ else if (position === PopoverPositions.left ||
300
+ position === PopoverPositions.left_bottom) {
303
301
  style.top = `${offsetTop + boundingRect.height * offsetModifier}px`;
304
302
  style.right = `${offsetRight + boundingRect.width}px`;
305
303
  style.bottom = "auto";
@@ -307,7 +305,7 @@ export class ZPopover {
307
305
  style.maxWidth = `${availableLeft}px`;
308
306
  style.maxHeight = `${availableBottom + boundingRect.height * sizeModifier}px`;
309
307
  }
310
- else if (position === PopoverPositions.LEFT_TOP) {
308
+ else if (position === PopoverPositions.left_top) {
311
309
  style.top = "auto";
312
310
  style.right = `${offsetRight + boundingRect.width}px`;
313
311
  style.bottom = `${offsetBottom + boundingRect.height * offsetModifier}px`;
@@ -336,12 +334,12 @@ export class ZPopover {
336
334
  static get properties() { return {
337
335
  "position": {
338
336
  "type": "string",
339
- "mutable": true,
337
+ "mutable": false,
340
338
  "complexType": {
341
- "original": "PopoverPositions",
342
- "resolved": "PopoverPositions.AUTO | PopoverPositions.BOTTOM | PopoverPositions.BOTTOM_LEFT | PopoverPositions.BOTTOM_RIGHT | PopoverPositions.LEFT | PopoverPositions.LEFT_BOTTOM | PopoverPositions.LEFT_TOP | PopoverPositions.RIGHT | PopoverPositions.RIGHT_BOTTOM | PopoverPositions.RIGHT_TOP | PopoverPositions.TOP | PopoverPositions.TOP_LEFT | PopoverPositions.TOP_RIGHT",
339
+ "original": "PopoverPositionBean",
340
+ "resolved": "\"auto\" | \"bottom\" | \"bottom_left\" | \"bottom_right\" | \"left\" | \"left_bottom\" | \"left_top\" | \"right\" | \"right_bottom\" | \"right_top\" | \"top\" | \"top_left\" | \"top_right\"",
343
341
  "references": {
344
- "PopoverPositions": {
342
+ "PopoverPositionBean": {
345
343
  "location": "import",
346
344
  "path": "../../beans"
347
345
  }
@@ -355,7 +353,7 @@ export class ZPopover {
355
353
  },
356
354
  "attribute": "position",
357
355
  "reflect": true,
358
- "defaultValue": "PopoverPositions.AUTO"
356
+ "defaultValue": "PopoverPositions.auto"
359
357
  },
360
358
  "open": {
361
359
  "type": "boolean",
@@ -71,7 +71,7 @@ export class ZTableHeader {
71
71
  : "arrow-down", class: "arrow" }))),
72
72
  this.showButton && (h("div", { class: 'popover-container' },
73
73
  h("z-button", { ref: (el) => (this.triggerButton = el), class: "contextual-popover-button", icon: "contextual-menu", variant: ButtonVariantEnum["tertiary"], size: ButtonSizeEnum["x-small"], onClick: () => this.handleMenuClick() }),
74
- h("z-popover", { ref: (el) => (this.popover = el), position: PopoverPositions.BOTTOM, center: true, bindTo: this.triggerButton },
74
+ h("z-popover", { ref: (el) => (this.popover = el), position: PopoverPositions.bottom, center: true, bindTo: this.triggerButton },
75
75
  h("div", null,
76
76
  h("slot", { name: "contextual-menu" })))))));
77
77
  }