@zanichelli/albe-web-components 16.3.0 → 16.3.1

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 (1042) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/cjs/breakpoints-8a1e87e0.js +11 -0
  3. package/dist/cjs/breakpoints-8a1e87e0.js.map +1 -0
  4. package/dist/cjs/{index-b361709b.js → index-041b41e6.js} +2 -2
  5. package/dist/cjs/{index-b361709b.js.map → index-041b41e6.js.map} +1 -1
  6. package/dist/cjs/{index-3a070c6b.js → index-1dfb8b3c.js} +2 -2
  7. package/dist/cjs/{index-3a070c6b.js.map → index-1dfb8b3c.js.map} +1 -1
  8. package/dist/cjs/{index-1f9f28df.js → index-25ded558.js} +2 -2
  9. package/dist/cjs/{index-1f9f28df.js.map → index-25ded558.js.map} +1 -1
  10. package/dist/cjs/{index-f0159789.js → index-4bce26ea.js} +5 -5
  11. package/dist/cjs/{index-f0159789.js.map → index-4bce26ea.js.map} +1 -1
  12. package/dist/cjs/{index-e801ae96.js → index-96af6326.js} +2167 -2127
  13. package/dist/cjs/index-96af6326.js.map +1 -0
  14. package/dist/cjs/{index-1890445d.js → index-b7759a0d.js} +2 -2
  15. package/dist/cjs/{index-1890445d.js.map → index-b7759a0d.js.map} +1 -1
  16. package/dist/cjs/{index-597156d1.js → index-d4272b0e.js} +2 -2
  17. package/dist/cjs/{index-597156d1.js.map → index-d4272b0e.js.map} +1 -1
  18. package/dist/cjs/index.cjs.js +2 -2
  19. package/dist/cjs/loader.cjs.js +2 -2
  20. package/dist/cjs/{utils-6bd8c55e.js → utils-257558ff.js} +19 -5
  21. package/dist/cjs/utils-257558ff.js.map +1 -0
  22. package/dist/cjs/web-components-library.cjs.js +3 -3
  23. package/dist/cjs/web-components-library.cjs.js.map +1 -1
  24. package/dist/cjs/z-accordion.cjs.entry.js +1 -1
  25. package/dist/cjs/z-alert.cjs.entry.js +2 -2
  26. package/dist/cjs/z-anchor-navigation.cjs.entry.js +1 -1
  27. package/dist/cjs/z-app-header-deprecated.cjs.entry.js +2 -2
  28. package/dist/cjs/z-app-header-deprecated.cjs.entry.js.map +1 -1
  29. package/dist/cjs/z-app-header_12.cjs.entry.js +278 -342
  30. package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
  31. package/dist/cjs/z-aria-alert.cjs.entry.js +2 -2
  32. package/dist/cjs/z-avatar.cjs.entry.js +3 -3
  33. package/dist/cjs/z-book-card.cjs.entry.js +5 -5
  34. package/dist/cjs/z-book-card.cjs.entry.js.map +1 -1
  35. package/dist/cjs/z-breadcrumb.cjs.entry.js +5 -5
  36. package/dist/cjs/z-button-sort.cjs.entry.js +4 -4
  37. package/dist/cjs/z-button-sort.cjs.entry.js.map +1 -1
  38. package/dist/cjs/z-card.cjs.entry.js +1 -1
  39. package/dist/cjs/z-carousel.cjs.entry.js +1 -1
  40. package/dist/cjs/z-chip.cjs.entry.js +3 -3
  41. package/dist/cjs/z-combobox.cjs.entry.js +5 -5
  42. package/dist/cjs/z-combobox.cjs.entry.js.map +1 -1
  43. package/dist/cjs/z-cover-hero.cjs.entry.js +3 -3
  44. package/dist/cjs/z-date-picker.cjs.entry.js +1 -1
  45. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +7 -7
  46. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js.map +1 -1
  47. package/dist/cjs/z-file-upload.cjs.entry.js +3 -3
  48. package/dist/cjs/z-file.cjs.entry.js +4 -4
  49. package/dist/cjs/z-file.cjs.entry.js.map +1 -1
  50. package/dist/cjs/z-ghost-loading.cjs.entry.js +2 -2
  51. package/dist/cjs/z-info-box.cjs.entry.js +2 -2
  52. package/dist/cjs/z-info-reveal.cjs.entry.js +2 -2
  53. package/dist/cjs/z-logo.cjs.entry.js +2 -2
  54. package/dist/cjs/z-menu-deprecated.cjs.entry.js +1 -1
  55. package/dist/cjs/z-menu-section-deprecated.cjs.entry.js +1 -1
  56. package/dist/cjs/z-menu-section.cjs.entry.js +141 -112
  57. package/dist/cjs/z-menu-section.cjs.entry.js.map +1 -1
  58. package/dist/cjs/z-menu.cjs.entry.js +210 -162
  59. package/dist/cjs/z-menu.cjs.entry.js.map +1 -1
  60. package/dist/cjs/z-myz-card-alert.cjs.entry.js +2 -2
  61. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +2 -2
  62. package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +2 -2
  63. package/dist/cjs/z-myz-card-footer.cjs.entry.js +2 -2
  64. package/dist/cjs/z-myz-card-icon.cjs.entry.js +2 -2
  65. package/dist/cjs/z-myz-card-info.cjs.entry.js +4 -4
  66. package/dist/cjs/z-myz-card-list.cjs.entry.js +2 -2
  67. package/dist/cjs/z-myz-card_4.cjs.entry.js +5 -5
  68. package/dist/cjs/z-myz-list-item.cjs.entry.js +4 -4
  69. package/dist/cjs/z-myz-list.cjs.entry.js +2 -2
  70. package/dist/cjs/z-navigation-tabs.cjs.entry.js +3 -3
  71. package/dist/cjs/z-notification.cjs.entry.js +2 -2
  72. package/dist/cjs/z-otp.cjs.entry.js +3 -3
  73. package/dist/cjs/z-pagination.cjs.entry.js +1 -1
  74. package/dist/cjs/z-panel-elem.cjs.entry.js +3 -3
  75. package/dist/cjs/z-popover.cjs.entry.js +2 -2
  76. package/dist/cjs/z-range-picker.cjs.entry.js +1 -1
  77. package/dist/cjs/z-section-title.cjs.entry.js +2 -2
  78. package/dist/cjs/z-select.cjs.entry.js +4 -4
  79. package/dist/cjs/z-skip-to-content.cjs.entry.js +4 -4
  80. package/dist/cjs/z-slideshow.cjs.entry.js +3 -3
  81. package/dist/cjs/z-stepper-item.cjs.entry.js +2 -2
  82. package/dist/cjs/z-stepper.cjs.entry.js +2 -2
  83. package/dist/cjs/z-table.cjs.entry.js +9 -9
  84. package/dist/cjs/z-tbody.cjs.entry.js +2 -2
  85. package/dist/cjs/z-td.cjs.entry.js +2 -2
  86. package/dist/cjs/z-tfoot.cjs.entry.js +2 -2
  87. package/dist/cjs/z-th.cjs.entry.js +2 -2
  88. package/dist/cjs/z-thead.cjs.entry.js +2 -2
  89. package/dist/cjs/z-toast-notification-list.cjs.entry.js +2 -2
  90. package/dist/cjs/z-toast-notification.cjs.entry.js +4 -4
  91. package/dist/cjs/z-toast-notification.cjs.entry.js.map +1 -1
  92. package/dist/cjs/z-toggle-button.cjs.entry.js +3 -3
  93. package/dist/cjs/z-toggle-switch.cjs.entry.js +6 -6
  94. package/dist/cjs/z-tooltip.cjs.entry.js +2 -2
  95. package/dist/cjs/z-tr.cjs.entry.js +6 -6
  96. package/dist/cjs/z-visually-hidden.cjs.entry.js +2 -2
  97. package/dist/collection/beans/index.js.map +1 -1
  98. package/dist/collection/collection-manifest.json +2 -2
  99. package/dist/collection/components/css-components/z-fab/index.stories.js.map +1 -1
  100. package/dist/collection/components/css-components/z-link/index.stories.js.map +1 -1
  101. package/dist/collection/components/date-picker/utils.js.map +1 -1
  102. package/dist/collection/components/date-picker/z-date-picker/index.js.map +1 -1
  103. package/dist/collection/components/date-picker/z-date-picker/index.stories.js.map +1 -1
  104. package/dist/collection/components/date-picker/z-range-picker/index.js.map +1 -1
  105. package/dist/collection/components/date-picker/z-range-picker/index.stories.js.map +1 -1
  106. package/dist/collection/components/deprecated/z-app-header-deprecated/index.js +1 -1
  107. package/dist/collection/components/deprecated/z-app-header-deprecated/index.js.map +1 -1
  108. package/dist/collection/components/deprecated/z-app-header-deprecated/index.stories.js.map +1 -1
  109. package/dist/collection/components/deprecated/z-menu-deprecated/index.js.map +1 -1
  110. package/dist/collection/components/deprecated/z-menu-deprecated/index.stories.js.map +1 -1
  111. package/dist/collection/components/deprecated/z-menu-section-deprecated/index.js.map +1 -1
  112. package/dist/collection/components/deprecated/z-menu-section-deprecated/index.stories.js.map +1 -1
  113. package/dist/collection/components/file-upload/z-dragdrop-area/index.js.map +1 -1
  114. package/dist/collection/components/file-upload/z-file/index.js +3 -3
  115. package/dist/collection/components/file-upload/z-file/index.js.map +1 -1
  116. package/dist/collection/components/file-upload/z-file/index.stories.js.map +1 -1
  117. package/dist/collection/components/file-upload/z-file-upload/index.js.map +1 -1
  118. package/dist/collection/components/file-upload/z-file-upload/index.stories.js.map +1 -1
  119. package/dist/collection/components/index.js.map +1 -1
  120. package/dist/collection/components/list/z-list/index.js.map +1 -1
  121. package/dist/collection/components/list/z-list/index.stories.js.map +1 -1
  122. package/dist/collection/components/list/z-list-element/index.js.map +1 -1
  123. package/dist/collection/components/list/z-list-element/index.stories.js.map +1 -1
  124. package/dist/collection/components/list/z-list-group/index.js.map +1 -1
  125. package/dist/collection/components/list/z-list-group/index.stories.js.map +1 -1
  126. package/dist/collection/components/table/cells/z-td/index.js.map +1 -1
  127. package/dist/collection/components/table/cells/z-th/index.js.map +1 -1
  128. package/dist/collection/components/table/z-table/index.js.map +1 -1
  129. package/dist/collection/components/table/z-table/index.stories.js.map +1 -1
  130. package/dist/collection/components/table/z-tbody/index.js.map +1 -1
  131. package/dist/collection/components/table/z-tfoot/index.js.map +1 -1
  132. package/dist/collection/components/table/z-thead/index.js.map +1 -1
  133. package/dist/collection/components/table/z-tr/index.js.map +1 -1
  134. package/dist/collection/components/z-accordion/index.js.map +1 -1
  135. package/dist/collection/components/z-accordion/index.stories.js.map +1 -1
  136. package/dist/collection/components/z-anchor-navigation/index.js.map +1 -1
  137. package/dist/collection/components/z-anchor-navigation/index.stories.js.map +1 -1
  138. package/dist/collection/components/z-app-header/index.js +149 -206
  139. package/dist/collection/components/z-app-header/index.js.map +1 -1
  140. package/dist/collection/components/z-app-header/index.stories.js +12 -28
  141. package/dist/collection/components/z-app-header/index.stories.js.map +1 -1
  142. package/dist/collection/components/z-app-header/styles.css +95 -121
  143. package/dist/collection/components/z-aria-alert/index.js +1 -1
  144. package/dist/collection/components/z-aria-alert/index.js.map +1 -1
  145. package/dist/collection/components/z-aria-alert/index.stories.js.map +1 -1
  146. package/dist/collection/components/z-avatar/index.js +2 -2
  147. package/dist/collection/components/z-avatar/index.js.map +1 -1
  148. package/dist/collection/components/z-avatar/index.stories.js.map +1 -1
  149. package/dist/collection/components/z-book-card/index.js +3 -3
  150. package/dist/collection/components/z-book-card/index.js.map +1 -1
  151. package/dist/collection/components/z-book-card/index.stories.js.map +1 -1
  152. package/dist/collection/components/z-breadcrumb/index.js +2 -2
  153. package/dist/collection/components/z-breadcrumb/index.js.map +1 -1
  154. package/dist/collection/components/z-breadcrumb/index.stories.js.map +1 -1
  155. package/dist/collection/components/z-button/index.js.map +1 -1
  156. package/dist/collection/components/z-button/index.stories.js.map +1 -1
  157. package/dist/collection/components/z-button-sort/index.js +3 -3
  158. package/dist/collection/components/z-button-sort/index.js.map +1 -1
  159. package/dist/collection/components/z-button-sort/index.stories.js.map +1 -1
  160. package/dist/collection/components/z-card/index.js.map +1 -1
  161. package/dist/collection/components/z-card/index.stories.js.map +1 -1
  162. package/dist/collection/components/z-carousel/index.js.map +1 -1
  163. package/dist/collection/components/z-carousel/index.stories.js.map +1 -1
  164. package/dist/collection/components/z-chip/index.js +2 -2
  165. package/dist/collection/components/z-chip/index.js.map +1 -1
  166. package/dist/collection/components/z-chip/index.stories.js.map +1 -1
  167. package/dist/collection/components/z-combobox/index.js +1 -1
  168. package/dist/collection/components/z-combobox/index.js.map +1 -1
  169. package/dist/collection/components/z-combobox/index.stories.js.map +1 -1
  170. package/dist/collection/components/z-combobox/styles.css +6 -4
  171. package/dist/collection/components/z-cover-hero/index.js +2 -2
  172. package/dist/collection/components/z-cover-hero/index.js.map +1 -1
  173. package/dist/collection/components/z-cover-hero/index.stories.js.map +1 -1
  174. package/dist/collection/components/z-divider/index.js +1 -1
  175. package/dist/collection/components/z-divider/index.js.map +1 -1
  176. package/dist/collection/components/z-divider/index.stories.js.map +1 -1
  177. package/dist/collection/components/z-ghost-loading/index.js +1 -1
  178. package/dist/collection/components/z-ghost-loading/index.js.map +1 -1
  179. package/dist/collection/components/z-ghost-loading/index.stories.js.map +1 -1
  180. package/dist/collection/components/z-icon/index.js.map +1 -1
  181. package/dist/collection/components/z-icon/index.stories.js.map +1 -1
  182. package/dist/collection/components/z-info-box/index.js +1 -1
  183. package/dist/collection/components/z-info-box/index.js.map +1 -1
  184. package/dist/collection/components/z-info-box/index.stories.js.map +1 -1
  185. package/dist/collection/components/z-info-reveal/index.js +1 -1
  186. package/dist/collection/components/z-info-reveal/index.js.map +1 -1
  187. package/dist/collection/components/z-info-reveal/index.stories.js.map +1 -1
  188. package/dist/collection/components/z-input/index.js +1 -1
  189. package/dist/collection/components/z-input/index.js.map +1 -1
  190. package/dist/collection/components/z-input/index.stories.js.map +1 -1
  191. package/dist/collection/components/z-input-message/index.js +1 -1
  192. package/dist/collection/components/z-input-message/index.js.map +1 -1
  193. package/dist/collection/components/z-input-message/index.stories.js.map +1 -1
  194. package/dist/collection/components/z-logo/index.js +1 -1
  195. package/dist/collection/components/z-logo/index.js.map +1 -1
  196. package/dist/collection/components/z-logo/index.stories.js.map +1 -1
  197. package/dist/collection/components/z-menu/index.js +269 -171
  198. package/dist/collection/components/z-menu/index.js.map +1 -1
  199. package/dist/collection/components/z-menu/index.stories.js +2 -8
  200. package/dist/collection/components/z-menu/index.stories.js.map +1 -1
  201. package/dist/collection/components/z-menu/styles.css +38 -46
  202. package/dist/collection/components/z-menu-section/index.js +216 -121
  203. package/dist/collection/components/z-menu-section/index.js.map +1 -1
  204. package/dist/collection/components/z-menu-section/index.stories.js.map +1 -1
  205. package/dist/collection/components/z-menu-section/styles.css +32 -27
  206. package/dist/collection/components/z-modal/index.js +6 -6
  207. package/dist/collection/components/z-modal/index.js.map +1 -1
  208. package/dist/collection/components/z-modal/index.stories.js.map +1 -1
  209. package/dist/collection/components/z-navigation-tabs/index.js +2 -2
  210. package/dist/collection/components/z-navigation-tabs/index.js.map +1 -1
  211. package/dist/collection/components/z-navigation-tabs/index.stories.js.map +1 -1
  212. package/dist/collection/components/z-notification/index.js +1 -1
  213. package/dist/collection/components/z-notification/index.js.map +1 -1
  214. package/dist/collection/components/z-notification/index.stories.js.map +1 -1
  215. package/dist/collection/components/z-offcanvas/index.js +1 -1
  216. package/dist/collection/components/z-offcanvas/index.js.map +1 -1
  217. package/dist/collection/components/z-offcanvas/index.stories.js.map +1 -1
  218. package/dist/collection/components/z-pagination/index.js.map +1 -1
  219. package/dist/collection/components/z-pagination/index.stories.js.map +1 -1
  220. package/dist/collection/components/z-panel-elem/index.js +2 -2
  221. package/dist/collection/components/z-panel-elem/index.js.map +1 -1
  222. package/dist/collection/components/z-panel-elem/index.stories.js.map +1 -1
  223. package/dist/collection/components/z-popover/index.js +1 -1
  224. package/dist/collection/components/z-popover/index.js.map +1 -1
  225. package/dist/collection/components/z-popover/index.stories.js.map +1 -1
  226. package/dist/collection/components/z-searchbar/index.js +4 -3
  227. package/dist/collection/components/z-searchbar/index.js.map +1 -1
  228. package/dist/collection/components/z-searchbar/index.stories.js.map +1 -1
  229. package/dist/collection/components/z-section-title/index.js +1 -1
  230. package/dist/collection/components/z-section-title/index.js.map +1 -1
  231. package/dist/collection/components/z-section-title/index.stories.js.map +1 -1
  232. package/dist/collection/components/z-select/index.js +1 -1
  233. package/dist/collection/components/z-select/index.js.map +1 -1
  234. package/dist/collection/components/z-select/index.stories.js.map +1 -1
  235. package/dist/collection/components/z-skip-to-content/index.js +1 -1
  236. package/dist/collection/components/z-skip-to-content/index.js.map +1 -1
  237. package/dist/collection/components/z-skip-to-content/index.stories.js.map +1 -1
  238. package/dist/collection/components/z-stepper/index.js +1 -1
  239. package/dist/collection/components/z-stepper/index.js.map +1 -1
  240. package/dist/collection/components/z-stepper/index.stories.js.map +1 -1
  241. package/dist/collection/components/z-stepper-item/index.js +1 -1
  242. package/dist/collection/components/z-stepper-item/index.js.map +1 -1
  243. package/dist/collection/components/z-stepper-item/index.stories.js.map +1 -1
  244. package/dist/collection/components/z-tag/index.js.map +1 -1
  245. package/dist/collection/components/z-tag/index.stories.js.map +1 -1
  246. package/dist/collection/components/z-toast-notification/index.js +3 -3
  247. package/dist/collection/components/z-toast-notification/index.js.map +1 -1
  248. package/dist/collection/components/z-toast-notification/index.stories.js.map +1 -1
  249. package/dist/collection/components/z-toast-notification-list/index.js +1 -1
  250. package/dist/collection/components/z-toast-notification-list/index.js.map +1 -1
  251. package/dist/collection/components/z-toast-notification-list/index.stories.js.map +1 -1
  252. package/dist/collection/components/z-toggle-button/index.js +2 -2
  253. package/dist/collection/components/z-toggle-button/index.js.map +1 -1
  254. package/dist/collection/components/z-toggle-button/index.stories.js.map +1 -1
  255. package/dist/collection/components/z-toggle-switch/index.js +3 -3
  256. package/dist/collection/components/z-toggle-switch/index.js.map +1 -1
  257. package/dist/collection/components/z-toggle-switch/index.stories.js.map +1 -1
  258. package/dist/collection/components/z-tooltip/index.js +1 -1
  259. package/dist/collection/components/z-tooltip/index.js.map +1 -1
  260. package/dist/collection/components/z-tooltip/index.stories.js.map +1 -1
  261. package/dist/collection/components/z-visually-hidden/index.js +1 -1
  262. package/dist/collection/components/z-visually-hidden/index.js.map +1 -1
  263. package/dist/collection/components/z-visually-hidden/index.stories.js.map +1 -1
  264. package/dist/collection/constants/breakpoints.js +7 -4
  265. package/dist/collection/constants/breakpoints.js.map +1 -1
  266. package/dist/collection/constants/icons.js.map +1 -1
  267. package/dist/collection/constants/iconset.js.map +1 -1
  268. package/dist/collection/index.js.map +1 -1
  269. package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +1 -1
  270. package/dist/collection/snowflakes/myz/card/z-myz-card/index.js.map +1 -1
  271. package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +1 -1
  272. package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js.map +1 -1
  273. package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +1 -1
  274. package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js.map +1 -1
  275. package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +1 -1
  276. package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js.map +1 -1
  277. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
  278. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js.map +1 -1
  279. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -1
  280. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js.map +1 -1
  281. package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +1 -1
  282. package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js.map +1 -1
  283. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
  284. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js.map +1 -1
  285. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +1 -1
  286. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js.map +1 -1
  287. package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
  288. package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js.map +1 -1
  289. package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
  290. package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js.map +1 -1
  291. package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
  292. package/dist/collection/snowflakes/myz/list/z-myz-list/index.js.map +1 -1
  293. package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +1 -1
  294. package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js.map +1 -1
  295. package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
  296. package/dist/collection/snowflakes/myz/z-alert/index.js.map +1 -1
  297. package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
  298. package/dist/collection/snowflakes/myz/z-otp/index.js.map +1 -1
  299. package/dist/collection/snowflakes/myz/z-slideshow/index.js.map +1 -1
  300. package/dist/collection/utils/storybook-utils.js.map +1 -1
  301. package/dist/collection/utils/utils.js +17 -7
  302. package/dist/collection/utils/utils.js.map +1 -1
  303. package/dist/components/breakpoints.js +8 -4
  304. package/dist/components/breakpoints.js.map +1 -1
  305. package/dist/components/index10.js +1 -1
  306. package/dist/components/index11.js +1 -1
  307. package/dist/components/index15.js +6 -6
  308. package/dist/components/index15.js.map +1 -1
  309. package/dist/components/index16.js +1 -1
  310. package/dist/components/index17.js +1 -1
  311. package/dist/components/index18.js +1 -1
  312. package/dist/components/index19.js +1 -1
  313. package/dist/components/index20.js +1 -1
  314. package/dist/components/index21.js +1 -1
  315. package/dist/components/index22.js +1 -1
  316. package/dist/components/index23.js +5 -4
  317. package/dist/components/index23.js.map +1 -1
  318. package/dist/components/index3.js +1 -1
  319. package/dist/components/index5.js +2 -2
  320. package/dist/components/index6.js +1 -1
  321. package/dist/components/index8.js +1 -1
  322. package/dist/components/utils.js +18 -5
  323. package/dist/components/utils.js.map +1 -1
  324. package/dist/components/z-app-header-deprecated.js +1 -1
  325. package/dist/components/z-app-header-deprecated.js.map +1 -1
  326. package/dist/components/z-app-header.js +144 -207
  327. package/dist/components/z-app-header.js.map +1 -1
  328. package/dist/components/z-aria-alert.js +1 -1
  329. package/dist/components/z-avatar.js +2 -2
  330. package/dist/components/z-book-card.js +3 -3
  331. package/dist/components/z-book-card.js.map +1 -1
  332. package/dist/components/z-breadcrumb.js +2 -2
  333. package/dist/components/z-button-sort.js +3 -3
  334. package/dist/components/z-button-sort.js.map +1 -1
  335. package/dist/components/z-combobox.js +2 -2
  336. package/dist/components/z-combobox.js.map +1 -1
  337. package/dist/components/z-cover-hero.js +2 -2
  338. package/dist/components/z-file.js +3 -3
  339. package/dist/components/z-file.js.map +1 -1
  340. package/dist/components/z-info-box.js +1 -1
  341. package/dist/components/z-info-reveal.js +1 -1
  342. package/dist/components/z-logo.js +1 -1
  343. package/dist/components/z-menu-section.js +151 -115
  344. package/dist/components/z-menu-section.js.map +1 -1
  345. package/dist/components/z-menu.js +218 -166
  346. package/dist/components/z-menu.js.map +1 -1
  347. package/dist/components/z-myz-card-alert.js +1 -1
  348. package/dist/components/z-myz-card-dictionary.js +1 -1
  349. package/dist/components/z-myz-card-footer-sections.js +1 -1
  350. package/dist/components/z-myz-card-footer.js +1 -1
  351. package/dist/components/z-myz-card-icon.js +1 -1
  352. package/dist/components/z-myz-card-info.js +1 -1
  353. package/dist/components/z-myz-card-list.js +1 -1
  354. package/dist/components/z-myz-list.js +1 -1
  355. package/dist/components/z-navigation-tabs.js +2 -2
  356. package/dist/components/z-notification.js +1 -1
  357. package/dist/components/z-otp.js +2 -2
  358. package/dist/components/z-panel-elem.js +2 -2
  359. package/dist/components/z-section-title.js +1 -1
  360. package/dist/components/z-select.js +2 -2
  361. package/dist/components/z-skip-to-content.js +2 -2
  362. package/dist/components/z-slideshow.js +1 -1
  363. package/dist/components/z-stepper-item.js +1 -1
  364. package/dist/components/z-stepper.js +1 -1
  365. package/dist/components/z-table.js +1 -0
  366. package/dist/components/z-table.js.map +1 -1
  367. package/dist/components/z-toast-notification-list.js +1 -1
  368. package/dist/components/z-toast-notification.js +3 -3
  369. package/dist/components/z-toast-notification.js.map +1 -1
  370. package/dist/components/z-toggle-button.js +2 -2
  371. package/dist/components/z-toggle-switch.js +3 -3
  372. package/dist/components/z-tooltip.js +1 -1
  373. package/dist/components/z-visually-hidden.js +1 -1
  374. package/dist/esm/breakpoints-d148bfde.js +11 -0
  375. package/dist/esm/breakpoints-d148bfde.js.map +1 -0
  376. package/dist/esm/{index-175661e6.js → index-36f0f6c0.js} +2 -2
  377. package/dist/esm/{index-175661e6.js.map → index-36f0f6c0.js.map} +1 -1
  378. package/dist/esm/{index-fd7edd22.js → index-66bd56db.js} +5 -5
  379. package/dist/esm/{index-fd7edd22.js.map → index-66bd56db.js.map} +1 -1
  380. package/dist/esm/{index-7a28ff39.js → index-89520805.js} +2 -2
  381. package/dist/esm/{index-7a28ff39.js.map → index-89520805.js.map} +1 -1
  382. package/dist/esm/{index-a2130b6a.js → index-c8ceadeb.js} +2167 -2127
  383. package/dist/esm/index-c8ceadeb.js.map +1 -0
  384. package/dist/esm/{index-230d44a5.js → index-cddfba10.js} +2 -2
  385. package/dist/esm/{index-230d44a5.js.map → index-cddfba10.js.map} +1 -1
  386. package/dist/esm/{index-a81f1558.js → index-dfddeb25.js} +2 -2
  387. package/dist/esm/{index-a81f1558.js.map → index-dfddeb25.js.map} +1 -1
  388. package/dist/esm/{index-b556b384.js → index-e70be23f.js} +2 -2
  389. package/dist/esm/{index-b556b384.js.map → index-e70be23f.js.map} +1 -1
  390. package/dist/esm/index.js +2 -2
  391. package/dist/esm/loader.js +3 -3
  392. package/dist/esm/{utils-8ade9e2d.js → utils-acc8bdd0.js} +19 -6
  393. package/dist/esm/utils-acc8bdd0.js.map +1 -0
  394. package/dist/esm/web-components-library.js +4 -4
  395. package/dist/esm/web-components-library.js.map +1 -1
  396. package/dist/esm/z-accordion.entry.js +1 -1
  397. package/dist/esm/z-alert.entry.js +2 -2
  398. package/dist/esm/z-anchor-navigation.entry.js +1 -1
  399. package/dist/esm/z-app-header-deprecated.entry.js +2 -2
  400. package/dist/esm/z-app-header-deprecated.entry.js.map +1 -1
  401. package/dist/esm/z-app-header_12.entry.js +145 -209
  402. package/dist/esm/z-app-header_12.entry.js.map +1 -1
  403. package/dist/esm/z-aria-alert.entry.js +2 -2
  404. package/dist/esm/z-avatar.entry.js +3 -3
  405. package/dist/esm/z-book-card.entry.js +5 -5
  406. package/dist/esm/z-book-card.entry.js.map +1 -1
  407. package/dist/esm/z-breadcrumb.entry.js +5 -5
  408. package/dist/esm/z-button-sort.entry.js +4 -4
  409. package/dist/esm/z-button-sort.entry.js.map +1 -1
  410. package/dist/esm/z-card.entry.js +1 -1
  411. package/dist/esm/z-carousel.entry.js +1 -1
  412. package/dist/esm/z-chip.entry.js +3 -3
  413. package/dist/esm/z-combobox.entry.js +5 -5
  414. package/dist/esm/z-combobox.entry.js.map +1 -1
  415. package/dist/esm/z-cover-hero.entry.js +3 -3
  416. package/dist/esm/z-date-picker.entry.js +1 -1
  417. package/dist/esm/z-dragdrop-area_2.entry.js +7 -7
  418. package/dist/esm/z-dragdrop-area_2.entry.js.map +1 -1
  419. package/dist/esm/z-file-upload.entry.js +3 -3
  420. package/dist/esm/z-file.entry.js +4 -4
  421. package/dist/esm/z-file.entry.js.map +1 -1
  422. package/dist/esm/z-ghost-loading.entry.js +2 -2
  423. package/dist/esm/z-info-box.entry.js +2 -2
  424. package/dist/esm/z-info-reveal.entry.js +2 -2
  425. package/dist/esm/z-logo.entry.js +2 -2
  426. package/dist/esm/z-menu-deprecated.entry.js +1 -1
  427. package/dist/esm/z-menu-section-deprecated.entry.js +1 -1
  428. package/dist/esm/z-menu-section.entry.js +140 -111
  429. package/dist/esm/z-menu-section.entry.js.map +1 -1
  430. package/dist/esm/z-menu.entry.js +210 -162
  431. package/dist/esm/z-menu.entry.js.map +1 -1
  432. package/dist/esm/z-myz-card-alert.entry.js +2 -2
  433. package/dist/esm/z-myz-card-dictionary.entry.js +2 -2
  434. package/dist/esm/z-myz-card-footer-sections.entry.js +2 -2
  435. package/dist/esm/z-myz-card-footer.entry.js +2 -2
  436. package/dist/esm/z-myz-card-icon.entry.js +2 -2
  437. package/dist/esm/z-myz-card-info.entry.js +4 -4
  438. package/dist/esm/z-myz-card-list.entry.js +2 -2
  439. package/dist/esm/z-myz-card_4.entry.js +5 -5
  440. package/dist/esm/z-myz-list-item.entry.js +4 -4
  441. package/dist/esm/z-myz-list.entry.js +2 -2
  442. package/dist/esm/z-navigation-tabs.entry.js +3 -3
  443. package/dist/esm/z-notification.entry.js +2 -2
  444. package/dist/esm/z-otp.entry.js +3 -3
  445. package/dist/esm/z-pagination.entry.js +1 -1
  446. package/dist/esm/z-panel-elem.entry.js +3 -3
  447. package/dist/esm/z-popover.entry.js +2 -2
  448. package/dist/esm/z-range-picker.entry.js +1 -1
  449. package/dist/esm/z-section-title.entry.js +2 -2
  450. package/dist/esm/z-select.entry.js +4 -4
  451. package/dist/esm/z-skip-to-content.entry.js +4 -4
  452. package/dist/esm/z-slideshow.entry.js +3 -3
  453. package/dist/esm/z-stepper-item.entry.js +2 -2
  454. package/dist/esm/z-stepper.entry.js +2 -2
  455. package/dist/esm/z-table.entry.js +9 -9
  456. package/dist/esm/z-tbody.entry.js +2 -2
  457. package/dist/esm/z-td.entry.js +2 -2
  458. package/dist/esm/z-tfoot.entry.js +2 -2
  459. package/dist/esm/z-th.entry.js +2 -2
  460. package/dist/esm/z-thead.entry.js +2 -2
  461. package/dist/esm/z-toast-notification-list.entry.js +2 -2
  462. package/dist/esm/z-toast-notification.entry.js +4 -4
  463. package/dist/esm/z-toast-notification.entry.js.map +1 -1
  464. package/dist/esm/z-toggle-button.entry.js +3 -3
  465. package/dist/esm/z-toggle-switch.entry.js +6 -6
  466. package/dist/esm/z-tooltip.entry.js +2 -2
  467. package/dist/esm/z-tr.entry.js +6 -6
  468. package/dist/esm/z-visually-hidden.entry.js +2 -2
  469. package/dist/types/components/deprecated/z-app-header-deprecated/index.stories.d.ts +3 -3
  470. package/dist/types/components/list/z-list-group/index.stories.d.ts +1 -1
  471. package/dist/types/components/z-app-header/index.d.ts +23 -30
  472. package/dist/types/components/z-app-header/index.stories.d.ts +2 -5
  473. package/dist/types/components/z-book-card/index.stories.d.ts +2 -2
  474. package/dist/types/components/z-carousel/index.stories.d.ts +1 -1
  475. package/dist/types/components/z-cover-hero/index.stories.d.ts +1 -1
  476. package/dist/types/components/z-menu/index.d.ts +34 -26
  477. package/dist/types/components/z-menu/index.stories.d.ts +1 -2
  478. package/dist/types/components/z-menu-section/index.d.ts +28 -18
  479. package/dist/types/components/z-modal/index.stories.d.ts +1 -1
  480. package/dist/types/components/z-navigation-tabs/index.stories.d.ts +2 -2
  481. package/dist/types/components/z-popover/index.stories.d.ts +2 -2
  482. package/dist/types/components/z-section-title/index.stories.d.ts +1 -1
  483. package/dist/types/components/z-tag/index.stories.d.ts +2 -2
  484. package/dist/types/components/z-tooltip/index.stories.d.ts +1 -1
  485. package/dist/types/components.d.ts +48 -8
  486. package/dist/types/constants/breakpoints.d.ts +6 -4
  487. package/dist/types/stencil-public-runtime.d.ts +0 -2
  488. package/dist/types/utils/utils.d.ts +10 -1
  489. package/dist/web-components-library/index.esm.js +1 -1
  490. package/dist/web-components-library/p-04c39e8a.entry.js +2 -0
  491. package/dist/web-components-library/p-04c39e8a.entry.js.map +1 -0
  492. package/dist/web-components-library/p-0542a3c9.entry.js +2 -0
  493. package/dist/web-components-library/p-0542a3c9.entry.js.map +1 -0
  494. package/dist/web-components-library/{p-6319b5e2.entry.js → p-06d98334.entry.js} +2 -2
  495. package/dist/web-components-library/{p-2672e36f.entry.js → p-100c6243.entry.js} +2 -2
  496. package/dist/web-components-library/p-16d625b3.entry.js +2 -0
  497. package/dist/web-components-library/p-16d625b3.entry.js.map +1 -0
  498. package/{www/build/p-28928bb6.entry.js → dist/web-components-library/p-1896cc54.entry.js} +2 -2
  499. package/{www/build/p-19f8c3d2.entry.js → dist/web-components-library/p-1cc37aa7.entry.js} +2 -2
  500. package/{www/build/p-c0bdbfb5.entry.js → dist/web-components-library/p-273f3c53.entry.js} +2 -2
  501. package/dist/web-components-library/{p-4f7dd068.entry.js → p-28018cd3.entry.js} +2 -2
  502. package/{www/build/p-12d62027.entry.js → dist/web-components-library/p-296924ea.entry.js} +2 -2
  503. package/dist/web-components-library/p-2b1fd95a.entry.js +2 -0
  504. package/dist/web-components-library/{p-99b791d1.entry.js → p-2e432a39.entry.js} +2 -2
  505. package/dist/web-components-library/{p-af856537.entry.js → p-2f662fea.entry.js} +2 -2
  506. package/dist/web-components-library/{p-8a10fec5.entry.js → p-38d5e74f.entry.js} +2 -2
  507. package/dist/web-components-library/p-3ae8fb1a.entry.js +2 -0
  508. package/dist/web-components-library/{p-304eeab0.js → p-3dbad75e.js} +2 -2
  509. package/{www/build/p-be4878f2.entry.js → dist/web-components-library/p-4537f922.entry.js} +2 -2
  510. package/dist/web-components-library/{p-91c04edc.entry.js → p-45dc157c.entry.js} +2 -2
  511. package/dist/web-components-library/{p-e366782c.entry.js → p-46d98609.entry.js} +2 -2
  512. package/{www/build/p-7d7c5344.js → dist/web-components-library/p-4a2e0034.js} +2 -2
  513. package/dist/web-components-library/p-4f3f8578.entry.js +2 -0
  514. package/dist/web-components-library/p-5145a606.js +2 -0
  515. package/dist/web-components-library/p-5145a606.js.map +1 -0
  516. package/{www/build/p-e5dc0719.entry.js → dist/web-components-library/p-51f1c9c0.entry.js} +2 -2
  517. package/{www/build/p-e1852de3.entry.js → dist/web-components-library/p-5a0f0978.entry.js} +2 -2
  518. package/dist/web-components-library/{p-6586441a.entry.js → p-5a178c69.entry.js} +3 -3
  519. package/dist/web-components-library/p-5a178c69.entry.js.map +1 -0
  520. package/dist/web-components-library/{p-cf2640b0.entry.js → p-608c35ba.entry.js} +2 -2
  521. package/{www/build/p-cf2640b0.entry.js.map → dist/web-components-library/p-608c35ba.entry.js.map} +1 -1
  522. package/dist/web-components-library/{p-26b5c84d.js → p-60f410df.js} +2 -2
  523. package/dist/web-components-library/p-63ec7bad.entry.js +2 -0
  524. package/dist/web-components-library/p-64364cbf.entry.js +2 -0
  525. package/dist/web-components-library/p-64364cbf.entry.js.map +1 -0
  526. package/dist/web-components-library/p-64aab82f.js +2 -0
  527. package/dist/web-components-library/p-67e5e8ed.js +2 -0
  528. package/dist/web-components-library/p-67e5e8ed.js.map +1 -0
  529. package/dist/web-components-library/{p-57eee056.entry.js → p-68f4fbc8.entry.js} +2 -2
  530. package/dist/web-components-library/{p-f21bc3a9.entry.js → p-6a1b3e86.entry.js} +2 -2
  531. package/dist/web-components-library/{p-05e9ae1e.entry.js → p-6db2fd46.entry.js} +2 -2
  532. package/{www/build/p-83350b5f.entry.js → dist/web-components-library/p-707e5f91.entry.js} +2 -2
  533. package/dist/web-components-library/p-75c4a726.js +3 -0
  534. package/dist/web-components-library/p-75c4a726.js.map +1 -0
  535. package/{www/build/p-85f84e55.entry.js → dist/web-components-library/p-777ad335.entry.js} +2 -2
  536. package/dist/web-components-library/p-777ad335.entry.js.map +1 -0
  537. package/{www/build/p-b84fa3b6.entry.js → dist/web-components-library/p-7aba5af3.entry.js} +2 -2
  538. package/dist/web-components-library/p-7d5bf905.entry.js +2 -0
  539. package/dist/web-components-library/{p-324ef970.entry.js → p-820b48f6.entry.js} +2 -2
  540. package/dist/web-components-library/p-823c45d4.entry.js +2 -0
  541. package/{www/build/p-8c9f7cef.entry.js → dist/web-components-library/p-855334f4.entry.js} +2 -2
  542. package/dist/web-components-library/{p-aa0f083b.js → p-8a6a4d22.js} +2 -2
  543. package/{www/build/p-8b309268.entry.js → dist/web-components-library/p-8d56e74b.entry.js} +2 -2
  544. package/dist/web-components-library/p-8d56e74b.entry.js.map +1 -0
  545. package/dist/web-components-library/{p-d9e1d8c7.js → p-95cb8701.js} +2 -2
  546. package/dist/web-components-library/p-9a1b51ed.entry.js +2 -0
  547. package/{www/build/p-ad76b8ff.entry.js.map → dist/web-components-library/p-9a1b51ed.entry.js.map} +1 -1
  548. package/dist/web-components-library/{p-4552744b.entry.js → p-9b9a04ad.entry.js} +2 -2
  549. package/dist/web-components-library/{p-77d8ad7e.entry.js → p-a0fd1323.entry.js} +2 -2
  550. package/dist/web-components-library/p-a64a1bf0.entry.js +2 -0
  551. package/dist/web-components-library/p-a64a1bf0.entry.js.map +1 -0
  552. package/dist/web-components-library/p-aaae6b16.entry.js +2 -0
  553. package/dist/web-components-library/{p-97b0c3b3.entry.js.map → p-aaae6b16.entry.js.map} +1 -1
  554. package/dist/web-components-library/p-ab7f129e.entry.js +2 -0
  555. package/dist/web-components-library/{p-6f4dd02b.entry.js.map → p-ab7f129e.entry.js.map} +1 -1
  556. package/{www/build/p-088a31dc.entry.js → dist/web-components-library/p-acd911aa.entry.js} +2 -2
  557. package/{www/build/p-a4ada10b.entry.js → dist/web-components-library/p-ad97fdc4.entry.js} +2 -2
  558. package/dist/web-components-library/{p-57ecb5a7.entry.js → p-b2356bc7.entry.js} +2 -2
  559. package/dist/web-components-library/p-c1e498ac.entry.js +2 -0
  560. package/dist/web-components-library/{p-a5781264.entry.js → p-c54d0925.entry.js} +2 -2
  561. package/dist/web-components-library/p-c679277c.entry.js +2 -0
  562. package/{www/build/p-df05727f.entry.js.map → dist/web-components-library/p-c679277c.entry.js.map} +1 -1
  563. package/dist/web-components-library/p-cc71a90c.entry.js +2 -0
  564. package/{www/build/p-c90249e5.entry.js → dist/web-components-library/p-cd0219b4.entry.js} +2 -2
  565. package/{www/build/p-6a664748.entry.js → dist/web-components-library/p-d5f5e107.entry.js} +2 -2
  566. package/dist/web-components-library/p-d5f5e107.entry.js.map +1 -0
  567. package/dist/web-components-library/{p-88e756cd.entry.js → p-da7200c2.entry.js} +2 -2
  568. package/{www/build/p-ae96bc09.entry.js → dist/web-components-library/p-df8c381a.entry.js} +2 -2
  569. package/dist/web-components-library/{p-3b266de4.entry.js → p-df9c3674.entry.js} +2 -2
  570. package/dist/web-components-library/{p-609c11d6.entry.js → p-e25d7f0a.entry.js} +2 -2
  571. package/dist/web-components-library/{p-33eea921.entry.js → p-e4d97fbf.entry.js} +2 -2
  572. package/dist/web-components-library/{p-f74f9f3c.entry.js → p-e529a714.entry.js} +2 -2
  573. package/dist/web-components-library/{p-21b85c7f.entry.js → p-ea9c0ff3.entry.js} +2 -2
  574. package/dist/web-components-library/{p-2a7e4988.entry.js → p-f06ad42c.entry.js} +2 -2
  575. package/dist/web-components-library/{p-8499a29d.entry.js → p-f15d0a00.entry.js} +2 -2
  576. package/{www/build/p-63e970ee.entry.js → dist/web-components-library/p-f425c6f2.entry.js} +2 -2
  577. package/dist/web-components-library/p-f703660d.entry.js +2 -0
  578. package/{www/build/p-49e4ce84.entry.js → dist/web-components-library/p-f8bbca6e.entry.js} +2 -2
  579. package/dist/web-components-library/web-components-library.esm.js +1 -1
  580. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  581. package/loader/index.d.ts +3 -0
  582. package/package.json +16 -18
  583. package/www/build/index.esm.js +1 -1
  584. package/www/build/p-04c39e8a.entry.js +2 -0
  585. package/www/build/p-04c39e8a.entry.js.map +1 -0
  586. package/www/build/p-0542a3c9.entry.js +2 -0
  587. package/www/build/p-0542a3c9.entry.js.map +1 -0
  588. package/www/build/{p-6319b5e2.entry.js → p-06d98334.entry.js} +2 -2
  589. package/www/build/{p-2672e36f.entry.js → p-100c6243.entry.js} +2 -2
  590. package/www/build/p-16d625b3.entry.js +2 -0
  591. package/www/build/p-16d625b3.entry.js.map +1 -0
  592. package/{dist/web-components-library/p-28928bb6.entry.js → www/build/p-1896cc54.entry.js} +2 -2
  593. package/{dist/web-components-library/p-19f8c3d2.entry.js → www/build/p-1cc37aa7.entry.js} +2 -2
  594. package/{dist/web-components-library/p-c0bdbfb5.entry.js → www/build/p-273f3c53.entry.js} +2 -2
  595. package/www/build/{p-4f7dd068.entry.js → p-28018cd3.entry.js} +2 -2
  596. package/{dist/web-components-library/p-12d62027.entry.js → www/build/p-296924ea.entry.js} +2 -2
  597. package/www/build/p-2b1fd95a.entry.js +2 -0
  598. package/www/build/{p-99b791d1.entry.js → p-2e432a39.entry.js} +2 -2
  599. package/www/build/{p-af856537.entry.js → p-2f662fea.entry.js} +2 -2
  600. package/www/build/{p-8a10fec5.entry.js → p-38d5e74f.entry.js} +2 -2
  601. package/www/build/p-3ae8fb1a.entry.js +2 -0
  602. package/www/build/{p-304eeab0.js → p-3dbad75e.js} +2 -2
  603. package/{dist/web-components-library/p-be4878f2.entry.js → www/build/p-4537f922.entry.js} +2 -2
  604. package/www/build/{p-91c04edc.entry.js → p-45dc157c.entry.js} +2 -2
  605. package/www/build/{p-e366782c.entry.js → p-46d98609.entry.js} +2 -2
  606. package/{dist/web-components-library/p-7d7c5344.js → www/build/p-4a2e0034.js} +2 -2
  607. package/www/build/p-4f3f8578.entry.js +2 -0
  608. package/www/build/p-5145a606.js +2 -0
  609. package/www/build/p-5145a606.js.map +1 -0
  610. package/{dist/web-components-library/p-e5dc0719.entry.js → www/build/p-51f1c9c0.entry.js} +2 -2
  611. package/{dist/web-components-library/p-e1852de3.entry.js → www/build/p-5a0f0978.entry.js} +2 -2
  612. package/www/build/{p-6586441a.entry.js → p-5a178c69.entry.js} +3 -3
  613. package/www/build/p-5a178c69.entry.js.map +1 -0
  614. package/www/build/{p-cf2640b0.entry.js → p-608c35ba.entry.js} +2 -2
  615. package/{dist/web-components-library/p-cf2640b0.entry.js.map → www/build/p-608c35ba.entry.js.map} +1 -1
  616. package/www/build/{p-26b5c84d.js → p-60f410df.js} +2 -2
  617. package/www/build/p-63ec7bad.entry.js +2 -0
  618. package/www/build/p-64364cbf.entry.js +2 -0
  619. package/www/build/p-64364cbf.entry.js.map +1 -0
  620. package/www/build/p-64aab82f.js +2 -0
  621. package/www/build/p-67e5e8ed.js +2 -0
  622. package/www/build/p-67e5e8ed.js.map +1 -0
  623. package/www/build/{p-57eee056.entry.js → p-68f4fbc8.entry.js} +2 -2
  624. package/www/build/{p-f21bc3a9.entry.js → p-6a1b3e86.entry.js} +2 -2
  625. package/www/build/{p-05e9ae1e.entry.js → p-6db2fd46.entry.js} +2 -2
  626. package/{dist/web-components-library/p-83350b5f.entry.js → www/build/p-707e5f91.entry.js} +2 -2
  627. package/www/build/p-75c4a726.js +3 -0
  628. package/www/build/p-75c4a726.js.map +1 -0
  629. package/{dist/web-components-library/p-85f84e55.entry.js → www/build/p-777ad335.entry.js} +2 -2
  630. package/www/build/p-777ad335.entry.js.map +1 -0
  631. package/{dist/web-components-library/p-b84fa3b6.entry.js → www/build/p-7aba5af3.entry.js} +2 -2
  632. package/www/build/p-7d5bf905.entry.js +2 -0
  633. package/www/build/{p-324ef970.entry.js → p-820b48f6.entry.js} +2 -2
  634. package/www/build/p-823c45d4.entry.js +2 -0
  635. package/{dist/web-components-library/p-8c9f7cef.entry.js → www/build/p-855334f4.entry.js} +2 -2
  636. package/www/build/{p-aa0f083b.js → p-8a6a4d22.js} +2 -2
  637. package/{dist/web-components-library/p-8b309268.entry.js → www/build/p-8d56e74b.entry.js} +2 -2
  638. package/www/build/p-8d56e74b.entry.js.map +1 -0
  639. package/www/build/{p-d9e1d8c7.js → p-95cb8701.js} +2 -2
  640. package/www/build/p-9a1b51ed.entry.js +2 -0
  641. package/{dist/web-components-library/p-ad76b8ff.entry.js.map → www/build/p-9a1b51ed.entry.js.map} +1 -1
  642. package/www/build/{p-4552744b.entry.js → p-9b9a04ad.entry.js} +2 -2
  643. package/www/build/{p-77d8ad7e.entry.js → p-a0fd1323.entry.js} +2 -2
  644. package/www/build/p-a64a1bf0.entry.js +2 -0
  645. package/www/build/p-a64a1bf0.entry.js.map +1 -0
  646. package/www/build/p-aaae6b16.entry.js +2 -0
  647. package/www/build/{p-97b0c3b3.entry.js.map → p-aaae6b16.entry.js.map} +1 -1
  648. package/www/build/p-ab7f129e.entry.js +2 -0
  649. package/www/build/{p-6f4dd02b.entry.js.map → p-ab7f129e.entry.js.map} +1 -1
  650. package/{dist/web-components-library/p-088a31dc.entry.js → www/build/p-acd911aa.entry.js} +2 -2
  651. package/{dist/web-components-library/p-a4ada10b.entry.js → www/build/p-ad97fdc4.entry.js} +2 -2
  652. package/www/build/p-ae5cec65.js +2 -0
  653. package/www/build/{p-57ecb5a7.entry.js → p-b2356bc7.entry.js} +2 -2
  654. package/www/build/p-c1e498ac.entry.js +2 -0
  655. package/www/build/{p-a5781264.entry.js → p-c54d0925.entry.js} +2 -2
  656. package/www/build/p-c679277c.entry.js +2 -0
  657. package/{dist/web-components-library/p-df05727f.entry.js.map → www/build/p-c679277c.entry.js.map} +1 -1
  658. package/www/build/p-cc71a90c.entry.js +2 -0
  659. package/{dist/web-components-library/p-c90249e5.entry.js → www/build/p-cd0219b4.entry.js} +2 -2
  660. package/{dist/web-components-library/p-6a664748.entry.js → www/build/p-d5f5e107.entry.js} +2 -2
  661. package/www/build/p-d5f5e107.entry.js.map +1 -0
  662. package/www/build/{p-88e756cd.entry.js → p-da7200c2.entry.js} +2 -2
  663. package/{dist/web-components-library/p-ae96bc09.entry.js → www/build/p-df8c381a.entry.js} +2 -2
  664. package/www/build/{p-3b266de4.entry.js → p-df9c3674.entry.js} +2 -2
  665. package/www/build/{p-609c11d6.entry.js → p-e25d7f0a.entry.js} +2 -2
  666. package/www/build/{p-33eea921.entry.js → p-e4d97fbf.entry.js} +2 -2
  667. package/www/build/{p-f74f9f3c.entry.js → p-e529a714.entry.js} +2 -2
  668. package/www/build/{p-21b85c7f.entry.js → p-ea9c0ff3.entry.js} +2 -2
  669. package/www/build/{p-2a7e4988.entry.js → p-f06ad42c.entry.js} +2 -2
  670. package/www/build/{p-8499a29d.entry.js → p-f15d0a00.entry.js} +2 -2
  671. package/{dist/web-components-library/p-63e970ee.entry.js → www/build/p-f425c6f2.entry.js} +2 -2
  672. package/www/build/p-f703660d.entry.js +2 -0
  673. package/{dist/web-components-library/p-49e4ce84.entry.js → www/build/p-f8bbca6e.entry.js} +2 -2
  674. package/www/build/web-components-library.esm.js +1 -1
  675. package/www/build/web-components-library.esm.js.map +1 -1
  676. package/www/index.html +3 -1
  677. package/dist/.storybook/elements/args-controls.js +0 -78
  678. package/dist/.storybook/elements/args-controls.js.map +0 -1
  679. package/dist/.storybook/elements/docs-template.js +0 -11
  680. package/dist/.storybook/elements/docs-template.js.map +0 -1
  681. package/dist/cjs/breakpoints-5c22092a.js +0 -11
  682. package/dist/cjs/breakpoints-5c22092a.js.map +0 -1
  683. package/dist/cjs/index-e801ae96.js.map +0 -1
  684. package/dist/cjs/utils-6bd8c55e.js.map +0 -1
  685. package/dist/collection/assets/orientamento.svg +0 -14
  686. package/dist/collection/components/date-picker/z-date-picker/index.spec.js +0 -38
  687. package/dist/collection/components/date-picker/z-date-picker/index.spec.js.map +0 -1
  688. package/dist/collection/components/date-picker/z-range-picker/index.spec.js +0 -25
  689. package/dist/collection/components/date-picker/z-range-picker/index.spec.js.map +0 -1
  690. package/dist/collection/components/deprecated/z-app-header-deprecated/index.spec.js +0 -203
  691. package/dist/collection/components/deprecated/z-app-header-deprecated/index.spec.js.map +0 -1
  692. package/dist/collection/components/deprecated/z-menu-deprecated/index.spec.js +0 -120
  693. package/dist/collection/components/deprecated/z-menu-deprecated/index.spec.js.map +0 -1
  694. package/dist/collection/components/deprecated/z-menu-section-deprecated/index.spec.js +0 -50
  695. package/dist/collection/components/deprecated/z-menu-section-deprecated/index.spec.js.map +0 -1
  696. package/dist/collection/components/file-upload/z-dragdrop-area/index.spec.js +0 -55
  697. package/dist/collection/components/file-upload/z-dragdrop-area/index.spec.js.map +0 -1
  698. package/dist/collection/components/file-upload/z-file/index.spec.js +0 -20
  699. package/dist/collection/components/file-upload/z-file/index.spec.js.map +0 -1
  700. package/dist/collection/components/file-upload/z-file-upload/index.spec.js +0 -135
  701. package/dist/collection/components/file-upload/z-file-upload/index.spec.js.map +0 -1
  702. package/dist/collection/components/file-upload/z-file-upload/test.e2e.js +0 -69
  703. package/dist/collection/components/file-upload/z-file-upload/test.e2e.js.map +0 -1
  704. package/dist/collection/components/list/z-list/index.spec.js +0 -33
  705. package/dist/collection/components/list/z-list/index.spec.js.map +0 -1
  706. package/dist/collection/components/list/z-list-element/index.spec.js +0 -135
  707. package/dist/collection/components/list/z-list-element/index.spec.js.map +0 -1
  708. package/dist/collection/components/list/z-list-group/index.spec.js +0 -39
  709. package/dist/collection/components/list/z-list-group/index.spec.js.map +0 -1
  710. package/dist/collection/components/z-app-header/index.spec.js +0 -617
  711. package/dist/collection/components/z-app-header/index.spec.js.map +0 -1
  712. package/dist/collection/components/z-aria-alert/index.spec.js +0 -14
  713. package/dist/collection/components/z-aria-alert/index.spec.js.map +0 -1
  714. package/dist/collection/components/z-avatar/index.spec.js +0 -98
  715. package/dist/collection/components/z-avatar/index.spec.js.map +0 -1
  716. package/dist/collection/components/z-book-card/index.spec.js +0 -679
  717. package/dist/collection/components/z-book-card/index.spec.js.map +0 -1
  718. package/dist/collection/components/z-breadcrumb/index.spec.js +0 -39
  719. package/dist/collection/components/z-breadcrumb/index.spec.js.map +0 -1
  720. package/dist/collection/components/z-button/index.spec.js +0 -101
  721. package/dist/collection/components/z-button/index.spec.js.map +0 -1
  722. package/dist/collection/components/z-button-sort/index.spec.js +0 -139
  723. package/dist/collection/components/z-button-sort/index.spec.js.map +0 -1
  724. package/dist/collection/components/z-button-sort/test.e2e.js +0 -29
  725. package/dist/collection/components/z-button-sort/test.e2e.js.map +0 -1
  726. package/dist/collection/components/z-card/index.spec.js +0 -179
  727. package/dist/collection/components/z-card/index.spec.js.map +0 -1
  728. package/dist/collection/components/z-chip/index.spec.js +0 -108
  729. package/dist/collection/components/z-chip/index.spec.js.map +0 -1
  730. package/dist/collection/components/z-chip/test.e2e.js +0 -32
  731. package/dist/collection/components/z-chip/test.e2e.js.map +0 -1
  732. package/dist/collection/components/z-combobox/index.spec.js +0 -475
  733. package/dist/collection/components/z-combobox/index.spec.js.map +0 -1
  734. package/dist/collection/components/z-combobox/test.e2e.js +0 -45
  735. package/dist/collection/components/z-combobox/test.e2e.js.map +0 -1
  736. package/dist/collection/components/z-divider/index.spec.js +0 -82
  737. package/dist/collection/components/z-divider/index.spec.js.map +0 -1
  738. package/dist/collection/components/z-ghost-loading/index.spec.js +0 -16
  739. package/dist/collection/components/z-ghost-loading/index.spec.js.map +0 -1
  740. package/dist/collection/components/z-icon/index.spec.js +0 -96
  741. package/dist/collection/components/z-icon/index.spec.js.map +0 -1
  742. package/dist/collection/components/z-info-box/index.spec.js +0 -71
  743. package/dist/collection/components/z-info-box/index.spec.js.map +0 -1
  744. package/dist/collection/components/z-input/test-checkbox.spec.js +0 -114
  745. package/dist/collection/components/z-input/test-checkbox.spec.js.map +0 -1
  746. package/dist/collection/components/z-input/test-methods.spec.js +0 -13
  747. package/dist/collection/components/z-input/test-methods.spec.js.map +0 -1
  748. package/dist/collection/components/z-input/test-radio.spec.js +0 -114
  749. package/dist/collection/components/z-input/test-radio.spec.js.map +0 -1
  750. package/dist/collection/components/z-input/test-text.spec.js +0 -347
  751. package/dist/collection/components/z-input/test-text.spec.js.map +0 -1
  752. package/dist/collection/components/z-input/test-textarea.spec.js +0 -54
  753. package/dist/collection/components/z-input/test-textarea.spec.js.map +0 -1
  754. package/dist/collection/components/z-input/test.e2e.js +0 -180
  755. package/dist/collection/components/z-input/test.e2e.js.map +0 -1
  756. package/dist/collection/components/z-input-message/index.spec.js +0 -45
  757. package/dist/collection/components/z-input-message/index.spec.js.map +0 -1
  758. package/dist/collection/components/z-logo/index.spec.js +0 -74
  759. package/dist/collection/components/z-logo/index.spec.js.map +0 -1
  760. package/dist/collection/components/z-menu/index.spec.js +0 -136
  761. package/dist/collection/components/z-menu/index.spec.js.map +0 -1
  762. package/dist/collection/components/z-menu-section/index.spec.js +0 -50
  763. package/dist/collection/components/z-menu-section/index.spec.js.map +0 -1
  764. package/dist/collection/components/z-modal/index.spec.js +0 -192
  765. package/dist/collection/components/z-modal/index.spec.js.map +0 -1
  766. package/dist/collection/components/z-modal/test.e2e.js +0 -81
  767. package/dist/collection/components/z-modal/test.e2e.js.map +0 -1
  768. package/dist/collection/components/z-notification/index.spec.js +0 -84
  769. package/dist/collection/components/z-notification/index.spec.js.map +0 -1
  770. package/dist/collection/components/z-notification/test.e2e.js +0 -25
  771. package/dist/collection/components/z-notification/test.e2e.js.map +0 -1
  772. package/dist/collection/components/z-offcanvas/index.spec.js +0 -42
  773. package/dist/collection/components/z-offcanvas/index.spec.js.map +0 -1
  774. package/dist/collection/components/z-pagination/index.spec.js +0 -36
  775. package/dist/collection/components/z-pagination/index.spec.js.map +0 -1
  776. package/dist/collection/components/z-panel-elem/index.spec.js +0 -284
  777. package/dist/collection/components/z-panel-elem/index.spec.js.map +0 -1
  778. package/dist/collection/components/z-searchbar/index.spec.js +0 -395
  779. package/dist/collection/components/z-searchbar/index.spec.js.map +0 -1
  780. package/dist/collection/components/z-searchbar/test.e2e.js +0 -90
  781. package/dist/collection/components/z-searchbar/test.e2e.js.map +0 -1
  782. package/dist/collection/components/z-section-title/index.spec.js +0 -27
  783. package/dist/collection/components/z-section-title/index.spec.js.map +0 -1
  784. package/dist/collection/components/z-select/index.spec.js +0 -698
  785. package/dist/collection/components/z-select/index.spec.js.map +0 -1
  786. package/dist/collection/components/z-select/test.e2e.js +0 -121
  787. package/dist/collection/components/z-select/test.e2e.js.map +0 -1
  788. package/dist/collection/components/z-skip-to-content/index.spec.js +0 -28
  789. package/dist/collection/components/z-skip-to-content/index.spec.js.map +0 -1
  790. package/dist/collection/components/z-stepper/index.spec.js +0 -38
  791. package/dist/collection/components/z-stepper/index.spec.js.map +0 -1
  792. package/dist/collection/components/z-stepper-item/index.spec.js +0 -105
  793. package/dist/collection/components/z-stepper-item/index.spec.js.map +0 -1
  794. package/dist/collection/components/z-tag/index.spec.js +0 -58
  795. package/dist/collection/components/z-tag/index.spec.js.map +0 -1
  796. package/dist/collection/components/z-toast-notification/index.spec.js +0 -104
  797. package/dist/collection/components/z-toast-notification/index.spec.js.map +0 -1
  798. package/dist/collection/components/z-toast-notification-list/index.spec.js +0 -57
  799. package/dist/collection/components/z-toast-notification-list/index.spec.js.map +0 -1
  800. package/dist/collection/components/z-toast-notification-list/test.e2e.js +0 -69
  801. package/dist/collection/components/z-toast-notification-list/test.e2e.js.map +0 -1
  802. package/dist/collection/components/z-toggle-button/index.spec.js +0 -124
  803. package/dist/collection/components/z-toggle-button/index.spec.js.map +0 -1
  804. package/dist/collection/components/z-toggle-button/test.e2e.js +0 -12
  805. package/dist/collection/components/z-toggle-button/test.e2e.js.map +0 -1
  806. package/dist/collection/components/z-toggle-switch/index.spec.js +0 -149
  807. package/dist/collection/components/z-toggle-switch/index.spec.js.map +0 -1
  808. package/dist/collection/components/z-toggle-switch/test.e2e.js +0 -22
  809. package/dist/collection/components/z-toggle-switch/test.e2e.js.map +0 -1
  810. package/dist/collection/components/z-visually-hidden/index.spec.js +0 -18
  811. package/dist/collection/components/z-visually-hidden/index.spec.js.map +0 -1
  812. package/dist/collection/snowflakes/myz/card/z-myz-card/index.spec.js +0 -20
  813. package/dist/collection/snowflakes/myz/card/z-myz-card/index.spec.js.map +0 -1
  814. package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.spec.js +0 -128
  815. package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.spec.js.map +0 -1
  816. package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.spec.js +0 -21
  817. package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.spec.js.map +0 -1
  818. package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.spec.js +0 -33
  819. package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.spec.js.map +0 -1
  820. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.spec.js +0 -121
  821. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.spec.js.map +0 -1
  822. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.spec.js +0 -199
  823. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.spec.js.map +0 -1
  824. package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.spec.js +0 -54
  825. package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.spec.js.map +0 -1
  826. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.spec.js +0 -22
  827. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.spec.js.map +0 -1
  828. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.spec.js +0 -56
  829. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.spec.js.map +0 -1
  830. package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.spec.js +0 -136
  831. package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.spec.js.map +0 -1
  832. package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.spec.js +0 -39
  833. package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.spec.js.map +0 -1
  834. package/dist/collection/snowflakes/myz/list/z-myz-list/index.spec.js +0 -140
  835. package/dist/collection/snowflakes/myz/list/z-myz-list/index.spec.js.map +0 -1
  836. package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.spec.js +0 -80
  837. package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.spec.js.map +0 -1
  838. package/dist/collection/snowflakes/myz/z-alert/index.spec.js +0 -20
  839. package/dist/collection/snowflakes/myz/z-alert/index.spec.js.map +0 -1
  840. package/dist/collection/snowflakes/myz/z-otp/index.spec.js +0 -74
  841. package/dist/collection/snowflakes/myz/z-otp/index.spec.js.map +0 -1
  842. package/dist/collection/snowflakes/myz/z-otp/test.e2e.js +0 -23
  843. package/dist/collection/snowflakes/myz/z-otp/test.e2e.js.map +0 -1
  844. package/dist/collection/snowflakes/myz/z-slideshow/index.spec.js +0 -193
  845. package/dist/collection/snowflakes/myz/z-slideshow/index.spec.js.map +0 -1
  846. package/dist/collection/utils/utils.spec.js +0 -16
  847. package/dist/collection/utils/utils.spec.js.map +0 -1
  848. package/dist/docs/grid/index.stories.js +0 -47
  849. package/dist/docs/grid/index.stories.js.map +0 -1
  850. package/dist/docs/iconset/index.stories.js +0 -32
  851. package/dist/docs/iconset/index.stories.js.map +0 -1
  852. package/dist/docs/themes/index.stories.js +0 -90
  853. package/dist/docs/themes/index.stories.js.map +0 -1
  854. package/dist/esm/breakpoints-680e0e56.js +0 -7
  855. package/dist/esm/breakpoints-680e0e56.js.map +0 -1
  856. package/dist/esm/index-a2130b6a.js.map +0 -1
  857. package/dist/esm/utils-8ade9e2d.js.map +0 -1
  858. package/dist/types/home/runner/work/design-system/design-system/.stencil/.storybook/elements/args-controls.d.ts +0 -13
  859. package/dist/types/home/runner/work/design-system/design-system/.stencil/.storybook/elements/docs-template.d.ts +0 -5
  860. package/dist/types/home/runner/work/design-system/design-system/.stencil/docs/grid/index.stories.d.ts +0 -9
  861. package/dist/types/home/runner/work/design-system/design-system/.stencil/docs/iconset/index.stories.d.ts +0 -11
  862. package/dist/types/home/runner/work/design-system/design-system/.stencil/docs/themes/index.stories.d.ts +0 -27
  863. package/dist/web-components-library/p-054484d4.entry.js +0 -2
  864. package/dist/web-components-library/p-054484d4.entry.js.map +0 -1
  865. package/dist/web-components-library/p-0794ae16.entry.js +0 -2
  866. package/dist/web-components-library/p-2c184714.js +0 -2
  867. package/dist/web-components-library/p-2c184714.js.map +0 -1
  868. package/dist/web-components-library/p-2c886e8b.js +0 -2
  869. package/dist/web-components-library/p-2c886e8b.js.map +0 -1
  870. package/dist/web-components-library/p-385bf4ca.entry.js +0 -2
  871. package/dist/web-components-library/p-6586441a.entry.js.map +0 -1
  872. package/dist/web-components-library/p-68822fbc.entry.js +0 -2
  873. package/dist/web-components-library/p-6a664748.entry.js.map +0 -1
  874. package/dist/web-components-library/p-6b2cd695.entry.js +0 -2
  875. package/dist/web-components-library/p-6f4dd02b.entry.js +0 -2
  876. package/dist/web-components-library/p-74a65c6f.entry.js +0 -2
  877. package/dist/web-components-library/p-7d827c11.js +0 -2
  878. package/dist/web-components-library/p-85f84e55.entry.js.map +0 -1
  879. package/dist/web-components-library/p-89584f19.entry.js +0 -2
  880. package/dist/web-components-library/p-8a728e82.entry.js +0 -2
  881. package/dist/web-components-library/p-8a728e82.entry.js.map +0 -1
  882. package/dist/web-components-library/p-8b309268.entry.js.map +0 -1
  883. package/dist/web-components-library/p-8c517cd7.entry.js +0 -2
  884. package/dist/web-components-library/p-8c517cd7.entry.js.map +0 -1
  885. package/dist/web-components-library/p-8d7323f7.entry.js +0 -2
  886. package/dist/web-components-library/p-8d7323f7.entry.js.map +0 -1
  887. package/dist/web-components-library/p-97b0c3b3.entry.js +0 -2
  888. package/dist/web-components-library/p-a7292e1c.entry.js +0 -2
  889. package/dist/web-components-library/p-ad76b8ff.entry.js +0 -2
  890. package/dist/web-components-library/p-cfa39bd3.js +0 -3
  891. package/dist/web-components-library/p-cfa39bd3.js.map +0 -1
  892. package/dist/web-components-library/p-df05727f.entry.js +0 -2
  893. package/dist/web-components-library/p-ed2c8484.entry.js +0 -2
  894. package/dist/web-components-library/p-f8d45aa4.entry.js +0 -2
  895. package/dist/web-components-library/p-fe87b081.entry.js +0 -2
  896. package/dist/web-components-library/p-fe87b081.entry.js.map +0 -1
  897. package/www/assets/orientamento.svg +0 -14
  898. package/www/build/p-054484d4.entry.js +0 -2
  899. package/www/build/p-054484d4.entry.js.map +0 -1
  900. package/www/build/p-0794ae16.entry.js +0 -2
  901. package/www/build/p-2c184714.js +0 -2
  902. package/www/build/p-2c184714.js.map +0 -1
  903. package/www/build/p-2c886e8b.js +0 -2
  904. package/www/build/p-2c886e8b.js.map +0 -1
  905. package/www/build/p-385bf4ca.entry.js +0 -2
  906. package/www/build/p-6586441a.entry.js.map +0 -1
  907. package/www/build/p-68822fbc.entry.js +0 -2
  908. package/www/build/p-6a664748.entry.js.map +0 -1
  909. package/www/build/p-6b2cd695.entry.js +0 -2
  910. package/www/build/p-6f4dd02b.entry.js +0 -2
  911. package/www/build/p-74a65c6f.entry.js +0 -2
  912. package/www/build/p-7d827c11.js +0 -2
  913. package/www/build/p-85f84e55.entry.js.map +0 -1
  914. package/www/build/p-89584f19.entry.js +0 -2
  915. package/www/build/p-8a728e82.entry.js +0 -2
  916. package/www/build/p-8a728e82.entry.js.map +0 -1
  917. package/www/build/p-8b309268.entry.js.map +0 -1
  918. package/www/build/p-8c517cd7.entry.js +0 -2
  919. package/www/build/p-8c517cd7.entry.js.map +0 -1
  920. package/www/build/p-8d7323f7.entry.js +0 -2
  921. package/www/build/p-8d7323f7.entry.js.map +0 -1
  922. package/www/build/p-97b0c3b3.entry.js +0 -2
  923. package/www/build/p-a7292e1c.entry.js +0 -2
  924. package/www/build/p-ad76b8ff.entry.js +0 -2
  925. package/www/build/p-cfa39bd3.js +0 -3
  926. package/www/build/p-cfa39bd3.js.map +0 -1
  927. package/www/build/p-dc60b359.js +0 -2
  928. package/www/build/p-df05727f.entry.js +0 -2
  929. package/www/build/p-ed2c8484.entry.js +0 -2
  930. package/www/build/p-f8d45aa4.entry.js +0 -2
  931. package/www/build/p-fe87b081.entry.js +0 -2
  932. package/www/build/p-fe87b081.entry.js.map +0 -1
  933. /package/dist/web-components-library/{p-6319b5e2.entry.js.map → p-06d98334.entry.js.map} +0 -0
  934. /package/dist/web-components-library/{p-2672e36f.entry.js.map → p-100c6243.entry.js.map} +0 -0
  935. /package/dist/web-components-library/{p-28928bb6.entry.js.map → p-1896cc54.entry.js.map} +0 -0
  936. /package/dist/web-components-library/{p-19f8c3d2.entry.js.map → p-1cc37aa7.entry.js.map} +0 -0
  937. /package/dist/web-components-library/{p-c0bdbfb5.entry.js.map → p-273f3c53.entry.js.map} +0 -0
  938. /package/dist/web-components-library/{p-4f7dd068.entry.js.map → p-28018cd3.entry.js.map} +0 -0
  939. /package/dist/web-components-library/{p-12d62027.entry.js.map → p-296924ea.entry.js.map} +0 -0
  940. /package/dist/web-components-library/{p-0794ae16.entry.js.map → p-2b1fd95a.entry.js.map} +0 -0
  941. /package/dist/web-components-library/{p-99b791d1.entry.js.map → p-2e432a39.entry.js.map} +0 -0
  942. /package/dist/web-components-library/{p-af856537.entry.js.map → p-2f662fea.entry.js.map} +0 -0
  943. /package/dist/web-components-library/{p-8a10fec5.entry.js.map → p-38d5e74f.entry.js.map} +0 -0
  944. /package/dist/web-components-library/{p-6b2cd695.entry.js.map → p-3ae8fb1a.entry.js.map} +0 -0
  945. /package/dist/web-components-library/{p-304eeab0.js.map → p-3dbad75e.js.map} +0 -0
  946. /package/dist/web-components-library/{p-be4878f2.entry.js.map → p-4537f922.entry.js.map} +0 -0
  947. /package/dist/web-components-library/{p-91c04edc.entry.js.map → p-45dc157c.entry.js.map} +0 -0
  948. /package/dist/web-components-library/{p-e366782c.entry.js.map → p-46d98609.entry.js.map} +0 -0
  949. /package/dist/web-components-library/{p-7d7c5344.js.map → p-4a2e0034.js.map} +0 -0
  950. /package/dist/web-components-library/{p-68822fbc.entry.js.map → p-4f3f8578.entry.js.map} +0 -0
  951. /package/dist/web-components-library/{p-e5dc0719.entry.js.map → p-51f1c9c0.entry.js.map} +0 -0
  952. /package/dist/web-components-library/{p-e1852de3.entry.js.map → p-5a0f0978.entry.js.map} +0 -0
  953. /package/dist/web-components-library/{p-26b5c84d.js.map → p-60f410df.js.map} +0 -0
  954. /package/dist/web-components-library/{p-74a65c6f.entry.js.map → p-63ec7bad.entry.js.map} +0 -0
  955. /package/dist/web-components-library/{p-7d827c11.js.map → p-64aab82f.js.map} +0 -0
  956. /package/dist/web-components-library/{p-57eee056.entry.js.map → p-68f4fbc8.entry.js.map} +0 -0
  957. /package/dist/web-components-library/{p-f21bc3a9.entry.js.map → p-6a1b3e86.entry.js.map} +0 -0
  958. /package/dist/web-components-library/{p-05e9ae1e.entry.js.map → p-6db2fd46.entry.js.map} +0 -0
  959. /package/dist/web-components-library/{p-83350b5f.entry.js.map → p-707e5f91.entry.js.map} +0 -0
  960. /package/dist/web-components-library/{p-b84fa3b6.entry.js.map → p-7aba5af3.entry.js.map} +0 -0
  961. /package/dist/web-components-library/{p-a7292e1c.entry.js.map → p-7d5bf905.entry.js.map} +0 -0
  962. /package/dist/web-components-library/{p-324ef970.entry.js.map → p-820b48f6.entry.js.map} +0 -0
  963. /package/dist/web-components-library/{p-ed2c8484.entry.js.map → p-823c45d4.entry.js.map} +0 -0
  964. /package/dist/web-components-library/{p-8c9f7cef.entry.js.map → p-855334f4.entry.js.map} +0 -0
  965. /package/dist/web-components-library/{p-aa0f083b.js.map → p-8a6a4d22.js.map} +0 -0
  966. /package/dist/web-components-library/{p-d9e1d8c7.js.map → p-95cb8701.js.map} +0 -0
  967. /package/dist/web-components-library/{p-4552744b.entry.js.map → p-9b9a04ad.entry.js.map} +0 -0
  968. /package/dist/web-components-library/{p-77d8ad7e.entry.js.map → p-a0fd1323.entry.js.map} +0 -0
  969. /package/dist/web-components-library/{p-088a31dc.entry.js.map → p-acd911aa.entry.js.map} +0 -0
  970. /package/dist/web-components-library/{p-a4ada10b.entry.js.map → p-ad97fdc4.entry.js.map} +0 -0
  971. /package/dist/web-components-library/{p-57ecb5a7.entry.js.map → p-b2356bc7.entry.js.map} +0 -0
  972. /package/dist/web-components-library/{p-385bf4ca.entry.js.map → p-c1e498ac.entry.js.map} +0 -0
  973. /package/dist/web-components-library/{p-a5781264.entry.js.map → p-c54d0925.entry.js.map} +0 -0
  974. /package/dist/web-components-library/{p-89584f19.entry.js.map → p-cc71a90c.entry.js.map} +0 -0
  975. /package/dist/web-components-library/{p-c90249e5.entry.js.map → p-cd0219b4.entry.js.map} +0 -0
  976. /package/dist/web-components-library/{p-88e756cd.entry.js.map → p-da7200c2.entry.js.map} +0 -0
  977. /package/dist/web-components-library/{p-ae96bc09.entry.js.map → p-df8c381a.entry.js.map} +0 -0
  978. /package/dist/web-components-library/{p-3b266de4.entry.js.map → p-df9c3674.entry.js.map} +0 -0
  979. /package/dist/web-components-library/{p-609c11d6.entry.js.map → p-e25d7f0a.entry.js.map} +0 -0
  980. /package/dist/web-components-library/{p-33eea921.entry.js.map → p-e4d97fbf.entry.js.map} +0 -0
  981. /package/dist/web-components-library/{p-f74f9f3c.entry.js.map → p-e529a714.entry.js.map} +0 -0
  982. /package/dist/web-components-library/{p-21b85c7f.entry.js.map → p-ea9c0ff3.entry.js.map} +0 -0
  983. /package/dist/web-components-library/{p-2a7e4988.entry.js.map → p-f06ad42c.entry.js.map} +0 -0
  984. /package/dist/web-components-library/{p-8499a29d.entry.js.map → p-f15d0a00.entry.js.map} +0 -0
  985. /package/dist/web-components-library/{p-63e970ee.entry.js.map → p-f425c6f2.entry.js.map} +0 -0
  986. /package/dist/web-components-library/{p-f8d45aa4.entry.js.map → p-f703660d.entry.js.map} +0 -0
  987. /package/dist/web-components-library/{p-49e4ce84.entry.js.map → p-f8bbca6e.entry.js.map} +0 -0
  988. /package/www/build/{p-6319b5e2.entry.js.map → p-06d98334.entry.js.map} +0 -0
  989. /package/www/build/{p-2672e36f.entry.js.map → p-100c6243.entry.js.map} +0 -0
  990. /package/www/build/{p-28928bb6.entry.js.map → p-1896cc54.entry.js.map} +0 -0
  991. /package/www/build/{p-19f8c3d2.entry.js.map → p-1cc37aa7.entry.js.map} +0 -0
  992. /package/www/build/{p-c0bdbfb5.entry.js.map → p-273f3c53.entry.js.map} +0 -0
  993. /package/www/build/{p-4f7dd068.entry.js.map → p-28018cd3.entry.js.map} +0 -0
  994. /package/www/build/{p-12d62027.entry.js.map → p-296924ea.entry.js.map} +0 -0
  995. /package/www/build/{p-0794ae16.entry.js.map → p-2b1fd95a.entry.js.map} +0 -0
  996. /package/www/build/{p-99b791d1.entry.js.map → p-2e432a39.entry.js.map} +0 -0
  997. /package/www/build/{p-af856537.entry.js.map → p-2f662fea.entry.js.map} +0 -0
  998. /package/www/build/{p-8a10fec5.entry.js.map → p-38d5e74f.entry.js.map} +0 -0
  999. /package/www/build/{p-6b2cd695.entry.js.map → p-3ae8fb1a.entry.js.map} +0 -0
  1000. /package/www/build/{p-304eeab0.js.map → p-3dbad75e.js.map} +0 -0
  1001. /package/www/build/{p-be4878f2.entry.js.map → p-4537f922.entry.js.map} +0 -0
  1002. /package/www/build/{p-91c04edc.entry.js.map → p-45dc157c.entry.js.map} +0 -0
  1003. /package/www/build/{p-e366782c.entry.js.map → p-46d98609.entry.js.map} +0 -0
  1004. /package/www/build/{p-7d7c5344.js.map → p-4a2e0034.js.map} +0 -0
  1005. /package/www/build/{p-68822fbc.entry.js.map → p-4f3f8578.entry.js.map} +0 -0
  1006. /package/www/build/{p-e5dc0719.entry.js.map → p-51f1c9c0.entry.js.map} +0 -0
  1007. /package/www/build/{p-e1852de3.entry.js.map → p-5a0f0978.entry.js.map} +0 -0
  1008. /package/www/build/{p-26b5c84d.js.map → p-60f410df.js.map} +0 -0
  1009. /package/www/build/{p-74a65c6f.entry.js.map → p-63ec7bad.entry.js.map} +0 -0
  1010. /package/www/build/{p-7d827c11.js.map → p-64aab82f.js.map} +0 -0
  1011. /package/www/build/{p-57eee056.entry.js.map → p-68f4fbc8.entry.js.map} +0 -0
  1012. /package/www/build/{p-f21bc3a9.entry.js.map → p-6a1b3e86.entry.js.map} +0 -0
  1013. /package/www/build/{p-05e9ae1e.entry.js.map → p-6db2fd46.entry.js.map} +0 -0
  1014. /package/www/build/{p-83350b5f.entry.js.map → p-707e5f91.entry.js.map} +0 -0
  1015. /package/www/build/{p-b84fa3b6.entry.js.map → p-7aba5af3.entry.js.map} +0 -0
  1016. /package/www/build/{p-a7292e1c.entry.js.map → p-7d5bf905.entry.js.map} +0 -0
  1017. /package/www/build/{p-324ef970.entry.js.map → p-820b48f6.entry.js.map} +0 -0
  1018. /package/www/build/{p-ed2c8484.entry.js.map → p-823c45d4.entry.js.map} +0 -0
  1019. /package/www/build/{p-8c9f7cef.entry.js.map → p-855334f4.entry.js.map} +0 -0
  1020. /package/www/build/{p-aa0f083b.js.map → p-8a6a4d22.js.map} +0 -0
  1021. /package/www/build/{p-d9e1d8c7.js.map → p-95cb8701.js.map} +0 -0
  1022. /package/www/build/{p-4552744b.entry.js.map → p-9b9a04ad.entry.js.map} +0 -0
  1023. /package/www/build/{p-77d8ad7e.entry.js.map → p-a0fd1323.entry.js.map} +0 -0
  1024. /package/www/build/{p-088a31dc.entry.js.map → p-acd911aa.entry.js.map} +0 -0
  1025. /package/www/build/{p-a4ada10b.entry.js.map → p-ad97fdc4.entry.js.map} +0 -0
  1026. /package/www/build/{p-57ecb5a7.entry.js.map → p-b2356bc7.entry.js.map} +0 -0
  1027. /package/www/build/{p-385bf4ca.entry.js.map → p-c1e498ac.entry.js.map} +0 -0
  1028. /package/www/build/{p-a5781264.entry.js.map → p-c54d0925.entry.js.map} +0 -0
  1029. /package/www/build/{p-89584f19.entry.js.map → p-cc71a90c.entry.js.map} +0 -0
  1030. /package/www/build/{p-c90249e5.entry.js.map → p-cd0219b4.entry.js.map} +0 -0
  1031. /package/www/build/{p-88e756cd.entry.js.map → p-da7200c2.entry.js.map} +0 -0
  1032. /package/www/build/{p-ae96bc09.entry.js.map → p-df8c381a.entry.js.map} +0 -0
  1033. /package/www/build/{p-3b266de4.entry.js.map → p-df9c3674.entry.js.map} +0 -0
  1034. /package/www/build/{p-609c11d6.entry.js.map → p-e25d7f0a.entry.js.map} +0 -0
  1035. /package/www/build/{p-33eea921.entry.js.map → p-e4d97fbf.entry.js.map} +0 -0
  1036. /package/www/build/{p-f74f9f3c.entry.js.map → p-e529a714.entry.js.map} +0 -0
  1037. /package/www/build/{p-21b85c7f.entry.js.map → p-ea9c0ff3.entry.js.map} +0 -0
  1038. /package/www/build/{p-2a7e4988.entry.js.map → p-f06ad42c.entry.js.map} +0 -0
  1039. /package/www/build/{p-8499a29d.entry.js.map → p-f15d0a00.entry.js.map} +0 -0
  1040. /package/www/build/{p-63e970ee.entry.js.map → p-f425c6f2.entry.js.map} +0 -0
  1041. /package/www/build/{p-f8d45aa4.entry.js.map → p-f703660d.entry.js.map} +0 -0
  1042. /package/www/build/{p-49e4ce84.entry.js.map → p-f8bbca6e.entry.js.map} +0 -0
