@zanichelli/albe-web-components 18.7.7-RC1 → 18.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (549) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/cjs/index-96af6326.js +4 -0
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/web-components-library.cjs.js +1 -1
  5. package/dist/cjs/z-alert.cjs.entry.js +1 -1
  6. package/dist/cjs/z-app-header_12.cjs.entry.js +18 -18
  7. package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
  8. package/dist/cjs/z-aria-alert.cjs.entry.js +1 -1
  9. package/dist/cjs/z-avatar.cjs.entry.js +2 -2
  10. package/dist/cjs/z-book-card.cjs.entry.js +15 -14
  11. package/dist/cjs/z-book-card.cjs.entry.js.map +1 -1
  12. package/dist/{components/placeholder-cover.js → cjs/z-book-cover.cjs.entry.js} +26 -2
  13. package/dist/cjs/z-book-cover.cjs.entry.js.map +1 -0
  14. package/dist/cjs/z-breadcrumb.cjs.entry.js +2 -2
  15. package/dist/cjs/z-button-sort.cjs.entry.js +1 -1
  16. package/dist/cjs/z-chip.cjs.entry.js +2 -2
  17. package/dist/cjs/z-combobox.cjs.entry.js +26 -41
  18. package/dist/cjs/z-combobox.cjs.entry.js.map +1 -1
  19. package/dist/cjs/z-cover-hero.cjs.entry.js +2 -2
  20. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +4 -4
  21. package/dist/cjs/z-ghost-loading.cjs.entry.js +1 -1
  22. package/dist/cjs/z-info-box.cjs.entry.js +1 -1
  23. package/dist/cjs/z-info-reveal.cjs.entry.js +1 -1
  24. package/dist/cjs/z-logo.cjs.entry.js +1 -1
  25. package/dist/cjs/z-menu-section.cjs.entry.js +1 -1
  26. package/dist/cjs/z-myz-card-alert.cjs.entry.js +1 -1
  27. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
  28. package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +1 -1
  29. package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -1
  30. package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
  31. package/dist/cjs/z-myz-card-info.cjs.entry.js +1 -1
  32. package/dist/cjs/z-myz-card-list.cjs.entry.js +1 -1
  33. package/dist/cjs/z-myz-card_4.cjs.entry.js +4 -4
  34. package/dist/cjs/z-myz-list-item.cjs.entry.js +1 -1
  35. package/dist/cjs/z-myz-list.cjs.entry.js +1 -1
  36. package/dist/cjs/z-navigation-tabs.cjs.entry.js +2 -2
  37. package/dist/cjs/z-notification.cjs.entry.js +1 -1
  38. package/dist/cjs/z-otp.cjs.entry.js +2 -2
  39. package/dist/cjs/z-panel-elem.cjs.entry.js +2 -2
  40. package/dist/cjs/z-popover.cjs.entry.js +1 -1
  41. package/dist/cjs/z-result-card.cjs.entry.js +6 -14
  42. package/dist/cjs/z-result-card.cjs.entry.js.map +1 -1
  43. package/dist/cjs/z-select.cjs.entry.js +2 -2
  44. package/dist/cjs/z-select.cjs.entry.js.map +1 -1
  45. package/dist/cjs/z-skip-to-content.cjs.entry.js +1 -1
  46. package/dist/cjs/z-stepper-item.cjs.entry.js +1 -1
  47. package/dist/cjs/z-stepper.cjs.entry.js +1 -1
  48. package/dist/cjs/z-toast-notification-list.cjs.entry.js +1 -1
  49. package/dist/cjs/z-toast-notification.cjs.entry.js +1 -1
  50. package/dist/cjs/z-toggle-button.cjs.entry.js +2 -2
  51. package/dist/cjs/z-toggle-switch.cjs.entry.js +3 -3
  52. package/dist/cjs/z-tooltip.cjs.entry.js +1 -1
  53. package/dist/cjs/z-visually-hidden.cjs.entry.js +1 -1
  54. package/dist/collection/collection-manifest.json +2 -1
  55. package/dist/collection/components/book-card/z-book-card/index.js +66 -29
  56. package/dist/collection/components/book-card/z-book-card/index.js.map +1 -1
  57. package/dist/collection/components/book-card/z-book-card/index.stories.js +11 -13
  58. package/dist/collection/components/book-card/z-book-card/index.stories.js.map +1 -1
  59. package/dist/collection/components/book-card/z-book-card/styles.css +35 -67
  60. package/dist/collection/components/z-app-header/index.js +2 -1
  61. package/dist/collection/components/z-app-header/index.js.map +1 -1
  62. package/dist/collection/components/z-app-header/index.stories.js +16 -0
  63. package/dist/collection/components/z-app-header/index.stories.js.map +1 -1
  64. package/dist/collection/components/z-app-header/styles.css +2 -1
  65. package/dist/collection/components/z-aria-alert/index.js +1 -1
  66. package/dist/collection/components/z-avatar/index.js +2 -2
  67. package/dist/collection/components/z-book-cover/index.js +113 -0
  68. package/dist/collection/components/z-book-cover/index.js.map +1 -0
  69. package/dist/collection/components/z-book-cover/index.stories.js +31 -0
  70. package/dist/collection/components/z-book-cover/index.stories.js.map +1 -0
  71. package/dist/collection/components/z-book-cover/styles.css +95 -0
  72. package/dist/collection/components/z-breadcrumb/index.js +2 -2
  73. package/dist/collection/components/z-button-sort/index.js +1 -1
  74. package/dist/collection/components/z-chip/index.js +2 -2
  75. package/dist/collection/components/z-combobox/index.js +25 -40
  76. package/dist/collection/components/z-combobox/index.js.map +1 -1
  77. package/dist/collection/components/z-combobox/styles.css +0 -8
  78. package/dist/collection/components/z-cover-hero/index.js +2 -2
  79. package/dist/collection/components/z-divider/index.js +1 -1
  80. package/dist/collection/components/z-ghost-loading/index.js +1 -1
  81. package/dist/collection/components/z-info-box/index.js +1 -1
  82. package/dist/collection/components/z-info-reveal/index.js +1 -1
  83. package/dist/collection/components/z-input/index.js +17 -19
  84. package/dist/collection/components/z-input/index.js.map +1 -1
  85. package/dist/collection/components/z-input-message/index.js +1 -1
  86. package/dist/collection/components/z-logo/index.js +1 -1
  87. package/dist/collection/components/z-menu-section/index.js +1 -1
  88. package/dist/collection/components/z-modal/index.js +4 -4
  89. package/dist/collection/components/z-navigation-tabs/index.js +2 -2
  90. package/dist/collection/components/z-notification/index.js +1 -1
  91. package/dist/collection/components/z-offcanvas/index.js +21 -1
  92. package/dist/collection/components/z-offcanvas/index.js.map +1 -1
  93. package/dist/collection/components/z-offcanvas/index.stories.js +12 -0
  94. package/dist/collection/components/z-offcanvas/index.stories.js.map +1 -1
  95. package/dist/collection/components/z-offcanvas/styles.css +5 -4
  96. package/dist/collection/components/z-panel-elem/index.js +2 -2
  97. package/dist/collection/components/z-popover/index.js +1 -1
  98. package/dist/collection/components/{result-card/z-result-card → z-result-card}/index.js +10 -18
  99. package/dist/collection/components/z-result-card/index.js.map +1 -0
  100. package/dist/collection/components/{result-card/z-result-card → z-result-card}/styles.css +39 -108
  101. package/dist/collection/components/z-result-card/z-result-card.stories.js.map +1 -0
  102. package/dist/collection/components/z-searchbar/index.js +1 -1
  103. package/dist/collection/components/z-select/index.js +2 -2
  104. package/dist/collection/components/z-select/index.js.map +1 -1
  105. package/dist/collection/components/z-skip-to-content/index.js +1 -1
  106. package/dist/collection/components/z-stepper/index.js +1 -1
  107. package/dist/collection/components/z-stepper-item/index.js +1 -1
  108. package/dist/collection/components/z-toast-notification/index.js +1 -1
  109. package/dist/collection/components/z-toast-notification-list/index.js +1 -1
  110. package/dist/collection/components/z-toggle-button/index.js +2 -2
  111. package/dist/collection/components/z-toggle-switch/index.js +3 -3
  112. package/dist/collection/components/z-tooltip/index.js +1 -1
  113. package/dist/collection/components/z-visually-hidden/index.js +1 -1
  114. package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +1 -1
  115. package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +1 -1
  116. package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +1 -1
  117. package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +1 -1
  118. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
  119. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -1
  120. package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +1 -1
  121. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
  122. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +1 -1
  123. package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
  124. package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
  125. package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
  126. package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +1 -1
  127. package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
  128. package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
  129. package/dist/components/index.d.ts +3 -1
  130. package/dist/components/index.js +1 -0
  131. package/dist/components/index.js.map +1 -1
  132. package/dist/components/index10.js +24 -65
  133. package/dist/components/index10.js.map +1 -1
  134. package/dist/components/index11.js +58 -308
  135. package/dist/components/index11.js.map +1 -1
  136. package/dist/components/index12.js +311 -37
  137. package/dist/components/index12.js.map +1 -1
  138. package/dist/components/index13.js +40 -27
  139. package/dist/components/index13.js.map +1 -1
  140. package/dist/components/index14.js +23 -151
  141. package/dist/components/index14.js.map +1 -1
  142. package/dist/components/index15.js +144 -37
  143. package/dist/components/index15.js.map +1 -1
  144. package/dist/components/index16.js +42 -1008
  145. package/dist/components/index16.js.map +1 -1
  146. package/dist/components/index17.js +1012 -37
  147. package/dist/components/index17.js.map +1 -1
  148. package/dist/components/index18.js +42 -10
  149. package/dist/components/index18.js.map +1 -1
  150. package/dist/components/index19.js +10 -22
  151. package/dist/components/index19.js.map +1 -1
  152. package/dist/components/index20.js +16 -33
  153. package/dist/components/index20.js.map +1 -1
  154. package/dist/components/index21.js +39 -43
  155. package/dist/components/index21.js.map +1 -1
  156. package/dist/components/index22.js +44 -81
  157. package/dist/components/index22.js.map +1 -1
  158. package/dist/components/index23.js +60 -430
  159. package/dist/components/index23.js.map +1 -1
  160. package/dist/components/index24.js +415 -341
  161. package/dist/components/index24.js.map +1 -1
  162. package/dist/components/index25.js +376 -19
  163. package/dist/components/index25.js.map +1 -1
  164. package/dist/components/index26.js +45 -0
  165. package/dist/components/index26.js.map +1 -0
  166. package/dist/components/index3.js +1 -1
  167. package/dist/components/index4.js +23 -60
  168. package/dist/components/index4.js.map +1 -1
  169. package/dist/components/index5.js +53 -27
  170. package/dist/components/index5.js.map +1 -1
  171. package/dist/components/index6.js +34 -18
  172. package/dist/components/index6.js.map +1 -1
  173. package/dist/components/index7.js +18 -41
  174. package/dist/components/index7.js.map +1 -1
  175. package/dist/components/index8.js +41 -11
  176. package/dist/components/index8.js.map +1 -1
  177. package/dist/components/index9.js +10 -28
  178. package/dist/components/index9.js.map +1 -1
  179. package/dist/components/z-accordion.js +1 -1
  180. package/dist/components/z-anchor-navigation.js +2 -2
  181. package/dist/components/z-app-header-deprecated.js +11 -11
  182. package/dist/components/z-app-header.js +13 -13
  183. package/dist/components/z-app-header.js.map +1 -1
  184. package/dist/components/z-aria-alert.js +1 -1
  185. package/dist/components/z-avatar.js +2 -2
  186. package/dist/components/z-book-card-app.js +2 -2
  187. package/dist/components/z-book-card-deprecated.js +1 -1
  188. package/dist/components/z-book-card.js +26 -17
  189. package/dist/components/z-book-card.js.map +1 -1
  190. package/dist/components/z-book-cover.d.ts +11 -0
  191. package/dist/components/z-book-cover.js +8 -0
  192. package/dist/components/z-book-cover.js.map +1 -0
  193. package/dist/components/z-breadcrumb.js +8 -8
  194. package/dist/components/z-button-sort.js +2 -2
  195. package/dist/components/z-button.js +1 -1
  196. package/dist/components/z-card.js +1 -1
  197. package/dist/components/z-carousel.js +3 -3
  198. package/dist/components/z-chip.js +1 -1
  199. package/dist/components/z-combobox.js +32 -47
  200. package/dist/components/z-combobox.js.map +1 -1
  201. package/dist/components/z-cover-hero.js +2 -2
  202. package/dist/components/z-date-picker.js +3 -3
  203. package/dist/components/z-divider.js +1 -1
  204. package/dist/components/z-dragdrop-area.js +1 -1
  205. package/dist/components/z-file-upload.js +4 -4
  206. package/dist/components/z-file.js +3 -3
  207. package/dist/components/z-ghost-loading.js +1 -1
  208. package/dist/components/z-icon.js +1 -1
  209. package/dist/components/z-info-box.js +2 -2
  210. package/dist/components/z-info-reveal.js +1 -1
  211. package/dist/components/z-input-message.js +1 -1
  212. package/dist/components/z-input.js +1 -1
  213. package/dist/components/z-list-element.js +1 -1
  214. package/dist/components/z-list-group.js +1 -1
  215. package/dist/components/z-list.js +1 -1
  216. package/dist/components/z-logo.js +1 -1
  217. package/dist/components/z-menu-deprecated.js +1 -1
  218. package/dist/components/z-menu-section-deprecated.js +1 -1
  219. package/dist/components/z-menu-section.js +2 -2
  220. package/dist/components/z-menu.js +1 -1
  221. package/dist/components/z-modal.js +1 -1
  222. package/dist/components/z-myz-card-alert.js +2 -2
  223. package/dist/components/z-myz-card-body.js +1 -1
  224. package/dist/components/z-myz-card-cover.js +1 -1
  225. package/dist/components/z-myz-card-dictionary.js +7 -7
  226. package/dist/components/z-myz-card-footer-sections.js +1 -1
  227. package/dist/components/z-myz-card-footer.js +1 -1
  228. package/dist/components/z-myz-card-header.js +1 -1
  229. package/dist/components/z-myz-card-icon.js +2 -2
  230. package/dist/components/z-myz-card-info.js +3 -3
  231. package/dist/components/z-myz-card-list.js +1 -1
  232. package/dist/components/z-myz-card.js +1 -1
  233. package/dist/components/z-myz-list-item.js +1 -1
  234. package/dist/components/z-myz-list.js +3 -3
  235. package/dist/components/z-navigation-tabs.js +3 -3
  236. package/dist/components/z-notification.js +2 -2
  237. package/dist/components/z-offcanvas.js +1 -1
  238. package/dist/components/z-otp.js +4 -4
  239. package/dist/components/z-pagination.js +4 -4
  240. package/dist/components/z-panel-elem.js +3 -3
  241. package/dist/components/z-popover.js +1 -1
  242. package/dist/components/z-range-picker.js +3 -3
  243. package/dist/components/z-result-card.js +14 -16
  244. package/dist/components/z-result-card.js.map +1 -1
  245. package/dist/components/z-searchbar.js +1 -1
  246. package/dist/components/z-section-title.js +1 -1
  247. package/dist/components/z-select.js +10 -10
  248. package/dist/components/z-select.js.map +1 -1
  249. package/dist/components/z-skip-to-content.js +1 -1
  250. package/dist/components/z-slideshow.js +1 -1
  251. package/dist/components/z-stepper-item.js +2 -2
  252. package/dist/components/z-stepper.js +1 -1
  253. package/dist/components/z-table.js +1 -1
  254. package/dist/components/z-tag.js +1 -1
  255. package/dist/components/z-td.js +3 -3
  256. package/dist/components/z-th.js +3 -3
  257. package/dist/components/z-toast-notification-list.js +1 -1
  258. package/dist/components/z-toast-notification.js +2 -2
  259. package/dist/components/z-toggle-button.js +3 -3
  260. package/dist/components/z-toggle-switch.js +4 -4
  261. package/dist/components/z-tooltip.js +2 -2
  262. package/dist/components/z-tr.js +2 -2
  263. package/dist/components/z-tree-list.js +4 -4
  264. package/dist/components/z-visually-hidden.js +1 -1
  265. package/dist/esm/index-c8ceadeb.js +4 -0
  266. package/dist/esm/loader.js +1 -1
  267. package/dist/esm/web-components-library.js +1 -1
  268. package/dist/esm/z-alert.entry.js +1 -1
  269. package/dist/esm/z-app-header_12.entry.js +18 -18
  270. package/dist/esm/z-app-header_12.entry.js.map +1 -1
  271. package/dist/esm/z-aria-alert.entry.js +1 -1
  272. package/dist/esm/z-avatar.entry.js +2 -2
  273. package/dist/esm/z-book-card.entry.js +15 -14
  274. package/dist/esm/z-book-card.entry.js.map +1 -1
  275. package/dist/{cjs/placeholder-cover-b679e768.js → esm/z-book-cover.entry.js} +21 -3
  276. package/dist/esm/z-book-cover.entry.js.map +1 -0
  277. package/dist/esm/z-breadcrumb.entry.js +2 -2
  278. package/dist/esm/z-button-sort.entry.js +1 -1
  279. package/dist/esm/z-chip.entry.js +2 -2
  280. package/dist/esm/z-combobox.entry.js +26 -41
  281. package/dist/esm/z-combobox.entry.js.map +1 -1
  282. package/dist/esm/z-cover-hero.entry.js +2 -2
  283. package/dist/esm/z-dragdrop-area_2.entry.js +4 -4
  284. package/dist/esm/z-ghost-loading.entry.js +1 -1
  285. package/dist/esm/z-info-box.entry.js +1 -1
  286. package/dist/esm/z-info-reveal.entry.js +1 -1
  287. package/dist/esm/z-logo.entry.js +1 -1
  288. package/dist/esm/z-menu-section.entry.js +1 -1
  289. package/dist/esm/z-myz-card-alert.entry.js +1 -1
  290. package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
  291. package/dist/esm/z-myz-card-footer-sections.entry.js +1 -1
  292. package/dist/esm/z-myz-card-footer.entry.js +1 -1
  293. package/dist/esm/z-myz-card-icon.entry.js +1 -1
  294. package/dist/esm/z-myz-card-info.entry.js +1 -1
  295. package/dist/esm/z-myz-card-list.entry.js +1 -1
  296. package/dist/esm/z-myz-card_4.entry.js +4 -4
  297. package/dist/esm/z-myz-list-item.entry.js +1 -1
  298. package/dist/esm/z-myz-list.entry.js +1 -1
  299. package/dist/esm/z-navigation-tabs.entry.js +2 -2
  300. package/dist/esm/z-notification.entry.js +1 -1
  301. package/dist/esm/z-otp.entry.js +2 -2
  302. package/dist/esm/z-panel-elem.entry.js +2 -2
  303. package/dist/esm/z-popover.entry.js +1 -1
  304. package/dist/esm/z-result-card.entry.js +6 -14
  305. package/dist/esm/z-result-card.entry.js.map +1 -1
  306. package/dist/esm/z-select.entry.js +2 -2
  307. package/dist/esm/z-select.entry.js.map +1 -1
  308. package/dist/esm/z-skip-to-content.entry.js +1 -1
  309. package/dist/esm/z-stepper-item.entry.js +1 -1
  310. package/dist/esm/z-stepper.entry.js +1 -1
  311. package/dist/esm/z-toast-notification-list.entry.js +1 -1
  312. package/dist/esm/z-toast-notification.entry.js +1 -1
  313. package/dist/esm/z-toggle-button.entry.js +2 -2
  314. package/dist/esm/z-toggle-switch.entry.js +3 -3
  315. package/dist/esm/z-tooltip.entry.js +1 -1
  316. package/dist/esm/z-visually-hidden.entry.js +1 -1
  317. package/dist/types/components/book-card/z-book-card/index.d.ts +20 -16
  318. package/dist/types/components/book-card/z-book-card/index.stories.d.ts +2 -35
  319. package/dist/types/components/z-app-header/index.d.ts +1 -0
  320. package/dist/types/components/z-app-header/index.stories.d.ts +8 -0
  321. package/dist/types/components/z-book-cover/index.d.ts +23 -0
  322. package/dist/types/components/z-book-cover/index.stories.d.ts +21 -0
  323. package/dist/types/components/z-combobox/index.d.ts +1 -0
  324. package/dist/types/components/z-input/index.d.ts +4 -4
  325. package/dist/types/components/z-offcanvas/index.d.ts +2 -0
  326. package/dist/types/components/z-offcanvas/index.stories.d.ts +9 -0
  327. package/dist/types/components/{result-card/z-result-card → z-result-card}/index.d.ts +8 -26
  328. package/dist/types/components.d.ts +185 -76
  329. package/{www/build/p-8117a929.entry.js → dist/web-components-library/p-01f941c2.entry.js} +2 -2
  330. package/dist/web-components-library/{p-0756fe6f.entry.js → p-028dd72a.entry.js} +2 -2
  331. package/{www/build/p-e160545f.entry.js → dist/web-components-library/p-0990d475.entry.js} +2 -2
  332. package/{www/build/p-e160545f.entry.js.map → dist/web-components-library/p-0990d475.entry.js.map} +1 -1
  333. package/dist/web-components-library/{p-6ca0ee2f.entry.js → p-0a49dd1c.entry.js} +2 -2
  334. package/dist/web-components-library/{p-09ba466b.entry.js → p-240de9aa.entry.js} +2 -2
  335. package/dist/web-components-library/{p-f1c55eda.entry.js → p-28534fb5.entry.js} +2 -2
  336. package/{www/build/p-966cbf03.entry.js → dist/web-components-library/p-28d83c86.entry.js} +2 -2
  337. package/dist/web-components-library/{p-cbab66f7.entry.js → p-2bdac94e.entry.js} +2 -2
  338. package/dist/web-components-library/{p-e8419614.entry.js → p-2ffdfbb1.entry.js} +2 -2
  339. package/dist/web-components-library/p-31bd2a1c.entry.js +2 -0
  340. package/dist/web-components-library/p-31bd2a1c.entry.js.map +1 -0
  341. package/dist/web-components-library/{p-8c52635e.entry.js → p-4551b0df.entry.js} +2 -2
  342. package/dist/web-components-library/{p-e639e1bc.entry.js → p-460b2068.entry.js} +2 -2
  343. package/{www/build/p-0eab3c09.entry.js → dist/web-components-library/p-46ea0b2e.entry.js} +3 -3
  344. package/dist/web-components-library/{p-689b0280.entry.js → p-4a257653.entry.js} +2 -2
  345. package/dist/web-components-library/{p-8dec332e.entry.js → p-4aaf0172.entry.js} +2 -2
  346. package/dist/web-components-library/{p-d6d3a92a.entry.js → p-4affbb99.entry.js} +2 -2
  347. package/dist/web-components-library/{p-caa491ca.entry.js → p-5989465b.entry.js} +2 -2
  348. package/dist/web-components-library/{p-d8aa6afa.entry.js → p-5a1f98a2.entry.js} +2 -2
  349. package/{www/build/p-d0d54d42.entry.js → dist/web-components-library/p-5c5882c6.entry.js} +2 -2
  350. package/dist/web-components-library/{p-01302e57.entry.js → p-5f94986f.entry.js} +2 -2
  351. package/dist/web-components-library/p-6cff173f.entry.js +2 -0
  352. package/dist/web-components-library/{p-97608d16.entry.js.map → p-6cff173f.entry.js.map} +1 -1
  353. package/dist/web-components-library/p-6cffbabc.entry.js +2 -0
  354. package/{www/build/p-ac585bcd.entry.js.map → dist/web-components-library/p-6cffbabc.entry.js.map} +1 -1
  355. package/dist/web-components-library/{p-1ad8810a.entry.js → p-7194003a.entry.js} +2 -2
  356. package/{www/build/p-2b8eb0c2.entry.js → dist/web-components-library/p-78146cef.entry.js} +2 -2
  357. package/dist/web-components-library/{p-4fbcf534.entry.js → p-7a4f6a5b.entry.js} +2 -2
  358. package/dist/web-components-library/{p-6793061a.entry.js → p-7ceddb7a.entry.js} +2 -2
  359. package/dist/web-components-library/{p-4c730d4a.entry.js → p-86160fe3.entry.js} +2 -2
  360. package/dist/web-components-library/{p-63c1bde5.entry.js → p-863fd1c4.entry.js} +2 -2
  361. package/dist/web-components-library/p-8fc213c2.entry.js +2 -0
  362. package/dist/web-components-library/p-8fc213c2.entry.js.map +1 -0
  363. package/dist/web-components-library/{p-5cf3a797.entry.js → p-943db3a8.entry.js} +2 -2
  364. package/dist/web-components-library/{p-dc5ba112.entry.js → p-94916bdf.entry.js} +2 -2
  365. package/dist/web-components-library/p-a2e87cec.entry.js +2 -0
  366. package/dist/web-components-library/{p-badd98ad.entry.js → p-ac477ae7.entry.js} +2 -2
  367. package/dist/web-components-library/p-af5e8524.entry.js +2 -0
  368. package/dist/web-components-library/{p-7916e0f7.entry.js → p-b3f1b5c1.entry.js} +2 -2
  369. package/dist/web-components-library/{p-962c7f6b.entry.js → p-ceeb3e2a.entry.js} +2 -2
  370. package/dist/web-components-library/p-d60684d5.entry.js +2 -0
  371. package/dist/web-components-library/p-d60684d5.entry.js.map +1 -0
  372. package/dist/web-components-library/{p-cb1de7b4.entry.js → p-dc086eb5.entry.js} +2 -2
  373. package/dist/web-components-library/p-deb7f8d7.entry.js +2 -0
  374. package/dist/web-components-library/{p-6273db7f.entry.js → p-e0b88075.entry.js} +2 -2
  375. package/dist/web-components-library/p-e4bb1256.entry.js +2 -0
  376. package/dist/web-components-library/p-e4bb1256.entry.js.map +1 -0
  377. package/dist/web-components-library/{p-e231e811.entry.js → p-f487290e.entry.js} +2 -2
  378. package/dist/web-components-library/p-f4bac89b.entry.js +2 -0
  379. package/dist/web-components-library/p-f4bac89b.entry.js.map +1 -0
  380. package/dist/web-components-library/web-components-library.esm.js +1 -1
  381. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  382. package/package.json +2 -3
  383. package/react/components.d.ts +1 -0
  384. package/react/components.js +3 -2
  385. package/react/components.js.map +1 -1
  386. package/{dist/web-components-library/p-8117a929.entry.js → www/build/p-01f941c2.entry.js} +2 -2
  387. package/www/build/{p-0756fe6f.entry.js → p-028dd72a.entry.js} +2 -2
  388. package/{dist/web-components-library/p-e160545f.entry.js → www/build/p-0990d475.entry.js} +2 -2
  389. package/{dist/web-components-library/p-e160545f.entry.js.map → www/build/p-0990d475.entry.js.map} +1 -1
  390. package/www/build/{p-6ca0ee2f.entry.js → p-0a49dd1c.entry.js} +2 -2
  391. package/www/build/{p-09ba466b.entry.js → p-240de9aa.entry.js} +2 -2
  392. package/www/build/{p-f1c55eda.entry.js → p-28534fb5.entry.js} +2 -2
  393. package/{dist/web-components-library/p-966cbf03.entry.js → www/build/p-28d83c86.entry.js} +2 -2
  394. package/www/build/{p-cbab66f7.entry.js → p-2bdac94e.entry.js} +2 -2
  395. package/www/build/{p-e8419614.entry.js → p-2ffdfbb1.entry.js} +2 -2
  396. package/www/build/p-31bd2a1c.entry.js +2 -0
  397. package/www/build/p-31bd2a1c.entry.js.map +1 -0
  398. package/www/build/{p-8c52635e.entry.js → p-4551b0df.entry.js} +2 -2
  399. package/www/build/{p-e639e1bc.entry.js → p-460b2068.entry.js} +2 -2
  400. package/{dist/web-components-library/p-0eab3c09.entry.js → www/build/p-46ea0b2e.entry.js} +3 -3
  401. package/www/build/{p-689b0280.entry.js → p-4a257653.entry.js} +2 -2
  402. package/www/build/{p-8dec332e.entry.js → p-4aaf0172.entry.js} +2 -2
  403. package/www/build/{p-d6d3a92a.entry.js → p-4affbb99.entry.js} +2 -2
  404. package/www/build/{p-caa491ca.entry.js → p-5989465b.entry.js} +2 -2
  405. package/www/build/{p-d8aa6afa.entry.js → p-5a1f98a2.entry.js} +2 -2
  406. package/{dist/web-components-library/p-d0d54d42.entry.js → www/build/p-5c5882c6.entry.js} +2 -2
  407. package/www/build/{p-01302e57.entry.js → p-5f94986f.entry.js} +2 -2
  408. package/www/build/p-6cff173f.entry.js +2 -0
  409. package/www/build/{p-97608d16.entry.js.map → p-6cff173f.entry.js.map} +1 -1
  410. package/www/build/p-6cffbabc.entry.js +2 -0
  411. package/{dist/web-components-library/p-ac585bcd.entry.js.map → www/build/p-6cffbabc.entry.js.map} +1 -1
  412. package/www/build/{p-1ad8810a.entry.js → p-7194003a.entry.js} +2 -2
  413. package/{dist/web-components-library/p-2b8eb0c2.entry.js → www/build/p-78146cef.entry.js} +2 -2
  414. package/www/build/{p-4fbcf534.entry.js → p-7a4f6a5b.entry.js} +2 -2
  415. package/www/build/{p-6793061a.entry.js → p-7ceddb7a.entry.js} +2 -2
  416. package/www/build/{p-4c730d4a.entry.js → p-86160fe3.entry.js} +2 -2
  417. package/www/build/{p-63c1bde5.entry.js → p-863fd1c4.entry.js} +2 -2
  418. package/www/build/p-8fc213c2.entry.js +2 -0
  419. package/www/build/p-8fc213c2.entry.js.map +1 -0
  420. package/www/build/{p-5cf3a797.entry.js → p-943db3a8.entry.js} +2 -2
  421. package/www/build/{p-dc5ba112.entry.js → p-94916bdf.entry.js} +2 -2
  422. package/www/build/p-a2e87cec.entry.js +2 -0
  423. package/www/build/{p-badd98ad.entry.js → p-ac477ae7.entry.js} +2 -2
  424. package/www/build/p-af5e8524.entry.js +2 -0
  425. package/www/build/{p-7916e0f7.entry.js → p-b3f1b5c1.entry.js} +2 -2
  426. package/www/build/p-b716b49c.js +2 -0
  427. package/www/build/{p-962c7f6b.entry.js → p-ceeb3e2a.entry.js} +2 -2
  428. package/www/build/p-d60684d5.entry.js +2 -0
  429. package/www/build/p-d60684d5.entry.js.map +1 -0
  430. package/www/build/{p-cb1de7b4.entry.js → p-dc086eb5.entry.js} +2 -2
  431. package/www/build/p-deb7f8d7.entry.js +2 -0
  432. package/www/build/{p-6273db7f.entry.js → p-e0b88075.entry.js} +2 -2
  433. package/www/build/p-e4bb1256.entry.js +2 -0
  434. package/www/build/p-e4bb1256.entry.js.map +1 -0
  435. package/www/build/{p-e231e811.entry.js → p-f487290e.entry.js} +2 -2
  436. package/www/build/p-f4bac89b.entry.js +2 -0
  437. package/www/build/p-f4bac89b.entry.js.map +1 -0
  438. package/www/build/web-components-library.esm.js +1 -1
  439. package/www/build/web-components-library.esm.js.map +1 -1
  440. package/www/index.html +1 -1
  441. package/dist/cjs/placeholder-cover-b679e768.js.map +0 -1
  442. package/dist/collection/components/result-card/z-result-card/index.js.map +0 -1
  443. package/dist/collection/components/result-card/z-result-card/z-result-card.stories.js.map +0 -1
  444. package/dist/components/placeholder-cover.js.map +0 -1
  445. package/dist/esm/placeholder-cover-9346be8f.js +0 -5
  446. package/dist/esm/placeholder-cover-9346be8f.js.map +0 -1
  447. package/dist/web-components-library/p-165d5acc.entry.js +0 -2
  448. package/dist/web-components-library/p-165d5acc.entry.js.map +0 -1
  449. package/dist/web-components-library/p-310c2215.entry.js +0 -2
  450. package/dist/web-components-library/p-310c2215.entry.js.map +0 -1
  451. package/dist/web-components-library/p-3ed25564.entry.js +0 -2
  452. package/dist/web-components-library/p-67edb420.entry.js +0 -2
  453. package/dist/web-components-library/p-74819cbe.entry.js +0 -2
  454. package/dist/web-components-library/p-8d55127c.entry.js +0 -2
  455. package/dist/web-components-library/p-8d55127c.entry.js.map +0 -1
  456. package/dist/web-components-library/p-8d923a1d.js +0 -2
  457. package/dist/web-components-library/p-8d923a1d.js.map +0 -1
  458. package/dist/web-components-library/p-97608d16.entry.js +0 -2
  459. package/dist/web-components-library/p-abd17b10.entry.js +0 -2
  460. package/dist/web-components-library/p-abd17b10.entry.js.map +0 -1
  461. package/dist/web-components-library/p-ac585bcd.entry.js +0 -2
  462. package/www/build/p-165d5acc.entry.js +0 -2
  463. package/www/build/p-165d5acc.entry.js.map +0 -1
  464. package/www/build/p-310c2215.entry.js +0 -2
  465. package/www/build/p-310c2215.entry.js.map +0 -1
  466. package/www/build/p-3ed25564.entry.js +0 -2
  467. package/www/build/p-67edb420.entry.js +0 -2
  468. package/www/build/p-74819cbe.entry.js +0 -2
  469. package/www/build/p-8d55127c.entry.js +0 -2
  470. package/www/build/p-8d55127c.entry.js.map +0 -1
  471. package/www/build/p-8d923a1d.js +0 -2
  472. package/www/build/p-8d923a1d.js.map +0 -1
  473. package/www/build/p-97608d16.entry.js +0 -2
  474. package/www/build/p-abd17b10.entry.js +0 -2
  475. package/www/build/p-abd17b10.entry.js.map +0 -1
  476. package/www/build/p-ac585bcd.entry.js +0 -2
  477. package/www/build/p-f9314f48.js +0 -2
  478. /package/dist/collection/components/{result-card/z-result-card → z-result-card}/z-result-card.stories.js +0 -0
  479. /package/dist/types/components/{result-card/z-result-card → z-result-card}/z-result-card.stories.d.ts +0 -0
  480. /package/dist/web-components-library/{p-8117a929.entry.js.map → p-01f941c2.entry.js.map} +0 -0
  481. /package/dist/web-components-library/{p-0756fe6f.entry.js.map → p-028dd72a.entry.js.map} +0 -0
  482. /package/dist/web-components-library/{p-6ca0ee2f.entry.js.map → p-0a49dd1c.entry.js.map} +0 -0
  483. /package/dist/web-components-library/{p-09ba466b.entry.js.map → p-240de9aa.entry.js.map} +0 -0
  484. /package/dist/web-components-library/{p-f1c55eda.entry.js.map → p-28534fb5.entry.js.map} +0 -0
  485. /package/dist/web-components-library/{p-966cbf03.entry.js.map → p-28d83c86.entry.js.map} +0 -0
  486. /package/dist/web-components-library/{p-cbab66f7.entry.js.map → p-2bdac94e.entry.js.map} +0 -0
  487. /package/dist/web-components-library/{p-e8419614.entry.js.map → p-2ffdfbb1.entry.js.map} +0 -0
  488. /package/dist/web-components-library/{p-8c52635e.entry.js.map → p-4551b0df.entry.js.map} +0 -0
  489. /package/dist/web-components-library/{p-e639e1bc.entry.js.map → p-460b2068.entry.js.map} +0 -0
  490. /package/dist/web-components-library/{p-0eab3c09.entry.js.map → p-46ea0b2e.entry.js.map} +0 -0
  491. /package/dist/web-components-library/{p-689b0280.entry.js.map → p-4a257653.entry.js.map} +0 -0
  492. /package/dist/web-components-library/{p-8dec332e.entry.js.map → p-4aaf0172.entry.js.map} +0 -0
  493. /package/dist/web-components-library/{p-d6d3a92a.entry.js.map → p-4affbb99.entry.js.map} +0 -0
  494. /package/dist/web-components-library/{p-caa491ca.entry.js.map → p-5989465b.entry.js.map} +0 -0
  495. /package/dist/web-components-library/{p-d8aa6afa.entry.js.map → p-5a1f98a2.entry.js.map} +0 -0
  496. /package/dist/web-components-library/{p-d0d54d42.entry.js.map → p-5c5882c6.entry.js.map} +0 -0
  497. /package/dist/web-components-library/{p-01302e57.entry.js.map → p-5f94986f.entry.js.map} +0 -0
  498. /package/dist/web-components-library/{p-1ad8810a.entry.js.map → p-7194003a.entry.js.map} +0 -0
  499. /package/dist/web-components-library/{p-2b8eb0c2.entry.js.map → p-78146cef.entry.js.map} +0 -0
  500. /package/dist/web-components-library/{p-4fbcf534.entry.js.map → p-7a4f6a5b.entry.js.map} +0 -0
  501. /package/dist/web-components-library/{p-6793061a.entry.js.map → p-7ceddb7a.entry.js.map} +0 -0
  502. /package/dist/web-components-library/{p-4c730d4a.entry.js.map → p-86160fe3.entry.js.map} +0 -0
  503. /package/dist/web-components-library/{p-63c1bde5.entry.js.map → p-863fd1c4.entry.js.map} +0 -0
  504. /package/dist/web-components-library/{p-5cf3a797.entry.js.map → p-943db3a8.entry.js.map} +0 -0
  505. /package/dist/web-components-library/{p-dc5ba112.entry.js.map → p-94916bdf.entry.js.map} +0 -0
  506. /package/dist/web-components-library/{p-67edb420.entry.js.map → p-a2e87cec.entry.js.map} +0 -0
  507. /package/dist/web-components-library/{p-badd98ad.entry.js.map → p-ac477ae7.entry.js.map} +0 -0
  508. /package/dist/web-components-library/{p-3ed25564.entry.js.map → p-af5e8524.entry.js.map} +0 -0
  509. /package/dist/web-components-library/{p-7916e0f7.entry.js.map → p-b3f1b5c1.entry.js.map} +0 -0
  510. /package/dist/web-components-library/{p-962c7f6b.entry.js.map → p-ceeb3e2a.entry.js.map} +0 -0
  511. /package/dist/web-components-library/{p-cb1de7b4.entry.js.map → p-dc086eb5.entry.js.map} +0 -0
  512. /package/dist/web-components-library/{p-74819cbe.entry.js.map → p-deb7f8d7.entry.js.map} +0 -0
  513. /package/dist/web-components-library/{p-6273db7f.entry.js.map → p-e0b88075.entry.js.map} +0 -0
  514. /package/dist/web-components-library/{p-e231e811.entry.js.map → p-f487290e.entry.js.map} +0 -0
  515. /package/www/build/{p-8117a929.entry.js.map → p-01f941c2.entry.js.map} +0 -0
  516. /package/www/build/{p-0756fe6f.entry.js.map → p-028dd72a.entry.js.map} +0 -0
  517. /package/www/build/{p-6ca0ee2f.entry.js.map → p-0a49dd1c.entry.js.map} +0 -0
  518. /package/www/build/{p-09ba466b.entry.js.map → p-240de9aa.entry.js.map} +0 -0
  519. /package/www/build/{p-f1c55eda.entry.js.map → p-28534fb5.entry.js.map} +0 -0
  520. /package/www/build/{p-966cbf03.entry.js.map → p-28d83c86.entry.js.map} +0 -0
  521. /package/www/build/{p-cbab66f7.entry.js.map → p-2bdac94e.entry.js.map} +0 -0
  522. /package/www/build/{p-e8419614.entry.js.map → p-2ffdfbb1.entry.js.map} +0 -0
  523. /package/www/build/{p-8c52635e.entry.js.map → p-4551b0df.entry.js.map} +0 -0
  524. /package/www/build/{p-e639e1bc.entry.js.map → p-460b2068.entry.js.map} +0 -0
  525. /package/www/build/{p-0eab3c09.entry.js.map → p-46ea0b2e.entry.js.map} +0 -0
  526. /package/www/build/{p-689b0280.entry.js.map → p-4a257653.entry.js.map} +0 -0
  527. /package/www/build/{p-8dec332e.entry.js.map → p-4aaf0172.entry.js.map} +0 -0
  528. /package/www/build/{p-d6d3a92a.entry.js.map → p-4affbb99.entry.js.map} +0 -0
  529. /package/www/build/{p-caa491ca.entry.js.map → p-5989465b.entry.js.map} +0 -0
  530. /package/www/build/{p-d8aa6afa.entry.js.map → p-5a1f98a2.entry.js.map} +0 -0
  531. /package/www/build/{p-d0d54d42.entry.js.map → p-5c5882c6.entry.js.map} +0 -0
  532. /package/www/build/{p-01302e57.entry.js.map → p-5f94986f.entry.js.map} +0 -0
  533. /package/www/build/{p-1ad8810a.entry.js.map → p-7194003a.entry.js.map} +0 -0
  534. /package/www/build/{p-2b8eb0c2.entry.js.map → p-78146cef.entry.js.map} +0 -0
  535. /package/www/build/{p-4fbcf534.entry.js.map → p-7a4f6a5b.entry.js.map} +0 -0
  536. /package/www/build/{p-6793061a.entry.js.map → p-7ceddb7a.entry.js.map} +0 -0
  537. /package/www/build/{p-4c730d4a.entry.js.map → p-86160fe3.entry.js.map} +0 -0
  538. /package/www/build/{p-63c1bde5.entry.js.map → p-863fd1c4.entry.js.map} +0 -0
  539. /package/www/build/{p-5cf3a797.entry.js.map → p-943db3a8.entry.js.map} +0 -0
  540. /package/www/build/{p-dc5ba112.entry.js.map → p-94916bdf.entry.js.map} +0 -0
  541. /package/www/build/{p-67edb420.entry.js.map → p-a2e87cec.entry.js.map} +0 -0
  542. /package/www/build/{p-badd98ad.entry.js.map → p-ac477ae7.entry.js.map} +0 -0
  543. /package/www/build/{p-3ed25564.entry.js.map → p-af5e8524.entry.js.map} +0 -0
  544. /package/www/build/{p-7916e0f7.entry.js.map → p-b3f1b5c1.entry.js.map} +0 -0
  545. /package/www/build/{p-962c7f6b.entry.js.map → p-ceeb3e2a.entry.js.map} +0 -0
  546. /package/www/build/{p-cb1de7b4.entry.js.map → p-dc086eb5.entry.js.map} +0 -0
  547. /package/www/build/{p-74819cbe.entry.js.map → p-deb7f8d7.entry.js.map} +0 -0
  548. /package/www/build/{p-6273db7f.entry.js.map → p-e0b88075.entry.js.map} +0 -0
  549. /package/www/build/{p-e231e811.entry.js.map → p-f487290e.entry.js.map} +0 -0
