@zanichelli/albe-web-components 13.4.0-RC2 → 13.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/web-components-library.cjs.js +1 -1
  4. package/dist/cjs/z-alert.cjs.entry.js +1 -1
  5. package/dist/cjs/z-anchor-navigation.cjs.entry.js +4 -4
  6. package/dist/cjs/z-anchor-navigation.cjs.entry.js.map +1 -1
  7. package/dist/cjs/z-app-header_12.cjs.entry.js +4 -4
  8. package/dist/cjs/z-breadcrumb.cjs.entry.js +79 -86
  9. package/dist/cjs/z-breadcrumb.cjs.entry.js.map +1 -1
  10. package/dist/cjs/z-cover-hero.cjs.entry.js +2 -2
  11. package/dist/cjs/z-ghost-loading.cjs.entry.js +1 -1
  12. package/dist/cjs/z-info-reveal.cjs.entry.js +28 -28
  13. package/dist/cjs/z-info-reveal.cjs.entry.js.map +1 -1
  14. package/dist/cjs/z-link.cjs.entry.js +1 -1
  15. package/dist/cjs/z-messages-pocket.cjs.entry.js +1 -1
  16. package/dist/cjs/z-myz-card-alert.cjs.entry.js +1 -1
  17. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
  18. package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +1 -1
  19. package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -1
  20. package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
  21. package/dist/cjs/z-myz-card-info.cjs.entry.js +1 -1
  22. package/dist/cjs/z-myz-card-list.cjs.entry.js +1 -1
  23. package/dist/cjs/z-myz-card_4.cjs.entry.js +4 -4
  24. package/dist/cjs/z-myz-list.cjs.entry.js +1 -1
  25. package/dist/cjs/z-otp.cjs.entry.js +2 -2
  26. package/dist/cjs/z-pocket-message.cjs.entry.js +1 -1
  27. package/dist/cjs/z-pocket_3.cjs.entry.js +3 -3
  28. package/dist/cjs/z-popover.cjs.entry.js +1 -1
  29. package/dist/cjs/z-section-title.cjs.entry.js +1 -1
  30. package/dist/cjs/z-skip-to-content.cjs.entry.js +1 -1
  31. package/dist/cjs/z-visually-hidden.cjs.entry.js +1 -1
  32. package/dist/collection/components/z-anchor-navigation/index.js +3 -3
  33. package/dist/collection/components/z-anchor-navigation/index.js.map +1 -1
  34. package/dist/collection/components/z-anchor-navigation/styles.css +3 -3
  35. package/dist/collection/components/z-breadcrumb/index.js +78 -85
  36. package/dist/collection/components/z-breadcrumb/index.js.map +1 -1
  37. package/dist/collection/components/z-breadcrumb/index.spec.js +3 -2
  38. package/dist/collection/components/z-breadcrumb/index.spec.js.map +1 -1
  39. package/dist/collection/components/z-breadcrumb/styles.css +61 -59
  40. package/dist/collection/components/z-cover-hero/index.js +2 -2
  41. package/dist/collection/components/z-divider/index.js +1 -1
  42. package/dist/collection/components/z-ghost-loading/index.js +1 -1
  43. package/dist/collection/components/z-info-reveal/index.js +94 -40
  44. package/dist/collection/components/z-info-reveal/index.js.map +1 -1
  45. package/dist/collection/components/z-info-reveal/styles.css +90 -61
  46. package/dist/collection/components/z-offcanvas/index.js +1 -1
  47. package/dist/collection/components/z-popover/index.js +1 -1
  48. package/dist/collection/components/z-section-title/index.js +1 -1
  49. package/dist/collection/components/z-skip-to-content/index.js +1 -1
  50. package/dist/collection/components/z-tag/index.js +2 -2
  51. package/dist/collection/components/z-visually-hidden/index.js +1 -1
  52. package/dist/collection/deprecated/z-link/index.js +1 -1
  53. package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +1 -1
  54. package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +1 -1
  55. package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +1 -1
  56. package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +1 -1
  57. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
  58. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -1
  59. package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +1 -1
  60. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
  61. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +1 -1
  62. package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
  63. package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
  64. package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
  65. package/dist/collection/snowflakes/myz/pocket/z-messages-pocket/index.js +1 -1
  66. package/dist/collection/snowflakes/myz/pocket/z-pocket/index.js +1 -1
  67. package/dist/collection/snowflakes/myz/pocket/z-pocket-body/index.js +1 -1
  68. package/dist/collection/snowflakes/myz/pocket/z-pocket-header/index.js +1 -1
  69. package/dist/collection/snowflakes/myz/pocket/z-pocket-message/index.js +1 -1
  70. package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
  71. package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
  72. package/dist/components/index16.js +1 -1
  73. package/dist/components/index17.js +1 -1
  74. package/dist/components/index18.js +1 -1
  75. package/dist/components/index19.js +1 -1
  76. package/dist/components/index21.js +1 -1
  77. package/dist/components/index22.js +1 -1
  78. package/dist/components/index23.js +1 -1
  79. package/dist/components/index24.js +1 -1
  80. package/dist/components/index25.js +1 -1
  81. package/dist/components/index27.js +2 -2
  82. package/dist/components/index3.js +1 -1
  83. package/dist/components/index6.js +1 -1
  84. package/dist/components/index8.js +1 -1
  85. package/dist/components/z-anchor-navigation.js +4 -4
  86. package/dist/components/z-anchor-navigation.js.map +1 -1
  87. package/dist/components/z-breadcrumb.js +80 -87
  88. package/dist/components/z-breadcrumb.js.map +1 -1
  89. package/dist/components/z-cover-hero.js +2 -2
  90. package/dist/components/z-info-reveal.js +35 -33
  91. package/dist/components/z-info-reveal.js.map +1 -1
  92. package/dist/components/z-link.js +1 -1
  93. package/dist/components/z-messages-pocket.js +1 -1
  94. package/dist/components/z-myz-card-alert.js +1 -1
  95. package/dist/components/z-myz-card-dictionary.js +1 -1
  96. package/dist/components/z-myz-card-footer-sections.js +1 -1
  97. package/dist/components/z-myz-card-footer.js +1 -1
  98. package/dist/components/z-myz-card-icon.js +1 -1
  99. package/dist/components/z-myz-card-info.js +1 -1
  100. package/dist/components/z-myz-card-list.js +1 -1
  101. package/dist/components/z-myz-list.js +1 -1
  102. package/dist/components/z-otp.js +2 -2
  103. package/dist/components/z-pocket-message.js +1 -1
  104. package/dist/components/z-section-title.js +1 -1
  105. package/dist/components/z-skip-to-content.js +1 -1
  106. package/dist/components/z-visually-hidden.js +1 -1
  107. package/dist/esm/loader.js +1 -1
  108. package/dist/esm/web-components-library.js +1 -1
  109. package/dist/esm/z-alert.entry.js +1 -1
  110. package/dist/esm/z-anchor-navigation.entry.js +4 -4
  111. package/dist/esm/z-anchor-navigation.entry.js.map +1 -1
  112. package/dist/esm/z-app-header_12.entry.js +4 -4
  113. package/dist/esm/z-breadcrumb.entry.js +80 -87
  114. package/dist/esm/z-breadcrumb.entry.js.map +1 -1
  115. package/dist/esm/z-cover-hero.entry.js +2 -2
  116. package/dist/esm/z-ghost-loading.entry.js +1 -1
  117. package/dist/esm/z-info-reveal.entry.js +29 -29
  118. package/dist/esm/z-info-reveal.entry.js.map +1 -1
  119. package/dist/esm/z-link.entry.js +1 -1
  120. package/dist/esm/z-messages-pocket.entry.js +1 -1
  121. package/dist/esm/z-myz-card-alert.entry.js +1 -1
  122. package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
  123. package/dist/esm/z-myz-card-footer-sections.entry.js +1 -1
  124. package/dist/esm/z-myz-card-footer.entry.js +1 -1
  125. package/dist/esm/z-myz-card-icon.entry.js +1 -1
  126. package/dist/esm/z-myz-card-info.entry.js +1 -1
  127. package/dist/esm/z-myz-card-list.entry.js +1 -1
  128. package/dist/esm/z-myz-card_4.entry.js +4 -4
  129. package/dist/esm/z-myz-list.entry.js +1 -1
  130. package/dist/esm/z-otp.entry.js +2 -2
  131. package/dist/esm/z-pocket-message.entry.js +1 -1
  132. package/dist/esm/z-pocket_3.entry.js +3 -3
  133. package/dist/esm/z-popover.entry.js +1 -1
  134. package/dist/esm/z-section-title.entry.js +1 -1
  135. package/dist/esm/z-skip-to-content.entry.js +1 -1
  136. package/dist/esm/z-visually-hidden.entry.js +1 -1
  137. package/dist/types/components/z-anchor-navigation/index.d.ts +1 -1
  138. package/dist/types/components/z-breadcrumb/index.d.ts +5 -8
  139. package/dist/types/components/z-info-reveal/index.d.ts +27 -15
  140. package/dist/types/components.d.ts +38 -6
  141. package/{www/build/p-a53ab86e.entry.js → dist/web-components-library/p-02c08dd1.entry.js} +2 -2
  142. package/dist/web-components-library/{p-239fb968.entry.js → p-164b4986.entry.js} +2 -2
  143. package/dist/web-components-library/p-1768c5e0.entry.js +2 -0
  144. package/dist/web-components-library/p-1768c5e0.entry.js.map +1 -0
  145. package/dist/web-components-library/{p-24ab494d.entry.js → p-19ba8574.entry.js} +2 -2
  146. package/dist/web-components-library/p-2ae88c97.entry.js +2 -0
  147. package/dist/web-components-library/p-2ae88c97.entry.js.map +1 -0
  148. package/dist/web-components-library/p-2ed9ce08.entry.js +2 -0
  149. package/dist/web-components-library/{p-d251f105.entry.js → p-3643303f.entry.js} +2 -2
  150. package/dist/web-components-library/{p-996c1471.entry.js → p-36f7ed38.entry.js} +2 -2
  151. package/dist/web-components-library/{p-05b39597.entry.js → p-41c72490.entry.js} +2 -2
  152. package/{www/build/p-04755b76.entry.js → dist/web-components-library/p-4cf24a3b.entry.js} +2 -2
  153. package/dist/web-components-library/{p-00d7315a.entry.js → p-4d944fcd.entry.js} +2 -2
  154. package/dist/web-components-library/{p-b57362ef.entry.js → p-589a9033.entry.js} +2 -2
  155. package/dist/web-components-library/{p-5d67d311.entry.js → p-59875f0f.entry.js} +2 -2
  156. package/{www/build/p-d1f8ca38.entry.js → dist/web-components-library/p-5b260d8b.entry.js} +2 -2
  157. package/dist/web-components-library/{p-f3c3448f.entry.js → p-7787e428.entry.js} +2 -2
  158. package/dist/web-components-library/{p-8d81a5c8.entry.js → p-8ce62075.entry.js} +2 -2
  159. package/dist/web-components-library/{p-b670ffa5.entry.js → p-acf5a569.entry.js} +2 -2
  160. package/dist/web-components-library/{p-dbc437d8.entry.js → p-c2d44867.entry.js} +2 -2
  161. package/dist/web-components-library/{p-120a809e.entry.js → p-ca65c04f.entry.js} +2 -2
  162. package/{www/build/p-942e5126.entry.js → dist/web-components-library/p-d593548c.entry.js} +2 -2
  163. package/dist/web-components-library/p-dbda8812.entry.js +2 -0
  164. package/dist/web-components-library/p-dbda8812.entry.js.map +1 -0
  165. package/{www/build/p-d92765b6.entry.js → dist/web-components-library/p-e40b9b27.entry.js} +2 -2
  166. package/dist/web-components-library/{p-95104b91.entry.js → p-e522c00c.entry.js} +2 -2
  167. package/dist/web-components-library/{p-f7607ce7.entry.js → p-eac25945.entry.js} +2 -2
  168. package/dist/web-components-library/{p-6edd5dbe.entry.js → p-eb10781f.entry.js} +2 -2
  169. package/dist/web-components-library/web-components-library.esm.js +1 -1
  170. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  171. package/package.json +1 -1
  172. package/{dist/web-components-library/p-a53ab86e.entry.js → www/build/p-02c08dd1.entry.js} +2 -2
  173. package/www/build/{p-239fb968.entry.js → p-164b4986.entry.js} +2 -2
  174. package/www/build/p-1768c5e0.entry.js +2 -0
  175. package/www/build/p-1768c5e0.entry.js.map +1 -0
  176. package/www/build/{p-24ab494d.entry.js → p-19ba8574.entry.js} +2 -2
  177. package/www/build/p-2ae88c97.entry.js +2 -0
  178. package/www/build/p-2ae88c97.entry.js.map +1 -0
  179. package/www/build/p-2ed9ce08.entry.js +2 -0
  180. package/www/build/{p-d251f105.entry.js → p-3643303f.entry.js} +2 -2
  181. package/www/build/{p-996c1471.entry.js → p-36f7ed38.entry.js} +2 -2
  182. package/www/build/{p-05b39597.entry.js → p-41c72490.entry.js} +2 -2
  183. package/{dist/web-components-library/p-04755b76.entry.js → www/build/p-4cf24a3b.entry.js} +2 -2
  184. package/www/build/{p-00d7315a.entry.js → p-4d944fcd.entry.js} +2 -2
  185. package/www/build/{p-6acfce26.js → p-57cd2f36.js} +1 -1
  186. package/www/build/{p-b57362ef.entry.js → p-589a9033.entry.js} +2 -2
  187. package/www/build/{p-5d67d311.entry.js → p-59875f0f.entry.js} +2 -2
  188. package/{dist/web-components-library/p-d1f8ca38.entry.js → www/build/p-5b260d8b.entry.js} +2 -2
  189. package/www/build/{p-f3c3448f.entry.js → p-7787e428.entry.js} +2 -2
  190. package/www/build/{p-8d81a5c8.entry.js → p-8ce62075.entry.js} +2 -2
  191. package/www/build/{p-b670ffa5.entry.js → p-acf5a569.entry.js} +2 -2
  192. package/www/build/{p-dbc437d8.entry.js → p-c2d44867.entry.js} +2 -2
  193. package/www/build/{p-120a809e.entry.js → p-ca65c04f.entry.js} +2 -2
  194. package/{dist/web-components-library/p-942e5126.entry.js → www/build/p-d593548c.entry.js} +2 -2
  195. package/www/build/p-dbda8812.entry.js +2 -0
  196. package/www/build/p-dbda8812.entry.js.map +1 -0
  197. package/{dist/web-components-library/p-d92765b6.entry.js → www/build/p-e40b9b27.entry.js} +2 -2
  198. package/www/build/{p-95104b91.entry.js → p-e522c00c.entry.js} +2 -2
  199. package/www/build/{p-f7607ce7.entry.js → p-eac25945.entry.js} +2 -2
  200. package/www/build/{p-6edd5dbe.entry.js → p-eb10781f.entry.js} +2 -2
  201. package/www/build/web-components-library.esm.js +1 -1
  202. package/www/build/web-components-library.esm.js.map +1 -1
  203. package/www/index.html +1 -1
  204. package/dist/web-components-library/p-34541d7c.entry.js +0 -2
  205. package/dist/web-components-library/p-34541d7c.entry.js.map +0 -1
  206. package/dist/web-components-library/p-4c40561d.entry.js +0 -2
  207. package/dist/web-components-library/p-5eb0a064.entry.js +0 -2
  208. package/dist/web-components-library/p-5eb0a064.entry.js.map +0 -1
  209. package/dist/web-components-library/p-acfde9fa.entry.js +0 -2
  210. package/dist/web-components-library/p-acfde9fa.entry.js.map +0 -1
  211. package/www/build/p-34541d7c.entry.js +0 -2
  212. package/www/build/p-34541d7c.entry.js.map +0 -1
  213. package/www/build/p-4c40561d.entry.js +0 -2
  214. package/www/build/p-5eb0a064.entry.js +0 -2
  215. package/www/build/p-5eb0a064.entry.js.map +0 -1
  216. package/www/build/p-acfde9fa.entry.js +0 -2
  217. package/www/build/p-acfde9fa.entry.js.map +0 -1
  218. /package/dist/web-components-library/{p-a53ab86e.entry.js.map → p-02c08dd1.entry.js.map} +0 -0
  219. /package/dist/web-components-library/{p-239fb968.entry.js.map → p-164b4986.entry.js.map} +0 -0
  220. /package/dist/web-components-library/{p-24ab494d.entry.js.map → p-19ba8574.entry.js.map} +0 -0
  221. /package/dist/web-components-library/{p-4c40561d.entry.js.map → p-2ed9ce08.entry.js.map} +0 -0
  222. /package/dist/web-components-library/{p-d251f105.entry.js.map → p-3643303f.entry.js.map} +0 -0
  223. /package/dist/web-components-library/{p-996c1471.entry.js.map → p-36f7ed38.entry.js.map} +0 -0
  224. /package/dist/web-components-library/{p-05b39597.entry.js.map → p-41c72490.entry.js.map} +0 -0
  225. /package/dist/web-components-library/{p-04755b76.entry.js.map → p-4cf24a3b.entry.js.map} +0 -0
  226. /package/dist/web-components-library/{p-00d7315a.entry.js.map → p-4d944fcd.entry.js.map} +0 -0
  227. /package/dist/web-components-library/{p-b57362ef.entry.js.map → p-589a9033.entry.js.map} +0 -0
  228. /package/dist/web-components-library/{p-5d67d311.entry.js.map → p-59875f0f.entry.js.map} +0 -0
  229. /package/dist/web-components-library/{p-d1f8ca38.entry.js.map → p-5b260d8b.entry.js.map} +0 -0
  230. /package/dist/web-components-library/{p-f3c3448f.entry.js.map → p-7787e428.entry.js.map} +0 -0
  231. /package/dist/web-components-library/{p-8d81a5c8.entry.js.map → p-8ce62075.entry.js.map} +0 -0
  232. /package/dist/web-components-library/{p-b670ffa5.entry.js.map → p-acf5a569.entry.js.map} +0 -0
  233. /package/dist/web-components-library/{p-dbc437d8.entry.js.map → p-c2d44867.entry.js.map} +0 -0
  234. /package/dist/web-components-library/{p-120a809e.entry.js.map → p-ca65c04f.entry.js.map} +0 -0
  235. /package/dist/web-components-library/{p-942e5126.entry.js.map → p-d593548c.entry.js.map} +0 -0
  236. /package/dist/web-components-library/{p-d92765b6.entry.js.map → p-e40b9b27.entry.js.map} +0 -0
  237. /package/dist/web-components-library/{p-95104b91.entry.js.map → p-e522c00c.entry.js.map} +0 -0
  238. /package/dist/web-components-library/{p-f7607ce7.entry.js.map → p-eac25945.entry.js.map} +0 -0
  239. /package/dist/web-components-library/{p-6edd5dbe.entry.js.map → p-eb10781f.entry.js.map} +0 -0
  240. /package/www/build/{p-a53ab86e.entry.js.map → p-02c08dd1.entry.js.map} +0 -0
  241. /package/www/build/{p-239fb968.entry.js.map → p-164b4986.entry.js.map} +0 -0
  242. /package/www/build/{p-24ab494d.entry.js.map → p-19ba8574.entry.js.map} +0 -0
  243. /package/www/build/{p-4c40561d.entry.js.map → p-2ed9ce08.entry.js.map} +0 -0
  244. /package/www/build/{p-d251f105.entry.js.map → p-3643303f.entry.js.map} +0 -0
  245. /package/www/build/{p-996c1471.entry.js.map → p-36f7ed38.entry.js.map} +0 -0
  246. /package/www/build/{p-05b39597.entry.js.map → p-41c72490.entry.js.map} +0 -0
  247. /package/www/build/{p-04755b76.entry.js.map → p-4cf24a3b.entry.js.map} +0 -0
  248. /package/www/build/{p-00d7315a.entry.js.map → p-4d944fcd.entry.js.map} +0 -0
  249. /package/www/build/{p-b57362ef.entry.js.map → p-589a9033.entry.js.map} +0 -0
  250. /package/www/build/{p-5d67d311.entry.js.map → p-59875f0f.entry.js.map} +0 -0
  251. /package/www/build/{p-d1f8ca38.entry.js.map → p-5b260d8b.entry.js.map} +0 -0
  252. /package/www/build/{p-f3c3448f.entry.js.map → p-7787e428.entry.js.map} +0 -0
  253. /package/www/build/{p-8d81a5c8.entry.js.map → p-8ce62075.entry.js.map} +0 -0
  254. /package/www/build/{p-b670ffa5.entry.js.map → p-acf5a569.entry.js.map} +0 -0
  255. /package/www/build/{p-dbc437d8.entry.js.map → p-c2d44867.entry.js.map} +0 -0
  256. /package/www/build/{p-120a809e.entry.js.map → p-ca65c04f.entry.js.map} +0 -0
  257. /package/www/build/{p-942e5126.entry.js.map → p-d593548c.entry.js.map} +0 -0
  258. /package/www/build/{p-d92765b6.entry.js.map → p-e40b9b27.entry.js.map} +0 -0
  259. /package/www/build/{p-95104b91.entry.js.map → p-e522c00c.entry.js.map} +0 -0
  260. /package/www/build/{p-f7607ce7.entry.js.map → p-eac25945.entry.js.map} +0 -0
  261. /package/www/build/{p-6edd5dbe.entry.js.map → p-eb10781f.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/z-breadcrumb/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAe,MAAM,eAAe,CAAC;AAC3G,OAAO,EACL,yBAAyB,EAEzB,mBAAmB,EACnB,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAC,SAAS,EAAE,oBAAoB,EAAC,MAAM,mBAAmB,CAAC;AAOlE,MAAM,OAAO,WAAW;;QAmFd,sBAAiB,GAAqB,EAAE,CAAC;QAUzC,iBAAY,GAAG,CAAC,CAAC;QAUjB,qBAAgB,GAAG,IAAI,CAAC;yBA7FE,mBAAmB,CAAC,UAAU;+BAIlB,yBAAyB,CAAC,IAAI;8BAI1D,CAAC;gCAIC,KAAK;oCAID,CAAC;4BAIT,EAAE;;2BAQJ,KAAK;mCAGG,KAAK;;IAO3B,YAAY;QACV,IAAI,CAAC,aAAa,GAAG,SAAS,EAAE,CAAC;QACjC,IACE,IAAI,CAAC,aAAa,KAAK,MAAM,CAAC,MAAM;YACp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AAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Prop, h, State, Host, Listen, Element, Event, Watch, EventEmitter} from \"@stencil/core\";\nimport {\n BreadcrumbHomepageVariant,\n BreadcrumbPath,\n BreadcrumbPathStyle,\n Device,\n KeyboardCode,\n ListSize,\n PopoverPosition,\n} from \"../../beans\";\nimport {getDevice, handleKeyboardSubmit} from \"../../utils/utils\";\n\n@Component({\n tag: \"z-breadcrumb\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZBreadcrumb {\n /* Accessibility references */\n /* Overflow-menu: https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/ */\n /* Breadcrumb: https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/ */\n /* Focus on multiline link: https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance.html */\n\n @Element() hostElement: HTMLZBreadcrumbElement;\n\n /** [optional] Sets the path style */\n @Prop({reflect: true})\n pathStyle?: BreadcrumbPathStyle = BreadcrumbPathStyle.UNDERLINED;\n\n /** [optional] Variant of first node */\n @Prop()\n homepageVariant?: BreadcrumbHomepageVariant = BreadcrumbHomepageVariant.ICON;\n\n /** [optional] Sets max number of element to show */\n @Prop()\n maxNodesToShow? = 5;\n\n /** [optional] Controls the behaviour on <a> tag click/enter */\n @Prop()\n preventFollowUrl? = false;\n\n /** [optional] Sets max number of row for each path inside the popover. Zero equals unlimited */\n @Prop()\n overflowMenuItemRows? = 0;\n\n /** [optional] Sets the maximun number of chars per single node */\n @Prop()\n truncateChar? = 30;\n\n /** Handle mobile */\n @State()\n viewPortWidth: Device;\n\n /** Detect whether the length of the nodes shown exceeds the container length */\n @State()\n hasOverflow = false;\n\n @State()\n popoverEllipsisOpen = false;\n\n /** Emitted when preventFollowUrl=true to handle custom page transition */\n @Event()\n clickOnNode: EventEmitter<BreadcrumbPath[\"path\"]>;\n\n @Listen(\"resize\", {target: \"window\"})\n handleResize(): void {\n this.viewPortWidth = getDevice();\n if (\n this.viewPortWidth !== Device.MOBILE &&\n this.wrapElement &&\n this.wrapElement.scrollWidth > this.wrapElement.clientWidth\n ) {\n this.hasOverflow = true;\n }\n }\n // eslint-disable-next-line lines-between-class-members\n @Watch(\"maxNodesToShow\")\n handlePropChange(): void {\n this.initializeBreadcrumb(this.viewPortWidth === Device.MOBILE);\n }\n\n @Watch(\"viewPortWidth\")\n handleResizeUp(newValue: Device, oldValue: Device): void {\n if (\n newValue === Device.MOBILE ||\n (oldValue === Device.MOBILE && newValue === Device.TABLET) ||\n (oldValue === Device.MOBILE && newValue === Device.DESKTOP) ||\n (oldValue === Device.MOBILE && newValue === Device.DESKTOP_WIDE) ||\n (oldValue === Device.TABLET && newValue === Device.DESKTOP) ||\n (oldValue === Device.TABLET && newValue === Device.DESKTOP_WIDE) ||\n (oldValue === Device.DESKTOP && newValue === Device.DESKTOP_WIDE)\n ) {\n this.initializeBreadcrumb(this.viewPortWidth === Device.MOBILE);\n }\n }\n\n private pathsList: BreadcrumbPath[];\n\n private pathListCopy: BreadcrumbPath[];\n\n private collapsedElements: BreadcrumbPath[] = [];\n\n private collapsedElementsRef: HTMLZPopoverElement;\n\n private triggerButton: HTMLButtonElement;\n\n private triggerEllipsis: HTMLAnchorElement;\n\n private wrapElement: HTMLElement;\n\n private currentIndex = 0;\n\n private homepageNode: BreadcrumbPath;\n\n private totalLenght: number;\n\n private anchorElements;\n\n private currentEllipsisText: string;\n\n private truncatePosition = null;\n\n componentWillLoad(): void {\n this.viewPortWidth = getDevice();\n this.initializeBreadcrumb(this.viewPortWidth === Device.MOBILE);\n }\n\n componentWillRender(): void {\n if (this.viewPortWidth !== Device.MOBILE && this.hasOverflow) {\n this.checkEllipsisOrOverflowMenu();\n this.hasOverflow = false;\n }\n }\n\n componentDidRender(): void {\n if (this.collapsedElementsRef) {\n this.anchorElements = Array.from(this.hostElement.shadowRoot.querySelectorAll(\"z-list-group a\"));\n }\n\n if (this.viewPortWidth !== Device.MOBILE && this.wrapElement.scrollWidth > this.wrapElement.clientWidth) {\n this.hasOverflow = true;\n }\n }\n\n private initializeBreadcrumb(isMobile: boolean): void {\n if (isMobile) {\n this.pathsList = this.getPathsItemsList().filter((item) => !!item.path);\n } else {\n this.pathsList = this.getPathsItemsList();\n }\n this.totalLenght = this.pathsList.length;\n this.homepageNode = this.pathsList.shift();\n this.pathListCopy = JSON.parse(JSON.stringify(this.pathsList));\n this.collapsedElements = [];\n if (this.totalLenght > this.maxNodesToShow) {\n this.collapsedElements = this.pathsList.splice(0, this.pathsList.length - 2);\n }\n }\n\n private checkEllipsisOrOverflowMenu(): void {\n if (this.pathListCopy.length > 0) {\n for (let i = 0; i < this.pathsList.length; i++) {\n if (this.pathsList[i].text.length > this.truncateChar) {\n if (this.truncatePosition !== null) {\n if (this.truncatePosition > 0) {\n const arrayToPush = this.pathListCopy.splice(0, this.truncatePosition);\n arrayToPush.forEach((item) => {\n this.collapsedElements.push(item);\n });\n this.pathsList.splice(0, this.truncatePosition);\n this.truncatePosition = 0;\n\n return;\n }\n if (this.truncatePosition === 0) {\n const arrayToPush = this.pathListCopy.splice(0, this.truncatePosition + 1);\n this.collapsedElements.push(...arrayToPush);\n this.pathsList.splice(0, this.truncatePosition + 1);\n this.truncatePosition = null;\n\n return;\n }\n }\n if (i !== this.pathsList.length - 1) {\n const truncatedString = this.truncateWithEllipsis(this.pathsList[i].text, this.truncateChar);\n this.currentEllipsisText = this.pathsList[i].text;\n this.pathsList[i].text = truncatedString;\n this.pathsList[i].hasTooltip = true;\n this.truncatePosition = i;\n\n return;\n }\n }\n }\n }\n }\n\n private truncateWithEllipsis(str: string, length: number): string {\n const ending = \"&mldr;\";\n\n if (str.length > length) {\n return str.substring(0, length - 1) + ending;\n }\n\n return str;\n }\n\n private getPathsItemsList(): BreadcrumbPath[] {\n return Array.from(this.hostElement.children).map((item: HTMLAnchorElement) => {\n return {\n text: item.textContent,\n path: item.href,\n hasTooltip: false,\n };\n });\n }\n\n private renderMobileBreadcrumb(): HTMLDivElement {\n const lastPath = this.pathsList[this.pathsList.length - 1];\n\n return (\n <nav\n aria-label=\"Breadcrumb\"\n class={{\n underlined: this.pathStyle === BreadcrumbPathStyle.UNDERLINED,\n semibold: this.pathStyle === BreadcrumbPathStyle.SEMIBOLD,\n }}\n >\n <ol>{this.renderNode(lastPath, true)}</ol>\n </nav>\n );\n }\n\n private renderHomepageNode(item): HTMLLIElement {\n return (\n <li>\n <a\n class={{\n \"homepage-icon\": this.homepageVariant === BreadcrumbHomepageVariant.ICON,\n \"homepage-text\": this.homepageVariant === BreadcrumbHomepageVariant.TEXT,\n }}\n href={item.path}\n onClick={(e) => this.handlePreventFollowUrl(e, item)}\n >\n {this.homepageVariant === BreadcrumbHomepageVariant.ICON ? (\n <z-icon\n name=\"home\"\n fill=\"color-link-primary\"\n height={16}\n width={16}\n />\n ) : (\n \"Home\"\n )}\n </a>\n </li>\n );\n }\n\n private renderNode(item, mobile): HTMLLIElement {\n return (\n <li>\n {item.hasTooltip && (\n <z-popover\n class=\"full-path-tooltip\"\n bind-to={this.triggerEllipsis}\n open={this.popoverEllipsisOpen}\n position={PopoverPosition.BOTTOM_RIGHT}\n closable={false}\n showArrow\n >\n <span class=\"tooltip-content\">{this.currentEllipsisText}</span>\n </z-popover>\n )}\n <a\n class={{\n \"missing-path\": !item.path,\n \"text-ellipsis\": mobile,\n }}\n ref={(val) => (this.triggerEllipsis = val)}\n aria-current={item.path ? undefined : \"page\"}\n href={item.path}\n onClick={(e) => this.handlePreventFollowUrl(e, item)}\n onMouseOver={() => {\n if (item.hasTooltip) {\n this.popoverEllipsisOpen = true;\n }\n }}\n onMouseLeave={() => {\n if (item.hasTooltip) {\n this.popoverEllipsisOpen = false;\n }\n }}\n innerHTML={mobile ? `<z-icon fill=\"color-link-primary\" name=\"chevron-left\"></z-icon>${item.text}` : item.text}\n />\n </li>\n );\n }\n\n private renderBreadcrumb(): HTMLElement {\n return (\n <nav\n ref={(val) => (this.wrapElement = val)}\n aria-label=\"Breadcrumb\"\n class={{\n underlined: this.pathStyle === BreadcrumbPathStyle.UNDERLINED,\n semibold: this.pathStyle === BreadcrumbPathStyle.SEMIBOLD,\n }}\n >\n <ol>\n {this.renderHomepageNode(this.homepageNode)}\n {this.collapsedElements.length ? this.renderOverflowMenu() : \"\"}\n {this.pathsList.map((item) => this.renderNode(item, false))}\n </ol>\n </nav>\n );\n }\n\n private togglePopover(): void {\n if (!this.collapsedElementsRef.open) {\n this.collapsedElementsRef.open = true;\n }\n }\n\n private handlePreventFollowUrl(e: MouseEvent, item): void {\n if (this.preventFollowUrl) {\n e.preventDefault();\n this.clickOnNode.emit(item.path);\n }\n }\n\n private handleOverflowMenuAccessibility(e: KeyboardEvent): void {\n const anchorElementsLenght = this.anchorElements.length;\n if (e.key === KeyboardCode.TAB) {\n e.preventDefault();\n\n return;\n }\n e.stopPropagation();\n const arrows = [KeyboardCode.ARROW_DOWN, KeyboardCode.ARROW_UP];\n if (arrows.includes(e.key as KeyboardCode)) {\n e.preventDefault();\n\n if (e.key === KeyboardCode.ARROW_DOWN) {\n this.currentIndex = anchorElementsLenght === this.currentIndex + 1 ? 0 : this.currentIndex + 1;\n }\n if (e.key === KeyboardCode.ARROW_UP) {\n this.currentIndex = this.currentIndex <= 0 ? anchorElementsLenght - 1 : this.currentIndex - 1;\n }\n\n this.anchorElements[this.currentIndex].focus();\n }\n\n if (e.key === KeyboardCode.ESC) {\n this.triggerButton.focus();\n }\n }\n\n private renderOverflowMenu(): HTMLLIElement {\n if (this.collapsedElements.length) {\n return (\n <li>\n <z-popover\n class=\"hidden-paths-popover\"\n ref={(val) => (this.collapsedElementsRef = val as HTMLZPopoverElement)}\n bind-to={this.triggerButton}\n position={PopoverPosition.BOTTOM_RIGHT}\n closable={true}\n showArrow\n >\n <div class=\"popover-content\">\n <z-list>\n <z-list-group size={ListSize.SMALL}>\n {this.collapsedElements.map((item, index, array) => {\n return (\n <div>\n <z-list-element clickable>\n <a\n class=\"text-ellipsis\"\n href={item.path}\n onClick={(e) => this.handlePreventFollowUrl(e, item)}\n onKeyDown={(e) => this.handleOverflowMenuAccessibility(e)}\n >\n {item.text}\n </a>\n </z-list-element>\n {index < array.length - 1 && <z-divider color=\"color-surface03\"></z-divider>}\n </div>\n );\n })}\n </z-list-group>\n </z-list>\n </div>\n </z-popover>\n <button\n aria-label=\"Mostra più breadcrumb\"\n aria-haspopup=\"true\"\n ref={(el) => (this.triggerButton = el as HTMLButtonElement)}\n class=\"dots\"\n onClick={() => {\n this.togglePopover();\n }}\n onKeyDown={(e) => {\n handleKeyboardSubmit(e, this.togglePopover.bind(this));\n setTimeout(() => {\n this.anchorElements[0].focus();\n }, 100);\n }}\n >\n ...\n </button>\n </li>\n );\n }\n }\n\n render(): HTMLZBreadcrumbElement {\n return (\n <Host style={{\"--line-clamp-popover\": `${this.overflowMenuItemRows}`}}>\n {this.viewPortWidth === Device.MOBILE ? this.renderMobileBreadcrumb() : this.renderBreadcrumb()}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/z-breadcrumb/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAe,MAAM,eAAe,CAAC;AAC3G,OAAO,EACL,yBAAyB,EAEzB,mBAAmB,EACnB,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAC,SAAS,EAAE,oBAAoB,EAAC,MAAM,mBAAmB,CAAC;AAOlE,MAAM,OAAO,WAAW;;QAmDd,sBAAiB,GAAqB,EA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ACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Prop, h, State, Host, Listen, Element, Event, Watch, EventEmitter} from \"@stencil/core\";\nimport {\n BreadcrumbHomepageVariant,\n BreadcrumbPath,\n BreadcrumbPathStyle,\n Device,\n KeyboardCode,\n ListSize,\n PopoverPosition,\n} from \"../../beans\";\nimport {getDevice, handleKeyboardSubmit} from \"../../utils/utils\";\n\n@Component({\n tag: \"z-breadcrumb\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZBreadcrumb {\n /* Accessibility references */\n /* Overflow-menu: https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/ */\n /* Breadcrumb: https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/ */\n /* Focus on multiline link: https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance.html */\n\n @Element() hostElement: HTMLZBreadcrumbElement;\n\n /** [optional] Sets the path style */\n @Prop({reflect: true})\n pathStyle?: BreadcrumbPathStyle = BreadcrumbPathStyle.UNDERLINED;\n\n /** [optional] Variant of first node */\n @Prop()\n homepageVariant?: BreadcrumbHomepageVariant = BreadcrumbHomepageVariant.ICON;\n\n /** [optional] Sets max number of element to show */\n @Prop()\n maxNodesToShow? = 5;\n\n /** [optional] Controls the behaviour on <a> tag click/enter */\n @Prop()\n preventFollowUrl? = false;\n\n /** [optional] Sets max number of row for each path inside the popover. Zero equals unlimited */\n @Prop()\n overflowMenuItemRows? = 0;\n\n /** [optional] Sets the maximun number of chars per single node */\n @Prop()\n truncateChar? = 30;\n\n /** Handle mobile */\n @State()\n viewPortWidth: Device;\n\n /** Detect whether the length of the nodes shown exceeds the container length */\n @State()\n hasOverflow = false;\n\n @State()\n popoverEllipsisOpen = false;\n\n /** Emitted when preventFollowUrl=true to handle custom page transition */\n @Event()\n clickOnNode: EventEmitter<BreadcrumbPath[\"path\"]>;\n\n private pathsList: BreadcrumbPath[];\n\n private pathListCopy: BreadcrumbPath[];\n\n private collapsedElements: BreadcrumbPath[] = [];\n\n private collapsedElementsRef: HTMLZPopoverElement;\n\n private triggerButton: HTMLButtonElement;\n\n private wrapElement: HTMLElement;\n\n private currentIndex = 0;\n\n private homepageNode: BreadcrumbPath;\n\n private anchorElements;\n\n private currentEllipsisText: string;\n\n private truncatePosition = null;\n\n @Listen(\"resize\", {target: \"window\"})\n handleResize(): void {\n this.viewPortWidth = getDevice();\n if (\n this.viewPortWidth !== Device.MOBILE &&\n this.wrapElement &&\n this.wrapElement.scrollWidth > this.wrapElement.clientWidth\n ) {\n this.hasOverflow = true;\n }\n }\n // eslint-disable-next-line lines-between-class-members\n @Watch(\"maxNodesToShow\")\n handlePropChange(): void {\n this.initializeBreadcrumb();\n }\n\n @Watch(\"viewPortWidth\")\n handleResizeUp(newValue: Device, oldValue: Device): void {\n if (\n newValue === Device.MOBILE ||\n (oldValue === Device.MOBILE && newValue === Device.TABLET) ||\n (oldValue === Device.MOBILE && newValue === Device.DESKTOP) ||\n (oldValue === Device.MOBILE && newValue === Device.DESKTOP_WIDE) ||\n (oldValue === Device.TABLET && newValue === Device.DESKTOP) ||\n (oldValue === Device.TABLET && newValue === Device.DESKTOP_WIDE) ||\n (oldValue === Device.DESKTOP && newValue === Device.DESKTOP_WIDE)\n ) {\n this.initializeBreadcrumb();\n }\n }\n\n componentWillLoad(): void {\n this.viewPortWidth = getDevice();\n this.initializeBreadcrumb();\n }\n\n componentWillRender(): void {\n if (this.viewPortWidth !== Device.MOBILE && this.hasOverflow) {\n this.checkEllipsisOrOverflowMenu();\n this.hasOverflow = false;\n }\n }\n\n componentDidRender(): void {\n if (this.collapsedElementsRef) {\n this.anchorElements = Array.from(this.hostElement.shadowRoot.querySelectorAll(\"z-list-group a\"));\n }\n\n if (this.viewPortWidth !== Device.MOBILE && this.wrapElement.scrollWidth > this.wrapElement.clientWidth) {\n this.hasOverflow = true;\n }\n }\n\n private initializeBreadcrumb(): void {\n if (this.viewPortWidth === Device.MOBILE) {\n this.pathsList = this.getPathsItemsList().filter((item) => !!item.path);\n } else {\n this.pathsList = this.getPathsItemsList();\n }\n this.homepageNode = this.pathsList.shift();\n this.pathListCopy = [...this.pathsList];\n this.collapsedElements = [];\n if (this.pathsList.length > this.maxNodesToShow) {\n this.collapsedElements = this.pathsList.splice(0, this.pathsList.length - 2);\n }\n }\n\n private checkEllipsisOrOverflowMenu(): void {\n for (let i = 0; i < this.pathsList.length; i++) {\n if (this.pathsList[i].text.length <= this.truncateChar) {\n continue;\n }\n\n if (this.truncatePosition > 0) {\n this.collapsedElements.push(...this.pathListCopy.splice(0, this.truncatePosition));\n this.pathsList.splice(0, this.truncatePosition);\n this.truncatePosition = 0;\n\n return;\n } else if (this.truncatePosition === 0) {\n this.collapsedElements.push(...this.pathListCopy.splice(0, this.truncatePosition + 1));\n this.pathsList.splice(0, this.truncatePosition + 1);\n this.truncatePosition = null;\n\n return;\n }\n\n if (i !== this.pathsList.length - 1) {\n const truncatedString = this.truncateWithEllipsis(this.pathsList[i].text, this.truncateChar);\n this.currentEllipsisText = this.pathsList[i].text;\n this.pathsList[i].text = truncatedString;\n this.pathsList[i].hasTooltip = true;\n this.truncatePosition = i;\n\n return;\n }\n }\n }\n\n private truncateWithEllipsis(str: string, maxLength: number): string {\n if (str.length <= maxLength) {\n return str;\n }\n\n return str.substring(0, maxLength - 1) + \"&mldr;\";\n }\n\n private getPathsItemsList(): BreadcrumbPath[] {\n return Array.from(this.hostElement.children).map((item: HTMLAnchorElement) => {\n return {\n text: item.textContent,\n path: item.href,\n hasTooltip: false,\n };\n });\n }\n\n private renderHomepageNode(): HTMLLIElement {\n return (\n <li>\n <a\n class={{\n \"homepage-text\": this.homepageVariant === BreadcrumbHomepageVariant.TEXT,\n }}\n href={this.homepageNode.path}\n onClick={(e) => this.handlePreventFollowUrl(e, this.homepageNode)}\n innerHTML={\n this.homepageVariant === BreadcrumbHomepageVariant.ICON\n ? `<z-icon name=\"home\" />`\n : this.homepageNode.text || \"Home\"\n }\n />\n {this.pathsList.length > 0 && (\n <z-icon\n class=\"separator\"\n name=\"chevron-right\"\n />\n )}\n </li>\n );\n }\n\n private togglePopover(): void {\n if (!this.collapsedElementsRef.open) {\n this.collapsedElementsRef.open = true;\n }\n }\n\n private handlePreventFollowUrl(e: MouseEvent, item): void {\n if (this.preventFollowUrl) {\n e.preventDefault();\n this.clickOnNode.emit(item.path);\n }\n }\n\n private handleOverflowMenuAccessibility(e: KeyboardEvent): void {\n const anchorElementsLenght = this.anchorElements.length;\n if (e.key === KeyboardCode.TAB) {\n e.preventDefault();\n\n return;\n }\n e.stopPropagation();\n const arrows = [KeyboardCode.ARROW_DOWN, KeyboardCode.ARROW_UP];\n if (arrows.includes(e.key as KeyboardCode)) {\n e.preventDefault();\n\n if (e.key === KeyboardCode.ARROW_DOWN) {\n this.currentIndex = anchorElementsLenght === this.currentIndex + 1 ? 0 : this.currentIndex + 1;\n }\n if (e.key === KeyboardCode.ARROW_UP) {\n this.currentIndex = this.currentIndex <= 0 ? anchorElementsLenght - 1 : this.currentIndex - 1;\n }\n\n this.anchorElements[this.currentIndex].focus();\n }\n\n if (e.key === KeyboardCode.ESC) {\n this.triggerButton.focus();\n }\n }\n\n private renderOverflowMenu(): HTMLLIElement {\n return (\n <li>\n <z-popover\n class=\"hidden-paths-popover\"\n ref={(val) => (this.collapsedElementsRef = val as HTMLZPopoverElement)}\n bindTo={this.triggerButton}\n position={PopoverPosition.BOTTOM_RIGHT}\n closable\n showArrow\n >\n <div class=\"popover-content\">\n <z-list>\n <z-list-group size={ListSize.SMALL}>\n {this.collapsedElements.map((item, index, array) => {\n return (\n <div>\n <z-list-element clickable>\n <a\n class=\"text-ellipsis\"\n href={item.path}\n onClick={(e) => this.handlePreventFollowUrl(e, item)}\n onKeyDown={(e) => this.handleOverflowMenuAccessibility(e)}\n innerHTML={item.text}\n />\n </z-list-element>\n {index < array.length - 1 && <z-divider color=\"color-surface03\"></z-divider>}\n </div>\n );\n })}\n </z-list-group>\n </z-list>\n </div>\n </z-popover>\n <button\n class=\"dots\"\n ref={(el) => (this.triggerButton = el)}\n aria-label=\"Mostra più breadcrumb\"\n aria-haspopup=\"true\"\n onClick={() => {\n this.togglePopover();\n }}\n onKeyDown={(e) => {\n handleKeyboardSubmit(e, this.togglePopover.bind(this));\n setTimeout(() => {\n this.anchorElements[0].focus();\n }, 100);\n }}\n innerHTML=\"&mldr;\"\n ></button>\n {this.pathsList.length > 0 && (\n <z-icon\n class=\"separator\"\n name=\"chevron-right\"\n />\n )}\n </li>\n );\n }\n\n private renderMobileItems(): HTMLLIElement {\n // show only the second to last element\n const secondToLastPath = this.pathsList[this.pathsList.length - 1];\n\n if (!secondToLastPath) {\n return;\n }\n\n return (\n <li>\n <a\n aria-current={secondToLastPath.path ? undefined : \"page\"}\n href={secondToLastPath.path}\n onClick={(e) => this.handlePreventFollowUrl(e, secondToLastPath)}\n >\n <z-icon name=\"chevron-left\" />\n <span\n class={{\n \"missing-path\": !secondToLastPath.path,\n \"text-ellipsis\": true,\n }}\n >\n {secondToLastPath.text}\n </span>\n </a>\n </li>\n );\n }\n\n private renderItems(): HTMLElement[] {\n let trigger;\n\n return [\n this.renderHomepageNode(),\n this.collapsedElements.length > 0 && this.renderOverflowMenu(),\n ...this.pathsList.map((item, index) => (\n <li>\n {item.hasTooltip && (\n <z-popover\n class=\"full-path-tooltip\"\n bindTo={trigger}\n open={this.popoverEllipsisOpen}\n position={PopoverPosition.BOTTOM_RIGHT}\n closable={false}\n showArrow\n >\n <span class=\"tooltip-content\">{this.currentEllipsisText}</span>\n </z-popover>\n )}\n <a\n class={{\"missing-path\": !item.path}}\n ref={(val) => (trigger = val)}\n aria-current={item.path ? undefined : \"page\"}\n href={item.path}\n onClick={(e) => this.handlePreventFollowUrl(e, item)}\n onMouseOver={() => {\n if (item.hasTooltip) {\n this.popoverEllipsisOpen = true;\n }\n }}\n onMouseLeave={() => {\n if (item.hasTooltip) {\n this.popoverEllipsisOpen = false;\n }\n }}\n innerHTML={item.text}\n />\n {index !== this.pathsList.length - 1 && (\n <z-icon\n class=\"separator\"\n name=\"chevron-right\"\n />\n )}\n </li>\n )),\n ];\n }\n\n render(): HTMLZBreadcrumbElement {\n return (\n <Host style={{\"--line-clamp-popover\": `${this.overflowMenuItemRows}`}}>\n <nav\n ref={(val) => (this.wrapElement = val)}\n aria-label=\"Breadcrumb\"\n class={{\n semibold: this.pathStyle === BreadcrumbPathStyle.SEMIBOLD,\n underlined: this.pathStyle === BreadcrumbPathStyle.UNDERLINED,\n }}\n >\n <ol>{this.viewPortWidth === Device.MOBILE ? this.renderMobileItems() : this.renderItems()}</ol>\n </nav>\n </Host>\n );\n }\n}\n"]}
