@zanichelli/albe-web-components 19.4.0 → 19.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (395) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/{index-Cn7FFDHr.js → index-DppFfqsn.js} +8 -2
  3. package/dist/cjs/index-DppFfqsn.js.map +1 -0
  4. package/dist/cjs/index.cjs.js +6 -2
  5. package/dist/cjs/index.cjs.js.map +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/{reactive-controller-BBJFF12W.js → reactive-controller-B2CuCldJ.js} +4 -4
  8. package/dist/cjs/{reactive-controller-BBJFF12W.js.map → reactive-controller-B2CuCldJ.js.map} +1 -1
  9. package/dist/cjs/{utils-kQZHfpti.js → utils-C0QY75C2.js} +3 -3
  10. package/dist/cjs/{utils-kQZHfpti.js.map → utils-C0QY75C2.js.map} +1 -1
  11. package/dist/cjs/{utils-By4U4KkV.js → utils-C6lcMaul.js} +3 -3
  12. package/dist/cjs/{utils-By4U4KkV.js.map → utils-C6lcMaul.js.map} +1 -1
  13. package/dist/cjs/web-components-library.cjs.js +1 -1
  14. package/dist/cjs/z-accordion.cjs.entry.js +1 -1
  15. package/dist/cjs/z-anchor-navigation.cjs.entry.js +1 -1
  16. package/dist/cjs/z-app-header-deprecated.cjs.entry.js +1 -1
  17. package/dist/cjs/z-app-header_12.cjs.entry.js +4 -4
  18. package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
  19. package/dist/cjs/z-aria-alert.cjs.entry.js +1 -1
  20. package/dist/cjs/z-avatar.cjs.entry.js +1 -1
  21. package/dist/cjs/z-book-card-app.cjs.entry.js +1 -1
  22. package/dist/cjs/z-book-card-deprecated.cjs.entry.js +2 -2
  23. package/dist/cjs/z-book-card.cjs.entry.js +1 -1
  24. package/dist/cjs/z-breadcrumb.cjs.entry.js +2 -2
  25. package/dist/cjs/z-card.cjs.entry.js +1 -1
  26. package/dist/cjs/z-carousel.cjs.entry.js +1 -1
  27. package/dist/cjs/z-chip.cjs.entry.js +7 -4
  28. package/dist/cjs/z-chip.cjs.entry.js.map +1 -1
  29. package/dist/cjs/z-color-picker.cjs.entry.js +2 -2
  30. package/dist/cjs/z-combobox.cjs.entry.js +2 -2
  31. package/dist/cjs/z-cover-hero.cjs.entry.js +1 -1
  32. package/dist/cjs/z-date-picker.cjs.entry.js +2 -2
  33. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +3 -3
  34. package/dist/cjs/z-file-upload.cjs.entry.js +1 -1
  35. package/dist/cjs/z-file.cjs.entry.js +1 -1
  36. package/dist/cjs/z-info-reveal.cjs.entry.js +1 -1
  37. package/dist/cjs/z-input-range.cjs.entry.js +2 -2
  38. package/dist/cjs/z-menu-section.cjs.entry.js +1 -1
  39. package/dist/cjs/z-menu.cjs.entry.js +2 -2
  40. package/dist/cjs/z-myz-card-alert.cjs.entry.js +1 -1
  41. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
  42. package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -1
  43. package/dist/cjs/z-myz-card-info.cjs.entry.js +2 -2
  44. package/dist/cjs/z-myz-card_4.cjs.entry.js +1 -1
  45. package/dist/cjs/z-myz-list-item.cjs.entry.js +2 -2
  46. package/dist/cjs/z-navigation-tabs.cjs.entry.js +1 -1
  47. package/dist/cjs/z-otp.cjs.entry.js +1 -1
  48. package/dist/cjs/z-pagination.cjs.entry.js +1 -1
  49. package/dist/cjs/z-popover.cjs.entry.js +2 -2
  50. package/dist/cjs/z-range-picker.cjs.entry.js +2 -2
  51. package/dist/cjs/z-section-title.cjs.entry.js +1 -1
  52. package/dist/cjs/z-select.cjs.entry.js +2 -2
  53. package/dist/cjs/z-skip-to-content.cjs.entry.js +2 -2
  54. package/dist/cjs/z-slideshow.cjs.entry.js +2 -2
  55. package/dist/cjs/z-table.cjs.entry.js +2 -2
  56. package/dist/cjs/z-td.cjs.entry.js +1 -1
  57. package/dist/cjs/z-th.cjs.entry.js +1 -1
  58. package/dist/cjs/z-toast-notification-list.cjs.entry.js +1 -1
  59. package/dist/cjs/z-toast-notification.cjs.entry.js +1 -1
  60. package/dist/cjs/z-toggle-switch.cjs.entry.js +2 -2
  61. package/dist/cjs/z-tool.cjs.entry.js +2 -2
  62. package/dist/cjs/z-toolbar.cjs.entry.js +1 -1
  63. package/dist/cjs/z-tooltip.cjs.entry.js +1 -1
  64. package/dist/cjs/z-tr.cjs.entry.js +2 -2
  65. package/dist/cjs/z-tree-list.cjs.entry.js +1 -1
  66. package/dist/collection/beans/index.js +6 -0
  67. package/dist/collection/beans/index.js.map +1 -1
  68. package/dist/collection/components/z-chip/index.js +33 -3
  69. package/dist/collection/components/z-chip/index.js.map +1 -1
  70. package/dist/collection/components/z-chip/styles.css +83 -25
  71. package/dist/collection/components/z-searchbar/styles.css +1 -0
  72. package/dist/components/index.js +1 -1
  73. package/dist/components/index.js.map +1 -1
  74. package/dist/components/index13.js +1 -1
  75. package/dist/components/index13.js.map +1 -1
  76. package/dist/components/index16.js +1 -1
  77. package/dist/components/index19.js +1 -1
  78. package/dist/components/index19.js.map +1 -1
  79. package/dist/components/index2.js +1 -1
  80. package/dist/components/index2.js.map +1 -1
  81. package/dist/components/index5.js +1 -1
  82. package/dist/components/utils2.js +1 -1
  83. package/dist/components/z-accordion.js +1 -1
  84. package/dist/components/z-accordion.js.map +1 -1
  85. package/dist/components/z-book-card-app.js +1 -1
  86. package/dist/components/z-book-card-deprecated.js +1 -1
  87. package/dist/components/z-book-card.js +1 -1
  88. package/dist/components/z-breadcrumb.js +1 -1
  89. package/dist/components/z-carousel.js +1 -1
  90. package/dist/components/z-color-picker.js +1 -1
  91. package/dist/components/z-cover-hero.js +1 -1
  92. package/dist/components/z-date-picker.js +1 -1
  93. package/dist/components/z-range-picker.js +1 -1
  94. package/dist/components/z-section-title.js +1 -1
  95. package/dist/esm/{index-B3nR3-Jw.js → index-DdetsoIY.js} +9 -3
  96. package/dist/esm/index-DdetsoIY.js.map +1 -0
  97. package/dist/esm/index.js +2 -2
  98. package/dist/esm/loader.js +1 -1
  99. package/dist/esm/{reactive-controller--oxj7x8w.js → reactive-controller-C_qN1xPW.js} +4 -4
  100. package/dist/esm/{reactive-controller--oxj7x8w.js.map → reactive-controller-C_qN1xPW.js.map} +1 -1
  101. package/dist/esm/{utils-DP4zBIll.js → utils-BO5sSCUY.js} +3 -3
  102. package/dist/esm/{utils-DP4zBIll.js.map → utils-BO5sSCUY.js.map} +1 -1
  103. package/dist/esm/{utils-C9lc3rtK.js → utils-CEdyahRZ.js} +3 -3
  104. package/dist/esm/{utils-C9lc3rtK.js.map → utils-CEdyahRZ.js.map} +1 -1
  105. package/dist/esm/web-components-library.js +1 -1
  106. package/dist/esm/z-accordion.entry.js +1 -1
  107. package/dist/esm/z-anchor-navigation.entry.js +1 -1
  108. package/dist/esm/z-app-header-deprecated.entry.js +1 -1
  109. package/dist/esm/z-app-header_12.entry.js +4 -4
  110. package/dist/esm/z-app-header_12.entry.js.map +1 -1
  111. package/dist/esm/z-aria-alert.entry.js +1 -1
  112. package/dist/esm/z-avatar.entry.js +1 -1
  113. package/dist/esm/z-book-card-app.entry.js +1 -1
  114. package/dist/esm/z-book-card-deprecated.entry.js +2 -2
  115. package/dist/esm/z-book-card.entry.js +1 -1
  116. package/dist/esm/z-breadcrumb.entry.js +2 -2
  117. package/dist/esm/z-card.entry.js +1 -1
  118. package/dist/esm/z-carousel.entry.js +1 -1
  119. package/dist/esm/z-chip.entry.js +7 -4
  120. package/dist/esm/z-chip.entry.js.map +1 -1
  121. package/dist/esm/z-color-picker.entry.js +2 -2
  122. package/dist/esm/z-combobox.entry.js +2 -2
  123. package/dist/esm/z-cover-hero.entry.js +1 -1
  124. package/dist/esm/z-date-picker.entry.js +2 -2
  125. package/dist/esm/z-dragdrop-area_2.entry.js +3 -3
  126. package/dist/esm/z-file-upload.entry.js +1 -1
  127. package/dist/esm/z-file.entry.js +1 -1
  128. package/dist/esm/z-info-reveal.entry.js +1 -1
  129. package/dist/esm/z-input-range.entry.js +2 -2
  130. package/dist/esm/z-menu-section.entry.js +1 -1
  131. package/dist/esm/z-menu.entry.js +2 -2
  132. package/dist/esm/z-myz-card-alert.entry.js +1 -1
  133. package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
  134. package/dist/esm/z-myz-card-footer.entry.js +1 -1
  135. package/dist/esm/z-myz-card-info.entry.js +2 -2
  136. package/dist/esm/z-myz-card_4.entry.js +1 -1
  137. package/dist/esm/z-myz-list-item.entry.js +2 -2
  138. package/dist/esm/z-navigation-tabs.entry.js +1 -1
  139. package/dist/esm/z-otp.entry.js +1 -1
  140. package/dist/esm/z-pagination.entry.js +1 -1
  141. package/dist/esm/z-popover.entry.js +2 -2
  142. package/dist/esm/z-range-picker.entry.js +2 -2
  143. package/dist/esm/z-section-title.entry.js +1 -1
  144. package/dist/esm/z-select.entry.js +2 -2
  145. package/dist/esm/z-skip-to-content.entry.js +2 -2
  146. package/dist/esm/z-slideshow.entry.js +2 -2
  147. package/dist/esm/z-table.entry.js +2 -2
  148. package/dist/esm/z-td.entry.js +1 -1
  149. package/dist/esm/z-th.entry.js +1 -1
  150. package/dist/esm/z-toast-notification-list.entry.js +1 -1
  151. package/dist/esm/z-toast-notification.entry.js +1 -1
  152. package/dist/esm/z-toggle-switch.entry.js +2 -2
  153. package/dist/esm/z-tool.entry.js +2 -2
  154. package/dist/esm/z-toolbar.entry.js +1 -1
  155. package/dist/esm/z-tooltip.entry.js +1 -1
  156. package/dist/esm/z-tr.entry.js +2 -2
  157. package/dist/esm/z-tree-list.entry.js +1 -1
  158. package/dist/types/beans/index.d.ts +5 -0
  159. package/dist/types/components/z-chip/index.d.ts +3 -1
  160. package/dist/types/components.d.ts +13 -2
  161. package/dist/web-components-library/index.esm.js +1 -1
  162. package/{www/build/p-8a545910.entry.js → dist/web-components-library/p-0380c815.entry.js} +2 -2
  163. package/dist/web-components-library/{p-d15e7b4f.entry.js → p-0c9247be.entry.js} +2 -2
  164. package/{www/build/p-d866a2e1.entry.js → dist/web-components-library/p-101efb38.entry.js} +2 -2
  165. package/dist/web-components-library/{p-6a952697.entry.js → p-20401d48.entry.js} +2 -2
  166. package/{www/build/p-ff89690a.entry.js → dist/web-components-library/p-24743ceb.entry.js} +2 -2
  167. package/dist/web-components-library/p-2f6f0c08.entry.js +2 -0
  168. package/dist/web-components-library/{p-f9c859dc.entry.js.map → p-2f6f0c08.entry.js.map} +1 -1
  169. package/dist/web-components-library/{p-474493cc.entry.js → p-30d82cf1.entry.js} +2 -2
  170. package/dist/web-components-library/{p-a238a3d0.entry.js → p-31883d39.entry.js} +2 -2
  171. package/{www/build/p-1ba5aa7a.entry.js → dist/web-components-library/p-3210fd43.entry.js} +2 -2
  172. package/dist/web-components-library/{p-71ddff9a.entry.js → p-39027ac1.entry.js} +2 -2
  173. package/dist/web-components-library/{p-c64a8fd8.entry.js → p-39bb7ee4.entry.js} +2 -2
  174. package/dist/web-components-library/{p-01d2d4e2.entry.js → p-3fe7c6e3.entry.js} +2 -2
  175. package/dist/web-components-library/{p-c7d65071.entry.js → p-40065476.entry.js} +2 -2
  176. package/dist/web-components-library/{p-3f6ea914.entry.js → p-54e5d76e.entry.js} +2 -2
  177. package/dist/web-components-library/{p-c5b3368c.entry.js → p-6d382092.entry.js} +2 -2
  178. package/dist/web-components-library/{p-f0557dd9.entry.js → p-791a76d6.entry.js} +2 -2
  179. package/{www/build/p-b38cacf2.entry.js → dist/web-components-library/p-7f37e2a2.entry.js} +2 -2
  180. package/dist/web-components-library/{p-4954dd38.entry.js → p-831d85f5.entry.js} +2 -2
  181. package/dist/web-components-library/{p-1c63269a.entry.js → p-873e12a2.entry.js} +2 -2
  182. package/dist/web-components-library/{p-10ad3d7c.entry.js → p-8dbf7843.entry.js} +2 -2
  183. package/{www/build/p-88e3fb55.entry.js → dist/web-components-library/p-908b8d73.entry.js} +2 -2
  184. package/{www/build/p-30579764.entry.js → dist/web-components-library/p-91d2c110.entry.js} +4 -4
  185. package/{www/build/p-a0a84d24.entry.js → dist/web-components-library/p-99b169c7.entry.js} +2 -2
  186. package/dist/web-components-library/{p-1c1f699b.entry.js → p-9ac57635.entry.js} +2 -2
  187. package/{www/build/p-ab364ca1.entry.js → dist/web-components-library/p-9b1a9044.entry.js} +2 -2
  188. package/{www/build/p-db1fa456.entry.js → dist/web-components-library/p-9f9c4296.entry.js} +2 -2
  189. package/dist/web-components-library/{p-Bx6o9v2_.js → p-B6jtvVtV.js} +2 -2
  190. package/{www/build/p-Bx6o9v2_.js.map → dist/web-components-library/p-B6jtvVtV.js.map} +1 -1
  191. package/{www/build/p-C8pbzcmM.js → dist/web-components-library/p-C_25lDQa.js} +3 -3
  192. package/dist/web-components-library/{p-C8pbzcmM.js.map → p-C_25lDQa.js.map} +1 -1
  193. package/{www/build/p-B3nR3-Jw.js → dist/web-components-library/p-DdetsoIY.js} +2 -2
  194. package/dist/web-components-library/p-DdetsoIY.js.map +1 -0
  195. package/dist/web-components-library/{p-55f6d3fe.entry.js → p-a4df3220.entry.js} +2 -2
  196. package/dist/web-components-library/{p-f4b9e6f4.entry.js → p-a6ffb921.entry.js} +2 -2
  197. package/dist/web-components-library/{p-354abbd7.entry.js → p-a702edc4.entry.js} +2 -2
  198. package/{www/build/p-4730e9a5.entry.js → dist/web-components-library/p-aa59ca29.entry.js} +2 -2
  199. package/dist/web-components-library/{p-7056f90f.entry.js → p-ad4c702b.entry.js} +2 -2
  200. package/dist/web-components-library/{p-89e96cde.entry.js → p-af6bdd6e.entry.js} +2 -2
  201. package/dist/web-components-library/{p-34d4ee45.entry.js → p-b2811bbb.entry.js} +2 -2
  202. package/{www/build/p-330486fc.entry.js → dist/web-components-library/p-b38bca77.entry.js} +2 -2
  203. package/dist/web-components-library/{p-e8eb3bc5.entry.js → p-bbb9029e.entry.js} +2 -2
  204. package/dist/web-components-library/{p-95c2e9b0.entry.js → p-c20730b2.entry.js} +2 -2
  205. package/dist/web-components-library/p-c2e2c6be.entry.js +2 -0
  206. package/dist/web-components-library/{p-dc26eb78.entry.js.map → p-c2e2c6be.entry.js.map} +1 -1
  207. package/dist/web-components-library/p-c30b2384.entry.js +2 -0
  208. package/dist/web-components-library/p-c30b2384.entry.js.map +1 -0
  209. package/dist/web-components-library/{p-076d802a.entry.js → p-c40d0776.entry.js} +2 -2
  210. package/dist/web-components-library/{p-164b8342.entry.js → p-c8663ffd.entry.js} +2 -2
  211. package/{www/build/p-86d3a3da.entry.js → dist/web-components-library/p-d0d950e1.entry.js} +2 -2
  212. package/dist/web-components-library/{p-70fe7ed8.entry.js → p-d33dcac5.entry.js} +2 -2
  213. package/{www/build/p-70fe7ed8.entry.js.map → dist/web-components-library/p-d33dcac5.entry.js.map} +1 -1
  214. package/{www/build/p-fb8a0bda.entry.js → dist/web-components-library/p-d8c06756.entry.js} +2 -2
  215. package/{www/build/p-21b9ec81.entry.js → dist/web-components-library/p-d9d80082.entry.js} +2 -2
  216. package/{www/build/p-8751b09d.entry.js → dist/web-components-library/p-dd361d13.entry.js} +2 -2
  217. package/{www/build/p-d639463e.entry.js → dist/web-components-library/p-e59a5539.entry.js} +2 -2
  218. package/{www/build/p-e5736b1f.entry.js → dist/web-components-library/p-e88048b8.entry.js} +2 -2
  219. package/{www/build/p-927d50ea.entry.js → dist/web-components-library/p-eb22ba82.entry.js} +2 -2
  220. package/dist/web-components-library/{p-02a5c216.entry.js → p-ec12d752.entry.js} +2 -2
  221. package/{www/build/p-9b1deaa1.entry.js → dist/web-components-library/p-f8fd6f08.entry.js} +2 -2
  222. package/{www/build/p-BeiZJJuW.js → dist/web-components-library/p-ip3tTfYi.js} +3 -3
  223. package/{www/build/p-BeiZJJuW.js.map → dist/web-components-library/p-ip3tTfYi.js.map} +1 -1
  224. package/dist/web-components-library/web-components-library.esm.js +1 -1
  225. package/package.json +1 -1
  226. package/www/build/index.esm.js +1 -1
  227. package/{dist/web-components-library/p-8a545910.entry.js → www/build/p-0380c815.entry.js} +2 -2
  228. package/www/build/{p-d15e7b4f.entry.js → p-0c9247be.entry.js} +2 -2
  229. package/{dist/web-components-library/p-d866a2e1.entry.js → www/build/p-101efb38.entry.js} +2 -2
  230. package/www/build/{p-6a952697.entry.js → p-20401d48.entry.js} +2 -2
  231. package/{dist/web-components-library/p-ff89690a.entry.js → www/build/p-24743ceb.entry.js} +2 -2
  232. package/www/build/p-2f6f0c08.entry.js +2 -0
  233. package/www/build/{p-f9c859dc.entry.js.map → p-2f6f0c08.entry.js.map} +1 -1
  234. package/www/build/{p-474493cc.entry.js → p-30d82cf1.entry.js} +2 -2
  235. package/www/build/{p-a238a3d0.entry.js → p-31883d39.entry.js} +2 -2
  236. package/{dist/web-components-library/p-1ba5aa7a.entry.js → www/build/p-3210fd43.entry.js} +2 -2
  237. package/www/build/{p-71ddff9a.entry.js → p-39027ac1.entry.js} +2 -2
  238. package/www/build/{p-c64a8fd8.entry.js → p-39bb7ee4.entry.js} +2 -2
  239. package/www/build/{p-01d2d4e2.entry.js → p-3fe7c6e3.entry.js} +2 -2
  240. package/www/build/{p-c7d65071.entry.js → p-40065476.entry.js} +2 -2
  241. package/www/build/{p-bcc5602c.js → p-54ce4fe9.js} +1 -1
  242. package/www/build/{p-3f6ea914.entry.js → p-54e5d76e.entry.js} +2 -2
  243. package/www/build/{p-c5b3368c.entry.js → p-6d382092.entry.js} +2 -2
  244. package/www/build/{p-f0557dd9.entry.js → p-791a76d6.entry.js} +2 -2
  245. package/{dist/web-components-library/p-b38cacf2.entry.js → www/build/p-7f37e2a2.entry.js} +2 -2
  246. package/www/build/{p-4954dd38.entry.js → p-831d85f5.entry.js} +2 -2
  247. package/www/build/{p-1c63269a.entry.js → p-873e12a2.entry.js} +2 -2
  248. package/www/build/{p-10ad3d7c.entry.js → p-8dbf7843.entry.js} +2 -2
  249. package/{dist/web-components-library/p-88e3fb55.entry.js → www/build/p-908b8d73.entry.js} +2 -2
  250. package/{dist/web-components-library/p-30579764.entry.js → www/build/p-91d2c110.entry.js} +4 -4
  251. package/{dist/web-components-library/p-a0a84d24.entry.js → www/build/p-99b169c7.entry.js} +2 -2
  252. package/www/build/{p-1c1f699b.entry.js → p-9ac57635.entry.js} +2 -2
  253. package/{dist/web-components-library/p-ab364ca1.entry.js → www/build/p-9b1a9044.entry.js} +2 -2
  254. package/{dist/web-components-library/p-db1fa456.entry.js → www/build/p-9f9c4296.entry.js} +2 -2
  255. package/www/build/{p-Bx6o9v2_.js → p-B6jtvVtV.js} +2 -2
  256. package/{dist/web-components-library/p-Bx6o9v2_.js.map → www/build/p-B6jtvVtV.js.map} +1 -1
  257. package/{dist/web-components-library/p-C8pbzcmM.js → www/build/p-C_25lDQa.js} +3 -3
  258. package/www/build/{p-C8pbzcmM.js.map → p-C_25lDQa.js.map} +1 -1
  259. package/{dist/web-components-library/p-B3nR3-Jw.js → www/build/p-DdetsoIY.js} +2 -2
  260. package/www/build/p-DdetsoIY.js.map +1 -0
  261. package/www/build/{p-55f6d3fe.entry.js → p-a4df3220.entry.js} +2 -2
  262. package/www/build/{p-f4b9e6f4.entry.js → p-a6ffb921.entry.js} +2 -2
  263. package/www/build/{p-354abbd7.entry.js → p-a702edc4.entry.js} +2 -2
  264. package/{dist/web-components-library/p-4730e9a5.entry.js → www/build/p-aa59ca29.entry.js} +2 -2
  265. package/www/build/{p-7056f90f.entry.js → p-ad4c702b.entry.js} +2 -2
  266. package/www/build/{p-89e96cde.entry.js → p-af6bdd6e.entry.js} +2 -2
  267. package/www/build/{p-34d4ee45.entry.js → p-b2811bbb.entry.js} +2 -2
  268. package/{dist/web-components-library/p-330486fc.entry.js → www/build/p-b38bca77.entry.js} +2 -2
  269. package/www/build/{p-e8eb3bc5.entry.js → p-bbb9029e.entry.js} +2 -2
  270. package/www/build/{p-95c2e9b0.entry.js → p-c20730b2.entry.js} +2 -2
  271. package/www/build/p-c2e2c6be.entry.js +2 -0
  272. package/www/build/{p-dc26eb78.entry.js.map → p-c2e2c6be.entry.js.map} +1 -1
  273. package/www/build/p-c30b2384.entry.js +2 -0
  274. package/www/build/p-c30b2384.entry.js.map +1 -0
  275. package/www/build/{p-076d802a.entry.js → p-c40d0776.entry.js} +2 -2
  276. package/www/build/{p-164b8342.entry.js → p-c8663ffd.entry.js} +2 -2
  277. package/{dist/web-components-library/p-86d3a3da.entry.js → www/build/p-d0d950e1.entry.js} +2 -2
  278. package/www/build/{p-70fe7ed8.entry.js → p-d33dcac5.entry.js} +2 -2
  279. package/{dist/web-components-library/p-70fe7ed8.entry.js.map → www/build/p-d33dcac5.entry.js.map} +1 -1
  280. package/{dist/web-components-library/p-fb8a0bda.entry.js → www/build/p-d8c06756.entry.js} +2 -2
  281. package/{dist/web-components-library/p-21b9ec81.entry.js → www/build/p-d9d80082.entry.js} +2 -2
  282. package/{dist/web-components-library/p-8751b09d.entry.js → www/build/p-dd361d13.entry.js} +2 -2
  283. package/{dist/web-components-library/p-d639463e.entry.js → www/build/p-e59a5539.entry.js} +2 -2
  284. package/{dist/web-components-library/p-e5736b1f.entry.js → www/build/p-e88048b8.entry.js} +2 -2
  285. package/{dist/web-components-library/p-927d50ea.entry.js → www/build/p-eb22ba82.entry.js} +2 -2
  286. package/www/build/{p-02a5c216.entry.js → p-ec12d752.entry.js} +2 -2
  287. package/{dist/web-components-library/p-9b1deaa1.entry.js → www/build/p-f8fd6f08.entry.js} +2 -2
  288. package/{dist/web-components-library/p-BeiZJJuW.js → www/build/p-ip3tTfYi.js} +3 -3
  289. package/{dist/web-components-library/p-BeiZJJuW.js.map → www/build/p-ip3tTfYi.js.map} +1 -1
  290. package/www/build/web-components-library.esm.js +1 -1
  291. package/www/index.html +1 -1
  292. package/dist/cjs/index-Cn7FFDHr.js.map +0 -1
  293. package/dist/esm/index-B3nR3-Jw.js.map +0 -1
  294. package/dist/web-components-library/p-B3nR3-Jw.js.map +0 -1
  295. package/dist/web-components-library/p-b565bff1.entry.js +0 -2
  296. package/dist/web-components-library/p-b565bff1.entry.js.map +0 -1
  297. package/dist/web-components-library/p-dc26eb78.entry.js +0 -2
  298. package/dist/web-components-library/p-f9c859dc.entry.js +0 -2
  299. package/www/build/p-B3nR3-Jw.js.map +0 -1
  300. package/www/build/p-b565bff1.entry.js +0 -2
  301. package/www/build/p-b565bff1.entry.js.map +0 -1
  302. package/www/build/p-dc26eb78.entry.js +0 -2
  303. package/www/build/p-f9c859dc.entry.js +0 -2
  304. /package/dist/web-components-library/{p-8a545910.entry.js.map → p-0380c815.entry.js.map} +0 -0
  305. /package/dist/web-components-library/{p-d15e7b4f.entry.js.map → p-0c9247be.entry.js.map} +0 -0
  306. /package/dist/web-components-library/{p-d866a2e1.entry.js.map → p-101efb38.entry.js.map} +0 -0
  307. /package/dist/web-components-library/{p-6a952697.entry.js.map → p-20401d48.entry.js.map} +0 -0
  308. /package/dist/web-components-library/{p-ff89690a.entry.js.map → p-24743ceb.entry.js.map} +0 -0
  309. /package/dist/web-components-library/{p-474493cc.entry.js.map → p-30d82cf1.entry.js.map} +0 -0
  310. /package/dist/web-components-library/{p-a238a3d0.entry.js.map → p-31883d39.entry.js.map} +0 -0
  311. /package/dist/web-components-library/{p-1ba5aa7a.entry.js.map → p-3210fd43.entry.js.map} +0 -0
  312. /package/dist/web-components-library/{p-71ddff9a.entry.js.map → p-39027ac1.entry.js.map} +0 -0
  313. /package/dist/web-components-library/{p-c64a8fd8.entry.js.map → p-39bb7ee4.entry.js.map} +0 -0
  314. /package/dist/web-components-library/{p-01d2d4e2.entry.js.map → p-3fe7c6e3.entry.js.map} +0 -0
  315. /package/dist/web-components-library/{p-c7d65071.entry.js.map → p-40065476.entry.js.map} +0 -0
  316. /package/dist/web-components-library/{p-3f6ea914.entry.js.map → p-54e5d76e.entry.js.map} +0 -0
  317. /package/dist/web-components-library/{p-c5b3368c.entry.js.map → p-6d382092.entry.js.map} +0 -0
  318. /package/dist/web-components-library/{p-f0557dd9.entry.js.map → p-791a76d6.entry.js.map} +0 -0
  319. /package/dist/web-components-library/{p-b38cacf2.entry.js.map → p-7f37e2a2.entry.js.map} +0 -0
  320. /package/dist/web-components-library/{p-4954dd38.entry.js.map → p-831d85f5.entry.js.map} +0 -0
  321. /package/dist/web-components-library/{p-1c63269a.entry.js.map → p-873e12a2.entry.js.map} +0 -0
  322. /package/dist/web-components-library/{p-10ad3d7c.entry.js.map → p-8dbf7843.entry.js.map} +0 -0
  323. /package/dist/web-components-library/{p-88e3fb55.entry.js.map → p-908b8d73.entry.js.map} +0 -0
  324. /package/dist/web-components-library/{p-30579764.entry.js.map → p-91d2c110.entry.js.map} +0 -0
  325. /package/dist/web-components-library/{p-a0a84d24.entry.js.map → p-99b169c7.entry.js.map} +0 -0
  326. /package/dist/web-components-library/{p-1c1f699b.entry.js.map → p-9ac57635.entry.js.map} +0 -0
  327. /package/dist/web-components-library/{p-ab364ca1.entry.js.map → p-9b1a9044.entry.js.map} +0 -0
  328. /package/dist/web-components-library/{p-db1fa456.entry.js.map → p-9f9c4296.entry.js.map} +0 -0
  329. /package/dist/web-components-library/{p-55f6d3fe.entry.js.map → p-a4df3220.entry.js.map} +0 -0
  330. /package/dist/web-components-library/{p-f4b9e6f4.entry.js.map → p-a6ffb921.entry.js.map} +0 -0
  331. /package/dist/web-components-library/{p-354abbd7.entry.js.map → p-a702edc4.entry.js.map} +0 -0
  332. /package/dist/web-components-library/{p-4730e9a5.entry.js.map → p-aa59ca29.entry.js.map} +0 -0
  333. /package/dist/web-components-library/{p-7056f90f.entry.js.map → p-ad4c702b.entry.js.map} +0 -0
  334. /package/dist/web-components-library/{p-89e96cde.entry.js.map → p-af6bdd6e.entry.js.map} +0 -0
  335. /package/dist/web-components-library/{p-34d4ee45.entry.js.map → p-b2811bbb.entry.js.map} +0 -0
  336. /package/dist/web-components-library/{p-330486fc.entry.js.map → p-b38bca77.entry.js.map} +0 -0
  337. /package/dist/web-components-library/{p-e8eb3bc5.entry.js.map → p-bbb9029e.entry.js.map} +0 -0
  338. /package/dist/web-components-library/{p-95c2e9b0.entry.js.map → p-c20730b2.entry.js.map} +0 -0
  339. /package/dist/web-components-library/{p-076d802a.entry.js.map → p-c40d0776.entry.js.map} +0 -0
  340. /package/dist/web-components-library/{p-164b8342.entry.js.map → p-c8663ffd.entry.js.map} +0 -0
  341. /package/dist/web-components-library/{p-86d3a3da.entry.js.map → p-d0d950e1.entry.js.map} +0 -0
  342. /package/dist/web-components-library/{p-fb8a0bda.entry.js.map → p-d8c06756.entry.js.map} +0 -0
  343. /package/dist/web-components-library/{p-21b9ec81.entry.js.map → p-d9d80082.entry.js.map} +0 -0
  344. /package/dist/web-components-library/{p-8751b09d.entry.js.map → p-dd361d13.entry.js.map} +0 -0
  345. /package/dist/web-components-library/{p-d639463e.entry.js.map → p-e59a5539.entry.js.map} +0 -0
  346. /package/dist/web-components-library/{p-e5736b1f.entry.js.map → p-e88048b8.entry.js.map} +0 -0
  347. /package/dist/web-components-library/{p-927d50ea.entry.js.map → p-eb22ba82.entry.js.map} +0 -0
  348. /package/dist/web-components-library/{p-02a5c216.entry.js.map → p-ec12d752.entry.js.map} +0 -0
  349. /package/dist/web-components-library/{p-9b1deaa1.entry.js.map → p-f8fd6f08.entry.js.map} +0 -0
  350. /package/www/build/{p-8a545910.entry.js.map → p-0380c815.entry.js.map} +0 -0
  351. /package/www/build/{p-d15e7b4f.entry.js.map → p-0c9247be.entry.js.map} +0 -0
  352. /package/www/build/{p-d866a2e1.entry.js.map → p-101efb38.entry.js.map} +0 -0
  353. /package/www/build/{p-6a952697.entry.js.map → p-20401d48.entry.js.map} +0 -0
  354. /package/www/build/{p-ff89690a.entry.js.map → p-24743ceb.entry.js.map} +0 -0
  355. /package/www/build/{p-474493cc.entry.js.map → p-30d82cf1.entry.js.map} +0 -0
  356. /package/www/build/{p-a238a3d0.entry.js.map → p-31883d39.entry.js.map} +0 -0
  357. /package/www/build/{p-1ba5aa7a.entry.js.map → p-3210fd43.entry.js.map} +0 -0
  358. /package/www/build/{p-71ddff9a.entry.js.map → p-39027ac1.entry.js.map} +0 -0
  359. /package/www/build/{p-c64a8fd8.entry.js.map → p-39bb7ee4.entry.js.map} +0 -0
  360. /package/www/build/{p-01d2d4e2.entry.js.map → p-3fe7c6e3.entry.js.map} +0 -0
  361. /package/www/build/{p-c7d65071.entry.js.map → p-40065476.entry.js.map} +0 -0
  362. /package/www/build/{p-3f6ea914.entry.js.map → p-54e5d76e.entry.js.map} +0 -0
  363. /package/www/build/{p-c5b3368c.entry.js.map → p-6d382092.entry.js.map} +0 -0
  364. /package/www/build/{p-f0557dd9.entry.js.map → p-791a76d6.entry.js.map} +0 -0
  365. /package/www/build/{p-b38cacf2.entry.js.map → p-7f37e2a2.entry.js.map} +0 -0
  366. /package/www/build/{p-4954dd38.entry.js.map → p-831d85f5.entry.js.map} +0 -0
  367. /package/www/build/{p-1c63269a.entry.js.map → p-873e12a2.entry.js.map} +0 -0
  368. /package/www/build/{p-10ad3d7c.entry.js.map → p-8dbf7843.entry.js.map} +0 -0
  369. /package/www/build/{p-88e3fb55.entry.js.map → p-908b8d73.entry.js.map} +0 -0
  370. /package/www/build/{p-30579764.entry.js.map → p-91d2c110.entry.js.map} +0 -0
  371. /package/www/build/{p-a0a84d24.entry.js.map → p-99b169c7.entry.js.map} +0 -0
  372. /package/www/build/{p-1c1f699b.entry.js.map → p-9ac57635.entry.js.map} +0 -0
  373. /package/www/build/{p-ab364ca1.entry.js.map → p-9b1a9044.entry.js.map} +0 -0
  374. /package/www/build/{p-db1fa456.entry.js.map → p-9f9c4296.entry.js.map} +0 -0
  375. /package/www/build/{p-55f6d3fe.entry.js.map → p-a4df3220.entry.js.map} +0 -0
  376. /package/www/build/{p-f4b9e6f4.entry.js.map → p-a6ffb921.entry.js.map} +0 -0
  377. /package/www/build/{p-354abbd7.entry.js.map → p-a702edc4.entry.js.map} +0 -0
  378. /package/www/build/{p-4730e9a5.entry.js.map → p-aa59ca29.entry.js.map} +0 -0
  379. /package/www/build/{p-7056f90f.entry.js.map → p-ad4c702b.entry.js.map} +0 -0
  380. /package/www/build/{p-89e96cde.entry.js.map → p-af6bdd6e.entry.js.map} +0 -0
  381. /package/www/build/{p-34d4ee45.entry.js.map → p-b2811bbb.entry.js.map} +0 -0
  382. /package/www/build/{p-330486fc.entry.js.map → p-b38bca77.entry.js.map} +0 -0
  383. /package/www/build/{p-e8eb3bc5.entry.js.map → p-bbb9029e.entry.js.map} +0 -0
  384. /package/www/build/{p-95c2e9b0.entry.js.map → p-c20730b2.entry.js.map} +0 -0
  385. /package/www/build/{p-076d802a.entry.js.map → p-c40d0776.entry.js.map} +0 -0
  386. /package/www/build/{p-164b8342.entry.js.map → p-c8663ffd.entry.js.map} +0 -0
  387. /package/www/build/{p-86d3a3da.entry.js.map → p-d0d950e1.entry.js.map} +0 -0
  388. /package/www/build/{p-fb8a0bda.entry.js.map → p-d8c06756.entry.js.map} +0 -0
  389. /package/www/build/{p-21b9ec81.entry.js.map → p-d9d80082.entry.js.map} +0 -0
  390. /package/www/build/{p-8751b09d.entry.js.map → p-dd361d13.entry.js.map} +0 -0
  391. /package/www/build/{p-d639463e.entry.js.map → p-e59a5539.entry.js.map} +0 -0
  392. /package/www/build/{p-e5736b1f.entry.js.map → p-e88048b8.entry.js.map} +0 -0
  393. /package/www/build/{p-927d50ea.entry.js.map → p-eb22ba82.entry.js.map} +0 -0
  394. /package/www/build/{p-02a5c216.entry.js.map → p-ec12d752.entry.js.map} +0 -0
  395. /package/www/build/{p-9b1deaa1.entry.js.map → p-f8fd6f08.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as i,c as e,h as s,H as a,d as t}from"./p-BcDWN4F1.js";import{w as l}from"./p-B3nR3-Jw.js";const o=()=>`.sc-z-file-upload-h{display:flex;flex-direction:column;align-items:flex-start;color:var(--color-default-text);font-family:var(--font-family-sans);font-weight:var(--font-rg)}.sc-z-file-upload-h .modal-wrapper.sc-z-file-upload{display:flex;flex-direction:column;justify-content:center;padding:calc(var(--space-unit) * 2);row-gap:calc(var(--space-unit) * 2)}.sc-z-file-upload-h .modal-wrapper.sc-z-file-upload>.files-wrapper.sc-z-file-upload{display:flex;flex-direction:column;margin:calc(var(--space-unit) * 4);gap:var(--space-unit)}.sc-z-file-upload-h .text-container.sc-z-file-upload{display:flex;flex-direction:column;margin:auto;text-align:center}.sc-z-file-upload-h .text-container.sc-z-file-upload .upload-link.sc-z-file-upload{color:var(--color-text-link-blue);cursor:pointer;text-decoration:underline}.sc-z-file-upload-h .text-container.sc-z-file-upload .upload-link.sc-z-file-upload:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none !important}.sc-z-file-upload-h .text-container.sc-z-file-upload .upload-link-text.sc-z-file-upload{margin-bottom:var(--space-unit)}.sc-z-file-upload-h input[type="file"].sc-z-file-upload{display:none}.sc-z-file-upload-h #title.sc-z-file-upload+#description.sc-z-file-upload{margin-top:var(--space-unit)}.sc-z-file-upload-h>*.sc-z-file-upload+z-button.sc-z-file-upload,.sc-z-file-upload-h>.files-container.sc-z-file-upload+*.sc-z-file-upload,.sc-z-file-upload-h>.files-container.sc-z-file-upload:not(:first-child){margin-top:calc(var(--space-unit) * 3)}.sc-z-file-upload-h>.files-container.hidden.sc-z-file-upload{display:none}.sc-z-file-upload-h>.files-container.sc-z-file-upload>.uploaded-files-label.sc-z-file-upload{margin-bottom:calc(var(--space-unit) * 2)}.sc-z-file-upload-h>.files-container.sc-z-file-upload>.files-wrapper.sc-z-file-upload{display:flex;flex-wrap:wrap;column-gap:calc(var(--space-unit) * 2);row-gap:calc(var(--space-unit) * 2)}@media (min-width: 768px){.sc-z-file-upload-h>.container.sc-z-file-upload>z-button.sc-z-file-upload{align-self:flex-start}.sc-z-file-upload-h .modal-wrapper.sc-z-file-upload{padding:calc(var(--space-unit) * 3)}}@media (min-width: 1152px){.sc-z-file-upload-h .modal-wrapper.sc-z-file-upload{padding:calc(var(--space-unit) * 4)}}`;const r=class{constructor(s){i(this,s);this.fileInput=e(this,"fileInput",7);this.fileError=e(this,"fileError",7);this.type=l.DEFAULT;this.uploadBtnLabel="allega";this.dragAndDropLabel="Rilascia i file in questa area per allegarli.";this.uploadClickableMessage="Carica";this.uploadMessage="o trascina dal tuo computer";this.errorModalTitle="Errore di caricamento";this.uploadedFilesLabel="File appena caricati";this.hasFileSection=true;this.inputName="z-file-upload";this.showErrors=true;this._type=this.type;this.files=[];this.invalidFiles=new Map}onFileRemoved(i){this.removeFile(i.detail.fileName)}fileDroppedListener(i){this.input.files=i.detail;this.checkFilesValidity(this.input.files)}async getFiles(){return this.files}async removeFile(i){const e=this.files;const s=e.findIndex((e=>e.name===i));if(s>=0){e.splice(s,1);this.files=[...e]}}checkFilesValidity(i){if(!i.length){return}Array.from(i).forEach((i=>{const e=i.size/1024/1024;const s=this.acceptedFormat.split(",").some((e=>i.name.toLowerCase().endsWith(e.trim())));const a=e<=this.fileMaxSize;if(a&&s&&!this.files.find((e=>e.name===i.name))){this.files=[...this.files,i];this.fileInput.emit(i);this.input.value="";return}const t=`Il file ${i.name} supera il limite di ${this.fileMaxSize}MB`;const l=`Il file ${i.name} ha un formato non supportato`;const o=[!a&&{cause:"size",message:t},!s&&{cause:"format",message:l}].filter(Boolean);this.invalidFiles.set(i.name,o);this.invalidFiles=new Map(this.invalidFiles);this.fileError.emit({file:i.name,errors:o})}))}resetErrors(){this.invalidFiles=new Map}onFilesChange(i){this.checkFilesValidity(i.target.files)}componentWillLoad(){const i=window.matchMedia("(max-width: 1151px)");this._type=i.matches?l.DEFAULT:this.type;i.addEventListener("change",(i=>{this._type=i.matches?l.DEFAULT:this.type}))}componentDidUpdate(){if(!this.showErrors||!this.invalidFiles.size){return}this.errorModal.open()}renderDescription(i){if(!this.description){return}return s("span",{id:"description",class:i},this.description)}renderAllowedFilesMessage(){let i="";let e="";if(this.acceptedFormat){const e=this.acceptedFormat.split(", ").map((i=>i.substring(1).toUpperCase())).join(", ");i=` nei formati ${e}`}if(this.fileMaxSize){e=` per un massimo di ${this.fileMaxSize}MB di peso`}const a=i||e?`Puoi allegare file${i}${e}.`:undefined;if(!this.allowedFilesMessage&&!a){return}return s("span",{class:"allowed-files-message body-3"},this.allowedFilesMessage||a)}renderFileSection(){if(!this.hasFileSection){return}return s("section",{class:{"files-container":true,hidden:!this.files.length}},s("div",{class:"uploaded-files-label heading-3-sb"},this.uploadedFilesLabel),s("div",{class:"files-wrapper"},s("slot",{name:"files"})))}renderInput(){return s("input",{type:"file",name:this.inputName,multiple:true,onChange:i=>this.onFilesChange(i),accept:this.acceptedFormat,"aria-labelledby":this.description?"description":undefined,ref:i=>this.input=i})}renderUploadButton(){return[s("z-button",{onClick:()=>this.input.click(),onKeyPress:i=>{if(i.code=="Space"||i.code=="Enter"){i.preventDefault();this.input.click()}},id:"fileSelect",variant:this.buttonVariant,icon:"upload"},this.uploadBtnLabel),this.renderInput()]}renderUploadLink(){return[this.renderInput(),s("span",{class:"body-1 upload-link-text"},s("span",{tabIndex:0,class:"body-1-sb upload-link",onClick:()=>this.input.click(),onKeyPress:i=>{if(i.code=="Space"||i.code=="Enter"){i.preventDefault();this.input.click()}}},this.uploadClickableMessage)," ",this.uploadMessage)]}renderDefaultMode(){return[this.renderDescription("body-3-sb"),this.renderAllowedFilesMessage(),this.renderFileSection(),this.renderUploadButton()]}renderDragDropMode(){return[this.renderFileSection(),s("z-dragdrop-area",{"drag-and-drop-label":this.dragAndDropLabel},s("div",{class:"text-container"},this.renderDescription("body-1"),this.renderUploadLink(),this.renderAllowedFilesMessage()))]}renderFileErrors(){return Array.from(this.invalidFiles).map((([i,e])=>{const a=`Il file ${i}`;return s("span",{class:"error-message"},"Il file ",s("span",{class:"body-3-sb"},i),e.map((({message:i})=>i.replace(a,""))).join(" e "),".")}))}render(){return s(a,{key:"26a1a04ff6d1a9c9cf0e16311bb747b349c7ca67"},this.mainTitle&&s("div",{key:"cbce95e36bb7a1fe81c8c41e0723169e6b47442d",id:"title",class:"heading-3-sb"},this.mainTitle),this._type==l.DEFAULT?this.renderDefaultMode():this.renderDragDropMode(),!!this.invalidFiles.size&&this.showErrors&&s("z-modal",{key:"6a000d85f1f9b46a2872b4fa40b978a97427018c",modalid:`file-upload-${this.type}-error-modal`,ref:i=>this.errorModal=i,modaltitle:this.errorModalTitle,onModalClose:()=>this.resetErrors(),onModalBackgroundClick:()=>this.resetErrors()},s("div",{key:"caa8f6424a54d279ed2eca6c7514390324b40c59",slot:"modalContent"},s("div",{key:"b069c1fff610bcf4adbff57b0c5a9fa3e70e32ea",class:"modal-wrapper body-3"},this.errorModalMessage?this.errorModalMessage:this.renderFileErrors()))))}get host(){return t(this)}};r.style=o();export{r as z_file_upload};