@@ -1,152 +1,21 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  import { KeyboardCode } from "../../beans";
3
+ const isZMenuSection = (el) => (el === null || el === void 0 ? void 0 : el.tagName) === "Z-MENU-SECTION";
3
4
  /**
4
5
  * @slot - Menu label
5
6
  * @slot header - Header to display as the first entry of the open menu.
6
- * @slot item - Single entry of the section. Can be slotted multiple times to insert items onto the menu. Use `z-menu-section` for submenus.
7
+ * @slot item - Single entry of the section. Can be slotted multiple times to insert items onto the menu. Set the `active` HTML attribute on the element to highlight it. Use `z-menu-section` for submenus.
7
8
  * @cssprop --z-menu-label-color - Color of the label's text.
8
9
  */
9
10
  export class ZMenu {
11
+ get focusableItem() {
12
+ return this.items.find((item) => (isZMenuSection(item) ? item.htmlTabindex === 0 : item.tabIndex === 0));
13
+ }
10
14
  toggle() {
11
15
  if (!this.hasContent) {
12
16
  return;
13
17
  }
14
18
  this.open = !this.open;
15
- this.open ? this.opened.emit() : this.closed.emit();
16
- }
17
- /** Close the floating list when a click is performed outside of this Element. */
18
- handleClick(ev) {
19
- if (!this.floating || !this.open || this.hostElement.contains(ev.target)) {
20
- return;
21
- }
22
- this.reflow();
23
- this.open = false;
24
- this.closed.emit();
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
- }
123
- onOpenChanged() {
124
- if (this.open) {
125
- this.reflow(true);
126
- }
127
- else {
128
- cancelAnimationFrame(this.raf);
129
- }
130
- }
131
- constructor() {
132
- this.currentIndex = -1;
133
- this.currentCanvasOpenStatus = false;
134
- this.active = undefined;
135
- this.floating = true;
136
- this.open = false;
137
- this.verticalContext = false;
138
- this.hasHeader = undefined;
139
- this.hasContent = undefined;
140
- this.toggle = this.toggle.bind(this);
141
- this.checkContent = this.checkContent.bind(this);
142
- this.onLabelSlotChange = this.onLabelSlotChange.bind(this);
143
- this.onItemsChange = this.onItemsChange.bind(this);
144
- }
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];
149
- this.checkContent();
150
19
  }
