@zanichelli/albe-web-components 18.4.0 → 18.4.2-RC

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 (503) hide show
  1. package/CHANGELOG.md +3 -8
  2. package/dist/cjs/{index-f0b0a7d1.js → index-443b084a.js} +2 -2
  3. package/dist/cjs/{index-f0b0a7d1.js.map → index-443b084a.js.map} +1 -1
  4. package/dist/cjs/{index-4f18c0e2.js → index-be0b8cf5.js} +6 -1
  5. package/dist/cjs/index-be0b8cf5.js.map +1 -0
  6. package/dist/cjs/{index-d1759a5a.js → index-e98b419e.js} +2 -2
  7. package/dist/cjs/{index-d1759a5a.js.map → index-e98b419e.js.map} +1 -1
  8. package/dist/cjs/{index-394da17e.js → index-f67078cb.js} +4 -4
  9. package/dist/cjs/{index-394da17e.js.map → index-f67078cb.js.map} +1 -1
  10. package/dist/cjs/index.cjs.js +2 -2
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/{utils-a5d151ea.js → utils-021d5bc3.js} +2 -2
  13. package/dist/cjs/{utils-a5d151ea.js.map → utils-021d5bc3.js.map} +1 -1
  14. package/dist/cjs/{utils-67ea6e35.js → utils-714b7a92.js} +2 -2
  15. package/dist/cjs/{utils-67ea6e35.js.map → utils-714b7a92.js.map} +1 -1
  16. package/dist/cjs/web-components-library.cjs.js +1 -1
  17. package/dist/cjs/z-accordion.cjs.entry.js +1 -1
  18. package/dist/cjs/z-alert.cjs.entry.js +1 -1
  19. package/dist/cjs/z-anchor-navigation.cjs.entry.js +1 -1
  20. package/dist/cjs/z-app-header-deprecated.cjs.entry.js +1 -1
  21. package/dist/cjs/z-app-header_12.cjs.entry.js +6 -6
  22. package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
  23. package/dist/cjs/z-aria-alert.cjs.entry.js +1 -1
  24. package/dist/cjs/z-avatar.cjs.entry.js +1 -1
  25. package/dist/cjs/z-book-card-app.cjs.entry.js +1 -1
  26. package/dist/cjs/z-book-card-deprecated.cjs.entry.js +2 -2
  27. package/dist/cjs/z-book-card.cjs.entry.js +1 -1
  28. package/dist/cjs/z-breadcrumb.cjs.entry.js +2 -2
  29. package/dist/cjs/z-card.cjs.entry.js +1 -1
  30. package/dist/cjs/z-carousel.cjs.entry.js +1 -1
  31. package/dist/cjs/z-chip.cjs.entry.js +1 -1
  32. package/dist/cjs/z-combobox.cjs.entry.js +2 -2
  33. package/dist/cjs/z-cover-hero.cjs.entry.js +1 -1
  34. package/dist/cjs/z-date-picker.cjs.entry.js +2 -2
  35. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +1 -1
  36. package/dist/cjs/z-file-upload.cjs.entry.js +1 -1
  37. package/dist/cjs/z-file.cjs.entry.js +1 -1
  38. package/dist/cjs/z-info-reveal.cjs.entry.js +1 -1
  39. package/dist/cjs/z-menu-section.cjs.entry.js +1 -1
  40. package/dist/cjs/z-menu.cjs.entry.js +2 -2
  41. package/dist/cjs/z-myz-card-alert.cjs.entry.js +2 -2
  42. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +2 -2
  43. package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +1 -1
  44. package/dist/cjs/z-myz-card-footer.cjs.entry.js +2 -2
  45. package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
  46. package/dist/cjs/z-myz-card-info.cjs.entry.js +3 -3
  47. package/dist/cjs/z-myz-card-list.cjs.entry.js +1 -1
  48. package/dist/cjs/z-myz-card_4.cjs.entry.js +5 -5
  49. package/dist/cjs/z-myz-list-item.cjs.entry.js +3 -3
  50. package/dist/cjs/z-myz-list.cjs.entry.js +1 -1
  51. package/dist/cjs/z-navigation-tabs.cjs.entry.js +2 -2
  52. package/dist/cjs/z-navigation-tabs.cjs.entry.js.map +1 -1
  53. package/dist/cjs/z-otp.cjs.entry.js +3 -3
  54. package/dist/cjs/z-pagination.cjs.entry.js +1 -1
  55. package/dist/cjs/z-popover.cjs.entry.js +307 -153
  56. package/dist/cjs/z-popover.cjs.entry.js.map +1 -1
  57. package/dist/cjs/z-range-picker.cjs.entry.js +2 -2
  58. package/dist/cjs/z-section-title.cjs.entry.js +1 -1
  59. package/dist/cjs/z-select.cjs.entry.js +2 -2
  60. package/dist/cjs/z-skip-to-content.cjs.entry.js +3 -3
  61. package/dist/cjs/z-slideshow.cjs.entry.js +2 -2
  62. package/dist/cjs/z-stepper-item.cjs.entry.js +1 -1
  63. package/dist/cjs/z-stepper.cjs.entry.js +1 -1
  64. package/dist/cjs/z-table.cjs.entry.js +5 -5
  65. package/dist/cjs/z-td.cjs.entry.js +2 -2
  66. package/dist/cjs/z-th.cjs.entry.js +2 -2
  67. package/dist/cjs/z-toast-notification-list.cjs.entry.js +2 -2
  68. package/dist/cjs/z-toast-notification.cjs.entry.js +2 -2
  69. package/dist/cjs/z-toggle-button.cjs.entry.js +2 -2
  70. package/dist/cjs/z-toggle-switch.cjs.entry.js +5 -5
  71. package/dist/cjs/z-tooltip.cjs.entry.js +2 -2
  72. package/dist/cjs/z-tr.cjs.entry.js +5 -5
  73. package/dist/cjs/z-tree-list.cjs.entry.js +1 -1
  74. package/dist/collection/beans/index.js +5 -0
  75. package/dist/collection/beans/index.js.map +1 -1
  76. package/dist/collection/components/file-upload/z-file-upload/index.js +1 -1
  77. package/dist/collection/components/z-button/index.js +7 -7
  78. package/dist/collection/components/z-button/index.js.map +1 -1
  79. package/dist/collection/components/z-navigation-tabs/styles.css +1 -1
  80. package/dist/collection/components/z-popover/index.js +316 -156
  81. package/dist/collection/components/z-popover/index.js.map +1 -1
  82. package/dist/collection/components/z-popover/index.stories.js +124 -41
  83. package/dist/collection/components/z-popover/index.stories.js.map +1 -1
  84. package/dist/collection/components/z-popover/styles.css +16 -10
  85. package/dist/collection/components/z-searchbar/index.js +1 -1
  86. package/dist/collection/components/z-skip-to-content/index.js +1 -1
  87. package/dist/collection/components/z-stepper/index.js +1 -1
  88. package/dist/collection/components/z-stepper-item/index.js +1 -1
  89. package/dist/collection/components/z-toast-notification/index.js +1 -1
  90. package/dist/collection/components/z-toast-notification-list/index.js +1 -1
  91. package/dist/collection/components/z-toggle-button/index.js +2 -2
  92. package/dist/collection/components/z-toggle-switch/index.js +3 -3
  93. package/dist/collection/components/z-tooltip/index.js +1 -1
  94. package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +1 -1
  95. package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +1 -1
  96. package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +1 -1
  97. package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +1 -1
  98. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
  99. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -1
  100. package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +1 -1
  101. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
  102. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +1 -1
  103. package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
  104. package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
  105. package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
  106. package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +1 -1
  107. package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
  108. package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
  109. package/dist/components/index17.js +1 -1
  110. package/dist/components/index18.js +1 -1
  111. package/dist/components/index19.js +1 -1
  112. package/dist/components/index2.js +5 -0
  113. package/dist/components/index2.js.map +1 -1
  114. package/dist/components/index20.js +1 -1
  115. package/dist/components/index21.js +1 -1
  116. package/dist/components/index23.js +308 -154
  117. package/dist/components/index23.js.map +1 -1
  118. package/dist/components/index24.js +1 -1
  119. package/dist/components/index3.js +1 -1
  120. package/dist/components/index4.js +4 -4
  121. package/dist/components/index4.js.map +1 -1
  122. package/dist/components/z-myz-card-alert.js +1 -1
  123. package/dist/components/z-myz-card-dictionary.js +1 -1
  124. package/dist/components/z-myz-card-footer-sections.js +1 -1
  125. package/dist/components/z-myz-card-footer.js +1 -1
  126. package/dist/components/z-myz-card-icon.js +1 -1
  127. package/dist/components/z-myz-card-info.js +1 -1
  128. package/dist/components/z-myz-card-list.js +1 -1
  129. package/dist/components/z-myz-list.js +1 -1
  130. package/dist/components/z-navigation-tabs.js +1 -1
  131. package/dist/components/z-navigation-tabs.js.map +1 -1
  132. package/dist/components/z-otp.js +2 -2
  133. package/dist/components/z-skip-to-content.js +1 -1
  134. package/dist/components/z-stepper-item.js +1 -1
  135. package/dist/components/z-stepper.js +1 -1
  136. package/dist/components/z-table.js +1 -0
  137. package/dist/components/z-table.js.map +1 -1
  138. package/dist/components/z-toast-notification-list.js +1 -1
  139. package/dist/components/z-toast-notification.js +1 -1
  140. package/dist/components/z-toggle-button.js +2 -2
  141. package/dist/components/z-toggle-switch.js +3 -3
  142. package/dist/components/z-tooltip.js +1 -1
  143. package/dist/components/z-tr.js +1 -0
  144. package/dist/components/z-tr.js.map +1 -1
  145. package/dist/esm/{index-fc0913d1.js → index-2a26d10b.js} +2 -2
  146. package/dist/esm/{index-fc0913d1.js.map → index-2a26d10b.js.map} +1 -1
  147. package/dist/esm/{index-2ccbb96f.js → index-406138db.js} +2 -2
  148. package/dist/esm/{index-2ccbb96f.js.map → index-406138db.js.map} +1 -1
  149. package/dist/esm/{index-fe87283d.js → index-9f584e0a.js} +6 -1
  150. package/dist/esm/index-9f584e0a.js.map +1 -0
  151. package/dist/esm/{index-ceebee64.js → index-be3c8aaa.js} +4 -4
  152. package/dist/esm/{index-ceebee64.js.map → index-be3c8aaa.js.map} +1 -1
  153. package/dist/esm/index.js +2 -2
  154. package/dist/esm/loader.js +1 -1
  155. package/dist/esm/{utils-c7062cf7.js → utils-6e83ba99.js} +2 -2
  156. package/dist/esm/{utils-c7062cf7.js.map → utils-6e83ba99.js.map} +1 -1
  157. package/dist/esm/{utils-9b99e7a0.js → utils-90416845.js} +2 -2
  158. package/dist/esm/{utils-9b99e7a0.js.map → utils-90416845.js.map} +1 -1
  159. package/dist/esm/web-components-library.js +1 -1
  160. package/dist/esm/z-accordion.entry.js +1 -1
  161. package/dist/esm/z-alert.entry.js +1 -1
  162. package/dist/esm/z-anchor-navigation.entry.js +1 -1
  163. package/dist/esm/z-app-header-deprecated.entry.js +1 -1
  164. package/dist/esm/z-app-header_12.entry.js +6 -6
  165. package/dist/esm/z-app-header_12.entry.js.map +1 -1
  166. package/dist/esm/z-aria-alert.entry.js +1 -1
  167. package/dist/esm/z-avatar.entry.js +1 -1
  168. package/dist/esm/z-book-card-app.entry.js +1 -1
  169. package/dist/esm/z-book-card-deprecated.entry.js +2 -2
  170. package/dist/esm/z-book-card.entry.js +1 -1
  171. package/dist/esm/z-breadcrumb.entry.js +2 -2
  172. package/dist/esm/z-card.entry.js +1 -1
  173. package/dist/esm/z-carousel.entry.js +1 -1
  174. package/dist/esm/z-chip.entry.js +1 -1
  175. package/dist/esm/z-combobox.entry.js +2 -2
  176. package/dist/esm/z-cover-hero.entry.js +1 -1
  177. package/dist/esm/z-date-picker.entry.js +2 -2
  178. package/dist/esm/z-dragdrop-area_2.entry.js +1 -1
  179. package/dist/esm/z-file-upload.entry.js +1 -1
  180. package/dist/esm/z-file.entry.js +1 -1
  181. package/dist/esm/z-info-reveal.entry.js +1 -1
  182. package/dist/esm/z-menu-section.entry.js +1 -1
  183. package/dist/esm/z-menu.entry.js +2 -2
  184. package/dist/esm/z-myz-card-alert.entry.js +2 -2
  185. package/dist/esm/z-myz-card-dictionary.entry.js +2 -2
  186. package/dist/esm/z-myz-card-footer-sections.entry.js +1 -1
  187. package/dist/esm/z-myz-card-footer.entry.js +2 -2
  188. package/dist/esm/z-myz-card-icon.entry.js +1 -1
  189. package/dist/esm/z-myz-card-info.entry.js +3 -3
  190. package/dist/esm/z-myz-card-list.entry.js +1 -1
  191. package/dist/esm/z-myz-card_4.entry.js +5 -5
  192. package/dist/esm/z-myz-list-item.entry.js +3 -3
  193. package/dist/esm/z-myz-list.entry.js +1 -1
  194. package/dist/esm/z-navigation-tabs.entry.js +2 -2
  195. package/dist/esm/z-navigation-tabs.entry.js.map +1 -1
  196. package/dist/esm/z-otp.entry.js +3 -3
  197. package/dist/esm/z-pagination.entry.js +1 -1
  198. package/dist/esm/z-popover.entry.js +308 -154
  199. package/dist/esm/z-popover.entry.js.map +1 -1
  200. package/dist/esm/z-range-picker.entry.js +2 -2
  201. package/dist/esm/z-section-title.entry.js +1 -1
  202. package/dist/esm/z-select.entry.js +2 -2
  203. package/dist/esm/z-skip-to-content.entry.js +3 -3
  204. package/dist/esm/z-slideshow.entry.js +2 -2
  205. package/dist/esm/z-stepper-item.entry.js +1 -1
  206. package/dist/esm/z-stepper.entry.js +1 -1
  207. package/dist/esm/z-table.entry.js +5 -5
  208. package/dist/esm/z-td.entry.js +2 -2
  209. package/dist/esm/z-th.entry.js +2 -2
  210. package/dist/esm/z-toast-notification-list.entry.js +2 -2
  211. package/dist/esm/z-toast-notification.entry.js +2 -2
  212. package/dist/esm/z-toggle-button.entry.js +2 -2
  213. package/dist/esm/z-toggle-switch.entry.js +5 -5
  214. package/dist/esm/z-tooltip.entry.js +2 -2
  215. package/dist/esm/z-tr.entry.js +5 -5
  216. package/dist/esm/z-tree-list.entry.js +1 -1
  217. package/dist/types/beans/index.d.ts +5 -0
  218. package/dist/types/components/z-button/index.d.ts +2 -2
  219. package/dist/types/components/z-popover/index.d.ts +50 -4
  220. package/dist/types/components/z-popover/index.stories.d.ts +26 -6
  221. package/dist/types/components.d.ts +27 -7
  222. package/dist/web-components-library/index.esm.js +1 -1
  223. package/dist/web-components-library/{p-6b679226.entry.js → p-0084024e.entry.js} +2 -2
  224. package/{www/build/p-0b26a8e0.js → dist/web-components-library/p-06b31bf5.js} +2 -2
  225. package/{www/build/p-b705fba3.entry.js → dist/web-components-library/p-0e91e5b6.entry.js} +2 -2
  226. package/dist/web-components-library/{p-f609b40e.entry.js → p-1252814d.entry.js} +2 -2
  227. package/{www/build/p-c6b7c8e4.entry.js → dist/web-components-library/p-12a7af3b.entry.js} +2 -2
  228. package/{www/build/p-dfcf9936.js → dist/web-components-library/p-137c2618.js} +1 -1
  229. package/dist/web-components-library/p-137c2618.js.map +1 -0
  230. package/{www/build/p-d60b9285.entry.js → dist/web-components-library/p-245a7cf6.entry.js} +2 -2
  231. package/dist/web-components-library/{p-43aea424.entry.js → p-26ea588a.entry.js} +2 -2
  232. package/dist/web-components-library/{p-611e6579.entry.js → p-2dee7eef.entry.js} +2 -2
  233. package/{www/build/p-f7d7cf44.entry.js → dist/web-components-library/p-353952ef.entry.js} +2 -2
  234. package/dist/web-components-library/{p-2726182b.entry.js → p-359fddfd.entry.js} +2 -2
  235. package/{www/build/p-c7d5971f.js → dist/web-components-library/p-36e71b13.js} +2 -2
  236. package/dist/web-components-library/p-37d31461.entry.js +2 -0
  237. package/dist/web-components-library/{p-dc46730d.entry.js → p-3cc02ff9.entry.js} +2 -2
  238. package/{www/build/p-49f99fa3.entry.js → dist/web-components-library/p-3fe267a1.entry.js} +2 -2
  239. package/dist/web-components-library/{p-b1561f18.entry.js → p-5123ff9e.entry.js} +2 -2
  240. package/dist/web-components-library/{p-d9592fa6.entry.js → p-512a8f43.entry.js} +2 -2
  241. package/dist/web-components-library/p-5ba4f3cf.entry.js +2 -0
  242. package/dist/web-components-library/p-5ba4f3cf.entry.js.map +1 -0
  243. package/dist/web-components-library/{p-604602a8.entry.js → p-5f58b59c.entry.js} +2 -2
  244. package/{www/build/p-a3860bef.entry.js → dist/web-components-library/p-5f5fd804.entry.js} +2 -2
  245. package/dist/web-components-library/{p-8e7554c4.entry.js → p-610207c1.entry.js} +2 -2
  246. package/dist/web-components-library/p-651250c2.entry.js +2 -0
  247. package/dist/web-components-library/{p-6598aee0.entry.js → p-6ba34f6e.entry.js} +2 -2
  248. package/{www/build/p-d8d7db0e.entry.js → dist/web-components-library/p-7248bddb.entry.js} +2 -2
  249. package/dist/web-components-library/p-725b253d.entry.js +2 -0
  250. package/dist/web-components-library/{p-222d4160.entry.js → p-74301de8.entry.js} +2 -2
  251. package/dist/web-components-library/p-76ee5c89.entry.js +2 -0
  252. package/{www/build/p-93af4721.entry.js → dist/web-components-library/p-77b02b31.entry.js} +2 -2
  253. package/dist/web-components-library/{p-b0f758e7.entry.js → p-7934dde1.entry.js} +2 -2
  254. package/{www/build/p-f73d8a87.entry.js → dist/web-components-library/p-7e554fad.entry.js} +2 -2
  255. package/dist/web-components-library/{p-e2b57681.js → p-84635654.js} +2 -2
  256. package/dist/web-components-library/{p-37a34984.entry.js → p-84fe65a8.entry.js} +2 -2
  257. package/dist/web-components-library/{p-f3145212.js → p-8c322c9a.js} +2 -2
  258. package/dist/web-components-library/{p-1ef90472.entry.js → p-93bea5f7.entry.js} +2 -2
  259. package/dist/web-components-library/{p-96b5a35d.entry.js → p-9c3cea8c.entry.js} +2 -2
  260. package/{www/build/p-506d2cdb.entry.js → dist/web-components-library/p-9dc90af3.entry.js} +2 -2
  261. package/dist/web-components-library/{p-2a657ab1.entry.js → p-9f506297.entry.js} +2 -2
  262. package/dist/web-components-library/{p-e4627f9a.entry.js → p-a33b1a31.entry.js} +2 -2
  263. package/dist/web-components-library/{p-a1d45a8b.entry.js → p-a3aef2c0.entry.js} +2 -2
  264. package/dist/web-components-library/p-a4e05ee2.entry.js +2 -0
  265. package/dist/web-components-library/{p-8b4ae80a.entry.js → p-aff88c50.entry.js} +2 -2
  266. package/dist/web-components-library/{p-ee7185cf.entry.js → p-b2313d3c.entry.js} +2 -2
  267. package/dist/web-components-library/p-b256f1e9.entry.js +2 -0
  268. package/dist/web-components-library/p-b256f1e9.entry.js.map +1 -0
  269. package/{www/build/p-564ddab3.entry.js → dist/web-components-library/p-b6de2c30.entry.js} +2 -2
  270. package/{www/build/p-3d8cdd34.entry.js → dist/web-components-library/p-bba086fb.entry.js} +2 -2
  271. package/dist/web-components-library/{p-e853ccde.entry.js → p-c231ed32.entry.js} +2 -2
  272. package/dist/web-components-library/{p-07da09b0.entry.js → p-c381b01c.entry.js} +2 -2
  273. package/dist/web-components-library/{p-8ec302f8.entry.js → p-c6ae7dfa.entry.js} +2 -2
  274. package/dist/web-components-library/p-cdd36026.entry.js +2 -0
  275. package/dist/web-components-library/p-cdd36026.entry.js.map +1 -0
  276. package/{www/build/p-996446e2.entry.js → dist/web-components-library/p-dd021fcb.entry.js} +2 -2
  277. package/dist/web-components-library/{p-430916e9.entry.js → p-e540d235.entry.js} +2 -2
  278. package/dist/web-components-library/{p-c1d89e00.entry.js → p-e5ac7dfc.entry.js} +2 -2
  279. package/{www/build/p-8ca5851b.entry.js → dist/web-components-library/p-e7270ec2.entry.js} +2 -2
  280. package/dist/web-components-library/{p-1dd6dff4.entry.js → p-e91ece0c.entry.js} +3 -3
  281. package/dist/web-components-library/{p-e8bab6ad.entry.js → p-ee8c03e3.entry.js} +2 -2
  282. package/{www/build/p-6949d27d.entry.js → dist/web-components-library/p-f0dd44c4.entry.js} +2 -2
  283. package/dist/web-components-library/p-f20f1ed3.entry.js +2 -0
  284. package/dist/web-components-library/{p-c08fe3cc.js → p-f670c5ad.js} +2 -2
  285. package/{www/build/p-b0856b23.entry.js → dist/web-components-library/p-f7461e10.entry.js} +2 -2
  286. package/dist/web-components-library/{p-811e9ae0.entry.js → p-fb12af88.entry.js} +2 -2
  287. package/dist/web-components-library/web-components-library.esm.js +1 -1
  288. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  289. package/package.json +1 -1
  290. package/www/build/index.esm.js +1 -1
  291. package/www/build/{p-6b679226.entry.js → p-0084024e.entry.js} +2 -2
  292. package/www/build/p-01619706.js +2 -0
  293. package/{dist/web-components-library/p-0b26a8e0.js → www/build/p-06b31bf5.js} +2 -2
  294. package/{dist/web-components-library/p-b705fba3.entry.js → www/build/p-0e91e5b6.entry.js} +2 -2
  295. package/www/build/{p-f609b40e.entry.js → p-1252814d.entry.js} +2 -2
  296. package/{dist/web-components-library/p-c6b7c8e4.entry.js → www/build/p-12a7af3b.entry.js} +2 -2
  297. package/{dist/web-components-library/p-dfcf9936.js → www/build/p-137c2618.js} +1 -1
  298. package/www/build/p-137c2618.js.map +1 -0
  299. package/{dist/web-components-library/p-d60b9285.entry.js → www/build/p-245a7cf6.entry.js} +2 -2
  300. package/www/build/{p-43aea424.entry.js → p-26ea588a.entry.js} +2 -2
  301. package/www/build/{p-611e6579.entry.js → p-2dee7eef.entry.js} +2 -2
  302. package/{dist/web-components-library/p-f7d7cf44.entry.js → www/build/p-353952ef.entry.js} +2 -2
  303. package/www/build/{p-2726182b.entry.js → p-359fddfd.entry.js} +2 -2
  304. package/{dist/web-components-library/p-c7d5971f.js → www/build/p-36e71b13.js} +2 -2
  305. package/www/build/p-37d31461.entry.js +2 -0
  306. package/www/build/{p-dc46730d.entry.js → p-3cc02ff9.entry.js} +2 -2
  307. package/{dist/web-components-library/p-49f99fa3.entry.js → www/build/p-3fe267a1.entry.js} +2 -2
  308. package/www/build/{p-b1561f18.entry.js → p-5123ff9e.entry.js} +2 -2
  309. package/www/build/{p-d9592fa6.entry.js → p-512a8f43.entry.js} +2 -2
  310. package/www/build/p-5ba4f3cf.entry.js +2 -0
  311. package/www/build/p-5ba4f3cf.entry.js.map +1 -0
  312. package/www/build/{p-604602a8.entry.js → p-5f58b59c.entry.js} +2 -2
  313. package/{dist/web-components-library/p-a3860bef.entry.js → www/build/p-5f5fd804.entry.js} +2 -2
  314. package/www/build/{p-8e7554c4.entry.js → p-610207c1.entry.js} +2 -2
  315. package/www/build/p-651250c2.entry.js +2 -0
  316. package/www/build/{p-6598aee0.entry.js → p-6ba34f6e.entry.js} +2 -2
  317. package/{dist/web-components-library/p-d8d7db0e.entry.js → www/build/p-7248bddb.entry.js} +2 -2
  318. package/www/build/p-725b253d.entry.js +2 -0
  319. package/www/build/{p-222d4160.entry.js → p-74301de8.entry.js} +2 -2
  320. package/www/build/p-76ee5c89.entry.js +2 -0
  321. package/{dist/web-components-library/p-93af4721.entry.js → www/build/p-77b02b31.entry.js} +2 -2
  322. package/www/build/{p-b0f758e7.entry.js → p-7934dde1.entry.js} +2 -2
  323. package/{dist/web-components-library/p-f73d8a87.entry.js → www/build/p-7e554fad.entry.js} +2 -2
  324. package/www/build/{p-e2b57681.js → p-84635654.js} +2 -2
  325. package/www/build/{p-37a34984.entry.js → p-84fe65a8.entry.js} +2 -2
  326. package/www/build/{p-f3145212.js → p-8c322c9a.js} +2 -2
  327. package/www/build/{p-1ef90472.entry.js → p-93bea5f7.entry.js} +2 -2
  328. package/www/build/{p-96b5a35d.entry.js → p-9c3cea8c.entry.js} +2 -2
  329. package/{dist/web-components-library/p-506d2cdb.entry.js → www/build/p-9dc90af3.entry.js} +2 -2
  330. package/www/build/{p-2a657ab1.entry.js → p-9f506297.entry.js} +2 -2
  331. package/www/build/{p-e4627f9a.entry.js → p-a33b1a31.entry.js} +2 -2
  332. package/www/build/{p-a1d45a8b.entry.js → p-a3aef2c0.entry.js} +2 -2
  333. package/www/build/p-a4e05ee2.entry.js +2 -0
  334. package/www/build/{p-8b4ae80a.entry.js → p-aff88c50.entry.js} +2 -2
  335. package/www/build/{p-ee7185cf.entry.js → p-b2313d3c.entry.js} +2 -2
  336. package/www/build/p-b256f1e9.entry.js +2 -0
  337. package/www/build/p-b256f1e9.entry.js.map +1 -0
  338. package/{dist/web-components-library/p-564ddab3.entry.js → www/build/p-b6de2c30.entry.js} +2 -2
  339. package/{dist/web-components-library/p-3d8cdd34.entry.js → www/build/p-bba086fb.entry.js} +2 -2
  340. package/www/build/{p-e853ccde.entry.js → p-c231ed32.entry.js} +2 -2
  341. package/www/build/{p-07da09b0.entry.js → p-c381b01c.entry.js} +2 -2
  342. package/www/build/{p-8ec302f8.entry.js → p-c6ae7dfa.entry.js} +2 -2
  343. package/www/build/p-cdd36026.entry.js +2 -0
  344. package/www/build/p-cdd36026.entry.js.map +1 -0
  345. package/{dist/web-components-library/p-996446e2.entry.js → www/build/p-dd021fcb.entry.js} +2 -2
  346. package/www/build/{p-430916e9.entry.js → p-e540d235.entry.js} +2 -2
  347. package/www/build/{p-c1d89e00.entry.js → p-e5ac7dfc.entry.js} +2 -2
  348. package/{dist/web-components-library/p-8ca5851b.entry.js → www/build/p-e7270ec2.entry.js} +2 -2
  349. package/www/build/{p-1dd6dff4.entry.js → p-e91ece0c.entry.js} +3 -3
  350. package/www/build/{p-e8bab6ad.entry.js → p-ee8c03e3.entry.js} +2 -2
  351. package/{dist/web-components-library/p-6949d27d.entry.js → www/build/p-f0dd44c4.entry.js} +2 -2
  352. package/www/build/p-f20f1ed3.entry.js +2 -0
  353. package/www/build/{p-c08fe3cc.js → p-f670c5ad.js} +2 -2
  354. package/{dist/web-components-library/p-b0856b23.entry.js → www/build/p-f7461e10.entry.js} +2 -2
  355. package/www/build/{p-811e9ae0.entry.js → p-fb12af88.entry.js} +2 -2
  356. package/www/build/web-components-library.esm.js +1 -1
  357. package/www/build/web-components-library.esm.js.map +1 -1
  358. package/www/index.html +1 -1
  359. package/dist/cjs/index-4f18c0e2.js.map +0 -1
  360. package/dist/esm/index-fe87283d.js.map +0 -1
  361. package/dist/web-components-library/p-0bd2b21e.entry.js +0 -2
  362. package/dist/web-components-library/p-43f9569d.entry.js +0 -2
  363. package/dist/web-components-library/p-43f9569d.entry.js.map +0 -1
  364. package/dist/web-components-library/p-550a5e46.entry.js +0 -2
  365. package/dist/web-components-library/p-550a5e46.entry.js.map +0 -1
  366. package/dist/web-components-library/p-83e3b2ff.entry.js +0 -2
  367. package/dist/web-components-library/p-a2217ed8.entry.js +0 -2
  368. package/dist/web-components-library/p-a9d05a92.entry.js +0 -2
  369. package/dist/web-components-library/p-cf837902.entry.js +0 -2
  370. package/dist/web-components-library/p-d8e88ea8.entry.js +0 -2
  371. package/dist/web-components-library/p-d8e88ea8.entry.js.map +0 -1
  372. package/dist/web-components-library/p-dfcf9936.js.map +0 -1
  373. package/dist/web-components-library/p-fd7c7885.entry.js +0 -2
  374. package/www/build/p-0666df4a.js +0 -2
  375. package/www/build/p-0bd2b21e.entry.js +0 -2
  376. package/www/build/p-43f9569d.entry.js +0 -2
  377. package/www/build/p-43f9569d.entry.js.map +0 -1
  378. package/www/build/p-550a5e46.entry.js +0 -2
  379. package/www/build/p-550a5e46.entry.js.map +0 -1
  380. package/www/build/p-83e3b2ff.entry.js +0 -2
  381. package/www/build/p-a2217ed8.entry.js +0 -2
  382. package/www/build/p-a9d05a92.entry.js +0 -2
  383. package/www/build/p-cf837902.entry.js +0 -2
  384. package/www/build/p-d8e88ea8.entry.js +0 -2
  385. package/www/build/p-d8e88ea8.entry.js.map +0 -1
  386. package/www/build/p-dfcf9936.js.map +0 -1
  387. package/www/build/p-fd7c7885.entry.js +0 -2
  388. /package/dist/types/home/{utente/Scrivania/Progetti-Zanichelli → runner/work/design-system}/design-system/.stencil/docs/grid/index.stories.d.ts +0 -0
  389. /package/dist/types/home/{utente/Scrivania/Progetti-Zanichelli → runner/work/design-system}/design-system/.stencil/docs/iconset/index.stories.d.ts +0 -0
  390. /package/dist/types/home/{utente/Scrivania/Progetti-Zanichelli → runner/work/design-system}/design-system/.stencil/docs/themes/index.stories.d.ts +0 -0
  391. /package/dist/types/home/{utente/Scrivania/Progetti-Zanichelli → runner/work/design-system}/design-system/.stencil/docs/typography/index.stories.d.ts +0 -0
  392. /package/dist/web-components-library/{p-6b679226.entry.js.map → p-0084024e.entry.js.map} +0 -0
  393. /package/dist/web-components-library/{p-0b26a8e0.js.map → p-06b31bf5.js.map} +0 -0
  394. /package/dist/web-components-library/{p-b705fba3.entry.js.map → p-0e91e5b6.entry.js.map} +0 -0
  395. /package/dist/web-components-library/{p-f609b40e.entry.js.map → p-1252814d.entry.js.map} +0 -0
  396. /package/dist/web-components-library/{p-c6b7c8e4.entry.js.map → p-12a7af3b.entry.js.map} +0 -0
  397. /package/dist/web-components-library/{p-d60b9285.entry.js.map → p-245a7cf6.entry.js.map} +0 -0
  398. /package/dist/web-components-library/{p-43aea424.entry.js.map → p-26ea588a.entry.js.map} +0 -0
  399. /package/dist/web-components-library/{p-611e6579.entry.js.map → p-2dee7eef.entry.js.map} +0 -0
  400. /package/dist/web-components-library/{p-f7d7cf44.entry.js.map → p-353952ef.entry.js.map} +0 -0
  401. /package/dist/web-components-library/{p-2726182b.entry.js.map → p-359fddfd.entry.js.map} +0 -0
  402. /package/dist/web-components-library/{p-c7d5971f.js.map → p-36e71b13.js.map} +0 -0
  403. /package/dist/web-components-library/{p-fd7c7885.entry.js.map → p-37d31461.entry.js.map} +0 -0
  404. /package/dist/web-components-library/{p-dc46730d.entry.js.map → p-3cc02ff9.entry.js.map} +0 -0
  405. /package/dist/web-components-library/{p-49f99fa3.entry.js.map → p-3fe267a1.entry.js.map} +0 -0
  406. /package/dist/web-components-library/{p-b1561f18.entry.js.map → p-5123ff9e.entry.js.map} +0 -0
  407. /package/dist/web-components-library/{p-d9592fa6.entry.js.map → p-512a8f43.entry.js.map} +0 -0
  408. /package/dist/web-components-library/{p-604602a8.entry.js.map → p-5f58b59c.entry.js.map} +0 -0
  409. /package/dist/web-components-library/{p-a3860bef.entry.js.map → p-5f5fd804.entry.js.map} +0 -0
  410. /package/dist/web-components-library/{p-8e7554c4.entry.js.map → p-610207c1.entry.js.map} +0 -0
  411. /package/dist/web-components-library/{p-a2217ed8.entry.js.map → p-651250c2.entry.js.map} +0 -0
  412. /package/dist/web-components-library/{p-6598aee0.entry.js.map → p-6ba34f6e.entry.js.map} +0 -0
  413. /package/dist/web-components-library/{p-d8d7db0e.entry.js.map → p-7248bddb.entry.js.map} +0 -0
  414. /package/dist/web-components-library/{p-0bd2b21e.entry.js.map → p-725b253d.entry.js.map} +0 -0
  415. /package/dist/web-components-library/{p-222d4160.entry.js.map → p-74301de8.entry.js.map} +0 -0
  416. /package/dist/web-components-library/{p-a9d05a92.entry.js.map → p-76ee5c89.entry.js.map} +0 -0
  417. /package/dist/web-components-library/{p-93af4721.entry.js.map → p-77b02b31.entry.js.map} +0 -0
  418. /package/dist/web-components-library/{p-b0f758e7.entry.js.map → p-7934dde1.entry.js.map} +0 -0
  419. /package/dist/web-components-library/{p-f73d8a87.entry.js.map → p-7e554fad.entry.js.map} +0 -0
  420. /package/dist/web-components-library/{p-e2b57681.js.map → p-84635654.js.map} +0 -0
  421. /package/dist/web-components-library/{p-37a34984.entry.js.map → p-84fe65a8.entry.js.map} +0 -0
  422. /package/dist/web-components-library/{p-f3145212.js.map → p-8c322c9a.js.map} +0 -0
  423. /package/dist/web-components-library/{p-1ef90472.entry.js.map → p-93bea5f7.entry.js.map} +0 -0
  424. /package/dist/web-components-library/{p-96b5a35d.entry.js.map → p-9c3cea8c.entry.js.map} +0 -0
  425. /package/dist/web-components-library/{p-506d2cdb.entry.js.map → p-9dc90af3.entry.js.map} +0 -0
  426. /package/dist/web-components-library/{p-2a657ab1.entry.js.map → p-9f506297.entry.js.map} +0 -0
  427. /package/dist/web-components-library/{p-e4627f9a.entry.js.map → p-a33b1a31.entry.js.map} +0 -0
  428. /package/dist/web-components-library/{p-a1d45a8b.entry.js.map → p-a3aef2c0.entry.js.map} +0 -0
  429. /package/dist/web-components-library/{p-83e3b2ff.entry.js.map → p-a4e05ee2.entry.js.map} +0 -0
  430. /package/dist/web-components-library/{p-8b4ae80a.entry.js.map → p-aff88c50.entry.js.map} +0 -0
  431. /package/dist/web-components-library/{p-ee7185cf.entry.js.map → p-b2313d3c.entry.js.map} +0 -0
  432. /package/dist/web-components-library/{p-564ddab3.entry.js.map → p-b6de2c30.entry.js.map} +0 -0
  433. /package/dist/web-components-library/{p-3d8cdd34.entry.js.map → p-bba086fb.entry.js.map} +0 -0
  434. /package/dist/web-components-library/{p-e853ccde.entry.js.map → p-c231ed32.entry.js.map} +0 -0
  435. /package/dist/web-components-library/{p-07da09b0.entry.js.map → p-c381b01c.entry.js.map} +0 -0
  436. /package/dist/web-components-library/{p-8ec302f8.entry.js.map → p-c6ae7dfa.entry.js.map} +0 -0
  437. /package/dist/web-components-library/{p-996446e2.entry.js.map → p-dd021fcb.entry.js.map} +0 -0
  438. /package/dist/web-components-library/{p-430916e9.entry.js.map → p-e540d235.entry.js.map} +0 -0
  439. /package/dist/web-components-library/{p-c1d89e00.entry.js.map → p-e5ac7dfc.entry.js.map} +0 -0
  440. /package/dist/web-components-library/{p-8ca5851b.entry.js.map → p-e7270ec2.entry.js.map} +0 -0
  441. /package/dist/web-components-library/{p-1dd6dff4.entry.js.map → p-e91ece0c.entry.js.map} +0 -0
  442. /package/dist/web-components-library/{p-e8bab6ad.entry.js.map → p-ee8c03e3.entry.js.map} +0 -0
  443. /package/dist/web-components-library/{p-6949d27d.entry.js.map → p-f0dd44c4.entry.js.map} +0 -0
  444. /package/dist/web-components-library/{p-cf837902.entry.js.map → p-f20f1ed3.entry.js.map} +0 -0
  445. /package/dist/web-components-library/{p-c08fe3cc.js.map → p-f670c5ad.js.map} +0 -0
  446. /package/dist/web-components-library/{p-b0856b23.entry.js.map → p-f7461e10.entry.js.map} +0 -0
  447. /package/dist/web-components-library/{p-811e9ae0.entry.js.map → p-fb12af88.entry.js.map} +0 -0
  448. /package/www/build/{p-6b679226.entry.js.map → p-0084024e.entry.js.map} +0 -0
  449. /package/www/build/{p-0b26a8e0.js.map → p-06b31bf5.js.map} +0 -0
  450. /package/www/build/{p-b705fba3.entry.js.map → p-0e91e5b6.entry.js.map} +0 -0
  451. /package/www/build/{p-f609b40e.entry.js.map → p-1252814d.entry.js.map} +0 -0
  452. /package/www/build/{p-c6b7c8e4.entry.js.map → p-12a7af3b.entry.js.map} +0 -0
  453. /package/www/build/{p-d60b9285.entry.js.map → p-245a7cf6.entry.js.map} +0 -0
  454. /package/www/build/{p-43aea424.entry.js.map → p-26ea588a.entry.js.map} +0 -0
  455. /package/www/build/{p-611e6579.entry.js.map → p-2dee7eef.entry.js.map} +0 -0
  456. /package/www/build/{p-f7d7cf44.entry.js.map → p-353952ef.entry.js.map} +0 -0
  457. /package/www/build/{p-2726182b.entry.js.map → p-359fddfd.entry.js.map} +0 -0
  458. /package/www/build/{p-c7d5971f.js.map → p-36e71b13.js.map} +0 -0
  459. /package/www/build/{p-fd7c7885.entry.js.map → p-37d31461.entry.js.map} +0 -0
  460. /package/www/build/{p-dc46730d.entry.js.map → p-3cc02ff9.entry.js.map} +0 -0
  461. /package/www/build/{p-49f99fa3.entry.js.map → p-3fe267a1.entry.js.map} +0 -0
  462. /package/www/build/{p-b1561f18.entry.js.map → p-5123ff9e.entry.js.map} +0 -0
  463. /package/www/build/{p-d9592fa6.entry.js.map → p-512a8f43.entry.js.map} +0 -0
  464. /package/www/build/{p-604602a8.entry.js.map → p-5f58b59c.entry.js.map} +0 -0
  465. /package/www/build/{p-a3860bef.entry.js.map → p-5f5fd804.entry.js.map} +0 -0
  466. /package/www/build/{p-8e7554c4.entry.js.map → p-610207c1.entry.js.map} +0 -0
  467. /package/www/build/{p-a2217ed8.entry.js.map → p-651250c2.entry.js.map} +0 -0
  468. /package/www/build/{p-6598aee0.entry.js.map → p-6ba34f6e.entry.js.map} +0 -0
  469. /package/www/build/{p-d8d7db0e.entry.js.map → p-7248bddb.entry.js.map} +0 -0
  470. /package/www/build/{p-0bd2b21e.entry.js.map → p-725b253d.entry.js.map} +0 -0
  471. /package/www/build/{p-222d4160.entry.js.map → p-74301de8.entry.js.map} +0 -0
  472. /package/www/build/{p-a9d05a92.entry.js.map → p-76ee5c89.entry.js.map} +0 -0
  473. /package/www/build/{p-93af4721.entry.js.map → p-77b02b31.entry.js.map} +0 -0
  474. /package/www/build/{p-b0f758e7.entry.js.map → p-7934dde1.entry.js.map} +0 -0
  475. /package/www/build/{p-f73d8a87.entry.js.map → p-7e554fad.entry.js.map} +0 -0
  476. /package/www/build/{p-e2b57681.js.map → p-84635654.js.map} +0 -0
  477. /package/www/build/{p-37a34984.entry.js.map → p-84fe65a8.entry.js.map} +0 -0
  478. /package/www/build/{p-f3145212.js.map → p-8c322c9a.js.map} +0 -0
  479. /package/www/build/{p-1ef90472.entry.js.map → p-93bea5f7.entry.js.map} +0 -0
  480. /package/www/build/{p-96b5a35d.entry.js.map → p-9c3cea8c.entry.js.map} +0 -0
  481. /package/www/build/{p-506d2cdb.entry.js.map → p-9dc90af3.entry.js.map} +0 -0
  482. /package/www/build/{p-2a657ab1.entry.js.map → p-9f506297.entry.js.map} +0 -0
  483. /package/www/build/{p-e4627f9a.entry.js.map → p-a33b1a31.entry.js.map} +0 -0
  484. /package/www/build/{p-a1d45a8b.entry.js.map → p-a3aef2c0.entry.js.map} +0 -0
  485. /package/www/build/{p-83e3b2ff.entry.js.map → p-a4e05ee2.entry.js.map} +0 -0
  486. /package/www/build/{p-8b4ae80a.entry.js.map → p-aff88c50.entry.js.map} +0 -0
  487. /package/www/build/{p-ee7185cf.entry.js.map → p-b2313d3c.entry.js.map} +0 -0
  488. /package/www/build/{p-564ddab3.entry.js.map → p-b6de2c30.entry.js.map} +0 -0
  489. /package/www/build/{p-3d8cdd34.entry.js.map → p-bba086fb.entry.js.map} +0 -0
  490. /package/www/build/{p-e853ccde.entry.js.map → p-c231ed32.entry.js.map} +0 -0
  491. /package/www/build/{p-07da09b0.entry.js.map → p-c381b01c.entry.js.map} +0 -0
  492. /package/www/build/{p-8ec302f8.entry.js.map → p-c6ae7dfa.entry.js.map} +0 -0
  493. /package/www/build/{p-996446e2.entry.js.map → p-dd021fcb.entry.js.map} +0 -0
  494. /package/www/build/{p-430916e9.entry.js.map → p-e540d235.entry.js.map} +0 -0
  495. /package/www/build/{p-c1d89e00.entry.js.map → p-e5ac7dfc.entry.js.map} +0 -0
  496. /package/www/build/{p-8ca5851b.entry.js.map → p-e7270ec2.entry.js.map} +0 -0
  497. /package/www/build/{p-1dd6dff4.entry.js.map → p-e91ece0c.entry.js.map} +0 -0
  498. /package/www/build/{p-e8bab6ad.entry.js.map → p-ee8c03e3.entry.js.map} +0 -0
  499. /package/www/build/{p-6949d27d.entry.js.map → p-f0dd44c4.entry.js.map} +0 -0
  500. /package/www/build/{p-cf837902.entry.js.map → p-f20f1ed3.entry.js.map} +0 -0
  501. /package/www/build/{p-c08fe3cc.js.map → p-f670c5ad.js.map} +0 -0
  502. /package/www/build/{p-b0856b23.entry.js.map → p-f7461e10.entry.js.map} +0 -0
  503. /package/www/build/{p-811e9ae0.entry.js.map → p-fb12af88.entry.js.map} +0 -0