@@ -14,9 +14,10 @@ describe("Suite test ZBreadcrumb", () => {
14
14
  <nav aria-label="Breadcrumb" class="underlined">
15
15
  <ol>
16
16
  <li>
17
- <a class="homepage-icon" href="http://testing.stenciljs.com/link1">
18
- <z-icon fill="color-link-primary" height="16" name="home" width="16"></z-icon>
17
+ <a href="http://testing.stenciljs.com/link1">
18
+ <z-icon name="home"></z-icon>
19
19
  </a>
20
+ <z-icon class="separator" name="chevron-right"></z-icon>
20
21
  </li>
21
22
  <li>
22
23
  <a href="http://testing.stenciljs.com/link2">
@@ -1 +1 @@
1
- {"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../src/components/z-breadcrumb/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAEpC,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,EAAE,CAAC,8CAA8C,EAAE,KAAK,IAAI,EAAE;QAC5D,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,WAAW,CAAC;YACzB,IAAI,EAAE;;;sBAGU;SACjB,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;oBAuBd,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import {newSpecPage} from \"@stencil/core/testing\";\n\nimport {ZBreadcrumb} from \"./index\";\n\ndescribe(\"Suite test ZBreadcrumb\", () => {\n it(\"Test render ZBreadcrumb with passed children\", async () => {\n const page = await newSpecPage({\n components: [ZBreadcrumb],\n html: `<z-breadcrumb>\n <a href=\"./link1\">Link 1</a>\n <a href=\"./link2\">Link 2</a>\n </z-breadcrumb>`,\n });\n\n expect(page.root).toEqualHtml(`<z-breadcrumb path-style=\"underlined\" style=\"--line-clamp-popover: 0;\">\n <mock:shadow-root>\n <nav aria-label=\"Breadcrumb\" class=\"underlined\">\n <ol>\n <li>\n <a class=\"homepage-icon\" href=\"http://testing.stenciljs.com/link1\">\n <z-icon fill=\"color-link-primary\" height=\"16\" name=\"home\" width=\"16\"></z-icon>\n </a>\n </li>\n <li>\n <a href=\"http://testing.stenciljs.com/link2\">\n Link 2\n </a>\n </li>\n </ol>\n </nav>\n </mock:shadow-root>\n <a href=\"./link1\">\n Link 1\n </a>\n <a href=\"./link2\">\n Link 2\n </a>\n </z-breadcrumb>`);\n });\n});\n"]}
1
+ {"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../src/components/z-breadcrumb/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAEpC,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,EAAE,CAAC,8CAA8C,EAAE,KAAK,IAAI,EAAE;QAC5D,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,WAAW,CAAC;YACzB,IAAI,EAAE;;;sBAGU;SACjB,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;oBAwBd,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import {newSpecPage} from \"@stencil/core/testing\";\n\nimport {ZBreadcrumb} from \"./index\";\n\ndescribe(\"Suite test ZBreadcrumb\", () => {\n it(\"Test render ZBreadcrumb with passed children\", async () => {\n const page = await newSpecPage({\n components: [ZBreadcrumb],\n html: `<z-breadcrumb>\n <a href=\"./link1\">Link 1</a>\n <a href=\"./link2\">Link 2</a>\n </z-breadcrumb>`,\n });\n\n expect(page.root).toEqualHtml(`<z-breadcrumb path-style=\"underlined\" style=\"--line-clamp-popover: 0;\">\n <mock:shadow-root>\n <nav aria-label=\"Breadcrumb\" class=\"underlined\">\n <ol>\n <li>\n <a href=\"http://testing.stenciljs.com/link1\">\n <z-icon name=\"home\"></z-icon>\n </a>\n <z-icon class=\"separator\" name=\"chevron-right\"></z-icon>\n </li>\n <li>\n <a href=\"http://testing.stenciljs.com/link2\">\n Link 2\n </a>\n </li>\n </ol>\n </nav>\n </mock:shadow-root>\n <a href=\"./link1\">\n Link 1\n </a>\n <a href=\"./link2\">\n Link 2\n </a>\n </z-breadcrumb>`);\n });\n});\n"]}
@@ -6,6 +6,10 @@
6
6
  --line-clamp-mobile: 1;
