@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
@@ -1,333 +1,127 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement } from './index-90e18641.js';
2
- import { P as PopoverPositions, q as KeyboardKeys } from './index-c1ce8cab.js';
3
- import { a as getElementTree } from './utils-99c70c57.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-90e18641.js';
2
+ import { c as classnames } from './index-abb47b30.js';
3
+ import { r as PopoverPosition, s as PopoverBorderRadius, t as PopoverShadow, u as KeyboardKeys } from './index-e3640537.js';
4
+ import { a as getElementTree } from './utils-f3d44cb3.js';
5
+ import './_commonjsHelpers-9943807e.js';
4
6
  import './breakpoints-c386984e.js';
5
7
 
6
- const stylesCss = ":host{--z-popover-theme--surface:var(--color-surface01);--z-popover-theme--text:var(--color-text01);--z-popover-padding:var(--space-unit);--z-popover-shadow-filter:drop-shadow(0 1px 2px var(--shadow-color-base));--arrow-size:6px;--edge-offset:calc(-1 * (var(--arrow-size) + calc(var(--space-unit) * 2)));position:relative;display:flex;align-items:center;justify-content:center;padding:var(--z-popover-padding);min-width:calc(var(--space-unit) * 8);min-height:calc(var(--space-unit) * 4);color:var(--z-popover-theme--text);fill:currentColor;font-family:var(--font-family-sans);text-align:center;border-radius:var(--border-radius-small);background:var(--z-popover-theme--surface);filter:var(--z-popover-shadow-filter)}:host(:not([open])),:host([open=\"false\"]){display:none}:host([center][current-position='top']),:host([center][current-position='bottom']){transform:translateX(-50%)}:host([center][current-position='right']),:host([center][current-position='left']){transform:translateY(-50%)}:host([current-position])::before{--arrow-edge-offset:calc(100% - var(--arrow-size) - var(--space-unit));--arrow-center-x-offset:calc(50% - calc(var(--arrow-size) / 2));--arrow-center-y-offset:calc(100% - calc(var(--arrow-size) / 2));display:block;content:'';position:absolute;width:var(--arrow-size);height:var(--arrow-size);background:var(--z-popover-theme--surface);transform:rotate(45deg)}:host([show-arrow=false])::before,:host(:not([show-arrow]))::before{display:none}:host([current-position^='top'])::before{top:var(--arrow-center-y-offset)}:host([current-position^='bottom'])::before{bottom:var(--arrow-center-y-offset)}:host([current-position='top'])::before,:host([current-position='bottom'])::before{left:var(--arrow-center-x-offset)}:host([current-position='right'])::before,:host([current-position='left'])::before{top:var(--arrow-center-x-offset)}:host([current-position='right'])::before{right:var(--arrow-center-y-offset)}:host([current-position='left'])::before{left:var(--arrow-center-y-offset)}:host([current-position='top_right'])::before,:host([current-position='bottom_right'])::before{right:calc(var(--arrow-edge-offset) + var(--arrow-size))}:host([current-position='top_right']:not([center]))::before,:host([current-position='bottom_right']:not([center]))::before,:host([current-position='top_right'][center=\"false\"])::before,:host([current-position='bottom_right'][center=\"false\"])::before{right:calc(var(--arrow-edge-offset) - var(--arrow-size) + 1px)}:host([current-position='top_left'])::before,:host([current-position='bottom_left'])::before{left:calc(var(--arrow-edge-offset) + var(--arrow-size))}:host([current-position='top_left']:not([center]))::before,:host([current-position='bottom_left']:not([center]))::before,:host([current-position='top_left'][center=\"false\"])::before,:host([current-position='bottom_left'][center=\"false\"])::before{left:calc(var(--arrow-edge-offset) - var(--arrow-size) + 1px)}:host([current-position='right_top'])::before,:host([current-position='left_top'])::before{bottom:var(--arrow-size)}:host([current-position='right_top'])::before,:host([current-position='right_bottom'])::before{right:var(--arrow-center-y-offset)}:host([current-position='left_top'])::before,:host([current-position='left_bottom'])::before{left:var(--arrow-center-y-offset)}:host([current-position='right_bottom'])::before,:host([current-position='left_bottom'])::before{top:var(--arrow-size)}::slotted(*){flex:1 auto;overflow:auto}";
8
+ const stylesCss = ".sc-z-popover-deprecated-h{font-family:var(--dashboard-font);font-weight:var(--font-rg);position:relative;display:inline-block;--shadow-arrow-color:rgba(66, 69, 72, 0.2);--shadow-arrow-below-color:rgba(66, 69, 72, 0.1)}.popover-content-container.sc-z-popover-deprecated{box-sizing:border-box;visibility:hidden;position:absolute;min-width:64px;min-height:32px;z-index:999}.popover-content-container.visible.sc-z-popover-deprecated{visibility:visible}.popover-content-container.border-radius-none.sc-z-popover-deprecated{border-radius:0}.popover-content-container.border-radius-small.sc-z-popover-deprecated{border-radius:var(--border-radius-small)}.popover-content-container.border-radius-medium.sc-z-popover-deprecated{border-radius:var(--border-radius)}.popover-content-container.shadow-1.sc-z-popover-deprecated{box-shadow:var(--shadow-1)}.popover-content-container.shadow-2.sc-z-popover-deprecated{box-shadow:var(--shadow-2)}.popover-content-container.shadow-3.sc-z-popover-deprecated{box-shadow:var(--shadow-3)}.popover-content-container.shadow-4.sc-z-popover-deprecated{box-shadow:var(--shadow-4)}.popover-content-container.shadow-6.sc-z-popover-deprecated{box-shadow:var(--shadow-6)}.popover-content-container.shadow-8.sc-z-popover-deprecated{box-shadow:var(--shadow-8)}.popover-content-container.shadow-12.sc-z-popover-deprecated{box-shadow:var(--shadow-12)}.popover-content-container.shadow-16.sc-z-popover-deprecated{box-shadow:var(--shadow-16)}.popover-content-container.shadow-24.sc-z-popover-deprecated{box-shadow:var(--shadow-24)}.popover-content-container.after-down.sc-z-popover-deprecated{top:0;left:calc(100% + var(--space-unit))}.popover-content-container.after-center.sc-z-popover-deprecated{top:50%;left:calc(100% + var(--space-unit));transform:translateY(-50%)}.popover-content-container.after-up.sc-z-popover-deprecated{bottom:0;left:calc(100% + var(--space-unit))}.popover-content-container.below-right.sc-z-popover-deprecated{left:0;top:calc(100% + var(--space-unit))}.popover-content-container.below-center.sc-z-popover-deprecated{left:50%;top:calc(100% + var(--space-unit));transform:translateX(-50%)}.popover-content-container.below-left.sc-z-popover-deprecated{right:0;top:calc(100% + var(--space-unit))}.popover-content-container.before-down.sc-z-popover-deprecated{top:0;right:calc(100% + var(--space-unit))}.popover-content-container.before-center.sc-z-popover-deprecated{top:50%;right:calc(100% + var(--space-unit));transform:translateY(-50%)}.popover-content-container.before-up.sc-z-popover-deprecated{bottom:0;right:calc(100% + var(--space-unit))}.popover-content-container.above-right.sc-z-popover-deprecated{left:0;bottom:calc(100% + var(--space-unit))}.popover-content-container.above-center.sc-z-popover-deprecated{left:50%;bottom:calc(100% + var(--space-unit));transform:translateX(-50%)}.popover-content-container.above-left.sc-z-popover-deprecated{right:0;bottom:calc(100% + var(--space-unit))}.popover-content-container.sc-z-popover-deprecated:before{display:none;position:absolute;content:\"\";width:8px;height:8px;z-index:-1;background-color:inherit;transform:rotate(45deg)}.popover-content-container.after-down.sc-z-popover-deprecated:before{top:12px;left:-4px;box-shadow:-1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.after-center.sc-z-popover-deprecated:before{top:calc(50% - 4px);left:-4px;box-shadow:-1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.after-up.sc-z-popover-deprecated:before{bottom:12px;left:-4px;box-shadow:-1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.below-right.sc-z-popover-deprecated:before{left:12px;top:-4px;box-shadow:-1px -1px 2px var(--shadow-arrow-below-color)}.popover-content-container.below-center.sc-z-popover-deprecated:before{left:calc(50% - 4px);top:-4px;box-shadow:-1px -1px 2px var(--shadow-arrow-below-color)}.popover-content-container.below-left.sc-z-popover-deprecated:before{right:12px;top:-4px;box-shadow:-1px -1px 2px var(--shadow-arrow-below-color)}.popover-content-container.before-down.sc-z-popover-deprecated:before{top:12px;right:-4px;box-shadow:1px -1px 1.5px var(--shadow-arrow-color)}.popover-content-container.before-center.sc-z-popover-deprecated:before{top:calc(50% - 4px);right:-4px;box-shadow:1px -1px 1.5px var(--shadow-arrow-color)}.popover-content-container.before-up.sc-z-popover-deprecated:before{bottom:12px;right:-4px;box-shadow:1px -1px 1.5px var(--shadow-arrow-color)}.popover-content-container.above-right.sc-z-popover-deprecated:before{left:12px;bottom:-4px;box-shadow:1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.above-center.sc-z-popover-deprecated:before{left:calc(50% - 4px);bottom:-4px;box-shadow:1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.above-left.sc-z-popover-deprecated:before{right:12px;bottom:-4px;box-shadow:1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.show-arrow.sc-z-popover-deprecated:before{display:block}";
7
9
 