@@ -1,7 +1,7 @@
1
- import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import { P as PopoverPosition, g as KeyboardCode } from './index2.js';
3
3
 
4
- const stylesCss = ":host{--z-popover-theme--surface:var(--color-surface01);--z-popover-theme--text:var(--color-default-text);--z-popover-padding:0;--z-popover-shadow-filter:drop-shadow(0 1px 2px var(--shadow-color-base));position:relative;display:none;min-width:calc(var(--space-unit) * 8);min-height:calc(var(--space-unit) * 4);align-items:center;justify-content:center;padding:var(--z-popover-padding);background:var(--z-popover-theme--surface);border-radius:var(--border-radius-small);color:var(--z-popover-theme--text);fill:currentcolor;filter:var(--z-popover-shadow-filter);font-family:var(--font-family-sans);text-align:center}: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));position:absolute;display:block;width:var(--arrow-size);height:var(--arrow-size);background:var(--z-popover-theme--surface);content:\"\";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(*){overflow:auto;flex:1 auto}";
4
+ const stylesCss = ":host{position:absolute;display:none;min-width:calc(var(--space-unit) * 8);max-width:100%;min-height:calc(var(--space-unit) * 4);max-height:100%;align-items:center;justify-content:center;padding:var(--z-popover-padding, 0);background:var(--z-popover-theme--surface, var(--color-surface01));border-radius:var(--border-radius-small);color:var(--z-popover-theme--text, var(--color-default-text));fill:currentcolor;filter:var(--z-popover-shadow-filter, drop-shadow(0 1px 2px var(--shadow-color-base)));font-family:var(--font-family-sans);text-align:center}:host([open]:not([current-position])){visibility:hidden}: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));position:absolute;display:block;width:var(--arrow-size);height:var(--arrow-size);background:var(--z-popover-theme--surface, var(--color-surface01));content:\"\";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(*){overflow:auto;flex:1 auto}";
5
5
  const ZPopoverStyle0 = stylesCss;