@@ -1,476 +1,106 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { P as PopoverPosition, g as KeyboardCode, p as Device } from './index2.js';
3
- import { a as containsElement, i as findScrollableParent, g as getDevice, j as isElementVisibleInContainer } from './utils.js';
2
+ import { O as OffCanvasVariant, u as TransitionDirection } from './index2.js';
4
3
 
5
- const stylesCss = ":host{position:fixed;display:none;max-width:calc(100% - var(--grid-margin) * 2);max-height:calc(100% - var(--grid-margin) * 2);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)));text-align:center;visibility:hidden;}:host([open]:not([open=\"false\"])[current-position]){display:block}: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}";
6
- const ZPopoverStyle0 = stylesCss;
4
+ const stylesCss = ".sc-z-offcanvas-h{font-family:var(--font-family-sans);font-weight:var(--font-rg)}[variant=\"pushcontent\"].sc-z-offcanvas-h:not([transitiondirection=\"up\"]){overflow:hidden}.canvas-container.sc-z-offcanvas{display:flex;overflow:hidden;min-width:100%;height:100%;background:var(--color-surface01);transform:translateX(0);transition:transform 0.4s ease-out}.sc-z-offcanvas-h>*.sc-z-offcanvas{position:fixed;top:var(--z-offcanvas--top-space, 0);right:0;bottom:0;left:0}[open].sc-z-offcanvas-h>*.sc-z-offcanvas{height:calc(100% - var(--z-offcanvas--top-space, 0px))}[transitiondirection=\"right\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{transform:translateX(-100%)}[transitiondirection=\"left\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{transform:translateX(100%)}[open][transitiondirection=\"right\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas,[open][transitiondirection=\"left\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{transform:translateX(0)}[transitiondirection=\"up\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{top:auto;bottom:0;height:var(--z-offcanvas--container-height, 90%);transform:translateY(100%)}[transitiondirection=\"up\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas,[variant=\"overlay\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{z-index:1001}[open][transitiondirection=\"up\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{transform:translateY(0)}[variant=\"pushcontent\"].sc-z-offcanvas-h:not([transitiondirection=\"up\"])>.canvas-container.sc-z-offcanvas{position:relative;height:100%}[variant=\"pushcontent\"].sc-z-offcanvas-h:not([open]){display:none}[skip-animation].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{transition:none}.backdrop.sc-z-offcanvas{z-index:1000;width:100%;height:100%;background-color:var(--gray900);opacity:0;pointer-events:none;transition:opacity 0.4s ease-out}[open].sc-z-offcanvas-h>.backdrop.sc-z-offcanvas{opacity:0.7;pointer-events:unset}.canvas-container.sc-z-offcanvas>.canvas-content.sc-z-offcanvas{overflow:hidden auto;flex:1 auto;padding:0 calc(var(--space-unit) * 2);margin:calc(var(--space-unit) * 2) calc(var(--space-unit) / 2) calc(var(--space-unit) * 2) 0}@media (min-width: 768px){[variant=\"pushcontent\"].sc-z-offcanvas-h:not([transitiondirection=\"up\"]){flex:none}.canvas-container.sc-z-offcanvas{width:var(--z-offcanvas--container-width, 375px);min-width:var(--z-offcanvas--container-width, 375px)}[transitiondirection=\"up\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{width:100%}[transitiondirection=\"right\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{right:auto;left:0}[transitiondirection=\"left\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{right:0;left:auto}}";
5
+ const ZOffcanvasStyle0 = stylesCss;
7
6
 
