@zanichelli/albe-web-components 17.0.0 → 17.0.2

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 (695) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/{index-a42ab7c9.js → index-2a9a328d.js} +2 -2
  3. package/dist/cjs/{index-a42ab7c9.js.map → index-2a9a328d.js.map} +1 -1
  4. package/dist/cjs/{index-4b1d6599.js → index-4e2d222e.js} +2 -2
  5. package/dist/cjs/{index-4b1d6599.js.map → index-4e2d222e.js.map} +1 -1
  6. package/dist/cjs/{index-816614ee.js → index-7191c0cc.js} +2 -2
  7. package/dist/cjs/{index-816614ee.js.map → index-7191c0cc.js.map} +1 -1
  8. package/dist/cjs/{index-3b95f98f.js → index-a6593d82.js} +2 -2
  9. package/dist/cjs/{index-3b95f98f.js.map → index-a6593d82.js.map} +1 -1
  10. package/dist/cjs/{index-e2718c94.js → index-aa56c709.js} +4 -4
  11. package/dist/cjs/{index-e2718c94.js.map → index-aa56c709.js.map} +1 -1
  12. package/dist/cjs/{index-141d598e.js → index-b2f35532.js} +2 -2
  13. package/dist/cjs/{index-141d598e.js.map → index-b2f35532.js.map} +1 -1
  14. package/dist/cjs/loader.cjs.js +1 -1
  15. package/dist/cjs/web-components-library.cjs.js +1 -1
  16. package/dist/cjs/z-accordion.cjs.entry.js +2 -2
  17. package/dist/cjs/z-accordion.cjs.entry.js.map +1 -1
  18. package/dist/cjs/z-alert.cjs.entry.js +1 -1
  19. package/dist/cjs/z-anchor-navigation.cjs.entry.js +2 -2
  20. package/dist/cjs/z-anchor-navigation.cjs.entry.js.map +1 -1
  21. package/dist/cjs/z-app-header-deprecated.cjs.entry.js +1 -1
  22. package/dist/cjs/z-app-header_12.cjs.entry.js +13 -13
  23. package/dist/cjs/z-aria-alert.cjs.entry.js +1 -1
  24. package/dist/cjs/z-avatar.cjs.entry.js +2 -2
  25. package/dist/cjs/z-book-card-app.cjs.entry.js +1 -1
  26. package/dist/cjs/z-book-card-deprecated.cjs.entry.js +1 -1
  27. package/dist/cjs/z-book-card.cjs.entry.js +2 -2
  28. package/dist/cjs/z-breadcrumb.cjs.entry.js +2 -2
  29. package/dist/cjs/z-button-sort.cjs.entry.js +1 -1
  30. package/dist/cjs/z-chip.cjs.entry.js +2 -2
  31. package/dist/cjs/z-combobox.cjs.entry.js +1 -1
  32. package/dist/cjs/z-cover-hero.cjs.entry.js +2 -2
  33. package/dist/cjs/z-date-picker.cjs.entry.js +1 -1
  34. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +16 -20
  35. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js.map +1 -1
  36. package/dist/cjs/z-file-upload.cjs.entry.js +77 -101
  37. package/dist/cjs/z-file-upload.cjs.entry.js.map +1 -1
  38. package/dist/cjs/z-file.cjs.entry.js +1 -1
  39. package/dist/cjs/z-ghost-loading.cjs.entry.js +1 -1
  40. package/dist/cjs/z-info-box.cjs.entry.js +1 -1
  41. package/dist/cjs/z-info-reveal.cjs.entry.js +1 -1
  42. package/dist/cjs/z-logo.cjs.entry.js +1 -1
  43. package/dist/cjs/z-menu-deprecated.cjs.entry.js +2 -2
  44. package/dist/cjs/z-menu-deprecated.cjs.entry.js.map +1 -1
  45. package/dist/cjs/z-menu-section-deprecated.cjs.entry.js +2 -2
  46. package/dist/cjs/z-menu-section-deprecated.cjs.entry.js.map +1 -1
  47. package/dist/cjs/z-menu-section.cjs.entry.js +2 -2
  48. package/dist/cjs/z-menu-section.cjs.entry.js.map +1 -1
  49. package/dist/cjs/z-menu.cjs.entry.js +1 -1
  50. package/dist/cjs/z-menu.cjs.entry.js.map +1 -1
  51. package/dist/cjs/z-myz-card-alert.cjs.entry.js +1 -1
  52. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
  53. package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +1 -1
  54. package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -1
  55. package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
  56. package/dist/cjs/z-myz-card-info.cjs.entry.js +2 -2
  57. package/dist/cjs/z-myz-card-info.cjs.entry.js.map +1 -1
  58. package/dist/cjs/z-myz-card-list.cjs.entry.js +1 -1
  59. package/dist/cjs/z-myz-card_4.cjs.entry.js +4 -4
  60. package/dist/cjs/z-myz-list-item.cjs.entry.js +1 -1
  61. package/dist/cjs/z-myz-list.cjs.entry.js +1 -1
  62. package/dist/cjs/z-navigation-tabs.cjs.entry.js +3 -3
  63. package/dist/cjs/z-navigation-tabs.cjs.entry.js.map +1 -1
  64. package/dist/cjs/z-notification.cjs.entry.js +1 -1
  65. package/dist/cjs/z-otp.cjs.entry.js +2 -2
  66. package/dist/cjs/z-panel-elem.cjs.entry.js +2 -2
  67. package/dist/cjs/z-popover.cjs.entry.js +1 -1
  68. package/dist/cjs/z-range-picker.cjs.entry.js +3 -3
  69. package/dist/cjs/z-section-title.cjs.entry.js +1 -1
  70. package/dist/cjs/z-select.cjs.entry.js +1 -1
  71. package/dist/cjs/z-skip-to-content.cjs.entry.js +1 -1
  72. package/dist/cjs/z-stepper-item.cjs.entry.js +1 -1
  73. package/dist/cjs/z-stepper.cjs.entry.js +1 -1
  74. package/dist/cjs/z-table.cjs.entry.js +7 -7
  75. package/dist/cjs/z-tbody.cjs.entry.js +1 -1
  76. package/dist/cjs/z-td.cjs.entry.js +1 -1
  77. package/dist/cjs/z-tfoot.cjs.entry.js +1 -1
  78. package/dist/cjs/z-th.cjs.entry.js +1 -1
  79. package/dist/cjs/z-thead.cjs.entry.js +1 -1
  80. package/dist/cjs/z-toast-notification-list.cjs.entry.js +1 -1
  81. package/dist/cjs/z-toast-notification.cjs.entry.js +1 -1
  82. package/dist/cjs/z-toggle-button.cjs.entry.js +2 -2
  83. package/dist/cjs/z-toggle-switch.cjs.entry.js +3 -3
  84. package/dist/cjs/z-tooltip.cjs.entry.js +1 -1
  85. package/dist/cjs/z-tr.cjs.entry.js +3 -3
  86. package/dist/cjs/z-visually-hidden.cjs.entry.js +1 -1
  87. package/dist/collection/collection-manifest.json +1 -1
  88. package/dist/collection/components/book-card/z-book-card/index.js +2 -2
  89. package/dist/collection/components/book-card/z-book-card-app/index.js +1 -1
  90. package/dist/collection/components/date-picker/z-date-picker/index.js +1 -1
  91. package/dist/collection/components/date-picker/z-range-picker/index.js +3 -3
  92. package/dist/collection/components/deprecated/z-app-header-deprecated/index.js +1 -1
  93. package/dist/collection/components/deprecated/z-book-card-deprecated/index.js +1 -1
  94. package/dist/collection/components/deprecated/z-menu-deprecated/index.js +1 -1
  95. package/dist/collection/components/deprecated/z-menu-deprecated/styles.css +2 -2
  96. package/dist/collection/components/deprecated/z-menu-section-deprecated/index.js +1 -1
  97. package/dist/collection/components/deprecated/z-menu-section-deprecated/styles.css +3 -3
  98. package/dist/collection/components/file-upload/z-dragdrop-area/index.js +17 -16
  99. package/dist/collection/components/file-upload/z-dragdrop-area/index.js.map +1 -1
  100. package/dist/collection/components/file-upload/z-dragdrop-area/styles.css +55 -29
  101. package/dist/collection/components/file-upload/z-file/index.js +1 -1
  102. package/dist/collection/components/file-upload/z-file-upload/index.js +146 -107
  103. package/dist/collection/components/file-upload/z-file-upload/index.js.map +1 -1
  104. package/dist/collection/components/file-upload/z-file-upload/index.stories.js +11 -13
  105. package/dist/collection/components/file-upload/z-file-upload/index.stories.js.map +1 -1
  106. package/dist/collection/components/file-upload/z-file-upload/styles.css +18 -52
  107. package/dist/collection/components/list/z-list/index.js +1 -1
  108. package/dist/collection/components/list/z-list-element/index.js +1 -1
  109. package/dist/collection/components/list/z-list-group/index.js +2 -2
  110. package/dist/collection/components/table/cells/z-td/index.js +1 -1
  111. package/dist/collection/components/table/cells/z-th/index.js +1 -1
  112. package/dist/collection/components/table/z-table/index.js +1 -1
  113. package/dist/collection/components/table/z-tbody/index.js +1 -1
  114. package/dist/collection/components/table/z-tfoot/index.js +1 -1
  115. package/dist/collection/components/table/z-thead/index.js +1 -1
  116. package/dist/collection/components/table/z-tr/index.js +1 -1
  117. package/dist/collection/components/z-accordion/index.js +1 -1
  118. package/dist/collection/components/z-accordion/styles.css +6 -1
  119. package/dist/collection/components/z-anchor-navigation/index.js +1 -1
  120. package/dist/collection/components/z-anchor-navigation/styles.css +4 -2
  121. package/dist/collection/components/z-app-header/index.js +1 -1
  122. package/dist/collection/components/z-aria-alert/index.js +1 -1
  123. package/dist/collection/components/z-avatar/index.js +2 -2
  124. package/dist/collection/components/z-breadcrumb/index.js +2 -2
  125. package/dist/collection/components/z-button-sort/index.js +1 -1
  126. package/dist/collection/components/z-chip/index.js +2 -2
  127. package/dist/collection/components/z-combobox/index.js +1 -1
  128. package/dist/collection/components/z-cover-hero/index.js +2 -2
  129. package/dist/collection/components/z-divider/index.js +1 -1
  130. package/dist/collection/components/z-ghost-loading/index.js +1 -1
  131. package/dist/collection/components/z-icon/index.js +1 -1
  132. package/dist/collection/components/z-info-box/index.js +1 -1
  133. package/dist/collection/components/z-info-reveal/index.js +1 -1
  134. package/dist/collection/components/z-input/index.js +1 -1
  135. package/dist/collection/components/z-input-message/index.js +1 -1
  136. package/dist/collection/components/z-logo/index.js +1 -1
  137. package/dist/collection/components/z-menu/styles.css +3 -3
  138. package/dist/collection/components/z-menu-section/index.js +1 -1
  139. package/dist/collection/components/z-menu-section/styles.css +3 -3
  140. package/dist/collection/components/z-modal/index.js +4 -4
  141. package/dist/collection/components/z-navigation-tabs/index.js +2 -2
  142. package/dist/collection/components/z-navigation-tabs/styles.css +2 -2
  143. package/dist/collection/components/z-notification/index.js +1 -1
  144. package/dist/collection/components/z-offcanvas/index.js +1 -1
  145. package/dist/collection/components/z-panel-elem/index.js +2 -2
  146. package/dist/collection/components/z-popover/index.js +1 -1
  147. package/dist/collection/components/z-searchbar/index.js +1 -1
  148. package/dist/collection/components/z-section-title/index.js +1 -1
  149. package/dist/collection/components/z-select/index.js +1 -1
  150. package/dist/collection/components/z-skip-to-content/index.js +1 -1
  151. package/dist/collection/components/z-stepper/index.js +1 -1
  152. package/dist/collection/components/z-stepper-item/index.js +1 -1
  153. package/dist/collection/components/z-tag/index.js +2 -2
  154. package/dist/collection/components/z-toast-notification/index.js +1 -1
  155. package/dist/collection/components/z-toast-notification-list/index.js +1 -1
  156. package/dist/collection/components/z-toggle-button/index.js +2 -2
  157. package/dist/collection/components/z-toggle-switch/index.js +3 -3
  158. package/dist/collection/components/z-tooltip/index.js +1 -1
  159. package/dist/collection/components/z-visually-hidden/index.js +1 -1
  160. package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +1 -1
  161. package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +1 -1
  162. package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +1 -1
  163. package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +1 -1
  164. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
  165. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -1
  166. package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +1 -1
  167. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
  168. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +1 -1
  169. package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
  170. package/dist/collection/snowflakes/myz/card/z-myz-card-info/styles.css +1 -1
  171. package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
  172. package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
  173. package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +1 -1
  174. package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
  175. package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
  176. package/dist/components/index10.js +1 -1
  177. package/dist/components/index11.js +1 -1
  178. package/dist/components/index12.js +1 -1
  179. package/dist/components/index13.js +1 -1
  180. package/dist/components/index14.js +1 -1
  181. package/dist/components/index15.js +2 -2
  182. package/dist/components/index16.js +4 -4
  183. package/dist/components/index17.js +1 -1
  184. package/dist/components/index18.js +1 -1
  185. package/dist/components/index19.js +1 -1
  186. package/dist/components/index20.js +1 -1
  187. package/dist/components/index21.js +1 -1
  188. package/dist/components/index22.js +1 -1
  189. package/dist/components/index23.js +1 -1
  190. package/dist/components/index24.js +1 -1
  191. package/dist/components/index25.js +2 -2
  192. package/dist/components/index3.js +1 -1
  193. package/dist/components/index5.js +2 -2
  194. package/dist/components/index6.js +1 -1
  195. package/dist/components/index7.js +28 -19
  196. package/dist/components/index7.js.map +1 -1
  197. package/dist/components/index8.js +1 -1
  198. package/dist/components/index9.js +1 -1
  199. package/dist/components/z-accordion.js +2 -2
  200. package/dist/components/z-accordion.js.map +1 -1
  201. package/dist/components/z-anchor-navigation.js +2 -2
  202. package/dist/components/z-anchor-navigation.js.map +1 -1
  203. package/dist/components/z-app-header-deprecated.js +1 -1
  204. package/dist/components/z-app-header.js +1 -1
  205. package/dist/components/z-aria-alert.js +1 -1
  206. package/dist/components/z-avatar.js +2 -2
  207. package/dist/components/z-book-card-app.js +1 -1
  208. package/dist/components/z-book-card-deprecated.js +1 -1
  209. package/dist/components/z-book-card.js +2 -2
  210. package/dist/components/z-breadcrumb.js +2 -2
  211. package/dist/components/z-button-sort.js +1 -1
  212. package/dist/components/z-combobox.js +1 -1
  213. package/dist/components/z-cover-hero.js +2 -2
  214. package/dist/components/z-date-picker.js +1 -1
  215. package/dist/components/z-file-upload.js +85 -112
  216. package/dist/components/z-file-upload.js.map +1 -1
  217. package/dist/components/z-file.js +1 -1
  218. package/dist/components/z-info-box.js +1 -1
  219. package/dist/components/z-logo.js +1 -1
  220. package/dist/components/z-menu-deprecated.js +2 -2
  221. package/dist/components/z-menu-deprecated.js.map +1 -1
  222. package/dist/components/z-menu-section-deprecated.js +2 -2
  223. package/dist/components/z-menu-section-deprecated.js.map +1 -1
  224. package/dist/components/z-menu-section.js +2 -2
  225. package/dist/components/z-menu-section.js.map +1 -1
  226. package/dist/components/z-menu.js +1 -1
  227. package/dist/components/z-menu.js.map +1 -1
  228. package/dist/components/z-myz-card-alert.js +1 -1
  229. package/dist/components/z-myz-card-dictionary.js +1 -1
  230. package/dist/components/z-myz-card-footer-sections.js +1 -1
  231. package/dist/components/z-myz-card-footer.js +1 -1
  232. package/dist/components/z-myz-card-icon.js +1 -1
  233. package/dist/components/z-myz-card-info.js +2 -2
  234. package/dist/components/z-myz-card-info.js.map +1 -1
  235. package/dist/components/z-myz-card-list.js +1 -1
  236. package/dist/components/z-myz-list.js +1 -1
  237. package/dist/components/z-navigation-tabs.js +3 -3
  238. package/dist/components/z-navigation-tabs.js.map +1 -1
  239. package/dist/components/z-notification.js +1 -1
  240. package/dist/components/z-otp.js +2 -2
  241. package/dist/components/z-panel-elem.js +2 -2
  242. package/dist/components/z-range-picker.js +3 -3
  243. package/dist/components/z-section-title.js +1 -1
  244. package/dist/components/z-select.js +1 -1
  245. package/dist/components/z-skip-to-content.js +1 -1
  246. package/dist/components/z-stepper-item.js +1 -1
  247. package/dist/components/z-stepper.js +1 -1
  248. package/dist/components/z-table.js +1 -1
  249. package/dist/components/z-tbody.js +1 -1
  250. package/dist/components/z-td.js +1 -1
  251. package/dist/components/z-tfoot.js +1 -1
  252. package/dist/components/z-th.js +1 -1
  253. package/dist/components/z-thead.js +1 -1
  254. package/dist/components/z-toast-notification-list.js +1 -1
  255. package/dist/components/z-toast-notification.js +1 -1
  256. package/dist/components/z-toggle-button.js +2 -2
  257. package/dist/components/z-toggle-switch.js +3 -3
  258. package/dist/components/z-tooltip.js +1 -1
  259. package/dist/components/z-tr.js +1 -1
  260. package/dist/components/z-visually-hidden.js +1 -1
  261. package/dist/esm/{index-daf6dc52.js → index-04335eea.js} +2 -2
  262. package/dist/esm/{index-daf6dc52.js.map → index-04335eea.js.map} +1 -1
  263. package/dist/esm/{index-bcd128c9.js → index-5dff449e.js} +2 -2
  264. package/dist/esm/{index-bcd128c9.js.map → index-5dff449e.js.map} +1 -1
  265. package/dist/esm/{index-bf3d3447.js → index-735d4f23.js} +2 -2
  266. package/dist/esm/{index-bf3d3447.js.map → index-735d4f23.js.map} +1 -1
  267. package/dist/esm/{index-03fd6621.js → index-8df19678.js} +4 -4
  268. package/dist/esm/{index-03fd6621.js.map → index-8df19678.js.map} +1 -1
  269. package/dist/esm/{index-2e00cecb.js → index-90f624c1.js} +2 -2
  270. package/dist/esm/{index-2e00cecb.js.map → index-90f624c1.js.map} +1 -1
  271. package/dist/esm/{index-358dea59.js → index-9adfcd0d.js} +2 -2
  272. package/dist/esm/{index-358dea59.js.map → index-9adfcd0d.js.map} +1 -1
  273. package/dist/esm/loader.js +1 -1
  274. package/dist/esm/web-components-library.js +1 -1
  275. package/dist/esm/z-accordion.entry.js +2 -2
  276. package/dist/esm/z-accordion.entry.js.map +1 -1
  277. package/dist/esm/z-alert.entry.js +1 -1
  278. package/dist/esm/z-anchor-navigation.entry.js +2 -2
  279. package/dist/esm/z-anchor-navigation.entry.js.map +1 -1
  280. package/dist/esm/z-app-header-deprecated.entry.js +1 -1
  281. package/dist/esm/z-app-header_12.entry.js +13 -13
  282. package/dist/esm/z-aria-alert.entry.js +1 -1
  283. package/dist/esm/z-avatar.entry.js +2 -2
  284. package/dist/esm/z-book-card-app.entry.js +1 -1
  285. package/dist/esm/z-book-card-deprecated.entry.js +1 -1
  286. package/dist/esm/z-book-card.entry.js +2 -2
  287. package/dist/esm/z-breadcrumb.entry.js +2 -2
  288. package/dist/esm/z-button-sort.entry.js +1 -1
  289. package/dist/esm/z-chip.entry.js +2 -2
  290. package/dist/esm/z-combobox.entry.js +1 -1
  291. package/dist/esm/z-cover-hero.entry.js +2 -2
  292. package/dist/esm/z-date-picker.entry.js +1 -1
  293. package/dist/esm/z-dragdrop-area_2.entry.js +17 -21
  294. package/dist/esm/z-dragdrop-area_2.entry.js.map +1 -1
  295. package/dist/esm/z-file-upload.entry.js +78 -102
  296. package/dist/esm/z-file-upload.entry.js.map +1 -1
  297. package/dist/esm/z-file.entry.js +1 -1
  298. package/dist/esm/z-ghost-loading.entry.js +1 -1
  299. package/dist/esm/z-info-box.entry.js +1 -1
  300. package/dist/esm/z-info-reveal.entry.js +1 -1
  301. package/dist/esm/z-logo.entry.js +1 -1
  302. package/dist/esm/z-menu-deprecated.entry.js +2 -2
  303. package/dist/esm/z-menu-deprecated.entry.js.map +1 -1
  304. package/dist/esm/z-menu-section-deprecated.entry.js +2 -2
  305. package/dist/esm/z-menu-section-deprecated.entry.js.map +1 -1
  306. package/dist/esm/z-menu-section.entry.js +2 -2
  307. package/dist/esm/z-menu-section.entry.js.map +1 -1
  308. package/dist/esm/z-menu.entry.js +1 -1
  309. package/dist/esm/z-menu.entry.js.map +1 -1
  310. package/dist/esm/z-myz-card-alert.entry.js +1 -1
  311. package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
  312. package/dist/esm/z-myz-card-footer-sections.entry.js +1 -1
  313. package/dist/esm/z-myz-card-footer.entry.js +1 -1
  314. package/dist/esm/z-myz-card-icon.entry.js +1 -1
  315. package/dist/esm/z-myz-card-info.entry.js +2 -2
  316. package/dist/esm/z-myz-card-info.entry.js.map +1 -1
  317. package/dist/esm/z-myz-card-list.entry.js +1 -1
  318. package/dist/esm/z-myz-card_4.entry.js +4 -4
  319. package/dist/esm/z-myz-list-item.entry.js +1 -1
  320. package/dist/esm/z-myz-list.entry.js +1 -1
  321. package/dist/esm/z-navigation-tabs.entry.js +3 -3
  322. package/dist/esm/z-navigation-tabs.entry.js.map +1 -1
  323. package/dist/esm/z-notification.entry.js +1 -1
  324. package/dist/esm/z-otp.entry.js +2 -2
  325. package/dist/esm/z-panel-elem.entry.js +2 -2
  326. package/dist/esm/z-popover.entry.js +1 -1
  327. package/dist/esm/z-range-picker.entry.js +3 -3
  328. package/dist/esm/z-section-title.entry.js +1 -1
  329. package/dist/esm/z-select.entry.js +1 -1
  330. package/dist/esm/z-skip-to-content.entry.js +1 -1
  331. package/dist/esm/z-stepper-item.entry.js +1 -1
  332. package/dist/esm/z-stepper.entry.js +1 -1
  333. package/dist/esm/z-table.entry.js +7 -7
  334. package/dist/esm/z-tbody.entry.js +1 -1
  335. package/dist/esm/z-td.entry.js +1 -1
  336. package/dist/esm/z-tfoot.entry.js +1 -1
  337. package/dist/esm/z-th.entry.js +1 -1
  338. package/dist/esm/z-thead.entry.js +1 -1
  339. package/dist/esm/z-toast-notification-list.entry.js +1 -1
  340. package/dist/esm/z-toast-notification.entry.js +1 -1
  341. package/dist/esm/z-toggle-button.entry.js +2 -2
  342. package/dist/esm/z-toggle-switch.entry.js +3 -3
  343. package/dist/esm/z-tooltip.entry.js +1 -1
  344. package/dist/esm/z-tr.entry.js +3 -3
  345. package/dist/esm/z-visually-hidden.entry.js +1 -1
  346. package/dist/types/components/file-upload/z-dragdrop-area/index.d.ts +4 -4
  347. package/dist/types/components/file-upload/z-file-upload/index.d.ts +39 -25
  348. package/dist/types/components/file-upload/z-file-upload/index.stories.d.ts +1 -0
  349. package/dist/types/components.d.ts +27 -4
  350. package/{www/build/p-a707640a.entry.js → dist/web-components-library/p-015621c8.entry.js} +2 -2
  351. package/dist/web-components-library/p-035807e3.entry.js +2 -0
  352. package/{www/build/p-cd55204b.js → dist/web-components-library/p-037c59b3.js} +2 -2
  353. package/dist/web-components-library/{p-479b13ae.entry.js → p-0565f1b2.entry.js} +2 -2
  354. package/dist/web-components-library/p-08d8f935.entry.js +2 -0
  355. package/{www/build/p-95795174.entry.js → dist/web-components-library/p-0df6b405.entry.js} +2 -2
  356. package/dist/web-components-library/p-11216ee8.entry.js +2 -0
  357. package/{www/build/p-5ccbdfbe.entry.js.map → dist/web-components-library/p-11216ee8.entry.js.map} +1 -1
  358. package/dist/web-components-library/p-115fab3e.entry.js +2 -0
  359. package/dist/web-components-library/p-115fab3e.entry.js.map +1 -0
  360. package/dist/web-components-library/{p-914e20e9.entry.js → p-11629dd3.entry.js} +2 -2
  361. package/dist/web-components-library/{p-90d54c40.js → p-123739cb.js} +2 -2
  362. package/{www/build/p-7c6dad4b.js → dist/web-components-library/p-14e61df6.js} +2 -2
  363. package/dist/web-components-library/{p-2e48ff6b.entry.js → p-18d63f0c.entry.js} +2 -2
  364. package/{www/build/p-8b627bff.entry.js → dist/web-components-library/p-20b628e7.entry.js} +2 -2
  365. package/dist/web-components-library/{p-cc87d814.entry.js → p-22d56699.entry.js} +2 -2
  366. package/dist/web-components-library/p-2798c0b2.entry.js +2 -0
  367. package/dist/web-components-library/{p-83cd8d7c.entry.js → p-2a0d8ebe.entry.js} +2 -2
  368. package/dist/web-components-library/p-2aeb2a94.entry.js +2 -0
  369. package/dist/web-components-library/{p-34d82be5.entry.js → p-2c450113.entry.js} +2 -2
  370. package/dist/web-components-library/{p-c57bb632.entry.js → p-2dcf53b3.entry.js} +2 -2
  371. package/dist/web-components-library/p-30170218.entry.js +2 -0
  372. package/dist/web-components-library/{p-e9149664.entry.js → p-34f4f441.entry.js} +2 -2
  373. package/dist/web-components-library/{p-73d089fe.entry.js → p-384baa02.entry.js} +2 -2
  374. package/dist/web-components-library/{p-46ce378d.entry.js → p-395b261e.entry.js} +2 -2
  375. package/dist/web-components-library/p-3bf02cab.entry.js +2 -0
  376. package/dist/web-components-library/p-3bf02cab.entry.js.map +1 -0
  377. package/dist/web-components-library/{p-4a058a26.entry.js → p-42559870.entry.js} +2 -2
  378. package/dist/web-components-library/{p-92da97fb.entry.js → p-4374d3f3.entry.js} +2 -2
  379. package/dist/web-components-library/{p-ec4d7f60.js → p-4c462e7f.js} +2 -2
  380. package/dist/web-components-library/{p-c0588dbe.entry.js → p-4fedcbc2.entry.js} +2 -2
  381. package/{www/build/p-7db32c12.entry.js → dist/web-components-library/p-50bf57b4.entry.js} +2 -2
  382. package/{www/build/p-8f47b574.entry.js → dist/web-components-library/p-52be7378.entry.js} +2 -2
  383. package/{www/build/p-9e183204.entry.js → dist/web-components-library/p-54a70792.entry.js} +2 -2
  384. package/{www/build/p-c9913f1e.entry.js → dist/web-components-library/p-5f04d9eb.entry.js} +2 -2
  385. package/dist/web-components-library/p-605f6780.entry.js +2 -0
  386. package/dist/web-components-library/p-605f6780.entry.js.map +1 -0
  387. package/dist/web-components-library/{p-7d844bac.entry.js → p-60a9cb8b.entry.js} +2 -2
  388. package/{www/build/p-ddae9016.entry.js → dist/web-components-library/p-6230c432.entry.js} +2 -2
  389. package/dist/web-components-library/p-6e1ba2f0.entry.js +2 -0
  390. package/dist/web-components-library/{p-3ce0d28c.entry.js → p-7095262b.entry.js} +2 -2
  391. package/dist/web-components-library/{p-af4b759a.entry.js → p-72dae90b.entry.js} +2 -2
  392. package/dist/web-components-library/p-73d686e0.entry.js +2 -0
  393. package/dist/web-components-library/p-73d686e0.entry.js.map +1 -0
  394. package/dist/web-components-library/p-75808b47.entry.js +2 -0
  395. package/dist/web-components-library/p-75808b47.entry.js.map +1 -0
  396. package/dist/web-components-library/{p-0d1dbe04.entry.js → p-8c952964.entry.js} +2 -2
  397. package/dist/web-components-library/{p-18fbbf63.entry.js → p-9187ce36.entry.js} +2 -2
  398. package/dist/web-components-library/{p-08691c77.entry.js → p-9218da42.entry.js} +2 -2
  399. package/dist/web-components-library/{p-2cc8c5a5.entry.js → p-972098a5.entry.js} +2 -2
  400. package/dist/web-components-library/{p-ecaca2df.entry.js → p-9f0a3d88.entry.js} +2 -2
  401. package/dist/web-components-library/p-a90027c2.entry.js +2 -0
  402. package/dist/web-components-library/p-a90027c2.entry.js.map +1 -0
  403. package/dist/web-components-library/p-aa0b3e7a.entry.js +2 -0
  404. package/dist/web-components-library/p-aa0b3e7a.entry.js.map +1 -0
  405. package/{www/build/p-65c59027.entry.js → dist/web-components-library/p-aa42f01d.entry.js} +2 -2
  406. package/dist/web-components-library/p-ad825740.entry.js +2 -0
  407. package/dist/web-components-library/{p-76d8d404.entry.js → p-b309bd71.entry.js} +2 -2
  408. package/dist/web-components-library/p-b38be247.entry.js +2 -0
  409. package/{www/build/p-ac03a6cc.entry.js → dist/web-components-library/p-bbd492d3.entry.js} +2 -2
  410. package/dist/web-components-library/p-c13ef624.js +2 -0
  411. package/dist/web-components-library/p-c2af9a71.entry.js +2 -0
  412. package/dist/web-components-library/p-c2af9a71.entry.js.map +1 -0
  413. package/dist/web-components-library/p-c7df6a63.entry.js +2 -0
  414. package/dist/web-components-library/p-c7df6a63.entry.js.map +1 -0
  415. package/dist/web-components-library/{p-0eab0213.entry.js → p-caccf490.entry.js} +2 -2
  416. package/dist/web-components-library/p-cb8aec27.entry.js +2 -0
  417. package/dist/web-components-library/p-cc8186a9.entry.js +2 -0
  418. package/{www/build/p-d972d6aa.entry.js.map → dist/web-components-library/p-cc8186a9.entry.js.map} +1 -1
  419. package/dist/web-components-library/p-d65aba93.entry.js +2 -0
  420. package/dist/web-components-library/{p-386e385c.entry.js.map → p-d65aba93.entry.js.map} +1 -1
  421. package/dist/web-components-library/p-db0a5f51.entry.js +2 -0
  422. package/dist/web-components-library/p-db0a5f51.entry.js.map +1 -0
  423. package/dist/web-components-library/p-deb86b5c.entry.js +2 -0
  424. package/dist/web-components-library/{p-efe1de34.entry.js → p-ea36d666.entry.js} +2 -2
  425. package/dist/web-components-library/{p-9078dfd7.entry.js → p-f06bd257.entry.js} +2 -2
  426. package/dist/web-components-library/{p-2f486acc.entry.js → p-f075ec62.entry.js} +2 -2
  427. package/dist/web-components-library/{p-27a59513.entry.js → p-f8915e2e.entry.js} +2 -2
  428. package/dist/web-components-library/{p-068b15fc.entry.js → p-fb06a5d8.entry.js} +2 -2
  429. package/dist/web-components-library/p-feb84d36.js +2 -0
  430. package/dist/web-components-library/web-components-library.esm.js +1 -1
  431. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  432. package/package.json +1 -1
  433. package/{dist/web-components-library/p-a707640a.entry.js → www/build/p-015621c8.entry.js} +2 -2
  434. package/www/build/p-035807e3.entry.js +2 -0
  435. package/{dist/web-components-library/p-cd55204b.js → www/build/p-037c59b3.js} +2 -2
  436. package/www/build/{p-479b13ae.entry.js → p-0565f1b2.entry.js} +2 -2
  437. package/www/build/p-08d8f935.entry.js +2 -0
  438. package/{dist/web-components-library/p-95795174.entry.js → www/build/p-0df6b405.entry.js} +2 -2
  439. package/www/build/p-11216ee8.entry.js +2 -0
  440. package/{dist/web-components-library/p-5ccbdfbe.entry.js.map → www/build/p-11216ee8.entry.js.map} +1 -1
  441. package/www/build/p-115fab3e.entry.js +2 -0
  442. package/www/build/p-115fab3e.entry.js.map +1 -0
  443. package/www/build/{p-914e20e9.entry.js → p-11629dd3.entry.js} +2 -2
  444. package/www/build/{p-90d54c40.js → p-123739cb.js} +2 -2
  445. package/{dist/web-components-library/p-7c6dad4b.js → www/build/p-14e61df6.js} +2 -2
  446. package/www/build/{p-2e48ff6b.entry.js → p-18d63f0c.entry.js} +2 -2
  447. package/{dist/web-components-library/p-8b627bff.entry.js → www/build/p-20b628e7.entry.js} +2 -2
  448. package/www/build/{p-cc87d814.entry.js → p-22d56699.entry.js} +2 -2
  449. package/www/build/p-2798c0b2.entry.js +2 -0
  450. package/www/build/{p-83cd8d7c.entry.js → p-2a0d8ebe.entry.js} +2 -2
  451. package/www/build/p-2aeb2a94.entry.js +2 -0
  452. package/www/build/{p-34d82be5.entry.js → p-2c450113.entry.js} +2 -2
  453. package/www/build/{p-c57bb632.entry.js → p-2dcf53b3.entry.js} +2 -2
  454. package/www/build/p-30170218.entry.js +2 -0
  455. package/www/build/{p-e9149664.entry.js → p-34f4f441.entry.js} +2 -2
  456. package/www/build/{p-73d089fe.entry.js → p-384baa02.entry.js} +2 -2
  457. package/www/build/{p-46ce378d.entry.js → p-395b261e.entry.js} +2 -2
  458. package/www/build/p-3bf02cab.entry.js +2 -0
  459. package/www/build/p-3bf02cab.entry.js.map +1 -0
  460. package/www/build/{p-4a058a26.entry.js → p-42559870.entry.js} +2 -2
  461. package/www/build/{p-92da97fb.entry.js → p-4374d3f3.entry.js} +2 -2
  462. package/www/build/p-45f04bb4.js +2 -0
  463. package/www/build/{p-ec4d7f60.js → p-4c462e7f.js} +2 -2
  464. package/www/build/{p-c0588dbe.entry.js → p-4fedcbc2.entry.js} +2 -2
  465. package/{dist/web-components-library/p-7db32c12.entry.js → www/build/p-50bf57b4.entry.js} +2 -2
  466. package/{dist/web-components-library/p-8f47b574.entry.js → www/build/p-52be7378.entry.js} +2 -2
  467. package/{dist/web-components-library/p-9e183204.entry.js → www/build/p-54a70792.entry.js} +2 -2
  468. package/{dist/web-components-library/p-c9913f1e.entry.js → www/build/p-5f04d9eb.entry.js} +2 -2
  469. package/www/build/p-605f6780.entry.js +2 -0
  470. package/www/build/p-605f6780.entry.js.map +1 -0
  471. package/www/build/{p-7d844bac.entry.js → p-60a9cb8b.entry.js} +2 -2
  472. package/{dist/web-components-library/p-ddae9016.entry.js → www/build/p-6230c432.entry.js} +2 -2
  473. package/www/build/p-6e1ba2f0.entry.js +2 -0
  474. package/www/build/{p-3ce0d28c.entry.js → p-7095262b.entry.js} +2 -2
  475. package/www/build/{p-af4b759a.entry.js → p-72dae90b.entry.js} +2 -2
  476. package/www/build/p-73d686e0.entry.js +2 -0
  477. package/www/build/p-73d686e0.entry.js.map +1 -0
  478. package/www/build/p-75808b47.entry.js +2 -0
  479. package/www/build/p-75808b47.entry.js.map +1 -0
  480. package/www/build/{p-0d1dbe04.entry.js → p-8c952964.entry.js} +2 -2
  481. package/www/build/{p-18fbbf63.entry.js → p-9187ce36.entry.js} +2 -2
  482. package/www/build/{p-08691c77.entry.js → p-9218da42.entry.js} +2 -2
  483. package/www/build/{p-2cc8c5a5.entry.js → p-972098a5.entry.js} +2 -2
  484. package/www/build/{p-ecaca2df.entry.js → p-9f0a3d88.entry.js} +2 -2
  485. package/www/build/p-a90027c2.entry.js +2 -0
  486. package/www/build/p-a90027c2.entry.js.map +1 -0
  487. package/www/build/p-aa0b3e7a.entry.js +2 -0
  488. package/www/build/p-aa0b3e7a.entry.js.map +1 -0
  489. package/{dist/web-components-library/p-65c59027.entry.js → www/build/p-aa42f01d.entry.js} +2 -2
  490. package/www/build/p-ad825740.entry.js +2 -0
  491. package/www/build/{p-76d8d404.entry.js → p-b309bd71.entry.js} +2 -2
  492. package/www/build/p-b38be247.entry.js +2 -0
  493. package/{dist/web-components-library/p-ac03a6cc.entry.js → www/build/p-bbd492d3.entry.js} +2 -2
  494. package/www/build/p-c13ef624.js +2 -0
  495. package/www/build/p-c2af9a71.entry.js +2 -0
  496. package/www/build/p-c2af9a71.entry.js.map +1 -0
  497. package/www/build/p-c7df6a63.entry.js +2 -0
  498. package/www/build/p-c7df6a63.entry.js.map +1 -0
  499. package/www/build/{p-0eab0213.entry.js → p-caccf490.entry.js} +2 -2
  500. package/www/build/p-cb8aec27.entry.js +2 -0
  501. package/www/build/p-cc8186a9.entry.js +2 -0
  502. package/{dist/web-components-library/p-d972d6aa.entry.js.map → www/build/p-cc8186a9.entry.js.map} +1 -1
  503. package/www/build/p-d65aba93.entry.js +2 -0
  504. package/www/build/{p-386e385c.entry.js.map → p-d65aba93.entry.js.map} +1 -1
  505. package/www/build/p-db0a5f51.entry.js +2 -0
  506. package/www/build/p-db0a5f51.entry.js.map +1 -0
  507. package/www/build/p-deb86b5c.entry.js +2 -0
  508. package/www/build/{p-efe1de34.entry.js → p-ea36d666.entry.js} +2 -2
  509. package/www/build/{p-9078dfd7.entry.js → p-f06bd257.entry.js} +2 -2
  510. package/www/build/{p-2f486acc.entry.js → p-f075ec62.entry.js} +2 -2
  511. package/www/build/{p-27a59513.entry.js → p-f8915e2e.entry.js} +2 -2
  512. package/www/build/{p-068b15fc.entry.js → p-fb06a5d8.entry.js} +2 -2
  513. package/www/build/p-feb84d36.js +2 -0
  514. package/www/build/web-components-library.esm.js +1 -1
  515. package/www/build/web-components-library.esm.js.map +1 -1
  516. package/www/index.html +1 -1
  517. package/dist/web-components-library/p-2c6519dc.entry.js +0 -2
  518. package/dist/web-components-library/p-2dbbc58f.entry.js +0 -2
  519. package/dist/web-components-library/p-2dbbc58f.entry.js.map +0 -1
  520. package/dist/web-components-library/p-2f3732d9.entry.js +0 -2
  521. package/dist/web-components-library/p-382e2939.entry.js +0 -2
  522. package/dist/web-components-library/p-386e385c.entry.js +0 -2
  523. package/dist/web-components-library/p-3f8725c1.entry.js +0 -2
  524. package/dist/web-components-library/p-40280990.entry.js +0 -2
  525. package/dist/web-components-library/p-4629a66a.entry.js +0 -2
  526. package/dist/web-components-library/p-4629a66a.entry.js.map +0 -1
  527. package/dist/web-components-library/p-563e86c0.entry.js +0 -2
  528. package/dist/web-components-library/p-563e86c0.entry.js.map +0 -1
  529. package/dist/web-components-library/p-5ccbdfbe.entry.js +0 -2
  530. package/dist/web-components-library/p-612da2d0.entry.js +0 -2
  531. package/dist/web-components-library/p-612da2d0.entry.js.map +0 -1
  532. package/dist/web-components-library/p-65f993a4.entry.js +0 -2
  533. package/dist/web-components-library/p-6f69c2b6.js +0 -2
  534. package/dist/web-components-library/p-72618fde.entry.js +0 -2
  535. package/dist/web-components-library/p-72618fde.entry.js.map +0 -1
  536. package/dist/web-components-library/p-8d79971b.entry.js +0 -2
  537. package/dist/web-components-library/p-8d79971b.entry.js.map +0 -1
  538. package/dist/web-components-library/p-93069a90.entry.js +0 -2
  539. package/dist/web-components-library/p-a7bcb93d.entry.js +0 -2
  540. package/dist/web-components-library/p-a7bcb93d.entry.js.map +0 -1
  541. package/dist/web-components-library/p-add2b5e8.entry.js +0 -2
  542. package/dist/web-components-library/p-b896dcf7.entry.js +0 -2
  543. package/dist/web-components-library/p-cc6406ab.entry.js +0 -2
  544. package/dist/web-components-library/p-d34a177a.entry.js +0 -2
  545. package/dist/web-components-library/p-d34a177a.entry.js.map +0 -1
  546. package/dist/web-components-library/p-d972d6aa.entry.js +0 -2
  547. package/dist/web-components-library/p-e4e0d271.entry.js +0 -2
  548. package/dist/web-components-library/p-e4e0d271.entry.js.map +0 -1
  549. package/dist/web-components-library/p-f400cf1b.js +0 -2
  550. package/dist/web-components-library/p-f413c03c.entry.js +0 -2
  551. package/dist/web-components-library/p-f413c03c.entry.js.map +0 -1
  552. package/www/build/p-2c6519dc.entry.js +0 -2
  553. package/www/build/p-2dbbc58f.entry.js +0 -2
  554. package/www/build/p-2dbbc58f.entry.js.map +0 -1
  555. package/www/build/p-2f3732d9.entry.js +0 -2
  556. package/www/build/p-382e2939.entry.js +0 -2
  557. package/www/build/p-386e385c.entry.js +0 -2
  558. package/www/build/p-3f8725c1.entry.js +0 -2
  559. package/www/build/p-40280990.entry.js +0 -2
  560. package/www/build/p-4629a66a.entry.js +0 -2
  561. package/www/build/p-4629a66a.entry.js.map +0 -1
  562. package/www/build/p-563e86c0.entry.js +0 -2
  563. package/www/build/p-563e86c0.entry.js.map +0 -1
  564. package/www/build/p-5ccbdfbe.entry.js +0 -2
  565. package/www/build/p-612da2d0.entry.js +0 -2
  566. package/www/build/p-612da2d0.entry.js.map +0 -1
  567. package/www/build/p-65f993a4.entry.js +0 -2
  568. package/www/build/p-6f69c2b6.js +0 -2
  569. package/www/build/p-72618fde.entry.js +0 -2
  570. package/www/build/p-72618fde.entry.js.map +0 -1
  571. package/www/build/p-8d79971b.entry.js +0 -2
  572. package/www/build/p-8d79971b.entry.js.map +0 -1
  573. package/www/build/p-93069a90.entry.js +0 -2
  574. package/www/build/p-a7bcb93d.entry.js +0 -2
  575. package/www/build/p-a7bcb93d.entry.js.map +0 -1
  576. package/www/build/p-add2b5e8.entry.js +0 -2
  577. package/www/build/p-b896dcf7.entry.js +0 -2
  578. package/www/build/p-c9e50d51.js +0 -2
  579. package/www/build/p-cc6406ab.entry.js +0 -2
  580. package/www/build/p-d34a177a.entry.js +0 -2
  581. package/www/build/p-d34a177a.entry.js.map +0 -1
  582. package/www/build/p-d972d6aa.entry.js +0 -2
  583. package/www/build/p-e4e0d271.entry.js +0 -2
  584. package/www/build/p-e4e0d271.entry.js.map +0 -1
  585. package/www/build/p-f400cf1b.js +0 -2
  586. package/www/build/p-f413c03c.entry.js +0 -2
  587. package/www/build/p-f413c03c.entry.js.map +0 -1
  588. /package/dist/web-components-library/{p-a707640a.entry.js.map → p-015621c8.entry.js.map} +0 -0
  589. /package/dist/web-components-library/{p-93069a90.entry.js.map → p-035807e3.entry.js.map} +0 -0
  590. /package/dist/web-components-library/{p-cd55204b.js.map → p-037c59b3.js.map} +0 -0
  591. /package/dist/web-components-library/{p-479b13ae.entry.js.map → p-0565f1b2.entry.js.map} +0 -0
  592. /package/dist/web-components-library/{p-65f993a4.entry.js.map → p-08d8f935.entry.js.map} +0 -0
  593. /package/dist/web-components-library/{p-95795174.entry.js.map → p-0df6b405.entry.js.map} +0 -0
  594. /package/dist/web-components-library/{p-914e20e9.entry.js.map → p-11629dd3.entry.js.map} +0 -0
  595. /package/dist/web-components-library/{p-90d54c40.js.map → p-123739cb.js.map} +0 -0
  596. /package/dist/web-components-library/{p-7c6dad4b.js.map → p-14e61df6.js.map} +0 -0
  597. /package/dist/web-components-library/{p-2e48ff6b.entry.js.map → p-18d63f0c.entry.js.map} +0 -0
  598. /package/dist/web-components-library/{p-8b627bff.entry.js.map → p-20b628e7.entry.js.map} +0 -0
  599. /package/dist/web-components-library/{p-cc87d814.entry.js.map → p-22d56699.entry.js.map} +0 -0
  600. /package/dist/web-components-library/{p-2c6519dc.entry.js.map → p-2798c0b2.entry.js.map} +0 -0
  601. /package/dist/web-components-library/{p-83cd8d7c.entry.js.map → p-2a0d8ebe.entry.js.map} +0 -0
  602. /package/dist/web-components-library/{p-2f3732d9.entry.js.map → p-2aeb2a94.entry.js.map} +0 -0
  603. /package/dist/web-components-library/{p-34d82be5.entry.js.map → p-2c450113.entry.js.map} +0 -0
  604. /package/dist/web-components-library/{p-c57bb632.entry.js.map → p-2dcf53b3.entry.js.map} +0 -0
  605. /package/dist/web-components-library/{p-40280990.entry.js.map → p-30170218.entry.js.map} +0 -0
  606. /package/dist/web-components-library/{p-e9149664.entry.js.map → p-34f4f441.entry.js.map} +0 -0
  607. /package/dist/web-components-library/{p-73d089fe.entry.js.map → p-384baa02.entry.js.map} +0 -0
  608. /package/dist/web-components-library/{p-46ce378d.entry.js.map → p-395b261e.entry.js.map} +0 -0
  609. /package/dist/web-components-library/{p-4a058a26.entry.js.map → p-42559870.entry.js.map} +0 -0
  610. /package/dist/web-components-library/{p-92da97fb.entry.js.map → p-4374d3f3.entry.js.map} +0 -0
  611. /package/dist/web-components-library/{p-ec4d7f60.js.map → p-4c462e7f.js.map} +0 -0
  612. /package/dist/web-components-library/{p-c0588dbe.entry.js.map → p-4fedcbc2.entry.js.map} +0 -0
  613. /package/dist/web-components-library/{p-7db32c12.entry.js.map → p-50bf57b4.entry.js.map} +0 -0
  614. /package/dist/web-components-library/{p-8f47b574.entry.js.map → p-52be7378.entry.js.map} +0 -0
  615. /package/dist/web-components-library/{p-9e183204.entry.js.map → p-54a70792.entry.js.map} +0 -0
  616. /package/dist/web-components-library/{p-c9913f1e.entry.js.map → p-5f04d9eb.entry.js.map} +0 -0
  617. /package/dist/web-components-library/{p-7d844bac.entry.js.map → p-60a9cb8b.entry.js.map} +0 -0
  618. /package/dist/web-components-library/{p-ddae9016.entry.js.map → p-6230c432.entry.js.map} +0 -0
  619. /package/dist/web-components-library/{p-382e2939.entry.js.map → p-6e1ba2f0.entry.js.map} +0 -0
  620. /package/dist/web-components-library/{p-3ce0d28c.entry.js.map → p-7095262b.entry.js.map} +0 -0
  621. /package/dist/web-components-library/{p-af4b759a.entry.js.map → p-72dae90b.entry.js.map} +0 -0
  622. /package/dist/web-components-library/{p-0d1dbe04.entry.js.map → p-8c952964.entry.js.map} +0 -0
  623. /package/dist/web-components-library/{p-18fbbf63.entry.js.map → p-9187ce36.entry.js.map} +0 -0
  624. /package/dist/web-components-library/{p-08691c77.entry.js.map → p-9218da42.entry.js.map} +0 -0
  625. /package/dist/web-components-library/{p-2cc8c5a5.entry.js.map → p-972098a5.entry.js.map} +0 -0
  626. /package/dist/web-components-library/{p-ecaca2df.entry.js.map → p-9f0a3d88.entry.js.map} +0 -0
  627. /package/dist/web-components-library/{p-65c59027.entry.js.map → p-aa42f01d.entry.js.map} +0 -0
  628. /package/dist/web-components-library/{p-add2b5e8.entry.js.map → p-ad825740.entry.js.map} +0 -0
  629. /package/dist/web-components-library/{p-76d8d404.entry.js.map → p-b309bd71.entry.js.map} +0 -0
  630. /package/dist/web-components-library/{p-b896dcf7.entry.js.map → p-b38be247.entry.js.map} +0 -0
  631. /package/dist/web-components-library/{p-ac03a6cc.entry.js.map → p-bbd492d3.entry.js.map} +0 -0
  632. /package/dist/web-components-library/{p-6f69c2b6.js.map → p-c13ef624.js.map} +0 -0
  633. /package/dist/web-components-library/{p-0eab0213.entry.js.map → p-caccf490.entry.js.map} +0 -0
  634. /package/dist/web-components-library/{p-3f8725c1.entry.js.map → p-cb8aec27.entry.js.map} +0 -0
  635. /package/dist/web-components-library/{p-cc6406ab.entry.js.map → p-deb86b5c.entry.js.map} +0 -0
  636. /package/dist/web-components-library/{p-efe1de34.entry.js.map → p-ea36d666.entry.js.map} +0 -0
  637. /package/dist/web-components-library/{p-9078dfd7.entry.js.map → p-f06bd257.entry.js.map} +0 -0
  638. /package/dist/web-components-library/{p-2f486acc.entry.js.map → p-f075ec62.entry.js.map} +0 -0
  639. /package/dist/web-components-library/{p-27a59513.entry.js.map → p-f8915e2e.entry.js.map} +0 -0
  640. /package/dist/web-components-library/{p-068b15fc.entry.js.map → p-fb06a5d8.entry.js.map} +0 -0
  641. /package/dist/web-components-library/{p-f400cf1b.js.map → p-feb84d36.js.map} +0 -0
  642. /package/www/build/{p-a707640a.entry.js.map → p-015621c8.entry.js.map} +0 -0
  643. /package/www/build/{p-93069a90.entry.js.map → p-035807e3.entry.js.map} +0 -0
  644. /package/www/build/{p-cd55204b.js.map → p-037c59b3.js.map} +0 -0
  645. /package/www/build/{p-479b13ae.entry.js.map → p-0565f1b2.entry.js.map} +0 -0
  646. /package/www/build/{p-65f993a4.entry.js.map → p-08d8f935.entry.js.map} +0 -0
  647. /package/www/build/{p-95795174.entry.js.map → p-0df6b405.entry.js.map} +0 -0
  648. /package/www/build/{p-914e20e9.entry.js.map → p-11629dd3.entry.js.map} +0 -0
  649. /package/www/build/{p-90d54c40.js.map → p-123739cb.js.map} +0 -0
  650. /package/www/build/{p-7c6dad4b.js.map → p-14e61df6.js.map} +0 -0
  651. /package/www/build/{p-2e48ff6b.entry.js.map → p-18d63f0c.entry.js.map} +0 -0
  652. /package/www/build/{p-8b627bff.entry.js.map → p-20b628e7.entry.js.map} +0 -0
  653. /package/www/build/{p-cc87d814.entry.js.map → p-22d56699.entry.js.map} +0 -0
  654. /package/www/build/{p-2c6519dc.entry.js.map → p-2798c0b2.entry.js.map} +0 -0
  655. /package/www/build/{p-83cd8d7c.entry.js.map → p-2a0d8ebe.entry.js.map} +0 -0
  656. /package/www/build/{p-2f3732d9.entry.js.map → p-2aeb2a94.entry.js.map} +0 -0
  657. /package/www/build/{p-34d82be5.entry.js.map → p-2c450113.entry.js.map} +0 -0
  658. /package/www/build/{p-c57bb632.entry.js.map → p-2dcf53b3.entry.js.map} +0 -0
  659. /package/www/build/{p-40280990.entry.js.map → p-30170218.entry.js.map} +0 -0
  660. /package/www/build/{p-e9149664.entry.js.map → p-34f4f441.entry.js.map} +0 -0
  661. /package/www/build/{p-73d089fe.entry.js.map → p-384baa02.entry.js.map} +0 -0
  662. /package/www/build/{p-46ce378d.entry.js.map → p-395b261e.entry.js.map} +0 -0
  663. /package/www/build/{p-4a058a26.entry.js.map → p-42559870.entry.js.map} +0 -0
  664. /package/www/build/{p-92da97fb.entry.js.map → p-4374d3f3.entry.js.map} +0 -0
  665. /package/www/build/{p-ec4d7f60.js.map → p-4c462e7f.js.map} +0 -0
  666. /package/www/build/{p-c0588dbe.entry.js.map → p-4fedcbc2.entry.js.map} +0 -0
  667. /package/www/build/{p-7db32c12.entry.js.map → p-50bf57b4.entry.js.map} +0 -0
  668. /package/www/build/{p-8f47b574.entry.js.map → p-52be7378.entry.js.map} +0 -0
  669. /package/www/build/{p-9e183204.entry.js.map → p-54a70792.entry.js.map} +0 -0
  670. /package/www/build/{p-c9913f1e.entry.js.map → p-5f04d9eb.entry.js.map} +0 -0
  671. /package/www/build/{p-7d844bac.entry.js.map → p-60a9cb8b.entry.js.map} +0 -0
  672. /package/www/build/{p-ddae9016.entry.js.map → p-6230c432.entry.js.map} +0 -0
  673. /package/www/build/{p-382e2939.entry.js.map → p-6e1ba2f0.entry.js.map} +0 -0
  674. /package/www/build/{p-3ce0d28c.entry.js.map → p-7095262b.entry.js.map} +0 -0
  675. /package/www/build/{p-af4b759a.entry.js.map → p-72dae90b.entry.js.map} +0 -0
  676. /package/www/build/{p-0d1dbe04.entry.js.map → p-8c952964.entry.js.map} +0 -0
  677. /package/www/build/{p-18fbbf63.entry.js.map → p-9187ce36.entry.js.map} +0 -0
  678. /package/www/build/{p-08691c77.entry.js.map → p-9218da42.entry.js.map} +0 -0
  679. /package/www/build/{p-2cc8c5a5.entry.js.map → p-972098a5.entry.js.map} +0 -0
  680. /package/www/build/{p-ecaca2df.entry.js.map → p-9f0a3d88.entry.js.map} +0 -0
  681. /package/www/build/{p-65c59027.entry.js.map → p-aa42f01d.entry.js.map} +0 -0
  682. /package/www/build/{p-add2b5e8.entry.js.map → p-ad825740.entry.js.map} +0 -0
  683. /package/www/build/{p-76d8d404.entry.js.map → p-b309bd71.entry.js.map} +0 -0
  684. /package/www/build/{p-b896dcf7.entry.js.map → p-b38be247.entry.js.map} +0 -0
  685. /package/www/build/{p-ac03a6cc.entry.js.map → p-bbd492d3.entry.js.map} +0 -0
  686. /package/www/build/{p-6f69c2b6.js.map → p-c13ef624.js.map} +0 -0
  687. /package/www/build/{p-0eab0213.entry.js.map → p-caccf490.entry.js.map} +0 -0
  688. /package/www/build/{p-3f8725c1.entry.js.map → p-cb8aec27.entry.js.map} +0 -0
  689. /package/www/build/{p-cc6406ab.entry.js.map → p-deb86b5c.entry.js.map} +0 -0
  690. /package/www/build/{p-efe1de34.entry.js.map → p-ea36d666.entry.js.map} +0 -0
  691. /package/www/build/{p-9078dfd7.entry.js.map → p-f06bd257.entry.js.map} +0 -0
  692. /package/www/build/{p-2f486acc.entry.js.map → p-f075ec62.entry.js.map} +0 -0
  693. /package/www/build/{p-27a59513.entry.js.map → p-f8915e2e.entry.js.map} +0 -0
  694. /package/www/build/{p-068b15fc.entry.js.map → p-fb06a5d8.entry.js.map} +0 -0
  695. /package/www/build/{p-f400cf1b.js.map → p-feb84d36.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"z-menu-section-deprecated.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,SAAS,GAAG,88DAA88D,CAAC;AACj+D,qCAAe,SAAS;;MCWX,sBAAsB;;;;;;;;;IAqBzB,MAAM;QACZ,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YACpB,OAAO;SACR;QAED,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;KACrD;;IAID,WAAW,CAAC,EAAc;QACxB,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAc,CAAC,EAAE;YAC9D,OAAO;SACR;QAED,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;QAClB,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;KACpB;;;;IAKO,YAAY;QAClB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;KACjF;;;;;IAMO,iBAAiB,CAAC,EAAS;QACjC,MAAM,YAAY,GAAI,EAAE,CAAC,MAA0B,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAgB,CAAC;QACzF,YAAY,CAAC,OAAO,CAAC,IAAI,GAAG,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,KAAI,IAAI,CAAC;KAC7D;IAED,iBAAiB;QACf,IAAI,CAAC,YAAY,EAAE,CAAC;KACrB;IAED,MAAM;QACJ,QACEA,QAACC,UAAI,qDACH,IAAI,EAAC,MAAM,EACX,IAAI,EAAE,IAAI,CAAC,IAAI,IAEfD,qEACE,KAAK,EAAC,OAAO,kBACC,IAAI,CAAC,IAAI,GAAG,MAAM,GAAG,OAAO,EAC1C,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAE/BA,mEAAM,YAAY,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAS,EAC7D,IAAI,CAAC,UAAU,IAAIA,qEAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,YAAY,GAAG,cAAc,GAAI,CACxE,EACR,IAAI,CAAC,IAAI,KACRA,kEAAK,KAAK,EAAC,OAAO,IAChBA,mEACE,IAAI,EAAC,MAAM,EACX,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,GACpC,CACJ,CACP,CACI,EACP;KACH;;;;;;;","names":["h","Host"],"sources":["src/components/deprecated/z-menu-section-deprecated/styles.css?tag=z-menu-section-deprecated&encapsulation=shadow","src/components/deprecated/z-menu-section-deprecated/index.tsx"],"sourcesContent":[":host {\n display: inline-flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n padding: 0;\n font-family: var(--font-family-sans);\n}\n\n:host,\n::slotted(*),\n* {\n box-sizing: border-box;\n}\n\n::slotted(a) {\n text-decoration: none;\n}\n\n::slotted(*) {\n color: var(--color-default-text);\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\n:host(:is([active], [open])) .label,\n.label:hover {\n border-color: var(--color-secondary01);\n}\n\n:host(:is([active], [open])) .label ::slotted(*),\n.label:focus:focus-visible ::slotted(*),\n.label:hover ::slotted(*) {\n font-weight: var(--font-bd);\n}\n\n.label {\n display: flex;\n width: 100%;\n align-items: center;\n padding: calc(var(--space-unit) * 2) calc(var(--space-unit) / 2);\n border: 0;\n border-bottom: var(--border-size-small) solid var(--color-surface05);\n margin: 0;\n background: transparent;\n border-radius: 0;\n cursor: pointer;\n text-align: left;\n}\n\n::slotted([data-text]) {\n display: inline-flex;\n flex-direction: column;\n}\n\n/* Trick to prevent layout shifts on font-weight changes.\nThe trick is to put an hidden copy of the text already set to bold,\nso the needed space is correctly calculated before any hover/active state changes the\nfont-weight of the real text.\nThe hidden text has an height of 0px so it can expand the width without changing the height\nwhen placed below the real text using `flex-direction: column`. */\n::slotted([data-text])::after {\n overflow: hidden;\n height: 0;\n content: attr(data-text);\n content: attr(data-text) / \"\";\n font-weight: var(--font-bd);\n pointer-events: none;\n user-select: none;\n visibility: hidden;\n}\n\n@media speech {\n ::slotted([data-text])::after {\n display: none;\n }\n}\n\n.label ::slotted(*) {\n width: 100%;\n margin: 0;\n font-size: var(--font-size-3);\n line-height: 1.25;\n}\n\n.label:focus:focus-visible {\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\n.label z-icon {\n margin-left: calc(var(--space-unit) * 4);\n fill: var(--color-default-icon);\n}\n\n.items {\n display: flex;\n width: 100%;\n flex-direction: column;\n padding: calc(var(--space-unit) / 2);\n padding-bottom: calc(var(--space-unit) * 1.5);\n}\n\n.items > ::slotted([slot=\"item\"]) {\n display: inline-flex;\n padding: calc(var(--space-unit) / 2);\n margin: 0;\n font-size: var(--font-size-2);\n line-height: 1.4;\n outline: none;\n}\n\n.items > ::slotted([slot=\"item\"]:focus:focus-visible) {\n box-shadow: var(--shadow-focus-primary);\n color: var(--color-secondary01);\n}\n\n.items > ::slotted([slot=\"item\"]:hover),\n.items > ::slotted([slot=\"item\"]:focus:focus-visible),\n.items > ::slotted([slot=\"item\"][active]) {\n color: var(--color-secondary01);\n font-weight: var(--font-bd);\n}\n","import {Component, Element, Event, EventEmitter, Host, Listen, Prop, State, h} from \"@stencil/core\";\n\n/**\n * A component to create submenus inside the ZMenu.\n * @slot - Label of the menu section.\n * @slot item - Single entry of the section. Set the same slot name to different items to put many of them. Add the `active` attribute to a slotted item to highlight it.\n */\n@Component({\n tag: \"z-menu-section-deprecated\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZMenuSectionDeprecated {\n @Element() hostElement: HTMLZMenuSectionDeprecatedElement;\n\n /** Active state */\n @Prop({reflect: true})\n active?: boolean;\n\n @State()\n open: boolean;\n\n @State()\n hasContent: boolean;\n\n /** The section has been opened. */\n @Event()\n opened: EventEmitter;\n\n /** The section has been closed. */\n @Event()\n closed: EventEmitter;\n\n private toggle(): void {\n if (!this.hasContent) {\n return;\n }\n\n this.open = !this.open;\n this.open ? this.opened.emit() : this.closed.emit();\n }\n\n /** Close the list when a click is performed outside of this Element. */\n @Listen(\"click\", {target: \"document\"})\n handleClick(ev: MouseEvent): void {\n if (!this.open || this.hostElement.contains(ev.target as Node)) {\n return;\n }\n\n this.open = false;\n this.closed.emit();\n }\n\n /**\n * Check if some content slot is set.\n */\n private checkContent(): void {\n this.hasContent = this.hostElement.querySelectorAll('[slot=\"item\"]').length > 0;\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?.innerText || null;\n }\n\n componentWillLoad(): void {\n this.checkContent();\n }\n\n render(): HTMLZMenuSectionElement {\n return (\n <Host\n role=\"menu\"\n open={this.open}\n >\n <button\n class=\"label\"\n aria-pressed={this.open ? \"true\" : \"false\"}\n onClick={this.toggle.bind(this)}\n >\n <slot onSlotchange={this.onLabelSlotChange.bind(this)}></slot>\n {this.hasContent && <z-icon name={this.open ? \"chevron-up\" : \"chevron-down\"} />}\n </button>\n {this.open && (\n <div class=\"items\">\n <slot\n name=\"item\"\n onSlotchange={this.checkContent.bind(this)}\n ></slot>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"z-menu-section-deprecated.entry.cjs.js","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M,CAAC,IAAI,CAAC,IAAI,CAAC,IAE/BA,mEAAM,YAAY,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAS,EAC7D,IAAI,CAAC,UAAU,IAAIA,qEAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,YAAY,GAAG,cAAc,GAAI,CACxE,EACR,IAAI,CAAC,IAAI,KACRA,kEAAK,KAAK,EAAC,OAAO,IAChBA,mEACE,IAAI,EAAC,MAAM,EACX,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,GACpC,CACJ,CACP,CACI,EACP;KACH;;;;;;;","names":["h","Host"],"sources":["src/components/deprecated/z-menu-section-deprecated/styles.css?tag=z-menu-section-deprecated&encapsulation=shadow","src/components/deprecated/z-menu-section-deprecated/index.tsx"],"sourcesContent":[":host {\n display: inline-flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n padding: 0;\n font-family: var(--font-family-sans);\n}\n\n:host,\n::slotted(*),\n* {\n box-sizing: border-box;\n}\n\n::slotted(a) {\n text-decoration: none;\n}\n\n::slotted(*) {\n color: var(--color-default-text);\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\n:host(:is([active], [open])) .label,\n.label:hover {\n border-color: var(--color-primary01);\n}\n\n:host(:is([active], [open])) .label ::slotted(*),\n.label:focus:focus-visible ::slotted(*),\n.label:hover ::slotted(*) {\n font-weight: var(--font-bd);\n}\n\n.label {\n display: flex;\n width: 100%;\n align-items: center;\n padding: calc(var(--space-unit) * 2) calc(var(--space-unit) / 2);\n border: 0;\n border-bottom: var(--border-size-small) solid var(--color-surface05);\n margin: 0;\n background: transparent;\n border-radius: 0;\n cursor: pointer;\n text-align: left;\n}\n\n::slotted([data-text]) {\n display: inline-flex;\n flex-direction: column;\n}\n\n/* Trick to prevent layout shifts on font-weight changes.\nThe trick is to put an hidden copy of the text already set to bold,\nso the needed space is correctly calculated before any hover/active state changes the\nfont-weight of the real text.\nThe hidden text has an height of 0px so it can expand the width without changing the height\nwhen placed below the real text using `flex-direction: column`. */\n::slotted([data-text])::after {\n overflow: hidden;\n height: 0;\n content: attr(data-text);\n content: attr(data-text) / \"\";\n font-weight: var(--font-bd);\n pointer-events: none;\n user-select: none;\n visibility: hidden;\n}\n\n@media speech {\n ::slotted([data-text])::after {\n display: none;\n }\n}\n\n.label ::slotted(*) {\n width: 100%;\n margin: 0;\n font-size: var(--font-size-3);\n line-height: 1.25;\n}\n\n.label:focus:focus-visible {\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\n.label z-icon {\n margin-left: calc(var(--space-unit) * 4);\n fill: var(--color-default-icon);\n}\n\n.items {\n display: flex;\n width: 100%;\n flex-direction: column;\n padding: calc(var(--space-unit) / 2);\n padding-bottom: calc(var(--space-unit) * 1.5);\n}\n\n.items > ::slotted([slot=\"item\"]) {\n display: inline-flex;\n padding: calc(var(--space-unit) / 2);\n margin: 0;\n font-size: var(--font-size-2);\n line-height: 1.4;\n outline: none;\n}\n\n.items > ::slotted([slot=\"item\"]:focus:focus-visible) {\n box-shadow: var(--shadow-focus-primary);\n color: var(--color-primary01);\n}\n\n.items > ::slotted([slot=\"item\"]:hover),\n.items > ::slotted([slot=\"item\"]:focus:focus-visible),\n.items > ::slotted([slot=\"item\"][active]) {\n color: var(--color-primary01);\n font-weight: var(--font-bd);\n}\n","import {Component, Element, Event, EventEmitter, Host, Listen, Prop, State, h} from \"@stencil/core\";\n\n/**\n * A component to create submenus inside the ZMenu.\n * @slot - Label of the menu section.\n * @slot item - Single entry of the section. Set the same slot name to different items to put many of them. Add the `active` attribute to a slotted item to highlight it.\n */\n@Component({\n tag: \"z-menu-section-deprecated\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZMenuSectionDeprecated {\n @Element() hostElement: HTMLZMenuSectionDeprecatedElement;\n\n /** Active state */\n @Prop({reflect: true})\n active?: boolean;\n\n @State()\n open: boolean;\n\n @State()\n hasContent: boolean;\n\n /** The section has been opened. */\n @Event()\n opened: EventEmitter;\n\n /** The section has been closed. */\n @Event()\n closed: EventEmitter;\n\n private toggle(): void {\n if (!this.hasContent) {\n return;\n }\n\n this.open = !this.open;\n this.open ? this.opened.emit() : this.closed.emit();\n }\n\n /** Close the list when a click is performed outside of this Element. */\n @Listen(\"click\", {target: \"document\"})\n handleClick(ev: MouseEvent): void {\n if (!this.open || this.hostElement.contains(ev.target as Node)) {\n return;\n }\n\n this.open = false;\n this.closed.emit();\n }\n\n /**\n * Check if some content slot is set.\n */\n private checkContent(): void {\n this.hasContent = this.hostElement.querySelectorAll('[slot=\"item\"]').length > 0;\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?.innerText || null;\n }\n\n componentWillLoad(): void {\n this.checkContent();\n }\n\n render(): HTMLZMenuSectionElement {\n return (\n <Host\n role=\"menu\"\n open={this.open}\n >\n <button\n class=\"label\"\n aria-pressed={this.open ? \"true\" : \"false\"}\n onClick={this.toggle.bind(this)}\n >\n <slot onSlotchange={this.onLabelSlotChange.bind(this)}></slot>\n {this.hasContent && <z-icon name={this.open ? \"chevron-up\" : \"chevron-down\"} />}\n </button>\n {this.open && (\n <div class=\"items\">\n <slot\n name=\"item\"\n onSlotchange={this.checkContent.bind(this)}\n ></slot>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index$1 = require('./index-96af6326.js');
6
6
  const index = require('./index-f5ebcaa2.js');
7
7
 
8
- const stylesCss = ":host{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:0;font-family:var(--font-family-sans)}:host,::slotted(*),*{box-sizing:border-box}::slotted(a){text-decoration:none}::slotted(*){color:var(--color-default-text);font-family:var(--font-family-sans);font-weight:var(--font-rg)}.label{display:flex;width:100%;align-items:center;padding:var(--space-unit) 0;border:0;border-bottom:var(--border-size-small) solid var(--color-surface03);margin:0;background:transparent;border-radius:0;cursor:pointer;text-align:left}:host(:last-child:not([open])) .label{border-bottom:none}:host(:is([active],[open])) .label,.label:focus:focus-visible,.label:hover{border-color:var(--color-secondary01)}.label:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}:host(:is([active],[open])) .label ::slotted(*),.label:focus:focus-visible ::slotted(*),.label:hover ::slotted(*){font-weight:var(--font-bd)}::slotted([data-text]){display:inline-flex;flex-direction:column}::slotted([data-text])::after{overflow:hidden;height:0;content:attr(data-text);content:attr(data-text) / \"\";font-weight:var(--font-bd);pointer-events:none;user-select:none;visibility:hidden}@media speech{::slotted([data-text])::after{display:none}}.label ::slotted(*){width:100%;margin:0;font-size:var(--font-size-3);line-height:1.5}.label z-icon{margin-left:calc(var(--space-unit) * 4);fill:var(--color-default-icon)}.items{display:flex;width:100%;flex-direction:column;padding:calc(var(--space-unit) / 2);padding-bottom:calc(var(--space-unit) * 1.5)}.items[hidden]{display:none}::slotted([slot=\"section\"]){display:inline-flex;padding:calc(var(--space-unit) / 2);margin:0;font-size:var(--font-size-1);line-height:1.333;outline:none}::slotted([slot=\"section\"]:last-of-type){border:none}::slotted([slot=\"section\"]:focus:focus-visible){box-shadow:var(--shadow-focus-primary);color:var(--color-secondary01)}::slotted([slot=\"section\"]:hover),::slotted([slot=\"section\"]:focus:focus-visible),::slotted([slot=\"section\"][active]){color:var(--color-secondary01);font-weight:var(--font-bd)}";
8
+ const stylesCss = ":host{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:0;font-family:var(--font-family-sans)}:host,::slotted(*),*{box-sizing:border-box}::slotted(a){text-decoration:none}::slotted(*){color:var(--color-default-text);font-family:var(--font-family-sans);font-weight:var(--font-rg)}.label{display:flex;width:100%;align-items:center;padding:var(--space-unit) 0;border:0;border-bottom:var(--border-size-small) solid var(--color-surface03);margin:0;background:transparent;border-radius:0;cursor:pointer;text-align:left}:host(:last-child:not([open])) .label{border-bottom:none}:host(:is([active],[open])) .label,.label:focus:focus-visible,.label:hover{border-color:var(--color-primary01)}.label:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}:host(:is([active],[open])) .label ::slotted(*),.label:focus:focus-visible ::slotted(*),.label:hover ::slotted(*){font-weight:var(--font-bd)}::slotted([data-text]){display:inline-flex;flex-direction:column}::slotted([data-text])::after{overflow:hidden;height:0;content:attr(data-text);content:attr(data-text) / \"\";font-weight:var(--font-bd);pointer-events:none;user-select:none;visibility:hidden}@media speech{::slotted([data-text])::after{display:none}}.label ::slotted(*){width:100%;margin:0;font-size:var(--font-size-3);line-height:1.5}.label z-icon{margin-left:calc(var(--space-unit) * 4);fill:var(--color-default-icon)}.items{display:flex;width:100%;flex-direction:column;padding:calc(var(--space-unit) / 2);padding-bottom:calc(var(--space-unit) * 1.5)}.items[hidden]{display:none}::slotted([slot=\"section\"]){display:inline-flex;padding:calc(var(--space-unit) / 2);margin:0;font-size:var(--font-size-1);line-height:1.333;outline:none}::slotted([slot=\"section\"]:last-of-type){border:none}::slotted([slot=\"section\"]:focus:focus-visible){box-shadow:var(--shadow-focus-primary);color:var(--color-primary01)}::slotted([slot=\"section\"]:hover),::slotted([slot=\"section\"]:focus:focus-visible),::slotted([slot=\"section\"][active]){color:var(--color-primary01);font-weight:var(--font-bd)}";
9
9
  const ZMenuSectionStyle0 = stylesCss;
10
10
 
11
11
  const ZMenuSection = class {
@@ -177,7 +177,7 @@ const ZMenuSection = class {
177
177
  this.onItemsChange();
178
178
  }
179
179
  render() {
180
- return (index$1.h(index$1.Host, { key: '7856cfecf0ce3ae7c4447c63772812f6e7b7a1c6', open: this.open }, index$1.h("button", { key: 'a7835a207dc247498f7877ba3934658ba0f0f17b', ref: (el) => (this.label = el), class: "label", "aria-haspopup": `${!!this.hasItems}`, "aria-expanded": `${!!this.open}`, role: "menuitem", tabindex: this.htmlTabindex, onClick: this.onLabelClick, onKeyDown: this.onLabelKeydown }, index$1.h("slot", { key: 'ba3b818777208237403b328962ef5953b23226af', onSlotchange: this.onLabelSlotChange }), this.hasItems && index$1.h("z-icon", { key: '016a4437999b5586918add14bebb5fc0d9e6c86b', name: this.open ? "chevron-up" : "chevron-down" })), index$1.h("div", { key: 'cc22753575b2650078c6528c7ea63e4789a709f6', class: "items", role: "menu", hidden: !this.open }, index$1.h("slot", { key: 'c89aa53d0d420c6f87ad7a2fd66de4ba8d17850f', name: "section", onSlotchange: this.onItemsChange }))));
180
+ return (index$1.h(index$1.Host, { key: 'ca61d9daac35484cf3fa3a7ab4d6b5700dade8b0', open: this.open }, index$1.h("button", { key: 'd2750e008a22b0de43075ed947d1b9e0f6917bd5', ref: (el) => (this.label = el), class: "label", "aria-haspopup": `${!!this.hasItems}`, "aria-expanded": `${!!this.open}`, role: "menuitem", tabindex: this.htmlTabindex, onClick: this.onLabelClick, onKeyDown: this.onLabelKeydown }, index$1.h("slot", { key: 'be5dad19dd6fece321bb68ff89e17372f4353539', onSlotchange: this.onLabelSlotChange }), this.hasItems && index$1.h("z-icon", { key: '7c6fecfd96a4391394b17f3eea38aa7f29786a18', name: this.open ? "chevron-up" : "chevron-down" })), index$1.h("div", { key: '87512635c2b4377a6c304cc0bb1345131997e5f4', class: "items", role: "menu", hidden: !this.open }, index$1.h("slot", { key: 'b2dfb0d5a94adb555fb08c7592d5c58feb3c6c5f', name: "section", onSlotchange: this.onItemsChange }))));
181
181
  }
182
182
  get host() { return index$1.getElement(this); }
183
183
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"z-menu-section.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,SAAS,GAAG,ujEAAujE,CAAC;AAC1kE,2BAAe,SAAS;;MCYX,YAAY;IAkCvB,IAAY,aAAa;QACvB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAC,QAAQ,EAAC,KAAK,QAAQ,KAAK,CAAC,CA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QACf,IAAI,CAAC,aAAa,EAAE,CAAC;KACtB;IAED,MAAM;QACJ,QACEC,UAACC,YAAI,qDAAC,IAAI,EAAE,IAAI,CAAC,IAAI,IACnBD,uEACE,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,EAC9B,KAAK,EAAC,OAAO,mBACE,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,mBACpB,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAC/B,IAAI,EAAC,UAAU,EACf,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,OAAO,EAAE,IAAI,CAAC,YAAY,EAC1B,SAAS,EAAE,IAAI,CAAC,cAAc,IAE9BA,qEAAM,YAAY,EAAE,IAAI,CAAC,iBAAiB,GAAI,EAC7C,IAAI,CAAC,QAAQ,IAAIA,uEAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,YAAY,GAAG,cAAc,GAAI,CACtE,EACTA,oEACE,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,MAAM,EACX,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI,IAElBA,qEACE,IAAI,EAAC,SAAS,EACd,YAAY,EAAE,IAAI,CAAC,aAAa,GAChC,CACE,CACD,EACP;KACH;;;;;;;;;;;","names":["KeyboardCode","h","Host"],"sources":["src/components/z-menu-section/styles.css?tag=z-menu-section&encapsulation=shadow","src/components/z-menu-section/index.tsx"],"sourcesContent":[":host {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n padding: 0;\n font-family: var(--font-family-sans);\n}\n\n:host,\n::slotted(*),\n* {\n box-sizing: border-box;\n}\n\n::slotted(a) {\n text-decoration: none;\n}\n\n::slotted(*) {\n color: var(--color-default-text);\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\n.label {\n display: flex;\n width: 100%;\n align-items: center;\n padding: var(--space-unit) 0;\n border: 0;\n border-bottom: var(--border-size-small) solid var(--color-surface03);\n margin: 0;\n background: transparent;\n border-radius: 0;\n cursor: pointer;\n text-align: left;\n}\n\n:host(:last-child:not([open])) .label {\n border-bottom: none;\n}\n\n:host(:is([active], [open])) .label,\n.label:focus:focus-visible,\n.label:hover {\n border-color: var(--color-secondary01);\n}\n\n.label:focus:focus-visible {\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\n:host(:is([active], [open])) .label ::slotted(*),\n.label:focus:focus-visible ::slotted(*),\n.label:hover ::slotted(*) {\n font-weight: var(--font-bd);\n}\n\n::slotted([data-text]) {\n display: inline-flex;\n flex-direction: column;\n}\n\n/* Trick to prevent layout shifts on font-weight changes.\nThe trick is to put an hidden copy of the text already set to bold,\nso the needed space is correctly calculated before any hover/active state changes the\nfont-weight of the real text.\nThe hidden text has an height of 0px so it can expand the width without changing the height\nwhen placed below the real text using `flex-direction: column`. */\n::slotted([data-text])::after {\n overflow: hidden;\n height: 0;\n content: attr(data-text);\n content: attr(data-text) / \"\";\n font-weight: var(--font-bd);\n pointer-events: none;\n user-select: none;\n visibility: hidden;\n}\n\n@media speech {\n ::slotted([data-text])::after {\n display: none;\n }\n}\n\n.label ::slotted(*) {\n width: 100%;\n margin: 0;\n font-size: var(--font-size-3);\n line-height: 1.5;\n}\n\n.label z-icon {\n margin-left: calc(var(--space-unit) * 4);\n fill: var(--color-default-icon);\n}\n\n.items {\n display: flex;\n width: 100%;\n flex-direction: column;\n padding: calc(var(--space-unit) / 2);\n padding-bottom: calc(var(--space-unit) * 1.5);\n}\n\n.items[hidden] {\n display: none;\n}\n\n::slotted([slot=\"section\"]) {\n display: inline-flex;\n padding: calc(var(--space-unit) / 2);\n margin: 0;\n font-size: var(--font-size-1);\n line-height: 1.333;\n outline: none;\n}\n\n::slotted([slot=\"section\"]:last-of-type) {\n border: none;\n}\n\n::slotted([slot=\"section\"]:focus:focus-visible) {\n box-shadow: var(--shadow-focus-primary);\n color: var(--color-secondary01);\n}\n\n::slotted([slot=\"section\"]:hover),\n::slotted([slot=\"section\"]:focus:focus-visible),\n::slotted([slot=\"section\"][active]) {\n color: var(--color-secondary01);\n font-weight: var(--font-bd);\n}\n","import {Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h} from \"@stencil/core\";\nimport {KeyboardCode} from \"../../beans\";\n\n/**\n * A component to create submenus inside the ZMenu.\n * @slot - Label of the menu section.\n * @slot section - Single entry of the menu section. Set the same slot name to different elements to put many of them. Add the `active` attribute to a slotted element to highlight it.\n */\n@Component({\n tag: \"z-menu-section\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZMenuSection {\n @Element() host: HTMLZMenuSectionElement;\n\n /** Active state */\n @Prop({reflect: true})\n active?: boolean;\n\n /**\n * Tabindex value to set on the label button.\n * Useful to manage keyboard navigation focus with roving tabindex handled by this component's parent (usually ZMenu).\n */\n @Prop()\n htmlTabindex = -1;\n\n /** The opening state of the section. */\n @Prop({mutable: true})\n open: boolean;\n\n @State()\n hasItems: boolean;\n\n @State()\n items: HTMLElement[];\n\n /** The section has been opened. */\n @Event()\n opened: EventEmitter;\n\n /** The section has been closed. */\n @Event()\n closed: EventEmitter;\n\n private label: HTMLButtonElement;\n\n private get focusableItem(): HTMLElement {\n return this.items.find(({tabIndex}) => tabIndex === 0);\n }\n\n private toggle(): void {\n if (!this.hasItems) {\n return;\n }\n\n this.open = !this.open;\n }\n\n private setItemsA11yAttrs(): void {\n if (!this.hasItems) {\n return;\n }\n\n this.items.forEach((item) => {\n item.setAttribute(\"role\", \"menuitem\");\n item.tabIndex = -1;\n });\n }\n\n private onItemsChange(): void {\n this.items = Array.from(this.host.querySelectorAll('[slot=\"section\"]')) as HTMLElement[];\n this.hasItems = this.items.length > 0;\n this.setItemsA11yAttrs();\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 private onLabelClick(): void {\n this.toggle();\n this.setFocus();\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 if (this.open) {\n this.focustFirstItem();\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 */\n private moveFocus(receiver: HTMLElement, current?: HTMLElement): void {\n receiver.tabIndex = 0;\n setTimeout(() => {\n receiver.focus();\n }, 100);\n if (current) {\n current.tabIndex = -1;\n }\n }\n\n private focustFirstItem(): void {\n this.moveFocus(this.items[0]);\n }\n\n /** Focus the last item. */\n @Method()\n async focusLastItem(): Promise<void> {\n this.moveFocus(this.items[this.items.length - 1]);\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 setTimeout(() => {\n this.label.focus();\n }, 100);\n }\n\n @Watch(\"open\")\n onOpenChange(): void {\n if (!this.open) {\n this.setItemsA11yAttrs();\n this.closed.emit();\n } else {\n this.opened.emit();\n }\n }\n\n @Watch(\"htmlTabindex\")\n onTabindexChange(): void {\n this.label.tabIndex = this.htmlTabindex;\n }\n\n @Listen(\"keydown\")\n private onItemsKeydown(ev: KeyboardEvent): void {\n switch (ev.key) {\n case KeyboardCode.ESC:\n case KeyboardCode.ARROW_LEFT:\n if (!this.open) {\n break;\n }\n ev.preventDefault();\n ev.stopPropagation();\n this.moveFocus(this.label, this.focusableItem);\n this.open = false;\n break;\n case KeyboardCode.ARROW_RIGHT:\n if (this.open) {\n break;\n }\n ev.preventDefault();\n ev.stopPropagation();\n this.open = true;\n this.focustFirstItem();\n break;\n case KeyboardCode.ARROW_DOWN: {\n if (!this.open) {\n break;\n }\n if (document.activeElement === this.host) {\n ev.preventDefault();\n ev.stopPropagation();\n this.focustFirstItem();\n break;\n }\n const currentIndex = this.items.indexOf(this.focusableItem);\n const receiver = this.items[currentIndex + 1];\n if (receiver) {\n ev.preventDefault();\n ev.stopPropagation();\n this.moveFocus(receiver, this.focusableItem);\n } else {\n this.htmlTabindex = 0;\n this.focusableItem.tabIndex = -1;\n }\n break;\n }\n case KeyboardCode.ARROW_UP: {\n if (!this.open || document.activeElement === this.host) {\n break;\n }\n const currentIndex = this.items.indexOf(this.focusableItem);\n const receiver = this.items[currentIndex - 1];\n ev.preventDefault();\n ev.stopPropagation();\n if (receiver) {\n this.moveFocus(receiver, this.focusableItem);\n } else {\n // since there isn't a previous item to focus, give the focus to the label element\n this.focusableItem.tabIndex = -1;\n this.setFocus();\n }\n break;\n }\n }\n }\n\n constructor() {\n this.toggle = this.toggle.bind(this);\n this.onItemsChange = this.onItemsChange.bind(this);\n this.onLabelSlotChange = this.onLabelSlotChange.bind(this);\n this.onLabelClick = this.onLabelClick.bind(this);\n this.onLabelKeydown = this.onLabelKeydown.bind(this);\n this.onItemsKeydown = this.onItemsKeydown.bind(this);\n }\n\n connectedCallback(): void {\n this.onItemsChange();\n }\n\n render(): HTMLZMenuSectionElement {\n return (\n <Host open={this.open}>\n <button\n ref={(el) => (this.label = el)}\n class=\"label\"\n aria-haspopup={`${!!this.hasItems}`}\n aria-expanded={`${!!this.open}`}\n role=\"menuitem\"\n tabindex={this.htmlTabindex}\n onClick={this.onLabelClick}\n onKeyDown={this.onLabelKeydown}\n >\n <slot onSlotchange={this.onLabelSlotChange} />\n {this.hasItems && <z-icon name={this.open ? \"chevron-up\" : \"chevron-down\"} />}\n </button>\n <div\n class=\"items\"\n role=\"menu\"\n hidden={!this.open}\n >\n <slot\n name=\"section\"\n onSlotchange={this.onItemsChange}\n />\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"z-menu-section.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,SAAS,GAAG,ijEAAijE,CAAC;AACpkE,2BAAe,SAAS;;MCYX,Y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AAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACtD;IAED,iBAAiB;QACf,IAAI,CAAC,aAAa,EAAE,CAAC;KACtB;IAED,MAAM;QACJ,QACEC,UAACC,YAAI,qDAAC,IAAI,EAAE,IAAI,CAAC,IAAI,IACnBD,uEACE,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,EAC9B,KAAK,EAAC,OAAO,mBACE,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,mBACpB,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAC/B,IAAI,EAAC,UAAU,EACf,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,OAAO,EAAE,IAAI,CAAC,YAAY,EAC1B,SAAS,EAAE,IAAI,CAAC,cAAc,IAE9BA,qEAAM,YAAY,EAAE,IAAI,CAAC,iBAAiB,GAAI,EAC7C,IAAI,CAAC,QAAQ,IAAIA,uEAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,YAAY,GAAG,cAAc,GAAI,CACtE,EACTA,oEACE,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,MAAM,EACX,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI,IAElBA,qEACE,IAAI,EAAC,SAAS,EACd,YAAY,EAAE,IAAI,CAAC,aAAa,GAChC,CACE,CACD,EACP;KACH;;;;;;;;;;;","names":["KeyboardCode","h","Host"],"sources":["src/components/z-menu-section/styles.css?tag=z-menu-section&encapsulation=shadow","src/components/z-menu-section/index.tsx"],"sourcesContent":[":host {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n padding: 0;\n font-family: var(--font-family-sans);\n}\n\n:host,\n::slotted(*),\n* {\n box-sizing: border-box;\n}\n\n::slotted(a) {\n text-decoration: none;\n}\n\n::slotted(*) {\n color: var(--color-default-text);\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\n.label {\n display: flex;\n width: 100%;\n align-items: center;\n padding: var(--space-unit) 0;\n border: 0;\n border-bottom: var(--border-size-small) solid var(--color-surface03);\n margin: 0;\n background: transparent;\n border-radius: 0;\n cursor: pointer;\n text-align: left;\n}\n\n:host(:last-child:not([open])) .label {\n border-bottom: none;\n}\n\n:host(:is([active], [open])) .label,\n.label:focus:focus-visible,\n.label:hover {\n border-color: var(--color-primary01);\n}\n\n.label:focus:focus-visible {\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\n:host(:is([active], [open])) .label ::slotted(*),\n.label:focus:focus-visible ::slotted(*),\n.label:hover ::slotted(*) {\n font-weight: var(--font-bd);\n}\n\n::slotted([data-text]) {\n display: inline-flex;\n flex-direction: column;\n}\n\n/* Trick to prevent layout shifts on font-weight changes.\nThe trick is to put an hidden copy of the text already set to bold,\nso the needed space is correctly calculated before any hover/active state changes the\nfont-weight of the real text.\nThe hidden text has an height of 0px so it can expand the width without changing the height\nwhen placed below the real text using `flex-direction: column`. */\n::slotted([data-text])::after {\n overflow: hidden;\n height: 0;\n content: attr(data-text);\n content: attr(data-text) / \"\";\n font-weight: var(--font-bd);\n pointer-events: none;\n user-select: none;\n visibility: hidden;\n}\n\n@media speech {\n ::slotted([data-text])::after {\n display: none;\n }\n}\n\n.label ::slotted(*) {\n width: 100%;\n margin: 0;\n font-size: var(--font-size-3);\n line-height: 1.5;\n}\n\n.label z-icon {\n margin-left: calc(var(--space-unit) * 4);\n fill: var(--color-default-icon);\n}\n\n.items {\n display: flex;\n width: 100%;\n flex-direction: column;\n padding: calc(var(--space-unit) / 2);\n padding-bottom: calc(var(--space-unit) * 1.5);\n}\n\n.items[hidden] {\n display: none;\n}\n\n::slotted([slot=\"section\"]) {\n display: inline-flex;\n padding: calc(var(--space-unit) / 2);\n margin: 0;\n font-size: var(--font-size-1);\n line-height: 1.333;\n outline: none;\n}\n\n::slotted([slot=\"section\"]:last-of-type) {\n border: none;\n}\n\n::slotted([slot=\"section\"]:focus:focus-visible) {\n box-shadow: var(--shadow-focus-primary);\n color: var(--color-primary01);\n}\n\n::slotted([slot=\"section\"]:hover),\n::slotted([slot=\"section\"]:focus:focus-visible),\n::slotted([slot=\"section\"][active]) {\n color: var(--color-primary01);\n font-weight: var(--font-bd);\n}\n","import {Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h} from \"@stencil/core\";\nimport {KeyboardCode} from \"../../beans\";\n\n/**\n * A component to create submenus inside the ZMenu.\n * @slot - Label of the menu section.\n * @slot section - Single entry of the menu section. Set the same slot name to different elements to put many of them. Add the `active` attribute to a slotted element to highlight it.\n */\n@Component({\n tag: \"z-menu-section\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZMenuSection {\n @Element() host: HTMLZMenuSectionElement;\n\n /** Active state */\n @Prop({reflect: true})\n active?: boolean;\n\n /**\n * Tabindex value to set on the label button.\n * Useful to manage keyboard navigation focus with roving tabindex handled by this component's parent (usually ZMenu).\n */\n @Prop()\n htmlTabindex = -1;\n\n /** The opening state of the section. */\n @Prop({mutable: true})\n open: boolean;\n\n @State()\n hasItems: boolean;\n\n @State()\n items: HTMLElement[];\n\n /** The section has been opened. */\n @Event()\n opened: EventEmitter;\n\n /** The section has been closed. */\n @Event()\n closed: EventEmitter;\n\n private label: HTMLButtonElement;\n\n private get focusableItem(): HTMLElement {\n return this.items.find(({tabIndex}) => tabIndex === 0);\n }\n\n private toggle(): void {\n if (!this.hasItems) {\n return;\n }\n\n this.open = !this.open;\n }\n\n private setItemsA11yAttrs(): void {\n if (!this.hasItems) {\n return;\n }\n\n this.items.forEach((item) => {\n item.setAttribute(\"role\", \"menuitem\");\n item.tabIndex = -1;\n });\n }\n\n private onItemsChange(): void {\n this.items = Array.from(this.host.querySelectorAll('[slot=\"section\"]')) as HTMLElement[];\n this.hasItems = this.items.length > 0;\n this.setItemsA11yAttrs();\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 private onLabelClick(): void {\n this.toggle();\n this.setFocus();\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 if (this.open) {\n this.focustFirstItem();\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 */\n private moveFocus(receiver: HTMLElement, current?: HTMLElement): void {\n receiver.tabIndex = 0;\n setTimeout(() => {\n receiver.focus();\n }, 100);\n if (current) {\n current.tabIndex = -1;\n }\n }\n\n private focustFirstItem(): void {\n this.moveFocus(this.items[0]);\n }\n\n /** Focus the last item. */\n @Method()\n async focusLastItem(): Promise<void> {\n this.moveFocus(this.items[this.items.length - 1]);\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 setTimeout(() => {\n this.label.focus();\n }, 100);\n }\n\n @Watch(\"open\")\n onOpenChange(): void {\n if (!this.open) {\n this.setItemsA11yAttrs();\n this.closed.emit();\n } else {\n this.opened.emit();\n }\n }\n\n @Watch(\"htmlTabindex\")\n onTabindexChange(): void {\n this.label.tabIndex = this.htmlTabindex;\n }\n\n @Listen(\"keydown\")\n private onItemsKeydown(ev: KeyboardEvent): void {\n switch (ev.key) {\n case KeyboardCode.ESC:\n case KeyboardCode.ARROW_LEFT:\n if (!this.open) {\n break;\n }\n ev.preventDefault();\n ev.stopPropagation();\n this.moveFocus(this.label, this.focusableItem);\n this.open = false;\n break;\n case KeyboardCode.ARROW_RIGHT:\n if (this.open) {\n break;\n }\n ev.preventDefault();\n ev.stopPropagation();\n this.open = true;\n this.focustFirstItem();\n break;\n case KeyboardCode.ARROW_DOWN: {\n if (!this.open) {\n break;\n }\n if (document.activeElement === this.host) {\n ev.preventDefault();\n ev.stopPropagation();\n this.focustFirstItem();\n break;\n }\n const currentIndex = this.items.indexOf(this.focusableItem);\n const receiver = this.items[currentIndex + 1];\n if (receiver) {\n ev.preventDefault();\n ev.stopPropagation();\n this.moveFocus(receiver, this.focusableItem);\n } else {\n this.htmlTabindex = 0;\n this.focusableItem.tabIndex = -1;\n }\n break;\n }\n case KeyboardCode.ARROW_UP: {\n if (!this.open || document.activeElement === this.host) {\n break;\n }\n const currentIndex = this.items.indexOf(this.focusableItem);\n const receiver = this.items[currentIndex - 1];\n ev.preventDefault();\n ev.stopPropagation();\n if (receiver) {\n this.moveFocus(receiver, this.focusableItem);\n } else {\n // since there isn't a previous item to focus, give the focus to the label element\n this.focusableItem.tabIndex = -1;\n this.setFocus();\n }\n break;\n }\n }\n }\n\n constructor() {\n this.toggle = this.toggle.bind(this);\n this.onItemsChange = this.onItemsChange.bind(this);\n this.onLabelSlotChange = this.onLabelSlotChange.bind(this);\n this.onLabelClick = this.onLabelClick.bind(this);\n this.onLabelKeydown = this.onLabelKeydown.bind(this);\n this.onItemsKeydown = this.onItemsKeydown.bind(this);\n }\n\n connectedCallback(): void {\n this.onItemsChange();\n }\n\n render(): HTMLZMenuSectionElement {\n return (\n <Host open={this.open}>\n <button\n ref={(el) => (this.label = el)}\n class=\"label\"\n aria-haspopup={`${!!this.hasItems}`}\n aria-expanded={`${!!this.open}`}\n role=\"menuitem\"\n tabindex={this.htmlTabindex}\n onClick={this.onLabelClick}\n onKeyDown={this.onLabelKeydown}\n >\n <slot onSlotchange={this.onLabelSlotChange} />\n {this.hasItems && <z-icon name={this.open ? \"chevron-up\" : \"chevron-down\"} />}\n </button>\n <div\n class=\"items\"\n role=\"menu\"\n hidden={!this.open}\n >\n <slot\n name=\"section\"\n onSlotchange={this.onItemsChange}\n />\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -7,7 +7,7 @@ const index = require('./index-f5ebcaa2.js');
7
7
  const utils = require('./utils-d08d4b80.js');
8
8
  require('./breakpoints-8a1e87e0.js');
9
9
 
10
- const stylesCss = ":host,::slotted(*),*{box-sizing:border-box;outline:none}:host{position:relative;display:inline-flex;height:fit-content;flex-direction:column}::slotted(a){text-decoration:none}::slotted(*){color:var(--color-default-text);font-family:var(--font-family-sans);font-weight:var(--font-rg)}.menu-label{position:relative;display:flex;width:100%;align-items:center;padding:0;border:0;border-bottom:var(--border-size-large) solid transparent;margin:0;background:transparent;border-radius:0;color:inherit;text-align:left}button.menu-label{cursor:pointer}.menu-label:focus-visible,div.menu-label:focus-within{box-shadow:var(--shadow-focus-primary)}:host(:is([active],[open])) .menu-label ::slotted(*),.menu-label:focus-visible ::slotted(*),div.menu-label:focus-within ::slotted(*){color:var(--color-primary01);font-weight:var(--font-bd)}:host([vertical-context]) .menu-label{padding:var(--space-unit) 0;border-width:var(--border-size-small);border-color:var(--color-surface03)}:host(:is([active],[open])) .menu-label,.menu-label:hover,.menu-label:focus-visible,div.menu-label:focus-within{border-color:var(--color-secondary01)}:host([vertical-context]:is([active],[open])) .menu-label::after,:host([vertical-context]) .menu-label:hover::after,:host([vertical-context]) .menu-label:focus-visible::after,:host([vertical-context]) div.menu-label:focus-within::after{position:absolute;bottom:0;left:0;width:100%;height:var(--border-size-large);background-color:var(--color-secondary01);content:\"\"}:host([vertical-context]) .menu-label ::slotted(*){padding:0}.menu-label ::slotted(*){display:inline-flex;width:100%;min-width:fit-content;padding-bottom:2px;margin:0;appearance:none;color:var(--z-menu-label-color, var(--color-default-text));font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:inherit;line-height:1.5;white-space:nowrap}.menu-label z-icon{margin-left:calc(var(--space-unit) * 1.5);fill:var(--color-default-icon)}::slotted([data-text]:not([slot]))::after{height:0;content:attr(data-text);content:attr(data-text) / \"\";font-weight:var(--font-bd);letter-spacing:normal;pointer-events:none;user-select:none;visibility:hidden}@media speech{::slotted([data-text]:not([slot]))::after{display:none}}::slotted([data-text]:not([slot])){display:inline-flex;flex-direction:column}.content{background:var(--color-surface01)}:host(:not([open])) .content{display:none}:host([floating]:not([vertical-context])) .content{position:absolute;top:100%;left:0;width:375px;min-width:100%;max-width:100vw;padding:0 calc(var(--space-unit) * 2);box-shadow:var(--shadow-2)}:host(:not([floating])) .content{width:100%}.header{display:flex;align-items:center;padding:var(--space-unit) 0 calc(var(--space-unit) * 2)}.header ::slotted(img[slot=\"header\"]){width:calc(var(--space-unit) * 11.25);height:auto;object-fit:contain}.header ::slotted([slot=\"header\"]:not(:first-child)){margin:auto 0;margin-left:calc(var(--space-unit) * 2.5);font-size:var(--font-size-3);font-weight:var(--font-sb);line-height:1.5}.items{display:flex;flex-direction:column;align-items:flex-start;background:inherit}.items>::slotted([slot=\"item\"]){width:100%;margin:0;font-size:var(--font-size-3);line-height:1.5}.items>::slotted([slot=\"item\"]:focus:focus-visible){box-shadow:var(--shadow-focus-primary)}.items>::slotted([slot=\"item\"]:not(z-menu-section)){padding:var(--space-unit) 0;border-bottom:var(--border-size-small) solid var(--color-surface03)}:host(:not([vertical-context])) .items>::slotted([slot=\"item\"]:last-child){border-bottom:0}.items>::slotted([slot=\"item\"]:hover),.items>::slotted([slot=\"item\"]:focus:focus-visible),.items>::slotted([slot=\"item\"]:active){border-color:var(--color-secondary01);font-weight:var(--font-bd)}";
10
+ const stylesCss = ":host,::slotted(*),*{box-sizing:border-box;outline:none}:host{position:relative;display:inline-flex;height:fit-content;flex-direction:column}::slotted(a){text-decoration:none}::slotted(*){color:var(--color-default-text);font-family:var(--font-family-sans);font-weight:var(--font-rg)}.menu-label{position:relative;display:flex;width:100%;align-items:center;padding:0;border:0;border-bottom:var(--border-size-large) solid transparent;margin:0;background:transparent;border-radius:0;color:inherit;text-align:left}button.menu-label{cursor:pointer}.menu-label:focus-visible,div.menu-label:focus-within{box-shadow:var(--shadow-focus-primary)}:host(:is([active],[open])) .menu-label ::slotted(*),.menu-label:focus-visible ::slotted(*),div.menu-label:focus-within ::slotted(*){color:var(--color-primary01);font-weight:var(--font-bd)}:host([vertical-context]) .menu-label{padding:var(--space-unit) 0;border-width:var(--border-size-small);border-color:var(--color-surface03)}:host(:is([active],[open])) .menu-label,.menu-label:hover,.menu-label:focus-visible,div.menu-label:focus-within{border-color:var(--color-primary01)}:host([vertical-context]:is([active],[open])) .menu-label::after,:host([vertical-context]) .menu-label:hover::after,:host([vertical-context]) .menu-label:focus-visible::after,:host([vertical-context]) div.menu-label:focus-within::after{position:absolute;bottom:0;left:0;width:100%;height:var(--border-size-large);background-color:var(--color-primary01);content:\"\"}:host([vertical-context]) .menu-label ::slotted(*){padding:0}.menu-label ::slotted(*){display:inline-flex;width:100%;min-width:fit-content;padding-bottom:2px;margin:0;appearance:none;color:var(--z-menu-label-color, var(--color-default-text));font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:inherit;line-height:1.5;white-space:nowrap}.menu-label z-icon{margin-left:calc(var(--space-unit) * 1.5);fill:var(--color-default-icon)}::slotted([data-text]:not([slot]))::after{height:0;content:attr(data-text);content:attr(data-text) / \"\";font-weight:var(--font-bd);letter-spacing:normal;pointer-events:none;user-select:none;visibility:hidden}@media speech{::slotted([data-text]:not([slot]))::after{display:none}}::slotted([data-text]:not([slot])){display:inline-flex;flex-direction:column}.content{background:var(--color-surface01)}:host(:not([open])) .content{display:none}:host([floating]:not([vertical-context])) .content{position:absolute;top:100%;left:0;width:375px;min-width:100%;max-width:100vw;padding:0 calc(var(--space-unit) * 2);box-shadow:var(--shadow-2)}:host(:not([floating])) .content{width:100%}.header{display:flex;align-items:center;padding:var(--space-unit) 0 calc(var(--space-unit) * 2)}.header ::slotted(img[slot=\"header\"]){width:calc(var(--space-unit) * 11.25);height:auto;object-fit:contain}.header ::slotted([slot=\"header\"]:not(:first-child)){margin:auto 0;margin-left:calc(var(--space-unit) * 2.5);font-size:var(--font-size-3);font-weight:var(--font-sb);line-height:1.5}.items{display:flex;flex-direction:column;align-items:flex-start;background:inherit}.items>::slotted([slot=\"item\"]){width:100%;margin:0;font-size:var(--font-size-3);line-height:1.5}.items>::slotted([slot=\"item\"]:focus:focus-visible){box-shadow:var(--shadow-focus-primary)}.items>::slotted([slot=\"item\"]:not(z-menu-section)){padding:var(--space-unit) 0;border-bottom:var(--border-size-small) solid var(--color-surface03)}:host(:not([vertical-context])) .items>::slotted([slot=\"item\"]:last-child){border-bottom:0}.items>::slotted([slot=\"item\"]:hover),.items>::slotted([slot=\"item\"]:focus:focus-visible),.items>::slotted([slot=\"item\"]:active){border-color:var(--color-primary01);font-weight:var(--font-bd)}";
11
11
  const ZMenuStyle0 = stylesCss;
12
12
 
13
13
  const isZMenuSection = (el) => (el === null || el === void 0 ? void 0 : el.tagName) === "Z-MENU-SECTION";
@@ -1 +1 @@
1
- {"file":"z-menu.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,SAAS,GAAG,6oHAA6oH,CAAC;AAChqH,oBAAe,SAAS;;ACGxB,MAAM,cAAc,GAAG,CAAC,EAAyC,KAC/D,CAAA,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,OAAO,MAAK,gBAAgB,CAAC;MAatB,KAAK;IAwDhB,IAAY,aAAa;QACvB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,MAAM,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,YAAY,KAAK,CAAC,GAAG,IAAI,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC;KAC1G;IAEO,MAAM;QACZ,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YACpB,OAAO;SACR;QAED,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;KACxB;;;;;IAMO,iBAAiB,CAAC,EAAS;QACjC,MAAM,YAAY,GAAI,EAAE,CAAC,MAA0B,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAgB,CAAC;QACzF,YAA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cAAc,GAAI,CACpD,EAETA,mBACE,KAAK,EAAC,SAAS,EACf,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,IAE/B,IAAI,CAAC,SAAS,KACbA,sBAAQ,KAAK,EAAC,QAAQ,IACpBA,oBACE,IAAI,EAAC,QAAQ,EACb,YAAY,EAAE,IAAI,CAAC,YAAY,GAC/B,CACK,CACV,EAEDA,mBACE,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,MAAM,IAEXA,oBACE,IAAI,EAAC,MAAM,EACX,YAAY,EAAE,IAAI,CAAC,aAAa,GAChC,CACE,CACF,CACD,EACP;KACH;;;;;;;;;;;","names":["KeyboardCode","containsElement","h","Host"],"sources":["src/components/z-menu/styles.css?tag=z-menu&encapsulation=shadow","src/components/z-menu/index.tsx"],"sourcesContent":[":host,\n::slotted(*),\n* {\n box-sizing: border-box;\n outline: none;\n}\n\n:host {\n --z-menu-label-color: ;\n\n position: relative;\n display: inline-flex;\n height: fit-content;\n flex-direction: column;\n}\n\n::slotted(a) {\n text-decoration: none;\n}\n\n::slotted(*) {\n color: var(--color-default-text);\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\n.menu-label {\n position: relative;\n display: flex;\n width: 100%;\n align-items: center;\n padding: 0;\n border: 0;\n border-bottom: var(--border-size-large) solid transparent;\n margin: 0;\n background: transparent;\n border-radius: 0;\n color: inherit;\n text-align: left;\n}\n\nbutton.menu-label {\n cursor: pointer;\n}\n\n.menu-label:focus-visible,\ndiv.menu-label:focus-within {\n box-shadow: var(--shadow-focus-primary);\n}\n\n:host(:is([active], [open])) .menu-label ::slotted(*),\n.menu-label:focus-visible ::slotted(*),\ndiv.menu-label:focus-within ::slotted(*) {\n color: var(--color-primary01);\n font-weight: var(--font-bd);\n}\n\n:host([vertical-context]) .menu-label {\n padding: var(--space-unit) 0;\n border-width: var(--border-size-small);\n border-color: var(--color-surface03);\n}\n\n:host(:is([active], [open])) .menu-label,\n.menu-label:hover,\n.menu-label:focus-visible,\ndiv.menu-label:focus-within {\n border-color: var(--color-secondary01);\n}\n\n:host([vertical-context]:is([active], [open])) .menu-label::after,\n:host([vertical-context]) .menu-label:hover::after,\n:host([vertical-context]) .menu-label:focus-visible::after,\n:host([vertical-context]) div.menu-label:focus-within::after {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: var(--border-size-large);\n background-color: var(--color-secondary01);\n content: \"\";\n}\n\n:host([vertical-context]) .menu-label ::slotted(*) {\n padding: 0;\n}\n\n.menu-label ::slotted(*) {\n display: inline-flex;\n width: 100%;\n min-width: fit-content;\n padding-bottom: 2px;\n margin: 0;\n appearance: none;\n color: var(--z-menu-label-color, var(--color-default-text));\n font-family: var(--font-family-sans);\n font-size: var(--font-size-3);\n font-weight: inherit;\n line-height: 1.5;\n white-space: nowrap;\n}\n\n.menu-label z-icon {\n margin-left: calc(var(--space-unit) * 1.5);\n fill: var(--color-default-icon);\n}\n\n/* Prevents layout shifts on font-weight changes.\nThe trick is to put an hidden copy of the text already set to bold,\nso the needed space is correctly calculated before any hover/active state changes the\nfont-weight of the real text.\nThe hidden text has an height of 0px so it can expand the width without changing the height\nwhen placed below the real text using `flex-direction: column`. */\n::slotted([data-text]:not([slot]))::after {\n height: 0;\n content: attr(data-text);\n content: attr(data-text) / \"\";\n font-weight: var(--font-bd);\n letter-spacing: normal;\n pointer-events: none;\n user-select: none;\n visibility: hidden;\n}\n\n@media speech {\n ::slotted([data-text]:not([slot]))::after {\n display: none;\n }\n}\n\n::slotted([data-text]:not([slot])) {\n display: inline-flex;\n flex-direction: column;\n}\n\n.content {\n background: var(--color-surface01);\n}\n\n:host(:not([open])) .content {\n display: none;\n}\n\n:host([floating]:not([vertical-context])) .content {\n position: absolute;\n top: 100%;\n left: 0;\n width: 375px;\n min-width: 100%;\n max-width: 100vw;\n padding: 0 calc(var(--space-unit) * 2);\n box-shadow: var(--shadow-2);\n}\n\n:host(:not([floating])) .content {\n width: 100%;\n}\n\n.header {\n display: flex;\n align-items: center;\n padding: var(--space-unit) 0 calc(var(--space-unit) * 2);\n}\n\n.header ::slotted(img[slot=\"header\"]) {\n width: calc(var(--space-unit) * 11.25);\n height: auto;\n object-fit: contain;\n}\n\n.header ::slotted([slot=\"header\"]:not(:first-child)) {\n margin: auto 0;\n margin-left: calc(var(--space-unit) * 2.5);\n font-size: var(--font-size-3);\n font-weight: var(--font-sb);\n line-height: 1.5;\n}\n\n.items {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n background: inherit;\n}\n\n.items > ::slotted([slot=\"item\"]) {\n width: 100%;\n margin: 0;\n font-size: var(--font-size-3);\n line-height: 1.5;\n}\n\n.items > ::slotted([slot=\"item\"]:focus:focus-visible) {\n box-shadow: var(--shadow-focus-primary);\n}\n\n.items > ::slotted([slot=\"item\"]:not(z-menu-section)) {\n padding: var(--space-unit) 0;\n border-bottom: var(--border-size-small) solid var(--color-surface03);\n}\n\n:host(:not([vertical-context])) .items > ::slotted([slot=\"item\"]:last-child) {\n border-bottom: 0;\n}\n\n.items > ::slotted([slot=\"item\"]:hover),\n.items > ::slotted([slot=\"item\"]:focus:focus-visible),\n.items > ::slotted([slot=\"item\"]:active) {\n border-color: var(--color-secondary01);\n font-weight: var(--font-bd);\n}\n","import {Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h} from \"@stencil/core\";\nimport {KeyboardCode} from \"../../beans\";\nimport {containsElement} from \"../../utils/utils\";\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.floating) {\n return;\n }\n\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 private setItemTabindex(item: HTMLElement | HTMLZMenuSectionElement, tabIndex: number): void {\n if (isZMenuSection(item)) {\n item.htmlTabindex = tabIndex;\n } else {\n item.tabIndex = tabIndex;\n }\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 this.setItemTabindex(item, tabindex);\n if (!isZMenuSection(item)) {\n item.setAttribute(\"role\", \"menuitem\");\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 this.setItemTabindex(current, -1);\n }\n\n private onLabelClick(): void {\n this.toggle();\n this.setFocus();\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 if (this.open) {\n this.moveFocus(this.items[0]);\n }\n\n return;\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 this.moveFocus(this.items[0]);\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 /**\n * Focus the last item.\n */\n @Method()\n async focusLastItem(): Promise<void> {\n const lastItem = this.items[this.items.length - 1];\n if (isZMenuSection(lastItem) && lastItem.open) {\n lastItem.focusLastItem();\n\n return;\n }\n\n this.moveFocus(lastItem);\n }\n\n @Watch(\"open\")\n onOpenChanged(): void {\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.setItemsA11yAttrs();\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 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 /**\n * Set tabindex to -1 to all siblings of the clicked item.\n */\n @Listen(\"click\", {target: \"document\"})\n onItemClick(ev: MouseEvent): void {\n const clickedItem = this.items.find((item) => containsElement(item, ev.target as HTMLElement));\n if (clickedItem) {\n this.items.forEach((item) => {\n if (item === clickedItem) {\n return;\n }\n\n if (isZMenuSection(item)) {\n item.htmlTabindex = -1;\n } else {\n item.tabIndex = -1;\n }\n });\n }\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 if (!this.open) {\n break;\n }\n ev.stopPropagation();\n ev.preventDefault();\n this.open = false;\n this.setFocus();\n break;\n case KeyboardCode.ARROW_DOWN: {\n if (document.activeElement === this.host) {\n if (this.verticalContext && !this.open) {\n break;\n }\n\n ev.stopPropagation();\n ev.preventDefault();\n if (!this.open) {\n this.open = true;\n }\n this.moveFocus(this.items[0]);\n break;\n }\n\n const currentIndex = this.items.indexOf(this.focusableItem);\n if (this.verticalContext && currentIndex === this.items.length - 1) {\n // navigation is going to leave this menu. restore tabindex to the label and let the parent handle it\n this.setItemTabindex(this.items[currentIndex], -1);\n this.htmlTabindex = 0;\n break;\n }\n\n ev.stopPropagation();\n ev.preventDefault();\n const receiver = this.items[currentIndex + 1];\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 (document.activeElement === this.host) {\n if (this.verticalContext) {\n break;\n }\n\n ev.stopPropagation();\n ev.preventDefault();\n // open the menu and focus the last item\n if (!this.open) {\n this.open = true;\n }\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 if (currentIndex === 0 && this.verticalContext) {\n this.setItemTabindex(this.focusableItem, -1);\n this.setFocus();\n break;\n }\n\n const receiver = this.items[currentIndex - 1] ?? this.items[this.items.length - 1];\n // if the receiver is a ZMenuSection and it's open, focus its last item\n if (isZMenuSection(receiver) && receiver.open) {\n this.setItemTabindex(this.focusableItem, -1);\n receiver.focusLastItem();\n break;\n }\n\n this.moveFocus(receiver, this.focusableItem);\n break;\n }\n case KeyboardCode.ARROW_LEFT:\n if (!this.open || !this.verticalContext) {\n break;\n }\n\n // close the menu and focus the label\n ev.preventDefault();\n ev.stopPropagation();\n this.open = false;\n this.setFocus();\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.onLabelClick = this.onLabelClick.bind(this);\n this.onItemsChange = this.onItemsChange.bind(this);\n this.onLabelKeydown = this.onLabelKeydown.bind(this);\n }\n\n componentWillLoad(): void {\n this.setLabelA11yAttrs();\n this.onItemsChange();\n }\n\n render(): HTMLDivElement | HTMLZMenuElement {\n if (!this.hasContent) {\n return (\n <div class=\"menu-label\">\n <slot onSlotchange={this.onLabelSlotChange} />\n </div>\n );\n }\n\n return (\n <Host>\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.onLabelClick}\n onKeyDown={this.onLabelKeydown}\n >\n <slot onSlotchange={this.onLabelSlotChange} />\n <z-icon name={this.open ? \"chevron-up\" : \"chevron-down\"} />\n </button>\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"],"version":3}
1
+ {"file":"z-menu.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,SAAS,GAAG,uoHAAuoH,CAAC;AAC1pH,oBAAe,SAAS;;ACGxB,MAAM,cAAc,GAAG,CAAC,EAAyC,KAC/D,CAAA,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,OAAO,MAAK,gBAAgB,CAAC;MAatB,KAAK;IAwDhB,IAA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C,EAAE,MAAM,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,EACpC,KAAK,EAAC,YAAY,mBACH,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,mBAChB,GAAG,IAAI,CAAC,UAAU,EAAE,gBACvB,IAAI,CAAC,IAAI,GAAG,aAAa,GAAG,WAAW,EACnD,IAAI,EAAC,UAAU,EACf,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,OAAO,EAAE,IAAI,CAAC,YAAY,EAC1B,SAAS,EAAE,IAAI,CAAC,cAAc,IAE9BA,oBAAM,YAAY,EAAE,IAAI,CAAC,iBAAiB,GAAI,EAC9CA,sBAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,YAAY,GAAG,cAAc,GAAI,CACpD,EAETA,mBACE,KAAK,EAAC,SAAS,EACf,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,IAE/B,IAAI,CAAC,SAAS,KACbA,sBAAQ,KAAK,EAAC,QAAQ,IACpBA,oBACE,IAAI,EAAC,QAAQ,EACb,YAAY,EAAE,IAAI,CAAC,YAAY,GAC/B,CACK,CACV,EAEDA,mBACE,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,MAAM,IAEXA,oBACE,IAAI,EAAC,MAAM,EACX,YAAY,EAAE,IAAI,CAAC,aAAa,GAChC,CACE,CACF,CACD,EACP;KACH;;;;;;;;;;;","names":["KeyboardCode","containsElement","h","Host"],"sources":["src/components/z-menu/styles.css?tag=z-menu&encapsulation=shadow","src/components/z-menu/index.tsx"],"sourcesContent":[":host,\n::slotted(*),\n* {\n box-sizing: border-box;\n outline: none;\n}\n\n:host {\n --z-menu-label-color: ;\n\n position: relative;\n display: inline-flex;\n height: fit-content;\n flex-direction: column;\n}\n\n::slotted(a) {\n text-decoration: none;\n}\n\n::slotted(*) {\n color: var(--color-default-text);\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\n.menu-label {\n position: relative;\n display: flex;\n width: 100%;\n align-items: center;\n padding: 0;\n border: 0;\n border-bottom: var(--border-size-large) solid transparent;\n margin: 0;\n background: transparent;\n border-radius: 0;\n color: inherit;\n text-align: left;\n}\n\nbutton.menu-label {\n cursor: pointer;\n}\n\n.menu-label:focus-visible,\ndiv.menu-label:focus-within {\n box-shadow: var(--shadow-focus-primary);\n}\n\n:host(:is([active], [open])) .menu-label ::slotted(*),\n.menu-label:focus-visible ::slotted(*),\ndiv.menu-label:focus-within ::slotted(*) {\n color: var(--color-primary01);\n font-weight: var(--font-bd);\n}\n\n:host([vertical-context]) .menu-label {\n padding: var(--space-unit) 0;\n border-width: var(--border-size-small);\n border-color: var(--color-surface03);\n}\n\n:host(:is([active], [open])) .menu-label,\n.menu-label:hover,\n.menu-label:focus-visible,\ndiv.menu-label:focus-within {\n border-color: var(--color-primary01);\n}\n\n:host([vertical-context]:is([active], [open])) .menu-label::after,\n:host([vertical-context]) .menu-label:hover::after,\n:host([vertical-context]) .menu-label:focus-visible::after,\n:host([vertical-context]) div.menu-label:focus-within::after {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: var(--border-size-large);\n background-color: var(--color-primary01);\n content: \"\";\n}\n\n:host([vertical-context]) .menu-label ::slotted(*) {\n padding: 0;\n}\n\n.menu-label ::slotted(*) {\n display: inline-flex;\n width: 100%;\n min-width: fit-content;\n padding-bottom: 2px;\n margin: 0;\n appearance: none;\n color: var(--z-menu-label-color, var(--color-default-text));\n font-family: var(--font-family-sans);\n font-size: var(--font-size-3);\n font-weight: inherit;\n line-height: 1.5;\n white-space: nowrap;\n}\n\n.menu-label z-icon {\n margin-left: calc(var(--space-unit) * 1.5);\n fill: var(--color-default-icon);\n}\n\n/* Prevents layout shifts on font-weight changes.\nThe trick is to put an hidden copy of the text already set to bold,\nso the needed space is correctly calculated before any hover/active state changes the\nfont-weight of the real text.\nThe hidden text has an height of 0px so it can expand the width without changing the height\nwhen placed below the real text using `flex-direction: column`. */\n::slotted([data-text]:not([slot]))::after {\n height: 0;\n content: attr(data-text);\n content: attr(data-text) / \"\";\n font-weight: var(--font-bd);\n letter-spacing: normal;\n pointer-events: none;\n user-select: none;\n visibility: hidden;\n}\n\n@media speech {\n ::slotted([data-text]:not([slot]))::after {\n display: none;\n }\n}\n\n::slotted([data-text]:not([slot])) {\n display: inline-flex;\n flex-direction: column;\n}\n\n.content {\n background: var(--color-surface01);\n}\n\n:host(:not([open])) .content {\n display: none;\n}\n\n:host([floating]:not([vertical-context])) .content {\n position: absolute;\n top: 100%;\n left: 0;\n width: 375px;\n min-width: 100%;\n max-width: 100vw;\n padding: 0 calc(var(--space-unit) * 2);\n box-shadow: var(--shadow-2);\n}\n\n:host(:not([floating])) .content {\n width: 100%;\n}\n\n.header {\n display: flex;\n align-items: center;\n padding: var(--space-unit) 0 calc(var(--space-unit) * 2);\n}\n\n.header ::slotted(img[slot=\"header\"]) {\n width: calc(var(--space-unit) * 11.25);\n height: auto;\n object-fit: contain;\n}\n\n.header ::slotted([slot=\"header\"]:not(:first-child)) {\n margin: auto 0;\n margin-left: calc(var(--space-unit) * 2.5);\n font-size: var(--font-size-3);\n font-weight: var(--font-sb);\n line-height: 1.5;\n}\n\n.items {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n background: inherit;\n}\n\n.items > ::slotted([slot=\"item\"]) {\n width: 100%;\n margin: 0;\n font-size: var(--font-size-3);\n line-height: 1.5;\n}\n\n.items > ::slotted([slot=\"item\"]:focus:focus-visible) {\n box-shadow: var(--shadow-focus-primary);\n}\n\n.items > ::slotted([slot=\"item\"]:not(z-menu-section)) {\n padding: var(--space-unit) 0;\n border-bottom: var(--border-size-small) solid var(--color-surface03);\n}\n\n:host(:not([vertical-context])) .items > ::slotted([slot=\"item\"]:last-child) {\n border-bottom: 0;\n}\n\n.items > ::slotted([slot=\"item\"]:hover),\n.items > ::slotted([slot=\"item\"]:focus:focus-visible),\n.items > ::slotted([slot=\"item\"]:active) {\n border-color: var(--color-primary01);\n font-weight: var(--font-bd);\n}\n","import {Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h} from \"@stencil/core\";\nimport {KeyboardCode} from \"../../beans\";\nimport {containsElement} from \"../../utils/utils\";\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.floating) {\n return;\n }\n\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 private setItemTabindex(item: HTMLElement | HTMLZMenuSectionElement, tabIndex: number): void {\n if (isZMenuSection(item)) {\n item.htmlTabindex = tabIndex;\n } else {\n item.tabIndex = tabIndex;\n }\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 this.setItemTabindex(item, tabindex);\n if (!isZMenuSection(item)) {\n item.setAttribute(\"role\", \"menuitem\");\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 this.setItemTabindex(current, -1);\n }\n\n private onLabelClick(): void {\n this.toggle();\n this.setFocus();\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 if (this.open) {\n this.moveFocus(this.items[0]);\n }\n\n return;\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 this.moveFocus(this.items[0]);\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 /**\n * Focus the last item.\n */\n @Method()\n async focusLastItem(): Promise<void> {\n const lastItem = this.items[this.items.length - 1];\n if (isZMenuSection(lastItem) && lastItem.open) {\n lastItem.focusLastItem();\n\n return;\n }\n\n this.moveFocus(lastItem);\n }\n\n @Watch(\"open\")\n onOpenChanged(): void {\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.setItemsA11yAttrs();\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 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 /**\n * Set tabindex to -1 to all siblings of the clicked item.\n */\n @Listen(\"click\", {target: \"document\"})\n onItemClick(ev: MouseEvent): void {\n const clickedItem = this.items.find((item) => containsElement(item, ev.target as HTMLElement));\n if (clickedItem) {\n this.items.forEach((item) => {\n if (item === clickedItem) {\n return;\n }\n\n if (isZMenuSection(item)) {\n item.htmlTabindex = -1;\n } else {\n item.tabIndex = -1;\n }\n });\n }\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 if (!this.open) {\n break;\n }\n ev.stopPropagation();\n ev.preventDefault();\n this.open = false;\n this.setFocus();\n break;\n case KeyboardCode.ARROW_DOWN: {\n if (document.activeElement === this.host) {\n if (this.verticalContext && !this.open) {\n break;\n }\n\n ev.stopPropagation();\n ev.preventDefault();\n if (!this.open) {\n this.open = true;\n }\n this.moveFocus(this.items[0]);\n break;\n }\n\n const currentIndex = this.items.indexOf(this.focusableItem);\n if (this.verticalContext && currentIndex === this.items.length - 1) {\n // navigation is going to leave this menu. restore tabindex to the label and let the parent handle it\n this.setItemTabindex(this.items[currentIndex], -1);\n this.htmlTabindex = 0;\n break;\n }\n\n ev.stopPropagation();\n ev.preventDefault();\n const receiver = this.items[currentIndex + 1];\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 (document.activeElement === this.host) {\n if (this.verticalContext) {\n break;\n }\n\n ev.stopPropagation();\n ev.preventDefault();\n // open the menu and focus the last item\n if (!this.open) {\n this.open = true;\n }\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 if (currentIndex === 0 && this.verticalContext) {\n this.setItemTabindex(this.focusableItem, -1);\n this.setFocus();\n break;\n }\n\n const receiver = this.items[currentIndex - 1] ?? this.items[this.items.length - 1];\n // if the receiver is a ZMenuSection and it's open, focus its last item\n if (isZMenuSection(receiver) && receiver.open) {\n this.setItemTabindex(this.focusableItem, -1);\n receiver.focusLastItem();\n break;\n }\n\n this.moveFocus(receiver, this.focusableItem);\n break;\n }\n case KeyboardCode.ARROW_LEFT:\n if (!this.open || !this.verticalContext) {\n break;\n }\n\n // close the menu and focus the label\n ev.preventDefault();\n ev.stopPropagation();\n this.open = false;\n this.setFocus();\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.onLabelClick = this.onLabelClick.bind(this);\n this.onItemsChange = this.onItemsChange.bind(this);\n this.onLabelKeydown = this.onLabelKeydown.bind(this);\n }\n\n componentWillLoad(): void {\n this.setLabelA11yAttrs();\n this.onItemsChange();\n }\n\n render(): HTMLDivElement | HTMLZMenuElement {\n if (!this.hasContent) {\n return (\n <div class=\"menu-label\">\n <slot onSlotchange={this.onLabelSlotChange} />\n </div>\n );\n }\n\n return (\n <Host>\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.onLabelClick}\n onKeyDown={this.onLabelKeydown}\n >\n <slot onSlotchange={this.onLabelSlotChange} />\n <z-icon name={this.open ? \"chevron-up\" : \"chevron-down\"} />\n </button>\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"],"version":3}
@@ -56,7 +56,7 @@ const ZMyzCardAlert = class {
56
56
  }
57
57
  }
58
58
  render() {
59
- return (index.h("div", { key: '20f62eeb1a0ca24f6cd9700ba70a7e09e0ac729b', class: "alert-external-wrapper " + this.retrieveClass() }, index.h("z-alert", { key: '5a8275ea2ab9dc49866b22e8a9d235911e1f7275', type: this.getAlertType() }, index.h("div", { key: '8d69056c30fb55d0bb32701fecd1063dff392665', class: "relative-container" }, index.h("z-icon", { key: 'a17e02b4545f15d1a730b66b6e4b5ab5bc665654', name: this.iconname, width: 18, height: 18, class: this.retrieveClass() }), index.h("span", { key: 'd231b939eb09ddb1b1f25d40a8512ce8f4a18f19', class: "content-text" }, this.contenttext), this.actiontext && !!this.actiontext.trim().length && (index.h("span", { key: '00f3f7d6ec722547fbc8c14881ca1c69f0652731', role: "button", tabindex: "0", class: "content-action", onClick: (e) => {
59
+ return (index.h("div", { key: '26730317345595013e625708599fa1c6c5ea04a0', class: "alert-external-wrapper " + this.retrieveClass() }, index.h("z-alert", { key: '3318a79be3865ad94eb7a9f7df385bf47c132048', type: this.getAlertType() }, index.h("div", { key: 'c0b39a452f0529901918b50d983ad1fa2e756778', class: "relative-container" }, index.h("z-icon", { key: '2dea8db0df9990f375656b78f4e8389b543b5887', name: this.iconname, width: 18, height: 18, class: this.retrieveClass() }), index.h("span", { key: 'ba7891b7139df477a8e2e7a912537181b428b713', class: "content-text" }, this.contenttext), this.actiontext && !!this.actiontext.trim().length && (index.h("span", { key: '9ec182dbb44b0f9cd5450f25f5fbcda04b67986d', role: "button", tabindex: "0", class: "content-action", onClick: (e) => {
60
60
  this.handleActionButtonClick(e);
61
61
  }, onKeyPress: (e) => {
62
62
  this.handleSpaceKeyPress(e);
@@ -27,7 +27,7 @@ const ZMyzCardDictionary = class {
27
27
  this.cardFlipped.emit(showBack);
28
28
  }
29
29
  render() {
30
- return (index.h("div", { key: '453e73acc8c2e361d41cfd9ce010ee7201e07043' }, index.h("z-myz-card", { key: '7bef1e086fd3d1f2f84b0f466fad1e35f0e183fd' }, index.h("z-myz-card-header", { key: '4c987bb645b3774cb1e8fea6719158cf8aa6f70f', titolo: this.name }), index.h("div", { key: '4b2229a2fad8b0701ec28a10d789f633457399c9', class: `content ${this.flipped ? "flipped" : ""}` }, index.h("div", { key: 'a45b52497ae1aa41e1d722b4eb32b3be3a54be19', class: "front" }, index.h("z-myz-card-body", { key: '6091951e41f629f359bd4d977f61c5325dcff965' }, index.h("z-myz-card-cover", { key: '00c63deaffdc95291b510df08d71c22a71c7fa60', slot: "cover", titolo: this.name, img: this.cover, faded: this.disabled })), index.h("z-button", { key: '36a28edb30911493f7e7cf170877ddb0a1c874c8', class: { "hide-info": this.hideinfobtn }, variant: index$1.ButtonVariant.SECONDARY, icon: "informationsource", size: index$1.ButtonSize.X_SMALL, onClick: () => this.flipCard(true), disabled: this.flipped }, this.flipbuttonlabel)), index.h("div", { key: '6484683ce646d312963be3e1a9c3973430d850d7', class: "back" }, index.h("slot", { key: '348aba3ee03b6f53c4396a09912b9c1dfd884b01', name: "info" }))), index.h("slot", { key: 'c0acad08c7fbf3eae60e26e7e49a18788ba3b768' }))));
30
+ return (index.h("div", { key: 'af0f476b5b7b6530250d7d4d89ef7943937e9d50' }, index.h("z-myz-card", { key: 'bd089d9975ec7df7c8b7b86649c1898589802ded' }, index.h("z-myz-card-header", { key: '5a767aeb4eef28f25dd9fc2d3c39677582e77b38', titolo: this.name }), index.h("div", { key: '263946e30af18863e91ba5345eac8a22d7b1b3f4', class: `content ${this.flipped ? "flipped" : ""}` }, index.h("div", { key: 'adc17fefcf0d85671e31b153e933296dfa5f4ca4', class: "front" }, index.h("z-myz-card-body", { key: '0e731cfc9fd714e2e1db3e8c0340445b6d5b5181' }, index.h("z-myz-card-cover", { key: '5f23cebccbbae1b038afb16a4488c51e679db2ee', slot: "cover", titolo: this.name, img: this.cover, faded: this.disabled })), index.h("z-button", { key: 'e8555a0bb42a612fbf873e9abf53b1a7edd97c01', class: { "hide-info": this.hideinfobtn }, variant: index$1.ButtonVariant.SECONDARY, icon: "informationsource", size: index$1.ButtonSize.X_SMALL, onClick: () => this.flipCard(true), disabled: this.flipped }, this.flipbuttonlabel)), index.h("div", { key: '4dc013ce1de689f0a5789339c559d7d229eefd1b', class: "back" }, index.h("slot", { key: '781c844a1706cf47595db8b0a145c808f3fcb38f', name: "info" }))), index.h("slot", { key: 'a4e4fcd08625be6b556f705114e1a82bde5e3074' }))));
31
31
  }
32
32
  };
33
33
  ZMyzCardDictionary.style = ZMyzCardDictionaryStyle0;
@@ -12,7 +12,7 @@ const ZMyzCardFooterSections = class {
12
12
  index.registerInstance(this, hostRef);
13
13
  }
14
14
  render() {
15
- return (index.h("div", { key: 'f5b559db97470083ebafed165893ce71b6dee22e' }, index.h("footer", { key: '499f3861a61a391910b04c71e5cd0354b152054d' }, index.h("div", { key: '08959cb6a5cebcd11b8f78f6e3fe25a97e91cbab', class: "top" }, index.h("slot", { key: 'b7e57aad37bf866f2f7bde1a35c4ad936535368b', name: "top" })), index.h("div", { key: 'edfe882d9dde659cb4f001e3d43a40dfd578eb38', class: "bottom" }, index.h("slot", { key: '1d083de6b18750a9063d6776bfccc56190d9e0d9', name: "bottom" })))));
15
+ return (index.h("div", { key: '532a42d5e795737e7547907e2ae11424fbdb88f7' }, index.h("footer", { key: 'bad64fa0a4dfc326265b0e64c8766f422324a00e' }, index.h("div", { key: '8834650721258ec6a4921d7f9d62c05489640b9b', class: "top" }, index.h("slot", { key: '422b5f0b00a31edf8bb0541d84fe0e7bde1851ee', name: "top" })), index.h("div", { key: '0191d84ded4e380f2a0f51bf7ee453d49295de63', class: "bottom" }, index.h("slot", { key: '09f38cd1eb44584cef7509f7208d6be4d797bedb', name: "bottom" })))));
16
16
  }
17
17
  };
18
18
  ZMyzCardFooterSections.style = ZMyzCardFooterSectionsStyle0;
@@ -64,7 +64,7 @@ const ZMyzCardFooter = class {
64
64
  return this.host.querySelector("[slot=list] > li a");
65
65
  }
66
66
  render() {
67
- return (index.h("div", { key: '4c0ea63639ce74ddfad87abd5d4d8cf4856fdfcf', class: Object.assign(Object.assign({}, this.retrieveClass()), { wrapper: true }) }, index.h("footer", { key: 'ee40563c6f1ff84fcd963a38f5881fcf08e0be72', class: this.retrieveClass(), onTransitionEnd: (e) => this.footerTransitionHandler(e) }, index.h("span", { key: '7f8d31de9d2ea7140588f035e4e3193fc8af159e', class: "toggle" }, index.h("slot", { key: '66f2e2c1211fa787d4d8b4f8b08a0a053495192e', name: "toggle" })), this.titolo && index.h("p", { key: 'e01f1b7a4e1f891a608fff4d0fd8fcdac37e77ca', class: { "custom-content": this.customContent } }, this.titolo), index.h("div", { key: '2a50223a44a2d52454ad6322d706d43782b461a4', class: { "content": true, "custom-content": this.customContent } }, index.h("div", { key: 'b106de824888122d9497718532b57c39e3f2fd1b' }, index.h("p", { key: '5e9dfcee1a2c134ce03a01836fa6c57c6b052192', class: "authors", ref: (el) => (this.ellipsisAuthors = el) }, index.h("span", { key: '6633b8dbae66bb14817fe6717c4e42f8a5fb1eb7', title: this.getTitleAuthors() }, index.h("span", { key: '51353a3904c111915c47650250cdd4631665289b', "aria-description": "Autori", class: "bold" }, this.autori))), index.h("p", { key: '2a6947cde5e15465f8a978cb841ab971853f4d64', class: "year-isbn" }, index.h("span", { key: '28534bb6ef0c96b0130b42af6e42740a88f240b4', class: "isbn" }, index.h("span", { key: '2493333a2a8aa083c6ddb70f550079871e4cacb2' }, index.h("span", { key: 'be6232d7c2b48dcbcab7c49bb1d37a216265eecf', "aria-description": "ISBN edizione cartacea", class: "bold" }, this.isbn), " ", "(ed. cartacea)")))), index.h("div", { key: '88d1c5be270fe55dd18093bf78a4a8b1b421622e', class: `slot-handler ${this.isOpen ? "visible" : "hidden"}` }, index.h("slot", { key: '5963744685a893ff3dc253271541c1f9f1c2c0fa', name: "list" })))), this.customContent && index.h("slot", { key: '99d3cdc3bbbc54ea1fff9cb082327e76b33322c7', name: "content" })));
67
+ return (index.h("div", { key: 'dadb29ba9e0aa0037a90d8e2564fa2a203c9898f', class: Object.assign(Object.assign({}, this.retrieveClass()), { wrapper: true }) }, index.h("footer", { key: '3fa010af7929efef3d957b5855745b6153a93ddd', class: this.retrieveClass(), onTransitionEnd: (e) => this.footerTransitionHandler(e) }, index.h("span", { key: 'ebba12731f21021f4fe5854e487f0a24eda0e22b', class: "toggle" }, index.h("slot", { key: 'c241b4d1182ca8cefbfdfcb9d2db294299c3a67c', name: "toggle" })), this.titolo && index.h("p", { key: '83683f8a76d1ff998aca1f79cf5e219a310d581c', class: { "custom-content": this.customContent } }, this.titolo), index.h("div", { key: '1903067d261cd4a9d12726d463d6b036c663402b', class: { "content": true, "custom-content": this.customContent } }, index.h("div", { key: '346c8e222c82ffed27b0108d2f57f921705e7f5e' }, index.h("p", { key: '396ff63071b02d1cbab2afbac1abff5fa197d70a', class: "authors", ref: (el) => (this.ellipsisAuthors = el) }, index.h("span", { key: '86444e75181b607ef3e28f2b13a0fa999fe88b94', title: this.getTitleAuthors() }, index.h("span", { key: '43e9fb0ceb195e3b2583de1b077b95ae88f875bf', "aria-description": "Autori", class: "bold" }, this.autori))), index.h("p", { key: '2ce4b6829e57f254abd3ef53420a2983d872fcd8', class: "year-isbn" }, index.h("span", { key: '0b0a3ee12129daa10a5c145ad2c91e2ed6a2d2de', class: "isbn" }, index.h("span", { key: 'eb1c78693724c737d6de9612c5cfbe774c4b67e4' }, index.h("span", { key: '4efbbec95933b2dd5eec936b536b1692d1348b44', "aria-description": "ISBN edizione cartacea", class: "bold" }, this.isbn), " ", "(ed. cartacea)")))), index.h("div", { key: '4d697bf96ce3b881fda2a4976229911e8876a281', class: `slot-handler ${this.isOpen ? "visible" : "hidden"}` }, index.h("slot", { key: '0f8a194c7f5b44e306a1150a2196fdf63ae69e6d', name: "list" })))), this.customContent && index.h("slot", { key: '6e93d147ad70517df5d17a9e1f055a987eab0680', name: "content" })));
68
68
  }
69
69
  get host() { return index.getElement(this); }
70
70
  };
@@ -15,7 +15,7 @@ const ZMyzCardIcon = class {
15
15
  this.ariaLabel = "";
16
16
  }
17
17
  render() {
18
- return (index.h("button", { key: '11e70b5d2844b23e3e0ca483e6fb979655444410', disabled: this.isdisabled, "aria-label": this.ariaLabel }, index.h("span", { key: '065d4e7a295ff6bc08e08a4ef3ea3ec57be30b90' }, index.h("z-icon", { key: '6a51d6c43c036fb9cbbbb0a88cdcd209fddff631', name: this.icon, width: 16, height: 16 }))));
18
+ return (index.h("button", { key: '976b2aee8131d78cb106eded23053f49f1feae3a', disabled: this.isdisabled, "aria-label": this.ariaLabel }, index.h("span", { key: 'ee919ad9fb6abc7a15fff984a5f46395354ed2b2' }, index.h("z-icon", { key: 'd0ff29cd1398bbfb0b0e68652c0b30b764f91398', name: this.icon, width: 16, height: 16 }))));
19
19
  }
20
20
  };
21
21
  ZMyzCardIcon.style = ZMyzCardIconStyle0;
@@ -7,7 +7,7 @@ const index$1 = require('./index-f5ebcaa2.js');
7
7
  const utils = require('./utils-d08d4b80.js');
8
8
  require('./breakpoints-8a1e87e0.js');
9
9
 
10
- const stylesCss = ":host{width:100%;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{position:relative;display:grid;width:calc(100% + calc(var(--space-unit) * 2));height:402px;box-sizing:border-box;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 3);border:var(--border-size-small) solid var(--color-primary01);margin-left:calc(-1 * var(--space-unit));background:var(--color-surface01);border-radius:0;box-shadow:0 2px 4px 0 rgb(66 69 72 / 35%)}:host>div>z-icon{position:absolute;top:var(--space-unit);right:var(--space-unit);cursor:pointer;fill:var(--color-primary01)}:host>div>div.cta-wrapper{display:flex;flex-flow:column nowrap;align-self:end;justify-content:space-between}:host>div>div.content-wrapper{position:relative;overflow:hidden;align-self:stretch}:host>div>div.content-wrapper>section{box-sizing:border-box;padding:var(--space-unit) 0;border-bottom:var(--border-size-small) solid var(--color-surface04);color:var(--color-surface05);font-size:14px;line-height:20px}:host>div>div.content-wrapper>section:last-child{border-bottom:none}:host>div>div.content-wrapper>section.info-wrapper{position:relative;overflow:hidden;box-sizing:border-box}:host>div>div.content-wrapper>section.info-wrapper.hidden::after{position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(180deg, rgb(255 0 0 / 0%), rgb(255 0 0 / 0%) 60%, white);content:\"\";pointer-events:none}:host>div>div.content-wrapper>section>span.license-heading{display:flex;justify-content:space-between}:host>div>div.content-wrapper>section>span.license-heading>span.expired{color:var(--color-secondary01);font-size:12px;font-weight:600}:host>div>div.content-wrapper>section>span.license-heading>span.expiring{color:var(--color-warning01);font-size:12px;font-weight:600}:host>div>div.content-wrapper>z-popover{position:absolute;top:0;left:calc(var(--space-unit) * 4)}";
10
+ const stylesCss = ":host{width:100%;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{position:relative;display:grid;width:calc(100% + calc(var(--space-unit) * 2));height:402px;box-sizing:border-box;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 3);border:var(--border-size-small) solid var(--color-primary01);margin-left:calc(-1 * var(--space-unit));background:var(--color-surface01);border-radius:0;box-shadow:0 2px 4px 0 rgb(66 69 72 / 35%)}:host>div>z-icon{position:absolute;top:var(--space-unit);right:var(--space-unit);cursor:pointer;fill:var(--color-primary01)}:host>div>div.cta-wrapper{display:flex;flex-flow:column nowrap;align-self:end;justify-content:space-between}:host>div>div.content-wrapper{position:relative;overflow:hidden;align-self:stretch}:host>div>div.content-wrapper>section{box-sizing:border-box;padding:var(--space-unit) 0;border-bottom:var(--border-size-small) solid var(--color-surface04);color:var(--color-surface05);font-size:14px;line-height:20px}:host>div>div.content-wrapper>section:last-child{border-bottom:none}:host>div>div.content-wrapper>section.info-wrapper{position:relative;overflow:hidden;box-sizing:border-box}:host>div>div.content-wrapper>section.info-wrapper.hidden::after{position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(180deg, rgb(255 0 0 / 0%), rgb(255 0 0 / 0%) 60%, white);content:\"\";pointer-events:none}:host>div>div.content-wrapper>section>span.license-heading{display:flex;justify-content:space-between}:host>div>div.content-wrapper>section>span.license-heading>span.expired{color:var(--color-primary01);font-size:12px;font-weight:600}:host>div>div.content-wrapper>section>span.license-heading>span.expiring{color:var(--color-warning01);font-size:12px;font-weight:600}:host>div>div.content-wrapper>z-popover{position:absolute;top:0;left:calc(var(--space-unit) * 4)}";
11
11
  const ZMyzCardInfoStyle0 = stylesCss;
12
12
 
13
13
  const ZMyzCardInfo = class {
@@ -122,7 +122,7 @@ const ZMyzCardInfo = class {
122
122
  return (index.h("section", { ref: (el) => (this.offlineLicenseWrapper = el) }, index.h("span", { class: "license-heading" }, index.h("span", null, "Licenza offline"), this.setExpirationLicenseMessage("offline")), "Scadenza il ", index.h("b", null, this.cardData.offlineLicense.expiration), index.h("br", null), "Installazioni disponibili: ", index.h("b", null, this.cardData.offlineLicense.installations)));
123
123
  }
124
124
  render() {
125
- return (index.h("div", { key: '9624e46b8181eca7d5d9095e54f3c09952e0b265' }, this.renderCloseIcon(), index.h("div", { key: '7e18ca7448792186cd52e583171bb6d1a16f99a8', class: "content-wrapper", ref: (el) => (this.contentWrapper = el) }, this.renderGeneralSection(), this.renderTooltip(), this.renderOnlineLicenseSection(), this.renderOfflineLicenseSection()), index.h("div", { key: '483cea51ec8b7feeac5d3763a753281b8694f735', class: "cta-wrapper" }, index.h("slot", { key: '7af9c75a45b76a2e069fe80441d158ce52bb51ce' }))));
125
+ return (index.h("div", { key: '0f8111d48191f306b232f8b9e167aeffced4674b' }, this.renderCloseIcon(), index.h("div", { key: '57b77f2f3ad645cebb44d6a247d93c1e82b8f281', class: "content-wrapper", ref: (el) => (this.contentWrapper = el) }, this.renderGeneralSection(), this.renderTooltip(), this.renderOnlineLicenseSection(), this.renderOfflineLicenseSection()), index.h("div", { key: '226bd8e804cecfee34ff748a5d1936e68f6b2307', class: "cta-wrapper" }, index.h("slot", { key: '2fc25a5fd61a0a04a44ceabb3372265424708f5f' }))));
126
126
  }
127
127
  };
128
128
  ZMyzCardInfo.style = ZMyzCardInfoStyle0;
@@ -1 +1 @@
1
- {"file":"z-myz-card-info.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,SAAS,GAAG,20DAA20D,CAAC;AAC91D,2BAAe,SAAS;;MCWX,YAAY;IA6Bf,YAAY,CAAC,QAAQ,GAAG,KAAK;QACnC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KAC9B;IAED;;;;4BA1BwB,CAAC;6BAGT,KAAK;uBAGX,KAAK;QAqBb,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAClD;IAED,iBAAiB;QACf,IAAI,CAAC,gBAAgB,EAAE,CAAC;KACzB;IAED,mBAAmB;QACjB,IAAI,CAAC,gBAAgB,EAAE,CAAC;KACzB;IAED,kBAAkB;QAChB,IAAI,CAAC,mBAAmB,EAAE,CAAC;KAC5B;IAEO,mBAAmB;QACzB,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YAC7C,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;YAE3B,OAAO;SACR;QAED,IACE,IAAI,CAAC,cAAc,CAAC,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,YAAY;YACnE,IAAI,CAAC,WAAW,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,YAAY,EAC7D;YACA,MAAM,MAAM,GACV,IAAI,CAAC,cAAc,CAAC,YAAY;gBAChC,IAAI,CAAC,oBAAoB,CAAC,YAAY;gBACtC,IAAI,CAAC,qBAAqB,CAAC,YAAY,CAAC;YAC1C,IAAI,CAAC,WA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vB,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,IAEtC,IAAI,CAAC,oBAAoB,EAAE,EAC3B,IAAI,CAAC,aAAa,EAAE,EACpB,IAAI,CAAC,0BAA0B,EAAE,EACjC,IAAI,CAAC,2BAA2B,EAAE,CAC/B,EACNA,kEAAK,KAAK,EAAC,aAAa,IACtBA,oEAAQ,CACJ,CACF,EACN;KACH;;;;;;","names":["h","handleKeyboardSubmit","PopoverPosition"],"sources":["src/snowflakes/myz/card/z-myz-card-info/styles.css?tag=z-myz-card-info&encapsulation=shadow","src/snowflakes/myz/card/z-myz-card-info/index.tsx"],"sourcesContent":[":host {\n width: 100%;\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\n:host > div {\n position: relative;\n display: grid;\n width: calc(100% + calc(var(--space-unit) * 2));\n height: 402px;\n box-sizing: border-box;\n padding: calc(var(--space-unit) * 2) calc(var(--space-unit) * 3);\n border: var(--border-size-small) solid var(--color-primary01);\n margin-left: calc(-1 * var(--space-unit));\n background: var(--color-surface01);\n border-radius: 0;\n box-shadow: 0 2px 4px 0 rgb(66 69 72 / 35%);\n}\n\n:host > div > z-icon {\n position: absolute;\n top: var(--space-unit);\n right: var(--space-unit);\n cursor: pointer;\n fill: var(--color-primary01);\n}\n\n:host > div > div.cta-wrapper {\n display: flex;\n flex-flow: column nowrap;\n align-self: end;\n justify-content: space-between;\n}\n\n:host > div > div.content-wrapper {\n position: relative;\n overflow: hidden;\n align-self: stretch;\n}\n\n:host > div > div.content-wrapper > section {\n box-sizing: border-box;\n padding: var(--space-unit) 0;\n border-bottom: var(--border-size-small) solid var(--color-surface04);\n color: var(--color-surface05);\n font-size: 14px;\n line-height: 20px;\n}\n\n:host > div > div.content-wrapper > section:last-child {\n border-bottom: none;\n}\n\n:host > div > div.content-wrapper > section.info-wrapper {\n position: relative;\n overflow: hidden;\n box-sizing: border-box;\n}\n\n:host > div > div.content-wrapper > section.info-wrapper.hidden::after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background: linear-gradient(180deg, rgb(255 0 0 / 0%), rgb(255 0 0 / 0%) 60%, white);\n content: \"\";\n pointer-events: none;\n}\n\n:host > div > div.content-wrapper > section > span.license-heading {\n display: flex;\n justify-content: space-between;\n}\n\n:host > div > div.content-wrapper > section > span.license-heading > span.expired {\n color: var(--color-secondary01);\n font-size: 12px;\n font-weight: 600;\n}\n\n:host > div > div.content-wrapper > section > span.license-heading > span.expiring {\n color: var(--color-warning01);\n font-size: 12px;\n font-weight: 600;\n}\n\n:host > div > div.content-wrapper > z-popover {\n position: absolute;\n top: 0;\n left: calc(var(--space-unit) * 4);\n}\n","import {Component, Event, EventEmitter, Prop, State, h} from \"@stencil/core\";\nimport {DictionaryData, PopoverPosition} from \"../../../../beans\";\nimport {handleKeyboardSubmit} from \"../../../../utils/utils\";\n\n/**\n * @slot - content\n */\n@Component({\n tag: \"z-myz-card-info\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZMyzCardInfo {\n /** dictionary info */\n @Prop()\n data: string | DictionaryData;\n\n /** tabindex link attribute (optional) */\n @Prop()\n htmltabindex?: number = 0;\n\n @State()\n hiddenContent = false;\n\n @State()\n tooltip = false;\n\n private cardData: DictionaryData;\n\n private contentWrapper: HTMLElement;\n\n private infoWrapper: HTMLElement;\n\n private onlineLicenseWrapper: HTMLElement;\n\n private offlineLicenseWrapper: HTMLElement;\n\n /** flip card to front */\n @Event()\n flipCard: EventEmitter;\n\n private emitFlipCard(showBack = false): void {\n this.flipCard.emit(showBack);\n }\n\n constructor() {\n this.emitFlipCard = this.emitFlipCard.bind(this);\n }\n\n componentWillLoad(): void {\n this.setStringOrArray();\n }\n\n componentWillUpdate(): void {\n this.setStringOrArray();\n }\n\n componentDidRender(): void {\n this.handleContentHeight();\n }\n\n private handleContentHeight(): void {\n if (!this.contentWrapper && !this.infoWrapper) {\n this.hiddenContent = false;\n\n return;\n }\n\n if (\n this.contentWrapper.scrollHeight > this.contentWrapper.offsetHeight ||\n this.infoWrapper.scrollHeight > this.infoWrapper.offsetHeight\n ) {\n const height =\n this.contentWrapper.offsetHeight -\n this.onlineLicenseWrapper.offsetHeight -\n this.offlineLicenseWrapper.offsetHeight;\n this.infoWrapper.style.height = `${height}px`;\n this.hiddenContent = true;\n\n return;\n }\n\n this.hiddenContent = false;\n }\n\n private setStringOrArray(): void {\n if (typeof this.data === \"string\") {\n this.cardData = JSON.parse(this.data);\n } else {\n this.cardData = this.data;\n }\n }\n\n private renderCloseIcon(): HTMLZIconElement {\n return (\n <z-icon\n name=\"multiply-circled-filled\"\n height={18}\n width={18}\n onClick={() => this.emitFlipCard(false)}\n tabindex={this.htmltabindex}\n onKeyUp={(e: KeyboardEvent) => {\n handleKeyboardSubmit(e, this.emitFlipCard, false);\n }}\n />\n );\n }\n\n private renderGeneralSection(): HTMLElement {\n const title = this?.cardData?.title;\n const description = this?.cardData?.description;\n\n return (\n <section\n class={`info-wrapper ${this.hiddenContent ? \"hidden\" : \"\"}`}\n onClick={() => {\n if (this.hiddenContent) {\n this.tooltip = !this.tooltip;\n }\n }}\n ref={(el) => (this.infoWrapper = el)}\n >\n {this.renderAuthor()}\n {this.renderYear()}\n {title}\n <br />\n {description}\n </section>\n );\n }\n\n private renderAuthor(): HTMLSpanElement {\n const author = this?.cardData?.author;\n if (!author) {\n return null;\n }\n\n return (\n <span>\n Autore: <b>{author}</b>\n <br />\n </span>\n );\n }\n\n private renderYear(): HTMLSpanElement {\n const year = this?.cardData?.year;\n if (!year) {\n return null;\n }\n\n return (\n <span>\n Anno: <b>{year}</b>\n <br />\n </span>\n );\n }\n\n private renderTooltip(): HTMLZPopoverElement {\n if (!this.tooltip) {\n return;\n }\n\n if (!this.cardData) {\n return;\n }\n const {title, year, author, description} = this.cardData;\n\n return (\n <z-popover\n position={PopoverPosition.RIGHT}\n onClick={() => (this.tooltip = false)}\n >\n {`${title} ${year} ${author} ${description}`}\n </z-popover>\n );\n }\n\n private setExpirationLicenseMessage(type: string): HTMLSpanElement {\n if (\n (type === \"online\" && this.cardData.onlineLicense.expired) ||\n (type === \"offline\" && this.cardData.offlineLicense.expired)\n ) {\n return <span class=\"expired\">SCADUTA</span>;\n }\n\n if (\n (type === \"online\" && this.cardData.onlineLicense.expiring) ||\n (type === \"offline\" && this.cardData.offlineLicense.expiring)\n ) {\n return <span class=\"expiring\">IN SCADENZA</span>;\n }\n }\n\n private renderOnlineLicenseSection(): HTMLElement {\n if (!this?.cardData?.onlineLicense) {\n return;\n }\n\n return (\n <section ref={(el) => (this.onlineLicenseWrapper = el)}>\n <span class=\"license-heading\">\n <span>Licenza online</span>\n {this.setExpirationLicenseMessage(\"online\")}\n </span>\n Scadenza il <b>{this.cardData.onlineLicense.expiration}</b>\n <br />\n </section>\n );\n }\n\n private renderOfflineLicenseSection(): HTMLElement {\n if (!this?.cardData?.offlineLicense) {\n return;\n }\n\n return (\n <section ref={(el) => (this.offlineLicenseWrapper = el)}>\n <span class=\"license-heading\">\n <span>Licenza offline</span>\n {this.setExpirationLicenseMessage(\"offline\")}\n </span>\n Scadenza il <b>{this.cardData.offlineLicense.expiration}</b>\n <br />\n Installazioni disponibili: <b>{this.cardData.offlineLicense.installations}</b>\n </section>\n );\n }\n\n render(): HTMLDivElement {\n return (\n <div>\n {this.renderCloseIcon()}\n <div\n class=\"content-wrapper\"\n ref={(el) => (this.contentWrapper = el)}\n >\n {this.renderGeneralSection()}\n {this.renderTooltip()}\n {this.renderOnlineLicenseSection()}\n {this.renderOfflineLicenseSection()}\n </div>\n <div class=\"cta-wrapper\">\n <slot />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"z-myz-card-info.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,SAAS,GAAG,y0DAAy0D,CAAC;AAC51D,2BAAe,SAAS;;MCWX,YAAY;IA6Bf,YAAY,CAAC,QAAQ,GAAG,KAAK;QACnC,IAAI,CAAC,QAAQ,CAAC,IAA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,MAAM,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC,IACpDA,kBAAM,KAAK,EAAC,iBAAiB,IAC3BA,uCAA2B,EAC1B,IAAI,CAAC,2BAA2B,CAAC,QAAQ,CAAC,CACtC,kBACKA,mBAAI,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAK,EAC3DA,mBAAM,CACE,EACV;KACH;IAEO,2BAA2B;;QACjC,IAAI,EAAC,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,QAAQ,0CAAE,cAAc,CAAA,EAAE;YACnC,OAAO;SACR;QAED,QACEA,qBAAS,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,qBAAqB,GAAG,EAAE,CAAC,IACrDA,kBAAM,KAAK,EAAC,iBAAiB,IAC3BA,wCAA4B,EAC3B,IAAI,CAAC,2BAA2B,CAAC,SAAS,CAAC,CACvC,kBACKA,mBAAI,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAK,EAC5DA,mBAAM,iCACqBA,mBAAI,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAK,CACtE,EACV;KACH;IAED,MAAM;QACJ,QACEA,oEACG,IAAI,CAAC,eAAe,EAAE,EACvBA,kEACE,KAAK,EAAC,iBAAiB,EACvB,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,IAEtC,IAAI,CAAC,oBAAoB,EAAE,EAC3B,IAAI,CAAC,aAAa,EAAE,EACpB,IAAI,CAAC,0BAA0B,EAAE,EACjC,IAAI,CAAC,2BAA2B,EAAE,CAC/B,EACNA,kEAAK,KAAK,EAAC,aAAa,IACtBA,oEAAQ,CACJ,CACF,EACN;KACH;;;;;;","names":["h","handleKeyboardSubmit","PopoverPosition"],"sources":["src/snowflakes/myz/card/z-myz-card-info/styles.css?tag=z-myz-card-info&encapsulation=shadow","src/snowflakes/myz/card/z-myz-card-info/index.tsx"],"sourcesContent":[":host {\n width: 100%;\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\n:host > div {\n position: relative;\n display: grid;\n width: calc(100% + calc(var(--space-unit) * 2));\n height: 402px;\n box-sizing: border-box;\n padding: calc(var(--space-unit) * 2) calc(var(--space-unit) * 3);\n border: var(--border-size-small) solid var(--color-primary01);\n margin-left: calc(-1 * var(--space-unit));\n background: var(--color-surface01);\n border-radius: 0;\n box-shadow: 0 2px 4px 0 rgb(66 69 72 / 35%);\n}\n\n:host > div > z-icon {\n position: absolute;\n top: var(--space-unit);\n right: var(--space-unit);\n cursor: pointer;\n fill: var(--color-primary01);\n}\n\n:host > div > div.cta-wrapper {\n display: flex;\n flex-flow: column nowrap;\n align-self: end;\n justify-content: space-between;\n}\n\n:host > div > div.content-wrapper {\n position: relative;\n overflow: hidden;\n align-self: stretch;\n}\n\n:host > div > div.content-wrapper > section {\n box-sizing: border-box;\n padding: var(--space-unit) 0;\n border-bottom: var(--border-size-small) solid var(--color-surface04);\n color: var(--color-surface05);\n font-size: 14px;\n line-height: 20px;\n}\n\n:host > div > div.content-wrapper > section:last-child {\n border-bottom: none;\n}\n\n:host > div > div.content-wrapper > section.info-wrapper {\n position: relative;\n overflow: hidden;\n box-sizing: border-box;\n}\n\n:host > div > div.content-wrapper > section.info-wrapper.hidden::after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background: linear-gradient(180deg, rgb(255 0 0 / 0%), rgb(255 0 0 / 0%) 60%, white);\n content: \"\";\n pointer-events: none;\n}\n\n:host > div > div.content-wrapper > section > span.license-heading {\n display: flex;\n justify-content: space-between;\n}\n\n:host > div > div.content-wrapper > section > span.license-heading > span.expired {\n color: var(--color-primary01);\n font-size: 12px;\n font-weight: 600;\n}\n\n:host > div > div.content-wrapper > section > span.license-heading > span.expiring {\n color: var(--color-warning01);\n font-size: 12px;\n font-weight: 600;\n}\n\n:host > div > div.content-wrapper > z-popover {\n position: absolute;\n top: 0;\n left: calc(var(--space-unit) * 4);\n}\n","import {Component, Event, EventEmitter, Prop, State, h} from \"@stencil/core\";\nimport {DictionaryData, PopoverPosition} from \"../../../../beans\";\nimport {handleKeyboardSubmit} from \"../../../../utils/utils\";\n\n/**\n * @slot - content\n */\n@Component({\n tag: \"z-myz-card-info\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZMyzCardInfo {\n /** dictionary info */\n @Prop()\n data: string | DictionaryData;\n\n /** tabindex link attribute (optional) */\n @Prop()\n htmltabindex?: number = 0;\n\n @State()\n hiddenContent = false;\n\n @State()\n tooltip = false;\n\n private cardData: DictionaryData;\n\n private contentWrapper: HTMLElement;\n\n private infoWrapper: HTMLElement;\n\n private onlineLicenseWrapper: HTMLElement;\n\n private offlineLicenseWrapper: HTMLElement;\n\n /** flip card to front */\n @Event()\n flipCard: EventEmitter;\n\n private emitFlipCard(showBack = false): void {\n this.flipCard.emit(showBack);\n }\n\n constructor() {\n this.emitFlipCard = this.emitFlipCard.bind(this);\n }\n\n componentWillLoad(): void {\n this.setStringOrArray();\n }\n\n componentWillUpdate(): void {\n this.setStringOrArray();\n }\n\n componentDidRender(): void {\n this.handleContentHeight();\n }\n\n private handleContentHeight(): void {\n if (!this.contentWrapper && !this.infoWrapper) {\n this.hiddenContent = false;\n\n return;\n }\n\n if (\n this.contentWrapper.scrollHeight > this.contentWrapper.offsetHeight ||\n this.infoWrapper.scrollHeight > this.infoWrapper.offsetHeight\n ) {\n const height =\n this.contentWrapper.offsetHeight -\n this.onlineLicenseWrapper.offsetHeight -\n this.offlineLicenseWrapper.offsetHeight;\n this.infoWrapper.style.height = `${height}px`;\n this.hiddenContent = true;\n\n return;\n }\n\n this.hiddenContent = false;\n }\n\n private setStringOrArray(): void {\n if (typeof this.data === \"string\") {\n this.cardData = JSON.parse(this.data);\n } else {\n this.cardData = this.data;\n }\n }\n\n private renderCloseIcon(): HTMLZIconElement {\n return (\n <z-icon\n name=\"multiply-circled-filled\"\n height={18}\n width={18}\n onClick={() => this.emitFlipCard(false)}\n tabindex={this.htmltabindex}\n onKeyUp={(e: KeyboardEvent) => {\n handleKeyboardSubmit(e, this.emitFlipCard, false);\n }}\n />\n );\n }\n\n private renderGeneralSection(): HTMLElement {\n const title = this?.cardData?.title;\n const description = this?.cardData?.description;\n\n return (\n <section\n class={`info-wrapper ${this.hiddenContent ? \"hidden\" : \"\"}`}\n onClick={() => {\n if (this.hiddenContent) {\n this.tooltip = !this.tooltip;\n }\n }}\n ref={(el) => (this.infoWrapper = el)}\n >\n {this.renderAuthor()}\n {this.renderYear()}\n {title}\n <br />\n {description}\n </section>\n );\n }\n\n private renderAuthor(): HTMLSpanElement {\n const author = this?.cardData?.author;\n if (!author) {\n return null;\n }\n\n return (\n <span>\n Autore: <b>{author}</b>\n <br />\n </span>\n );\n }\n\n private renderYear(): HTMLSpanElement {\n const year = this?.cardData?.year;\n if (!year) {\n return null;\n }\n\n return (\n <span>\n Anno: <b>{year}</b>\n <br />\n </span>\n );\n }\n\n private renderTooltip(): HTMLZPopoverElement {\n if (!this.tooltip) {\n return;\n }\n\n if (!this.cardData) {\n return;\n }\n const {title, year, author, description} = this.cardData;\n\n return (\n <z-popover\n position={PopoverPosition.RIGHT}\n onClick={() => (this.tooltip = false)}\n >\n {`${title} ${year} ${author} ${description}`}\n </z-popover>\n );\n }\n\n private setExpirationLicenseMessage(type: string): HTMLSpanElement {\n if (\n (type === \"online\" && this.cardData.onlineLicense.expired) ||\n (type === \"offline\" && this.cardData.offlineLicense.expired)\n ) {\n return <span class=\"expired\">SCADUTA</span>;\n }\n\n if (\n (type === \"online\" && this.cardData.onlineLicense.expiring) ||\n (type === \"offline\" && this.cardData.offlineLicense.expiring)\n ) {\n return <span class=\"expiring\">IN SCADENZA</span>;\n }\n }\n\n private renderOnlineLicenseSection(): HTMLElement {\n if (!this?.cardData?.onlineLicense) {\n return;\n }\n\n return (\n <section ref={(el) => (this.onlineLicenseWrapper = el)}>\n <span class=\"license-heading\">\n <span>Licenza online</span>\n {this.setExpirationLicenseMessage(\"online\")}\n </span>\n Scadenza il <b>{this.cardData.onlineLicense.expiration}</b>\n <br />\n </section>\n );\n }\n\n private renderOfflineLicenseSection(): HTMLElement {\n if (!this?.cardData?.offlineLicense) {\n return;\n }\n\n return (\n <section ref={(el) => (this.offlineLicenseWrapper = el)}>\n <span class=\"license-heading\">\n <span>Licenza offline</span>\n {this.setExpirationLicenseMessage(\"offline\")}\n </span>\n Scadenza il <b>{this.cardData.offlineLicense.expiration}</b>\n <br />\n Installazioni disponibili: <b>{this.cardData.offlineLicense.installations}</b>\n </section>\n );\n }\n\n render(): HTMLDivElement {\n return (\n <div>\n {this.renderCloseIcon()}\n <div\n class=\"content-wrapper\"\n ref={(el) => (this.contentWrapper = el)}\n >\n {this.renderGeneralSection()}\n {this.renderTooltip()}\n {this.renderOnlineLicenseSection()}\n {this.renderOfflineLicenseSection()}\n </div>\n <div class=\"cta-wrapper\">\n <slot />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -32,7 +32,7 @@ const ZMyzCardList = class {
32
32
  });
33
33
  }
34
34
  render() {
35
- return index.h("ul", { key: '33ab84ece48f2f9a980d82aa0a6905583004f3bb' }, this.renderList(JSON.parse(this.listdata)));
35
+ return index.h("ul", { key: '01d6967e96c5ab8f9acebbd0c107fb0168ee5c57' }, this.renderList(JSON.parse(this.listdata)));
36
36
  }
37
37
  };
38
38
  ZMyzCardList.style = ZMyzCardListStyle0;
@@ -39,7 +39,7 @@ const ZMyzCardComponent = class {
39
39
  return elemClasses;
40
40
  }
41
41
  render() {
42
- return (index.h("div", { key: 'd07b37d42382d81be002b31b448e5d6ac3e8867c', class: this.retrieveClass(), tabindex: "0" }, index.h("slot", { key: '03e02f39390a302f558bc341b538390027ecb148' })));
42
+ return (index.h("div", { key: 'd999d04c93a5a556d397ec0458a8db7b252e4f4c', class: this.retrieveClass(), tabindex: "0" }, index.h("slot", { key: 'bebbc05f7f4a7e57a0b0379abc0a5b3d71432309' })));
43
43
  }
44
44
  };
45
45
  ZMyzCardComponent.style = ZMyzCardStyle0;
@@ -52,7 +52,7 @@ const ZMyzCardBody = class {
52
52
  index.registerInstance(this, hostRef);
53
53
  }
54
54
  render() {
55
- return (index.h("div", { key: '5e1a72de482c87d1b26e8e60bd833a05e5f3b062' }, index.h("slot", { key: '268e3bb553b952cbdbc55db2d17879adddf28e23', name: "alert" }), index.h("slot", { key: 'a26bede57fa17b34b348a1384d815646c361bee5', name: "cover" })));
55
+ return (index.h("div", { key: '87bccb8aa58d306d1dd01960d83b87f6c72916a6' }, index.h("slot", { key: 'f30fbd1e1bebda1bab8dffeab7f7f6691eddf487', name: "alert" }), index.h("slot", { key: '1c12604a64392bea5f30af724bb10ad074336246', name: "cover" })));
56
56
  }
57
57
  };
58
58
  ZMyzCardBody.style = ZMyzCardBodyStyle0;
@@ -72,7 +72,7 @@ const ZMyzCardCover = class {
72
72
  this.img = this.defaultimg;
73
73
  }
74
74
  render() {
75
- return (index.h("img", { key: '36c96fbd2c8546b245e3ed835957ea9ddb4def3d', class: this.faded && "faded", onError: this.hadleOnImageError.bind(this), alt: this.titolo, src: this.img }));
75
+ return (index.h("img", { key: 'e8bb33422b5ec5cd69aa639b75bac7d36efb7eb0', class: this.faded && "faded", onError: this.hadleOnImageError.bind(this), alt: this.titolo, src: this.img }));
76
76
  }
77
77
  };
78
78
  ZMyzCardCover.style = ZMyzCardCoverStyle0;
@@ -108,7 +108,7 @@ const ZMyzCardHeader = class {
108
108
  };
109
109
  }
110
110
  render() {
111
- return (index.h("header", { key: '40152ef3144db81f149eb5d8ecf4a823f7950f3e', class: this.retrieveClass() }, index.h("slot", { key: '8386bb3e5a3b7c5bee3da6a6801ada1e4aa2a5dc', name: "aria-heading" }), index.h("span", { key: '35b55d3be757c0a646dca9184c55ad1bd922fc1e', class: "card-title", ref: (el) => (this.ellipsis = el), title: this.getTitle() }, this.titolo), index.h("slot", { key: '834cb2fac275139fe0f4a97c5c75ed0422348719', name: "icon" })));
111
+ return (index.h("header", { key: '4dd5f09942f07568a180ac4bc2079aa3ebb5caf5', class: this.retrieveClass() }, index.h("slot", { key: '09f9e26d737c37eb81b0f88430baeb731275a118', name: "aria-heading" }), index.h("span", { key: 'a6401d5728990d95a9963ef9feb4496accfb9676', class: "card-title", ref: (el) => (this.ellipsis = el), title: this.getTitle() }, this.titolo), index.h("slot", { key: '98e8d0b79de7170ac81aceed3fe07275b80f7d08', name: "icon" })));
112
112
  }
113
113
  };
114
114
  ZMyzCardHeader.style = ZMyzCardHeaderStyle0;
@@ -33,7 +33,7 @@ const ZMyzListItem = class {
33
33
  }
34
34
  render() {
35
35
  const linkId = this.listitemid ? `link_${this.listitemid}` : "";
36
- return (index.h("li", { key: 'f1a99bcc7ef168736b85034da0e2003589e9fef1', role: "button", id: this.listitemid, "data-action": this.action, onClick: (e) => this.emitZListItemClick(e, this.listitemid), onKeyPress: (ev) => utils.handleKeyboardSubmit(ev, this.emitZListItemClick, this.listitemid) }, index.h("span", { key: 'd518a6382bf2fd10849b4d732a1f3fd48d84201e', class: this.underlined && "border" }, this.icon && index.h("z-icon", { key: '622a5cde91bd0213ad6cf11f7c910da3c18683ea', name: this.icon }), this.link ? (index.h("a", { href: this.link ? this.link : null, target: this.linktarget, id: linkId, onClick: (e) => this.emitZListItemLinkClick(e, linkId), onKeyPress: (ev) => utils.handleKeyboardSubmit(ev, this.emitZListItemLinkClick, linkId), role: this.link ? "link" : "button", tabindex: "0" }, this.text)) : (index.h("span", { innerHTML: this.text })), index.h("slot", { key: '87bb3fef2ba5cb1c992280835436ba7f2d538db0' }))));
36
+ return (index.h("li", { key: 'b96b5f850ed4f955ef40eafdedfabe71c942e886', role: "button", id: this.listitemid, "data-action": this.action, onClick: (e) => this.emitZListItemClick(e, this.listitemid), onKeyPress: (ev) => utils.handleKeyboardSubmit(ev, this.emitZListItemClick, this.listitemid) }, index.h("span", { key: '2ca05ec788e9ff591ad7b1cdbb5517b32d5681a9', class: this.underlined && "border" }, this.icon && index.h("z-icon", { key: 'e573f22f4797e9420e9a460a4aa4c793be06c14f', name: this.icon }), this.link ? (index.h("a", { href: this.link ? this.link : null, target: this.linktarget, id: linkId, onClick: (e) => this.emitZListItemLinkClick(e, linkId), onKeyPress: (ev) => utils.handleKeyboardSubmit(ev, this.emitZListItemLinkClick, linkId), role: this.link ? "link" : "button", tabindex: "0" }, this.text)) : (index.h("span", { innerHTML: this.text })), index.h("slot", { key: '6efed7b8ca33c2dcb7402555330443244340bae5' }))));
37
37
  }
38
38
  };
39
39
  ZMyzListItem.style = ZMyzListItemStyle0;
@@ -26,7 +26,7 @@ const ZMyzList = class {
26
26
  }
27
27
  render() {
28
28
  const lastElem = this.list ? this.list.length - 1 : -1;
29
- return (index.h("ul", { key: '8e0eb3ea1d015394f1feb69bbca818408402a6e1' }, this.list &&
29
+ return (index.h("ul", { key: 'c7777e913e0359afc93a18a2152cd977fcbcb813' }, this.list &&
30
30
  this.list.map((bean, i) => (index.h("z-myz-list-item", { listitemid: bean.listitemid, text: bean.text, link: bean.link, linktarget: bean.linktarget, icon: bean.icon, underlined: lastElem != i })))));
31
31
  }
32
32
  static get watchers() { return {