7
7
  }
8
8
 
9
+ * {
10
+ box-sizing: border-box;
11
+ }
12
+
9
13
  button {
10
14
  padding: 0;
11
15
  border: none;
@@ -15,132 +19,130 @@ button {
15
19
 
16
20
  nav {
17
21
  display: flex;
18
- height: 30px;
19
22
  align-items: center;
20
- padding-left: calc(var(--space-unit) / 2);
21
- overflow-x: hidden;
22
23
  }
23
24
 
24
- li {
25
+ ol {
25
26
  display: flex;
26
- align-items: baseline;
27
+ align-items: center;
28
+ padding: 0;
29
+ margin: 0;
30
+ column-gap: var(--space-unit);
31
+ list-style: none;
27
32
  }
28
33
 
29
- :host a:focus,
30
- :host button:focus {
31
- box-shadow: var(--shadow-focus-primary);
32
- outline: 0;
34
+ li {
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: flex-start;
38
+ column-gap: var(--space-unit);
33
39
  }
34
40
 
35
- :host a {
36
- color: var(--color-link-primary);
41
+ ol li > a,
42
+ ol li > button {
37
43
  font-size: var(--font-size-2);
38
- text-decoration: none;
39
- white-space: nowrap;
44
+ letter-spacing: 0.16px;
45
+ line-height: 1.4;
40
46
  }
41
47
 
42
- :host a.homepage-icon {
43
- display: list-item;
48
+ a:focus,
49
+ button:focus {
50
+ box-shadow: var(--shadow-focus-primary);
51
+ outline: none;
44
52
  }
45
53
 
46
- :host a.homepage-text {
47
- display: initial;
48
- margin-top: calc(var(--space-unit) / 4);
49
- margin-right: var(--space-unit);
54
+ a {
55
+ color: var(--color-link-primary);
56
+ white-space: nowrap;
50
57
  }
51
58
 
52
- :host a.missing-path {
59
+ a.missing-path {
53
60
  color: var(--color-text01);
54
61
  }
55
62
 
56
- :host a.text-ellipsis {
57
- display: -webkit-box !important;
63
+ .text-ellipsis {
64
+ display: -webkit-box;
58
65
  overflow: hidden;
59
66
  -webkit-box-orient: vertical;
60
67
  -webkit-line-clamp: var(--line-clamp-mobile);
61
68
  text-overflow: ellipsis;
62
- white-space: normal;
63
- }
64
-
65
- :host ol {
66
- display: flex;
67
- padding: 0;
68
- margin: 0;
69
- list-style-type: none;
69
+ white-space: initial;
70
70
  }
71
71
 
72
- :host ol > li:not(:first-child, :last-child) {
73
- margin-right: var(--space-unit);
72
+ nav.semibold > ol > li > a:not(.missing-path),
73
+ nav.semibold > ol > li > button {
74
+ font-weight: var(--font-sb);
75
+ text-decoration: none;
74
76
  }
75
77
 
76
- nav.underlined > ol > li a:not(.missing-path),
77
- nav.underlined > ol > li button {
78
+ nav.underlined a,
79
+ nav.underlined button {
78
80
  text-decoration: underline;
79
81
  }
80
82
 
81
- nav.semibold > ol > li a:not(.missing-path),
82
- nav.semibold > ol > li button {
83
- font-weight: var(--font-sb);
83
+ z-icon {
84
+ --z-icon-width: 16px;
85
+ --z-icon-height: 16px;
86
+
87
+ display: block;
88
+ fill: var(--color-link-primary);
84
89
  }
85
90
 
86
- :host z-icon {
87
- margin-right: var(--space-unit);
91
+ z-icon.separator {
92
+ --z-icon-width: 10px;
93
+ --z-icon-height: 10px;
88
94
 
89
- --z-icon-width: 12px;
90
- --z-icon-height: 12px;
95
+ fill: var(--gray500);
91
96
  }
92
97
 
93
- :host button.dots {
98
+ button.dots {
94
99
  display: inline-block;
95
100
  color: var(--color-link-primary);
96
101
  cursor: pointer;
97
102
  }
98
103
 
99
- :host .hidden-paths-popover .popover-content {
104
+ .hidden-paths-popover .popover-content {
100
105
  max-width: 302px;
101
106
  padding: calc(var(--space-unit) / 2) var(--space-unit);
102
107
  text-align: left;
103
108
  }
104
109
 
105
- :host .hidden-paths-popover .popover-content a {
110
+ .hidden-paths-popover .popover-content a {
106
111
  font-weight: var(--font-rg);
107
112
  text-decoration: none;
108
113
  }
109
114
 
110
- :host .hidden-paths-popover {
115
+ .hidden-paths-popover {
111
116
  --z-popover-theme--surface: var(--color-surface02);
112
117
  --z-popover-padding: 0;
113
118
  }
114
119
 
115
- :host .hidden-paths-popover::before,
120
+ .hidden-paths-popover::before,
116
121
  .full-path-tooltip::before {
117
122
  --arrow-edge-offset: calc(100% - (var(--space-unit) * 2.55));
118
123
  }
119
124
 
120
- :host .full-path-tooltip {
125
+ .full-path-tooltip {
121
126
  --z-popover-theme--surface: var(--color-surface05);
122
127
  --z-popover-theme--text: var(--color-text-inverse);
123
128
  --z-popover-padding: 0;
124
129
  }
125
130
 
126
- :host .tooltip-content {
131
+ .tooltip-content {
127
132
  padding: 0 var(--space-unit);
128
133
  font-size: var(--font-size-2);
129
134
  }
130
135
 
131
136
  @media (min-width: 768px) {
132
- /* https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/examples/breadcrumb/#accessibilityfeatures */
133
- :host ol > li + li::before {
134
- display: inline-block;
135
- width: 10px;
136
- height: 10px;
137
- flex: 1;
138
- margin-right: 2px;
139
- color: var(--color-disabled03);
140
- content: "\203A";
137
+ .text-ellipsis {
138
+ -webkit-line-clamp: var(--line-clamp-popover);
141
139
  }
140
+ }
142
141
 
143
- :host a.text-ellipsis {
144
- -webkit-line-clamp: var(--line-clamp-popover);
142
+ @media (max-width: 767px) {
143
+ li a {
144
+ display: flex;
145
+ align-items: center;
146
+ column-gap: var(--space-unit);
145
147
  }
146
148
  }
@@ -35,9 +35,9 @@ export class ZCoverHero {
35
35
  return (h("div", { class: "content-container" }, h("slot", { name: "content" })));
36
36
  }
37
37
  render() {
38
- return (h(Host, { key: 'c63b0f9c84abfc58decac9a19d62b30b9ed3b4df' }, this.variant === CoverHeroVariant.STACKED &&
38
+ return (h(Host, { key: '5fe68ea4b76b9938e202f20e2f3d41bdc2346553' }, this.variant === CoverHeroVariant.STACKED &&
39
39
  this.contentPosition === CoverHeroContentPosition.TOP &&
40
- this.renderContent(), h("div", { key: 'ac589b5b997c26d78a0a9d6e5bc3b1e20490d940', class: "main-container" }, h("div", { key: '195b39698c303d0cef4f57bbaaf60064604eb084', class: "cover-container" }, h("slot", { key: 'e17be72350e529deb6f17092d54360bcc97dbca4', name: "cover" })), h("slot", { key: 'ddc3008776b9eb94b3f10ca133c35090298a1de1', name: "info-reveal" }), this.variant === CoverHeroVariant.OVERLAY && this.renderContent()), this.variant === CoverHeroVariant.STACKED &&
40
+ this.renderContent(), h("div", { key: 'c39734aada37cc8d7d0c3953caf8ba42c4276ead', class: "main-container" }, h("div", { key: '6b749c89d1c8ba23e08c694de457981f8cde8ffb', class: "cover-container" }, h("slot", { key: 'dbb58f0a9f1b657e0c867b18458a2cc0903f6c6e', name: "cover" })), h("slot", { key: 'd8b93de81c83a1080b7a5e0f6aed6475be67af53', name: "info-reveal" }), this.variant === CoverHeroVariant.OVERLAY && this.renderContent()), this.variant === CoverHeroVariant.STACKED &&
41
41
  this.contentPosition === CoverHeroContentPosition.BOTTOM &&
42
42
  this.renderContent()));
43
43
  }
@@ -7,7 +7,7 @@ export class ZDivider {
7
7
  this.orientation = DividerOrientation.HORIZONTAL;
8
8
  }
9
9
  render() {
10
- return (h(Host, { key: '2dd73f0950f7c3f83fb650b12d92631fa353c67f', class: `divider-${this.size} divider-${this.orientation}`, style: { backgroundColor: `var(--${this.color})` } }));
10
+ return (h(Host, { key: '2f058ffac1fd07ea8bd499de4749a4fd1f766414', class: `divider-${this.size} divider-${this.orientation}`, style: { backgroundColor: `var(--${this.color})` } }));
11
11
  }
12
12
  static get is() { return "z-divider"; }
13
13
  static get encapsulation() { return "scoped"; }
@@ -1,7 +1,7 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  export class ZGhostLoading {
3
3
  render() {
4
- return h(Host, { key: '463019d2e47586ce45bfac3ab258320c5c7c3785' });
4
+ return h(Host, { key: 'efae0dd8d520db16bbb3bd49b434ba0fe8e45c33' });
5
5
  }
6
6
  static get is() { return "z-ghost-loading"; }
7
7
  static get encapsulation() { return "shadow"; }
@@ -1,58 +1,53 @@
1
1
  import { h, Host } from "@stencil/core";
2
- import { InfoRevealPosition } from "../../beans";
2
+ import { ControlSize, InfoRevealPosition } from "../../beans";
3
3
  /**
4
4
  * Info reveal component.
5
5
  *
6
- * @slot - info to display in the info box. If more than one element has been slotted,
7
- * by clicking on the panel it switches to the next info element.
8
- * @cssprop --z-info-reveal-theme--surface - background color of the info reveal panel.
9
- * @cssprop --z-info-reveal-theme--text - foreground color of the info reveal panel.
10
- * @cssprop --z-info-reveal-shadow - shadow of the info reveal panel.
11
- * @cssprop --z-info-reveal-max-width - max width of the info reveal panel.
6
+ * @slot - content of the info panel.
7
+ * @cssprop --z-info-reveal-panel-width - Width of the info panel.
12
8
  */
13
9
  export class ZInfoReveal {
14
10
  constructor() {
15
11
  this.icon = "informationsource";
16
12
  this.position = InfoRevealPosition.BOTTOM_RIGHT;
17
13
  this.label = undefined;
14
+ this.ariaLabel = "Apri pannello informazioni";
15
+ this.size = ControlSize.BIG;
18
16
  this.open = false;
19
- this.currentIndex = null;
20
- }
21
- watchItems() {
22
- Array.from(this.el.children).forEach((child, index) => {
23
- if (this.currentIndex === index) {
24
- child.setAttribute("data-current", "");
25
- }
26
- else {
27
- child.removeAttribute("data-current");
28
- }
29
- });
30
17
  }
31
18
  /**
32
- * Open the info box.
19
+ * Adjust the position of the info panel to prevent exiting the viewport.
33
20
  */
34
- openInfoBox() {
35
- this.currentIndex = 0;
36
- this.open = true;
21
+ adjustPanelPosition() {
22
+ if (!this.open || !this.panel) {
23
+ return;
24
+ }
25
+ const rect = this.host.getBoundingClientRect();
26
+ const gridMargin = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--grid-margin"), 10);
27
+ const pageWidth = document.documentElement.offsetWidth;
28
+ // Available space for the info panel to grow towards the edge of the page, based on the `position` prop.
29
+ const availableSpace = Math.round((this.position.includes("left") ? pageWidth - rect.left : rect.right) - gridMargin);
30
+ this.panel.style.maxWidth = `${availableSpace}px`;
37
31
  }
38
32
  /**
39
- * Close the info box.
33
+ * Toggle the open state of the info panel.
40
34
  */
41
- closeInfoBox() {
42
- this.open = false;
35
+ togglePanel() {
36
+ this.open = !this.open;
43
37
  }
44
38
  /**
45
- * Navigate slotted info.
46
- * It closes the info box after the last info has been navigated.
39
+ * Close the info panel.
47
40
  */
48
- next() {
49
- this.currentIndex = this.currentIndex + 1;
50
- if (this.currentIndex === this.el.children.length) {
51
- this.closeInfoBox();
41
+ closePanel() {
42
+ this.open = false;
43
+ }
44
+ handleEscapeKey(event) {
45
+ if (event.key === "Escape" && this.open) {
46
+ this.closePanel();
52
47
  }
53
48
  }
54
49
  render() {
55
- return (h(Host, { key: '51bcd6c5884e26ac25f2cf5b46d579e70c4a0562', open: this.open }, h("button", { key: '7d8754375d54f85145cb193845dd823f931c321e', class: "z-info-reveal-trigger", onClick: this.openInfoBox.bind(this) }, this.label && h("span", { class: "z-info-reveal-label" }, this.label), h("z-icon", { key: '3bd934391dc01c04380db1a77107558e95661e6c', name: this.icon })), this.open && (h("div", { class: "info-box", onClick: this.next.bind(this), tabIndex: 0 }, h("slot", null), h("button", { class: "z-info-reveal-close", onClick: this.closeInfoBox.bind(this) }, h("z-icon", { name: "close" }))))));
50
+ return (h(Host, { key: 'db425718606f2b7f411fab9cdac57d91ce88560c', open: this.open }, h("button", { key: 'a70882d456af51c526726220a05864ab54ea86d6', class: "z-info-reveal-trigger", type: "button", onClick: this.togglePanel.bind(this), "aria-label": !this.label ? this.ariaLabel : undefined, "aria-expanded": this.open ? "true" : "false", "aria-controls": "z-info-reveal-panel" }, this.icon && h("z-icon", { name: this.icon }), this.label && h("span", { class: "z-info-reveal-label" }, this.label)), h("div", { key: '765172552ea823e07e010a68c201f5fa76fbc93d', class: "z-info-reveal-panel", id: "z-info-reveal-panel", ref: (el) => (this.panel = el), hidden: !this.open }, h("slot", { key: 'f95ed8f0c6c94758b389139dde42289ef8b78ffc' }), h("button", { key: 'a80d002f3d07f101af8bcc84ef2a78d85da7036f', class: "z-info-reveal-close", type: "button", onClick: this.closePanel.bind(this), "aria-label": "Chiudi pannello informazioni" }, h("z-icon", { key: '015386db04b0f4bdb2fefd9da623fb03327fbf86', name: "multiply" })))));
56
51
  }
57
52
  static get is() { return "z-info-reveal"; }
58
53
  static get encapsulation() { return "shadow"; }
@@ -80,7 +75,7 @@ export class ZInfoReveal {
80
75
  "optional": true,
81
76
  "docs": {
82
77
  "tags": [],
83
- "text": "Name of the icon for the open button"
78
+ "text": "Name of the icon for the trigger button"
84
79
  },
85
80
  "attribute": "icon",
86
81
  "reflect": false,
@@ -104,7 +99,7 @@ export class ZInfoReveal {
104
99
  "optional": true,
105
100
  "docs": {
106
101
  "tags": [],
107
- "text": "Info reveal's position"
102
+ "text": "The position of the z-info-reveal in the page. This helps to correctly place the info panel.\nThe panel will grow in the opposite direction of the position.\nFor example, with the default position `BOTTOM_RIGHT`, the panel will grow vertically upwards and horizontally to the left."
108
103
  },
109
104
  "attribute": "position",
110
105
  "reflect": true,
@@ -122,24 +117,83 @@ export class ZInfoReveal {
122
117
  "optional": true,
123
118
  "docs": {
124
119
  "tags": [],
125
- "text": "Text that appears on closed panel next to the open button."
120
+ "text": "Label of the trigger button."
126
121
  },
127
122
  "attribute": "label",
128
123
  "reflect": false
124
+ },
125
+ "ariaLabel": {
126
+ "type": "string",
127
+ "mutable": false,
128
+ "complexType": {
129
+ "original": "string",
130
+ "resolved": "string",
131
+ "references": {}
132
+ },
133
+ "required": false,
134
+ "optional": false,
135
+ "docs": {
136
+ "tags": [],
137
+ "text": "Aria label of the trigger button. It will be only used when `label` prop is empty."
138
+ },
139
+ "attribute": "aria-label",
140
+ "reflect": false,
141
+ "defaultValue": "\"Apri pannello informazioni\""
142
+ },
143
+ "size": {
144
+ "type": "string",
145
+ "mutable": false,
146
+ "complexType": {
147
+ "original": "ControlSize",
148
+ "resolved": "ControlSize.BIG | ControlSize.SMALL | ControlSize.X_SMALL",
149
+ "references": {
150
+ "ControlSize": {
151
+ "location": "import",
152
+ "path": "../../beans",
153
+ "id": "src/beans/index.tsx::ControlSize"
154
+ }
155
+ }
156
+ },
157
+ "required": false,
158
+ "optional": true,
159
+ "docs": {
160
+ "tags": [],
161
+ "text": "Size of the trigger button"
162
+ },
163
+ "attribute": "size",
164
+ "reflect": true,
165
+ "defaultValue": "ControlSize.BIG"
129
166
  }
130
167
  };
131
168
  }
132
169
  static get states() {
133
170
  return {
134
- "open": {},
135
- "currentIndex": {}
171
+ "open": {}
136
172
  };
137
173
  }
138
- static get elementRef() { return "el"; }
174
+ static get elementRef() { return "host"; }
139
175
  static get watchers() {
140
176
  return [{
141
- "propName": "currentIndex",
142
- "methodName": "watchItems"
177
+ "propName": "position",
178
+ "methodName": "adjustPanelPosition"
179
+ }, {
180
+ "propName": "open",
181
+ "methodName": "adjustPanelPosition"
182
+ }];
183
+ }
184
+ static get listeners() {
185
+ return [{
186
+ "name": "resize",
187
+ "method": "adjustPanelPosition",
188
+ "target": "window",
189
+ "capture": false,
190
+ "passive": true
191
+ }, {
192
+ "name": "keydown",
193
+ "method": "handleEscapeKey",
194
+ "target": "window",
195
+ "capture": true,
196
+ "passive": false
143
197
  }];
144
198
  }
145
199
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/z-info-reveal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAQ/C;;;;;;;;;GASG;AACH,MAAM,OAAO,WAAW;;oBAKd,mBAAmB;wBAIK,kBAAkB,CAAC,YAAY;;oBAQxD,KAAK;4BAIW,IAAI;;IAG3B,UAAU;QACR,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YACpD,IAAI,IAAI,CAAC,YAAY,KAAK,KAAK,EAAE,CAAC;gBAChC,KAAK,CAAC,YAAY,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;YACzC,CAAC;iBAAM,CAAC;gBACN,KAAK,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;YACxC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACK,WAAW;QACjB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED;;OAEG;IACK,YAAY;QAClB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;IACpB,CAAC;IAED;;;OAGG;IACK,IAAI;QACV,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QAC1C,IAAI,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YAClD,IAAI,CAAC,YAAY,EAAE,CAAC;QACtB,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,IAAI,EAAE,IAAI,CAAC,IAAI;YACnB,+DACE,KAAK,EAAC,uBAAuB,EAC7B,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC;gBAEnC,IAAI,CAAC,KAAK,IAAI,YAAM,KAAK,EAAC,qBAAqB,IAAE,IAAI,CAAC,KAAK,CAAQ;gBACpE,+DAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,GAAW,CAC3B;YACR,IAAI,CAAC,IAAI,IAAI,CACZ,WACE,KAAK,EAAC,UAAU,EAChB,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAC7B,QAAQ,EAAE,CAAC;gBAEX,eAAa;gBACb,cACE,KAAK,EAAC,qBAAqB,EAC3B,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;oBAErC,cAAQ,IAAI,EAAC,OAAO,GAAU,CACvB,CACL,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, h, Prop, State, Watch, Element, Host} from \"@stencil/core\";\nimport {InfoRevealPosition} from \"../../beans\";\n\n@Component({\n tag: \"z-info-reveal\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\n\n/**\n * Info reveal component.\n *\n * @slot - info to display in the info box. If more than one element has been slotted,\n * by clicking on the panel it switches to the next info element.\n * @cssprop --z-info-reveal-theme--surface - background color of the info reveal panel.\n * @cssprop --z-info-reveal-theme--text - foreground color of the info reveal panel.\n * @cssprop --z-info-reveal-shadow - shadow of the info reveal panel.\n * @cssprop --z-info-reveal-max-width - max width of the info reveal panel.\n */\nexport class ZInfoReveal {\n @Element() el: HTMLZInfoRevealElement;\n\n /** Name of the icon for the open button */\n @Prop()\n icon? = \"informationsource\";\n\n /** Info reveal's position */\n @Prop({reflect: true})\n position?: InfoRevealPosition = InfoRevealPosition.BOTTOM_RIGHT;\n\n /** Text that appears on closed panel next to the open button. */\n @Prop()\n label?: string;\n\n /** Whether the info panel is open. */\n @State()\n open = false;\n\n /** Current index for the info queue. */\n @State()\n currentIndex: number = null;\n\n @Watch(\"currentIndex\")\n watchItems(): void {\n Array.from(this.el.children).forEach((child, index) => {\n if (this.currentIndex === index) {\n child.setAttribute(\"data-current\", \"\");\n } else {\n child.removeAttribute(\"data-current\");\n }\n });\n }\n\n /**\n * Open the info box.\n */\n private openInfoBox(): void {\n this.currentIndex = 0;\n this.open = true;\n }\n\n /**\n * Close the info box.\n */\n private closeInfoBox(): void {\n this.open = false;\n }\n\n /**\n * Navigate slotted info.\n * It closes the info box after the last info has been navigated.\n */\n private next(): void {\n this.currentIndex = this.currentIndex + 1;\n if (this.currentIndex === this.el.children.length) {\n this.closeInfoBox();\n }\n }\n\n render(): HTMLZInfoRevealElement {\n return (\n <Host open={this.open}>\n <button\n class=\"z-info-reveal-trigger\"\n onClick={this.openInfoBox.bind(this)}\n >\n {this.label && <span class=\"z-info-reveal-label\">{this.label}</span>}\n <z-icon name={this.icon}></z-icon>\n </button>\n {this.open && (\n <div\n class=\"info-box\"\n onClick={this.next.bind(this)}\n tabIndex={0}\n >\n <slot></slot>\n <button\n class=\"z-info-reveal-close\"\n onClick={this.closeInfoBox.bind(this)}\n >\n <z-icon name=\"close\"></z-icon>\n </button>\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/z-info-reveal/index.tsx"],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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, h, Prop, State, Host, Listen, Watch, Element} from \"@stencil/core\";\nimport {ControlSize, InfoRevealPosition} from \"../../beans\";\n\n/**\n * Info reveal component.\n *\n * @slot - content of the info panel.\n * @cssprop --z-info-reveal-panel-width - Width of the info panel.\n */\n@Component({\n tag: \"z-info-reveal\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZInfoReveal {\n /** Name of the icon for the trigger button */\n @Prop()\n icon? = \"informationsource\";\n\n /**\n * The position of the z-info-reveal in the page. This helps to correctly place the info panel.\n * The panel will grow in the opposite direction of the position.\n * For example, with the default position `BOTTOM_RIGHT`, the panel will grow vertically upwards and horizontally to the left.\n */\n @Prop({reflect: true})\n position?: InfoRevealPosition = InfoRevealPosition.BOTTOM_RIGHT;\n\n /** Label of the trigger button. */\n @Prop()\n label?: string;\n\n /** Aria label of the trigger button. It will be only used when `label` prop is empty. */\n @Prop()\n ariaLabel = \"Apri pannello informazioni\";\n\n /** Size of the trigger button */\n @Prop({reflect: true})\n size?: ControlSize = ControlSize.BIG;\n\n /** Whether the info panel is open. */\n @State()\n open = false;\n\n @Element() host: HTMLZInfoRevealElement;\n\n private panel: HTMLDivElement;\n\n /**\n * Adjust the position of the info panel to prevent exiting the viewport.\n */\n @Watch(\"position\")\n @Watch(\"open\")\n @Listen(\"resize\", {target: \"window\", passive: true})\n adjustPanelPosition(): void {\n if (!this.open || !this.panel) {\n return;\n }\n\n const rect = this.host.getBoundingClientRect();\n const gridMargin = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"--grid-margin\"), 10);\n const pageWidth = document.documentElement.offsetWidth;\n // Available space for the info panel to grow towards the edge of the page, based on the `position` prop.\n const availableSpace = Math.round(\n (this.position.includes(\"left\") ? pageWidth - rect.left : rect.right) - gridMargin\n );\n this.panel.style.maxWidth = `${availableSpace}px`;\n }\n\n /**\n * Toggle the open state of the info panel.\n */\n private togglePanel(): void {\n this.open = !this.open;\n }\n\n /**\n * Close the info panel.\n */\n private closePanel(): void {\n this.open = false;\n }\n\n @Listen(\"keydown\", {target: \"window\", capture: true})\n handleEscapeKey(event: KeyboardEvent): void {\n if (event.key === \"Escape\" && this.open) {\n this.closePanel();\n }\n }\n\n render(): HTMLZInfoRevealElement {\n return (\n <Host open={this.open}>\n <button\n class=\"z-info-reveal-trigger\"\n type=\"button\"\n onClick={this.togglePanel.bind(this)}\n aria-label={!this.label ? this.ariaLabel : undefined}\n aria-expanded={this.open ? \"true\" : \"false\"}\n aria-controls=\"z-info-reveal-panel\"\n >\n {this.icon && <z-icon name={this.icon} />}\n {this.label && <span class=\"z-info-reveal-label\">{this.label}</span>}\n </button>\n <div\n class=\"z-info-reveal-panel\"\n id=\"z-info-reveal-panel\"\n ref={(el) => (this.panel = el)}\n hidden={!this.open}\n >\n <slot></slot>\n <button\n class=\"z-info-reveal-close\"\n type=\"button\"\n onClick={this.closePanel.bind(this)}\n aria-label=\"Chiudi pannello informazioni\"\n >\n <z-icon name=\"multiply\" />\n </button>\n </div>\n </Host>\n );\n }\n}\n"]}