@zanichelli/albe-web-components 17.0.6-RC5 → 17.0.6

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 (426) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/cjs/{index-9b8b105e.js → index-2a9a328d.js} +2 -2
  3. package/dist/cjs/{index-9b8b105e.js.map → index-2a9a328d.js.map} +1 -1
  4. package/dist/cjs/{index-117cd3b0.js → index-aa56c709.js} +4 -4
  5. package/dist/cjs/{index-117cd3b0.js.map → index-aa56c709.js.map} +1 -1
  6. package/dist/cjs/{index-d6c4fda2.js → index-b2f35532.js} +2 -2
  7. package/dist/cjs/{index-d6c4fda2.js.map → index-b2f35532.js.map} +1 -1
  8. package/dist/cjs/{index-a465bca8.js → index-f5ebcaa2.js} +1 -2
  9. package/dist/cjs/index-f5ebcaa2.js.map +1 -0
  10. package/dist/cjs/index.cjs.js +2 -2
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/{utils-ee8e5b38.js → utils-c95c97b8.js} +2 -2
  13. package/dist/cjs/{utils-ee8e5b38.js.map → utils-c95c97b8.js.map} +1 -1
  14. package/dist/cjs/{utils-873dd0ae.js → utils-d08d4b80.js} +2 -2
  15. package/dist/cjs/{utils-873dd0ae.js.map → utils-d08d4b80.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-anchor-navigation.cjs.entry.js +1 -1
  19. package/dist/cjs/z-app-header-deprecated.cjs.entry.js +1 -1
  20. package/dist/cjs/z-app-header_12.cjs.entry.js +8 -8
  21. package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
  22. package/dist/cjs/z-aria-alert.cjs.entry.js +1 -1
  23. package/dist/cjs/z-avatar.cjs.entry.js +1 -1
  24. package/dist/cjs/z-book-card-app.cjs.entry.js +1 -1
  25. package/dist/cjs/z-book-card-deprecated.cjs.entry.js +2 -2
  26. package/dist/cjs/z-book-card.cjs.entry.js +6 -5
  27. package/dist/cjs/z-book-card.cjs.entry.js.map +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 +3 -3
  33. package/dist/cjs/z-combobox.cjs.entry.js.map +1 -1
  34. package/dist/cjs/z-cover-hero.cjs.entry.js +1 -1
  35. package/dist/cjs/z-date-picker.cjs.entry.js +2 -2
  36. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +2 -2
  37. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js.map +1 -1
  38. package/dist/cjs/z-file-upload.cjs.entry.js +1 -1
  39. package/dist/cjs/z-file.cjs.entry.js +1 -1
  40. package/dist/cjs/z-info-reveal.cjs.entry.js +1 -1
  41. package/dist/cjs/z-menu-section.cjs.entry.js +1 -1
  42. package/dist/cjs/z-menu.cjs.entry.js +2 -2
  43. package/dist/cjs/z-myz-card-alert.cjs.entry.js +1 -1
  44. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
  45. package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -1
  46. package/dist/cjs/z-myz-card-info.cjs.entry.js +2 -2
  47. package/dist/cjs/z-myz-card_4.cjs.entry.js +1 -1
  48. package/dist/cjs/z-myz-list-item.cjs.entry.js +2 -2
  49. package/dist/cjs/z-navigation-tabs.cjs.entry.js +1 -1
  50. package/dist/cjs/z-otp.cjs.entry.js +1 -1
  51. package/dist/cjs/z-pagination.cjs.entry.js +1 -1
  52. package/dist/cjs/z-popover.cjs.entry.js +1 -1
  53. package/dist/cjs/z-range-picker.cjs.entry.js +2 -2
  54. package/dist/cjs/z-section-title.cjs.entry.js +1 -1
  55. package/dist/cjs/z-select.cjs.entry.js +32 -120
  56. package/dist/cjs/z-select.cjs.entry.js.map +1 -1
  57. package/dist/cjs/z-skip-to-content.cjs.entry.js +2 -2
  58. package/dist/cjs/z-slideshow.cjs.entry.js +2 -2
  59. package/dist/cjs/z-table.cjs.entry.js +5 -5
  60. package/dist/cjs/z-td.cjs.entry.js +2 -2
  61. package/dist/cjs/z-th.cjs.entry.js +2 -2
  62. package/dist/cjs/z-toast-notification-list.cjs.entry.js +1 -1
  63. package/dist/cjs/z-toast-notification.cjs.entry.js +1 -1
  64. package/dist/cjs/z-toggle-switch.cjs.entry.js +2 -2
  65. package/dist/cjs/z-tooltip.cjs.entry.js +1 -1
  66. package/dist/cjs/z-tr.cjs.entry.js +5 -5
  67. package/dist/collection/beans/index.js +0 -1
  68. package/dist/collection/beans/index.js.map +1 -1
  69. package/dist/collection/components/book-card/z-book-card/index.js +23 -3
  70. package/dist/collection/components/book-card/z-book-card/index.js.map +1 -1
  71. package/dist/collection/components/book-card/z-book-card/index.stories.js +35 -0
  72. package/dist/collection/components/book-card/z-book-card/index.stories.js.map +1 -1
  73. package/dist/collection/components/book-card/z-book-card/styles.css +23 -0
  74. package/dist/collection/components/css-components/z-scrollbar/index.stories.js +73 -0
  75. package/dist/collection/components/css-components/z-scrollbar/index.stories.js.map +1 -0
  76. package/dist/collection/components/list/z-list/index.js +1 -1
  77. package/dist/collection/components/list/z-list-element/index.js +1 -1
  78. package/dist/collection/components/list/z-list-group/index.js +1 -1
  79. package/dist/collection/components/z-combobox/styles.css +13 -6
  80. package/dist/collection/components/z-input/index.js +2 -2
  81. package/dist/collection/components/z-input/index.js.map +1 -1
  82. package/dist/collection/components/z-input/styles.css +0 -20
  83. package/dist/collection/components/z-modal/styles.css +7 -7
  84. package/dist/collection/components/z-offcanvas/index.js +1 -1
  85. package/dist/collection/components/z-offcanvas/index.js.map +1 -1
  86. package/dist/collection/components/z-offcanvas/styles.css +0 -21
  87. package/dist/collection/components/z-searchbar/styles.css +13 -10
  88. package/dist/collection/components/z-select/index.js +34 -134
  89. package/dist/collection/components/z-select/index.js.map +1 -1
  90. package/dist/collection/components/z-select/index.stories.js +0 -91
  91. package/dist/collection/components/z-select/index.stories.js.map +1 -1
  92. package/dist/collection/components/z-select/styles.css +0 -123
  93. package/dist/components/index11.js +3 -3
  94. package/dist/components/index11.js.map +1 -1
  95. package/dist/components/index16.js +1 -1
  96. package/dist/components/index16.js.map +1 -1
  97. package/dist/components/index2.js +0 -1
  98. package/dist/components/index2.js.map +1 -1
  99. package/dist/components/index22.js +2 -2
  100. package/dist/components/index22.js.map +1 -1
  101. package/dist/components/index24.js +1 -1
  102. package/dist/components/index24.js.map +1 -1
  103. package/dist/components/z-book-card.js +6 -4
  104. package/dist/components/z-book-card.js.map +1 -1
  105. package/dist/components/z-combobox.js +1 -1
  106. package/dist/components/z-combobox.js.map +1 -1
  107. package/dist/components/z-select.js +30 -119
  108. package/dist/components/z-select.js.map +1 -1
  109. package/dist/docs/themes/index.stories.js +2 -1
  110. package/dist/docs/themes/index.stories.js.map +1 -1
  111. package/dist/esm/{index-f36946b3.js → index-092fc7cc.js} +4 -4
  112. package/dist/esm/{index-f36946b3.js.map → index-092fc7cc.js.map} +1 -1
  113. package/dist/esm/{index-5c567adb.js → index-735d4f23.js} +2 -2
  114. package/dist/esm/{index-5c567adb.js.map → index-735d4f23.js.map} +1 -1
  115. package/dist/esm/{index-dac83244.js → index-90f624c1.js} +2 -2
  116. package/dist/esm/{index-dac83244.js.map → index-90f624c1.js.map} +1 -1
  117. package/dist/esm/{index-c9fd4a10.js → index-ee40e66b.js} +1 -2
  118. package/dist/esm/index-ee40e66b.js.map +1 -0
  119. package/dist/esm/index.js +2 -2
  120. package/dist/esm/loader.js +1 -1
  121. package/dist/esm/{utils-1a6a53d2.js → utils-a31c16d9.js} +2 -2
  122. package/dist/esm/{utils-1a6a53d2.js.map → utils-a31c16d9.js.map} +1 -1
  123. package/dist/esm/{utils-7774201b.js → utils-b924649f.js} +2 -2
  124. package/dist/esm/{utils-7774201b.js.map → utils-b924649f.js.map} +1 -1
  125. package/dist/esm/web-components-library.js +1 -1
  126. package/dist/esm/z-accordion.entry.js +1 -1
  127. package/dist/esm/z-anchor-navigation.entry.js +1 -1
  128. package/dist/esm/z-app-header-deprecated.entry.js +1 -1
  129. package/dist/esm/z-app-header_12.entry.js +8 -8
  130. package/dist/esm/z-app-header_12.entry.js.map +1 -1
  131. package/dist/esm/z-aria-alert.entry.js +1 -1
  132. package/dist/esm/z-avatar.entry.js +1 -1
  133. package/dist/esm/z-book-card-app.entry.js +1 -1
  134. package/dist/esm/z-book-card-deprecated.entry.js +2 -2
  135. package/dist/esm/z-book-card.entry.js +6 -5
  136. package/dist/esm/z-book-card.entry.js.map +1 -1
  137. package/dist/esm/z-breadcrumb.entry.js +2 -2
  138. package/dist/esm/z-card.entry.js +1 -1
  139. package/dist/esm/z-carousel.entry.js +1 -1
  140. package/dist/esm/z-chip.entry.js +1 -1
  141. package/dist/esm/z-combobox.entry.js +3 -3
  142. package/dist/esm/z-combobox.entry.js.map +1 -1
  143. package/dist/esm/z-cover-hero.entry.js +1 -1
  144. package/dist/esm/z-date-picker.entry.js +2 -2
  145. package/dist/esm/z-dragdrop-area_2.entry.js +2 -2
  146. package/dist/esm/z-dragdrop-area_2.entry.js.map +1 -1
  147. package/dist/esm/z-file-upload.entry.js +1 -1
  148. package/dist/esm/z-file.entry.js +1 -1
  149. package/dist/esm/z-info-reveal.entry.js +1 -1
  150. package/dist/esm/z-menu-section.entry.js +1 -1
  151. package/dist/esm/z-menu.entry.js +2 -2
  152. package/dist/esm/z-myz-card-alert.entry.js +1 -1
  153. package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
  154. package/dist/esm/z-myz-card-footer.entry.js +1 -1
  155. package/dist/esm/z-myz-card-info.entry.js +2 -2
  156. package/dist/esm/z-myz-card_4.entry.js +1 -1
  157. package/dist/esm/z-myz-list-item.entry.js +2 -2
  158. package/dist/esm/z-navigation-tabs.entry.js +1 -1
  159. package/dist/esm/z-otp.entry.js +1 -1
  160. package/dist/esm/z-pagination.entry.js +1 -1
  161. package/dist/esm/z-popover.entry.js +1 -1
  162. package/dist/esm/z-range-picker.entry.js +2 -2
  163. package/dist/esm/z-section-title.entry.js +1 -1
  164. package/dist/esm/z-select.entry.js +32 -120
  165. package/dist/esm/z-select.entry.js.map +1 -1
  166. package/dist/esm/z-skip-to-content.entry.js +2 -2
  167. package/dist/esm/z-slideshow.entry.js +2 -2
  168. package/dist/esm/z-table.entry.js +5 -5
  169. package/dist/esm/z-td.entry.js +2 -2
  170. package/dist/esm/z-th.entry.js +2 -2
  171. package/dist/esm/z-toast-notification-list.entry.js +1 -1
  172. package/dist/esm/z-toast-notification.entry.js +1 -1
  173. package/dist/esm/z-toggle-switch.entry.js +2 -2
  174. package/dist/esm/z-tooltip.entry.js +1 -1
  175. package/dist/esm/z-tr.entry.js +5 -5
  176. package/dist/types/beans/index.d.ts +1 -3
  177. package/dist/types/components/book-card/z-book-card/index.d.ts +3 -0
  178. package/dist/types/components/book-card/z-book-card/index.stories.d.ts +3 -0
  179. package/dist/types/components/css-components/z-scrollbar/index.stories.d.ts +57 -0
  180. package/dist/types/components/z-select/index.d.ts +0 -8
  181. package/dist/types/components/z-select/index.stories.d.ts +0 -8
  182. package/dist/types/components.d.ts +8 -2
  183. package/dist/web-components-library/index.esm.js +1 -1
  184. package/dist/web-components-library/{p-b22d3c7d.js → p-05f6053f.js} +2 -2
  185. package/dist/web-components-library/{p-de571245.entry.js → p-0d3f0534.entry.js} +2 -2
  186. package/{www/build/p-de571245.entry.js.map → dist/web-components-library/p-0d3f0534.entry.js.map} +1 -1
  187. package/{www/build/p-475a2ba2.entry.js → dist/web-components-library/p-0df6b405.entry.js} +2 -2
  188. package/dist/web-components-library/{p-8e544914.entry.js → p-11216ee8.entry.js} +2 -2
  189. package/dist/web-components-library/{p-6f5f2d56.entry.js → p-115fab3e.entry.js} +2 -2
  190. package/dist/web-components-library/{p-bbdb67db.entry.js → p-11629dd3.entry.js} +2 -2
  191. package/dist/web-components-library/{p-c3c99202.js → p-123739cb.js} +2 -2
  192. package/{www/build/p-7b375bca.js → dist/web-components-library/p-14e61df6.js} +2 -2
  193. package/dist/web-components-library/{p-29a297ed.entry.js → p-1630e240.entry.js} +2 -2
  194. package/dist/web-components-library/{p-5b6dd467.entry.js → p-18d63f0c.entry.js} +2 -2
  195. package/dist/web-components-library/{p-f49171aa.entry.js → p-1e3ff105.entry.js} +2 -2
  196. package/{www/build/p-cdc51108.entry.js → dist/web-components-library/p-22e32e11.entry.js} +2 -2
  197. package/dist/web-components-library/p-2798c0b2.entry.js +2 -0
  198. package/dist/web-components-library/{p-31c5b39d.entry.js → p-2a0d8ebe.entry.js} +2 -2
  199. package/dist/web-components-library/{p-0a149188.entry.js → p-2c450113.entry.js} +2 -2
  200. package/dist/web-components-library/{p-7091a1fc.entry.js → p-395b261e.entry.js} +2 -2
  201. package/dist/web-components-library/{p-7ef2c4ce.entry.js → p-4374d3f3.entry.js} +2 -2
  202. package/dist/web-components-library/{p-8e6760d9.entry.js → p-50bf57b4.entry.js} +2 -2
  203. package/{www/build/p-cc775eee.entry.js → dist/web-components-library/p-52be7378.entry.js} +2 -2
  204. package/dist/web-components-library/{p-c29bd399.entry.js → p-5387e6f3.entry.js} +2 -2
  205. package/dist/web-components-library/{p-f9fb6005.entry.js → p-72dae90b.entry.js} +2 -2
  206. package/{www/build/p-d29f9574.entry.js → dist/web-components-library/p-73d686e0.entry.js} +2 -2
  207. package/dist/web-components-library/{p-96be6eae.entry.js → p-75808b47.entry.js} +2 -2
  208. package/dist/web-components-library/{p-6279b3fc.entry.js → p-758333dc.entry.js} +2 -2
  209. package/{www/build/p-7cfe50d0.entry.js → dist/web-components-library/p-7af33b00.entry.js} +2 -2
  210. package/dist/web-components-library/{p-71e2a48b.entry.js → p-7f370d17.entry.js} +2 -2
  211. package/dist/web-components-library/{p-c7f8b628.entry.js → p-8c952964.entry.js} +2 -2
  212. package/dist/web-components-library/{p-7f0cbe57.entry.js → p-9218da42.entry.js} +2 -2
  213. package/{www/build/p-8adf58c8.entry.js → dist/web-components-library/p-9c4b7a51.entry.js} +2 -2
  214. package/dist/web-components-library/p-9e6d080f.entry.js +2 -0
  215. package/dist/web-components-library/p-9e6d080f.entry.js.map +1 -0
  216. package/{www/build/p-6337614a.entry.js → dist/web-components-library/p-aa0b3e7a.entry.js} +2 -2
  217. package/{www/build/p-9ec778dc.entry.js → dist/web-components-library/p-aa42f01d.entry.js} +2 -2
  218. package/dist/web-components-library/p-ad825740.entry.js +2 -0
  219. package/dist/web-components-library/p-b34993de.js +2 -0
  220. package/dist/web-components-library/p-b34993de.js.map +1 -0
  221. package/dist/web-components-library/{p-15aac7aa.js → p-bba6129f.js} +2 -2
  222. package/{www/build/p-4c287a21.entry.js → dist/web-components-library/p-bd571858.entry.js} +2 -2
  223. package/dist/web-components-library/{p-8ca50c86.entry.js → p-c29a520b.entry.js} +2 -2
  224. package/dist/web-components-library/{p-f444b5bd.entry.js → p-cf7b7e73.entry.js} +2 -2
  225. package/{www/build/p-b7cf2442.entry.js → dist/web-components-library/p-d1cca5ea.entry.js} +2 -2
  226. package/dist/web-components-library/p-d28b352f.entry.js +2 -0
  227. package/dist/web-components-library/p-d28b352f.entry.js.map +1 -0
  228. package/dist/web-components-library/p-d65aba93.entry.js +2 -0
  229. package/dist/web-components-library/{p-20e4a601.entry.js → p-d6a2b1c6.entry.js} +2 -2
  230. package/dist/web-components-library/p-e185545c.entry.js +2 -0
  231. package/dist/web-components-library/p-e256027a.entry.js +2 -0
  232. package/dist/web-components-library/p-e256027a.entry.js.map +1 -0
  233. package/dist/web-components-library/{p-e7524beb.entry.js → p-e5b1c34a.entry.js} +2 -2
  234. package/dist/web-components-library/{p-e7524beb.entry.js.map → p-e5b1c34a.entry.js.map} +1 -1
  235. package/dist/web-components-library/{p-010b6146.js → p-e691c0b8.js} +2 -2
  236. package/{www/build/p-5bac684a.entry.js → dist/web-components-library/p-e78353d6.entry.js} +2 -2
  237. package/{www/build/p-898fcd66.entry.js → dist/web-components-library/p-ed091723.entry.js} +2 -2
  238. package/dist/web-components-library/{p-011fa0c8.entry.js → p-f06bd257.entry.js} +2 -2
  239. package/dist/web-components-library/{p-0d60cc5e.entry.js → p-f075ec62.entry.js} +2 -2
  240. package/{www/build/p-fc2b2a96.entry.js → dist/web-components-library/p-f8915e2e.entry.js} +2 -2
  241. package/dist/web-components-library/web-components-library.css +21 -0
  242. package/dist/web-components-library/web-components-library.esm.js +1 -1
  243. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  244. package/package.json +1 -1
  245. package/www/build/index.esm.js +1 -1
  246. package/www/build/{p-b22d3c7d.js → p-05f6053f.js} +2 -2
  247. package/www/build/{p-de571245.entry.js → p-0d3f0534.entry.js} +2 -2
  248. package/{dist/web-components-library/p-de571245.entry.js.map → www/build/p-0d3f0534.entry.js.map} +1 -1
  249. package/{dist/web-components-library/p-475a2ba2.entry.js → www/build/p-0df6b405.entry.js} +2 -2
  250. package/www/build/{p-8e544914.entry.js → p-11216ee8.entry.js} +2 -2
  251. package/www/build/{p-6f5f2d56.entry.js → p-115fab3e.entry.js} +2 -2
  252. package/www/build/{p-bbdb67db.entry.js → p-11629dd3.entry.js} +2 -2
  253. package/www/build/{p-c3c99202.js → p-123739cb.js} +2 -2
  254. package/{dist/web-components-library/p-7b375bca.js → www/build/p-14e61df6.js} +2 -2
  255. package/www/build/{p-29a297ed.entry.js → p-1630e240.entry.js} +2 -2
  256. package/www/build/{p-5b6dd467.entry.js → p-18d63f0c.entry.js} +2 -2
  257. package/www/build/{p-f49171aa.entry.js → p-1e3ff105.entry.js} +2 -2
  258. package/{dist/web-components-library/p-cdc51108.entry.js → www/build/p-22e32e11.entry.js} +2 -2
  259. package/www/build/p-2798c0b2.entry.js +2 -0
  260. package/www/build/{p-31c5b39d.entry.js → p-2a0d8ebe.entry.js} +2 -2
  261. package/www/build/{p-0a149188.entry.js → p-2c450113.entry.js} +2 -2
  262. package/www/build/{p-7091a1fc.entry.js → p-395b261e.entry.js} +2 -2
  263. package/www/build/{p-7ef2c4ce.entry.js → p-4374d3f3.entry.js} +2 -2
  264. package/www/build/{p-8e6760d9.entry.js → p-50bf57b4.entry.js} +2 -2
  265. package/{dist/web-components-library/p-cc775eee.entry.js → www/build/p-52be7378.entry.js} +2 -2
  266. package/www/build/{p-c29bd399.entry.js → p-5387e6f3.entry.js} +2 -2
  267. package/www/build/{p-a35437c8.css → p-5fcad73f.css} +21 -0
  268. package/www/build/{p-f9fb6005.entry.js → p-72dae90b.entry.js} +2 -2
  269. package/{dist/web-components-library/p-d29f9574.entry.js → www/build/p-73d686e0.entry.js} +2 -2
  270. package/www/build/{p-96be6eae.entry.js → p-75808b47.entry.js} +2 -2
  271. package/www/build/{p-6279b3fc.entry.js → p-758333dc.entry.js} +2 -2
  272. package/{dist/web-components-library/p-7cfe50d0.entry.js → www/build/p-7af33b00.entry.js} +2 -2
  273. package/www/build/{p-71e2a48b.entry.js → p-7f370d17.entry.js} +2 -2
  274. package/www/build/{p-c7f8b628.entry.js → p-8c952964.entry.js} +2 -2
  275. package/www/build/{p-7f0cbe57.entry.js → p-9218da42.entry.js} +2 -2
  276. package/{dist/web-components-library/p-8adf58c8.entry.js → www/build/p-9c4b7a51.entry.js} +2 -2
  277. package/www/build/p-9e6d080f.entry.js +2 -0
  278. package/www/build/p-9e6d080f.entry.js.map +1 -0
  279. package/{dist/web-components-library/p-6337614a.entry.js → www/build/p-aa0b3e7a.entry.js} +2 -2
  280. package/{dist/web-components-library/p-9ec778dc.entry.js → www/build/p-aa42f01d.entry.js} +2 -2
  281. package/www/build/p-ad825740.entry.js +2 -0
  282. package/www/build/p-b34993de.js +2 -0
  283. package/www/build/p-b34993de.js.map +1 -0
  284. package/www/build/p-bac5085b.js +2 -0
  285. package/www/build/{p-15aac7aa.js → p-bba6129f.js} +2 -2
  286. package/{dist/web-components-library/p-4c287a21.entry.js → www/build/p-bd571858.entry.js} +2 -2
  287. package/www/build/{p-8ca50c86.entry.js → p-c29a520b.entry.js} +2 -2
  288. package/www/build/{p-f444b5bd.entry.js → p-cf7b7e73.entry.js} +2 -2
  289. package/{dist/web-components-library/p-b7cf2442.entry.js → www/build/p-d1cca5ea.entry.js} +2 -2
  290. package/www/build/p-d28b352f.entry.js +2 -0
  291. package/www/build/p-d28b352f.entry.js.map +1 -0
  292. package/www/build/p-d65aba93.entry.js +2 -0
  293. package/www/build/{p-20e4a601.entry.js → p-d6a2b1c6.entry.js} +2 -2
  294. package/www/build/p-e185545c.entry.js +2 -0
  295. package/www/build/p-e256027a.entry.js +2 -0
  296. package/www/build/p-e256027a.entry.js.map +1 -0
  297. package/www/build/{p-e7524beb.entry.js → p-e5b1c34a.entry.js} +2 -2
  298. package/www/build/{p-e7524beb.entry.js.map → p-e5b1c34a.entry.js.map} +1 -1
  299. package/www/build/{p-010b6146.js → p-e691c0b8.js} +2 -2
  300. package/{dist/web-components-library/p-5bac684a.entry.js → www/build/p-e78353d6.entry.js} +2 -2
  301. package/{dist/web-components-library/p-898fcd66.entry.js → www/build/p-ed091723.entry.js} +2 -2
  302. package/www/build/{p-011fa0c8.entry.js → p-f06bd257.entry.js} +2 -2
  303. package/www/build/{p-0d60cc5e.entry.js → p-f075ec62.entry.js} +2 -2
  304. package/{dist/web-components-library/p-fc2b2a96.entry.js → www/build/p-f8915e2e.entry.js} +2 -2
  305. package/www/build/web-components-library.css +21 -0
  306. package/www/build/web-components-library.esm.js +1 -1
  307. package/www/build/web-components-library.esm.js.map +1 -1
  308. package/www/index.html +1 -1
  309. package/www/pages/book-cards.html +120 -0
  310. package/dist/cjs/index-a465bca8.js.map +0 -1
  311. package/dist/esm/index-c9fd4a10.js.map +0 -1
  312. package/dist/web-components-library/p-2b309f57.js +0 -2
  313. package/dist/web-components-library/p-2b309f57.js.map +0 -1
  314. package/dist/web-components-library/p-2c047715.entry.js +0 -2
  315. package/dist/web-components-library/p-2c047715.entry.js.map +0 -1
  316. package/dist/web-components-library/p-3243015c.entry.js +0 -2
  317. package/dist/web-components-library/p-3dec754a.entry.js +0 -2
  318. package/dist/web-components-library/p-3dec754a.entry.js.map +0 -1
  319. package/dist/web-components-library/p-4b29336e.entry.js +0 -2
  320. package/dist/web-components-library/p-96c9454e.entry.js +0 -2
  321. package/dist/web-components-library/p-96c9454e.entry.js.map +0 -1
  322. package/dist/web-components-library/p-a4ddeb5f.entry.js +0 -2
  323. package/dist/web-components-library/p-b539c9be.entry.js +0 -2
  324. package/www/build/p-2b309f57.js +0 -2
  325. package/www/build/p-2b309f57.js.map +0 -1
  326. package/www/build/p-2c047715.entry.js +0 -2
  327. package/www/build/p-2c047715.entry.js.map +0 -1
  328. package/www/build/p-3243015c.entry.js +0 -2
  329. package/www/build/p-3dec754a.entry.js +0 -2
  330. package/www/build/p-3dec754a.entry.js.map +0 -1
  331. package/www/build/p-4b29336e.entry.js +0 -2
  332. package/www/build/p-96c9454e.entry.js +0 -2
  333. package/www/build/p-96c9454e.entry.js.map +0 -1
  334. package/www/build/p-a4ddeb5f.entry.js +0 -2
  335. package/www/build/p-b539c9be.entry.js +0 -2
  336. package/www/build/p-dfff95ce.js +0 -2
  337. /package/dist/web-components-library/{p-b22d3c7d.js.map → p-05f6053f.js.map} +0 -0
  338. /package/dist/web-components-library/{p-475a2ba2.entry.js.map → p-0df6b405.entry.js.map} +0 -0
  339. /package/dist/web-components-library/{p-8e544914.entry.js.map → p-11216ee8.entry.js.map} +0 -0
  340. /package/dist/web-components-library/{p-6f5f2d56.entry.js.map → p-115fab3e.entry.js.map} +0 -0
  341. /package/dist/web-components-library/{p-bbdb67db.entry.js.map → p-11629dd3.entry.js.map} +0 -0
  342. /package/dist/web-components-library/{p-c3c99202.js.map → p-123739cb.js.map} +0 -0
  343. /package/dist/web-components-library/{p-7b375bca.js.map → p-14e61df6.js.map} +0 -0
  344. /package/dist/web-components-library/{p-29a297ed.entry.js.map → p-1630e240.entry.js.map} +0 -0
  345. /package/dist/web-components-library/{p-5b6dd467.entry.js.map → p-18d63f0c.entry.js.map} +0 -0
  346. /package/dist/web-components-library/{p-f49171aa.entry.js.map → p-1e3ff105.entry.js.map} +0 -0
  347. /package/dist/web-components-library/{p-cdc51108.entry.js.map → p-22e32e11.entry.js.map} +0 -0
  348. /package/dist/web-components-library/{p-4b29336e.entry.js.map → p-2798c0b2.entry.js.map} +0 -0
  349. /package/dist/web-components-library/{p-31c5b39d.entry.js.map → p-2a0d8ebe.entry.js.map} +0 -0
  350. /package/dist/web-components-library/{p-0a149188.entry.js.map → p-2c450113.entry.js.map} +0 -0
  351. /package/dist/web-components-library/{p-7091a1fc.entry.js.map → p-395b261e.entry.js.map} +0 -0
  352. /package/dist/web-components-library/{p-7ef2c4ce.entry.js.map → p-4374d3f3.entry.js.map} +0 -0
  353. /package/dist/web-components-library/{p-8e6760d9.entry.js.map → p-50bf57b4.entry.js.map} +0 -0
  354. /package/dist/web-components-library/{p-cc775eee.entry.js.map → p-52be7378.entry.js.map} +0 -0
  355. /package/dist/web-components-library/{p-c29bd399.entry.js.map → p-5387e6f3.entry.js.map} +0 -0
  356. /package/dist/web-components-library/{p-f9fb6005.entry.js.map → p-72dae90b.entry.js.map} +0 -0
  357. /package/dist/web-components-library/{p-d29f9574.entry.js.map → p-73d686e0.entry.js.map} +0 -0
  358. /package/dist/web-components-library/{p-96be6eae.entry.js.map → p-75808b47.entry.js.map} +0 -0
  359. /package/dist/web-components-library/{p-6279b3fc.entry.js.map → p-758333dc.entry.js.map} +0 -0
  360. /package/dist/web-components-library/{p-7cfe50d0.entry.js.map → p-7af33b00.entry.js.map} +0 -0
  361. /package/dist/web-components-library/{p-71e2a48b.entry.js.map → p-7f370d17.entry.js.map} +0 -0
  362. /package/dist/web-components-library/{p-c7f8b628.entry.js.map → p-8c952964.entry.js.map} +0 -0
  363. /package/dist/web-components-library/{p-7f0cbe57.entry.js.map → p-9218da42.entry.js.map} +0 -0
  364. /package/dist/web-components-library/{p-8adf58c8.entry.js.map → p-9c4b7a51.entry.js.map} +0 -0
  365. /package/dist/web-components-library/{p-6337614a.entry.js.map → p-aa0b3e7a.entry.js.map} +0 -0
  366. /package/dist/web-components-library/{p-9ec778dc.entry.js.map → p-aa42f01d.entry.js.map} +0 -0
  367. /package/dist/web-components-library/{p-a4ddeb5f.entry.js.map → p-ad825740.entry.js.map} +0 -0
  368. /package/dist/web-components-library/{p-15aac7aa.js.map → p-bba6129f.js.map} +0 -0
  369. /package/dist/web-components-library/{p-4c287a21.entry.js.map → p-bd571858.entry.js.map} +0 -0
  370. /package/dist/web-components-library/{p-8ca50c86.entry.js.map → p-c29a520b.entry.js.map} +0 -0
  371. /package/dist/web-components-library/{p-f444b5bd.entry.js.map → p-cf7b7e73.entry.js.map} +0 -0
  372. /package/dist/web-components-library/{p-b7cf2442.entry.js.map → p-d1cca5ea.entry.js.map} +0 -0
  373. /package/dist/web-components-library/{p-3243015c.entry.js.map → p-d65aba93.entry.js.map} +0 -0
  374. /package/dist/web-components-library/{p-20e4a601.entry.js.map → p-d6a2b1c6.entry.js.map} +0 -0
  375. /package/dist/web-components-library/{p-b539c9be.entry.js.map → p-e185545c.entry.js.map} +0 -0
  376. /package/dist/web-components-library/{p-010b6146.js.map → p-e691c0b8.js.map} +0 -0
  377. /package/dist/web-components-library/{p-5bac684a.entry.js.map → p-e78353d6.entry.js.map} +0 -0
  378. /package/dist/web-components-library/{p-898fcd66.entry.js.map → p-ed091723.entry.js.map} +0 -0
  379. /package/dist/web-components-library/{p-011fa0c8.entry.js.map → p-f06bd257.entry.js.map} +0 -0
  380. /package/dist/web-components-library/{p-0d60cc5e.entry.js.map → p-f075ec62.entry.js.map} +0 -0
  381. /package/dist/web-components-library/{p-fc2b2a96.entry.js.map → p-f8915e2e.entry.js.map} +0 -0
  382. /package/www/build/{p-b22d3c7d.js.map → p-05f6053f.js.map} +0 -0
  383. /package/www/build/{p-475a2ba2.entry.js.map → p-0df6b405.entry.js.map} +0 -0
  384. /package/www/build/{p-8e544914.entry.js.map → p-11216ee8.entry.js.map} +0 -0
  385. /package/www/build/{p-6f5f2d56.entry.js.map → p-115fab3e.entry.js.map} +0 -0
  386. /package/www/build/{p-bbdb67db.entry.js.map → p-11629dd3.entry.js.map} +0 -0
  387. /package/www/build/{p-c3c99202.js.map → p-123739cb.js.map} +0 -0
  388. /package/www/build/{p-7b375bca.js.map → p-14e61df6.js.map} +0 -0
  389. /package/www/build/{p-29a297ed.entry.js.map → p-1630e240.entry.js.map} +0 -0
  390. /package/www/build/{p-5b6dd467.entry.js.map → p-18d63f0c.entry.js.map} +0 -0
  391. /package/www/build/{p-f49171aa.entry.js.map → p-1e3ff105.entry.js.map} +0 -0
  392. /package/www/build/{p-cdc51108.entry.js.map → p-22e32e11.entry.js.map} +0 -0
  393. /package/www/build/{p-4b29336e.entry.js.map → p-2798c0b2.entry.js.map} +0 -0
  394. /package/www/build/{p-31c5b39d.entry.js.map → p-2a0d8ebe.entry.js.map} +0 -0
  395. /package/www/build/{p-0a149188.entry.js.map → p-2c450113.entry.js.map} +0 -0
  396. /package/www/build/{p-7091a1fc.entry.js.map → p-395b261e.entry.js.map} +0 -0
  397. /package/www/build/{p-7ef2c4ce.entry.js.map → p-4374d3f3.entry.js.map} +0 -0
  398. /package/www/build/{p-8e6760d9.entry.js.map → p-50bf57b4.entry.js.map} +0 -0
  399. /package/www/build/{p-cc775eee.entry.js.map → p-52be7378.entry.js.map} +0 -0
  400. /package/www/build/{p-c29bd399.entry.js.map → p-5387e6f3.entry.js.map} +0 -0
  401. /package/www/build/{p-f9fb6005.entry.js.map → p-72dae90b.entry.js.map} +0 -0
  402. /package/www/build/{p-d29f9574.entry.js.map → p-73d686e0.entry.js.map} +0 -0
  403. /package/www/build/{p-96be6eae.entry.js.map → p-75808b47.entry.js.map} +0 -0
  404. /package/www/build/{p-6279b3fc.entry.js.map → p-758333dc.entry.js.map} +0 -0
  405. /package/www/build/{p-7cfe50d0.entry.js.map → p-7af33b00.entry.js.map} +0 -0
  406. /package/www/build/{p-71e2a48b.entry.js.map → p-7f370d17.entry.js.map} +0 -0
  407. /package/www/build/{p-c7f8b628.entry.js.map → p-8c952964.entry.js.map} +0 -0
  408. /package/www/build/{p-7f0cbe57.entry.js.map → p-9218da42.entry.js.map} +0 -0
  409. /package/www/build/{p-8adf58c8.entry.js.map → p-9c4b7a51.entry.js.map} +0 -0
  410. /package/www/build/{p-6337614a.entry.js.map → p-aa0b3e7a.entry.js.map} +0 -0
  411. /package/www/build/{p-9ec778dc.entry.js.map → p-aa42f01d.entry.js.map} +0 -0
  412. /package/www/build/{p-a4ddeb5f.entry.js.map → p-ad825740.entry.js.map} +0 -0
  413. /package/www/build/{p-15aac7aa.js.map → p-bba6129f.js.map} +0 -0
  414. /package/www/build/{p-4c287a21.entry.js.map → p-bd571858.entry.js.map} +0 -0
  415. /package/www/build/{p-8ca50c86.entry.js.map → p-c29a520b.entry.js.map} +0 -0
  416. /package/www/build/{p-f444b5bd.entry.js.map → p-cf7b7e73.entry.js.map} +0 -0
  417. /package/www/build/{p-b7cf2442.entry.js.map → p-d1cca5ea.entry.js.map} +0 -0
  418. /package/www/build/{p-3243015c.entry.js.map → p-d65aba93.entry.js.map} +0 -0
  419. /package/www/build/{p-20e4a601.entry.js.map → p-d6a2b1c6.entry.js.map} +0 -0
  420. /package/www/build/{p-b539c9be.entry.js.map → p-e185545c.entry.js.map} +0 -0
  421. /package/www/build/{p-010b6146.js.map → p-e691c0b8.js.map} +0 -0
  422. /package/www/build/{p-5bac684a.entry.js.map → p-e78353d6.entry.js.map} +0 -0
  423. /package/www/build/{p-898fcd66.entry.js.map → p-ed091723.entry.js.map} +0 -0
  424. /package/www/build/{p-011fa0c8.entry.js.map → p-f06bd257.entry.js.map} +0 -0
  425. /package/www/build/{p-0d60cc5e.entry.js.map → p-f075ec62.entry.js.map} +0 -0
  426. /package/www/build/{p-fc2b2a96.entry.js.map → p-f8915e2e.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["stylesCss","ZDragdropAreaStyle0","ZDragdropArea","onDrop","e","preventDefault","this","dragging","dataTransfer","files","length","fileDropped","emit","render","h","Host","key","class","dragover","onDragOver","onDragLeave","bind","dragAndDropLabel","supportCustomEvent","window","CustomEvent","event","x","ev","document","createEvent","initCustomEvent","bubbles","cancelable","detail","prototype","Event","safeDispatchEvent","target","check","type","toLowerCase","dispatchEvent","createsStackingContext","el","body","s","getComputedStyle","invalid","k","ok","undefined","opacity","position","webkitOverflowScrolling","parentElement","findNearestDialog","localName","parentNode","host","safeBlur","shadowRoot","activeElement","blur","inNodeList","nodeList","node","i","isFormMethodDialog","hasAttribute","getAttribute","findFocusableElementWithin","hostElement","opts","query","map","push","querySelector","join","Element","elems","querySelectorAll","tagName","isConnected","element","contains","findFormSubmitter","submitter","form","HTMLFormElement","dialogPolyfill","formSubmitter","root","getRootNode","maybeHandleSubmit","defaultPrevented","value","imagemapUseValue","dialog","formmethod","close","dialogPolyfillInfo","dialog_","replacedStyleTop_","openAsModal_","setAttribute","show","showModal","addEventListener","returnValue","mo","MutationObserver","maybeHideModal","observe","attributes","attributeFilter","removed","cb","downgradeModal","timeout","delayModel","cand","substr","clearTimeout","setTimeout","forEach","name","Object","defineProperty","set","setOpen","get","backdrop_","createElement","className","backdropMouseEvent_","style","zIndex","top","removeChild","dm","removeDialog","removeAttribute","fake","insertBefore","firstChild","tabIndex","focus","redirectedEvent","initMouseEvent","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","stopPropagation","focus_","updateZIndex","dialogZ","backdropZ","Error","open","pushDialog","console","warn","needsCentering","reposition","nextSibling","opt_returnValue","closeEvent","scrollTop","documentElement","topValue","innerHeight","offsetHeight","Math","max","isInlinePositionSetByStylesheet","styleSheets","styleSheet","cssRules","j","rule","selectedNodes","selectorText","cssTop","getPropertyValue","cssBottom","computedStyle","bottom","forceRegisterDialog","HTMLDialogElement","registerDialog","DialogManager","pendingDialogStack","checkDOM","checkDOM_","overlay","forwardTab_","handleKey_","handleFocus_","zIndexLow_","zIndexHigh_","mo_","records","rec","c","removedNodes","concat","blockDocument","childList","subtree","unblockDocument","removeEventListener","disconnect","updateStacking","dpi","last","p","appendChild","containedByTopDialog_","candidate","composedPath","compareDocumentPosition","Node","DOCUMENT_POSITION_PRECEDING","keyCode","cancelEvent","clone","slice","indexOf","allowed","unshift","index","splice","testForm","method","methodDescriptor","getOwnPropertyDescriptor","realGet","call","realSet","v","path","shift","valid","offsetX","offsetY","nativeFormSubmit","submit","replacementFormSubmit","ZModalStyle0","FOCUSABLE_ELEMENTS_SELECTOR","ZModal","emitModalClose","closable","modalClose","modalid","emitModalHeaderActive","modalHeaderActive","emitBackgroundClick","modalBackgroundClick","componentDidLoad","_a","focusableElements","Array","from","filter","display","handleKeyDown","code","KeyboardCode","ESC","TAB","shadowActiveElement","ownerDocument","firstFocusableElement","lastFocusableElement","closeButtonSlot","closeButtonLabel","onClick","handleEscape","scrollInside","role","alertdialog","ref","onClose","onCancel","id","modaltitle","modalsubtitle"],"sources":["src/components/file-upload/z-dragdrop-area/styles.css?tag=z-dragdrop-area&encapsulation=shadow","src/components/file-upload/z-dragdrop-area/index.tsx","node_modules/dialog-polyfill/dist/dialog-polyfill.esm.js","src/components/z-modal/styles.css?tag=z-modal&encapsulation=shadow","src/components/z-modal/index.tsx"],"sourcesContent":[":host {\n position: relative;\n display: flex;\n width: 100%;\n height: 232px;\n flex-direction: column;\n align-items: center;\n padding: calc(var(--space-unit) * 3);\n background-color: var(--color-surface02);\n background-image: repeating-linear-gradient(\n 0deg,\n var(--color-surface03),\n var(--color-surface03) 12px,\n transparent 12px,\n transparent 20px\n ),\n repeating-linear-gradient(\n 90deg,\n var(--color-surface03),\n var(--color-surface03) 12px,\n transparent 12px,\n transparent 20px\n ),\n repeating-linear-gradient(\n 180deg,\n var(--color-surface03),\n var(--color-surface03) 12px,\n transparent 12px,\n transparent 20px\n ),\n repeating-linear-gradient(\n 270deg,\n var(--color-surface03),\n var(--color-surface03) 12px,\n transparent 12px,\n transparent 20px\n );\n background-position:\n 0 0,\n 0 0,\n 100% 0,\n 0 100%;\n background-repeat: no-repeat;\n background-size:\n 2px 100%,\n 100% 2px,\n 2px 100%,\n 100% 2px;\n border-radius: var(--border-radius-small);\n color: var(--color-default-text);\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\n:host,\n* {\n box-sizing: border-box;\n}\n\n/* https://stackoverflow.com/questions/7110353/html5-dragleave-fired-when-hovering-a-child-element */\n:host(.dragover) * {\n pointer-events: none;\n}\n\n.dragover-container {\n position: absolute;\n z-index: 1;\n top: 0;\n left: 0;\n display: none;\n width: 100%;\n height: 100%;\n background-color: var(--color-primary03);\n box-shadow: var(--shadow-focus-primary);\n}\n\n:host(.dragover) .dragover-container {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n","import {Component, Event, EventEmitter, Host, Prop, State, h} from \"@stencil/core\";\n\n@Component({\n tag: \"z-dragdrop-area\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZDragdropArea {\n /** drag & drop button label */\n @Prop()\n dragAndDropLabel: string;\n\n /** State that indicates if the user is dragging a file over the drag & drop area */\n @State()\n dragging = false;\n\n /** Emitted when user drop one or more files */\n @Event()\n fileDropped: EventEmitter;\n\n private onDrop(e: DragEvent): void {\n e.preventDefault();\n this.dragging = false;\n if (e.dataTransfer.files.length) {\n this.fileDropped.emit(e.dataTransfer.files);\n }\n }\n\n render(): HTMLZDragdropAreaElement {\n return (\n <Host\n class={{dragover: this.dragging}}\n onDragOver={(e) => {\n e.preventDefault();\n this.dragging = true;\n }}\n onDragLeave={() => {\n this.dragging = false;\n }}\n onDrop={this.onDrop.bind(this)}\n >\n <div class=\"dragover-container\">\n <z-button>{this.dragAndDropLabel}</z-button>\n </div>\n <slot />\n </Host>\n );\n }\n}\n","// nb. This is for IE10 and lower _only_.\nvar supportCustomEvent = window.CustomEvent;\nif (!supportCustomEvent || typeof supportCustomEvent === 'object') {\n supportCustomEvent = function CustomEvent(event, x) {\n x = x || {};\n var ev = document.createEvent('CustomEvent');\n ev.initCustomEvent(event, !!x.bubbles, !!x.cancelable, x.detail || null);\n return ev;\n };\n supportCustomEvent.prototype = window.Event.prototype;\n}\n\n/**\n * Dispatches the passed event to both an \"on<type>\" handler as well as via the\n * normal dispatch operation. Does not bubble.\n *\n * @param {!EventTarget} target\n * @param {!Event} event\n * @return {boolean}\n */\nfunction safeDispatchEvent(target, event) {\n var check = 'on' + event.type.toLowerCase();\n if (typeof target[check] === 'function') {\n target[check](event);\n }\n return target.dispatchEvent(event);\n}\n\n/**\n * @param {Element} el to check for stacking context\n * @return {boolean} whether this el or its parents creates a stacking context\n */\nfunction createsStackingContext(el) {\n while (el && el !== document.body) {\n var s = window.getComputedStyle(el);\n var invalid = function(k, ok) {\n return !(s[k] === undefined || s[k] === ok);\n };\n\n if (s.opacity < 1 ||\n invalid('zIndex', 'auto') ||\n invalid('transform', 'none') ||\n invalid('mixBlendMode', 'normal') ||\n invalid('filter', 'none') ||\n invalid('perspective', 'none') ||\n s['isolation'] === 'isolate' ||\n s.position === 'fixed' ||\n s.webkitOverflowScrolling === 'touch') {\n return true;\n }\n el = el.parentElement;\n }\n return false;\n}\n\n/**\n * Finds the nearest <dialog> from the passed element.\n *\n * @param {Element} el to search from\n * @return {HTMLDialogElement} dialog found\n */\nfunction findNearestDialog(el) {\n while (el) {\n if (el.localName === 'dialog') {\n return /** @type {HTMLDialogElement} */ (el);\n }\n if (el.parentElement) {\n el = el.parentElement;\n } else if (el.parentNode) {\n el = el.parentNode.host;\n } else {\n el = null;\n }\n }\n return null;\n}\n\n/**\n * Blur the specified element, as long as it's not the HTML body element.\n * This works around an IE9/10 bug - blurring the body causes Windows to\n * blur the whole application.\n *\n * @param {Element} el to blur\n */\nfunction safeBlur(el) {\n // Find the actual focused element when the active element is inside a shadow root\n while (el && el.shadowRoot && el.shadowRoot.activeElement) {\n el = el.shadowRoot.activeElement;\n }\n\n if (el && el.blur && el !== document.body) {\n el.blur();\n }\n}\n\n/**\n * @param {!NodeList} nodeList to search\n * @param {Node} node to find\n * @return {boolean} whether node is inside nodeList\n */\nfunction inNodeList(nodeList, node) {\n for (var i = 0; i < nodeList.length; ++i) {\n if (nodeList[i] === node) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * @param {HTMLFormElement} el to check\n * @return {boolean} whether this form has method=\"dialog\"\n */\nfunction isFormMethodDialog(el) {\n if (!el || !el.hasAttribute('method')) {\n return false;\n }\n return el.getAttribute('method').toLowerCase() === 'dialog';\n}\n\n/**\n * @param {!DocumentFragment|!Element} hostElement\n * @return {?Element}\n */\nfunction findFocusableElementWithin(hostElement) {\n // Note that this is 'any focusable area'. This list is probably not exhaustive, but the\n // alternative involves stepping through and trying to focus everything.\n var opts = ['button', 'input', 'keygen', 'select', 'textarea'];\n var query = opts.map(function(el) {\n return el + ':not([disabled])';\n });\n // TODO(samthor): tabindex values that are not numeric are not focusable.\n query.push('[tabindex]:not([disabled]):not([tabindex=\"\"])'); // tabindex != \"\", not disabled\n var target = hostElement.querySelector(query.join(', '));\n\n if (!target && 'attachShadow' in Element.prototype) {\n // If we haven't found a focusable target, see if the host element contains an element\n // which has a shadowRoot.\n // Recursively search for the first focusable item in shadow roots.\n var elems = hostElement.querySelectorAll('*');\n for (var i = 0; i < elems.length; i++) {\n if (elems[i].tagName && elems[i].shadowRoot) {\n target = findFocusableElementWithin(elems[i].shadowRoot);\n if (target) {\n break;\n }\n }\n }\n }\n return target;\n}\n\n/**\n * Determines if an element is attached to the DOM.\n * @param {Element} element to check\n * @return {boolean} whether the element is in DOM\n */\nfunction isConnected(element) {\n return element.isConnected || document.body.contains(element);\n}\n\n/**\n * @param {!Event} event\n * @return {?Element}\n */\nfunction findFormSubmitter(event) {\n if (event.submitter) {\n return event.submitter;\n }\n\n var form = event.target;\n if (!(form instanceof HTMLFormElement)) {\n return null;\n }\n\n var submitter = dialogPolyfill.formSubmitter;\n if (!submitter) {\n var target = event.target;\n var root = ('getRootNode' in target && target.getRootNode() || document);\n submitter = root.activeElement;\n }\n\n if (!submitter || submitter.form !== form) {\n return null;\n }\n return submitter;\n}\n\n/**\n * @param {!Event} event\n */\nfunction maybeHandleSubmit(event) {\n if (event.defaultPrevented) {\n return;\n }\n var form = /** @type {!HTMLFormElement} */ (event.target);\n\n // We'd have a value if we clicked on an imagemap.\n var value = dialogPolyfill.imagemapUseValue;\n var submitter = findFormSubmitter(event);\n if (value === null && submitter) {\n value = submitter.value;\n }\n\n // There should always be a dialog as this handler is added specifically on them, but check just\n // in case.\n var dialog = findNearestDialog(form);\n if (!dialog) {\n return;\n }\n\n // Prefer formmethod on the button.\n var formmethod = submitter && submitter.getAttribute('formmethod') || form.getAttribute('method');\n if (formmethod !== 'dialog') {\n return;\n }\n event.preventDefault();\n\n if (value != null) {\n // nb. we explicitly check against null/undefined\n dialog.close(value);\n } else {\n dialog.close();\n }\n}\n\n/**\n * @param {!HTMLDialogElement} dialog to upgrade\n * @constructor\n */\nfunction dialogPolyfillInfo(dialog) {\n this.dialog_ = dialog;\n this.replacedStyleTop_ = false;\n this.openAsModal_ = false;\n\n // Set a11y role. Browsers that support dialog implicitly know this already.\n if (!dialog.hasAttribute('role')) {\n dialog.setAttribute('role', 'dialog');\n }\n\n dialog.show = this.show.bind(this);\n dialog.showModal = this.showModal.bind(this);\n dialog.close = this.close.bind(this);\n\n dialog.addEventListener('submit', maybeHandleSubmit, false);\n\n if (!('returnValue' in dialog)) {\n dialog.returnValue = '';\n }\n\n if ('MutationObserver' in window) {\n var mo = new MutationObserver(this.maybeHideModal.bind(this));\n mo.observe(dialog, {attributes: true, attributeFilter: ['open']});\n } else {\n // IE10 and below support. Note that DOMNodeRemoved etc fire _before_ removal. They also\n // seem to fire even if the element was removed as part of a parent removal. Use the removed\n // events to force downgrade (useful if removed/immediately added).\n var removed = false;\n var cb = function() {\n removed ? this.downgradeModal() : this.maybeHideModal();\n removed = false;\n }.bind(this);\n var timeout;\n var delayModel = function(ev) {\n if (ev.target !== dialog) { return; } // not for a child element\n var cand = 'DOMNodeRemoved';\n removed |= (ev.type.substr(0, cand.length) === cand);\n window.clearTimeout(timeout);\n timeout = window.setTimeout(cb, 0);\n };\n ['DOMAttrModified', 'DOMNodeRemoved', 'DOMNodeRemovedFromDocument'].forEach(function(name) {\n dialog.addEventListener(name, delayModel);\n });\n }\n // Note that the DOM is observed inside DialogManager while any dialog\n // is being displayed as a modal, to catch modal removal from the DOM.\n\n Object.defineProperty(dialog, 'open', {\n set: this.setOpen.bind(this),\n get: dialog.hasAttribute.bind(dialog, 'open')\n });\n\n this.backdrop_ = document.createElement('div');\n this.backdrop_.className = 'backdrop';\n this.backdrop_.addEventListener('mouseup' , this.backdropMouseEvent_.bind(this));\n this.backdrop_.addEventListener('mousedown', this.backdropMouseEvent_.bind(this));\n this.backdrop_.addEventListener('click' , this.backdropMouseEvent_.bind(this));\n}\n\ndialogPolyfillInfo.prototype = /** @type {HTMLDialogElement.prototype} */ ({\n\n get dialog() {\n return this.dialog_;\n },\n\n /**\n * Maybe remove this dialog from the modal top layer. This is called when\n * a modal dialog may no longer be tenable, e.g., when the dialog is no\n * longer open or is no longer part of the DOM.\n */\n maybeHideModal: function() {\n if (this.dialog_.hasAttribute('open') && isConnected(this.dialog_)) { return; }\n this.downgradeModal();\n },\n\n /**\n * Remove this dialog from the modal top layer, leaving it as a non-modal.\n */\n downgradeModal: function() {\n if (!this.openAsModal_) { return; }\n this.openAsModal_ = false;\n this.dialog_.style.zIndex = '';\n\n // This won't match the native <dialog> exactly because if the user set top on a centered\n // polyfill dialog, that top gets thrown away when the dialog is closed. Not sure it's\n // possible to polyfill this perfectly.\n if (this.replacedStyleTop_) {\n this.dialog_.style.top = '';\n this.replacedStyleTop_ = false;\n }\n\n // Clear the backdrop and remove from the manager.\n this.backdrop_.parentNode && this.backdrop_.parentNode.removeChild(this.backdrop_);\n dialogPolyfill.dm.removeDialog(this);\n },\n\n /**\n * @param {boolean} value whether to open or close this dialog\n */\n setOpen: function(value) {\n if (value) {\n this.dialog_.hasAttribute('open') || this.dialog_.setAttribute('open', '');\n } else {\n this.dialog_.removeAttribute('open');\n this.maybeHideModal(); // nb. redundant with MutationObserver\n }\n },\n\n /**\n * Handles mouse events ('mouseup', 'mousedown', 'click') on the fake .backdrop element, redirecting them as if\n * they were on the dialog itself.\n *\n * @param {!Event} e to redirect\n */\n backdropMouseEvent_: function(e) {\n if (!this.dialog_.hasAttribute('tabindex')) {\n // Clicking on the backdrop should move the implicit cursor, even if dialog cannot be\n // focused. Create a fake thing to focus on. If the backdrop was _before_ the dialog, this\n // would not be needed - clicks would move the implicit cursor there.\n var fake = document.createElement('div');\n this.dialog_.insertBefore(fake, this.dialog_.firstChild);\n fake.tabIndex = -1;\n fake.focus();\n this.dialog_.removeChild(fake);\n } else {\n this.dialog_.focus();\n }\n\n var redirectedEvent = document.createEvent('MouseEvents');\n redirectedEvent.initMouseEvent(e.type, e.bubbles, e.cancelable, window,\n e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey,\n e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);\n this.dialog_.dispatchEvent(redirectedEvent);\n e.stopPropagation();\n },\n\n /**\n * Focuses on the first focusable element within the dialog. This will always blur the current\n * focus, even if nothing within the dialog is found.\n */\n focus_: function() {\n // Find element with `autofocus` attribute, or fall back to the first form/tabindex control.\n var target = this.dialog_.querySelector('[autofocus]:not([disabled])');\n if (!target && this.dialog_.tabIndex >= 0) {\n target = this.dialog_;\n }\n if (!target) {\n target = findFocusableElementWithin(this.dialog_);\n }\n safeBlur(document.activeElement);\n target && target.focus();\n },\n\n /**\n * Sets the zIndex for the backdrop and dialog.\n *\n * @param {number} dialogZ\n * @param {number} backdropZ\n */\n updateZIndex: function(dialogZ, backdropZ) {\n if (dialogZ < backdropZ) {\n throw new Error('dialogZ should never be < backdropZ');\n }\n this.dialog_.style.zIndex = dialogZ;\n this.backdrop_.style.zIndex = backdropZ;\n },\n\n /**\n * Shows the dialog. If the dialog is already open, this does nothing.\n */\n show: function() {\n if (!this.dialog_.open) {\n this.setOpen(true);\n this.focus_();\n }\n },\n\n /**\n * Show this dialog modally.\n */\n showModal: function() {\n if (this.dialog_.hasAttribute('open')) {\n throw new Error('Failed to execute \\'showModal\\' on dialog: The element is already open, and therefore cannot be opened modally.');\n }\n if (!isConnected(this.dialog_)) {\n throw new Error('Failed to execute \\'showModal\\' on dialog: The element is not in a Document.');\n }\n if (!dialogPolyfill.dm.pushDialog(this)) {\n throw new Error('Failed to execute \\'showModal\\' on dialog: There are too many open modal dialogs.');\n }\n\n if (createsStackingContext(this.dialog_.parentElement)) {\n console.warn('A dialog is being shown inside a stacking context. ' +\n 'This may cause it to be unusable. For more information, see this link: ' +\n 'https://github.com/GoogleChrome/dialog-polyfill/#stacking-context');\n }\n\n this.setOpen(true);\n this.openAsModal_ = true;\n\n // Optionally center vertically, relative to the current viewport.\n if (dialogPolyfill.needsCentering(this.dialog_)) {\n dialogPolyfill.reposition(this.dialog_);\n this.replacedStyleTop_ = true;\n } else {\n this.replacedStyleTop_ = false;\n }\n\n // Insert backdrop.\n this.dialog_.parentNode.insertBefore(this.backdrop_, this.dialog_.nextSibling);\n\n // Focus on whatever inside the dialog.\n this.focus_();\n },\n\n /**\n * Closes this HTMLDialogElement. This is optional vs clearing the open\n * attribute, however this fires a 'close' event.\n *\n * @param {string=} opt_returnValue to use as the returnValue\n */\n close: function(opt_returnValue) {\n if (!this.dialog_.hasAttribute('open')) {\n throw new Error('Failed to execute \\'close\\' on dialog: The element does not have an \\'open\\' attribute, and therefore cannot be closed.');\n }\n this.setOpen(false);\n\n // Leave returnValue untouched in case it was set directly on the element\n if (opt_returnValue !== undefined) {\n this.dialog_.returnValue = opt_returnValue;\n }\n\n // Triggering \"close\" event for any attached listeners on the <dialog>.\n var closeEvent = new supportCustomEvent('close', {\n bubbles: false,\n cancelable: false\n });\n safeDispatchEvent(this.dialog_, closeEvent);\n }\n\n});\n\nvar dialogPolyfill = {};\n\ndialogPolyfill.reposition = function(element) {\n var scrollTop = document.body.scrollTop || document.documentElement.scrollTop;\n var topValue = scrollTop + (window.innerHeight - element.offsetHeight) / 2;\n element.style.top = Math.max(scrollTop, topValue) + 'px';\n};\n\ndialogPolyfill.isInlinePositionSetByStylesheet = function(element) {\n for (var i = 0; i < document.styleSheets.length; ++i) {\n var styleSheet = document.styleSheets[i];\n var cssRules = null;\n // Some browsers throw on cssRules.\n try {\n cssRules = styleSheet.cssRules;\n } catch (e) {}\n if (!cssRules) { continue; }\n for (var j = 0; j < cssRules.length; ++j) {\n var rule = cssRules[j];\n var selectedNodes = null;\n // Ignore errors on invalid selector texts.\n try {\n selectedNodes = document.querySelectorAll(rule.selectorText);\n } catch(e) {}\n if (!selectedNodes || !inNodeList(selectedNodes, element)) {\n continue;\n }\n var cssTop = rule.style.getPropertyValue('top');\n var cssBottom = rule.style.getPropertyValue('bottom');\n if ((cssTop && cssTop !== 'auto') || (cssBottom && cssBottom !== 'auto')) {\n return true;\n }\n }\n }\n return false;\n};\n\ndialogPolyfill.needsCentering = function(dialog) {\n var computedStyle = window.getComputedStyle(dialog);\n if (computedStyle.position !== 'absolute') {\n return false;\n }\n\n // We must determine whether the top/bottom specified value is non-auto. In\n // WebKit/Blink, checking computedStyle.top == 'auto' is sufficient, but\n // Firefox returns the used value. So we do this crazy thing instead: check\n // the inline style and then go through CSS rules.\n if ((dialog.style.top !== 'auto' && dialog.style.top !== '') ||\n (dialog.style.bottom !== 'auto' && dialog.style.bottom !== '')) {\n return false;\n }\n return !dialogPolyfill.isInlinePositionSetByStylesheet(dialog);\n};\n\n/**\n * @param {!Element} element to force upgrade\n */\ndialogPolyfill.forceRegisterDialog = function(element) {\n if (window.HTMLDialogElement || element.showModal) {\n console.warn('This browser already supports <dialog>, the polyfill ' +\n 'may not work correctly', element);\n }\n if (element.localName !== 'dialog') {\n throw new Error('Failed to register dialog: The element is not a dialog.');\n }\n new dialogPolyfillInfo(/** @type {!HTMLDialogElement} */ (element));\n};\n\n/**\n * @param {!Element} element to upgrade, if necessary\n */\ndialogPolyfill.registerDialog = function(element) {\n if (!element.showModal) {\n dialogPolyfill.forceRegisterDialog(element);\n }\n};\n\n/**\n * @constructor\n */\ndialogPolyfill.DialogManager = function() {\n /** @type {!Array<!dialogPolyfillInfo>} */\n this.pendingDialogStack = [];\n\n var checkDOM = this.checkDOM_.bind(this);\n\n // The overlay is used to simulate how a modal dialog blocks the document.\n // The blocking dialog is positioned on top of the overlay, and the rest of\n // the dialogs on the pending dialog stack are positioned below it. In the\n // actual implementation, the modal dialog stacking is controlled by the\n // top layer, where z-index has no effect.\n this.overlay = document.createElement('div');\n this.overlay.className = '_dialog_overlay';\n this.overlay.addEventListener('click', function(e) {\n this.forwardTab_ = undefined;\n e.stopPropagation();\n checkDOM([]); // sanity-check DOM\n }.bind(this));\n\n this.handleKey_ = this.handleKey_.bind(this);\n this.handleFocus_ = this.handleFocus_.bind(this);\n\n this.zIndexLow_ = 100000;\n this.zIndexHigh_ = 100000 + 150;\n\n this.forwardTab_ = undefined;\n\n if ('MutationObserver' in window) {\n this.mo_ = new MutationObserver(function(records) {\n var removed = [];\n records.forEach(function(rec) {\n for (var i = 0, c; c = rec.removedNodes[i]; ++i) {\n if (!(c instanceof Element)) {\n continue;\n } else if (c.localName === 'dialog') {\n removed.push(c);\n }\n removed = removed.concat(c.querySelectorAll('dialog'));\n }\n });\n removed.length && checkDOM(removed);\n });\n }\n};\n\n/**\n * Called on the first modal dialog being shown. Adds the overlay and related\n * handlers.\n */\ndialogPolyfill.DialogManager.prototype.blockDocument = function() {\n document.documentElement.addEventListener('focus', this.handleFocus_, true);\n document.addEventListener('keydown', this.handleKey_);\n this.mo_ && this.mo_.observe(document, {childList: true, subtree: true});\n};\n\n/**\n * Called on the first modal dialog being removed, i.e., when no more modal\n * dialogs are visible.\n */\ndialogPolyfill.DialogManager.prototype.unblockDocument = function() {\n document.documentElement.removeEventListener('focus', this.handleFocus_, true);\n document.removeEventListener('keydown', this.handleKey_);\n this.mo_ && this.mo_.disconnect();\n};\n\n/**\n * Updates the stacking of all known dialogs.\n */\ndialogPolyfill.DialogManager.prototype.updateStacking = function() {\n var zIndex = this.zIndexHigh_;\n\n for (var i = 0, dpi; dpi = this.pendingDialogStack[i]; ++i) {\n dpi.updateZIndex(--zIndex, --zIndex);\n if (i === 0) {\n this.overlay.style.zIndex = --zIndex;\n }\n }\n\n // Make the overlay a sibling of the dialog itself.\n var last = this.pendingDialogStack[0];\n if (last) {\n var p = last.dialog.parentNode || document.body;\n p.appendChild(this.overlay);\n } else if (this.overlay.parentNode) {\n this.overlay.parentNode.removeChild(this.overlay);\n }\n};\n\n/**\n * @param {Element} candidate to check if contained or is the top-most modal dialog\n * @return {boolean} whether candidate is contained in top dialog\n */\ndialogPolyfill.DialogManager.prototype.containedByTopDialog_ = function(candidate) {\n while (candidate = findNearestDialog(candidate)) {\n for (var i = 0, dpi; dpi = this.pendingDialogStack[i]; ++i) {\n if (dpi.dialog === candidate) {\n return i === 0; // only valid if top-most\n }\n }\n candidate = candidate.parentElement;\n }\n return false;\n};\n\ndialogPolyfill.DialogManager.prototype.handleFocus_ = function(event) {\n var target = event.composedPath ? event.composedPath()[0] : event.target;\n\n if (this.containedByTopDialog_(target)) { return; }\n\n if (document.activeElement === document.documentElement) { return; }\n\n event.preventDefault();\n event.stopPropagation();\n safeBlur(/** @type {Element} */ (target));\n\n if (this.forwardTab_ === undefined) { return; } // move focus only from a tab key\n\n var dpi = this.pendingDialogStack[0];\n var dialog = dpi.dialog;\n var position = dialog.compareDocumentPosition(target);\n if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n if (this.forwardTab_) {\n // forward\n dpi.focus_();\n } else if (target !== document.documentElement) {\n // backwards if we're not already focused on <html>\n document.documentElement.focus();\n }\n }\n\n return false;\n};\n\ndialogPolyfill.DialogManager.prototype.handleKey_ = function(event) {\n this.forwardTab_ = undefined;\n if (event.keyCode === 27) {\n event.preventDefault();\n event.stopPropagation();\n var cancelEvent = new supportCustomEvent('cancel', {\n bubbles: false,\n cancelable: true\n });\n var dpi = this.pendingDialogStack[0];\n if (dpi && safeDispatchEvent(dpi.dialog, cancelEvent)) {\n dpi.dialog.close();\n }\n } else if (event.keyCode === 9) {\n this.forwardTab_ = !event.shiftKey;\n }\n};\n\n/**\n * Finds and downgrades any known modal dialogs that are no longer displayed. Dialogs that are\n * removed and immediately readded don't stay modal, they become normal.\n *\n * @param {!Array<!HTMLDialogElement>} removed that have definitely been removed\n */\ndialogPolyfill.DialogManager.prototype.checkDOM_ = function(removed) {\n // This operates on a clone because it may cause it to change. Each change also calls\n // updateStacking, which only actually needs to happen once. But who removes many modal dialogs\n // at a time?!\n var clone = this.pendingDialogStack.slice();\n clone.forEach(function(dpi) {\n if (removed.indexOf(dpi.dialog) !== -1) {\n dpi.downgradeModal();\n } else {\n dpi.maybeHideModal();\n }\n });\n};\n\n/**\n * @param {!dialogPolyfillInfo} dpi\n * @return {boolean} whether the dialog was allowed\n */\ndialogPolyfill.DialogManager.prototype.pushDialog = function(dpi) {\n var allowed = (this.zIndexHigh_ - this.zIndexLow_) / 2 - 1;\n if (this.pendingDialogStack.length >= allowed) {\n return false;\n }\n if (this.pendingDialogStack.unshift(dpi) === 1) {\n this.blockDocument();\n }\n this.updateStacking();\n return true;\n};\n\n/**\n * @param {!dialogPolyfillInfo} dpi\n */\ndialogPolyfill.DialogManager.prototype.removeDialog = function(dpi) {\n var index = this.pendingDialogStack.indexOf(dpi);\n if (index === -1) { return; }\n\n this.pendingDialogStack.splice(index, 1);\n if (this.pendingDialogStack.length === 0) {\n this.unblockDocument();\n }\n this.updateStacking();\n};\n\ndialogPolyfill.dm = new dialogPolyfill.DialogManager();\ndialogPolyfill.formSubmitter = null;\ndialogPolyfill.imagemapUseValue = null;\n\n/**\n * Installs global handlers, such as click listers and native method overrides. These are needed\n * even if a no dialog is registered, as they deal with <form method=\"dialog\">.\n */\nif (window.HTMLDialogElement === undefined) {\n\n /**\n * If HTMLFormElement translates method=\"DIALOG\" into 'get', then replace the descriptor with\n * one that returns the correct value.\n */\n var testForm = document.createElement('form');\n testForm.setAttribute('method', 'dialog');\n if (testForm.method !== 'dialog') {\n var methodDescriptor = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, 'method');\n if (methodDescriptor) {\n // nb. Some older iOS and older PhantomJS fail to return the descriptor. Don't do anything\n // and don't bother to update the element.\n var realGet = methodDescriptor.get;\n methodDescriptor.get = function() {\n if (isFormMethodDialog(this)) {\n return 'dialog';\n }\n return realGet.call(this);\n };\n var realSet = methodDescriptor.set;\n /** @this {HTMLElement} */\n methodDescriptor.set = function(v) {\n if (typeof v === 'string' && v.toLowerCase() === 'dialog') {\n return this.setAttribute('method', v);\n }\n return realSet.call(this, v);\n };\n Object.defineProperty(HTMLFormElement.prototype, 'method', methodDescriptor);\n }\n }\n\n /**\n * Global 'click' handler, to capture the <input type=\"submit\"> or <button> element which has\n * submitted a <form method=\"dialog\">. Needed as Safari and others don't report this inside\n * document.activeElement.\n */\n document.addEventListener('click', function(ev) {\n dialogPolyfill.formSubmitter = null;\n dialogPolyfill.imagemapUseValue = null;\n if (ev.defaultPrevented) { return; } // e.g. a submit which prevents default submission\n\n var target = /** @type {Element} */ (ev.target);\n if ('composedPath' in ev) {\n var path = ev.composedPath();\n target = path.shift() || target;\n }\n if (!target || !isFormMethodDialog(target.form)) { return; }\n\n var valid = (target.type === 'submit' && ['button', 'input'].indexOf(target.localName) > -1);\n if (!valid) {\n if (!(target.localName === 'input' && target.type === 'image')) { return; }\n // this is a <input type=\"image\">, which can submit forms\n dialogPolyfill.imagemapUseValue = ev.offsetX + ',' + ev.offsetY;\n }\n\n var dialog = findNearestDialog(target);\n if (!dialog) { return; }\n\n dialogPolyfill.formSubmitter = target;\n\n }, false);\n\n /**\n * Global 'submit' handler. This handles submits of `method=\"dialog\"` which are invalid, i.e.,\n * outside a dialog. They get prevented.\n */\n document.addEventListener('submit', function(ev) {\n var form = ev.target;\n var dialog = findNearestDialog(form);\n if (dialog) {\n return; // ignore, handle there\n }\n\n var submitter = findFormSubmitter(ev);\n var formmethod = submitter && submitter.getAttribute('formmethod') || form.getAttribute('method');\n if (formmethod === 'dialog') {\n ev.preventDefault();\n }\n });\n\n /**\n * Replace the native HTMLFormElement.submit() method, as it won't fire the\n * submit event and give us a chance to respond.\n */\n var nativeFormSubmit = HTMLFormElement.prototype.submit;\n var replacementFormSubmit = function () {\n if (!isFormMethodDialog(this)) {\n return nativeFormSubmit.call(this);\n }\n var dialog = findNearestDialog(this);\n dialog && dialog.close();\n };\n HTMLFormElement.prototype.submit = replacementFormSubmit;\n}\n\nexport default dialogPolyfill;\n",":host {\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n\n --z-modal-content-padding: calc(var(--space-unit) * 2);\n}\n\n:host > dialog {\n padding: 0;\n border: none;\n margin: 0;\n background-color: transparent;\n}\n\n/* stylelint-disable selector-pseudo-class-no-unknown */\n:host > dialog:modal {\n width: 100%;\n max-width: 100%;\n max-height: 100%;\n}\n\n:host > dialog::backdrop {\n display: none;\n}\n\n/* polyfill style */\n:host > dialog + .backdrop {\n display: none;\n}\n\n:host > dialog:not([open]) {\n display: none;\n}\n\n:host > dialog[open] {\n display: block;\n}\n\n::slotted([slot=\"modalContent\"]) {\n padding: var(--z-modal-content-padding);\n}\n\n.modal-container {\n z-index: 1010;\n display: flex;\n overflow: -moz-scrollbars-none;\n width: 100%;\n height: 100vh;\n flex-direction: column;\n}\n\n.modal-container > .modal-content-scroll-outside {\n overflow: auto;\n background: var(--color-surface01);\n}\n\n.modal-container > header {\n padding: calc(var(--space-unit) * 1.75) calc(var(--space-unit) * 2) calc(var(--space-unit) * 1.75)\n calc(var(--space-unit) * 2);\n background: var(--color-background);\n}\n\n.modal-container > header button {\n padding: 0;\n border: none;\n margin: 0;\n margin-left: auto;\n background: transparent;\n cursor: pointer;\n}\n\n.modal-container > header button:focus-visible {\n border-radius: 50%;\n box-shadow: var(--shadow-focus-primary);\n outline: none !important;\n}\n\n.modal-container > header button::after {\n position: absolute;\n top: 6px;\n right: 4px;\n display: block;\n width: 40px;\n height: 40px;\n background-color: transparent;\n content: \"\";\n}\n\n.modal-container > header z-icon {\n --z-icon-width: calc(var(--space-unit) * 2.25);\n --z-icon-height: calc(var(--space-unit) * 2.25);\n\n display: flex;\n fill: var(--color-primary01-icon);\n}\n\n.modal-container > header > div {\n display: flex;\n width: 100%;\n align-items: baseline;\n margin-right: calc(var(--space-unit) * 2);\n}\n\n.modal-container > header h1,\n.modal-container > header .subtitle {\n padding: 0;\n margin: 0;\n color: var(--color-default-text);\n font-weight: var(--font-sb);\n}\n\n.modal-container > header h1 {\n font-size: var(--font-size-5);\n letter-spacing: 0;\n line-height: 1.4;\n}\n\n.modal-container > header .subtitle {\n font-size: var(--font-size-3);\n font-weight: var(--font-rg);\n letter-spacing: 0;\n line-height: 1.5;\n}\n\n.modal-container > header > div > h1 *:empty {\n display: none;\n}\n\n.modal-container > header h1 + .subtitle {\n margin-top: calc(var(--space-unit) * 0.5);\n}\n\n.modal-container-scroll-inside > .modal-content-scroll-inside {\n overflow: hidden auto;\n flex: 1 auto;\n background: var(--color-surface01);\n}\n\n.modal-container-scroll-inside > .modal-content-scroll-inside::-webkit-scrollbar,\n.modal-container-scroll-outside > .modal-content-scroll-outside::-webkit-scrollbar {\n width: 10px;\n background: linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);\n border-radius: var(--border-radius);\n}\n\n.modal-container-scroll-inside > .modal-content-scroll-inside::-webkit-scrollbar-thumb,\n.modal-container-scroll-outside > .modal-content-scroll-outside::-webkit-scrollbar-thumb {\n width: 10px;\n background-color: var(--color-primary01);\n}\n\n.modal-container-scroll-inside > .modal-content-scroll-inside::-webkit-scrollbar-thumb:hover,\n.modal-container-scroll-outside > .modal-content-scroll-outside::-webkit-scrollbar-thumb:hover {\n background-color: var(--color-hover-primary);\n}\n\n/* Firefox */\n.modal-container-scroll-inside .modal-content-scroll-inside,\n.modal-container-scroll-outside .modal-content-scroll-outside {\n scrollbar-color: var(--color-primary01) transparent;\n}\n\n/* Tablet / Desktop */\n@media only screen and (min-width: 768px) {\n .modal-background {\n position: fixed;\n top: 0;\n left: 0;\n overflow: hidden;\n width: 100vw;\n height: 100vh;\n background-color: var(--gray900);\n opacity: 0.7;\n }\n\n .modal-background.modal-background-scroll-outside {\n position: sticky;\n }\n\n .modal-container-scroll-inside {\n position: fixed;\n top: calc(var(--space-unit) * 6);\n left: 50%;\n overflow: hidden;\n width: auto;\n min-width: calc(var(--space-unit) * 40);\n height: auto;\n min-height: calc(var(--space-unit) * 40);\n max-height: calc(100vh - calc(var(--space-unit) * 6 * 2));\n border-radius: var(--border-radius);\n transform: translateX(-50%);\n }\n\n .modal-container-scroll-outside {\n position: absolute;\n top: calc(var(--space-unit) * 6);\n left: 50%;\n display: block;\n overflow: initial;\n width: auto;\n min-width: calc(var(--space-unit) * 40);\n height: auto;\n min-height: calc(var(--space-unit) * 40);\n max-height: calc(100vh - calc(var(--space-unit) * 6 * 2));\n transform: translateX(-50%);\n }\n\n .modal-container > .modal-content-scroll-outside {\n overflow: initial;\n }\n\n .modal-container-scroll-outside > header,\n .modal-container-scroll-inside > header {\n border-top-left-radius: var(--border-radius);\n border-top-right-radius: var(--border-radius);\n }\n\n .modal-container-scroll-outside::after {\n display: block;\n height: calc(var(--space-unit) * 6);\n content: \" \";\n }\n\n .modal-dialog {\n position: fixed;\n top: 0;\n left: 0;\n height: auto;\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .modal-content-scroll-outside {\n border-bottom-left-radius: var(--border-radius);\n border-bottom-right-radius: var(--border-radius);\n }\n\n .modal-dialog::-webkit-scrollbar {\n display: none;\n }\n}\n\n/* Desktop */\n@media only screen and (min-width: 1152px) {\n .modal-container > header {\n padding-top: calc(var(--space-unit) * 1.5);\n padding-bottom: calc(var(--space-unit) * 1.5);\n }\n\n .modal-container > header h1 {\n font-size: var(--font-size-6);\n font-weight: var(--font-sb);\n letter-spacing: 0;\n line-height: 1.333;\n }\n\n .modal-container > header .subtitle {\n font-size: var(--font-size-4);\n font-weight: var(--font-rg);\n letter-spacing: 0;\n line-height: 1.5;\n }\n\n .modal-container > header h1 + .subtitle {\n margin-top: 0;\n }\n}\n","import {Component, Element, Event, EventEmitter, Listen, Method, Prop, h} from \"@stencil/core\";\nimport dialogPolyfill from \"dialog-polyfill\";\nimport {KeyboardCode} from \"../../beans\";\n\nconst FOCUSABLE_ELEMENTS_SELECTOR =\n ':is(button, input, select, textarea, [contenteditable=\"\"], [contenteditable=\"true\"], a[href], [tabindex], summary):not([disabled], [disabled=\"\"], [tabindex=\"-1\"], [aria-hidden=\"true\"], [hidden])';\n\n/**\n * @slot modalCloseButton - accept custom close button\n * @slot modalContent - set the content of the modal\n * @cssprop --z-modal-content-padding - set a default padding for the modal content slot to 16px\n */\n@Component({\n tag: \"z-modal\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZModal {\n /** unique id */\n @Prop()\n modalid: string;\n\n /** title text (optional) */\n @Prop()\n modaltitle?: string;\n\n /** subtitle (optional) */\n @Prop()\n modalsubtitle?: string;\n\n /** aria-label for close button (optional) */\n @Prop()\n closeButtonLabel = \"chiudi modale\";\n\n /** add role \"alertdialog\" to dialog (optional, default is false) */\n @Prop()\n alertdialog?: boolean = false;\n\n /** if true, the modal is closable (optional, default is true) */\n @Prop()\n closable?: boolean = true;\n\n /** if true, the modal can scroll inside, if false the viewport can scroll */\n @Prop()\n scrollInside?: boolean = true;\n\n private dialog: HTMLDialogElement;\n\n @Element() host: HTMLZModalElement;\n\n /** emitted on close button click, returns modalid */\n @Event()\n modalClose: EventEmitter;\n\n private emitModalClose(): void {\n if (this.closable) {\n this.modalClose.emit({modalid: this.modalid});\n }\n }\n\n /** emitted on modal header click, returns modalid */\n @Event()\n modalHeaderActive: EventEmitter;\n\n private emitModalHeaderActive(): void {\n this.modalHeaderActive.emit({modalid: this.modalid});\n }\n\n /** emitted on background click, returns modalid */\n @Event()\n modalBackgroundClick: EventEmitter;\n\n private emitBackgroundClick(): void {\n if (this.closable) {\n this.modalBackgroundClick.emit({modalid: this.modalid});\n }\n }\n\n componentDidLoad(): void {\n if (typeof window.HTMLDialogElement !== \"function\") {\n /* workaround to fix `registerDialog` in test environment:\n stencil converts html elements to MockHTMLElement but this element is missing the `localName` property,\n which is used by `registerDialog` to recognize the element as dialog */\n if (!this.dialog.localName) {\n Object.defineProperty(this.dialog, \"localName\", {value: \"dialog\"});\n }\n dialogPolyfill.registerDialog(this.dialog);\n this.dialog.setAttribute(\"open\", \"true\");\n } else {\n this.open();\n }\n }\n\n /** open modal */\n @Method()\n async open(): Promise<void> {\n this.dialog?.showModal();\n }\n\n /** close modal */\n @Method()\n async close(): Promise<void> {\n if (this.closable) {\n this.dialog?.close();\n }\n }\n\n /**\n * Get a list of focusable elements in the dialog.\n * Remove elements with `display: none` from the list, because they're not focusable.\n *\n * N.B. The list is built on the assumption that elements inside shadow root are placed ALL before the `modalContent` slot.\n * Adding focusable elements after the `modalContent` slot would break the order of elements in the list.\n */\n private get focusableElements(): HTMLElement[] {\n return [\n ...Array.from(this.host.shadowRoot.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENTS_SELECTOR)),\n ...Array.from(this.host.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENTS_SELECTOR)),\n ].filter((element) => getComputedStyle(element).display !== \"none\");\n }\n\n @Listen(\"keydown\")\n handleKeyDown(e: KeyboardEvent): void {\n if (e.code === KeyboardCode.ESC && !this.closable) {\n e.preventDefault();\n }\n\n if (e.code !== KeyboardCode.TAB) {\n return;\n }\n\n const focusableElements = this.focusableElements;\n const shadowActiveElement = this.host.shadowRoot.activeElement;\n const activeElement = this.host.ownerDocument.activeElement;\n const firstFocusableElement = focusableElements[0];\n const lastFocusableElement = focusableElements[focusableElements.length - 1];\n if (e.shiftKey && (shadowActiveElement == firstFocusableElement || activeElement == firstFocusableElement)) {\n // shift + tab was pressed and current active element is the first focusable element\n e.preventDefault();\n lastFocusableElement.focus();\n } else if (!e.shiftKey && (shadowActiveElement == lastFocusableElement || activeElement == lastFocusableElement)) {\n // shift + tab was pressed and current active element is the first focusable element\n e.preventDefault();\n firstFocusableElement.focus();\n }\n }\n\n private closeButtonSlot(): HTMLElement | void {\n if (this.closable) {\n return (\n <slot name=\"modalCloseButton\">\n <button\n aria-label={this.closeButtonLabel}\n onClick={() => this.close()}\n >\n <z-icon name=\"multiply-circle-filled\"></z-icon>\n </button>\n </slot>\n );\n }\n }\n\n private handleEscape(e: Event): void {\n if (this.closable) {\n return;\n }\n e.preventDefault();\n }\n\n render(): HTMLZModalElement {\n return (\n <dialog\n class={{\n \"modal-dialog\": !this.scrollInside,\n }}\n aria-labelledby=\"modal-title\"\n aria-describedby=\"modal-content\"\n role={this.alertdialog ? \"alertdialog\" : undefined}\n ref={(el) => (this.dialog = el as HTMLDialogElement)}\n onClose={() => this.emitModalClose()}\n onCancel={(e) => this.handleEscape(e)}\n >\n <div\n class={{\n \"modal-container\": true,\n \"modal-container-scroll-inside\": this.scrollInside,\n \"modal-container-scroll-outside\": !this.scrollInside,\n }}\n id={this.modalid}\n >\n <header onClick={this.emitModalHeaderActive.bind(this)}>\n <div>\n {this.modaltitle && <h1 id=\"modal-title\">{this.modaltitle}</h1>}\n {this.closeButtonSlot()}\n </div>\n {this.modalsubtitle && (\n <div\n class=\"subtitle\"\n id=\"modal-subtitle\"\n >\n {this.modalsubtitle}\n </div>\n )}\n </header>\n\n <div\n class={{\n \"modal-content-scroll-inside\": this.scrollInside,\n \"modal-content-scroll-outside\": !this.scrollInside,\n }}\n id=\"modal-content\"\n >\n <slot name=\"modalContent\"></slot>\n </div>\n </div>\n <div\n class={{\n \"modal-background\": true,\n \"modal-background-scroll-outside\": !this.scrollInside,\n }}\n data-action=\"modalBackground\"\n data-modal={this.modalid}\n onClick={() => {\n this.emitBackgroundClick();\n this.close();\n }}\n ></div>\n </dialog>\n );\n }\n}\n"],"mappings":"oGAAA,MAAMA,EAAY,g+CAClB,MAAAC,EAAeD,E,MCMFE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tP,GAAQtC,KAAK4F,OAAStD,EAC5BuP,QAAS,IAAM7R,KAAK6P,iBACpBiC,SAAWhS,GAAME,KAAKwR,aAAa1R,IAEnCU,EAAA,OAAAE,IAAA,2CACEC,MAAO,CACL,kBAAmB,KACnB,gCAAiCX,KAAKyR,aACtC,kCAAmCzR,KAAKyR,cAE1CM,GAAI/R,KAAKgQ,SAETxP,EAAA,UAAAE,IAAA,2CAAQ6Q,QAASvR,KAAKiQ,sBAAsBlP,KAAKf,OAC/CQ,EAAA,OAAAE,IAAA,4CACGV,KAAKgS,YAAcxR,EAAA,MAAAE,IAAA,2CAAIqR,GAAG,eAAe/R,KAAKgS,YAC9ChS,KAAKqR,mBAEPrR,KAAKiS,eACJzR,EAAA,OAAAE,IAAA,2CACEC,MAAM,WACNoR,GAAG,kBAEF/R,KAAKiS,gBAKZzR,EAAA,OAAAE,IAAA,2CACEC,MAAO,CACL,8BAA+BX,KAAKyR,aACpC,gCAAiCzR,KAAKyR,cAExCM,GAAG,iBAEHvR,EAAA,QAAAE,IAAA,2CAAM8G,KAAK,mBAGfhH,EAAA,OAAAE,IAAA,2CACEC,MAAO,CACL,mBAAoB,KACpB,mCAAoCX,KAAKyR,cAC1C,cACW,kBAAiB,aACjBzR,KAAKgQ,QACjBuB,QAAS,KACPvR,KAAKmQ,sBACLnQ,KAAK8F,OAAO,I","ignoreList":[]}
1
+ {"version":3,"names":["stylesCss","ZDragdropAreaStyle0","ZDragdropArea","onDrop","e","preventDefault","this","dragging","dataTransfer","files","length","fileDropped","emit","render","h","Host","key","class","dragover","onDragOver","onDragLeave","bind","dragAndDropLabel","supportCustomEvent","window","CustomEvent","event","x","ev","document","createEvent","initCustomEvent","bubbles","cancelable","detail","prototype","Event","safeDispatchEvent","target","check","type","toLowerCase","dispatchEvent","createsStackingContext","el","body","s","getComputedStyle","invalid","k","ok","undefined","opacity","position","webkitOverflowScrolling","parentElement","findNearestDialog","localName","parentNode","host","safeBlur","shadowRoot","activeElement","blur","inNodeList","nodeList","node","i","isFormMethodDialog","hasAttribute","getAttribute","findFocusableElementWithin","hostElement","opts","query","map","push","querySelector","join","Element","elems","querySelectorAll","tagName","isConnected","element","contains","findFormSubmitter","submitter","form","HTMLFormElement","dialogPolyfill","formSubmitter","root","getRootNode","maybeHandleSubmit","defaultPrevented","value","imagemapUseValue","dialog","formmethod","close","dialogPolyfillInfo","dialog_","replacedStyleTop_","openAsModal_","setAttribute","show","showModal","addEventListener","returnValue","mo","MutationObserver","maybeHideModal","observe","attributes","attributeFilter","removed","cb","downgradeModal","timeout","delayModel","cand","substr","clearTimeout","setTimeout","forEach","name","Object","defineProperty","set","setOpen","get","backdrop_","createElement","className","backdropMouseEvent_","style","zIndex","top","removeChild","dm","removeDialog","removeAttribute","fake","insertBefore","firstChild","tabIndex","focus","redirectedEvent","initMouseEvent","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","stopPropagation","focus_","updateZIndex","dialogZ","backdropZ","Error","open","pushDialog","console","warn","needsCentering","reposition","nextSibling","opt_returnValue","closeEvent","scrollTop","documentElement","topValue","innerHeight","offsetHeight","Math","max","isInlinePositionSetByStylesheet","styleSheets","styleSheet","cssRules","j","rule","selectedNodes","selectorText","cssTop","getPropertyValue","cssBottom","computedStyle","bottom","forceRegisterDialog","HTMLDialogElement","registerDialog","DialogManager","pendingDialogStack","checkDOM","checkDOM_","overlay","forwardTab_","handleKey_","handleFocus_","zIndexLow_","zIndexHigh_","mo_","records","rec","c","removedNodes","concat","blockDocument","childList","subtree","unblockDocument","removeEventListener","disconnect","updateStacking","dpi","last","p","appendChild","containedByTopDialog_","candidate","composedPath","compareDocumentPosition","Node","DOCUMENT_POSITION_PRECEDING","keyCode","cancelEvent","clone","slice","indexOf","allowed","unshift","index","splice","testForm","method","methodDescriptor","getOwnPropertyDescriptor","realGet","call","realSet","v","path","shift","valid","offsetX","offsetY","nativeFormSubmit","submit","replacementFormSubmit","ZModalStyle0","FOCUSABLE_ELEMENTS_SELECTOR","ZModal","emitModalClose","closable","modalClose","modalid","emitModalHeaderActive","modalHeaderActive","emitBackgroundClick","modalBackgroundClick","componentDidLoad","_a","focusableElements","Array","from","filter","display","handleKeyDown","code","KeyboardCode","ESC","TAB","shadowActiveElement","ownerDocument","firstFocusableElement","lastFocusableElement","closeButtonSlot","closeButtonLabel","onClick","handleEscape","scrollInside","role","alertdialog","ref","onClose","onCancel","id","modaltitle","modalsubtitle"],"sources":["src/components/file-upload/z-dragdrop-area/styles.css?tag=z-dragdrop-area&encapsulation=shadow","src/components/file-upload/z-dragdrop-area/index.tsx","node_modules/dialog-polyfill/dist/dialog-polyfill.esm.js","src/components/z-modal/styles.css?tag=z-modal&encapsulation=shadow","src/components/z-modal/index.tsx"],"sourcesContent":[":host {\n position: relative;\n display: flex;\n width: 100%;\n height: 232px;\n flex-direction: column;\n align-items: center;\n padding: calc(var(--space-unit) * 3);\n background-color: var(--color-surface02);\n background-image: repeating-linear-gradient(\n 0deg,\n var(--color-surface03),\n var(--color-surface03) 12px,\n transparent 12px,\n transparent 20px\n ),\n repeating-linear-gradient(\n 90deg,\n var(--color-surface03),\n var(--color-surface03) 12px,\n transparent 12px,\n transparent 20px\n ),\n repeating-linear-gradient(\n 180deg,\n var(--color-surface03),\n var(--color-surface03) 12px,\n transparent 12px,\n transparent 20px\n ),\n repeating-linear-gradient(\n 270deg,\n var(--color-surface03),\n var(--color-surface03) 12px,\n transparent 12px,\n transparent 20px\n );\n background-position:\n 0 0,\n 0 0,\n 100% 0,\n 0 100%;\n background-repeat: no-repeat;\n background-size:\n 2px 100%,\n 100% 2px,\n 2px 100%,\n 100% 2px;\n border-radius: var(--border-radius-small);\n color: var(--color-default-text);\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\n:host,\n* {\n box-sizing: border-box;\n}\n\n/* https://stackoverflow.com/questions/7110353/html5-dragleave-fired-when-hovering-a-child-element */\n:host(.dragover) * {\n pointer-events: none;\n}\n\n.dragover-container {\n position: absolute;\n z-index: 1;\n top: 0;\n left: 0;\n display: none;\n width: 100%;\n height: 100%;\n background-color: var(--color-primary03);\n box-shadow: var(--shadow-focus-primary);\n}\n\n:host(.dragover) .dragover-container {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n","import {Component, Event, EventEmitter, Host, Prop, State, h} from \"@stencil/core\";\n\n@Component({\n tag: \"z-dragdrop-area\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZDragdropArea {\n /** drag & drop button label */\n @Prop()\n dragAndDropLabel: string;\n\n /** State that indicates if the user is dragging a file over the drag & drop area */\n @State()\n dragging = false;\n\n /** Emitted when user drop one or more files */\n @Event()\n fileDropped: EventEmitter;\n\n private onDrop(e: DragEvent): void {\n e.preventDefault();\n this.dragging = false;\n if (e.dataTransfer.files.length) {\n this.fileDropped.emit(e.dataTransfer.files);\n }\n }\n\n render(): HTMLZDragdropAreaElement {\n return (\n <Host\n class={{dragover: this.dragging}}\n onDragOver={(e) => {\n e.preventDefault();\n this.dragging = true;\n }}\n onDragLeave={() => {\n this.dragging = false;\n }}\n onDrop={this.onDrop.bind(this)}\n >\n <div class=\"dragover-container\">\n <z-button>{this.dragAndDropLabel}</z-button>\n </div>\n <slot />\n </Host>\n );\n }\n}\n","// nb. This is for IE10 and lower _only_.\nvar supportCustomEvent = window.CustomEvent;\nif (!supportCustomEvent || typeof supportCustomEvent === 'object') {\n supportCustomEvent = function CustomEvent(event, x) {\n x = x || {};\n var ev = document.createEvent('CustomEvent');\n ev.initCustomEvent(event, !!x.bubbles, !!x.cancelable, x.detail || null);\n return ev;\n };\n supportCustomEvent.prototype = window.Event.prototype;\n}\n\n/**\n * Dispatches the passed event to both an \"on<type>\" handler as well as via the\n * normal dispatch operation. Does not bubble.\n *\n * @param {!EventTarget} target\n * @param {!Event} event\n * @return {boolean}\n */\nfunction safeDispatchEvent(target, event) {\n var check = 'on' + event.type.toLowerCase();\n if (typeof target[check] === 'function') {\n target[check](event);\n }\n return target.dispatchEvent(event);\n}\n\n/**\n * @param {Element} el to check for stacking context\n * @return {boolean} whether this el or its parents creates a stacking context\n */\nfunction createsStackingContext(el) {\n while (el && el !== document.body) {\n var s = window.getComputedStyle(el);\n var invalid = function(k, ok) {\n return !(s[k] === undefined || s[k] === ok);\n };\n\n if (s.opacity < 1 ||\n invalid('zIndex', 'auto') ||\n invalid('transform', 'none') ||\n invalid('mixBlendMode', 'normal') ||\n invalid('filter', 'none') ||\n invalid('perspective', 'none') ||\n s['isolation'] === 'isolate' ||\n s.position === 'fixed' ||\n s.webkitOverflowScrolling === 'touch') {\n return true;\n }\n el = el.parentElement;\n }\n return false;\n}\n\n/**\n * Finds the nearest <dialog> from the passed element.\n *\n * @param {Element} el to search from\n * @return {HTMLDialogElement} dialog found\n */\nfunction findNearestDialog(el) {\n while (el) {\n if (el.localName === 'dialog') {\n return /** @type {HTMLDialogElement} */ (el);\n }\n if (el.parentElement) {\n el = el.parentElement;\n } else if (el.parentNode) {\n el = el.parentNode.host;\n } else {\n el = null;\n }\n }\n return null;\n}\n\n/**\n * Blur the specified element, as long as it's not the HTML body element.\n * This works around an IE9/10 bug - blurring the body causes Windows to\n * blur the whole application.\n *\n * @param {Element} el to blur\n */\nfunction safeBlur(el) {\n // Find the actual focused element when the active element is inside a shadow root\n while (el && el.shadowRoot && el.shadowRoot.activeElement) {\n el = el.shadowRoot.activeElement;\n }\n\n if (el && el.blur && el !== document.body) {\n el.blur();\n }\n}\n\n/**\n * @param {!NodeList} nodeList to search\n * @param {Node} node to find\n * @return {boolean} whether node is inside nodeList\n */\nfunction inNodeList(nodeList, node) {\n for (var i = 0; i < nodeList.length; ++i) {\n if (nodeList[i] === node) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * @param {HTMLFormElement} el to check\n * @return {boolean} whether this form has method=\"dialog\"\n */\nfunction isFormMethodDialog(el) {\n if (!el || !el.hasAttribute('method')) {\n return false;\n }\n return el.getAttribute('method').toLowerCase() === 'dialog';\n}\n\n/**\n * @param {!DocumentFragment|!Element} hostElement\n * @return {?Element}\n */\nfunction findFocusableElementWithin(hostElement) {\n // Note that this is 'any focusable area'. This list is probably not exhaustive, but the\n // alternative involves stepping through and trying to focus everything.\n var opts = ['button', 'input', 'keygen', 'select', 'textarea'];\n var query = opts.map(function(el) {\n return el + ':not([disabled])';\n });\n // TODO(samthor): tabindex values that are not numeric are not focusable.\n query.push('[tabindex]:not([disabled]):not([tabindex=\"\"])'); // tabindex != \"\", not disabled\n var target = hostElement.querySelector(query.join(', '));\n\n if (!target && 'attachShadow' in Element.prototype) {\n // If we haven't found a focusable target, see if the host element contains an element\n // which has a shadowRoot.\n // Recursively search for the first focusable item in shadow roots.\n var elems = hostElement.querySelectorAll('*');\n for (var i = 0; i < elems.length; i++) {\n if (elems[i].tagName && elems[i].shadowRoot) {\n target = findFocusableElementWithin(elems[i].shadowRoot);\n if (target) {\n break;\n }\n }\n }\n }\n return target;\n}\n\n/**\n * Determines if an element is attached to the DOM.\n * @param {Element} element to check\n * @return {boolean} whether the element is in DOM\n */\nfunction isConnected(element) {\n return element.isConnected || document.body.contains(element);\n}\n\n/**\n * @param {!Event} event\n * @return {?Element}\n */\nfunction findFormSubmitter(event) {\n if (event.submitter) {\n return event.submitter;\n }\n\n var form = event.target;\n if (!(form instanceof HTMLFormElement)) {\n return null;\n }\n\n var submitter = dialogPolyfill.formSubmitter;\n if (!submitter) {\n var target = event.target;\n var root = ('getRootNode' in target && target.getRootNode() || document);\n submitter = root.activeElement;\n }\n\n if (!submitter || submitter.form !== form) {\n return null;\n }\n return submitter;\n}\n\n/**\n * @param {!Event} event\n */\nfunction maybeHandleSubmit(event) {\n if (event.defaultPrevented) {\n return;\n }\n var form = /** @type {!HTMLFormElement} */ (event.target);\n\n // We'd have a value if we clicked on an imagemap.\n var value = dialogPolyfill.imagemapUseValue;\n var submitter = findFormSubmitter(event);\n if (value === null && submitter) {\n value = submitter.value;\n }\n\n // There should always be a dialog as this handler is added specifically on them, but check just\n // in case.\n var dialog = findNearestDialog(form);\n if (!dialog) {\n return;\n }\n\n // Prefer formmethod on the button.\n var formmethod = submitter && submitter.getAttribute('formmethod') || form.getAttribute('method');\n if (formmethod !== 'dialog') {\n return;\n }\n event.preventDefault();\n\n if (value != null) {\n // nb. we explicitly check against null/undefined\n dialog.close(value);\n } else {\n dialog.close();\n }\n}\n\n/**\n * @param {!HTMLDialogElement} dialog to upgrade\n * @constructor\n */\nfunction dialogPolyfillInfo(dialog) {\n this.dialog_ = dialog;\n this.replacedStyleTop_ = false;\n this.openAsModal_ = false;\n\n // Set a11y role. Browsers that support dialog implicitly know this already.\n if (!dialog.hasAttribute('role')) {\n dialog.setAttribute('role', 'dialog');\n }\n\n dialog.show = this.show.bind(this);\n dialog.showModal = this.showModal.bind(this);\n dialog.close = this.close.bind(this);\n\n dialog.addEventListener('submit', maybeHandleSubmit, false);\n\n if (!('returnValue' in dialog)) {\n dialog.returnValue = '';\n }\n\n if ('MutationObserver' in window) {\n var mo = new MutationObserver(this.maybeHideModal.bind(this));\n mo.observe(dialog, {attributes: true, attributeFilter: ['open']});\n } else {\n // IE10 and below support. Note that DOMNodeRemoved etc fire _before_ removal. They also\n // seem to fire even if the element was removed as part of a parent removal. Use the removed\n // events to force downgrade (useful if removed/immediately added).\n var removed = false;\n var cb = function() {\n removed ? this.downgradeModal() : this.maybeHideModal();\n removed = false;\n }.bind(this);\n var timeout;\n var delayModel = function(ev) {\n if (ev.target !== dialog) { return; } // not for a child element\n var cand = 'DOMNodeRemoved';\n removed |= (ev.type.substr(0, cand.length) === cand);\n window.clearTimeout(timeout);\n timeout = window.setTimeout(cb, 0);\n };\n ['DOMAttrModified', 'DOMNodeRemoved', 'DOMNodeRemovedFromDocument'].forEach(function(name) {\n dialog.addEventListener(name, delayModel);\n });\n }\n // Note that the DOM is observed inside DialogManager while any dialog\n // is being displayed as a modal, to catch modal removal from the DOM.\n\n Object.defineProperty(dialog, 'open', {\n set: this.setOpen.bind(this),\n get: dialog.hasAttribute.bind(dialog, 'open')\n });\n\n this.backdrop_ = document.createElement('div');\n this.backdrop_.className = 'backdrop';\n this.backdrop_.addEventListener('mouseup' , this.backdropMouseEvent_.bind(this));\n this.backdrop_.addEventListener('mousedown', this.backdropMouseEvent_.bind(this));\n this.backdrop_.addEventListener('click' , this.backdropMouseEvent_.bind(this));\n}\n\ndialogPolyfillInfo.prototype = /** @type {HTMLDialogElement.prototype} */ ({\n\n get dialog() {\n return this.dialog_;\n },\n\n /**\n * Maybe remove this dialog from the modal top layer. This is called when\n * a modal dialog may no longer be tenable, e.g., when the dialog is no\n * longer open or is no longer part of the DOM.\n */\n maybeHideModal: function() {\n if (this.dialog_.hasAttribute('open') && isConnected(this.dialog_)) { return; }\n this.downgradeModal();\n },\n\n /**\n * Remove this dialog from the modal top layer, leaving it as a non-modal.\n */\n downgradeModal: function() {\n if (!this.openAsModal_) { return; }\n this.openAsModal_ = false;\n this.dialog_.style.zIndex = '';\n\n // This won't match the native <dialog> exactly because if the user set top on a centered\n // polyfill dialog, that top gets thrown away when the dialog is closed. Not sure it's\n // possible to polyfill this perfectly.\n if (this.replacedStyleTop_) {\n this.dialog_.style.top = '';\n this.replacedStyleTop_ = false;\n }\n\n // Clear the backdrop and remove from the manager.\n this.backdrop_.parentNode && this.backdrop_.parentNode.removeChild(this.backdrop_);\n dialogPolyfill.dm.removeDialog(this);\n },\n\n /**\n * @param {boolean} value whether to open or close this dialog\n */\n setOpen: function(value) {\n if (value) {\n this.dialog_.hasAttribute('open') || this.dialog_.setAttribute('open', '');\n } else {\n this.dialog_.removeAttribute('open');\n this.maybeHideModal(); // nb. redundant with MutationObserver\n }\n },\n\n /**\n * Handles mouse events ('mouseup', 'mousedown', 'click') on the fake .backdrop element, redirecting them as if\n * they were on the dialog itself.\n *\n * @param {!Event} e to redirect\n */\n backdropMouseEvent_: function(e) {\n if (!this.dialog_.hasAttribute('tabindex')) {\n // Clicking on the backdrop should move the implicit cursor, even if dialog cannot be\n // focused. Create a fake thing to focus on. If the backdrop was _before_ the dialog, this\n // would not be needed - clicks would move the implicit cursor there.\n var fake = document.createElement('div');\n this.dialog_.insertBefore(fake, this.dialog_.firstChild);\n fake.tabIndex = -1;\n fake.focus();\n this.dialog_.removeChild(fake);\n } else {\n this.dialog_.focus();\n }\n\n var redirectedEvent = document.createEvent('MouseEvents');\n redirectedEvent.initMouseEvent(e.type, e.bubbles, e.cancelable, window,\n e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey,\n e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);\n this.dialog_.dispatchEvent(redirectedEvent);\n e.stopPropagation();\n },\n\n /**\n * Focuses on the first focusable element within the dialog. This will always blur the current\n * focus, even if nothing within the dialog is found.\n */\n focus_: function() {\n // Find element with `autofocus` attribute, or fall back to the first form/tabindex control.\n var target = this.dialog_.querySelector('[autofocus]:not([disabled])');\n if (!target && this.dialog_.tabIndex >= 0) {\n target = this.dialog_;\n }\n if (!target) {\n target = findFocusableElementWithin(this.dialog_);\n }\n safeBlur(document.activeElement);\n target && target.focus();\n },\n\n /**\n * Sets the zIndex for the backdrop and dialog.\n *\n * @param {number} dialogZ\n * @param {number} backdropZ\n */\n updateZIndex: function(dialogZ, backdropZ) {\n if (dialogZ < backdropZ) {\n throw new Error('dialogZ should never be < backdropZ');\n }\n this.dialog_.style.zIndex = dialogZ;\n this.backdrop_.style.zIndex = backdropZ;\n },\n\n /**\n * Shows the dialog. If the dialog is already open, this does nothing.\n */\n show: function() {\n if (!this.dialog_.open) {\n this.setOpen(true);\n this.focus_();\n }\n },\n\n /**\n * Show this dialog modally.\n */\n showModal: function() {\n if (this.dialog_.hasAttribute('open')) {\n throw new Error('Failed to execute \\'showModal\\' on dialog: The element is already open, and therefore cannot be opened modally.');\n }\n if (!isConnected(this.dialog_)) {\n throw new Error('Failed to execute \\'showModal\\' on dialog: The element is not in a Document.');\n }\n if (!dialogPolyfill.dm.pushDialog(this)) {\n throw new Error('Failed to execute \\'showModal\\' on dialog: There are too many open modal dialogs.');\n }\n\n if (createsStackingContext(this.dialog_.parentElement)) {\n console.warn('A dialog is being shown inside a stacking context. ' +\n 'This may cause it to be unusable. For more information, see this link: ' +\n 'https://github.com/GoogleChrome/dialog-polyfill/#stacking-context');\n }\n\n this.setOpen(true);\n this.openAsModal_ = true;\n\n // Optionally center vertically, relative to the current viewport.\n if (dialogPolyfill.needsCentering(this.dialog_)) {\n dialogPolyfill.reposition(this.dialog_);\n this.replacedStyleTop_ = true;\n } else {\n this.replacedStyleTop_ = false;\n }\n\n // Insert backdrop.\n this.dialog_.parentNode.insertBefore(this.backdrop_, this.dialog_.nextSibling);\n\n // Focus on whatever inside the dialog.\n this.focus_();\n },\n\n /**\n * Closes this HTMLDialogElement. This is optional vs clearing the open\n * attribute, however this fires a 'close' event.\n *\n * @param {string=} opt_returnValue to use as the returnValue\n */\n close: function(opt_returnValue) {\n if (!this.dialog_.hasAttribute('open')) {\n throw new Error('Failed to execute \\'close\\' on dialog: The element does not have an \\'open\\' attribute, and therefore cannot be closed.');\n }\n this.setOpen(false);\n\n // Leave returnValue untouched in case it was set directly on the element\n if (opt_returnValue !== undefined) {\n this.dialog_.returnValue = opt_returnValue;\n }\n\n // Triggering \"close\" event for any attached listeners on the <dialog>.\n var closeEvent = new supportCustomEvent('close', {\n bubbles: false,\n cancelable: false\n });\n safeDispatchEvent(this.dialog_, closeEvent);\n }\n\n});\n\nvar dialogPolyfill = {};\n\ndialogPolyfill.reposition = function(element) {\n var scrollTop = document.body.scrollTop || document.documentElement.scrollTop;\n var topValue = scrollTop + (window.innerHeight - element.offsetHeight) / 2;\n element.style.top = Math.max(scrollTop, topValue) + 'px';\n};\n\ndialogPolyfill.isInlinePositionSetByStylesheet = function(element) {\n for (var i = 0; i < document.styleSheets.length; ++i) {\n var styleSheet = document.styleSheets[i];\n var cssRules = null;\n // Some browsers throw on cssRules.\n try {\n cssRules = styleSheet.cssRules;\n } catch (e) {}\n if (!cssRules) { continue; }\n for (var j = 0; j < cssRules.length; ++j) {\n var rule = cssRules[j];\n var selectedNodes = null;\n // Ignore errors on invalid selector texts.\n try {\n selectedNodes = document.querySelectorAll(rule.selectorText);\n } catch(e) {}\n if (!selectedNodes || !inNodeList(selectedNodes, element)) {\n continue;\n }\n var cssTop = rule.style.getPropertyValue('top');\n var cssBottom = rule.style.getPropertyValue('bottom');\n if ((cssTop && cssTop !== 'auto') || (cssBottom && cssBottom !== 'auto')) {\n return true;\n }\n }\n }\n return false;\n};\n\ndialogPolyfill.needsCentering = function(dialog) {\n var computedStyle = window.getComputedStyle(dialog);\n if (computedStyle.position !== 'absolute') {\n return false;\n }\n\n // We must determine whether the top/bottom specified value is non-auto. In\n // WebKit/Blink, checking computedStyle.top == 'auto' is sufficient, but\n // Firefox returns the used value. So we do this crazy thing instead: check\n // the inline style and then go through CSS rules.\n if ((dialog.style.top !== 'auto' && dialog.style.top !== '') ||\n (dialog.style.bottom !== 'auto' && dialog.style.bottom !== '')) {\n return false;\n }\n return !dialogPolyfill.isInlinePositionSetByStylesheet(dialog);\n};\n\n/**\n * @param {!Element} element to force upgrade\n */\ndialogPolyfill.forceRegisterDialog = function(element) {\n if (window.HTMLDialogElement || element.showModal) {\n console.warn('This browser already supports <dialog>, the polyfill ' +\n 'may not work correctly', element);\n }\n if (element.localName !== 'dialog') {\n throw new Error('Failed to register dialog: The element is not a dialog.');\n }\n new dialogPolyfillInfo(/** @type {!HTMLDialogElement} */ (element));\n};\n\n/**\n * @param {!Element} element to upgrade, if necessary\n */\ndialogPolyfill.registerDialog = function(element) {\n if (!element.showModal) {\n dialogPolyfill.forceRegisterDialog(element);\n }\n};\n\n/**\n * @constructor\n */\ndialogPolyfill.DialogManager = function() {\n /** @type {!Array<!dialogPolyfillInfo>} */\n this.pendingDialogStack = [];\n\n var checkDOM = this.checkDOM_.bind(this);\n\n // The overlay is used to simulate how a modal dialog blocks the document.\n // The blocking dialog is positioned on top of the overlay, and the rest of\n // the dialogs on the pending dialog stack are positioned below it. In the\n // actual implementation, the modal dialog stacking is controlled by the\n // top layer, where z-index has no effect.\n this.overlay = document.createElement('div');\n this.overlay.className = '_dialog_overlay';\n this.overlay.addEventListener('click', function(e) {\n this.forwardTab_ = undefined;\n e.stopPropagation();\n checkDOM([]); // sanity-check DOM\n }.bind(this));\n\n this.handleKey_ = this.handleKey_.bind(this);\n this.handleFocus_ = this.handleFocus_.bind(this);\n\n this.zIndexLow_ = 100000;\n this.zIndexHigh_ = 100000 + 150;\n\n this.forwardTab_ = undefined;\n\n if ('MutationObserver' in window) {\n this.mo_ = new MutationObserver(function(records) {\n var removed = [];\n records.forEach(function(rec) {\n for (var i = 0, c; c = rec.removedNodes[i]; ++i) {\n if (!(c instanceof Element)) {\n continue;\n } else if (c.localName === 'dialog') {\n removed.push(c);\n }\n removed = removed.concat(c.querySelectorAll('dialog'));\n }\n });\n removed.length && checkDOM(removed);\n });\n }\n};\n\n/**\n * Called on the first modal dialog being shown. Adds the overlay and related\n * handlers.\n */\ndialogPolyfill.DialogManager.prototype.blockDocument = function() {\n document.documentElement.addEventListener('focus', this.handleFocus_, true);\n document.addEventListener('keydown', this.handleKey_);\n this.mo_ && this.mo_.observe(document, {childList: true, subtree: true});\n};\n\n/**\n * Called on the first modal dialog being removed, i.e., when no more modal\n * dialogs are visible.\n */\ndialogPolyfill.DialogManager.prototype.unblockDocument = function() {\n document.documentElement.removeEventListener('focus', this.handleFocus_, true);\n document.removeEventListener('keydown', this.handleKey_);\n this.mo_ && this.mo_.disconnect();\n};\n\n/**\n * Updates the stacking of all known dialogs.\n */\ndialogPolyfill.DialogManager.prototype.updateStacking = function() {\n var zIndex = this.zIndexHigh_;\n\n for (var i = 0, dpi; dpi = this.pendingDialogStack[i]; ++i) {\n dpi.updateZIndex(--zIndex, --zIndex);\n if (i === 0) {\n this.overlay.style.zIndex = --zIndex;\n }\n }\n\n // Make the overlay a sibling of the dialog itself.\n var last = this.pendingDialogStack[0];\n if (last) {\n var p = last.dialog.parentNode || document.body;\n p.appendChild(this.overlay);\n } else if (this.overlay.parentNode) {\n this.overlay.parentNode.removeChild(this.overlay);\n }\n};\n\n/**\n * @param {Element} candidate to check if contained or is the top-most modal dialog\n * @return {boolean} whether candidate is contained in top dialog\n */\ndialogPolyfill.DialogManager.prototype.containedByTopDialog_ = function(candidate) {\n while (candidate = findNearestDialog(candidate)) {\n for (var i = 0, dpi; dpi = this.pendingDialogStack[i]; ++i) {\n if (dpi.dialog === candidate) {\n return i === 0; // only valid if top-most\n }\n }\n candidate = candidate.parentElement;\n }\n return false;\n};\n\ndialogPolyfill.DialogManager.prototype.handleFocus_ = function(event) {\n var target = event.composedPath ? event.composedPath()[0] : event.target;\n\n if (this.containedByTopDialog_(target)) { return; }\n\n if (document.activeElement === document.documentElement) { return; }\n\n event.preventDefault();\n event.stopPropagation();\n safeBlur(/** @type {Element} */ (target));\n\n if (this.forwardTab_ === undefined) { return; } // move focus only from a tab key\n\n var dpi = this.pendingDialogStack[0];\n var dialog = dpi.dialog;\n var position = dialog.compareDocumentPosition(target);\n if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n if (this.forwardTab_) {\n // forward\n dpi.focus_();\n } else if (target !== document.documentElement) {\n // backwards if we're not already focused on <html>\n document.documentElement.focus();\n }\n }\n\n return false;\n};\n\ndialogPolyfill.DialogManager.prototype.handleKey_ = function(event) {\n this.forwardTab_ = undefined;\n if (event.keyCode === 27) {\n event.preventDefault();\n event.stopPropagation();\n var cancelEvent = new supportCustomEvent('cancel', {\n bubbles: false,\n cancelable: true\n });\n var dpi = this.pendingDialogStack[0];\n if (dpi && safeDispatchEvent(dpi.dialog, cancelEvent)) {\n dpi.dialog.close();\n }\n } else if (event.keyCode === 9) {\n this.forwardTab_ = !event.shiftKey;\n }\n};\n\n/**\n * Finds and downgrades any known modal dialogs that are no longer displayed. Dialogs that are\n * removed and immediately readded don't stay modal, they become normal.\n *\n * @param {!Array<!HTMLDialogElement>} removed that have definitely been removed\n */\ndialogPolyfill.DialogManager.prototype.checkDOM_ = function(removed) {\n // This operates on a clone because it may cause it to change. Each change also calls\n // updateStacking, which only actually needs to happen once. But who removes many modal dialogs\n // at a time?!\n var clone = this.pendingDialogStack.slice();\n clone.forEach(function(dpi) {\n if (removed.indexOf(dpi.dialog) !== -1) {\n dpi.downgradeModal();\n } else {\n dpi.maybeHideModal();\n }\n });\n};\n\n/**\n * @param {!dialogPolyfillInfo} dpi\n * @return {boolean} whether the dialog was allowed\n */\ndialogPolyfill.DialogManager.prototype.pushDialog = function(dpi) {\n var allowed = (this.zIndexHigh_ - this.zIndexLow_) / 2 - 1;\n if (this.pendingDialogStack.length >= allowed) {\n return false;\n }\n if (this.pendingDialogStack.unshift(dpi) === 1) {\n this.blockDocument();\n }\n this.updateStacking();\n return true;\n};\n\n/**\n * @param {!dialogPolyfillInfo} dpi\n */\ndialogPolyfill.DialogManager.prototype.removeDialog = function(dpi) {\n var index = this.pendingDialogStack.indexOf(dpi);\n if (index === -1) { return; }\n\n this.pendingDialogStack.splice(index, 1);\n if (this.pendingDialogStack.length === 0) {\n this.unblockDocument();\n }\n this.updateStacking();\n};\n\ndialogPolyfill.dm = new dialogPolyfill.DialogManager();\ndialogPolyfill.formSubmitter = null;\ndialogPolyfill.imagemapUseValue = null;\n\n/**\n * Installs global handlers, such as click listers and native method overrides. These are needed\n * even if a no dialog is registered, as they deal with <form method=\"dialog\">.\n */\nif (window.HTMLDialogElement === undefined) {\n\n /**\n * If HTMLFormElement translates method=\"DIALOG\" into 'get', then replace the descriptor with\n * one that returns the correct value.\n */\n var testForm = document.createElement('form');\n testForm.setAttribute('method', 'dialog');\n if (testForm.method !== 'dialog') {\n var methodDescriptor = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, 'method');\n if (methodDescriptor) {\n // nb. Some older iOS and older PhantomJS fail to return the descriptor. Don't do anything\n // and don't bother to update the element.\n var realGet = methodDescriptor.get;\n methodDescriptor.get = function() {\n if (isFormMethodDialog(this)) {\n return 'dialog';\n }\n return realGet.call(this);\n };\n var realSet = methodDescriptor.set;\n /** @this {HTMLElement} */\n methodDescriptor.set = function(v) {\n if (typeof v === 'string' && v.toLowerCase() === 'dialog') {\n return this.setAttribute('method', v);\n }\n return realSet.call(this, v);\n };\n Object.defineProperty(HTMLFormElement.prototype, 'method', methodDescriptor);\n }\n }\n\n /**\n * Global 'click' handler, to capture the <input type=\"submit\"> or <button> element which has\n * submitted a <form method=\"dialog\">. Needed as Safari and others don't report this inside\n * document.activeElement.\n */\n document.addEventListener('click', function(ev) {\n dialogPolyfill.formSubmitter = null;\n dialogPolyfill.imagemapUseValue = null;\n if (ev.defaultPrevented) { return; } // e.g. a submit which prevents default submission\n\n var target = /** @type {Element} */ (ev.target);\n if ('composedPath' in ev) {\n var path = ev.composedPath();\n target = path.shift() || target;\n }\n if (!target || !isFormMethodDialog(target.form)) { return; }\n\n var valid = (target.type === 'submit' && ['button', 'input'].indexOf(target.localName) > -1);\n if (!valid) {\n if (!(target.localName === 'input' && target.type === 'image')) { return; }\n // this is a <input type=\"image\">, which can submit forms\n dialogPolyfill.imagemapUseValue = ev.offsetX + ',' + ev.offsetY;\n }\n\n var dialog = findNearestDialog(target);\n if (!dialog) { return; }\n\n dialogPolyfill.formSubmitter = target;\n\n }, false);\n\n /**\n * Global 'submit' handler. This handles submits of `method=\"dialog\"` which are invalid, i.e.,\n * outside a dialog. They get prevented.\n */\n document.addEventListener('submit', function(ev) {\n var form = ev.target;\n var dialog = findNearestDialog(form);\n if (dialog) {\n return; // ignore, handle there\n }\n\n var submitter = findFormSubmitter(ev);\n var formmethod = submitter && submitter.getAttribute('formmethod') || form.getAttribute('method');\n if (formmethod === 'dialog') {\n ev.preventDefault();\n }\n });\n\n /**\n * Replace the native HTMLFormElement.submit() method, as it won't fire the\n * submit event and give us a chance to respond.\n */\n var nativeFormSubmit = HTMLFormElement.prototype.submit;\n var replacementFormSubmit = function () {\n if (!isFormMethodDialog(this)) {\n return nativeFormSubmit.call(this);\n }\n var dialog = findNearestDialog(this);\n dialog && dialog.close();\n };\n HTMLFormElement.prototype.submit = replacementFormSubmit;\n}\n\nexport default dialogPolyfill;\n",":host {\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n\n --z-modal-content-padding: calc(var(--space-unit) * 2);\n}\n\n:host > dialog {\n padding: 0;\n border: none;\n margin: 0;\n background-color: transparent;\n}\n\n/* stylelint-disable selector-pseudo-class-no-unknown */\n:host > dialog:modal {\n width: 100%;\n max-width: 100%;\n max-height: 100%;\n}\n\n:host > dialog::backdrop {\n display: none;\n}\n\n/* polyfill style */\n:host > dialog + .backdrop {\n display: none;\n}\n\n:host > dialog:not([open]) {\n display: none;\n}\n\n:host > dialog[open] {\n display: block;\n}\n\n::slotted([slot=\"modalContent\"]) {\n padding: var(--z-modal-content-padding);\n}\n\n.modal-container {\n z-index: 1010;\n display: flex;\n overflow: -moz-scrollbars-none;\n width: 100%;\n height: 100vh;\n flex-direction: column;\n}\n\n.modal-container > .modal-content-scroll-outside {\n overflow: auto;\n background: var(--color-surface01);\n}\n\n.modal-container > header {\n padding: calc(var(--space-unit) * 1.75) calc(var(--space-unit) * 2) calc(var(--space-unit) * 1.75)\n calc(var(--space-unit) * 2);\n background: var(--color-background);\n}\n\n.modal-container > header button {\n padding: 0;\n border: none;\n margin: 0;\n margin-left: auto;\n background: transparent;\n cursor: pointer;\n}\n\n.modal-container > header button:focus-visible {\n border-radius: 50%;\n box-shadow: var(--shadow-focus-primary);\n outline: none !important;\n}\n\n.modal-container > header button::after {\n position: absolute;\n top: 6px;\n right: 4px;\n display: block;\n width: 40px;\n height: 40px;\n background-color: transparent;\n content: \"\";\n}\n\n.modal-container > header z-icon {\n --z-icon-width: calc(var(--space-unit) * 2.25);\n --z-icon-height: calc(var(--space-unit) * 2.25);\n\n display: flex;\n fill: var(--color-primary01-icon);\n}\n\n.modal-container > header > div {\n display: flex;\n width: 100%;\n align-items: baseline;\n margin-right: calc(var(--space-unit) * 2);\n}\n\n.modal-container > header h1,\n.modal-container > header .subtitle {\n padding: 0;\n margin: 0;\n color: var(--color-default-text);\n font-weight: var(--font-sb);\n}\n\n.modal-container > header h1 {\n font-size: var(--font-size-5);\n letter-spacing: 0;\n line-height: 1.4;\n}\n\n.modal-container > header .subtitle {\n font-size: var(--font-size-3);\n font-weight: var(--font-rg);\n letter-spacing: 0;\n line-height: 1.5;\n}\n\n.modal-container > header > div > h1 *:empty {\n display: none;\n}\n\n.modal-container > header h1 + .subtitle {\n margin-top: calc(var(--space-unit) * 0.5);\n}\n\n.modal-container-scroll-inside > .modal-content-scroll-inside {\n overflow: hidden auto;\n flex: 1 auto;\n background: var(--color-surface01);\n}\n\n.modal-container-scroll-inside > .modal-content-scroll-inside::-webkit-scrollbar,\n.modal-container-scroll-outside > .modal-content-scroll-outside::-webkit-scrollbar {\n width: 6px;\n background: linear-gradient(to right, transparent 0 1px, var(--gray200) 1px 5px, transparent 5px 6px);\n}\n\n.modal-container-scroll-inside > .modal-content-scroll-inside::-webkit-scrollbar-thumb,\n.modal-container-scroll-outside > .modal-content-scroll-outside::-webkit-scrollbar-thumb {\n background-color: var(--color-primary01);\n}\n\n.modal-container-scroll-inside > .modal-content-scroll-inside::-webkit-scrollbar-thumb:hover,\n.modal-container-scroll-outside > .modal-content-scroll-outside::-webkit-scrollbar-thumb:hover {\n background-color: var(--color-hover-primary);\n}\n\n/* Firefox */\n@supports not selector(::-webkit-scrollbar-track) {\n .modal-container-scroll-inside .modal-content-scroll-inside,\n .modal-container-scroll-outside .modal-content-scroll-outside {\n scrollbar-color: var(--color-primary01) transparent;\n }\n}\n\n/* Tablet / Desktop */\n@media only screen and (min-width: 768px) {\n .modal-background {\n position: fixed;\n top: 0;\n left: 0;\n overflow: hidden;\n width: 100vw;\n height: 100vh;\n background-color: var(--gray900);\n opacity: 0.7;\n }\n\n .modal-background.modal-background-scroll-outside {\n position: sticky;\n }\n\n .modal-container-scroll-inside {\n position: fixed;\n top: calc(var(--space-unit) * 6);\n left: 50%;\n overflow: hidden;\n width: auto;\n min-width: calc(var(--space-unit) * 40);\n height: auto;\n min-height: calc(var(--space-unit) * 40);\n max-height: calc(100vh - calc(var(--space-unit) * 6 * 2));\n border-radius: var(--border-radius);\n transform: translateX(-50%);\n }\n\n .modal-container-scroll-outside {\n position: absolute;\n top: calc(var(--space-unit) * 6);\n left: 50%;\n display: block;\n overflow: initial;\n width: auto;\n min-width: calc(var(--space-unit) * 40);\n height: auto;\n min-height: calc(var(--space-unit) * 40);\n max-height: calc(100vh - calc(var(--space-unit) * 6 * 2));\n transform: translateX(-50%);\n }\n\n .modal-container > .modal-content-scroll-outside {\n overflow: initial;\n }\n\n .modal-container-scroll-outside > header,\n .modal-container-scroll-inside > header {\n border-top-left-radius: var(--border-radius);\n border-top-right-radius: var(--border-radius);\n }\n\n .modal-container-scroll-outside::after {\n display: block;\n height: calc(var(--space-unit) * 6);\n content: \" \";\n }\n\n .modal-dialog {\n position: fixed;\n top: 0;\n left: 0;\n height: auto;\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .modal-content-scroll-outside {\n border-bottom-left-radius: var(--border-radius);\n border-bottom-right-radius: var(--border-radius);\n }\n\n .modal-dialog::-webkit-scrollbar {\n display: none;\n }\n}\n\n/* Desktop */\n@media only screen and (min-width: 1152px) {\n .modal-container > header {\n padding-top: calc(var(--space-unit) * 1.5);\n padding-bottom: calc(var(--space-unit) * 1.5);\n }\n\n .modal-container > header h1 {\n font-size: var(--font-size-6);\n font-weight: var(--font-sb);\n letter-spacing: 0;\n line-height: 1.333;\n }\n\n .modal-container > header .subtitle {\n font-size: var(--font-size-4);\n font-weight: var(--font-rg);\n letter-spacing: 0;\n line-height: 1.5;\n }\n\n .modal-container > header h1 + .subtitle {\n margin-top: 0;\n }\n}\n","import {Component, Element, Event, EventEmitter, Listen, Method, Prop, h} from \"@stencil/core\";\nimport dialogPolyfill from \"dialog-polyfill\";\nimport {KeyboardCode} from \"../../beans\";\n\nconst FOCUSABLE_ELEMENTS_SELECTOR =\n ':is(button, input, select, textarea, [contenteditable=\"\"], [contenteditable=\"true\"], a[href], [tabindex], summary):not([disabled], [disabled=\"\"], [tabindex=\"-1\"], [aria-hidden=\"true\"], [hidden])';\n\n/**\n * @slot modalCloseButton - accept custom close button\n * @slot modalContent - set the content of the modal\n * @cssprop --z-modal-content-padding - set a default padding for the modal content slot to 16px\n */\n@Component({\n tag: \"z-modal\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZModal {\n /** unique id */\n @Prop()\n modalid: string;\n\n /** title text (optional) */\n @Prop()\n modaltitle?: string;\n\n /** subtitle (optional) */\n @Prop()\n modalsubtitle?: string;\n\n /** aria-label for close button (optional) */\n @Prop()\n closeButtonLabel = \"chiudi modale\";\n\n /** add role \"alertdialog\" to dialog (optional, default is false) */\n @Prop()\n alertdialog?: boolean = false;\n\n /** if true, the modal is closable (optional, default is true) */\n @Prop()\n closable?: boolean = true;\n\n /** if true, the modal can scroll inside, if false the viewport can scroll */\n @Prop()\n scrollInside?: boolean = true;\n\n private dialog: HTMLDialogElement;\n\n @Element() host: HTMLZModalElement;\n\n /** emitted on close button click, returns modalid */\n @Event()\n modalClose: EventEmitter;\n\n private emitModalClose(): void {\n if (this.closable) {\n this.modalClose.emit({modalid: this.modalid});\n }\n }\n\n /** emitted on modal header click, returns modalid */\n @Event()\n modalHeaderActive: EventEmitter;\n\n private emitModalHeaderActive(): void {\n this.modalHeaderActive.emit({modalid: this.modalid});\n }\n\n /** emitted on background click, returns modalid */\n @Event()\n modalBackgroundClick: EventEmitter;\n\n private emitBackgroundClick(): void {\n if (this.closable) {\n this.modalBackgroundClick.emit({modalid: this.modalid});\n }\n }\n\n componentDidLoad(): void {\n if (typeof window.HTMLDialogElement !== \"function\") {\n /* workaround to fix `registerDialog` in test environment:\n stencil converts html elements to MockHTMLElement but this element is missing the `localName` property,\n which is used by `registerDialog` to recognize the element as dialog */\n if (!this.dialog.localName) {\n Object.defineProperty(this.dialog, \"localName\", {value: \"dialog\"});\n }\n dialogPolyfill.registerDialog(this.dialog);\n this.dialog.setAttribute(\"open\", \"true\");\n } else {\n this.open();\n }\n }\n\n /** open modal */\n @Method()\n async open(): Promise<void> {\n this.dialog?.showModal();\n }\n\n /** close modal */\n @Method()\n async close(): Promise<void> {\n if (this.closable) {\n this.dialog?.close();\n }\n }\n\n /**\n * Get a list of focusable elements in the dialog.\n * Remove elements with `display: none` from the list, because they're not focusable.\n *\n * N.B. The list is built on the assumption that elements inside shadow root are placed ALL before the `modalContent` slot.\n * Adding focusable elements after the `modalContent` slot would break the order of elements in the list.\n */\n private get focusableElements(): HTMLElement[] {\n return [\n ...Array.from(this.host.shadowRoot.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENTS_SELECTOR)),\n ...Array.from(this.host.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENTS_SELECTOR)),\n ].filter((element) => getComputedStyle(element).display !== \"none\");\n }\n\n @Listen(\"keydown\")\n handleKeyDown(e: KeyboardEvent): void {\n if (e.code === KeyboardCode.ESC && !this.closable) {\n e.preventDefault();\n }\n\n if (e.code !== KeyboardCode.TAB) {\n return;\n }\n\n const focusableElements = this.focusableElements;\n const shadowActiveElement = this.host.shadowRoot.activeElement;\n const activeElement = this.host.ownerDocument.activeElement;\n const firstFocusableElement = focusableElements[0];\n const lastFocusableElement = focusableElements[focusableElements.length - 1];\n if (e.shiftKey && (shadowActiveElement == firstFocusableElement || activeElement == firstFocusableElement)) {\n // shift + tab was pressed and current active element is the first focusable element\n e.preventDefault();\n lastFocusableElement.focus();\n } else if (!e.shiftKey && (shadowActiveElement == lastFocusableElement || activeElement == lastFocusableElement)) {\n // shift + tab was pressed and current active element is the first focusable element\n e.preventDefault();\n firstFocusableElement.focus();\n }\n }\n\n private closeButtonSlot(): HTMLElement | void {\n if (this.closable) {\n return (\n <slot name=\"modalCloseButton\">\n <button\n aria-label={this.closeButtonLabel}\n onClick={() => this.close()}\n >\n <z-icon name=\"multiply-circle-filled\"></z-icon>\n </button>\n </slot>\n );\n }\n }\n\n private handleEscape(e: Event): void {\n if (this.closable) {\n return;\n }\n e.preventDefault();\n }\n\n render(): HTMLZModalElement {\n return (\n <dialog\n class={{\n \"modal-dialog\": !this.scrollInside,\n }}\n aria-labelledby=\"modal-title\"\n aria-describedby=\"modal-content\"\n role={this.alertdialog ? \"alertdialog\" : undefined}\n ref={(el) => (this.dialog = el as HTMLDialogElement)}\n onClose={() => this.emitModalClose()}\n onCancel={(e) => this.handleEscape(e)}\n >\n <div\n class={{\n \"modal-container\": true,\n \"modal-container-scroll-inside\": this.scrollInside,\n \"modal-container-scroll-outside\": !this.scrollInside,\n }}\n id={this.modalid}\n >\n <header onClick={this.emitModalHeaderActive.bind(this)}>\n <div>\n {this.modaltitle && <h1 id=\"modal-title\">{this.modaltitle}</h1>}\n {this.closeButtonSlot()}\n </div>\n {this.modalsubtitle && (\n <div\n class=\"subtitle\"\n id=\"modal-subtitle\"\n >\n {this.modalsubtitle}\n </div>\n )}\n </header>\n\n <div\n class={{\n \"modal-content-scroll-inside\": this.scrollInside,\n \"modal-content-scroll-outside\": !this.scrollInside,\n }}\n id=\"modal-content\"\n >\n <slot name=\"modalContent\"></slot>\n </div>\n </div>\n <div\n class={{\n \"modal-background\": true,\n \"modal-background-scroll-outside\": !this.scrollInside,\n }}\n data-action=\"modalBackground\"\n data-modal={this.modalid}\n onClick={() => {\n this.emitBackgroundClick();\n this.close();\n }}\n ></div>\n </dialog>\n );\n }\n}\n"],"mappings":"oGAAA,MAAMA,EAAY,g+CAClB,MAAAC,EAAeD,E,MCMFE,EAAa,M,gHAOb,K,CAMH,MAAAC,CAAOC,GACbA,EAAEC,iBACFC,KAAKC,SAAW,MAChB,GAAIH,EAAEI,aAAaC,MAAMC,OAAQ,CAC/BJ,KAAKK,YAAYC,KAAKR,EAAEI,aAAaC,M,EAIzC,MAAAI,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CACHC,MAAO,CAACC,SAAUZ,KAAKC,UACvBY,WAAaf,IACXA,EAAEC,iBACFC,KAAKC,SAAW,IAAI,EAEtBa,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Q,EAAA,OAAAE,IAAA,4CACGV,KAAKgS,YAAcxR,EAAA,MAAAE,IAAA,2CAAIqR,GAAG,eAAe/R,KAAKgS,YAC9ChS,KAAKqR,mBAEPrR,KAAKiS,eACJzR,EAAA,OAAAE,IAAA,2CACEC,MAAM,WACNoR,GAAG,kBAEF/R,KAAKiS,gBAKZzR,EAAA,OAAAE,IAAA,2CACEC,MAAO,CACL,8BAA+BX,KAAKyR,aACpC,gCAAiCzR,KAAKyR,cAExCM,GAAG,iBAEHvR,EAAA,QAAAE,IAAA,2CAAM8G,KAAK,mBAGfhH,EAAA,OAAAE,IAAA,2CACEC,MAAO,CACL,mBAAoB,KACpB,mCAAoCX,KAAKyR,cAC1C,cACW,kBAAiB,aACjBzR,KAAKgQ,QACjBuB,QAAS,KACPvR,KAAKmQ,sBACLnQ,KAAK8F,OAAO,I","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as e,h as t,g as o}from"./p-75c4a726.js";import{L as i}from"./p-2b309f57.js";const a='footer{position:relative;z-index:5;top:0;width:auto;height:calc(var(--space-unit) * 6);padding:0;border-top:var(--border-size-medium) solid var(--color-surface03);margin:0;background-color:var(--color-surface01);border-radius:0 0 var(--border-radius) var(--border-radius);color:var(--color-surface05);font-family:var(--font-family-sans);font-weight:var(--font-rg);transition:height 500ms ease-in-out,\n top 500ms ease-in-out}footer.real,footer.trial,footer.temp{border-top:var(--border-size-medium) solid var(--blue100)}footer .bold{font-family:var(--font-family-sans);font-weight:var(--font-sb)}footer>p{overflow:hidden;height:40px;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 2) var(--space-unit) calc(var(--space-unit) * 2);margin:0;background-color:var(--color-surface01);font-family:var(--font-family-sans);font-size:16px;font-weight:var(--font-rg);line-height:22px;transition:all 200ms linear}footer.isopen>p{background-color:var(--gray200);font-size:14px;font-weight:var(--font-sb);transition:all 200ms linear}footer.isopen.real>p,footer.isopen.trial>p,footer.isopen.temp>p{background-color:var(--blue100)}footer .visible{display:block}footer .hidden{display:none}footer>div.content{overflow:hidden;height:60px}footer>div.content>div:not(.slot-handler){padding:var(--space-unit) calc(var(--space-unit) * 2)}footer>div.content>div>p{overflow:hidden;height:20px;padding:0;margin:0;font-size:14px;line-height:20px;text-overflow:ellipsis;white-space:nowrap}footer>div.content>div>p.year-isbn{display:flex;flex-direction:row;justify-content:space-between;padding-top:var(--space-unit)}footer>div.content>div>p.year-isbn>span.isbn{overflow:hidden;text-overflow:ellipsis}footer.isopen>div.content>div:not(.slot-handler){height:68px}footer.isopen>div.content>div>p.authors{height:40px;text-overflow:initial;white-space:initial}footer.isopen>div.content>div>p.year-isbn{height:50px;flex-direction:column;padding-left:0}footer.isopen>div.content>div>p.year-isbn>span.isbn{display:inline-grid;padding-left:0}footer.isopen{top:-212px;height:295px;transition:height 500ms ease-in-out,\n top 500ms ease-in-out}footer.isopen.custom-content{top:-292px}footer.isopen>div.content{height:280px;transition:height 500ms ease-in-out,\n top 500ms ease-in-out}footer.isopen.custom-content>div.content{height:230px}.toggle{position:absolute;z-index:10;top:-24px;left:16px}.faded{opacity:0.3;pointer-events:none}footer>p.custom-content,footer .content.custom-content{display:none}footer.isopen>p.custom-content,footer.isopen .content.custom-content{display:block}div.wrapper{position:relative;height:100%}div.wrapper ::slotted([slot="content"]){position:absolute;z-index:10;top:calc(var(--space-unit) * 2);display:block;width:100%;height:112px;box-sizing:border-box;padding:0 calc(var(--space-unit) * 2);border-top:var(--border-size-medium) solid transparent;background:var(--color-white)}div.wrapper.isopen ::slotted([slot="content"]){top:0;bottom:0;height:128px;padding:calc(var(--space-unit) * 2);border-color:var(--blue100)}';const s=a;const n=class{constructor(t){e(this,t);this.titolo=undefined;this.autori=undefined;this.isbn=undefined;this.faded=undefined;this.cardtype=undefined;this.opened=false;this.customContent=false;this.isOpen=false;this.allowTooltipAuthors=false}handleToggle(){this.isOpen=!this.isOpen;if(this.isOpen){const e=this.getFirstListItem();if(e){requestAnimationFrame((()=>{e.focus()}))}}}getTitleAuthors(){return this.allowTooltipAuthors?this.autori:""}componentWillLoad(){if(this.opened){this.isOpen=true}}elementsEllipsis(){this.allowTooltipAuthors=this.elementAuthorsHasEllipsis()?true:false}elementAuthorsHasEllipsis(){return this.ellipsisAuthors.offsetWidth<this.ellipsisAuthors.scrollWidth}retrieveClass(){return{isopen:this.isOpen,real:this.cardtype===i.REAL,trial:this.cardtype===i.TRIAL,temp:this.cardtype===i.TEMP,"custom-content":this.customContent}}footerTransitionHandler(e){if(["visibility","height"].includes(e.propertyName)){this.elementsEllipsis()}}getFirstListItem(){return this.host.querySelector("[slot=list] > li a")}render(){return t("div",{key:"dadb29ba9e0aa0037a90d8e2564fa2a203c9898f",class:Object.assign(Object.assign({},this.retrieveClass()),{wrapper:true})},t("footer",{key:"3fa010af7929efef3d957b5855745b6153a93ddd",class:this.retrieveClass(),onTransitionEnd:e=>this.footerTransitionHandler(e)},t("span",{key:"ebba12731f21021f4fe5854e487f0a24eda0e22b",class:"toggle"},t("slot",{key:"c241b4d1182ca8cefbfdfcb9d2db294299c3a67c",name:"toggle"})),this.titolo&&t("p",{key:"83683f8a76d1ff998aca1f79cf5e219a310d581c",class:{"custom-content":this.customContent}},this.titolo),t("div",{key:"1903067d261cd4a9d12726d463d6b036c663402b",class:{content:true,"custom-content":this.customContent}},t("div",{key:"346c8e222c82ffed27b0108d2f57f921705e7f5e"},t("p",{key:"396ff63071b02d1cbab2afbac1abff5fa197d70a",class:"authors",ref:e=>this.ellipsisAuthors=e},t("span",{key:"86444e75181b607ef3e28f2b13a0fa999fe88b94",title:this.getTitleAuthors()},t("span",{key:"43e9fb0ceb195e3b2583de1b077b95ae88f875bf","aria-description":"Autori",class:"bold"},this.autori))),t("p",{key:"2ce4b6829e57f254abd3ef53420a2983d872fcd8",class:"year-isbn"},t("span",{key:"0b0a3ee12129daa10a5c145ad2c91e2ed6a2d2de",class:"isbn"},t("span",{key:"eb1c78693724c737d6de9612c5cfbe774c4b67e4"},t("span",{key:"4efbbec95933b2dd5eec936b536b1692d1348b44","aria-description":"ISBN edizione cartacea",class:"bold"},this.isbn)," ","(ed. cartacea)")))),t("div",{key:"4d697bf96ce3b881fda2a4976229911e8876a281",class:`slot-handler ${this.isOpen?"visible":"hidden"}`},t("slot",{key:"0f8a194c7f5b44e306a1150a2196fdf63ae69e6d",name:"list"})))),this.customContent&&t("slot",{key:"6e93d147ad70517df5d17a9e1f055a987eab0680",name:"content"}))}get host(){return o(this)}};n.style=s;export{n as z_myz_card_footer};
2
- //# sourceMappingURL=p-475a2ba2.entry.js.map
1
+ import{r as e,h as t,g as o}from"./p-75c4a726.js";import{L as i}from"./p-b34993de.js";const a='footer{position:relative;z-index:5;top:0;width:auto;height:calc(var(--space-unit) * 6);padding:0;border-top:var(--border-size-medium) solid var(--color-surface03);margin:0;background-color:var(--color-surface01);border-radius:0 0 var(--border-radius) var(--border-radius);color:var(--color-surface05);font-family:var(--font-family-sans);font-weight:var(--font-rg);transition:height 500ms ease-in-out,\n top 500ms ease-in-out}footer.real,footer.trial,footer.temp{border-top:var(--border-size-medium) solid var(--blue100)}footer .bold{font-family:var(--font-family-sans);font-weight:var(--font-sb)}footer>p{overflow:hidden;height:40px;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 2) var(--space-unit) calc(var(--space-unit) * 2);margin:0;background-color:var(--color-surface01);font-family:var(--font-family-sans);font-size:16px;font-weight:var(--font-rg);line-height:22px;transition:all 200ms linear}footer.isopen>p{background-color:var(--gray200);font-size:14px;font-weight:var(--font-sb);transition:all 200ms linear}footer.isopen.real>p,footer.isopen.trial>p,footer.isopen.temp>p{background-color:var(--blue100)}footer .visible{display:block}footer .hidden{display:none}footer>div.content{overflow:hidden;height:60px}footer>div.content>div:not(.slot-handler){padding:var(--space-unit) calc(var(--space-unit) * 2)}footer>div.content>div>p{overflow:hidden;height:20px;padding:0;margin:0;font-size:14px;line-height:20px;text-overflow:ellipsis;white-space:nowrap}footer>div.content>div>p.year-isbn{display:flex;flex-direction:row;justify-content:space-between;padding-top:var(--space-unit)}footer>div.content>div>p.year-isbn>span.isbn{overflow:hidden;text-overflow:ellipsis}footer.isopen>div.content>div:not(.slot-handler){height:68px}footer.isopen>div.content>div>p.authors{height:40px;text-overflow:initial;white-space:initial}footer.isopen>div.content>div>p.year-isbn{height:50px;flex-direction:column;padding-left:0}footer.isopen>div.content>div>p.year-isbn>span.isbn{display:inline-grid;padding-left:0}footer.isopen{top:-212px;height:295px;transition:height 500ms ease-in-out,\n top 500ms ease-in-out}footer.isopen.custom-content{top:-292px}footer.isopen>div.content{height:280px;transition:height 500ms ease-in-out,\n top 500ms ease-in-out}footer.isopen.custom-content>div.content{height:230px}.toggle{position:absolute;z-index:10;top:-24px;left:16px}.faded{opacity:0.3;pointer-events:none}footer>p.custom-content,footer .content.custom-content{display:none}footer.isopen>p.custom-content,footer.isopen .content.custom-content{display:block}div.wrapper{position:relative;height:100%}div.wrapper ::slotted([slot="content"]){position:absolute;z-index:10;top:calc(var(--space-unit) * 2);display:block;width:100%;height:112px;box-sizing:border-box;padding:0 calc(var(--space-unit) * 2);border-top:var(--border-size-medium) solid transparent;background:var(--color-white)}div.wrapper.isopen ::slotted([slot="content"]){top:0;bottom:0;height:128px;padding:calc(var(--space-unit) * 2);border-color:var(--blue100)}';const s=a;const n=class{constructor(t){e(this,t);this.titolo=undefined;this.autori=undefined;this.isbn=undefined;this.faded=undefined;this.cardtype=undefined;this.opened=false;this.customContent=false;this.isOpen=false;this.allowTooltipAuthors=false}handleToggle(){this.isOpen=!this.isOpen;if(this.isOpen){const e=this.getFirstListItem();if(e){requestAnimationFrame((()=>{e.focus()}))}}}getTitleAuthors(){return this.allowTooltipAuthors?this.autori:""}componentWillLoad(){if(this.opened){this.isOpen=true}}elementsEllipsis(){this.allowTooltipAuthors=this.elementAuthorsHasEllipsis()?true:false}elementAuthorsHasEllipsis(){return this.ellipsisAuthors.offsetWidth<this.ellipsisAuthors.scrollWidth}retrieveClass(){return{isopen:this.isOpen,real:this.cardtype===i.REAL,trial:this.cardtype===i.TRIAL,temp:this.cardtype===i.TEMP,"custom-content":this.customContent}}footerTransitionHandler(e){if(["visibility","height"].includes(e.propertyName)){this.elementsEllipsis()}}getFirstListItem(){return this.host.querySelector("[slot=list] > li a")}render(){return t("div",{key:"dadb29ba9e0aa0037a90d8e2564fa2a203c9898f",class:Object.assign(Object.assign({},this.retrieveClass()),{wrapper:true})},t("footer",{key:"3fa010af7929efef3d957b5855745b6153a93ddd",class:this.retrieveClass(),onTransitionEnd:e=>this.footerTransitionHandler(e)},t("span",{key:"ebba12731f21021f4fe5854e487f0a24eda0e22b",class:"toggle"},t("slot",{key:"c241b4d1182ca8cefbfdfcb9d2db294299c3a67c",name:"toggle"})),this.titolo&&t("p",{key:"83683f8a76d1ff998aca1f79cf5e219a310d581c",class:{"custom-content":this.customContent}},this.titolo),t("div",{key:"1903067d261cd4a9d12726d463d6b036c663402b",class:{content:true,"custom-content":this.customContent}},t("div",{key:"346c8e222c82ffed27b0108d2f57f921705e7f5e"},t("p",{key:"396ff63071b02d1cbab2afbac1abff5fa197d70a",class:"authors",ref:e=>this.ellipsisAuthors=e},t("span",{key:"86444e75181b607ef3e28f2b13a0fa999fe88b94",title:this.getTitleAuthors()},t("span",{key:"43e9fb0ceb195e3b2583de1b077b95ae88f875bf","aria-description":"Autori",class:"bold"},this.autori))),t("p",{key:"2ce4b6829e57f254abd3ef53420a2983d872fcd8",class:"year-isbn"},t("span",{key:"0b0a3ee12129daa10a5c145ad2c91e2ed6a2d2de",class:"isbn"},t("span",{key:"eb1c78693724c737d6de9612c5cfbe774c4b67e4"},t("span",{key:"4efbbec95933b2dd5eec936b536b1692d1348b44","aria-description":"ISBN edizione cartacea",class:"bold"},this.isbn)," ","(ed. cartacea)")))),t("div",{key:"4d697bf96ce3b881fda2a4976229911e8876a281",class:`slot-handler ${this.isOpen?"visible":"hidden"}`},t("slot",{key:"0f8a194c7f5b44e306a1150a2196fdf63ae69e6d",name:"list"})))),this.customContent&&t("slot",{key:"6e93d147ad70517df5d17a9e1f055a987eab0680",name:"content"}))}get host(){return o(this)}};n.style=s;export{n as z_myz_card_footer};
2
+ //# sourceMappingURL=p-0df6b405.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,h as e,a}from"./p-75c4a726.js";import{A as s}from"./p-2b309f57.js";const i=":host{display:inline-flex;overflow:hidden;align-items:center;justify-content:center;background-color:var(--gray700);border-radius:50%;font-family:var(--font-family-sans);text-transform:uppercase}:host(.small),:host(.small)>img{width:calc(var(--space-unit) * 3);height:calc(var(--space-unit) * 3)}:host(.medium),:host(.medium)>img{width:calc(var(--space-unit) * 4);height:calc(var(--space-unit) * 4)}:host(.large),:host(.large)>img{width:calc(var(--space-unit) * 5);height:calc(var(--space-unit) * 5)}:host>img{object-fit:cover}";const r=i;const o=class{constructor(e){t(this,e);var a,i;this.size=s.MEDIUM;this.text=undefined;this.textColor="color-white";this.backgroundColor="gray700";this.image=undefined;if(((a=this.text)===null||a===void 0?void 0:a.length)===0&&((i=this.image)===null||i===void 0?void 0:i.length)===0){console.warn("z-avatar must contain at least one prop between text and image")}}getTextSize(){if(this.size===s.SMALL){return"5"}else if(this.size===s.MEDIUM){return"4"}else if(this.size===s.LARGE){return"2"}}render(){return e(a,{key:"77ef834dbf6ba1e73562dea4e1011196d8decee4",class:{[this.size]:true,[`body-${this.getTextSize()}-sb`]:true},style:{color:`var(--${this.textColor})`,backgroundColor:`var(--${this.backgroundColor})`}},this.text&&!this.image&&e("span",{key:"41eab447479aa532c45f39aae303d7388928aedf"},this.text.substring(0,2)),this.image&&e("img",{key:"e6ebedad5e2bf6c73107b174dad478ba0dd4c9d2",src:this.image,onError:()=>this.image=""}))}};o.style=r;export{o as z_avatar};
2
- //# sourceMappingURL=p-8e544914.entry.js.map
1
+ import{r as t,h as e,a}from"./p-75c4a726.js";import{A as s}from"./p-b34993de.js";const i=":host{display:inline-flex;overflow:hidden;align-items:center;justify-content:center;background-color:var(--gray700);border-radius:50%;font-family:var(--font-family-sans);text-transform:uppercase}:host(.small),:host(.small)>img{width:calc(var(--space-unit) * 3);height:calc(var(--space-unit) * 3)}:host(.medium),:host(.medium)>img{width:calc(var(--space-unit) * 4);height:calc(var(--space-unit) * 4)}:host(.large),:host(.large)>img{width:calc(var(--space-unit) * 5);height:calc(var(--space-unit) * 5)}:host>img{object-fit:cover}";const r=i;const o=class{constructor(e){t(this,e);var a,i;this.size=s.MEDIUM;this.text=undefined;this.textColor="color-white";this.backgroundColor="gray700";this.image=undefined;if(((a=this.text)===null||a===void 0?void 0:a.length)===0&&((i=this.image)===null||i===void 0?void 0:i.length)===0){console.warn("z-avatar must contain at least one prop between text and image")}}getTextSize(){if(this.size===s.SMALL){return"5"}else if(this.size===s.MEDIUM){return"4"}else if(this.size===s.LARGE){return"2"}}render(){return e(a,{key:"77ef834dbf6ba1e73562dea4e1011196d8decee4",class:{[this.size]:true,[`body-${this.getTextSize()}-sb`]:true},style:{color:`var(--${this.textColor})`,backgroundColor:`var(--${this.backgroundColor})`}},this.text&&!this.image&&e("span",{key:"41eab447479aa532c45f39aae303d7388928aedf"},this.text.substring(0,2)),this.image&&e("img",{key:"e6ebedad5e2bf6c73107b174dad478ba0dd4c9d2",src:this.image,onError:()=>this.image=""}))}};o.style=r;export{o as z_avatar};
2
+ //# sourceMappingURL=p-11216ee8.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,h as s,a as i,g as o}from"./p-75c4a726.js";import{g as a}from"./p-2b309f57.js";const n=':host{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:0;font-family:var(--font-family-sans)}:host,::slotted(*),*{box-sizing:border-box}::slotted(a){text-decoration:none}::slotted(*){color:var(--color-default-text);font-family:var(--font-family-sans);font-weight:var(--font-rg)}.label{display:flex;width:100%;align-items:center;padding:var(--space-unit) 0;border:0;border-bottom:var(--border-size-small) solid var(--color-surface03);margin:0;background:transparent;border-radius:0;cursor:pointer;text-align:left}:host(:last-child:not([open])) .label{border-bottom:none}:host(:is([active],[open])) .label,.label:focus:focus-visible,.label:hover{border-color:var(--color-primary01)}.label:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}:host(:is([active],[open])) .label ::slotted(*),.label:focus:focus-visible ::slotted(*),.label:hover ::slotted(*){font-weight:var(--font-bd)}::slotted([data-text]){display:inline-flex;flex-direction:column}::slotted([data-text])::after{overflow:hidden;height:0;content:attr(data-text);content:attr(data-text) / "";font-weight:var(--font-bd);pointer-events:none;user-select:none;visibility:hidden}@media speech{::slotted([data-text])::after{display:none}}.label ::slotted(*){width:100%;margin:0;font-size:var(--font-size-3);line-height:1.5}.label z-icon{margin-left:calc(var(--space-unit) * 4);fill:var(--color-default-icon)}.items{display:flex;width:100%;flex-direction:column;padding:calc(var(--space-unit) / 2);padding-bottom:calc(var(--space-unit) * 1.5)}.items[hidden]{display:none}::slotted([slot="section"]){display:inline-flex;padding:calc(var(--space-unit) / 2);margin:0;font-size:var(--font-size-1);line-height:1.333;outline:none}::slotted([slot="section"]:last-of-type){border:none}::slotted([slot="section"]:focus:focus-visible){box-shadow:var(--shadow-focus-primary);color:var(--color-primary01)}::slotted([slot="section"]:hover),::slotted([slot="section"]:focus:focus-visible),::slotted([slot="section"][active]){color:var(--color-primary01);font-weight:var(--font-bd)}';const h=n;const l=class{get focusableItem(){return this.items.find((({tabIndex:t})=>t===0))}toggle(){if(!this.hasItems){return}this.open=!this.open}setItemsA11yAttrs(){if(!this.hasItems){return}this.items.forEach((t=>{t.setAttribute("role","menuitem");t.tabIndex=-1}))}onItemsChange(){this.items=Array.from(this.host.querySelectorAll('[slot="section"]'));this.hasItems=this.items.length>0;this.setItemsA11yAttrs()}onLabelSlotChange(t){const e=t.target.assignedElements()[0];e.dataset.text=e===null||e===void 0?void 0:e.textContent}onLabelClick(){this.toggle();this.setFocus()}onLabelKeydown(t){if(t.key===a.ENTER||t.key===a.SPACE){t.preventDefault();t.stopPropagation();this.toggle();if(this.open){this.focustFirstItem()}}}moveFocus(t,e){t.tabIndex=0;setTimeout((()=>{t.focus()}),100);if(e){e.tabIndex=-1}}focustFirstItem(){this.moveFocus(this.items[0])}async focusLastItem(){this.moveFocus(this.items[this.items.length-1])}async setFocus(){this.htmlTabindex=0;setTimeout((()=>{this.label.focus()}),100)}onOpenChange(){if(!this.open){this.setItemsA11yAttrs();this.closed.emit()}else{this.opened.emit()}}onTabindexChange(){this.label.tabIndex=this.htmlTabindex}onItemsKeydown(t){switch(t.key){case a.ESC:case a.ARROW_LEFT:if(!this.open){break}t.preventDefault();t.stopPropagation();this.moveFocus(this.label,this.focusableItem);this.open=false;break;case a.ARROW_RIGHT:if(this.open){break}t.preventDefault();t.stopPropagation();this.open=true;this.focustFirstItem();break;case a.ARROW_DOWN:{if(!this.open){break}if(document.activeElement===this.host){t.preventDefault();t.stopPropagation();this.focustFirstItem();break}const e=this.items.indexOf(this.focusableItem);const s=this.items[e+1];if(s){t.preventDefault();t.stopPropagation();this.moveFocus(s,this.focusableItem)}else{this.htmlTabindex=0;this.focusableItem.tabIndex=-1}break}case a.ARROW_UP:{if(!this.open||document.activeElement===this.host){break}const e=this.items.indexOf(this.focusableItem);const s=this.items[e-1];t.preventDefault();t.stopPropagation();if(s){this.moveFocus(s,this.focusableItem)}else{this.focusableItem.tabIndex=-1;this.setFocus()}break}}}constructor(s){t(this,s);this.opened=e(this,"opened",7);this.closed=e(this,"closed",7);this.active=undefined;this.htmlTabindex=-1;this.open=undefined;this.hasItems=undefined;this.items=undefined;this.toggle=this.toggle.bind(this);this.onItemsChange=this.onItemsChange.bind(this);this.onLabelSlotChange=this.onLabelSlotChange.bind(this);this.onLabelClick=this.onLabelClick.bind(this);this.onLabelKeydown=this.onLabelKeydown.bind(this);this.onItemsKeydown=this.onItemsKeydown.bind(this)}connectedCallback(){this.onItemsChange()}render(){return s(i,{key:"ca61d9daac35484cf3fa3a7ab4d6b5700dade8b0",open:this.open},s("button",{key:"d2750e008a22b0de43075ed947d1b9e0f6917bd5",ref:t=>this.label=t,class:"label","aria-haspopup":`${!!this.hasItems}`,"aria-expanded":`${!!this.open}`,role:"menuitem",tabindex:this.htmlTabindex,onClick:this.onLabelClick,onKeyDown:this.onLabelKeydown},s("slot",{key:"be5dad19dd6fece321bb68ff89e17372f4353539",onSlotchange:this.onLabelSlotChange}),this.hasItems&&s("z-icon",{key:"7c6fecfd96a4391394b17f3eea38aa7f29786a18",name:this.open?"chevron-up":"chevron-down"})),s("div",{key:"87512635c2b4377a6c304cc0bb1345131997e5f4",class:"items",role:"menu",hidden:!this.open},s("slot",{key:"b2dfb0d5a94adb555fb08c7592d5c58feb3c6c5f",name:"section",onSlotchange:this.onItemsChange})))}get host(){return o(this)}static get watchers(){return{open:["onOpenChange"],htmlTabindex:["onTabindexChange"]}}};l.style=h;export{l as z_menu_section};
2
- //# sourceMappingURL=p-6f5f2d56.entry.js.map
1
+ import{r as t,c as e,h as s,a as i,g as o}from"./p-75c4a726.js";import{g as a}from"./p-b34993de.js";const n=':host{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:0;font-family:var(--font-family-sans)}:host,::slotted(*),*{box-sizing:border-box}::slotted(a){text-decoration:none}::slotted(*){color:var(--color-default-text);font-family:var(--font-family-sans);font-weight:var(--font-rg)}.label{display:flex;width:100%;align-items:center;padding:var(--space-unit) 0;border:0;border-bottom:var(--border-size-small) solid var(--color-surface03);margin:0;background:transparent;border-radius:0;cursor:pointer;text-align:left}:host(:last-child:not([open])) .label{border-bottom:none}:host(:is([active],[open])) .label,.label:focus:focus-visible,.label:hover{border-color:var(--color-primary01)}.label:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}:host(:is([active],[open])) .label ::slotted(*),.label:focus:focus-visible ::slotted(*),.label:hover ::slotted(*){font-weight:var(--font-bd)}::slotted([data-text]){display:inline-flex;flex-direction:column}::slotted([data-text])::after{overflow:hidden;height:0;content:attr(data-text);content:attr(data-text) / "";font-weight:var(--font-bd);pointer-events:none;user-select:none;visibility:hidden}@media speech{::slotted([data-text])::after{display:none}}.label ::slotted(*){width:100%;margin:0;font-size:var(--font-size-3);line-height:1.5}.label z-icon{margin-left:calc(var(--space-unit) * 4);fill:var(--color-default-icon)}.items{display:flex;width:100%;flex-direction:column;padding:calc(var(--space-unit) / 2);padding-bottom:calc(var(--space-unit) * 1.5)}.items[hidden]{display:none}::slotted([slot="section"]){display:inline-flex;padding:calc(var(--space-unit) / 2);margin:0;font-size:var(--font-size-1);line-height:1.333;outline:none}::slotted([slot="section"]:last-of-type){border:none}::slotted([slot="section"]:focus:focus-visible){box-shadow:var(--shadow-focus-primary);color:var(--color-primary01)}::slotted([slot="section"]:hover),::slotted([slot="section"]:focus:focus-visible),::slotted([slot="section"][active]){color:var(--color-primary01);font-weight:var(--font-bd)}';const h=n;const l=class{get focusableItem(){return this.items.find((({tabIndex:t})=>t===0))}toggle(){if(!this.hasItems){return}this.open=!this.open}setItemsA11yAttrs(){if(!this.hasItems){return}this.items.forEach((t=>{t.setAttribute("role","menuitem");t.tabIndex=-1}))}onItemsChange(){this.items=Array.from(this.host.querySelectorAll('[slot="section"]'));this.hasItems=this.items.length>0;this.setItemsA11yAttrs()}onLabelSlotChange(t){const e=t.target.assignedElements()[0];e.dataset.text=e===null||e===void 0?void 0:e.textContent}onLabelClick(){this.toggle();this.setFocus()}onLabelKeydown(t){if(t.key===a.ENTER||t.key===a.SPACE){t.preventDefault();t.stopPropagation();this.toggle();if(this.open){this.focustFirstItem()}}}moveFocus(t,e){t.tabIndex=0;setTimeout((()=>{t.focus()}),100);if(e){e.tabIndex=-1}}focustFirstItem(){this.moveFocus(this.items[0])}async focusLastItem(){this.moveFocus(this.items[this.items.length-1])}async setFocus(){this.htmlTabindex=0;setTimeout((()=>{this.label.focus()}),100)}onOpenChange(){if(!this.open){this.setItemsA11yAttrs();this.closed.emit()}else{this.opened.emit()}}onTabindexChange(){this.label.tabIndex=this.htmlTabindex}onItemsKeydown(t){switch(t.key){case a.ESC:case a.ARROW_LEFT:if(!this.open){break}t.preventDefault();t.stopPropagation();this.moveFocus(this.label,this.focusableItem);this.open=false;break;case a.ARROW_RIGHT:if(this.open){break}t.preventDefault();t.stopPropagation();this.open=true;this.focustFirstItem();break;case a.ARROW_DOWN:{if(!this.open){break}if(document.activeElement===this.host){t.preventDefault();t.stopPropagation();this.focustFirstItem();break}const e=this.items.indexOf(this.focusableItem);const s=this.items[e+1];if(s){t.preventDefault();t.stopPropagation();this.moveFocus(s,this.focusableItem)}else{this.htmlTabindex=0;this.focusableItem.tabIndex=-1}break}case a.ARROW_UP:{if(!this.open||document.activeElement===this.host){break}const e=this.items.indexOf(this.focusableItem);const s=this.items[e-1];t.preventDefault();t.stopPropagation();if(s){this.moveFocus(s,this.focusableItem)}else{this.focusableItem.tabIndex=-1;this.setFocus()}break}}}constructor(s){t(this,s);this.opened=e(this,"opened",7);this.closed=e(this,"closed",7);this.active=undefined;this.htmlTabindex=-1;this.open=undefined;this.hasItems=undefined;this.items=undefined;this.toggle=this.toggle.bind(this);this.onItemsChange=this.onItemsChange.bind(this);this.onLabelSlotChange=this.onLabelSlotChange.bind(this);this.onLabelClick=this.onLabelClick.bind(this);this.onLabelKeydown=this.onLabelKeydown.bind(this);this.onItemsKeydown=this.onItemsKeydown.bind(this)}connectedCallback(){this.onItemsChange()}render(){return s(i,{key:"ca61d9daac35484cf3fa3a7ab4d6b5700dade8b0",open:this.open},s("button",{key:"d2750e008a22b0de43075ed947d1b9e0f6917bd5",ref:t=>this.label=t,class:"label","aria-haspopup":`${!!this.hasItems}`,"aria-expanded":`${!!this.open}`,role:"menuitem",tabindex:this.htmlTabindex,onClick:this.onLabelClick,onKeyDown:this.onLabelKeydown},s("slot",{key:"be5dad19dd6fece321bb68ff89e17372f4353539",onSlotchange:this.onLabelSlotChange}),this.hasItems&&s("z-icon",{key:"7c6fecfd96a4391394b17f3eea38aa7f29786a18",name:this.open?"chevron-up":"chevron-down"})),s("div",{key:"87512635c2b4377a6c304cc0bb1345131997e5f4",class:"items",role:"menu",hidden:!this.open},s("slot",{key:"b2dfb0d5a94adb555fb08c7592d5c58feb3c6c5f",name:"section",onSlotchange:this.onItemsChange})))}get host(){return o(this)}static get watchers(){return{open:["onOpenChange"],htmlTabindex:["onTabindexChange"]}}};l.style=h;export{l as z_menu_section};
2
+ //# sourceMappingURL=p-115fab3e.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,h as i}from"./p-75c4a726.js";import{B as a,d as s}from"./p-2b309f57.js";const o=":host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host z-myz-card{--card-overflow:visible}:host>div{position:relative;width:100%;height:522px;transition:-webkit-transform 0.5s ease-out;transition:transform 0.5s ease-out;transition:transform 0.5s ease-out,\n -webkit-transform 0.5s ease-out}:host>div .content{position:relative;z-index:2;width:100%;height:522px;transform-style:preserve-3d;transition:-webkit-transform 0.5s ease-out;transition:transform 0.5s ease-out;transition:transform 0.5s ease-out,\n -webkit-transform 0.5s ease-out}:host>div .content.flipped{margin-top:-2px;transform:rotateY(180deg)}:host>div .front,:host>div .back{position:absolute;top:0;left:0;width:100%;height:100%;backface-visibility:hidden}:host>div .front{z-index:2;top:0;left:0;transform:rotateY(0deg)}:host>div .front z-button{position:absolute;z-index:3;top:calc(var(--space-unit) * 0.5);left:calc(-1 * var(--space-unit))}:host>div .back{z-index:1;top:0;left:0;display:flex;justify-content:center;padding:0 var(--space-unit);margin-left:calc(-1 * var(--space-unit));transform:rotateY(180deg)}.hide-info{display:none}";const d=o;const n=class{constructor(i){t(this,i);this.cardFlipped=e(this,"cardFlipped",7);this.name=undefined;this.cover=undefined;this.disabled=false;this.flipped=false;this.flipbuttonlabel="INFO";this.hideinfobtn=false}handleFlipCard(t){this.flipCard(t.detail)}flipCard(t=true){this.flipped=t;this.cardFlipped.emit(t)}render(){return i("div",{key:"af0f476b5b7b6530250d7d4d89ef7943937e9d50"},i("z-myz-card",{key:"bd089d9975ec7df7c8b7b86649c1898589802ded"},i("z-myz-card-header",{key:"5a767aeb4eef28f25dd9fc2d3c39677582e77b38",titolo:this.name}),i("div",{key:"263946e30af18863e91ba5345eac8a22d7b1b3f4",class:`content ${this.flipped?"flipped":""}`},i("div",{key:"adc17fefcf0d85671e31b153e933296dfa5f4ca4",class:"front"},i("z-myz-card-body",{key:"0e731cfc9fd714e2e1db3e8c0340445b6d5b5181"},i("z-myz-card-cover",{key:"5f23cebccbbae1b038afb16a4488c51e679db2ee",slot:"cover",titolo:this.name,img:this.cover,faded:this.disabled})),i("z-button",{key:"e8555a0bb42a612fbf873e9abf53b1a7edd97c01",class:{"hide-info":this.hideinfobtn},variant:a.SECONDARY,icon:"informationsource",size:s.X_SMALL,onClick:()=>this.flipCard(true),disabled:this.flipped},this.flipbuttonlabel)),i("div",{key:"4dc013ce1de689f0a5789339c559d7d229eefd1b",class:"back"},i("slot",{key:"781c844a1706cf47595db8b0a145c808f3fcb38f",name:"info"}))),i("slot",{key:"a4e4fcd08625be6b556f705114e1a82bde5e3074"})))}};n.style=d;export{n as z_myz_card_dictionary};
2
- //# sourceMappingURL=p-bbdb67db.entry.js.map
1
+ import{r as t,c as e,h as i}from"./p-75c4a726.js";import{B as a,d as s}from"./p-b34993de.js";const o=":host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host z-myz-card{--card-overflow:visible}:host>div{position:relative;width:100%;height:522px;transition:-webkit-transform 0.5s ease-out;transition:transform 0.5s ease-out;transition:transform 0.5s ease-out,\n -webkit-transform 0.5s ease-out}:host>div .content{position:relative;z-index:2;width:100%;height:522px;transform-style:preserve-3d;transition:-webkit-transform 0.5s ease-out;transition:transform 0.5s ease-out;transition:transform 0.5s ease-out,\n -webkit-transform 0.5s ease-out}:host>div .content.flipped{margin-top:-2px;transform:rotateY(180deg)}:host>div .front,:host>div .back{position:absolute;top:0;left:0;width:100%;height:100%;backface-visibility:hidden}:host>div .front{z-index:2;top:0;left:0;transform:rotateY(0deg)}:host>div .front z-button{position:absolute;z-index:3;top:calc(var(--space-unit) * 0.5);left:calc(-1 * var(--space-unit))}:host>div .back{z-index:1;top:0;left:0;display:flex;justify-content:center;padding:0 var(--space-unit);margin-left:calc(-1 * var(--space-unit));transform:rotateY(180deg)}.hide-info{display:none}";const d=o;const n=class{constructor(i){t(this,i);this.cardFlipped=e(this,"cardFlipped",7);this.name=undefined;this.cover=undefined;this.disabled=false;this.flipped=false;this.flipbuttonlabel="INFO";this.hideinfobtn=false}handleFlipCard(t){this.flipCard(t.detail)}flipCard(t=true){this.flipped=t;this.cardFlipped.emit(t)}render(){return i("div",{key:"af0f476b5b7b6530250d7d4d89ef7943937e9d50"},i("z-myz-card",{key:"bd089d9975ec7df7c8b7b86649c1898589802ded"},i("z-myz-card-header",{key:"5a767aeb4eef28f25dd9fc2d3c39677582e77b38",titolo:this.name}),i("div",{key:"263946e30af18863e91ba5345eac8a22d7b1b3f4",class:`content ${this.flipped?"flipped":""}`},i("div",{key:"adc17fefcf0d85671e31b153e933296dfa5f4ca4",class:"front"},i("z-myz-card-body",{key:"0e731cfc9fd714e2e1db3e8c0340445b6d5b5181"},i("z-myz-card-cover",{key:"5f23cebccbbae1b038afb16a4488c51e679db2ee",slot:"cover",titolo:this.name,img:this.cover,faded:this.disabled})),i("z-button",{key:"e8555a0bb42a612fbf873e9abf53b1a7edd97c01",class:{"hide-info":this.hideinfobtn},variant:a.SECONDARY,icon:"informationsource",size:s.X_SMALL,onClick:()=>this.flipCard(true),disabled:this.flipped},this.flipbuttonlabel)),i("div",{key:"4dc013ce1de689f0a5789339c559d7d229eefd1b",class:"back"},i("slot",{key:"781c844a1706cf47595db8b0a145c808f3fcb38f",name:"info"}))),i("slot",{key:"a4e4fcd08625be6b556f705114e1a82bde5e3074"})))}};n.style=d;export{n as z_myz_card_dictionary};
2
+ //# sourceMappingURL=p-11629dd3.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,h as o,a as s,g as n}from"./p-75c4a726.js";import{P as i,S as a,B as r,e as h}from"./p-2b309f57.js";const c=':host{position:relative;display:flex;max-width:100%;align-items:center;padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2));background-color:var(--color-surface01);gap:calc(var(--space-unit) * 2) var(--space-unit)}:host,*{box-sizing:border-box}:host([sticky]){position:sticky;z-index:1;top:0;left:0;box-shadow:8px 0 16px -8px var(--shadow-color-base)}:host([menu-open]){z-index:2}.cell--content{display:flex;width:100%;height:100%;align-items:center}:host([show-menu]) .cell--content{column-gap:var(--space-unit)}.cell--menu-container{margin-left:auto}:host(:not([show-menu])) .cell--menu-container{opacity:0;pointer-events:none}:host(:is([show-menu],[menu-open])) .cell--menu-container,:host([show-menu]) .cell--menu-container:focus-within{z-index:1;opacity:1;pointer-events:all}:host .cell-popover{z-index:100}@media (min-width: 768px) and (hover: hover){:host([show-menu="hover"]) .cell--menu-container{opacity:0;pointer-events:none}:host([show-menu="hover"]:hover) .cell--menu-container{z-index:1;opacity:1;pointer-events:all}}:host{z-index:1;padding:0;background-color:var(--color-background);font-weight:var(--font-sb)}.cell--content{padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2))}:host([show-sorting]) .cell--content{column-gap:var(--space-unit)}.z-th--sort-button{padding:0;border:none;background-color:transparent;cursor:pointer;outline:none}@media (min-width: 768px) and (hover: hover){:host([show-sorting="hover"]) .z-th--sort-button{opacity:0;pointer-events:none}:host([show-sorting="hover"]:hover) .z-th--sort-button,:host([show-sorting="hover"]) .z-th--sort-button:focus:focus-visible,:host([show-sorting="always"]) .z-th--sort-button,:host([sorted]) .z-th--sort-button{opacity:1;pointer-events:all}}:host([show-sorting="hover"]:hover) .z-th--sort-button::after,:host([show-sorting="hover"]) .z-th--sort-button:focus:focus-visible::after,:host([show-sorting="always"]) .z-th--sort-button::after,:host([sorted]) .z-th--sort-button::after{position:absolute;top:6px;left:6px;width:calc(100% - 12px);height:calc(100% - 10px);background-color:transparent;content:""}:host([sorted]) .z-th--sort-button::after,.z-th--sort-button:focus:focus-visible::after{box-shadow:var(--shadow-focus-primary)}';const l=c;const d=class{constructor(o){t(this,o);this.sort=e(this,"sort",7);this.colspan=undefined;this.showMenu=null;this.showSorting=null;this.sticky=false;this.sortDirection=undefined;this.sorted=false;this.popoverPosition=i.AUTO;this.isMenuOpen=false}get ariaSortDirection(){if(!this.sortDirection){return null}return this.sortDirection===a.ASC?"ascending":"descending"}handleSort(){if(!this.sortDirection){this.sorted=false;return}this.sortDirection=this.sortDirection===a.ASC?a.DESC:a.ASC;this.sorted=true;this.sort.emit({sortDirection:this.sortDirection})}updateColspan(){if(this.colspan){this.host.style.gridColumn=`span ${this.colspan}`}else{this.host.style.removeProperty("grid-column")}}componentWillLoad(){this.updateColspan()}render(){return o(s,{key:"29d00b9cca980ef969f1e5437497fb8d3813fcc0",role:"columnheader","menu-open":this.isMenuOpen,"aria-sort":this.ariaSortDirection,sortable:this.showSorting},o("div",{key:"e1aa40618413575fedcc7e627280669e064054f8",class:"cell--content"},o("slot",{key:"842da5d5c6c500e8706203ed07a0dd243d26b42c"}),this.showSorting&&o("button",{key:"ef2473dc91e989eb398a667c8a73bb7579082258",class:"z-th--sort-button",type:"button",onClick:this.handleSort.bind(this)},o("z-icon",{key:"17c11e9ada49d94c13173380fafeaff4deae1ec9",name:this.sortDirection===a.DESC?"arrow-simple-up":"arrow-simple-down",width:14,height:14})),this.showMenu&&o("div",{key:"db09ba4db62162a09966b0554d80bcc4f1e254a8",class:"cell--menu-container"},o("z-button",{key:"fb3027cdca8658a2616a5612b02641f8a5dafeb0",variant:r.TERTIARY,icon:"contextual-menu",size:h.X_SMALL,ref:t=>this.menuTrigger=t,onClick:()=>this.popoverEl.open=!this.popoverEl.open}),o("z-popover",{key:"25c3d7bd294a9384e606220930073e530db7c0ae",ref:t=>this.popoverEl=t,bindTo:this.menuTrigger,onOpenChange:t=>this.isMenuOpen=t.detail.open,position:this.popoverPosition},o("slot",{key:"95be7b90aee8feb2904a982fe59355e461df9c46",name:"contextual-menu"})))))}get host(){return n(this)}static get watchers(){return{colspan:["updateColspan"]}}};d.style=l;export{d as Z};
2
- //# sourceMappingURL=p-c3c99202.js.map
1
+ import{r as t,c as e,h as o,a as s,g as n}from"./p-75c4a726.js";import{P as i,S as a,B as r,e as h}from"./p-b34993de.js";const c=':host{position:relative;display:flex;max-width:100%;align-items:center;padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2));background-color:var(--color-surface01);gap:calc(var(--space-unit) * 2) var(--space-unit)}:host,*{box-sizing:border-box}:host([sticky]){position:sticky;z-index:1;top:0;left:0;box-shadow:8px 0 16px -8px var(--shadow-color-base)}:host([menu-open]){z-index:2}.cell--content{display:flex;width:100%;height:100%;align-items:center}:host([show-menu]) .cell--content{column-gap:var(--space-unit)}.cell--menu-container{margin-left:auto}:host(:not([show-menu])) .cell--menu-container{opacity:0;pointer-events:none}:host(:is([show-menu],[menu-open])) .cell--menu-container,:host([show-menu]) .cell--menu-container:focus-within{z-index:1;opacity:1;pointer-events:all}:host .cell-popover{z-index:100}@media (min-width: 768px) and (hover: hover){:host([show-menu="hover"]) .cell--menu-container{opacity:0;pointer-events:none}:host([show-menu="hover"]:hover) .cell--menu-container{z-index:1;opacity:1;pointer-events:all}}:host{z-index:1;padding:0;background-color:var(--color-background);font-weight:var(--font-sb)}.cell--content{padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2))}:host([show-sorting]) .cell--content{column-gap:var(--space-unit)}.z-th--sort-button{padding:0;border:none;background-color:transparent;cursor:pointer;outline:none}@media (min-width: 768px) and (hover: hover){:host([show-sorting="hover"]) .z-th--sort-button{opacity:0;pointer-events:none}:host([show-sorting="hover"]:hover) .z-th--sort-button,:host([show-sorting="hover"]) .z-th--sort-button:focus:focus-visible,:host([show-sorting="always"]) .z-th--sort-button,:host([sorted]) .z-th--sort-button{opacity:1;pointer-events:all}}:host([show-sorting="hover"]:hover) .z-th--sort-button::after,:host([show-sorting="hover"]) .z-th--sort-button:focus:focus-visible::after,:host([show-sorting="always"]) .z-th--sort-button::after,:host([sorted]) .z-th--sort-button::after{position:absolute;top:6px;left:6px;width:calc(100% - 12px);height:calc(100% - 10px);background-color:transparent;content:""}:host([sorted]) .z-th--sort-button::after,.z-th--sort-button:focus:focus-visible::after{box-shadow:var(--shadow-focus-primary)}';const l=c;const d=class{constructor(o){t(this,o);this.sort=e(this,"sort",7);this.colspan=undefined;this.showMenu=null;this.showSorting=null;this.sticky=false;this.sortDirection=undefined;this.sorted=false;this.popoverPosition=i.AUTO;this.isMenuOpen=false}get ariaSortDirection(){if(!this.sortDirection){return null}return this.sortDirection===a.ASC?"ascending":"descending"}handleSort(){if(!this.sortDirection){this.sorted=false;return}this.sortDirection=this.sortDirection===a.ASC?a.DESC:a.ASC;this.sorted=true;this.sort.emit({sortDirection:this.sortDirection})}updateColspan(){if(this.colspan){this.host.style.gridColumn=`span ${this.colspan}`}else{this.host.style.removeProperty("grid-column")}}componentWillLoad(){this.updateColspan()}render(){return o(s,{key:"29d00b9cca980ef969f1e5437497fb8d3813fcc0",role:"columnheader","menu-open":this.isMenuOpen,"aria-sort":this.ariaSortDirection,sortable:this.showSorting},o("div",{key:"e1aa40618413575fedcc7e627280669e064054f8",class:"cell--content"},o("slot",{key:"842da5d5c6c500e8706203ed07a0dd243d26b42c"}),this.showSorting&&o("button",{key:"ef2473dc91e989eb398a667c8a73bb7579082258",class:"z-th--sort-button",type:"button",onClick:this.handleSort.bind(this)},o("z-icon",{key:"17c11e9ada49d94c13173380fafeaff4deae1ec9",name:this.sortDirection===a.DESC?"arrow-simple-up":"arrow-simple-down",width:14,height:14})),this.showMenu&&o("div",{key:"db09ba4db62162a09966b0554d80bcc4f1e254a8",class:"cell--menu-container"},o("z-button",{key:"fb3027cdca8658a2616a5612b02641f8a5dafeb0",variant:r.TERTIARY,icon:"contextual-menu",size:h.X_SMALL,ref:t=>this.menuTrigger=t,onClick:()=>this.popoverEl.open=!this.popoverEl.open}),o("z-popover",{key:"25c3d7bd294a9384e606220930073e530db7c0ae",ref:t=>this.popoverEl=t,bindTo:this.menuTrigger,onOpenChange:t=>this.isMenuOpen=t.detail.open,position:this.popoverPosition},o("slot",{key:"95be7b90aee8feb2904a982fe59355e461df9c46",name:"contextual-menu"})))))}get host(){return n(this)}static get watchers(){return{colspan:["updateColspan"]}}};d.style=l;export{d as Z};
2
+ //# sourceMappingURL=p-123739cb.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as n,a as o,g as s}from"./p-75c4a726.js";import{P as a,B as i,e as c}from"./p-2b309f57.js";const l=':host{position:relative;display:flex;max-width:100%;align-items:center;padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2));background-color:var(--color-surface01);gap:calc(var(--space-unit) * 2) var(--space-unit)}:host,*{box-sizing:border-box}:host([sticky]){position:sticky;z-index:1;top:0;left:0;box-shadow:8px 0 16px -8px var(--shadow-color-base)}:host([menu-open]){z-index:2}.cell--content{display:flex;width:100%;height:100%;align-items:center}:host([show-menu]) .cell--content{column-gap:var(--space-unit)}.cell--menu-container{margin-left:auto}:host(:not([show-menu])) .cell--menu-container{opacity:0;pointer-events:none}:host(:is([show-menu],[menu-open])) .cell--menu-container,:host([show-menu]) .cell--menu-container:focus-within{z-index:1;opacity:1;pointer-events:all}:host .cell-popover{z-index:100}@media (min-width: 768px) and (hover: hover){:host([show-menu="hover"]) .cell--menu-container{opacity:0;pointer-events:none}:host([show-menu="hover"]:hover) .cell--menu-container{z-index:1;opacity:1;pointer-events:all}}';const h=l;const r=class{constructor(n){e(this,n);this.colspanChange=t(this,"colspanChange",6);this.colspan=undefined;this.sticky=false;this.showMenu=null;this.popoverPosition=a.AUTO;this.isMenuOpen=false}updateColspan(){if(this.colspan){this.host.style.gridColumn=`span ${this.colspan}`}else{this.host.style.removeProperty("grid-column")}this.colspanChange.emit(this.colspan||1)}onMenuButtonClick(e){e.stopPropagation();this.popoverEl.open=!this.popoverEl.open}componentWillLoad(){this.updateColspan()}render(){return n(o,{key:"f7de551489427a62939270e957e45f4dbfd2e276",role:"cell","menu-open":this.isMenuOpen},n("div",{key:"c3bab70a1017dcf030e0a57d36da2a46472b6d94",class:"cell--content"},n("slot",{key:"bab52a837654d4d72d34a04a6fac360f46d00485"}),this.showMenu&&n("div",{key:"657f551215f6b9c6cdcc0a5c3727dc1270fa5fe5",class:"cell--menu-container prevent-expand"},n("z-button",{key:"42b96474d307462bf80defd4014e94dc479fde65",variant:i.TERTIARY,icon:"contextual-menu",size:c.X_SMALL,ref:e=>this.menuTrigger=e,onClick:this.onMenuButtonClick.bind(this)}),n("z-popover",{key:"02c317216820acbc543100ca4368a2f441eaae9f",class:"cell-popover",ref:e=>this.popoverEl=e,bindTo:this.menuTrigger,onOpenChange:e=>this.isMenuOpen=e.detail.open,position:this.popoverPosition},n("slot",{key:"b765e4b58ed69fe10a8337e929b0dc156cfce650",name:"contextual-menu"})))))}get host(){return s(this)}static get watchers(){return{colspan:["updateColspan"]}}};r.style=h;export{r as Z};
2
- //# sourceMappingURL=p-7b375bca.js.map
1
+ import{r as e,c as t,h as n,a as o,g as s}from"./p-75c4a726.js";import{P as a,B as i,e as c}from"./p-b34993de.js";const l=':host{position:relative;display:flex;max-width:100%;align-items:center;padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2));background-color:var(--color-surface01);gap:calc(var(--space-unit) * 2) var(--space-unit)}:host,*{box-sizing:border-box}:host([sticky]){position:sticky;z-index:1;top:0;left:0;box-shadow:8px 0 16px -8px var(--shadow-color-base)}:host([menu-open]){z-index:2}.cell--content{display:flex;width:100%;height:100%;align-items:center}:host([show-menu]) .cell--content{column-gap:var(--space-unit)}.cell--menu-container{margin-left:auto}:host(:not([show-menu])) .cell--menu-container{opacity:0;pointer-events:none}:host(:is([show-menu],[menu-open])) .cell--menu-container,:host([show-menu]) .cell--menu-container:focus-within{z-index:1;opacity:1;pointer-events:all}:host .cell-popover{z-index:100}@media (min-width: 768px) and (hover: hover){:host([show-menu="hover"]) .cell--menu-container{opacity:0;pointer-events:none}:host([show-menu="hover"]:hover) .cell--menu-container{z-index:1;opacity:1;pointer-events:all}}';const h=l;const r=class{constructor(n){e(this,n);this.colspanChange=t(this,"colspanChange",6);this.colspan=undefined;this.sticky=false;this.showMenu=null;this.popoverPosition=a.AUTO;this.isMenuOpen=false}updateColspan(){if(this.colspan){this.host.style.gridColumn=`span ${this.colspan}`}else{this.host.style.removeProperty("grid-column")}this.colspanChange.emit(this.colspan||1)}onMenuButtonClick(e){e.stopPropagation();this.popoverEl.open=!this.popoverEl.open}componentWillLoad(){this.updateColspan()}render(){return n(o,{key:"f7de551489427a62939270e957e45f4dbfd2e276",role:"cell","menu-open":this.isMenuOpen},n("div",{key:"c3bab70a1017dcf030e0a57d36da2a46472b6d94",class:"cell--content"},n("slot",{key:"bab52a837654d4d72d34a04a6fac360f46d00485"}),this.showMenu&&n("div",{key:"657f551215f6b9c6cdcc0a5c3727dc1270fa5fe5",class:"cell--menu-container prevent-expand"},n("z-button",{key:"42b96474d307462bf80defd4014e94dc479fde65",variant:i.TERTIARY,icon:"contextual-menu",size:c.X_SMALL,ref:e=>this.menuTrigger=e,onClick:this.onMenuButtonClick.bind(this)}),n("z-popover",{key:"02c317216820acbc543100ca4368a2f441eaae9f",class:"cell-popover",ref:e=>this.popoverEl=e,bindTo:this.menuTrigger,onOpenChange:e=>this.isMenuOpen=e.detail.open,position:this.popoverPosition},n("slot",{key:"b765e4b58ed69fe10a8337e929b0dc156cfce650",name:"contextual-menu"})))))}get host(){return s(this)}static get watchers(){return{colspan:["updateColspan"]}}};r.style=h;export{r as Z};
2
+ //# sourceMappingURL=p-14e61df6.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as s,h as i,a as e,g as o}from"./p-75c4a726.js";import{Q as r,R as a,B as n}from"./p-2b309f57.js";const l=':host{font-family:var(--font-family-sans);font-weight:var(--font-rg);--z-carousel-gutter:0;}:host([single]){display:flex;flex-direction:column;align-items:center;justify-content:center}:host([single]) .z-carousel-container{width:fit-content;max-width:100%}.z-carousel-container{display:flex;flex-direction:column}.z-carousel-title{margin-bottom:calc(var(--space-unit) * 2)}.z-carousel-wrapper{position:relative}.z-carousel-items-container{display:flex;max-width:100%;flex-direction:row;margin:0;box-shadow:var(--z-carousel-items-shadow, none);column-gap:var(--z-carousel-gutter);list-style:none;-ms-overflow-style:none;overflow-x:scroll;padding-inline-start:0;scroll-behavior:smooth;scroll-snap-type:x mandatory;scrollbar-width:none;}.z-carousel-items-container::-webkit-scrollbar{display:none}.z-carousel-items-container ::slotted(*){scroll-snap-align:center}.z-carousel-navigation-arrow[hidden]{display:none}.z-carousel-navigation-arrow[data-direction]{position:absolute;z-index:1;bottom:50%;transform:translateY(50%)}.z-carousel-navigation-arrow[data-direction="next"]{right:0}:host(:not([fixed-arrows])) .z-carousel-wrapper .z-carousel-navigation-arrow{display:none}.z-carousel-footer{display:flex;flex-direction:row;align-items:center;justify-content:center;column-gap:calc(var(--space-unit) * 3)}:host([arrows-position="bottom"]) .z-carousel-footer{margin-top:calc(var(--space-unit) * 0.75)}.z-carousel-footer .numbers-progress,.z-carousel-footer .dots-progress{display:flex;align-items:center;justify-content:center}.z-carousel-footer .dots-progress{column-gap:calc(var(--space-unit) * 3)}:host(:not([arrows-position="bottom"])) .z-carousel-footer .dots-progress{margin-top:calc(var(--space-unit) * 2)}.z-carousel-footer .dots-progress button{display:flex;width:calc(var(--space-unit) * 3);height:calc(var(--space-unit) * 3);align-items:center;padding:0;border:none;margin:0;background-color:var(--color-surface03);border-radius:calc(var(--space-unit) * 3)}.z-carousel-footer .dots-progress button.current{background-color:var(--color-primary01)}.z-carousel-footer .dots-progress button:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}.z-carousel-footer .dots-progress button:not(.current){cursor:pointer}.z-carousel-footer .numbers-progress{column-gap:calc(var(--space-unit) / 2)}:host(:not([arrows-position="bottom"])) .z-carousel-footer .numbers-progress{margin-top:var(--space-unit)}.z-carousel-footer .numbers-progress .current{font-weight:var(--font-sb)}@media (min-width: 768px){:host(:not([fixed-arrows])) .z-carousel-wrapper:hover .z-carousel-navigation-arrow:not([hidden]){display:flex}}';const h=l;const c=class{constructor(i){t(this,i);this.indexChange=s(this,"indexChange",7);this.scrollingTo=null;this.isLoading=undefined;this.label=undefined;this.single=false;this.arrowsPosition=undefined;this.progressMode=undefined;this.fixedArrows=true;this.ghostLoadingHeight=100;this.infinite=false;this.current=0;this.items=undefined;this.highlightedIndicator=undefined;this.canNavigatePrev=undefined;this.canNavigateNext=undefined}onIndexChange(){this.indexChange.emit({currentItem:this.current})}onSingleModeChange(){if(this.single&&!this.intersectionObserver){this.setIntersectionObserver()}}onInfiniteModeChange(){this.checkNavigationValidity()}setIntersectionObserver(){this.intersectionObserver=new IntersectionObserver((t=>{const s=t.find((({isIntersecting:t})=>t));if(!s){return}const i=this.items.findIndex((t=>t===s.target));this.highlightedIndicator=i;if(this.scrollingTo!==null&&i!==this.scrollingTo){return}this.scrollingTo=null;this.current=i}),{root:this.itemsContainer,threshold:.5});this.items.forEach((t=>this.intersectionObserver.observe(t)))}onSlotChange(){this.items=Array.from(this.host.children);this.checkNavigationValidity();this.setIntersectionObserver();this.goTo(this.current)}onPrev(){if(this.single){this.goTo(this.infinite&&this.current-1<0?this.items.length-1:Math.max(0,this.current-1));return}this.itemsContainer.scrollBy({left:this.infinite&&this.itemsContainer.scrollLeft==0?this.itemsContainer.scrollWidth-this.itemsContainer.clientWidth:-this.itemsContainer.clientWidth/2,behavior:"smooth"})}onNext(){if(this.single){const t=this.infinite&&this.current+1>this.items.length-1?0:Math.min(this.current+1,this.items.length-1);return this.goTo(t)}this.itemsContainer.scrollBy({left:this.infinite&&this.itemsContainer.scrollLeft==this.itemsContainer.scrollWidth-this.itemsContainer.clientWidth?-this.itemsContainer.scrollWidth:this.itemsContainer.clientWidth/2,behavior:"smooth"})}checkNavigationValidity(){if(this.single){this.canNavigatePrev=this.current>0;this.canNavigateNext=this.current<this.items.length-1;return}this.canNavigatePrev=this.itemsContainer.scrollLeft>0;this.canNavigateNext=this.itemsContainer.scrollLeft<this.itemsContainer.scrollWidth-this.itemsContainer.clientWidth}canShowFooter(){if(!this.canNavigatePrev&&!this.canNavigateNext){return false}return this.arrowsPosition===r.BOTTOM||this.progressMode===a.DOTS||this.progressMode===a.NUMBERS}goTo(t){if(this.current===t){return}this.scrollingTo=t;const s=this.items.slice(0,t).reduce(((t,s)=>t+=s.clientWidth),0);this.itemsContainer.scroll({left:s,behavior:"smooth"})}get canNavigate(){return this.canNavigatePrev||this.canNavigateNext}setupItems(){this.items=Array.from(this.host.children);this.items.forEach((t=>{t.setAttribute("aria-roledescription","slide")}))}componentDidLoad(){var t;(t=this.itemsContainer)===null||t===void 0?void 0:t.addEventListener("scroll",this.checkNavigationValidity.bind(this),{passive:true});this.resizeObserver=new ResizeObserver(this.checkNavigationValidity.bind(this));this.resizeObserver.observe(this.itemsContainer);this.setupItems();if(this.single){this.setIntersectionObserver()}this.checkNavigationValidity()}disconnectedCallback(){var t;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect()}render(){if(this.isLoading){return i("div",{class:"z-carousel-container"},this.label&&i("div",{class:"heading-3-sb z-carousel-title"},this.label),i("div",{style:{height:`${this.ghostLoadingHeight}px`}},i("z-ghost-loading",null)))}return i(e,null,i("div",{class:"z-carousel-container","aria-roledescription":"carousel","aria-label":this.label||"Carousel"},this.label&&i("div",{class:"z-carousel-title heading-3-sb"},this.label),i("div",{class:"z-carousel-wrapper"},i("z-button",{class:"z-carousel-navigation-arrow",variant:n.SECONDARY,"data-direction":"prev",icon:"arrow-left",onClick:this.onPrev.bind(this),disabled:!this.infinite&&!this.canNavigatePrev,hidden:this.arrowsPosition!==r.OVER||!this.canNavigate,ariaLabel:this.single?"Mostra l'elemento precedente":"Mostra gli elementi precedenti"}),i("ul",{class:"z-carousel-items-container","aria-atomic":"false","aria-live":"polite",ref:t=>this.itemsContainer=t},i("slot",{onSlotchange:this.onSlotChange.bind(this)})),i("z-button",{class:"z-carousel-navigation-arrow",variant:n.SECONDARY,"data-direction":"next",icon:"arrow-right",onClick:this.onNext.bind(this),disabled:!this.infinite&&!this.canNavigateNext,hidden:this.arrowsPosition!==r.OVER||!this.canNavigate,ariaLabel:this.single?"Mostra l'elemento successivo":"Mostra gli elementi successivi"}))),this.canShowFooter()&&i("div",{class:"z-carousel-footer"},this.arrowsPosition===r.BOTTOM&&i("z-button",{class:"z-carousel-navigation-arrow",variant:n.TERTIARY,icon:"arrow-left",onClick:this.onPrev.bind(this),disabled:!this.infinite&&!this.canNavigatePrev,ariaLabel:this.single?"Mostra l'elemento precedente":"Mostra gli elementi precedenti"}),this.progressMode===a.DOTS&&this.single&&this.items&&i("div",{class:"dots-progress"},this.items.map(((t,s)=>i("button",{type:"button",class:{current:this.highlightedIndicator===s},"aria-label":this.highlightedIndicator===s?"Elemento corrente":`Spostati all'elemento ${s+1}`,onClick:()=>this.goTo(s)})))),this.progressMode===a.NUMBERS&&this.single&&this.items&&i("div",{class:"numbers-progress interactive-1"},i("span",{class:"current"},this.current+1),i("span",null,"di"),i("span",null,this.items.length)),this.arrowsPosition===r.BOTTOM&&i("z-button",{class:"z-carousel-navigation-arrow",variant:n.TERTIARY,icon:"arrow-right",onClick:this.onNext.bind(this),disabled:!this.infinite&&!this.canNavigateNext,ariaLabel:this.single?"Mostra l'elemento successivo":"Mostra gli elementi successivi"})))}get host(){return o(this)}static get watchers(){return{current:["onIndexChange"],single:["onSingleModeChange"],infinite:["onInfiniteModeChange"]}}};c.style=h;export{c as z_carousel};
2
- //# sourceMappingURL=p-29a297ed.entry.js.map
1
+ import{r as t,c as s,h as i,a as e,g as o}from"./p-75c4a726.js";import{Q as r,R as a,B as n}from"./p-b34993de.js";const l=':host{font-family:var(--font-family-sans);font-weight:var(--font-rg);--z-carousel-gutter:0;}:host([single]){display:flex;flex-direction:column;align-items:center;justify-content:center}:host([single]) .z-carousel-container{width:fit-content;max-width:100%}.z-carousel-container{display:flex;flex-direction:column}.z-carousel-title{margin-bottom:calc(var(--space-unit) * 2)}.z-carousel-wrapper{position:relative}.z-carousel-items-container{display:flex;max-width:100%;flex-direction:row;margin:0;box-shadow:var(--z-carousel-items-shadow, none);column-gap:var(--z-carousel-gutter);list-style:none;-ms-overflow-style:none;overflow-x:scroll;padding-inline-start:0;scroll-behavior:smooth;scroll-snap-type:x mandatory;scrollbar-width:none;}.z-carousel-items-container::-webkit-scrollbar{display:none}.z-carousel-items-container ::slotted(*){scroll-snap-align:center}.z-carousel-navigation-arrow[hidden]{display:none}.z-carousel-navigation-arrow[data-direction]{position:absolute;z-index:1;bottom:50%;transform:translateY(50%)}.z-carousel-navigation-arrow[data-direction="next"]{right:0}:host(:not([fixed-arrows])) .z-carousel-wrapper .z-carousel-navigation-arrow{display:none}.z-carousel-footer{display:flex;flex-direction:row;align-items:center;justify-content:center;column-gap:calc(var(--space-unit) * 3)}:host([arrows-position="bottom"]) .z-carousel-footer{margin-top:calc(var(--space-unit) * 0.75)}.z-carousel-footer .numbers-progress,.z-carousel-footer .dots-progress{display:flex;align-items:center;justify-content:center}.z-carousel-footer .dots-progress{column-gap:calc(var(--space-unit) * 3)}:host(:not([arrows-position="bottom"])) .z-carousel-footer .dots-progress{margin-top:calc(var(--space-unit) * 2)}.z-carousel-footer .dots-progress button{display:flex;width:calc(var(--space-unit) * 3);height:calc(var(--space-unit) * 3);align-items:center;padding:0;border:none;margin:0;background-color:var(--color-surface03);border-radius:calc(var(--space-unit) * 3)}.z-carousel-footer .dots-progress button.current{background-color:var(--color-primary01)}.z-carousel-footer .dots-progress button:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}.z-carousel-footer .dots-progress button:not(.current){cursor:pointer}.z-carousel-footer .numbers-progress{column-gap:calc(var(--space-unit) / 2)}:host(:not([arrows-position="bottom"])) .z-carousel-footer .numbers-progress{margin-top:var(--space-unit)}.z-carousel-footer .numbers-progress .current{font-weight:var(--font-sb)}@media (min-width: 768px){:host(:not([fixed-arrows])) .z-carousel-wrapper:hover .z-carousel-navigation-arrow:not([hidden]){display:flex}}';const h=l;const c=class{constructor(i){t(this,i);this.indexChange=s(this,"indexChange",7);this.scrollingTo=null;this.isLoading=undefined;this.label=undefined;this.single=false;this.arrowsPosition=undefined;this.progressMode=undefined;this.fixedArrows=true;this.ghostLoadingHeight=100;this.infinite=false;this.current=0;this.items=undefined;this.highlightedIndicator=undefined;this.canNavigatePrev=undefined;this.canNavigateNext=undefined}onIndexChange(){this.indexChange.emit({currentItem:this.current})}onSingleModeChange(){if(this.single&&!this.intersectionObserver){this.setIntersectionObserver()}}onInfiniteModeChange(){this.checkNavigationValidity()}setIntersectionObserver(){this.intersectionObserver=new IntersectionObserver((t=>{const s=t.find((({isIntersecting:t})=>t));if(!s){return}const i=this.items.findIndex((t=>t===s.target));this.highlightedIndicator=i;if(this.scrollingTo!==null&&i!==this.scrollingTo){return}this.scrollingTo=null;this.current=i}),{root:this.itemsContainer,threshold:.5});this.items.forEach((t=>this.intersectionObserver.observe(t)))}onSlotChange(){this.items=Array.from(this.host.children);this.checkNavigationValidity();this.setIntersectionObserver();this.goTo(this.current)}onPrev(){if(this.single){this.goTo(this.infinite&&this.current-1<0?this.items.length-1:Math.max(0,this.current-1));return}this.itemsContainer.scrollBy({left:this.infinite&&this.itemsContainer.scrollLeft==0?this.itemsContainer.scrollWidth-this.itemsContainer.clientWidth:-this.itemsContainer.clientWidth/2,behavior:"smooth"})}onNext(){if(this.single){const t=this.infinite&&this.current+1>this.items.length-1?0:Math.min(this.current+1,this.items.length-1);return this.goTo(t)}this.itemsContainer.scrollBy({left:this.infinite&&this.itemsContainer.scrollLeft==this.itemsContainer.scrollWidth-this.itemsContainer.clientWidth?-this.itemsContainer.scrollWidth:this.itemsContainer.clientWidth/2,behavior:"smooth"})}checkNavigationValidity(){if(this.single){this.canNavigatePrev=this.current>0;this.canNavigateNext=this.current<this.items.length-1;return}this.canNavigatePrev=this.itemsContainer.scrollLeft>0;this.canNavigateNext=this.itemsContainer.scrollLeft<this.itemsContainer.scrollWidth-this.itemsContainer.clientWidth}canShowFooter(){if(!this.canNavigatePrev&&!this.canNavigateNext){return false}return this.arrowsPosition===r.BOTTOM||this.progressMode===a.DOTS||this.progressMode===a.NUMBERS}goTo(t){if(this.current===t){return}this.scrollingTo=t;const s=this.items.slice(0,t).reduce(((t,s)=>t+=s.clientWidth),0);this.itemsContainer.scroll({left:s,behavior:"smooth"})}get canNavigate(){return this.canNavigatePrev||this.canNavigateNext}setupItems(){this.items=Array.from(this.host.children);this.items.forEach((t=>{t.setAttribute("aria-roledescription","slide")}))}componentDidLoad(){var t;(t=this.itemsContainer)===null||t===void 0?void 0:t.addEventListener("scroll",this.checkNavigationValidity.bind(this),{passive:true});this.resizeObserver=new ResizeObserver(this.checkNavigationValidity.bind(this));this.resizeObserver.observe(this.itemsContainer);this.setupItems();if(this.single){this.setIntersectionObserver()}this.checkNavigationValidity()}disconnectedCallback(){var t;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect()}render(){if(this.isLoading){return i("div",{class:"z-carousel-container"},this.label&&i("div",{class:"heading-3-sb z-carousel-title"},this.label),i("div",{style:{height:`${this.ghostLoadingHeight}px`}},i("z-ghost-loading",null)))}return i(e,null,i("div",{class:"z-carousel-container","aria-roledescription":"carousel","aria-label":this.label||"Carousel"},this.label&&i("div",{class:"z-carousel-title heading-3-sb"},this.label),i("div",{class:"z-carousel-wrapper"},i("z-button",{class:"z-carousel-navigation-arrow",variant:n.SECONDARY,"data-direction":"prev",icon:"arrow-left",onClick:this.onPrev.bind(this),disabled:!this.infinite&&!this.canNavigatePrev,hidden:this.arrowsPosition!==r.OVER||!this.canNavigate,ariaLabel:this.single?"Mostra l'elemento precedente":"Mostra gli elementi precedenti"}),i("ul",{class:"z-carousel-items-container","aria-atomic":"false","aria-live":"polite",ref:t=>this.itemsContainer=t},i("slot",{onSlotchange:this.onSlotChange.bind(this)})),i("z-button",{class:"z-carousel-navigation-arrow",variant:n.SECONDARY,"data-direction":"next",icon:"arrow-right",onClick:this.onNext.bind(this),disabled:!this.infinite&&!this.canNavigateNext,hidden:this.arrowsPosition!==r.OVER||!this.canNavigate,ariaLabel:this.single?"Mostra l'elemento successivo":"Mostra gli elementi successivi"}))),this.canShowFooter()&&i("div",{class:"z-carousel-footer"},this.arrowsPosition===r.BOTTOM&&i("z-button",{class:"z-carousel-navigation-arrow",variant:n.TERTIARY,icon:"arrow-left",onClick:this.onPrev.bind(this),disabled:!this.infinite&&!this.canNavigatePrev,ariaLabel:this.single?"Mostra l'elemento precedente":"Mostra gli elementi precedenti"}),this.progressMode===a.DOTS&&this.single&&this.items&&i("div",{class:"dots-progress"},this.items.map(((t,s)=>i("button",{type:"button",class:{current:this.highlightedIndicator===s},"aria-label":this.highlightedIndicator===s?"Elemento corrente":`Spostati all'elemento ${s+1}`,onClick:()=>this.goTo(s)})))),this.progressMode===a.NUMBERS&&this.single&&this.items&&i("div",{class:"numbers-progress interactive-1"},i("span",{class:"current"},this.current+1),i("span",null,"di"),i("span",null,this.items.length)),this.arrowsPosition===r.BOTTOM&&i("z-button",{class:"z-carousel-navigation-arrow",variant:n.TERTIARY,icon:"arrow-right",onClick:this.onNext.bind(this),disabled:!this.infinite&&!this.canNavigateNext,ariaLabel:this.single?"Mostra l'elemento successivo":"Mostra gli elementi successivi"})))}get host(){return o(this)}static get watchers(){return{current:["onIndexChange"],single:["onSingleModeChange"],infinite:["onInfiniteModeChange"]}}};c.style=h;export{c as z_carousel};
2
+ //# sourceMappingURL=p-1630e240.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as o,h as e,g as r}from"./p-75c4a726.js";import{P as i,g as s}from"./p-2b309f57.js";const n=':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}';const a=n;const c=document.documentElement;function f(t){if(t.parentNode===t.shadowRoot){return t.shadowRoot.host}return t.parentElement}function h(t){let o=f(t);while(o&&o!==c){const{overflow:t,overflowX:e,overflowY:r}=window.getComputedStyle(o);if(t==="hidden"||r==="hidden"||e==="hidden"){return o}if(o.scrollHeight>o.clientHeight&&t!=="visible"&&r!=="visible"||o.scrollWidth>o.clientWidth&&t!=="visible"&&e!=="visible"){return o}o=f(o)}return c}function p(t,o){const e=t.getBoundingClientRect();const r=e.width;const i=e.height;let s=0;let n=0;let a=t;while(a&&a!=o){n+=a.offsetLeft;if(a===document.body){s+=a.getBoundingClientRect().top+window.scrollY}else{s+=a.offsetTop}if(window.DOMMatrix){const t=window.getComputedStyle(a);const o=t.transform||t.webkitTransform;const e=new DOMMatrix(o);if(e){n+=e.m41;if(a!==document.body){s+=e.m42}}}if(!a.offsetParent){break}a=a.offsetParent}let c;let f;if(a===document.body){c=window.innerWidth;f=window.innerHeight}else{c=a.offsetWidth;f=a.offsetHeight}const h=c-n-e.width;const p=f-s-e.height;return{top:s,right:h,bottom:p,left:n,width:r,height:i}}const l=class{constructor(e){t(this,e);this.positionChange=o(this,"positionChange",7);this.openChange=o(this,"openChange",7);this.position=i.AUTO;this.open=false;this.bindTo=undefined;this.showArrow=false;this.center=false;this.closable=true;this.currentPosition=undefined}closePopoverWithKeyboard(t){if(this.closable&&t.key===s.ESC){this.open=false}}handleOutsideClick(t){if(!this.closable||!this.open){return}if(!t.composedPath().includes(this.host)){const o=t.target;const e=this.bindTo instanceof HTMLElement?this.bindTo.contains(o):o.closest(this.bindTo);if(e){t.stopPropagation()}this.open=false;this.positionChange.emit({position:this.currentPosition})}}validatePosition(t){if(t&&!Object.values(i).includes(t)){this.position=i.AUTO}this.currentPosition=this.position;this.positionChange.emit({position:this.currentPosition})}onOpen(){cancelAnimationFrame(this.animationFrameRequestId);if(this.open){const t=()=>{if(this.open){this.setPosition();this.animationFrameRequestId=requestAnimationFrame(t)}};t()}else if(this.host.hasAttribute("current-position")){this.host.removeAttribute("current-position");this.currentPosition=undefined}this.openChange.emit({open:this.open})}disconnectedCallback(){cancelAnimationFrame(this.animationFrameRequestId)}setPosition(){let t;if(typeof this.bindTo==="string"){t=this.host.ownerDocument.querySelector(this.bindTo)}else if(this.bindTo){t=this.bindTo}else{t=this.host.parentElement}if(!t){return}const o=h(t);const e=o.getBoundingClientRect();const r=this.host.offsetParent;const s=r?p(r,o):{top:0,right:0,bottom:0,left:0};const n=p(t,o);const a=n.top-o.scrollTop;const c=e.height-(n.top+n.height)+o.scrollTop;const f=n.left-o.scrollLeft;const l=e.width-(n.left+n.width)+o.scrollLeft;const u=Math.max(0,e.top+e.height-window.innerHeight);const d=Math.max(0,e.left+e.width-window.innerWidth);const b=Math.min(a,a+e.top);const v=Math.min(c,c-u);const w=Math.min(f,f+e.left);const m=Math.min(l,l-d);const g=b+v+n.height;const x=w+m+n.width;let $=this.currentPosition;const y=[];if(this.position===i.AUTO){if(w/x>.6){y.push(i.LEFT)}else if(w/x<.4){y.push(i.RIGHT)}if(b/g>.9){y.unshift(i.TOP)}else if(b/g>.6){y.push(i.TOP)}else if(b/g<.1){y.unshift(i.BOTTOM)}else{y.push(i.BOTTOM)}$=y.join("_")}const z=this.host.style;z.position="absolute";const _=n.top-s.top;const M=n.right-s.right;const k=n.bottom-s.bottom;const O=n.left-s.left;const P=this.center?.5:0;const j=this.center?.5:0;if($===i.TOP||$===i.TOP_RIGHT){z.top="auto";z.right="auto";z.bottom=`${k+n.height}px`;z.left=`${O+n.width*P}px`;z.maxHeight=`${b}px`;if($===i.TOP_RIGHT){z.maxWidth=`${m+n.width*j}px`}}else if($===i.TOP_LEFT){z.top="auto";z.right=`${M+n.width*P}px`;z.bottom=`${k+n.height}px`;z.left="auto";z.maxWidth=`${w}px`;z.maxHeight=`${b}px`}else if($===i.BOTTOM||$===i.BOTTOM_RIGHT){z.top=`${_+n.height}px`;z.right="auto";z.bottom="auto";z.left=`${O+n.width*P}px`;z.maxHeight=`${v}px`;if($===i.BOTTOM_RIGHT){z.maxWidth=`${m+n.width*j}px`}}else if($===i.BOTTOM_LEFT){z.top=`${_+n.height}px`;z.right=`${M+n.width*P}px`;z.bottom="auto";z.left="auto";z.maxWidth=`${w}px`;z.maxHeight=`${v}px`}else if($===i.RIGHT||$===i.RIGHT_BOTTOM){z.top=`${_+n.height*P}px`;z.right="auto";z.bottom="auto";z.left=`${O+n.width}px`;z.maxWidth=`${m}px`;z.maxHeight=`${v+n.height*j}px`}else if($===i.RIGHT_TOP){z.top="auto";z.right="auto";z.bottom=`${k+n.height*P}px`;z.left=`${O+n.width}px`;z.maxWidth=`${m}px`;z.maxHeight=`${b+n.height*j}px`}else if($===i.LEFT||$===i.LEFT_BOTTOM){z.top=`${_+n.height*P}px`;z.right=`${M+n.width}px`;z.bottom="auto";z.left="auto";z.maxWidth=`${w}px`;z.maxHeight=`${v+n.height*j}px`}else if($===i.LEFT_TOP){z.top="auto";z.right=`${M+n.width}px`;z.bottom=`${k+n.height*P}px`;z.left="auto";z.maxWidth=`${w}px`;z.maxHeight=`${b+n.height*j}px`}this.currentPosition=$||this.position;this.host.setAttribute("current-position",this.currentPosition)}componentWillLoad(){this.validatePosition(this.position);this.onOpen()}render(){return e("slot",{key:"ea2b46de2cec89ebd692407e0ddb51e47d552e73"})}get host(){return r(this)}static get watchers(){return{position:["validatePosition"],open:["onOpen"]}}};l.style=a;export{l as z_popover};
2
- //# sourceMappingURL=p-5b6dd467.entry.js.map
1
+ import{r as t,c as o,h as e,g as r}from"./p-75c4a726.js";import{P as i,g as s}from"./p-b34993de.js";const n=':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}';const a=n;const c=document.documentElement;function f(t){if(t.parentNode===t.shadowRoot){return t.shadowRoot.host}return t.parentElement}function h(t){let o=f(t);while(o&&o!==c){const{overflow:t,overflowX:e,overflowY:r}=window.getComputedStyle(o);if(t==="hidden"||r==="hidden"||e==="hidden"){return o}if(o.scrollHeight>o.clientHeight&&t!=="visible"&&r!=="visible"||o.scrollWidth>o.clientWidth&&t!=="visible"&&e!=="visible"){return o}o=f(o)}return c}function p(t,o){const e=t.getBoundingClientRect();const r=e.width;const i=e.height;let s=0;let n=0;let a=t;while(a&&a!=o){n+=a.offsetLeft;if(a===document.body){s+=a.getBoundingClientRect().top+window.scrollY}else{s+=a.offsetTop}if(window.DOMMatrix){const t=window.getComputedStyle(a);const o=t.transform||t.webkitTransform;const e=new DOMMatrix(o);if(e){n+=e.m41;if(a!==document.body){s+=e.m42}}}if(!a.offsetParent){break}a=a.offsetParent}let c;let f;if(a===document.body){c=window.innerWidth;f=window.innerHeight}else{c=a.offsetWidth;f=a.offsetHeight}const h=c-n-e.width;const p=f-s-e.height;return{top:s,right:h,bottom:p,left:n,width:r,height:i}}const l=class{constructor(e){t(this,e);this.positionChange=o(this,"positionChange",7);this.openChange=o(this,"openChange",7);this.position=i.AUTO;this.open=false;this.bindTo=undefined;this.showArrow=false;this.center=false;this.closable=true;this.currentPosition=undefined}closePopoverWithKeyboard(t){if(this.closable&&t.key===s.ESC){this.open=false}}handleOutsideClick(t){if(!this.closable||!this.open){return}if(!t.composedPath().includes(this.host)){const o=t.target;const e=this.bindTo instanceof HTMLElement?this.bindTo.contains(o):o.closest(this.bindTo);if(e){t.stopPropagation()}this.open=false;this.positionChange.emit({position:this.currentPosition})}}validatePosition(t){if(t&&!Object.values(i).includes(t)){this.position=i.AUTO}this.currentPosition=this.position;this.positionChange.emit({position:this.currentPosition})}onOpen(){cancelAnimationFrame(this.animationFrameRequestId);if(this.open){const t=()=>{if(this.open){this.setPosition();this.animationFrameRequestId=requestAnimationFrame(t)}};t()}else if(this.host.hasAttribute("current-position")){this.host.removeAttribute("current-position");this.currentPosition=undefined}this.openChange.emit({open:this.open})}disconnectedCallback(){cancelAnimationFrame(this.animationFrameRequestId)}setPosition(){let t;if(typeof this.bindTo==="string"){t=this.host.ownerDocument.querySelector(this.bindTo)}else if(this.bindTo){t=this.bindTo}else{t=this.host.parentElement}if(!t){return}const o=h(t);const e=o.getBoundingClientRect();const r=this.host.offsetParent;const s=r?p(r,o):{top:0,right:0,bottom:0,left:0};const n=p(t,o);const a=n.top-o.scrollTop;const c=e.height-(n.top+n.height)+o.scrollTop;const f=n.left-o.scrollLeft;const l=e.width-(n.left+n.width)+o.scrollLeft;const u=Math.max(0,e.top+e.height-window.innerHeight);const d=Math.max(0,e.left+e.width-window.innerWidth);const b=Math.min(a,a+e.top);const v=Math.min(c,c-u);const w=Math.min(f,f+e.left);const m=Math.min(l,l-d);const g=b+v+n.height;const x=w+m+n.width;let $=this.currentPosition;const y=[];if(this.position===i.AUTO){if(w/x>.6){y.push(i.LEFT)}else if(w/x<.4){y.push(i.RIGHT)}if(b/g>.9){y.unshift(i.TOP)}else if(b/g>.6){y.push(i.TOP)}else if(b/g<.1){y.unshift(i.BOTTOM)}else{y.push(i.BOTTOM)}$=y.join("_")}const z=this.host.style;z.position="absolute";const _=n.top-s.top;const M=n.right-s.right;const k=n.bottom-s.bottom;const O=n.left-s.left;const P=this.center?.5:0;const j=this.center?.5:0;if($===i.TOP||$===i.TOP_RIGHT){z.top="auto";z.right="auto";z.bottom=`${k+n.height}px`;z.left=`${O+n.width*P}px`;z.maxHeight=`${b}px`;if($===i.TOP_RIGHT){z.maxWidth=`${m+n.width*j}px`}}else if($===i.TOP_LEFT){z.top="auto";z.right=`${M+n.width*P}px`;z.bottom=`${k+n.height}px`;z.left="auto";z.maxWidth=`${w}px`;z.maxHeight=`${b}px`}else if($===i.BOTTOM||$===i.BOTTOM_RIGHT){z.top=`${_+n.height}px`;z.right="auto";z.bottom="auto";z.left=`${O+n.width*P}px`;z.maxHeight=`${v}px`;if($===i.BOTTOM_RIGHT){z.maxWidth=`${m+n.width*j}px`}}else if($===i.BOTTOM_LEFT){z.top=`${_+n.height}px`;z.right=`${M+n.width*P}px`;z.bottom="auto";z.left="auto";z.maxWidth=`${w}px`;z.maxHeight=`${v}px`}else if($===i.RIGHT||$===i.RIGHT_BOTTOM){z.top=`${_+n.height*P}px`;z.right="auto";z.bottom="auto";z.left=`${O+n.width}px`;z.maxWidth=`${m}px`;z.maxHeight=`${v+n.height*j}px`}else if($===i.RIGHT_TOP){z.top="auto";z.right="auto";z.bottom=`${k+n.height*P}px`;z.left=`${O+n.width}px`;z.maxWidth=`${m}px`;z.maxHeight=`${b+n.height*j}px`}else if($===i.LEFT||$===i.LEFT_BOTTOM){z.top=`${_+n.height*P}px`;z.right=`${M+n.width}px`;z.bottom="auto";z.left="auto";z.maxWidth=`${w}px`;z.maxHeight=`${v+n.height*j}px`}else if($===i.LEFT_TOP){z.top="auto";z.right=`${M+n.width}px`;z.bottom=`${k+n.height*P}px`;z.left="auto";z.maxWidth=`${w}px`;z.maxHeight=`${b+n.height*j}px`}this.currentPosition=$||this.position;this.host.setAttribute("current-position",this.currentPosition)}componentWillLoad(){this.validatePosition(this.position);this.onOpen()}render(){return e("slot",{key:"ea2b46de2cec89ebd692407e0ddb51e47d552e73"})}get host(){return r(this)}static get watchers(){return{position:["validatePosition"],open:["onOpen"]}}};l.style=a;export{l as z_popover};
2
+ //# sourceMappingURL=p-18d63f0c.entry.js.map