6
6
 
7
7
  const DOCUMENT_ELEMENT = document.documentElement;
@@ -19,12 +19,18 @@ function getParentElement(element) {
19
19
  function findScrollableParent(element) {
20
20
  let parent = getParentElement(element);
21
21
  while (parent && parent !== DOCUMENT_ELEMENT) {
22
- const { overflow, overflowX, overflowY } = window.getComputedStyle(parent);
22
+ const style = window.getComputedStyle(parent);
23
+ const { overflow, overflowX, overflowY } = style;
24
+ // Check for hidden overflow first (early return)
23
25
  if (overflow === "hidden" || overflowY === "hidden" || overflowX === "hidden") {
24
26
  return parent;
25
27
  }
26
- if ((parent.scrollHeight > parent.clientHeight && overflow !== "visible" && overflowY !== "visible") ||
27
- (parent.scrollWidth > parent.clientWidth && overflow !== "visible" && overflowX !== "visible")) {
28
+ // Only check scrollable if overflow is not visible
29
+ const isOverflowNotVisible = overflow !== "visible";
30
+ const isOverflowYNotVisible = overflowY !== "visible";
31
+ const isOverflowXNotVisible = overflowX !== "visible";
32
+ if ((parent.scrollHeight > parent.clientHeight && isOverflowNotVisible && isOverflowYNotVisible) ||
33
+ (parent.scrollWidth > parent.clientWidth && isOverflowNotVisible && isOverflowXNotVisible)) {
28
34
  return parent;
29
35
  }
30
36
  parent = getParentElement(parent);
@@ -36,30 +42,28 @@ function findScrollableParent(element) {
36
42
  * It includes matrix transformations.
37
43
  * @param element The target element.
38
44
  * @param targetParentOffset The relative offset parent.
39
- * @return A client rect object.
40
45
  */
41
46
  function computeOffset(element, targetParentOffset) {
42
47
  const rect = element.getBoundingClientRect();
43
- const width = rect.width;
44
- const height = rect.height;
48
+ const { width, height } = rect;
45
49
  let top = 0;
46
50
  let left = 0;
47
51
  let offsetParent = element;
48
- while (offsetParent && offsetParent != targetParentOffset) {
52
+ while (offsetParent && offsetParent !== targetParentOffset) {
49
53
  left += offsetParent.offsetLeft;
50
- // document.body sometimes has offsetTop == 0 but still has an
51
- // offset because of children margins!
54
+ // document.body sometimes has offsetTop == 0 but still has an offset because of children margins!
52
55
  if (offsetParent === document.body) {
53
56
  top += offsetParent.getBoundingClientRect().top + window.scrollY;
54
57
  }
55
58
  else {
56
59
  top += offsetParent.offsetTop;
57
60
  }
61
+ // Handle CSS transforms only when DOMMatrix is available
58
62
  if (window.DOMMatrix) {
59
63
  const style = window.getComputedStyle(offsetParent);
60
- const transform = style.transform || style.webkitTransform;
61
- const domMatrix = new DOMMatrix(transform);
62
- if (domMatrix) {
64
+ const { transform } = style;
65
+ if (transform && transform !== "none") {
66
+ const domMatrix = new DOMMatrix(transform);
63
67
  left += domMatrix.m41;
64
68
  if (offsetParent !== document.body) {
65
69
  top += domMatrix.m42;
@@ -81,8 +85,8 @@ function computeOffset(element, targetParentOffset) {
81
85
  parentWidth = offsetParent.offsetWidth;
82
86
  parentHeight = offsetParent.offsetHeight;
83
87
  }
84
- const right = parentWidth - left - rect.width;
85
- const bottom = parentHeight - top - rect.height;
88
+ const right = parentWidth - left - width;
89
+ const bottom = parentHeight - top - height;
86
90
  return { top, right, bottom, left, width, height };
87
91
  }
88
92
  const ZPopover = /*@__PURE__*/ proxyCustomElement(class ZPopover extends HTMLElement {
@@ -92,7 +96,8 @@ const ZPopover = /*@__PURE__*/ proxyCustomElement(class ZPopover extends HTMLEle
92
96
  this.__attachShadow();
93
97
  this.positionChange = createEvent(this, "positionChange", 7);
94
98
  this.openChange = createEvent(this, "openChange", 7);
95
- this.position = PopoverPosition.AUTO;
99
+ this.spaceTolerance = 3; // 3px tolerance for space calculations
100
+ this.position = PopoverPosition.TOP;
96
101
  this.open = false;
97
102
  this.bindTo = undefined;
98
103
  this.showArrow = false;
@@ -115,10 +120,18 @@ const ZPopover = /*@__PURE__*/ proxyCustomElement(class ZPopover extends HTMLEle
115
120
  if (!this.closable || !this.open) {
116
121
  return;
117
122
  }
118
- if (!e.composedPath().includes(this.host)) {
123
+ const eventPath = e.composedPath();
124
+ if (!eventPath.includes(this.host)) {
119
125
  const target = e.target;
120
- const triggerElemClicked = this.bindTo instanceof HTMLElement ? this.bindTo.contains(target) : target.closest(this.bindTo);
126
+ let triggerElemClicked = false;
127
+ if (typeof this.bindTo === "string") {
128
+ triggerElemClicked = !!target.closest(this.bindTo);
129
+ }
130
+ else if (this.bindTo) {
131
+ triggerElemClicked = this.bindTo.contains(target);
132
+ }
121
133
  if (triggerElemClicked) {
134
+ // stop propagation if the click was on the trigger element to prevent close and reopen glitches
122
135
  e.stopPropagation();
123
136
  }
124
137
  this.open = false;
@@ -126,11 +139,13 @@ const ZPopover = /*@__PURE__*/ proxyCustomElement(class ZPopover extends HTMLEle
126
139
  }
127
140
  }
128
141
  validatePosition(newValue) {
129
- if (newValue && !Object.values(PopoverPosition).includes(newValue)) {
130
- this.position = PopoverPosition.AUTO;
142
+ if (!Object.values(PopoverPosition).includes(newValue) || newValue === PopoverPosition.AUTO) {
143
+ newValue = PopoverPosition.TOP;
131
144
  }
132
- this.currentPosition = this.position;
145
+ this.position = newValue;
146
+ this.currentPosition = newValue;
133
147
  this.positionChange.emit({ position: this.currentPosition });
148
+ this.setPosition();
134
149
  }
135
150
  /**
136
151
  * Setup popover behaviors on opening.
@@ -144,165 +159,289 @@ const ZPopover = /*@__PURE__*/ proxyCustomElement(class ZPopover extends HTMLEle
144
159
  this.animationFrameRequestId = requestAnimationFrame(setPosition);
145
160
  }
146
161
  };
147
- setPosition();
148
- }
149
- else if (this.host.hasAttribute("current-position")) {
150
- this.host.removeAttribute("current-position");
151
- this.currentPosition = undefined;
162
+ // call `setPosition` after a tick to ensure the DOM is ready and sizes are available
163
+ setTimeout(() => {
164
+ setPosition();
165
+ }, 0);
152
166
  }
153
167
  this.openChange.emit({ open: this.open });
154
168
  }
155
- disconnectedCallback() {
156
- cancelAnimationFrame(this.animationFrameRequestId);
169
+ /**
170
+ * Helper functions for space calculation
171
+ */
172
+ hasCenteredHorizontalSpace(availableLeft, availableRight, hostWidth, boundWidth, offsetModifier) {
173
+ const requiredSpace = (hostWidth - boundWidth) * (1 - offsetModifier);
174
+ return (availableLeft >= requiredSpace - this.spaceTolerance && availableRight >= requiredSpace - this.spaceTolerance);
175
+ }
176
+ hasCenteredVerticalSpace(availableTop, availableBottom, hostHeight, boundHeight, offsetModifier) {
177
+ const requiredSpace = (hostHeight - boundHeight) * (1 - offsetModifier);
178
+ return (availableTop >= requiredSpace - this.spaceTolerance && availableBottom >= requiredSpace - this.spaceTolerance);
179
+ }
180
+ hasOffsetSpace(availableSpace, hostSize, boundSize, offsetModifier) {
181
+ return availableSpace >= hostSize - boundSize * (1 - offsetModifier) - this.spaceTolerance;
182
+ }
183
+ /**
184
+ * Given a desired position and available space around the bound element, returns the best position
185
+ * that fits the popover, trying all positions if needed.
186
+ * Takes into account offsetModifier for centering.
187
+ * @param desiredPosition The desired position of the popover.
188
+ * @param availableSpace The available space around the bound element.
189
+ * @param boundElemSizes The sizes of the bound element.
190
+ * @param offsetModifier The modifier to apply to the offset for centering.
191
+ */
192
+ getOptimalPopoverPosition(desiredPosition, availableSpace, boundElemSizes, offsetModifier) {
193
+ const hostWidth = this.host.offsetWidth;
194
+ const hostHeight = this.host.offsetHeight;
195
+ // Check if the desired position has enough space
196
+ const fits = (pos) => {
197
+ switch (pos) {
198
+ case PopoverPosition.TOP:
199
+ return (availableSpace.top >= hostHeight &&
200
+ this.hasCenteredHorizontalSpace(availableSpace.left, availableSpace.right, hostWidth, boundElemSizes.width, offsetModifier));
201
+ case PopoverPosition.TOP_RIGHT:
202
+ return (availableSpace.top >= hostHeight &&
203
+ this.hasOffsetSpace(availableSpace.right, hostWidth, boundElemSizes.width, offsetModifier));
204
+ case PopoverPosition.TOP_LEFT:
205
+ return (availableSpace.top >= hostHeight &&
206
+ this.hasOffsetSpace(availableSpace.left, hostWidth, boundElemSizes.width, offsetModifier));
207
+ case PopoverPosition.RIGHT:
208
+ return (availableSpace.right >= hostWidth &&
209
+ this.hasCenteredVerticalSpace(availableSpace.top, availableSpace.bottom, hostHeight, boundElemSizes.height, offsetModifier));
210
+ case PopoverPosition.RIGHT_BOTTOM:
211
+ return (availableSpace.right >= hostWidth &&
212
+ this.hasOffsetSpace(availableSpace.bottom, hostHeight, boundElemSizes.height, offsetModifier));
213
+ case PopoverPosition.RIGHT_TOP:
214
+ return (availableSpace.right >= hostWidth &&
215
+ this.hasOffsetSpace(availableSpace.top, hostHeight, boundElemSizes.height, offsetModifier));
216
+ case PopoverPosition.BOTTOM:
217
+ return (availableSpace.bottom >= hostHeight &&
218
+ this.hasCenteredHorizontalSpace(availableSpace.left, availableSpace.right, hostWidth, boundElemSizes.width, offsetModifier));
219
+ case PopoverPosition.BOTTOM_LEFT:
220
+ return (availableSpace.bottom >= hostHeight &&
221
+ this.hasOffsetSpace(availableSpace.left, hostWidth, boundElemSizes.width, offsetModifier));
222
+ case PopoverPosition.BOTTOM_RIGHT:
223
+ return (availableSpace.bottom >= hostHeight &&
224
+ this.hasOffsetSpace(availableSpace.right, hostWidth, boundElemSizes.width, offsetModifier));
225
+ case PopoverPosition.LEFT:
226
+ return (availableSpace.left >= hostWidth &&
227
+ this.hasCenteredVerticalSpace(availableSpace.top, availableSpace.bottom, hostHeight, boundElemSizes.height, offsetModifier));
228
+ case PopoverPosition.LEFT_TOP:
229
+ return (availableSpace.left >= hostWidth &&
230
+ this.hasOffsetSpace(availableSpace.top, hostHeight, boundElemSizes.height, offsetModifier));
231
+ case PopoverPosition.LEFT_BOTTOM:
232
+ return (availableSpace.left >= hostWidth &&
233
+ this.hasOffsetSpace(availableSpace.bottom, hostHeight, boundElemSizes.height, offsetModifier));
234
+ default:
235
+ return false;
236
+ }
237
+ };
238
+ // Check desired position first
239
+ if (fits(desiredPosition)) {
240
+ return desiredPosition;
241
+ }
242
+ // Find position index and create rotation starting from next position
243
+ const positions = ZPopover.positionOrder;
244
+ const startIndex = positions.indexOf(desiredPosition);
245
+ if (startIndex === -1) {
246
+ return desiredPosition; // fallback if position not found
247
+ }
248
+ // Try all other positions starting from the next one
249
+ for (let i = 1; i < positions.length; i++) {
250
+ const posIndex = (startIndex + i) % positions.length;
251
+ const pos = positions[posIndex];
252
+ if (fits(pos)) {
253
+ return pos;
254
+ }
255
+ }
256
+ // If no position fits, find the best fallback based on available space
257
+ return this.findBestFallbackPosition(availableSpace);
258
+ }
259
+ /**
260
+ * Find the best fallback position based on available space when no position fits perfectly
261
+ */
262
+ findBestFallbackPosition(availableSpace) {
263
+ // Determine the directions with the most space
264
+ const bestHorizontalDirection = availableSpace.right >= availableSpace.left ? PopoverPosition.RIGHT : PopoverPosition.LEFT;
265
+ const bestVerticalDirection = availableSpace.bottom >= availableSpace.top ? PopoverPosition.BOTTOM : PopoverPosition.TOP;
266
+ // Choose the main direction based on which has more space
267
+ const maxHorizontalSpace = Math.max(availableSpace.right, availableSpace.left);
268
+ const maxVerticalSpace = Math.max(availableSpace.bottom, availableSpace.top);
269
+ const mainDirection = maxVerticalSpace >= maxHorizontalSpace ? bestVerticalDirection : bestHorizontalDirection;
270
+ // Check if secondary direction is necessary
271
+ // Only add secondary direction if the difference between min and max in that direction is at least double
272
+ let needsSecondaryDirection = false;
273
+ if (mainDirection === bestVerticalDirection) {
274
+ // Main direction is vertical, check horizontal space difference
275
+ const minHorizontalSpace = Math.min(availableSpace.right, availableSpace.left);
276
+ needsSecondaryDirection = maxHorizontalSpace >= minHorizontalSpace * 2;
277
+ }
278
+ else {
279
+ // Main direction is horizontal, check vertical space difference
280
+ const minVerticalSpace = Math.min(availableSpace.bottom, availableSpace.top);
281
+ needsSecondaryDirection = maxVerticalSpace >= minVerticalSpace * 2;
282
+ }
283
+ if (!needsSecondaryDirection) {
284
+ return mainDirection;
285
+ }
286
+ const secondaryDirection = mainDirection === bestVerticalDirection ? bestHorizontalDirection : bestVerticalDirection;
287
+ // Create a combined position (e.g., "bottom_right")
288
+ return `${mainDirection}_${secondaryDirection}`;
289
+ }
290
+ /**
291
+ * Calculate available space around the bound element
292
+ */
293
+ calculateAvailableSpace(boundElementRect, scrollContainer, scrollingBoundingRect) {
294
+ const top = boundElementRect.top - scrollContainer.scrollTop;
295
+ const bottom = scrollingBoundingRect.height - (boundElementRect.top + boundElementRect.height) + scrollContainer.scrollTop;
296
+ const left = boundElementRect.left - scrollContainer.scrollLeft;
297
+ const right = scrollingBoundingRect.width - (boundElementRect.left + boundElementRect.width) + scrollContainer.scrollLeft;
298
+ const overflowBottom = Math.max(0, scrollingBoundingRect.top + scrollingBoundingRect.height - window.innerHeight);
299
+ const overflowRight = Math.max(0, scrollingBoundingRect.left + scrollingBoundingRect.width - window.innerWidth);
300
+ return {
301
+ top: Math.min(top, top + scrollingBoundingRect.top),
302
+ bottom: Math.min(bottom, bottom - overflowBottom),
303
+ left: Math.min(left, left + scrollingBoundingRect.left),
304
+ right: Math.min(right, right - overflowRight),
305
+ };
306
+ }
307
+ /**
308
+ * Calculate relative offsets for positioning
309
+ */
310
+ calculateRelativeOffsets(boundElementRect, relativeBoundingRect) {
311
+ return {
312
+ top: boundElementRect.top - relativeBoundingRect.top,
313
+ right: boundElementRect.right - relativeBoundingRect.right,
314
+ bottom: boundElementRect.bottom - relativeBoundingRect.bottom,
315
+ left: boundElementRect.left - relativeBoundingRect.left,
316
+ };
317
+ }
318
+ /**
319
+ * Apply positioning styles based on position
320
+ */
321
+ applyPositionStyles(position, style, offsets, boundElementSizes, availableSpace, offsetModifier, arrowModifier) {
322
+ const distanceFromBound = 8; // 8px is the distance of the popover from the bound element
323
+ // Reset all positioning properties
324
+ style.top = "auto";
325
+ style.right = "auto";
326
+ style.bottom = "auto";
327
+ style.left = "auto";
328
+ style.maxWidth = "";
329
+ style.maxHeight = "";
330
+ switch (position) {
331
+ case PopoverPosition.TOP:
332
+ case PopoverPosition.TOP_RIGHT:
333
+ style.bottom = `${offsets.bottom + boundElementSizes.height}px`;
334
+ style.left = `${offsets.left + boundElementSizes.width * offsetModifier - (position === PopoverPosition.TOP_RIGHT ? arrowModifier : 0)}px`;
335
+ style.maxHeight = `${availableSpace.top - distanceFromBound}px`;
336
+ if (position === PopoverPosition.TOP_RIGHT) {
337
+ style.maxWidth = `${availableSpace.right + boundElementSizes.width * offsetModifier}px`;
338
+ }
339
+ break;
340
+ case PopoverPosition.TOP_LEFT:
341
+ style.right = `${offsets.right + boundElementSizes.width * offsetModifier - arrowModifier}px`;
342
+ style.bottom = `${offsets.bottom + boundElementSizes.height}px`;
343
+ style.maxWidth = `${availableSpace.left}px`;
344
+ style.maxHeight = `${availableSpace.top - distanceFromBound}px`;
345
+ break;
346
+ case PopoverPosition.BOTTOM:
347
+ case PopoverPosition.BOTTOM_RIGHT:
348
+ style.top = `${offsets.top + boundElementSizes.height}px`;
349
+ style.left = `${offsets.left + boundElementSizes.width * offsetModifier - (position === PopoverPosition.BOTTOM_RIGHT ? arrowModifier : 0)}px`;
350
+ style.maxHeight = `${availableSpace.bottom - distanceFromBound}px`;
351
+ if (position === PopoverPosition.BOTTOM_RIGHT) {
352
+ style.maxWidth = `${availableSpace.right + boundElementSizes.width * offsetModifier}px`;
353
+ }
354
+ break;
355
+ case PopoverPosition.BOTTOM_LEFT:
356
+ style.top = `${offsets.top + boundElementSizes.height}px`;
357
+ style.right = `${offsets.right + boundElementSizes.width * offsetModifier - arrowModifier}px`;
358
+ style.maxWidth = `${availableSpace.left}px`;
359
+ style.maxHeight = `${availableSpace.bottom - distanceFromBound}px`;
360
+ break;
361
+ case PopoverPosition.RIGHT:
362
+ case PopoverPosition.RIGHT_BOTTOM:
363
+ style.top = `${offsets.top + boundElementSizes.height * offsetModifier - (position === PopoverPosition.RIGHT_BOTTOM ? arrowModifier : 0)}px`;
364
+ style.left = `${offsets.left + boundElementSizes.width}px`;
365
+ style.maxWidth = `${availableSpace.right - distanceFromBound}px`;
366
+ if (position === PopoverPosition.RIGHT) {
367
+ style.maxHeight = `${Math.min(availableSpace.top + availableSpace.bottom + boundElementSizes.height, window.innerHeight - 20)}px`;
368
+ }
369
+ else {
370
+ style.maxHeight = `${availableSpace.bottom + boundElementSizes.height * offsetModifier}px`;
371
+ }
372
+ break;
373
+ case PopoverPosition.RIGHT_TOP:
374
+ style.bottom = `${offsets.bottom + boundElementSizes.height * offsetModifier - arrowModifier}px`;
375
+ style.left = `${offsets.left + boundElementSizes.width}px`;
376
+ style.maxWidth = `${availableSpace.right - distanceFromBound}px`;
377
+ if (position === PopoverPosition.RIGHT_TOP) {
378
+ style.maxHeight = `${availableSpace.top + boundElementSizes.height * offsetModifier}px`;
379
+ }
380
+ break;
381
+ case PopoverPosition.LEFT:
382
+ case PopoverPosition.LEFT_BOTTOM:
383
+ style.top = `${offsets.top + boundElementSizes.height * offsetModifier - (position === PopoverPosition.LEFT_BOTTOM ? arrowModifier : 0)}px`;
384
+ style.right = `${offsets.right + boundElementSizes.width}px`;
385
+ style.maxWidth = `${availableSpace.left - distanceFromBound}px`;
386
+ if (position === PopoverPosition.LEFT_BOTTOM) {
387
+ style.maxHeight = `${availableSpace.bottom + boundElementSizes.height * offsetModifier}px`;
388
+ }
389
+ break;
390
+ case PopoverPosition.LEFT_TOP:
391
+ style.right = `${offsets.right + boundElementSizes.width}px`;
392
+ style.bottom = `${offsets.bottom + boundElementSizes.height * offsetModifier - arrowModifier}px`;
393
+ style.maxWidth = `${availableSpace.left - distanceFromBound}px`;
394
+ if (position === PopoverPosition.LEFT_TOP) {
395
+ style.maxHeight = `${availableSpace.top + boundElementSizes.height * offsetModifier}px`;
396
+ }
397
+ break;
398
+ }
157
399
  }
158
400
  /**
159
401
  * Set the position of the popover.
160
402
  */
161
403
  setPosition() {
162
- let element;
404
+ let boundElement;
163
405
  if (typeof this.bindTo === "string") {
164
- element = this.host.ownerDocument.querySelector(this.bindTo);
406
+ boundElement = this.host.ownerDocument.querySelector(this.bindTo);
165
407
  }
166
408
  else if (this.bindTo) {
167
- element = this.bindTo;
409
+ boundElement = this.bindTo;
168
410
  }
169
411
  else {
170
- element = this.host.parentElement;
412
+ boundElement = this.host.parentElement;
171
413
  }
172
- if (!element) {
414
+ if (!boundElement) {
173
415
  return;
174
416
  }
175
- const scrollContainer = findScrollableParent(element);
417
+ const scrollContainer = findScrollableParent(boundElement);
176
418
  const scrollingBoundingRect = scrollContainer.getBoundingClientRect();
177
419
  const offsetContainer = this.host.offsetParent;
178
420
  const relativeBoundingRect = offsetContainer
179
421
  ? computeOffset(offsetContainer, scrollContainer)
180
422
  : { top: 0, right: 0, bottom: 0, left: 0 };
181
- const boundingRect = computeOffset(element, scrollContainer);
182
- const top = boundingRect.top - scrollContainer.scrollTop;
183
- const bottom = scrollingBoundingRect.height - (boundingRect.top + boundingRect.height) + scrollContainer.scrollTop;
184
- const left = boundingRect.left - scrollContainer.scrollLeft;
185
- const right = scrollingBoundingRect.width - (boundingRect.left + boundingRect.width) + scrollContainer.scrollLeft;
186
- const overflowBottom = Math.max(0, scrollingBoundingRect.top + scrollingBoundingRect.height - window.innerHeight);
187
- const overflowRight = Math.max(0, scrollingBoundingRect.left + scrollingBoundingRect.width - window.innerWidth);
188
- const availableTop = Math.min(top, top + scrollingBoundingRect.top);
189
- const availableBottom = Math.min(bottom, bottom - overflowBottom);
190
- const availableLeft = Math.min(left, left + scrollingBoundingRect.left);
191
- const availableRight = Math.min(right, right - overflowRight);
192
- const availableHeight = availableTop + availableBottom + boundingRect.height;
193
- const availableWidth = availableLeft + availableRight + boundingRect.width;
194
- let position = this.currentPosition;
195
- const positions = [];
196
- if (this.position === PopoverPosition.AUTO) {
197
- /**
198
- * The `AUTO` position tries to place the popover in the 'safest' area,
199
- * where there's more space available.
200
- */
201
- if (availableLeft / availableWidth > 0.6) {
202
- positions.push(PopoverPosition.LEFT);
203
- }
204
- else if (availableLeft / availableWidth < 0.4) {
205
- positions.push(PopoverPosition.RIGHT);
206
- }
207
- if (availableTop / availableHeight > 0.9) {
208
- positions.unshift(PopoverPosition.TOP);
209
- }
210
- else if (availableTop / availableHeight > 0.6) {
211
- positions.push(PopoverPosition.TOP);
212
- }
213
- else if (availableTop / availableHeight < 0.1) {
214
- positions.unshift(PopoverPosition.BOTTOM);
215
- }
216
- else {
217
- positions.push(PopoverPosition.BOTTOM);
218
- }
219
- position = positions.join("_");
220
- }
221
- const style = this.host.style;
222
- style.position = "absolute";
223
- const offsetTop = boundingRect.top - relativeBoundingRect.top;
224
- const offsetRight = boundingRect.right - relativeBoundingRect.right;
225
- const offsetBottom = boundingRect.bottom - relativeBoundingRect.bottom;
226
- const offsetLeft = boundingRect.left - relativeBoundingRect.left;
423
+ const boundElementRect = computeOffset(boundElement, scrollContainer);
424
+ const availableSpace = this.calculateAvailableSpace(boundElementRect, scrollContainer, scrollingBoundingRect);
425
+ const offsets = this.calculateRelativeOffsets(boundElementRect, relativeBoundingRect);
227
426
  const offsetModifier = this.center ? 0.5 : 0;
228
- const sizeModifier = this.center ? 0.5 : 0;
229
- if (position === PopoverPosition.TOP || position === PopoverPosition.TOP_RIGHT) {
230
- style.top = "auto";
231
- style.right = "auto";
232
- style.bottom = `${offsetBottom + boundingRect.height}px`;
233
- style.left = `${offsetLeft + boundingRect.width * offsetModifier}px`;
234
- style.maxHeight = `${availableTop}px`;
235
- if (position === PopoverPosition.TOP_RIGHT) {
236
- style.maxWidth = `${availableRight + boundingRect.width * sizeModifier}px`;
237
- }
238
- }
239
- else if (position === PopoverPosition.TOP_LEFT) {
240
- style.top = "auto";
241
- style.right = `${offsetRight + boundingRect.width * offsetModifier}px`;
242
- style.bottom = `${offsetBottom + boundingRect.height}px`;
243
- style.left = "auto";
244
- style.maxWidth = `${availableLeft}px`;
245
- style.maxHeight = `${availableTop}px`;
246
- }
247
- else if (position === PopoverPosition.BOTTOM || position === PopoverPosition.BOTTOM_RIGHT) {
248
- style.top = `${offsetTop + boundingRect.height}px`;
249
- style.right = "auto";
250
- style.bottom = "auto";
251
- style.left = `${offsetLeft + boundingRect.width * offsetModifier}px`;
252
- style.maxHeight = `${availableBottom}px`;
253
- if (position === PopoverPosition.BOTTOM_RIGHT) {
254
- style.maxWidth = `${availableRight + boundingRect.width * sizeModifier}px`;
255
- }
256
- }
257
- else if (position === PopoverPosition.BOTTOM_LEFT) {
258
- style.top = `${offsetTop + boundingRect.height}px`;
259
- style.right = `${offsetRight + boundingRect.width * offsetModifier}px`;
260
- style.bottom = "auto";
261
- style.left = "auto";
262
- style.maxWidth = `${availableLeft}px`;
263
- style.maxHeight = `${availableBottom}px`;
264
- }
265
- else if (position === PopoverPosition.RIGHT || position === PopoverPosition.RIGHT_BOTTOM) {
266
- style.top = `${offsetTop + boundingRect.height * offsetModifier}px`;
267
- style.right = "auto";
268
- style.bottom = "auto";
269
- style.left = `${offsetLeft + boundingRect.width}px`;
270
- style.maxWidth = `${availableRight}px`;
271
- style.maxHeight = `${availableBottom + boundingRect.height * sizeModifier}px`;
272
- }
273
- else if (position === PopoverPosition.RIGHT_TOP) {
274
- style.top = "auto";
275
- style.right = "auto";
276
- style.bottom = `${offsetBottom + boundingRect.height * offsetModifier}px`;
277
- style.left = `${offsetLeft + boundingRect.width}px`;
278
- style.maxWidth = `${availableRight}px`;
279
- style.maxHeight = `${availableTop + boundingRect.height * sizeModifier}px`;
280
- }
281
- else if (position === PopoverPosition.LEFT || position === PopoverPosition.LEFT_BOTTOM) {
282
- style.top = `${offsetTop + boundingRect.height * offsetModifier}px`;
283
- style.right = `${offsetRight + boundingRect.width}px`;
284
- style.bottom = "auto";
285
- style.left = "auto";
286
- style.maxWidth = `${availableLeft}px`;
287
- style.maxHeight = `${availableBottom + boundingRect.height * sizeModifier}px`;
288
- }
289
- else if (position === PopoverPosition.LEFT_TOP) {
290
- style.top = "auto";
291
- style.right = `${offsetRight + boundingRect.width}px`;
292
- style.bottom = `${offsetBottom + boundingRect.height * offsetModifier}px`;
293
- style.left = "auto";
294
- style.maxWidth = `${availableLeft}px`;
295
- style.maxHeight = `${availableTop + boundingRect.height * sizeModifier}px`;
296
- }
297
- this.currentPosition = position || this.position;
298
- this.host.setAttribute("current-position", this.currentPosition);
427
+ const arrowModifier = this.showArrow && this.center ? 8 : 0; // 8px is the distance of the arrow center from the edge of the popover
428
+ const position = this.getOptimalPopoverPosition(this.position, availableSpace, { width: boundElementRect.width, height: boundElementRect.height }, offsetModifier);
429
+ const style = this.host.style;
430
+ this.applyPositionStyles(position, style, offsets, boundElementRect, availableSpace, offsetModifier, arrowModifier);
431
+ this.currentPosition = position;
299
432
  }
300
433
  componentWillLoad() {
301
434
  this.validatePosition(this.position);
302
435
  this.onOpen();
303
436
  }
437
+ componentDidLoad() {
438
+ this.setPosition();
439
+ }
440
+ disconnectedCallback() {
441
+ cancelAnimationFrame(this.animationFrameRequestId);
442
+ }
304
443
  render() {
305
- return h("slot", { key: 'f7f6f81dc2698b5d560503a984dcd47e377de0bc' });
444
+ return (h(Host, { key: '38c84d7959587dfef4ef66a4b76be519fe1e0f82', "current-position": this.currentPosition }, h("slot", { key: 'ccd1f8a455c7755e38b5aac231adcb9efeebee17' })));
306
445
  }
307
446
  get host() { return this; }
308
447
  static get watchers() { return {
@@ -311,7 +450,7 @@ const ZPopover = /*@__PURE__*/ proxyCustomElement(class ZPopover extends HTMLEle
311
450
  }; }
312
451
  static get style() { return ZPopoverStyle0; }
313
452
  }, [1, "z-popover", {
314
- "position": [513],
453
+ "position": [1537],
315
454
  "open": [1540],
316
455
  "bindTo": [1, "bind-to"],
317
456
  "showArrow": [516, "show-arrow"],
@@ -322,6 +461,21 @@ const ZPopover = /*@__PURE__*/ proxyCustomElement(class ZPopover extends HTMLEle
322
461
  "position": ["validatePosition"],
323
462
  "open": ["onOpen"]
324
463
  }]);
464
+ // Clockwise order of positions.
465
+ ZPopover.positionOrder = [
466
+ PopoverPosition.TOP_RIGHT,
467
+ PopoverPosition.TOP,
468
+ PopoverPosition.TOP_LEFT,
469
+ PopoverPosition.RIGHT_BOTTOM,
470
+ PopoverPosition.RIGHT,
471
+ PopoverPosition.RIGHT_TOP,
472
+ PopoverPosition.BOTTOM_LEFT,
473
+ PopoverPosition.BOTTOM,
474
+ PopoverPosition.BOTTOM_RIGHT,
475
+ PopoverPosition.LEFT_TOP,
476
+ PopoverPosition.LEFT,
477
+ PopoverPosition.LEFT_BOTTOM,
478
+ ];
325
479
  function defineCustomElement() {
326
480
  if (typeof customElements === "undefined") {
327
481
  return;