@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
@@ -17,7 +17,7 @@ export class ZInputMessage {
17
17
  this.onMessageChange();
18
18
  }
19
19
  render() {
20
- return (h(Host, Object.assign({ key: '94ef5066088cb9eed13a07ea360427f99504352c' }, this.statusRole, { "aria-label": this.message }), this.statusIcons[this.status] && this.message && h("z-icon", { key: '657b2370b4f114a60d57d0aeb0c42076a0a6d05c', name: this.statusIcons[this.status] }), h("span", { key: 'e999e55f209f358943ff20d86967f9e7bd9d876b', innerHTML: this.message })));
20
+ return (h(Host, Object.assign({ key: 'ab7d91f7f574f9fb29ab684cae2de0c0dd64f580' }, this.statusRole, { "aria-label": this.message }), this.statusIcons[this.status] && this.message && h("z-icon", { key: '592524f507e1d6cefb43815648880507e10806f2', name: this.statusIcons[this.status] }), h("span", { key: '96ca6506cfaa10d936543d9f370bcb58fa318b59', innerHTML: this.message })));
21
21
  }
22
22
  static get is() { return "z-input-message"; }
23
23
  static get encapsulation() { return "shadow"; }
@@ -16,7 +16,7 @@ export class ZLogo {
16
16
  if (this.height) {
17
17
  style["height"] = style["max-height"] = `${this.height}px`;
18
18
  }
19
- return (h(Host, { key: '2faf5f56df6dbfff397a42f15f18b496e407da11', style: style, class: { mobile: !!this.mobileLogo } }, this.link ? (h("a", { href: this.link, target: this.targetBlank ? "_blank" : "_self" }, h("img", { alt: this.imageAlt }))) : (h("img", { alt: this.imageAlt }))));
19
+ return (h(Host, { key: 'ed2dc5272d8e229b9d329b5425611ee504286a75', style: style, class: { mobile: !!this.mobileLogo } }, this.link ? (h("a", { href: this.link, target: this.targetBlank ? "_blank" : "_self" }, h("img", { alt: this.imageAlt }))) : (h("img", { alt: this.imageAlt }))));
20
20
  }
21
21
  static get is() { return "z-logo"; }
22
22
  static get encapsulation() { return "shadow"; }
@@ -1,4 +1,5 @@
1
1
  import { Host, h } from "@stencil/core";