151
20
  /**
152
21
  * Sets slotted item text as `data-text` attribute value, to let CSS use it through `attr()`.
@@ -155,15 +24,16 @@ export class ZMenu {
155
24
  onLabelSlotChange(ev) {
156
25
  const labelElement = ev.target.assignedElements()[0];
157
26
  labelElement.dataset.text = labelElement === null || labelElement === void 0 ? void 0 : labelElement.textContent;
27
+ this.setLabelA11yAttrs();
158
28
  }
159
29
  /**
160
30
  * Correctly set position of the floating menu in order to prevent overflow.
161
31
  * @param live Should run the method on every refresh frame.
162
32
  */
163
33
  reflow(live = false) {
164
- if (this.content) {
34
+ if (this.content && this.hasContent) {
165
35
  const { style } = this.content;
166
- const { left } = this.hostElement.getBoundingClientRect();
36
+ const { left } = this.host.getBoundingClientRect();
167
37
  const widthPx = getComputedStyle(this.content).width;
168
38
  const width = widthPx ? parseFloat(widthPx.replace("px", "")) : 375;
169
39
  const safeScrollbarSpace = 30;
@@ -177,37 +47,214 @@ export class ZMenu {
177
47
  * Check if some content slot is set.
178
48
  */
179
49
  checkContent() {
180
- this.hasHeader = !!this.hostElement.querySelectorAll("[slot=header]").length;
181
- this.hasContent = !!this.hostElement.querySelectorAll("[slot=item]").length || this.hasHeader;
50
+ this.hasHeader = !!this.host.querySelectorAll("[slot=header]").length;
51
+ this.hasContent = !!this.host.querySelectorAll("[slot=item]").length || this.hasHeader;
182
52
  }
183
53
  /**
184
- * Set `menuitem` role to all menu items.
185
- * Set the item's inner text to the `data-text` attribute (this is for using bold text avoiding layout shifts).
54
+ * Set `menuitem` role to all menu items (ZMenuSection items already have it).
55
+ * Set -1 to the tabindex of the items and 0 to the first one.
186
56
  */
57
+ setItemsA11yAttrs() {
58
+ this.items.forEach((item, index) => {
59
+ const tabindex = index === 0 ? 0 : -1;
60
+ if (isZMenuSection(item)) {
61
+ item.htmlTabindex = tabindex;
62
+ }
63
+ else {
64
+ item.setAttribute("role", "menuitem");
65
+ item.tabIndex = tabindex;
66
+ }
67
+ });
68
+ }
187
69
  onItemsChange() {
188
70
  this.checkContent();
189
- const items = this.hostElement.querySelectorAll("[slot=item]");
190
- items.forEach((item) => {
191
- item.setAttribute("role", "menuitem");
192
- item.setAttribute("tabindex", "-1");
193
- item.dataset.text = item.textContent;
71
+ this.items = Array.from(this.host.children).filter(({ slot }) => slot === "item");
72
+ this.setItemsA11yAttrs();
73
+ this.items.forEach((item) => {
74
+ if (!isZMenuSection(item)) {
75
+ item.dataset.text = item.textContent;
76
+ }
194
77
  });
195
78
  }
196
- focusFirstItemOnKeyUp() {
197
- const firstElement = this.hostElement.querySelectorAll("[slot='item']")[0];
198
- if (firstElement) {
199
- firstElement.focus();
200
- this.currentIndex = 0;
79
+ /**
80
+ * Move focus and adjust the tabindex value of `receiver` and `current` elements,
81
+ * setting -1 to the `current` and 0 to the `receiver`, then focus the `receiver` element.
82
+ * If the receiver is a ZMenuSection and it's open, focus its first focusable item.
83
+ */
84
+ moveFocus(receiver, current) {
85
+ if (isZMenuSection(receiver)) {
86
+ receiver.setFocus();
87
+ }
88
+ else {
89
+ receiver.tabIndex = 0;
90
+ setTimeout(() => {
91
+ receiver.focus();
92
+ }, 100);
93
+ }
94
+ if (!current) {
95
+ return;
96
+ }
97
+ if (isZMenuSection(current)) {
98
+ current.htmlTabindex = -1;
99
+ }
100
+ else {
101
+ current.tabIndex = -1;
102
+ }
103
+ }
104
+ onLabelKeydown(ev) {
105
+ if (ev.key === KeyboardCode.ENTER || ev.key === KeyboardCode.SPACE) {
106
+ ev.preventDefault();
107
+ ev.stopPropagation();
108
+ this.toggle();
109
+ }
110
+ if (!this.verticalContext) {
111
+ return;
112
+ }
113
+ if (ev.key === KeyboardCode.ARROW_RIGHT && !this.open) {
114
+ ev.preventDefault();
115
+ ev.stopPropagation();
116
+ this.open = true;
117
+ return;
118
+ }
119
+ if (ev.key === KeyboardCode.ARROW_LEFT && this.open) {
120
+ ev.preventDefault();
121
+ ev.stopPropagation();
122
+ this.open = false;
123
+ }
124
+ }
125
+ /** Set tabindex of the label to 0, then focus it. */
126
+ async setFocus() {
127
+ this.htmlTabindex = 0;
128
+ const label = this.hasContent ? this.labelButton : this.host.firstElementChild;
129
+ label.focus();
130
+ }
131
+ /** Focus the last item. */
132
+ async focusLastItem() {
133
+ this.htmlTabindex = 0;
134
+ this.moveFocus(this.items[this.items.length - 1]);
135
+ }
136
+ onOpenChanged() {
137
+ this.setItemsA11yAttrs();
138
+ if (!this.open) {
139
+ cancelAnimationFrame(this.raf);
140
+ this.closed.emit();
141
+ this.items.forEach((item) => {
142
+ if (isZMenuSection(item) && item.open) {
143
+ item.open = false;
144
+ }
145
+ });
146
+ return;
147
+ }
148
+ this.opened.emit();
149
+ if (this.floating) {
150
+ this.reflow(true);
201
151
  }
202
152
  }
203
- renderMenuLabel() {
153
+ setLabelA11yAttrs() {
154
+ if (this.hasContent && !this.labelButton) {
155
+ return;
156
+ }
204
157
  if (this.hasContent) {
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" })))));
158
+ this.labelButton.tabIndex = this.htmlTabindex;
159
+ return;
206
160
  }
207
- return (h("div", { class: "menu-wrapper" }, h("div", { class: "menu-label" }, h("div", { class: "menu-label-content" }, h("slot", { onSlotchange: this.onLabelSlotChange })))));
161
+ const slottedLabel = this.host.firstElementChild;
162
+ slottedLabel.role = "menuitem";
163
+ slottedLabel.tabIndex = this.htmlTabindex;
164
+ }
165
+ onKeyDown(ev) {
166
+ if (!this.hasContent) {
167
+ return;
168
+ }
169
+ switch (ev.key) {
170
+ case KeyboardCode.ESC:
171
+ ev.stopPropagation();
172
+ ev.preventDefault();
173
+ this.open = false;
174
+ this.setFocus();
175
+ break;
176
+ case KeyboardCode.ARROW_DOWN: {
177
+ if (this.verticalContext && document.activeElement === this.host && !this.open) {
178
+ break;
179
+ }
180
+ if (document.activeElement === this.host) {
181
+ if (!this.open) {
182
+ this.open = true;
183
+ }
184
+ ev.stopPropagation();
185
+ ev.preventDefault();
186
+ this.moveFocus(this.items[0]);
187
+ break;
188
+ }
189
+ const currentIndex = this.items.indexOf(this.focusableItem);
190
+ const receiver = this.items[currentIndex + 1];
191
+ if (this.verticalContext && !receiver) {
192
+ break;
193
+ }
194
+ ev.stopPropagation();
195
+ ev.preventDefault();
196
+ // if the last item is already focused, navigate to the first one
197
+ this.moveFocus(receiver !== null && receiver !== void 0 ? receiver : this.items[0], this.focusableItem);
198
+ break;
199
+ }
200
+ case KeyboardCode.ARROW_UP: {
201
+ if (this.verticalContext && document.activeElement === this.host) {
202
+ break;
203
+ }
204
+ if (document.activeElement === this.host) {
205
+ // open the menu and focus the last item
206
+ if (!this.open) {
207
+ this.open = true;
208
+ }
209
+ ev.stopPropagation();
210
+ ev.preventDefault();
211
+ this.moveFocus(this.items[this.items.length - 1], this.focusableItem);
212
+ break;
213
+ }
214
+ ev.stopPropagation();
215
+ ev.preventDefault();
216
+ const currentIndex = this.items.indexOf(this.focusableItem);
217
+ const receiver = this.items[currentIndex - 1];
218
+ if (!receiver && this.verticalContext) {
219
+ this.setFocus();
220
+ break;
221
+ }
222
+ if (isZMenuSection(receiver) && receiver.open) {
223
+ isZMenuSection(this.focusableItem)
224
+ ? (this.focusableItem.htmlTabindex = -1)
225
+ : (this.focusableItem.tabIndex = -1);
226
+ receiver.focusLastItem();
227
+ break;
228
+ }
229
+ // if the first item is already focused, navigate to the last one
230
+ this.moveFocus(receiver !== null && receiver !== void 0 ? receiver : this.items[this.items.length - 1], this.focusableItem);
231
+ break;
232
+ }
233
+ }
234
+ }
235
+ constructor() {
236
+ this.active = undefined;
237
+ this.floating = true;
238
+ this.open = false;
239
+ this.verticalContext = false;
240
+ this.htmlTabindex = -1;
241
+ this.hasHeader = undefined;
242
+ this.hasContent = undefined;
243
+ this.toggle = this.toggle.bind(this);
244
+ this.checkContent = this.checkContent.bind(this);
245
+ this.onLabelSlotChange = this.onLabelSlotChange.bind(this);
246
+ this.onItemsChange = this.onItemsChange.bind(this);
247
+ this.onLabelKeydown = this.onLabelKeydown.bind(this);
248
+ }
249
+ connectedCallback() {
250
+ this.onItemsChange();
251
+ this.setLabelA11yAttrs();
208
252
  }
209
253
  render() {
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 }))))));
254
+ if (!this.hasContent) {
255
+ return (h("div", { class: "menu-wrapper" }, h("div", { class: "menu-label" }, h("div", { class: "menu-label-content" }, h("slot", { onSlotchange: this.onLabelSlotChange })))));
256
+ }
257
+ return (h(Host, null, h("div", { class: "menu-wrapper" }, h("button", { ref: (el) => (this.labelButton = el), class: "menu-label", "aria-expanded": `${!!this.open}`, "aria-haspopup": `${this.hasContent}`, "aria-label": this.open ? "Chiudi menù" : "Apri menù", role: "menuitem", tabindex: this.htmlTabindex, onClick: this.toggle, onKeyDown: this.onLabelKeydown }, h("div", { class: "menu-label-content" }, h("slot", { onSlotchange: this.onLabelSlotChange }), h("z-icon", { name: this.open ? "chevron-up" : "chevron-down" })))), h("div", { class: "content", ref: (el) => (this.content = el) }, this.hasHeader && (h("header", { class: "header" }, h("slot", { name: "header", onSlotchange: this.checkContent }))), h("div", { class: "items", role: "menu" }, h("slot", { name: "item", onSlotchange: this.onItemsChange })))));
211
258
  }
212
259
  static get is() { return "z-menu"; }
213
260
  static get encapsulation() { return "shadow"; }
@@ -288,11 +335,29 @@ export class ZMenu {
288
335
  "optional": false,
289
336
  "docs": {
290
337
  "tags": [],
291
- "text": "Tells the component that it's placed in a vertical context with other `ZMenu`s (e.g. in the ZAppHeader's offcanvas).\nA small border is placed under it as a separator from other elements."
338
+ "text": "Tells the component that it's placed in a vertical context with other `ZMenu`s (usually in the ZAppHeader's offcanvas).\nA small border is placed under it as a separator from other elements."
292
339
  },
293
340
  "attribute": "vertical-context",
294
341
  "reflect": true,
295
342
  "defaultValue": "false"
343
+ },
344
+ "htmlTabindex": {
345
+ "type": "number",
346
+ "mutable": false,
347
+ "complexType": {
348
+ "original": "number",
349
+ "resolved": "number",
350
+ "references": {}
351
+ },
352
+ "required": false,
353
+ "optional": false,
354
+ "docs": {
355
+ "tags": [],
356
+ "text": "Tabindex value to set on the menu label.\nUseful to manage keyboard navigation focus with roving tabindex handled by this component's parent (usually ZAppHeader)."
357
+ },
358
+ "attribute": "html-tabindex",
359
+ "reflect": false,
360
+ "defaultValue": "-1"
296
361
  }
297
362
  };
298
363
  }