8
- const ZPopover = /*@__PURE__*/ proxyCustomElement(class ZPopover extends HTMLElement {
7
+ const ZOffcanvas = /*@__PURE__*/ proxyCustomElement(class ZOffcanvas extends HTMLElement {
9
8
  constructor() {
10
9
  super();
11
10
  this.__registerHost();
12
- this.__attachShadow();
13
- this.positionChange = createEvent(this, "positionChange", 7);
14
- this.openChange = createEvent(this, "openChange", 7);
15
- /** space tolerance for space calculations */
16
- this.spaceTolerance = 3;
17
- this.position = PopoverPosition.TOP;
11
+ this.canvasOpenStatusChanged = createEvent(this, "canvasOpenStatusChanged", 7);
12
+ this.variant = OffCanvasVariant.PUSHCONTENT;
18
13
  this.open = false;
19
- this.bindTo = undefined;
20
- this.showArrow = false;
21
- this.center = false;
22
- this.closable = true;
23
- this.currentPosition = undefined;
24
- }
25
- closePopoverWithKeyboard(e) {
26
- if (this.closable && e.key === KeyboardCode.ESC) {
27
- this.open = false;
28
- }
14
+ this.transitiondirection = TransitionDirection.LEFT;
15
+ this.skipLoadAnimation = false;
16
+ this.showBackdrop = true;
17
+ this.skipAnimation = false;
29
18
  }
30
19
  /**
31
- * Close the popover when clicking outside of its content.
32
- * Stop event propagation if the click was fired by popover's trigger element,
33
- * to prevent close and reopen glitches.
20
+ * Stop the event default behavior and propagation when the offcanvas is closed.
34
21
  */
35
- handleOutsideClick(e) {
36
- const target = e.target;
37
- if (!this.closable || !this.open || containsElement(this.host, target)) {
38
- return;
39
- }
40
- if (containsElement(this.boundElement, target)) {
41
- // stop propagation if the click was on the trigger element to prevent close and reopen glitches
42
- e.stopPropagation();
43
- }
44
- this.open = false;
45
- }
46
- validatePosition(newValue) {
47
- if (!Object.values(PopoverPosition).includes(newValue) || newValue === PopoverPosition.AUTO) {
48
- newValue = PopoverPosition.TOP;
49
- this.position = newValue;
50
- }
51
- this.currentPosition = newValue;
22
+ stopEvent(event) {
52
23
  if (this.open) {
53
- this.setPosition();
54
- }
55
- }
56
- /** Setup popover behaviors when `open` changes. */
57
- onOpen() {
58
- cancelAnimationFrame(this.animationFrameRequestId);
59
- this.openChange.emit({ open: this.open });
60
- if (!this.open) {
61
- Object.assign(this.host.style, {
62
- // Reset all positioning properties
63
- top: "auto",
64
- right: "auto",
65
- bottom: "auto",
66
- left: "auto",
67
- maxWidth: "",
68
- maxHeight: "",
69
- // Set initial visibility to hidden while calculating position...
70
- visibility: "hidden",
71
- });
72
- this.currentPosition = undefined;
73
24
  return;
74
25
  }
75
- const updatePositionLoop = () => {
76
- if (!this.open) {
77
- return;
78
- }
79
- this.setPosition();
80
- this.animationFrameRequestId = requestAnimationFrame(updatePositionLoop);
81
- };
82
- // call `setPosition` after a tick to ensure the DOM is ready and sizes are available
83
- setTimeout(() => {
84
- updatePositionLoop();
85
- }, 0);
86
- }
87
- onBindingChange() {
88
- this.findBoundElement();
89
- }
90
- /** Returns the offset modifier to use in calculations to align the popover with the bound element. */
91
- get offsetModifier() {
92
- return this.center ? 0.5 : 0;
93
- }
94
- findBoundElement() {
95
- if (typeof this.bindTo === "string") {
96
- this.boundElement = this.host.ownerDocument.querySelector(this.bindTo);
97
- }
98
- else if (this.bindTo) {
99
- this.boundElement = this.bindTo;
100
- }
101
- else {
102
- this.boundElement = this.host.parentElement;
103
- }
104
- }
105
- /**
106
- * Check if element has enough space to the right and left to be centered.
107
- * Used for `TOP` and `BOTTOM` position.
108
- * When `center` is not enabled, only one side needs to be checked and `RIGHT` is the default.
109
- */
110
- hasCenteredHorizontalSpace(availableLeft, availableRight, hostWidth, boundElementWidth) {
111
- const requiredSideSpace = (hostWidth - boundElementWidth) * (1 - this.offsetModifier);
112
- if (!this.center) {
113
- return availableRight >= requiredSideSpace - this.spaceTolerance;
114
- }
115
- return (availableRight >= requiredSideSpace - this.spaceTolerance &&
116
- availableLeft >= requiredSideSpace - this.spaceTolerance);
117
- }
118
- /**
119
- * Check if element has enough space to the top and bottom to be centered.
120
- * Used for `RIGHT` and `LEFT` position.
121
- * When `center` is not enabled, only one side needs to be checked and `BOTTOM` is the default.
122
- */
123
- hasCenteredVerticalSpace(availableTop, availableBottom, hostHeight, boundElementHeight) {
124
- const requiredSideSpace = (hostHeight - boundElementHeight) * (1 - this.offsetModifier);
125
- if (!this.center) {
126
- return availableBottom >= requiredSideSpace - this.spaceTolerance;
127
- }
128
- return (availableTop >= requiredSideSpace - this.spaceTolerance &&
129
- availableBottom >= requiredSideSpace - this.spaceTolerance);
130
- }
131
- /**
132
- * Check if there is enough space in the given direction to fit the popover.
133
- * Used for composed positions like TOP_RIGHT, LEFT_BOTTOM, etc.
134
- */
135
- hasEnoughSideSpace(availableSpace, hostSize, boundElementSize, offsetModifier) {
136
- return availableSpace >= hostSize - boundElementSize * (1 - offsetModifier) - this.spaceTolerance;
26
+ event.preventDefault();
27
+ event.stopPropagation();
137
28
  }
138
29
  /**
139
- * Given a desired position and available space around the bound element, returns the best position
140
- * that fits the popover, trying all positions if needed.
141
- * Takes into account offsetModifier for centering.
142
- * @param desiredPosition The desired position of the popover.
143
- * @param availableSpace The available space around the bound element.
30
+ * Hide the body overflow when the offcanvas is open.
144
31
  */
145
- getOptimalPopoverPosition(desiredPosition, availableSpace) {
146
- const hostWidth = this.host.offsetWidth;
147
- const hostHeight = this.host.offsetHeight;
148
- const boundElementWidth = this.boundElement.getBoundingClientRect().width;
149
- const boundElementHeight = this.boundElement.getBoundingClientRect().height;
150
- const offsetModifier = this.offsetModifier;
151
- /** Check if there is enough space to fit the popover in the desired position */
152
- const fits = (pos) => {
153
- switch (pos) {
154
- case PopoverPosition.TOP:
155
- return (availableSpace.top >= hostHeight - this.spaceTolerance &&
156
- this.hasCenteredHorizontalSpace(availableSpace.left, availableSpace.right, hostWidth, boundElementWidth));
157
- case PopoverPosition.TOP_RIGHT:
158
- return (availableSpace.top >= hostHeight &&
159
- this.hasEnoughSideSpace(availableSpace.right, hostWidth, boundElementWidth, offsetModifier));
160
- case PopoverPosition.TOP_LEFT:
161
- return (availableSpace.top >= hostHeight &&
162
- this.hasEnoughSideSpace(availableSpace.left, hostWidth, boundElementWidth, offsetModifier));
163
- case PopoverPosition.RIGHT:
164
- return (availableSpace.right >= hostWidth &&
165
- this.hasCenteredVerticalSpace(availableSpace.top, availableSpace.bottom, hostHeight, boundElementHeight));
166
- case PopoverPosition.RIGHT_BOTTOM:
167
- return (availableSpace.right >= hostWidth &&
168
- this.hasEnoughSideSpace(availableSpace.bottom, hostHeight, boundElementHeight, offsetModifier));
169
- case PopoverPosition.RIGHT_TOP:
170
- return (availableSpace.right >= hostWidth &&
171
- this.hasEnoughSideSpace(availableSpace.top, hostHeight, boundElementHeight, offsetModifier));
172
- case PopoverPosition.BOTTOM:
173
- return (availableSpace.bottom >= hostHeight &&
174
- this.hasCenteredHorizontalSpace(availableSpace.left, availableSpace.right, hostWidth, boundElementWidth));
175
- case PopoverPosition.BOTTOM_LEFT:
176
- return (availableSpace.bottom >= hostHeight &&
177
- this.hasEnoughSideSpace(availableSpace.left, hostWidth, boundElementWidth, offsetModifier));
178
- case PopoverPosition.BOTTOM_RIGHT:
179
- return (availableSpace.bottom >= hostHeight &&
180
- this.hasEnoughSideSpace(availableSpace.right, hostWidth, boundElementWidth, offsetModifier));
181
- case PopoverPosition.LEFT:
182
- return (availableSpace.left >= hostWidth &&
183
- this.hasCenteredVerticalSpace(availableSpace.top, availableSpace.bottom, hostHeight, boundElementHeight));
184
- case PopoverPosition.LEFT_TOP:
185
- return (availableSpace.left >= hostWidth &&
186
- this.hasEnoughSideSpace(availableSpace.top, hostHeight, boundElementHeight, offsetModifier));
187
- case PopoverPosition.LEFT_BOTTOM:
188
- return (availableSpace.left >= hostWidth &&
189
- this.hasEnoughSideSpace(availableSpace.bottom, hostHeight, boundElementHeight, offsetModifier));
190
- default:
191
- return false;
192
- }
193
- };
194
- // Check desired position first
195
- if (fits(desiredPosition)) {
196
- return desiredPosition;
197
- }
198
- // Find position index and create rotation starting from next position
199
- const positions = ZPopover.positionOrder;
200
- const startIndex = positions.indexOf(desiredPosition);
201
- if (startIndex === -1) {
202
- return desiredPosition; // fallback if position not found
203
- }
204
- // Try all other positions starting from the next one
205
- for (let i = 1; i < positions.length; i++) {
206
- const posIndex = (startIndex + i) % positions.length;
207
- const pos = positions[posIndex];
208
- if (fits(pos)) {
209
- return pos;
210
- }
211
- }
212
- return this.findBestFallbackPosition(availableSpace);
213
- }
214
- /** Find the best fallback position based on available space when no position fits perfectly. */
215
- findBestFallbackPosition(availableSpace) {
216
- // Determine which horizontal and vertical direction has the most available space
217
- const bestHorizontalDirection = availableSpace.right >= availableSpace.left ? PopoverPosition.RIGHT : PopoverPosition.LEFT;
218
- const bestVerticalDirection = availableSpace.bottom >= availableSpace.top ? PopoverPosition.BOTTOM : PopoverPosition.TOP;
219
- // Choose the main direction based on which axis has more space overall
220
- const maxHorizontalSpace = Math.max(availableSpace.right, availableSpace.left);
221
- const maxVerticalSpace = Math.max(availableSpace.bottom, availableSpace.top);
222
- const mainDirection = maxVerticalSpace >= maxHorizontalSpace ? bestVerticalDirection : bestHorizontalDirection;
223
- // Decide if a secondary direction is needed
224
- // Only add a secondary direction if the difference between min and max in that axis is at least double
225
- let needsSecondaryDirection = false;
226
- if (mainDirection === bestVerticalDirection) {
227
- // If main direction is vertical, check horizontal space difference
228
- const minHorizontalSpace = Math.min(availableSpace.right, availableSpace.left);
229
- needsSecondaryDirection = maxHorizontalSpace >= minHorizontalSpace * 2;
32
+ handlePageOverflow() {
33
+ const overflow = this.variant === OffCanvasVariant.OVERLAY || this.transitiondirection === TransitionDirection.UP
34
+ ? "overflow-y"
35
+ : "overflow-x";
36
+ document.body.style[overflow] = this.open ? "hidden" : "";
37
+ }
38
+ onOpenChanged() {
39
+ var _a;
40
+ this.canvasOpenStatusChanged.emit(this.open);
41
+ if (!this.open) {
42
+ // when the offcanvas is closing, wait for the transitionend event to end before handling the body overflow
43
+ const listenerCallback = () => {
44
+ this.handlePageOverflow();
45
+ this.canvasContainer.removeEventListener("transitionend", listenerCallback);
46
+ };
47
+ (_a = this.canvasContainer) === null || _a === void 0 ? void 0 : _a.addEventListener("transitionend", listenerCallback);
230
48
  }
231
49
  else {
232
- // If main direction is horizontal, check vertical space difference
233
- const minVerticalSpace = Math.min(availableSpace.bottom, availableSpace.top);
234
- needsSecondaryDirection = maxVerticalSpace >= minVerticalSpace * 2;
235
- }
236
- if (!needsSecondaryDirection) {
237
- return mainDirection;
238
- }
239
- const secondaryDirection = mainDirection === bestVerticalDirection ? bestHorizontalDirection : bestVerticalDirection;
240
- // Return a combined position (e.g., "bottom_right")
241
- return `${mainDirection}_${secondaryDirection}`;
242
- }
243
- /**
244
- * Calculate available space around the element bound with the popover, based on its nearest scrollable ancestor.
245
- *
246
- * Calculations for `right` and `bottom` can be a little bit confusing because `boundingRect.right` and `bottom` may not be what you expect...
247
- * For more information see the explanation in the docs.
248
- * @link https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#return_value
249
- */
250
- calculateAvailableSpace() {
251
- const boundElementRect = this.boundElement.getBoundingClientRect();
252
- if (this.lastBoundRect &&
253
- this.lastBoundRect.x === boundElementRect.x &&
254
- this.lastBoundRect.y === boundElementRect.y &&
255
- this.lastBoundRect.width === boundElementRect.width &&
256
- this.lastBoundRect.height === boundElementRect.height &&
257
- this.cachedAvailableSpace) {
258
- // If the bound element's rect hasn't changed, return the cached rect
259
- return this.cachedAvailableSpace;
50
+ this.handlePageOverflow();
260
51
  }
261
- this.lastBoundRect = boundElementRect;
262
- const scrollableParent = findScrollableParent(this.boundElement);
263
- const scrollableParentRect = scrollableParent.getBoundingClientRect();
264
- const hasNestedScrollableParent = scrollableParent !== this.boundElement.ownerDocument.documentElement;
265
- const documentWidth = this.boundElement.ownerDocument.documentElement.clientWidth;
266
- const documentHeight = this.boundElement.ownerDocument.documentElement.clientHeight;
267
- const safeSpace = 8; // extra space to avoid popover being too close to the edges
268
- // These deltas represent the offset between the scrollable parent and the viewport.
269
- // They are used to adjust the available space calculations when the scrollable parent is not the document or body,
270
- // to try to fit the popover inside the scrollable parent.
271
- const deltaTop = hasNestedScrollableParent ? scrollableParentRect.top : 0;
272
- const deltaRight = hasNestedScrollableParent ? documentWidth - scrollableParentRect.right : 0;
273
- const deltaBottom = hasNestedScrollableParent ? documentHeight - scrollableParentRect.bottom : 0;
274
- const deltaLeft = hasNestedScrollableParent ? scrollableParentRect.left : 0;
275
- this.cachedAvailableSpace = {
276
- top: boundElementRect.top - deltaTop - safeSpace,
277
- right: documentWidth - boundElementRect.right - deltaRight - safeSpace,
278
- bottom: documentHeight - boundElementRect.bottom - deltaBottom - safeSpace,
279
- left: boundElementRect.left - deltaLeft - safeSpace,
280
- };
281
- return this.cachedAvailableSpace;
282
52
  }
283
- /** Calculate the space around an element relative to the viewport. */
284
- calculateElementOffsets(element) {
285
- const elementRect = element.getBoundingClientRect();
286
- const viewportWidth = element.ownerDocument.documentElement.clientWidth;
287
- const viewportHeight = element.ownerDocument.documentElement.clientHeight;
288
- return {
289
- top: elementRect.top,
290
- right: viewportWidth - elementRect.right,
291
- bottom: viewportHeight - elementRect.bottom,
292
- left: elementRect.left,
293
- };
294
- }
295
- /** Apply positioning styles based on passed position. */
296
- applyPositionStyles(position, availableSpace) {
297
- const boundElementWidth = this.boundElement.offsetWidth;
298
- const boundElementHeight = this.boundElement.offsetHeight;
299
- /** Distance between the popover and the bound element */
300
- const distanceFromBound = 8;
301
- const offsetModifier = this.offsetModifier;
302
- /** Distance between the arrow center and the popover edge. Needed to align the center of the arrow with the center of the bound element when `showArrow` and `center` are enabled. */
303
- const arrowModifier = this.showArrow && this.center ? 8 : 0;
304
- const hostStyle = this.host.style;
305
- const boundElementOffsets = this.calculateElementOffsets(this.boundElement);
306
- let maxWidth;
307
- let maxHeight;
308
- switch (position) {
309
- case PopoverPosition.TOP:
310
- case PopoverPosition.TOP_RIGHT:
311
- hostStyle.bottom = `${boundElementOffsets.bottom + boundElementHeight}px`;
312
- hostStyle.left = `${boundElementOffsets.left + boundElementWidth * offsetModifier - (position === PopoverPosition.TOP_RIGHT ? arrowModifier : 0)}px`;
313
- maxHeight = availableSpace.top - distanceFromBound;
314
- if (position === PopoverPosition.TOP_RIGHT) {
315
- maxWidth = availableSpace.right + boundElementWidth * offsetModifier;
316
- }
317
- break;
318
- case PopoverPosition.TOP_LEFT:
319
- hostStyle.right = `${boundElementOffsets.right + boundElementWidth * offsetModifier - arrowModifier}px`;
320
- hostStyle.bottom = `${boundElementOffsets.bottom + boundElementHeight}px`;
321
- maxWidth = availableSpace.left + boundElementWidth * offsetModifier;
322
- maxHeight = availableSpace.top - distanceFromBound;
323
- break;
324
- case PopoverPosition.BOTTOM:
325
- case PopoverPosition.BOTTOM_RIGHT:
326
- hostStyle.top = `${boundElementOffsets.top + boundElementHeight}px`;
327
- hostStyle.left = `${boundElementOffsets.left + boundElementWidth * offsetModifier - (position === PopoverPosition.BOTTOM_RIGHT ? arrowModifier : 0)}px`;
328
- maxHeight = availableSpace.bottom - distanceFromBound;
329
- if (position === PopoverPosition.BOTTOM_RIGHT) {
330
- maxWidth = availableSpace.right + boundElementWidth * offsetModifier;
331
- }
332
- break;
333
- case PopoverPosition.BOTTOM_LEFT:
334
- hostStyle.top = `${boundElementOffsets.top + boundElementHeight}px`;
335
- hostStyle.right = `${boundElementOffsets.right + boundElementWidth * offsetModifier - arrowModifier}px`;
336
- maxWidth = availableSpace.left + boundElementWidth * offsetModifier;
337
- maxHeight = availableSpace.bottom - distanceFromBound;
338
- break;
339
- case PopoverPosition.RIGHT:
340
- case PopoverPosition.RIGHT_BOTTOM:
341
- hostStyle.top = `${boundElementOffsets.top + boundElementHeight * offsetModifier - (position === PopoverPosition.RIGHT_BOTTOM ? arrowModifier : 0)}px`;
342
- hostStyle.left = `${boundElementOffsets.left + boundElementWidth}px`;
343
- maxWidth = availableSpace.right - distanceFromBound;
344
- if (position === PopoverPosition.RIGHT) {
345
- maxHeight = availableSpace.top + availableSpace.bottom + boundElementHeight;
346
- }
347
- else {
348
- maxHeight = availableSpace.bottom + boundElementHeight * offsetModifier;
349
- }
350
- break;
351
- case PopoverPosition.RIGHT_TOP:
352
- hostStyle.bottom = `${boundElementOffsets.bottom + boundElementHeight * offsetModifier - arrowModifier}px`;
353
- hostStyle.left = `${boundElementOffsets.left + boundElementWidth}px`;
354
- maxWidth = availableSpace.right - distanceFromBound;
355
- maxHeight = availableSpace.top + boundElementHeight * offsetModifier;
356
- break;
357
- case PopoverPosition.LEFT:
358
- case PopoverPosition.LEFT_BOTTOM:
359
- hostStyle.top = `${boundElementOffsets.top + boundElementHeight * offsetModifier - (position === PopoverPosition.LEFT_BOTTOM ? arrowModifier : 0)}px`;
360
- hostStyle.right = `${boundElementOffsets.right + boundElementWidth}px`;
361
- maxWidth = availableSpace.left - distanceFromBound;
362
- if (position === PopoverPosition.LEFT_BOTTOM) {
363
- maxHeight = availableSpace.bottom + boundElementHeight * offsetModifier;
364
- }
365
- break;
366
- case PopoverPosition.LEFT_TOP:
367
- hostStyle.right = `${boundElementOffsets.right + boundElementWidth}px`;
368
- hostStyle.bottom = `${boundElementOffsets.bottom + boundElementHeight * offsetModifier - arrowModifier}px`;
369
- maxWidth = availableSpace.left - distanceFromBound;
370
- maxHeight = availableSpace.top + boundElementHeight * offsetModifier;
371
- break;
372
- }
373
- if (getDevice() !== Device.MOBILE) {
374
- // Only force max sizes on non-mobile viewports
375
- Object.assign(hostStyle, {
376
- maxWidth: maxWidth ? `${maxWidth}px` : "",
377
- maxHeight: maxHeight ? `${maxHeight}px` : "",
378
- });
53
+ componentWillLoad() {
54
+ if (this.open) {
55
+ this.skipAnimation = true;
379
56
  }
380
57
  }
381
- /** Set the position of the popover. */
382
- setPosition() {
383
- if (!this.boundElement) {
384
- return;
385
- }
386
- if (!isElementVisibleInContainer(this.boundElement, findScrollableParent(this.boundElement))) {
387
- // If the bound element is not visible, hide the popover too
388
- this.open = false;
389
- return;
390
- }
391
- Object.assign(this.host.style, {
392
- // Reset all positioning properties
393
- top: "auto",
394
- right: "auto",
395
- bottom: "auto",
396
- left: "auto",
397
- maxWidth: "",
398
- maxHeight: "",
399
- // Set initial visibility to hidden while calculating position...
400
- visibility: "hidden",
401
- });
402
- const availableSpace = this.calculateAvailableSpace();
403
- const position = this.getOptimalPopoverPosition(this.position, availableSpace);
404
- this.applyPositionStyles(position, availableSpace);
405
- this.currentPosition = position;
406
- this.positionChange.emit({ position: this.currentPosition });
407
- // ...then restore the visibility
408
- this.host.style.visibility = "visible";
58
+ componentDidLoad() {
59
+ this.handlePageOverflow();
409
60
  }
410
- componentWillLoad() {
411
- this.validatePosition(this.position);
61
+ componentDidRender() {
62
+ this.skipAnimation = false;
412
63
  }
413
- componentDidLoad() {
414
- this.findBoundElement();
415
- if (this.open) {
416
- this.onOpen();
417
- }
64
+ connectedCallback() {
65
+ this.handlePageOverflow();
418
66
  }
419
67
  disconnectedCallback() {
420
- cancelAnimationFrame(this.animationFrameRequestId);
68
+ this.open = false;
421
69
  }
422
70
  render() {
423
- return (h(Host, { key: '2a5248b521455e8682038aaf42ca9020b6ffb68d', "current-position": this.currentPosition }, h("slot", { key: '4993c751c45e1ff683dc341f9445a30ff2647d44' })));
71
+ return (h(Host, { key: '52ce71415709ffe342802b789448fe168eef9d3d', "skip-animation": this.skipAnimation, "aria-hidden": !this.open ? "true" : null }, h("div", { key: '93173c6176acd24a8f02541b5becd3dfd7f98ac3', class: "canvas-container", role: "presentation", ref: (el) => (this.canvasContainer = el) }, h("div", { key: '82b36a24cbf7856d8f8ee17952e0cf733529f7ae', class: "canvas-content z-scrollbar", role: "presentation" }, h("slot", { key: 'e5281598686c2d0de459045ceaa81c1c31dbcd22', name: "canvasContent" }))), (this.variant == OffCanvasVariant.OVERLAY || this.transitiondirection === TransitionDirection.UP) &&
72
+ this.showBackdrop && (h("div", { key: 'b912144f9bf525114394cd03f84f38f810c8cb29', class: "backdrop", onClick: () => (this.open = false) }))));
424
73
  }
425
- get host() { return this; }
426
74
  static get watchers() { return {
427
- "position": ["validatePosition"],
428
- "open": ["onOpen"],
429
- "bindTo": ["onBindingChange"]
75
+ "variant": ["handlePageOverflow"],
76
+ "open": ["onOpenChanged"]
430
77
  }; }
431
- static get style() { return ZPopoverStyle0; }
432
- }, [1, "z-popover", {
433
- "position": [1537],
78
+ static get style() { return ZOffcanvasStyle0; }
79
+ }, [6, "z-offcanvas", {
80
+ "variant": [513],
434
81
  "open": [1540],
435
- "bindTo": [1, "bind-to"],
436
- "showArrow": [516, "show-arrow"],
437
- "center": [516],
438
- "closable": [4],
439
- "currentPosition": [32]
440
- }, [[8, "keyup", "closePopoverWithKeyboard"], [18, "click", "handleOutsideClick"]], {
441
- "position": ["validatePosition"],
442
- "open": ["onOpen"],
443
- "bindTo": ["onBindingChange"]
82
+ "transitiondirection": [513],
83
+ "skipLoadAnimation": [4, "skip-load-animation"],
84
+ "showBackdrop": [4, "show-backdrop"],
85
+ "skipAnimation": [32]
86
+ }, [[2, "click", "stopEvent"], [2, "focusin", "stopEvent"]], {
87
+ "variant": ["handlePageOverflow"],
88
+ "open": ["onOpenChanged"]
444
89
  }]);
445
- // Clockwise order of positions.
446
- ZPopover.positionOrder = [
447
- PopoverPosition.TOP,
448
- PopoverPosition.TOP_RIGHT,
449
- PopoverPosition.TOP_LEFT,
450
- PopoverPosition.RIGHT,
451
- PopoverPosition.RIGHT_BOTTOM,
452
- PopoverPosition.RIGHT_TOP,
453
- PopoverPosition.BOTTOM,
454
- PopoverPosition.BOTTOM_LEFT,
455
- PopoverPosition.BOTTOM_RIGHT,
456
- PopoverPosition.LEFT,
457
- PopoverPosition.LEFT_TOP,
458
- PopoverPosition.LEFT_BOTTOM,
459
- ];
460
90
  function defineCustomElement() {
461
91
  if (typeof customElements === "undefined") {
462
92
  return;
463
93
  }
464
- const components = ["z-popover"];
94
+ const components = ["z-offcanvas"];
465
95
  components.forEach(tagName => { switch (tagName) {
466
- case "z-popover":
96
+ case "z-offcanvas":
467
97
  if (!customElements.get(tagName)) {
468
- customElements.define(tagName, ZPopover);
98
+ customElements.define(tagName, ZOffcanvas);
469
99
  }
470
100
  break;
471
101
  } });
472
102
  }
473
103
 
474
- export { ZPopover as Z, defineCustomElement as d };
104
+ export { ZOffcanvas as Z, defineCustomElement as d };
475
105
 
476
106
  //# sourceMappingURL=index23.js.map