@zanichelli/albe-web-components 12.6.1-rc1 → 13.0.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 (619) hide show
  1. package/CHANGELOG.md +2939 -0
  2. package/dist/cjs/index-dc60bee7.js +10 -58
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{utils-9573c34a.js → utils-2b313a8e.js} +1 -1
  5. package/dist/cjs/{utils-9573c34a.js.map → utils-2b313a8e.js.map} +1 -1
  6. package/dist/cjs/web-components-library.cjs.js +1 -1
  7. package/dist/cjs/z-alert.cjs.entry.js +1 -1
  8. package/dist/{esm/icons-f212e30c.js → cjs/z-app-header_12.cjs.entry.js} +1019 -2
  9. package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -0
  10. package/dist/cjs/z-cover-hero.cjs.entry.js +2 -2
  11. package/dist/cjs/z-date-picker.cjs.entry.js +1 -1
  12. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +1024 -0
  13. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js.map +1 -0
  14. package/dist/cjs/z-file-upload.cjs.entry.js +194 -0
  15. package/dist/cjs/z-file-upload.cjs.entry.js.map +1 -0
  16. package/dist/cjs/z-ghost-loading.cjs.entry.js +1 -1
  17. package/dist/cjs/z-info-reveal.cjs.entry.js +1 -1
  18. package/dist/cjs/z-link.cjs.entry.js +1 -1
  19. package/dist/cjs/z-messages-pocket.cjs.entry.js +1 -1
  20. package/dist/cjs/z-myz-card-alert.cjs.entry.js +1 -1
  21. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
  22. package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +1 -1
  23. package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -1
  24. package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
  25. package/dist/cjs/z-myz-card-info.cjs.entry.js +1 -1
  26. package/dist/cjs/z-myz-card-list.cjs.entry.js +1 -1
  27. package/dist/cjs/z-myz-card_4.cjs.entry.js +4 -4
  28. package/dist/cjs/z-myz-list.cjs.entry.js +1 -1
  29. package/dist/cjs/z-otp.cjs.entry.js +2 -2
  30. package/dist/cjs/z-pocket-message.cjs.entry.js +1 -1
  31. package/dist/cjs/z-pocket_3.cjs.entry.js +3 -3
  32. package/dist/cjs/z-popover.cjs.entry.js +1 -1
  33. package/dist/cjs/z-range-picker.cjs.entry.js +1 -1
  34. package/dist/cjs/z-section-title.cjs.entry.js +1 -1
  35. package/dist/cjs/z-skip-to-content.cjs.entry.js +1 -1
  36. package/dist/cjs/z-visually-hidden.cjs.entry.js +1 -1
  37. package/dist/collection/collection-manifest.json +0 -14
  38. package/dist/collection/components/file-upload/z-file-upload/index.js +1 -23
  39. package/dist/collection/components/file-upload/z-file-upload/index.js.map +1 -1
  40. package/dist/collection/components/inputs/z-searchbar/index.js +3 -1
  41. package/dist/collection/components/inputs/z-searchbar/index.js.map +1 -1
  42. package/dist/collection/components/inputs/z-searchbar/styles.css +5 -2
  43. package/dist/collection/components/list/z-list-element/index.js +1 -26
  44. package/dist/collection/components/list/z-list-element/index.js.map +1 -1
  45. package/dist/collection/components/list/z-list-element/styles.css +12 -37
  46. package/dist/collection/components/z-cover-hero/index.js +2 -2
  47. package/dist/collection/components/z-divider/index.js +1 -1
  48. package/dist/collection/components/z-ghost-loading/index.js +1 -1
  49. package/dist/collection/components/z-info-reveal/index.js +1 -1
  50. package/dist/collection/components/z-offcanvas/index.js +1 -1
  51. package/dist/collection/components/z-offcanvas/styles.css +1 -1
  52. package/dist/collection/components/z-popover/index.js +1 -1
  53. package/dist/collection/components/z-section-title/index.js +1 -1
  54. package/dist/collection/components/z-skip-to-content/index.js +1 -1
  55. package/dist/collection/components/z-tag/index.js +2 -2
  56. package/dist/collection/components/z-visually-hidden/index.js +1 -1
  57. package/dist/collection/deprecated/z-link/index.js +1 -1
  58. package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +1 -1
  59. package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +1 -1
  60. package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +1 -1
  61. package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +1 -1
  62. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
  63. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -1
  64. package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +1 -1
  65. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
  66. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +1 -1
  67. package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
  68. package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
  69. package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
  70. package/dist/collection/snowflakes/myz/pocket/z-messages-pocket/index.js +1 -1
  71. package/dist/collection/snowflakes/myz/pocket/z-pocket/index.js +1 -1
  72. package/dist/collection/snowflakes/myz/pocket/z-pocket-body/index.js +1 -1
  73. package/dist/collection/snowflakes/myz/pocket/z-pocket-header/index.js +1 -1
  74. package/dist/collection/snowflakes/myz/pocket/z-pocket-message/index.js +1 -1
  75. package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
  76. package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
  77. package/dist/components/index.d.ts +0 -28
  78. package/dist/components/index.js +0 -14
  79. package/dist/components/index.js.map +1 -1
  80. package/dist/components/index13.js +2 -10
  81. package/dist/components/index13.js.map +1 -1
  82. package/dist/components/index16.js +1 -1
  83. package/dist/components/index17.js +1 -1
  84. package/dist/components/index18.js +1 -1
  85. package/dist/components/index19.js +1 -1
  86. package/dist/components/index21.js +2 -2
  87. package/dist/components/index21.js.map +1 -1
  88. package/dist/components/index22.js +1 -1
  89. package/dist/components/index23.js +1 -1
  90. package/dist/components/index24.js +1 -1
  91. package/dist/components/index25.js +1 -1
  92. package/dist/components/index26.js +3 -3
  93. package/dist/components/index26.js.map +1 -1
  94. package/dist/components/index27.js +17 -37
  95. package/dist/components/index27.js.map +1 -1
  96. package/dist/components/index3.js +1 -1
  97. package/dist/components/index6.js +1 -1
  98. package/dist/components/index8.js +1 -1
  99. package/dist/components/z-app-header.js +1 -1
  100. package/dist/components/z-cover-hero.js +2 -2
  101. package/dist/components/z-file-upload.js +1 -6
  102. package/dist/components/z-file-upload.js.map +1 -1
  103. package/dist/components/z-info-reveal.js +1 -1
  104. package/dist/components/z-link.js +1 -1
  105. package/dist/components/z-messages-pocket.js +1 -1
  106. package/dist/components/z-myz-card-alert.js +1 -1
  107. package/dist/components/z-myz-card-dictionary.js +1 -1
  108. package/dist/components/z-myz-card-footer-sections.js +1 -1
  109. package/dist/components/z-myz-card-footer.js +1 -1
  110. package/dist/components/z-myz-card-icon.js +1 -1
  111. package/dist/components/z-myz-card-info.js +1 -1
  112. package/dist/components/z-myz-card-list.js +1 -1
  113. package/dist/components/z-myz-list.js +1 -1
  114. package/dist/components/z-otp.js +2 -2
  115. package/dist/components/z-pocket-message.js +1 -1
  116. package/dist/components/z-section-title.js +1 -1
  117. package/dist/components/z-skip-to-content.js +1 -1
  118. package/dist/components/z-tag.js +1 -1
  119. package/dist/components/z-visually-hidden.js +1 -1
  120. package/dist/esm/index-f16bc2ca.js +10 -58
  121. package/dist/esm/loader.js +1 -1
  122. package/dist/esm/{utils-d29ea23d.js → utils-cd008fbc.js} +1 -1
  123. package/dist/esm/{utils-d29ea23d.js.map → utils-cd008fbc.js.map} +1 -1
  124. package/dist/esm/web-components-library.js +1 -1
  125. package/dist/esm/z-alert.entry.js +1 -1
  126. package/dist/{cjs/icons-be077181.js → esm/z-app-header_12.entry.js} +1003 -3
  127. package/dist/esm/z-app-header_12.entry.js.map +1 -0
  128. package/dist/esm/z-cover-hero.entry.js +2 -2
  129. package/dist/esm/z-date-picker.entry.js +1 -1
  130. package/dist/esm/z-dragdrop-area_2.entry.js +1019 -0
  131. package/dist/esm/z-dragdrop-area_2.entry.js.map +1 -0
  132. package/dist/esm/z-file-upload.entry.js +190 -0
  133. package/dist/esm/z-file-upload.entry.js.map +1 -0
  134. package/dist/esm/z-ghost-loading.entry.js +1 -1
  135. package/dist/esm/z-info-reveal.entry.js +1 -1
  136. package/dist/esm/z-link.entry.js +1 -1
  137. package/dist/esm/z-messages-pocket.entry.js +1 -1
  138. package/dist/esm/z-myz-card-alert.entry.js +1 -1
  139. package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
  140. package/dist/esm/z-myz-card-footer-sections.entry.js +1 -1
  141. package/dist/esm/z-myz-card-footer.entry.js +1 -1
  142. package/dist/esm/z-myz-card-icon.entry.js +1 -1
  143. package/dist/esm/z-myz-card-info.entry.js +1 -1
  144. package/dist/esm/z-myz-card-list.entry.js +1 -1
  145. package/dist/esm/z-myz-card_4.entry.js +4 -4
  146. package/dist/esm/z-myz-list.entry.js +1 -1
  147. package/dist/esm/z-otp.entry.js +2 -2
  148. package/dist/esm/z-pocket-message.entry.js +1 -1
  149. package/dist/esm/z-pocket_3.entry.js +3 -3
  150. package/dist/esm/z-popover.entry.js +1 -1
  151. package/dist/esm/z-range-picker.entry.js +1 -1
  152. package/dist/esm/z-section-title.entry.js +1 -1
  153. package/dist/esm/z-skip-to-content.entry.js +1 -1
  154. package/dist/esm/z-visually-hidden.entry.js +1 -1
  155. package/dist/types/components/file-upload/z-file-upload/index.d.ts +0 -2
  156. package/dist/types/components/inputs/z-searchbar/index.d.ts +2 -0
  157. package/dist/types/components/list/z-list-element/index.d.ts +0 -5
  158. package/dist/types/components.d.ts +10 -893
  159. package/dist/web-components-library/{p-6d0bb567.entry.js → p-00d7315a.entry.js} +2 -2
  160. package/dist/web-components-library/{p-10c29fb4.entry.js → p-04755b76.entry.js} +2 -2
  161. package/dist/web-components-library/{p-7d4cd2e8.entry.js → p-05b39597.entry.js} +2 -2
  162. package/dist/web-components-library/{p-5a174821.entry.js → p-0d799f83.entry.js} +2 -2
  163. package/dist/web-components-library/{p-83657b33.entry.js → p-120a809e.entry.js} +2 -2
  164. package/dist/web-components-library/{p-fa4a2862.entry.js → p-239fb968.entry.js} +2 -2
  165. package/dist/web-components-library/{p-378b2bbf.entry.js → p-24ab494d.entry.js} +2 -2
  166. package/dist/web-components-library/{p-f97c093d.entry.js → p-2637ab23.entry.js} +2 -2
  167. package/{www/build/p-af78542a.js → dist/web-components-library/p-49a35cf0.js} +1 -1
  168. package/dist/web-components-library/p-4c40561d.entry.js +2 -0
  169. package/dist/web-components-library/p-5023f7d5.entry.js +2 -0
  170. package/dist/web-components-library/p-5023f7d5.entry.js.map +1 -0
  171. package/dist/web-components-library/p-52fa5f80.entry.js +2 -0
  172. package/dist/web-components-library/p-52fa5f80.entry.js.map +1 -0
  173. package/dist/web-components-library/p-5d67d311.entry.js +2 -0
  174. package/dist/web-components-library/{p-ae71256f.entry.js → p-5eb0a064.entry.js} +2 -2
  175. package/dist/web-components-library/{p-2f72475d.entry.js → p-6edd5dbe.entry.js} +2 -2
  176. package/dist/web-components-library/{p-402bd7f6.entry.js → p-8d81a5c8.entry.js} +2 -2
  177. package/dist/web-components-library/p-91a7c5a9.entry.js +2 -0
  178. package/dist/web-components-library/p-91a7c5a9.entry.js.map +1 -0
  179. package/dist/web-components-library/{p-210fbe0f.entry.js → p-942e5126.entry.js} +2 -2
  180. package/{www/build/p-af27423a.entry.js → dist/web-components-library/p-95104b91.entry.js} +2 -2
  181. package/dist/web-components-library/{p-9e71d6b3.entry.js → p-996c1471.entry.js} +2 -2
  182. package/{www/build/p-bb8037c4.entry.js → dist/web-components-library/p-a53ab86e.entry.js} +2 -2
  183. package/dist/web-components-library/{p-ac497c80.entry.js → p-b57362ef.entry.js} +2 -2
  184. package/dist/web-components-library/{p-97bba1f2.entry.js → p-b670ffa5.entry.js} +2 -2
  185. package/dist/web-components-library/{p-38c63f28.entry.js → p-d1f8ca38.entry.js} +2 -2
  186. package/dist/web-components-library/{p-9882e8a5.entry.js → p-d251f105.entry.js} +2 -2
  187. package/dist/web-components-library/{p-e3e48e64.entry.js → p-d92765b6.entry.js} +2 -2
  188. package/dist/web-components-library/{p-5d220bbc.entry.js → p-dbc437d8.entry.js} +2 -2
  189. package/{www/build/p-d83dfde7.entry.js → dist/web-components-library/p-fe6f5926.entry.js} +2 -2
  190. package/dist/web-components-library/web-components-library.esm.js +1 -1
  191. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  192. package/package.json +1 -1
  193. package/react/components.d.ts +0 -14
  194. package/react/components.js +2 -16
  195. package/react/components.js.map +1 -1
  196. package/src-react/index.ts +1 -0
  197. package/www/build/{p-6d0bb567.entry.js → p-00d7315a.entry.js} +2 -2
  198. package/www/build/{p-10c29fb4.entry.js → p-04755b76.entry.js} +2 -2
  199. package/www/build/{p-7d4cd2e8.entry.js → p-05b39597.entry.js} +2 -2
  200. package/www/build/{p-5a174821.entry.js → p-0d799f83.entry.js} +2 -2
  201. package/www/build/{p-83657b33.entry.js → p-120a809e.entry.js} +2 -2
  202. package/www/build/{p-fa4a2862.entry.js → p-239fb968.entry.js} +2 -2
  203. package/www/build/{p-378b2bbf.entry.js → p-24ab494d.entry.js} +2 -2
  204. package/www/build/{p-f97c093d.entry.js → p-2637ab23.entry.js} +2 -2
  205. package/{dist/web-components-library/p-af78542a.js → www/build/p-49a35cf0.js} +1 -1
  206. package/www/build/p-4c40561d.entry.js +2 -0
  207. package/www/build/p-5023f7d5.entry.js +2 -0
  208. package/www/build/p-5023f7d5.entry.js.map +1 -0
  209. package/www/build/p-52fa5f80.entry.js +2 -0
  210. package/www/build/p-52fa5f80.entry.js.map +1 -0
  211. package/www/build/p-56810079.js +2 -0
  212. package/www/build/p-5d67d311.entry.js +2 -0
  213. package/www/build/{p-ae71256f.entry.js → p-5eb0a064.entry.js} +2 -2
  214. package/www/build/{p-2f72475d.entry.js → p-6edd5dbe.entry.js} +2 -2
  215. package/www/build/{p-402bd7f6.entry.js → p-8d81a5c8.entry.js} +2 -2
  216. package/www/build/p-91a7c5a9.entry.js +2 -0
  217. package/www/build/p-91a7c5a9.entry.js.map +1 -0
  218. package/www/build/{p-210fbe0f.entry.js → p-942e5126.entry.js} +2 -2
  219. package/{dist/web-components-library/p-af27423a.entry.js → www/build/p-95104b91.entry.js} +2 -2
  220. package/www/build/{p-9e71d6b3.entry.js → p-996c1471.entry.js} +2 -2
  221. package/{dist/web-components-library/p-bb8037c4.entry.js → www/build/p-a53ab86e.entry.js} +2 -2
  222. package/www/build/{p-ac497c80.entry.js → p-b57362ef.entry.js} +2 -2
  223. package/www/build/{p-97bba1f2.entry.js → p-b670ffa5.entry.js} +2 -2
  224. package/www/build/{p-38c63f28.entry.js → p-d1f8ca38.entry.js} +2 -2
  225. package/www/build/{p-9882e8a5.entry.js → p-d251f105.entry.js} +2 -2
  226. package/www/build/{p-e3e48e64.entry.js → p-d92765b6.entry.js} +2 -2
  227. package/www/build/{p-5d220bbc.entry.js → p-dbc437d8.entry.js} +2 -2
  228. package/{dist/web-components-library/p-d83dfde7.entry.js → www/build/p-fe6f5926.entry.js} +2 -2
  229. package/www/build/web-components-library.esm.js +1 -1
  230. package/www/build/web-components-library.esm.js.map +1 -1
  231. package/www/index.html +1 -1
  232. package/dist/cjs/icons-be077181.js.map +0 -1
  233. package/dist/cjs/index-0a7baee3.js +0 -24
  234. package/dist/cjs/index-0a7baee3.js.map +0 -1
  235. package/dist/cjs/index-37180b8d.js +0 -24
  236. package/dist/cjs/index-37180b8d.js.map +0 -1
  237. package/dist/cjs/index-4468a6b7.js +0 -24
  238. package/dist/cjs/index-4468a6b7.js.map +0 -1
  239. package/dist/cjs/index-715aa3be.js +0 -21
  240. package/dist/cjs/index-715aa3be.js.map +0 -1
  241. package/dist/cjs/index-7a1c32d4.js +0 -30
  242. package/dist/cjs/index-7a1c32d4.js.map +0 -1
  243. package/dist/cjs/index-7f3e61f0.js +0 -82
  244. package/dist/cjs/index-7f3e61f0.js.map +0 -1
  245. package/dist/cjs/index-96c2bc8f.js +0 -25
  246. package/dist/cjs/index-96c2bc8f.js.map +0 -1
  247. package/dist/cjs/index-a30259f3.js +0 -37
  248. package/dist/cjs/index-a30259f3.js.map +0 -1
  249. package/dist/cjs/index-a7aedd7c.js +0 -20
  250. package/dist/cjs/index-a7aedd7c.js.map +0 -1
  251. package/dist/cjs/index-d669dfd0.js +0 -43
  252. package/dist/cjs/index-d669dfd0.js.map +0 -1
  253. package/dist/cjs/z-app-header_15.cjs.entry.js +0 -2230
  254. package/dist/cjs/z-app-header_15.cjs.entry.js.map +0 -1
  255. package/dist/cjs/z-contextual-menu.cjs.entry.js +0 -44
  256. package/dist/cjs/z-contextual-menu.cjs.entry.js.map +0 -1
  257. package/dist/cjs/z-navigation-tab-link.cjs.entry.js +0 -72
  258. package/dist/cjs/z-navigation-tab-link.cjs.entry.js.map +0 -1
  259. package/dist/cjs/z-navigation-tab.cjs.entry.js +0 -69
  260. package/dist/cjs/z-navigation-tab.cjs.entry.js.map +0 -1
  261. package/dist/cjs/z-table-body.cjs.entry.js +0 -12
  262. package/dist/cjs/z-table-body.cjs.entry.js.map +0 -1
  263. package/dist/cjs/z-table-cell.cjs.entry.js +0 -13
  264. package/dist/cjs/z-table-cell.cjs.entry.js.map +0 -1
  265. package/dist/cjs/z-table-deprecated.cjs.entry.js +0 -92
  266. package/dist/cjs/z-table-deprecated.cjs.entry.js.map +0 -1
  267. package/dist/cjs/z-table-empty-box.cjs.entry.js +0 -12
  268. package/dist/cjs/z-table-empty-box.cjs.entry.js.map +0 -1
  269. package/dist/cjs/z-table-expanded-row.cjs.entry.js +0 -12
  270. package/dist/cjs/z-table-expanded-row.cjs.entry.js.map +0 -1
  271. package/dist/cjs/z-table-footer.cjs.entry.js +0 -12
  272. package/dist/cjs/z-table-footer.cjs.entry.js.map +0 -1
  273. package/dist/cjs/z-table-head.cjs.entry.js +0 -12
  274. package/dist/cjs/z-table-head.cjs.entry.js.map +0 -1
  275. package/dist/cjs/z-table-header-row.cjs.entry.js +0 -12
  276. package/dist/cjs/z-table-header-row.cjs.entry.js.map +0 -1
  277. package/dist/cjs/z-table-header.cjs.entry.js +0 -15
  278. package/dist/cjs/z-table-header.cjs.entry.js.map +0 -1
  279. package/dist/cjs/z-table-row.cjs.entry.js +0 -13
  280. package/dist/cjs/z-table-row.cjs.entry.js.map +0 -1
  281. package/dist/cjs/z-table-sticky-footer.cjs.entry.js +0 -12
  282. package/dist/cjs/z-table-sticky-footer.cjs.entry.js.map +0 -1
  283. package/dist/collection/components/z-contextual-menu/index.js +0 -123
  284. package/dist/collection/components/z-contextual-menu/index.js.map +0 -1
  285. package/dist/collection/components/z-contextual-menu/index.spec.js +0 -74
  286. package/dist/collection/components/z-contextual-menu/index.spec.js.map +0 -1
  287. package/dist/collection/components/z-contextual-menu/styles.css +0 -60
  288. package/dist/collection/components/z-contextual-menu/test.e2e.js +0 -11
  289. package/dist/collection/components/z-contextual-menu/test.e2e.js.map +0 -1
  290. package/dist/collection/deprecated/navigation-tab.css +0 -138
  291. package/dist/collection/deprecated/z-navigation-tab/index.js +0 -286
  292. package/dist/collection/deprecated/z-navigation-tab/index.js.map +0 -1
  293. package/dist/collection/deprecated/z-navigation-tab-link/index.js +0 -321
  294. package/dist/collection/deprecated/z-navigation-tab-link/index.js.map +0 -1
  295. package/dist/collection/deprecated/z-table-deprecated/z-table-body/index.js +0 -27
  296. package/dist/collection/deprecated/z-table-deprecated/z-table-body/index.js.map +0 -1
  297. package/dist/collection/deprecated/z-table-deprecated/z-table-body/index.spec.js +0 -21
  298. package/dist/collection/deprecated/z-table-deprecated/z-table-body/index.spec.js.map +0 -1
  299. package/dist/collection/deprecated/z-table-deprecated/z-table-body/styles.css +0 -9
  300. package/dist/collection/deprecated/z-table-deprecated/z-table-cell/index.js +0 -85
  301. package/dist/collection/deprecated/z-table-deprecated/z-table-cell/index.js.map +0 -1
  302. package/dist/collection/deprecated/z-table-deprecated/z-table-cell/index.spec.js +0 -50
  303. package/dist/collection/deprecated/z-table-deprecated/z-table-cell/index.spec.js.map +0 -1
  304. package/dist/collection/deprecated/z-table-deprecated/z-table-cell/styles.css +0 -58
  305. package/dist/collection/deprecated/z-table-deprecated/z-table-deprecated/index.js +0 -362
  306. package/dist/collection/deprecated/z-table-deprecated/z-table-deprecated/index.js.map +0 -1
  307. package/dist/collection/deprecated/z-table-deprecated/z-table-deprecated/styles.css +0 -115
  308. package/dist/collection/deprecated/z-table-deprecated/z-table-empty-box/index.js +0 -74
  309. package/dist/collection/deprecated/z-table-deprecated/z-table-empty-box/index.js.map +0 -1
  310. package/dist/collection/deprecated/z-table-deprecated/z-table-empty-box/index.spec.js +0 -46
  311. package/dist/collection/deprecated/z-table-deprecated/z-table-empty-box/index.spec.js.map +0 -1
  312. package/dist/collection/deprecated/z-table-deprecated/z-table-empty-box/styles.css +0 -38
  313. package/dist/collection/deprecated/z-table-deprecated/z-table-expanded-row/index.js +0 -46
  314. package/dist/collection/deprecated/z-table-deprecated/z-table-expanded-row/index.js.map +0 -1
  315. package/dist/collection/deprecated/z-table-deprecated/z-table-expanded-row/index.spec.js +0 -13
  316. package/dist/collection/deprecated/z-table-deprecated/z-table-expanded-row/index.spec.js.map +0 -1
  317. package/dist/collection/deprecated/z-table-deprecated/z-table-expanded-row/styles.css +0 -9
  318. package/dist/collection/deprecated/z-table-deprecated/z-table-footer/index.js +0 -26
  319. package/dist/collection/deprecated/z-table-deprecated/z-table-footer/index.js.map +0 -1
  320. package/dist/collection/deprecated/z-table-deprecated/z-table-footer/index.spec.js +0 -23
  321. package/dist/collection/deprecated/z-table-deprecated/z-table-footer/index.spec.js.map +0 -1
  322. package/dist/collection/deprecated/z-table-deprecated/z-table-footer/styles.css +0 -5
  323. package/dist/collection/deprecated/z-table-deprecated/z-table-head/index.js +0 -26
  324. package/dist/collection/deprecated/z-table-deprecated/z-table-head/index.js.map +0 -1
  325. package/dist/collection/deprecated/z-table-deprecated/z-table-head/index.spec.js +0 -23
  326. package/dist/collection/deprecated/z-table-deprecated/z-table-head/index.spec.js.map +0 -1
  327. package/dist/collection/deprecated/z-table-deprecated/z-table-head/styles.css +0 -5
  328. package/dist/collection/deprecated/z-table-deprecated/z-table-header/index.js +0 -227
  329. package/dist/collection/deprecated/z-table-deprecated/z-table-header/index.js.map +0 -1
  330. package/dist/collection/deprecated/z-table-deprecated/z-table-header/index.spec.js +0 -227
  331. package/dist/collection/deprecated/z-table-deprecated/z-table-header/index.spec.js.map +0 -1
  332. package/dist/collection/deprecated/z-table-deprecated/z-table-header/styles.css +0 -71
  333. package/dist/collection/deprecated/z-table-deprecated/z-table-header-row/index.js +0 -48
  334. package/dist/collection/deprecated/z-table-deprecated/z-table-header-row/index.js.map +0 -1
  335. package/dist/collection/deprecated/z-table-deprecated/z-table-header-row/index.spec.js +0 -28
  336. package/dist/collection/deprecated/z-table-deprecated/z-table-header-row/index.spec.js.map +0 -1
  337. package/dist/collection/deprecated/z-table-deprecated/z-table-header-row/styles.css +0 -13
  338. package/dist/collection/deprecated/z-table-deprecated/z-table-row/index.js +0 -96
  339. package/dist/collection/deprecated/z-table-deprecated/z-table-row/index.js.map +0 -1
  340. package/dist/collection/deprecated/z-table-deprecated/z-table-row/index.spec.js +0 -23
  341. package/dist/collection/deprecated/z-table-deprecated/z-table-row/index.spec.js.map +0 -1
  342. package/dist/collection/deprecated/z-table-deprecated/z-table-row/styles.css +0 -45
  343. package/dist/collection/deprecated/z-table-deprecated/z-table-sticky-footer/index.js +0 -23
  344. package/dist/collection/deprecated/z-table-deprecated/z-table-sticky-footer/index.js.map +0 -1
  345. package/dist/collection/deprecated/z-table-deprecated/z-table-sticky-footer/index.spec.js +0 -16
  346. package/dist/collection/deprecated/z-table-deprecated/z-table-sticky-footer/index.spec.js.map +0 -1
  347. package/dist/collection/deprecated/z-table-deprecated/z-table-sticky-footer/styles.css +0 -11
  348. package/dist/components/index28.js +0 -45
  349. package/dist/components/index28.js.map +0 -1
  350. package/dist/components/index29.js +0 -120
  351. package/dist/components/index29.js.map +0 -1
  352. package/dist/components/index30.js +0 -46
  353. package/dist/components/index30.js.map +0 -1
  354. package/dist/components/z-contextual-menu.d.ts +0 -11
  355. package/dist/components/z-contextual-menu.js +0 -98
  356. package/dist/components/z-contextual-menu.js.map +0 -1
  357. package/dist/components/z-navigation-tab-link.d.ts +0 -11
  358. package/dist/components/z-navigation-tab-link.js +0 -105
  359. package/dist/components/z-navigation-tab-link.js.map +0 -1
  360. package/dist/components/z-navigation-tab.d.ts +0 -11
  361. package/dist/components/z-navigation-tab.js +0 -100
  362. package/dist/components/z-navigation-tab.js.map +0 -1
  363. package/dist/components/z-table-body.d.ts +0 -11
  364. package/dist/components/z-table-body.js +0 -40
  365. package/dist/components/z-table-body.js.map +0 -1
  366. package/dist/components/z-table-cell.d.ts +0 -11
  367. package/dist/components/z-table-cell.js +0 -8
  368. package/dist/components/z-table-cell.js.map +0 -1
  369. package/dist/components/z-table-deprecated.d.ts +0 -11
  370. package/dist/components/z-table-deprecated.js +0 -127
  371. package/dist/components/z-table-deprecated.js.map +0 -1
  372. package/dist/components/z-table-empty-box.d.ts +0 -11
  373. package/dist/components/z-table-empty-box.js +0 -8
  374. package/dist/components/z-table-empty-box.js.map +0 -1
  375. package/dist/components/z-table-expanded-row.d.ts +0 -11
  376. package/dist/components/z-table-expanded-row.js +0 -39
  377. package/dist/components/z-table-expanded-row.js.map +0 -1
  378. package/dist/components/z-table-footer.d.ts +0 -11
  379. package/dist/components/z-table-footer.js +0 -39
  380. package/dist/components/z-table-footer.js.map +0 -1
  381. package/dist/components/z-table-head.d.ts +0 -11
  382. package/dist/components/z-table-head.js +0 -39
  383. package/dist/components/z-table-head.js.map +0 -1
  384. package/dist/components/z-table-header-row.d.ts +0 -11
  385. package/dist/components/z-table-header-row.js +0 -65
  386. package/dist/components/z-table-header-row.js.map +0 -1
  387. package/dist/components/z-table-header.d.ts +0 -11
  388. package/dist/components/z-table-header.js +0 -8
  389. package/dist/components/z-table-header.js.map +0 -1
  390. package/dist/components/z-table-row.d.ts +0 -11
  391. package/dist/components/z-table-row.js +0 -79
  392. package/dist/components/z-table-row.js.map +0 -1
  393. package/dist/components/z-table-sticky-footer.d.ts +0 -11
  394. package/dist/components/z-table-sticky-footer.js +0 -35
  395. package/dist/components/z-table-sticky-footer.js.map +0 -1
  396. package/dist/esm/icons-f212e30c.js.map +0 -1
  397. package/dist/esm/index-0c3f6c0f.js +0 -80
  398. package/dist/esm/index-0c3f6c0f.js.map +0 -1
  399. package/dist/esm/index-1ad3694a.js +0 -19
  400. package/dist/esm/index-1ad3694a.js.map +0 -1
  401. package/dist/esm/index-42dcef4f.js +0 -41
  402. package/dist/esm/index-42dcef4f.js.map +0 -1
  403. package/dist/esm/index-55b38815.js +0 -18
  404. package/dist/esm/index-55b38815.js.map +0 -1
  405. package/dist/esm/index-5b6bb2e2.js +0 -28
  406. package/dist/esm/index-5b6bb2e2.js.map +0 -1
  407. package/dist/esm/index-659b7228.js +0 -35
  408. package/dist/esm/index-659b7228.js.map +0 -1
  409. package/dist/esm/index-73ab3b9b.js +0 -22
  410. package/dist/esm/index-73ab3b9b.js.map +0 -1
  411. package/dist/esm/index-754a9620.js +0 -22
  412. package/dist/esm/index-754a9620.js.map +0 -1
  413. package/dist/esm/index-829d5a8b.js +0 -23
  414. package/dist/esm/index-829d5a8b.js.map +0 -1
  415. package/dist/esm/index-c3277075.js +0 -22
  416. package/dist/esm/index-c3277075.js.map +0 -1
  417. package/dist/esm/z-app-header_15.entry.js +0 -2212
  418. package/dist/esm/z-app-header_15.entry.js.map +0 -1
  419. package/dist/esm/z-contextual-menu.entry.js +0 -40
  420. package/dist/esm/z-contextual-menu.entry.js.map +0 -1
  421. package/dist/esm/z-navigation-tab-link.entry.js +0 -68
  422. package/dist/esm/z-navigation-tab-link.entry.js.map +0 -1
  423. package/dist/esm/z-navigation-tab.entry.js +0 -65
  424. package/dist/esm/z-navigation-tab.entry.js.map +0 -1
  425. package/dist/esm/z-table-body.entry.js +0 -4
  426. package/dist/esm/z-table-body.entry.js.map +0 -1
  427. package/dist/esm/z-table-cell.entry.js +0 -5
  428. package/dist/esm/z-table-cell.entry.js.map +0 -1
  429. package/dist/esm/z-table-deprecated.entry.js +0 -88
  430. package/dist/esm/z-table-deprecated.entry.js.map +0 -1
  431. package/dist/esm/z-table-empty-box.entry.js +0 -4
  432. package/dist/esm/z-table-empty-box.entry.js.map +0 -1
  433. package/dist/esm/z-table-expanded-row.entry.js +0 -4
  434. package/dist/esm/z-table-expanded-row.entry.js.map +0 -1
  435. package/dist/esm/z-table-footer.entry.js +0 -4
  436. package/dist/esm/z-table-footer.entry.js.map +0 -1
  437. package/dist/esm/z-table-head.entry.js +0 -4
  438. package/dist/esm/z-table-head.entry.js.map +0 -1
  439. package/dist/esm/z-table-header-row.entry.js +0 -4
  440. package/dist/esm/z-table-header-row.entry.js.map +0 -1
  441. package/dist/esm/z-table-header.entry.js +0 -7
  442. package/dist/esm/z-table-header.entry.js.map +0 -1
  443. package/dist/esm/z-table-row.entry.js +0 -5
  444. package/dist/esm/z-table-row.entry.js.map +0 -1
  445. package/dist/esm/z-table-sticky-footer.entry.js +0 -4
  446. package/dist/esm/z-table-sticky-footer.entry.js.map +0 -1
  447. package/dist/types/components/z-contextual-menu/index.d.ts +0 -26
  448. package/dist/types/deprecated/z-navigation-tab/index.d.ts +0 -69
  449. package/dist/types/deprecated/z-navigation-tab-link/index.d.ts +0 -77
  450. package/dist/types/deprecated/z-table-deprecated/z-table-body/index.d.ts +0 -8
  451. package/dist/types/deprecated/z-table-deprecated/z-table-cell/index.d.ts +0 -14
  452. package/dist/types/deprecated/z-table-deprecated/z-table-deprecated/index.d.ts +0 -59
  453. package/dist/types/deprecated/z-table-deprecated/z-table-empty-box/index.d.ts +0 -15
  454. package/dist/types/deprecated/z-table-deprecated/z-table-expanded-row/index.d.ts +0 -8
  455. package/dist/types/deprecated/z-table-deprecated/z-table-footer/index.d.ts +0 -8
  456. package/dist/types/deprecated/z-table-deprecated/z-table-head/index.d.ts +0 -8
  457. package/dist/types/deprecated/z-table-deprecated/z-table-header/index.d.ts +0 -31
  458. package/dist/types/deprecated/z-table-deprecated/z-table-header-row/index.d.ts +0 -9
  459. package/dist/types/deprecated/z-table-deprecated/z-table-row/index.d.ts +0 -16
  460. package/dist/types/deprecated/z-table-deprecated/z-table-sticky-footer/index.d.ts +0 -7
  461. package/dist/web-components-library/p-011a7536.js +0 -2
  462. package/dist/web-components-library/p-011a7536.js.map +0 -1
  463. package/dist/web-components-library/p-16f0fc17.entry.js +0 -2
  464. package/dist/web-components-library/p-16f0fc17.entry.js.map +0 -1
  465. package/dist/web-components-library/p-2731d501.entry.js +0 -2
  466. package/dist/web-components-library/p-2731d501.entry.js.map +0 -1
  467. package/dist/web-components-library/p-28c6bb97.entry.js +0 -2
  468. package/dist/web-components-library/p-28c6bb97.entry.js.map +0 -1
  469. package/dist/web-components-library/p-3441cb4e.entry.js +0 -2
  470. package/dist/web-components-library/p-3441cb4e.entry.js.map +0 -1
  471. package/dist/web-components-library/p-356aac96.js +0 -2
  472. package/dist/web-components-library/p-356aac96.js.map +0 -1
  473. package/dist/web-components-library/p-40f68d35.entry.js +0 -2
  474. package/dist/web-components-library/p-40f68d35.entry.js.map +0 -1
  475. package/dist/web-components-library/p-4686b762.js +0 -2
  476. package/dist/web-components-library/p-4686b762.js.map +0 -1
  477. package/dist/web-components-library/p-472eb82d.entry.js +0 -2
  478. package/dist/web-components-library/p-472eb82d.entry.js.map +0 -1
  479. package/dist/web-components-library/p-4bc82510.js +0 -2
  480. package/dist/web-components-library/p-4bc82510.js.map +0 -1
  481. package/dist/web-components-library/p-55d22af2.js +0 -2
  482. package/dist/web-components-library/p-55d22af2.js.map +0 -1
  483. package/dist/web-components-library/p-5e585fe9.js +0 -2
  484. package/dist/web-components-library/p-5e585fe9.js.map +0 -1
  485. package/dist/web-components-library/p-6087739d.js +0 -2
  486. package/dist/web-components-library/p-6087739d.js.map +0 -1
  487. package/dist/web-components-library/p-626a5bb1.entry.js +0 -2
  488. package/dist/web-components-library/p-626a5bb1.entry.js.map +0 -1
  489. package/dist/web-components-library/p-6790a3c1.js +0 -2
  490. package/dist/web-components-library/p-6790a3c1.js.map +0 -1
  491. package/dist/web-components-library/p-68a9a3dd.entry.js +0 -2
  492. package/dist/web-components-library/p-68a9a3dd.entry.js.map +0 -1
  493. package/dist/web-components-library/p-69697329.entry.js +0 -2
  494. package/dist/web-components-library/p-69697329.entry.js.map +0 -1
  495. package/dist/web-components-library/p-6aba107d.entry.js +0 -2
  496. package/dist/web-components-library/p-6aba107d.entry.js.map +0 -1
  497. package/dist/web-components-library/p-820c2503.js +0 -2
  498. package/dist/web-components-library/p-820c2503.js.map +0 -1
  499. package/dist/web-components-library/p-98e8d64f.entry.js +0 -2
  500. package/dist/web-components-library/p-98e8d64f.entry.js.map +0 -1
  501. package/dist/web-components-library/p-9bcb606c.entry.js +0 -2
  502. package/dist/web-components-library/p-9bcb606c.entry.js.map +0 -1
  503. package/dist/web-components-library/p-b1b69181.entry.js +0 -2
  504. package/dist/web-components-library/p-b1b69181.entry.js.map +0 -1
  505. package/dist/web-components-library/p-b99dd793.entry.js +0 -2
  506. package/dist/web-components-library/p-b99dd793.entry.js.map +0 -1
  507. package/dist/web-components-library/p-ca5975a3.js +0 -2
  508. package/dist/web-components-library/p-ca5975a3.js.map +0 -1
  509. package/dist/web-components-library/p-cc46f0ce.js +0 -2
  510. package/dist/web-components-library/p-cc46f0ce.js.map +0 -1
  511. package/dist/web-components-library/p-ebcf6b4d.entry.js +0 -2
  512. package/dist/web-components-library/p-ed03b414.entry.js +0 -2
  513. package/dist/web-components-library/p-ed03b414.entry.js.map +0 -1
  514. package/dist/web-components-library/p-fe8d7642.entry.js +0 -2
  515. package/www/build/p-011a7536.js +0 -2
  516. package/www/build/p-011a7536.js.map +0 -1
  517. package/www/build/p-16f0fc17.entry.js +0 -2
  518. package/www/build/p-16f0fc17.entry.js.map +0 -1
  519. package/www/build/p-2731d501.entry.js +0 -2
  520. package/www/build/p-2731d501.entry.js.map +0 -1
  521. package/www/build/p-28c6bb97.entry.js +0 -2
  522. package/www/build/p-28c6bb97.entry.js.map +0 -1
  523. package/www/build/p-3441cb4e.entry.js +0 -2
  524. package/www/build/p-3441cb4e.entry.js.map +0 -1
  525. package/www/build/p-356aac96.js +0 -2
  526. package/www/build/p-356aac96.js.map +0 -1
  527. package/www/build/p-40f68d35.entry.js +0 -2
  528. package/www/build/p-40f68d35.entry.js.map +0 -1
  529. package/www/build/p-4686b762.js +0 -2
  530. package/www/build/p-4686b762.js.map +0 -1
  531. package/www/build/p-472eb82d.entry.js +0 -2
  532. package/www/build/p-472eb82d.entry.js.map +0 -1
  533. package/www/build/p-48fe43ec.js +0 -2
  534. package/www/build/p-4bc82510.js +0 -2
  535. package/www/build/p-4bc82510.js.map +0 -1
  536. package/www/build/p-55d22af2.js +0 -2
  537. package/www/build/p-55d22af2.js.map +0 -1
  538. package/www/build/p-5e585fe9.js +0 -2
  539. package/www/build/p-5e585fe9.js.map +0 -1
  540. package/www/build/p-6087739d.js +0 -2
  541. package/www/build/p-6087739d.js.map +0 -1
  542. package/www/build/p-626a5bb1.entry.js +0 -2
  543. package/www/build/p-626a5bb1.entry.js.map +0 -1
  544. package/www/build/p-6790a3c1.js +0 -2
  545. package/www/build/p-6790a3c1.js.map +0 -1
  546. package/www/build/p-68a9a3dd.entry.js +0 -2
  547. package/www/build/p-68a9a3dd.entry.js.map +0 -1
  548. package/www/build/p-69697329.entry.js +0 -2
  549. package/www/build/p-69697329.entry.js.map +0 -1
  550. package/www/build/p-6aba107d.entry.js +0 -2
  551. package/www/build/p-6aba107d.entry.js.map +0 -1
  552. package/www/build/p-820c2503.js +0 -2
  553. package/www/build/p-820c2503.js.map +0 -1
  554. package/www/build/p-98e8d64f.entry.js +0 -2
  555. package/www/build/p-98e8d64f.entry.js.map +0 -1
  556. package/www/build/p-9bcb606c.entry.js +0 -2
  557. package/www/build/p-9bcb606c.entry.js.map +0 -1
  558. package/www/build/p-b1b69181.entry.js +0 -2
  559. package/www/build/p-b1b69181.entry.js.map +0 -1
  560. package/www/build/p-b99dd793.entry.js +0 -2
  561. package/www/build/p-b99dd793.entry.js.map +0 -1
  562. package/www/build/p-ca5975a3.js +0 -2
  563. package/www/build/p-ca5975a3.js.map +0 -1
  564. package/www/build/p-cc46f0ce.js +0 -2
  565. package/www/build/p-cc46f0ce.js.map +0 -1
  566. package/www/build/p-ebcf6b4d.entry.js +0 -2
  567. package/www/build/p-ed03b414.entry.js +0 -2
  568. package/www/build/p-ed03b414.entry.js.map +0 -1
  569. package/www/build/p-fe8d7642.entry.js +0 -2
  570. /package/dist/web-components-library/{p-6d0bb567.entry.js.map → p-00d7315a.entry.js.map} +0 -0
  571. /package/dist/web-components-library/{p-10c29fb4.entry.js.map → p-04755b76.entry.js.map} +0 -0
  572. /package/dist/web-components-library/{p-7d4cd2e8.entry.js.map → p-05b39597.entry.js.map} +0 -0
  573. /package/dist/web-components-library/{p-5a174821.entry.js.map → p-0d799f83.entry.js.map} +0 -0
  574. /package/dist/web-components-library/{p-83657b33.entry.js.map → p-120a809e.entry.js.map} +0 -0
  575. /package/dist/web-components-library/{p-fa4a2862.entry.js.map → p-239fb968.entry.js.map} +0 -0
  576. /package/dist/web-components-library/{p-378b2bbf.entry.js.map → p-24ab494d.entry.js.map} +0 -0
  577. /package/dist/web-components-library/{p-f97c093d.entry.js.map → p-2637ab23.entry.js.map} +0 -0
  578. /package/dist/web-components-library/{p-af78542a.js.map → p-49a35cf0.js.map} +0 -0
  579. /package/dist/web-components-library/{p-ebcf6b4d.entry.js.map → p-4c40561d.entry.js.map} +0 -0
  580. /package/dist/web-components-library/{p-fe8d7642.entry.js.map → p-5d67d311.entry.js.map} +0 -0
  581. /package/dist/web-components-library/{p-ae71256f.entry.js.map → p-5eb0a064.entry.js.map} +0 -0
  582. /package/dist/web-components-library/{p-2f72475d.entry.js.map → p-6edd5dbe.entry.js.map} +0 -0
  583. /package/dist/web-components-library/{p-402bd7f6.entry.js.map → p-8d81a5c8.entry.js.map} +0 -0
  584. /package/dist/web-components-library/{p-210fbe0f.entry.js.map → p-942e5126.entry.js.map} +0 -0
  585. /package/dist/web-components-library/{p-af27423a.entry.js.map → p-95104b91.entry.js.map} +0 -0
  586. /package/dist/web-components-library/{p-9e71d6b3.entry.js.map → p-996c1471.entry.js.map} +0 -0
  587. /package/dist/web-components-library/{p-bb8037c4.entry.js.map → p-a53ab86e.entry.js.map} +0 -0
  588. /package/dist/web-components-library/{p-ac497c80.entry.js.map → p-b57362ef.entry.js.map} +0 -0
  589. /package/dist/web-components-library/{p-97bba1f2.entry.js.map → p-b670ffa5.entry.js.map} +0 -0
  590. /package/dist/web-components-library/{p-38c63f28.entry.js.map → p-d1f8ca38.entry.js.map} +0 -0
  591. /package/dist/web-components-library/{p-9882e8a5.entry.js.map → p-d251f105.entry.js.map} +0 -0
  592. /package/dist/web-components-library/{p-e3e48e64.entry.js.map → p-d92765b6.entry.js.map} +0 -0
  593. /package/dist/web-components-library/{p-5d220bbc.entry.js.map → p-dbc437d8.entry.js.map} +0 -0
  594. /package/dist/web-components-library/{p-d83dfde7.entry.js.map → p-fe6f5926.entry.js.map} +0 -0
  595. /package/www/build/{p-6d0bb567.entry.js.map → p-00d7315a.entry.js.map} +0 -0
  596. /package/www/build/{p-10c29fb4.entry.js.map → p-04755b76.entry.js.map} +0 -0
  597. /package/www/build/{p-7d4cd2e8.entry.js.map → p-05b39597.entry.js.map} +0 -0
  598. /package/www/build/{p-5a174821.entry.js.map → p-0d799f83.entry.js.map} +0 -0
  599. /package/www/build/{p-83657b33.entry.js.map → p-120a809e.entry.js.map} +0 -0
  600. /package/www/build/{p-fa4a2862.entry.js.map → p-239fb968.entry.js.map} +0 -0
  601. /package/www/build/{p-378b2bbf.entry.js.map → p-24ab494d.entry.js.map} +0 -0
  602. /package/www/build/{p-f97c093d.entry.js.map → p-2637ab23.entry.js.map} +0 -0
  603. /package/www/build/{p-af78542a.js.map → p-49a35cf0.js.map} +0 -0
  604. /package/www/build/{p-ebcf6b4d.entry.js.map → p-4c40561d.entry.js.map} +0 -0
  605. /package/www/build/{p-fe8d7642.entry.js.map → p-5d67d311.entry.js.map} +0 -0
  606. /package/www/build/{p-ae71256f.entry.js.map → p-5eb0a064.entry.js.map} +0 -0
  607. /package/www/build/{p-2f72475d.entry.js.map → p-6edd5dbe.entry.js.map} +0 -0
  608. /package/www/build/{p-402bd7f6.entry.js.map → p-8d81a5c8.entry.js.map} +0 -0
  609. /package/www/build/{p-210fbe0f.entry.js.map → p-942e5126.entry.js.map} +0 -0
  610. /package/www/build/{p-af27423a.entry.js.map → p-95104b91.entry.js.map} +0 -0
  611. /package/www/build/{p-9e71d6b3.entry.js.map → p-996c1471.entry.js.map} +0 -0
  612. /package/www/build/{p-bb8037c4.entry.js.map → p-a53ab86e.entry.js.map} +0 -0
  613. /package/www/build/{p-ac497c80.entry.js.map → p-b57362ef.entry.js.map} +0 -0
  614. /package/www/build/{p-97bba1f2.entry.js.map → p-b670ffa5.entry.js.map} +0 -0
  615. /package/www/build/{p-38c63f28.entry.js.map → p-d1f8ca38.entry.js.map} +0 -0
  616. /package/www/build/{p-9882e8a5.entry.js.map → p-d251f105.entry.js.map} +0 -0
  617. /package/www/build/{p-e3e48e64.entry.js.map → p-d92765b6.entry.js.map} +0 -0
  618. /package/www/build/{p-5d220bbc.entry.js.map → p-dbc437d8.entry.js.map} +0 -0
  619. /package/www/build/{p-d83dfde7.entry.js.map → p-fe6f5926.entry.js.map} +0 -0
