@zanichelli/albe-web-components 16.0.0-rc2 → 16.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 (764) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/cjs/{index-7ce01c0e.js → index-066b8da0.js} +5 -5
  3. package/dist/cjs/{index-7ce01c0e.js.map → index-066b8da0.js.map} +1 -1
  4. package/dist/cjs/{index-f31d0e66.js → index-1890445d.js} +3 -3
  5. package/dist/cjs/{index-f31d0e66.js.map → index-1890445d.js.map} +1 -1
  6. package/dist/cjs/{index-19279b08.js → index-1f9f28df.js} +3 -3
  7. package/dist/cjs/{index-19279b08.js.map → index-1f9f28df.js.map} +1 -1
  8. package/dist/cjs/{index-a83e999c.js → index-5cc0f0ca.js} +5 -6
  9. package/dist/cjs/index-5cc0f0ca.js.map +1 -0
  10. package/dist/cjs/{index-48cf79d4.js → index-98822eac.js} +6 -6
  11. package/dist/cjs/{index-48cf79d4.js.map → index-98822eac.js.map} +1 -1
  12. package/dist/cjs/{index-94f7957c.js → index-b361709b.js} +3 -3
  13. package/dist/cjs/{index-94f7957c.js.map → index-b361709b.js.map} +1 -1
  14. package/dist/cjs/{index-e3835c94.js → index-bab7a651.js} +3 -1
  15. package/dist/cjs/index-bab7a651.js.map +1 -0
  16. package/dist/cjs/{index-5dc4a8de.js → index-e801ae96.js} +55 -2
  17. package/dist/cjs/index-e801ae96.js.map +1 -0
  18. package/dist/cjs/index.cjs.js +2 -2
  19. package/dist/cjs/loader.cjs.js +2 -2
  20. package/dist/cjs/{utils-0d3ac1c1.js → utils-311316ce.js} +2 -2
  21. package/dist/cjs/{utils-0d3ac1c1.js.map → utils-311316ce.js.map} +1 -1
  22. package/dist/cjs/{utils-1a8655c7.js → utils-6bd8c55e.js} +2 -2
  23. package/dist/cjs/{utils-1a8655c7.js.map → utils-6bd8c55e.js.map} +1 -1
  24. package/dist/cjs/web-components-library.cjs.js +2 -2
  25. package/dist/cjs/z-accordion.cjs.entry.js +3 -3
  26. package/dist/cjs/z-alert.cjs.entry.js +2 -2
  27. package/dist/cjs/z-anchor-navigation.cjs.entry.js +3 -3
  28. package/dist/cjs/z-app-header-deprecated.cjs.entry.js +158 -0
  29. package/dist/cjs/z-app-header-deprecated.cjs.entry.js.map +1 -0
  30. package/dist/cjs/z-app-header_12.cjs.entry.js +197 -67
  31. package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
  32. package/dist/cjs/z-aria-alert.cjs.entry.js +3 -3
  33. package/dist/cjs/z-avatar.cjs.entry.js +4 -4
  34. package/dist/cjs/z-book-card.cjs.entry.js +4 -4
  35. package/dist/cjs/z-breadcrumb.cjs.entry.js +5 -5
  36. package/dist/cjs/z-button-sort.cjs.entry.js +2 -2
  37. package/dist/cjs/z-card.cjs.entry.js +2 -2
  38. package/dist/cjs/z-carousel.cjs.entry.js +2 -2
  39. package/dist/cjs/z-chip.cjs.entry.js +4 -4
  40. package/dist/cjs/z-combobox.cjs.entry.js +4 -4
  41. package/dist/cjs/z-cover-hero.cjs.entry.js +4 -4
  42. package/dist/cjs/z-date-picker.cjs.entry.js +3 -3
  43. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +8 -8
  44. package/dist/cjs/z-file-upload.cjs.entry.js +4 -4
  45. package/dist/cjs/z-file.cjs.entry.js +3 -3
  46. package/dist/cjs/z-ghost-loading.cjs.entry.js +2 -2
  47. package/dist/cjs/z-info-box.cjs.entry.js +2 -2
  48. package/dist/cjs/z-info-reveal.cjs.entry.js +3 -3
  49. package/dist/cjs/z-logo.cjs.entry.js +2 -2
  50. package/dist/cjs/z-menu-deprecated.cjs.entry.js +115 -0
  51. package/dist/cjs/z-menu-deprecated.cjs.entry.js.map +1 -0
  52. package/dist/cjs/z-menu-section-deprecated.cjs.entry.js +60 -0
  53. package/dist/cjs/z-menu-section-deprecated.cjs.entry.js.map +1 -0
  54. package/dist/cjs/z-menu-section.cjs.entry.js +92 -4
  55. package/dist/cjs/z-menu-section.cjs.entry.js.map +1 -1
  56. package/dist/cjs/z-menu.cjs.entry.js +121 -10
  57. package/dist/cjs/z-menu.cjs.entry.js.map +1 -1
  58. package/dist/cjs/z-myz-card-alert.cjs.entry.js +3 -3
  59. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +3 -3
  60. package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +2 -2
  61. package/dist/cjs/z-myz-card-footer.cjs.entry.js +3 -3
  62. package/dist/cjs/z-myz-card-icon.cjs.entry.js +2 -2
  63. package/dist/cjs/z-myz-card-info.cjs.entry.js +4 -4
  64. package/dist/cjs/z-myz-card-list.cjs.entry.js +2 -2
  65. package/dist/cjs/z-myz-card_4.cjs.entry.js +6 -6
  66. package/dist/cjs/z-myz-list-item.cjs.entry.js +4 -4
  67. package/dist/cjs/z-myz-list.cjs.entry.js +2 -2
  68. package/dist/cjs/z-navigation-tabs.cjs.entry.js +4 -4
  69. package/dist/cjs/z-notification.cjs.entry.js +2 -2
  70. package/dist/cjs/z-otp.cjs.entry.js +4 -4
  71. package/dist/cjs/z-pagination.cjs.entry.js +2 -2
  72. package/dist/cjs/z-panel-elem.cjs.entry.js +3 -3
  73. package/dist/cjs/z-popover.cjs.entry.js +3 -3
  74. package/dist/cjs/z-range-picker.cjs.entry.js +3 -3
  75. package/dist/cjs/z-section-title.cjs.entry.js +3 -3
  76. package/dist/cjs/z-select.cjs.entry.js +4 -4
  77. package/dist/cjs/z-skip-to-content.cjs.entry.js +4 -4
  78. package/dist/cjs/z-slideshow.cjs.entry.js +3 -3
  79. package/dist/cjs/z-stepper-item.cjs.entry.js +2 -2
  80. package/dist/cjs/z-stepper.cjs.entry.js +2 -2
  81. package/dist/cjs/z-table.cjs.entry.js +10 -10
  82. package/dist/cjs/z-tbody.cjs.entry.js +2 -2
  83. package/dist/cjs/z-td.cjs.entry.js +3 -3
  84. package/dist/cjs/z-tfoot.cjs.entry.js +2 -2
  85. package/dist/cjs/z-th.cjs.entry.js +3 -3
  86. package/dist/cjs/z-thead.cjs.entry.js +2 -2
  87. package/dist/cjs/z-toast-notification-list.cjs.entry.js +3 -3
  88. package/dist/cjs/z-toast-notification.cjs.entry.js +3 -3
  89. package/dist/cjs/z-toggle-button.cjs.entry.js +3 -3
  90. package/dist/cjs/z-toggle-switch.cjs.entry.js +6 -6
  91. package/dist/cjs/z-tooltip.cjs.entry.js +3 -3
  92. package/dist/cjs/z-tr.cjs.entry.js +6 -6
  93. package/dist/cjs/z-visually-hidden.cjs.entry.js +2 -2
  94. package/dist/collection/assets/orientamento.svg +14 -0
  95. package/dist/collection/beans/index.js +2 -0
  96. package/dist/collection/beans/index.js.map +1 -1
  97. package/dist/collection/collection-manifest.json +3 -0
  98. package/dist/collection/components/deprecated/z-app-header-deprecated/index.js +420 -0
  99. package/dist/collection/components/deprecated/z-app-header-deprecated/index.js.map +1 -0
  100. package/dist/collection/components/deprecated/z-app-header-deprecated/index.spec.js +203 -0
  101. package/dist/collection/components/deprecated/z-app-header-deprecated/index.spec.js.map +1 -0
  102. package/dist/collection/components/deprecated/z-app-header-deprecated/index.stories.js +635 -0
  103. package/dist/collection/components/deprecated/z-app-header-deprecated/index.stories.js.map +1 -0
  104. package/dist/collection/components/deprecated/z-app-header-deprecated/styles.css +441 -0
  105. package/dist/collection/components/deprecated/z-menu-deprecated/index.js +244 -0
  106. package/dist/collection/components/deprecated/z-menu-deprecated/index.js.map +1 -0
  107. package/dist/collection/components/deprecated/z-menu-deprecated/index.spec.js +120 -0
  108. package/dist/collection/components/deprecated/z-menu-deprecated/index.spec.js.map +1 -0
  109. package/dist/collection/components/deprecated/z-menu-deprecated/index.stories.js +129 -0
  110. package/dist/collection/components/deprecated/z-menu-deprecated/index.stories.js.map +1 -0
  111. package/dist/collection/components/deprecated/z-menu-deprecated/styles.css +217 -0
  112. package/dist/collection/components/deprecated/z-menu-section-deprecated/index.js +131 -0
  113. package/dist/collection/components/deprecated/z-menu-section-deprecated/index.js.map +1 -0
  114. package/dist/collection/components/deprecated/z-menu-section-deprecated/index.spec.js +50 -0
  115. package/dist/collection/components/deprecated/z-menu-section-deprecated/index.spec.js.map +1 -0
  116. package/dist/collection/components/deprecated/z-menu-section-deprecated/index.stories.js +41 -0
  117. package/dist/collection/components/deprecated/z-menu-section-deprecated/index.stories.js.map +1 -0
  118. package/dist/collection/components/deprecated/z-menu-section-deprecated/styles.css +123 -0
  119. package/dist/collection/components/file-upload/z-dragdrop-area/index.js +2 -2
  120. package/dist/collection/components/file-upload/z-file/index.js +1 -1
  121. package/dist/collection/components/file-upload/z-file-upload/index.js +1 -1
  122. package/dist/collection/components/list/z-list/index.js +1 -1
  123. package/dist/collection/components/list/z-list-element/index.js +1 -1
  124. package/dist/collection/components/list/z-list-group/index.js +2 -2
  125. package/dist/collection/components/table/cells/z-td/index.js +2 -27
  126. package/dist/collection/components/table/cells/z-td/index.js.map +1 -1
  127. package/dist/collection/components/table/cells/z-td/styles.css +0 -4
  128. package/dist/collection/components/table/cells/z-th/index.js +1 -1
  129. package/dist/collection/components/table/cells/z-th/styles.css +0 -4
  130. package/dist/collection/components/table/z-table/index.js +1 -1
  131. package/dist/collection/components/table/z-tbody/index.js +1 -1
  132. package/dist/collection/components/table/z-tfoot/index.js +1 -1
  133. package/dist/collection/components/table/z-thead/index.js +1 -1
  134. package/dist/collection/components/table/z-tr/index.js +1 -1
  135. package/dist/collection/components/z-accordion/index.js +1 -1
  136. package/dist/collection/components/z-anchor-navigation/index.js +1 -1
  137. package/dist/collection/components/z-app-header/index.js +215 -159
  138. package/dist/collection/components/z-app-header/index.js.map +1 -1
  139. package/dist/collection/components/z-app-header/index.spec.js +493 -79
  140. package/dist/collection/components/z-app-header/index.spec.js.map +1 -1
  141. package/dist/collection/components/z-app-header/index.stories.js +59 -369
  142. package/dist/collection/components/z-app-header/index.stories.js.map +1 -1
  143. package/dist/collection/components/z-app-header/styles.css +147 -183
  144. package/dist/collection/components/z-aria-alert/index.js +1 -1
  145. package/dist/collection/components/z-avatar/index.js +2 -2
  146. package/dist/collection/components/z-book-card/index.js +1 -1
  147. package/dist/collection/components/z-breadcrumb/index.js +2 -2
  148. package/dist/collection/components/z-button-sort/index.js +1 -1
  149. package/dist/collection/components/z-chip/index.js +2 -2
  150. package/dist/collection/components/z-combobox/index.js +1 -1
  151. package/dist/collection/components/z-cover-hero/index.js +2 -2
  152. package/dist/collection/components/z-divider/index.js +1 -1
  153. package/dist/collection/components/z-ghost-loading/index.js +1 -1
  154. package/dist/collection/components/z-info-box/index.js +1 -1
  155. package/dist/collection/components/z-info-reveal/index.js +1 -1
  156. package/dist/collection/components/z-input/index.js +1 -1
  157. package/dist/collection/components/z-input-message/index.js +1 -1
  158. package/dist/collection/components/z-logo/index.js +1 -1
  159. package/dist/collection/components/z-menu/index.js +128 -5
  160. package/dist/collection/components/z-menu/index.js.map +1 -1
  161. package/dist/collection/components/z-menu/index.spec.js +49 -33
  162. package/dist/collection/components/z-menu/index.spec.js.map +1 -1
  163. package/dist/collection/components/z-menu/index.stories.js +7 -7
  164. package/dist/collection/components/z-menu/index.stories.js.map +1 -1
  165. package/dist/collection/components/z-menu/styles.css +21 -8
  166. package/dist/collection/components/z-menu-section/index.js +102 -2
  167. package/dist/collection/components/z-menu-section/index.js.map +1 -1
  168. package/dist/collection/components/z-menu-section/index.spec.js +7 -7
  169. package/dist/collection/components/z-menu-section/index.spec.js.map +1 -1
  170. package/dist/collection/components/z-menu-section/index.stories.js +3 -3
  171. package/dist/collection/components/z-menu-section/index.stories.js.map +1 -1
  172. package/dist/collection/components/z-menu-section/styles.css +5 -5
  173. package/dist/collection/components/z-modal/index.js +4 -4
  174. package/dist/collection/components/z-navigation-tabs/index.js +2 -2
  175. package/dist/collection/components/z-notification/index.js +1 -1
  176. package/dist/collection/components/z-offcanvas/index.js +1 -1
  177. package/dist/collection/components/z-panel-elem/index.js +2 -2
  178. package/dist/collection/components/z-popover/index.js +1 -1
  179. package/dist/collection/components/z-searchbar/index.js +1 -1
  180. package/dist/collection/components/z-section-title/index.js +1 -1
  181. package/dist/collection/components/z-select/index.js +1 -1
  182. package/dist/collection/components/z-skip-to-content/index.js +1 -1
  183. package/dist/collection/components/z-stepper/index.js +1 -1
  184. package/dist/collection/components/z-stepper-item/index.js +1 -1
  185. package/dist/collection/components/z-tag/index.js +2 -2
  186. package/dist/collection/components/z-toast-notification/index.js +1 -1
  187. package/dist/collection/components/z-toast-notification-list/index.js +1 -1
  188. package/dist/collection/components/z-toggle-button/index.js +2 -2
  189. package/dist/collection/components/z-toggle-switch/index.js +3 -3
  190. package/dist/collection/components/z-tooltip/index.js +1 -1
  191. package/dist/collection/components/z-visually-hidden/index.js +1 -1
  192. package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +1 -1
  193. package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +1 -1
  194. package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +1 -1
  195. package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +1 -1
  196. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
  197. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -1
  198. package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +1 -1
  199. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
  200. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +1 -1
  201. package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
  202. package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
  203. package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
  204. package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +1 -1
  205. package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
  206. package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
  207. package/dist/components/index.d.ts +6 -0
  208. package/dist/components/index.js +3 -0
  209. package/dist/components/index.js.map +1 -1
  210. package/dist/components/index10.js +1 -1
  211. package/dist/components/index11.js +1 -1
  212. package/dist/components/index12.js +1 -1
  213. package/dist/components/index13.js +1 -1
  214. package/dist/components/index14.js +2 -2
  215. package/dist/components/index15.js +4 -4
  216. package/dist/components/index16.js +1 -1
  217. package/dist/components/index17.js +1 -1
  218. package/dist/components/index18.js +1 -1
  219. package/dist/components/index19.js +1 -1
  220. package/dist/components/index2.js +2 -0
  221. package/dist/components/index2.js.map +1 -1
  222. package/dist/components/index20.js +1 -1
  223. package/dist/components/index21.js +1 -1
  224. package/dist/components/index22.js +1 -1
  225. package/dist/components/index23.js +1 -1
  226. package/dist/components/index24.js +2 -2
  227. package/dist/components/index3.js +1 -1
  228. package/dist/components/index5.js +2 -2
  229. package/dist/components/index6.js +1 -1
  230. package/dist/components/index7.js +2 -2
  231. package/dist/components/index8.js +1 -1
  232. package/dist/components/z-accordion.js +1 -1
  233. package/dist/components/z-anchor-navigation.js +1 -1
  234. package/dist/components/z-app-header-deprecated.d.ts +11 -0
  235. package/dist/components/z-app-header-deprecated.js +255 -0
  236. package/dist/components/z-app-header-deprecated.js.map +1 -0
  237. package/dist/components/z-app-header.js +190 -60
  238. package/dist/components/z-app-header.js.map +1 -1
  239. package/dist/components/z-aria-alert.js +1 -1
  240. package/dist/components/z-avatar.js +2 -2
  241. package/dist/components/z-book-card.js +1 -1
  242. package/dist/components/z-breadcrumb.js +2 -2
  243. package/dist/components/z-button-sort.js +1 -1
  244. package/dist/components/z-combobox.js +1 -1
  245. package/dist/components/z-cover-hero.js +2 -2
  246. package/dist/components/z-file-upload.js +1 -1
  247. package/dist/components/z-file.js +1 -1
  248. package/dist/components/z-info-box.js +1 -1
  249. package/dist/components/z-info-reveal.js +1 -1
  250. package/dist/components/z-logo.js +1 -1
  251. package/dist/components/z-menu-deprecated.d.ts +11 -0
  252. package/dist/components/z-menu-deprecated.js +144 -0
  253. package/dist/components/z-menu-deprecated.js.map +1 -0
  254. package/dist/components/z-menu-section-deprecated.d.ts +11 -0
  255. package/dist/components/z-menu-section-deprecated.js +84 -0
  256. package/dist/components/z-menu-section-deprecated.js.map +1 -0
  257. package/dist/components/z-menu-section.js +92 -4
  258. package/dist/components/z-menu-section.js.map +1 -1
  259. package/dist/components/z-menu.js +117 -6
  260. package/dist/components/z-menu.js.map +1 -1
  261. package/dist/components/z-myz-card-alert.js +1 -1
  262. package/dist/components/z-myz-card-dictionary.js +1 -1
  263. package/dist/components/z-myz-card-footer-sections.js +1 -1
  264. package/dist/components/z-myz-card-footer.js +1 -1
  265. package/dist/components/z-myz-card-icon.js +1 -1
  266. package/dist/components/z-myz-card-info.js +1 -1
  267. package/dist/components/z-myz-card-list.js +1 -1
  268. package/dist/components/z-myz-list.js +1 -1
  269. package/dist/components/z-navigation-tabs.js +2 -2
  270. package/dist/components/z-notification.js +1 -1
  271. package/dist/components/z-otp.js +2 -2
  272. package/dist/components/z-panel-elem.js +2 -2
  273. package/dist/components/z-section-title.js +1 -1
  274. package/dist/components/z-select.js +1 -1
  275. package/dist/components/z-skip-to-content.js +1 -1
  276. package/dist/components/z-stepper-item.js +1 -1
  277. package/dist/components/z-stepper.js +1 -1
  278. package/dist/components/z-table.js +1 -1
  279. package/dist/components/z-tbody.js +1 -1
  280. package/dist/components/z-td.js +3 -5
  281. package/dist/components/z-td.js.map +1 -1
  282. package/dist/components/z-tfoot.js +1 -1
  283. package/dist/components/z-th.js +2 -2
  284. package/dist/components/z-th.js.map +1 -1
  285. package/dist/components/z-thead.js +1 -1
  286. package/dist/components/z-toast-notification-list.js +1 -1
  287. package/dist/components/z-toast-notification.js +1 -1
  288. package/dist/components/z-toggle-button.js +2 -2
  289. package/dist/components/z-toggle-switch.js +3 -3
  290. package/dist/components/z-tooltip.js +1 -1
  291. package/dist/components/z-tr.js +1 -1
  292. package/dist/components/z-visually-hidden.js +1 -1
  293. package/dist/esm/index-175661e6.js +18 -0
  294. package/dist/esm/{index-41ee4016.js.map → index-175661e6.js.map} +1 -1
  295. package/dist/esm/{index-aa07660e.js → index-18018bb5.js} +5 -5
  296. package/dist/esm/{index-aa07660e.js.map → index-18018bb5.js.map} +1 -1
  297. package/dist/esm/{index-497d9441.js → index-292b4dd2.js} +5 -6
  298. package/dist/esm/index-292b4dd2.js.map +1 -0
  299. package/dist/esm/{index-437f0b00.js → index-50bbb22e.js} +6 -6
  300. package/dist/esm/{index-437f0b00.js.map → index-50bbb22e.js.map} +1 -1
  301. package/dist/esm/{index-ab5f1eaa.js → index-a2130b6a.js} +55 -3
  302. package/dist/esm/index-a2130b6a.js.map +1 -0
  303. package/dist/esm/{index-ea49e441.js → index-a81f1558.js} +3 -3
  304. package/dist/esm/{index-ea49e441.js.map → index-a81f1558.js.map} +1 -1
  305. package/dist/esm/{index-cfde9cec.js → index-b556b384.js} +3 -3
  306. package/dist/esm/{index-cfde9cec.js.map → index-b556b384.js.map} +1 -1
  307. package/dist/esm/{index-a7f69d42.js → index-b7dbacb4.js} +3 -1
  308. package/dist/esm/index-b7dbacb4.js.map +1 -0
  309. package/dist/esm/index.js +2 -2
  310. package/dist/esm/loader.js +3 -3
  311. package/dist/esm/{utils-f7da2c5f.js → utils-54e02183.js} +2 -2
  312. package/dist/esm/{utils-f7da2c5f.js.map → utils-54e02183.js.map} +1 -1
  313. package/dist/esm/{utils-0ce33738.js → utils-8ade9e2d.js} +2 -2
  314. package/dist/esm/{utils-0ce33738.js.map → utils-8ade9e2d.js.map} +1 -1
  315. package/dist/esm/web-components-library.js +3 -3
  316. package/dist/esm/z-accordion.entry.js +3 -3
  317. package/dist/esm/z-alert.entry.js +2 -2
  318. package/dist/esm/z-anchor-navigation.entry.js +3 -3
  319. package/dist/esm/z-app-header-deprecated.entry.js +154 -0
  320. package/dist/esm/z-app-header-deprecated.entry.js.map +1 -0
  321. package/dist/esm/z-app-header_12.entry.js +197 -67
  322. package/dist/esm/z-app-header_12.entry.js.map +1 -1
  323. package/dist/esm/z-aria-alert.entry.js +3 -3
  324. package/dist/esm/z-avatar.entry.js +4 -4
  325. package/dist/esm/z-book-card.entry.js +4 -4
  326. package/dist/esm/z-breadcrumb.entry.js +5 -5
  327. package/dist/esm/z-button-sort.entry.js +2 -2
  328. package/dist/esm/z-card.entry.js +2 -2
  329. package/dist/esm/z-carousel.entry.js +2 -2
  330. package/dist/esm/z-chip.entry.js +4 -4
  331. package/dist/esm/z-combobox.entry.js +4 -4
  332. package/dist/esm/z-cover-hero.entry.js +4 -4
  333. package/dist/esm/z-date-picker.entry.js +3 -3
  334. package/dist/esm/z-dragdrop-area_2.entry.js +8 -8
  335. package/dist/esm/z-file-upload.entry.js +4 -4
  336. package/dist/esm/z-file.entry.js +3 -3
  337. package/dist/esm/z-ghost-loading.entry.js +2 -2
  338. package/dist/esm/z-info-box.entry.js +2 -2
  339. package/dist/esm/z-info-reveal.entry.js +3 -3
  340. package/dist/esm/z-logo.entry.js +2 -2
  341. package/dist/esm/z-menu-deprecated.entry.js +111 -0
  342. package/dist/esm/z-menu-deprecated.entry.js.map +1 -0
  343. package/dist/esm/z-menu-section-deprecated.entry.js +56 -0
  344. package/dist/esm/z-menu-section-deprecated.entry.js.map +1 -0
  345. package/dist/esm/z-menu-section.entry.js +92 -4
  346. package/dist/esm/z-menu-section.entry.js.map +1 -1
  347. package/dist/esm/z-menu.entry.js +117 -6
  348. package/dist/esm/z-menu.entry.js.map +1 -1
  349. package/dist/esm/z-myz-card-alert.entry.js +3 -3
  350. package/dist/esm/z-myz-card-dictionary.entry.js +3 -3
  351. package/dist/esm/z-myz-card-footer-sections.entry.js +2 -2
  352. package/dist/esm/z-myz-card-footer.entry.js +3 -3
  353. package/dist/esm/z-myz-card-icon.entry.js +2 -2
  354. package/dist/esm/z-myz-card-info.entry.js +4 -4
  355. package/dist/esm/z-myz-card-list.entry.js +2 -2
  356. package/dist/esm/z-myz-card_4.entry.js +6 -6
  357. package/dist/esm/z-myz-list-item.entry.js +4 -4
  358. package/dist/esm/z-myz-list.entry.js +2 -2
  359. package/dist/esm/z-navigation-tabs.entry.js +4 -4
  360. package/dist/esm/z-notification.entry.js +2 -2
  361. package/dist/esm/z-otp.entry.js +4 -4
  362. package/dist/esm/z-pagination.entry.js +2 -2
  363. package/dist/esm/z-panel-elem.entry.js +3 -3
  364. package/dist/esm/z-popover.entry.js +3 -3
  365. package/dist/esm/z-range-picker.entry.js +3 -3
  366. package/dist/esm/z-section-title.entry.js +3 -3
  367. package/dist/esm/z-select.entry.js +4 -4
  368. package/dist/esm/z-skip-to-content.entry.js +4 -4
  369. package/dist/esm/z-slideshow.entry.js +3 -3
  370. package/dist/esm/z-stepper-item.entry.js +2 -2
  371. package/dist/esm/z-stepper.entry.js +2 -2
  372. package/dist/esm/z-table.entry.js +10 -10
  373. package/dist/esm/z-tbody.entry.js +2 -2
  374. package/dist/esm/z-td.entry.js +3 -3
  375. package/dist/esm/z-tfoot.entry.js +2 -2
  376. package/dist/esm/z-th.entry.js +3 -3
  377. package/dist/esm/z-thead.entry.js +2 -2
  378. package/dist/esm/z-toast-notification-list.entry.js +3 -3
  379. package/dist/esm/z-toast-notification.entry.js +3 -3
  380. package/dist/esm/z-toggle-button.entry.js +3 -3
  381. package/dist/esm/z-toggle-switch.entry.js +6 -6
  382. package/dist/esm/z-tooltip.entry.js +3 -3
  383. package/dist/esm/z-tr.entry.js +6 -6
  384. package/dist/esm/z-visually-hidden.entry.js +2 -2
  385. package/dist/types/beans/index.d.ts +3 -1
  386. package/dist/types/components/deprecated/z-app-header-deprecated/index.d.ts +149 -0
  387. package/dist/types/components/deprecated/z-app-header-deprecated/index.stories.d.ts +118 -0
  388. package/dist/types/components/deprecated/z-menu-deprecated/index.d.ts +61 -0
  389. package/dist/types/components/deprecated/z-menu-deprecated/index.stories.d.ts +27 -0
  390. package/dist/types/components/deprecated/z-menu-section-deprecated/index.d.ts +31 -0
  391. package/dist/types/components/deprecated/z-menu-section-deprecated/index.stories.d.ts +16 -0
  392. package/dist/types/components/table/cells/z-td/index.d.ts +1 -5
  393. package/dist/types/components/z-app-header/index.d.ts +33 -76
  394. package/dist/types/components/z-app-header/index.stories.d.ts +20 -40
  395. package/dist/types/components/z-menu/index.d.ts +11 -0
  396. package/dist/types/components/z-menu-section/index.d.ts +9 -0
  397. package/dist/types/components.d.ts +268 -18
  398. package/dist/web-components-library/index.esm.js +1 -1
  399. package/dist/web-components-library/{p-5e0acf57.entry.js → p-054484d4.entry.js} +2 -2
  400. package/dist/web-components-library/{p-bd75bef4.entry.js → p-05e9ae1e.entry.js} +2 -2
  401. package/dist/web-components-library/{p-6c5a8061.entry.js → p-12d62027.entry.js} +2 -2
  402. package/{www/build/p-726e1059.entry.js → dist/web-components-library/p-18690383.entry.js} +2 -2
  403. package/dist/web-components-library/{p-a36045c2.entry.js → p-19f8c3d2.entry.js} +2 -2
  404. package/dist/web-components-library/p-1edbac5f.entry.js +2 -0
  405. package/dist/web-components-library/{p-9ddfcfd4.entry.js → p-21b85c7f.entry.js} +2 -2
  406. package/dist/web-components-library/{p-f7180c65.entry.js → p-2672e36f.entry.js} +2 -2
  407. package/{www/build/p-4a2b4ad1.entry.js → dist/web-components-library/p-28928bb6.entry.js} +2 -2
  408. package/dist/web-components-library/{p-a0231723.entry.js → p-2a7e4988.entry.js} +2 -2
  409. package/dist/web-components-library/{p-66d70fb4.js → p-2c184714.js} +2 -2
  410. package/dist/web-components-library/p-304eeab0.js +2 -0
  411. package/dist/web-components-library/{p-09897132.entry.js → p-324ef970.entry.js} +2 -2
  412. package/{www/build/p-90b4d340.entry.js → dist/web-components-library/p-33eea921.entry.js} +2 -2
  413. package/dist/web-components-library/p-385bf4ca.entry.js +2 -0
  414. package/dist/web-components-library/{p-411d929f.entry.js → p-3b266de4.entry.js} +2 -2
  415. package/dist/web-components-library/{p-2ed68ac5.entry.js → p-4552744b.entry.js} +2 -2
  416. package/dist/web-components-library/{p-ebdfd7e5.entry.js → p-49e4ce84.entry.js} +2 -2
  417. package/dist/web-components-library/p-57eee056.entry.js +2 -0
  418. package/dist/web-components-library/{p-e2997191.entry.js.map → p-57eee056.entry.js.map} +1 -1
  419. package/{www/build/p-1efacf4c.entry.js → dist/web-components-library/p-5a5481be.entry.js} +2 -2
  420. package/dist/web-components-library/p-6037cdf3.js +2 -0
  421. package/{www/build/p-3de034cf.js.map → dist/web-components-library/p-6037cdf3.js.map} +1 -1
  422. package/{www/build/p-65df3290.entry.js → dist/web-components-library/p-609c11d6.entry.js} +2 -2
  423. package/dist/web-components-library/p-6319b5e2.entry.js +2 -0
  424. package/{www/build/p-467d8a16.entry.js → dist/web-components-library/p-63e970ee.entry.js} +2 -2
  425. package/{www/build/p-7693ae18.entry.js → dist/web-components-library/p-6586441a.entry.js} +3 -3
  426. package/dist/web-components-library/p-68822fbc.entry.js +2 -0
  427. package/dist/web-components-library/{p-493c652a.entry.js → p-6a664748.entry.js} +2 -2
  428. package/dist/web-components-library/p-6b2cd695.entry.js +2 -0
  429. package/dist/web-components-library/p-6f4dd02b.entry.js +2 -0
  430. package/dist/web-components-library/{p-5e45636a.entry.js.map → p-6f4dd02b.entry.js.map} +1 -1
  431. package/dist/web-components-library/p-74a65c6f.entry.js +2 -0
  432. package/{www/build/p-dde9f76d.entry.js → dist/web-components-library/p-77d8ad7e.entry.js} +2 -2
  433. package/{www/build/p-2190352b.js → dist/web-components-library/p-78e52a02.js} +2 -2
  434. package/dist/web-components-library/p-7d827c11.js +2 -0
  435. package/dist/web-components-library/{p-5bbb5599.entry.js → p-83350b5f.entry.js} +2 -2
  436. package/dist/web-components-library/p-83eff308.entry.js +2 -0
  437. package/dist/web-components-library/p-83eff308.entry.js.map +1 -0
  438. package/dist/web-components-library/{p-8df46096.entry.js → p-8499a29d.entry.js} +2 -2
  439. package/{www/build/p-1501c221.entry.js → dist/web-components-library/p-85f84e55.entry.js} +2 -2
  440. package/dist/web-components-library/{p-376208ab.entry.js → p-88e756cd.entry.js} +2 -2
  441. package/dist/web-components-library/p-89584f19.entry.js +2 -0
  442. package/dist/web-components-library/{p-b6e14c6b.entry.js.map → p-89584f19.entry.js.map} +1 -1
  443. package/dist/web-components-library/{p-7ce64686.entry.js → p-8a10fec5.entry.js} +2 -2
  444. package/dist/web-components-library/p-8a10fec5.entry.js.map +1 -0
  445. package/dist/web-components-library/{p-214bc293.entry.js → p-8b309268.entry.js} +2 -2
  446. package/dist/web-components-library/p-8c517cd7.entry.js +2 -0
  447. package/dist/web-components-library/p-8c517cd7.entry.js.map +1 -0
  448. package/dist/web-components-library/{p-0c2fdbe5.entry.js → p-8c9f7cef.entry.js} +2 -2
  449. package/dist/web-components-library/p-8d7323f7.entry.js +2 -0
  450. package/dist/web-components-library/p-8d7323f7.entry.js.map +1 -0
  451. package/dist/web-components-library/p-8de7ea6e.js +2 -0
  452. package/dist/web-components-library/{p-82dc715b.js.map → p-8de7ea6e.js.map} +1 -1
  453. package/dist/web-components-library/{p-f3272ec6.entry.js → p-91c04edc.entry.js} +2 -2
  454. package/dist/web-components-library/{p-80359658.entry.js → p-97b0c3b3.entry.js} +2 -2
  455. package/dist/web-components-library/{p-74e134e6.entry.js → p-99b791d1.entry.js} +2 -2
  456. package/dist/web-components-library/p-9f2a7cf0.js +2 -0
  457. package/dist/web-components-library/p-9f2a7cf0.js.map +1 -0
  458. package/{www/build/p-63337e8b.entry.js → dist/web-components-library/p-a4ada10b.entry.js} +2 -2
  459. package/dist/web-components-library/p-a5781264.entry.js +2 -0
  460. package/{www/build/p-14bf4619.entry.js → dist/web-components-library/p-ad76b8ff.entry.js} +2 -2
  461. package/dist/web-components-library/p-ae94e377.js +2 -0
  462. package/{www/build/p-40e4e3af.js.map → dist/web-components-library/p-ae94e377.js.map} +1 -1
  463. package/dist/web-components-library/{p-2c81acaa.entry.js → p-ae96bc09.entry.js} +2 -2
  464. package/dist/web-components-library/{p-09a9e2ca.entry.js → p-af856537.entry.js} +2 -2
  465. package/{www/build/p-7d5983f6.entry.js → dist/web-components-library/p-b84fa3b6.entry.js} +2 -2
  466. package/dist/web-components-library/{p-ff4aa84a.entry.js → p-be4878f2.entry.js} +2 -2
  467. package/dist/web-components-library/p-bf2a057d.entry.js +2 -0
  468. package/dist/web-components-library/{p-82b845c3.entry.js → p-c0bdbfb5.entry.js} +2 -2
  469. package/dist/web-components-library/p-c0bdbfb5.entry.js.map +1 -0
  470. package/dist/web-components-library/{p-464e5886.entry.js → p-c6b269ce.entry.js} +2 -2
  471. package/dist/web-components-library/{p-1064cb1a.entry.js → p-c90249e5.entry.js} +2 -2
  472. package/dist/web-components-library/p-cf2640b0.entry.js +2 -0
  473. package/dist/web-components-library/p-cf2640b0.entry.js.map +1 -0
  474. package/dist/web-components-library/p-cfa39bd3.js +3 -0
  475. package/dist/web-components-library/p-cfa39bd3.js.map +1 -0
  476. package/dist/web-components-library/p-d9e1d8c7.js +2 -0
  477. package/dist/web-components-library/{p-60dfcfaa.entry.js → p-df05727f.entry.js} +2 -2
  478. package/dist/web-components-library/p-e0323da3.entry.js +2 -0
  479. package/dist/web-components-library/{p-810433b1.entry.js → p-e1852de3.entry.js} +2 -2
  480. package/dist/web-components-library/{p-2010d544.entry.js → p-e366782c.entry.js} +2 -2
  481. package/dist/web-components-library/{p-f323cc0b.entry.js → p-e5dc0719.entry.js} +2 -2
  482. package/dist/web-components-library/{p-ea9aa3bb.entry.js → p-f21bc3a9.entry.js} +2 -2
  483. package/{www/build/p-a11e1d48.entry.js → dist/web-components-library/p-f74f9f3c.entry.js} +2 -2
  484. package/dist/web-components-library/p-f8d45aa4.entry.js +2 -0
  485. package/dist/web-components-library/{p-c3809d39.entry.js → p-fe87b081.entry.js} +2 -2
  486. package/dist/web-components-library/web-components-library.esm.js +1 -1
  487. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  488. package/package.json +1 -1
  489. package/react/components.d.ts +3 -0
  490. package/react/components.js +5 -2
  491. package/react/components.js.map +1 -1
  492. package/www/assets/orientamento.svg +14 -0
  493. package/www/build/index.esm.js +1 -1
  494. package/www/build/{p-5e0acf57.entry.js → p-054484d4.entry.js} +2 -2
  495. package/www/build/{p-bd75bef4.entry.js → p-05e9ae1e.entry.js} +2 -2
  496. package/www/build/{p-6c5a8061.entry.js → p-12d62027.entry.js} +2 -2
  497. package/{dist/web-components-library/p-726e1059.entry.js → www/build/p-18690383.entry.js} +2 -2
  498. package/www/build/{p-a36045c2.entry.js → p-19f8c3d2.entry.js} +2 -2
  499. package/www/build/p-1edbac5f.entry.js +2 -0
  500. package/www/build/{p-9ddfcfd4.entry.js → p-21b85c7f.entry.js} +2 -2
  501. package/www/build/{p-f7180c65.entry.js → p-2672e36f.entry.js} +2 -2
  502. package/{dist/web-components-library/p-4a2b4ad1.entry.js → www/build/p-28928bb6.entry.js} +2 -2
  503. package/www/build/{p-a0231723.entry.js → p-2a7e4988.entry.js} +2 -2
  504. package/www/build/{p-66d70fb4.js → p-2c184714.js} +2 -2
  505. package/www/build/p-304eeab0.js +2 -0
  506. package/www/build/{p-09897132.entry.js → p-324ef970.entry.js} +2 -2
  507. package/{dist/web-components-library/p-90b4d340.entry.js → www/build/p-33eea921.entry.js} +2 -2
  508. package/www/build/p-385bf4ca.entry.js +2 -0
  509. package/www/build/{p-411d929f.entry.js → p-3b266de4.entry.js} +2 -2
  510. package/www/build/{p-2ed68ac5.entry.js → p-4552744b.entry.js} +2 -2
  511. package/www/build/{p-ebdfd7e5.entry.js → p-49e4ce84.entry.js} +2 -2
  512. package/www/build/p-57eee056.entry.js +2 -0
  513. package/www/build/{p-e2997191.entry.js.map → p-57eee056.entry.js.map} +1 -1
  514. package/{dist/web-components-library/p-1efacf4c.entry.js → www/build/p-5a5481be.entry.js} +2 -2
  515. package/www/build/p-6037cdf3.js +2 -0
  516. package/{dist/web-components-library/p-3de034cf.js.map → www/build/p-6037cdf3.js.map} +1 -1
  517. package/{dist/web-components-library/p-65df3290.entry.js → www/build/p-609c11d6.entry.js} +2 -2
  518. package/www/build/p-6319b5e2.entry.js +2 -0
  519. package/{dist/web-components-library/p-467d8a16.entry.js → www/build/p-63e970ee.entry.js} +2 -2
  520. package/{dist/web-components-library/p-7693ae18.entry.js → www/build/p-6586441a.entry.js} +3 -3
  521. package/www/build/p-68822fbc.entry.js +2 -0
  522. package/www/build/{p-493c652a.entry.js → p-6a664748.entry.js} +2 -2
  523. package/www/build/p-6b2cd695.entry.js +2 -0
  524. package/www/build/p-6f4dd02b.entry.js +2 -0
  525. package/www/build/{p-5e45636a.entry.js.map → p-6f4dd02b.entry.js.map} +1 -1
  526. package/www/build/p-74a65c6f.entry.js +2 -0
  527. package/www/build/p-774b449d.js +2 -0
  528. package/{dist/web-components-library/p-dde9f76d.entry.js → www/build/p-77d8ad7e.entry.js} +2 -2
  529. package/{dist/web-components-library/p-2190352b.js → www/build/p-78e52a02.js} +2 -2
  530. package/www/build/p-7d827c11.js +2 -0
  531. package/www/build/{p-5bbb5599.entry.js → p-83350b5f.entry.js} +2 -2
  532. package/www/build/p-83eff308.entry.js +2 -0
  533. package/www/build/p-83eff308.entry.js.map +1 -0
  534. package/www/build/{p-8df46096.entry.js → p-8499a29d.entry.js} +2 -2
  535. package/{dist/web-components-library/p-1501c221.entry.js → www/build/p-85f84e55.entry.js} +2 -2
  536. package/www/build/{p-376208ab.entry.js → p-88e756cd.entry.js} +2 -2
  537. package/www/build/p-89584f19.entry.js +2 -0
  538. package/www/build/{p-b6e14c6b.entry.js.map → p-89584f19.entry.js.map} +1 -1
  539. package/www/build/{p-7ce64686.entry.js → p-8a10fec5.entry.js} +2 -2
  540. package/www/build/p-8a10fec5.entry.js.map +1 -0
  541. package/www/build/{p-214bc293.entry.js → p-8b309268.entry.js} +2 -2
  542. package/www/build/p-8c517cd7.entry.js +2 -0
  543. package/www/build/p-8c517cd7.entry.js.map +1 -0
  544. package/www/build/{p-0c2fdbe5.entry.js → p-8c9f7cef.entry.js} +2 -2
  545. package/www/build/p-8d7323f7.entry.js +2 -0
  546. package/www/build/p-8d7323f7.entry.js.map +1 -0
  547. package/www/build/p-8de7ea6e.js +2 -0
  548. package/www/build/{p-82dc715b.js.map → p-8de7ea6e.js.map} +1 -1
  549. package/www/build/{p-f3272ec6.entry.js → p-91c04edc.entry.js} +2 -2
  550. package/www/build/{p-80359658.entry.js → p-97b0c3b3.entry.js} +2 -2
  551. package/www/build/{p-74e134e6.entry.js → p-99b791d1.entry.js} +2 -2
  552. package/www/build/p-9f2a7cf0.js +2 -0
  553. package/www/build/p-9f2a7cf0.js.map +1 -0
  554. package/{dist/web-components-library/p-63337e8b.entry.js → www/build/p-a4ada10b.entry.js} +2 -2
  555. package/www/build/p-a5781264.entry.js +2 -0
  556. package/{dist/web-components-library/p-14bf4619.entry.js → www/build/p-ad76b8ff.entry.js} +2 -2
  557. package/www/build/p-ae94e377.js +2 -0
  558. package/{dist/web-components-library/p-40e4e3af.js.map → www/build/p-ae94e377.js.map} +1 -1
  559. package/www/build/{p-2c81acaa.entry.js → p-ae96bc09.entry.js} +2 -2
  560. package/www/build/{p-09a9e2ca.entry.js → p-af856537.entry.js} +2 -2
  561. package/{dist/web-components-library/p-7d5983f6.entry.js → www/build/p-b84fa3b6.entry.js} +2 -2
  562. package/www/build/{p-ff4aa84a.entry.js → p-be4878f2.entry.js} +2 -2
  563. package/www/build/p-bf2a057d.entry.js +2 -0
  564. package/www/build/{p-82b845c3.entry.js → p-c0bdbfb5.entry.js} +2 -2
  565. package/www/build/p-c0bdbfb5.entry.js.map +1 -0
  566. package/www/build/{p-464e5886.entry.js → p-c6b269ce.entry.js} +2 -2
  567. package/www/build/{p-1064cb1a.entry.js → p-c90249e5.entry.js} +2 -2
  568. package/www/build/p-cf2640b0.entry.js +2 -0
  569. package/www/build/p-cf2640b0.entry.js.map +1 -0
  570. package/www/build/p-cfa39bd3.js +3 -0
  571. package/www/build/p-cfa39bd3.js.map +1 -0
  572. package/www/build/p-d9e1d8c7.js +2 -0
  573. package/www/build/{p-60dfcfaa.entry.js → p-df05727f.entry.js} +2 -2
  574. package/www/build/p-e0323da3.entry.js +2 -0
  575. package/www/build/{p-810433b1.entry.js → p-e1852de3.entry.js} +2 -2
  576. package/www/build/{p-2010d544.entry.js → p-e366782c.entry.js} +2 -2
  577. package/www/build/{p-f323cc0b.entry.js → p-e5dc0719.entry.js} +2 -2
  578. package/www/build/{p-ea9aa3bb.entry.js → p-f21bc3a9.entry.js} +2 -2
  579. package/{dist/web-components-library/p-a11e1d48.entry.js → www/build/p-f74f9f3c.entry.js} +2 -2
  580. package/www/build/p-f8d45aa4.entry.js +2 -0
  581. package/www/build/{p-c3809d39.entry.js → p-fe87b081.entry.js} +2 -2
  582. package/www/build/web-components-library.esm.js +1 -1
  583. package/www/build/web-components-library.esm.js.map +1 -1
  584. package/www/index.html +1 -1
  585. package/dist/cjs/index-5dc4a8de.js.map +0 -1
  586. package/dist/cjs/index-a83e999c.js.map +0 -1
  587. package/dist/cjs/index-e3835c94.js.map +0 -1
  588. package/dist/esm/index-41ee4016.js +0 -18
  589. package/dist/esm/index-497d9441.js.map +0 -1
  590. package/dist/esm/index-a7f69d42.js.map +0 -1
  591. package/dist/esm/index-ab5f1eaa.js.map +0 -1
  592. package/dist/web-components-library/p-3de034cf.js +0 -2
  593. package/dist/web-components-library/p-40e4e3af.js +0 -2
  594. package/dist/web-components-library/p-4b27ccf0.entry.js +0 -2
  595. package/dist/web-components-library/p-4d1a8ee8.entry.js +0 -2
  596. package/dist/web-components-library/p-4d1a8ee8.entry.js.map +0 -1
  597. package/dist/web-components-library/p-5214f770.entry.js +0 -2
  598. package/dist/web-components-library/p-550b4473.entry.js +0 -2
  599. package/dist/web-components-library/p-5e45636a.entry.js +0 -2
  600. package/dist/web-components-library/p-5e734fd3.entry.js +0 -2
  601. package/dist/web-components-library/p-6f5b7f16.js +0 -2
  602. package/dist/web-components-library/p-6f5b7f16.js.map +0 -1
  603. package/dist/web-components-library/p-737293b2.js +0 -2
  604. package/dist/web-components-library/p-79766609.entry.js +0 -2
  605. package/dist/web-components-library/p-7cba8558.entry.js +0 -2
  606. package/dist/web-components-library/p-7ce64686.entry.js.map +0 -1
  607. package/dist/web-components-library/p-82b845c3.entry.js.map +0 -1
  608. package/dist/web-components-library/p-82dc715b.js +0 -2
  609. package/dist/web-components-library/p-93d39e70.entry.js +0 -2
  610. package/dist/web-components-library/p-b6e14c6b.entry.js +0 -2
  611. package/dist/web-components-library/p-b9078348.js +0 -2
  612. package/dist/web-components-library/p-cc3c02fe.js +0 -3
  613. package/dist/web-components-library/p-cc3c02fe.js.map +0 -1
  614. package/dist/web-components-library/p-e2997191.entry.js +0 -2
  615. package/dist/web-components-library/p-ee290d4c.entry.js +0 -2
  616. package/dist/web-components-library/p-f978d22d.entry.js +0 -2
  617. package/dist/web-components-library/p-fdd176e2.entry.js +0 -2
  618. package/dist/web-components-library/p-feca4075.js +0 -2
  619. package/www/build/p-3de034cf.js +0 -2
  620. package/www/build/p-40e4e3af.js +0 -2
  621. package/www/build/p-4b27ccf0.entry.js +0 -2
  622. package/www/build/p-4d1a8ee8.entry.js +0 -2
  623. package/www/build/p-4d1a8ee8.entry.js.map +0 -1
  624. package/www/build/p-5214f770.entry.js +0 -2
  625. package/www/build/p-550b4473.entry.js +0 -2
  626. package/www/build/p-5e45636a.entry.js +0 -2
  627. package/www/build/p-5e734fd3.entry.js +0 -2
  628. package/www/build/p-6f5b7f16.js +0 -2
  629. package/www/build/p-6f5b7f16.js.map +0 -1
  630. package/www/build/p-737293b2.js +0 -2
  631. package/www/build/p-79766609.entry.js +0 -2
  632. package/www/build/p-7cba8558.entry.js +0 -2
  633. package/www/build/p-7ce64686.entry.js.map +0 -1
  634. package/www/build/p-82b845c3.entry.js.map +0 -1
  635. package/www/build/p-82dc715b.js +0 -2
  636. package/www/build/p-93d39e70.entry.js +0 -2
  637. package/www/build/p-9bd47256.js +0 -2
  638. package/www/build/p-b6e14c6b.entry.js +0 -2
  639. package/www/build/p-b9078348.js +0 -2
  640. package/www/build/p-cc3c02fe.js +0 -3
  641. package/www/build/p-cc3c02fe.js.map +0 -1
  642. package/www/build/p-e2997191.entry.js +0 -2
  643. package/www/build/p-ee290d4c.entry.js +0 -2
  644. package/www/build/p-f978d22d.entry.js +0 -2
  645. package/www/build/p-fdd176e2.entry.js +0 -2
  646. package/www/build/p-feca4075.js +0 -2
  647. /package/dist/web-components-library/{p-5e0acf57.entry.js.map → p-054484d4.entry.js.map} +0 -0
  648. /package/dist/web-components-library/{p-bd75bef4.entry.js.map → p-05e9ae1e.entry.js.map} +0 -0
  649. /package/dist/web-components-library/{p-6c5a8061.entry.js.map → p-12d62027.entry.js.map} +0 -0
  650. /package/dist/web-components-library/{p-726e1059.entry.js.map → p-18690383.entry.js.map} +0 -0
  651. /package/dist/web-components-library/{p-a36045c2.entry.js.map → p-19f8c3d2.entry.js.map} +0 -0
  652. /package/dist/web-components-library/{p-4b27ccf0.entry.js.map → p-1edbac5f.entry.js.map} +0 -0
  653. /package/dist/web-components-library/{p-9ddfcfd4.entry.js.map → p-21b85c7f.entry.js.map} +0 -0
  654. /package/dist/web-components-library/{p-f7180c65.entry.js.map → p-2672e36f.entry.js.map} +0 -0
  655. /package/dist/web-components-library/{p-4a2b4ad1.entry.js.map → p-28928bb6.entry.js.map} +0 -0
  656. /package/dist/web-components-library/{p-a0231723.entry.js.map → p-2a7e4988.entry.js.map} +0 -0
  657. /package/dist/web-components-library/{p-66d70fb4.js.map → p-2c184714.js.map} +0 -0
  658. /package/dist/web-components-library/{p-737293b2.js.map → p-304eeab0.js.map} +0 -0
  659. /package/dist/web-components-library/{p-09897132.entry.js.map → p-324ef970.entry.js.map} +0 -0
  660. /package/dist/web-components-library/{p-90b4d340.entry.js.map → p-33eea921.entry.js.map} +0 -0
  661. /package/dist/web-components-library/{p-7cba8558.entry.js.map → p-385bf4ca.entry.js.map} +0 -0
  662. /package/dist/web-components-library/{p-411d929f.entry.js.map → p-3b266de4.entry.js.map} +0 -0
  663. /package/dist/web-components-library/{p-2ed68ac5.entry.js.map → p-4552744b.entry.js.map} +0 -0
  664. /package/dist/web-components-library/{p-ebdfd7e5.entry.js.map → p-49e4ce84.entry.js.map} +0 -0
  665. /package/dist/web-components-library/{p-1efacf4c.entry.js.map → p-5a5481be.entry.js.map} +0 -0
  666. /package/dist/web-components-library/{p-65df3290.entry.js.map → p-609c11d6.entry.js.map} +0 -0
  667. /package/dist/web-components-library/{p-ee290d4c.entry.js.map → p-6319b5e2.entry.js.map} +0 -0
  668. /package/dist/web-components-library/{p-467d8a16.entry.js.map → p-63e970ee.entry.js.map} +0 -0
  669. /package/dist/web-components-library/{p-7693ae18.entry.js.map → p-6586441a.entry.js.map} +0 -0
  670. /package/dist/web-components-library/{p-5214f770.entry.js.map → p-68822fbc.entry.js.map} +0 -0
  671. /package/dist/web-components-library/{p-493c652a.entry.js.map → p-6a664748.entry.js.map} +0 -0
  672. /package/dist/web-components-library/{p-93d39e70.entry.js.map → p-6b2cd695.entry.js.map} +0 -0
  673. /package/dist/web-components-library/{p-5e734fd3.entry.js.map → p-74a65c6f.entry.js.map} +0 -0
  674. /package/dist/web-components-library/{p-dde9f76d.entry.js.map → p-77d8ad7e.entry.js.map} +0 -0
  675. /package/dist/web-components-library/{p-2190352b.js.map → p-78e52a02.js.map} +0 -0
  676. /package/dist/web-components-library/{p-feca4075.js.map → p-7d827c11.js.map} +0 -0
  677. /package/dist/web-components-library/{p-5bbb5599.entry.js.map → p-83350b5f.entry.js.map} +0 -0
  678. /package/dist/web-components-library/{p-8df46096.entry.js.map → p-8499a29d.entry.js.map} +0 -0
  679. /package/dist/web-components-library/{p-1501c221.entry.js.map → p-85f84e55.entry.js.map} +0 -0
  680. /package/dist/web-components-library/{p-376208ab.entry.js.map → p-88e756cd.entry.js.map} +0 -0
  681. /package/dist/web-components-library/{p-214bc293.entry.js.map → p-8b309268.entry.js.map} +0 -0
  682. /package/dist/web-components-library/{p-0c2fdbe5.entry.js.map → p-8c9f7cef.entry.js.map} +0 -0
  683. /package/dist/web-components-library/{p-f3272ec6.entry.js.map → p-91c04edc.entry.js.map} +0 -0
  684. /package/dist/web-components-library/{p-80359658.entry.js.map → p-97b0c3b3.entry.js.map} +0 -0
  685. /package/dist/web-components-library/{p-74e134e6.entry.js.map → p-99b791d1.entry.js.map} +0 -0
  686. /package/dist/web-components-library/{p-63337e8b.entry.js.map → p-a4ada10b.entry.js.map} +0 -0
  687. /package/dist/web-components-library/{p-550b4473.entry.js.map → p-a5781264.entry.js.map} +0 -0
  688. /package/dist/web-components-library/{p-14bf4619.entry.js.map → p-ad76b8ff.entry.js.map} +0 -0
  689. /package/dist/web-components-library/{p-2c81acaa.entry.js.map → p-ae96bc09.entry.js.map} +0 -0
  690. /package/dist/web-components-library/{p-09a9e2ca.entry.js.map → p-af856537.entry.js.map} +0 -0
  691. /package/dist/web-components-library/{p-7d5983f6.entry.js.map → p-b84fa3b6.entry.js.map} +0 -0
  692. /package/dist/web-components-library/{p-ff4aa84a.entry.js.map → p-be4878f2.entry.js.map} +0 -0
  693. /package/dist/web-components-library/{p-79766609.entry.js.map → p-bf2a057d.entry.js.map} +0 -0
  694. /package/dist/web-components-library/{p-464e5886.entry.js.map → p-c6b269ce.entry.js.map} +0 -0
  695. /package/dist/web-components-library/{p-1064cb1a.entry.js.map → p-c90249e5.entry.js.map} +0 -0
  696. /package/dist/web-components-library/{p-b9078348.js.map → p-d9e1d8c7.js.map} +0 -0
  697. /package/dist/web-components-library/{p-60dfcfaa.entry.js.map → p-df05727f.entry.js.map} +0 -0
  698. /package/dist/web-components-library/{p-f978d22d.entry.js.map → p-e0323da3.entry.js.map} +0 -0
  699. /package/dist/web-components-library/{p-810433b1.entry.js.map → p-e1852de3.entry.js.map} +0 -0
  700. /package/dist/web-components-library/{p-2010d544.entry.js.map → p-e366782c.entry.js.map} +0 -0
  701. /package/dist/web-components-library/{p-f323cc0b.entry.js.map → p-e5dc0719.entry.js.map} +0 -0
  702. /package/dist/web-components-library/{p-ea9aa3bb.entry.js.map → p-f21bc3a9.entry.js.map} +0 -0
  703. /package/dist/web-components-library/{p-a11e1d48.entry.js.map → p-f74f9f3c.entry.js.map} +0 -0
  704. /package/dist/web-components-library/{p-fdd176e2.entry.js.map → p-f8d45aa4.entry.js.map} +0 -0
  705. /package/dist/web-components-library/{p-c3809d39.entry.js.map → p-fe87b081.entry.js.map} +0 -0
  706. /package/www/build/{p-5e0acf57.entry.js.map → p-054484d4.entry.js.map} +0 -0
  707. /package/www/build/{p-bd75bef4.entry.js.map → p-05e9ae1e.entry.js.map} +0 -0
  708. /package/www/build/{p-6c5a8061.entry.js.map → p-12d62027.entry.js.map} +0 -0
  709. /package/www/build/{p-726e1059.entry.js.map → p-18690383.entry.js.map} +0 -0
  710. /package/www/build/{p-a36045c2.entry.js.map → p-19f8c3d2.entry.js.map} +0 -0
  711. /package/www/build/{p-4b27ccf0.entry.js.map → p-1edbac5f.entry.js.map} +0 -0
  712. /package/www/build/{p-9ddfcfd4.entry.js.map → p-21b85c7f.entry.js.map} +0 -0
  713. /package/www/build/{p-f7180c65.entry.js.map → p-2672e36f.entry.js.map} +0 -0
  714. /package/www/build/{p-4a2b4ad1.entry.js.map → p-28928bb6.entry.js.map} +0 -0
  715. /package/www/build/{p-a0231723.entry.js.map → p-2a7e4988.entry.js.map} +0 -0
  716. /package/www/build/{p-66d70fb4.js.map → p-2c184714.js.map} +0 -0
  717. /package/www/build/{p-737293b2.js.map → p-304eeab0.js.map} +0 -0
  718. /package/www/build/{p-09897132.entry.js.map → p-324ef970.entry.js.map} +0 -0
  719. /package/www/build/{p-90b4d340.entry.js.map → p-33eea921.entry.js.map} +0 -0
  720. /package/www/build/{p-7cba8558.entry.js.map → p-385bf4ca.entry.js.map} +0 -0
  721. /package/www/build/{p-411d929f.entry.js.map → p-3b266de4.entry.js.map} +0 -0
  722. /package/www/build/{p-2ed68ac5.entry.js.map → p-4552744b.entry.js.map} +0 -0
  723. /package/www/build/{p-ebdfd7e5.entry.js.map → p-49e4ce84.entry.js.map} +0 -0
  724. /package/www/build/{p-1efacf4c.entry.js.map → p-5a5481be.entry.js.map} +0 -0
  725. /package/www/build/{p-65df3290.entry.js.map → p-609c11d6.entry.js.map} +0 -0
  726. /package/www/build/{p-ee290d4c.entry.js.map → p-6319b5e2.entry.js.map} +0 -0
  727. /package/www/build/{p-467d8a16.entry.js.map → p-63e970ee.entry.js.map} +0 -0
  728. /package/www/build/{p-7693ae18.entry.js.map → p-6586441a.entry.js.map} +0 -0
  729. /package/www/build/{p-5214f770.entry.js.map → p-68822fbc.entry.js.map} +0 -0
  730. /package/www/build/{p-493c652a.entry.js.map → p-6a664748.entry.js.map} +0 -0
  731. /package/www/build/{p-93d39e70.entry.js.map → p-6b2cd695.entry.js.map} +0 -0
  732. /package/www/build/{p-5e734fd3.entry.js.map → p-74a65c6f.entry.js.map} +0 -0
  733. /package/www/build/{p-dde9f76d.entry.js.map → p-77d8ad7e.entry.js.map} +0 -0
  734. /package/www/build/{p-2190352b.js.map → p-78e52a02.js.map} +0 -0
  735. /package/www/build/{p-feca4075.js.map → p-7d827c11.js.map} +0 -0
  736. /package/www/build/{p-5bbb5599.entry.js.map → p-83350b5f.entry.js.map} +0 -0
  737. /package/www/build/{p-8df46096.entry.js.map → p-8499a29d.entry.js.map} +0 -0
  738. /package/www/build/{p-1501c221.entry.js.map → p-85f84e55.entry.js.map} +0 -0
  739. /package/www/build/{p-376208ab.entry.js.map → p-88e756cd.entry.js.map} +0 -0
  740. /package/www/build/{p-214bc293.entry.js.map → p-8b309268.entry.js.map} +0 -0
  741. /package/www/build/{p-0c2fdbe5.entry.js.map → p-8c9f7cef.entry.js.map} +0 -0
  742. /package/www/build/{p-f3272ec6.entry.js.map → p-91c04edc.entry.js.map} +0 -0
  743. /package/www/build/{p-80359658.entry.js.map → p-97b0c3b3.entry.js.map} +0 -0
  744. /package/www/build/{p-74e134e6.entry.js.map → p-99b791d1.entry.js.map} +0 -0
  745. /package/www/build/{p-63337e8b.entry.js.map → p-a4ada10b.entry.js.map} +0 -0
  746. /package/www/build/{p-550b4473.entry.js.map → p-a5781264.entry.js.map} +0 -0
  747. /package/www/build/{p-14bf4619.entry.js.map → p-ad76b8ff.entry.js.map} +0 -0
  748. /package/www/build/{p-2c81acaa.entry.js.map → p-ae96bc09.entry.js.map} +0 -0
  749. /package/www/build/{p-09a9e2ca.entry.js.map → p-af856537.entry.js.map} +0 -0
  750. /package/www/build/{p-7d5983f6.entry.js.map → p-b84fa3b6.entry.js.map} +0 -0
  751. /package/www/build/{p-ff4aa84a.entry.js.map → p-be4878f2.entry.js.map} +0 -0
  752. /package/www/build/{p-79766609.entry.js.map → p-bf2a057d.entry.js.map} +0 -0
  753. /package/www/build/{p-464e5886.entry.js.map → p-c6b269ce.entry.js.map} +0 -0
  754. /package/www/build/{p-1064cb1a.entry.js.map → p-c90249e5.entry.js.map} +0 -0
  755. /package/www/build/{p-b9078348.js.map → p-d9e1d8c7.js.map} +0 -0
  756. /package/www/build/{p-60dfcfaa.entry.js.map → p-df05727f.entry.js.map} +0 -0
  757. /package/www/build/{p-f978d22d.entry.js.map → p-e0323da3.entry.js.map} +0 -0
  758. /package/www/build/{p-810433b1.entry.js.map → p-e1852de3.entry.js.map} +0 -0
  759. /package/www/build/{p-2010d544.entry.js.map → p-e366782c.entry.js.map} +0 -0
  760. /package/www/build/{p-f323cc0b.entry.js.map → p-e5dc0719.entry.js.map} +0 -0
  761. /package/www/build/{p-ea9aa3bb.entry.js.map → p-f21bc3a9.entry.js.map} +0 -0
  762. /package/www/build/{p-a11e1d48.entry.js.map → p-f74f9f3c.entry.js.map} +0 -0
  763. /package/www/build/{p-fdd176e2.entry.js.map → p-f8d45aa4.entry.js.map} +0 -0
  764. /package/www/build/{p-c3809d39.entry.js.map → p-fe87b081.entry.js.map} +0 -0