2
+ import { KeyboardCode } from "../../beans";
2
3
  /**
3
4
  * @slot - Menu label
4
5
  * @slot header - Header to display as the first entry of the open menu.
@@ -22,6 +23,103 @@ export class ZMenu {
22
23
  this.open = false;
23
24
  this.closed.emit();
24
25
  }
26
+ canvasOpenStatusChanged(e) {
27
+ this.currentCanvasOpenStatus = e.detail;
28
+ }
29
+ handleKeyDown(e) {
30
+ if (e.code === KeyboardCode.ENTER) {
31
+ return;
32
+ }
33
+ if (this.open && !this.currentCanvasOpenStatus) {
34
+ this.handleNavigationSideArrow(e);
35
+ }
36
+ this.handleArrowsNav(e);
37
+ }
38
+ handleNavigationSideArrow(e) {
39
+ if (e.code !== KeyboardCode.ARROW_RIGHT && e.code !== KeyboardCode.ARROW_LEFT) {
40
+ return;
41
+ }
42
+ if (e.code === KeyboardCode.ARROW_RIGHT) {
43
+ const nextElement = this.hostElement.nextElementSibling;
44
+ if (!nextElement) {
45
+ const firstMenuItem = this.firstElMenu.shadowRoot.querySelector(".menu-label");
46
+ firstMenuItem.focus();
47
+ this.open = false;
48
+ }
49
+ if (nextElement && nextElement.tagName === "Z-MENU") {
50
+ const menuButton = nextElement.shadowRoot.querySelector(".menu-label");
51
+ menuButton.focus();
52
+ if (nextElement.children.length > 1) {
53
+ nextElement.setAttribute("open", "true");
54
+ }
55
+ this.open = false;
56
+ }
57
+ }
58
+ else if (e.code === KeyboardCode.ARROW_LEFT) {
59
+ const prevElement = this.hostElement.previousElementSibling;
60
+ if (prevElement.tagName !== "Z-MENU") {
61
+ const lastElMenuItem = this.lastElMenu.shadowRoot.querySelector(".menu-label");
62
+ lastElMenuItem.focus();
63
+ this.open = false;
64
+ }
65
+ if (prevElement && prevElement.tagName === "Z-MENU") {
66
+ const menuButton = prevElement.shadowRoot.querySelector(".menu-label");
67
+ menuButton.focus();
68
+ if (prevElement.children.length > 1) {
69
+ prevElement.setAttribute("open", "true");
70
+ }
71
+ this.open = false;
72
+ }
73
+ }
74
+ }
75
+ handleArrowsNav(e) {
76
+ const menuItems = Array.from(this.hostElement.querySelectorAll("[slot='item']"));
77
+ const newMenuItems = menuItems.map((el) => {
78
+ if (el.tagName === "Z-MENU-SECTION") {
79
+ return el.shadowRoot.querySelector("button");
80
+ }
81
+ return el;
82
+ });
83
+ if (this.open) {
84
+ e.preventDefault();
85
+ e.stopPropagation();
86
+ if (e.code === KeyboardCode.ARROW_DOWN || e.code === KeyboardCode.ARROW_UP) {
87
+ let nextFocusableItem;
88
+ // INFO: reset focus on all menu items
89
+ newMenuItems.forEach((item) => item.setAttribute("tabindex", "-1"));
90
+ if (e.code === KeyboardCode.ARROW_DOWN) {
91
+ nextFocusableItem = this.getNextItem(newMenuItems, 1);
92
+ }
93
+ else if (e.code === KeyboardCode.ARROW_UP) {
94
+ nextFocusableItem = this.getNextItem(newMenuItems, -1);
95
+ }
96
+ if (nextFocusableItem) {
97
+ nextFocusableItem.setAttribute("tabindex", "0");
98
+ nextFocusableItem.focus();
99
+ }
100
+ }
101
+ else if (e.code === KeyboardCode.ESC) {
102
+ this.focusToParentAndCloseMenu();
103
+ }
104
+ else if (e.shiftKey && e.code === KeyboardCode.TAB) {
105
+ this.focusToParentAndCloseMenu();
106
+ }
107
+ }
108
+ }
109
+ getNextItem(menuItems, direction) {
110
+ if (this.currentIndex === -1) {
111
+ this.currentIndex = direction === 1 ? 0 : menuItems.length - 1;
112
+ return menuItems[this.currentIndex];
113
+ }
114
+ this.currentIndex = (this.currentIndex + direction + menuItems.length) % menuItems.length;
115
+ return menuItems[this.currentIndex];
116
+ }
117
+ focusToParentAndCloseMenu() {
118
+ const menuButton = this.hostElement.shadowRoot.querySelector(".menu-label");
119
+ menuButton.focus();
120
+ this.currentIndex = -1;
121
+ this.open = false;
122
+ }
25
123
  onOpenChanged() {
26
124
  if (this.open) {
27
125
  this.reflow(true);
@@ -31,8 +129,10 @@ export class ZMenu {
31
129
  }
32
130
  }
33
131
  constructor() {
132
+ this.currentIndex = -1;
133
+ this.currentCanvasOpenStatus = false;
34
134
  this.active = undefined;
35
- this.floating = false;
135
+ this.floating = true;
36
136
  this.open = false;
37
137
  this.verticalContext = false;
38
138
  this.hasHeader = undefined;
@@ -43,6 +143,9 @@ export class ZMenu {
43
143
  this.onItemsChange = this.onItemsChange.bind(this);
44
144
  }
45
145
  componentWillLoad() {
146
+ const menuItems = Array.from(this.hostElement.parentElement.querySelectorAll('[slot="menu"]'));
147
+ this.firstElMenu = menuItems[0];
148
+ this.lastElMenu = menuItems[menuItems.length - 1];
46
149
  this.checkContent();
47
150
  }
48
151
  /**
@@ -86,17 +189,25 @@ export class ZMenu {
86
189
  const items = this.hostElement.querySelectorAll("[slot=item]");
87
190
  items.forEach((item) => {
88
191
  item.setAttribute("role", "menuitem");
192
+ item.setAttribute("tabindex", "-1");
89
193
  item.dataset.text = item.textContent;
90
194
  });
91
195
  }
196
+ focusFirstItemOnKeyUp() {
197
+ const firstElement = this.hostElement.querySelectorAll("[slot='item']")[0];
198
+ if (firstElement) {
199
+ firstElement.focus();
200
+ this.currentIndex = 0;
201
+ }
202
+ }
92
203
  renderMenuLabel() {
93
204
  if (this.hasContent) {
94
- return (h("button", { class: "menu-label", "aria-expanded": this.open ? "true" : "false", "aria-label": this.open ? "Chiudi menù" : "Apri menù", onClick: this.toggle }, h("div", { class: "menu-label-content" }, h("slot", { onSlotchange: this.onLabelSlotChange }), h("z-icon", { name: this.open ? "chevron-up" : "chevron-down" }))));
205
+ return (h("div", { class: "menu-wrapper" }, h("button", { class: "menu-label", "aria-expanded": this.open ? "true" : "false", "aria-label": this.open ? "Chiudi menù" : "Apri menù", onClick: this.toggle, onKeyUp: this.focusFirstItemOnKeyUp.bind(this) }, h("div", { class: "menu-label-content" }, h("slot", { onSlotchange: this.onLabelSlotChange }), h("z-icon", { name: this.open ? "chevron-up" : "chevron-down" })))));
95
206
  }
96
- return (h("div", { class: "menu-label" }, h("div", { class: "menu-label-content" }, h("slot", { onSlotchange: this.onLabelSlotChange }))));
207
+ return (h("div", { class: "menu-wrapper" }, h("div", { class: "menu-label" }, h("div", { class: "menu-label-content" }, h("slot", { onSlotchange: this.onLabelSlotChange })))));
97
208
  }
98
209
  render() {
99
- return (h(Host, { key: '675f13eb3d814743037d5e791afd82d8737ba57d' }, this.renderMenuLabel(), this.hasContent && (h("div", { key: '50ef2a4dbf031fa211bc818b7704d46acbe63446', class: "content", ref: (el) => (this.content = el) }, this.hasHeader && (h("header", { key: '9ed7520b00334a598c7664e0ccb1c4f8bfe3b858', class: "header" }, h("slot", { key: '6a41d2d5802d54bf192fd7f03586df1c933a7877', name: "header", onSlotchange: this.checkContent }))), h("div", { key: '7aa4c1c061559caac915866d1ae2acfe02dc3a8a', class: "items", role: "menu" }, h("slot", { key: '8494b984ad295b61d2cad61a25571220e74b8dff', name: "item", onSlotchange: this.onItemsChange }))))));
210
+ return (h(Host, { key: 'e2ab0535d927c4ef1dbaf75746a1e7ee1a87858a' }, this.renderMenuLabel(), this.hasContent && (h("div", { key: '3f0a5da5e77bd229ff0ee232afbbf0273d4245cf', class: "content", ref: (el) => (this.content = el) }, this.hasHeader && (h("header", { key: '4264de0204704ad5f16cb1b0617532220ab121fb', class: "header" }, h("slot", { key: '6b88411ff1c87fa1d12f2e6dedcec19605921df9', name: "header", onSlotchange: this.checkContent }))), h("div", { key: '4fab11ecc9b79b5b95d3238da7f25b05b6e36ec9', class: "items", role: "menu" }, h("slot", { key: '42d1e2006d0588e337a5cb9df4688081e128c9f9', name: "item", onSlotchange: this.onItemsChange }))))));
100
211
  }
101
212
  static get is() { return "z-menu"; }
102
213
  static get encapsulation() { return "shadow"; }
@@ -145,7 +256,7 @@ export class ZMenu {
145
256
  },
146
257
  "attribute": "floating",
147
258
  "reflect": true,
148
- "defaultValue": "false"
259
+ "defaultValue": "true"
149
260
  },
150
261
  "open": {
151
262
  "type": "boolean",
@@ -238,6 +349,18 @@ export class ZMenu {
238
349
  "target": "document",
239
350
  "capture": false,
240
351
  "passive": false
352
+ }, {
353
+ "name": "canvasOpenStatusChanged",
354
+ "method": "canvasOpenStatusChanged",
355
+ "target": "document",
356
+ "capture": false,
357
+ "passive": false
358
+ }, {
359
+ "name": "keydown",
360
+ "method": "handleKeyDown",
361
+ "target": undefined,
362
+ "capture": false,
363
+ "passive": false
241
364
  }];
242
365
  }
243
366
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-menu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAE3G;;;;;GA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O,CACL,EAAC,IAAI;YACF,IAAI,CAAC,eAAe,EAAE;YAEtB,IAAI,CAAC,UAAU,IAAI,CAClB,4DACE,KAAK,EAAC,SAAS,EACf,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;gBAE/B,IAAI,CAAC,SAAS,IAAI,CACjB,+DAAQ,KAAK,EAAC,QAAQ;oBACpB,6DACE,IAAI,EAAC,QAAQ,EACb,YAAY,EAAE,IAAI,CAAC,YAAY,GACzB,CACD,CACV;gBAED,4DACE,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,MAAM;oBAEX,6DACE,IAAI,EAAC,MAAM,EACX,YAAY,EAAE,IAAI,CAAC,aAAa,GAC1B,CACJ,CACF,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h} from \"@stencil/core\";\n\n/**\n * @slot - Menu label\n * @slot header - Header to display as the first entry of the open menu.\n * @slot item - Single entry of the section. Can be slotted multiple times to insert items onto the menu. Use `z-menu-section` for submenus.\n * @cssprop --z-menu-label-color - Color of the label's text.\n */\n@Component({\n tag: \"z-menu\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZMenu {\n @Element() hostElement: HTMLZMenuElement;\n\n /** Flag to set the active status of the menu. */\n @Prop({reflect: true})\n active?: boolean;\n\n /**\n * Flag to set the display mode of the list.\n * If true, the list will be absolutely positioned under the menu label,\n * stacked beneath it otherwise.\n */\n @Prop({reflect: true})\n floating? = false;\n\n /** The opening state of the menu. */\n @Prop({mutable: true, reflect: true})\n open = false;\n\n /**\n * Tells the component that it's placed in a vertical context with other `ZMenu`s (e.g. in the ZAppHeader's offcanvas).\n * A small border is placed under it as a separator from other elements.\n */\n @Prop({reflect: true})\n verticalContext = false;\n\n @State()\n hasHeader: boolean;\n\n @State()\n hasContent: boolean;\n\n private content: HTMLElement;\n\n /** Animation frame request id. */\n private raf: number;\n\n /** The menu has been opened. */\n @Event()\n opened: EventEmitter;\n\n /** The menu has been closed. */\n @Event()\n closed: EventEmitter;\n\n private toggle(): void {\n if (!this.hasContent) {\n return;\n }\n\n this.open = !this.open;\n this.open ? this.opened.emit() : this.closed.emit();\n }\n\n /** Close the floating list when a click is performed outside of this Element. */\n @Listen(\"click\", {target: \"document\"})\n handleClick(ev: MouseEvent): void {\n if (!this.floating || !this.open || this.hostElement.contains(ev.target as Element)) {\n return;\n }\n\n this.reflow();\n this.open = false;\n this.closed.emit();\n }\n\n @Watch(\"open\")\n onOpenChanged(): void {\n if (this.open) {\n this.reflow(true);\n } else {\n cancelAnimationFrame(this.raf);\n }\n }\n\n constructor() {\n this.toggle = this.toggle.bind(this);\n this.checkContent = this.checkContent.bind(this);\n this.onLabelSlotChange = this.onLabelSlotChange.bind(this);\n this.onItemsChange = this.onItemsChange.bind(this);\n }\n\n componentWillLoad(): void {\n this.checkContent();\n }\n\n /**\n * Sets slotted item text as `data-text` attribute value, to let CSS use it through `attr()`.\n * @param ev Slotchange event\n */\n private onLabelSlotChange(ev: Event): void {\n const labelElement = (ev.target as HTMLSlotElement).assignedElements()[0] as HTMLElement;\n labelElement.dataset.text = labelElement?.textContent;\n }\n\n /**\n * Correctly set position of the floating menu in order to prevent overflow.\n * @param live Should run the method on every refresh frame.\n */\n private reflow(live = false): void {\n if (this.content) {\n const {style} = this.content;\n const {left} = this.hostElement.getBoundingClientRect();\n const widthPx = getComputedStyle(this.content).width;\n const width = widthPx ? parseFloat(widthPx.replace(\"px\", \"\")) : 375;\n const safeScrollbarSpace = 30;\n style.left = `${Math.min(window.innerWidth - left - width - safeScrollbarSpace, 0)}px`;\n }\n if (live) {\n this.raf = requestAnimationFrame(this.reflow.bind(this, live));\n }\n }\n\n /**\n * Check if some content slot is set.\n */\n private checkContent(): void {\n this.hasHeader = !!this.hostElement.querySelectorAll(\"[slot=header]\").length;\n this.hasContent = !!this.hostElement.querySelectorAll(\"[slot=item]\").length || this.hasHeader;\n }\n\n /**\n * Set `menuitem` role to all menu items.\n * Set the item's inner text to the `data-text` attribute (this is for using bold text avoiding layout shifts).\n */\n private onItemsChange(): void {\n this.checkContent();\n const items = this.hostElement.querySelectorAll<HTMLElement>(\"[slot=item]\");\n items.forEach((item) => {\n item.setAttribute(\"role\", \"menuitem\");\n item.dataset.text = item.textContent;\n });\n }\n\n private renderMenuLabel(): HTMLButtonElement | HTMLDivElement {\n if (this.hasContent) {\n return (\n <button\n class=\"menu-label\"\n aria-expanded={this.open ? \"true\" : \"false\"}\n aria-label={this.open ? \"Chiudi menù\" : \"Apri menù\"}\n onClick={this.toggle}\n >\n <div class=\"menu-label-content\">\n <slot onSlotchange={this.onLabelSlotChange}></slot>\n <z-icon name={this.open ? \"chevron-up\" : \"chevron-down\"} />\n </div>\n </button>\n );\n }\n\n return (\n <div class=\"menu-label\">\n <div class=\"menu-label-content\">\n <slot onSlotchange={this.onLabelSlotChange}></slot>\n </div>\n </div>\n );\n }\n\n render(): HTMLZMenuElement {\n return (\n <Host>\n {this.renderMenuLabel()}\n\n {this.hasContent && (\n <div\n class=\"content\"\n ref={(el) => (this.content = el)}\n >\n {this.hasHeader && (\n <header class=\"header\">\n <slot\n name=\"header\"\n onSlotchange={this.checkContent}\n ></slot>\n </header>\n )}\n\n <div\n class=\"items\"\n role=\"menu\"\n >\n <slot\n name=\"item\"\n onSlotchange={this.onItemsChange}\n ></slot>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-menu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM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,YAAY,EAAE,IAAI,CAAC,iBAAiB,GAAS;wBACnD,cAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc,GAAI,CACvD,CACC,CACL,CACP,CAAC;QACJ,CAAC;QAED,OAAO,CACL,WAAK,KAAK,EAAC,cAAc;YACvB,WAAK,KAAK,EAAC,YAAY;gBACrB,WAAK,KAAK,EAAC,oBAAoB;oBAC7B,YAAM,YAAY,EAAE,IAAI,CAAC,iBAAiB,GAAS,CAC/C,CACF,CACF,CACP,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACF,IAAI,CAAC,eAAe,EAAE;YAEtB,IAAI,CAAC,UAAU,IAAI,CAClB,4DACE,KAAK,EAAC,SAAS,EACf,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;gBAE/B,IAAI,CAAC,SAAS,IAAI,CACjB,+DAAQ,KAAK,EAAC,QAAQ;oBACpB,6DACE,IAAI,EAAC,QAAQ,EACb,YAAY,EAAE,IAAI,CAAC,YAAY,GACzB,CACD,CACV;gBAED,4DACE,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,MAAM;oBAEX,6DACE,IAAI,EAAC,MAAM,EACX,YAAY,EAAE,IAAI,CAAC,aAAa,GAC1B,CACJ,CACF,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h} from \"@stencil/core\";\nimport {KeyboardCode} from \"../../beans\";\n\n/**\n * @slot - Menu label\n * @slot header - Header to display as the first entry of the open menu.\n * @slot item - Single entry of the section. Can be slotted multiple times to insert items onto the menu. Use `z-menu-section` for submenus.\n * @cssprop --z-menu-label-color - Color of the label's text.\n */\n@Component({\n tag: \"z-menu\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZMenu {\n @Element() hostElement: HTMLZMenuElement;\n\n /** Flag to set the active status of the menu. */\n @Prop({reflect: true})\n active?: boolean;\n\n /**\n * Flag to set the display mode of the list.\n * If true, the list will be absolutely positioned under the menu label,\n * stacked beneath it otherwise.\n */\n @Prop({reflect: true})\n floating? = true;\n\n /** The opening state of the menu. */\n @Prop({mutable: true, reflect: true})\n open = false;\n\n /**\n * Tells the component that it's placed in a vertical context with other `ZMenu`s (e.g. in the ZAppHeader's offcanvas).\n * A small border is placed under it as a separator from other elements.\n */\n @Prop({reflect: true})\n verticalContext = false;\n\n @State()\n hasHeader: boolean;\n\n @State()\n hasContent: boolean;\n\n private content: HTMLElement;\n\n /** Animation frame request id. */\n private raf: number;\n\n /** The menu has been opened. */\n @Event()\n opened: EventEmitter;\n\n /** The menu has been closed. */\n @Event()\n closed: EventEmitter;\n\n private currentIndex = -1;\n\n private currentCanvasOpenStatus = false;\n\n private firstElMenu: HTMLMenuElement;\n\n private lastElMenu: HTMLMenuElement;\n\n private toggle(): void {\n if (!this.hasContent) {\n return;\n }\n\n this.open = !this.open;\n this.open ? this.opened.emit() : this.closed.emit();\n }\n\n /** Close the floating list when a click is performed outside of this Element. */\n @Listen(\"click\", {target: \"document\"})\n handleClick(ev: MouseEvent): void {\n if (!this.floating || !this.open || this.hostElement.contains(ev.target as Element)) {\n return;\n }\n\n this.reflow();\n this.open = false;\n this.closed.emit();\n }\n\n @Listen(\"canvasOpenStatusChanged\", {target: \"document\"})\n canvasOpenStatusChanged(e: CustomEvent): void {\n this.currentCanvasOpenStatus = e.detail;\n }\n\n @Listen(\"keydown\")\n handleKeyDown(e: KeyboardEvent): void {\n if (e.code === KeyboardCode.ENTER) {\n return;\n }\n\n if (this.open && !this.currentCanvasOpenStatus) {\n this.handleNavigationSideArrow(e);\n }\n\n this.handleArrowsNav(e);\n }\n\n private handleNavigationSideArrow(e: KeyboardEvent): void {\n if (e.code !== KeyboardCode.ARROW_RIGHT && e.code !== KeyboardCode.ARROW_LEFT) {\n return;\n }\n\n if (e.code === KeyboardCode.ARROW_RIGHT) {\n const nextElement = this.hostElement.nextElementSibling;\n\n if (!nextElement) {\n const firstMenuItem = this.firstElMenu.shadowRoot.querySelector(\".menu-label\") as HTMLElement;\n firstMenuItem.focus();\n this.open = false;\n }\n\n if (nextElement && nextElement.tagName === \"Z-MENU\") {\n const menuButton = nextElement.shadowRoot.querySelector(\".menu-label\") as HTMLElement;\n menuButton.focus();\n\n if (nextElement.children.length > 1) {\n nextElement.setAttribute(\"open\", \"true\");\n }\n this.open = false;\n }\n } else if (e.code === KeyboardCode.ARROW_LEFT) {\n const prevElement = this.hostElement.previousElementSibling;\n if (prevElement.tagName !== \"Z-MENU\") {\n const lastElMenuItem = this.lastElMenu.shadowRoot.querySelector(\".menu-label\") as HTMLElement;\n lastElMenuItem.focus();\n this.open = false;\n }\n if (prevElement && prevElement.tagName === \"Z-MENU\") {\n const menuButton = prevElement.shadowRoot.querySelector(\".menu-label\") as HTMLElement;\n menuButton.focus();\n if (prevElement.children.length > 1) {\n prevElement.setAttribute(\"open\", \"true\");\n }\n this.open = false;\n }\n }\n }\n\n private handleArrowsNav(e: KeyboardEvent): void {\n const menuItems = Array.from(this.hostElement.querySelectorAll(\"[slot='item']\")) as HTMLElement[];\n const newMenuItems = menuItems.map((el) => {\n if (el.tagName === \"Z-MENU-SECTION\") {\n return el.shadowRoot.querySelector(\"button\");\n }\n\n return el;\n });\n\n if (this.open) {\n e.preventDefault();\n e.stopPropagation();\n\n if (e.code === KeyboardCode.ARROW_DOWN || e.code === KeyboardCode.ARROW_UP) {\n let nextFocusableItem: HTMLElement;\n // INFO: reset focus on all menu items\n newMenuItems.forEach((item: HTMLElement) => item.setAttribute(\"tabindex\", \"-1\"));\n\n if (e.code === KeyboardCode.ARROW_DOWN) {\n nextFocusableItem = this.getNextItem(newMenuItems, 1);\n } else if (e.code === KeyboardCode.ARROW_UP) {\n nextFocusableItem = this.getNextItem(newMenuItems, -1);\n }\n\n if (nextFocusableItem) {\n nextFocusableItem.setAttribute(\"tabindex\", \"0\");\n nextFocusableItem.focus();\n }\n } else if (e.code === KeyboardCode.ESC) {\n this.focusToParentAndCloseMenu();\n } else if (e.shiftKey && e.code === KeyboardCode.TAB) {\n this.focusToParentAndCloseMenu();\n }\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 private focusToParentAndCloseMenu(): void {\n const menuButton = this.hostElement.shadowRoot.querySelector(\".menu-label\") as HTMLElement;\n menuButton.focus();\n this.currentIndex = -1;\n this.open = false;\n }\n\n @Watch(\"open\")\n onOpenChanged(): void {\n if (this.open) {\n this.reflow(true);\n } else {\n cancelAnimationFrame(this.raf);\n }\n }\n\n constructor() {\n this.toggle = this.toggle.bind(this);\n this.checkContent = this.checkContent.bind(this);\n this.onLabelSlotChange = this.onLabelSlotChange.bind(this);\n this.onItemsChange = this.onItemsChange.bind(this);\n }\n\n componentWillLoad(): void {\n const menuItems = Array.from(this.hostElement.parentElement.querySelectorAll('[slot=\"menu\"]'));\n this.firstElMenu = menuItems[0] as HTMLMenuElement;\n this.lastElMenu = menuItems[menuItems.length - 1] as HTMLMenuElement;\n\n this.checkContent();\n }\n\n /**\n * Sets slotted item text as `data-text` attribute value, to let CSS use it through `attr()`.\n * @param ev Slotchange event\n */\n private onLabelSlotChange(ev: Event): void {\n const labelElement = (ev.target as HTMLSlotElement).assignedElements()[0] as HTMLElement;\n labelElement.dataset.text = labelElement?.textContent;\n }\n\n /**\n * Correctly set position of the floating menu in order to prevent overflow.\n * @param live Should run the method on every refresh frame.\n */\n private reflow(live = false): void {\n if (this.content) {\n const {style} = this.content;\n const {left} = this.hostElement.getBoundingClientRect();\n const widthPx = getComputedStyle(this.content).width;\n const width = widthPx ? parseFloat(widthPx.replace(\"px\", \"\")) : 375;\n const safeScrollbarSpace = 30;\n style.left = `${Math.min(window.innerWidth - left - width - safeScrollbarSpace, 0)}px`;\n }\n if (live) {\n this.raf = requestAnimationFrame(this.reflow.bind(this, live));\n }\n }\n\n /**\n * Check if some content slot is set.\n */\n private checkContent(): void {\n this.hasHeader = !!this.hostElement.querySelectorAll(\"[slot=header]\").length;\n this.hasContent = !!this.hostElement.querySelectorAll(\"[slot=item]\").length || this.hasHeader;\n }\n\n /**\n * Set `menuitem` role to all menu items.\n * Set the item's inner text to the `data-text` attribute (this is for using bold text avoiding layout shifts).\n */\n private onItemsChange(): void {\n this.checkContent();\n const items = this.hostElement.querySelectorAll<HTMLElement>(\"[slot=item]\");\n items.forEach((item) => {\n item.setAttribute(\"role\", \"menuitem\");\n item.setAttribute(\"tabindex\", \"-1\");\n item.dataset.text = item.textContent;\n });\n }\n\n private focusFirstItemOnKeyUp(): void {\n const firstElement = this.hostElement.querySelectorAll(\"[slot='item']\")[0] as HTMLElement;\n if (firstElement) {\n firstElement.focus();\n this.currentIndex = 0;\n }\n }\n\n private renderMenuLabel(): HTMLButtonElement | HTMLDivElement {\n if (this.hasContent) {\n return (\n <div class=\"menu-wrapper\">\n <button\n class=\"menu-label\"\n aria-expanded={this.open ? \"true\" : \"false\"}\n aria-label={this.open ? \"Chiudi menù\" : \"Apri menù\"}\n onClick={this.toggle}\n onKeyUp={this.focusFirstItemOnKeyUp.bind(this)}\n >\n <div class=\"menu-label-content\">\n <slot onSlotchange={this.onLabelSlotChange}></slot>\n <z-icon name={this.open ? \"chevron-up\" : \"chevron-down\"} />\n </div>\n </button>\n </div>\n );\n }\n\n return (\n <div class=\"menu-wrapper\">\n <div class=\"menu-label\">\n <div class=\"menu-label-content\">\n <slot onSlotchange={this.onLabelSlotChange}></slot>\n </div>\n </div>\n </div>\n );\n }\n\n render(): HTMLZMenuElement {\n return (\n <Host>\n {this.renderMenuLabel()}\n\n {this.hasContent && (\n <div\n class=\"content\"\n ref={(el) => (this.content = el)}\n >\n {this.hasHeader && (\n <header class=\"header\">\n <slot\n name=\"header\"\n onSlotchange={this.checkContent}\n ></slot>\n </header>\n )}\n\n <div\n class=\"items\"\n role=\"menu\"\n >\n <slot\n name=\"item\"\n onSlotchange={this.onItemsChange}\n ></slot>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
@@ -10,15 +10,17 @@ describe("Suite test ZMenu", () => {
10
10
  </z-menu>`,
11
11
  });
12
12
  expect(page.root).toEqualHtml(`
13
- <z-menu role="menu">
14
- <mock:shadow-root>
13
+ <z-menu floating="" role="menu">
14
+ <mock:shadow-root>
15
+ <div class="menu-wrapper">
15
16
  <div class="menu-label">
16
17
  <div class="menu-label-content">
17
18
  <slot></slot>
18
19
  </div>
19
20
  </div>
20
- </mock:shadow-root>
21
- <h3>Menu label</h3>
21
+ </div>
22
+ </mock:shadow-root>
23
+ <h3>Menu label</h3>
22
24
  </z-menu>`);
23
25
  });
24
26
  it("Test render ZMenu with items", async () => {
@@ -32,14 +34,16 @@ describe("Suite test ZMenu", () => {
32
34
  </z-menu>`,
33
35
  });
34
36
  expect(page.root).toEqualHtml(`
35
- <z-menu role="menu">
37
+ <z-menu floating="" role="menu">
36
38
  <mock:shadow-root>
37
- <button aria-expanded="false" aria-label="Apri menù" class="menu-label">
38
- <div class="menu-label-content">
39
- <slot></slot>
40
- <z-icon name="chevron-down"></z-icon>
41
- </div>
42
- </button>
39
+ <div class="menu-wrapper">
40
+ <button aria-expanded="false" aria-label="Apri menù" class="menu-label">
41
+ <div class="menu-label-content">
42
+ <slot></slot>
43
+ <z-icon name="chevron-down"></z-icon>
44
+ </div>
45
+ </button>
46
+ </div>
43
47
  <div class="content">
44
48
  <div class="items" role="menu">
45
49
  <slot name="item"></slot>
@@ -55,44 +59,56 @@ describe("Suite test ZMenu", () => {
55
59
  it("Test render ZMenu with submenu", async () => {
56
60
  const page = await newSpecPage({
57
61
  components: [ZMenu, ZMenuSection],
58
- html: `<z-menu role="menu">
62
+ html: `<z-menu floating="" role="menu">
59
63
  <h3>Menu label</h3>
60
64
  <a href="#" slot="item">Item 1</a>
61
65
  <z-menu-section slot="item">
62
66
  <h3>Item 2</h2>
63
- <a href="#" slot="item">Item 2.1</a>
64
- <a href="#" slot="item">Item 2.2</a>
67
+ <a href="#" slot="section">Item 2.1</a>
68
+ <a href="#" slot="section">Item 2.2</a>
65
69
  </z-menu-section>
66
70
  </z-menu>`,
67
71
  });
68
72
  expect(page.root).toEqualHtml(`
69
- <z-menu role="menu">
70
- <mock:shadow-root>
73
+ <z-menu floating="" role="menu">
74
+ <mock:shadow-root>
75
+ <div class="menu-wrapper">
71
76
  <button aria-expanded="false" aria-label="Apri menù" class="menu-label">
72
77
  <div class="menu-label-content">
73
78
  <slot></slot>
74
79
  <z-icon name="chevron-down"></z-icon>
75
80
  </div>
76
81
  </button>
77
- <div class="content">
78
- <div class="items" role="menu">
79
- <slot name="item"></slot>
80
- </div>
82
+ </div>
83
+ <div class="content">
84
+ <div class="items" role="menu">
85
+ <slot name="item"></slot>
81
86
  </div>
87
+ </div>
88
+ </mock:shadow-root>
89
+ <h3>
90
+ Menu label
91
+ </h3>
92
+ <a href="#" slot="item">
93
+ Item 1
94
+ </a>
95
+ <z-menu-section role="menu" slot="item">
96
+ <mock:shadow-root>
97
+ <button aria-pressed="false" class="label">
98
+ <slot></slot>
99
+ <z-icon name="chevron-down"></z-icon>
100
+ </button>
82
101
  </mock:shadow-root>
83
- <h3>Menu label</h3>
84
- <a href="#" slot="item">Item 1</a>
85
- <z-menu-section role="menu" slot="item">
86
- <mock:shadow-root>
87
- <button aria-pressed="false" class="label">
88
- <slot></slot>
89
- <z-icon name="chevron-down"></z-icon>
90
- </button>
91
- </mock:shadow-root>
92
- <h3>Item 2</h3>
93
- <a href="#" slot="item">Item 2.1</a>
94
- <a href="#" slot="item">Item 2.2</a>
95
- </z-menu-section>
102
+ <h3>
103
+ Item 2
104
+ </h3>
105
+ <a href="#" slot="section">
106
+ Item 2.1
107
+ </a>
108
+ <a href="#" slot="section">
109
+ Item 2.2
110
+ </a>
111
+ </z-menu-section>
96
112
  </z-menu>`);
97
113
  });