2
- //# sourceMappingURL=p-fb8a0bda.entry.js.map
1
+ import{r as i,c as e,h as s,H as a,d as t}from"./p-BcDWN4F1.js";import{w as l}from"./p-DdetsoIY.js";const o=()=>`.sc-z-file-upload-h{display:flex;flex-direction:column;align-items:flex-start;color:var(--color-default-text);font-family:var(--font-family-sans);font-weight:var(--font-rg)}.sc-z-file-upload-h .modal-wrapper.sc-z-file-upload{display:flex;flex-direction:column;justify-content:center;padding:calc(var(--space-unit) * 2);row-gap:calc(var(--space-unit) * 2)}.sc-z-file-upload-h .modal-wrapper.sc-z-file-upload>.files-wrapper.sc-z-file-upload{display:flex;flex-direction:column;margin:calc(var(--space-unit) * 4);gap:var(--space-unit)}.sc-z-file-upload-h .text-container.sc-z-file-upload{display:flex;flex-direction:column;margin:auto;text-align:center}.sc-z-file-upload-h .text-container.sc-z-file-upload .upload-link.sc-z-file-upload{color:var(--color-text-link-blue);cursor:pointer;text-decoration:underline}.sc-z-file-upload-h .text-container.sc-z-file-upload .upload-link.sc-z-file-upload:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none !important}.sc-z-file-upload-h .text-container.sc-z-file-upload .upload-link-text.sc-z-file-upload{margin-bottom:var(--space-unit)}.sc-z-file-upload-h input[type="file"].sc-z-file-upload{display:none}.sc-z-file-upload-h #title.sc-z-file-upload+#description.sc-z-file-upload{margin-top:var(--space-unit)}.sc-z-file-upload-h>*.sc-z-file-upload+z-button.sc-z-file-upload,.sc-z-file-upload-h>.files-container.sc-z-file-upload+*.sc-z-file-upload,.sc-z-file-upload-h>.files-container.sc-z-file-upload:not(:first-child){margin-top:calc(var(--space-unit) * 3)}.sc-z-file-upload-h>.files-container.hidden.sc-z-file-upload{display:none}.sc-z-file-upload-h>.files-container.sc-z-file-upload>.uploaded-files-label.sc-z-file-upload{margin-bottom:calc(var(--space-unit) * 2)}.sc-z-file-upload-h>.files-container.sc-z-file-upload>.files-wrapper.sc-z-file-upload{display:flex;flex-wrap:wrap;column-gap:calc(var(--space-unit) * 2);row-gap:calc(var(--space-unit) * 2)}@media (min-width: 768px){.sc-z-file-upload-h>.container.sc-z-file-upload>z-button.sc-z-file-upload{align-self:flex-start}.sc-z-file-upload-h .modal-wrapper.sc-z-file-upload{padding:calc(var(--space-unit) * 3)}}@media (min-width: 1152px){.sc-z-file-upload-h .modal-wrapper.sc-z-file-upload{padding:calc(var(--space-unit) * 4)}}`;const r=class{constructor(s){i(this,s);this.fileInput=e(this,"fileInput",7);this.fileError=e(this,"fileError",7);this.type=l.DEFAULT;this.uploadBtnLabel="allega";this.dragAndDropLabel="Rilascia i file in questa area per allegarli.";this.uploadClickableMessage="Carica";this.uploadMessage="o trascina dal tuo computer";this.errorModalTitle="Errore di caricamento";this.uploadedFilesLabel="File appena caricati";this.hasFileSection=true;this.inputName="z-file-upload";this.showErrors=true;this._type=this.type;this.files=[];this.invalidFiles=new Map}onFileRemoved(i){this.removeFile(i.detail.fileName)}fileDroppedListener(i){this.input.files=i.detail;this.checkFilesValidity(this.input.files)}async getFiles(){return this.files}async removeFile(i){const e=this.files;const s=e.findIndex((e=>e.name===i));if(s>=0){e.splice(s,1);this.files=[...e]}}checkFilesValidity(i){if(!i.length){return}Array.from(i).forEach((i=>{const e=i.size/1024/1024;const s=this.acceptedFormat.split(",").some((e=>i.name.toLowerCase().endsWith(e.trim())));const a=e<=this.fileMaxSize;if(a&&s&&!this.files.find((e=>e.name===i.name))){this.files=[...this.files,i];this.fileInput.emit(i);this.input.value="";return}const t=`Il file ${i.name} supera il limite di ${this.fileMaxSize}MB`;const l=`Il file ${i.name} ha un formato non supportato`;const o=[!a&&{cause:"size",message:t},!s&&{cause:"format",message:l}].filter(Boolean);this.invalidFiles.set(i.name,o);this.invalidFiles=new Map(this.invalidFiles);this.fileError.emit({file:i.name,errors:o})}))}resetErrors(){this.invalidFiles=new Map}onFilesChange(i){this.checkFilesValidity(i.target.files)}componentWillLoad(){const i=window.matchMedia("(max-width: 1151px)");this._type=i.matches?l.DEFAULT:this.type;i.addEventListener("change",(i=>{this._type=i.matches?l.DEFAULT:this.type}))}componentDidUpdate(){if(!this.showErrors||!this.invalidFiles.size){return}this.errorModal.open()}renderDescription(i){if(!this.description){return}return s("span",{id:"description",class:i},this.description)}renderAllowedFilesMessage(){let i="";let e="";if(this.acceptedFormat){const e=this.acceptedFormat.split(", ").map((i=>i.substring(1).toUpperCase())).join(", ");i=` nei formati ${e}`}if(this.fileMaxSize){e=` per un massimo di ${this.fileMaxSize}MB di peso`}const a=i||e?`Puoi allegare file${i}${e}.`:undefined;if(!this.allowedFilesMessage&&!a){return}return s("span",{class:"allowed-files-message body-3"},this.allowedFilesMessage||a)}renderFileSection(){if(!this.hasFileSection){return}return s("section",{class:{"files-container":true,hidden:!this.files.length}},s("div",{class:"uploaded-files-label heading-3-sb"},this.uploadedFilesLabel),s("div",{class:"files-wrapper"},s("slot",{name:"files"})))}renderInput(){return s("input",{type:"file",name:this.inputName,multiple:true,onChange:i=>this.onFilesChange(i),accept:this.acceptedFormat,"aria-labelledby":this.description?"description":undefined,ref:i=>this.input=i})}renderUploadButton(){return[s("z-button",{onClick:()=>this.input.click(),onKeyPress:i=>{if(i.code=="Space"||i.code=="Enter"){i.preventDefault();this.input.click()}},id:"fileSelect",variant:this.buttonVariant,icon:"upload"},this.uploadBtnLabel),this.renderInput()]}renderUploadLink(){return[this.renderInput(),s("span",{class:"body-1 upload-link-text"},s("span",{tabIndex:0,class:"body-1-sb upload-link",onClick:()=>this.input.click(),onKeyPress:i=>{if(i.code=="Space"||i.code=="Enter"){i.preventDefault();this.input.click()}}},this.uploadClickableMessage)," ",this.uploadMessage)]}renderDefaultMode(){return[this.renderDescription("body-3-sb"),this.renderAllowedFilesMessage(),this.renderFileSection(),this.renderUploadButton()]}renderDragDropMode(){return[this.renderFileSection(),s("z-dragdrop-area",{"drag-and-drop-label":this.dragAndDropLabel},s("div",{class:"text-container"},this.renderDescription("body-1"),this.renderUploadLink(),this.renderAllowedFilesMessage()))]}renderFileErrors(){return Array.from(this.invalidFiles).map((([i,e])=>{const a=`Il file ${i}`;return s("span",{class:"error-message"},"Il file ",s("span",{class:"body-3-sb"},i),e.map((({message:i})=>i.replace(a,""))).join(" e "),".")}))}render(){return s(a,{key:"26a1a04ff6d1a9c9cf0e16311bb747b349c7ca67"},this.mainTitle&&s("div",{key:"cbce95e36bb7a1fe81c8c41e0723169e6b47442d",id:"title",class:"heading-3-sb"},this.mainTitle),this._type==l.DEFAULT?this.renderDefaultMode():this.renderDragDropMode(),!!this.invalidFiles.size&&this.showErrors&&s("z-modal",{key:"6a000d85f1f9b46a2872b4fa40b978a97427018c",modalid:`file-upload-${this.type}-error-modal`,ref:i=>this.errorModal=i,modaltitle:this.errorModalTitle,onModalClose:()=>this.resetErrors(),onModalBackgroundClick:()=>this.resetErrors()},s("div",{key:"caa8f6424a54d279ed2eca6c7514390324b40c59",slot:"modalContent"},s("div",{key:"b069c1fff610bcf4adbff57b0c5a9fa3e70e32ea",class:"modal-wrapper body-3"},this.errorModalMessage?this.errorModalMessage:this.renderFileErrors()))))}get host(){return t(this)}};r.style=o();export{r as z_file_upload};
2
+ //# sourceMappingURL=p-d8c06756.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,h as i,H as n,d as o}from"./p-BcDWN4F1.js";import{T as s}from"./p-B3nR3-Jw.js";import{i as e,h as c}from"./p-C8pbzcmM.js";import"./p-Q-tWjk7P.js";const r=()=>`.sc-z-skip-to-content-h{position:absolute;left:-100%;height:60px;box-sizing:border-box;padding:calc(var(--space-unit) * 1.25) calc(var(--space-unit) * 3);background-color:#24f4ff;font-family:var(--font-family-sans);font-weight:var(--font-rg);text-align:center}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content{display:inline-flex;height:100%;align-items:center}.skip-to-content-visible.sc-z-skip-to-content-h,.sc-z-skip-to-content-h:focus{position:static;display:block}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content>a.z-link.link-invisible.sc-z-skip-to-content{overflow:hidden;width:0;height:0}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content>a.z-link.link-visible.sc-z-skip-to-content{width:initial;height:initial}.dark.sc-z-skip-to-content-h{background-color:var(--color-surface05);color:var(--color-surface01)}.light.sc-z-skip-to-content-h{border:var(--border-size-medium) solid var(--color-surface05);background-color:var(--color-surface01);color:var(--color-default-text)}@media (min-width: 768px){.sc-z-skip-to-content-h{text-align:start}}@media (min-width: 1152px){.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content{padding:0 calc(var(--space-unit) * 3);border-right:var(--border-size-small) solid var(--color-surface05)}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content>a.z-link.link-invisible.sc-z-skip-to-content{overflow:initial;width:initial;height:initial}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content:first-child{padding-left:0}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content:last-child,.dark.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content:last-child,.light.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content:last-child{padding-right:0;border-right:none}.dark.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content{border-right:var(--border-size-small) solid var(--color-surface01)}}`;const l=class{constructor(i){t(this,i);this.links=[];this.visible=false;this.visibleLink=""}handleFocusOutSkipToContent(t){if(this.isInSkipToContent(t.target)){this.visible=false}}handleFocusSkipToContent(t){if(this.isInSkipToContent(t.target)){this.visible=true}}componentDidLoad(){this.showFirstChild()}componentWillRender(){if(this.links){this.links=typeof this.links==="string"?JSON.parse(this.links):this.links}}isInSkipToContent(t){const i=e(t);const n=i.find((t=>t.nodeName.toLowerCase()==="z-skip-to-content"));return!!n}showFirstChild(){var t;const i=(t=this.hostElement.children)===null||t===void 0?void 0:t[0];if(i){this.visibleLink=i.id}}handleLinkClick(){this.visible=false}render(){return i(n,{key:"4d67e8db2640893fe95bb9cf06711244ab12a5c3",class:{[this.variant]:true,"skip-to-content-visible":this.visible}},this.links.map(((t,n)=>{const o=`skip-to-content-${n}`;return i("div",{class:"link-container"},i("a",{id:o,class:{"body-1-sb":true,"z-link":true,"z-link-underline":true,"z-link-inverse":this.variant===s.DARK,"link-visible":o==this.visibleLink,"link-invisible":o!=this.visibleLink},"aria-label":t.ariaLabel||t.label,href:t.href,onFocus:()=>this.visibleLink=o,onClick:()=>this.handleLinkClick(),onKeyUp:t=>c(t,this.handleLinkClick.bind(this))},t.label))})))}get hostElement(){return o(this)}};l.style=r();export{l as z_skip_to_content};
2
- //# sourceMappingURL=p-21b9ec81.entry.js.map
1
+ import{r as t,h as i,H as n,d as o}from"./p-BcDWN4F1.js";import{T as s}from"./p-DdetsoIY.js";import{i as e,h as c}from"./p-C_25lDQa.js";import"./p-Q-tWjk7P.js";const r=()=>`.sc-z-skip-to-content-h{position:absolute;left:-100%;height:60px;box-sizing:border-box;padding:calc(var(--space-unit) * 1.25) calc(var(--space-unit) * 3);background-color:#24f4ff;font-family:var(--font-family-sans);font-weight:var(--font-rg);text-align:center}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content{display:inline-flex;height:100%;align-items:center}.skip-to-content-visible.sc-z-skip-to-content-h,.sc-z-skip-to-content-h:focus{position:static;display:block}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content>a.z-link.link-invisible.sc-z-skip-to-content{overflow:hidden;width:0;height:0}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content>a.z-link.link-visible.sc-z-skip-to-content{width:initial;height:initial}.dark.sc-z-skip-to-content-h{background-color:var(--color-surface05);color:var(--color-surface01)}.light.sc-z-skip-to-content-h{border:var(--border-size-medium) solid var(--color-surface05);background-color:var(--color-surface01);color:var(--color-default-text)}@media (min-width: 768px){.sc-z-skip-to-content-h{text-align:start}}@media (min-width: 1152px){.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content{padding:0 calc(var(--space-unit) * 3);border-right:var(--border-size-small) solid var(--color-surface05)}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content>a.z-link.link-invisible.sc-z-skip-to-content{overflow:initial;width:initial;height:initial}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content:first-child{padding-left:0}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content:last-child,.dark.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content:last-child,.light.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content:last-child{padding-right:0;border-right:none}.dark.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content{border-right:var(--border-size-small) solid var(--color-surface01)}}`;const l=class{constructor(i){t(this,i);this.links=[];this.visible=false;this.visibleLink=""}handleFocusOutSkipToContent(t){if(this.isInSkipToContent(t.target)){this.visible=false}}handleFocusSkipToContent(t){if(this.isInSkipToContent(t.target)){this.visible=true}}componentDidLoad(){this.showFirstChild()}componentWillRender(){if(this.links){this.links=typeof this.links==="string"?JSON.parse(this.links):this.links}}isInSkipToContent(t){const i=e(t);const n=i.find((t=>t.nodeName.toLowerCase()==="z-skip-to-content"));return!!n}showFirstChild(){var t;const i=(t=this.hostElement.children)===null||t===void 0?void 0:t[0];if(i){this.visibleLink=i.id}}handleLinkClick(){this.visible=false}render(){return i(n,{key:"4d67e8db2640893fe95bb9cf06711244ab12a5c3",class:{[this.variant]:true,"skip-to-content-visible":this.visible}},this.links.map(((t,n)=>{const o=`skip-to-content-${n}`;return i("div",{class:"link-container"},i("a",{id:o,class:{"body-1-sb":true,"z-link":true,"z-link-underline":true,"z-link-inverse":this.variant===s.DARK,"link-visible":o==this.visibleLink,"link-invisible":o!=this.visibleLink},"aria-label":t.ariaLabel||t.label,href:t.href,onFocus:()=>this.visibleLink=o,onClick:()=>this.handleLinkClick(),onKeyUp:t=>c(t,this.handleLinkClick.bind(this))},t.label))})))}get hostElement(){return o(this)}};l.style=r();export{l as z_skip_to_content};
2
+ //# sourceMappingURL=p-d9d80082.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,h as o,H as r,d as a}from"./p-BcDWN4F1.js";import{P as s,S as n,e as i,B as l}from"./p-B3nR3-Jw.js";const c=()=>`:host{position:relative;display:flex;max-width:100%;align-items:center;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=()=>`:host{z-index:1;padding:0;background-color:var(--color-background);font-weight:var(--font-sb)}:host([show-sorting]) .cell--content{column-gap:var(--space-unit)}.z-th--sort-button{position:relative;padding:0;border:none;background-color:transparent;cursor:pointer;outline:none}.z-th--sort-button:focus,.z-th--sort-button:focus-visible{box-shadow:var(--shadow-focus-primary);opacity:1;outline:none;pointer-events:all}@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:""}`;const b=()=>`z-table,table.z-table{background-color:var(--color-surface01);--z-table--cells-padding:calc(var(--space-unit) * 2)}table.z-table{border-collapse:collapse}z-thead,table.z-table thead{background-color:var(--color-background);--z-table--cells-bottom-border-size:var(--border-size-medium)}z-tfoot,table.z-table tfoot{border-top:var(--border-size-medium) solid var(--color-surface03);border-bottom:var(--border-size-medium) solid var(--color-surface03)}z-tfoot z-tr,table.z-table tfoot tr{border-bottom:calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important}z-tr,table.z-table tr{border-bottom:var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03)}z-td,z-th,table.z-table td,table.z-table th{padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2));text-align:left}z-th:not(:first-child),z-td:not(:first-child),table.z-table th:not(:first-child),table.z-table td:not(:first-child){border-left:var(--z-table--cell-left-border, none)}z-table[bordered],table.z-table.z-table-bordered{--z-table--cell-left-border:1px solid var(--color-surface03)}table.z-table-hover>tbody>tr:hover>td,table.z-table-hover>tfoot>tr:hover>td{position:relative;background-color:var(--color-surface02)}table.z-table-hover>tbody>tr:hover>td::after,table.z-table-hover>tfoot>tr:hover>td::after{position:absolute;z-index:1;top:0;right:0;bottom:0;left:-1px;box-shadow:inset 0 var(--border-size-small) 0 var(--color-surface04), inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);content:""}table.z-table-hover>tbody>tr:hover>td:first-child::after,table.z-table-hover>thead>tr:hover>th:first-child::after,table.z-table-hover>tfoot>tr:hover>td:first-child::after{left:0}`;const d=class{constructor(o){t(this,o);this.sort=e(this,"sort",7);this.showMenu=null;this.showSorting=null;this.sticky=false;this.sorted=false;this.popoverPosition=s.AUTO;this.isMenuOpen=false}get ariaSortDirection(){if(!this.sortDirection){return null}return this.sortDirection===n.ASC?"ascending":"descending"}handleSort(){if(!this.sortDirection){this.sorted=false;return}this.sortDirection=this.sortDirection===n.ASC?n.DESC:n.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(r,{key:"aef115e04b8a8c37c749a568bcb24250e062008b",role:"columnheader","menu-open":this.isMenuOpen,"aria-sort":this.ariaSortDirection,sortable:this.showSorting},o("div",{key:"5b78767c1d65440363c06d5e4b7137598e74d8b4",class:"cell--content"},o("slot",{key:"340210db9182785b89ed01a26d6dc60558aa9f4f"}),this.showSorting&&o("button",{key:"2c6f42cbf3a2c1d37af04182731503accfe67362",class:"z-th--sort-button",type:"button",onClick:this.handleSort.bind(this)},o("z-icon",{key:"ad73a2838da75772e84e431c36256e77bdf39157",name:this.sortDirection===n.DESC?"arrow-simple-up":"arrow-simple-down",width:14,height:14})),this.showMenu&&o("div",{key:"d4c23d3a5b05ccea94a03efa6b10efc65e4a0cf4",class:"cell--menu-container"},o("z-button",{key:"fb0930c50cd3ac363e764ded3d7be227678a5d2d",variant:l.TERTIARY,icon:"contextual-menu",size:i.X_SMALL,ref:t=>this.menuTrigger=t,onClick:()=>this.popoverEl.open=!this.popoverEl.open}),o("z-popover",{key:"b720485c31c2070d77e33bceacd5be582516ae38",ref:t=>this.popoverEl=t,bindTo:this.menuTrigger,onOpenChange:t=>this.isMenuOpen=t.detail.open,position:this.popoverPosition},o("slot",{key:"7372fa0d1ca9773ebbf8b6c8ec581133967aafdf",name:"contextual-menu"})))))}get host(){return a(this)}static get watchers(){return{colspan:[{updateColspan:0}]}}};d.style=c()+(h()+b());export{d as z_th};
2
- //# sourceMappingURL=p-8751b09d.entry.js.map
1
+ import{r as t,c as e,h as o,H as r,d as a}from"./p-BcDWN4F1.js";import{P as s,S as n,e as i,B as l}from"./p-DdetsoIY.js";const c=()=>`:host{position:relative;display:flex;max-width:100%;align-items:center;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=()=>`:host{z-index:1;padding:0;background-color:var(--color-background);font-weight:var(--font-sb)}:host([show-sorting]) .cell--content{column-gap:var(--space-unit)}.z-th--sort-button{position:relative;padding:0;border:none;background-color:transparent;cursor:pointer;outline:none}.z-th--sort-button:focus,.z-th--sort-button:focus-visible{box-shadow:var(--shadow-focus-primary);opacity:1;outline:none;pointer-events:all}@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:""}`;const d=()=>`z-table,table.z-table{background-color:var(--color-surface01);--z-table--cells-padding:calc(var(--space-unit) * 2)}table.z-table{border-collapse:collapse}z-thead,table.z-table thead{background-color:var(--color-background);--z-table--cells-bottom-border-size:var(--border-size-medium)}z-tfoot,table.z-table tfoot{border-top:var(--border-size-medium) solid var(--color-surface03);border-bottom:var(--border-size-medium) solid var(--color-surface03)}z-tfoot z-tr,table.z-table tfoot tr{border-bottom:calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important}z-tr,table.z-table tr{border-bottom:var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03)}z-td,z-th,table.z-table td,table.z-table th{padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2));text-align:left}z-th:not(:first-child),z-td:not(:first-child),table.z-table th:not(:first-child),table.z-table td:not(:first-child){border-left:var(--z-table--cell-left-border, none)}z-table[bordered],table.z-table.z-table-bordered{--z-table--cell-left-border:1px solid var(--color-surface03)}table.z-table-hover>tbody>tr:hover>td,table.z-table-hover>tfoot>tr:hover>td{position:relative;background-color:var(--color-surface02)}table.z-table-hover>tbody>tr:hover>td::after,table.z-table-hover>tfoot>tr:hover>td::after{position:absolute;z-index:1;top:0;right:0;bottom:0;left:-1px;box-shadow:inset 0 var(--border-size-small) 0 var(--color-surface04), inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);content:""}table.z-table-hover>tbody>tr:hover>td:first-child::after,table.z-table-hover>thead>tr:hover>th:first-child::after,table.z-table-hover>tfoot>tr:hover>td:first-child::after{left:0}`;const b=class{constructor(o){t(this,o);this.sort=e(this,"sort",7);this.showMenu=null;this.showSorting=null;this.sticky=false;this.sorted=false;this.popoverPosition=s.AUTO;this.isMenuOpen=false}get ariaSortDirection(){if(!this.sortDirection){return null}return this.sortDirection===n.ASC?"ascending":"descending"}handleSort(){if(!this.sortDirection){this.sorted=false;return}this.sortDirection=this.sortDirection===n.ASC?n.DESC:n.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(r,{key:"aef115e04b8a8c37c749a568bcb24250e062008b",role:"columnheader","menu-open":this.isMenuOpen,"aria-sort":this.ariaSortDirection,sortable:this.showSorting},o("div",{key:"5b78767c1d65440363c06d5e4b7137598e74d8b4",class:"cell--content"},o("slot",{key:"340210db9182785b89ed01a26d6dc60558aa9f4f"}),this.showSorting&&o("button",{key:"2c6f42cbf3a2c1d37af04182731503accfe67362",class:"z-th--sort-button",type:"button",onClick:this.handleSort.bind(this)},o("z-icon",{key:"ad73a2838da75772e84e431c36256e77bdf39157",name:this.sortDirection===n.DESC?"arrow-simple-up":"arrow-simple-down",width:14,height:14})),this.showMenu&&o("div",{key:"d4c23d3a5b05ccea94a03efa6b10efc65e4a0cf4",class:"cell--menu-container"},o("z-button",{key:"fb0930c50cd3ac363e764ded3d7be227678a5d2d",variant:l.TERTIARY,icon:"contextual-menu",size:i.X_SMALL,ref:t=>this.menuTrigger=t,onClick:()=>this.popoverEl.open=!this.popoverEl.open}),o("z-popover",{key:"b720485c31c2070d77e33bceacd5be582516ae38",ref:t=>this.popoverEl=t,bindTo:this.menuTrigger,onOpenChange:t=>this.isMenuOpen=t.detail.open,position:this.popoverPosition},o("slot",{key:"7372fa0d1ca9773ebbf8b6c8ec581133967aafdf",name:"contextual-menu"})))))}get host(){return a(this)}static get watchers(){return{colspan:[{updateColspan:0}]}}};b.style=c()+(h()+d());export{b as z_th};
2
+ //# sourceMappingURL=p-dd361d13.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,h as o,H as r,d as a}from"./p-BcDWN4F1.js";import{r as s}from"./p-C8pbzcmM.js";import"./p-01d2d4e2.entry.js";import"./p-8751b09d.entry.js";import"./p-B3nR3-Jw.js";import"./p-Q-tWjk7P.js";const l=()=>`:host{position:relative;display:grid;width:100%;box-sizing:border-box;grid-auto-flow:column;grid-template-columns:var(--z-table--expand-button-size, 0) repeat(var(--columns), minmax(128px, 1fr));--columns:1}*{box-sizing:border-box}:host([expandable]){--show-expandable-button:visible;cursor:pointer}:host([expandable]) ::slotted(*){grid-row:1}:host([expandable]) ::slotted(:nth-last-child(2)){border-right:none}:host([expandable]) ::slotted(*:last-child){border-top:var(--border-size-small) solid var(--color-surface03);border-left:0;grid-column:1 / span calc(var(--columns) + 1);grid-row:2}:host([expandable]:not([expanded])) ::slotted(*:last-child){display:none}:host([expanded]){margin-bottom:4px;box-shadow:0 4px 4px -2px var(--shadow-color-base)}:host([expanded]) .z-tr--expand-button-container,:host([expanded]) ::slotted(*){border-left:0 !important;background-color:var(--color-background)}:host([tabIndex]:hover) ::slotted(z-td),:host([tabIndex]:hover) ::slotted(z-th),:host([tabIndex]:hover) .z-tr--expand-button-container{background-color:var(--color-surface02)}:host([tabIndex]:hover) .z-tr--focus-overlay{border-top:var(--border-size-small) solid var(--color-surface04);border-bottom:var(--border-size-small) solid var(--color-surface04)}:host(:focus){position:relative;z-index:20;border:none !important;box-shadow:var(--shadow-focus-primary);outline:none}.z-tr--expand-button-container{display:flex;align-items:center;justify-content:center;background-color:var(--z-table--cells-background, var(--color-surface01))}.z-tr--expand-button-container button{display:flex;align-items:center;justify-content:center;padding:0;border:none;margin:auto;appearance:none;background:transparent;cursor:pointer;visibility:var(--show-expandable-button, hidden)}.z-tr--expand-button-container button z-icon{--z-icon-width:16px;--z-icon-height:16px}.z-tr--focus-overlay{position:absolute;z-index:30;top:calc(var(--border-size-small) * -1);bottom:0;left:0;width:100%;height:calc(100% + (var(--border-size-small) * 2));box-shadow:none;outline:none;pointer-events:none;transition:box-shadow 0.2s}:host(:focus) .z-tr--focus-overlay{box-shadow:0 0 0 2px var(--shadow-focus-primary), var(--shadow-focus-primary);outline:none}:host(:focus) ::slotted(*){border-bottom:none}:host(:focus) .z-tr--expand-button-container{border-bottom:none}`;const d=()=>`z-table,table.z-table{background-color:var(--color-surface01);--z-table--cells-padding:calc(var(--space-unit) * 2)}table.z-table{border-collapse:collapse}z-thead,table.z-table thead{background-color:var(--color-background);--z-table--cells-bottom-border-size:var(--border-size-medium)}z-tfoot,table.z-table tfoot{border-top:var(--border-size-medium) solid var(--color-surface03);border-bottom:var(--border-size-medium) solid var(--color-surface03)}z-tfoot z-tr,table.z-table tfoot tr{border-bottom:calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important}z-tr,table.z-table tr{border-bottom:var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03)}z-td,z-th,table.z-table td,table.z-table th{padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2));text-align:left}z-th:not(:first-child),z-td:not(:first-child),table.z-table th:not(:first-child),table.z-table td:not(:first-child){border-left:var(--z-table--cell-left-border, none)}z-table[bordered],table.z-table.z-table-bordered{--z-table--cell-left-border:1px solid var(--color-surface03)}table.z-table-hover>tbody>tr:hover>td,table.z-table-hover>tfoot>tr:hover>td{position:relative;background-color:var(--color-surface02)}table.z-table-hover>tbody>tr:hover>td::after,table.z-table-hover>tfoot>tr:hover>td::after{position:absolute;z-index:1;top:0;right:0;bottom:0;left:-1px;box-shadow:inset 0 var(--border-size-small) 0 var(--color-surface04), inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);content:""}table.z-table-hover>tbody>tr:hover>td:first-child::after,table.z-table-hover>thead>tr:hover>th:first-child::after,table.z-table-hover>tfoot>tr:hover>td:first-child::after{left:0}`;const n=class{constructor(o){t(this,o);this.expand=e(this,"expand",7);this.expandable=false;this.expanded=false}updateColumns(){const t=Array.from(this.host.querySelectorAll("z-td, z-th"));if(this.expandable){const e=t.pop();e.id=e.id||`z-tr-expandable-content-${s()}`;this.expandableContentId=e.id}const e=t.map((t=>t.colspan||1)).reduce(((t,e)=>t+e),0);this.host.style.setProperty("--columns",`${e}`)}onRowClick(t){const e=t.target.closest(".prevent-expand");if(!this.expandable||e){return}this.expanded=!this.expanded;this.expand.emit({expanded:this.expanded})}onKeyDown(t){if(!this.expandable){return}const e=document.activeElement;if(e!==this.host){return}if(t.key==="Enter"||t.key===" "){t.preventDefault();this.expanded=!this.expanded;this.expand.emit({expanded:this.expanded})}}componentWillLoad(){this.updateColumns()}render(){return o(r,{key:"ffd8e071015ace61e51c603988d84dae42a047bb",role:"row",tabIndex:this.expandable?0:undefined,expanded:this.expanded,onClick:this.onRowClick.bind(this),onKeyDown:this.onKeyDown.bind(this)},o("div",{key:"49539d360bab6d865958910fd21f5c407fc0a16b",class:"z-tr--focus-overlay","aria-hidden":"true"}),o("div",{key:"94c5f36a5f220a7403d0c6057faf41cf0509f68e",class:"z-tr--expand-button-container"},this.expandable&&o("button",{key:"ee46bd7dd59d27c6be18716fc3a46092cdac5eb6",tabIndex:-1,"aria-expanded":this.expanded?"true":"false","aria-label":this.expanded?"Comprimi riga":"Espandi riga","aria-controls":this.expandableContentId,type:"button"},o("z-icon",{key:"ce6fc941625f48f13edc7df3a43da159cf6f064d",name:this.expanded?"minus-circled":"plus-circled"}))),o("slot",{key:"c41ca74f6026dda7813605940e6910a56cd576fb",onSlotchange:this.updateColumns.bind(this)}))}get host(){return a(this)}static get watchers(){return{expandable:[{updateColumns:0}]}}};n.style=l()+d();export{n as z_tr};
2
- //# sourceMappingURL=p-d639463e.entry.js.map
1
+ import{r as t,c as e,h as o,H as r,d as a}from"./p-BcDWN4F1.js";import{r as s}from"./p-C_25lDQa.js";import"./p-3fe7c6e3.entry.js";import"./p-dd361d13.entry.js";import"./p-DdetsoIY.js";import"./p-Q-tWjk7P.js";const l=()=>`:host{position:relative;display:grid;width:100%;box-sizing:border-box;grid-auto-flow:column;grid-template-columns:var(--z-table--expand-button-size, 0) repeat(var(--columns), minmax(128px, 1fr));--columns:1}*{box-sizing:border-box}:host([expandable]){--show-expandable-button:visible;cursor:pointer}:host([expandable]) ::slotted(*){grid-row:1}:host([expandable]) ::slotted(:nth-last-child(2)){border-right:none}:host([expandable]) ::slotted(*:last-child){border-top:var(--border-size-small) solid var(--color-surface03);border-left:0;grid-column:1 / span calc(var(--columns) + 1);grid-row:2}:host([expandable]:not([expanded])) ::slotted(*:last-child){display:none}:host([expanded]){margin-bottom:4px;box-shadow:0 4px 4px -2px var(--shadow-color-base)}:host([expanded]) .z-tr--expand-button-container,:host([expanded]) ::slotted(*){border-left:0 !important;background-color:var(--color-background)}:host([tabIndex]:hover) ::slotted(z-td),:host([tabIndex]:hover) ::slotted(z-th),:host([tabIndex]:hover) .z-tr--expand-button-container{background-color:var(--color-surface02)}:host([tabIndex]:hover) .z-tr--focus-overlay{border-top:var(--border-size-small) solid var(--color-surface04);border-bottom:var(--border-size-small) solid var(--color-surface04)}:host(:focus){position:relative;z-index:20;border:none !important;box-shadow:var(--shadow-focus-primary);outline:none}.z-tr--expand-button-container{display:flex;align-items:center;justify-content:center;background-color:var(--z-table--cells-background, var(--color-surface01))}.z-tr--expand-button-container button{display:flex;align-items:center;justify-content:center;padding:0;border:none;margin:auto;appearance:none;background:transparent;cursor:pointer;visibility:var(--show-expandable-button, hidden)}.z-tr--expand-button-container button z-icon{--z-icon-width:16px;--z-icon-height:16px}.z-tr--focus-overlay{position:absolute;z-index:30;top:calc(var(--border-size-small) * -1);bottom:0;left:0;width:100%;height:calc(100% + (var(--border-size-small) * 2));box-shadow:none;outline:none;pointer-events:none;transition:box-shadow 0.2s}:host(:focus) .z-tr--focus-overlay{box-shadow:0 0 0 2px var(--shadow-focus-primary), var(--shadow-focus-primary);outline:none}:host(:focus) ::slotted(*){border-bottom:none}:host(:focus) .z-tr--expand-button-container{border-bottom:none}`;const d=()=>`z-table,table.z-table{background-color:var(--color-surface01);--z-table--cells-padding:calc(var(--space-unit) * 2)}table.z-table{border-collapse:collapse}z-thead,table.z-table thead{background-color:var(--color-background);--z-table--cells-bottom-border-size:var(--border-size-medium)}z-tfoot,table.z-table tfoot{border-top:var(--border-size-medium) solid var(--color-surface03);border-bottom:var(--border-size-medium) solid var(--color-surface03)}z-tfoot z-tr,table.z-table tfoot tr{border-bottom:calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important}z-tr,table.z-table tr{border-bottom:var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03)}z-td,z-th,table.z-table td,table.z-table th{padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2));text-align:left}z-th:not(:first-child),z-td:not(:first-child),table.z-table th:not(:first-child),table.z-table td:not(:first-child){border-left:var(--z-table--cell-left-border, none)}z-table[bordered],table.z-table.z-table-bordered{--z-table--cell-left-border:1px solid var(--color-surface03)}table.z-table-hover>tbody>tr:hover>td,table.z-table-hover>tfoot>tr:hover>td{position:relative;background-color:var(--color-surface02)}table.z-table-hover>tbody>tr:hover>td::after,table.z-table-hover>tfoot>tr:hover>td::after{position:absolute;z-index:1;top:0;right:0;bottom:0;left:-1px;box-shadow:inset 0 var(--border-size-small) 0 var(--color-surface04), inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);content:""}table.z-table-hover>tbody>tr:hover>td:first-child::after,table.z-table-hover>thead>tr:hover>th:first-child::after,table.z-table-hover>tfoot>tr:hover>td:first-child::after{left:0}`;const n=class{constructor(o){t(this,o);this.expand=e(this,"expand",7);this.expandable=false;this.expanded=false}updateColumns(){const t=Array.from(this.host.querySelectorAll("z-td, z-th"));if(this.expandable){const e=t.pop();e.id=e.id||`z-tr-expandable-content-${s()}`;this.expandableContentId=e.id}const e=t.map((t=>t.colspan||1)).reduce(((t,e)=>t+e),0);this.host.style.setProperty("--columns",`${e}`)}onRowClick(t){const e=t.target.closest(".prevent-expand");if(!this.expandable||e){return}this.expanded=!this.expanded;this.expand.emit({expanded:this.expanded})}onKeyDown(t){if(!this.expandable){return}const e=document.activeElement;if(e!==this.host){return}if(t.key==="Enter"||t.key===" "){t.preventDefault();this.expanded=!this.expanded;this.expand.emit({expanded:this.expanded})}}componentWillLoad(){this.updateColumns()}render(){return o(r,{key:"ffd8e071015ace61e51c603988d84dae42a047bb",role:"row",tabIndex:this.expandable?0:undefined,expanded:this.expanded,onClick:this.onRowClick.bind(this),onKeyDown:this.onKeyDown.bind(this)},o("div",{key:"49539d360bab6d865958910fd21f5c407fc0a16b",class:"z-tr--focus-overlay","aria-hidden":"true"}),o("div",{key:"94c5f36a5f220a7403d0c6057faf41cf0509f68e",class:"z-tr--expand-button-container"},this.expandable&&o("button",{key:"ee46bd7dd59d27c6be18716fc3a46092cdac5eb6",tabIndex:-1,"aria-expanded":this.expanded?"true":"false","aria-label":this.expanded?"Comprimi riga":"Espandi riga","aria-controls":this.expandableContentId,type:"button"},o("z-icon",{key:"ce6fc941625f48f13edc7df3a43da159cf6f064d",name:this.expanded?"minus-circled":"plus-circled"}))),o("slot",{key:"c41ca74f6026dda7813605940e6910a56cd576fb",onSlotchange:this.updateColumns.bind(this)}))}get host(){return a(this)}static get watchers(){return{expandable:[{updateColumns:0}]}}};n.style=l()+d();export{n as z_tr};
2
+ //# sourceMappingURL=p-e59a5539.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,h as t,H as o,d as r}from"./p-BcDWN4F1.js";import{M as a,Q as i}from"./p-B3nR3-Jw.js";const n=()=>`:host{--cover-hero-overlay:linear-gradient(270deg, #0000 0%, #000000e6 100%);--cover-hero-text-color:var(--color-text-inverse);display:block;overflow:hidden}:host,*{box-sizing:border-box}:host .main-container{position:relative;width:100%;align-items:baseline}:host .content-container{color:var(--cover-hero-text-color);fill:var(--cover-hero-text-color)}:host .main-container .cover-container{position:relative;width:100%;padding-top:calc(100% / (var(--cover-hero-aspect-ratio, var(--image-aspect-ratio, 16/9))));background-color:var(--gray600)}::slotted([slot="cover"]){position:absolute;display:block;width:100%;height:100%;inset:0;object-fit:cover;object-position:top center}::slotted(z-info-reveal){position:absolute;z-index:1;right:var(--grid-margin);bottom:var(--grid-margin)}:host([variant="overlay"]:not([preserve-aspect-ratio=""],[preserve-aspect-ratio="true"])) .main-container{height:100%}:host([variant="overlay"]:not([preserve-aspect-ratio=""],[preserve-aspect-ratio="true"])) .main-container .cover-container{position:absolute;z-index:-1;height:100%;padding:0}:host([variant="overlay"]) .main-container .cover-container::after{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--cover-hero-overlay);content:""}:host([variant="overlay"]:is([preserve-aspect-ratio=""],[preserve-aspect-ratio="true"])) .main-container .content-container{position:absolute;inset:0}:host([variant="overlay"]) .main-container .content-container{height:100%;padding:var(--grid-margin)}:host([variant="stacked"]){--cover-hero-text-color:var(--color-default-text)}:host([variant="stacked"]) .content-container ::slotted(*){padding:var(--grid-margin) 0}`;const s=class{constructor(t){e(this,t);this.variant=a.OVERLAY;this.contentPosition=i.TOP;this.preserveAspectRatio=true}onImgLoad({target:e}){if(e instanceof Image&&e.closest("[slot=cover]")){const t=e.naturalWidth/e.naturalHeight;this.host.style.setProperty("--image-aspect-ratio",t.toString())}}renderContent(){return t("div",{class:"content-container"},t("slot",{name:"content"}))}render(){return t(o,{key:"bb147f3b614268218fba165360012031572ec76b"},this.variant===a.STACKED&&this.contentPosition===i.TOP&&this.renderContent(),t("div",{key:"94c697c41b4d98ea9f5be00634a3de1fd214ea72",class:"main-container"},t("div",{key:"e1a181735381dbc2472085c7e1d7082e1564185a",class:"cover-container"},t("slot",{key:"1692cfa7f6a9ee926a262e04e8912a72f5a95cca",name:"cover"})),t("slot",{key:"c13a059c162d85e46d3f116a8b1fd9e3a6e363f7",name:"info-reveal"}),this.variant===a.OVERLAY&&this.renderContent()),this.variant===a.STACKED&&this.contentPosition===i.BOTTOM&&this.renderContent())}get host(){return r(this)}};s.style=n();export{s as z_cover_hero};
2
- //# sourceMappingURL=p-e5736b1f.entry.js.map
1
+ import{r as e,h as t,H as o,d as r}from"./p-BcDWN4F1.js";import{Q as a,R as i}from"./p-DdetsoIY.js";const n=()=>`:host{--cover-hero-overlay:linear-gradient(270deg, #0000 0%, #000000e6 100%);--cover-hero-text-color:var(--color-text-inverse);display:block;overflow:hidden}:host,*{box-sizing:border-box}:host .main-container{position:relative;width:100%;align-items:baseline}:host .content-container{color:var(--cover-hero-text-color);fill:var(--cover-hero-text-color)}:host .main-container .cover-container{position:relative;width:100%;padding-top:calc(100% / (var(--cover-hero-aspect-ratio, var(--image-aspect-ratio, 16/9))));background-color:var(--gray600)}::slotted([slot="cover"]){position:absolute;display:block;width:100%;height:100%;inset:0;object-fit:cover;object-position:top center}::slotted(z-info-reveal){position:absolute;z-index:1;right:var(--grid-margin);bottom:var(--grid-margin)}:host([variant="overlay"]:not([preserve-aspect-ratio=""],[preserve-aspect-ratio="true"])) .main-container{height:100%}:host([variant="overlay"]:not([preserve-aspect-ratio=""],[preserve-aspect-ratio="true"])) .main-container .cover-container{position:absolute;z-index:-1;height:100%;padding:0}:host([variant="overlay"]) .main-container .cover-container::after{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--cover-hero-overlay);content:""}:host([variant="overlay"]:is([preserve-aspect-ratio=""],[preserve-aspect-ratio="true"])) .main-container .content-container{position:absolute;inset:0}:host([variant="overlay"]) .main-container .content-container{height:100%;padding:var(--grid-margin)}:host([variant="stacked"]){--cover-hero-text-color:var(--color-default-text)}:host([variant="stacked"]) .content-container ::slotted(*){padding:var(--grid-margin) 0}`;const s=class{constructor(t){e(this,t);this.variant=a.OVERLAY;this.contentPosition=i.TOP;this.preserveAspectRatio=true}onImgLoad({target:e}){if(e instanceof Image&&e.closest("[slot=cover]")){const t=e.naturalWidth/e.naturalHeight;this.host.style.setProperty("--image-aspect-ratio",t.toString())}}renderContent(){return t("div",{class:"content-container"},t("slot",{name:"content"}))}render(){return t(o,{key:"bb147f3b614268218fba165360012031572ec76b"},this.variant===a.STACKED&&this.contentPosition===i.TOP&&this.renderContent(),t("div",{key:"94c697c41b4d98ea9f5be00634a3de1fd214ea72",class:"main-container"},t("div",{key:"e1a181735381dbc2472085c7e1d7082e1564185a",class:"cover-container"},t("slot",{key:"1692cfa7f6a9ee926a262e04e8912a72f5a95cca",name:"cover"})),t("slot",{key:"c13a059c162d85e46d3f116a8b1fd9e3a6e363f7",name:"info-reveal"}),this.variant===a.OVERLAY&&this.renderContent()),this.variant===a.STACKED&&this.contentPosition===i.BOTTOM&&this.renderContent())}get host(){return r(this)}};s.style=n();export{s as z_cover_hero};
2
+ //# sourceMappingURL=p-e88048b8.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as s,d as i}from"./p-BcDWN4F1.js";import{e as l,g as c,i as r,l as n}from"./p-B3nR3-Jw.js";import{r as a,e as o,b as h,d,f as z,i as p}from"./p-C8pbzcmM.js";import"./p-Q-tWjk7P.js";const u=()=>`.sc-z-select-h{display:inline-block;width:inherit;color:var(--color-form-default-text);font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:var(--font-rg)}[size="small"].sc-z-select-h,[size="x-small"].sc-z-select-h{font-size:var(--font-size-2)}.select-wrapper.sc-z-select>z-input.sc-z-select{width:100%}.select-wrapper.sc-z-select>z-input.sc-z-select .input-icon.sc-z-select{cursor:pointer}.select-wrapper.sc-z-select>div.sc-z-select{position:relative}.select-wrapper.sc-z-select>div.closed.sc-z-select{overflow:hidden;height:0}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select{position:absolute;width:100%;box-sizing:border-box;border-top:none;background:var(--color-form-background);box-shadow:var(--shadow-2);outline:none}.select-wrapper.sc-z-select .closed.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:10}.select-wrapper.sc-z-select .open.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:20}.select-wrapper.sc-z-select .ul-scroll-wrapper.fixed.sc-z-select{position:static}.select-wrapper.sc-z-select z-list.sc-z-select{--background-color-list-element:var(--color-form-background);--background-hover-color-list-element:var(--color-surface02);--background-active-color-list-element:var(--color-surface02)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select{position:relative;overflow:auto;max-height:240px;padding:var(--space-unit) calc(var(--space-unit) * 1.5);margin:0;outline:none}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element[disabled].sc-z-select{color:var(--color-form-disabled03)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select{display:flex;align-items:center;padding:calc(var(--space-unit) / 2) var(--space-unit);column-gap:var(--space-unit)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.active.sc-z-select{box-shadow:var(--shadow-focus-primary)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select .list-element-content.sc-z-select{margin-right:auto}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select>z-icon.sc-z-select+.list-element-content.sc-z-select{padding:calc(var(--space-unit) * 0.5) var(--space-unit)}[size="x-small"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select .list-element-content.sc-z-select{padding:0}[size="small"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select>z-icon.sc-z-select{--z-icon-width:16px;--z-icon-height:16px}[size="x-small"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select>z-icon.sc-z-select{--z-icon-width:14px;--z-icon-height:14px}[size="x-small"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select>z-icon.sc-z-select+.list-element-content.sc-z-select{padding:0 var(--space-unit)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select .list-element-content.selected.sc-z-select{font-weight:var(--font-sb)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select .no-results.sc-z-select z-icon.sc-z-select{margin-right:var(--space-unit)}.z-list-group-title.sc-z-select{color:var(--color-form-default-text)}.reset-item.sc-z-select{color:var(--color-form-active-primary);fill:var(--color-form-active-primary)}.reset-item-content.sc-z-select{display:flex;align-items:center}.reset-item.sc-z-select .reset-item-content.active.sc-z-select{box-shadow:var(--shadow-focus-primary)}.reset-item.reset-item-margin.sc-z-select .reset-item-content.sc-z-select{margin-left:var(--space-unit)}.reset-item.sc-z-select .reset-item-content.sc-z-select>z-icon.sc-z-select{margin-right:var(--space-unit)}.reset-item.hide.sc-z-select{display:none}.tree-list-reset-item.sc-z-select{padding:var(--space-unit) 0}z-list-element.sc-z-select{position:relative;display:block}z-list.sc-z-select z-list-element.sc-z-select::before{position:absolute;z-index:100;top:3px;left:-8px;width:8px;height:1em;border-bottom:1px solid var(--color-form-disabled01-icon);border-left:1px solid var(--color-form-disabled01-icon);content:"";cursor:pointer}z-list.sc-z-select z-list-element.sc-z-select::after{position:absolute;z-index:100;top:5px;left:-8px;width:8px;height:100%;border-left:1px solid var(--color-form-disabled01-icon);content:"";cursor:pointer}z-list.sc-z-select z-list-element.sc-z-select:last-child::after{display:none}z-list.sc-z-select>z-list-element.sc-z-select::before,z-list.sc-z-select>z-list-element.sc-z-select::after,z-list.sc-z-select>z-list-group.sc-z-select>z-list-element.sc-z-select::before,z-list.sc-z-select>z-list-group.sc-z-select>z-list-element.sc-z-select::after{display:none}z-list.sc-z-select>div.children-node.sc-z-select{padding-left:calc(var(--space-unit) * 2)}z-list-element.sc-z-select>.list-element.sc-z-select{display:flex;justify-content:space-between;padding:calc(var(--space-unit) * 1.5) var(--space-unit);cursor:pointer}z-list-element.sc-z-select>.list-element.active.sc-z-select{box-shadow:var(--shadow-focus-primary)}z-list-element.sc-z-select:not([disabled])>.list-element.sc-z-select:hover,z-list-element.sc-z-select:not([disabled])>.list-element.sc-z-select:hover::after{background-color:var(--background-hover-color-list-element, var(--color-background))}z-list-element.sc-z-select>.list-element.sc-z-select .item.ellipsis.sc-z-select{overflow:hidden}z-list-element.sc-z-select .list-element.sc-z-select::after{position:absolute;top:0;right:-1px;display:block;width:100%;height:45px;content:"";transform:translateX(-100%)}z-list-element.tree-search-item.sc-z-select{padding-top:0}z-list-element.tree-search-item.sc-z-select .list-element.sc-z-select::after{position:absolute;right:-25px;display:block;width:100%;height:45px;content:"";transform:translateX(-100%)}z-list-element.grouped-tree-parent-node.sc-z-select .list-element.sc-z-select::after{position:absolute;right:-25px;display:block;width:100%;height:45px;content:"";transform:translateX(-100%)}.item-label.selected.sc-z-select{font-weight:bold}.item.ellipsis.sc-z-select{display:inline-block;overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap}z-list.sc-z-select>z-list-element.grouped-tree-parent-node.sc-z-select>.list-element.sc-z-select:hover::after,z-list-element.tree-search-item.sc-z-select .list-element.sc-z-select:hover::after,z-list.sc-z-select>z-list-group.sc-z-select>z-list-element.grouped-tree-parent-node.sc-z-select>.list-element.sc-z-select:hover::after{position:absolute;z-index:-1;right:-18px;display:block;width:100%;height:45px;content:"";transform:translateX(-100%)}z-list-element.sc-z-select>.list-element.sc-z-select:hover::after{position:absolute;z-index:-1;top:0;right:0;display:block;width:100%;height:45px;content:"";transform:translateX(-100%)}.children-node.sc-z-select z-list-element.sc-z-select::before,.children-node.sc-z-select z-list-element.sc-z-select::after{left:-8px}.children-node.sc-z-select .children-node.sc-z-select z-list-element.sc-z-select::before,.children-node.sc-z-select .children-node.sc-z-select z-list-element.sc-z-select::after{left:-8px}.children-node.sc-z-select>z-list-element.sc-z-select{padding:0}`;const m=class{constructor(s){e(this,s);this.optionSelect=t(this,"optionSelect",7);this.resetSelect=t(this,"resetSelect",7);this.htmlid=`id-${a()}`;this.items=[];this.ariaLabel="";this.disabled=false;this.readonly=false;this.message=true;this.autocomplete=false;this.noresultslabel="Nessun risultato";this.isfixed=false;this.size=l.BIG;this.isOpen=false;this.selectedItem=null;this.itemsList=[];this.toggleSelectUl=this.toggleSelectUl.bind(this);this.handleSelectFocus=this.handleSelectFocus.bind(this)}watchItems(){this.itemsList=this.getInitialItemsArray();this.selectedItem=this.findSelectedItem(this.itemsList)}async getSelectedItem(){return this.selectedItem}async getValue(){return this.getSelectedValue()}async setValue(e){let t=[];if(typeof e==="string"){t.push(e)}else{t=e}this.itemsList=this.getInitialItemsArray();if(t.length){this.updateSelection(this.itemsList,t[0])}this.selectedItem=this.findSelectedItem(this.itemsList)}emitOptionSelect(){this.optionSelect.emit({id:this.htmlid,selected:this.getSelectedValue()})}emitResetSelect(){this.resetSelect.emit({id:this.htmlid})}componentWillLoad(){this.watchItems()}componentWillRender(){this.filterItems(this.searchString)}getInitialItemsArray(){return typeof this.items==="string"?JSON.parse(this.items):this.items}mapSelectedItemToItemsArray(){var e;const t=this.getInitialItemsArray();this.updateSelection(t,(e=this.selectedItem)===null||e===void 0?void 0:e.id);return t}getSelectedValue(){var e;return(e=this.selectedItem)===null||e===void 0?void 0:e.id}getOptionId(e){return`${this.htmlid}_key_${e.id?o(`${e.id}`):o(`${e.name}`)}`}getResetOptionId(){return`${this.htmlid}_key_reset`}getGroupedItems(){if(!this.itemsList.length){return[]}return Object.entries(this.itemsList.reduce(((e,t)=>{const s=t.category||"Altra categoria";e[s]=e[s]||[];e[s].push(t);return e}),{}))}filterItems(e){let t=this.mapSelectedItemToItemsArray();if(!(e===null||e===void 0?void 0:e.length)){this.itemsList=t;return}t=t.map((e=>Object.assign(Object.assign({},e),{name:h(e.name)})));if(this.hasTreeItems){this.itemsList=this.filterTree(t,e,false)}else{this.itemsList=t.filter((t=>t.name.toUpperCase().includes(e.toUpperCase()))).map((t=>{t.name=this.getHighlightedText(t.name,e);return t}))}}filterTree(e,t,s){if(!e){return[]}return e.map((e=>{const i=e.name.toUpperCase().includes(t.toUpperCase());const l=Object.assign({},e);if(l.children&&l.children.length>0){l.children=this.filterTree(l.children.map((e=>Object.assign(Object.assign({},e),{name:h(e.name)}))),t,i)}if(i){l.name=this.getHighlightedText(l.name,t)}if(i||l.children&&l.children.length>0||this.showChildrenOfMatchingParent&&s){return l}return null})).filter((e=>e!==null))}getHighlightedText(e,t){const s=e.toUpperCase();const i=t.toUpperCase();const l=s.indexOf(i);if(l===-1){return e}const c=l+t.length;return e.substring(0,l)+`<strong>${e.substring(l,c)}</strong>`+e.substring(c)}hasAutocomplete(){return d(this.autocomplete)===true}handleInputChange(e){this.searchString=e.detail.value;if(!this.isOpen){this.toggleSelectUl()}}updateSelection(e,t){if(e){e.forEach((e=>{e.selected=e.id===t;if(e.children&&e.children.length>0){this.updateSelection(e.children,t)}}))}}findSelectedItem(e){if(e){for(const t of e){if(t.selected){return t}if(t.children&&t.children.length>0){const e=this.findSelectedItem(t.children);if(e){return e}}}}return null}selectItem(e){if(e===null||e===void 0?void 0:e.disabled){return}this.itemsList=this.getInitialItemsArray();if(e){this.updateSelection(this.itemsList,e.id)}this.selectedItem=this.findSelectedItem(this.itemsList);this.emitOptionSelect();this.toggleSelectUl();if(this.searchString){this.searchString=null}}handleResetClick(){this.selectedItem=null;this.searchString=null;this.focusedItemId="";this.emitResetSelect();this.toggleSelectUl()}handleInputKeyDown(e){switch(e.code){case c.ENTER:case c.SPACE:if(this.focusedItemId){if(this.focusedItemId===this.getResetOptionId()){this.handleResetClick()}else{const e=this.itemsList.find((e=>this.getOptionId(e)===this.focusedItemId))||null;if(e){this.selectedItem=e;this.emitOptionSelect();this.toggleSelectUl()}}}break;case c.ARROW_DOWN:case c.ARROW_UP:this.arrowsSelectNav(e);break}}arrowsSelectNav(e){const t=[c.ARROW_DOWN,c.ARROW_UP];if(!t.includes(e.key)){return}e.preventDefault();e.stopPropagation();const s=this.focusedItemId?this.host.querySelector(`#${this.focusedItemId}`):null;const i=Array.from(this.host.querySelectorAll('[role="option"]'));if(!i.length){return}const l=s?i.indexOf(s):null;const r=0;const n=i.length-1;if(!this.isOpen){this.toggleSelectUl();if(this.selectedItem){this.focusSelectItem(this.getOptionId(this.selectedItem));return}}let a=null;if(e.code===c.ARROW_DOWN){a=l===null?i[r]:i[l+1]||i[n]}else if(e.code===c.ARROW_UP){a=l===null?i[n]:i[l-1]||i[r]}this.focusSelectItem(a.id)}focusSelectItem(e){this.focusedItemId=e;const t=this.host.querySelector(`#${e}`);t.scrollIntoView({block:"nearest",container:"nearest"})}toggleSelectUl(e=false){var t;if(this.disabled||this.readonly){return}if(!this.isOpen){document.addEventListener("click",this.handleSelectFocus);document.addEventListener("keyup",this.handleSelectFocus)}else{document.removeEventListener("click",this.handleSelectFocus);document.removeEventListener("keyup",this.handleSelectFocus);if(e){(t=this.host.querySelector(`#${this.htmlid}_select_input`))===null||t===void 0?void 0:t.focus()}if(this.selectedItem&&this.searchString){this.searchString=null;this.filterItems(this.searchString)}}this.focusedItemId="";this.isOpen=!this.isOpen}handleInputClick(e){if(e.target.closest(".reset-icon")){e.stopPropagation();return}this.toggleSelectUl()}handleSelectFocus(e){if(e instanceof KeyboardEvent&&e.key===c.ESC){e.stopPropagation();return this.toggleSelectUl(true)}if(e instanceof KeyboardEvent&&e.key!==c.TAB){return}const t=z();if(t===null||t===void 0?void 0:t.hasAttribute("disabled")){return}if(!p(t).find((e=>e.nodeName.toLowerCase()==="z-input"&&e.id===`${this.htmlid}_input`))){const e=p(t).find((e=>e.nodeName==="Z-SELECT"));this.toggleSelectUl(e===this.host)}}scrollToLetter(e){if(!this.itemsList.length){return}const t=this.itemsList.find((t=>t.name.toLowerCase().charAt(0)===e.toLowerCase()));if(t){if(!this.isOpen){this.toggleSelectUl()}this.focusSelectItem(this.getOptionId(t))}}renderInput(){let e=null;if(this.selectedItem){e=h(this.selectedItem.name)}if(this.isOpen&&this.searchString!==undefined){e=this.searchString}return[s("z-input",{class:{"active-select":this.isOpen,"cursor-select":!this.autocomplete},id:`${this.htmlid}_input`,htmlid:`${this.htmlid}_select_input`,placeholder:this.placeholder,value:e,label:this.label,autocomplete:"off","aria-label":this.ariaLabel,icon:this.isOpen?"caret-up":"caret-down",hasclearicon:false,message:false,name:this.name,disabled:this.disabled,readonly:this.readonly||!this.hasAutocomplete()&&this.isOpen,status:this.isOpen?undefined:this.status,size:this.size,role:"combobox","html-aria-expanded":this.isOpen?"true":"false","html-aria-controls":`${this.htmlid}_list`,"html-aria-activedescendant":this.isOpen?this.focusedItemId:"","html-aria-autocomplete":this.hasAutocomplete()?"list":undefined,onClick:e=>this.handleInputClick(e),onKeyDown:e=>this.handleInputKeyDown(e),onInputChange:e=>this.handleInputChange(e),onKeyPress:e=>{if(!this.hasAutocomplete()){e.preventDefault();this.scrollToLetter(e.key)}}})]}renderSelectUl(){return s("div",{class:this.isOpen?"open":"closed"},s("div",{class:{"ul-scroll-wrapper":true,fixed:this.isfixed}},s("z-list",{role:"listbox","aria-label":this.ariaLabel||this.label,tabindex:this.disabled||this.readonly||!this.isOpen?-1:0,id:`${this.htmlid}_list`,"aria-multiselectable":false,size:this.listSizeType(),class:{disabled:this.disabled,readonly:this.readonly,[`input-${this.status}`]:!this.isOpen&&!!this.status,"z-scrollbar":true}},this.resetItem&&this.renderResetItem(),this.renderSelectUlItems())))}renderResetItem(){const e=!this.selectedItem||!this.resetItem;return s("z-list-element",{class:{hide:e,"reset-item":true,"reset-item-margin":!this.hasGroupItems},clickable:true,disabled:false,dividerType:n.ELEMENT,role:e?"presentation":"option",htmlTabindex:this.isOpen?0:null,"aria-selected":"false","aria-label":e?undefined:this.resetItem,id:this.getResetOptionId(),size:this.hasTreeItems?r.MEDIUM:this.listSizeType(),onClickItem:()=>this.handleResetClick()},s("div",{class:{"reset-item-content":true,"tree-list-reset-item":this.hasTreeItems,active:this.focusedItemId===this.getResetOptionId()},"aria-hidden":"true"},s("z-icon",{name:"multiply-circled"}),s("span",null,this.resetItem)))}renderItem(e,t){return s("z-list-element",{clickable:!e.disabled,disabled:e.disabled,dividerType:t?n.HEADER:n.ELEMENT,role:e.disabled?"presentation":"option",htmlTabindex:-1,"aria-selected":e.selected?"true":"false","aria-label":e.disabled?undefined:h(e.name),id:this.getOptionId(e),size:this.listSizeType(),onClickItem:()=>this.selectItem(e)},s("div",{class:{"list-element-container":true,active:this.focusedItemId===this.getOptionId(e)},"aria-hidden":"true"},s("div",{class:{selected:!!e.selected,"list-element-content":true},innerHTML:e.name}),e.icon&&s("z-tag",{icon:e.icon})))}listSizeType(){if(this.hasTreeItems){return r.NONE}if(this.size===l.SMALL||this.size===l.X_SMALL){return r.SMALL}return r.MEDIUM}renderSelectUlItems(){if(!this.itemsList.length){return this.renderNoSearchResults()}if(this.hasGroupItems){if(this.hasTreeItems){return this.renderGroupedTree()}return this.renderSelectGroupItems()}return this.itemsList.map(((e,t,s)=>{const i=t===s.length-1;const l=s.length>1;if(this.hasTreeItems){return this.renderTreeItems(e,i,l,true,e.disabled)}return this.renderItem(e,i)}))}renderTreeItems(e,t,i,l,c){var r,a;const o=e.disabled||c;const d=this.hasGroupItems?undefined:this.hasGroupItems?t&&!i?n.ELEMENT:undefined:l&&i&&!t?n.ELEMENT:undefined;return s("z-list-element",{clickable:!e.disabled,disabled:o,class:{"grouped-tree-parent-node":this.hasGroupItems&&!!((r=e.children)===null||r===void 0?void 0:r.length),"tree-search-item":this.hasGroupItems&&l&&!((a=e.children)===null||a===void 0?void 0:a.length)&&!!this.searchString},size:this.listSizeType(),dividerType:d,hasTreeItems:this.hasTreeItems,htmlTabindex:null,role:"presentation"},s("div",{id:this.getOptionId(e),role:o?"presentation":"option","aria-label":o?undefined:h(e.name),class:{"list-element":true,active:this.focusedItemId===this.getOptionId(e)},onClick:()=>this.selectItem(e)},s("span",{class:"item ellipsis","aria-hidden":"true"},s("span",{class:{"item-label":true,selected:!!e.selected},title:e.name,innerHTML:e.name})),e.icon&&s("z-tag",{icon:e.icon})),e.children&&e.children.length>0?s("z-list",{role:"presentation"},s("div",{class:"children-node"},e.children.map(((e,t,s)=>this.renderTreeItems(e,t===s.length-1,s.length>1,false,o))))):null)}renderGroupedTree(){const e=this.getGroupedItems();return e.map((([t,i],l,c)=>{const r=Object.values(e).some((e=>e.length>1));return s("z-list-group",{"divider-type":l===c.length-1?undefined:n.ELEMENT,hasTreeItems:true,"aria-labelledby":`${this.htmlid}_tree_${l}`},s("span",{class:"body-3-sb z-list-group-title",slot:"header-title",id:`${this.htmlid}_tree_${l}`,"aria-hidden":"true"},t),s("z-list",{role:"presentation"},i.map(((e,t,i)=>[this.renderTreeItems(e,t===i.length-1,r,true,e.disabled),t<i.length-1?s("z-divider",{key:`divider-${t}`,style:{zIndex:"100",height:"var(--border-size-small)"}}):null]))),l!==c.length-1&&s("z-divider",{style:{zIndex:"100",height:"var(--border-size-small)"}}))}))}renderSelectGroupItems(){const e=this.getGroupedItems();return e.map((([t,i],l)=>{const c=e.length===l+1;return s("z-list-group",{"divider-type":n.ELEMENT,"aria-labelledby":`${this.htmlid}_group_${l}`},s("span",{class:"body-3-sb z-list-group-title",slot:"header-title",id:`${this.htmlid}_group_${l}`,"aria-hidden":"true"},t),i.map(((e,t)=>{const s=i.length===t+1;return this.renderItem(e,c&&s)})))}))}renderNoSearchResults(){return s("z-list-element",{class:"no-results",size:this.hasTreeItems?r.MEDIUM:this.listSizeType(),htmlTabindex:null,role:"presentation"},this.noresultslabel)}renderMessage(){if(d(this.message)===false){return}return s("z-input-message",{message:d(this.message)===true?undefined:this.message,status:this.status,class:this.size,disabled:this.disabled})}render(){return s("div",{key:"f2be06f6abfff472e90031034431f4e7acb27be6",class:"select-wrapper"},this.renderInput(),this.renderSelectUl(),this.renderMessage())}get host(){return i(this)}static get watchers(){return{items:[{watchItems:0}]}}};m.style=u();export{m as z_select};
2
- //# sourceMappingURL=p-927d50ea.entry.js.map
1
+ import{r as e,c as t,h as s,d as i}from"./p-BcDWN4F1.js";import{e as l,g as c,i as r,l as n}from"./p-DdetsoIY.js";import{r as a,e as o,b as h,d,f as z,i as p}from"./p-C_25lDQa.js";import"./p-Q-tWjk7P.js";const u=()=>`.sc-z-select-h{display:inline-block;width:inherit;color:var(--color-form-default-text);font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:var(--font-rg)}[size="small"].sc-z-select-h,[size="x-small"].sc-z-select-h{font-size:var(--font-size-2)}.select-wrapper.sc-z-select>z-input.sc-z-select{width:100%}.select-wrapper.sc-z-select>z-input.sc-z-select .input-icon.sc-z-select{cursor:pointer}.select-wrapper.sc-z-select>div.sc-z-select{position:relative}.select-wrapper.sc-z-select>div.closed.sc-z-select{overflow:hidden;height:0}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select{position:absolute;width:100%;box-sizing:border-box;border-top:none;background:var(--color-form-background);box-shadow:var(--shadow-2);outline:none}.select-wrapper.sc-z-select .closed.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:10}.select-wrapper.sc-z-select .open.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:20}.select-wrapper.sc-z-select .ul-scroll-wrapper.fixed.sc-z-select{position:static}.select-wrapper.sc-z-select z-list.sc-z-select{--background-color-list-element:var(--color-form-background);--background-hover-color-list-element:var(--color-surface02);--background-active-color-list-element:var(--color-surface02)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select{position:relative;overflow:auto;max-height:240px;padding:var(--space-unit) calc(var(--space-unit) * 1.5);margin:0;outline:none}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element[disabled].sc-z-select{color:var(--color-form-disabled03)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select{display:flex;align-items:center;padding:calc(var(--space-unit) / 2) var(--space-unit);column-gap:var(--space-unit)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.active.sc-z-select{box-shadow:var(--shadow-focus-primary)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select .list-element-content.sc-z-select{margin-right:auto}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select>z-icon.sc-z-select+.list-element-content.sc-z-select{padding:calc(var(--space-unit) * 0.5) var(--space-unit)}[size="x-small"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select .list-element-content.sc-z-select{padding:0}[size="small"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select>z-icon.sc-z-select{--z-icon-width:16px;--z-icon-height:16px}[size="x-small"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select>z-icon.sc-z-select{--z-icon-width:14px;--z-icon-height:14px}[size="x-small"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select>z-icon.sc-z-select+.list-element-content.sc-z-select{padding:0 var(--space-unit)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select .list-element-content.selected.sc-z-select{font-weight:var(--font-sb)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select .no-results.sc-z-select z-icon.sc-z-select{margin-right:var(--space-unit)}.z-list-group-title.sc-z-select{color:var(--color-form-default-text)}.reset-item.sc-z-select{color:var(--color-form-active-primary);fill:var(--color-form-active-primary)}.reset-item-content.sc-z-select{display:flex;align-items:center}.reset-item.sc-z-select .reset-item-content.active.sc-z-select{box-shadow:var(--shadow-focus-primary)}.reset-item.reset-item-margin.sc-z-select .reset-item-content.sc-z-select{margin-left:var(--space-unit)}.reset-item.sc-z-select .reset-item-content.sc-z-select>z-icon.sc-z-select{margin-right:var(--space-unit)}.reset-item.hide.sc-z-select{display:none}.tree-list-reset-item.sc-z-select{padding:var(--space-unit) 0}z-list-element.sc-z-select{position:relative;display:block}z-list.sc-z-select z-list-element.sc-z-select::before{position:absolute;z-index:100;top:3px;left:-8px;width:8px;height:1em;border-bottom:1px solid var(--color-form-disabled01-icon);border-left:1px solid var(--color-form-disabled01-icon);content:"";cursor:pointer}z-list.sc-z-select z-list-element.sc-z-select::after{position:absolute;z-index:100;top:5px;left:-8px;width:8px;height:100%;border-left:1px solid var(--color-form-disabled01-icon);content:"";cursor:pointer}z-list.sc-z-select z-list-element.sc-z-select:last-child::after{display:none}z-list.sc-z-select>z-list-element.sc-z-select::before,z-list.sc-z-select>z-list-element.sc-z-select::after,z-list.sc-z-select>z-list-group.sc-z-select>z-list-element.sc-z-select::before,z-list.sc-z-select>z-list-group.sc-z-select>z-list-element.sc-z-select::after{display:none}z-list.sc-z-select>div.children-node.sc-z-select{padding-left:calc(var(--space-unit) * 2)}z-list-element.sc-z-select>.list-element.sc-z-select{display:flex;justify-content:space-between;padding:calc(var(--space-unit) * 1.5) var(--space-unit);cursor:pointer}z-list-element.sc-z-select>.list-element.active.sc-z-select{box-shadow:var(--shadow-focus-primary)}z-list-element.sc-z-select:not([disabled])>.list-element.sc-z-select:hover,z-list-element.sc-z-select:not([disabled])>.list-element.sc-z-select:hover::after{background-color:var(--background-hover-color-list-element, var(--color-background))}z-list-element.sc-z-select>.list-element.sc-z-select .item.ellipsis.sc-z-select{overflow:hidden}z-list-element.sc-z-select .list-element.sc-z-select::after{position:absolute;top:0;right:-1px;display:block;width:100%;height:45px;content:"";transform:translateX(-100%)}z-list-element.tree-search-item.sc-z-select{padding-top:0}z-list-element.tree-search-item.sc-z-select .list-element.sc-z-select::after{position:absolute;right:-25px;display:block;width:100%;height:45px;content:"";transform:translateX(-100%)}z-list-element.grouped-tree-parent-node.sc-z-select .list-element.sc-z-select::after{position:absolute;right:-25px;display:block;width:100%;height:45px;content:"";transform:translateX(-100%)}.item-label.selected.sc-z-select{font-weight:bold}.item.ellipsis.sc-z-select{display:inline-block;overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap}z-list.sc-z-select>z-list-element.grouped-tree-parent-node.sc-z-select>.list-element.sc-z-select:hover::after,z-list-element.tree-search-item.sc-z-select .list-element.sc-z-select:hover::after,z-list.sc-z-select>z-list-group.sc-z-select>z-list-element.grouped-tree-parent-node.sc-z-select>.list-element.sc-z-select:hover::after{position:absolute;z-index:-1;right:-18px;display:block;width:100%;height:45px;content:"";transform:translateX(-100%)}z-list-element.sc-z-select>.list-element.sc-z-select:hover::after{position:absolute;z-index:-1;top:0;right:0;display:block;width:100%;height:45px;content:"";transform:translateX(-100%)}.children-node.sc-z-select z-list-element.sc-z-select::before,.children-node.sc-z-select z-list-element.sc-z-select::after{left:-8px}.children-node.sc-z-select .children-node.sc-z-select z-list-element.sc-z-select::before,.children-node.sc-z-select .children-node.sc-z-select z-list-element.sc-z-select::after{left:-8px}.children-node.sc-z-select>z-list-element.sc-z-select{padding:0}`;const m=class{constructor(s){e(this,s);this.optionSelect=t(this,"optionSelect",7);this.resetSelect=t(this,"resetSelect",7);this.htmlid=`id-${a()}`;this.items=[];this.ariaLabel="";this.disabled=false;this.readonly=false;this.message=true;this.autocomplete=false;this.noresultslabel="Nessun risultato";this.isfixed=false;this.size=l.BIG;this.isOpen=false;this.selectedItem=null;this.itemsList=[];this.toggleSelectUl=this.toggleSelectUl.bind(this);this.handleSelectFocus=this.handleSelectFocus.bind(this)}watchItems(){this.itemsList=this.getInitialItemsArray();this.selectedItem=this.findSelectedItem(this.itemsList)}async getSelectedItem(){return this.selectedItem}async getValue(){return this.getSelectedValue()}async setValue(e){let t=[];if(typeof e==="string"){t.push(e)}else{t=e}this.itemsList=this.getInitialItemsArray();if(t.length){this.updateSelection(this.itemsList,t[0])}this.selectedItem=this.findSelectedItem(this.itemsList)}emitOptionSelect(){this.optionSelect.emit({id:this.htmlid,selected:this.getSelectedValue()})}emitResetSelect(){this.resetSelect.emit({id:this.htmlid})}componentWillLoad(){this.watchItems()}componentWillRender(){this.filterItems(this.searchString)}getInitialItemsArray(){return typeof this.items==="string"?JSON.parse(this.items):this.items}mapSelectedItemToItemsArray(){var e;const t=this.getInitialItemsArray();this.updateSelection(t,(e=this.selectedItem)===null||e===void 0?void 0:e.id);return t}getSelectedValue(){var e;return(e=this.selectedItem)===null||e===void 0?void 0:e.id}getOptionId(e){return`${this.htmlid}_key_${e.id?o(`${e.id}`):o(`${e.name}`)}`}getResetOptionId(){return`${this.htmlid}_key_reset`}getGroupedItems(){if(!this.itemsList.length){return[]}return Object.entries(this.itemsList.reduce(((e,t)=>{const s=t.category||"Altra categoria";e[s]=e[s]||[];e[s].push(t);return e}),{}))}filterItems(e){let t=this.mapSelectedItemToItemsArray();if(!(e===null||e===void 0?void 0:e.length)){this.itemsList=t;return}t=t.map((e=>Object.assign(Object.assign({},e),{name:h(e.name)})));if(this.hasTreeItems){this.itemsList=this.filterTree(t,e,false)}else{this.itemsList=t.filter((t=>t.name.toUpperCase().includes(e.toUpperCase()))).map((t=>{t.name=this.getHighlightedText(t.name,e);return t}))}}filterTree(e,t,s){if(!e){return[]}return e.map((e=>{const i=e.name.toUpperCase().includes(t.toUpperCase());const l=Object.assign({},e);if(l.children&&l.children.length>0){l.children=this.filterTree(l.children.map((e=>Object.assign(Object.assign({},e),{name:h(e.name)}))),t,i)}if(i){l.name=this.getHighlightedText(l.name,t)}if(i||l.children&&l.children.length>0||this.showChildrenOfMatchingParent&&s){return l}return null})).filter((e=>e!==null))}getHighlightedText(e,t){const s=e.toUpperCase();const i=t.toUpperCase();const l=s.indexOf(i);if(l===-1){return e}const c=l+t.length;return e.substring(0,l)+`<strong>${e.substring(l,c)}</strong>`+e.substring(c)}hasAutocomplete(){return d(this.autocomplete)===true}handleInputChange(e){this.searchString=e.detail.value;if(!this.isOpen){this.toggleSelectUl()}}updateSelection(e,t){if(e){e.forEach((e=>{e.selected=e.id===t;if(e.children&&e.children.length>0){this.updateSelection(e.children,t)}}))}}findSelectedItem(e){if(e){for(const t of e){if(t.selected){return t}if(t.children&&t.children.length>0){const e=this.findSelectedItem(t.children);if(e){return e}}}}return null}selectItem(e){if(e===null||e===void 0?void 0:e.disabled){return}this.itemsList=this.getInitialItemsArray();if(e){this.updateSelection(this.itemsList,e.id)}this.selectedItem=this.findSelectedItem(this.itemsList);this.emitOptionSelect();this.toggleSelectUl();if(this.searchString){this.searchString=null}}handleResetClick(){this.selectedItem=null;this.searchString=null;this.focusedItemId="";this.emitResetSelect();this.toggleSelectUl()}handleInputKeyDown(e){switch(e.code){case c.ENTER:case c.SPACE:if(this.focusedItemId){if(this.focusedItemId===this.getResetOptionId()){this.handleResetClick()}else{const e=this.itemsList.find((e=>this.getOptionId(e)===this.focusedItemId))||null;if(e){this.selectedItem=e;this.emitOptionSelect();this.toggleSelectUl()}}}break;case c.ARROW_DOWN:case c.ARROW_UP:this.arrowsSelectNav(e);break}}arrowsSelectNav(e){const t=[c.ARROW_DOWN,c.ARROW_UP];if(!t.includes(e.key)){return}e.preventDefault();e.stopPropagation();const s=this.focusedItemId?this.host.querySelector(`#${this.focusedItemId}`):null;const i=Array.from(this.host.querySelectorAll('[role="option"]'));if(!i.length){return}const l=s?i.indexOf(s):null;const r=0;const n=i.length-1;if(!this.isOpen){this.toggleSelectUl();if(this.selectedItem){this.focusSelectItem(this.getOptionId(this.selectedItem));return}}let a=null;if(e.code===c.ARROW_DOWN){a=l===null?i[r]:i[l+1]||i[n]}else if(e.code===c.ARROW_UP){a=l===null?i[n]:i[l-1]||i[r]}this.focusSelectItem(a.id)}focusSelectItem(e){this.focusedItemId=e;const t=this.host.querySelector(`#${e}`);t.scrollIntoView({block:"nearest",container:"nearest"})}toggleSelectUl(e=false){var t;if(this.disabled||this.readonly){return}if(!this.isOpen){document.addEventListener("click",this.handleSelectFocus);document.addEventListener("keyup",this.handleSelectFocus)}else{document.removeEventListener("click",this.handleSelectFocus);document.removeEventListener("keyup",this.handleSelectFocus);if(e){(t=this.host.querySelector(`#${this.htmlid}_select_input`))===null||t===void 0?void 0:t.focus()}if(this.selectedItem&&this.searchString){this.searchString=null;this.filterItems(this.searchString)}}this.focusedItemId="";this.isOpen=!this.isOpen}handleInputClick(e){if(e.target.closest(".reset-icon")){e.stopPropagation();return}this.toggleSelectUl()}handleSelectFocus(e){if(e instanceof KeyboardEvent&&e.key===c.ESC){e.stopPropagation();return this.toggleSelectUl(true)}if(e instanceof KeyboardEvent&&e.key!==c.TAB){return}const t=z();if(t===null||t===void 0?void 0:t.hasAttribute("disabled")){return}if(!p(t).find((e=>e.nodeName.toLowerCase()==="z-input"&&e.id===`${this.htmlid}_input`))){const e=p(t).find((e=>e.nodeName==="Z-SELECT"));this.toggleSelectUl(e===this.host)}}scrollToLetter(e){if(!this.itemsList.length){return}const t=this.itemsList.find((t=>t.name.toLowerCase().charAt(0)===e.toLowerCase()));if(t){if(!this.isOpen){this.toggleSelectUl()}this.focusSelectItem(this.getOptionId(t))}}renderInput(){let e=null;if(this.selectedItem){e=h(this.selectedItem.name)}if(this.isOpen&&this.searchString!==undefined){e=this.searchString}return[s("z-input",{class:{"active-select":this.isOpen,"cursor-select":!this.autocomplete},id:`${this.htmlid}_input`,htmlid:`${this.htmlid}_select_input`,placeholder:this.placeholder,value:e,label:this.label,autocomplete:"off","aria-label":this.ariaLabel,icon:this.isOpen?"caret-up":"caret-down",hasclearicon:false,message:false,name:this.name,disabled:this.disabled,readonly:this.readonly||!this.hasAutocomplete()&&this.isOpen,status:this.isOpen?undefined:this.status,size:this.size,role:"combobox","html-aria-expanded":this.isOpen?"true":"false","html-aria-controls":`${this.htmlid}_list`,"html-aria-activedescendant":this.isOpen?this.focusedItemId:"","html-aria-autocomplete":this.hasAutocomplete()?"list":undefined,onClick:e=>this.handleInputClick(e),onKeyDown:e=>this.handleInputKeyDown(e),onInputChange:e=>this.handleInputChange(e),onKeyPress:e=>{if(!this.hasAutocomplete()){e.preventDefault();this.scrollToLetter(e.key)}}})]}renderSelectUl(){return s("div",{class:this.isOpen?"open":"closed"},s("div",{class:{"ul-scroll-wrapper":true,fixed:this.isfixed}},s("z-list",{role:"listbox","aria-label":this.ariaLabel||this.label,tabindex:this.disabled||this.readonly||!this.isOpen?-1:0,id:`${this.htmlid}_list`,"aria-multiselectable":false,size:this.listSizeType(),class:{disabled:this.disabled,readonly:this.readonly,[`input-${this.status}`]:!this.isOpen&&!!this.status,"z-scrollbar":true}},this.resetItem&&this.renderResetItem(),this.renderSelectUlItems())))}renderResetItem(){const e=!this.selectedItem||!this.resetItem;return s("z-list-element",{class:{hide:e,"reset-item":true,"reset-item-margin":!this.hasGroupItems},clickable:true,disabled:false,dividerType:n.ELEMENT,role:e?"presentation":"option",htmlTabindex:this.isOpen?0:null,"aria-selected":"false","aria-label":e?undefined:this.resetItem,id:this.getResetOptionId(),size:this.hasTreeItems?r.MEDIUM:this.listSizeType(),onClickItem:()=>this.handleResetClick()},s("div",{class:{"reset-item-content":true,"tree-list-reset-item":this.hasTreeItems,active:this.focusedItemId===this.getResetOptionId()},"aria-hidden":"true"},s("z-icon",{name:"multiply-circled"}),s("span",null,this.resetItem)))}renderItem(e,t){return s("z-list-element",{clickable:!e.disabled,disabled:e.disabled,dividerType:t?n.HEADER:n.ELEMENT,role:e.disabled?"presentation":"option",htmlTabindex:-1,"aria-selected":e.selected?"true":"false","aria-label":e.disabled?undefined:h(e.name),id:this.getOptionId(e),size:this.listSizeType(),onClickItem:()=>this.selectItem(e)},s("div",{class:{"list-element-container":true,active:this.focusedItemId===this.getOptionId(e)},"aria-hidden":"true"},s("div",{class:{selected:!!e.selected,"list-element-content":true},innerHTML:e.name}),e.icon&&s("z-tag",{icon:e.icon})))}listSizeType(){if(this.hasTreeItems){return r.NONE}if(this.size===l.SMALL||this.size===l.X_SMALL){return r.SMALL}return r.MEDIUM}renderSelectUlItems(){if(!this.itemsList.length){return this.renderNoSearchResults()}if(this.hasGroupItems){if(this.hasTreeItems){return this.renderGroupedTree()}return this.renderSelectGroupItems()}return this.itemsList.map(((e,t,s)=>{const i=t===s.length-1;const l=s.length>1;if(this.hasTreeItems){return this.renderTreeItems(e,i,l,true,e.disabled)}return this.renderItem(e,i)}))}renderTreeItems(e,t,i,l,c){var r,a;const o=e.disabled||c;const d=this.hasGroupItems?undefined:this.hasGroupItems?t&&!i?n.ELEMENT:undefined:l&&i&&!t?n.ELEMENT:undefined;return s("z-list-element",{clickable:!e.disabled,disabled:o,class:{"grouped-tree-parent-node":this.hasGroupItems&&!!((r=e.children)===null||r===void 0?void 0:r.length),"tree-search-item":this.hasGroupItems&&l&&!((a=e.children)===null||a===void 0?void 0:a.length)&&!!this.searchString},size:this.listSizeType(),dividerType:d,hasTreeItems:this.hasTreeItems,htmlTabindex:null,role:"presentation"},s("div",{id:this.getOptionId(e),role:o?"presentation":"option","aria-label":o?undefined:h(e.name),class:{"list-element":true,active:this.focusedItemId===this.getOptionId(e)},onClick:()=>this.selectItem(e)},s("span",{class:"item ellipsis","aria-hidden":"true"},s("span",{class:{"item-label":true,selected:!!e.selected},title:e.name,innerHTML:e.name})),e.icon&&s("z-tag",{icon:e.icon})),e.children&&e.children.length>0?s("z-list",{role:"presentation"},s("div",{class:"children-node"},e.children.map(((e,t,s)=>this.renderTreeItems(e,t===s.length-1,s.length>1,false,o))))):null)}renderGroupedTree(){const e=this.getGroupedItems();return e.map((([t,i],l,c)=>{const r=Object.values(e).some((e=>e.length>1));return s("z-list-group",{"divider-type":l===c.length-1?undefined:n.ELEMENT,hasTreeItems:true,"aria-labelledby":`${this.htmlid}_tree_${l}`},s("span",{class:"body-3-sb z-list-group-title",slot:"header-title",id:`${this.htmlid}_tree_${l}`,"aria-hidden":"true"},t),s("z-list",{role:"presentation"},i.map(((e,t,i)=>[this.renderTreeItems(e,t===i.length-1,r,true,e.disabled),t<i.length-1?s("z-divider",{key:`divider-${t}`,style:{zIndex:"100",height:"var(--border-size-small)"}}):null]))),l!==c.length-1&&s("z-divider",{style:{zIndex:"100",height:"var(--border-size-small)"}}))}))}renderSelectGroupItems(){const e=this.getGroupedItems();return e.map((([t,i],l)=>{const c=e.length===l+1;return s("z-list-group",{"divider-type":n.ELEMENT,"aria-labelledby":`${this.htmlid}_group_${l}`},s("span",{class:"body-3-sb z-list-group-title",slot:"header-title",id:`${this.htmlid}_group_${l}`,"aria-hidden":"true"},t),i.map(((e,t)=>{const s=i.length===t+1;return this.renderItem(e,c&&s)})))}))}renderNoSearchResults(){return s("z-list-element",{class:"no-results",size:this.hasTreeItems?r.MEDIUM:this.listSizeType(),htmlTabindex:null,role:"presentation"},this.noresultslabel)}renderMessage(){if(d(this.message)===false){return}return s("z-input-message",{message:d(this.message)===true?undefined:this.message,status:this.status,class:this.size,disabled:this.disabled})}render(){return s("div",{key:"f2be06f6abfff472e90031034431f4e7acb27be6",class:"select-wrapper"},this.renderInput(),this.renderSelectUl(),this.renderMessage())}get host(){return i(this)}static get watchers(){return{items:[{watchItems:0}]}}};m.style=u();export{m as z_select};
2
+ //# sourceMappingURL=p-eb22ba82.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,h as r}from"./p-BcDWN4F1.js";import{f as o}from"./p-B3nR3-Jw.js";const a=()=>`input:focus{box-shadow:var(--shadow-focus-primary);outline:none !important}:host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}.digits-container{display:flex;justify-content:flex-start}input{width:calc(var(--space-unit) * 5);height:72px;box-sizing:border-box;padding:0;caret-color:transparent;color:var(--color-surface05);font-family:var(--font-family-sans);font-size:32px;font-weight:300;text-align:center}input.error{border:1px solid;border-color:var(--color-default-error);background-color:var(--color-inverse-error);border-radius:4px}input:not(:last-of-type){margin-right:var(--space-unit)}@media only screen and (min-width: 768px){input:not(:last-of-type){margin-right:calc(var(--space-unit) * 2)}}@media only screen and (min-width: 1025px){input{width:calc(var(--space-unit) * 6)}}`;const e=class{constructor(r){t(this,r);this.otpChange=i(this,"otpChange",7);this.inputNum=6}emitInputChange(t){this.otpChange.emit({value:t})}componentWillLoad(){this.otp=[...Array(this.inputNum)];this.otpRef=[...Array(this.inputNum)]}render(){return r("div",{key:"82943f654f3601a203981bc476a5e58378604331",class:"otp-container"},r("div",{key:"0e069bb23f23ff9e97bb094b3ccce57d5adeb1b1",class:"digits-container"},this.otp.map(((t,i)=>r("input",{class:this.status==o.ERROR?"error":null,onKeyDown:t=>{if(t.keyCode>47){this.otpRef[i].value=""}},onKeyUp:t=>{if(t.keyCode>47){if(i<this.inputNum-1){this.otpRef[i+1].focus()}}},onInput:t=>{this.otp[i]=t.target.value;this.emitInputChange(this.otp.join(""))},type:"text",minlength:"1",maxlength:"1",autoComplete:"off",ref:t=>this.otpRef[i]=t})))),r("z-input-message",{key:"752f2b63c997e9b6ff2e239537e15b1a1a2719c7",message:this.message,status:this.status}))}};e.style=a();export{e as z_otp};
2
- //# sourceMappingURL=p-02a5c216.entry.js.map
1
+ import{r as t,c as i,h as r}from"./p-BcDWN4F1.js";import{f as o}from"./p-DdetsoIY.js";const e=()=>`input:focus{box-shadow:var(--shadow-focus-primary);outline:none !important}:host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}.digits-container{display:flex;justify-content:flex-start}input{width:calc(var(--space-unit) * 5);height:72px;box-sizing:border-box;padding:0;caret-color:transparent;color:var(--color-surface05);font-family:var(--font-family-sans);font-size:32px;font-weight:300;text-align:center}input.error{border:1px solid;border-color:var(--color-default-error);background-color:var(--color-inverse-error);border-radius:4px}input:not(:last-of-type){margin-right:var(--space-unit)}@media only screen and (min-width: 768px){input:not(:last-of-type){margin-right:calc(var(--space-unit) * 2)}}@media only screen and (min-width: 1025px){input{width:calc(var(--space-unit) * 6)}}`;const a=class{constructor(r){t(this,r);this.otpChange=i(this,"otpChange",7);this.inputNum=6}emitInputChange(t){this.otpChange.emit({value:t})}componentWillLoad(){this.otp=[...Array(this.inputNum)];this.otpRef=[...Array(this.inputNum)]}render(){return r("div",{key:"82943f654f3601a203981bc476a5e58378604331",class:"otp-container"},r("div",{key:"0e069bb23f23ff9e97bb094b3ccce57d5adeb1b1",class:"digits-container"},this.otp.map(((t,i)=>r("input",{class:this.status==o.ERROR?"error":null,onKeyDown:t=>{if(t.keyCode>47){this.otpRef[i].value=""}},onKeyUp:t=>{if(t.keyCode>47){if(i<this.inputNum-1){this.otpRef[i+1].focus()}}},onInput:t=>{this.otp[i]=t.target.value;this.emitInputChange(this.otp.join(""))},type:"text",minlength:"1",maxlength:"1",autoComplete:"off",ref:t=>this.otpRef[i]=t})))),r("z-input-message",{key:"752f2b63c997e9b6ff2e239537e15b1a1a2719c7",message:this.message,status:this.status}))}};a.style=e();export{a as z_otp};
2
+ //# sourceMappingURL=p-ec12d752.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,h as a,H as n,d as o}from"./p-BcDWN4F1.js";import{I as s}from"./p-B3nR3-Jw.js";const e=()=>`z-pagination{--z-pagination--page-button-width:64px;--z-pagination--pages-container-max-width:100%;--z-pagination-background-color:var(--color-background);--z-pagination-background-color-hover:var(--color-surface01);display:flex;max-width:100%;flex-flow:column wrap;font-family:var(--font-family-sans);font-weight:var(--font-rg);gap:calc(var(--space-unit) * 2) calc(var(--space-unit) * 4)}z-pagination,z-pagination *{box-sizing:border-box}z-pagination button{height:100%}z-pagination z-icon{fill:var(--color-primary01-icon)}z-pagination *:disabled z-icon{fill:var(--color-disabled03)}z-pagination .page-label{margin-right:calc(var(--space-unit) * 3);color:var(--color-default-text)}z-pagination .pagination-bar{display:flex;max-width:100%;height:48px;align-items:center}z-pagination .pagination-bar button{display:flex;align-items:center;justify-content:center;border:none;margin:0;background-color:var(--z-pagination-background-color);color:var(--color-primary01);cursor:pointer;font-family:inherit;font-weight:inherit;transition:background-color 0.15s ease-out, color 0.15s ease-out, border-bottom-color 0.15s ease-out, font-size 0.15s ease-in-out, font-weight 0.15s ease-in-out}z-pagination .pagination-bar button:focus-visible{background-color:var(--color-surface01);outline:none}z-pagination .pagination-bar .pagination-button{padding:calc(var(--space-unit) * 2);font-weight:var(--font-sb);text-transform:uppercase;white-space:nowrap}z-pagination .pagination-bar .navigation-button{padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 1.5)}z-pagination .pagination-bar .pagination-button:disabled,z-pagination .pagination-bar .navigation-button:disabled{color:var(--color-disabled03);cursor:default;fill:var(--color-disabled03);pointer-events:none}z-pagination .pagination-bar .page-button,z-pagination .pagination-bar .ellipsis-button{width:var(--z-pagination--page-button-width)}z-pagination .pages-container{position:relative;display:inline-flex;max-width:100%;height:100%;overflow-x:auto;scroll-behavior:smooth;scroll-snap-align:center;scrollbar-width:none}z-pagination .pages-container::-webkit-scrollbar{display:none}z-pagination .pages-chunk{display:flex;scroll-snap-align:center}z-pagination .pagination-bar .page-button{padding-top:var(--border-size-large) solid transparent;border-bottom:var(--border-size-large) solid transparent;font-size:var(--font-size-2);font-weight:var(--font-sb)}z-pagination .pagination-bar .page-button[data-current]{border-bottom-color:var(--color-primary01);font-size:var(--font-size-7)}z-pagination .go-to-page{display:flex;flex-direction:column}z-pagination .go-to-page .inputs{display:flex;column-gap:var(--space-unit)}z-pagination .go-to-page .inputs z-input{width:calc(var(--space-unit) * 11)}z-pagination .go-to-page .inputs z-input input,z-pagination .mobile-go-to-page z-input input{padding:0 calc(var(--space-unit) * 1.5) !important;appearance:none}z-pagination .mobile-go-to-page{display:flex;height:100%;flex:1 auto;align-items:center;justify-content:center;background-color:var(--color-surface02)}z-pagination .mobile-go-to-page z-input{width:var(--z-pagination--page-button-width);margin-right:var(--space-unit)}z-pagination .mobile-go-to-page z-input input{text-align:center}z-pagination .mobile-go-to-page z-input input::-webkit-outer-spin-button,z-pagination .mobile-go-to-page z-input input::-webkit-inner-spin-button{appearance:none}z-pagination .mobile-go-to-page>span{font-size:var(--font-size-2)}@media (hover: hover){z-pagination .pagination-bar button:hover{background-color:var(--z-pagination-background-color-hover)}z-pagination .pagination-bar .page-button:hover{border-bottom-color:var(--color-hover-primary);color:var(--color-hover-primary)}}@media (min-width: 768px){z-pagination{--z-pagination--page-button-width:88px;flex-direction:row;align-items:flex-end}z-pagination .pages-container{max-width:var(--z-pagination--pages-container-max-width)}}`;const r=class{constructor(a){t(this,a);this.pageChanged=i(this,"pageChanged",7);this.navArrows=true;this.skip=0;this.edges=false;this.currentPage=1;this._visiblePages=this.visiblePages;this.isMobile=false;this.goToPageValue=null}setPagesContainerWidth(){if(!this._visiblePages||this.split){this.host.style.setProperty("--z-pagination--pages-container-max-width","100%");return}const t=window.getComputedStyle(this.host);const i=t.getPropertyValue("--z-pagination--page-button-width");this.host.style.setProperty("--z-pagination--pages-container-max-width",`calc(${i} * ${this._visiblePages})`)}setVisiblePages(){this._visiblePages=Math.min(this.visiblePages||this.totalPages,this.totalPages)}onPageChanged(){this.pageChanged.emit(this.currentPage);this.scrollToPage()}onSplitChanged(){if(this.split){this.edges=false}}onResize(){this.setMobile()}setMobile(){const t="screen and (max-width: 767px)";this.isMobile=window.matchMedia(t).matches}getPagesChunks(){const t=Array.from({length:this.totalPages},((t,i)=>i+1));const i=[];const a=Math.ceil(t.length/this._visiblePages);for(let n=0;n<a;n++){i.push(t.slice(n*this._visiblePages,(n+1)*this._visiblePages))}return i}scrollToPage(){var t,i;const a=this.host.querySelector(".pages-container");const n=this.host.querySelector(`[data-page="${this.currentPage}"]`);const o=this.host.querySelector(".navigation-button");if(!n||!a){return}const s=a.getBoundingClientRect().width;const e=n.getBoundingClientRect().width;const r=(i=(t=o===null||o===void 0?void 0:o.getBoundingClientRect())===null||t===void 0?void 0:t.width)!==null&&i!==void 0?i:0;a.scrollLeft=this.currentPage*e-r-s/2}selectPage(t){this.currentPage=Math.min(Math.max(t,1),this.totalPages)}renderPage(t){return a("button",{class:"page-button",type:"button","aria-current":this.currentPage===t?"page":"false",title:`Vai alla pagina ${t}`,"data-page":t,"data-current":this.currentPage===t,onClick:()=>this.selectPage(t)},t)}renderEllipsisButton(t){return a("button",{class:"ellipsis-button",type:"button",title:`Vai alla pagina ${t}`,onClick:()=>this.selectPage(t)},"…")}renderPages(){const t=this.getPagesChunks();if(t.length<=0){return}return t.map((t=>a("div",{class:"pages-chunk"},t.map((t=>this.renderPage(t))))))}renderSplitPages(){if(this.totalPages<=this.split*2+5){return Array.from({length:this.totalPages},((t,i)=>this.renderPage(i+1)))}if(this.currentPage<=this.split*2+2){return[...Array.from({length:this.split*2+3},((t,i)=>this.renderPage(i+1))),this.renderEllipsisButton(this.split*2+4),this.renderPage(this.totalPages)]}if(this.currentPage>this.split*2+2&&this.currentPage<this.totalPages-this.split*2-1){return[this.renderPage(1),this.renderEllipsisButton(this.currentPage-this.split-1),...Array.from({length:this.split*2+1},((t,i)=>this.renderPage(this.currentPage-this.split+i))),this.renderEllipsisButton(this.currentPage+this.split+1),this.renderPage(this.totalPages)]}return[this.renderPage(1),this.renderEllipsisButton(this.totalPages-this.split*2-3),...Array.from({length:this.split*2+3},((t,i)=>this.renderPage(this.totalPages-this.split*2-2+i)))]}renderBackButton(){return a("button",{class:"navigation-button",type:"button","aria-label":"Vai alla pagina precedente",title:"Vai alla pagina precedente",disabled:this.currentPage===1,onClick:()=>this.selectPage(this.currentPage-1)},a("z-icon",{name:"chevron-left"}))}renderForwardButton(){return a("button",{class:"navigation-button",type:"button","aria-label":"Vai alla prossima pagina",title:"Vai alla prossima pagina",disabled:this.currentPage===this.totalPages,onClick:()=>this.selectPage(this.currentPage+1)},a("z-icon",{name:"chevron-right"}))}renderMobile(){const t=this.getPagesChunks();return[this.label&&a("span",{class:"page-label body-1-sb"},this.label),a("div",{class:"pagination-bar"},this.renderBackButton(),!this.goToPage&&a("div",{class:"pages-container",role:"navigation",tabIndex:-1},t.length>0&&t.map((t=>a("div",{class:"pages-chunk"},t.map((t=>this.renderPage(t))))))),this.goToPage&&a("form",{class:"mobile-go-to-page",onSubmit:t=>{t.preventDefault();this.selectPage(this.goToPageValue)}},a("z-input",{class:"go-to-page-input",type:s.NUMBER,min:1,max:this.totalPages,message:false,onInput:t=>{this.goToPageValue=t.target.value},placeholder:this.currentPage.toString(),hasclearicon:false}),a("span",null,`/${this.totalPages}`)),this.renderForwardButton())]}componentDidLoad(){this.setVisiblePages()}componentDidRender(){if(this.split){this.edges=false}this.setPagesContainerWidth();this.setMobile();this.scrollToPage()}render(){if(this.isMobile){return a(n,null,this.renderMobile())}return a(n,null,a("div",{class:"pagination-bar"},this.label&&a("span",{class:"page-label body-1-sb"},this.label),this.edges&&a("button",{class:"pagination-button",type:"button",title:"Vai alla pagina 1",disabled:this.currentPage===1,onClick:()=>this.selectPage(1)},"Pagina 1"),this.skip<this.totalPages&&this.skip>1&&a("button",{class:"pagination-button",type:"button",title:`Vai alla pagina ${this.currentPage-this.skip}`,disabled:this.currentPage<=this.skip,onClick:()=>this.selectPage(this.currentPage-this.skip)},"-",this.skip),this.navArrows&&this.renderBackButton(),a("div",{class:"pages-container",role:"navigation",tabIndex:-1},this.split?this.renderSplitPages():this.renderPages()),this.navArrows&&this.renderForwardButton(),this.skip<this.totalPages&&this.skip>1&&a("button",{class:"pagination-button",type:"button",title:`Vai alla pagina ${this.currentPage+this.skip}`,disabled:this.currentPage>this.totalPages-this.skip,onClick:()=>this.selectPage(this.currentPage+this.skip)},"+",this.skip),this.edges&&a("button",{class:"pagination-button",type:"button",title:`Vai alla pagina ${this.totalPages}`,disabled:this.currentPage===this.totalPages,onClick:()=>this.selectPage(this.totalPages)},"Pagina ",this.totalPages)),this.goToPage&&a("div",{class:"go-to-page"},a("span",{class:"z-label body-5-sb"},"Vai a pagina:"),a("div",{class:"inputs"},a("z-input",{class:"go-to-page-input",type:s.NUMBER,min:1,max:this.totalPages,message:false,placeholder:"2",hasclearicon:false,onInput:t=>{this.goToPageValue=t.target.value},onKeyDown:t=>t.key==="Enter"&&this.selectPage(this.goToPageValue)}),a("z-button",{disabled:!this.goToPageValue,title:"Vai alla pagina inserita",onClick:()=>this.selectPage(this.goToPageValue)},"vai"))))}get host(){return o(this)}static get watchers(){return{_visiblePages:[{setPagesContainerWidth:0}],visiblePages:[{setVisiblePages:0}],currentPage:[{onPageChanged:0}],split:[{onSplitChanged:0}]}}};r.style=e();export{r as z_pagination};
2
- //# sourceMappingURL=p-9b1deaa1.entry.js.map
1
+ import{r as t,c as i,h as a,H as n,d as o}from"./p-BcDWN4F1.js";import{I as s}from"./p-DdetsoIY.js";const e=()=>`z-pagination{--z-pagination--page-button-width:64px;--z-pagination--pages-container-max-width:100%;--z-pagination-background-color:var(--color-background);--z-pagination-background-color-hover:var(--color-surface01);display:flex;max-width:100%;flex-flow:column wrap;font-family:var(--font-family-sans);font-weight:var(--font-rg);gap:calc(var(--space-unit) * 2) calc(var(--space-unit) * 4)}z-pagination,z-pagination *{box-sizing:border-box}z-pagination button{height:100%}z-pagination z-icon{fill:var(--color-primary01-icon)}z-pagination *:disabled z-icon{fill:var(--color-disabled03)}z-pagination .page-label{margin-right:calc(var(--space-unit) * 3);color:var(--color-default-text)}z-pagination .pagination-bar{display:flex;max-width:100%;height:48px;align-items:center}z-pagination .pagination-bar button{display:flex;align-items:center;justify-content:center;border:none;margin:0;background-color:var(--z-pagination-background-color);color:var(--color-primary01);cursor:pointer;font-family:inherit;font-weight:inherit;transition:background-color 0.15s ease-out, color 0.15s ease-out, border-bottom-color 0.15s ease-out, font-size 0.15s ease-in-out, font-weight 0.15s ease-in-out}z-pagination .pagination-bar button:focus-visible{background-color:var(--color-surface01);outline:none}z-pagination .pagination-bar .pagination-button{padding:calc(var(--space-unit) * 2);font-weight:var(--font-sb);text-transform:uppercase;white-space:nowrap}z-pagination .pagination-bar .navigation-button{padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 1.5)}z-pagination .pagination-bar .pagination-button:disabled,z-pagination .pagination-bar .navigation-button:disabled{color:var(--color-disabled03);cursor:default;fill:var(--color-disabled03);pointer-events:none}z-pagination .pagination-bar .page-button,z-pagination .pagination-bar .ellipsis-button{width:var(--z-pagination--page-button-width)}z-pagination .pages-container{position:relative;display:inline-flex;max-width:100%;height:100%;overflow-x:auto;scroll-behavior:smooth;scroll-snap-align:center;scrollbar-width:none}z-pagination .pages-container::-webkit-scrollbar{display:none}z-pagination .pages-chunk{display:flex;scroll-snap-align:center}z-pagination .pagination-bar .page-button{padding-top:var(--border-size-large) solid transparent;border-bottom:var(--border-size-large) solid transparent;font-size:var(--font-size-2);font-weight:var(--font-sb)}z-pagination .pagination-bar .page-button[data-current]{border-bottom-color:var(--color-primary01);font-size:var(--font-size-7)}z-pagination .go-to-page{display:flex;flex-direction:column}z-pagination .go-to-page .inputs{display:flex;column-gap:var(--space-unit)}z-pagination .go-to-page .inputs z-input{width:calc(var(--space-unit) * 11)}z-pagination .go-to-page .inputs z-input input,z-pagination .mobile-go-to-page z-input input{padding:0 calc(var(--space-unit) * 1.5) !important;appearance:none}z-pagination .mobile-go-to-page{display:flex;height:100%;flex:1 auto;align-items:center;justify-content:center;background-color:var(--color-surface02)}z-pagination .mobile-go-to-page z-input{width:var(--z-pagination--page-button-width);margin-right:var(--space-unit)}z-pagination .mobile-go-to-page z-input input{text-align:center}z-pagination .mobile-go-to-page z-input input::-webkit-outer-spin-button,z-pagination .mobile-go-to-page z-input input::-webkit-inner-spin-button{appearance:none}z-pagination .mobile-go-to-page>span{font-size:var(--font-size-2)}@media (hover: hover){z-pagination .pagination-bar button:hover{background-color:var(--z-pagination-background-color-hover)}z-pagination .pagination-bar .page-button:hover{border-bottom-color:var(--color-hover-primary);color:var(--color-hover-primary)}}@media (min-width: 768px){z-pagination{--z-pagination--page-button-width:88px;flex-direction:row;align-items:flex-end}z-pagination .pages-container{max-width:var(--z-pagination--pages-container-max-width)}}`;const r=class{constructor(a){t(this,a);this.pageChanged=i(this,"pageChanged",7);this.navArrows=true;this.skip=0;this.edges=false;this.currentPage=1;this._visiblePages=this.visiblePages;this.isMobile=false;this.goToPageValue=null}setPagesContainerWidth(){if(!this._visiblePages||this.split){this.host.style.setProperty("--z-pagination--pages-container-max-width","100%");return}const t=window.getComputedStyle(this.host);const i=t.getPropertyValue("--z-pagination--page-button-width");this.host.style.setProperty("--z-pagination--pages-container-max-width",`calc(${i} * ${this._visiblePages})`)}setVisiblePages(){this._visiblePages=Math.min(this.visiblePages||this.totalPages,this.totalPages)}onPageChanged(){this.pageChanged.emit(this.currentPage);this.scrollToPage()}onSplitChanged(){if(this.split){this.edges=false}}onResize(){this.setMobile()}setMobile(){const t="screen and (max-width: 767px)";this.isMobile=window.matchMedia(t).matches}getPagesChunks(){const t=Array.from({length:this.totalPages},((t,i)=>i+1));const i=[];const a=Math.ceil(t.length/this._visiblePages);for(let n=0;n<a;n++){i.push(t.slice(n*this._visiblePages,(n+1)*this._visiblePages))}return i}scrollToPage(){var t,i;const a=this.host.querySelector(".pages-container");const n=this.host.querySelector(`[data-page="${this.currentPage}"]`);const o=this.host.querySelector(".navigation-button");if(!n||!a){return}const s=a.getBoundingClientRect().width;const e=n.getBoundingClientRect().width;const r=(i=(t=o===null||o===void 0?void 0:o.getBoundingClientRect())===null||t===void 0?void 0:t.width)!==null&&i!==void 0?i:0;a.scrollLeft=this.currentPage*e-r-s/2}selectPage(t){this.currentPage=Math.min(Math.max(t,1),this.totalPages)}renderPage(t){return a("button",{class:"page-button",type:"button","aria-current":this.currentPage===t?"page":"false",title:`Vai alla pagina ${t}`,"data-page":t,"data-current":this.currentPage===t,onClick:()=>this.selectPage(t)},t)}renderEllipsisButton(t){return a("button",{class:"ellipsis-button",type:"button",title:`Vai alla pagina ${t}`,onClick:()=>this.selectPage(t)},"…")}renderPages(){const t=this.getPagesChunks();if(t.length<=0){return}return t.map((t=>a("div",{class:"pages-chunk"},t.map((t=>this.renderPage(t))))))}renderSplitPages(){if(this.totalPages<=this.split*2+5){return Array.from({length:this.totalPages},((t,i)=>this.renderPage(i+1)))}if(this.currentPage<=this.split*2+2){return[...Array.from({length:this.split*2+3},((t,i)=>this.renderPage(i+1))),this.renderEllipsisButton(this.split*2+4),this.renderPage(this.totalPages)]}if(this.currentPage>this.split*2+2&&this.currentPage<this.totalPages-this.split*2-1){return[this.renderPage(1),this.renderEllipsisButton(this.currentPage-this.split-1),...Array.from({length:this.split*2+1},((t,i)=>this.renderPage(this.currentPage-this.split+i))),this.renderEllipsisButton(this.currentPage+this.split+1),this.renderPage(this.totalPages)]}return[this.renderPage(1),this.renderEllipsisButton(this.totalPages-this.split*2-3),...Array.from({length:this.split*2+3},((t,i)=>this.renderPage(this.totalPages-this.split*2-2+i)))]}renderBackButton(){return a("button",{class:"navigation-button",type:"button","aria-label":"Vai alla pagina precedente",title:"Vai alla pagina precedente",disabled:this.currentPage===1,onClick:()=>this.selectPage(this.currentPage-1)},a("z-icon",{name:"chevron-left"}))}renderForwardButton(){return a("button",{class:"navigation-button",type:"button","aria-label":"Vai alla prossima pagina",title:"Vai alla prossima pagina",disabled:this.currentPage===this.totalPages,onClick:()=>this.selectPage(this.currentPage+1)},a("z-icon",{name:"chevron-right"}))}renderMobile(){const t=this.getPagesChunks();return[this.label&&a("span",{class:"page-label body-1-sb"},this.label),a("div",{class:"pagination-bar"},this.renderBackButton(),!this.goToPage&&a("div",{class:"pages-container",role:"navigation",tabIndex:-1},t.length>0&&t.map((t=>a("div",{class:"pages-chunk"},t.map((t=>this.renderPage(t))))))),this.goToPage&&a("form",{class:"mobile-go-to-page",onSubmit:t=>{t.preventDefault();this.selectPage(this.goToPageValue)}},a("z-input",{class:"go-to-page-input",type:s.NUMBER,min:1,max:this.totalPages,message:false,onInput:t=>{this.goToPageValue=t.target.value},placeholder:this.currentPage.toString(),hasclearicon:false}),a("span",null,`/${this.totalPages}`)),this.renderForwardButton())]}componentDidLoad(){this.setVisiblePages()}componentDidRender(){if(this.split){this.edges=false}this.setPagesContainerWidth();this.setMobile();this.scrollToPage()}render(){if(this.isMobile){return a(n,null,this.renderMobile())}return a(n,null,a("div",{class:"pagination-bar"},this.label&&a("span",{class:"page-label body-1-sb"},this.label),this.edges&&a("button",{class:"pagination-button",type:"button",title:"Vai alla pagina 1",disabled:this.currentPage===1,onClick:()=>this.selectPage(1)},"Pagina 1"),this.skip<this.totalPages&&this.skip>1&&a("button",{class:"pagination-button",type:"button",title:`Vai alla pagina ${this.currentPage-this.skip}`,disabled:this.currentPage<=this.skip,onClick:()=>this.selectPage(this.currentPage-this.skip)},"-",this.skip),this.navArrows&&this.renderBackButton(),a("div",{class:"pages-container",role:"navigation",tabIndex:-1},this.split?this.renderSplitPages():this.renderPages()),this.navArrows&&this.renderForwardButton(),this.skip<this.totalPages&&this.skip>1&&a("button",{class:"pagination-button",type:"button",title:`Vai alla pagina ${this.currentPage+this.skip}`,disabled:this.currentPage>this.totalPages-this.skip,onClick:()=>this.selectPage(this.currentPage+this.skip)},"+",this.skip),this.edges&&a("button",{class:"pagination-button",type:"button",title:`Vai alla pagina ${this.totalPages}`,disabled:this.currentPage===this.totalPages,onClick:()=>this.selectPage(this.totalPages)},"Pagina ",this.totalPages)),this.goToPage&&a("div",{class:"go-to-page"},a("span",{class:"z-label body-5-sb"},"Vai a pagina:"),a("div",{class:"inputs"},a("z-input",{class:"go-to-page-input",type:s.NUMBER,min:1,max:this.totalPages,message:false,placeholder:"2",hasclearicon:false,onInput:t=>{this.goToPageValue=t.target.value},onKeyDown:t=>t.key==="Enter"&&this.selectPage(this.goToPageValue)}),a("z-button",{disabled:!this.goToPageValue,title:"Vai alla pagina inserita",onClick:()=>this.selectPage(this.goToPageValue)},"vai"))))}get host(){return o(this)}static get watchers(){return{_visiblePages:[{setPagesContainerWidth:0}],visiblePages:[{setVisiblePages:0}],currentPage:[{onPageChanged:0}],split:[{onSplitChanged:0}]}}};r.style=e();export{r as z_pagination};
2
+ //# sourceMappingURL=p-f8fd6f08.entry.js.map
@@ -1,6 +1,6 @@
1
- import{d as e}from"./p-BcDWN4F1.js";import{t as r,n as t,o as n,p as i,q as a,s as u,a as o,u as f}from"./p-C8pbzcmM.js";import{g as s}from"./p-B3nR3-Jw.js";
1
+ import{d as e}from"./p-BcDWN4F1.js";import{t as r,n as t,o as n,p as i,q as a,s as u,a as o,u as f}from"./p-C_25lDQa.js";import{g as s}from"./p-DdetsoIY.js";
2
2
  /*!
3
3
  * focus-trap 8.2.1
4
4
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
5
- */function l(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function c(e){if(Array.isArray(e))return l(e)}function v(e,r){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=k(e))||r){t&&(e=t);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:true}:{done:false,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=true,o=false;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return u=e.done,e},e:function(e){o=true,a=e},f:function(){try{u||null==t.return||t.return()}finally{if(o)throw a}}}}function d(e,r,t){return(r=F(r))in e?Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true}):e[r]=t,e}function h(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function y(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?b(Object(t),true).forEach((function(r){d(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function w(e){return c(e)||h(e)||k(e)||p()}function m(e,r){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}function F(e){var r=m(e,"string");return"symbol"==typeof r?r:r+""}function k(e,r){if(e){if("string"==typeof e)return l(e,r);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?l(e,r):void 0}}var j={getActiveTrap:function e(r){if((r===null||r===void 0?void 0:r.length)>0){return r[r.length-1]}return null},activateTrap:function e(r,t){var n=j.getActiveTrap(r);if(t!==n){j.pauseTrap(r)}var i=r.indexOf(t);if(i===-1){r.push(t)}else{r.splice(i,1);r.push(t)}},deactivateTrap:function e(r,t){var n=r.indexOf(t);if(n!==-1){r.splice(n,1)}j.unpauseTrap(r)},pauseTrap:function e(r){var t=j.getActiveTrap(r);t===null||t===void 0||t._setPausedState(true)},unpauseTrap:function e(r){var t=j.getActiveTrap(r);if(t&&!t._isManuallyPaused()){t._setPausedState(false)}}};var S=function e(r){return r.tagName&&r.tagName.toLowerCase()==="input"&&typeof r.select==="function"};var T=function e(r){return(r===null||r===void 0?void 0:r.key)==="Escape"||(r===null||r===void 0?void 0:r.key)==="Esc"||(r===null||r===void 0?void 0:r.keyCode)===27};var O=function e(r){return(r===null||r===void 0?void 0:r.key)==="Tab"||(r===null||r===void 0?void 0:r.keyCode)===9};var D=function e(r){return O(r)&&!r.shiftKey};var E=function e(r){return O(r)&&r.shiftKey};var g=function e(r){return setTimeout(r,0)};var A=function e(r){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++){n[i-1]=arguments[i]}return typeof r==="function"?r.apply(void 0,n):r};var R=function e(r){return r.target.shadowRoot&&typeof r.composedPath==="function"?r.composedPath()[0]:r.target};var P=[];var C=function e(u,o){var f=(o===null||o===void 0?void 0:o.document)||document;var s=(o===null||o===void 0?void 0:o.trapStack)||P;var l=y({returnFocusOnDeactivate:true,escapeDeactivates:true,delayInitialFocus:true,delayReturnFocus:true,isolateSubtrees:false,isKeyForward:D,isKeyBackward:E},o);var c={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:false,paused:false,manuallyPaused:false,delayInitialFocusTimer:undefined,recentNavEvent:undefined};var d;var h=function e(r,t,n){return r&&r[t]!==undefined?r[t]:l[n||t]};var p=function e(r,t){var n=typeof(t===null||t===void 0?void 0:t.composedPath)==="function"?t.composedPath():undefined;return c.containerGroups.findIndex((function(e){var t=e.container,i=e.tabbableNodes;return t.contains(r)||(n===null||n===void 0?void 0:n.includes(t))||i.find((function(e){return e===r}))}))};var b=function e(r){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=t.hasFallback,i=n===void 0?false:n,a=t.params,u=a===void 0?[]:a;var o=l[r];if(typeof o==="function"){o=o.apply(void 0,w(u))}if(o===true){o=undefined}if(!o){if(o===undefined||o===false){return o}throw new Error("`".concat(r,"` was specified but was not a node, or did not return a node"))}var s=o;if(typeof o==="string"){try{s=f.querySelector(o)}catch(e){throw new Error("`".concat(r,'` appears to be an invalid selector; error="').concat(e.message,'"'))}if(!s){if(!i){throw new Error("`".concat(r,"` as selector refers to no known node"))}}}return s};var m=function e(r){var t=r.activeElement;if(!t){return null}if(t.shadowRoot&&t.shadowRoot.activeElement!==null){return m(t.shadowRoot)}return t};var F=function e(){var r=b("initialFocus",{hasFallback:true});if(r===false){return false}if(r===undefined||r&&!a(r,l.tabbableOptions)){var t=m(f);if(p(t)>=0){r=t}else{var n=c.tabbableGroups[0];var i=n&&n.firstTabbableNode;r=i||b("fallbackFocus")}}else if(r===null){r=b("fallbackFocus")}if(!r){throw new Error("Your focus-trap needs to have at least one focusable element")}return r};var k=function e(){c.containerGroups=c.containers.map((function(e){var a=r(e,l.tabbableOptions);var u=t(e,l.tabbableOptions);var o=a.length>0?a[0]:undefined;var f=a.length>0?a[a.length-1]:undefined;var s=u.find((function(e){return n(e)}));var c=u.slice().reverse().find((function(e){return n(e)}));var v=!!a.find((function(e){return i(e)>0}));return{container:e,tabbableNodes:a,focusableNodes:u,posTabIndexesFound:v,firstTabbableNode:o,lastTabbableNode:f,firstDomTabbableNode:s,lastDomTabbableNode:c,nextTabbableNode:function e(r){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var i=a.indexOf(r);if(i<0){if(t){return u.slice(u.indexOf(r)+1).find((function(e){return n(e)}))}return u.slice(0,u.indexOf(r)).reverse().find((function(e){return n(e)}))}return a[i+(t?1:-1)]}}}));c.tabbableGroups=c.containerGroups.filter((function(e){return e.tabbableNodes.length>0}));if(c.tabbableGroups.length<=0&&!b("fallbackFocus")){throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")}if(c.containerGroups.find((function(e){return e.posTabIndexesFound}))&&c.containerGroups.length>1){throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}};var C=function e(r){if(r===false){return}if(r===m(document)){return}if(!r||!r.focus){C(F());return}r.focus({preventScroll:!!l.preventScroll});c.mostRecentlyFocusedNode=r;if(S(r)){r.select()}};var N=function e(r){var t=b("setReturnFocus",{params:[r]});return t?t:t===false?false:r};var I=function e(r){var t=r.target,u=r.event,o=r.isBackward,f=o===void 0?false:o;t=t||R(u);k();var s=null;if(c.tabbableGroups.length>0){var v=p(t,u);var d=v>=0?c.containerGroups[v]:undefined;if(v<0){if(f){s=c.tabbableGroups[c.tabbableGroups.length-1].lastTabbableNode}else{s=c.tabbableGroups[0].firstTabbableNode}}else if(f){var h=c.tabbableGroups.findIndex((function(e){var r=e.firstTabbableNode;return t===r}));if(h<0&&(d.container===t||a(t,l.tabbableOptions)&&!n(t,l.tabbableOptions)&&!d.nextTabbableNode(t,false))){h=v}if(h>=0){var y=h===0?c.tabbableGroups.length-1:h-1;var w=c.tabbableGroups[y];s=i(t)>=0?w.lastTabbableNode:w.lastDomTabbableNode}else if(!O(u)){s=d.nextTabbableNode(t,false)}}else{var m=c.tabbableGroups.findIndex((function(e){var r=e.lastTabbableNode;return t===r}));if(m<0&&(d.container===t||a(t,l.tabbableOptions)&&!n(t,l.tabbableOptions)&&!d.nextTabbableNode(t))){m=v}if(m>=0){var F=m===c.tabbableGroups.length-1?0:m+1;var j=c.tabbableGroups[F];s=i(t)>=0?j.firstTabbableNode:j.firstDomTabbableNode}else if(!O(u)){s=d.nextTabbableNode(t)}}}else{s=b("fallbackFocus")}return s};var B=function e(r){var t=R(r);if(p(t,r)>=0){return}if(A(l.clickOutsideDeactivates,r)){d.deactivate({returnFocus:l.returnFocusOnDeactivate});return}if(A(l.allowOutsideClick,r)){return}r.preventDefault()};var x=function e(r){var t=R(r);var n=p(t,r)>=0;if(n||t instanceof Document){if(n){c.mostRecentlyFocusedNode=t}}else{r.stopImmediatePropagation();var a;var u=true;if(c.mostRecentlyFocusedNode){if(i(c.mostRecentlyFocusedNode)>0){var o=p(c.mostRecentlyFocusedNode);var f=c.containerGroups[o].tabbableNodes;if(f.length>0){var s=f.findIndex((function(e){return e===c.mostRecentlyFocusedNode}));if(s>=0){if(l.isKeyForward(c.recentNavEvent)){if(s+1<f.length){a=f[s+1];u=false}}else{if(s-1>=0){a=f[s-1];u=false}}}}}else{if(!c.containerGroups.some((function(e){return e.tabbableNodes.some((function(e){return i(e)>0}))}))){u=false}}}else{u=false}if(u){a=I({target:c.mostRecentlyFocusedNode,isBackward:l.isKeyBackward(c.recentNavEvent)})}if(a){C(a)}else{C(c.mostRecentlyFocusedNode||F())}}c.recentNavEvent=undefined};var M=function e(r){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;c.recentNavEvent=r;var n=I({event:r,isBackward:t});if(n){if(O(r)){r.preventDefault()}C(n)}};var U=function e(r){if(l.isKeyForward(r)||l.isKeyBackward(r)){M(r,l.isKeyBackward(r))}};var W=function e(r){if(T(r)&&A(l.escapeDeactivates,r)!==false){r.preventDefault();d.deactivate()}};var K=function e(r){var t=R(r);if(p(t,r)>=0){return}if(A(l.clickOutsideDeactivates,r)){return}if(A(l.allowOutsideClick,r)){return}r.preventDefault();r.stopImmediatePropagation()};var L=function e(){if(!c.active){return}j.activateTrap(s,d);var r;if(l.delayInitialFocus){r=new Promise((function(e){c.delayInitialFocusTimer=g((function(){C(F());e()}))}))}else{C(F())}f.addEventListener("focusin",x,true);f.addEventListener("mousedown",B,{capture:true,passive:false});f.addEventListener("touchstart",B,{capture:true,passive:false});f.addEventListener("click",K,{capture:true,passive:false});f.addEventListener("keydown",U,{capture:true,passive:false});f.addEventListener("keydown",W);return r};var _=function e(r){if(c.active&&!c.paused){d._setSubtreeIsolation(false)}c.adjacentElements.clear();c.alreadySilent.clear();var t=new Set;var n=new Set;var i=v(r),a;try{for(i.s();!(a=i.n()).done;){var u=a.value;t.add(u);var o=typeof ShadowRoot!=="undefined"&&u.getRootNode()instanceof ShadowRoot;var f=u;while(f){t.add(f);var s=f.parentElement;var l=[];if(s){l=s.children}else if(!s&&o){l=f.getRootNode().children;s=f.getRootNode().host;o=typeof ShadowRoot!=="undefined"&&s.getRootNode()instanceof ShadowRoot}var h=v(l),p;try{for(h.s();!(p=h.n()).done;){var b=p.value;n.add(b)}}catch(e){h.e(e)}finally{h.f()}f=s}}}catch(e){i.e(e)}finally{i.f()}t.forEach((function(e){n["delete"](e)}));c.adjacentElements=n};var G=function e(){if(!c.active){return}f.removeEventListener("focusin",x,true);f.removeEventListener("mousedown",B,true);f.removeEventListener("touchstart",B,true);f.removeEventListener("click",K,true);f.removeEventListener("keydown",U,true);f.removeEventListener("keydown",W);return d};var Y=function e(r){var t=c.mostRecentlyFocusedNode;if(!t){return}var n=r.some((function(e){var r=Array.from(e.removedNodes);return r.some((function(e){return e===t||typeof e.contains==="function"&&e.contains(t)}))}));if(n&&c.containers.some((function(e){return e===null||e===void 0?void 0:e.isConnected}))){k();var i=F();C(i)}};var q=typeof window!=="undefined"&&"MutationObserver"in window?new MutationObserver(Y):undefined;var z=function e(){if(!q){return}q.disconnect();if(c.active&&!c.paused){c.containers.map((function(e){q.observe(e,{subtree:true,childList:true})}))}};d={get active(){return c.active},get paused(){return c.paused},activate:function e(r){if(c.active){return this}var t=h(r,"onActivate");var n=h(r,"onPostActivate");var i=h(r,"checkCanFocusTrap");var a=j.getActiveTrap(s);var u=false;if(a&&!a.paused){var o;(o=a._setSubtreeIsolation)===null||o===void 0||o.call(a,false);u=true}try{if(!i){k()}c.active=true;c.paused=false;c.nodeFocusedBeforeActivation=m(f);t===null||t===void 0||t({trap:d});var l=function e(){if(i){k()}var r=function e(){d._setSubtreeIsolation(true);z();n===null||n===void 0||n({trap:d})};var t=L();if(t){t.then(r)}else{r()}};if(i){i(c.containers.concat()).then(l,l);return this}l()}catch(e){if(a===j.getActiveTrap(s)&&u){var v;(v=a._setSubtreeIsolation)===null||v===void 0||v.call(a,true)}throw e}return this},deactivate:function e(r){if(!c.active){return this}var t=y({onDeactivate:l.onDeactivate,onPostDeactivate:l.onPostDeactivate,checkCanReturnFocus:l.checkCanReturnFocus},r);clearTimeout(c.delayInitialFocusTimer);c.delayInitialFocusTimer=undefined;if(!c.paused){d._setSubtreeIsolation(false)}c.alreadySilent.clear();G();c.active=false;c.paused=false;z();j.deactivateTrap(s,d);var n=h(t,"onDeactivate");var i=h(t,"onPostDeactivate");var a=h(t,"checkCanReturnFocus");var u=h(t,"delayReturnFocus");var o=h(t,"returnFocus","returnFocusOnDeactivate");n===null||n===void 0||n({trap:d});var f=function e(){if(o){C(N(c.nodeFocusedBeforeActivation))}i===null||i===void 0||i({trap:d})};var v=function e(){if(u&&o){g(f)}else{f()}};if(o&&a){a(N(c.nodeFocusedBeforeActivation)).then(v,v);return this}v();return this},pause:function e(r){if(!c.active){return this}c.manuallyPaused=true;return this._setPausedState(true,r)},unpause:function e(r){if(!c.active){return this}c.manuallyPaused=false;if(s[s.length-1]!==this){return this}return this._setPausedState(false,r)},updateContainerElements:function e(r){var t=[].concat(r).filter(Boolean);c.containers=t.map((function(e){return typeof e==="string"?f.querySelector(e):e}));if(l.isolateSubtrees){_(c.containers)}if(c.active){k();if(!c.paused){d._setSubtreeIsolation(true)}}z();return this}};Object.defineProperties(d,{_isManuallyPaused:{value:function e(){return c.manuallyPaused}},_setPausedState:{value:function e(r,t){if(c.paused===r){return this}c.paused=r;if(r){var n=h(t,"onPause");var i=h(t,"onPostPause");n===null||n===void 0||n({trap:d});G();d._setSubtreeIsolation(false);z();i===null||i===void 0||i({trap:d})}else{var a=h(t,"onUnpause");var u=h(t,"onPostUnpause");a===null||a===void 0||a({trap:d});var o=function e(){k();var r=function e(){d._setSubtreeIsolation(true);z();u===null||u===void 0||u({trap:d})};var t=L();if(t){t.then(r)}else{r()}};o()}return this}},_setSubtreeIsolation:{value:function e(r){if(l.isolateSubtrees){c.adjacentElements.forEach((function(e){var t;if(r){switch(l.isolateSubtrees){case"aria-hidden":if(e.ariaHidden==="true"||((t=e.getAttribute("aria-hidden"))===null||t===void 0?void 0:t.toLowerCase())==="true"){c.alreadySilent.add(e)}e.setAttribute("aria-hidden","true");break;default:if(e.inert||e.hasAttribute("inert")){c.alreadySilent.add(e)}e.setAttribute("inert",true);break}}else{if(c.alreadySilent.has(e));else{switch(l.isolateSubtrees){case"aria-hidden":e.removeAttribute("aria-hidden");break;default:e.removeAttribute("inert");break}}}}))}}}});d.updateContainerElements(u);return d};class N{constructor(r,t){this.config=t;this.host=r;this.host.addController(this);this.hostElement=e(this.host)}get trapRoot(){var e,r,t;return(t=(r=(e=this.config).getTrapRoot)===null||r===void 0?void 0:r.call(e))!==null&&t!==void 0?t:this.hostElement}getTabbableElements(){if(!this.trapRoot){return[]}if(this.config.tabbableElements){return typeof this.config.tabbableElements==="function"?this.config.tabbableElements():this.config.tabbableElements}return u(this.trapRoot)}focusFirstTrapElement(){var e;(e=this.getTabbableElements()[0])===null||e===void 0?void 0:e.focus()}focusLastTrapElement(){var e;const r=this.getTabbableElements();(e=r[r.length-1])===null||e===void 0?void 0:e.focus()}sync(){if(!this.trapRoot){return}if(!this.focusTrap){this.focusTrap=C(this.trapRoot,Object.assign({allowOutsideClick:true,clickOutsideDeactivates:false,escapeDeactivates:false,returnFocusOnDeactivate:true,initialFocus:()=>{var e;return(e=this.getTabbableElements()[0])!==null&&e!==void 0?e:this.config.fallbackFocus},onPostActivate:()=>this.focusFirstTrapElement(),isKeyForward:()=>false,isKeyBackward:()=>false,document:this.hostElement.ownerDocument},this.config))}if(this.config.isActive()){this.focusTrap.activate();return}this.focusTrap.deactivate()}handleWrapTab(e){if(e.key!==s.TAB||e.altKey||e.ctrlKey||e.metaKey||e.defaultPrevented){return}const r=this.getTabbableElements();if(!r.length){return}const t=f(this.hostElement.ownerDocument);const n=r[0];const i=r[r.length-1];const a=t?o(n,t):false;const u=t?o(i,t):false;if(e.shiftKey&&a){e.preventDefault();this.focusLastTrapElement();return}if(!e.shiftKey&&u){e.preventDefault();this.focusFirstTrapElement()}}deactivate(){var e;(e=this.focusTrap)===null||e===void 0?void 0:e.deactivate()}hostDisconnected(){this.deactivate()}}class I{constructor(){this.controllers=new Set}addController(e){this.controllers.add(e)}removeController(e){this.controllers.delete(e)}connectedCallback(){this.controllers.forEach((e=>{var r;return(r=e.hostConnected)===null||r===void 0?void 0:r.call(e)}))}disconnectedCallback(){this.controllers.forEach((e=>{var r;return(r=e.hostDisconnected)===null||r===void 0?void 0:r.call(e)}))}componentWillLoad(){this.controllers.forEach((e=>{var r;return(r=e.hostWillLoad)===null||r===void 0?void 0:r.call(e)}))}componentDidLoad(){this.controllers.forEach((e=>{var r;return(r=e.hostDidLoad)===null||r===void 0?void 0:r.call(e)}))}componentWillRender(){this.controllers.forEach((e=>{var r;return(r=e.hostWillRender)===null||r===void 0?void 0:r.call(e)}))}componentDidRender(){this.controllers.forEach((e=>{var r;return(r=e.hostDidRender)===null||r===void 0?void 0:r.call(e)}))}componentWillUpdate(){this.controllers.forEach((e=>{var r;return(r=e.hostWillUpdate)===null||r===void 0?void 0:r.call(e)}))}componentDidUpdate(){this.controllers.forEach((e=>{var r;return(r=e.hostDidUpdate)===null||r===void 0?void 0:r.call(e)}))}}export{N as F,I as R};
6
- //# sourceMappingURL=p-BeiZJJuW.js.map
5
+ */function l(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function c(e){if(Array.isArray(e))return l(e)}function v(e,r){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=k(e))||r){t&&(e=t);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:true}:{done:false,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=true,o=false;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return u=e.done,e},e:function(e){o=true,a=e},f:function(){try{u||null==t.return||t.return()}finally{if(o)throw a}}}}function d(e,r,t){return(r=F(r))in e?Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true}):e[r]=t,e}function h(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function y(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?b(Object(t),true).forEach((function(r){d(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function w(e){return c(e)||h(e)||k(e)||p()}function m(e,r){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}function F(e){var r=m(e,"string");return"symbol"==typeof r?r:r+""}function k(e,r){if(e){if("string"==typeof e)return l(e,r);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?l(e,r):void 0}}var j={getActiveTrap:function e(r){if((r===null||r===void 0?void 0:r.length)>0){return r[r.length-1]}return null},activateTrap:function e(r,t){var n=j.getActiveTrap(r);if(t!==n){j.pauseTrap(r)}var i=r.indexOf(t);if(i===-1){r.push(t)}else{r.splice(i,1);r.push(t)}},deactivateTrap:function e(r,t){var n=r.indexOf(t);if(n!==-1){r.splice(n,1)}j.unpauseTrap(r)},pauseTrap:function e(r){var t=j.getActiveTrap(r);t===null||t===void 0||t._setPausedState(true)},unpauseTrap:function e(r){var t=j.getActiveTrap(r);if(t&&!t._isManuallyPaused()){t._setPausedState(false)}}};var S=function e(r){return r.tagName&&r.tagName.toLowerCase()==="input"&&typeof r.select==="function"};var T=function e(r){return(r===null||r===void 0?void 0:r.key)==="Escape"||(r===null||r===void 0?void 0:r.key)==="Esc"||(r===null||r===void 0?void 0:r.keyCode)===27};var O=function e(r){return(r===null||r===void 0?void 0:r.key)==="Tab"||(r===null||r===void 0?void 0:r.keyCode)===9};var D=function e(r){return O(r)&&!r.shiftKey};var E=function e(r){return O(r)&&r.shiftKey};var g=function e(r){return setTimeout(r,0)};var A=function e(r){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++){n[i-1]=arguments[i]}return typeof r==="function"?r.apply(void 0,n):r};var P=function e(r){return r.target.shadowRoot&&typeof r.composedPath==="function"?r.composedPath()[0]:r.target};var R=[];var C=function e(u,o){var f=(o===null||o===void 0?void 0:o.document)||document;var s=(o===null||o===void 0?void 0:o.trapStack)||R;var l=y({returnFocusOnDeactivate:true,escapeDeactivates:true,delayInitialFocus:true,delayReturnFocus:true,isolateSubtrees:false,isKeyForward:D,isKeyBackward:E},o);var c={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:false,paused:false,manuallyPaused:false,delayInitialFocusTimer:undefined,recentNavEvent:undefined};var d;var h=function e(r,t,n){return r&&r[t]!==undefined?r[t]:l[n||t]};var p=function e(r,t){var n=typeof(t===null||t===void 0?void 0:t.composedPath)==="function"?t.composedPath():undefined;return c.containerGroups.findIndex((function(e){var t=e.container,i=e.tabbableNodes;return t.contains(r)||(n===null||n===void 0?void 0:n.includes(t))||i.find((function(e){return e===r}))}))};var b=function e(r){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=t.hasFallback,i=n===void 0?false:n,a=t.params,u=a===void 0?[]:a;var o=l[r];if(typeof o==="function"){o=o.apply(void 0,w(u))}if(o===true){o=undefined}if(!o){if(o===undefined||o===false){return o}throw new Error("`".concat(r,"` was specified but was not a node, or did not return a node"))}var s=o;if(typeof o==="string"){try{s=f.querySelector(o)}catch(e){throw new Error("`".concat(r,'` appears to be an invalid selector; error="').concat(e.message,'"'))}if(!s){if(!i){throw new Error("`".concat(r,"` as selector refers to no known node"))}}}return s};var m=function e(r){var t=r.activeElement;if(!t){return null}if(t.shadowRoot&&t.shadowRoot.activeElement!==null){return m(t.shadowRoot)}return t};var F=function e(){var r=b("initialFocus",{hasFallback:true});if(r===false){return false}if(r===undefined||r&&!a(r,l.tabbableOptions)){var t=m(f);if(p(t)>=0){r=t}else{var n=c.tabbableGroups[0];var i=n&&n.firstTabbableNode;r=i||b("fallbackFocus")}}else if(r===null){r=b("fallbackFocus")}if(!r){throw new Error("Your focus-trap needs to have at least one focusable element")}return r};var k=function e(){c.containerGroups=c.containers.map((function(e){var a=r(e,l.tabbableOptions);var u=t(e,l.tabbableOptions);var o=a.length>0?a[0]:undefined;var f=a.length>0?a[a.length-1]:undefined;var s=u.find((function(e){return n(e)}));var c=u.slice().reverse().find((function(e){return n(e)}));var v=!!a.find((function(e){return i(e)>0}));return{container:e,tabbableNodes:a,focusableNodes:u,posTabIndexesFound:v,firstTabbableNode:o,lastTabbableNode:f,firstDomTabbableNode:s,lastDomTabbableNode:c,nextTabbableNode:function e(r){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var i=a.indexOf(r);if(i<0){if(t){return u.slice(u.indexOf(r)+1).find((function(e){return n(e)}))}return u.slice(0,u.indexOf(r)).reverse().find((function(e){return n(e)}))}return a[i+(t?1:-1)]}}}));c.tabbableGroups=c.containerGroups.filter((function(e){return e.tabbableNodes.length>0}));if(c.tabbableGroups.length<=0&&!b("fallbackFocus")){throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")}if(c.containerGroups.find((function(e){return e.posTabIndexesFound}))&&c.containerGroups.length>1){throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}};var C=function e(r){if(r===false){return}if(r===m(document)){return}if(!r||!r.focus){C(F());return}r.focus({preventScroll:!!l.preventScroll});c.mostRecentlyFocusedNode=r;if(S(r)){r.select()}};var N=function e(r){var t=b("setReturnFocus",{params:[r]});return t?t:t===false?false:r};var I=function e(r){var t=r.target,u=r.event,o=r.isBackward,f=o===void 0?false:o;t=t||P(u);k();var s=null;if(c.tabbableGroups.length>0){var v=p(t,u);var d=v>=0?c.containerGroups[v]:undefined;if(v<0){if(f){s=c.tabbableGroups[c.tabbableGroups.length-1].lastTabbableNode}else{s=c.tabbableGroups[0].firstTabbableNode}}else if(f){var h=c.tabbableGroups.findIndex((function(e){var r=e.firstTabbableNode;return t===r}));if(h<0&&(d.container===t||a(t,l.tabbableOptions)&&!n(t,l.tabbableOptions)&&!d.nextTabbableNode(t,false))){h=v}if(h>=0){var y=h===0?c.tabbableGroups.length-1:h-1;var w=c.tabbableGroups[y];s=i(t)>=0?w.lastTabbableNode:w.lastDomTabbableNode}else if(!O(u)){s=d.nextTabbableNode(t,false)}}else{var m=c.tabbableGroups.findIndex((function(e){var r=e.lastTabbableNode;return t===r}));if(m<0&&(d.container===t||a(t,l.tabbableOptions)&&!n(t,l.tabbableOptions)&&!d.nextTabbableNode(t))){m=v}if(m>=0){var F=m===c.tabbableGroups.length-1?0:m+1;var j=c.tabbableGroups[F];s=i(t)>=0?j.firstTabbableNode:j.firstDomTabbableNode}else if(!O(u)){s=d.nextTabbableNode(t)}}}else{s=b("fallbackFocus")}return s};var B=function e(r){var t=P(r);if(p(t,r)>=0){return}if(A(l.clickOutsideDeactivates,r)){d.deactivate({returnFocus:l.returnFocusOnDeactivate});return}if(A(l.allowOutsideClick,r)){return}r.preventDefault()};var x=function e(r){var t=P(r);var n=p(t,r)>=0;if(n||t instanceof Document){if(n){c.mostRecentlyFocusedNode=t}}else{r.stopImmediatePropagation();var a;var u=true;if(c.mostRecentlyFocusedNode){if(i(c.mostRecentlyFocusedNode)>0){var o=p(c.mostRecentlyFocusedNode);var f=c.containerGroups[o].tabbableNodes;if(f.length>0){var s=f.findIndex((function(e){return e===c.mostRecentlyFocusedNode}));if(s>=0){if(l.isKeyForward(c.recentNavEvent)){if(s+1<f.length){a=f[s+1];u=false}}else{if(s-1>=0){a=f[s-1];u=false}}}}}else{if(!c.containerGroups.some((function(e){return e.tabbableNodes.some((function(e){return i(e)>0}))}))){u=false}}}else{u=false}if(u){a=I({target:c.mostRecentlyFocusedNode,isBackward:l.isKeyBackward(c.recentNavEvent)})}if(a){C(a)}else{C(c.mostRecentlyFocusedNode||F())}}c.recentNavEvent=undefined};var U=function e(r){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;c.recentNavEvent=r;var n=I({event:r,isBackward:t});if(n){if(O(r)){r.preventDefault()}C(n)}};var W=function e(r){if(l.isKeyForward(r)||l.isKeyBackward(r)){U(r,l.isKeyBackward(r))}};var K=function e(r){if(T(r)&&A(l.escapeDeactivates,r)!==false){r.preventDefault();d.deactivate()}};var L=function e(r){var t=P(r);if(p(t,r)>=0){return}if(A(l.clickOutsideDeactivates,r)){return}if(A(l.allowOutsideClick,r)){return}r.preventDefault();r.stopImmediatePropagation()};var M=function e(){if(!c.active){return}j.activateTrap(s,d);var r;if(l.delayInitialFocus){r=new Promise((function(e){c.delayInitialFocusTimer=g((function(){C(F());e()}))}))}else{C(F())}f.addEventListener("focusin",x,true);f.addEventListener("mousedown",B,{capture:true,passive:false});f.addEventListener("touchstart",B,{capture:true,passive:false});f.addEventListener("click",L,{capture:true,passive:false});f.addEventListener("keydown",W,{capture:true,passive:false});f.addEventListener("keydown",K);return r};var _=function e(r){if(c.active&&!c.paused){d._setSubtreeIsolation(false)}c.adjacentElements.clear();c.alreadySilent.clear();var t=new Set;var n=new Set;var i=v(r),a;try{for(i.s();!(a=i.n()).done;){var u=a.value;t.add(u);var o=typeof ShadowRoot!=="undefined"&&u.getRootNode()instanceof ShadowRoot;var f=u;while(f){t.add(f);var s=f.parentElement;var l=[];if(s){l=s.children}else if(!s&&o){l=f.getRootNode().children;s=f.getRootNode().host;o=typeof ShadowRoot!=="undefined"&&s.getRootNode()instanceof ShadowRoot}var h=v(l),p;try{for(h.s();!(p=h.n()).done;){var b=p.value;n.add(b)}}catch(e){h.e(e)}finally{h.f()}f=s}}}catch(e){i.e(e)}finally{i.f()}t.forEach((function(e){n["delete"](e)}));c.adjacentElements=n};var Y=function e(){if(!c.active){return}f.removeEventListener("focusin",x,true);f.removeEventListener("mousedown",B,true);f.removeEventListener("touchstart",B,true);f.removeEventListener("click",L,true);f.removeEventListener("keydown",W,true);f.removeEventListener("keydown",K);return d};var G=function e(r){var t=c.mostRecentlyFocusedNode;if(!t){return}var n=r.some((function(e){var r=Array.from(e.removedNodes);return r.some((function(e){return e===t||typeof e.contains==="function"&&e.contains(t)}))}));if(n&&c.containers.some((function(e){return e===null||e===void 0?void 0:e.isConnected}))){k();var i=F();C(i)}};var q=typeof window!=="undefined"&&"MutationObserver"in window?new MutationObserver(G):undefined;var Q=function e(){if(!q){return}q.disconnect();if(c.active&&!c.paused){c.containers.map((function(e){q.observe(e,{subtree:true,childList:true})}))}};d={get active(){return c.active},get paused(){return c.paused},activate:function e(r){if(c.active){return this}var t=h(r,"onActivate");var n=h(r,"onPostActivate");var i=h(r,"checkCanFocusTrap");var a=j.getActiveTrap(s);var u=false;if(a&&!a.paused){var o;(o=a._setSubtreeIsolation)===null||o===void 0||o.call(a,false);u=true}try{if(!i){k()}c.active=true;c.paused=false;c.nodeFocusedBeforeActivation=m(f);t===null||t===void 0||t({trap:d});var l=function e(){if(i){k()}var r=function e(){d._setSubtreeIsolation(true);Q();n===null||n===void 0||n({trap:d})};var t=M();if(t){t.then(r)}else{r()}};if(i){i(c.containers.concat()).then(l,l);return this}l()}catch(e){if(a===j.getActiveTrap(s)&&u){var v;(v=a._setSubtreeIsolation)===null||v===void 0||v.call(a,true)}throw e}return this},deactivate:function e(r){if(!c.active){return this}var t=y({onDeactivate:l.onDeactivate,onPostDeactivate:l.onPostDeactivate,checkCanReturnFocus:l.checkCanReturnFocus},r);clearTimeout(c.delayInitialFocusTimer);c.delayInitialFocusTimer=undefined;if(!c.paused){d._setSubtreeIsolation(false)}c.alreadySilent.clear();Y();c.active=false;c.paused=false;Q();j.deactivateTrap(s,d);var n=h(t,"onDeactivate");var i=h(t,"onPostDeactivate");var a=h(t,"checkCanReturnFocus");var u=h(t,"delayReturnFocus");var o=h(t,"returnFocus","returnFocusOnDeactivate");n===null||n===void 0||n({trap:d});var f=function e(){if(o){C(N(c.nodeFocusedBeforeActivation))}i===null||i===void 0||i({trap:d})};var v=function e(){if(u&&o){g(f)}else{f()}};if(o&&a){a(N(c.nodeFocusedBeforeActivation)).then(v,v);return this}v();return this},pause:function e(r){if(!c.active){return this}c.manuallyPaused=true;return this._setPausedState(true,r)},unpause:function e(r){if(!c.active){return this}c.manuallyPaused=false;if(s[s.length-1]!==this){return this}return this._setPausedState(false,r)},updateContainerElements:function e(r){var t=[].concat(r).filter(Boolean);c.containers=t.map((function(e){return typeof e==="string"?f.querySelector(e):e}));if(l.isolateSubtrees){_(c.containers)}if(c.active){k();if(!c.paused){d._setSubtreeIsolation(true)}}Q();return this}};Object.defineProperties(d,{_isManuallyPaused:{value:function e(){return c.manuallyPaused}},_setPausedState:{value:function e(r,t){if(c.paused===r){return this}c.paused=r;if(r){var n=h(t,"onPause");var i=h(t,"onPostPause");n===null||n===void 0||n({trap:d});Y();d._setSubtreeIsolation(false);Q();i===null||i===void 0||i({trap:d})}else{var a=h(t,"onUnpause");var u=h(t,"onPostUnpause");a===null||a===void 0||a({trap:d});var o=function e(){k();var r=function e(){d._setSubtreeIsolation(true);Q();u===null||u===void 0||u({trap:d})};var t=M();if(t){t.then(r)}else{r()}};o()}return this}},_setSubtreeIsolation:{value:function e(r){if(l.isolateSubtrees){c.adjacentElements.forEach((function(e){var t;if(r){switch(l.isolateSubtrees){case"aria-hidden":if(e.ariaHidden==="true"||((t=e.getAttribute("aria-hidden"))===null||t===void 0?void 0:t.toLowerCase())==="true"){c.alreadySilent.add(e)}e.setAttribute("aria-hidden","true");break;default:if(e.inert||e.hasAttribute("inert")){c.alreadySilent.add(e)}e.setAttribute("inert",true);break}}else{if(c.alreadySilent.has(e));else{switch(l.isolateSubtrees){case"aria-hidden":e.removeAttribute("aria-hidden");break;default:e.removeAttribute("inert");break}}}}))}}}});d.updateContainerElements(u);return d};class N{constructor(r,t){this.config=t;this.host=r;this.host.addController(this);this.hostElement=e(this.host)}get trapRoot(){var e,r,t;return(t=(r=(e=this.config).getTrapRoot)===null||r===void 0?void 0:r.call(e))!==null&&t!==void 0?t:this.hostElement}getTabbableElements(){if(!this.trapRoot){return[]}if(this.config.tabbableElements){return typeof this.config.tabbableElements==="function"?this.config.tabbableElements():this.config.tabbableElements}return u(this.trapRoot)}focusFirstTrapElement(){var e;(e=this.getTabbableElements()[0])===null||e===void 0?void 0:e.focus()}focusLastTrapElement(){var e;const r=this.getTabbableElements();(e=r[r.length-1])===null||e===void 0?void 0:e.focus()}sync(){if(!this.trapRoot){return}if(!this.focusTrap){this.focusTrap=C(this.trapRoot,Object.assign({allowOutsideClick:true,clickOutsideDeactivates:false,escapeDeactivates:false,returnFocusOnDeactivate:true,initialFocus:()=>{var e;return(e=this.getTabbableElements()[0])!==null&&e!==void 0?e:this.config.fallbackFocus},onPostActivate:()=>this.focusFirstTrapElement(),isKeyForward:()=>false,isKeyBackward:()=>false,document:this.hostElement.ownerDocument},this.config))}if(this.config.isActive()){this.focusTrap.activate();return}this.focusTrap.deactivate()}handleWrapTab(e){if(e.key!==s.TAB||e.altKey||e.ctrlKey||e.metaKey||e.defaultPrevented){return}const r=this.getTabbableElements();if(!r.length){return}const t=f(this.hostElement.ownerDocument);const n=r[0];const i=r[r.length-1];const a=t?o(n,t):false;const u=t?o(i,t):false;if(e.shiftKey&&a){e.preventDefault();this.focusLastTrapElement();return}if(!e.shiftKey&&u){e.preventDefault();this.focusFirstTrapElement()}}deactivate(){var e;(e=this.focusTrap)===null||e===void 0?void 0:e.deactivate()}hostDisconnected(){this.deactivate()}}class I{constructor(){this.controllers=new Set}addController(e){this.controllers.add(e)}removeController(e){this.controllers.delete(e)}connectedCallback(){this.controllers.forEach((e=>{var r;return(r=e.hostConnected)===null||r===void 0?void 0:r.call(e)}))}disconnectedCallback(){this.controllers.forEach((e=>{var r;return(r=e.hostDisconnected)===null||r===void 0?void 0:r.call(e)}))}componentWillLoad(){this.controllers.forEach((e=>{var r;return(r=e.hostWillLoad)===null||r===void 0?void 0:r.call(e)}))}componentDidLoad(){this.controllers.forEach((e=>{var r;return(r=e.hostDidLoad)===null||r===void 0?void 0:r.call(e)}))}componentWillRender(){this.controllers.forEach((e=>{var r;return(r=e.hostWillRender)===null||r===void 0?void 0:r.call(e)}))}componentDidRender(){this.controllers.forEach((e=>{var r;return(r=e.hostDidRender)===null||r===void 0?void 0:r.call(e)}))}componentWillUpdate(){this.controllers.forEach((e=>{var r;return(r=e.hostWillUpdate)===null||r===void 0?void 0:r.call(e)}))}componentDidUpdate(){this.controllers.forEach((e=>{var r;return(r=e.hostDidUpdate)===null||r===void 0?void 0:r.call(e)}))}}export{N as F,I as R};
6
+ //# sourceMappingURL=p-ip3tTfYi.js.map