@@ -1,67 +1,22 @@
1
- import { Host, h } from "@stencil/core";
2
- import { ButtonVariant, ControlSize, OffCanvasVariant, TransitionDirection } from "../../beans";
1
+ import { Fragment, Host, h } from "@stencil/core";
2
+ import { ButtonVariant, ControlSize, Device, KeyboardCode, OffCanvasVariant, TransitionDirection } from "../../beans";
3
+ import { getDevice } from "../../utils/utils";
3
4
  const SUPPORT_INTERSECTION_OBSERVER = typeof IntersectionObserver !== "undefined";
4
5
  /**
5
6
  * @slot title - Slot for the main title
6
- * @slot subtitle - Slot for the bottom subtitle. It will not appear in stuck header.
7
7
  * @slot top-subtitle - Slot for the top subtitle. It will not appear in stuck header.
8
8
  * @slot stucked-title - Title for the stuck header. By default it uses the text from the `title` slot.
9
- * @cssprop --app-header-typography-1-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `24px`.
10
- * @cssprop --app-header-typography-2-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `28px`.
11
- * @cssprop --app-header-typography-3-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `32px`.
12
- * @cssprop --app-header-typography-4-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `36px`.
13
- * @cssprop --app-header-typography-5-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `42px`.
14
- * @cssprop --app-header-typography-6-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `48px`.
15
- * @cssprop --app-header-typography-7-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `54px`.
16
- * @cssprop --app-header-typography-8-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `60px`.
17
- * @cssprop --app-header-typography-9-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `68px`.
18
- * @cssprop --app-header-typography-10-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `76px`.
19
- * @cssprop --app-header-typography-11-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `84px`.
20
- * @cssprop --app-header-typography-12-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `92px`.
21
- * @cssprop --app-header-typography-1-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.33`.
22
- * @cssprop --app-header-typography-2-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.29`.
23
- * @cssprop --app-header-typography-3-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.25`.
24
- * @cssprop --app-header-typography-4-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.24`.
25
- * @cssprop --app-header-typography-5-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.24`.
26
- * @cssprop --app-header-typography-6-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.25`.
27
- * @cssprop --app-header-typography-7-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.2`.
28
- * @cssprop --app-header-typography-8-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.26`.
29
- * @cssprop --app-header-typography-9-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.24`.
30
- * @cssprop --app-header-typography-10-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.26`.
31
- * @cssprop --app-header-typography-11-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.2`.
32
- * @cssprop --app-header-typography-12-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.2`.
33
- * @cssprop --app-header-typography-1-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-0.2 / 1em)`.
34
- * @cssprop --app-header-typography-2-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-0.4 / 1em)`.
35
- * @cssprop --app-header-typography-3-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-0.6 / 1em)`.
36
- * @cssprop --app-header-typography-4-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-0.8 / 1em)`.
37
- * @cssprop --app-header-typography-5-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-1 / 1em)`.
38
- * @cssprop --app-header-typography-6-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-1.2 / 1em)`.
39
- * @cssprop --app-header-typography-7-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-1.4 / 1em)`.
40
- * @cssprop --app-header-typography-8-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-1.6 / 1em)`.
41
- * @cssprop --app-header-typography-9-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-1.8 / 1em)`.
42
- * @cssprop --app-header-typography-10-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-2 / 1em)`.
43
- * @cssprop --app-header-typography-11-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-2.2 / 1em)`.
44
- * @cssprop --app-header-typography-12-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-2.4 / 1em)`.
9
+ * @slot product-logo - To insert the product logo, it should be used with an img tag.
45
10
  * @cssprop --app-header-content-max-width - Use it to set header's content max width. Useful when the project use a fixed width layout. Defaults to `100%`.
46
- * @cssprop --app-header-height - Defaults to `auto`.
47
11
  * @cssprop --app-header-top-offset - Top offset for the stuck header. Useful when there are other fixed elements above the header. Defaults to `48px` (the height of the main topbar).
48
12
  * @cssprop --app-header-drawer-trigger-size - The size of the drawer icon. Defaults to `--space-unit * 4`.
49
13
  * @cssprop --app-header-bg - Header background color. Defaults to `--color-surface01`.
50
14
  * @cssprop --app-header-stucked-bg - Stuck header background color. Defaults to `--color-surface01`.
51
- * @cssprop --app-header-text-color - Text color. Useful on `hero` variant to set text color based on the colors of the background image. Defaults to `--color-default-text`.
52
- * @cssprop --app-header-title-font-size - Variable to customize the title's font size.
53
- * NOTE: Only use one of the exported `--app-header-typography-*-size` as a value.
54
- * Defaults to `--app-header-typography-3-size`.
55
- * @cssprop --app-header-title-lineheight - Variable to customize the title's line-height.
56
- * NOTE: Only use one of the exported `--app-header-typography-*-lineheight` as a value and use the same level as the one of the font size.
57
- * Defaults to `--app-header-typography-3-lineheight`.
58
- * @cssprop --app-header-title-letter-spacing - Variable to customize the title's letter-spacing.
59
- * NOTE: Only use one of the exported `--app-header-typography-*-tracking` as a value and use the same level as the one of the font size.
60
- * Defaults to `--app-header-typography-3-tracking`.
61
15
  * @cssprop --app-header-stucked-text-color - Stuck header text color. Defaults to `--color-default-text`.
62
16
  */