@@ -335,29 +400,62 @@ export class ZMenu {
335
400
  }
336
401
  }];
337
402
  }
338
- static get elementRef() { return "hostElement"; }
403
+ static get methods() {
404
+ return {
405
+ "setFocus": {
406
+ "complexType": {
407
+ "signature": "() => Promise<void>",
408
+ "parameters": [],
409
+ "references": {
410
+ "Promise": {
411
+ "location": "global",
412
+ "id": "global::Promise"
413
+ },
414
+ "HTMLElement": {
415
+ "location": "global",
416
+ "id": "global::HTMLElement"
417
+ }
418
+ },
419
+ "return": "Promise<void>"
420
+ },
421
+ "docs": {
422
+ "text": "Set tabindex of the label to 0, then focus it.",
423
+ "tags": []
424
+ }
425
+ },
426
+ "focusLastItem": {
427
+ "complexType": {
428
+ "signature": "() => Promise<void>",
429
+ "parameters": [],
430
+ "references": {
431
+ "Promise": {
432
+ "location": "global",
433
+ "id": "global::Promise"
434
+ }
435
+ },
436
+ "return": "Promise<void>"
437
+ },
438
+ "docs": {
439
+ "text": "Focus the last item.",
440
+ "tags": []
441
+ }
442
+ }
443
+ };
444
+ }
445
+ static get elementRef() { return "host"; }
339
446
  static get watchers() {
340
447
  return [{
341
448
  "propName": "open",
342
449
  "methodName": "onOpenChanged"
450
+ }, {
451
+ "propName": "htmlTabindex",
452
+ "methodName": "setLabelA11yAttrs"
343
453
  }];
344
454
  }