98
114
  it("Test ZMenu toggle events", async () => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../../src/components/z-menu/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAC,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAE9B,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,8BAA8B,EAAE,KAAK,IAAI,EAAE;QAC5C,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,KAAK,CAAC;YACnB,IAAI,EAAE;;gBAEI;SACX,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;cAUpB,CAAC,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8BAA8B,EAAE,KAAK,IAAI,EAAE;QAC5C,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC;YACjC,IAAI,EAAE;;;;;gBAKI;SACX,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;cAmBpB,CAAC,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gCAAgC,EAAE,KAAK,IAAI,EAAE;QAC9C,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC;YACjC,IAAI,EAAE;;;;;;;;gBAQI;SACX,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4BpB,CAAC,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0BAA0B,EAAE,KAAK,IAAI,EAAE;QACxC,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,KAAK,CAAC;YACnB,IAAI,EAAE;;gBAEI;SACX,CAAC,CAAC;QACH,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC;QAE/B,MAAM,cAAc,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QACjC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;QACpD,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,iCAAiC;QACjC,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,MAAM,CAAC,cAAc,CAAC,CAAC,gBAAgB,EAAE,CAAC;QAE1C,MAAM,cAAc,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QACjC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;QACpD,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,oDAAoD;QACpD,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,MAAM,CAAC,cAAc,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import {newSpecPage} from \"@stencil/core/testing\";\nimport {ZMenuSection} from \"../z-menu-section\";\n\nimport {ZMenu} from \"./index\";\n\ndescribe(\"Suite test ZMenu\", () => {\n it(\"Test render ZMenu label only\", async () => {\n const page = await newSpecPage({\n components: [ZMenu],\n html: `<z-menu role=\"menu\">\n <h3>Menu label</h3>\n </z-menu>`,\n });\n\n expect(page.root).toEqualHtml(`\n <z-menu role=\"menu\">\n <mock:shadow-root>\n <div class=\"menu-label\">\n <div class=\"menu-label-content\">\n <slot></slot>\n </div>\n </div>\n </mock:shadow-root>\n <h3>Menu label</h3>\n </z-menu>`);\n });\n\n it(\"Test render ZMenu with items\", async () => {\n const page = await newSpecPage({\n components: [ZMenu, ZMenuSection],\n html: `<z-menu role=\"menu\">\n <h3>Menu label</h3>\n <a href=\"#\" slot=\"item\">Item 1</a>\n <a href=\"#\" slot=\"item\">Item 2</a>\n <a href=\"#\" slot=\"item\">Item 3</a>\n </z-menu>`,\n });\n\n expect(page.root).toEqualHtml(`\n <z-menu role=\"menu\">\n <mock:shadow-root>\n <button aria-expanded=\"false\" aria-label=\"Apri menù\" class=\"menu-label\">\n <div class=\"menu-label-content\">\n <slot></slot>\n <z-icon name=\"chevron-down\"></z-icon>\n </div>\n </button>\n <div class=\"content\">\n <div class=\"items\" role=\"menu\">\n <slot name=\"item\"></slot>\n </div>\n </div>\n </mock:shadow-root>\n <h3>Menu label</h3>\n <a href=\"#\" slot=\"item\">Item 1</a>\n <a href=\"#\" slot=\"item\">Item 2</a>\n <a href=\"#\" slot=\"item\">Item 3</a>\n </z-menu>`);\n });\n\n it(\"Test render ZMenu with submenu\", async () => {\n const page = await newSpecPage({\n components: [ZMenu, ZMenuSection],\n html: `<z-menu role=\"menu\">\n <h3>Menu label</h3>\n <a href=\"#\" slot=\"item\">Item 1</a>\n <z-menu-section slot=\"item\">\n <h3>Item 2</h2>\n <a href=\"#\" slot=\"item\">Item 2.1</a>\n <a href=\"#\" slot=\"item\">Item 2.2</a>\n </z-menu-section>\n </z-menu>`,\n });\n\n expect(page.root).toEqualHtml(`\n <z-menu role=\"menu\">\n <mock:shadow-root>\n <button aria-expanded=\"false\" aria-label=\"Apri menù\" class=\"menu-label\">\n <div class=\"menu-label-content\">\n <slot></slot>\n <z-icon name=\"chevron-down\"></z-icon>\n </div>\n </button>\n <div class=\"content\">\n <div class=\"items\" role=\"menu\">\n <slot name=\"item\"></slot>\n </div>\n </div>\n </mock:shadow-root>\n <h3>Menu label</h3>\n <a href=\"#\" slot=\"item\">Item 1</a>\n <z-menu-section role=\"menu\" slot=\"item\">\n <mock:shadow-root>\n <button aria-pressed=\"false\" class=\"label\">\n <slot></slot>\n <z-icon name=\"chevron-down\"></z-icon>\n </button>\n </mock:shadow-root>\n <h3>Item 2</h3>\n <a href=\"#\" slot=\"item\">Item 2.1</a>\n <a href=\"#\" slot=\"item\">Item 2.2</a>\n </z-menu-section>\n </z-menu>`);\n });\n\n it(\"Test ZMenu toggle events\", async () => {\n const page = await newSpecPage({\n components: [ZMenu],\n html: `<z-menu role=\"menu\">\n <div slot=\"item\">item</div>\n </z-menu>`,\n });\n const menu = page.rootInstance;\n\n const openedCallback = jest.fn();\n page.doc.addEventListener(\"opened\", openedCallback);\n await page.waitForChanges();\n // call `toggle` to open the menu\n menu.toggle();\n expect(openedCallback).toHaveBeenCalled();\n\n const closedCallback = jest.fn();\n page.doc.addEventListener(\"closed\", closedCallback);\n await page.waitForChanges();\n // the menu is already open, this call will close it\n menu.toggle();\n expect(closedCallback).toHaveBeenCalled();\n });\n});\n"]}