@@ -1,2230 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-dc60bee7.js');
6
- const index$1 = require('./index-39ce4edf.js');
7
- const utils = require('./utils-d0b10736.js');
8
- const icons = require('./icons-be077181.js');
9
- require('./breakpoints-5c22092a.js');
10
-
11
- const stylesCss$e = ":host{--app-header-typography-1-size:24px;--app-header-typography-2-size:28px;--app-header-typography-3-size:32px;--app-header-typography-4-size:36px;--app-header-typography-5-size:42px;--app-header-typography-6-size:48px;--app-header-typography-7-size:54px;--app-header-typography-8-size:60px;--app-header-typography-9-size:68px;--app-header-typography-10-size:76px;--app-header-typography-11-size:84px;--app-header-typography-12-size:92px;--app-header-typography-1-lineheight:1.33;--app-header-typography-2-lineheight:1.29;--app-header-typography-3-lineheight:1.25;--app-header-typography-4-lineheight:1.24;--app-header-typography-5-lineheight:1.24;--app-header-typography-6-lineheight:1.25;--app-header-typography-7-lineheight:1.2;--app-header-typography-8-lineheight:1.26;--app-header-typography-9-lineheight:1.24;--app-header-typography-10-lineheight:1.26;--app-header-typography-11-lineheight:1.2;--app-header-typography-12-lineheight:1.2;--app-header-typography-1-tracking:calc(-0.2 / 1em);--app-header-typography-2-tracking:calc(-0.4 / 1em);--app-header-typography-3-tracking:calc(-0.6 / 1em);--app-header-typography-4-tracking:calc(-0.8 / 1em);--app-header-typography-5-tracking:calc(-1 / 1em);--app-header-typography-6-tracking:calc(-1.2 / 1em);--app-header-typography-7-tracking:calc(-1.4 / 1em);--app-header-typography-8-tracking:calc(-1.6 / 1em);--app-header-typography-9-tracking:calc(-1.8 / 1em);--app-header-typography-10-tracking:calc(-2 / 1em);--app-header-typography-11-tracking:calc(-2.2 / 1em);--app-header-typography-12-tracking:calc(-2.4 / 1em);--app-header-content-max-width:100%;--app-header-height:auto;--app-header-top-offset:48px;--app-header-drawer-trigger-size:calc(var(--space-unit) * 4);--app-header-bg:var(--color-surface01);--app-header-stucked-bg:var(--color-surface01);--app-header-text-color:var(--color-text01);--app-header-title-font-size:var(--app-header-typography-3-size);--app-header-title-lineheight:var(--app-header-typography-3-lineheight);--app-header-title-letter-spacing:var(--app-header-typography-3-tracking);--app-header-stucked-text-color:var(--color-text01);position:relative;display:block;height:var(--app-header-height);color:var(--app-header-text-color)}:host,*{box-sizing:border-box}.heading-panel{position:relative;display:flex;width:100%;max-width:var(--app-header-content-max-width);flex-direction:column;flex-grow:0;flex-shrink:0;align-items:baseline;padding:var(--grid-margin);margin:0 auto;background:var(--app-header-bg);gap:calc(var(--space-unit) * 2) calc(var(--space-unit) * 5)}.hero-container+.heading-panel{background:transparent}:host(:empty) .heading-panel{padding:0}.heading-container{position:relative;z-index:1;display:flex;width:100%;max-width:100%;flex:1 auto;flex-direction:column;justify-content:flex-start}.heading-title{display:flex;max-width:100%;flex-direction:row;align-items:flex-start;column-gap:calc(var(--space-unit) * 2)}::slotted([slot=\"title\"]),.heading-stuck .heading-title>*,::slotted([slot=\"stucked-title\"]){margin:0;font-family:\"IBM Plex Serif\", serif;font-weight:var(--font-bd)}::slotted([slot=\"title\"]){font-size:var(--app-header-title-font-size);letter-spacing:var(--app-header-title-letter-spacing);line-height:var(--app-header-title-lineheight)}.heading-stuck .heading-title>*,::slotted([slot=\"stucked-title\"]){font-size:var(--app-header-typography-3-size);letter-spacing:var(--app-header-typography-3-tracking);line-height:var(--app-header-typography-3-lineheight)}:host(:not([menu-length=\"0\"])) .heading-subtitle{padding-left:calc(var(--app-header-drawer-trigger-size) + (var(--space-unit) * 2))}::slotted([slot=\"top-subtitle\"]),::slotted([slot=\"subtitle\"]){margin:0;font-family:var(--font-family-sans);font-size:20px;font-style:italic;line-height:26px}::slotted([slot=\"subtitle\"]){font-weight:500}::slotted([slot=\"top-subtitle\"]){font-weight:400}.menu-container{display:flex;width:100%;flex:1 auto;flex-flow:row wrap}:host([menu-length=\"0\"]:not([enable-search])) .menu-container,.menu-container:empty{display:none}.menu-container ::slotted([open]){position:relative;z-index:3}z-searchbar{z-index:0;display:flex;width:auto;min-width:calc(var(--space-unit) * 32);flex:1 auto;align-items:center;margin-left:auto}.heading-stuck{position:fixed;z-index:20;top:var(--app-header-top-offset);left:0;width:100%;max-width:100%;animation:slide-stuck-heading-in 250ms ease-out;background:var(--app-header-stucked-bg);box-shadow:var(--shadow-2);color:var(--app-header-stucked-text-color)}.heading-stuck-content{display:flex;max-width:var(--app-header-content-max-width);align-items:center;padding:var(--space-unit) var(--grid-margin);margin:0 auto;column-gap:calc(var(--space-unit) * 2)}.heading-stuck .heading-title{overflow:hidden}.heading-stuck .heading-title>*,.heading-stuck .heading-title ::slotted([slot=\"stucked-title\"]){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.heading-stuck-content z-button{margin-left:auto}.drawer-trigger{padding:0;border:0;margin:0;appearance:none;background:none;border-radius:0;color:inherit;cursor:pointer}.drawer-trigger z-icon{--z-icon-width:var(--app-header-drawer-trigger-size);--z-icon-height:var(--app-header-drawer-trigger-size);fill:currentcolor}.heading-container :is(.drawer-trigger,z-button.search-page-button){display:flex;height:calc(var(--app-header-title-font-size) * var(--app-header-title-lineheight));align-items:center}.heading-container z-button.search-page-button{margin-left:auto}.drawer-content{display:none}z-offcanvas[open] .drawer-content{display:flex;width:100%;flex:1 auto;flex-direction:column;row-gap:calc(var(--space-unit) * 2.5)}z-offcanvas[open] .drawer-content ::slotted(z-menu){width:100%}.drawer-close{--z-icon-width:var(--app-header-drawer-trigger-size);--z-icon-height:var(--app-header-drawer-trigger-size);padding:0;border:0;margin:var(--space-unit) 0 calc(var(--space-unit) * 2.5);appearance:none;background:transparent;border-radius:0;color:inherit;cursor:pointer;fill:currentcolor;font-size:inherit;outline:none}.drawer-close:focus-visible{box-shadow:var(--shadow-focus-primary)}.hero-container{position:absolute;z-index:0;top:0;left:0;width:100%;height:100%}:host([overlay]) .heading-panel .drawer-trigger z-icon,:host([overlay]) .heading-panel .heading-container,:host([overlay]) .heading-panel .menu-container{color:var(--color-white);fill:var(--color-white)}:host([overlay]) .heading-panel .menu-container ::slotted(z-menu){--z-menu-label-color:var(--color-white)}:host([overlay]) .hero-container::after{position:absolute;z-index:0;top:0;left:0;width:100%;height:100%;background:var(--color-black);content:\"\";opacity:0.5}.hero-container img,.hero-container ::slotted(*){position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;object-position:top center;-webkit-user-drag:none}@media (min-width: 768px){:host{--app-header-title-font-size:var(--app-header-typography-6-size);--app-header-title-lineheight:var(--app-header-typography-6-lineheight);--app-header-title-letter-spacing:var(--app-header-typography-6-tracking)}.heading-panel{flex-flow:row wrap;align-items:center;padding-bottom:calc(var(--space-unit) * 2)}.heading-container{margin-right:auto}:host(:is([flow=\"offcanvas\"],[menu-length=\"0\"])) :is(.heading-container,.menu-container){width:auto}:host(:not([flow=\"offcanvas\"])) .heading-subtitle{padding-left:0}.menu-container{flex:initial;align-items:center}:host([menu-length=\"0\"]) .menu-container:not(:empty){height:calc(var(--app-header-title-font-size) * var(--app-header-title-lineheight))}:host(:not([flow=\"offcanvas\"])) .menu-container{gap:var(--space-unit) calc(var(--space-unit) * 5)}:host(:not([flow=\"offcanvas\"])) .heading-container .drawer-trigger{display:none}}@media (min-width: 1152px){:host{--app-header-title-font-size:var(--app-header-typography-7-size);--app-header-title-lineheight:var(--app-header-typography-7-lineheight);--app-header-title-letter-spacing:var(--app-header-typography-7-tracking)}.heading-panel{justify-content:flex-start;padding-bottom:calc(var(--space-unit) * 3)}.heading-container,.menu-container{width:auto}:host([flow=\"stack\"]) .heading-panel{flex-flow:column;align-items:flex-start}:host([flow=\"stack\"]) .menu-container{width:100%}:host(:not([flow=\"offcanvas\"],[menu-length=\"0\"])) .heading-panel{row-gap:calc(var(--space-unit) * 3)}z-searchbar{min-width:calc(var(--space-unit) * 45);flex:initial}}@media (min-width: 1366px){:host{--app-header-title-font-size:var(--app-header-typography-9-size);--app-header-title-lineheight:var(--app-header-typography-9-lineheight);--app-header-title-letter-spacing:var(--app-header-typography-9-tracking)}}@keyframes slide-stuck-heading-in{0%{transform:translate3d(0, -100%, 0)}100%{transform:none}}";
12
- const ZAppHeaderStyle0 = stylesCss$e;
13
-
14
- const SUPPORT_INTERSECTION_OBSERVER = typeof IntersectionObserver !== "undefined";
15
- const ZAppHeader = class {
16
- constructor(hostRef) {
17
- index.registerInstance(this, hostRef);
18
- this.sticking = index.createEvent(this, "sticking", 7);
19
- this.observer = SUPPORT_INTERSECTION_OBSERVER &&
20
- new IntersectionObserver(([entry]) => {
21
- this._stuck = !entry.isIntersecting;
22
- }, {
23
- threshold: 0.5,
24
- });
25
- this.stuck = false;
26
- this.hero = undefined;
27
- this.overlay = false;
28
- this.flow = "auto";
29
- this.drawerOpen = false;
30
- this.enableSearch = false;
31
- this.searchPlaceholder = "Cerca";
32
- this.searchString = "";
33
- this.searchPageUrl = undefined;
34
- this._stuck = false;
35
- this.currentViewport = "mobile";
36
- this.menuLength = undefined;
37
- this.openDrawer = this.openDrawer.bind(this);
38
- this.closeDrawer = this.closeDrawer.bind(this);
39
- this.collectMenuElements = this.collectMenuElements.bind(this);
40
- }
41
- evaluateViewport() {
42
- if (window.innerWidth < 768) {
43
- this.currentViewport = "mobile";
44
- }
45
- else if (window.innerWidth >= 768 && window.innerWidth < 1152) {
46
- this.currentViewport = "tablet";
47
- }
48
- else {
49
- this.currentViewport = "desktop";
50
- }
51
- }
52
- onStuck() {
53
- const scrollParent = this.scrollParent;
54
- if (!scrollParent) {
55
- return;
56
- }
57
- this.sticking.emit(this._stuck);
58
- }
59
- setMenuFloatingMode() {
60
- if (this.menuElements.length === 0) {
61
- return;
62
- }
63
- const elements = this.menuElements;
64
- elements.forEach((element) => {
65
- element.open = false;
66
- element.floating = !this.drawerOpen;
67
- element.verticalContext = this.drawerOpen;
68
- });
69
- }
70
- get title() {
71
- const titleElement = this.hostElement.querySelector('[slot="title"]');
72
- if (titleElement === null) {
73
- return "";
74
- }
75
- return titleElement.textContent.trim();
76
- }
77
- get scrollParent() {
78
- const parent = this.hostElement.offsetParent;
79
- if (parent === document.body || parent === document.documentElement) {
80
- return window;
81
- }
82
- return parent;
83
- }
84
- get canShowMenu() {
85
- return this.flow !== "offcanvas" && this.currentViewport !== "mobile" && !this.drawerOpen;
86
- }
87
- get canShowSearchbar() {
88
- if (!this.enableSearch) {
89
- return false;
90
- }
91
- // Always show the searchbar on desktop, even if a searchPageUrl is set
92
- if (this.searchPageUrl) {
93
- return this.currentViewport === "desktop";
94
- }
95
- return true;
96
- }
97
- /**
98
- * Whether the header has a hero image, either as a prop or as a slot.
99
- */
100
- get hasHero() {
101
- return !!this.hero || this.hostElement.querySelector("[slot=hero]") !== null;
102
- }
103
- openDrawer() {
104
- this.drawerOpen = true;
105
- }
106
- closeDrawer() {
107
- this.drawerOpen = false;
108
- }
109
- collectMenuElements() {
110
- const menuElements = (this.menuElements = this.hostElement.querySelectorAll('[slot="menu"]'));
111
- this.menuLength = menuElements.length;
112
- this.setMenuFloatingMode();
113
- }
114
- enableStuckObserver() {
115
- if (this.observer) {
116
- this.observer.observe(this.container);
117
- }
118
- }
119
- disableStuckMode() {
120
- this._stuck = false;
121
- if (this.observer) {
122
- this.observer.unobserve(this.container);
123
- }
124
- }
125
- onStuckMode() {
126
- if (this.stuck) {
127
- this.enableStuckObserver();
128
- }
129
- else {
130
- this.disableStuckMode();
131
- }
132
- }
133
- renderSearchLinkButton() {
134
- if (!this.enableSearch || !this.searchPageUrl || this.currentViewport === "desktop") {
135
- return null;
136
- }
137
- return (index.h("z-button", { class: "search-page-button", variant: index$1.ButtonVariant.SECONDARY, href: this.searchPageUrl, icon: "search", size: index$1.ControlSize.X_SMALL }));
138
- }
139
- renderSeachbar(searchButtonIconOnly) {
140
- return (index.h("z-searchbar", { value: this.searchString, placeholder: this.searchPlaceholder, showSearchButton: true, searchButtonIconOnly: searchButtonIconOnly, size: index$1.ControlSize.X_SMALL, variant: index$1.ButtonVariant.SECONDARY, preventSubmit: this.searchString.length < 3, onSearchTyping: (e) => (this.searchString = e.detail) }));
141
- }
142
- componentDidLoad() {
143
- this.collectMenuElements();
144
- this.onStuckMode();
145
- this.evaluateViewport();
146
- }
147
- render() {
148
- return (index.h(index.Host, { key: '10a6de9066a2b47fce8c05b28584ebcfbd9d308e', "menu-length": this.menuLength }, this.hasHero && (index.h("div", { class: "hero-container" }, index.h("slot", { name: "hero" }, this.hero && (index.h("img", { alt: "", src: this.hero }))))), index.h("div", { key: '598744c6237cb30c4d4e467b45944a7879dce93e', class: "heading-panel", ref: (el) => (this.container = el) }, index.h("div", { key: '2132ed4349abc878b8cec1ca73978fa42dd5c5a4', class: "heading-container" }, index.h("div", { key: 'd3dcd130c4968e278ca5e0a610ad59a51b630abf', class: "heading-subtitle" }, index.h("slot", { key: 'd86a2a02577aad72e68d78fccee74d0cafd395e6', name: "top-subtitle" })), index.h("div", { key: '59f31cad85c438e675a419267cbd1e41b06009c8', class: "heading-title" }, this.menuLength > 0 && (index.h("button", { class: "drawer-trigger", "aria-label": "Apri menu", onClick: this.openDrawer }, index.h("z-icon", { name: "burger-menu" }))), index.h("slot", { key: '48a7e46471a03d776f15d30114ffdaf7f90b15cd', name: "title" }), this.renderSearchLinkButton()), index.h("div", { key: '41320040925b00a83fb6ed7bcd8911b2e2e1b88e', class: "heading-subtitle" }, index.h("slot", { key: '2da90e290780904617080944c2bcc507e918f9f7', name: "subtitle" }))), (this.canShowMenu || this.canShowSearchbar) && (index.h("div", { class: "menu-container" }, this.canShowMenu && (index.h("slot", { name: "menu", onSlotchange: this.collectMenuElements })), this.canShowSearchbar && this.renderSeachbar(this.currentViewport !== "desktop")))), index.h("z-offcanvas", { key: 'd54bb515efad20ca24686a5bc0743b9e3906dfef', variant: index$1.OffCanvasVariant.OVERLAY, transitiondirection: index$1.TransitionDirection.RIGHT, open: this.drawerOpen, onCanvasOpenStatusChanged: (ev) => (this.drawerOpen = ev.detail) }, index.h("button", { key: '22a9c1865a7fcb9660dbcb14c4202e6c78c2166b', class: "drawer-close", "aria-label": "Chiudi menu", onClick: this.closeDrawer, slot: "canvasContent", "aria-hidden": `${!this.drawerOpen}`, disabled: !this.drawerOpen }, index.h("z-icon", { key: '6bba2e8d9c1d081a8d826654eed502cab8018b87', name: "close" })), index.h("div", { key: 'edbd9d23c8adc99adc65a6a343e6587a55b4d12c', class: "drawer-content", slot: "canvasContent", "aria-hidden": `${!this.drawerOpen}` }, index.h("slot", { key: 'd8ba82c48339422e6a2db733839c8cf8062dd2c3', name: "menu", onSlotchange: this.collectMenuElements }))), this._stuck && (index.h("div", { class: "heading-stuck" }, index.h("div", { class: "heading-stuck-content" }, this.menuLength > 0 && (index.h("button", { class: "drawer-trigger", "aria-label": "Apri menu", onClick: this.openDrawer }, index.h("z-icon", { name: "burger-menu" }))), index.h("div", { class: "heading-title" }, index.h("slot", { name: "stucked-title" }, this.title)), this.renderSearchLinkButton(), this.canShowSearchbar && this.currentViewport === "desktop" && this.renderSeachbar(false))))));
149
- }
150
- get hostElement() { return index.getElement(this); }
151
- static get watchers() { return {
152
- "_stuck": ["onStuck"],
153
- "drawerOpen": ["setMenuFloatingMode"],
154
- "stuck": ["onStuckMode"]
155
- }; }
156
- };
157
- ZAppHeader.style = ZAppHeaderStyle0;
158
-
159
- const stylesCss$d = ".sc-z-button-h{display:inline-block;--z-icon-width:16px;--z-icon-height:16px;--z-icon-right-margin:0}[disabled].sc-z-button-h:not([disabled=\"false\"]){pointer-events:none}.sc-z-button-h .z-button--container.sc-z-button{display:inline-flex;width:100%;box-sizing:border-box;align-items:center;justify-content:center;padding:0;border-width:var(--border-size-medium);border-style:solid;border-radius:var(--border-radius);cursor:pointer;fill:currentcolor;font-family:var(--font-family-sans);font-size:14px;font-weight:var(--font-sb);letter-spacing:0.3px;line-height:1;outline:none;text-decoration:none;text-transform:uppercase;white-space:nowrap}.sc-z-button-h .z-button--container.sc-z-button:focus:focus-visible{box-shadow:var(--shadow-focus-primary)}.sc-z-button-h .z-button--container.z-button--has-text.sc-z-button{min-width:calc(var(--space-unit) * 8);padding:0 calc(var(--space-unit) * 2)}.sc-z-button-h .z-button--container.z-button--has-text.sc-z-button z-icon.sc-z-button{--z-icon-right-margin:var(--space-unit)}[size=\"big\"].sc-z-button-h .z-button--container.sc-z-button{min-width:44px;height:44px}[size=\"small\"].sc-z-button-h .z-button--container.sc-z-button{min-width:36px;height:36px}[size=\"x-small\"].sc-z-button-h .z-button--container.sc-z-button{min-width:32px;height:32px}[variant=\"primary\"].sc-z-button-h .z-button--container.sc-z-button{border-color:var(--color-primary01);background-color:var(--color-primary01);color:var(--color-text-inverse)}@media (hover: hover){[variant=\"primary\"].sc-z-button-h .z-button--container.sc-z-button:hover{border-color:var(--color-hover-primary);background-color:var(--color-hover-primary);color:var(--color-text-inverse)}}[variant=\"primary\"].sc-z-button-h .z-button--container.sc-z-button:active{border-color:var(--color-pressed-primary);background-color:var(--color-pressed-primary);box-shadow:var(--shadow-2);color:var(--color-text-inverse)}[variant=\"primary\"][disabled].sc-z-button-h:not([disabled=\"false\"]) .z-button--container.sc-z-button{border-color:var(--color-disabled01);background-color:var(--color-disabled01);color:var(--color-disabled02)}[variant=\"secondary\"].sc-z-button-h .z-button--container.sc-z-button{border-color:var(--color-primary01);background-color:var(--color-surface01);color:var(--color-primary01)}@media (hover: hover){[variant=\"secondary\"].sc-z-button-h .z-button--container.sc-z-button:hover{border-color:var(--color-hover-primary);background-color:var(--color-surface01);color:var(--color-hover-primary)}}[variant=\"secondary\"].sc-z-button-h .z-button--container.sc-z-button:active{border-color:var(--color-pressed-primary);background-color:var(--color-surface01);box-shadow:var(--shadow-2);color:var(--color-pressed-primary)}[variant=\"secondary\"][disabled].sc-z-button-h:not([disabled=\"false\"]) .z-button--container.sc-z-button{border-color:var(--color-disabled01);background-color:var(--color-surface01);color:var(--color-disabled02)}[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button{border-color:var(--color-primary02);background-color:var(--color-primary02);color:var(--color-primary01)}@media (hover: hover){[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button:hover{border-color:var(--color-primary03);background-color:var(--color-primary03);color:var(--color-hover-primary)}}[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button:focus:focus-visible{border-color:var(--color-primary02);background-color:var(--color-primary02);color:var(--color-primary01)}[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button:active{border-color:var(--color-primary02);background-color:var(--color-primary02);box-shadow:var(--shadow-2);color:var(--color-primary01)}[variant=\"tertiary\"][disabled].sc-z-button-h:not([disabled=\"false\"]) .z-button--container.sc-z-button{border-color:var(--color-disabled01);background-color:var(--color-disabled01);color:var(--color-disabled02)}";
160
- const ZButtonStyle0 = stylesCss$d;
161
-
162
- const ZButton = class {
163
- constructor(hostRef) {
164
- index.registerInstance(this, hostRef);
165
- this.ariaLabel = "";
166
- this.role = undefined;
167
- this.href = undefined;
168
- this.target = undefined;
169
- this.htmlid = undefined;
170
- this.name = undefined;
171
- this.disabled = false;
172
- this.type = index$1.ButtonType.BUTTON;
173
- this.variant = index$1.ButtonVariant.PRIMARY;
174
- this.icon = undefined;
175
- this.size = index$1.ControlSize.BIG;
176
- }
177
- getAttributes() {
178
- return {
179
- id: this.htmlid,
180
- class: {
181
- "z-button--container": true,
182
- "z-button--has-text": !!this.hostElement.textContent.trim(),
183
- },
184
- };
185
- }
186
- render() {
187
- if (this.href) {
188
- return (index.h("a", Object.assign({}, this.getAttributes(), { "aria-label": this.ariaLabel, href: this.href, target: this.target }), this.icon && index.h("z-icon", { name: this.icon }), index.h("slot", null)));
189
- }
190
- return (index.h("button", Object.assign({}, this.getAttributes(), { "aria-label": this.ariaLabel, name: this.name, type: this.type, role: this.role, disabled: this.disabled }), this.icon && index.h("z-icon", { name: this.icon }), index.h("slot", null)));
191
- }
192
- get hostElement() { return index.getElement(this); }
193
- };
194
- ZButton.style = ZButtonStyle0;
195
-
196
- const stylesCss$c = ".sc-z-divider-h{display:block;padding:0;margin:0}.divider-horizontal.sc-z-divider-h{width:100%}.divider-vertical.sc-z-divider-h{height:100%}.divider-small.divider-horizontal.sc-z-divider-h{height:var(--border-size-small)}.divider-medium.divider-horizontal.sc-z-divider-h{height:var(--border-size-medium)}.divider-large.divider-horizontal.sc-z-divider-h{height:var(--border-size-large)}.divider-small.divider-vertical.sc-z-divider-h{width:var(--border-size-small)}.divider-medium.divider-vertical.sc-z-divider-h{width:var(--border-size-medium)}.divider-large.divider-vertical.sc-z-divider-h{width:var(--border-size-large)}";
197
- const ZDividerStyle0 = stylesCss$c;
198
-
199
- const ZDivider = class {
200
- constructor(hostRef) {
201
- index.registerInstance(this, hostRef);
202
- this.size = index$1.DividerSize.SMALL;
203
- this.color = "gray200";
204
- this.orientation = index$1.DividerOrientation.HORIZONTAL;
205
- }
206
- render() {
207
- return (index.h(index.Host, { key: 'ae08a473772cfda024b84cdf94e83e634a66c73f', class: `divider-${this.size} divider-${this.orientation}`, style: { backgroundColor: `var(--${this.color})` } }));
208
- }
209
- };
210
- ZDivider.style = ZDividerStyle0;
211
-
212
- const stylesCss$b = ":host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.dragdrop{position:relative;display:flex;height:228px;flex-direction:column;padding:calc(var(--space-unit) * 2);border-color:var(--color-surface04);background-color:var(--color-surface02);background-image:url(\"data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='2' ry='2' stroke='%23CACCCEFF' stroke-width='2' stroke-dasharray='15%2c 10%2c 14%2c 11' stroke-dashoffset='3' stroke-linecap='square'/%3e%3c/svg%3e\");border-radius:2px;color:var(--color-text01)}:host>.dragdrop.dragover *{pointer-events:none}:host>.dragdrop .dragover-container{position:absolute;z-index:10;top:0;left:0;display:none;width:100%;height:100%;background-color:var(--color-primary03);box-shadow:var(--shadow-focus-primary)}:host>.dragdrop .dragover-container .dragover-message{padding:10px 28px;background-color:var(--color-link-primary);color:var(--color-text04)}:host>.dragdrop.dragover .dragover-container{display:flex;align-items:center;justify-content:center}";
213
- const ZDragdropAreaStyle0 = stylesCss$b;
214
-
215
- const ZDragdropArea = class {
216
- constructor(hostRef) {
217
- index.registerInstance(this, hostRef);
218
- this.fileDropped = index.createEvent(this, "fileDropped", 7);
219
- this.dragAndDropLabel = undefined;
220
- }
221
- fileDroppedHandler(files) {
222
- this.fileDropped.emit(files);
223
- }
224
- renderOnDragOverMessage() {
225
- return (index.h("div", { class: "dragover-container" }, index.h("div", { class: "dragover-message" }, index.h("span", { class: "body-2-sb" }, this.dragAndDropLabel))));
226
- }
227
- render() {
228
- return (index.h("div", { key: '8bd841a6a59b438bd0e794a842aa6326dd88ef04', tabIndex: 0, ref: (val) => (this.dragDropContainer = val), class: "dragdrop", onDragOver: (e) => {
229
- e.preventDefault();
230
- this.dragDropContainer.classList.add("dragover");
231
- }, onDragLeave: () => {
232
- this.dragDropContainer.classList.remove("dragover");
233
- }, onDrop: (e) => {
234
- e.preventDefault();
235
- if (e.dataTransfer.files.length) {
236
- this.dragDropContainer.classList.remove("dragover");
237
- this.fileDroppedHandler(e.dataTransfer.files);
238
- }
239
- } }, this.renderOnDragOverMessage(), index.h("slot", { key: 'd99944c1db4408ff5028f628e35c9d5225a37055' })));
240
- }
241
- };
242
- ZDragdropArea.style = ZDragdropAreaStyle0;
243
-
244
- const stylesCss$a = ":host{color:var(--color-text01);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.container{display:flex;flex-direction:column}:host .modal-wrapper{display:flex;align-items:center;justify-content:center;padding:calc(var(--space-unit) * 2)}:host .modal-wrapper>.files-wrapper{display:flex;flex-direction:column;margin:calc(var(--space-unit) * 4);gap:var(--space-unit)}:host .text-container{display:flex;flex-direction:column;margin:auto}:host .text-container .body-1{text-align:center}:host .text-container .upload-link{color:var(--color-link-primary);cursor:pointer}:host .text-container .upload-link-text{margin-bottom:var(--space-unit)}input#file-elem{display:none}#title{display:inline-block;margin:calc(var(--space-unit) * 2.5) 0 calc(var(--space-unit) * 4);font-size:calc(var(--space-unit) * 3);font-weight:var(--font-sb)}:host>.container>z-button{display:inline-block;margin-top:calc(var(--space-unit) * 3)}:host>.container>.files-container.hidden{display:none}:host>.container>.files-container>.heading-4-sb{display:inline-block;margin:calc(var(--space-unit) * 3) 0;font-size:calc(var(--space-unit) * 2);font-weight:var(--font-sb)}:host([type=\"dragdrop\"])>.container>.files-container>.heading-4-sb{margin-top:0;margin-bottom:calc(var(--space-unit) * 3)}:host>.container>.files-container>.files-wrapper{display:flex;flex-wrap:wrap;column-gap:calc(var(--space-unit) * 2);row-gap:calc(var(--space-unit) * 2)}:host>.container>.files-container>z-divider{margin-top:calc(var(--space-unit) * 3);margin-bottom:0}:host([type=\"dragdrop\"])>.container>.files-container>z-divider{margin:calc(var(--space-unit) * 3) 0}@media only screen and (min-width: 768px){:host>.container>z-button{align-self:flex-start}:host .modal-wrapper{padding:calc(var(--space-unit) * 3)}}@media only screen and (min-width: 1152px){:host .modal-wrapper{padding:calc(var(--space-unit) * 4)}}";
245
- const ZFileUploadStyle0 = stylesCss$a;
246
-
247
- const ZFileUpload = class {
248
- constructor(hostRef) {
249
- index.registerInstance(this, hostRef);
250
- this.fileInput = index.createEvent(this, "fileInput", 7);
251
- this.inputAttributes = {
252
- type: "file",
253
- id: "file-elem",
254
- multiple: true,
255
- };
256
- this.type = index$1.ZFileUploadType.DEFAULT;
257
- this.buttonVariant = undefined;
258
- this.acceptedFormat = undefined;
259
- this.fileMaxSize = undefined;
260
- this.mainTitle = undefined;
261
- this.description = undefined;
262
- this.files = [];
263
- this.uploadBtnLabel = "allega";
264
- this.dragAndDropLabel = "Rilascia i file in questa area per allegarli.";
265
- this.hasFileSection = true;
266
- this.invalidFiles = undefined;
267
- }
268
- /** Listen removeFile event sent from z-file component */
269
- removeFileListener(e) {
270
- const files = this.files;
271
- const file = files.find((file) => file.name === e.detail.fileName);
272
- if (file) {
273
- const index = files.indexOf(file);
274
- if (index >= 0) {
275
- files.splice(index, 1);
276
- this.files = [...files];
277
- }
278
- }
279
- }
280
- /** Listen fileDropped event sent from z-dragdrop-area component */
281
- fileDroppedListener(e) {
282
- this.input.files = e.detail;
283
- this.fileInputHandler();
284
- }
285
- componentDidUpdate() {
286
- this.handleAccessibility();
287
- this.invalidFiles.size && this.errorModal.focus();
288
- }
289
- componentWillLoad() {
290
- this.invalidFiles = new Map();
291
- }
292
- fileInputHandler() {
293
- if (this.input.files.length) {
294
- this.invalidFiles = this.checkFiles(Array.from(this.input.files));
295
- }
296
- }
297
- /** get array of uploaded files */
298
- async getFiles() {
299
- return this.files;
300
- }
301
- getType() {
302
- if (utils.getDevice() !== index$1.Device.DESKTOP && utils.getDevice() !== index$1.Device.DESKTOP_WIDE) {
303
- return index$1.ZFileUploadType.DEFAULT;
304
- }
305
- return this.type;
306
- }
307
- handleAccessibility() {
308
- const lastFile = this.el.querySelector("z-file:last-child z-chip button");
309
- if (this.files.length > 0 && lastFile) {
310
- lastFile.focus();
311
- }
312
- else {
313
- this.getType() === index$1.ZFileUploadType.DEFAULT
314
- ? this.button.querySelector("button").focus()
315
- : this.uploadLink.focus();
316
- }
317
- }
318
- checkFiles(files) {
319
- const errors = new Map();
320
- const sizeErrorString = `supera il limite di ${this.fileMaxSize}MB`;
321
- const formatErrorString = " ha un'estensione non prevista";
322
- files.forEach((file) => {
323
- const fileSize = file.size / 1024 / 1024;
324
- const fileFormatOk = this.acceptedFormat
325
- .split(",")
326
- .some((ext) => file.name.toLowerCase().endsWith(ext.trim()));
327
- const fileSizeOk = fileSize <= this.fileMaxSize;
328
- if (fileSizeOk && fileFormatOk) {
329
- if (!this.files.find((f) => f.name === file.name)) {
330
- this.files.push(file);
331
- this.fileInput.emit(file);
332
- this.input.value = "";
333
- }
334
- return;
335
- }
336
- errors.set(file.name, []);
337
- if (!fileSizeOk) {
338
- errors.get(file.name).push(sizeErrorString);
339
- }
340
- if (!fileFormatOk) {
341
- errors.get(file.name).push(formatErrorString);
342
- }
343
- });
344
- return errors;
345
- }
346
- renderTitle() {
347
- return index.h("span", { id: "title" }, this.mainTitle);
348
- }
349
- renderDescription(cssClass) {
350
- return index.h("span", { class: cssClass }, this.description);
351
- }
352
- renderAllowedFileExtensions() {
353
- let fileFormatString = "";
354
- let fileWeightString = "";
355
- if (this.acceptedFormat) {
356
- const fileFormat = this.acceptedFormat
357
- .split(", ")
358
- .map((string) => string.substring(1).toUpperCase())
359
- .join(", ");
360
- fileFormatString = ` nei formati ${fileFormat}`;
361
- }
362
- if (this.fileMaxSize) {
363
- fileWeightString = ` per un massimo di ${this.fileMaxSize}MB di peso`;
364
- }
365
- const finalString = `Puoi allegare file${fileFormatString}${fileWeightString}.`;
366
- return index.h("span", { class: "body-3" }, fileFormatString || fileWeightString ? finalString : null);
367
- }
368
- renderFileSection() {
369
- if (!this.hasFileSection) {
370
- return;
371
- }
372
- return (index.h("section", { class: `files-container ${!this.files.length ? "hidden" : ""}` }, index.h("span", { class: "heading-4-sb" }, "File appena caricati"), index.h("div", { class: "files-wrapper" }, index.h("slot", { name: "files" })), index.h("z-divider", { size: index$1.DividerSize.MEDIUM })));
373
- }
374
- renderInput() {
375
- return (index.h("input", Object.assign({}, this.inputAttributes, { onChange: () => this.fileInputHandler(), accept: this.acceptedFormat, ref: (val) => (this.input = val) })));
376
- }
377
- renderUploadButton() {
378
- return [
379
- this.renderInput(),
380
- index.h("z-button", { onClick: () => this.input.click(), onKeyPress: (e) => {
381
- if (e.code == "Space" || e.code == "Enter") {
382
- e.preventDefault();
383
- this.input.click();
384
- }
385
- }, id: "fileSelect", variant: this.buttonVariant, icon: "upload", ref: (val) => (this.button = val) }, this.uploadBtnLabel),
386
- ];
387
- }
388
- renderUploadLink() {
389
- return [
390
- this.renderInput(),
391
- index.h("span", { class: "body-1 upload-link-text" }, "Trascina o", " ", index.h("span", { tabIndex: 0, class: "body-1-sb upload-link", onClick: () => this.input.click(), onKeyPress: (e) => {
392
- if (e.code == "Space" || e.code == "Enter") {
393
- e.preventDefault();
394
- this.input.click();
395
- }
396
- }, ref: (val) => (this.uploadLink = val) }, "carica"), " ", "dal tuo computer"),
397
- ];
398
- }
399
- renderDefaultMode() {
400
- return [
401
- this.renderDescription("body-3-sb"),
402
- this.renderAllowedFileExtensions(),
403
- this.renderFileSection(),
404
- this.renderUploadButton(),
405
- ];
406
- }
407
- renderDragDropMode() {
408
- return [
409
- this.renderFileSection(),
410
- index.h("z-dragdrop-area", { "drag-and-drop-label": this.dragAndDropLabel }, index.h("div", { class: "text-container" }, this.renderDescription("body-1"), this.renderUploadLink(), this.renderAllowedFileExtensions())),
411
- ];
412
- }
413
- formatErrorString(key, value) {
414
- var _a, _b;
415
- const bothErrors = value[0] && value[1] ? ", ed " : "";
416
- return `Il file ${key} ${(_a = value[0]) !== null && _a !== void 0 ? _a : ""}${bothErrors}${(_b = value[1]) !== null && _b !== void 0 ? _b : ""}.`;
417
- }
418
- handleErrorModalContent() {
419
- return (index.h("div", { slot: "modalContent" }, index.h("div", { class: "modal-wrapper" }, index.h("div", { class: "files" }, Array.from(this.invalidFiles).map(([key, value]) => {
420
- return index.h("span", { class: "body-3" }, this.formatErrorString(key, value));
421
- })))));
422
- }
423
- render() {
424
- return (index.h(index.Host, { key: '46b4fcbc231e01141adf45e82ff89b215b78f973' }, index.h("div", { key: '53fc8651254f42780909ad8d6c9c36311e626dc9', tabIndex: 0, class: `container ${this.getType()}` }, this.mainTitle && this.renderTitle(), this.getType() == index$1.ZFileUploadType.DEFAULT ? this.renderDefaultMode() : this.renderDragDropMode()), !!this.invalidFiles.size && (index.h("z-modal", { modalid: `file-upload-${this.type}-error-modal`, tabIndex: 0, ref: (val) => (this.errorModal = val), modaltitle: "Attenzione", onModalClose: () => (this.invalidFiles = new Map()), onModalBackgroundClick: () => (this.invalidFiles = new Map()) }, this.handleErrorModalContent()))));
425
- }
426
- get el() { return index.getElement(this); }
427
- };
428
- ZFileUpload.style = ZFileUploadStyle0;
429
-
430
- const stylesCss$9 = ":host{margin-right:var(--z-icon-right-margin, 0);margin-left:var(--z-icon-left-margin, 0);line-height:0;vertical-align:middle}:host svg:not([width]){width:var(--z-icon-width, 18px)}:host svg:not([height]){height:var(--z-icon-height, 18px)}";
431
- const ZIconStyle0 = stylesCss$9;
432
-
433
- const ZIcon = class {
434
- constructor(hostRef) {
435
- index.registerInstance(this, hostRef);
436
- this.name = undefined;
437
- this.height = undefined;
438
- this.width = undefined;
439
- this.iconid = undefined;
440
- this.fill = undefined;
441
- }
442
- selectPathOrPolygon(iconValue) {
443
- if (iconValue === null || iconValue === void 0 ? void 0 : iconValue.startsWith("M")) {
444
- return index.h("path", { d: icons.ICONS[this.name] });
445
- }
446
- return index.h("polygon", { points: icons.ICONS[this.name] });
447
- }
448
- render() {
449
- return (index.h(index.Host, { key: '2b01f04c92ac8e4772036eb52aad46a62d46d35c', "aria-hidden": "true" }, index.h("svg", { key: '18067d6877c79af11d5af240d030c8f82531cf6b', viewBox: "0 0 1000 1000", width: this.width, height: this.height, id: this.iconid, fill: this.fill ? `var(--${this.fill})` : "" }, this.selectPathOrPolygon(icons.ICONS[this.name]))));
450
- }
451
- };
452
- ZIcon.style = ZIconStyle0;
453
-
454
- const stylesCss$8 = ".sc-z-input-h{display:inline-block;width:inherit}input.sc-z-input::-ms-clear,input.sc-z-input::-ms-reveal{display:none}.sc-z-input-h input.sc-z-input::-ms-clear,.sc-z-input-h input.sc-z-input::-ms-reveal{display:none}input.sc-z-input,textarea.sc-z-input,.textarea-wrapper.sc-z-input{box-sizing:border-box;border:var(--border-size-small) solid var(--color-surface04);background:var(--color-input-field01);border-radius:var(--border-radius-small);color:var(--color-text01);fill:var(--color-icon02);font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:var(--font-rg);outline:none}[size=\"small\"].sc-z-input-h input.sc-z-input,[size=\"small\"].sc-z-input-h textarea.sc-z-input,[size=\"small\"].sc-z-input-h .textarea-wrapper.sc-z-input,[size=\"x-small\"].sc-z-input-h input.sc-z-input,[size=\"x-small\"].sc-z-input-h textarea.sc-z-input,[size=\"x-small\"].sc-z-input-h .textarea-wrapper.sc-z-input{font-size:var(--font-size-2)}.cursor-select.sc-z-input-h input.sc-z-input{cursor:pointer}.sc-z-input-h:not(.active-select) input.sc-z-input:focus:focus-visible,[readonly=\"false\"].sc-z-input-h .textarea-wrapper.sc-z-input:focus-within{box-shadow:var(--shadow-focus-primary)}input.sc-z-input:focus:focus-visible,textarea.sc-z-input:focus:focus-visible{color:var(--color-input-field02)}.active-select.sc-z-input-h input.sc-z-input{border:var(--border-size-small) solid var(--color-primary01)}.cursor-select.sc-z-input-h input.sc-z-input:focus:focus-visible{box-shadow:var(--shadow-focus-primary)}.sc-z-input-h input[readonly].sc-z-input:focus:focus-visible{box-shadow:none}.filled.sc-z-input{border-color:var(--color-surface05)}.input-success.sc-z-input{border-color:var(--color-success01);background:var(--color-success-inverse);fill:var(--color-success01)}.input-error.sc-z-input{border-color:var(--color-error01);background:var(--color-error-inverse);fill:var(--color-error01)}.input-warning.sc-z-input{border-color:var(--color-warning01);background:var(--color-warning-inverse);fill:var(--color-warning01)}input.sc-z-input:not([readonly]):hover,.textarea-wrapper.sc-z-input:hover{outline:var(--border-size-medium) solid var(--color-surface04);outline-offset:-2px}.sc-z-input-h:not(.active-select) input[readonly].sc-z-input,.readonly.sc-z-input{border-color:var(--color-disabled01);fill:var(--color-disabled01);pointer-events:none}[disabled].sc-z-input-h:not([disabled=\"false\"]) input.sc-z-input,[disabled].sc-z-input-h:not([disabled=\"false\"]) .textarea-wrapper.sc-z-input,[disabled].sc-z-input-h:not([disabled=\"false\"]) z-icon.sc-z-input{border-color:var(--color-disabled01);box-shadow:none;color:var(--color-disabled02);fill:var(--color-disabled01);pointer-events:none}[disabled].sc-z-input-h:not([disabled=\"false\"]) input.sc-z-input:hover{border-width:var(--border-size-small)}input.sc-z-input::placeholder,textarea.sc-z-input::placeholder{color:var(--color-text05)}.sc-z-input::-webkit-textarea-placeholder{color:var(--color-text05)}.sc-z-input:-ms-textarea-placeholder{color:var(--color-text05)}.sc-z-input::placeholder{color:var(--color-text05)}label.input-label.sc-z-input{display:block;padding-bottom:var(--space-unit);color:var(--color-text02);font-family:var(--font-family-sans);font-size:var(--font-size-1);font-weight:var(--font-sb);text-align:left;text-transform:uppercase}[disabled].sc-z-input-h:not([disabled=\"false\"]) label.input-label.sc-z-input{color:var(--color-disabled02)}.text-wrapper.sc-z-input>div.sc-z-input{position:relative;z-index:1;fill:var(--color-icon02)}.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input{width:100%;height:calc(var(--space-unit) * 5.5);box-sizing:border-box;padding:0 calc(var(--space-unit) * 1.5);margin:0}[size=\"small\"].sc-z-input-h .text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input{height:calc(var(--space-unit) * 4.5)}[size=\"x-small\"].sc-z-input-h .text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input{height:calc(var(--space-unit) * 4)}.text-wrapper.sc-z-input>div.sc-z-input>input.has-icon.sc-z-input,.text-wrapper.sc-z-input>div.sc-z-input>input.has-clear-icon.sc-z-input{padding-right:calc(var(--space-unit) * 5.25)}.text-wrapper.sc-z-input>div.sc-z-input>input.has-icon.has-clear-icon.sc-z-input{padding-right:calc(var(--space-unit) * 8)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input{position:absolute;z-index:2;top:50%;right:calc(var(--space-unit) * 1.5);display:flex;pointer-events:none;transform:translateY(-50%)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input{padding:0;border:0;background:none;color:inherit;font:inherit;pointer-events:initial}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input+button.icon-button.sc-z-input{margin-left:calc(var(--space-unit) * 0.5)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.hidden.sc-z-input{display:none}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.reset-icon.sc-z-input,.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.toggle-password-icon.sc-z-input{cursor:pointer}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input>z-icon.sc-z-input{--z-icon-width:18px;--z-icon-height:18px;display:block}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input>z-icon.small.sc-z-input,.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input>z-icon.x-small.sc-z-input{--z-icon-width:16px;--z-icon-height:16px}.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #fff inset;-webkit-text-fill-color:currentcolor}.textarea-wrapper.sc-z-input{padding:calc(var(--space-unit) * 1.5);scrollbar-color:var(--color-primary01) transparent}textarea.sc-z-input::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}textarea.sc-z-input::-webkit-scrollbar-track{background-color:transparent}textarea.sc-z-input::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}textarea.sc-z-input::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}textarea.sc-z-input{width:100%;min-height:132px;padding:0;border:none;margin:0;resize:none}.radio-wrapper.sc-z-input,.checkbox-wrapper.sc-z-input{position:relative;display:inline-flex;flex-direction:row;align-items:center;color:var(--color-text01);fill:var(--color-primary01);font-family:var(--font-family-sans)}.radio-wrapper.sc-z-input:hover,.checkbox-wrapper.sc-z-input:hover{color:var(--color-hover-primary);fill:currentcolor}.radio-wrapper.sc-z-input>input.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input{position:absolute;z-index:-1;opacity:0;pointer-events:none}.radio-wrapper.sc-z-input .radio-label.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input{display:inline-flex;align-items:center;margin:0;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:1;text-transform:inherit}.radio-wrapper.sc-z-input input.sc-z-input:not(:disabled)+.radio-label.sc-z-input,.checkbox-wrapper.sc-z-input input.sc-z-input:not(:disabled)+.checkbox-label.sc-z-input{cursor:pointer}.radio-wrapper.sc-z-input .radio-label.sc-z-input z-icon.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input z-icon.sc-z-input{cursor:pointer;fill:inherit}[size=\"small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input z-icon.sc-z-input,[size=\"small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input z-icon.sc-z-input{--z-icon-width:16px;--z-icon-height:16px}[size=\"small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input,[size=\"small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input{font-size:var(--font-size-2)}[size=\"x-small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input z-icon.sc-z-input,[size=\"x-small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input z-icon.sc-z-input{--z-icon-width:14px;--z-icon-height:14px}[size=\"x-small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input,[size=\"x-small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input{font-size:var(--font-size-1)}.radio-wrapper.sc-z-input .radio-label.after.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input{flex-direction:row}.radio-wrapper.sc-z-input .radio-label.before.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input{flex-direction:row-reverse}.radio-wrapper.sc-z-input .radio-label.after.sc-z-input>span.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input>span.sc-z-input{margin-left:var(--space-unit)}.radio-wrapper.sc-z-input .radio-label.before.sc-z-input>span.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input>span.sc-z-input{margin-right:var(--space-unit)}[size=\"small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.after.sc-z-input>span.sc-z-input,[size=\"small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input>span.sc-z-input,[size=\"x-small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.after.sc-z-input>span.sc-z-input,[size=\"x-small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input>span.sc-z-input{margin-left:calc(var(--space-unit) * 0.5)}[size=\"small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.before.sc-z-input>span.sc-z-input,[size=\"small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input>span.sc-z-input,[size=\"x-small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.before.sc-z-input>span.sc-z-input,[size=\"x-small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input>span.sc-z-input{margin-right:calc(var(--space-unit) * 0.5)}.radio-wrapper.sc-z-input>input.sc-z-input:focus:focus-visible+.radio-label.sc-z-input>z-icon.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:focus:focus-visible+.checkbox-label.sc-z-input>z-icon.sc-z-input{border-radius:var(--border-radius-small);box-shadow:var(--shadow-focus-primary)}.radio-wrapper.sc-z-input>input.sc-z-input:disabled+.radio-label.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:disabled+.checkbox-label.sc-z-input{color:var(--color-disabled02)}.radio-wrapper.sc-z-input>input.sc-z-input:disabled+.radio-label.sc-z-input>z-icon.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:disabled+.checkbox-label.sc-z-input>z-icon.sc-z-input{cursor:default;fill:var(--color-disabled01)}";
455
- const ZInputStyle0 = stylesCss$8;
456
-
457
- const ZInput = class {
458
- constructor(hostRef) {
459
- index.registerInstance(this, hostRef);
460
- this.inputChange = index.createEvent(this, "inputChange", 7);
461
- this.startTyping = index.createEvent(this, "startTyping", 7);
462
- this.stopTyping = index.createEvent(this, "stopTyping", 7);
463
- this.inputCheck = index.createEvent(this, "inputCheck", 7);
464
- this.typingtimeout = 300;
465
- this.htmlid = `id-${utils.randomId()}`;
466
- this.type = undefined;
467
- this.name = undefined;
468
- this.label = undefined;
469
- this.ariaLabel = "";
470
- this.ariaExpanded = undefined;
471
- this.ariaControls = undefined;
472
- this.ariaAutocomplete = undefined;
473
- this.ariaActivedescendant = undefined;
474
- this.value = undefined;
475
- this.disabled = false;
476
- this.readonly = false;
477
- this.required = false;
478
- this.checked = false;
479
- this.placeholder = undefined;
480
- this.htmltitle = undefined;
481
- this.status = undefined;
482
- this.message = true;
483
- this.labelPosition = index$1.LabelPosition.RIGHT;
484
- this.autocomplete = undefined;
485
- this.role = undefined;
486
- this.hasclearicon = true;
487
- this.icon = undefined;
488
- this.min = undefined;
489
- this.minlength = undefined;
490
- this.max = undefined;
491
- this.maxlength = undefined;
492
- this.step = undefined;
493
- this.pattern = undefined;
494
- this.size = index$1.ControlSize.BIG;
495
- this.isTyping = false;
496
- this.passwordHidden = true;
497
- }
498
- inputCheckListener(e) {
499
- const data = e.detail;
500
- switch (this.type) {
501
- case index$1.InputType.RADIO:
502
- if (data.type === index$1.InputType.RADIO && data.name === this.name && data.id !== this.htmlid) {
503
- this.checked = false;
504
- }
505
- break;
506
- }
507
- }
508
- /** get checked status */
509
- async isChecked() {
510
- switch (this.type) {
511
- case index$1.InputType.CHECKBOX:
512
- case index$1.InputType.RADIO:
513
- return this.checked;
514
- default:
515
- console.warn("`isChecked` method is only available for type `checkbox` and `radio`");
516
- return false;
517
- }
518
- }
519
- emitInputChange(value) {
520
- if (!this.isTyping) {
521
- this.emitStartTyping();
522
- }
523
- let validity;
524
- if (this.type === index$1.InputType.TEXTAREA) {
525
- validity = this.getValidity("textarea");
526
- }
527
- else {
528
- validity = this.getValidity("input");
529
- }
530
- this.value = value;
531
- this.inputChange.emit({ value, validity });
532
- clearTimeout(this.timer);
533
- this.timer = setTimeout(() => {
534
- this.emitStopTyping(this.value, validity);
535
- }, this.typingtimeout);
536
- }
537
- emitStartTyping() {
538
- this.isTyping = true;
539
- this.startTyping.emit();
540
- }
541
- emitStopTyping(value, validity) {
542
- this.isTyping = false;
543
- this.stopTyping.emit({
544
- value: value,
545
- validity: validity,
546
- });
547
- }
548
- emitInputCheck(checked) {
549
- this.inputCheck.emit({
550
- id: this.htmlid,
551
- checked: checked,
552
- type: this.type,
553
- name: this.name,
554
- value: this.value,
555
- validity: this.getValidity("input"),
556
- });
557
- }
558
- getValidity(type) {
559
- const input = this.hostElement.querySelector(type);
560
- return input.validity;
561
- }
562
- /* START text/password/email/number */
563
- getTextAttributes() {
564
- return {
565
- id: this.htmlid,
566
- name: this.name,
567
- placeholder: this.placeholder,
568
- value: this.value,
569
- disabled: this.disabled,
570
- readonly: this.readonly,
571
- required: this.required,
572
- title: this.htmltitle,
573
- minlength: this.minlength,
574
- maxlength: this.maxlength,
575
- class: {
576
- [`input-${this.status}`]: !!this.status,
577
- filled: !!this.value,
578
- },
579
- autocomplete: this.autocomplete,
580
- onInput: (e) => this.emitInputChange(e.target.value),
581
- };
582
- }
583
- getNumberAttributes(type) {
584
- if (type != index$1.InputType.NUMBER) {
585
- return;
586
- }
587
- return {
588
- min: this.min,
589
- max: this.max,
590
- step: this.step,
591
- };
592
- }
593
- getPatternAttribute(type) {
594
- if (type != index$1.InputType.PASSWORD &&
595
- type != index$1.InputType.TEXT &&
596
- type != index$1.InputType.TEL &&
597
- type != index$1.InputType.SEARCH &&
598
- type != index$1.InputType.URL &&
599
- type != index$1.InputType.EMAIL) {
600
- return;
601
- }
602
- return {
603
- pattern: this.pattern,
604
- };
605
- }
606
- getRoleAttribute() {
607
- return this.role ? { role: this.role } : {};
608
- }
609
- getAriaAttrubutes() {
610
- const expanded = this.ariaExpanded ? { "aria-expanded": this.ariaExpanded } : {};
611
- const controls = this.ariaControls ? { "aria-controls": this.ariaControls } : {};
612
- const autocomplete = this.ariaAutocomplete ? { "aria-autocomplete": this.ariaAutocomplete } : {};
613
- const activedescendant = this.ariaActivedescendant ? { "aria-activedescendant": this.ariaActivedescendant } : {};
614
- return Object.assign(Object.assign(Object.assign(Object.assign({}, expanded), controls), autocomplete), activedescendant);
615
- }
616
- renderInputText(type = index$1.InputType.TEXT) {
617
- const ariaLabel = this.ariaLabel ? { "aria-label": this.ariaLabel } : {};
618
- const attr = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, this.getTextAttributes()), this.getNumberAttributes(type)), this.getPatternAttribute(type)), ariaLabel), this.getRoleAttribute()), this.getAriaAttrubutes());
619
- if (this.icon || type === index$1.InputType.PASSWORD) {
620
- Object.assign(attr.class, { "has-icon": true });
621
- }
622
- if (this.hasclearicon && type != index$1.InputType.NUMBER) {
623
- Object.assign(attr.class, { "has-clear-icon": true });
624
- }
625
- return (index.h("div", { class: "text-wrapper" }, this.renderLabel(), index.h("div", null, index.h("input", Object.assign({ type: type === index$1.InputType.PASSWORD && !this.passwordHidden ? index$1.InputType.TEXT : type }, attr, { ref: (el) => (this.inputRef = el) })), this.renderIcons()), this.renderMessage()));
626
- }
627
- renderLabel() {
628
- if (!this.label) {
629
- return;
630
- }
631
- return (index.h("label", { class: "input-label body-5-sb", id: `${this.htmlid}_label`, htmlFor: this.htmlid }, this.label));
632
- }
633
- renderIcons() {
634
- return (index.h("span", { class: "icons-wrapper" }, this.renderResetIcon(), this.renderIcon()));
635
- }
636
- renderIcon() {
637
- if (this.type === index$1.InputType.PASSWORD) {
638
- return this.renderShowHidePassword();
639
- }
640
- if (!this.icon) {
641
- return;
642
- }
643
- return (index.h("button", { type: "button", class: "icon-button input-icon", tabIndex: -1, "aria-hidden": "true" }, index.h("z-icon", { name: this.icon, class: this.size })));
644
- }
645
- renderResetIcon() {
646
- let hidden = false;
647
- if (!this.hasclearicon || !this.value || this.disabled || this.readonly || this.type == index$1.InputType.NUMBER) {
648
- hidden = true;
649
- }
650
- return (index.h("button", { type: "button", class: `icon-button reset-icon ${hidden ? "hidden" : ""}`, "aria-label": "cancella il contenuto dell'input", onClick: () => {
651
- this.inputRef.value = "";
652
- this.emitInputChange("");
653
- } }, index.h("z-icon", { name: "multiply", class: this.size })));
654
- }
655
- renderShowHidePassword() {
656
- return (index.h("button", { type: "button", class: "icon-button toggle-password-icon", disabled: this.disabled, "aria-label": this.passwordHidden ? "mostra password" : "nascondi password", onClick: () => (this.passwordHidden = !this.passwordHidden) }, index.h("z-icon", { name: this.passwordHidden ? "view-filled" : "view-off-filled", class: this.size })));
657
- }
658
- renderMessage() {
659
- if (utils.boolean(this.message) === false) {
660
- return;
661
- }
662
- return (index.h("z-input-message", { message: utils.boolean(this.message) === true ? undefined : this.message, status: this.status, class: this.size }));
663
- }
664
- /* END text/password/email/number */
665
- /* START textarea */
666
- renderTextarea() {
667
- const attributes = this.getTextAttributes();
668
- const ariaLabel = this.ariaLabel ? { "aria-label": this.ariaLabel } : {};
669
- return (index.h("div", { class: "text-wrapper" }, this.renderLabel(), index.h("div", { class: Object.assign(Object.assign({}, attributes.class), { "textarea-wrapper": true, "readonly": attributes.readonly }) }, index.h("textarea", Object.assign({}, attributes, ariaLabel, this.getRoleAttribute()))), this.renderMessage()));
670
- }
671
- /* END textarea */
672
- handleCheck(ev) {
673
- this.checked = ev.target.checked;
674
- this.emitInputCheck(this.checked);
675
- }
676
- /* START checkbox */
677
- renderCheckbox() {
678
- return (index.h("div", { class: "checkbox-wrapper" }, index.h("input", Object.assign({ id: this.htmlid, type: "checkbox", name: this.name, checked: this.checked, disabled: this.disabled, readonly: this.readonly, required: this.required, onChange: this.handleCheck.bind(this), value: this.value }, this.getRoleAttribute())), index.h("label", { htmlFor: this.htmlid, class: {
679
- "checkbox-label": true,
680
- "after": this.labelPosition === index$1.LabelPosition.RIGHT,
681
- "before": this.labelPosition === index$1.LabelPosition.LEFT,
682
- } }, index.h("z-icon", { name: this.checked ? "checkbox-checked" : "checkbox", "aria-hidden": "true", class: this.size }), this.label && index.h("span", { innerHTML: this.label }))));
683
- }
684
- /* END checkbox */
685
- /* START radio */
686
- renderRadio() {
687
- return (index.h("div", { class: "radio-wrapper" }, index.h("input", Object.assign({ id: this.htmlid, type: "radio", name: this.name, checked: this.checked, disabled: this.disabled, readonly: this.readonly, onChange: this.handleCheck.bind(this), value: this.value }, this.getRoleAttribute())), index.h("label", { htmlFor: this.htmlid, class: {
688
- "radio-label": true,
689
- "after": this.labelPosition === index$1.LabelPosition.RIGHT,
690
- "before": this.labelPosition === index$1.LabelPosition.LEFT,
691
- } }, index.h("z-icon", { name: this.checked ? "radio-button-checked" : "radio-button", "aria-hidden": "true", class: this.size }), this.label && index.h("span", { innerHTML: this.label }))));
692
- }
693
- /* END radio */
694
- render() {
695
- let input;
696
- switch (this.type) {
697
- case index$1.InputType.TEXTAREA:
698
- input = this.renderTextarea();
699
- break;
700
- case index$1.InputType.CHECKBOX:
701
- input = this.renderCheckbox();
702
- break;
703
- case index$1.InputType.RADIO:
704
- input = this.renderRadio();
705
- break;
706
- default:
707
- input = this.renderInputText(this.type);
708
- }
709
- return index.h(index.Host, { key: '67a39cc20219fa02de2cca264a5d51428f4359f3' }, input);
710
- }
711
- get hostElement() { return index.getElement(this); }
712
- };
713
- ZInput.style = ZInputStyle0;
714
-
715
- const stylesCss$7 = ":host{display:flex;min-height:calc(var(--space-unit) * 2.5);align-items:start;margin-top:var(--space-unit);color:var(--color-text05);fill:currentcolor;font-family:var(--font-family-sans);font-size:var(--font-size-2);letter-spacing:0.16px}:host(.small),:host(.x-small){margin-top:calc(var(--space-unit) * 0.5);font-size:var(--font-size-1)}:host([status=\"success\"]){color:var(--color-text-success)}:host([status=\"error\"]){color:var(--color-text-error)}:host([status=\"warning\"]){color:var(--color-warning02)}:host(:focus){outline:none}:host>z-icon{--z-icon-width:calc(var(--space-unit) * 2);--z-icon-height:calc(var(--space-unit) * 2);--z-icon-right-margin:var(--space-unit);margin-top:calc(var(--space-unit) * 0.25)}:host(.small)>z-icon,:host(.x-small)>z-icon{--z-icon-width:14px;--z-icon-height:14px;--z-icon-right-margin:calc(var(--space-unit) * 0.5)}";
716
- const ZInputMessageStyle0 = stylesCss$7;
717
-
718
- const ZInputMessage = class {
719
- constructor(hostRef) {
720
- index.registerInstance(this, hostRef);
721
- this.statusIcons = {
722
- success: "checkmark-circle",
723
- error: "multiply-circled",
724
- warning: "exclamation-circle",
725
- };
726
- this.message = undefined;
727
- this.status = undefined;
728
- this.statusRole = {};
729
- }
730
- onMessageChange() {
731
- this.statusRole = this.message && this.status ? { role: "alert" } : {};
732
- }
733
- componentWillLoad() {
734
- this.onMessageChange();
735
- }
736
- render() {
737
- return (index.h(index.Host, Object.assign({ key: '7cb2d7df7604fbc5801ce1eb9142155a4905861d' }, this.statusRole, { "aria-label": this.message }), this.statusIcons[this.status] && this.message && index.h("z-icon", { name: this.statusIcons[this.status] }), index.h("span", { key: 'd1734748c3be02eba1d40526855bc4ea69e454f8', innerHTML: this.message })));
738
- }
739
- static get watchers() { return {
740
- "message": ["onMessageChange"],
741
- "status": ["onMessageChange"]
742
- }; }
743
- };
744
- ZInputMessage.style = ZInputMessageStyle0;
745
-
746
- const stylesCss$6 = ":host{display:flex;flex-direction:column;font-family:var(--font-family-sans);font-weight:var(--font-rg)}";
747
- const ZListStyle0 = stylesCss$6;
748
-
749
- const ZList = class {
750
- constructor(hostRef) {
751
- index.registerInstance(this, hostRef);
752
- this.size = index$1.ListSize.MEDIUM;
753
- this.listType = index$1.ListType.NONE;
754
- this.role = "list";
755
- }
756
- setChildrenSizeType() {
757
- const children = this.host.children;
758
- for (let i = 0; i < children.length; i++) {
759
- children[i].setAttribute("size", this.size);
760
- children[i].setAttribute("list-type", this.listType);
761
- children[i].setAttribute("list-element-position", (i + 1).toString());
762
- }
763
- }
764
- componentDidLoad() {
765
- this.setChildrenSizeType();
766
- }
767
- render() {
768
- return (index.h(index.Host, { key: '2593adc6912a0a49a9e38eadd5056d779cac33b4' }, index.h("slot", { key: '5fb99c0f4cad9633c84d2c353334fc5c816be5a5' })));
769
- }
770
- get host() { return index.getElement(this); }
771
- };
772
- ZList.style = ZListStyle0;
773
-
774
- const stylesCss$5 = ":host{outline:none}:host>.container,:host>.container-contextual-menu{--background-color-list-element:var(--color-surface01);--background-hover-color-list-element:var(--color-surface02);--background-active-color-list-element:var(--color-surface02);display:flex;box-sizing:border-box;flex-direction:column;justify-content:center;font-family:var(--font-family-sans);font-weight:var(--font-rg);outline:none}:host([size=\"small\"])>.container{min-height:calc(var(--space-unit) * 4);padding:calc(var(--space-unit) / 2) 0}:host([size=\"medium\"])>.container{min-height:calc(var(--space-unit) * 5);padding:var(--space-unit) 0}:host([size=\"large\"])>.container{min-height:calc(var(--space-unit) * 7);padding:calc(var(--space-unit) * 2) 0}:host([size=\"x-large\"])>.container{min-height:calc(var(--space-unit) * 9);padding:calc(var(--space-unit) * 3) 0}:host([expandable])>.container,:host([expandable])>.container-contextual-menu,:host([clickable])>.container,:host([clickable])>.container-contextual-menu{cursor:pointer}:host([expandable]:hover)>.container,:host([expandable]:hover)>.container-contextual-menu,:host([clickable]:hover)>.container,:host([clickable]:hover)>.container-contextual-menu{background-color:var(--background-hover-color-list-element)}:host([expandable]:focus:focus-visible)>.container,:host([expandable]:focus:focus-visible)>.container-contextual-menu,:host([clickable]:focus:focus-visible)>.container,:host([clickable]:focus:focus-visible)>.container-contextual-menu{box-shadow:var(--shadow-focus-primary)}:host([clickable]:not([expandable]))>.container.clicked,:host([clickable]:not([expandable]))>.container-contextual-menu.clicked{box-shadow:var(--shadow-focus-primary)}:host([expandable]:active)>.container,:host([expandable]:active)>.container-contextual-menu,:host([clickable]:active)>.container,:host([clickable]:active)>.container-contextual-menu{background-color:var(--background-active-color-list-element)}:host([align-button=\"left\"][expandable])>.container>.z-list-element-container,:host([align-button=\"left\"][expandable])>.container-contextual-menu>.z-list-element-container{display:flex}:host([align-button=\"right\"][expandable])>.container>.z-list-element-container,:host([align-button=\"right\"][expandable])>.container-contextual-menu>.z-list-element-container{display:flex;flex-direction:row-reverse;justify-content:space-between}:host([align-button=\"left\"][expandable])>.container>.z-list-element-container>z-icon,:host([align-button=\"left\"][expandable])>.container-contextual-menu>.z-list-element-container>z-icon{margin-right:var(--space-unit)}:host([align-button=\"right\"][expandable])>.container>.z-list-element-container>z-icon,:host([align-button=\"right\"][expandable])>.container-contextual-menu>.z-list-element-container>z-icon{margin-left:var(--space-unit)}:host>.container>.z-list-element-inner-container,:host>.container-contextual-menu>.z-list-element-inner-container{display:none}:host>.container>.z-list-element-inner-container.expanded,:host>.container-contextual-menu>.z-list-element-inner-container.expanded{display:block}:host([clickable]:hover)>.container-contextual-menu{background-color:var(--color-surface03)}.container-contextual-menu:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}.z-list-content-container{display:flex;align-items:center}";
775
- const ZListElementStyle0 = stylesCss$5;
776
-
777
- const ZListElement = class {
778
- accessibleFocusHandler(e) {
779
- if (this.listElementId === e.detail) {
780
- const toFocus = this.host.shadowRoot.getElementById(`z-list-element-id-${e.detail}`);
781
- toFocus.focus();
782
- }
783
- }
784
- /**
785
- * Constructor.
786
- */
787
- constructor(hostRef) {
788
- index.registerInstance(this, hostRef);
789
- this.accessibleFocus = index.createEvent(this, "accessibleFocus", 7);
790
- this.ariaDescendantFocus = index.createEvent(this, "ariaDescendantFocus", 7);
791
- this.clickItem = index.createEvent(this, "clickItem", 7);
792
- this.openElementConfig = {
793
- accordion: {
794
- open: "minus-circled",
795
- close: "plus-circled",
796
- },
797
- menu: {
798
- open: "chevron-up",
799
- close: "chevron-down",
800
- },
801
- };
802
- this.alignButton = index$1.ExpandableListButtonAlign.LEFT;
803
- this.clickable = false;
804
- this.dividerColor = "color-surface03";
805
- this.dividerType = index$1.ListDividerType.NONE;
806
- this.dividerSize = index$1.DividerSize.SMALL;
807
- this.expandable = false;
808
- this.expandableStyle = index$1.ExpandableListStyle.ACCORDION;
809
- this.listElementId = undefined;
810
- this.size = index$1.ListSize.MEDIUM;
811
- this.color = "none";
812
- this.disabled = false;
813
- this.isContextualMenu = false;
814
- this.listElementPosition = "0";
815
- this.listType = index$1.ListType.NONE;
816
- this.role = "listitem";
817
- this.showInnerContent = false;
818
- this.handleClick = this.handleClick.bind(this);
819
- this.handleKeyDown = this.handleKeyDown.bind(this);
820
- }
821
- /**
822
- * Handler for click on element. If element is expandable, change state.
823
- * @returns void
824
- */
825
- handleClick() {
826
- this.clickItem.emit(this.listElementId);
827
- if (!this.expandable) {
828
- return;
829
- }
830
- this.showInnerContent = !this.showInnerContent;
831
- }
832
- calculateClass() {
833
- if (this.isContextualMenu) {
834
- return "container-contextual-menu";
835
- }
836
- return "container";
837
- }
838
- handleKeyDown(event) {
839
- const expandByKey = event.code === index$1.KeyboardCode.ENTER;
840
- switch (event.code) {
841
- case index$1.KeyboardCode.ARROW_DOWN:
842
- event.preventDefault();
843
- this.accessibleFocus.emit(this.listElementId + 1);
844
- break;
845
- case index$1.KeyboardCode.ARROW_UP:
846
- event.preventDefault();
847
- this.accessibleFocus.emit(this.listElementId - 1);
848
- break;
849
- case index$1.KeyboardCode.ENTER:
850
- event.preventDefault();
851
- this.clickItem.emit(this.listElementId);
852
- break;
853
- }
854
- if (!this.expandable || !expandByKey) {
855
- return;
856
- }
857
- this.showInnerContent = !this.showInnerContent;
858
- }
859
- /**
860
- * Renders button to expand element.
861
- * @returns expadable button
862
- */
863
- renderExpandableButton() {
864
- if (!this.expandable) {
865
- return null;
866
- }
867
- return (index.h("z-icon", { name: this.showInnerContent
868
- ? this.openElementConfig[this.expandableStyle].open
869
- : this.openElementConfig[this.expandableStyle].close }));
870
- }
871
- /**
872
- * Renders expanded content if element is expandable.
873
- * @returns expanded content
874
- */
875
- renderExpandedContent() {
876
- if (!this.expandable) {
877
- return null;
878
- }
879
- return (index.h("div", { class: {
880
- "z-list-element-inner-container": true,
881
- "expanded": this.showInnerContent,
882
- } }, index.h("slot", { name: "inner-content" })));
883
- }
884
- /**
885
- * Renders content of the z-list-element
886
- * @returns list content
887
- */
888
- renderContent() {
889
- if (this.listType === index$1.ListType.NONE) {
890
- return index.h("slot", null);
891
- }
892
- if (this.listType === index$1.ListType.ORDERED) {
893
- return (index.h("div", { class: "z-list-content-container" }, index.h("div", null, this.listElementPosition, ".\u2003"), index.h("slot", null)));
894
- }
895
- if (this.listType === index$1.ListType.UNORDERED) {
896
- return (index.h("div", { class: "z-list-content-container" }, index.h("span", null, "\u2022\u2003"), index.h("slot", null)));
897
- }
898
- }
899
- render() {
900
- return (index.h(index.Host, { key: '3c55ce5744a82e1b1871f658d0d63dc49a55fbba', "aria-expanded": this.expandable ? this.showInnerContent : null, onClick: this.handleClick, onFocus: () => this.ariaDescendantFocus.emit(this.listElementId), onKeyDown: this.handleKeyDown, clickable: this.clickable && !this.disabled, tabIndex: !this.isContextualMenu ? "0" : null }, index.h("div", { key: 'f9ccf0529e72d61ffed2f8da94461b6d0d904447', class: `${this.calculateClass()}`, style: { color: `var(--${this.color})` }, tabindex: this.isContextualMenu ? "0" : "-1", id: `z-list-element-id-${this.listElementId}`, part: "list-item-container" }, index.h("div", { key: '9747b70e158f1e0a50bd392bc11724df0951196e', class: "z-list-element-container" }, this.renderExpandableButton(), this.renderContent()), this.renderExpandedContent()), this.dividerType === index$1.ListDividerType.ELEMENT && (index.h("z-divider", { color: this.dividerColor, size: this.dividerSize }))));
901
- }
902
- get host() { return index.getElement(this); }
903
- };
904
- ZListElement.style = ZListElementStyle0;
905
-
906
- const stylesCss$4 = ":host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.z-list-group-header-container{color:var(--gray700);font-size:var(--font-size-2);font-weight:var(--font-sb) !important;letter-spacing:0.16px;line-height:1.4}:host>.z-list-group-header-container.has-header{padding-top:var(--space-unit);padding-bottom:var(--space-unit)}:host>.z-list-group-header-container.has-header>z-divider{margin-top:var(--space-unit)}";
907
- const ZListGroupStyle0 = stylesCss$4;
908
-
909
- const ZListGroup = class {
910
- constructor(hostRef) {
911
- index.registerInstance(this, hostRef);
912
- this.size = index$1.ListSize.MEDIUM;
913
- this.dividerType = index$1.ListDividerType.NONE;
914
- this.dividerSize = index$1.DividerSize.SMALL;
915
- this.dividerColor = "gray200";
916
- this.listType = index$1.ListType.NONE;
917
- }
918
- componentDidLoad() {
919
- const children = this.host.children;
920
- for (let i = 0; i < children.length; i++) {
921
- if (children.length - 1 > i) {
922
- children[i].setAttribute("divider-type", this.dividerType);
923
- children[i].setAttribute("divider-size", this.dividerSize);
924
- children[i].setAttribute("divider-color", this.dividerColor);
925
- }
926
- children[i].setAttribute("size", this.size);
927
- children[i].setAttribute("list-type", this.listType);
928
- children[i].setAttribute("list-element-position", i.toString());
929
- }
930
- }
931
- componentWillLoad() {
932
- this.hasHeader = !!this.host.querySelector('[slot="header-title"]');
933
- }
934
- render() {
935
- return (index.h(index.Host, { key: 'c25db9a48f30bf98694c87dce08463ac6b314719', role: "group" }, index.h("div", { key: '354ea1928b4f2e58b46ef2eb18e84234e9db2cd9', class: {
936
- "z-list-group-header-container": true,
937
- "has-header": this.hasHeader,
938
- } }, index.h("slot", { key: '48b577a0a6b35ab74eb9b70c53dd9462ab57e92d', name: "header-title" }), this.dividerType === index$1.ListDividerType.HEADER && (index.h("z-divider", { color: this.dividerColor, size: this.dividerSize }))), index.h("slot", { key: '407e9151406fdc7f01b0ba40a69bd0516d5cc1f4' })));
939
- }
940
- get host() { return index.getElement(this); }
941
- };
942
- ZListGroup.style = ZListGroupStyle0;
943
-
944
- // nb. This is for IE10 and lower _only_.
945
- var supportCustomEvent = window.CustomEvent;
946
- if (!supportCustomEvent || typeof supportCustomEvent === 'object') {
947
- supportCustomEvent = function CustomEvent(event, x) {
948
- x = x || {};
949
- var ev = document.createEvent('CustomEvent');
950
- ev.initCustomEvent(event, !!x.bubbles, !!x.cancelable, x.detail || null);
951
- return ev;
952
- };
953
- supportCustomEvent.prototype = window.Event.prototype;
954
- }
955
-
956
- /**
957
- * Dispatches the passed event to both an "on<type>" handler as well as via the
958
- * normal dispatch operation. Does not bubble.
959
- *
960
- * @param {!EventTarget} target
961
- * @param {!Event} event
962
- * @return {boolean}
963
- */
964
- function safeDispatchEvent(target, event) {
965
- var check = 'on' + event.type.toLowerCase();
966
- if (typeof target[check] === 'function') {
967
- target[check](event);
968
- }
969
- return target.dispatchEvent(event);
970
- }
971
-
972
- /**
973
- * @param {Element} el to check for stacking context
974
- * @return {boolean} whether this el or its parents creates a stacking context
975
- */
976
- function createsStackingContext(el) {
977
- while (el && el !== document.body) {
978
- var s = window.getComputedStyle(el);
979
- var invalid = function(k, ok) {
980
- return !(s[k] === undefined || s[k] === ok);
981
- };
982
-
983
- if (s.opacity < 1 ||
984
- invalid('zIndex', 'auto') ||
985
- invalid('transform', 'none') ||
986
- invalid('mixBlendMode', 'normal') ||
987
- invalid('filter', 'none') ||
988
- invalid('perspective', 'none') ||
989
- s['isolation'] === 'isolate' ||
990
- s.position === 'fixed' ||
991
- s.webkitOverflowScrolling === 'touch') {
992
- return true;
993
- }
994
- el = el.parentElement;
995
- }
996
- return false;
997
- }
998
-
999
- /**
1000
- * Finds the nearest <dialog> from the passed element.
1001
- *
1002
- * @param {Element} el to search from
1003
- * @return {HTMLDialogElement} dialog found
1004
- */
1005
- function findNearestDialog(el) {
1006
- while (el) {
1007
- if (el.localName === 'dialog') {
1008
- return /** @type {HTMLDialogElement} */ (el);
1009
- }
1010
- if (el.parentElement) {
1011
- el = el.parentElement;
1012
- } else if (el.parentNode) {
1013
- el = el.parentNode.host;
1014
- } else {
1015
- el = null;
1016
- }
1017
- }
1018
- return null;
1019
- }
1020
-
1021
- /**
1022
- * Blur the specified element, as long as it's not the HTML body element.
1023
- * This works around an IE9/10 bug - blurring the body causes Windows to
1024
- * blur the whole application.
1025
- *
1026
- * @param {Element} el to blur
1027
- */
1028
- function safeBlur(el) {
1029
- // Find the actual focused element when the active element is inside a shadow root
1030
- while (el && el.shadowRoot && el.shadowRoot.activeElement) {
1031
- el = el.shadowRoot.activeElement;
1032
- }
1033
-
1034
- if (el && el.blur && el !== document.body) {
1035
- el.blur();
1036
- }
1037
- }
1038
-
1039
- /**
1040
- * @param {!NodeList} nodeList to search
1041
- * @param {Node} node to find
1042
- * @return {boolean} whether node is inside nodeList
1043
- */
1044
- function inNodeList(nodeList, node) {
1045
- for (var i = 0; i < nodeList.length; ++i) {
1046
- if (nodeList[i] === node) {
1047
- return true;
1048
- }
1049
- }
1050
- return false;
1051
- }
1052
-
1053
- /**
1054
- * @param {HTMLFormElement} el to check
1055
- * @return {boolean} whether this form has method="dialog"
1056
- */
1057
- function isFormMethodDialog(el) {
1058
- if (!el || !el.hasAttribute('method')) {
1059
- return false;
1060
- }
1061
- return el.getAttribute('method').toLowerCase() === 'dialog';
1062
- }
1063
-
1064
- /**
1065
- * @param {!DocumentFragment|!Element} hostElement
1066
- * @return {?Element}
1067
- */
1068
- function findFocusableElementWithin(hostElement) {
1069
- // Note that this is 'any focusable area'. This list is probably not exhaustive, but the
1070
- // alternative involves stepping through and trying to focus everything.
1071
- var opts = ['button', 'input', 'keygen', 'select', 'textarea'];
1072
- var query = opts.map(function(el) {
1073
- return el + ':not([disabled])';
1074
- });
1075
- // TODO(samthor): tabindex values that are not numeric are not focusable.
1076
- query.push('[tabindex]:not([disabled]):not([tabindex=""])'); // tabindex != "", not disabled
1077
- var target = hostElement.querySelector(query.join(', '));
1078
-
1079
- if (!target && 'attachShadow' in Element.prototype) {
1080
- // If we haven't found a focusable target, see if the host element contains an element
1081
- // which has a shadowRoot.
1082
- // Recursively search for the first focusable item in shadow roots.
1083
- var elems = hostElement.querySelectorAll('*');
1084
- for (var i = 0; i < elems.length; i++) {
1085
- if (elems[i].tagName && elems[i].shadowRoot) {
1086
- target = findFocusableElementWithin(elems[i].shadowRoot);
1087
- if (target) {
1088
- break;
1089
- }
1090
- }
1091
- }
1092
- }
1093
- return target;
1094
- }
1095
-
1096
- /**
1097
- * Determines if an element is attached to the DOM.
1098
- * @param {Element} element to check
1099
- * @return {boolean} whether the element is in DOM
1100
- */
1101
- function isConnected(element) {
1102
- return element.isConnected || document.body.contains(element);
1103
- }
1104
-
1105
- /**
1106
- * @param {!Event} event
1107
- * @return {?Element}
1108
- */
1109
- function findFormSubmitter(event) {
1110
- if (event.submitter) {
1111
- return event.submitter;
1112
- }
1113
-
1114
- var form = event.target;
1115
- if (!(form instanceof HTMLFormElement)) {
1116
- return null;
1117
- }
1118
-
1119
- var submitter = dialogPolyfill.formSubmitter;
1120
- if (!submitter) {
1121
- var target = event.target;
1122
- var root = ('getRootNode' in target && target.getRootNode() || document);
1123
- submitter = root.activeElement;
1124
- }
1125
-
1126
- if (!submitter || submitter.form !== form) {
1127
- return null;
1128
- }
1129
- return submitter;
1130
- }
1131
-
1132
- /**
1133
- * @param {!Event} event
1134
- */
1135
- function maybeHandleSubmit(event) {
1136
- if (event.defaultPrevented) {
1137
- return;
1138
- }
1139
- var form = /** @type {!HTMLFormElement} */ (event.target);
1140
-
1141
- // We'd have a value if we clicked on an imagemap.
1142
- var value = dialogPolyfill.imagemapUseValue;
1143
- var submitter = findFormSubmitter(event);
1144
- if (value === null && submitter) {
1145
- value = submitter.value;
1146
- }
1147
-
1148
- // There should always be a dialog as this handler is added specifically on them, but check just
1149
- // in case.
1150
- var dialog = findNearestDialog(form);
1151
- if (!dialog) {
1152
- return;
1153
- }
1154
-
1155
- // Prefer formmethod on the button.
1156
- var formmethod = submitter && submitter.getAttribute('formmethod') || form.getAttribute('method');
1157
- if (formmethod !== 'dialog') {
1158
- return;
1159
- }
1160
- event.preventDefault();
1161
-
1162
- if (value != null) {
1163
- // nb. we explicitly check against null/undefined
1164
- dialog.close(value);
1165
- } else {
1166
- dialog.close();
1167
- }
1168
- }
1169
-
1170
- /**
1171
- * @param {!HTMLDialogElement} dialog to upgrade
1172
- * @constructor
1173
- */
1174
- function dialogPolyfillInfo(dialog) {
1175
- this.dialog_ = dialog;
1176
- this.replacedStyleTop_ = false;
1177
- this.openAsModal_ = false;
1178
-
1179
- // Set a11y role. Browsers that support dialog implicitly know this already.
1180
- if (!dialog.hasAttribute('role')) {
1181
- dialog.setAttribute('role', 'dialog');
1182
- }
1183
-
1184
- dialog.show = this.show.bind(this);
1185
- dialog.showModal = this.showModal.bind(this);
1186
- dialog.close = this.close.bind(this);
1187
-
1188
- dialog.addEventListener('submit', maybeHandleSubmit, false);
1189
-
1190
- if (!('returnValue' in dialog)) {
1191
- dialog.returnValue = '';
1192
- }
1193
-
1194
- if ('MutationObserver' in window) {
1195
- var mo = new MutationObserver(this.maybeHideModal.bind(this));
1196
- mo.observe(dialog, {attributes: true, attributeFilter: ['open']});
1197
- } else {
1198
- // IE10 and below support. Note that DOMNodeRemoved etc fire _before_ removal. They also
1199
- // seem to fire even if the element was removed as part of a parent removal. Use the removed
1200
- // events to force downgrade (useful if removed/immediately added).
1201
- var removed = false;
1202
- var cb = function() {
1203
- removed ? this.downgradeModal() : this.maybeHideModal();
1204
- removed = false;
1205
- }.bind(this);
1206
- var timeout;
1207
- var delayModel = function(ev) {
1208
- if (ev.target !== dialog) { return; } // not for a child element
1209
- var cand = 'DOMNodeRemoved';
1210
- removed |= (ev.type.substr(0, cand.length) === cand);
1211
- window.clearTimeout(timeout);
1212
- timeout = window.setTimeout(cb, 0);
1213
- };
1214
- ['DOMAttrModified', 'DOMNodeRemoved', 'DOMNodeRemovedFromDocument'].forEach(function(name) {
1215
- dialog.addEventListener(name, delayModel);
1216
- });
1217
- }
1218
- // Note that the DOM is observed inside DialogManager while any dialog
1219
- // is being displayed as a modal, to catch modal removal from the DOM.
1220
-
1221
- Object.defineProperty(dialog, 'open', {
1222
- set: this.setOpen.bind(this),
1223
- get: dialog.hasAttribute.bind(dialog, 'open')
1224
- });
1225
-
1226
- this.backdrop_ = document.createElement('div');
1227
- this.backdrop_.className = 'backdrop';
1228
- this.backdrop_.addEventListener('mouseup' , this.backdropMouseEvent_.bind(this));
1229
- this.backdrop_.addEventListener('mousedown', this.backdropMouseEvent_.bind(this));
1230
- this.backdrop_.addEventListener('click' , this.backdropMouseEvent_.bind(this));
1231
- }
1232
-
1233
- dialogPolyfillInfo.prototype = /** @type {HTMLDialogElement.prototype} */ ({
1234
-
1235
- get dialog() {
1236
- return this.dialog_;
1237
- },
1238
-
1239
- /**
1240
- * Maybe remove this dialog from the modal top layer. This is called when
1241
- * a modal dialog may no longer be tenable, e.g., when the dialog is no
1242
- * longer open or is no longer part of the DOM.
1243
- */
1244
- maybeHideModal: function() {
1245
- if (this.dialog_.hasAttribute('open') && isConnected(this.dialog_)) { return; }
1246
- this.downgradeModal();
1247
- },
1248
-
1249
- /**
1250
- * Remove this dialog from the modal top layer, leaving it as a non-modal.
1251
- */
1252
- downgradeModal: function() {
1253
- if (!this.openAsModal_) { return; }
1254
- this.openAsModal_ = false;
1255
- this.dialog_.style.zIndex = '';
1256
-
1257
- // This won't match the native <dialog> exactly because if the user set top on a centered
1258
- // polyfill dialog, that top gets thrown away when the dialog is closed. Not sure it's
1259
- // possible to polyfill this perfectly.
1260
- if (this.replacedStyleTop_) {
1261
- this.dialog_.style.top = '';
1262
- this.replacedStyleTop_ = false;
1263
- }
1264
-
1265
- // Clear the backdrop and remove from the manager.
1266
- this.backdrop_.parentNode && this.backdrop_.parentNode.removeChild(this.backdrop_);
1267
- dialogPolyfill.dm.removeDialog(this);
1268
- },
1269
-
1270
- /**
1271
- * @param {boolean} value whether to open or close this dialog
1272
- */
1273
- setOpen: function(value) {
1274
- if (value) {
1275
- this.dialog_.hasAttribute('open') || this.dialog_.setAttribute('open', '');
1276
- } else {
1277
- this.dialog_.removeAttribute('open');
1278
- this.maybeHideModal(); // nb. redundant with MutationObserver
1279
- }
1280
- },
1281
-
1282
- /**
1283
- * Handles mouse events ('mouseup', 'mousedown', 'click') on the fake .backdrop element, redirecting them as if
1284
- * they were on the dialog itself.
1285
- *
1286
- * @param {!Event} e to redirect
1287
- */
1288
- backdropMouseEvent_: function(e) {
1289
- if (!this.dialog_.hasAttribute('tabindex')) {
1290
- // Clicking on the backdrop should move the implicit cursor, even if dialog cannot be
1291
- // focused. Create a fake thing to focus on. If the backdrop was _before_ the dialog, this
1292
- // would not be needed - clicks would move the implicit cursor there.
1293
- var fake = document.createElement('div');
1294
- this.dialog_.insertBefore(fake, this.dialog_.firstChild);
1295
- fake.tabIndex = -1;
1296
- fake.focus();
1297
- this.dialog_.removeChild(fake);
1298
- } else {
1299
- this.dialog_.focus();
1300
- }
1301
-
1302
- var redirectedEvent = document.createEvent('MouseEvents');
1303
- redirectedEvent.initMouseEvent(e.type, e.bubbles, e.cancelable, window,
1304
- e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey,
1305
- e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);
1306
- this.dialog_.dispatchEvent(redirectedEvent);
1307
- e.stopPropagation();
1308
- },
1309
-
1310
- /**
1311
- * Focuses on the first focusable element within the dialog. This will always blur the current
1312
- * focus, even if nothing within the dialog is found.
1313
- */
1314
- focus_: function() {
1315
- // Find element with `autofocus` attribute, or fall back to the first form/tabindex control.
1316
- var target = this.dialog_.querySelector('[autofocus]:not([disabled])');
1317
- if (!target && this.dialog_.tabIndex >= 0) {
1318
- target = this.dialog_;
1319
- }
1320
- if (!target) {
1321
- target = findFocusableElementWithin(this.dialog_);
1322
- }
1323
- safeBlur(document.activeElement);
1324
- target && target.focus();
1325
- },
1326
-
1327
- /**
1328
- * Sets the zIndex for the backdrop and dialog.
1329
- *
1330
- * @param {number} dialogZ
1331
- * @param {number} backdropZ
1332
- */
1333
- updateZIndex: function(dialogZ, backdropZ) {
1334
- if (dialogZ < backdropZ) {
1335
- throw new Error('dialogZ should never be < backdropZ');
1336
- }
1337
- this.dialog_.style.zIndex = dialogZ;
1338
- this.backdrop_.style.zIndex = backdropZ;
1339
- },
1340
-
1341
- /**
1342
- * Shows the dialog. If the dialog is already open, this does nothing.
1343
- */
1344
- show: function() {
1345
- if (!this.dialog_.open) {
1346
- this.setOpen(true);
1347
- this.focus_();
1348
- }
1349
- },
1350
-
1351
- /**
1352
- * Show this dialog modally.
1353
- */
1354
- showModal: function() {
1355
- if (this.dialog_.hasAttribute('open')) {
1356
- throw new Error('Failed to execute \'showModal\' on dialog: The element is already open, and therefore cannot be opened modally.');
1357
- }
1358
- if (!isConnected(this.dialog_)) {
1359
- throw new Error('Failed to execute \'showModal\' on dialog: The element is not in a Document.');
1360
- }
1361
- if (!dialogPolyfill.dm.pushDialog(this)) {
1362
- throw new Error('Failed to execute \'showModal\' on dialog: There are too many open modal dialogs.');
1363
- }
1364
-
1365
- if (createsStackingContext(this.dialog_.parentElement)) {
1366
- console.warn('A dialog is being shown inside a stacking context. ' +
1367
- 'This may cause it to be unusable. For more information, see this link: ' +
1368
- 'https://github.com/GoogleChrome/dialog-polyfill/#stacking-context');
1369
- }
1370
-
1371
- this.setOpen(true);
1372
- this.openAsModal_ = true;
1373
-
1374
- // Optionally center vertically, relative to the current viewport.
1375
- if (dialogPolyfill.needsCentering(this.dialog_)) {
1376
- dialogPolyfill.reposition(this.dialog_);
1377
- this.replacedStyleTop_ = true;
1378
- } else {
1379
- this.replacedStyleTop_ = false;
1380
- }
1381
-
1382
- // Insert backdrop.
1383
- this.dialog_.parentNode.insertBefore(this.backdrop_, this.dialog_.nextSibling);
1384
-
1385
- // Focus on whatever inside the dialog.
1386
- this.focus_();
1387
- },
1388
-
1389
- /**
1390
- * Closes this HTMLDialogElement. This is optional vs clearing the open
1391
- * attribute, however this fires a 'close' event.
1392
- *
1393
- * @param {string=} opt_returnValue to use as the returnValue
1394
- */
1395
- close: function(opt_returnValue) {
1396
- if (!this.dialog_.hasAttribute('open')) {
1397
- throw new Error('Failed to execute \'close\' on dialog: The element does not have an \'open\' attribute, and therefore cannot be closed.');
1398
- }
1399
- this.setOpen(false);
1400
-
1401
- // Leave returnValue untouched in case it was set directly on the element
1402
- if (opt_returnValue !== undefined) {
1403
- this.dialog_.returnValue = opt_returnValue;
1404
- }
1405
-
1406
- // Triggering "close" event for any attached listeners on the <dialog>.
1407
- var closeEvent = new supportCustomEvent('close', {
1408
- bubbles: false,
1409
- cancelable: false
1410
- });
1411
- safeDispatchEvent(this.dialog_, closeEvent);
1412
- }
1413
-
1414
- });
1415
-
1416
- var dialogPolyfill = {};
1417
-
1418
- dialogPolyfill.reposition = function(element) {
1419
- var scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
1420
- var topValue = scrollTop + (window.innerHeight - element.offsetHeight) / 2;
1421
- element.style.top = Math.max(scrollTop, topValue) + 'px';
1422
- };
1423
-
1424
- dialogPolyfill.isInlinePositionSetByStylesheet = function(element) {
1425
- for (var i = 0; i < document.styleSheets.length; ++i) {
1426
- var styleSheet = document.styleSheets[i];
1427
- var cssRules = null;
1428
- // Some browsers throw on cssRules.
1429
- try {
1430
- cssRules = styleSheet.cssRules;
1431
- } catch (e) {}
1432
- if (!cssRules) { continue; }
1433
- for (var j = 0; j < cssRules.length; ++j) {
1434
- var rule = cssRules[j];
1435
- var selectedNodes = null;
1436
- // Ignore errors on invalid selector texts.
1437
- try {
1438
- selectedNodes = document.querySelectorAll(rule.selectorText);
1439
- } catch(e) {}
1440
- if (!selectedNodes || !inNodeList(selectedNodes, element)) {
1441
- continue;
1442
- }
1443
- var cssTop = rule.style.getPropertyValue('top');
1444
- var cssBottom = rule.style.getPropertyValue('bottom');
1445
- if ((cssTop && cssTop !== 'auto') || (cssBottom && cssBottom !== 'auto')) {
1446
- return true;
1447
- }
1448
- }
1449
- }
1450
- return false;
1451
- };
1452
-
1453
- dialogPolyfill.needsCentering = function(dialog) {
1454
- var computedStyle = window.getComputedStyle(dialog);
1455
- if (computedStyle.position !== 'absolute') {
1456
- return false;
1457
- }
1458
-
1459
- // We must determine whether the top/bottom specified value is non-auto. In
1460
- // WebKit/Blink, checking computedStyle.top == 'auto' is sufficient, but
1461
- // Firefox returns the used value. So we do this crazy thing instead: check
1462
- // the inline style and then go through CSS rules.
1463
- if ((dialog.style.top !== 'auto' && dialog.style.top !== '') ||
1464
- (dialog.style.bottom !== 'auto' && dialog.style.bottom !== '')) {
1465
- return false;
1466
- }
1467
- return !dialogPolyfill.isInlinePositionSetByStylesheet(dialog);
1468
- };
1469
-
1470
- /**
1471
- * @param {!Element} element to force upgrade
1472
- */
1473
- dialogPolyfill.forceRegisterDialog = function(element) {
1474
- if (window.HTMLDialogElement || element.showModal) {
1475
- console.warn('This browser already supports <dialog>, the polyfill ' +
1476
- 'may not work correctly', element);
1477
- }
1478
- if (element.localName !== 'dialog') {
1479
- throw new Error('Failed to register dialog: The element is not a dialog.');
1480
- }
1481
- new dialogPolyfillInfo(/** @type {!HTMLDialogElement} */ (element));
1482
- };
1483
-
1484
- /**
1485
- * @param {!Element} element to upgrade, if necessary
1486
- */
1487
- dialogPolyfill.registerDialog = function(element) {
1488
- if (!element.showModal) {
1489
- dialogPolyfill.forceRegisterDialog(element);
1490
- }
1491
- };
1492
-
1493
- /**
1494
- * @constructor
1495
- */
1496
- dialogPolyfill.DialogManager = function() {
1497
- /** @type {!Array<!dialogPolyfillInfo>} */
1498
- this.pendingDialogStack = [];
1499
-
1500
- var checkDOM = this.checkDOM_.bind(this);
1501
-
1502
- // The overlay is used to simulate how a modal dialog blocks the document.
1503
- // The blocking dialog is positioned on top of the overlay, and the rest of
1504
- // the dialogs on the pending dialog stack are positioned below it. In the
1505
- // actual implementation, the modal dialog stacking is controlled by the
1506
- // top layer, where z-index has no effect.
1507
- this.overlay = document.createElement('div');
1508
- this.overlay.className = '_dialog_overlay';
1509
- this.overlay.addEventListener('click', function(e) {
1510
- this.forwardTab_ = undefined;
1511
- e.stopPropagation();
1512
- checkDOM([]); // sanity-check DOM
1513
- }.bind(this));
1514
-
1515
- this.handleKey_ = this.handleKey_.bind(this);
1516
- this.handleFocus_ = this.handleFocus_.bind(this);
1517
-
1518
- this.zIndexLow_ = 100000;
1519
- this.zIndexHigh_ = 100000 + 150;
1520
-
1521
- this.forwardTab_ = undefined;
1522
-
1523
- if ('MutationObserver' in window) {
1524
- this.mo_ = new MutationObserver(function(records) {
1525
- var removed = [];
1526
- records.forEach(function(rec) {
1527
- for (var i = 0, c; c = rec.removedNodes[i]; ++i) {
1528
- if (!(c instanceof Element)) {
1529
- continue;
1530
- } else if (c.localName === 'dialog') {
1531
- removed.push(c);
1532
- }
1533
- removed = removed.concat(c.querySelectorAll('dialog'));
1534
- }
1535
- });
1536
- removed.length && checkDOM(removed);
1537
- });
1538
- }
1539
- };
1540
-
1541
- /**
1542
- * Called on the first modal dialog being shown. Adds the overlay and related
1543
- * handlers.
1544
- */
1545
- dialogPolyfill.DialogManager.prototype.blockDocument = function() {
1546
- document.documentElement.addEventListener('focus', this.handleFocus_, true);
1547
- document.addEventListener('keydown', this.handleKey_);
1548
- this.mo_ && this.mo_.observe(document, {childList: true, subtree: true});
1549
- };
1550
-
1551
- /**
1552
- * Called on the first modal dialog being removed, i.e., when no more modal
1553
- * dialogs are visible.
1554
- */
1555
- dialogPolyfill.DialogManager.prototype.unblockDocument = function() {
1556
- document.documentElement.removeEventListener('focus', this.handleFocus_, true);
1557
- document.removeEventListener('keydown', this.handleKey_);
1558
- this.mo_ && this.mo_.disconnect();
1559
- };
1560
-
1561
- /**
1562
- * Updates the stacking of all known dialogs.
1563
- */
1564
- dialogPolyfill.DialogManager.prototype.updateStacking = function() {
1565
- var zIndex = this.zIndexHigh_;
1566
-
1567
- for (var i = 0, dpi; dpi = this.pendingDialogStack[i]; ++i) {
1568
- dpi.updateZIndex(--zIndex, --zIndex);
1569
- if (i === 0) {
1570
- this.overlay.style.zIndex = --zIndex;
1571
- }
1572
- }
1573
-
1574
- // Make the overlay a sibling of the dialog itself.
1575
- var last = this.pendingDialogStack[0];
1576
- if (last) {
1577
- var p = last.dialog.parentNode || document.body;
1578
- p.appendChild(this.overlay);
1579
- } else if (this.overlay.parentNode) {
1580
- this.overlay.parentNode.removeChild(this.overlay);
1581
- }
1582
- };
1583
-
1584
- /**
1585
- * @param {Element} candidate to check if contained or is the top-most modal dialog
1586
- * @return {boolean} whether candidate is contained in top dialog
1587
- */
1588
- dialogPolyfill.DialogManager.prototype.containedByTopDialog_ = function(candidate) {
1589
- while (candidate = findNearestDialog(candidate)) {
1590
- for (var i = 0, dpi; dpi = this.pendingDialogStack[i]; ++i) {
1591
- if (dpi.dialog === candidate) {
1592
- return i === 0; // only valid if top-most
1593
- }
1594
- }
1595
- candidate = candidate.parentElement;
1596
- }
1597
- return false;
1598
- };
1599
-
1600
- dialogPolyfill.DialogManager.prototype.handleFocus_ = function(event) {
1601
- var target = event.composedPath ? event.composedPath()[0] : event.target;
1602
-
1603
- if (this.containedByTopDialog_(target)) { return; }
1604
-
1605
- if (document.activeElement === document.documentElement) { return; }
1606
-
1607
- event.preventDefault();
1608
- event.stopPropagation();
1609
- safeBlur(/** @type {Element} */ (target));
1610
-
1611
- if (this.forwardTab_ === undefined) { return; } // move focus only from a tab key
1612
-
1613
- var dpi = this.pendingDialogStack[0];
1614
- var dialog = dpi.dialog;
1615
- var position = dialog.compareDocumentPosition(target);
1616
- if (position & Node.DOCUMENT_POSITION_PRECEDING) {
1617
- if (this.forwardTab_) {
1618
- // forward
1619
- dpi.focus_();
1620
- } else if (target !== document.documentElement) {
1621
- // backwards if we're not already focused on <html>
1622
- document.documentElement.focus();
1623
- }
1624
- }
1625
-
1626
- return false;
1627
- };
1628
-
1629
- dialogPolyfill.DialogManager.prototype.handleKey_ = function(event) {
1630
- this.forwardTab_ = undefined;
1631
- if (event.keyCode === 27) {
1632
- event.preventDefault();
1633
- event.stopPropagation();
1634
- var cancelEvent = new supportCustomEvent('cancel', {
1635
- bubbles: false,
1636
- cancelable: true
1637
- });
1638
- var dpi = this.pendingDialogStack[0];
1639
- if (dpi && safeDispatchEvent(dpi.dialog, cancelEvent)) {
1640
- dpi.dialog.close();
1641
- }
1642
- } else if (event.keyCode === 9) {
1643
- this.forwardTab_ = !event.shiftKey;
1644
- }
1645
- };
1646
-
1647
- /**
1648
- * Finds and downgrades any known modal dialogs that are no longer displayed. Dialogs that are
1649
- * removed and immediately readded don't stay modal, they become normal.
1650
- *
1651
- * @param {!Array<!HTMLDialogElement>} removed that have definitely been removed
1652
- */
1653
- dialogPolyfill.DialogManager.prototype.checkDOM_ = function(removed) {
1654
- // This operates on a clone because it may cause it to change. Each change also calls
1655
- // updateStacking, which only actually needs to happen once. But who removes many modal dialogs
1656
- // at a time?!
1657
- var clone = this.pendingDialogStack.slice();
1658
- clone.forEach(function(dpi) {
1659
- if (removed.indexOf(dpi.dialog) !== -1) {
1660
- dpi.downgradeModal();
1661
- } else {
1662
- dpi.maybeHideModal();
1663
- }
1664
- });
1665
- };
1666
-
1667
- /**
1668
- * @param {!dialogPolyfillInfo} dpi
1669
- * @return {boolean} whether the dialog was allowed
1670
- */
1671
- dialogPolyfill.DialogManager.prototype.pushDialog = function(dpi) {
1672
- var allowed = (this.zIndexHigh_ - this.zIndexLow_) / 2 - 1;
1673
- if (this.pendingDialogStack.length >= allowed) {
1674
- return false;
1675
- }
1676
- if (this.pendingDialogStack.unshift(dpi) === 1) {
1677
- this.blockDocument();
1678
- }
1679
- this.updateStacking();
1680
- return true;
1681
- };
1682
-
1683
- /**
1684
- * @param {!dialogPolyfillInfo} dpi
1685
- */
1686
- dialogPolyfill.DialogManager.prototype.removeDialog = function(dpi) {
1687
- var index = this.pendingDialogStack.indexOf(dpi);
1688
- if (index === -1) { return; }
1689
-
1690
- this.pendingDialogStack.splice(index, 1);
1691
- if (this.pendingDialogStack.length === 0) {
1692
- this.unblockDocument();
1693
- }
1694
- this.updateStacking();
1695
- };
1696
-
1697
- dialogPolyfill.dm = new dialogPolyfill.DialogManager();
1698
- dialogPolyfill.formSubmitter = null;
1699
- dialogPolyfill.imagemapUseValue = null;
1700
-
1701
- /**
1702
- * Installs global handlers, such as click listers and native method overrides. These are needed
1703
- * even if a no dialog is registered, as they deal with <form method="dialog">.
1704
- */
1705
- if (window.HTMLDialogElement === undefined) {
1706
-
1707
- /**
1708
- * If HTMLFormElement translates method="DIALOG" into 'get', then replace the descriptor with
1709
- * one that returns the correct value.
1710
- */
1711
- var testForm = document.createElement('form');
1712
- testForm.setAttribute('method', 'dialog');
1713
- if (testForm.method !== 'dialog') {
1714
- var methodDescriptor = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, 'method');
1715
- if (methodDescriptor) {
1716
- // nb. Some older iOS and older PhantomJS fail to return the descriptor. Don't do anything
1717
- // and don't bother to update the element.
1718
- var realGet = methodDescriptor.get;
1719
- methodDescriptor.get = function() {
1720
- if (isFormMethodDialog(this)) {
1721
- return 'dialog';
1722
- }
1723
- return realGet.call(this);
1724
- };
1725
- var realSet = methodDescriptor.set;
1726
- /** @this {HTMLElement} */
1727
- methodDescriptor.set = function(v) {
1728
- if (typeof v === 'string' && v.toLowerCase() === 'dialog') {
1729
- return this.setAttribute('method', v);
1730
- }
1731
- return realSet.call(this, v);
1732
- };
1733
- Object.defineProperty(HTMLFormElement.prototype, 'method', methodDescriptor);
1734
- }
1735
- }
1736
-
1737
- /**
1738
- * Global 'click' handler, to capture the <input type="submit"> or <button> element which has
1739
- * submitted a <form method="dialog">. Needed as Safari and others don't report this inside
1740
- * document.activeElement.
1741
- */
1742
- document.addEventListener('click', function(ev) {
1743
- dialogPolyfill.formSubmitter = null;
1744
- dialogPolyfill.imagemapUseValue = null;
1745
- if (ev.defaultPrevented) { return; } // e.g. a submit which prevents default submission
1746
-
1747
- var target = /** @type {Element} */ (ev.target);
1748
- if ('composedPath' in ev) {
1749
- var path = ev.composedPath();
1750
- target = path.shift() || target;
1751
- }
1752
- if (!target || !isFormMethodDialog(target.form)) { return; }
1753
-
1754
- var valid = (target.type === 'submit' && ['button', 'input'].indexOf(target.localName) > -1);
1755
- if (!valid) {
1756
- if (!(target.localName === 'input' && target.type === 'image')) { return; }
1757
- // this is a <input type="image">, which can submit forms
1758
- dialogPolyfill.imagemapUseValue = ev.offsetX + ',' + ev.offsetY;
1759
- }
1760
-
1761
- var dialog = findNearestDialog(target);
1762
- if (!dialog) { return; }
1763
-
1764
- dialogPolyfill.formSubmitter = target;
1765
-
1766
- }, false);
1767
-
1768
- /**
1769
- * Global 'submit' handler. This handles submits of `method="dialog"` which are invalid, i.e.,
1770
- * outside a dialog. They get prevented.
1771
- */
1772
- document.addEventListener('submit', function(ev) {
1773
- var form = ev.target;
1774
- var dialog = findNearestDialog(form);
1775
- if (dialog) {
1776
- return; // ignore, handle there
1777
- }
1778
-
1779
- var submitter = findFormSubmitter(ev);
1780
- var formmethod = submitter && submitter.getAttribute('formmethod') || form.getAttribute('method');
1781
- if (formmethod === 'dialog') {
1782
- ev.preventDefault();
1783
- }
1784
- });
1785
-
1786
- /**
1787
- * Replace the native HTMLFormElement.submit() method, as it won't fire the
1788
- * submit event and give us a chance to respond.
1789
- */
1790
- var nativeFormSubmit = HTMLFormElement.prototype.submit;
1791
- var replacementFormSubmit = function () {
1792
- if (!isFormMethodDialog(this)) {
1793
- return nativeFormSubmit.call(this);
1794
- }
1795
- var dialog = findNearestDialog(this);
1796
- dialog && dialog.close();
1797
- };
1798
- HTMLFormElement.prototype.submit = replacementFormSubmit;
1799
- }
1800
-
1801
- const stylesCss$3 = ":host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>dialog{padding:0;border:none;margin:0;background-color:transparent}:host>dialog:modal{width:100%;max-width:100%;max-height:100%}:host>dialog::backdrop{display:none}:host>dialog+.backdrop{display:none}:host>dialog:not([open]){display:none}:host>dialog[open]{display:block}.modal-container{z-index:1010;display:flex;overflow:-moz-scrollbars-none;width:100%;height:100vh;flex-direction:column}.modal-container>.modal-content-scroll-outside{overflow:auto;background:var(--color-surface01)}.modal-container>header{padding:calc(var(--space-unit) * 2 - 2px) calc(var(--space-unit) * 2);background:var(--color-surface02)}.modal-container>header button{padding:0;border:none;margin:0;margin-left:auto;background:transparent;cursor:pointer}.modal-container>header z-icon{--z-icon-width:calc(var(--space-unit) * 2.5);--z-icon-height:calc(var(--space-unit) * 2.5);display:flex;fill:var(--color-icon01)}.modal-container>header>div{display:flex;width:100%;align-items:center;margin-right:calc(var(--space-unit) * 2)}.modal-container>header h1,.modal-container>header h2{padding:0;margin:0;color:var(--color-text01);font-weight:var(--font-rg)}.modal-container>header h1{font-size:var(--font-size-5);letter-spacing:0;line-height:1.4}.modal-container>header h2{font-size:var(--font-size-3);letter-spacing:0;line-height:1.5}.modal-container>header>div>h1 *:empty{display:none}.modal-container>header h1+h2{margin-top:calc(var(--space-unit) * 0.5)}.modal-container-scroll-inside>.modal-content-scroll-inside{overflow:hidden auto;flex:1 auto;background:var(--color-surface01)}.modal-container-scroll-inside>.modal-content-scroll-inside::-webkit-scrollbar,.modal-container-scroll-outside>.modal-content-scroll-outside::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.modal-container-scroll-inside>.modal-content-scroll-inside::-webkit-scrollbar-thumb,.modal-container-scroll-outside>.modal-content-scroll-outside::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01)}.modal-container-scroll-inside>.modal-content-scroll-inside::-webkit-scrollbar-thumb:hover,.modal-container-scroll-outside>.modal-content-scroll-outside::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.modal-container-scroll-inside .modal-content-scroll-inside,.modal-container-scroll-outside .modal-content-scroll-outside{scrollbar-color:var(--color-primary01) transparent}@media only screen and (min-width: 768px){.modal-background{position:fixed;top:0;left:0;overflow:hidden;width:100vw;height:100vh;background-color:var(--gray900);opacity:0.7}.modal-background.modal-background-scroll-outside{position:sticky}.modal-container-scroll-inside{position:fixed;top:calc(var(--space-unit) * 6);left:50%;overflow:hidden;width:auto;min-width:calc(var(--space-unit) * 40);height:auto;min-height:calc(var(--space-unit) * 40);max-height:calc(100vh - calc(var(--space-unit) * 6 * 2));border-radius:var(--border-radius);transform:translateX(-50%)}.modal-container-scroll-outside{position:absolute;top:calc(var(--space-unit) * 6);left:50%;display:block;overflow:initial;width:auto;min-width:calc(var(--space-unit) * 40);height:auto;min-height:calc(var(--space-unit) * 40);max-height:calc(100vh - calc(var(--space-unit) * 6 * 2));transform:translateX(-50%)}.modal-container>.modal-content-scroll-outside{overflow:initial}.modal-container-scroll-outside>header,.modal-container-scroll-inside>header{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius)}.modal-container-scroll-outside::after{display:block;height:calc(var(--space-unit) * 6);content:\" \"}.modal-dialog{position:fixed;top:0;left:0;height:auto;overflow-x:hidden;overflow-y:auto}.modal-content-scroll-outside{border-bottom-left-radius:var(--border-radius);border-bottom-right-radius:var(--border-radius)}.modal-dialog::-webkit-scrollbar{display:none}.modal-container>header z-icon{--z-icon-width:calc(var(--space-unit) * 3);--z-icon-height:calc(var(--space-unit) * 3)}}@media only screen and (min-width: 768px) and (max-width: 1151px){.modal-container>header{padding:calc(var(--space-unit) * 3 - 2px) calc(var(--space-unit) * 3)}}@media only screen and (min-width: 1152px){.modal-container>header{padding:calc(var(--space-unit) * 4 - 4px) calc(var(--space-unit) * 4)}.modal-container>header h1{font-size:var(--font-size-6);letter-spacing:0;line-height:1.33}.modal-container>header h2{font-size:var(--font-size-4);letter-spacing:0;line-height:1.5}.modal-container>header h1+h2{margin-top:0}}";
1802
- const ZModalStyle0 = stylesCss$3;
1803
-
1804
- const FOCUSABLE_ELEMENTS_SELECTOR = ':is(button, input, select, textarea, [contenteditable=""], [contenteditable="true"], a[href], [tabindex], summary):not([disabled], [disabled=""], [tabindex="-1"], [aria-hidden="true"], [hidden])';
1805
- const ZModal = class {
1806
- constructor(hostRef) {
1807
- index.registerInstance(this, hostRef);
1808
- this.modalClose = index.createEvent(this, "modalClose", 7);
1809
- this.modalHeaderActive = index.createEvent(this, "modalHeaderActive", 7);
1810
- this.modalBackgroundClick = index.createEvent(this, "modalBackgroundClick", 7);
1811
- this.modalid = undefined;
1812
- this.modaltitle = undefined;
1813
- this.modalsubtitle = undefined;
1814
- this.closeButtonLabel = "chiudi modale";
1815
- this.alertdialog = false;
1816
- this.closable = true;
1817
- this.scrollInside = true;
1818
- }
1819
- emitModalClose() {
1820
- if (this.closable) {
1821
- this.modalClose.emit({ modalid: this.modalid });
1822
- }
1823
- }
1824
- emitModalHeaderActive() {
1825
- this.modalHeaderActive.emit({ modalid: this.modalid });
1826
- }
1827
- emitBackgroundClick() {
1828
- if (this.closable) {
1829
- this.modalBackgroundClick.emit({ modalid: this.modalid });
1830
- }
1831
- }
1832
- componentDidLoad() {
1833
- if (typeof window.HTMLDialogElement !== "function") {
1834
- /* workaround to fix `registerDialog` in test environment:
1835
- stencil converts html elements to MockHTMLElement but this element is missing the `localName` property,
1836
- which is used by `registerDialog` to recognize the element as dialog */
1837
- if (!this.dialog.localName) {
1838
- Object.defineProperty(this.dialog, "localName", { value: "dialog" });
1839
- }
1840
- dialogPolyfill.registerDialog(this.dialog);
1841
- this.dialog.setAttribute("open", "true");
1842
- }
1843
- else {
1844
- this.open();
1845
- }
1846
- }
1847
- /** open modal */
1848
- async open() {
1849
- var _a;
1850
- (_a = this.dialog) === null || _a === void 0 ? void 0 : _a.showModal();
1851
- }
1852
- /** close modal */
1853
- async close() {
1854
- var _a;
1855
- if (this.closable) {
1856
- (_a = this.dialog) === null || _a === void 0 ? void 0 : _a.close();
1857
- }
1858
- }
1859
- /**
1860
- * Get a list of focusable elements in the dialog.
1861
- * Remove elements with `display: none` from the list, because they're not focusable.
1862
- *
1863
- * N.B. The list is built on the assumption that elements inside shadow root are placed ALL before the `modalContent` slot.
1864
- * Adding focusable elements after the `modalContent` slot would break the order of elements in the list.
1865
- */
1866
- get focusableElements() {
1867
- return [
1868
- ...Array.from(this.host.shadowRoot.querySelectorAll(FOCUSABLE_ELEMENTS_SELECTOR)),
1869
- ...Array.from(this.host.querySelectorAll(FOCUSABLE_ELEMENTS_SELECTOR)),
1870
- ].filter((element) => getComputedStyle(element).display !== "none");
1871
- }
1872
- handleKeyDown(e) {
1873
- if (e.code !== index$1.KeyboardCode.TAB) {
1874
- return;
1875
- }
1876
- const focusableElements = this.focusableElements;
1877
- const shadowActiveElement = this.host.shadowRoot.activeElement;
1878
- const activeElement = this.host.ownerDocument.activeElement;
1879
- const firstFocusableElement = focusableElements[0];
1880
- const lastFocusableElement = focusableElements[focusableElements.length - 1];
1881
- if (e.shiftKey && (shadowActiveElement == firstFocusableElement || activeElement == firstFocusableElement)) {
1882
- // shift + tab was pressed and current active element is the first focusable element
1883
- e.preventDefault();
1884
- lastFocusableElement.focus();
1885
- }
1886
- else if (!e.shiftKey && (shadowActiveElement == lastFocusableElement || activeElement == lastFocusableElement)) {
1887
- // shift + tab was pressed and current active element is the first focusable element
1888
- e.preventDefault();
1889
- firstFocusableElement.focus();
1890
- }
1891
- }
1892
- closeButtonSlot() {
1893
- if (this.closable) {
1894
- return (index.h("slot", { name: "modalCloseButton" }, index.h("button", { "aria-label": this.closeButtonLabel, onClick: () => this.close() }, index.h("z-icon", { name: "multiply-circle-filled" }))));
1895
- }
1896
- }
1897
- handleEscape(e) {
1898
- if (this.closable) {
1899
- return;
1900
- }
1901
- e.preventDefault();
1902
- }
1903
- render() {
1904
- return (index.h("dialog", { key: 'f2dbe7bebb572bf6a00736ede42543c096feccf7', class: {
1905
- "modal-dialog": !this.scrollInside,
1906
- }, "aria-labelledby": "modal-title", "aria-describedby": "modal-content", role: this.alertdialog ? "alertdialog" : undefined, ref: (el) => (this.dialog = el), onClose: () => this.emitModalClose(), onCancel: (e) => this.handleEscape(e) }, index.h("div", { key: '53e9cb2fa74698f0b6a01dcc2f582d5159850aaa', class: {
1907
- "modal-container": true,
1908
- "modal-container-scroll-inside": this.scrollInside,
1909
- "modal-container-scroll-outside": !this.scrollInside,
1910
- }, id: this.modalid }, index.h("header", { key: '53e1a607d3e73ac915d295a429b46af592231ea4', onClick: this.emitModalHeaderActive.bind(this) }, index.h("div", { key: 'b0c66eca76b7f9437780ca2e13c8f168a49a161a' }, this.modaltitle && index.h("h1", { id: "modal-title" }, this.modaltitle), this.closeButtonSlot()), this.modalsubtitle && index.h("h2", { id: "modal-subtitle" }, this.modalsubtitle)), index.h("div", { key: '6fe98736ef22c37f2a99b00e40a245684b880710', class: {
1911
- "modal-content-scroll-inside": this.scrollInside,
1912
- "modal-content-scroll-outside": !this.scrollInside,
1913
- }, id: "modal-content" }, index.h("slot", { key: '1b0da4801769eb69b3ecdc78de294b8a064dabfe', name: "modalContent" }))), index.h("div", { key: 'd86093efe62e7eccac464f533997d69905956fcb', class: {
1914
- "modal-background": true,
1915
- "modal-background-scroll-outside": !this.scrollInside,
1916
- }, "data-action": "modalBackground", "data-modal": this.modalid, onClick: () => {
1917
- this.emitBackgroundClick();
1918
- this.close();
1919
- } })));
1920
- }
1921
- get host() { return index.getElement(this); }
1922
- };
1923
- ZModal.style = ZModalStyle0;
1924
-
1925
- const stylesCss$2 = ".sc-z-offcanvas-h{--z-offcanvas--container-width:375px;--z-offcanvas--top-space:0;min-width:100%;height:100%;font-family:var(--font-family-sans);font-weight:var(--font-rg)}.canvas-container.sc-z-offcanvas{display:flex;overflow:-moz-scrollbars-none;overflow:hidden;min-width:100%;height:100%;flex-direction:column;background:var(--color-surface01)}[variant=\"pushcontent\"].sc-z-offcanvas-h{display:none}[open].sc-z-offcanvas-h{display:flex;visibility:visible}.sc-z-offcanvas-h:not([open]){visibility:hidden}[variant=\"overlay\"].sc-z-offcanvas-h{position:fixed;z-index:1000;top:var(--z-offcanvas--top-space);right:0;bottom:0;left:0;display:flex;height:calc(100% - var(--z-offcanvas--top-space))}[variant=\"overlay\"][transitiondirection=\"left\"].sc-z-offcanvas-h{justify-content:end}[variant=\"overlay\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{z-index:1010}[variant=\"overlay\"].sc-z-offcanvas-h .canvas-background.sc-z-offcanvas{position:absolute;left:0;width:100%;height:100%;background-color:var(--gray900);opacity:0.7}.canvas-container.sc-z-offcanvas>.canvas-content.sc-z-offcanvas{overflow:auto;flex:1 auto;padding:0 calc(var(--space-unit) * 2);margin:calc(var(--space-unit) * 2) calc(var(--space-unit) / 2) calc(var(--space-unit) * 2) 0;overflow-x:hidden}[variant=\"overlay\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas>.canvas-content.sc-z-offcanvas{padding:0 calc(var(--space-unit) * 2) calc(var(--space-unit) * 2) calc(var(--space-unit) * 2);margin:calc(var(--space-unit) * 2) calc(var(--space-unit) / 2) 0 0}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar-track{background-color:transparent}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas{scrollbar-color:var(--color-primary01) transparent}@media only screen and (max-width: 768px){[open][transitiondirection=\"left\"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{animation:enter-right 0.4s ease-out}[open][transitiondirection=\"right\"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{animation:enter-left 0.4s ease-out}}@media only screen and (min-width: 768px){.sc-z-offcanvas-h{min-width:auto}.canvas-container.sc-z-offcanvas{width:auto;min-width:max(var(--z-offcanvas--container-width), 375px);max-width:max(var(--z-offcanvas--container-width), 375px);height:auto;min-height:calc(var(--space-unit) * 40)}.sc-z-offcanvas-h:not([variant=\"overlay\"])[open]:not(.skip-animation){width:auto;animation:grow 0.4s ease-out}}@keyframes grow{from{width:0}to{width:max(var(--z-offcanvas--container-width), 375px)}}@keyframes enter-left{from{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes enter-right{from{transform:translateX(100%)}to{transform:translateX(0)}}[open][variant=\"overlay\"][transitiondirection=\"left\"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{animation:enter-right 0.4s ease-out}[open][transitiondirection=\"right\"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{animation:enter-left 0.4s ease-out}.sc-z-offcanvas-h:not([open])[variant=\"overlay\"][transitiondirection=\"right\"]>.canvas-container.sc-z-offcanvas{transform:translateX(-100%);transition:visibility 0.4s ease-out, transform 0.4s ease-out}.sc-z-offcanvas-h:not([open])[variant=\"overlay\"][transitiondirection=\"left\"]>.canvas-container.sc-z-offcanvas{transform:translateX(100%);transition:visibility 0.4s ease-out, transform 0.4s ease-out}.sc-z-offcanvas-h:not([open])[variant=\"overlay\"] .canvas-background.sc-z-offcanvas{transition:visibility 0.4s ease-out;visibility:hidden}";
1926
- const ZOffcanvasStyle0 = stylesCss$2;
1927
-
1928
- const ZOffcanvas = class {
1929
- constructor(hostRef) {
1930
- index.registerInstance(this, hostRef);
1931
- this.canvasOpenStatusChanged = index.createEvent(this, "canvasOpenStatusChanged", 7);
1932
- this.variant = index$1.OffCanvasVariant.PUSHCONTENT;
1933
- this.open = false;
1934
- this.transitiondirection = index$1.TransitionDirection.LEFT;
1935
- this.skipLoadAnimation = false;
1936
- }
1937
- onOpenChanged() {
1938
- if (!this.open && this.skipLoadAnimation) {
1939
- this.skipLoadAnimation = false;
1940
- }
1941
- this.handlePageOverflow();
1942
- this.canvasOpenStatusChanged.emit(this.open);
1943
- }
1944
- handlePageOverflow() {
1945
- const overflow = this.variant === index$1.OffCanvasVariant.OVERLAY ? "overflow-y" : "overflow-x";
1946
- document.body.style[overflow] = this.open ? "hidden" : "";
1947
- }
1948
- disconnectedCallback() {
1949
- this.open = false;
1950
- }
1951
- render() {
1952
- return (index.h(index.Host, { key: 'f0f282fa9732f81f98d644210d2b602a53161b7d', class: { "skip-animation": this.skipLoadAnimation } }, index.h("div", { key: '15bf03615f187509da41d3206b39d705ca34cb50', role: "presentation", class: "canvas-container", onTransitionEnd: () => this.handlePageOverflow() }, index.h("div", { key: 'ba4444c4f3e6c3d9c9fecc4ff4ab103fc614b6bb', role: "presentation", class: "canvas-content" }, index.h("slot", { key: '4da6be1451be2a26815c7d6503a1eb9cec7c48f6', name: "canvasContent" }))), this.variant == index$1.OffCanvasVariant.OVERLAY && (index.h("div", { class: "canvas-background", "data-action": "canvasBackground", onClick: () => (this.open = false) }))));
1953
- }
1954
- static get watchers() { return {
1955
- "open": ["onOpenChanged"]
1956
- }; }
1957
- };
1958
- ZOffcanvas.style = ZOffcanvasStyle0;
1959
-
1960
- const stylesCss$1 = ":host{z-index:15;display:flex;column-gap:calc(var(--space-unit) * 2);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host,*{box-sizing:border-box}.input-container{position:relative;display:flex;width:100%;flex-direction:column}.results-wrapper{position:absolute;top:calc(100% - 1px);left:0;width:100%;padding:calc(var(--space-unit) / 4);border:var(--border-size-small) solid var(--color-surface03);border-top:none;background:var(--color-surface01)}.results{overflow:auto;max-height:var(--z-searchbar-results-height, 540px);padding:calc(var(--space-unit) / 2) calc(var(--space-unit) * 1.5);scrollbar-color:var(--color-primary01) transparent}.results::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.results::-webkit-scrollbar-track{background-color:transparent}.results::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.results .category-heading{display:block;font-size:var(--font-size-2);font-weight:var(--font-rg);line-height:var(--font-size-3)}.results .category-heading>*{display:block}.results .category-heading>.category{color:var(--color-text05);font-style:italic}.results .category-heading>.subcategory{margin-top:var(--space-unit);color:var(--color-text01);text-transform:uppercase}.results z-list-element{display:block}.results z-list-element>.list-element{display:flex;justify-content:space-between}.results z-list-element>.list-element>z-tag{border:1px solid var(--gray800);font-size:var(--font-size-1);font-weight:var(--font-sb);--z-tag-bg:white;--z-tag-text-color:var(--color-text01)}.results .item{--z-icon-height:12px;--z-icon-width:12px;display:flex;flex-flow:row nowrap;align-items:center;justify-content:flex-start;color:var(--color-text01);column-gap:calc(var(--space-unit) * 1.5);fill:var(--color-icon02);font-size:var(--font-size-2);line-height:var(--font-size-3)}.results .item.ellipsis>.item-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.results .item>.item-label mark{background:var(--color-primary03)}.results .item.has-category{padding-left:calc(var(--space-unit) * 3)}.results .item.item-search{--z-icon-height:16px;--z-icon-width:16px}.results .item-show-all{text-align:center}.results .item-no-results{display:block;font-size:var(--font-size-2);font-style:italic;line-height:var(--font-size-5)}.results .item-no-results>ul{padding-left:calc(var(--space-unit) * 2);margin:var(--space-unit)}@media (min-width: 768px){.results .category-heading{font-size:var(--font-size-3);line-height:var(--font-size-6)}.results .item{font-size:var(--font-size-3);line-height:var(--font-size-6)}.results .item.item-search{--z-icon-height:18px;--z-icon-width:18px}.results .item.ellipsis>.item-label{height:24px}}@media (min-width: 1152px){.results .item{cursor:pointer}.results .item-no-results{cursor:default;font-size:var(--font-size-3);line-height:var(--font-size-6)}}:host([size=\"small\"]) .results :is(.item,.category-heading),:host([size=\"x-small\"]) .results :is(.item,.category-heading){font-size:var(--font-size-2)}:host([size=\"small\"]) .results .item:not(.has-category),:host([size=\"x-small\"]) .results .item:not(.has-category){--z-icon-height:16px;--z-icon-width:16px}:host([size=\"small\"])::part(list-item-container){min-height:calc(var(--space-unit) * 4.5);padding:0}:host([size=\"x-small\"])::part(list-item-container){min-height:calc(var(--space-unit) * 4);padding:0}";
1961
- const ZSearchbarStyle0 = stylesCss$1;
1962
-
1963
- const ZSearchbar = class {
1964
- constructor(hostRef) {
1965
- index.registerInstance(this, hostRef);
1966
- this.searchSubmit = index.createEvent(this, "searchSubmit", 7);
1967
- this.searchTyping = index.createEvent(this, "searchTyping", 7);
1968
- this.searchItemClick = index.createEvent(this, "searchItemClick", 7);
1969
- this.resultsItemsList = null;
1970
- this.htmlid = `searchbar-${utils.randomId()}`;
1971
- this.preventSubmit = false;
1972
- this.value = undefined;
1973
- this.placeholder = undefined;
1974
- this.autocomplete = false;
1975
- this.autocompleteMinChars = 3;
1976
- this.resultsCount = undefined;
1977
- this.resultsEllipsis = true;
1978
- this.searchHelperLabel = "Cerca {searchString}";
1979
- this.resultsItems = undefined;
1980
- this.sortResultsItems = false;
1981
- this.showSearchButton = false;
1982
- this.searchButtonIconOnly = false;
1983
- this.size = index$1.ControlSize.BIG;
1984
- this.variant = index$1.ButtonVariant.PRIMARY;
1985
- this.searchString = this.value;
1986
- this.currResultsCount = 0;
1987
- this.showResults = false;
1988
- this.isMobile = false;
1989
- }
1990
- emitSearchSubmit() {
1991
- this.searchSubmit.emit(this.inputRef.value);
1992
- }
1993
- emitSearchTyping(search) {
1994
- this.searchTyping.emit(search);
1995
- }
1996
- emitSearchItemClick(item) {
1997
- this.searchItemClick.emit(item);
1998
- }
1999
- watchItems() {
2000
- this.resultsItemsList = this.getResultsItemsList();
2001
- }
2002
- watchResultsCount() {
2003
- this.currResultsCount = this.resultsCount;
2004
- }
2005
- watchValue() {
2006
- this.searchString = this.value;
2007
- }
2008
- watchSearchString() {
2009
- this.emitSearchTyping(this.searchString);
2010
- if (!this.searchString) {
2011
- this.currResultsCount = this.resultsCount;
2012
- }
2013
- }
2014
- disconnectedCallback() {
2015
- this.resizeObserver.disconnect();
2016
- }
2017
- componentDidLoad() {
2018
- this.resizeObserver = new ResizeObserver(() => {
2019
- if (utils.getDevice() === index$1.Device.MOBILE && !this.isMobile) {
2020
- this.isMobile = true;
2021
- }
2022
- if (utils.getDevice() !== index$1.Device.MOBILE && this.isMobile) {
2023
- this.isMobile = false;
2024
- }
2025
- });
2026
- this.resizeObserver.observe(this.element);
2027
- }
2028
- componentWillLoad() {
2029
- this.resultsItemsList = this.getResultsItemsList();
2030
- this.currResultsCount = this.resultsCount;
2031
- }
2032
- getResultsItemsList() {
2033
- return typeof this.resultsItems === "string" ? JSON.parse(this.resultsItems) : this.resultsItems;
2034
- }
2035
- getGroupedItems(items) {
2036
- const groupedItems = {};
2037
- items.forEach((item) => {
2038
- var _a;
2039
- const key = `${item === null || item === void 0 ? void 0 : item.category}${item === null || item === void 0 ? void 0 : item.subcategory}`;
2040
- groupedItems[key] = (_a = groupedItems[key]) !== null && _a !== void 0 ? _a : {
2041
- category: item === null || item === void 0 ? void 0 : item.category,
2042
- subcategory: item === null || item === void 0 ? void 0 : item.subcategory,
2043
- items: [],
2044
- };
2045
- groupedItems[key]["items"].push(item);
2046
- });
2047
- if (this.sortResultsItems) {
2048
- return Object.keys(groupedItems)
2049
- .sort()
2050
- .reduce((obj, key) => {
2051
- obj[key] = Object.assign(Object.assign({}, groupedItems[key]), { items: groupedItems[key]["items"].sort((a, b) => {
2052
- const nameA = a.label.toUpperCase();
2053
- const nameB = b.label.toUpperCase();
2054
- if (nameA < nameB) {
2055
- return -1;
2056
- }
2057
- if (nameA > nameB) {
2058
- return 1;
2059
- }
2060
- return 0;
2061
- }) });
2062
- return obj;
2063
- }, {});
2064
- }
2065
- return groupedItems;
2066
- }
2067
- checkResultsCount(counter) {
2068
- if (!this.currResultsCount || counter < this.currResultsCount) {
2069
- return true;
2070
- }
2071
- return false;
2072
- }
2073
- handleStopTyping(e) {
2074
- e.stopPropagation();
2075
- this.searchString = e.detail.value;
2076
- }
2077
- handleSubmit() {
2078
- if (this.preventSubmit) {
2079
- return;
2080
- }
2081
- this.emitSearchSubmit();
2082
- }
2083
- handleOutsideClick(e) {
2084
- const cp = e.composedPath();
2085
- const searchbar = cp.find((elem) => elem.nodeName === "Z-SEARCHBAR");
2086
- if (!searchbar || searchbar.htmlid !== this.htmlid) {
2087
- this.showResults = false;
2088
- return;
2089
- }
2090
- if (cp.find((elem) => { var _a; return (elem === null || elem === void 0 ? void 0 : elem.nodeName) === "Z-INPUT" || ((_a = elem === null || elem === void 0 ? void 0 : elem.classList) === null || _a === void 0 ? void 0 : _a.contains("results")); })) {
2091
- this.showResults = true;
2092
- return;
2093
- }
2094
- this.showResults = false;
2095
- }
2096
- renderInput() {
2097
- return (index.h("z-input", { ref: (val) => {
2098
- this.inputRef = val;
2099
- }, message: false, placeholder: this.placeholder, onStopTyping: (e) => this.handleStopTyping(e), onKeyUp: (e) => utils.handleEnterKeydSubmit(e, () => this.handleSubmit()), value: this.value, size: this.size }));
2100
- }
2101
- renderButton() {
2102
- if (!this.showSearchButton) {
2103
- return null;
2104
- }
2105
- const iconProp = this.searchButtonIconOnly ? { icon: "search" } : null;
2106
- const buttonLabel = this.searchButtonIconOnly ? "" : "CERCA";
2107
- const defaultProps = Object.assign({ disabled: this.preventSubmit, variant: this.variant, size: this.size, onClick: () => this.handleSubmit() }, iconProp);
2108
- return index.h("z-button", Object.assign({}, defaultProps), buttonLabel);
2109
- }
2110
- renderResults() {
2111
- if (!this.showResults ||
2112
- !this.autocomplete ||
2113
- !this.searchString ||
2114
- this.searchString.length < this.autocompleteMinChars ||
2115
- !this.resultsItemsList) {
2116
- return null;
2117
- }
2118
- return (index.h("div", { class: "results-wrapper" }, index.h("div", { class: "results" }, this.renderResultsList())));
2119
- }
2120
- renderResultsList() {
2121
- var _a, _b;
2122
- if (this.preventSubmit && !((_a = this.resultsItemsList) === null || _a === void 0 ? void 0 : _a.length)) {
2123
- return (index.h("span", { class: "item item-no-results" }, "Non abbiamo trovato risultati per ", index.h("b", null, this.searchString), index.h("br", null), index.h("br", null), "Cosa puoi fare?", index.h("ul", null, index.h("li", null, "Verificare di aver scritto bene"), index.h("li", null, "Provare a cercare un'altra parola"), index.h("li", null, "Provare a cercare qualcosa di pi\u00F9 generico"))));
2124
- }
2125
- return (index.h("z-list", { role: "listbox", id: `list-${this.htmlid}` }, this.renderSearchHelper(!!((_b = this.resultsItemsList) === null || _b === void 0 ? void 0 : _b.length)), this.renderItems(), this.renderShowAllResults()));
2126
- }
2127
- renderItems() {
2128
- var _a;
2129
- if (!((_a = this.resultsItemsList) === null || _a === void 0 ? void 0 : _a.length)) {
2130
- return [];
2131
- }
2132
- const groupedItems = this.getGroupedItems(this.resultsItemsList);
2133
- const listGroups = [];
2134
- let counter = 0;
2135
- Object.values(groupedItems).forEach((groupItem, index$2, array) => {
2136
- if (this.checkResultsCount(counter)) {
2137
- const listGroupsElements = [];
2138
- groupItem.items.forEach((item, subindex, subarray) => {
2139
- if (this.checkResultsCount(counter)) {
2140
- const isLast = index$2 === array.length - 1 && subindex === subarray.length - 1;
2141
- listGroupsElements.push(this.renderItem(item, subindex, !isLast));
2142
- }
2143
- counter++;
2144
- });
2145
- if (listGroupsElements.length) {
2146
- listGroups.push(index.h("z-list-group", { "divider-type": index$1.ListDividerType.ELEMENT }, this.renderItemCategory(groupItem), listGroupsElements));
2147
- }
2148
- }
2149
- });
2150
- return listGroups;
2151
- }
2152
- renderItem(item, key, divider) {
2153
- return (index.h("z-list-element", { id: `list-item-${this.htmlid}-${key}`, role: "option", tabindex: 0, dividerType: divider ? index$1.ListDividerType.ELEMENT : undefined, clickable: true, onClickItem: () => this.emitSearchItemClick(item) }, index.h("div", { class: "list-element" }, index.h("span", { class: { "item": true, "ellipsis": this.resultsEllipsis, "has-category": !!item.category } }, (item === null || item === void 0 ? void 0 : item.icon) && (index.h("z-icon", { class: "item-icon", name: item.icon })), index.h("span", { class: "item-label", title: item.label, innerHTML: this.renderItemLabel(item.label) })), (item === null || item === void 0 ? void 0 : item.tag) && index.h("z-tag", { icon: item.tag.icon }, !this.isMobile ? item.tag.text : ""))));
2154
- }
2155
- renderItemLabel(label) {
2156
- if (!this.searchString) {
2157
- return label;
2158
- }
2159
- return label.replace(new RegExp(this.searchString.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "gmi"), (found) => `<mark>${found}</mark>`);
2160
- }
2161
- renderItemCategory(groupItem) {
2162
- if (!(groupItem === null || groupItem === void 0 ? void 0 : groupItem.category)) {
2163
- return null;
2164
- }
2165
- return (index.h("span", { class: "category-heading", slot: "header-title" }, index.h("span", { class: "category" }, groupItem.category), (groupItem === null || groupItem === void 0 ? void 0 : groupItem.subcategory) && index.h("span", { class: "subcategory" }, groupItem.subcategory)));
2166
- }
2167
- renderSearchHelper(hasDivider = true) {
2168
- if (!this.autocomplete || this.preventSubmit || !this.searchString) {
2169
- return null;
2170
- }
2171
- return (index.h("z-list-element", { role: "option", tabindex: 0, dividerType: hasDivider ? index$1.ListDividerType.ELEMENT : undefined, clickable: true, id: `list-item-${this.htmlid}-search`, onClickItem: () => this.emitSearchSubmit() }, index.h("span", { class: "item item-search" }, index.h("z-icon", { class: "search-icon", name: "left-magnifying-glass" }), index.h("span", { class: "item-label", innerHTML: this.searchHelperLabel.replace("{searchString}", `<mark>${this.searchString}</mark>`) }))));
2172
- }
2173
- renderShowAllResults() {
2174
- var _a, _b;
2175
- if (!this.currResultsCount ||
2176
- !this.searchString ||
2177
- !((_a = this.resultsItemsList) === null || _a === void 0 ? void 0 : _a.length) ||
2178
- this.currResultsCount >= ((_b = this.resultsItemsList) === null || _b === void 0 ? void 0 : _b.length)) {
2179
- return null;
2180
- }
2181
- return (index.h("z-list-element", { role: "option", tabindex: 0, clickable: true, id: `list-item-${this.htmlid}-show-all`, onClickItem: () => (this.currResultsCount = 0), color: "color-primary01" }, index.h("div", { class: "item-show-all" }, "Vedi tutti i risultati")));
2182
- }
2183
- render() {
2184
- return (index.h(index.Host, { key: '49e7bb3d48c18519e07ac4952188f271895dd1a1', onFocus: () => (this.showResults = true), onClick: (e) => this.handleOutsideClick(e), class: { "has-submit": this.showSearchButton, "has-results": this.autocomplete } }, index.h("div", { key: '033d0ae0a35385e0d9d915e18887650b997c5688', class: "input-container" }, this.renderInput(), this.renderResults()), this.renderButton()));
2185
- }
2186
- get element() { return index.getElement(this); }
2187
- static get watchers() { return {
2188
- "resultsItems": ["watchItems"],
2189
- "resultsCount": ["watchResultsCount"],
2190
- "value": ["watchValue"],
2191
- "searchString": ["watchSearchString"]
2192
- }; }
2193
- };
2194
- ZSearchbar.style = ZSearchbarStyle0;
2195
-
2196
- const stylesCss = ".sc-z-tag-h{--z-icon-width:14px;--z-icon-height:14px;--z-tag-text-color:var(--color-primary03);--z-tag-bg:var(--color-hover-primary);display:flex;width:fit-content;max-width:inherit;height:fit-content;max-height:inherit;padding:calc(var(--space-unit) / 2);background-color:var(--z-tag-bg);border-radius:var(--border-radius);color:var(--z-tag-text-color);fill:var(--z-tag-text-color);font-family:var(--font-family-sans);line-height:14px;text-transform:uppercase}.sc-z-tag-h>z-icon.sc-z-tag{margin-right:var(--space-unit)}.expandable.sc-z-tag-h>z-icon.sc-z-tag{margin-right:0;transition:margin-right 0.3s ease-out}.sc-z-tag-h:not(.expandable)>z-icon.sc-z-tag:not(:last-child),.expandable.sc-z-tag-h:hover>z-icon.sc-z-tag:not(:last-child){margin-right:var(--space-unit);transition:margin-right 0.3s ease-out 0s}.expandable.sc-z-tag-h>div.sc-z-tag{overflow:hidden;max-width:0;max-height:0}.expandable.sc-z-tag-h:hover>div.sc-z-tag{max-width:100%;max-height:100%}";
2197
- const ZTagStyle0 = stylesCss;
2198
-
2199
- const ZTag = class {
2200
- constructor(hostRef) {
2201
- index.registerInstance(this, hostRef);
2202
- this.icon = undefined;
2203
- this.expandable = undefined;
2204
- }
2205
- render() {
2206
- return (index.h(index.Host, { key: '9d45170a5cefce5d815ac7b5402123645a8d243b', class: {
2207
- "body-5-sb": true,
2208
- "expandable": this.expandable && !!this.icon,
2209
- } }, this.icon && index.h("z-icon", { name: this.icon }), index.h("div", { key: '9cf3b9f7b169709cf109cdab4d0cfe346a9eb29c' }, index.h("slot", { key: 'c26454112b3fa7ce120eaf50844cb82c9e11e751' }))));
2210
- }
2211
- };
2212
- ZTag.style = ZTagStyle0;
2213
-
2214
- exports.z_app_header = ZAppHeader;
2215
- exports.z_button = ZButton;
2216
- exports.z_divider = ZDivider;
2217
- exports.z_dragdrop_area = ZDragdropArea;
2218
- exports.z_file_upload = ZFileUpload;
2219
- exports.z_icon = ZIcon;
2220
- exports.z_input = ZInput;
2221
- exports.z_input_message = ZInputMessage;
2222
- exports.z_list = ZList;
2223
- exports.z_list_element = ZListElement;
2224
- exports.z_list_group = ZListGroup;
2225
- exports.z_modal = ZModal;
2226
- exports.z_offcanvas = ZOffcanvas;
2227
- exports.z_searchbar = ZSearchbar;
2228
- exports.z_tag = ZTag;
2229
-
2230
- //# sourceMappingURL=z-app-header_15.cjs.entry.js.map