345
455
  static get listeners() {
346
456
  return [{
347
- "name": "click",
348
- "method": "handleClick",
349
- "target": "document",
350
- "capture": false,
351
- "passive": false
352
- }, {
353
- "name": "canvasOpenStatusChanged",
354
- "method": "canvasOpenStatusChanged",
355
- "target": "document",
356
- "capture": false,
357
- "passive": false
358
- }, {
359
457
  "name": "keydown",
360
- "method": "handleKeyDown",
458
+ "method": "onKeyDown",
361
459
  "target": undefined,
362
460
  "capture": false,
363
461
  "passive": false
@@ -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;AAC3G,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAEzC;;;;;GAKG;AAMH,MAAM,OAAO,KAAK;IAqDR,MAAM;QACZ,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,OAAO;QACT,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACtD,CAAC;IAED,iFAAiF;I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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"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/z-menu/index.tsx"],"names":[],"mappings":"AAAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h} from \"@stencil/core\";\nimport {KeyboardCode} from \"../../beans\";\n\nconst isZMenuSection = (el: HTMLElement | HTMLZMenuSectionElement): el is HTMLZMenuSectionElement =>\n el?.tagName === \"Z-MENU-SECTION\";\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. Set the `active` HTML attribute on the element to highlight it. 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() host: 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 (usually 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 /**\n * Tabindex value to set on the menu label.\n * Useful to manage keyboard navigation focus with roving tabindex handled by this component's parent (usually ZAppHeader).\n */\n @Prop()\n htmlTabindex = -1;\n\n @State()\n hasHeader: boolean;\n\n @State()\n hasContent: boolean;\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 labelButton: HTMLButtonElement;\n\n private content: HTMLElement;\n\n private items: (HTMLElement | HTMLZMenuSectionElement)[];\n\n /** Animation frame request id. */\n private raf: number;\n\n private get focusableItem(): HTMLZMenuSectionElement | HTMLElement | null {\n return this.items.find((item) => (isZMenuSection(item) ? item.htmlTabindex === 0 : item.tabIndex === 0));\n }\n\n private toggle(): void {\n if (!this.hasContent) {\n return;\n }\n\n this.open = !this.open;\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 this.setLabelA11yAttrs();\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 && this.hasContent) {\n const {style} = this.content;\n const {left} = this.host.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.host.querySelectorAll(\"[slot=header]\").length;\n this.hasContent = !!this.host.querySelectorAll(\"[slot=item]\").length || this.hasHeader;\n }\n\n /**\n * Set `menuitem` role to all menu items (ZMenuSection items already have it).\n * Set -1 to the tabindex of the items and 0 to the first one.\n */\n private setItemsA11yAttrs(): void {\n this.items.forEach((item, index) => {\n const tabindex = index === 0 ? 0 : -1;\n if (isZMenuSection(item)) {\n item.htmlTabindex = tabindex;\n } else {\n item.setAttribute(\"role\", \"menuitem\");\n item.tabIndex = tabindex;\n }\n });\n }\n\n private onItemsChange(): void {\n this.checkContent();\n this.items = Array.from(this.host.children).filter(({slot}) => slot === \"item\") as HTMLElement[];\n this.setItemsA11yAttrs();\n this.items.forEach((item) => {\n if (!isZMenuSection(item)) {\n item.dataset.text = item.textContent;\n }\n });\n }\n\n /**\n * Move focus and adjust the tabindex value of `receiver` and `current` elements,\n * setting -1 to the `current` and 0 to the `receiver`, then focus the `receiver` element.\n * If the receiver is a ZMenuSection and it's open, focus its first focusable item.\n */\n private moveFocus(\n receiver: HTMLElement | HTMLZMenuSectionElement,\n current?: HTMLElement | HTMLZMenuSectionElement\n ): void {\n if (isZMenuSection(receiver)) {\n receiver.setFocus();\n } else {\n receiver.tabIndex = 0;\n setTimeout(() => {\n receiver.focus();\n }, 100);\n }\n if (!current) {\n return;\n }\n\n if (isZMenuSection(current)) {\n current.htmlTabindex = -1;\n } else {\n current.tabIndex = -1;\n }\n }\n\n private onLabelKeydown(ev: KeyboardEvent): void {\n if (ev.key === KeyboardCode.ENTER || ev.key === KeyboardCode.SPACE) {\n ev.preventDefault();\n ev.stopPropagation();\n this.toggle();\n }\n\n if (!this.verticalContext) {\n return;\n }\n\n if (ev.key === KeyboardCode.ARROW_RIGHT && !this.open) {\n ev.preventDefault();\n ev.stopPropagation();\n this.open = true;\n\n return;\n }\n\n if (ev.key === KeyboardCode.ARROW_LEFT && this.open) {\n ev.preventDefault();\n ev.stopPropagation();\n this.open = false;\n }\n }\n\n /** Set tabindex of the label to 0, then focus it. */\n @Method()\n async setFocus(): Promise<void> {\n this.htmlTabindex = 0;\n const label = this.hasContent ? this.labelButton : (this.host.firstElementChild as HTMLElement);\n label.focus();\n }\n\n /** Focus the last item. */\n @Method()\n async focusLastItem(): Promise<void> {\n this.htmlTabindex = 0;\n this.moveFocus(this.items[this.items.length - 1]);\n }\n\n @Watch(\"open\")\n onOpenChanged(): void {\n this.setItemsA11yAttrs();\n if (!this.open) {\n cancelAnimationFrame(this.raf);\n this.closed.emit();\n this.items.forEach((item) => {\n if (isZMenuSection(item) && item.open) {\n item.open = false;\n }\n });\n\n return;\n }\n\n this.opened.emit();\n if (this.floating) {\n this.reflow(true);\n }\n }\n\n @Watch(\"htmlTabindex\")\n setLabelA11yAttrs(): void {\n if (this.hasContent && !this.labelButton) {\n return;\n }\n\n if (this.hasContent) {\n this.labelButton.tabIndex = this.htmlTabindex;\n\n return;\n }\n\n const slottedLabel = this.host.firstElementChild as HTMLElement;\n slottedLabel.role = \"menuitem\";\n slottedLabel.tabIndex = this.htmlTabindex;\n }\n\n @Listen(\"keydown\")\n onKeyDown(ev: KeyboardEvent): void {\n if (!this.hasContent) {\n return;\n }\n\n switch (ev.key) {\n case KeyboardCode.ESC:\n ev.stopPropagation();\n ev.preventDefault();\n this.open = false;\n this.setFocus();\n break;\n case KeyboardCode.ARROW_DOWN: {\n if (this.verticalContext && document.activeElement === this.host && !this.open) {\n break;\n }\n\n if (document.activeElement === this.host) {\n if (!this.open) {\n this.open = true;\n }\n ev.stopPropagation();\n ev.preventDefault();\n this.moveFocus(this.items[0]);\n break;\n }\n\n const currentIndex = this.items.indexOf(this.focusableItem);\n const receiver = this.items[currentIndex + 1];\n if (this.verticalContext && !receiver) {\n break;\n }\n\n ev.stopPropagation();\n ev.preventDefault();\n // if the last item is already focused, navigate to the first one\n this.moveFocus(receiver ?? this.items[0], this.focusableItem);\n break;\n }\n case KeyboardCode.ARROW_UP: {\n if (this.verticalContext && document.activeElement === this.host) {\n break;\n }\n\n if (document.activeElement === this.host) {\n // open the menu and focus the last item\n if (!this.open) {\n this.open = true;\n }\n ev.stopPropagation();\n ev.preventDefault();\n this.moveFocus(this.items[this.items.length - 1], this.focusableItem);\n break;\n }\n\n ev.stopPropagation();\n ev.preventDefault();\n const currentIndex = this.items.indexOf(this.focusableItem);\n const receiver = this.items[currentIndex - 1];\n if (!receiver && this.verticalContext) {\n this.setFocus();\n break;\n }\n\n if (isZMenuSection(receiver) && receiver.open) {\n isZMenuSection(this.focusableItem)\n ? (this.focusableItem.htmlTabindex = -1)\n : (this.focusableItem.tabIndex = -1);\n receiver.focusLastItem();\n break;\n }\n\n // if the first item is already focused, navigate to the last one\n this.moveFocus(receiver ?? this.items[this.items.length - 1], this.focusableItem);\n break;\n }\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 this.onLabelKeydown = this.onLabelKeydown.bind(this);\n }\n\n connectedCallback(): void {\n this.onItemsChange();\n this.setLabelA11yAttrs();\n }\n\n render(): HTMLDivElement | HTMLZMenuElement {\n if (!this.hasContent) {\n return (\n <div class=\"menu-wrapper\">\n <div class=\"menu-label\">\n <div class=\"menu-label-content\">\n <slot onSlotchange={this.onLabelSlotChange} />\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <Host>\n <div class=\"menu-wrapper\">\n <button\n ref={(el) => (this.labelButton = el)}\n class=\"menu-label\"\n aria-expanded={`${!!this.open}`}\n aria-haspopup={`${this.hasContent}`}\n aria-label={this.open ? \"Chiudi menù\" : \"Apri menù\"}\n role=\"menuitem\"\n tabindex={this.htmlTabindex}\n onClick={this.toggle}\n onKeyDown={this.onLabelKeydown}\n >\n <div class=\"menu-label-content\">\n <slot onSlotchange={this.onLabelSlotChange} />\n <z-icon name={this.open ? \"chevron-up\" : \"chevron-down\"} />\n </div>\n </button>\n </div>\n\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 />\n </header>\n )}\n\n <div\n class=\"items\"\n role=\"menu\"\n >\n <slot\n name=\"item\"\n onSlotchange={this.onItemsChange}\n />\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -7,7 +7,6 @@ const StoryMeta = {
7
7
  args: {
8
8
  active: false,
9
9
  floating: true,
10
- verticalContext: false,
11
10
  },
12
11
  };
13
12
  export default StoryMeta;
@@ -16,7 +15,6 @@ export const FloatingContentLayout = {
16
15
  <z-menu
17
16
  .active=${args.active}
18
17
  .floating=${args.floating}
19
- .verticalContext=${args.verticalContext}
20
18
  >
21
19
  <h3>Menu label</h3>
22
20
  <a
@@ -68,7 +66,6 @@ export const WithHeader = {
68
66
  <z-menu
69
67
  .active=${args.active}
70
68
  .floating=${args.floating}
71
- .verticalContext=${args.verticalContext}
72
69
  >
73
70
  <img
74
71
  slot="header"
@@ -113,11 +110,8 @@ export const ActiveWithoutItems = {
113
110
  exclude: ["floating"],
114
111
  },
115
112
  },
116
- render: (args) => html `
117
- <z-menu
118
- .active=${true}
119
- .verticalContext=${args.verticalContext}
120
- >
113
+ render: () => html `
114
+ <z-menu .active=${true}>
121
115
  <a
122
116
  href="https://cataas.com/cat/gif"
123
117
  target="_blank"