1
+ {"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../../src/components/z-menu/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAC,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAE9B,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,8BAA8B,EAAE,KAAK,IAAI,EAAE;QAC5C,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7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c,EAAE,CAAC;QAC5B,iCAAiC;QACjC,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,MAAM,CAAC,cAAc,CAAC,CAAC,gBAAgB,EAAE,CAAC;QAE1C,MAAM,cAAc,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QACjC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;QACpD,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,oDAAoD;QACpD,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,MAAM,CAAC,cAAc,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import {newSpecPage} from \"@stencil/core/testing\";\nimport {ZMenuSection} from \"../z-menu-section\";\n\nimport {ZMenu} from \"./index\";\n\ndescribe(\"Suite test ZMenu\", () => {\n it(\"Test render ZMenu label only\", async () => {\n const page = await newSpecPage({\n components: [ZMenu],\n html: `<z-menu role=\"menu\">\n <h3>Menu label</h3>\n </z-menu>`,\n });\n\n expect(page.root).toEqualHtml(`\n <z-menu floating=\"\" role=\"menu\">\n <mock:shadow-root>\n <div class=\"menu-wrapper\">\n <div class=\"menu-label\">\n <div class=\"menu-label-content\">\n <slot></slot>\n </div>\n </div>\n </div>\n </mock:shadow-root>\n <h3>Menu label</h3>\n </z-menu>`);\n });\n\n it(\"Test render ZMenu with items\", async () => {\n const page = await newSpecPage({\n components: [ZMenu, ZMenuSection],\n html: `<z-menu role=\"menu\">\n <h3>Menu label</h3>\n <a href=\"#\" slot=\"item\">Item 1</a>\n <a href=\"#\" slot=\"item\">Item 2</a>\n <a href=\"#\" slot=\"item\">Item 3</a>\n </z-menu>`,\n });\n\n expect(page.root).toEqualHtml(`\n <z-menu floating=\"\" role=\"menu\">\n <mock:shadow-root>\n <div class=\"menu-wrapper\">\n <button aria-expanded=\"false\" aria-label=\"Apri menù\" class=\"menu-label\">\n <div class=\"menu-label-content\">\n <slot></slot>\n <z-icon name=\"chevron-down\"></z-icon>\n </div>\n </button>\n </div>\n <div class=\"content\">\n <div class=\"items\" role=\"menu\">\n <slot name=\"item\"></slot>\n </div>\n </div>\n </mock:shadow-root>\n <h3>Menu label</h3>\n <a href=\"#\" slot=\"item\">Item 1</a>\n <a href=\"#\" slot=\"item\">Item 2</a>\n <a href=\"#\" slot=\"item\">Item 3</a>\n </z-menu>`);\n });\n\n it(\"Test render ZMenu with submenu\", async () => {\n const page = await newSpecPage({\n components: [ZMenu, ZMenuSection],\n html: `<z-menu floating=\"\" role=\"menu\">\n <h3>Menu label</h3>\n <a href=\"#\" slot=\"item\">Item 1</a>\n <z-menu-section slot=\"item\">\n <h3>Item 2</h2>\n <a href=\"#\" slot=\"section\">Item 2.1</a>\n <a href=\"#\" slot=\"section\">Item 2.2</a>\n </z-menu-section>\n </z-menu>`,\n });\n\n expect(page.root).toEqualHtml(`\n <z-menu floating=\"\" role=\"menu\">\n <mock:shadow-root>\n <div class=\"menu-wrapper\">\n <button aria-expanded=\"false\" aria-label=\"Apri menù\" class=\"menu-label\">\n <div class=\"menu-label-content\">\n <slot></slot>\n <z-icon name=\"chevron-down\"></z-icon>\n </div>\n </button>\n </div>\n <div class=\"content\">\n <div class=\"items\" role=\"menu\">\n <slot name=\"item\"></slot>\n </div>\n </div>\n </mock:shadow-root>\n <h3>\n Menu label\n </h3>\n <a href=\"#\" slot=\"item\">\n Item 1\n </a>\n <z-menu-section role=\"menu\" slot=\"item\">\n <mock:shadow-root>\n <button aria-pressed=\"false\" class=\"label\">\n <slot></slot>\n <z-icon name=\"chevron-down\"></z-icon>\n </button>\n </mock:shadow-root>\n <h3>\n Item 2\n </h3>\n <a href=\"#\" slot=\"section\">\n Item 2.1\n </a>\n <a href=\"#\" slot=\"section\">\n Item 2.2\n </a>\n </z-menu-section>\n </z-menu>`);\n });\n\n it(\"Test ZMenu toggle events\", async () => {\n const page = await newSpecPage({\n components: [ZMenu],\n html: `<z-menu role=\"menu\">\n <div slot=\"item\">item</div>\n </z-menu>`,\n });\n const menu = page.rootInstance;\n\n const openedCallback = jest.fn();\n page.doc.addEventListener(\"opened\", openedCallback);\n await page.waitForChanges();\n // call `toggle` to open the menu\n menu.toggle();\n expect(openedCallback).toHaveBeenCalled();\n\n const closedCallback = jest.fn();\n page.doc.addEventListener(\"closed\", closedCallback);\n await page.waitForChanges();\n // the menu is already open, this call will close it\n menu.toggle();\n expect(closedCallback).toHaveBeenCalled();\n });\n});\n"]}
@@ -2,7 +2,7 @@ import { html } from "lit";
2
2
  import "../z-menu-section/index";