63
17
  export class ZAppHeader {
64
18
  constructor() {
19
+ this.currentIndex = -1;
65
20
  this.observer = SUPPORT_INTERSECTION_OBSERVER &&
66
21
  new IntersectionObserver(([entry]) => {
67
22
  this._stuck = !entry.isIntersecting;
@@ -69,31 +24,77 @@ export class ZAppHeader {
69
24
  threshold: 0.5,
70
25
  });
71
26
  this.stuck = false;
72
- this.hero = undefined;
73
- this.overlay = false;
74
- this.flow = "auto";
75
- this.drawerOpen = false;
27
+ this.enableOffcanvas = false;
76
28
  this.enableSearch = false;
77
29
  this.searchPlaceholder = "Cerca";
78
30
  this.searchString = "";
79
31
  this.searchPageUrl = undefined;
32
+ this.enableZLogo = true;
80
33
  this._stuck = false;
81
- this.currentViewport = "mobile";
34
+ this.currentViewport = Device.MOBILE;
82
35
  this.menuLength = undefined;
36
+ this.drawerOpen = false;
83
37
  this.openDrawer = this.openDrawer.bind(this);
84
38
  this.closeDrawer = this.closeDrawer.bind(this);
85
39
  this.collectMenuElements = this.collectMenuElements.bind(this);
86
40
  }
87
41
  evaluateViewport() {
88
- if (window.innerWidth < 768) {
89
- this.currentViewport = "mobile";
42
+ this.currentViewport = getDevice();
43
+ }
44
+ handleKeyDown(e) {
45
+ if (e.code === KeyboardCode.ESC && this.drawerOpen) {
46
+ this.closeDrawer();
47
+ return;
48
+ }
49
+ this.handleArrowsNav(e);
50
+ }
51
+ handleArrowsNav(e) {
52
+ if (e.code !== KeyboardCode.ARROW_DOWN && e.code !== KeyboardCode.ARROW_UP && this.enableOffcanvas) {
53
+ return;
54
+ }
55
+ if (document.activeElement.slot === "item") {
56
+ return;
90
57
  }
91
- else if (window.innerWidth >= 768 && window.innerWidth < 1152) {
92
- this.currentViewport = "tablet";
58
+ const menuItems = Array.from(this.menuElements).map((el) => el.shadowRoot.querySelector(".menu-label"));
59
+ let nextFocusableItem;
60
+ if (this.enableOffcanvas || this._stuck) {
61
+ // INFO: reset focus on all menu items
62
+ menuItems.forEach((item) => item.setAttribute("tabindex", "-1"));
63
+ e.preventDefault();
64
+ e.stopPropagation();
65
+ if (e.code === KeyboardCode.ARROW_DOWN) {
66
+ nextFocusableItem = this.getNextItem(menuItems, 1);
67
+ }
68
+ else if (e.code === KeyboardCode.ARROW_UP) {
69
+ nextFocusableItem = this.getNextItem(menuItems, -1);
70
+ }
93
71
  }
94
72
  else {
95
- this.currentViewport = "desktop";
73
+ if (e.code === KeyboardCode.ARROW_DOWN || e.code === KeyboardCode.ARROW_UP) {
74
+ e.preventDefault();
75
+ return;
76
+ }
77
+ //INFO: reset focus on all menu items
78
+ menuItems.forEach((item) => item.setAttribute("tabindex", "-1"));
79
+ if (e.code === KeyboardCode.ARROW_RIGHT) {
80
+ nextFocusableItem = this.getNextItem(menuItems, 1);
81
+ }
82
+ else if (e.code === KeyboardCode.ARROW_LEFT) {
83
+ nextFocusableItem = this.getNextItem(menuItems, -1);
84
+ }
96
85
  }
86
+ if (nextFocusableItem) {
87
+ nextFocusableItem.setAttribute("tabindex", "0");
88
+ nextFocusableItem.focus();
89
+ }
90
+ }
91
+ getNextItem(menuItems, direction) {
92
+ if (this.currentIndex === -1) {
93
+ this.currentIndex = direction === 1 ? 0 : menuItems.length - 1;
94
+ return menuItems[this.currentIndex];
95
+ }
96
+ this.currentIndex = (this.currentIndex + direction + menuItems.length) % menuItems.length;
97
+ return menuItems[this.currentIndex];
97
98
  }
98
99
  onStuck() {
99
100
  const scrollParent = this.scrollParent;
@@ -106,13 +107,33 @@ export class ZAppHeader {
106
107
  if (this.menuElements.length === 0) {
107
108
  return;
108
109
  }
109
- const elements = this.menuElements;
110
- elements.forEach((element) => {
110
+ this.menuElements.forEach((element) => {
111
111
  element.open = false;
112
112
  element.floating = !this.drawerOpen;
113
113
  element.verticalContext = this.drawerOpen;
114
+ element.setAttribute("role", "menuitem");
115
+ element.setAttribute("tabindex", "-1");
114
116
  });
115
117
  }
118
+ onStuckMode() {
119
+ if (this.stuck) {
120
+ this.enableStuckObserver();
121
+ }
122
+ else {
123
+ this.disableStuckMode();
124
+ }
125
+ }
126
+ enableStuckObserver() {
127
+ if (this.observer) {
128
+ this.observer.observe(this.container);
129
+ }
130
+ }
131
+ disableStuckMode() {
132
+ this._stuck = false;
133
+ if (this.observer) {
134
+ this.observer.unobserve(this.container);
135
+ }
136
+ }
116
137
  get title() {
117
138
  const titleElement = this.hostElement.querySelector('[slot="title"]');
118
139
  if (titleElement === null) {
@@ -128,70 +149,133 @@ export class ZAppHeader {
128
149
  return parent;
129
150
  }
130
151
  get canShowMenu() {
131
- return this.flow !== "offcanvas" && this.currentViewport !== "mobile" && !this.drawerOpen;
132
- }
133
- get canShowSearchbar() {
134
- if (!this.enableSearch) {
135
- return false;
136
- }
137
- // Always show the searchbar on desktop, even if a searchPageUrl is set
138
- if (this.searchPageUrl) {
139
- return this.currentViewport === "desktop";
140
- }
141
- return true;
142
- }
143
- /**
144
- * Whether the header has a hero image, either as a prop or as a slot.
145
- */
146
- get hasHero() {
147
- return !!this.hero || this.hostElement.querySelector("[slot=hero]") !== null;
152
+ return (!this.enableOffcanvas &&
153
+ this.menuElements.length > 0 &&
154
+ this.currentViewport !== Device.MOBILE &&
155
+ !this.drawerOpen);
148
156
  }
149
157
  openDrawer() {
150
158
  this.drawerOpen = true;
151
159
  }
152
160
  closeDrawer() {
153
161
  this.drawerOpen = false;
162
+ this.burgerButton.focus();
163
+ this.currentIndex = -1;
154
164
  }
155
165
  collectMenuElements() {
156
166
  const menuElements = (this.menuElements = this.hostElement.querySelectorAll('[slot="menu"]'));
157
167
  this.menuLength = menuElements.length;
158
168
  this.setMenuFloatingMode();
159
169
  }
160
- enableStuckObserver() {
161
- if (this.observer) {
162
- this.observer.observe(this.container);
170
+ isSlotPresent(slotName) {
171
+ const slot = this.hostElement.querySelector(`[slot="${slotName}"]`);
172
+ return !!slot;
173
+ }
174
+ renderSeachbar() {
175
+ const renderSearch = this.currentViewport === Device.MOBILE || this.currentViewport === Device.TABLET ? true : false;
176
+ if (this.currentViewport === Device.MOBILE && !this.searchPageUrl && this._stuck) {
177
+ return;
163
178
  }
179
+ if (this.searchPageUrl && (this.currentViewport === Device.MOBILE || this.currentViewport === Device.TABLET)) {
180
+ return (h("z-button", { class: "search-page-button", variant: ButtonVariant.SECONDARY, href: this.searchPageUrl, icon: "search", size: ControlSize.X_SMALL }));
181
+ }
182
+ return (h("z-searchbar", { ref: (el) => (this.searchbar = el), value: this.searchString, placeholder: this.searchPlaceholder, showSearchButton: true, searchButtonIconOnly: renderSearch, size: ControlSize.X_SMALL, variant: ButtonVariant.SECONDARY, preventSubmit: this.searchString.length < 3, onSearchTyping: (e) => (this.searchString = e.detail), onKeyDown: (e) => {
183
+ if (e.code === KeyboardCode.ARROW_RIGHT || e.code === KeyboardCode.ARROW_LEFT) {
184
+ e.stopPropagation();
185
+ }
186
+ } }));
164
187
  }
165
- disableStuckMode() {
166
- this._stuck = false;
167
- if (this.observer) {
168
- this.observer.unobserve(this.container);
188
+ renderProductLogos() {
189
+ return (h(Fragment, null, this.enableZLogo && (h("img", { class: "z-logo", alt: "Logo Zanichelli" })), this.currentViewport !== Device.MOBILE && h("slot", { name: "product-logo" })));
190
+ }
191
+ renderMenuButton() {
192
+ return (this.menuLength > 0 &&
193
+ (this.enableOffcanvas || this._stuck || this.currentViewport === Device.MOBILE) && (h("button", { ref: (el) => (this.burgerButton = el), "aria-label": "Apri menu", "aria-haspopup": "menu", "aria-expanded": `${this.drawerOpen}`, "aria-controls": "menu-offcanvas", class: "drawer-trigger", onClick: this.openDrawer, onKeyUp: (ev) => {
194
+ if (ev.code === KeyboardCode.ENTER || ev.code === KeyboardCode.SPACE) {
195
+ this.closeMenuButton.focus();
196
+ }
197
+ } }, h("z-icon", { name: "burger-menu" }))));
198
+ }
199
+ renderOffcanvas() {
200
+ return (h("z-offcanvas", { variant: OffCanvasVariant.OVERLAY, transitiondirection: TransitionDirection.RIGHT, open: this.drawerOpen, onCanvasOpenStatusChanged: (ev) => (this.drawerOpen = ev.detail) }, h("div", { slot: "canvasContent" }, h("button", { ref: (el) => (this.closeMenuButton = el), class: "drawer-close", "aria-label": "Chiudi menu", onClick: this.closeDrawer, "aria-hidden": `${!this.drawerOpen}`, disabled: !this.drawerOpen }, h("z-icon", { name: "close" })), h("div", { class: "drawer-content", "aria-hidden": `${!this.drawerOpen}` }, h("slot", { name: "menu", onSlotchange: this.collectMenuElements })))));
201
+ }
202
+ renderStuck() {
203
+ return (h("div", { class: "heading-stuck" }, h("div", { class: "heading-stuck-content" }, this.renderMenuButton(), h("div", { class: "heading-title" }, this.renderProductLogos(), h("slot", { name: "stucked-title" }, this.title)), this.enableSearch && this.renderSeachbar())));
204
+ }
205
+ getWidthMenu() {
206
+ if (this.menuElements.length === 0) {
207
+ return;
169
208
  }
209
+ return Array.from(this.menuElements).reduce((acc, item) => item.getBoundingClientRect().width + acc, 100);
170
210
  }
171
- onStuckMode() {
172
- if (this.stuck) {
173
- this.enableStuckObserver();
211
+ focusToFirstItemMenu() {
212
+ const menuItems = Array.from(this.menuElements).map((el) => el.shadowRoot.querySelector(".menu-label"));
213
+ menuItems[0].focus();
214
+ this.currentIndex = 0;
215
+ }
216
+ handleFocusItem(e) {
217
+ const menuItems = Array.from(this.menuElements).map((el) => el.shadowRoot.querySelector(".menu-label"));
218
+ if (e.code === KeyboardCode.ARROW_DOWN ||
219
+ e.code === KeyboardCode.ARROW_UP ||
220
+ e.code === KeyboardCode.ENTER ||
221
+ e.code === KeyboardCode.TAB) {
222
+ return;
174
223
  }
175
- else {
176
- this.disableStuckMode();
224
+ if (document.activeElement.tagName === "Z-MENU-SECTION" || document.activeElement.tagName === "Z-MENU") {
225
+ return;
177
226
  }
178
- }
179
- renderSearchLinkButton() {
180
- if (!this.enableSearch || !this.searchPageUrl || this.currentViewport === "desktop") {
181
- return null;
227
+ if (this.enableSearch && this.currentIndex === 0) {
228
+ const input = this.searchbar.shadowRoot.querySelector("z-input input");
229
+ input.focus();
230
+ this.currentIndex = -1;
231
+ }
232
+ if (this.currentIndex !== -1) {
233
+ menuItems[this.currentIndex].focus();
182
234
  }
183
- return (h("z-button", { class: "search-page-button", variant: ButtonVariant.SECONDARY, href: this.searchPageUrl, icon: "search", size: ControlSize.X_SMALL }));
184
235
  }
185
- renderSeachbar(searchButtonIconOnly) {
186
- return (h("z-searchbar", { value: this.searchString, placeholder: this.searchPlaceholder, showSearchButton: true, searchButtonIconOnly: searchButtonIconOnly, size: ControlSize.X_SMALL, variant: ButtonVariant.SECONDARY, preventSubmit: this.searchString.length < 3, onSearchTyping: (e) => (this.searchString = e.detail) }));
236
+ componentWillLoad() {
237
+ this.collectMenuElements();
238
+ this.evaluateViewport();
187
239
  }
188
240
  componentDidLoad() {
189
- this.collectMenuElements();
190
241
  this.onStuckMode();
191
- this.evaluateViewport();
242
+ if (this.enableOffcanvas) {
243
+ return;
244
+ }
245
+ const menuWidth = this.getWidthMenu();
246
+ const containerSidePadding = 50;
247
+ this.resizeObserver = new ResizeObserver((observer) => {
248
+ const containerWidth = observer[0].contentRect.width;
249
+ if (this.currentViewport === Device.MOBILE) {
250
+ return (this.enableOffcanvas = true);
251
+ }
252
+ if (menuWidth > containerWidth - containerSidePadding && !this.enableOffcanvas) {
253
+ this.enableOffcanvas = true;
254
+ }
255
+ else if (menuWidth <= containerWidth - containerSidePadding && this.enableOffcanvas) {
256
+ this.enableOffcanvas = false;
257
+ }
258
+ });
259
+ this.resizeObserver.observe(this.container);
260
+ }
261
+ disconnectedCallback() {
262
+ var _a;
263
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
192
264
  }
193
265
  render() {
194
- return (h(Host, { key: '6ef78f216bf32166c80027e6c8d8c3c8b46e11a4', "menu-length": this.menuLength }, this.hasHero && (h("div", { key: '097f49ab84c9c5a02b1919bbf0d8bea41a9e7475', class: "hero-container" }, h("slot", { key: 'e68c20961233eec80133281adfe2e5068de05ca9', name: "hero" }, this.hero && (h("img", { key: '3f639bca7f3c5ae1f9f1ea088f4f072a11b398fd', alt: "", src: this.hero }))))), h("div", { key: '7f9a9025ee6b36ce4ddf119fe29afc28cff3f575', class: "heading-panel", ref: (el) => (this.container = el) }, h("div", { key: 'bf9e7e0634b79f86f886dbad016c1ee7c3a2bd0c', class: "heading-container" }, h("div", { key: '5f105d5a5e0d1545b953049c2f10ea1e409c5dd3', class: "heading-subtitle" }, h("slot", { key: 'e5257749958900cbdf0da3abc97647a6ca199a9a', name: "top-subtitle" })), h("div", { key: 'cd422b72e4fa5a1ddb400d0af44a87e28e14e496', class: "heading-title" }, this.menuLength > 0 && (h("button", { key: '8d0fd05ecac894b7c123c2b1850636f5c42445bb', class: "drawer-trigger", "aria-label": "Apri menu", onClick: this.openDrawer }, h("z-icon", { key: '7d3c4426ed0cb81f5d871e1e9d4f0a08c6e4bd1a', name: "burger-menu" }))), h("slot", { key: 'eb4a376c9edf06a839e2eda8cae3ca9f5c0c98f7', name: "title" }), this.renderSearchLinkButton()), h("div", { key: 'ca4175ad587aaa14435112451e616b9d40f4058b', class: "heading-subtitle" }, h("slot", { key: '923548867c7ecf93e7e4d46cdd68aff309a301eb', name: "subtitle" }))), (this.canShowMenu || this.canShowSearchbar) && (h("div", { key: 'b424522341c597059c9be302d30c5af85c3c1d12', class: "menu-container" }, this.canShowMenu && (h("slot", { key: '97b5bd01961bb07d13dc16cdf0bda52ac7cf7261', name: "menu", onSlotchange: this.collectMenuElements })), this.canShowSearchbar && this.renderSeachbar(this.currentViewport !== "desktop")))), h("z-offcanvas", { key: '42d89b3e9697aaf5c0781d69c6aca4a1fe44c389', variant: OffCanvasVariant.OVERLAY, transitiondirection: TransitionDirection.RIGHT, open: this.drawerOpen, onCanvasOpenStatusChanged: (ev) => (this.drawerOpen = ev.detail) }, h("button", { key: '29e9eedfba19cca2316bdde81d52052164fe2003', class: "drawer-close", "aria-label": "Chiudi menu", onClick: this.closeDrawer, slot: "canvasContent", "aria-hidden": `${!this.drawerOpen}`, disabled: !this.drawerOpen }, h("z-icon", { key: '3f63af4cc3fc4e632a797b16e8530affc6f9ea79', name: "close" })), h("div", { key: '9925e208c3a9f45eebbbb210ad5b23041201b239', class: "drawer-content", slot: "canvasContent", "aria-hidden": `${!this.drawerOpen}` }, h("slot", { key: 'b687cd86e3e6dcb1cd5c8c5ac535dfdf9d1b9dd2', name: "menu", onSlotchange: this.collectMenuElements }))), this._stuck && (h("div", { key: 'a5eedb131fd6a50dad224c5016990b5a9256764b', class: "heading-stuck" }, h("div", { key: '9747f43c0c824f3c98c299071f92fa7d0d695529', class: "heading-stuck-content" }, this.menuLength > 0 && (h("button", { key: 'ad7fadb424d1b59852bd6f7bbfc875555495c163', class: "drawer-trigger", "aria-label": "Apri menu", onClick: this.openDrawer }, h("z-icon", { key: '4dbe75545f5e15fac2bd81c6726294d6f848681c', name: "burger-menu" }))), h("div", { key: 'a22d676527aa51b34942547a36651d85163b85ac', class: "heading-title" }, h("slot", { key: 'ba141592baf287d65faa4624f9c32c04471073d5', name: "stucked-title" }, this.title)), this.renderSearchLinkButton(), this.canShowSearchbar && this.currentViewport === "desktop" && this.renderSeachbar(false))))));
266
+ const hasTopSubtitle = this.isSlotPresent("top-subtitle");
267
+ return (h(Host, { key: '1b905f7f0c42a9688493a38353ad69282248dac3', "menu-length": this.menuLength }, h("div", { key: 'f69888ebf52067bc34385e3f455816594d9209a2', class: `heading-panel ${this.menuLength > 0 && !this.enableOffcanvas ? "has-menu" : ""}`, ref: (el) => (this.container = el) }, h("div", { key: '827f5ee62dd066de4b049453738f3a587ab34320', class: "heading-container" }, ((!this.enableSearch && this.currentViewport === Device.MOBILE) ||
268
+ this.currentViewport !== Device.MOBILE) && (h("div", { key: 'd520fb97f1fe09340b6265be94b09ff26dc0e9cf', class: `${this.enableOffcanvas ? "p-left" : ""}` }, h("slot", { key: 'a8f1d05fd7f71603f3b63c43317859ee8c5e37bf', name: "top-subtitle" }))), h("div", { key: 'ec1b3adc2e17d8713849166799c553122d1e7c80', class: "heading-title" }, this.renderMenuButton(), !hasTopSubtitle && !this._stuck && this.renderProductLogos(), h("slot", { key: '263a9099b08065da250a1d0c228caac435dc9dd7', name: "title" }), this.enableSearch && this.currentViewport !== Device.MOBILE && this.renderSeachbar()), this.enableSearch && this.currentViewport === Device.MOBILE && this.renderSeachbar()), this.canShowMenu && (h("div", { key: '2c952c6e1b1ec608f73f5c5210ab5b5331d379bf', class: "menu-container", onKeyUp: (e) => {
269
+ if (this.enableOffcanvas) {
270
+ return;
271
+ }
272
+ if (this.currentIndex === -1) {
273
+ this.focusToFirstItemMenu();
274
+ }
275
+ else {
276
+ this.handleFocusItem(e);
277
+ }
278
+ }, role: "hidden", tabIndex: 0 }, h("slot", { key: '0b71f1d0aa78599592213f61ee49e68daad5d04f', name: "menu", onSlotchange: this.collectMenuElements })))), this.renderOffcanvas(), this._stuck && this.renderStuck()));
195
279
  }
196
280
  static get is() { return "z-app-header"; }
197
281
  static get encapsulation() { return "shadow"; }
@@ -225,62 +309,9 @@ export class ZAppHeader {
225
309
  "reflect": true,
226
310
  "defaultValue": "false"
227
311
  },
228
- "hero": {
229
- "type": "string",
230
- "mutable": false,
231
- "complexType": {
232
- "original": "string",
233
- "resolved": "string",
234
- "references": {}
235
- },
236
- "required": false,
237
- "optional": false,
238
- "docs": {
239
- "tags": [],
240
- "text": "Set the hero image source for the header.\nYou can also use a [slot=\"hero\"] node for advanced customization."
241
- },
242
- "attribute": "hero",
243
- "reflect": false
244
- },
245
- "overlay": {
246
- "type": "boolean",
247
- "mutable": false,
248
- "complexType": {
249
- "original": "boolean",
250
- "resolved": "boolean",
251
- "references": {}
252
- },
253
- "required": false,
254
- "optional": false,
255
- "docs": {
256
- "tags": [],
257
- "text": "Should place an overlay over the hero image.\nUseful for legibility purpose."
258
- },
259
- "attribute": "overlay",
260
- "reflect": true,
261
- "defaultValue": "false"
262
- },
263
- "flow": {
264
- "type": "string",
265
- "mutable": false,
266
- "complexType": {
267
- "original": "\"auto\" | \"stack\" | \"offcanvas\"",
268
- "resolved": "\"auto\" | \"offcanvas\" | \"stack\"",
269
- "references": {}
270
- },
271
- "required": false,
272
- "optional": false,
273
- "docs": {
274
- "tags": [],
275
- "text": "Control menu bar position in the header.\n- auto: the menu bar is positioned near the title\n- stack: the menu bar is positioned below the title\n- offcanvas: the menu bar is not displayed and a burger icon appears to open the offcanvas menu"
276
- },
277
- "attribute": "flow",
278
- "reflect": true,
279
- "defaultValue": "\"auto\""
280
- },
281
- "drawerOpen": {
312
+ "enableOffcanvas": {
282
313
  "type": "boolean",
283
- "mutable": false,
314
+ "mutable": true,
284
315
  "complexType": {
285
316
  "original": "boolean",
286
317
  "resolved": "boolean",
@@ -290,9 +321,9 @@ export class ZAppHeader {
290
321
  "optional": false,
291
322
  "docs": {
292
323
  "tags": [],
293
- "text": "The opening state of the drawer."
324
+ "text": "the menu bar is not displayed and a burger icon appears to open the offcanvas menu"
294
325
  },
295
- "attribute": "drawer-open",
326
+ "attribute": "enable-offcanvas",
296
327
  "reflect": true,
297
328
  "defaultValue": "false"
298
329
  },
@@ -366,6 +397,24 @@ export class ZAppHeader {
366
397
  },
367
398
  "attribute": "search-page-url",
368
399
  "reflect": false
400
+ },
401
+ "enableZLogo": {
402
+ "type": "boolean",
403
+ "mutable": false,
404
+ "complexType": {
405
+ "original": "boolean",
406
+ "resolved": "boolean",
407
+ "references": {}
408
+ },
409
+ "required": false,
410
+ "optional": false,
411
+ "docs": {
412
+ "tags": [],
413
+ "text": "Enable laZ logo."
414
+ },
415
+ "attribute": "enable-z-logo",
416
+ "reflect": true,
417
+ "defaultValue": "true"
369
418
  }
370
419
  };
371
420
  }
@@ -373,7 +422,8 @@ export class ZAppHeader {
373
422
  return {
374
423
  "_stuck": {},
375
424
  "currentViewport": {},
376
- "menuLength": {}
425
+ "menuLength": {},
426
+ "drawerOpen": {}
377
427
  };
378
428
  }
379
429
  static get events() {
@@ -414,6 +464,12 @@ export class ZAppHeader {
414
464
  "target": "window",
415
465
  "capture": false,
416
466
  "passive": true
467
+ }, {
468
+ "name": "keydown",
469
+ "method": "handleKeyDown",
470
+ "target": undefined,
471
+ "capture": false,
472
+ "passive": false
417
473
  }];
418
474
  }
419
475
  }
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h} from \"@stencil/core\";\nimport {ButtonVariant, ControlSize, OffCanvasVariant, TransitionDirection} from \"../../beans\";\n\nconst SUPPORT_INTERSECTION_OBSERVER = typeof IntersectionObserver !== \"undefined\";\n\n/**\n * @slot title - Slot for the main title\n * @slot subtitle - Slot for the bottom subtitle. It will not appear in stuck header.\n * @slot top-subtitle - Slot for the top subtitle. It will not appear in stuck header.\n * @slot stucked-title - Title for the stuck header. By default it uses the text from the `title` slot.\n * @cssprop --app-header-typography-1-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `24px`.\n * @cssprop --app-header-typography-2-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `28px`.\n * @cssprop --app-header-typography-3-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `32px`.\n * @cssprop --app-header-typography-4-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `36px`.\n * @cssprop --app-header-typography-5-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `42px`.\n * @cssprop --app-header-typography-6-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `48px`.\n * @cssprop --app-header-typography-7-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `54px`.\n * @cssprop --app-header-typography-8-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `60px`.\n * @cssprop --app-header-typography-9-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `68px`.\n * @cssprop --app-header-typography-10-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `76px`.\n * @cssprop --app-header-typography-11-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `84px`.\n * @cssprop --app-header-typography-12-size - Part of the heading typography's scale. Use it if you have to override the default value. Value: `92px`.\n * @cssprop --app-header-typography-1-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.33`.\n * @cssprop --app-header-typography-2-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.29`.\n * @cssprop --app-header-typography-3-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.25`.\n * @cssprop --app-header-typography-4-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.24`.\n * @cssprop --app-header-typography-5-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.24`.\n * @cssprop --app-header-typography-6-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.25`.\n * @cssprop --app-header-typography-7-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.2`.\n * @cssprop --app-header-typography-8-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.26`.\n * @cssprop --app-header-typography-9-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.24`.\n * @cssprop --app-header-typography-10-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.26`.\n * @cssprop --app-header-typography-11-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.2`.\n * @cssprop --app-header-typography-12-lineheight - Part of the heading typography's scale. Use it if you have to override the default value. Value: `1.2`.\n * @cssprop --app-header-typography-1-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-0.2 / 1em)`.\n * @cssprop --app-header-typography-2-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-0.4 / 1em)`.\n * @cssprop --app-header-typography-3-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-0.6 / 1em)`.\n * @cssprop --app-header-typography-4-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-0.8 / 1em)`.\n * @cssprop --app-header-typography-5-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-1 / 1em)`.\n * @cssprop --app-header-typography-6-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-1.2 / 1em)`.\n * @cssprop --app-header-typography-7-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-1.4 / 1em)`.\n * @cssprop --app-header-typography-8-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-1.6 / 1em)`.\n * @cssprop --app-header-typography-9-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-1.8 / 1em)`.\n * @cssprop --app-header-typography-10-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-2 / 1em)`.\n * @cssprop --app-header-typography-11-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-2.2 / 1em)`.\n * @cssprop --app-header-typography-12-tracking - Part of the heading typography's scale. Use it if you have to override the default value. Value: `calc(-2.4 / 1em)`.\n * @cssprop --app-header-content-max-width - Use it to set header's content max width. Useful when the project use a fixed width layout. Defaults to `100%`.\n * @cssprop --app-header-height - Defaults to `auto`.\n * @cssprop --app-header-top-offset - Top offset for the stuck header. Useful when there are other fixed elements above the header. Defaults to `48px` (the height of the main topbar).\n * @cssprop --app-header-drawer-trigger-size - The size of the drawer icon. Defaults to `--space-unit * 4`.\n * @cssprop --app-header-bg - Header background color. Defaults to `--color-surface01`.\n * @cssprop --app-header-stucked-bg - Stuck header background color. Defaults to `--color-surface01`.\n * @cssprop --app-header-text-color - Text color. Useful on `hero` variant to set text color based on the colors of the background image. Defaults to `--color-default-text`.\n * @cssprop --app-header-title-font-size - Variable to customize the title's font size.\n * NOTE: Only use one of the exported `--app-header-typography-*-size` as a value.\n * Defaults to `--app-header-typography-3-size`.\n * @cssprop --app-header-title-lineheight - Variable to customize the title's line-height.\n * NOTE: Only use one of the exported `--app-header-typography-*-lineheight` as a value and use the same level as the one of the font size.\n * Defaults to `--app-header-typography-3-lineheight`.\n * @cssprop --app-header-title-letter-spacing - Variable to customize the title's letter-spacing.\n * NOTE: Only use one of the exported `--app-header-typography-*-tracking` as a value and use the same level as the one of the font size.\n * Defaults to `--app-header-typography-3-tracking`.\n * @cssprop --app-header-stucked-text-color - Stuck header text color. Defaults to `--color-default-text`.\n */\n@Component({\n tag: \"z-app-header\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZAppHeader {\n @Element() hostElement: HTMLZAppHeaderElement;\n\n /**\n * Stuck mode for the header.\n * You can programmatically set it using an IntersectionObserver.\n */\n @Prop({reflect: true})\n stuck = false;\n\n /**\n * Set the hero image source for the header.\n * You can also use a [slot=\"hero\"] node for advanced customization.\n */\n @Prop()\n hero: string;\n\n /**\n * Should place an overlay over the hero image.\n * Useful for legibility purpose.\n */\n @Prop({reflect: true})\n overlay = false;\n\n /**\n * Control menu bar position in the header.\n * - auto: the menu bar is positioned near the title\n * - stack: the menu bar is positioned below the title\n * - offcanvas: the menu bar is not displayed and a burger icon appears to open the offcanvas menu\n */\n @Prop({reflect: true})\n flow: \"auto\" | \"stack\" | \"offcanvas\" = \"auto\";\n\n /**\n * The opening state of the drawer.\n */\n @Prop({reflect: true})\n drawerOpen = false;\n\n /**\n * Enable the search bar.\n */\n @Prop({reflect: true})\n enableSearch = false;\n\n /**\n * Placeholder text for the search bar.\n */\n @Prop()\n searchPlaceholder = \"Cerca\";\n\n /**\n * Search string for the search bar.\n */\n @Prop({mutable: true})\n searchString = \"\";\n\n /**\n * Url to the search page.\n * Set this prop and `enableSearch` to show a link-button on mobile and tablet viewports, instead of the normal searchbar.\n * The link will also appear on the sticky header.\n */\n @Prop()\n searchPageUrl: string;\n\n /**\n * The stuck state of the bar.\n */\n @State()\n private _stuck = false;\n\n /**\n * Current viewport.\n * Used to change the aspect of the search button (icon only) on mobile and tablet.\n */\n @State()\n private currentViewport: \"mobile\" | \"tablet\" | \"desktop\" = \"mobile\";\n\n /**\n * Current count of menu items.\n */\n @State()\n menuLength: number;\n\n /**\n * Emitted when the `stuck` state of the header changes\n */\n @Event()\n sticking: EventEmitter;\n\n private container?: HTMLDivElement;\n\n private menuElements?: NodeListOf<HTMLElement>;\n\n private observer?: IntersectionObserver =\n SUPPORT_INTERSECTION_OBSERVER &&\n new IntersectionObserver(\n ([entry]) => {\n this._stuck = !entry.isIntersecting;\n },\n {\n threshold: 0.5,\n }\n );\n\n constructor() {\n this.openDrawer = this.openDrawer.bind(this);\n this.closeDrawer = this.closeDrawer.bind(this);\n this.collectMenuElements = this.collectMenuElements.bind(this);\n }\n\n @Listen(\"resize\", {target: \"window\", passive: true})\n evaluateViewport(): void {\n if (window.innerWidth < 768) {\n this.currentViewport = \"mobile\";\n } else if (window.innerWidth >= 768 && window.innerWidth < 1152) {\n this.currentViewport = \"tablet\";\n } else {\n this.currentViewport = \"desktop\";\n }\n }\n\n @Watch(\"_stuck\")\n onStuck(): void {\n const scrollParent = this.scrollParent;\n if (!scrollParent) {\n return;\n }\n\n this.sticking.emit(this._stuck);\n }\n\n @Watch(\"drawerOpen\")\n setMenuFloatingMode(): void {\n if (this.menuElements.length === 0) {\n return;\n }\n\n const elements = this.menuElements;\n elements.forEach((element) => {\n (element as HTMLZMenuElement).open = false;\n (element as HTMLZMenuElement).floating = !this.drawerOpen;\n (element as HTMLZMenuElement).verticalContext = this.drawerOpen;\n });\n }\n\n private get title(): string {\n const titleElement = this.hostElement.querySelector('[slot=\"title\"]');\n if (titleElement === null) {\n return \"\";\n }\n\n return titleElement.textContent.trim();\n }\n\n private get scrollParent(): Window | Element {\n const parent = this.hostElement.offsetParent;\n if (parent === document.body || parent === document.documentElement) {\n return window;\n }\n\n return parent;\n }\n\n private get canShowMenu(): boolean {\n return this.flow !== \"offcanvas\" && this.currentViewport !== \"mobile\" && !this.drawerOpen;\n }\n\n private get canShowSearchbar(): boolean {\n if (!this.enableSearch) {\n return false;\n }\n\n // Always show the searchbar on desktop, even if a searchPageUrl is set\n if (this.searchPageUrl) {\n return this.currentViewport === \"desktop\";\n }\n\n return true;\n }\n\n /**\n * Whether the header has a hero image, either as a prop or as a slot.\n */\n private get hasHero(): boolean {\n return !!this.hero || this.hostElement.querySelector(\"[slot=hero]\") !== null;\n }\n\n private openDrawer(): void {\n this.drawerOpen = true;\n }\n\n private closeDrawer(): void {\n this.drawerOpen = false;\n }\n\n private collectMenuElements(): void {\n const menuElements = (this.menuElements = this.hostElement.querySelectorAll('[slot=\"menu\"]'));\n this.menuLength = menuElements.length;\n this.setMenuFloatingMode();\n }\n\n private enableStuckObserver(): void {\n if (this.observer) {\n this.observer.observe(this.container);\n }\n }\n\n private disableStuckMode(): void {\n this._stuck = false;\n if (this.observer) {\n this.observer.unobserve(this.container);\n }\n }\n\n @Watch(\"stuck\")\n onStuckMode(): void {\n if (this.stuck) {\n this.enableStuckObserver();\n } else {\n this.disableStuckMode();\n }\n }\n\n private renderSearchLinkButton(): HTMLZButtonElement | null {\n if (!this.enableSearch || !this.searchPageUrl || this.currentViewport === \"desktop\") {\n return null;\n }\n\n return (\n <z-button\n class=\"search-page-button\"\n variant={ButtonVariant.SECONDARY}\n href={this.searchPageUrl}\n icon=\"search\"\n size={ControlSize.X_SMALL}\n ></z-button>\n );\n }\n\n private renderSeachbar(searchButtonIconOnly: boolean): HTMLZSearchbarElement {\n return (\n <z-searchbar\n value={this.searchString}\n placeholder={this.searchPlaceholder}\n showSearchButton={true}\n searchButtonIconOnly={searchButtonIconOnly}\n size={ControlSize.X_SMALL}\n variant={ButtonVariant.SECONDARY}\n preventSubmit={this.searchString.length < 3}\n onSearchTyping={(e) => (this.searchString = e.detail)}\n />\n );\n }\n\n componentDidLoad(): void {\n this.collectMenuElements();\n this.onStuckMode();\n this.evaluateViewport();\n }\n\n render(): HTMLZAppHeaderElement {\n return (\n <Host menu-length={this.menuLength}>\n {this.hasHero && (\n <div class=\"hero-container\">\n <slot name=\"hero\">\n {this.hero && (\n <img\n alt=\"\"\n src={this.hero}\n />\n )}\n </slot>\n </div>\n )}\n\n <div\n class=\"heading-panel\"\n ref={(el) => (this.container = el)}\n >\n <div class=\"heading-container\">\n <div class=\"heading-subtitle\">\n <slot name=\"top-subtitle\"></slot>\n </div>\n <div class=\"heading-title\">\n {this.menuLength > 0 && (\n <button\n class=\"drawer-trigger\"\n aria-label=\"Apri menu\"\n onClick={this.openDrawer}\n >\n <z-icon name=\"burger-menu\"></z-icon>\n </button>\n )}\n\n <slot name=\"title\"></slot>\n\n {this.renderSearchLinkButton()}\n </div>\n\n <div class=\"heading-subtitle\">\n <slot name=\"subtitle\"></slot>\n </div>\n </div>\n\n {(this.canShowMenu || this.canShowSearchbar) && (\n <div class=\"menu-container\">\n {this.canShowMenu && (\n <slot\n name=\"menu\"\n onSlotchange={this.collectMenuElements}\n ></slot>\n )}\n\n {this.canShowSearchbar && this.renderSeachbar(this.currentViewport !== \"desktop\")}\n </div>\n )}\n </div>\n\n <z-offcanvas\n variant={OffCanvasVariant.OVERLAY}\n transitiondirection={TransitionDirection.RIGHT}\n open={this.drawerOpen}\n onCanvasOpenStatusChanged={(ev) => (this.drawerOpen = ev.detail)}\n >\n <button\n class=\"drawer-close\"\n aria-label=\"Chiudi menu\"\n onClick={this.closeDrawer}\n slot=\"canvasContent\"\n aria-hidden={`${!this.drawerOpen}`}\n disabled={!this.drawerOpen}\n >\n <z-icon name=\"close\"></z-icon>\n </button>\n\n <div\n class=\"drawer-content\"\n slot=\"canvasContent\"\n aria-hidden={`${!this.drawerOpen}`}\n >\n <slot\n name=\"menu\"\n onSlotchange={this.collectMenuElements}\n ></slot>\n </div>\n </z-offcanvas>\n\n {this._stuck && (\n <div class=\"heading-stuck\">\n <div class=\"heading-stuck-content\">\n {this.menuLength > 0 && (\n <button\n class=\"drawer-trigger\"\n aria-label=\"Apri menu\"\n onClick={this.openDrawer}\n >\n <z-icon name=\"burger-menu\"></z-icon>\n </button>\n )}\n\n <div class=\"heading-title\">\n <slot name=\"stucked-title\">{this.title}</slot>\n </div>\n\n {this.renderSearchLinkButton()}\n {this.canShowSearchbar && this.currentViewport === \"desktop\" && this.renderSeachbar(false)}\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-app-header/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AACrH,OAAO,EAAC,aAAa,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAC,MAAM,aAAa,CAAC;AACpH,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAE5C,MAAM,6BAA6B,GAAG,OAAO,oBAAoB,KAAK,WAAW,CAAC;AAElF;;;;;;;;;;;GAWG;AAMH,MAAM,OAAO,UAAU;IAyGrB;QAbQ,iBAAY,GAAG,CAAC,CAAC,CAAC;QAElB,aAAQ,GACd,6BAA6B;YAC7B,IAAI,oBAAoB,CACtB,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE;gBACV,IAAI,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC;YACtC,CAAC,EACD;gBACE,SAAS,EAAE,GAAG;aACf,CACF,CAAC;qBA/FI,KAAK;+BAMK,KAAK;4BAMR,KAAK;iCAMA,OAAO;4BAMZ,EAAE;;2BAcH,IAAI;sBAMD,KAAK;+BAOY,MAAM,CAAC,MAAM;;0BAkB1B,KAAK;QA6BxB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAChE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B,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,eAAe,KAAK,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,cAAc,EAAE,CACjF;oBACL,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,eAAe,KAAK,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,cAAc,EAAE,CACjF;gBAEL,IAAI,CAAC,WAAW,IAAI,CACnB,4DACE,KAAK,EAAC,gBAAgB,EACtB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;wBACb,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;4BACzB,OAAO;wBACT,CAAC;wBAED,IAAI,IAAI,CAAC,YAAY,KAAK,CAAC,CAAC,EAAE,CAAC;4BAC7B,IAAI,CAAC,oBAAoB,EAAE,CAAC;wBAC9B,CAAC;6BAAM,CAAC;4BACN,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;wBAC1B,CAAC;oBACH,CAAC,EACD,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC;oBAEX,6DACE,IAAI,EAAC,MAAM,EACX,YAAY,EAAE,IAAI,CAAC,mBAAmB,GAChC,CACJ,CACP,CACG;YAEL,IAAI,CAAC,eAAe,EAAE;YAEtB,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,EAAE,CAC7B,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Event, EventEmitter, Fragment, Host, Listen, Prop, State, Watch, h} from \"@stencil/core\";\nimport {ButtonVariant, ControlSize, Device, KeyboardCode, OffCanvasVariant, TransitionDirection} from \"../../beans\";\nimport {getDevice} from \"../../utils/utils\";\n\nconst SUPPORT_INTERSECTION_OBSERVER = typeof IntersectionObserver !== \"undefined\";\n\n/**\n * @slot title - Slot for the main title\n * @slot top-subtitle - Slot for the top subtitle. It will not appear in stuck header.\n * @slot stucked-title - Title for the stuck header. By default it uses the text from the `title` slot.\n * @slot product-logo - To insert the product logo, it should be used with an img tag.\n * @cssprop --app-header-content-max-width - Use it to set header's content max width. Useful when the project use a fixed width layout. Defaults to `100%`.\n * @cssprop --app-header-top-offset - Top offset for the stuck header. Useful when there are other fixed elements above the header. Defaults to `48px` (the height of the main topbar).\n * @cssprop --app-header-drawer-trigger-size - The size of the drawer icon. Defaults to `--space-unit * 4`.\n * @cssprop --app-header-bg - Header background color. Defaults to `--color-surface01`.\n * @cssprop --app-header-stucked-bg - Stuck header background color. Defaults to `--color-surface01`.\n * @cssprop --app-header-stucked-text-color - Stuck header text color. Defaults to `--color-default-text`.\n */\n@Component({\n tag: \"z-app-header\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZAppHeader {\n @Element() hostElement: HTMLZAppHeaderElement;\n\n /**\n * Stuck mode for the header.\n * You can programmatically set it using an IntersectionObserver.\n */\n @Prop({reflect: true})\n stuck = false;\n\n /**\n * the menu bar is not displayed and a burger icon appears to open the offcanvas menu\n */\n @Prop({reflect: true, mutable: true})\n enableOffcanvas = false;\n\n /**\n * Enable the search bar.\n */\n @Prop({reflect: true})\n enableSearch = false;\n\n /**\n * Placeholder text for the search bar.\n */\n @Prop()\n searchPlaceholder = \"Cerca\";\n\n /**\n * Search string for the search bar.\n */\n @Prop({mutable: true})\n searchString = \"\";\n\n /**\n * Url to the search page.\n * Set this prop and `enableSearch` to show a link-button on mobile and tablet viewports, instead of the normal searchbar.\n * The link will also appear on the sticky header.\n */\n @Prop()\n searchPageUrl: string;\n\n /**\n * Enable laZ logo.\n */\n @Prop({reflect: true})\n enableZLogo = true;\n\n /**\n * The stuck state of the bar.\n */\n @State()\n private _stuck = false;\n\n /**\n * Current viewport.\n * Used to change the aspect of the search button (icon only) on mobile and tablet.\n */\n @State()\n private currentViewport: Device = Device.MOBILE;\n\n /**\n * Current count of menu items.\n */\n @State()\n menuLength: number;\n\n /**\n * Emitted when the `stuck` state of the header changes\n */\n @Event()\n sticking: EventEmitter;\n\n /**\n * The opening state of the drawer.\n */\n @State()\n private drawerOpen = false;\n\n private container?: HTMLDivElement;\n\n private menuElements?: NodeListOf<HTMLZMenuElement>;\n\n private closeMenuButton: HTMLButtonElement;\n\n private burgerButton: HTMLButtonElement;\n\n private searchbar: HTMLZSearchbarElement;\n\n /** Observer when the size of the element container changes */\n private resizeObserver: ResizeObserver;\n\n private currentIndex = -1;\n\n private observer?: IntersectionObserver =\n SUPPORT_INTERSECTION_OBSERVER &&\n new IntersectionObserver(\n ([entry]) => {\n this._stuck = !entry.isIntersecting;\n },\n {\n threshold: 0.5,\n }\n );\n\n constructor() {\n this.openDrawer = this.openDrawer.bind(this);\n this.closeDrawer = this.closeDrawer.bind(this);\n this.collectMenuElements = this.collectMenuElements.bind(this);\n }\n\n @Listen(\"resize\", {target: \"window\", passive: true})\n evaluateViewport(): void {\n this.currentViewport = getDevice();\n }\n\n @Listen(\"keydown\")\n handleKeyDown(e: KeyboardEvent): void {\n if (e.code === KeyboardCode.ESC && this.drawerOpen) {\n this.closeDrawer();\n\n return;\n }\n this.handleArrowsNav(e);\n }\n\n private handleArrowsNav(e: KeyboardEvent): void {\n if (e.code !== KeyboardCode.ARROW_DOWN && e.code !== KeyboardCode.ARROW_UP && this.enableOffcanvas) {\n return;\n }\n\n if (document.activeElement.slot === \"item\") {\n return;\n }\n\n const menuItems = Array.from(this.menuElements).map(\n (el) => el.shadowRoot.querySelector(\".menu-label\") as HTMLElement\n );\n\n let nextFocusableItem: HTMLElement;\n if (this.enableOffcanvas || this._stuck) {\n // INFO: reset focus on all menu items\n menuItems.forEach((item: HTMLElement) => item.setAttribute(\"tabindex\", \"-1\"));\n e.preventDefault();\n e.stopPropagation();\n if (e.code === KeyboardCode.ARROW_DOWN) {\n nextFocusableItem = this.getNextItem(menuItems, 1);\n } else if (e.code === KeyboardCode.ARROW_UP) {\n nextFocusableItem = this.getNextItem(menuItems, -1);\n }\n } else {\n if (e.code === KeyboardCode.ARROW_DOWN || e.code === KeyboardCode.ARROW_UP) {\n e.preventDefault();\n\n return;\n }\n //INFO: reset focus on all menu items\n menuItems.forEach((item: HTMLElement) => item.setAttribute(\"tabindex\", \"-1\"));\n if (e.code === KeyboardCode.ARROW_RIGHT) {\n nextFocusableItem = this.getNextItem(menuItems, 1);\n } else if (e.code === KeyboardCode.ARROW_LEFT) {\n nextFocusableItem = this.getNextItem(menuItems, -1);\n }\n }\n if (nextFocusableItem) {\n nextFocusableItem.setAttribute(\"tabindex\", \"0\");\n nextFocusableItem.focus();\n }\n }\n\n private getNextItem(menuItems: HTMLElement[], direction: number): HTMLElement {\n if (this.currentIndex === -1) {\n this.currentIndex = direction === 1 ? 0 : menuItems.length - 1;\n\n return menuItems[this.currentIndex];\n }\n\n this.currentIndex = (this.currentIndex + direction + menuItems.length) % menuItems.length;\n\n return menuItems[this.currentIndex];\n }\n\n @Watch(\"_stuck\")\n onStuck(): void {\n const scrollParent = this.scrollParent;\n if (!scrollParent) {\n return;\n }\n\n this.sticking.emit(this._stuck);\n }\n\n @Watch(\"drawerOpen\")\n setMenuFloatingMode(): void {\n if (this.menuElements.length === 0) {\n return;\n }\n\n this.menuElements.forEach((element) => {\n element.open = false;\n element.floating = !this.drawerOpen;\n element.verticalContext = this.drawerOpen;\n element.setAttribute(\"role\", \"menuitem\");\n element.setAttribute(\"tabindex\", \"-1\");\n });\n }\n\n @Watch(\"stuck\")\n onStuckMode(): void {\n if (this.stuck) {\n this.enableStuckObserver();\n } else {\n this.disableStuckMode();\n }\n }\n\n private enableStuckObserver(): void {\n if (this.observer) {\n this.observer.observe(this.container);\n }\n }\n\n private disableStuckMode(): void {\n this._stuck = false;\n if (this.observer) {\n this.observer.unobserve(this.container);\n }\n }\n\n private get title(): string {\n const titleElement = this.hostElement.querySelector('[slot=\"title\"]');\n if (titleElement === null) {\n return \"\";\n }\n\n return titleElement.textContent.trim();\n }\n\n private get scrollParent(): Window | Element {\n const parent = this.hostElement.offsetParent;\n if (parent === document.body || parent === document.documentElement) {\n return window;\n }\n\n return parent;\n }\n\n private get canShowMenu(): boolean {\n return (\n !this.enableOffcanvas &&\n this.menuElements.length > 0 &&\n this.currentViewport !== Device.MOBILE &&\n !this.drawerOpen\n );\n }\n\n private openDrawer(): void {\n this.drawerOpen = true;\n }\n\n private closeDrawer(): void {\n this.drawerOpen = false;\n this.burgerButton.focus();\n this.currentIndex = -1;\n }\n\n private collectMenuElements(): void {\n const menuElements = (this.menuElements = this.hostElement.querySelectorAll('[slot=\"menu\"]'));\n this.menuLength = menuElements.length;\n this.setMenuFloatingMode();\n }\n\n private isSlotPresent(slotName: string): boolean {\n const slot = this.hostElement.querySelector(`[slot=\"${slotName}\"]`);\n\n return !!slot;\n }\n\n private renderSeachbar(): HTMLZSearchbarElement | HTMLZButtonElement {\n const renderSearch =\n this.currentViewport === Device.MOBILE || this.currentViewport === Device.TABLET ? true : false;\n\n if (this.currentViewport === Device.MOBILE && !this.searchPageUrl && this._stuck) {\n return;\n }\n\n if (this.searchPageUrl && (this.currentViewport === Device.MOBILE || this.currentViewport === Device.TABLET)) {\n return (\n <z-button\n class=\"search-page-button\"\n variant={ButtonVariant.SECONDARY}\n href={this.searchPageUrl}\n icon=\"search\"\n size={ControlSize.X_SMALL}\n ></z-button>\n );\n }\n\n return (\n <z-searchbar\n ref={(el) => (this.searchbar = el as HTMLZSearchbarElement)}\n value={this.searchString}\n placeholder={this.searchPlaceholder}\n showSearchButton={true}\n searchButtonIconOnly={renderSearch}\n size={ControlSize.X_SMALL}\n variant={ButtonVariant.SECONDARY}\n preventSubmit={this.searchString.length < 3}\n onSearchTyping={(e) => (this.searchString = e.detail)}\n onKeyDown={(e) => {\n if (e.code === KeyboardCode.ARROW_RIGHT || e.code === KeyboardCode.ARROW_LEFT) {\n e.stopPropagation();\n }\n }}\n />\n );\n }\n\n private renderProductLogos(): HTMLElement | null {\n return (\n <Fragment>\n {this.enableZLogo && (\n <img\n class=\"z-logo\"\n alt=\"Logo Zanichelli\"\n />\n )}\n {this.currentViewport !== Device.MOBILE && <slot name=\"product-logo\"></slot>}\n </Fragment>\n );\n }\n\n private renderMenuButton(): HTMLButtonElement {\n return (\n this.menuLength > 0 &&\n (this.enableOffcanvas || this._stuck || this.currentViewport === Device.MOBILE) && (\n <button\n ref={(el) => (this.burgerButton = el as HTMLButtonElement)}\n aria-label=\"Apri menu\"\n aria-haspopup=\"menu\"\n aria-expanded={`${this.drawerOpen}`}\n aria-controls=\"menu-offcanvas\"\n class=\"drawer-trigger\"\n onClick={this.openDrawer}\n onKeyUp={(ev: KeyboardEvent) => {\n if (ev.code === KeyboardCode.ENTER || ev.code === KeyboardCode.SPACE) {\n this.closeMenuButton.focus();\n }\n }}\n >\n <z-icon name=\"burger-menu\"></z-icon>\n </button>\n )\n );\n }\n\n private renderOffcanvas(): HTMLZOffcanvasElement {\n return (\n <z-offcanvas\n variant={OffCanvasVariant.OVERLAY}\n transitiondirection={TransitionDirection.RIGHT}\n open={this.drawerOpen}\n onCanvasOpenStatusChanged={(ev) => (this.drawerOpen = ev.detail)}\n >\n <div slot=\"canvasContent\">\n <button\n ref={(el) => (this.closeMenuButton = el as HTMLButtonElement)}\n class=\"drawer-close\"\n aria-label=\"Chiudi menu\"\n onClick={this.closeDrawer}\n aria-hidden={`${!this.drawerOpen}`}\n disabled={!this.drawerOpen}\n >\n <z-icon name=\"close\"></z-icon>\n </button>\n\n <div\n class=\"drawer-content\"\n aria-hidden={`${!this.drawerOpen}`}\n >\n <slot\n name=\"menu\"\n onSlotchange={this.collectMenuElements}\n ></slot>\n </div>\n </div>\n </z-offcanvas>\n );\n }\n\n private renderStuck(): HTMLElement {\n return (\n <div class=\"heading-stuck\">\n <div class=\"heading-stuck-content\">\n {this.renderMenuButton()}\n <div class=\"heading-title\">\n {this.renderProductLogos()}\n <slot name=\"stucked-title\">{this.title}</slot>\n </div>\n {this.enableSearch && this.renderSeachbar()}\n </div>\n </div>\n );\n }\n\n private getWidthMenu(): number {\n if (this.menuElements.length === 0) {\n return;\n }\n\n return Array.from(this.menuElements).reduce((acc, item) => item.getBoundingClientRect().width + acc, 100);\n }\n\n private focusToFirstItemMenu(): void {\n const menuItems = Array.from(this.menuElements).map(\n (el) => el.shadowRoot.querySelector(\".menu-label\") as HTMLElement\n );\n\n menuItems[0].focus();\n this.currentIndex = 0;\n }\n\n private handleFocusItem(e): void {\n const menuItems = Array.from(this.menuElements).map(\n (el) => el.shadowRoot.querySelector(\".menu-label\") as HTMLElement\n );\n\n if (\n e.code === KeyboardCode.ARROW_DOWN ||\n e.code === KeyboardCode.ARROW_UP ||\n e.code === KeyboardCode.ENTER ||\n e.code === KeyboardCode.TAB\n ) {\n return;\n }\n\n if (document.activeElement.tagName === \"Z-MENU-SECTION\" || document.activeElement.tagName === \"Z-MENU\") {\n return;\n }\n\n if (this.enableSearch && this.currentIndex === 0) {\n const input = this.searchbar.shadowRoot.querySelector(\"z-input input\") as HTMLInputElement;\n input.focus();\n this.currentIndex = -1;\n }\n\n if (this.currentIndex !== -1) {\n menuItems[this.currentIndex].focus();\n }\n }\n\n componentWillLoad(): void {\n this.collectMenuElements();\n this.evaluateViewport();\n }\n\n componentDidLoad(): void {\n this.onStuckMode();\n\n if (this.enableOffcanvas) {\n return;\n }\n\n const menuWidth = this.getWidthMenu();\n const containerSidePadding = 50;\n this.resizeObserver = new ResizeObserver((observer) => {\n const containerWidth = observer[0].contentRect.width;\n if (this.currentViewport === Device.MOBILE) {\n return (this.enableOffcanvas = true);\n }\n\n if (menuWidth > containerWidth - containerSidePadding && !this.enableOffcanvas) {\n this.enableOffcanvas = true;\n } else if (menuWidth <= containerWidth - containerSidePadding && this.enableOffcanvas) {\n this.enableOffcanvas = false;\n }\n });\n\n this.resizeObserver.observe(this.container);\n }\n\n disconnectedCallback(): void {\n this.resizeObserver?.disconnect();\n }\n\n render(): HTMLZAppHeaderElement {\n const hasTopSubtitle = this.isSlotPresent(\"top-subtitle\");\n\n return (\n <Host menu-length={this.menuLength}>\n <div\n class={`heading-panel ${this.menuLength > 0 && !this.enableOffcanvas ? \"has-menu\" : \"\"}`}\n ref={(el) => (this.container = el)}\n >\n <div class=\"heading-container\">\n {((!this.enableSearch && this.currentViewport === Device.MOBILE) ||\n this.currentViewport !== Device.MOBILE) && (\n <div class={`${this.enableOffcanvas ? \"p-left\" : \"\"}`}>\n <slot name=\"top-subtitle\"></slot>\n </div>\n )}\n <div class=\"heading-title\">\n {this.renderMenuButton()}\n {!hasTopSubtitle && !this._stuck && this.renderProductLogos()}\n <slot name=\"title\"></slot>\n {this.enableSearch && this.currentViewport !== Device.MOBILE && this.renderSeachbar()}\n </div>\n {this.enableSearch && this.currentViewport === Device.MOBILE && this.renderSeachbar()}\n </div>\n\n {this.canShowMenu && (\n <div\n class=\"menu-container\"\n onKeyUp={(e) => {\n if (this.enableOffcanvas) {\n return;\n }\n\n if (this.currentIndex === -1) {\n this.focusToFirstItemMenu();\n } else {\n this.handleFocusItem(e);\n }\n }}\n role=\"hidden\"\n tabIndex={0}\n >\n <slot\n name=\"menu\"\n onSlotchange={this.collectMenuElements}\n ></slot>\n </div>\n )}\n </div>\n\n {this.renderOffcanvas()}\n\n {this._stuck && this.renderStuck()}\n </Host>\n );\n }\n}\n"]}