8
- const documentElement = document.documentElement;
9
- function getParentElement(element) {
10
- if (element.parentNode.host) {
11
- return element.parentNode.host;
12
- }
13
- return element.parentNode;
14
- }
15
- /**
16
- * Find the closest scrollable parent of a node.
17
- *
18
- * @param {Element} element The node
19
- */
20
- function findScrollableParent(element) {
21
- let parent = getParentElement(element);
22
- while (parent && parent !== documentElement) {
23
- const { overflow, overflowX, overflowY } = window.getComputedStyle(parent);
24
- if (overflow === "hidden" ||
25
- overflowY === "hidden" ||
26
- overflowX === "hidden") {
27
- return parent;
28
- }
29
- if ((parent.scrollHeight > parent.clientHeight &&
30
- overflow !== "visible" &&
31
- overflowY !== "visible") ||
32
- (parent.scrollWidth > parent.clientWidth &&
33
- overflow !== "visible" &&
34
- overflowX !== "visible")) {
35
- return parent;
36
- }
37
- parent = getParentElement(parent);
38
- }
39
- return documentElement;
40
- }
41
- /**
42
- * Calculate computed offset.
43
- * It includes matrix transformations.
44
- * @param element The target element.
45
- * @param targetParentOffset The relative offset parent.
46
- * @return A client rect object.
47
- */
48
- function computeOffset(element, targetParentOffset) {
49
- const rect = element.getBoundingClientRect();
50
- const width = rect.width;
51
- const height = rect.height;
52
- let top = 0;
53
- let left = 0;
54
- let offsetParent = element;
55
- while (offsetParent && offsetParent != targetParentOffset) {
56
- left += offsetParent.offsetLeft;
57
- // document.body sometimes has offsetTop == 0 but still has an
58
- // offset because of children margins!
59
- if (offsetParent === document.body) {
60
- top += offsetParent.getBoundingClientRect().top + window.scrollY;
61
- }
62
- else {
63
- top += offsetParent.offsetTop;
64
- }
65
- if (window.DOMMatrix) {
66
- const style = window.getComputedStyle(offsetParent);
67
- const transform = style.transform || style.webkitTransform;
68
- const domMatrix = new DOMMatrix(transform);
69
- if (domMatrix) {
70
- left += domMatrix.m41;
71
- if (offsetParent !== document.body) {
72
- top += domMatrix.m42;
73
- }
74
- }
75
- }
76
- if (!offsetParent.offsetParent) {
77
- break;
78
- }
79
- offsetParent = offsetParent.offsetParent;
80
- }
81
- let parentWidth;
82
- let parentHeight;
83
- if (offsetParent === document.body) {
84
- parentWidth = window.innerWidth;
85
- parentHeight = window.innerHeight;
86
- }
87
- else {
88
- parentWidth = offsetParent.offsetWidth;
89
- parentHeight = offsetParent.offsetHeight;
90
- }
91
- const right = parentWidth - left - rect.width;
92
- const bottom = parentHeight - top - rect.height;
93
- return { top, right, bottom, left, width, height };
94
- }
95
10
  const ZPopoverDeprecated = class {
11
+ /**
12
+ * Constructor.
13
+ */
96
14
  constructor(hostRef) {
97
15
  registerInstance(this, hostRef);
98
- this.positionChange = createEvent(this, "positionChange", 7);
99
- this.openChange = createEvent(this, "openChange", 7);
100
- /** Popover position. */
101
- this.position = PopoverPositions.AUTO;
102
- /**
103
- * The open state of the popover.
104
- */
105
- this.open = false;
106
- /**
107
- * Whether to show popover's arrow.
108
- */
16
+ this.triggerClick = createEvent(this, "triggerClick", 7);
17
+ /** [optional] Popover position */
18
+ this.position = PopoverPosition["after-up"];
19
+ /** [optional] Background color token for popover */
20
+ this.backgroundColor = "color-white";
21
+ /** [optional] Border radius token for popover */
22
+ this.borderRadius = PopoverBorderRadius.small;
23
+ /** [optional] Box shadow token for popover */
24
+ this.boxShadow = PopoverShadow["shadow-1"];
25
+ /** [optional] Show or hide arrow */
109
26
  this.showArrow = false;
110
- /**
111
- * Whether center the popup on the main side - according to "position".
112
- */
113
- this.center = false;
27
+ /** [optional] Sets padding for Popover container */
28
+ this.padding = "8px";
29
+ this.isVisible = false;
30
+ this.popoverPosition = this.position;
31
+ this.handleKeyDown = this.handleKeyDown.bind(this);
114
32
  }
115
- closePopoverWithKeyboard(e) {
116
- if (e.key === KeyboardKeys.ESC) {
117
- this.open = false;
118
- }
119
- }
120
- handleOutsideClick(e) {
121
- const tree = getElementTree(e.target);
122
- const parent = tree.find((elem) => elem.nodeName.toLowerCase() === "z-popover");
123
- if (!parent) {
124
- this.open = false;
125
- this.positionChange.emit({ position: this.currentPosition });
126
- }
33
+ emitTriggerClick() {
34
+ this.triggerClick.emit({
35
+ isVisible: this.isVisible,
36
+ });
127
37
  }
128
- validatePosition(newValue) {
129
- if (newValue &&
130
- Object.values(PopoverPositions).every((position) => newValue !== position)) {
131
- this.position = PopoverPositions.AUTO;
132
- }
133
- this.currentPosition = this.position;
134
- this.positionChange.emit({ position: this.currentPosition });
135
- }
136
- /**
137
- * Setup popover behaviors on opening.
138
- */
139
- onOpen() {
140
- cancelAnimationFrame(this.animationFrameRequestId);
141
- if (this.open) {
142
- const setPosition = () => {
143
- if (this.open) {
144
- this.setPosition();
145
- this.animationFrameRequestId = requestAnimationFrame(setPosition);
146
- }
147
- };
148
- setPosition();
149
- }
150
- else {
151
- const style = this.host.style;
152
- style.removeProperty("top");
153
- style.removeProperty("right");
154
- style.removeProperty("bottom");
155
- style.removeProperty("left");
156
- style.removeProperty("max-width");
157
- style.removeProperty("max-height");
158
- this.currentPosition = undefined;
159
- }
160
- this.openChange.emit({ open: this.open });
161
- }
162
- disconnectedCallback() {
163
- cancelAnimationFrame(this.animationFrameRequestId);
164
- }
165
- /**
166
- * Set the position of the popover.
167
- */
168
- setPosition() {
169
- let element;
170
- if (typeof this.bindTo === "string") {
171
- element = this.host.ownerDocument.querySelector(this.bindTo);
172
- }
173
- else if (this.bindTo) {
174
- element = this.bindTo;
175
- }
176
- else {
177
- element = this.host.parentElement;
178
- }
179
- if (!element) {
180
- return;
181
- }
182
- const scrollContainer = findScrollableParent(element);
183
- const scrollingBoundingRect = scrollContainer.getBoundingClientRect();
184
- const offsetContainer = this.host.offsetParent;
185
- const relativeBoundingRect = offsetContainer
186
- ? computeOffset(offsetContainer, scrollContainer)
187
- : { top: 0, right: 0, bottom: 0, left: 0 };
188
- const boundingRect = computeOffset(element, scrollContainer);
189
- const top = boundingRect.top - scrollContainer.scrollTop;
190
- const bottom = scrollingBoundingRect.height -
191
- (boundingRect.top + boundingRect.height) +
192
- scrollContainer.scrollTop;
193
- const left = boundingRect.left - scrollContainer.scrollLeft;
194
- const right = scrollingBoundingRect.width -
195
- (boundingRect.left + boundingRect.width) +
196
- scrollContainer.scrollLeft;
197
- const overflowBottom = Math.max(0, scrollingBoundingRect.top +
198
- scrollingBoundingRect.height -
199
- window.innerHeight);
200
- const overflowRight = Math.max(0, scrollingBoundingRect.left +
201
- scrollingBoundingRect.width -
202
- window.innerWidth);
203
- const availableTop = Math.min(top, top + scrollingBoundingRect.top);
204
- const availableBottom = Math.min(bottom, bottom - overflowBottom);
205
- const availableLeft = Math.min(left, left + scrollingBoundingRect.left);
206
- const availableRight = Math.min(right, right - overflowRight);
207
- const availableHeight = availableTop + availableBottom + boundingRect.height;
208
- const availableWidth = availableLeft + availableRight + boundingRect.width;
209
- let position = this.currentPosition;
210
- const positions = [];
211
- if (this.position === PopoverPositions.AUTO) {
212
- /**
213
- * The `AUTO` position tries to place the popover in the 'safest' area,
214
- * where there's more space available.
215
- */
216
- if (availableLeft / availableWidth > 0.6) {
217
- positions.push(PopoverPositions.LEFT);
38
+ openPopover() {
39
+ const width = document.body.clientWidth;
40
+ const height = window.innerHeight;
41
+ const rect = this.popoverElem.getBoundingClientRect();
42
+ const l = rect.left;
43
+ const r = rect.right;
44
+ const t = rect.top;
45
+ const b = rect.bottom;
46
+ let firstSide = this.position.split("-")[0];
47
+ let secondSide = this.position.split("-")[1];
48
+ // If top is outside viewport
49
+ if (t < 0) {
50
+ if (this.position.startsWith("above")) {
51
+ firstSide = "below";
218
52
  }
219
- else if (availableLeft / availableWidth < 0.4) {
220
- positions.push(PopoverPositions.RIGHT);
53
+ else {
54
+ secondSide = "down";
221
55
  }
222
- if (availableTop / availableHeight > 0.9) {
223
- positions.unshift(PopoverPositions.TOP);
56
+ }
57
+ // If bottom is outside viewport
58
+ if (b > height) {
59
+ if (this.position.startsWith("below")) {
60
+ firstSide = "above";
224
61
  }
225
- else if (availableTop / availableHeight > 0.6) {
226
- positions.push(PopoverPositions.TOP);
62
+ else {
63
+ secondSide = "up";
227
64
  }
228
- else if (availableTop / availableHeight < 0.1) {
229
- positions.unshift(PopoverPositions.BOTTOM);
65
+ }
66
+ // If right is outside viewport
67
+ if (r > width) {
68
+ if (this.position.startsWith("above") ||
69
+ this.position.startsWith("below")) {
70
+ secondSide = "left";
230
71
  }
231
72
  else {
232
- positions.push(PopoverPositions.BOTTOM);
73
+ firstSide = "before";
233
74
  }
234
- position = positions.join("_");
235
75
  }
236
- const style = this.host.style;
237
- style.position = "absolute";
238
- const offsetTop = boundingRect.top - relativeBoundingRect.top;
239
- const offsetRight = boundingRect.right - relativeBoundingRect.right;
240
- const offsetBottom = boundingRect.bottom - relativeBoundingRect.bottom;
241
- const offsetLeft = boundingRect.left - relativeBoundingRect.left;
242
- const offsetModifier = this.center ? 0.5 : 0;
243
- const sizeModifier = this.center ? 0.5 : 0;
244
- if (position === PopoverPositions.TOP ||
245
- position === PopoverPositions.TOP_RIGHT) {
246
- style.top = "auto";
247
- style.right = "auto";
248
- style.bottom = `${offsetBottom + boundingRect.height}px`;
249
- style.left = `${offsetLeft + boundingRect.width * offsetModifier}px`;
250
- style.maxHeight = `${availableTop}px`;
251
- if (position === PopoverPositions.TOP_RIGHT) {
252
- style.maxWidth = `${availableRight + boundingRect.width * sizeModifier}px`;
76
+ // If left is outside viewport
77
+ if (l < 0) {
78
+ if (this.position.startsWith("above") ||
79
+ this.position.startsWith("below")) {
80
+ secondSide = "right";
253
81
  }
254
- }
255
- else if (position === PopoverPositions.TOP_LEFT) {
256
- style.top = "auto";
257
- style.right = `${offsetRight + boundingRect.width * offsetModifier}px`;
258
- style.bottom = `${offsetBottom + boundingRect.height}px`;
259
- style.left = "auto";
260
- style.maxWidth = `${availableLeft}px`;
261
- style.maxHeight = `${availableTop}px`;
262
- }
263
- else if (position === PopoverPositions.BOTTOM ||
264
- position === PopoverPositions.BOTTOM_RIGHT) {
265
- style.top = `${offsetTop + boundingRect.height}px`;
266
- style.right = "auto";
267
- style.bottom = "auto";
268
- style.left = `${offsetLeft + boundingRect.width * offsetModifier}px`;
269
- style.maxHeight = `${availableBottom}px`;
270
- if (position === PopoverPositions.BOTTOM_RIGHT) {
271
- style.maxWidth = `${availableRight + boundingRect.width * sizeModifier}px`;
82
+ else {
83
+ firstSide = "after";
272
84
  }
273
85
  }
274
- else if (position === PopoverPositions.BOTTOM_LEFT) {
275
- style.top = `${offsetTop + boundingRect.height}px`;
276
- style.right = `${offsetRight + boundingRect.width * offsetModifier}px`;
277
- style.bottom = "auto";
278
- style.left = "auto";
279
- style.maxWidth = `${availableLeft}px`;
280
- style.maxHeight = `${availableBottom}px`;
281
- }
282
- else if (position === PopoverPositions.RIGHT ||
283
- position === PopoverPositions.RIGHT_BOTTOM) {
284
- style.top = `${offsetTop + boundingRect.height * offsetModifier}px`;
285
- style.right = "auto";
286
- style.bottom = "auto";
287
- style.left = `${offsetLeft + boundingRect.width}px`;
288
- style.maxWidth = `${availableRight}px`;
289
- style.maxHeight = `${availableBottom + boundingRect.height * sizeModifier}px`;
290
- }
291
- else if (position === PopoverPositions.RIGHT_TOP) {
292
- style.top = "auto";
293
- style.right = "auto";
294
- style.bottom = `${offsetBottom + boundingRect.height * offsetModifier}px`;
295
- style.left = `${offsetLeft + boundingRect.width}px`;
296
- style.maxWidth = `${availableRight}px`;
297
- style.maxHeight = `${availableTop + boundingRect.height * sizeModifier}px`;
298
- }
299
- else if (position === PopoverPositions.LEFT ||
300
- position === PopoverPositions.LEFT_BOTTOM) {
301
- style.top = `${offsetTop + boundingRect.height * offsetModifier}px`;
302
- style.right = `${offsetRight + boundingRect.width}px`;
303
- style.bottom = "auto";
304
- style.left = "auto";
305
- style.maxWidth = `${availableLeft}px`;
306
- style.maxHeight = `${availableBottom + boundingRect.height * sizeModifier}px`;
86
+ this.popoverPosition = PopoverPosition[`${firstSide}-${secondSide}`];
87
+ this.isVisible = true;
88
+ }
89
+ closePopover() {
90
+ this.popoverPosition = this.position;
91
+ this.isVisible = false;
92
+ }
93
+ closePopoverWithKeyboard(e) {
94
+ if (e.key === KeyboardKeys.ESC) {
95
+ this.closePopover();
307
96
  }
308
- else if (position === PopoverPositions.LEFT_TOP) {
309
- style.top = "auto";
310
- style.right = `${offsetRight + boundingRect.width}px`;
311
- style.bottom = `${offsetBottom + boundingRect.height * offsetModifier}px`;
312
- style.left = "auto";
313
- style.maxWidth = `${availableLeft}px`;
314
- style.maxHeight = `${availableTop + boundingRect.height * sizeModifier}px`;
97
+ }
98
+ handleClick(event) {
99
+ this.isVisible ? this.closePopover() : this.openPopover();
100
+ this.emitTriggerClick();
101
+ event.stopPropagation();
102
+ }
103
+ handleKeyDown(event) {
104
+ if (event.code === KeyboardKeys.ENTER) {
105
+ this.isVisible ? this.closePopover() : this.openPopover();
315
106
  }
316
- this.currentPosition = position || this.position;
317
- this.host.setAttribute('current-position', this.currentPosition);
318
107
  }
319
- componentWillLoad() {
320
- this.validatePosition(this.position);
321
- this.onOpen();
108
+ handleOutsideClick(e) {
109
+ const tree = getElementTree(e.target);
110
+ const parent = tree.find((elem) => elem.nodeName.toLowerCase() === "z-popover-deprecated");
111
+ if (!parent) {
112
+ this.closePopover();
113
+ }
322
114
  }
323
115
  render() {
324
- return h("slot", null);
116
+ return (h(Host, { onKeyDown: this.handleKeyDown }, h("div", { tabindex: "0", onClick: (event) => this.handleClick(event), onKeyDown: (event) => {
117
+ if (event.key === KeyboardKeys.ENTER) {
118
+ this.handleClick(event);
119
+ }
120
+ } }, h("slot", { name: "trigger" })), h("div", { ref: (e) => (this.popoverElem = e), class: classnames("popover-content-container", this.popoverPosition, `border-radius-${this.borderRadius}`, this.boxShadow, { "show-arrow": this.showArrow }, { visible: this.isVisible }), style: {
121
+ backgroundColor: `var(--${this.backgroundColor})`,
122
+ padding: this.padding,
123
+ } }, h("slot", { name: "popover" }))));
325
124
  }
326
- get host() { return getElement(this); }
327
- static get watchers() { return {
328
- "position": ["validatePosition"],
329
- "open": ["onOpen"]
330
- }; }
331
125
  };
332
126
  ZPopoverDeprecated.style = stylesCss;
333
127
 
@@ -1,7 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-90e18641.js';
2
- import { P as PopoverPositions, q as KeyboardKeys } from './index-c1ce8cab.js';
3
- import { a as getElementTree } from './utils-99c70c57.js';
4
- import './breakpoints-c386984e.js';
2
+ import { P as PopoverPositions, u as KeyboardKeys } from './index-e3640537.js';
5
3
 
6
4
  const stylesCss = ":host{--z-popover-theme--surface:var(--color-surface01);--z-popover-theme--text:var(--color-text01);--z-popover-padding:0;--z-popover-shadow-filter:drop-shadow(0 1px 2px var(--shadow-color-base));position:relative;display:none;align-items:center;justify-content:center;padding:var(--z-popover-padding);min-width:calc(var(--space-unit) * 8);min-height:calc(var(--space-unit) * 4);color:var(--z-popover-theme--text);fill:currentColor;font-family:var(--font-family-sans);text-align:center;border-radius:var(--border-radius-small);background:var(--z-popover-theme--surface);filter:var(--z-popover-shadow-filter)}:host([open][current-position]),:host([open=\"true\"][current-position]){display:flex}:host([center][current-position=\"top\"]),:host([center][current-position=\"bottom\"]){transform:translateX(-50%)}:host([center][current-position=\"right\"]),:host([center][current-position=\"left\"]){transform:translateY(-50%)}:host([current-position^=\"top\"]){margin:0 0 var(--space-unit)}:host([current-position^=\"bottom\"]){margin:var(--space-unit) 0 0}:host([current-position^=\"left\"]){margin:0 var(--space-unit) 0 0}:host([current-position^=\"right\"]){margin:0 0 0 var(--space-unit)}:host([current-position])::before{--arrow-size:6px;--arrow-edge-offset:calc(100% - var(--space-unit) - (var(--arrow-size) / 2));--arrow-center-x-offset:calc(50% - (var(--arrow-size) / 2));--arrow-center-y-offset:calc(100% - (var(--arrow-size) / 2));display:block;content:\"\";position:absolute;width:var(--arrow-size);height:var(--arrow-size);background:var(--z-popover-theme--surface);transform:rotate(45deg)}:host([show-arrow=\"false\"])::before,:host(:not([show-arrow]))::before{display:none}:host([current-position^=\"top\"])::before{top:var(--arrow-center-y-offset)}:host([current-position^=\"bottom\"])::before{bottom:var(--arrow-center-y-offset)}:host([current-position=\"top\"])::before,:host([current-position=\"bottom\"])::before{right:var(--arrow-edge-offset)}:host([current-position=\"right\"])::before,:host([current-position=\"left\"])::before{bottom:var(--arrow-edge-offset)}:host([current-position=\"right\"])::before{right:var(--arrow-center-y-offset)}:host([current-position=\"left\"])::before{left:var(--arrow-center-y-offset)}:host([current-position=\"top_right\"])::before,:host([current-position=\"bottom_right\"])::before{right:var(--arrow-edge-offset)}:host([current-position=\"top_left\"])::before,:host([current-position=\"bottom_left\"])::before{left:var(--arrow-edge-offset)}:host([current-position=\"right_top\"])::before,:host([current-position=\"left_top\"])::before{top:var(--arrow-edge-offset)}:host([current-position=\"right_top\"])::before,:host([current-position=\"right_bottom\"])::before{right:var(--arrow-center-y-offset)}:host([current-position=\"left_top\"])::before,:host([current-position=\"left_bottom\"])::before{left:var(--arrow-center-y-offset)}:host([current-position=\"right_bottom\"])::before,:host([current-position=\"left_bottom\"])::before{bottom:var(--arrow-edge-offset)}:host([center][current-position=\"top\"])::before,:host([center][current-position=\"bottom\"])::before{right:auto;left:var(--arrow-center-x-offset)}:host([center][current-position=\"right\"])::before,:host([center][current-position=\"left\"])::before{top:var(--arrow-center-x-offset);bottom:auto}::slotted(*){flex:1 auto;overflow:auto}";
7
5
 
@@ -98,7 +96,7 @@ const ZPopover = class {
98
96
  this.positionChange = createEvent(this, "positionChange", 7);
99
97
  this.openChange = createEvent(this, "openChange", 7);
100
98
  /** Popover position. */
101
- this.position = PopoverPositions.AUTO;
99
+ this.position = PopoverPositions.auto;
102
100
  /**
103
101
  * The open state of the popover.
104
102
  */
@@ -125,8 +123,7 @@ const ZPopover = class {
125
123
  if (!this.closable) {
126
124
  return;
127
125
  }
128
- const tree = getElementTree(e.target);
129
- const parent = tree.find((elem) => elem.nodeName.toLowerCase() === "z-popover");
126
+ const parent = e.path.find((elem) => elem === this.host);
130
127
  if (!parent) {
131
128
  this.open = false;
132
129
  this.positionChange.emit({ position: this.currentPosition });
@@ -134,8 +131,8 @@ const ZPopover = class {
134
131
  }
135
132
  validatePosition(newValue) {
136
133
  if (newValue &&
137
- Object.values(PopoverPositions).every((position) => newValue !== position)) {
138
- this.position = PopoverPositions.AUTO;
134
+ !Object.values(PopoverPositions).includes(newValue)) {
135
+ this.position = PopoverPositions.auto;
139
136
  }
140
137
  this.currentPosition = this.position;
141
138
  this.positionChange.emit({ position: this.currentPosition });
@@ -209,28 +206,28 @@ const ZPopover = class {
209
206
  const availableWidth = availableLeft + availableRight + boundingRect.width;
210
207
  let position = this.currentPosition;
211
208
  const positions = [];
212
- if (this.position === PopoverPositions.AUTO) {
209
+ if (this.position === PopoverPositions.auto) {
213
210
  /**
214
211
  * The `AUTO` position tries to place the popover in the 'safest' area,
215
212
  * where there's more space available.
216
213
  */
217
214
  if (availableLeft / availableWidth > 0.6) {
218
- positions.push(PopoverPositions.LEFT);
215
+ positions.push(PopoverPositions.left);
219
216
  }
220
217
  else if (availableLeft / availableWidth < 0.4) {
221
- positions.push(PopoverPositions.RIGHT);
218
+ positions.push(PopoverPositions.right);
222
219
  }
223
220
  if (availableTop / availableHeight > 0.9) {
224
- positions.unshift(PopoverPositions.TOP);
221
+ positions.unshift(PopoverPositions.top);
225
222
  }
226
223
  else if (availableTop / availableHeight > 0.6) {
227
- positions.push(PopoverPositions.TOP);
224
+ positions.push(PopoverPositions.top);
228
225
  }
229
226
  else if (availableTop / availableHeight < 0.1) {
230
- positions.unshift(PopoverPositions.BOTTOM);
227
+ positions.unshift(PopoverPositions.bottom);
231
228
  }
232
229
  else {
233
- positions.push(PopoverPositions.BOTTOM);
230
+ positions.push(PopoverPositions.bottom);
234
231
  }
235
232
  position = positions.join("_");
236
233
  }
@@ -242,18 +239,18 @@ const ZPopover = class {
242
239
  const offsetLeft = boundingRect.left - relativeBoundingRect.left;
243
240
  const offsetModifier = this.center ? 0.5 : 0;
244
241
  const sizeModifier = this.center ? 0.5 : 0;
245
- if (position === PopoverPositions.TOP ||
246
- position === PopoverPositions.TOP_RIGHT) {
242
+ if (position === PopoverPositions.top ||
243
+ position === PopoverPositions.top_right) {
247
244
  style.top = "auto";
248
245
  style.right = "auto";
249
246
  style.bottom = `${offsetBottom + boundingRect.height}px`;
250
247
  style.left = `${offsetLeft + boundingRect.width * offsetModifier}px`;
251
248
  style.maxHeight = `${availableTop}px`;
252
- if (position === PopoverPositions.TOP_RIGHT) {
249
+ if (position === PopoverPositions.top_right) {
253
250
  style.maxWidth = `${availableRight + boundingRect.width * sizeModifier}px`;
254
251
  }
255
252
  }
256
- else if (position === PopoverPositions.TOP_LEFT) {
253
+ else if (position === PopoverPositions.top_left) {
257
254
  style.top = "auto";
258
255
  style.right = `${offsetRight + boundingRect.width * offsetModifier}px`;
259
256
  style.bottom = `${offsetBottom + boundingRect.height}px`;
@@ -261,18 +258,18 @@ const ZPopover = class {
261
258
  style.maxWidth = `${availableLeft}px`;
262
259
  style.maxHeight = `${availableTop}px`;
263
260
  }
264
- else if (position === PopoverPositions.BOTTOM ||
265
- position === PopoverPositions.BOTTOM_RIGHT) {
261
+ else if (position === PopoverPositions.bottom ||
262
+ position === PopoverPositions.bottom_right) {
266
263
  style.top = `${offsetTop + boundingRect.height}px`;
267
264
  style.right = "auto";
268
265
  style.bottom = "auto";
269
266
  style.left = `${offsetLeft + boundingRect.width * offsetModifier}px`;
270
267
  style.maxHeight = `${availableBottom}px`;
271
- if (position === PopoverPositions.BOTTOM_RIGHT) {
268
+ if (position === PopoverPositions.bottom_right) {
272
269
  style.maxWidth = `${availableRight + boundingRect.width * sizeModifier}px`;
273
270
  }
274
271
  }
275
- else if (position === PopoverPositions.BOTTOM_LEFT) {
272
+ else if (position === PopoverPositions.bottom_left) {
276
273
  style.top = `${offsetTop + boundingRect.height}px`;
277
274
  style.right = `${offsetRight + boundingRect.width * offsetModifier}px`;
278
275
  style.bottom = "auto";
@@ -280,8 +277,8 @@ const ZPopover = class {
280
277
  style.maxWidth = `${availableLeft}px`;
281
278
  style.maxHeight = `${availableBottom}px`;
282
279
  }
283
- else if (position === PopoverPositions.RIGHT ||
284
- position === PopoverPositions.RIGHT_BOTTOM) {
280
+ else if (position === PopoverPositions.right ||
281
+ position === PopoverPositions.right_bottom) {
285
282
  style.top = `${offsetTop + boundingRect.height * offsetModifier}px`;
286
283
  style.right = "auto";
287
284
  style.bottom = "auto";
@@ -289,7 +286,7 @@ const ZPopover = class {
289
286
  style.maxWidth = `${availableRight}px`;
290
287
  style.maxHeight = `${availableBottom + boundingRect.height * sizeModifier}px`;
291
288
  }
292
- else if (position === PopoverPositions.RIGHT_TOP) {
289
+ else if (position === PopoverPositions.right_top) {
293
290
  style.top = "auto";
294
291
  style.right = "auto";
295
292
  style.bottom = `${offsetBottom + boundingRect.height * offsetModifier}px`;
@@ -297,8 +294,8 @@ const ZPopover = class {
297
294
  style.maxWidth = `${availableRight}px`;
298
295
  style.maxHeight = `${availableTop + boundingRect.height * sizeModifier}px`;
299
296
  }
300
- else if (position === PopoverPositions.LEFT ||
301
- position === PopoverPositions.LEFT_BOTTOM) {
297
+ else if (position === PopoverPositions.left ||
298
+ position === PopoverPositions.left_bottom) {
302
299
  style.top = `${offsetTop + boundingRect.height * offsetModifier}px`;
303
300
  style.right = `${offsetRight + boundingRect.width}px`;
304
301
  style.bottom = "auto";
@@ -306,7 +303,7 @@ const ZPopover = class {
306
303
  style.maxWidth = `${availableLeft}px`;
307
304
  style.maxHeight = `${availableBottom + boundingRect.height * sizeModifier}px`;
308
305
  }
309
- else if (position === PopoverPositions.LEFT_TOP) {
306
+ else if (position === PopoverPositions.left_top) {
310
307
  style.top = "auto";
311
308
  style.right = `${offsetRight + boundingRect.width}px`;
312
309
  style.bottom = `${offsetBottom + boundingRect.height * offsetModifier}px`;
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index-90e18641.js';
2
- import { r as ZSectionTitleDividerPositions, b as DividerSize } from './index-c1ce8cab.js';
2
+ import { v as ZSectionTitleDividerPositions, b as DividerSize } from './index-e3640537.js';
3
3
 
4
4
  const stylesCss = ":host{--z-section-title--divider-color:var(--red500);display:flex;flex-direction:column;align-items:flex-start;width:fit-content;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host,:host ::slotted(*){box-sizing:border-box}::slotted(*){margin:0}::slotted([slot=\"secondary-title\"]){padding-bottom:calc(var(--space-unit) / 2);border-bottom:var(--border-size-large) solid var(--z-section-title--divider-color);text-transform:uppercase;font-size:var(--font-size-3);line-height:1.5rem}::slotted([slot=\"primary-title\"]){font-size:var(--font-size-6);line-height:2rem}:host([uppercase]) ::slotted([slot=\"primary-title\"]){text-transform:uppercase}@media (min-width: 1152px){::slotted([slot=\"primary-title\"]){font-size:var(--font-size-7);line-height:2.25rem}}";
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement } from './index-90e18641.js';
2
- import { a as getElementTree, h as handleKeyboardSubmit } from './utils-99c70c57.js';
3
- import { T as ThemeVariant } from './index-c1ce8cab.js';
2
+ import { a as getElementTree, h as handleKeyboardSubmit } from './utils-f3d44cb3.js';
3
+ import { T as ThemeVariant } from './index-e3640537.js';
4
4
  import './breakpoints-c386984e.js';
5
5
 
6
6
  const stylesCss = ".sc-z-skip-to-content-h{font-family:var(--font-family-sans);font-weight:var(--font-rg);position:absolute;left:-100%;background-color:#24f4ff;padding:calc(var(--space-unit) * 1.25) calc(var(--space-unit) * 3);height:60px;box-sizing:border-box}.skip-to-content-visible.sc-z-skip-to-content-h,.sc-z-skip-to-content-h:focus{position:static;display:block}.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content{display:block;text-align:center}.sc-z-skip-to-content-h>z-link.link-invisible.sc-z-skip-to-content{height:0;width:0;overflow:hidden}.sc-z-skip-to-content-h>z-link.link-visible.sc-z-skip-to-content{height:initial;width:initial}.dark.sc-z-skip-to-content-h{background-color:var(--bg-grey-800);color:var(--color-white)}.light.sc-z-skip-to-content-h{background-color:var(--bg-white);color:var(--text-grey-800);border:2px solid var(--text-grey-800)}@media (min-width: 768px){.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content{text-align:left}}@media (min-width: 1152px){.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content{display:inline-block;padding:0 calc(var(--space-unit) * 3);border-right:1px solid var(--bg-grey-800)}.sc-z-skip-to-content-h>z-link.link-invisible.sc-z-skip-to-content{height:initial;width:initial;overflow:initial}.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content:first-child{padding-left:0}.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content:last-child,.dark.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content:last-child,.light.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content:last-child{border-right:none;padding-right:0}.dark.sc-z-skip-to-content-h>z-link.sc-z-skip-to-content{border-right:1px solid var(--bg-white)}}";