3
3
  import "./index";
4
4
  const StoryMeta = {
5
- title: "ZMenu",
5
+ title: "Zmenu/ZMenu",
6
6
  component: "z-menu",
7
7
  args: {
8
8
  active: false,
@@ -33,12 +33,12 @@ export const FloatingContentLayout = {
33
33
  <h3>Item 3</h3>
34
34
  <a
35
35
  href=""
36
- slot="item"
36
+ slot="section"
37
37
  >Item 3.1</a
38
38
  >
39
39
  <a
40
40
  href=""
41
- slot="item"
41
+ slot="section"
42
42
  >Item 3.2</a
43
43
  >
44
44
  </z-menu-section>
@@ -46,12 +46,12 @@ export const FloatingContentLayout = {
46
46
  <h3>Item 4</h3>
47
47
  <a
48
48
  href=""
49
- slot="item"
49
+ slot="section"
50
50
  >Item 4.1</a
51
51
  >
52
52
  <a
53
53
  href=""
54
- slot="item"
54
+ slot="section"
55
55
  >Item 4.2</a
56
56
  >
57
57
  </z-menu-section>
@@ -90,12 +90,12 @@ export const WithHeader = {
90
90
  <h3>Item 3</h3>
91
91
  <a
92
92
  href=""
93
- slot="item"
93
+ slot="section"
94
94
  >Item 3.1</a
95
95
  >
96
96
  <a
97
97
  href=""
98
- slot="item"
98
+ slot="section"
99
99
  >Item 3.2</a
100
100
  >
101
101
  </z-menu-section>
@@ -1 +1 @@
1
- {"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../../../src/components/z-menu/index.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,yBAAyB,CAAC;AACjC,OAAO,SAAS,CAAC;AAEjB,MAAM,SAAS,GAAG;IAChB,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE;QACJ,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,IAAI;QACd,eAAe,EAAE,KAAK;KACvB;CACoB,CAAC;AAExB,eAAe,SAAS,CAAC;AAIzB,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;;gBAER,IAAI,CAAC,MAAM;kBACT,IAAI,CAAC,QAAQ;yBACN,IAAI,CAAC,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6C1C;CACc,CAAC;AAElB,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;;gBAER,IAAI,CAAC,MAAM;kBACT,IAAI,CAAC,QAAQ;yBACN,IAAI,CAAC,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqC1C;CACc,CAAC;AAElB,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,UAAU,EAAE;QACV,QAAQ,EAAE;YACR,OAAO,EAAE,CAAC,UAAU,CAAC;SACtB;KACF;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;;gBAER,IAAI;yBACK,IAAI,CAAC,eAAe;;;;;;;;GAQ1C;CACc,CAAC","sourcesContent":["import {Meta, StoryObj} from \"@storybook/web-components\";\nimport {html} from \"lit\";\nimport {type ZMenu} from \".\";\nimport \"../z-menu-section/index\";\nimport \"./index\";\n\nconst StoryMeta = {\n title: \"ZMenu\",\n component: \"z-menu\",\n args: {\n active: false,\n floating: true,\n verticalContext: false,\n },\n} satisfies Meta<ZMenu>;\n\nexport default StoryMeta;\n\ntype Story = StoryObj<ZMenu>;\n\nexport const FloatingContentLayout = {\n render: (args) => html`\n <z-menu\n .active=${args.active}\n .floating=${args.floating}\n .verticalContext=${args.verticalContext}\n >\n <h3>Menu label</h3>\n <a\n href=\"\"\n slot=\"item\"\n >Item 1</a\n >\n <a\n href=\"\"\n slot=\"item\"\n >Item 2</a\n >\n <z-menu-section slot=\"item\">\n <h3>Item 3</h3>\n <a\n href=\"\"\n slot=\"item\"\n >Item 3.1</a\n >\n <a\n href=\"\"\n slot=\"item\"\n >Item 3.2</a\n >\n </z-menu-section>\n <z-menu-section slot=\"item\">\n <h3>Item 4</h3>\n <a\n href=\"\"\n slot=\"item\"\n >Item 4.1</a\n >\n <a\n href=\"\"\n slot=\"item\"\n >Item 4.2</a\n >\n </z-menu-section>\n <a\n href=\"\"\n slot=\"item\"\n >Item 5</a\n >\n </z-menu>\n `,\n} satisfies Story;\n\nexport const WithHeader = {\n render: (args) => html`\n <z-menu\n .active=${args.active}\n .floating=${args.floating}\n .verticalContext=${args.verticalContext}\n >\n <img\n slot=\"header\"\n src=\"https://i.pinimg.com/originals/b9/fc/7e/b9fc7e6b2dd2ca128bcc3412e68994f0.jpg\"\n />\n <h4 slot=\"header\">Menu header</h4>\n <h3>Menu label</h3>\n <a\n href=\"\"\n slot=\"item\"\n >Item 1</a\n >\n <a\n href=\"\"\n slot=\"item\"\n >Item 2</a\n >\n <z-menu-section slot=\"item\">\n <h3>Item 3</h3>\n <a\n href=\"\"\n slot=\"item\"\n >Item 3.1</a\n >\n <a\n href=\"\"\n slot=\"item\"\n >Item 3.2</a\n >\n </z-menu-section>\n <a\n href=\"\"\n slot=\"item\"\n >Item 4</a\n >\n </z-menu>\n `,\n} satisfies Story;\n\nexport const ActiveWithoutItems = {\n parameters: {\n controls: {\n exclude: [\"floating\"],\n },\n },\n render: (args) => html`\n <z-menu\n .active=${true}\n .verticalContext=${args.verticalContext}\n >\n <a\n href=\"https://cataas.com/cat/gif\"\n target=\"_blank\"\n >Click me</a\n >\n </z-menu>\n `,\n} satisfies Story;\n"]}
1
+ {"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../../../src/components/z-menu/index.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,yBAAyB,CAAC;AACjC,OAAO,SAAS,CAAC;AAEjB,MAAM,SAAS,GAAG;IAChB,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE;QACJ,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,IAAI;QACd,eAAe,EAAE,KAAK;KACvB;CACoB,CAAC;AAExB,eAAe,SAAS,CAAC;AAIzB,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;;gBAER,IAAI,CAAC,MAAM;kBACT,IAAI,CAAC,QAAQ;yBACN,IAAI,CAAC,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6C1C;CACc,CAAC;AAElB,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;;gBAER,IAAI,CAAC,MAAM;kBACT,IAAI,CAAC,QAAQ;yBACN,IAAI,CAAC,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqC1C;CACc,CAAC;AAElB,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,UAAU,EAAE;QACV,QAAQ,EAAE;YACR,OAAO,EAAE,CAAC,UAAU,CAAC;SACtB;KACF;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;;gBAER,IAAI;yBACK,IAAI,CAAC,eAAe;;;;;;;;GAQ1C;CACc,CAAC","sourcesContent":["import {Meta, StoryObj} from \"@storybook/web-components\";\nimport {html} from \"lit\";\nimport {type ZMenu} from \".\";\nimport \"../z-menu-section/index\";\nimport \"./index\";\n\nconst StoryMeta = {\n title: \"Zmenu/ZMenu\",\n component: \"z-menu\",\n args: {\n active: false,\n floating: true,\n verticalContext: false,\n },\n} satisfies Meta<ZMenu>;\n\nexport default StoryMeta;\n\ntype Story = StoryObj<ZMenu>;\n\nexport const FloatingContentLayout = {\n render: (args) => html`\n <z-menu\n .active=${args.active}\n .floating=${args.floating}\n .verticalContext=${args.verticalContext}\n >\n <h3>Menu label</h3>\n <a\n href=\"\"\n slot=\"item\"\n >Item 1</a\n >\n <a\n href=\"\"\n slot=\"item\"\n >Item 2</a\n >\n <z-menu-section slot=\"item\">\n <h3>Item 3</h3>\n <a\n href=\"\"\n slot=\"section\"\n >Item 3.1</a\n >\n <a\n href=\"\"\n slot=\"section\"\n >Item 3.2</a\n >\n </z-menu-section>\n <z-menu-section slot=\"item\">\n <h3>Item 4</h3>\n <a\n href=\"\"\n slot=\"section\"\n >Item 4.1</a\n >\n <a\n href=\"\"\n slot=\"section\"\n >Item 4.2</a\n >\n </z-menu-section>\n <a\n href=\"\"\n slot=\"item\"\n >Item 5</a\n >\n </z-menu>\n `,\n} satisfies Story;\n\nexport const WithHeader = {\n render: (args) => html`\n <z-menu\n .active=${args.active}\n .floating=${args.floating}\n .verticalContext=${args.verticalContext}\n >\n <img\n slot=\"header\"\n src=\"https://i.pinimg.com/originals/b9/fc/7e/b9fc7e6b2dd2ca128bcc3412e68994f0.jpg\"\n />\n <h4 slot=\"header\">Menu header</h4>\n <h3>Menu label</h3>\n <a\n href=\"\"\n slot=\"item\"\n >Item 1</a\n >\n <a\n href=\"\"\n slot=\"item\"\n >Item 2</a\n >\n <z-menu-section slot=\"item\">\n <h3>Item 3</h3>\n <a\n href=\"\"\n slot=\"section\"\n >Item 3.1</a\n >\n <a\n href=\"\"\n slot=\"section\"\n >Item 3.2</a\n >\n </z-menu-section>\n <a\n href=\"\"\n slot=\"item\"\n >Item 4</a\n >\n </z-menu>\n `,\n} satisfies Story;\n\nexport const ActiveWithoutItems = {\n parameters: {\n controls: {\n exclude: [\"floating\"],\n },\n },\n render: (args) => html`\n <z-menu\n .active=${true}\n .verticalContext=${args.verticalContext}\n >\n <a\n href=\"https://cataas.com/cat/gif\"\n target=\"_blank\"\n >Click me</a\n >\n </z-menu>\n `,\n} satisfies Story;\n"]}
@@ -2,12 +2,14 @@
2
2
  ::slotted(*),
3
3
  * {
4
4
  box-sizing: border-box;
5
+ outline: none;
5
6
  }
6
7
 
7
8
  :host {
8
9
  position: relative;
9
10
  display: inline-flex;
10
11
  flex-direction: column;
12
+ flex-shrink: 0;
11
13
 
12
14
  --z-menu-label-color: var(--color-default-text);
13
15
  }
@@ -23,6 +25,7 @@
23
25
  }
24
26
 
25
27
  .menu-label {
28
+ width: 100%;
26
29
  padding: 0;
27
30
  border: 0;
28
31
  margin: 0;
@@ -33,32 +36,43 @@
33
36
  text-align: left;
34
37
  }
35
38
 
39
+ .menu-wrapper {
40
+ display: flex;
41
+ align-items: center;
42
+ }
43
+
44
+ .menu-wrapper:focus-visible,
45
+ .menu-label-content:focus-visible,
46
+ button:focus-visible {
47
+ outline: none;
48
+ }
49
+
36
50
  button.menu-label {
37
51
  cursor: pointer;
38
52
  }
39
53
 
40
54
  .menu-label:focus-within {
41
55
  z-index: 1;
42
- padding-right: calc(var(--space-unit) * 0.5);
43
- padding-left: calc(var(--space-unit) * 0.5);
44
- margin-right: calc(var(--space-unit) * -0.5);
45
- margin-left: calc(var(--space-unit) * -0.5);
46
56
  box-shadow: var(--shadow-focus-primary);
47
57
  }
48
58
 
49
59
  .menu-label .menu-label-content {
50
60
  position: relative;
51
61
  display: flex;
62
+ height: 30px;
52
63
  align-items: center;
53
64
  }
54
65
 
55
66
  :host(:is([active], [open])) .menu-label-content,
56
67
  .menu-label:focus-within .menu-label-content {
68
+ color: var(--color-primary01);
57
69
  font-weight: var(--font-bd);
58
70
  }
59
71
 
60
72
  :host(:is([active], [open])) .menu-label-content ::slotted(*),
61
- .menu-label:focus-within .menu-label-content ::slotted(*) {
73
+ .menu-label:focus-within .menu-label-content ::slotted(*),
74
+ .menu-label:focus-within .menu-label-content z-icon {
75
+ color: var(--color-primary01);
62
76
  letter-spacing: normal;
63
77
  }
64
78
 
@@ -121,14 +135,13 @@ when placed below the real text using `flex-direction: column`. */
121
135
  .menu-label .menu-label-content ::slotted(*) {
122
136
  display: inline-flex;
123
137
  width: 100%;
138
+ min-width: fit-content;
124
139
  margin: 0;
125
140
  appearance: none;
126
141
  color: var(--z-menu-label-color);
127
142
  font-family: var(--font-family-sans);
128
- font-size: var(--font-size-5);
143
+ font-size: var(--font-size-3);
129
144
  font-weight: inherit;
130
- letter-spacing: 0.36px; /* increasing the letter spacing of the regular text helps reduce the size difference between regular and bold text */
131
- line-height: 1.2;
132
145
  outline: none;
133
146
  }
134
147