@zanichelli/albe-web-components 19.1.4-RC1 → 19.2.1-RC

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 (800) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/cjs/iconset-5d47610c.js +1016 -0
  3. package/dist/cjs/iconset-5d47610c.js.map +1 -0
  4. package/dist/cjs/{index-1c7cd5df.js → index-012853a0.js} +2 -2
  5. package/dist/cjs/{index-1c7cd5df.js.map → index-012853a0.js.map} +1 -1
  6. package/dist/cjs/{index-66928615.js → index-1d7a50cc.js} +3 -3
  7. package/dist/cjs/{index-66928615.js.map → index-1d7a50cc.js.map} +1 -1
  8. package/dist/cjs/{index-62712250.js → index-2dff20f5.js} +2 -2
  9. package/dist/cjs/{index-62712250.js.map → index-2dff20f5.js.map} +1 -1
  10. package/dist/cjs/{index-f011b2e3.js → index-86a8a3a4.js} +2 -2
  11. package/dist/cjs/{index-f011b2e3.js.map → index-86a8a3a4.js.map} +1 -1
  12. package/dist/cjs/{index-805390c8.js → index-938c9669.js} +5 -5
  13. package/dist/cjs/{index-805390c8.js.map → index-938c9669.js.map} +1 -1
  14. package/dist/cjs/index-96af6326.js +8 -4
  15. package/dist/cjs/{index-09238e31.js → index-cb280932.js} +3 -3
  16. package/dist/cjs/{index-09238e31.js.map → index-cb280932.js.map} +1 -1
  17. package/dist/cjs/{index-97a4c18d.js → index-e30d0503.js} +51 -1
  18. package/dist/cjs/index-e30d0503.js.map +1 -0
  19. package/dist/cjs/index.cjs.js +5 -2
  20. package/dist/cjs/index.cjs.js.map +1 -1
  21. package/dist/cjs/loader.cjs.js +1 -1
  22. package/dist/cjs/{utils-7f9d5a78.js → utils-4f7b4830.js} +2 -2
  23. package/dist/cjs/{utils-7f9d5a78.js.map → utils-4f7b4830.js.map} +1 -1
  24. package/dist/cjs/{utils-5148245a.js → utils-e8b453d5.js} +35 -6
  25. package/dist/cjs/utils-e8b453d5.js.map +1 -0
  26. package/dist/cjs/web-components-library.cjs.js +1 -1
  27. package/dist/cjs/z-accordion.cjs.entry.js +12 -3
  28. package/dist/cjs/z-accordion.cjs.entry.js.map +1 -1
  29. package/dist/cjs/z-alert.cjs.entry.js +1 -1
  30. package/dist/cjs/z-anchor-navigation.cjs.entry.js +2 -2
  31. package/dist/cjs/z-app-header-deprecated.cjs.entry.js +2 -2
  32. package/dist/cjs/z-app-header_12.cjs.entry.js +105 -1024
  33. package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
  34. package/dist/cjs/z-aria-alert.cjs.entry.js +2 -2
  35. package/dist/cjs/z-avatar.cjs.entry.js +3 -3
  36. package/dist/cjs/z-book-card-app.cjs.entry.js +2 -2
  37. package/dist/cjs/z-book-card-deprecated.cjs.entry.js +3 -3
  38. package/dist/cjs/z-book-card.cjs.entry.js +1 -1
  39. package/dist/cjs/z-book-cover.cjs.entry.js +1 -1
  40. package/dist/cjs/z-breadcrumb.cjs.entry.js +4 -4
  41. package/dist/cjs/z-button-sort.cjs.entry.js +1 -1
  42. package/dist/cjs/z-card.cjs.entry.js +1 -1
  43. package/dist/cjs/z-carousel.cjs.entry.js +1 -1
  44. package/dist/cjs/z-chip.cjs.entry.js +3 -3
  45. package/dist/cjs/z-color-picker.cjs.entry.js +212 -0
  46. package/dist/cjs/z-color-picker.cjs.entry.js.map +1 -0
  47. package/dist/cjs/z-combobox.cjs.entry.js +2 -2
  48. package/dist/cjs/z-cover-hero.cjs.entry.js +1 -1
  49. package/dist/cjs/z-date-picker.cjs.entry.js +3 -3
  50. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +3 -3
  51. package/dist/cjs/z-file-upload.cjs.entry.js +1 -1
  52. package/dist/cjs/z-file.cjs.entry.js +2 -2
  53. package/dist/cjs/z-ghost-loading.cjs.entry.js +1 -1
  54. package/dist/cjs/z-info-reveal.cjs.entry.js +1 -1
  55. package/dist/cjs/z-menu-deprecated.cjs.entry.js +1 -1
  56. package/dist/cjs/z-menu-section-deprecated.cjs.entry.js +1 -1
  57. package/dist/cjs/z-menu-section.cjs.entry.js +2 -2
  58. package/dist/cjs/z-menu.cjs.entry.js +2 -2
  59. package/dist/cjs/z-menu.cjs.entry.js.map +1 -1
  60. package/dist/cjs/z-myz-card-alert.cjs.entry.js +2 -2
  61. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +2 -2
  62. package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +1 -1
  63. package/dist/cjs/z-myz-card-footer.cjs.entry.js +2 -2
  64. package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
  65. package/dist/cjs/z-myz-card-info.cjs.entry.js +3 -3
  66. package/dist/cjs/z-myz-card-list.cjs.entry.js +1 -1
  67. package/dist/cjs/z-myz-card_4.cjs.entry.js +5 -5
  68. package/dist/cjs/z-myz-list-item.cjs.entry.js +3 -3
  69. package/dist/cjs/z-myz-list.cjs.entry.js +1 -1
  70. package/dist/cjs/z-navigation-tabs.cjs.entry.js +1 -1
  71. package/dist/cjs/z-notification.cjs.entry.js +1 -1
  72. package/dist/cjs/z-notification.cjs.entry.js.map +1 -1
  73. package/dist/cjs/z-otp.cjs.entry.js +3 -3
  74. package/dist/cjs/z-pagination.cjs.entry.js +1 -1
  75. package/dist/cjs/z-popover.cjs.entry.js +20 -16
  76. package/dist/cjs/z-popover.cjs.entry.js.map +1 -1
  77. package/dist/cjs/z-range-picker.cjs.entry.js +5 -5
  78. package/dist/cjs/z-section-title.cjs.entry.js +2 -2
  79. package/dist/cjs/z-select.cjs.entry.js +2 -2
  80. package/dist/cjs/z-skip-to-content.cjs.entry.js +2 -2
  81. package/dist/cjs/z-slideshow.cjs.entry.js +2 -2
  82. package/dist/cjs/z-table.cjs.entry.js +9 -9
  83. package/dist/cjs/z-tbody.cjs.entry.js +1 -1
  84. package/dist/cjs/z-td.cjs.entry.js +2 -2
  85. package/dist/cjs/z-tfoot.cjs.entry.js +1 -1
  86. package/dist/cjs/z-th.cjs.entry.js +2 -2
  87. package/dist/cjs/z-thead.cjs.entry.js +1 -1
  88. package/dist/cjs/z-toast-notification-list.cjs.entry.js +2 -2
  89. package/dist/cjs/z-toast-notification.cjs.entry.js +43 -46
  90. package/dist/cjs/z-toast-notification.cjs.entry.js.map +1 -1
  91. package/dist/cjs/z-toggle-button.cjs.entry.js +2 -2
  92. package/dist/cjs/z-toggle-switch.cjs.entry.js +5 -5
  93. package/dist/cjs/z-tool.cjs.entry.js +147 -42
  94. package/dist/cjs/z-tool.cjs.entry.js.map +1 -1
  95. package/dist/cjs/z-toolbar.cjs.entry.js +64 -66
  96. package/dist/cjs/z-toolbar.cjs.entry.js.map +1 -1
  97. package/dist/cjs/z-tooltip.cjs.entry.js +3 -2
  98. package/dist/cjs/z-tooltip.cjs.entry.js.map +1 -1
  99. package/dist/cjs/z-tr.cjs.entry.js +5 -5
  100. package/dist/cjs/z-tree-list.cjs.entry.js +2 -2
  101. package/dist/cjs/z-visually-hidden.cjs.entry.js +1 -1
  102. package/dist/collection/beans/index.js +48 -0
  103. package/dist/collection/beans/index.js.map +1 -1
  104. package/dist/collection/collection-manifest.json +1 -0
  105. package/dist/collection/components/book-card/z-book-card-app/index.js +1 -1
  106. package/dist/collection/components/date-picker/z-date-picker/index.js +1 -1
  107. package/dist/collection/components/date-picker/z-range-picker/index.js +3 -3
  108. package/dist/collection/components/deprecated/z-app-header-deprecated/index.js +1 -1
  109. package/dist/collection/components/deprecated/z-book-card-deprecated/index.js +1 -1
  110. package/dist/collection/components/deprecated/z-menu-deprecated/index.js +1 -1
  111. package/dist/collection/components/deprecated/z-menu-section-deprecated/index.js +1 -1
  112. package/dist/collection/components/deprecated/z-section-title/index.js +1 -1
  113. package/dist/collection/components/file-upload/z-dragdrop-area/index.js +2 -2
  114. package/dist/collection/components/file-upload/z-file/index.js +1 -1
  115. package/dist/collection/components/list/z-list/index.js +1 -1
  116. package/dist/collection/components/list/z-list-element/index.js +1 -1
  117. package/dist/collection/components/list/z-list-group/index.js +2 -2
  118. package/dist/collection/components/list/z-tree-list/index.js +1 -1
  119. package/dist/collection/components/table/cells/z-td/index.js +1 -1
  120. package/dist/collection/components/table/cells/z-th/index.js +1 -1
  121. package/dist/collection/components/table/z-table/index.js +1 -1
  122. package/dist/collection/components/table/z-tbody/index.js +1 -1
  123. package/dist/collection/components/table/z-tfoot/index.js +1 -1
  124. package/dist/collection/components/table/z-thead/index.js +1 -1
  125. package/dist/collection/components/table/z-tr/index.js +1 -1
  126. package/dist/collection/components/z-accordion/index.js +15 -1
  127. package/dist/collection/components/z-accordion/index.js.map +1 -1
  128. package/dist/collection/components/z-accordion/index.stories.js +4 -4
  129. package/dist/collection/components/z-accordion/index.stories.js.map +1 -1
  130. package/dist/collection/components/z-accordion/styles.css +2 -34
  131. package/dist/collection/components/z-anchor-navigation/index.js +1 -1
  132. package/dist/collection/components/z-app-header/index.js +1 -1
  133. package/dist/collection/components/z-app-header/index.js.map +1 -1
  134. package/dist/collection/components/z-app-header/index.stories.js +42 -0
  135. package/dist/collection/components/z-app-header/index.stories.js.map +1 -1
  136. package/dist/collection/components/z-app-header/styles.css +8 -0
  137. package/dist/collection/components/z-aria-alert/index.js +1 -1
  138. package/dist/collection/components/z-avatar/index.js +2 -2
  139. package/dist/collection/components/z-book-cover/index.js +1 -1
  140. package/dist/collection/components/z-breadcrumb/index.js +2 -2
  141. package/dist/collection/components/z-button-sort/index.js +1 -1
  142. package/dist/collection/components/z-chip/index.js +2 -2
  143. package/dist/collection/components/z-color-picker/index.js +367 -0
  144. package/dist/collection/components/z-color-picker/index.js.map +1 -0
  145. package/dist/collection/components/z-color-picker/index.stories.js +34 -0
  146. package/dist/collection/components/z-color-picker/index.stories.js.map +1 -0
  147. package/dist/collection/components/z-color-picker/styles.css +74 -0
  148. package/dist/collection/components/z-ghost-loading/index.js +1 -1
  149. package/dist/collection/components/z-icon/index.js +38 -9
  150. package/dist/collection/components/z-icon/index.js.map +1 -1
  151. package/dist/collection/components/z-icon/index.stories.js +34 -18
  152. package/dist/collection/components/z-icon/index.stories.js.map +1 -1
  153. package/dist/collection/components/z-icon/styles.css +16 -2
  154. package/dist/collection/components/z-menu/index.js +1 -1
  155. package/dist/collection/components/z-menu/index.js.map +1 -1
  156. package/dist/collection/components/z-menu-section/index.js +1 -1
  157. package/dist/collection/components/z-notification/styles.css +2 -2
  158. package/dist/collection/components/z-offcanvas/index.js +89 -10
  159. package/dist/collection/components/z-offcanvas/index.js.map +1 -1
  160. package/dist/collection/components/z-popover/index.js +31 -21
  161. package/dist/collection/components/z-popover/index.js.map +1 -1
  162. package/dist/collection/components/z-popover/styles.css +18 -3
  163. package/dist/collection/components/z-tag/index.js +2 -2
  164. package/dist/collection/components/z-toast-notification/index.js +43 -45
  165. package/dist/collection/components/z-toast-notification/index.js.map +1 -1
  166. package/dist/collection/components/z-toast-notification/index.stories.js +3 -1
  167. package/dist/collection/components/z-toast-notification/index.stories.js.map +1 -1
  168. package/dist/collection/components/z-toast-notification/styles.css +124 -124
  169. package/dist/collection/components/z-toast-notification-list/index.js +1 -1
  170. package/dist/collection/components/z-toggle-button/index.js +2 -2
  171. package/dist/collection/components/z-toggle-switch/index.js +3 -3
  172. package/dist/collection/components/z-tool/index.js +281 -48
  173. package/dist/collection/components/z-tool/index.js.map +1 -1
  174. package/dist/collection/components/z-tool/index.stories.js +89 -12
  175. package/dist/collection/components/z-tool/index.stories.js.map +1 -1
  176. package/dist/collection/components/z-tool/styles.css +30 -31
  177. package/dist/collection/components/z-toolbar/index.js +72 -91
  178. package/dist/collection/components/z-toolbar/index.js.map +1 -1
  179. package/dist/collection/components/z-toolbar/index.stories.js +190 -309
  180. package/dist/collection/components/z-toolbar/index.stories.js.map +1 -1
  181. package/dist/collection/components/z-toolbar/styles.css +10 -19
  182. package/dist/collection/components/z-tooltip/index.js +19 -1
  183. package/dist/collection/components/z-tooltip/index.js.map +1 -1
  184. package/dist/collection/components/z-visually-hidden/index.js +1 -1
  185. package/dist/collection/constants/iconset.js +152 -142
  186. package/dist/collection/constants/iconset.js.map +1 -1
  187. package/dist/collection/index.js +1 -0
  188. package/dist/collection/index.js.map +1 -1
  189. package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +1 -1
  190. package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +1 -1
  191. package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +1 -1
  192. package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +1 -1
  193. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
  194. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -1
  195. package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +1 -1
  196. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
  197. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +1 -1
  198. package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
  199. package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
  200. package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
  201. package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +1 -1
  202. package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
  203. package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
  204. package/dist/collection/utils/utils.js +33 -4
  205. package/dist/collection/utils/utils.js.map +1 -1
  206. package/dist/components/iconset.js +152 -143
  207. package/dist/components/iconset.js.map +1 -1
  208. package/dist/components/index.d.ts +2 -0
  209. package/dist/components/index.js +3 -1
  210. package/dist/components/index.js.map +1 -1
  211. package/dist/components/index10.js +15 -6
  212. package/dist/components/index10.js.map +1 -1
  213. package/dist/components/index14.js +1 -1
  214. package/dist/components/index15.js +1 -1
  215. package/dist/components/index16.js +2 -2
  216. package/dist/components/index18.js +1 -1
  217. package/dist/components/index19.js +1 -1
  218. package/dist/components/index2.js +49 -1
  219. package/dist/components/index2.js.map +1 -1
  220. package/dist/components/index20.js +1 -1
  221. package/dist/components/index21.js +1 -1
  222. package/dist/components/index22.js +1 -1
  223. package/dist/components/index23.js +84 -11
  224. package/dist/components/index23.js.map +1 -1
  225. package/dist/components/index24.js +19 -15
  226. package/dist/components/index24.js.map +1 -1
  227. package/dist/components/index26.js +2 -2
  228. package/dist/components/index27.js +55 -0
  229. package/dist/components/index27.js.map +1 -0
  230. package/dist/components/index3.js +1 -1
  231. package/dist/components/index4.js +1 -1
  232. package/dist/components/index6.js +2 -2
  233. package/dist/components/index8.js +2 -2
  234. package/dist/components/index9.js +1 -1
  235. package/dist/components/utils.js +33 -4
  236. package/dist/components/utils.js.map +1 -1
  237. package/dist/components/z-accordion.js +13 -3
  238. package/dist/components/z-accordion.js.map +1 -1
  239. package/dist/components/z-anchor-navigation.js +1 -1
  240. package/dist/components/z-app-header-deprecated.js +1 -1
  241. package/dist/components/z-app-header.js +2 -2
  242. package/dist/components/z-app-header.js.map +1 -1
  243. package/dist/components/z-aria-alert.js +1 -1
  244. package/dist/components/z-avatar.js +2 -2
  245. package/dist/components/z-book-card-app.js +1 -1
  246. package/dist/components/z-book-card-deprecated.js +1 -1
  247. package/dist/components/z-breadcrumb.js +2 -2
  248. package/dist/components/z-button-sort.js +1 -1
  249. package/dist/components/z-color-picker.d.ts +11 -0
  250. package/dist/components/z-color-picker.js +234 -0
  251. package/dist/components/z-color-picker.js.map +1 -0
  252. package/dist/components/z-date-picker.js +1 -1
  253. package/dist/components/z-file.js +1 -1
  254. package/dist/components/z-menu-deprecated.js +1 -1
  255. package/dist/components/z-menu-section-deprecated.js +1 -1
  256. package/dist/components/z-menu-section.js +1 -1
  257. package/dist/components/z-menu.js +1 -1
  258. package/dist/components/z-menu.js.map +1 -1
  259. package/dist/components/z-myz-card-alert.js +1 -1
  260. package/dist/components/z-myz-card-dictionary.js +1 -1
  261. package/dist/components/z-myz-card-footer-sections.js +1 -1
  262. package/dist/components/z-myz-card-footer.js +1 -1
  263. package/dist/components/z-myz-card-icon.js +1 -1
  264. package/dist/components/z-myz-card-info.js +1 -1
  265. package/dist/components/z-myz-card-list.js +1 -1
  266. package/dist/components/z-myz-list.js +1 -1
  267. package/dist/components/z-notification.js +1 -1
  268. package/dist/components/z-notification.js.map +1 -1
  269. package/dist/components/z-otp.js +2 -2
  270. package/dist/components/z-range-picker.js +3 -3
  271. package/dist/components/z-section-title.js +1 -1
  272. package/dist/components/z-table.js +1 -1
  273. package/dist/components/z-tbody.js +1 -1
  274. package/dist/components/z-td.js +1 -1
  275. package/dist/components/z-tfoot.js +1 -1
  276. package/dist/components/z-th.js +1 -1
  277. package/dist/components/z-thead.js +1 -1
  278. package/dist/components/z-toast-notification-list.js +1 -1
  279. package/dist/components/z-toast-notification.js +44 -46
  280. package/dist/components/z-toast-notification.js.map +1 -1
  281. package/dist/components/z-toggle-button.js +2 -2
  282. package/dist/components/z-toggle-switch.js +3 -3
  283. package/dist/components/z-tool.js +165 -49
  284. package/dist/components/z-tool.js.map +1 -1
  285. package/dist/components/z-toolbar.js +65 -68
  286. package/dist/components/z-toolbar.js.map +1 -1
  287. package/dist/components/z-tooltip.js +1 -50
  288. package/dist/components/z-tooltip.js.map +1 -1
  289. package/dist/components/z-tr.js +1 -1
  290. package/dist/components/z-tree-list.js +1 -1
  291. package/dist/components/z-visually-hidden.js +1 -1
  292. package/dist/esm/iconset-d7823b13.js +1013 -0
  293. package/dist/esm/iconset-d7823b13.js.map +1 -0
  294. package/dist/esm/{index-0ea3c7c8.js → index-09bfb4ee.js} +2 -2
  295. package/dist/esm/{index-0ea3c7c8.js.map → index-09bfb4ee.js.map} +1 -1
  296. package/dist/esm/{index-2a6324f8.js → index-106473a8.js} +50 -2
  297. package/dist/esm/index-106473a8.js.map +1 -0
  298. package/dist/esm/{index-36122d8f.js → index-3856a6ca.js} +2 -2
  299. package/dist/esm/{index-36122d8f.js.map → index-3856a6ca.js.map} +1 -1
  300. package/dist/esm/{index-0bcacbd3.js → index-455c0a68.js} +2 -2
  301. package/dist/esm/{index-0bcacbd3.js.map → index-455c0a68.js.map} +1 -1
  302. package/dist/esm/{index-b64ced16.js → index-6c43bc70.js} +3 -3
  303. package/dist/esm/{index-b64ced16.js.map → index-6c43bc70.js.map} +1 -1
  304. package/dist/esm/{index-8a9f6d27.js → index-83248f5c.js} +5 -5
  305. package/dist/esm/{index-8a9f6d27.js.map → index-83248f5c.js.map} +1 -1
  306. package/dist/esm/index-c8ceadeb.js +8 -4
  307. package/dist/esm/{index-f20179ad.js → index-f8517155.js} +3 -3
  308. package/dist/esm/{index-f20179ad.js.map → index-f8517155.js.map} +1 -1
  309. package/dist/esm/index.js +3 -2
  310. package/dist/esm/index.js.map +1 -1
  311. package/dist/esm/loader.js +1 -1
  312. package/dist/esm/{utils-e66d94c3.js → utils-1b64bcd9.js} +35 -6
  313. package/dist/esm/utils-1b64bcd9.js.map +1 -0
  314. package/dist/esm/{utils-227ef1c0.js → utils-93ac0e6c.js} +2 -2
  315. package/dist/esm/{utils-227ef1c0.js.map → utils-93ac0e6c.js.map} +1 -1
  316. package/dist/esm/web-components-library.js +1 -1
  317. package/dist/esm/z-accordion.entry.js +13 -4
  318. package/dist/esm/z-accordion.entry.js.map +1 -1
  319. package/dist/esm/z-alert.entry.js +1 -1
  320. package/dist/esm/z-anchor-navigation.entry.js +2 -2
  321. package/dist/esm/z-app-header-deprecated.entry.js +2 -2
  322. package/dist/esm/z-app-header_12.entry.js +105 -1024
  323. package/dist/esm/z-app-header_12.entry.js.map +1 -1
  324. package/dist/esm/z-aria-alert.entry.js +2 -2
  325. package/dist/esm/z-avatar.entry.js +3 -3
  326. package/dist/esm/z-book-card-app.entry.js +2 -2
  327. package/dist/esm/z-book-card-deprecated.entry.js +3 -3
  328. package/dist/esm/z-book-card.entry.js +1 -1
  329. package/dist/esm/z-book-cover.entry.js +1 -1
  330. package/dist/esm/z-breadcrumb.entry.js +4 -4
  331. package/dist/esm/z-button-sort.entry.js +1 -1
  332. package/dist/esm/z-card.entry.js +1 -1
  333. package/dist/esm/z-carousel.entry.js +1 -1
  334. package/dist/esm/z-chip.entry.js +3 -3
  335. package/dist/esm/z-color-picker.entry.js +208 -0
  336. package/dist/esm/z-color-picker.entry.js.map +1 -0
  337. package/dist/esm/z-combobox.entry.js +2 -2
  338. package/dist/esm/z-cover-hero.entry.js +1 -1
  339. package/dist/esm/z-date-picker.entry.js +3 -3
  340. package/dist/esm/z-dragdrop-area_2.entry.js +3 -3
  341. package/dist/esm/z-file-upload.entry.js +1 -1
  342. package/dist/esm/z-file.entry.js +2 -2
  343. package/dist/esm/z-ghost-loading.entry.js +1 -1
  344. package/dist/esm/z-info-reveal.entry.js +1 -1
  345. package/dist/esm/z-menu-deprecated.entry.js +1 -1
  346. package/dist/esm/z-menu-section-deprecated.entry.js +1 -1
  347. package/dist/esm/z-menu-section.entry.js +2 -2
  348. package/dist/esm/z-menu.entry.js +2 -2
  349. package/dist/esm/z-menu.entry.js.map +1 -1
  350. package/dist/esm/z-myz-card-alert.entry.js +2 -2
  351. package/dist/esm/z-myz-card-dictionary.entry.js +2 -2
  352. package/dist/esm/z-myz-card-footer-sections.entry.js +1 -1
  353. package/dist/esm/z-myz-card-footer.entry.js +2 -2
  354. package/dist/esm/z-myz-card-icon.entry.js +1 -1
  355. package/dist/esm/z-myz-card-info.entry.js +3 -3
  356. package/dist/esm/z-myz-card-list.entry.js +1 -1
  357. package/dist/esm/z-myz-card_4.entry.js +5 -5
  358. package/dist/esm/z-myz-list-item.entry.js +3 -3
  359. package/dist/esm/z-myz-list.entry.js +1 -1
  360. package/dist/esm/z-navigation-tabs.entry.js +1 -1
  361. package/dist/esm/z-notification.entry.js +1 -1
  362. package/dist/esm/z-notification.entry.js.map +1 -1
  363. package/dist/esm/z-otp.entry.js +3 -3
  364. package/dist/esm/z-pagination.entry.js +1 -1
  365. package/dist/esm/z-popover.entry.js +20 -16
  366. package/dist/esm/z-popover.entry.js.map +1 -1
  367. package/dist/esm/z-range-picker.entry.js +5 -5
  368. package/dist/esm/z-section-title.entry.js +2 -2
  369. package/dist/esm/z-select.entry.js +2 -2
  370. package/dist/esm/z-skip-to-content.entry.js +2 -2
  371. package/dist/esm/z-slideshow.entry.js +2 -2
  372. package/dist/esm/z-table.entry.js +9 -9
  373. package/dist/esm/z-tbody.entry.js +1 -1
  374. package/dist/esm/z-td.entry.js +2 -2
  375. package/dist/esm/z-tfoot.entry.js +1 -1
  376. package/dist/esm/z-th.entry.js +2 -2
  377. package/dist/esm/z-thead.entry.js +1 -1
  378. package/dist/esm/z-toast-notification-list.entry.js +2 -2
  379. package/dist/esm/z-toast-notification.entry.js +43 -46
  380. package/dist/esm/z-toast-notification.entry.js.map +1 -1
  381. package/dist/esm/z-toggle-button.entry.js +2 -2
  382. package/dist/esm/z-toggle-switch.entry.js +5 -5
  383. package/dist/esm/z-tool.entry.js +147 -42
  384. package/dist/esm/z-tool.entry.js.map +1 -1
  385. package/dist/esm/z-toolbar.entry.js +64 -66
  386. package/dist/esm/z-toolbar.entry.js.map +1 -1
  387. package/dist/esm/z-tooltip.entry.js +4 -3
  388. package/dist/esm/z-tooltip.entry.js.map +1 -1
  389. package/dist/esm/z-tr.entry.js +5 -5
  390. package/dist/esm/z-tree-list.entry.js +2 -2
  391. package/dist/esm/z-visually-hidden.entry.js +1 -1
  392. package/dist/types/beans/index.d.ts +184 -0
  393. package/dist/types/components/z-accordion/index.d.ts +5 -0
  394. package/dist/types/components/z-accordion/index.stories.d.ts +4 -4
  395. package/dist/types/components/z-app-header/index.stories.d.ts +16 -0
  396. package/dist/types/components/z-color-picker/index.d.ts +64 -0
  397. package/dist/types/components/z-color-picker/index.stories.d.ts +33 -0
  398. package/dist/types/components/z-icon/index.d.ts +21 -6
  399. package/dist/types/components/z-icon/index.stories.d.ts +23 -10
  400. package/dist/types/components/z-offcanvas/index.d.ts +24 -0
  401. package/dist/types/components/z-popover/index.d.ts +9 -4
  402. package/dist/types/components/z-toast-notification/index.d.ts +8 -7
  403. package/dist/types/components/z-toast-notification/index.stories.d.ts +11 -1
  404. package/dist/types/components/z-tool/index.d.ts +73 -9
  405. package/dist/types/components/z-tool/index.stories.d.ts +38 -12
  406. package/dist/types/components/z-toolbar/index.d.ts +23 -6
  407. package/dist/types/components/z-toolbar/index.stories.d.ts +23 -20
  408. package/dist/types/components/z-tooltip/index.d.ts +8 -0
  409. package/dist/types/components.d.ts +189 -35
  410. package/dist/types/constants/iconset.d.ts +281 -141
  411. package/dist/types/index.d.ts +1 -0
  412. package/dist/types/utils/utils.d.ts +3 -2
  413. package/dist/web-components-library/index.esm.js +1 -1
  414. package/dist/web-components-library/index.esm.js.map +1 -1
  415. package/dist/web-components-library/{p-375f8542.entry.js → p-0643d684.entry.js} +2 -2
  416. package/dist/web-components-library/{p-44459393.entry.js → p-0aed3ddc.entry.js} +2 -2
  417. package/{www/build/p-b96900bb.entry.js → dist/web-components-library/p-19103e70.entry.js} +2 -2
  418. package/dist/web-components-library/p-1a0c206d.js +2 -0
  419. package/dist/web-components-library/p-1a0c206d.js.map +1 -0
  420. package/dist/web-components-library/{p-fb232d07.entry.js → p-252893a8.entry.js} +2 -2
  421. package/{www/build/p-2aeffcf9.entry.js → dist/web-components-library/p-26ed6c96.entry.js} +2 -2
  422. package/{www/build/p-99210133.entry.js → dist/web-components-library/p-2d4cf6ff.entry.js} +2 -2
  423. package/dist/web-components-library/{p-8687691b.entry.js → p-30a78a06.entry.js} +2 -2
  424. package/dist/web-components-library/p-32bc8a40.entry.js +2 -0
  425. package/dist/web-components-library/p-32bc8a40.entry.js.map +1 -0
  426. package/dist/web-components-library/p-3977b0ae.entry.js +2 -0
  427. package/dist/web-components-library/p-3ba7621b.entry.js +2 -0
  428. package/{www/build/p-8c164e0d.entry.js → dist/web-components-library/p-41891d34.entry.js} +2 -2
  429. package/dist/web-components-library/p-42abfe3b.entry.js +2 -0
  430. package/dist/web-components-library/p-4504375f.entry.js +2 -0
  431. package/{www/build/p-19f5b6a9.entry.js → dist/web-components-library/p-47813782.entry.js} +2 -2
  432. package/{www/build/p-b7b972c0.entry.js → dist/web-components-library/p-47b59f05.entry.js} +2 -2
  433. package/dist/web-components-library/p-4844c774.js +2 -0
  434. package/{www/build/p-030257b3.js.map → dist/web-components-library/p-4844c774.js.map} +1 -1
  435. package/dist/web-components-library/p-55e5e53a.entry.js +2 -0
  436. package/dist/web-components-library/p-55e5e53a.entry.js.map +1 -0
  437. package/{www/build/p-4a257653.entry.js → dist/web-components-library/p-565c1815.entry.js} +2 -2
  438. package/{www/build/p-22ba2a17.entry.js → dist/web-components-library/p-58aeaf21.entry.js} +2 -2
  439. package/dist/web-components-library/{p-1c7550f9.entry.js → p-5905cca0.entry.js} +2 -2
  440. package/dist/web-components-library/{p-cc18a2b7.entry.js → p-5e2f6ab7.entry.js} +2 -2
  441. package/dist/web-components-library/{p-0a49dd1c.entry.js → p-613987cd.entry.js} +2 -2
  442. package/{www/build/p-b63c8e8b.entry.js → dist/web-components-library/p-6164feb9.entry.js} +2 -2
  443. package/dist/web-components-library/p-623fdee4.js +2 -0
  444. package/dist/web-components-library/{p-ee695830.entry.js → p-66c0f993.entry.js} +2 -2
  445. package/dist/web-components-library/{p-f19f12b1.js → p-68d91a93.js} +2 -2
  446. package/dist/web-components-library/p-6c6a655e.entry.js +2 -0
  447. package/dist/web-components-library/{p-5a24e268.entry.js.map → p-6c6a655e.entry.js.map} +1 -1
  448. package/{www/build/p-f4bac89b.entry.js → dist/web-components-library/p-6c9cd6be.entry.js} +2 -2
  449. package/dist/web-components-library/p-6d15da6f.entry.js +2 -0
  450. package/dist/web-components-library/p-6d15da6f.entry.js.map +1 -0
  451. package/{www/build/p-e3b82454.entry.js → dist/web-components-library/p-6e13aa8e.entry.js} +2 -2
  452. package/dist/web-components-library/{p-4affbb99.entry.js → p-767b66ca.entry.js} +2 -2
  453. package/{www/build/p-34975328.entry.js → dist/web-components-library/p-76d1d0e4.entry.js} +2 -2
  454. package/dist/web-components-library/{p-e9e2ceb4.entry.js → p-771dea79.entry.js} +2 -2
  455. package/dist/web-components-library/p-7b837e11.js +2 -0
  456. package/dist/web-components-library/{p-86160fe3.entry.js → p-7d655f96.entry.js} +2 -2
  457. package/dist/web-components-library/p-82eeea83.entry.js +2 -0
  458. package/dist/web-components-library/p-862989b6.entry.js +2 -0
  459. package/dist/web-components-library/p-862989b6.entry.js.map +1 -0
  460. package/dist/web-components-library/p-86618221.js +2 -0
  461. package/dist/web-components-library/p-86618221.js.map +1 -0
  462. package/dist/web-components-library/{p-757415e9.entry.js → p-88a9865c.entry.js} +2 -2
  463. package/dist/web-components-library/{p-2f948bac.entry.js → p-8988eee3.entry.js} +2 -2
  464. package/{www/build/p-1844a4f4.entry.js → dist/web-components-library/p-8a53fefb.entry.js} +2 -2
  465. package/dist/web-components-library/{p-748fa3ae.js → p-8b367393.js} +2 -2
  466. package/dist/web-components-library/{p-4551b0df.entry.js → p-8c52635e.entry.js} +2 -2
  467. package/dist/web-components-library/{p-240de9aa.entry.js → p-8fd50cc5.entry.js} +2 -2
  468. package/{www/build/p-1fd1cf02.entry.js → dist/web-components-library/p-92f13701.entry.js} +2 -2
  469. package/{www/build/p-ceeb3e2a.entry.js → dist/web-components-library/p-93d349ee.entry.js} +2 -2
  470. package/dist/web-components-library/p-988a58dd.entry.js +2 -0
  471. package/{www/build/p-816fd6dc.entry.js → dist/web-components-library/p-9ae0c0c6.entry.js} +2 -2
  472. package/dist/web-components-library/{p-d7f12672.js → p-9c816a3b.js} +2 -2
  473. package/{www/build/p-4cec3345.entry.js → dist/web-components-library/p-a2ee659d.entry.js} +2 -2
  474. package/{www/build/p-94916bdf.entry.js → dist/web-components-library/p-a4d2cf55.entry.js} +2 -2
  475. package/dist/web-components-library/p-a5146ef3.entry.js +2 -0
  476. package/dist/web-components-library/p-a5146ef3.entry.js.map +1 -0
  477. package/dist/web-components-library/{p-04f80811.entry.js → p-a8609510.entry.js} +2 -2
  478. package/{www/build/p-817689d5.entry.js → dist/web-components-library/p-aaa96c12.entry.js} +3 -3
  479. package/dist/web-components-library/{p-e0b88075.entry.js → p-b391211f.entry.js} +2 -2
  480. package/dist/web-components-library/{p-342b0eb0.entry.js → p-b421424f.entry.js} +2 -2
  481. package/dist/web-components-library/p-b54d923e.entry.js +2 -0
  482. package/dist/web-components-library/p-b54d923e.entry.js.map +1 -0
  483. package/dist/web-components-library/{p-d9c9de15.entry.js → p-b7056859.entry.js} +2 -2
  484. package/dist/web-components-library/p-c12f93e4.entry.js +2 -0
  485. package/dist/web-components-library/p-c12f93e4.entry.js.map +1 -0
  486. package/dist/web-components-library/{p-3f5aa623.entry.js → p-c5d52872.entry.js} +2 -2
  487. package/dist/web-components-library/p-c5d52872.entry.js.map +1 -0
  488. package/dist/web-components-library/{p-5159edb1.entry.js → p-c811b0cf.entry.js} +2 -2
  489. package/dist/web-components-library/p-c89e1f4b.entry.js +2 -0
  490. package/dist/web-components-library/p-c89e1f4b.entry.js.map +1 -0
  491. package/dist/web-components-library/{p-2bdac94e.entry.js → p-c9b81cab.entry.js} +2 -2
  492. package/dist/web-components-library/{p-30e42fb1.js → p-cb395500.js} +2 -2
  493. package/dist/web-components-library/{p-5a1f98a2.entry.js → p-cbc09112.entry.js} +2 -2
  494. package/dist/web-components-library/p-da3abb97.entry.js +2 -0
  495. package/dist/web-components-library/{p-2612e3a2.entry.js → p-daa442e6.entry.js} +2 -2
  496. package/dist/web-components-library/{p-c778bf87.entry.js → p-e8eacbeb.entry.js} +4 -4
  497. package/dist/web-components-library/p-e8eacbeb.entry.js.map +1 -0
  498. package/dist/web-components-library/p-eb15536d.js +2 -0
  499. package/dist/web-components-library/p-eb15536d.js.map +1 -0
  500. package/dist/web-components-library/p-efa6b991.entry.js +2 -0
  501. package/dist/web-components-library/{p-01f941c2.entry.js → p-f4b987ed.entry.js} +2 -2
  502. package/dist/web-components-library/{p-bdbcf353.entry.js → p-f662e7ff.entry.js} +2 -2
  503. package/dist/web-components-library/p-f92e0c29.entry.js +2 -0
  504. package/dist/web-components-library/{p-a905df88.entry.js → p-ff89d630.entry.js} +2 -2
  505. package/dist/web-components-library/web-components-library.css +23 -25
  506. package/dist/web-components-library/web-components-library.esm.js +1 -1
  507. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  508. package/package.json +3 -3
  509. package/react/components.d.ts +1 -0
  510. package/react/components.js +3 -2
  511. package/react/components.js.map +1 -1
  512. package/www/build/index.esm.js +1 -1
  513. package/www/build/index.esm.js.map +1 -1
  514. package/www/build/{p-375f8542.entry.js → p-0643d684.entry.js} +2 -2
  515. package/www/build/{p-44459393.entry.js → p-0aed3ddc.entry.js} +2 -2
  516. package/www/build/p-156f9df4.js +2 -0
  517. package/{dist/web-components-library/p-b96900bb.entry.js → www/build/p-19103e70.entry.js} +2 -2
  518. package/www/build/p-1a0c206d.js +2 -0
  519. package/www/build/p-1a0c206d.js.map +1 -0
  520. package/www/build/{p-fb232d07.entry.js → p-252893a8.entry.js} +2 -2
  521. package/{dist/web-components-library/p-2aeffcf9.entry.js → www/build/p-26ed6c96.entry.js} +2 -2
  522. package/{dist/web-components-library/p-99210133.entry.js → www/build/p-2d4cf6ff.entry.js} +2 -2
  523. package/www/build/{p-8687691b.entry.js → p-30a78a06.entry.js} +2 -2
  524. package/www/build/p-32bc8a40.entry.js +2 -0
  525. package/www/build/p-32bc8a40.entry.js.map +1 -0
  526. package/www/build/p-3977b0ae.entry.js +2 -0
  527. package/www/build/p-3ba7621b.entry.js +2 -0
  528. package/{dist/web-components-library/p-8c164e0d.entry.js → www/build/p-41891d34.entry.js} +2 -2
  529. package/www/build/p-42abfe3b.entry.js +2 -0
  530. package/www/build/p-4504375f.entry.js +2 -0
  531. package/{dist/web-components-library/p-19f5b6a9.entry.js → www/build/p-47813782.entry.js} +2 -2
  532. package/{dist/web-components-library/p-b7b972c0.entry.js → www/build/p-47b59f05.entry.js} +2 -2
  533. package/www/build/p-4844c774.js +2 -0
  534. package/{dist/web-components-library/p-030257b3.js.map → www/build/p-4844c774.js.map} +1 -1
  535. package/www/build/p-55e5e53a.entry.js +2 -0
  536. package/www/build/p-55e5e53a.entry.js.map +1 -0
  537. package/{dist/web-components-library/p-4a257653.entry.js → www/build/p-565c1815.entry.js} +2 -2
  538. package/{dist/web-components-library/p-22ba2a17.entry.js → www/build/p-58aeaf21.entry.js} +2 -2
  539. package/www/build/{p-1c7550f9.entry.js → p-5905cca0.entry.js} +2 -2
  540. package/www/build/{p-cc18a2b7.entry.js → p-5e2f6ab7.entry.js} +2 -2
  541. package/www/build/{p-0a49dd1c.entry.js → p-613987cd.entry.js} +2 -2
  542. package/{dist/web-components-library/p-b63c8e8b.entry.js → www/build/p-6164feb9.entry.js} +2 -2
  543. package/www/build/p-623fdee4.js +2 -0
  544. package/www/build/{p-ee695830.entry.js → p-66c0f993.entry.js} +2 -2
  545. package/www/build/{p-f19f12b1.js → p-68d91a93.js} +2 -2
  546. package/www/build/p-6c6a655e.entry.js +2 -0
  547. package/www/build/{p-5a24e268.entry.js.map → p-6c6a655e.entry.js.map} +1 -1
  548. package/{dist/web-components-library/p-f4bac89b.entry.js → www/build/p-6c9cd6be.entry.js} +2 -2
  549. package/www/build/p-6d15da6f.entry.js +2 -0
  550. package/www/build/p-6d15da6f.entry.js.map +1 -0
  551. package/{dist/web-components-library/p-e3b82454.entry.js → www/build/p-6e13aa8e.entry.js} +2 -2
  552. package/www/build/{p-4affbb99.entry.js → p-767b66ca.entry.js} +2 -2
  553. package/{dist/web-components-library/p-34975328.entry.js → www/build/p-76d1d0e4.entry.js} +2 -2
  554. package/www/build/{p-e9e2ceb4.entry.js → p-771dea79.entry.js} +2 -2
  555. package/www/build/p-7b837e11.js +2 -0
  556. package/www/build/{p-86160fe3.entry.js → p-7d655f96.entry.js} +2 -2
  557. package/www/build/{p-b5b5dae5.css → p-813bd63b.css} +23 -25
  558. package/www/build/p-82eeea83.entry.js +2 -0
  559. package/www/build/p-862989b6.entry.js +2 -0
  560. package/www/build/p-862989b6.entry.js.map +1 -0
  561. package/www/build/p-86618221.js +2 -0
  562. package/www/build/p-86618221.js.map +1 -0
  563. package/www/build/{p-757415e9.entry.js → p-88a9865c.entry.js} +2 -2
  564. package/www/build/{p-2f948bac.entry.js → p-8988eee3.entry.js} +2 -2
  565. package/{dist/web-components-library/p-1844a4f4.entry.js → www/build/p-8a53fefb.entry.js} +2 -2
  566. package/www/build/{p-748fa3ae.js → p-8b367393.js} +2 -2
  567. package/www/build/{p-4551b0df.entry.js → p-8c52635e.entry.js} +2 -2
  568. package/www/build/{p-240de9aa.entry.js → p-8fd50cc5.entry.js} +2 -2
  569. package/{dist/web-components-library/p-1fd1cf02.entry.js → www/build/p-92f13701.entry.js} +2 -2
  570. package/{dist/web-components-library/p-ceeb3e2a.entry.js → www/build/p-93d349ee.entry.js} +2 -2
  571. package/www/build/p-988a58dd.entry.js +2 -0
  572. package/{dist/web-components-library/p-816fd6dc.entry.js → www/build/p-9ae0c0c6.entry.js} +2 -2
  573. package/www/build/{p-d7f12672.js → p-9c816a3b.js} +2 -2
  574. package/{dist/web-components-library/p-4cec3345.entry.js → www/build/p-a2ee659d.entry.js} +2 -2
  575. package/{dist/web-components-library/p-94916bdf.entry.js → www/build/p-a4d2cf55.entry.js} +2 -2
  576. package/www/build/p-a5146ef3.entry.js +2 -0
  577. package/www/build/p-a5146ef3.entry.js.map +1 -0
  578. package/www/build/{p-04f80811.entry.js → p-a8609510.entry.js} +2 -2
  579. package/{dist/web-components-library/p-817689d5.entry.js → www/build/p-aaa96c12.entry.js} +3 -3
  580. package/www/build/{p-e0b88075.entry.js → p-b391211f.entry.js} +2 -2
  581. package/www/build/{p-342b0eb0.entry.js → p-b421424f.entry.js} +2 -2
  582. package/www/build/p-b54d923e.entry.js +2 -0
  583. package/www/build/p-b54d923e.entry.js.map +1 -0
  584. package/www/build/{p-d9c9de15.entry.js → p-b7056859.entry.js} +2 -2
  585. package/www/build/p-c12f93e4.entry.js +2 -0
  586. package/www/build/p-c12f93e4.entry.js.map +1 -0
  587. package/www/build/{p-3f5aa623.entry.js → p-c5d52872.entry.js} +2 -2
  588. package/www/build/p-c5d52872.entry.js.map +1 -0
  589. package/www/build/{p-5159edb1.entry.js → p-c811b0cf.entry.js} +2 -2
  590. package/www/build/p-c89e1f4b.entry.js +2 -0
  591. package/www/build/p-c89e1f4b.entry.js.map +1 -0
  592. package/www/build/{p-2bdac94e.entry.js → p-c9b81cab.entry.js} +2 -2
  593. package/www/build/{p-30e42fb1.js → p-cb395500.js} +2 -2
  594. package/www/build/{p-5a1f98a2.entry.js → p-cbc09112.entry.js} +2 -2
  595. package/www/build/p-da3abb97.entry.js +2 -0
  596. package/www/build/{p-2612e3a2.entry.js → p-daa442e6.entry.js} +2 -2
  597. package/www/build/{p-c778bf87.entry.js → p-e8eacbeb.entry.js} +4 -4
  598. package/www/build/p-e8eacbeb.entry.js.map +1 -0
  599. package/www/build/p-eb15536d.js +2 -0
  600. package/www/build/p-eb15536d.js.map +1 -0
  601. package/www/build/p-efa6b991.entry.js +2 -0
  602. package/www/build/{p-01f941c2.entry.js → p-f4b987ed.entry.js} +2 -2
  603. package/www/build/{p-bdbcf353.entry.js → p-f662e7ff.entry.js} +2 -2
  604. package/www/build/p-f92e0c29.entry.js +2 -0
  605. package/www/build/{p-a905df88.entry.js → p-ff89d630.entry.js} +2 -2
  606. package/www/build/web-components-library.css +23 -25
  607. package/www/build/web-components-library.esm.js +1 -1
  608. package/www/build/web-components-library.esm.js.map +1 -1
  609. package/www/index.html +1 -1
  610. package/dist/cjs/index-97a4c18d.js.map +0 -1
  611. package/dist/cjs/utils-5148245a.js.map +0 -1
  612. package/dist/esm/index-2a6324f8.js.map +0 -1
  613. package/dist/esm/utils-e66d94c3.js.map +0 -1
  614. package/dist/web-components-library/p-030257b3.js +0 -2
  615. package/dist/web-components-library/p-1170826b.js +0 -2
  616. package/dist/web-components-library/p-17af7fb2.js +0 -2
  617. package/dist/web-components-library/p-17af7fb2.js.map +0 -1
  618. package/dist/web-components-library/p-17e1abca.entry.js +0 -2
  619. package/dist/web-components-library/p-17e1abca.entry.js.map +0 -1
  620. package/dist/web-components-library/p-198b1692.entry.js +0 -2
  621. package/dist/web-components-library/p-22128478.entry.js +0 -2
  622. package/dist/web-components-library/p-22128478.entry.js.map +0 -1
  623. package/dist/web-components-library/p-237fcaa9.entry.js +0 -2
  624. package/dist/web-components-library/p-334cba5d.entry.js +0 -2
  625. package/dist/web-components-library/p-334cba5d.entry.js.map +0 -1
  626. package/dist/web-components-library/p-3f5aa623.entry.js.map +0 -1
  627. package/dist/web-components-library/p-4c9bf42d.js +0 -2
  628. package/dist/web-components-library/p-5a24e268.entry.js +0 -2
  629. package/dist/web-components-library/p-60e3fa30.entry.js +0 -2
  630. package/dist/web-components-library/p-6cffbabc.entry.js +0 -2
  631. package/dist/web-components-library/p-6cffbabc.entry.js.map +0 -1
  632. package/dist/web-components-library/p-9e3da0b7.entry.js +0 -2
  633. package/dist/web-components-library/p-bc7fd8af.entry.js +0 -2
  634. package/dist/web-components-library/p-bc7fd8af.entry.js.map +0 -1
  635. package/dist/web-components-library/p-c778bf87.entry.js.map +0 -1
  636. package/dist/web-components-library/p-d2035d26.entry.js +0 -2
  637. package/dist/web-components-library/p-d6a7b7f3.entry.js +0 -2
  638. package/dist/web-components-library/p-d6a7b7f3.entry.js.map +0 -1
  639. package/dist/web-components-library/p-d75f8bbb.entry.js +0 -2
  640. package/dist/web-components-library/p-d90d2698.entry.js +0 -2
  641. package/dist/web-components-library/p-deb7f8d7.entry.js +0 -2
  642. package/dist/web-components-library/p-e5407cc1.entry.js +0 -2
  643. package/dist/web-components-library/p-e6778114.js +0 -2
  644. package/dist/web-components-library/p-e6778114.js.map +0 -1
  645. package/dist/web-components-library/p-f5dfd04d.entry.js +0 -2
  646. package/dist/web-components-library/p-f5dfd04d.entry.js.map +0 -1
  647. package/www/build/p-030257b3.js +0 -2
  648. package/www/build/p-0aba9c42.js +0 -2
  649. package/www/build/p-1170826b.js +0 -2
  650. package/www/build/p-17af7fb2.js +0 -2
  651. package/www/build/p-17af7fb2.js.map +0 -1
  652. package/www/build/p-17e1abca.entry.js +0 -2
  653. package/www/build/p-17e1abca.entry.js.map +0 -1
  654. package/www/build/p-198b1692.entry.js +0 -2
  655. package/www/build/p-22128478.entry.js +0 -2
  656. package/www/build/p-22128478.entry.js.map +0 -1
  657. package/www/build/p-237fcaa9.entry.js +0 -2
  658. package/www/build/p-334cba5d.entry.js +0 -2
  659. package/www/build/p-334cba5d.entry.js.map +0 -1
  660. package/www/build/p-3f5aa623.entry.js.map +0 -1
  661. package/www/build/p-4c9bf42d.js +0 -2
  662. package/www/build/p-5a24e268.entry.js +0 -2
  663. package/www/build/p-60e3fa30.entry.js +0 -2
  664. package/www/build/p-6cffbabc.entry.js +0 -2
  665. package/www/build/p-6cffbabc.entry.js.map +0 -1
  666. package/www/build/p-9e3da0b7.entry.js +0 -2
  667. package/www/build/p-bc7fd8af.entry.js +0 -2
  668. package/www/build/p-bc7fd8af.entry.js.map +0 -1
  669. package/www/build/p-c778bf87.entry.js.map +0 -1
  670. package/www/build/p-d2035d26.entry.js +0 -2
  671. package/www/build/p-d6a7b7f3.entry.js +0 -2
  672. package/www/build/p-d6a7b7f3.entry.js.map +0 -1
  673. package/www/build/p-d75f8bbb.entry.js +0 -2
  674. package/www/build/p-d90d2698.entry.js +0 -2
  675. package/www/build/p-deb7f8d7.entry.js +0 -2
  676. package/www/build/p-e5407cc1.entry.js +0 -2
  677. package/www/build/p-e6778114.js +0 -2
  678. package/www/build/p-e6778114.js.map +0 -1
  679. package/www/build/p-f5dfd04d.entry.js +0 -2
  680. package/www/build/p-f5dfd04d.entry.js.map +0 -1
  681. /package/dist/web-components-library/{p-375f8542.entry.js.map → p-0643d684.entry.js.map} +0 -0
  682. /package/dist/web-components-library/{p-44459393.entry.js.map → p-0aed3ddc.entry.js.map} +0 -0
  683. /package/dist/web-components-library/{p-b96900bb.entry.js.map → p-19103e70.entry.js.map} +0 -0
  684. /package/dist/web-components-library/{p-fb232d07.entry.js.map → p-252893a8.entry.js.map} +0 -0
  685. /package/dist/web-components-library/{p-2aeffcf9.entry.js.map → p-26ed6c96.entry.js.map} +0 -0
  686. /package/dist/web-components-library/{p-99210133.entry.js.map → p-2d4cf6ff.entry.js.map} +0 -0
  687. /package/dist/web-components-library/{p-8687691b.entry.js.map → p-30a78a06.entry.js.map} +0 -0
  688. /package/dist/web-components-library/{p-237fcaa9.entry.js.map → p-3977b0ae.entry.js.map} +0 -0
  689. /package/dist/web-components-library/{p-9e3da0b7.entry.js.map → p-3ba7621b.entry.js.map} +0 -0
  690. /package/dist/web-components-library/{p-8c164e0d.entry.js.map → p-41891d34.entry.js.map} +0 -0
  691. /package/dist/web-components-library/{p-d2035d26.entry.js.map → p-42abfe3b.entry.js.map} +0 -0
  692. /package/dist/web-components-library/{p-60e3fa30.entry.js.map → p-4504375f.entry.js.map} +0 -0
  693. /package/dist/web-components-library/{p-19f5b6a9.entry.js.map → p-47813782.entry.js.map} +0 -0
  694. /package/dist/web-components-library/{p-b7b972c0.entry.js.map → p-47b59f05.entry.js.map} +0 -0
  695. /package/dist/web-components-library/{p-4a257653.entry.js.map → p-565c1815.entry.js.map} +0 -0
  696. /package/dist/web-components-library/{p-22ba2a17.entry.js.map → p-58aeaf21.entry.js.map} +0 -0
  697. /package/dist/web-components-library/{p-1c7550f9.entry.js.map → p-5905cca0.entry.js.map} +0 -0
  698. /package/dist/web-components-library/{p-cc18a2b7.entry.js.map → p-5e2f6ab7.entry.js.map} +0 -0
  699. /package/dist/web-components-library/{p-0a49dd1c.entry.js.map → p-613987cd.entry.js.map} +0 -0
  700. /package/dist/web-components-library/{p-b63c8e8b.entry.js.map → p-6164feb9.entry.js.map} +0 -0
  701. /package/dist/web-components-library/{p-1170826b.js.map → p-623fdee4.js.map} +0 -0
  702. /package/dist/web-components-library/{p-ee695830.entry.js.map → p-66c0f993.entry.js.map} +0 -0
  703. /package/dist/web-components-library/{p-f19f12b1.js.map → p-68d91a93.js.map} +0 -0
  704. /package/dist/web-components-library/{p-f4bac89b.entry.js.map → p-6c9cd6be.entry.js.map} +0 -0
  705. /package/dist/web-components-library/{p-e3b82454.entry.js.map → p-6e13aa8e.entry.js.map} +0 -0
  706. /package/dist/web-components-library/{p-4affbb99.entry.js.map → p-767b66ca.entry.js.map} +0 -0
  707. /package/dist/web-components-library/{p-34975328.entry.js.map → p-76d1d0e4.entry.js.map} +0 -0
  708. /package/dist/web-components-library/{p-e9e2ceb4.entry.js.map → p-771dea79.entry.js.map} +0 -0
  709. /package/dist/web-components-library/{p-4c9bf42d.js.map → p-7b837e11.js.map} +0 -0
  710. /package/dist/web-components-library/{p-86160fe3.entry.js.map → p-7d655f96.entry.js.map} +0 -0
  711. /package/dist/web-components-library/{p-d75f8bbb.entry.js.map → p-82eeea83.entry.js.map} +0 -0
  712. /package/dist/web-components-library/{p-757415e9.entry.js.map → p-88a9865c.entry.js.map} +0 -0
  713. /package/dist/web-components-library/{p-2f948bac.entry.js.map → p-8988eee3.entry.js.map} +0 -0
  714. /package/dist/web-components-library/{p-1844a4f4.entry.js.map → p-8a53fefb.entry.js.map} +0 -0
  715. /package/dist/web-components-library/{p-748fa3ae.js.map → p-8b367393.js.map} +0 -0
  716. /package/dist/web-components-library/{p-4551b0df.entry.js.map → p-8c52635e.entry.js.map} +0 -0
  717. /package/dist/web-components-library/{p-240de9aa.entry.js.map → p-8fd50cc5.entry.js.map} +0 -0
  718. /package/dist/web-components-library/{p-1fd1cf02.entry.js.map → p-92f13701.entry.js.map} +0 -0
  719. /package/dist/web-components-library/{p-ceeb3e2a.entry.js.map → p-93d349ee.entry.js.map} +0 -0
  720. /package/dist/web-components-library/{p-d90d2698.entry.js.map → p-988a58dd.entry.js.map} +0 -0
  721. /package/dist/web-components-library/{p-816fd6dc.entry.js.map → p-9ae0c0c6.entry.js.map} +0 -0
  722. /package/dist/web-components-library/{p-d7f12672.js.map → p-9c816a3b.js.map} +0 -0
  723. /package/dist/web-components-library/{p-4cec3345.entry.js.map → p-a2ee659d.entry.js.map} +0 -0
  724. /package/dist/web-components-library/{p-94916bdf.entry.js.map → p-a4d2cf55.entry.js.map} +0 -0
  725. /package/dist/web-components-library/{p-04f80811.entry.js.map → p-a8609510.entry.js.map} +0 -0
  726. /package/dist/web-components-library/{p-817689d5.entry.js.map → p-aaa96c12.entry.js.map} +0 -0
  727. /package/dist/web-components-library/{p-e0b88075.entry.js.map → p-b391211f.entry.js.map} +0 -0
  728. /package/dist/web-components-library/{p-342b0eb0.entry.js.map → p-b421424f.entry.js.map} +0 -0
  729. /package/dist/web-components-library/{p-d9c9de15.entry.js.map → p-b7056859.entry.js.map} +0 -0
  730. /package/dist/web-components-library/{p-5159edb1.entry.js.map → p-c811b0cf.entry.js.map} +0 -0
  731. /package/dist/web-components-library/{p-2bdac94e.entry.js.map → p-c9b81cab.entry.js.map} +0 -0
  732. /package/dist/web-components-library/{p-30e42fb1.js.map → p-cb395500.js.map} +0 -0
  733. /package/dist/web-components-library/{p-5a1f98a2.entry.js.map → p-cbc09112.entry.js.map} +0 -0
  734. /package/dist/web-components-library/{p-deb7f8d7.entry.js.map → p-da3abb97.entry.js.map} +0 -0
  735. /package/dist/web-components-library/{p-2612e3a2.entry.js.map → p-daa442e6.entry.js.map} +0 -0
  736. /package/dist/web-components-library/{p-e5407cc1.entry.js.map → p-efa6b991.entry.js.map} +0 -0
  737. /package/dist/web-components-library/{p-01f941c2.entry.js.map → p-f4b987ed.entry.js.map} +0 -0
  738. /package/dist/web-components-library/{p-bdbcf353.entry.js.map → p-f662e7ff.entry.js.map} +0 -0
  739. /package/dist/web-components-library/{p-198b1692.entry.js.map → p-f92e0c29.entry.js.map} +0 -0
  740. /package/dist/web-components-library/{p-a905df88.entry.js.map → p-ff89d630.entry.js.map} +0 -0
  741. /package/www/build/{p-375f8542.entry.js.map → p-0643d684.entry.js.map} +0 -0
  742. /package/www/build/{p-44459393.entry.js.map → p-0aed3ddc.entry.js.map} +0 -0
  743. /package/www/build/{p-b96900bb.entry.js.map → p-19103e70.entry.js.map} +0 -0
  744. /package/www/build/{p-fb232d07.entry.js.map → p-252893a8.entry.js.map} +0 -0
  745. /package/www/build/{p-2aeffcf9.entry.js.map → p-26ed6c96.entry.js.map} +0 -0
  746. /package/www/build/{p-99210133.entry.js.map → p-2d4cf6ff.entry.js.map} +0 -0
  747. /package/www/build/{p-8687691b.entry.js.map → p-30a78a06.entry.js.map} +0 -0
  748. /package/www/build/{p-237fcaa9.entry.js.map → p-3977b0ae.entry.js.map} +0 -0
  749. /package/www/build/{p-9e3da0b7.entry.js.map → p-3ba7621b.entry.js.map} +0 -0
  750. /package/www/build/{p-8c164e0d.entry.js.map → p-41891d34.entry.js.map} +0 -0
  751. /package/www/build/{p-d2035d26.entry.js.map → p-42abfe3b.entry.js.map} +0 -0
  752. /package/www/build/{p-60e3fa30.entry.js.map → p-4504375f.entry.js.map} +0 -0
  753. /package/www/build/{p-19f5b6a9.entry.js.map → p-47813782.entry.js.map} +0 -0
  754. /package/www/build/{p-b7b972c0.entry.js.map → p-47b59f05.entry.js.map} +0 -0
  755. /package/www/build/{p-4a257653.entry.js.map → p-565c1815.entry.js.map} +0 -0
  756. /package/www/build/{p-22ba2a17.entry.js.map → p-58aeaf21.entry.js.map} +0 -0
  757. /package/www/build/{p-1c7550f9.entry.js.map → p-5905cca0.entry.js.map} +0 -0
  758. /package/www/build/{p-cc18a2b7.entry.js.map → p-5e2f6ab7.entry.js.map} +0 -0
  759. /package/www/build/{p-0a49dd1c.entry.js.map → p-613987cd.entry.js.map} +0 -0
  760. /package/www/build/{p-b63c8e8b.entry.js.map → p-6164feb9.entry.js.map} +0 -0
  761. /package/www/build/{p-1170826b.js.map → p-623fdee4.js.map} +0 -0
  762. /package/www/build/{p-ee695830.entry.js.map → p-66c0f993.entry.js.map} +0 -0
  763. /package/www/build/{p-f19f12b1.js.map → p-68d91a93.js.map} +0 -0
  764. /package/www/build/{p-f4bac89b.entry.js.map → p-6c9cd6be.entry.js.map} +0 -0
  765. /package/www/build/{p-e3b82454.entry.js.map → p-6e13aa8e.entry.js.map} +0 -0
  766. /package/www/build/{p-4affbb99.entry.js.map → p-767b66ca.entry.js.map} +0 -0
  767. /package/www/build/{p-34975328.entry.js.map → p-76d1d0e4.entry.js.map} +0 -0
  768. /package/www/build/{p-e9e2ceb4.entry.js.map → p-771dea79.entry.js.map} +0 -0
  769. /package/www/build/{p-4c9bf42d.js.map → p-7b837e11.js.map} +0 -0
  770. /package/www/build/{p-86160fe3.entry.js.map → p-7d655f96.entry.js.map} +0 -0
  771. /package/www/build/{p-d75f8bbb.entry.js.map → p-82eeea83.entry.js.map} +0 -0
  772. /package/www/build/{p-757415e9.entry.js.map → p-88a9865c.entry.js.map} +0 -0
  773. /package/www/build/{p-2f948bac.entry.js.map → p-8988eee3.entry.js.map} +0 -0
  774. /package/www/build/{p-1844a4f4.entry.js.map → p-8a53fefb.entry.js.map} +0 -0
  775. /package/www/build/{p-748fa3ae.js.map → p-8b367393.js.map} +0 -0
  776. /package/www/build/{p-4551b0df.entry.js.map → p-8c52635e.entry.js.map} +0 -0
  777. /package/www/build/{p-240de9aa.entry.js.map → p-8fd50cc5.entry.js.map} +0 -0
  778. /package/www/build/{p-1fd1cf02.entry.js.map → p-92f13701.entry.js.map} +0 -0
  779. /package/www/build/{p-ceeb3e2a.entry.js.map → p-93d349ee.entry.js.map} +0 -0
  780. /package/www/build/{p-d90d2698.entry.js.map → p-988a58dd.entry.js.map} +0 -0
  781. /package/www/build/{p-816fd6dc.entry.js.map → p-9ae0c0c6.entry.js.map} +0 -0
  782. /package/www/build/{p-d7f12672.js.map → p-9c816a3b.js.map} +0 -0
  783. /package/www/build/{p-4cec3345.entry.js.map → p-a2ee659d.entry.js.map} +0 -0
  784. /package/www/build/{p-94916bdf.entry.js.map → p-a4d2cf55.entry.js.map} +0 -0
  785. /package/www/build/{p-04f80811.entry.js.map → p-a8609510.entry.js.map} +0 -0
  786. /package/www/build/{p-817689d5.entry.js.map → p-aaa96c12.entry.js.map} +0 -0
  787. /package/www/build/{p-e0b88075.entry.js.map → p-b391211f.entry.js.map} +0 -0
  788. /package/www/build/{p-342b0eb0.entry.js.map → p-b421424f.entry.js.map} +0 -0
  789. /package/www/build/{p-d9c9de15.entry.js.map → p-b7056859.entry.js.map} +0 -0
  790. /package/www/build/{p-5159edb1.entry.js.map → p-c811b0cf.entry.js.map} +0 -0
  791. /package/www/build/{p-2bdac94e.entry.js.map → p-c9b81cab.entry.js.map} +0 -0
  792. /package/www/build/{p-30e42fb1.js.map → p-cb395500.js.map} +0 -0
  793. /package/www/build/{p-5a1f98a2.entry.js.map → p-cbc09112.entry.js.map} +0 -0
  794. /package/www/build/{p-deb7f8d7.entry.js.map → p-da3abb97.entry.js.map} +0 -0
  795. /package/www/build/{p-2612e3a2.entry.js.map → p-daa442e6.entry.js.map} +0 -0
  796. /package/www/build/{p-e5407cc1.entry.js.map → p-efa6b991.entry.js.map} +0 -0
  797. /package/www/build/{p-01f941c2.entry.js.map → p-f4b987ed.entry.js.map} +0 -0
  798. /package/www/build/{p-bdbcf353.entry.js.map → p-f662e7ff.entry.js.map} +0 -0
  799. /package/www/build/{p-198b1692.entry.js.map → p-f92e0c29.entry.js.map} +0 -0
  800. /package/www/build/{p-a905df88.entry.js.map → p-ff89d630.entry.js.map} +0 -0
@@ -45,7 +45,7 @@ const ZButtonSort$1 = /*@__PURE__*/ proxyCustomElement(class ZButtonSort extends
45
45
  return this.ellipsis.offsetWidth < this.ellipsis.scrollWidth;
46
46
  }
47
47
  render() {
48
- return (h("button", { key: '551cd870041bc9d74949c55ddade45b607627b9c', title: this.setButtonTitle(), id: this.buttonid, class: { selected: this.isselected }, onClick: () => this.emitButtonSortClick() }, h("span", { key: '04f900a2110709622e1417517ad8c0f56a9dd560', ref: (el) => (this.ellipsis = el), class: "ellipsis" }, !this.sortasc && this.desclabel ? this.desclabel : this.label), h("span", { key: 'b075fc8a9b9d61053755b7d2cf6216b88eca21e6', class: "counter" }, this.counter && ` (${this.counter})`), h("span", { key: 'f4a93840d7e1a8d66fdcb67d658fc9b919145302', class: "sort" }, this.sortasc ? this.sortlabelasc : this.sortlabeldesc), h("z-icon", { key: '118fa5dea4d246c9c5ebfcd06f717a55ef64d39f', name: "caret-up-down", width: 16, height: 16 })));
48
+ return (h("button", { key: '6a27bbc29c4feedda219d3c48351e98e5424fc35', title: this.setButtonTitle(), id: this.buttonid, class: { selected: this.isselected }, onClick: () => this.emitButtonSortClick() }, h("span", { key: '415ed91622a75e04dae5df0112d892f14015af61', ref: (el) => (this.ellipsis = el), class: "ellipsis" }, !this.sortasc && this.desclabel ? this.desclabel : this.label), h("span", { key: '58bd9c2614021ee41fcd4f0f27ef3fa41771c7b8', class: "counter" }, this.counter && ` (${this.counter})`), h("span", { key: '66689c59c79cf1d6ad15640d424fbb3ac14edde2', class: "sort" }, this.sortasc ? this.sortlabelasc : this.sortlabeldesc), h("z-icon", { key: 'c6638b7e129f261bbcc9a7c79f02080accb6eed6', name: "caret-up-down", width: 16, height: 16 })));
49
49
  }
50
50
  static get style() { return ZButtonSortStyle0; }
51
51
  }, [1, "z-button-sort", {
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface ZColorPicker extends Components.ZColorPicker, HTMLElement {}
4
+ export const ZColorPicker: {
5
+ prototype: ZColorPicker;
6
+ new (): ZColorPicker;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,234 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { a0 as ColorPickerPalette } from './index2.js';
3
+ import { a as containsElement } from './utils.js';
4
+
5
+ const stylesCss = ":host{display:grid;width:fit-content;padding:calc(var(--space-unit) * 2);background:var(--color-surface01);gap:var(--space-unit);grid-template-columns:repeat(9, calc(var(--space-unit) * 3));grid-template-rows:repeat(5, calc(var(--space-unit) * 3))}:host,*{box-sizing:border-box}button{--border-color:var(--color-surface05);padding:0;border:none;appearance:none;background:none;border-radius:var(--border-radius);cursor:pointer}button[data-color=\"#FFFFFF00\"]{position:relative}button[data-color=\"#FFFFFF00\"]::after{position:absolute;top:0;right:0;width:100%;height:100%;background:linear-gradient(\n -45deg,\n transparent 48%,\n var(--border-color) 48%,\n var(--border-color) 52%,\n transparent 52%\n );border-radius:var(--border-radius);content:\"\"}button[aria-selected=\"true\"]{box-shadow:0 0 0 1px var(--color-white),\n 0 0 0 3px var(--color-active-primary)}button:focus-visible{box-shadow:var(--shadow-focus-primary)}button .color-swatch{width:calc(var(--space-unit) * 3);height:calc(var(--space-unit) * 3);border:var(--border-size-small) solid var(--border-color);border-radius:var(--border-radius)}button[data-color=\"#FFFFFF00\"]:disabled{--border-color:var(--color-disabled01-icon);cursor:not-allowed}button[data-color=\"#FFFFFF00\"]:disabled .color-swatch{background-color:var(--color-disabled02)}";
6
+ const ZColorPickerStyle0 = stylesCss;
7
+
8
+ const LOCALES = {
9
+ it: {
10
+ "Select a color": "Seleziona un colore",
11
+ "Color swatch": "Campione di colore",
12
+ },
13
+ en: {
14
+ "Select a color": "Select a color",
15
+ "Color swatch": "Color swatch",
16
+ },
17
+ };
18
+ /** Number of colors in each group (column) of the grid. */
19
+ const COLOR_GROUP_SIZE = 5;
20
+ /** Number of color groups (columns) in the grid. */
21
+ const COLOR_GROUPS = 9;
22
+ const ZColorPicker$1 = /*@__PURE__*/ proxyCustomElement(class ZColorPicker extends HTMLElement {
23
+ constructor() {
24
+ super();
25
+ this.__registerHost();
26
+ this.__attachShadow();
27
+ this.colorSelected = createEvent(this, "colorSelected", 7);
28
+ /**
29
+ * The color keys arranged in row-major order for rendering and navigation.
30
+ */
31
+ this.colorKeysByRow = [];
32
+ this._colorButtons = [];
33
+ this.selectedColor = undefined;
34
+ this.lng = "it";
35
+ this.htmlAriaLabel = undefined;
36
+ this.disableTransparent = false;
37
+ }
38
+ get colorButtons() {
39
+ if (!this._colorButtons.length) {
40
+ this._colorButtons = Array.from(this.host.shadowRoot.querySelectorAll("button"));
41
+ }
42
+ return this._colorButtons;
43
+ }
44
+ /**
45
+ * Reorders color keys from column-major (the format of the `ColorPickerPalette` object) to row-major (visual/navigation order).
46
+ * This ensures button indices in the DOM match their visual position in the grid.
47
+ */
48
+ sortColorKeysByRow() {
49
+ const allKeys = Object.keys(ColorPickerPalette);
50
+ const ordered = [];
51
+ // Iterate through visual positions (row by row, left to right)
52
+ for (let row = 0; row < COLOR_GROUP_SIZE; row++) {
53
+ for (let col = 0; col < COLOR_GROUPS; col++) {
54
+ const columnMajorIndex = col * COLOR_GROUP_SIZE + row;
55
+ if (columnMajorIndex < allKeys.length) {
56
+ ordered.push(allKeys[columnMajorIndex]);
57
+ }
58
+ }
59
+ }
60
+ return ordered;
61
+ }
62
+ /** Move focus to the specified color button by index. */
63
+ moveFocusTo(index) {
64
+ // Reset tabindex of other buttons and set tabindex to 0 on selected button
65
+ this.colorButtons.forEach((btn, i) => (btn.tabIndex = i === index ? 0 : -1));
66
+ this.colorButtons[index].focus();
67
+ }
68
+ validateTransparentSelection() {
69
+ if (this.disableTransparent && this.selectedColor === "#FFFFFF00") {
70
+ this.selectedColor = "#333333"; // Default to dark gray 2 if transparent is disabled and currently selected
71
+ }
72
+ }
73
+ emitColorSelected() {
74
+ this.colorSelected.emit(this.selectedColor);
75
+ }
76
+ /**
77
+ * Focuses the selected or first enabled color button and makes the container non-tabbable.
78
+ */
79
+ async setFocus() {
80
+ // Reset tabindex of all buttons
81
+ this.colorButtons.forEach((btn) => (btn.tabIndex = -1));
82
+ const firstSelectedOrEnabled = this.colorButtons.find((btn) => btn.ariaSelected === "true") || this.colorButtons.find((btn) => !btn.disabled);
83
+ if (!firstSelectedOrEnabled) {
84
+ return;
85
+ }
86
+ firstSelectedOrEnabled.tabIndex = 0;
87
+ setTimeout(() => {
88
+ firstSelectedOrEnabled.focus();
89
+ }, 50);
90
+ // Set container as non-tabbable
91
+ this.host.tabIndex = -1;
92
+ }
93
+ /**
94
+ * Compute next index in row-major grid according to keyboard direction.
95
+ */
96
+ getNextIndexByKey(currentIndex, key, totalColors) {
97
+ const row = Math.floor(currentIndex / COLOR_GROUPS);
98
+ const col = currentIndex % COLOR_GROUPS;
99
+ let newIndex = currentIndex;
100
+ switch (key) {
101
+ case "ArrowRight": {
102
+ const newCol = col + 1;
103
+ const newRow = newCol >= COLOR_GROUPS ? (row + 1) % COLOR_GROUP_SIZE : row;
104
+ newIndex = newRow * COLOR_GROUPS + (newCol % COLOR_GROUPS);
105
+ if (newIndex >= totalColors) {
106
+ newIndex = 0; // Wrap to first item
107
+ }
108
+ break;
109
+ }
110
+ case "ArrowLeft": {
111
+ const newCol = col - 1;
112
+ const newRow = newCol < 0 ? (row - 1 + COLOR_GROUP_SIZE) % COLOR_GROUP_SIZE : row;
113
+ newIndex = newRow * COLOR_GROUPS + ((newCol + COLOR_GROUPS) % COLOR_GROUPS);
114
+ if (newIndex >= totalColors) {
115
+ newIndex = totalColors - 1; // Wrap to last item
116
+ }
117
+ break;
118
+ }
119
+ case "ArrowDown": {
120
+ let newRow = row + 1;
121
+ let newCol = col;
122
+ if (newRow >= COLOR_GROUP_SIZE) {
123
+ // Wrap to first item of next column
124
+ newRow = 0;
125
+ newCol = (col + 1) % COLOR_GROUPS;
126
+ }
127
+ newIndex = newRow * COLOR_GROUPS + newCol;
128
+ if (newIndex >= totalColors) {
129
+ newIndex = 0; // Wrap to first item
130
+ }
131
+ break;
132
+ }
133
+ case "ArrowUp": {
134
+ let newRow = row - 1;
135
+ let newCol = col;
136
+ if (newRow < 0) {
137
+ // Wrap to last item of previous column
138
+ newRow = COLOR_GROUP_SIZE - 1;
139
+ newCol = (col - 1 + COLOR_GROUPS) % COLOR_GROUPS;
140
+ }
141
+ newIndex = newRow * COLOR_GROUPS + newCol;
142
+ if (newIndex >= totalColors) {
143
+ newIndex = totalColors - 1; // Wrap to last item
144
+ }
145
+ break;
146
+ }
147
+ }
148
+ return newIndex;
149
+ }
150
+ /**
151
+ * Handle keyboard navigation within the color picker.
152
+ * Arrow keys move focus in the expected direction, wrapping around edges. The grid is navigated in row-major order.
153
+ */
154
+ handleKeyDown(event) {
155
+ var _a, _b;
156
+ const target = event.composedPath()[0];
157
+ if (!target.dataset.color) {
158
+ return;
159
+ }
160
+ const currentIndex = this.colorButtons.indexOf(target);
161
+ const totalColors = this.colorButtons.length;
162
+ if (currentIndex < 0 || !["ArrowRight", "ArrowLeft", "ArrowDown", "ArrowUp"].includes(event.key)) {
163
+ return;
164
+ }
165
+ let newIndex = currentIndex;
166
+ let attempts = 0;
167
+ do {
168
+ newIndex = this.getNextIndexByKey(newIndex, event.key, totalColors);
169
+ attempts++;
170
+ } while (attempts < totalColors && ((_a = this.colorButtons[newIndex]) === null || _a === void 0 ? void 0 : _a.disabled));
171
+ if (newIndex !== currentIndex &&
172
+ newIndex >= 0 &&
173
+ newIndex < totalColors &&
174
+ !((_b = this.colorButtons[newIndex]) === null || _b === void 0 ? void 0 : _b.disabled)) {
175
+ this.moveFocusTo(newIndex);
176
+ event.preventDefault();
177
+ event.stopPropagation();
178
+ }
179
+ }
180
+ /**
181
+ * When focus leaves the color picker (e.g. user tabs away), reset all buttons to non-tabbable and make the container tabbable again.
182
+ */
183
+ handleBlur(event) {
184
+ const relatedTarget = event.relatedTarget;
185
+ if (!containsElement(this.host, relatedTarget)) {
186
+ this.host.tabIndex = 0;
187
+ this.colorButtons.forEach((btn) => (btn.tabIndex = -1));
188
+ }
189
+ }
190
+ componentWillLoad() {
191
+ this.colorKeysByRow = this.sortColorKeysByRow();
192
+ }
193
+ render() {
194
+ return (h(Host, { key: '24f0e76aecda9731ed826e8228f49ca5e08a14a5', role: "listbox", "aria-label": this.htmlAriaLabel || LOCALES[this.lng]["Select a color"], tabIndex: 0 }, this.colorKeysByRow.map((colorKey) => {
195
+ var _a;
196
+ return (h("button", { class: "color-swatch", "data-color": colorKey, role: "option", "aria-selected": ((_a = this.selectedColor) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === colorKey.toUpperCase() ? "true" : "false", tabIndex: -1, onClick: () => (this.selectedColor = colorKey), disabled: this.disableTransparent && colorKey === "#FFFFFF00" }, h("div", { class: "color-swatch", role: "img", "aria-roledescription": LOCALES[this.lng]["Color swatch"], "aria-label": ColorPickerPalette[colorKey][this.lng], title: ColorPickerPalette[colorKey][this.lng], style: { backgroundColor: colorKey } })));
197
+ })));
198
+ }
199
+ get host() { return this; }
200
+ static get watchers() { return {
201
+ "disableTransparent": ["validateTransparentSelection"],
202
+ "selectedColor": ["validateTransparentSelection", "emitColorSelected"]
203
+ }; }
204
+ static get style() { return ZColorPickerStyle0; }
205
+ }, [1, "z-color-picker", {
206
+ "selectedColor": [1025, "selected-color"],
207
+ "lng": [1],
208
+ "htmlAriaLabel": [1, "html-aria-label"],
209
+ "disableTransparent": [4, "disable-transparent"],
210
+ "setFocus": [64]
211
+ }, [[0, "focus", "setFocus"], [0, "keydown", "handleKeyDown"], [0, "blur", "handleBlur"]], {
212
+ "disableTransparent": ["validateTransparentSelection"],
213
+ "selectedColor": ["validateTransparentSelection", "emitColorSelected"]
214
+ }]);
215
+ function defineCustomElement$1() {
216
+ if (typeof customElements === "undefined") {
217
+ return;
218
+ }
219
+ const components = ["z-color-picker"];
220
+ components.forEach(tagName => { switch (tagName) {
221
+ case "z-color-picker":
222
+ if (!customElements.get(tagName)) {
223
+ customElements.define(tagName, ZColorPicker$1);
224
+ }
225
+ break;
226
+ } });
227
+ }
228
+
229
+ const ZColorPicker = ZColorPicker$1;
230
+ const defineCustomElement = defineCustomElement$1;
231
+
232
+ export { ZColorPicker, defineCustomElement };
233
+
234
+ //# sourceMappingURL=z-color-picker.js.map
@@ -0,0 +1 @@
1
+ {"file":"z-color-picker.js","mappings":";;;;AAAA,MAAM,SAAS,GAAG,ozCAAozC,CAAC;AACv0C,2BAAe,SAAS;;ACGxB,MAAM,OAAO,GAAG;IACd,EAAE,EAAE;QACF,gBAAgB,EAAE,qBAAqB;QACvC,cAAc,EAAE,oBAAoB;KACrC;IACD,EAAE,EAAE;QACF,gBAAgB,EAAE,gBAAgB;QAClC,cAAc,EAAE,cAAc;KAC/B;C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AAc,CAAC,gBAC3C,kBAAkB,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAClD,KAAK,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAC7C,KAAK,EAAE,EAAC,eAAe,EAAE,QAAQ,EAAC,GAC7B,CACA,EACV;SAAA,CAAC,CACG,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["ZColorPicker"],"sources":["src/components/z-color-picker/styles.css?tag=z-color-picker&encapsulation=shadow","src/components/z-color-picker/index.tsx"],"sourcesContent":[":host {\n display: grid;\n width: fit-content;\n padding: calc(var(--space-unit) * 2);\n background: var(--color-surface01);\n gap: var(--space-unit);\n grid-template-columns: repeat(9, calc(var(--space-unit) * 3));\n grid-template-rows: repeat(5, calc(var(--space-unit) * 3));\n}\n\n:host,\n* {\n box-sizing: border-box;\n}\n\nbutton {\n --border-color: var(--color-surface05);\n\n padding: 0;\n border: none;\n appearance: none;\n background: none;\n border-radius: var(--border-radius);\n cursor: pointer;\n}\n\nbutton[data-color=\"#FFFFFF00\"] {\n position: relative;\n}\n\n/* draw a diagonal line from top right corner */\nbutton[data-color=\"#FFFFFF00\"]::after {\n position: absolute;\n top: 0;\n right: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(\n -45deg,\n transparent 48%,\n var(--border-color) 48%,\n var(--border-color) 52%,\n transparent 52%\n );\n border-radius: var(--border-radius);\n content: \"\";\n}\n\nbutton[aria-selected=\"true\"] {\n box-shadow:\n 0 0 0 1px var(--color-white),\n 0 0 0 3px var(--color-active-primary);\n}\n\nbutton:focus-visible {\n box-shadow: var(--shadow-focus-primary);\n}\n\nbutton .color-swatch {\n width: calc(var(--space-unit) * 3);\n height: calc(var(--space-unit) * 3);\n border: var(--border-size-small) solid var(--border-color);\n border-radius: var(--border-radius);\n}\n\nbutton[data-color=\"#FFFFFF00\"]:disabled {\n --border-color: var(--color-disabled01-icon);\n\n cursor: not-allowed;\n}\n\nbutton[data-color=\"#FFFFFF00\"]:disabled .color-swatch {\n background-color: var(--color-disabled02);\n}\n","import {Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, Watch, h} from \"@stencil/core\";\nimport {ColorPickerPalette} from \"../../beans\";\nimport {containsElement} from \"../../utils/utils\";\n\nconst LOCALES = {\n it: {\n \"Select a color\": \"Seleziona un colore\",\n \"Color swatch\": \"Campione di colore\",\n },\n en: {\n \"Select a color\": \"Select a color\",\n \"Color swatch\": \"Color swatch\",\n },\n} as const;\n\n/** Number of colors in each group (column) of the grid. */\nconst COLOR_GROUP_SIZE = 5;\n\n/** Number of color groups (columns) in the grid. */\nconst COLOR_GROUPS = 9;\n\n/**\n * Color picker component.\n * This component allows the user to pick a color from a predefined set.\n */\n@Component({\n tag: \"z-color-picker\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZColorPicker {\n @Element() host: HTMLZColorPickerElement;\n\n /**\n * The selected color to highlight.\n */\n @Prop({mutable: true})\n selectedColor: ColorPickerPalette;\n\n /**\n * The language for the aria labels inside the color picker.\n */\n @Prop()\n lng: \"it\" | \"en\" = \"it\";\n\n /**\n * The aria-label for the color picker, e.g. \"Select a background color for the label\".\n */\n @Prop()\n htmlAriaLabel: string;\n\n /**\n * Disables the transparent color option.\n * Setting `selectedColor` prop to `#FFFFFF00` while `disableTransparent` is true will default to `#333333` (\"dark gray 2\").\n */\n @Prop()\n disableTransparent = false;\n\n /**\n * Event emitted when a color is selected.\n */\n @Event()\n colorSelected: EventEmitter<ColorPickerPalette>;\n\n /**\n * The color keys arranged in row-major order for rendering and navigation.\n */\n private colorKeysByRow: ColorPickerPalette[] = [];\n\n private _colorButtons: HTMLButtonElement[] = [];\n\n private get colorButtons(): HTMLButtonElement[] {\n if (!this._colorButtons.length) {\n this._colorButtons = Array.from(this.host.shadowRoot.querySelectorAll(\"button\")) as HTMLButtonElement[];\n }\n\n return this._colorButtons;\n }\n\n /**\n * Reorders color keys from column-major (the format of the `ColorPickerPalette` object) to row-major (visual/navigation order).\n * This ensures button indices in the DOM match their visual position in the grid.\n */\n private sortColorKeysByRow(): ColorPickerPalette[] {\n const allKeys = Object.keys(ColorPickerPalette) as ColorPickerPalette[];\n const ordered: ColorPickerPalette[] = [];\n\n // Iterate through visual positions (row by row, left to right)\n for (let row = 0; row < COLOR_GROUP_SIZE; row++) {\n for (let col = 0; col < COLOR_GROUPS; col++) {\n const columnMajorIndex = col * COLOR_GROUP_SIZE + row;\n if (columnMajorIndex < allKeys.length) {\n ordered.push(allKeys[columnMajorIndex]);\n }\n }\n }\n\n return ordered;\n }\n\n /** Move focus to the specified color button by index. */\n private moveFocusTo(index: number): void {\n // Reset tabindex of other buttons and set tabindex to 0 on selected button\n this.colorButtons.forEach((btn, i) => (btn.tabIndex = i === index ? 0 : -1));\n this.colorButtons[index].focus();\n }\n\n @Watch(\"disableTransparent\")\n @Watch(\"selectedColor\")\n validateTransparentSelection(): void {\n if (this.disableTransparent && this.selectedColor === \"#FFFFFF00\") {\n this.selectedColor = \"#333333\"; // Default to dark gray 2 if transparent is disabled and currently selected\n }\n }\n\n @Watch(\"selectedColor\")\n emitColorSelected(): void {\n this.colorSelected.emit(this.selectedColor);\n }\n\n /**\n * Focuses the selected or first enabled color button and makes the container non-tabbable.\n */\n @Listen(\"focus\")\n @Method()\n async setFocus(): Promise<void> {\n // Reset tabindex of all buttons\n this.colorButtons.forEach((btn) => (btn.tabIndex = -1));\n const firstSelectedOrEnabled =\n this.colorButtons.find((btn) => btn.ariaSelected === \"true\") || this.colorButtons.find((btn) => !btn.disabled);\n if (!firstSelectedOrEnabled) {\n return;\n }\n\n firstSelectedOrEnabled.tabIndex = 0;\n setTimeout(() => {\n firstSelectedOrEnabled.focus();\n }, 50);\n // Set container as non-tabbable\n this.host.tabIndex = -1;\n }\n\n /**\n * Compute next index in row-major grid according to keyboard direction.\n */\n private getNextIndexByKey(currentIndex: number, key: string, totalColors: number): number {\n const row = Math.floor(currentIndex / COLOR_GROUPS);\n const col = currentIndex % COLOR_GROUPS;\n let newIndex = currentIndex;\n\n switch (key) {\n case \"ArrowRight\": {\n const newCol = col + 1;\n const newRow = newCol >= COLOR_GROUPS ? (row + 1) % COLOR_GROUP_SIZE : row;\n newIndex = newRow * COLOR_GROUPS + (newCol % COLOR_GROUPS);\n if (newIndex >= totalColors) {\n newIndex = 0; // Wrap to first item\n }\n\n break;\n }\n case \"ArrowLeft\": {\n const newCol = col - 1;\n const newRow = newCol < 0 ? (row - 1 + COLOR_GROUP_SIZE) % COLOR_GROUP_SIZE : row;\n newIndex = newRow * COLOR_GROUPS + ((newCol + COLOR_GROUPS) % COLOR_GROUPS);\n if (newIndex >= totalColors) {\n newIndex = totalColors - 1; // Wrap to last item\n }\n\n break;\n }\n case \"ArrowDown\": {\n let newRow = row + 1;\n let newCol = col;\n if (newRow >= COLOR_GROUP_SIZE) {\n // Wrap to first item of next column\n newRow = 0;\n newCol = (col + 1) % COLOR_GROUPS;\n }\n newIndex = newRow * COLOR_GROUPS + newCol;\n if (newIndex >= totalColors) {\n newIndex = 0; // Wrap to first item\n }\n\n break;\n }\n case \"ArrowUp\": {\n let newRow = row - 1;\n let newCol = col;\n if (newRow < 0) {\n // Wrap to last item of previous column\n newRow = COLOR_GROUP_SIZE - 1;\n newCol = (col - 1 + COLOR_GROUPS) % COLOR_GROUPS;\n }\n newIndex = newRow * COLOR_GROUPS + newCol;\n if (newIndex >= totalColors) {\n newIndex = totalColors - 1; // Wrap to last item\n }\n\n break;\n }\n }\n\n return newIndex;\n }\n\n /**\n * Handle keyboard navigation within the color picker.\n * Arrow keys move focus in the expected direction, wrapping around edges. The grid is navigated in row-major order.\n */\n @Listen(\"keydown\")\n handleKeyDown(event: KeyboardEvent): void {\n const target = event.composedPath()[0] as HTMLElement;\n if (!target.dataset.color) {\n return;\n }\n\n const currentIndex = this.colorButtons.indexOf(target as HTMLButtonElement);\n const totalColors = this.colorButtons.length;\n if (currentIndex < 0 || ![\"ArrowRight\", \"ArrowLeft\", \"ArrowDown\", \"ArrowUp\"].includes(event.key)) {\n return;\n }\n\n let newIndex = currentIndex;\n let attempts = 0;\n\n do {\n newIndex = this.getNextIndexByKey(newIndex, event.key, totalColors);\n attempts++;\n } while (attempts < totalColors && this.colorButtons[newIndex]?.disabled);\n\n if (\n newIndex !== currentIndex &&\n newIndex >= 0 &&\n newIndex < totalColors &&\n !this.colorButtons[newIndex]?.disabled\n ) {\n this.moveFocusTo(newIndex);\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n /**\n * When focus leaves the color picker (e.g. user tabs away), reset all buttons to non-tabbable and make the container tabbable again.\n */\n @Listen(\"blur\")\n handleBlur(event: FocusEvent): void {\n const relatedTarget = event.relatedTarget as HTMLElement;\n if (!containsElement(this.host, relatedTarget)) {\n this.host.tabIndex = 0;\n this.colorButtons.forEach((btn) => (btn.tabIndex = -1));\n }\n }\n\n componentWillLoad(): void {\n this.colorKeysByRow = this.sortColorKeysByRow();\n }\n\n render(): HTMLZColorPickerElement {\n return (\n <Host\n role=\"listbox\"\n aria-label={this.htmlAriaLabel || LOCALES[this.lng][\"Select a color\"]}\n tabIndex={0}\n >\n {this.colorKeysByRow.map((colorKey: ColorPickerPalette) => (\n <button\n class=\"color-swatch\"\n data-color={colorKey}\n role=\"option\"\n aria-selected={this.selectedColor?.toUpperCase() === colorKey.toUpperCase() ? \"true\" : \"false\"}\n tabIndex={-1}\n onClick={() => (this.selectedColor = colorKey)}\n disabled={this.disableTransparent && colorKey === \"#FFFFFF00\"}\n >\n <div\n class=\"color-swatch\"\n role=\"img\"\n aria-roledescription={LOCALES[this.lng][\"Color swatch\"]}\n aria-label={ColorPickerPalette[colorKey][this.lng]}\n title={ColorPickerPalette[colorKey][this.lng]}\n style={{backgroundColor: colorKey}}\n ></div>\n </button>\n ))}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -468,7 +468,7 @@ const ZDatePicker$1 = /*@__PURE__*/ proxyCustomElement(class ZDatePicker extends
468
468
  } })));
469
469
  }
470
470
  render() {
471
- return (h("div", { key: 'db9b98d1f344ed89c8b3b8bdee4c19106167a3eb', class: {
471
+ return (h("div", { key: 'b09b51672ed595a08b95443f9a2e1f9866402de3', class: {
472
472
  "flatpickr-toggle-container": true,
473
473
  [this.flatpickrPosition]: true,
474
474
  [this.mode]: true,
@@ -42,7 +42,7 @@ const ZFile$1 = /*@__PURE__*/ proxyCustomElement(class ZFile extends HTMLElement
42
42
  return this.ellipsis.offsetWidth < this.ellipsis.scrollWidth;
43
43
  }
44
44
  render() {
45
- return (h(Host, { key: 'b7c1c1769e8ad69c813738b1ad1ed614a42e196e' }, this.allowPopover && (h("z-popover", { key: 'eaad804518f26a1a839bc8ff14896207ee90bad8', open: this.popoverVisible, position: PopoverPosition.AUTO, bindTo: this.chip }, h("span", { key: 'eb9671344deee0deafdff01be57cd5dbf948a614', class: "body-5 tooltip-content" }, this.ellipsis.innerText))), h("z-chip", { key: '7c890fb667a33cd00290d02e42313be683e2215e', ref: (el) => (this.chip = el), id: `chip-${this.fileNumber}`, interactiveIcon: "multiply-circled", type: ZChipType.DEFAULT }, h("span", { key: 'f0a0464a0b8a3f98e94de5a4673589518f24c2a0', ref: (el) => (this.ellipsis = el), tabIndex: -1 }, this.fileName))));
45
+ return (h(Host, { key: '7f9738fc5ab5714736fc9ce5f83cb31f41b0e099' }, this.allowPopover && (h("z-popover", { key: 'd5baa113aa7e90938197d6cbd4d90b6a952e4cc7', open: this.popoverVisible, position: PopoverPosition.AUTO, bindTo: this.chip }, h("span", { key: 'f4fc4a0a02c3475713b76ad1ece29dff2d514369', class: "body-5 tooltip-content" }, this.ellipsis.innerText))), h("z-chip", { key: '301e251425be64a0484dc397e3222d3790e14a80', ref: (el) => (this.chip = el), id: `chip-${this.fileNumber}`, interactiveIcon: "multiply-circled", type: ZChipType.DEFAULT }, h("span", { key: '5d3f8d4bdf1550b72e44aeed32a4cb59da15f5e8', ref: (el) => (this.ellipsis = el), tabIndex: -1 }, this.fileName))));
46
46
  }
47
47
  get el() { return this; }
48
48
  static get style() { return ZFileStyle0; }
@@ -100,7 +100,7 @@ const ZMenuDeprecated$1 = /*@__PURE__*/ proxyCustomElement(class ZMenuDeprecated
100
100
  return (h("div", { class: "menu-label" }, h("div", { class: "menu-label-content" }, h("slot", { onSlotchange: this.onLabelSlotChange }))));
101
101
  }
102
102
  render() {
103
- return (h(Host, { key: '74b5b32d29db7c6e7d241f1583a2df27979fb4f8' }, this.renderMenuLabel(), this.hasContent && (h("div", { key: '6bdfeb0e2d900a53e69a15861c1c5d6337fcf972', class: "content", ref: (el) => (this.content = el) }, this.hasHeader && (h("header", { key: 'da9c528915686f2b5fcface1483822df96abca6b', class: "header" }, h("slot", { key: '692467f0246d129d75525a5097529d8c2a8f6817', name: "header", onSlotchange: this.checkContent }))), h("div", { key: '639ffcb514c6d95d7dca908b2c0cbf142f42a9e3', class: "items", role: "menu" }, h("slot", { key: '783021819f17a536746670de911ebef9665e8e99', name: "item", onSlotchange: this.onItemsChange }))))));
103
+ return (h(Host, { key: '7b64ae06d79dd727299f86cb7f9d50a851776b90' }, this.renderMenuLabel(), this.hasContent && (h("div", { key: '9922d654e0e78bef5763af1a89ff838c86a1fe30', class: "content", ref: (el) => (this.content = el) }, this.hasHeader && (h("header", { key: 'c08ed7a8634b0cdc71b0052f4327134bdc5c8736', class: "header" }, h("slot", { key: '0a107099ee3c2de8727e6ea4f863ba46c67c1859', name: "header", onSlotchange: this.checkContent }))), h("div", { key: 'fa85f72658bb7f7a710ddf4fd7891e9e379845a0', class: "items", role: "menu" }, h("slot", { key: 'cc8b6625acaad177c516cc415a841662ce654c28', name: "item", onSlotchange: this.onItemsChange }))))));
104
104
  }
105
105
  get hostElement() { return this; }
106
106
  static get watchers() { return {
@@ -48,7 +48,7 @@ const ZMenuSectionDeprecated$1 = /*@__PURE__*/ proxyCustomElement(class ZMenuSec
48
48
  this.checkContent();
49
49
  }
50
50
  render() {
51
- return (h(Host, { key: 'cb55ccb8c7327254eabaab573f6fb0a5ae2ac361', role: "menu", open: this.open }, h("button", { key: '5065f38502c4bb0167bb7332e0e8ba0dd36541df', class: "label", "aria-pressed": this.open ? "true" : "false", onClick: this.toggle.bind(this) }, h("slot", { key: '67a5082482b73f27f8244f730ac88da14d4db6c4', onSlotchange: this.onLabelSlotChange.bind(this) }), this.hasContent && h("z-icon", { key: 'b513a5c76223e7a83162cc3b28434c53124b135c', name: this.open ? "chevron-up" : "chevron-down" })), this.open && (h("div", { key: '4f43962d01e60cea802f06413acae360ead32aa0', class: "items" }, h("slot", { key: '020f1235a37a99e274e9f4d611153f4915c9cd41', name: "item", onSlotchange: this.checkContent.bind(this) })))));
51
+ return (h(Host, { key: '6cc06eccce2d2c9611936c2b804f3c7744774aad', role: "menu", open: this.open }, h("button", { key: '2cc287717a677392b5084f61b6eca0fd88dc13c0', class: "label", "aria-pressed": this.open ? "true" : "false", onClick: this.toggle.bind(this) }, h("slot", { key: '2b3d76700bea806f8b0db6a9d3fd915885b275c2', onSlotchange: this.onLabelSlotChange.bind(this) }), this.hasContent && h("z-icon", { key: '16162d96f5d3d3fb475db88525ce9e23e34a08c6', name: this.open ? "chevron-up" : "chevron-down" })), this.open && (h("div", { key: '801f6e8e3f54fc7a64e3b6388f4c4d7297a3e757', class: "items" }, h("slot", { key: '875889ac362c006c632db4eb04f32e228f7cb13c', name: "item", onSlotchange: this.checkContent.bind(this) })))));
52
52
  }
53
53
  get hostElement() { return this; }
54
54
  static get style() { return ZMenuSectionDeprecatedStyle0; }
@@ -179,7 +179,7 @@ const ZMenuSection$1 = /*@__PURE__*/ proxyCustomElement(class ZMenuSection exten
179
179
  this.onItemsChange();
180
180
  }
181
181
  render() {
182
- return (h(Host, { key: '4fbaa9a39d87fd247d605d32e81f37293671d95b', open: this.open }, h("button", { key: '25b5f34bb741671781fddabe18694a92d19c06c9', 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 }, h("slot", { key: '9ed5d1309acb2f8a17a583e7a96eddc8741da7c2', onSlotchange: this.onLabelSlotChange }), this.hasItems && h("z-icon", { key: '1677b363b4894c04bee3cae53a604baad136236a', name: this.open ? "chevron-up" : "chevron-down" })), h("div", { key: '74f37c1f2850cca5bf7fe756107c6984f3a7dd13', class: "items", role: "menu", hidden: !this.open }, h("slot", { key: '8382266ea2f2a3c04beab0d6304a459a5f56a48b', name: "section", onSlotchange: this.onItemsChange }))));
182
+ return (h(Host, { key: '4dce34f277ab3c8c41171a15a02fd174c45742cd', open: this.open }, h("button", { key: 'b6c535e87dbb5af8808d7a19556ad116cbcca72b', 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 }, h("slot", { key: 'fbbba483ca5fe6d45440c01a89f061565ce641aa', onSlotchange: this.onLabelSlotChange }), this.hasItems && h("z-icon", { key: 'b4c67b7cada94580b4f5853aaa8cbb9818bece74', name: this.open ? "chevron-up" : "chevron-down" })), h("div", { key: '711c085b5d74affb2c23ebd1acdd774b5903e7e5', class: "items", role: "menu", hidden: !this.open }, h("slot", { key: 'a2fe12f235f6b23a96f2bd3a8a18f3a095fcff2d', name: "section", onSlotchange: this.onItemsChange }))));
183
183
  }
184
184
  get host() { return this; }
185
185
  static get watchers() { return {
@@ -317,7 +317,7 @@ const ZMenu$1 = /*@__PURE__*/ proxyCustomElement(class ZMenu extends HTMLElement
317
317
  "floating": [516],
318
318
  "open": [1540],
319
319
  "verticalContext": [516, "vertical-context"],
320
- "htmlTabindex": [2, "html-tabindex"],
320
+ "htmlTabindex": [1026, "html-tabindex"],
321
321
  "hasHeader": [32],
322
322
  "hasContent": [32],
323
323
  "setFocus": [64],
@@ -1 +1 @@
1
- {"file":"z-menu.js","mappings":";;;;;AAAA,MAAM,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AAC,UAAU,EAAE;YACpB,QACE,WAAK,KAAK,EAAC,YAAY,IACrB,YAAM,YAAY,EAAE,IAAI,CAAC,iBAAiB,GAAI,CAC1C,EACN;SACH;QAED,QACE,EAAC,IAAI,QACH,cACE,GAAG,EAAE,CAAC,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,IAE9B,YAAM,YAAY,EAAE,IAAI,CAAC,iBAAiB,GAAI,EAC9C,cAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,YAAY,GAAG,cAAc,GAAI,CACpD,EAET,WACE,KAAK,EAAC,SAAS,EACf,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,IAE/B,IAAI,CAAC,SAAS,KACb,cAAQ,KAAK,EAAC,QAAQ,IACpB,YACE,IAAI,EAAC,QAAQ,EACb,YAAY,EAAE,IAAI,CAAC,YAAY,GAC/B,CACK,CACV,EAED,WACE,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,MAAM,IAEX,YACE,IAAI,EAAC,MAAM,EACX,YAAY,EAAE,IAAI,CAAC,aAAa,GAChC,CACE,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["ZMenu"],"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: calc(var(--border-size-small) * -1);\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.items > ::slotted([slot=\"item\"][active]),\n.items > ::slotted([slot=\"item\"][data-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 `data-active` HTML attribute on the element to highlight it (`active` also works but `data-active` is preferable). 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.js","mappings":";;;;;AAAA,MAAM,SAAS,GAAG,kwHAAkwH,CAAC;AACrxH,oBAAe,SAAS;;ACGxB,MAAM,cAAc,GAAG,CAAC,EAAyC,KAC/D,CAAA,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,OAAO,MAAK,gBAAgB,CAAC;MAatBA,OAAK;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,YAAY,CAAC,OAAO,CAAC,IAAI,GAAG,YAAY,aAAZ,YAAY,u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AI,CAAC,OAAO,GAAG,EAAE,CAAC,IAE/B,IAAI,CAAC,SAAS,KACb,cAAQ,KAAK,EAAC,QAAQ,IACpB,YACE,IAAI,EAAC,QAAQ,EACb,YAAY,EAAE,IAAI,CAAC,YAAY,GAC/B,CACK,CACV,EAED,WACE,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,MAAM,IAEX,YACE,IAAI,EAAC,MAAM,EACX,YAAY,EAAE,IAAI,CAAC,aAAa,GAChC,CACE,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["ZMenu"],"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: calc(var(--border-size-small) * -1);\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.items > ::slotted([slot=\"item\"][active]),\n.items > ::slotted([slot=\"item\"][data-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 `data-active` HTML attribute on the element to highlight it (`active` also works but `data-active` is preferable). 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({mutable: true})\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$1 = /*@__PURE__*/ proxyCustomElement(class ZMyzCardAlert ext
56
56
  }
57
57
  }
58
58
  render() {
59
- return (h("div", { key: '78631a84365b1c5c436dde0fd52b2c2866deebfe', class: "alert-external-wrapper " + this.retrieveClass() }, h("z-alert", { key: '8e54a3f758e17f6fff72efdd994c00a237965153', type: this.getAlertType() }, h("div", { key: '17029eac681c851ce079a4471b229f105ac018ad', class: "relative-container" }, h("z-icon", { key: 'bbbe8c42c16d3571e5acdd56d3c2332a2eb36c18', name: this.iconname, width: 18, height: 18, class: this.retrieveClass() }), h("span", { key: '7ca5d395e3631b20f50b9cd62724a56721f3ec77', class: "content-text" }, this.contenttext), this.actiontext && !!this.actiontext.trim().length && (h("span", { key: 'ac7627ad12844fa386e550d48ac0267579e3a2e0', role: "button", tabindex: "0", class: "content-action", onClick: (e) => {
59
+ return (h("div", { key: 'cfc5ba625b1f657d2717a2ac5aae0ad070ad4177', class: "alert-external-wrapper " + this.retrieveClass() }, h("z-alert", { key: 'c74a674717764ac11f4e71dcaa034ba950c0a1f8', type: this.getAlertType() }, h("div", { key: 'e289a588eee12751d10964bd9244251d0fef88b4', class: "relative-container" }, h("z-icon", { key: 'afe5a16bd61de53fdb2ac55e722c3d64ecf22bdf', name: this.iconname, width: 18, height: 18, class: this.retrieveClass() }), h("span", { key: 'e7b11a13ba83bcd214b11e0e8bb89ef7976b356c', class: "content-text" }, this.contenttext), this.actiontext && !!this.actiontext.trim().length && (h("span", { key: 'cb5e55bbfb7afdbd2a19b7b612b2412b1a35fa80', role: "button", tabindex: "0", class: "content-action", onClick: (e) => {
60
60
  this.handleActionButtonClick(e);
61
61
  }, onKeyPress: (e) => {
62
62
  this.handleSpaceKeyPress(e);
@@ -31,7 +31,7 @@ const ZMyzCardDictionary$1 = /*@__PURE__*/ proxyCustomElement(class ZMyzCardDict
31
31
  this.cardFlipped.emit(showBack);
32
32
  }
33
33
  render() {
34
- return (h("div", { key: '4a22e906f15a897300c47195338a4ac7a8d097e0' }, h("z-myz-card", { key: '10ed7010f036216a498600fd7203ffb12c9dcdbe' }, h("z-myz-card-header", { key: 'df5a2bacb28913152f3f26172c6de9ea284722b1', titolo: this.name }), h("div", { key: 'df91b83426145ccf632233e2c0443e4f48c8b435', class: `content ${this.flipped ? "flipped" : ""}` }, h("div", { key: 'dfc0904493c116f39fd773fa93bac35eb8291c56', class: "front" }, h("z-myz-card-body", { key: '92c03400d1bafe40b1832cc5385d234acdcb589d' }, h("z-myz-card-cover", { key: 'de77df38946fa1dfcea760e46c371474bc034515', slot: "cover", titolo: this.name, img: this.cover, faded: this.disabled })), h("z-button", { key: 'c01d012aab0f5fe885482b3cc56614f1944faa95', class: { "hide-info": this.hideinfobtn }, variant: ButtonVariant.SECONDARY, icon: "informationsource", size: ButtonSize.X_SMALL, onClick: () => this.flipCard(true), disabled: this.flipped }, this.flipbuttonlabel)), h("div", { key: '8ce8e9790fa052fc7fcbd82063b77bbce10e2eb4', class: "back" }, h("slot", { key: '8f8136511b5e5e297d09e40f244d77df22e90dfb', name: "info" }))), h("slot", { key: 'bb52dcbe9f214bb84159a0d271d16a35978b82ac' }))));
34
+ return (h("div", { key: 'e6ec0b5054975547584bbee8759d987b72134d29' }, h("z-myz-card", { key: 'b074508d5e487ab311aab750a9595c65d0bb182f' }, h("z-myz-card-header", { key: 'eace632cf520eac6a109790acb47d08f03f7f88c', titolo: this.name }), h("div", { key: '9fc66378a96351d6251e0d700c3f93046343cb64', class: `content ${this.flipped ? "flipped" : ""}` }, h("div", { key: '9a90a3b496bdb8dbbe53820536f41f91aca5fe8f', class: "front" }, h("z-myz-card-body", { key: 'b1a8aee7f1b172fb8070e06b5d929c9c726c870e' }, h("z-myz-card-cover", { key: '8e51755d66e3d0b1081f34cfbbcff860b325ac52', slot: "cover", titolo: this.name, img: this.cover, faded: this.disabled })), h("z-button", { key: '9ebd9fcb0bf970b3ae9250048809a5427d7f7586', class: { "hide-info": this.hideinfobtn }, variant: ButtonVariant.SECONDARY, icon: "informationsource", size: ButtonSize.X_SMALL, onClick: () => this.flipCard(true), disabled: this.flipped }, this.flipbuttonlabel)), h("div", { key: '03cc1ad4636d1cf4d36ef062f9f66d07a2960d38', class: "back" }, h("slot", { key: '2b766a05250d41a648cb07e072707a16fa45c484', name: "info" }))), h("slot", { key: '288e7018302b221aa6244b01fc5f4b8140297078' }))));
35
35
  }
36
36
  static get style() { return ZMyzCardDictionaryStyle0; }
37
37
  }, [1, "z-myz-card-dictionary", {
@@ -10,7 +10,7 @@ const ZMyzCardFooterSections$1 = /*@__PURE__*/ proxyCustomElement(class ZMyzCard
10
10
  this.__attachShadow();
11
11
  }
12
12
  render() {
13
- return (h("div", { key: '4376492df8f4ac40ddb747fbb84702d7306a087d' }, h("footer", { key: '65ad57d32ecfa342c12900d2341c120fb2b13287' }, h("div", { key: 'a76dc6bd6b6e0702a0290f19226a5545993b8d87', class: "top" }, h("slot", { key: 'bce482d729d4f3d3e74eee129994e7d4593e6c8e', name: "top" })), h("div", { key: '8e440e41d186ffc5673bf0dcf0dc99fff504c043', class: "bottom" }, h("slot", { key: '8b685dd25a9049c960aa2272ced67556a3490654', name: "bottom" })))));
13
+ return (h("div", { key: '77fe7b02b4f0d995fffd93907c4e1f6fcab7cf42' }, h("footer", { key: 'cdd0a1cb8a5484ae646233d0122604b29f1a6ca4' }, h("div", { key: '91c4312af89e212ab4c74bdc1580b21ae2ef946c', class: "top" }, h("slot", { key: '6a8ac121b135b904892e87c1b2cfa2021e1d0b96', name: "top" })), h("div", { key: '09544cbf8904f0ebfdfeeaf805d203d8a4025d76', class: "bottom" }, h("slot", { key: '7357332d8b3992a67c466aa9f65b5f9a18d5e69a', name: "bottom" })))));
14
14
  }
15
15
  static get style() { return ZMyzCardFooterSectionsStyle0; }
16
16
  }, [1, "z-myz-card-footer-sections"]);
@@ -62,7 +62,7 @@ const ZMyzCardFooter$1 = /*@__PURE__*/ proxyCustomElement(class ZMyzCardFooter e
62
62
  return this.host.querySelector("[slot=list] > li a");
63
63
  }
64
64
  render() {
65
- return (h("div", { key: '83e5307ed8967021822985e89efa8558d0018e72', class: Object.assign(Object.assign({}, this.retrieveClass()), { wrapper: true }) }, h("footer", { key: 'cf70e9a043cb396ae4aabc3f8e01d1dcfa3d5665', class: this.retrieveClass(), onTransitionEnd: (e) => this.footerTransitionHandler(e) }, h("span", { key: 'd6bdb1b37ad753489715fafdc5304de27bf85edc', class: "toggle" }, h("slot", { key: 'b35d85cf87e3cd59d9989c1c7d4d7139fbc4d549', name: "toggle" })), this.titolo && h("p", { key: '36ad25e514b88f22927ee74d4a0a81ccfe52cc62', class: { "custom-content": this.customContent } }, this.titolo), h("div", { key: '56c2b85852b762e305a69a7f977f2a8fb7ec12a3', class: { "content": true, "custom-content": this.customContent } }, h("div", { key: '1cbc7add9f6238292fc9ea7567a51ccfc62b46c7' }, h("p", { key: 'c0404f81e382330d6e56320f02aceee17e085926', class: "authors", ref: (el) => (this.ellipsisAuthors = el) }, h("span", { key: '0ec1e3a90d09bc379b34269b276da18e3a4f9388', title: this.getTitleAuthors() }, h("span", { key: '8d65743c8185c0ee4eb3c071f535eb5cda8dabab', "aria-description": "Autori", class: "bold" }, this.autori))), h("p", { key: '744e7e705826acfc3f2a9f9305250a0ecb293274', class: "year-isbn" }, h("span", { key: '9d29d231ed9186ffeb7376cf947613a581b626da', class: "isbn" }, h("span", { key: 'b3f8863a8d5e21438dfcaef4394c2f92ae513913' }, h("span", { key: 'b88062286041d060510ff4d17362a2f29485d15f', "aria-description": "ISBN edizione cartacea", class: "bold" }, this.isbn), " ", "(ed. cartacea)")))), h("div", { key: 'ded3e83f86629e34067e1dd316e54427b65cac6f', class: `slot-handler ${this.isOpen ? "visible" : "hidden"}` }, h("slot", { key: 'a5239567c931b5b880eef53a09e934dd8e7b65de', name: "list" })))), this.customContent && h("slot", { key: '42670c82172f6f86102f0d51209e2297cdf2c338', name: "content" })));
65
+ return (h("div", { key: '6e5881056e1db48d540e8ef21116bee2c196b8c4', class: Object.assign(Object.assign({}, this.retrieveClass()), { wrapper: true }) }, h("footer", { key: '243b4a819cba9325d9425d63a23fcee9f9876b3d', class: this.retrieveClass(), onTransitionEnd: (e) => this.footerTransitionHandler(e) }, h("span", { key: 'cfc887864e6bf0c7fc8d08be05f0005a38aa869d', class: "toggle" }, h("slot", { key: 'a9e65157596b4a26eb19d5eee5a7b1a57d1feea4', name: "toggle" })), this.titolo && h("p", { key: '15b6bd8c19394d7bef24eb4e09720c0bb0a1685c', class: { "custom-content": this.customContent } }, this.titolo), h("div", { key: 'ebc158163ecd3b334daec7edb050b7e7b9f7df47', class: { "content": true, "custom-content": this.customContent } }, h("div", { key: '60590d4b3f2bcb949c21cde6a6d6a8a837a089a3' }, h("p", { key: '9b2f3b97f5de7f0760d623fc3761920aa3b1c845', class: "authors", ref: (el) => (this.ellipsisAuthors = el) }, h("span", { key: '807a82ffe180cec55e8d32124be8ca46eb572270', title: this.getTitleAuthors() }, h("span", { key: 'c9c790fcd14571bd4d15d991496b49392097990f', "aria-description": "Autori", class: "bold" }, this.autori))), h("p", { key: 'ca97678f9bc18bea8777c1a2ae994a954cab4cf3', class: "year-isbn" }, h("span", { key: '232aab4aaf39be78ace0ece41ea4060a4e355f9a', class: "isbn" }, h("span", { key: '301da712b177444f57a889ed25112a3837a65d2a' }, h("span", { key: 'e825aa9877d17cc64db355a0ddefc0d36195eab9', "aria-description": "ISBN edizione cartacea", class: "bold" }, this.isbn), " ", "(ed. cartacea)")))), h("div", { key: '91db300900421801d17073597173773e6df7f56d', class: `slot-handler ${this.isOpen ? "visible" : "hidden"}` }, h("slot", { key: '88c704a8e47124becd3659dc9b2e23be2165cee3', name: "list" })))), this.customContent && h("slot", { key: '2f73c782577a5b7394a24af188229c6c6a750612', name: "content" })));
66
66
  }
67
67
  get host() { return this; }
68
68
  static get style() { return ZMyzCardFooterStyle0; }
@@ -14,7 +14,7 @@ const ZMyzCardIcon$1 = /*@__PURE__*/ proxyCustomElement(class ZMyzCardIcon exten
14
14
  this.ariaLabel = "";
15
15
  }
16
16
  render() {
17
- return (h("button", { key: '9635ccd0f31e2fdf3e23cb14093b5eba6849c398', disabled: this.isdisabled, "aria-label": this.ariaLabel }, h("span", { key: 'de736d5eb1390564e2ffafb5a250594c8cf7a880' }, h("z-icon", { key: 'f93ea254dc71bf5ffae324ebab7bc467f511e403', name: this.icon, width: 16, height: 16 }))));
17
+ return (h("button", { key: '6eeee51373c90e15a165b2511675c1df63974289', disabled: this.isdisabled, "aria-label": this.ariaLabel }, h("span", { key: '197d99ffec190c40dd72ab22176ac502cf410951' }, h("z-icon", { key: '9b5f1fae74c6cd7ee9a8d7f66e90bee09e5fa7e9', name: this.icon, width: 16, height: 16 }))));
18
18
  }
19
19
  static get style() { return ZMyzCardIconStyle0; }
20
20
  }, [1, "z-myz-card-icon", {
@@ -121,7 +121,7 @@ const ZMyzCardInfo$1 = /*@__PURE__*/ proxyCustomElement(class ZMyzCardInfo exten
121
121
  return (h("section", { ref: (el) => (this.offlineLicenseWrapper = el) }, h("span", { class: "license-heading" }, h("span", null, "Licenza offline"), this.setExpirationLicenseMessage("offline")), "Scadenza il ", h("b", null, this.cardData.offlineLicense.expiration), h("br", null), "Installazioni disponibili: ", h("b", null, this.cardData.offlineLicense.installations)));
122
122
  }
123
123
  render() {
124
- return (h("div", { key: 'd1cea01909cd1c227b51cdc35de24751da0a0018' }, this.renderCloseIcon(), h("div", { key: '07fb4515f7735245515acf5b0b8685198aa2249a', class: "content-wrapper", ref: (el) => (this.contentWrapper = el) }, this.renderGeneralSection(), this.renderTooltip(), this.renderOnlineLicenseSection(), this.renderOfflineLicenseSection()), h("div", { key: 'cbaf2982c5ca62b1049ee900af1611ba01aa50fc', class: "cta-wrapper" }, h("slot", { key: '13033a69da6547029197f008abe3f9953eb09c12' }))));
124
+ return (h("div", { key: 'e6ef5ad3c71c2b049d77bf7b58b4eed49aff7f07' }, this.renderCloseIcon(), h("div", { key: '3709fc8d09e49fa1e56c89a9fd3453c677b0837b', class: "content-wrapper", ref: (el) => (this.contentWrapper = el) }, this.renderGeneralSection(), this.renderTooltip(), this.renderOnlineLicenseSection(), this.renderOfflineLicenseSection()), h("div", { key: '06f65296b31493f7e948f7af4de260443bf45c4a', class: "cta-wrapper" }, h("slot", { key: '1cd54dc4feef61416039fbf9d43c6f9a6ed0be25' }))));
125
125
  }
126
126
  static get style() { return ZMyzCardInfoStyle0; }
127
127
  }, [1, "z-myz-card-info", {
@@ -30,7 +30,7 @@ const ZMyzCardList$1 = /*@__PURE__*/ proxyCustomElement(class ZMyzCardList exten
30
30
  });
31
31
  }
32
32
  render() {
33
- return h("ul", { key: '9ddf6f6fb65ea56c128db833841501fc03559231' }, this.renderList(JSON.parse(this.listdata)));
33
+ return h("ul", { key: '608a46eb635be05ab1bb225bb28354f0a5e4ca44' }, this.renderList(JSON.parse(this.listdata)));
34
34
  }
35
35
  static get style() { return ZMyzCardListStyle0; }
36
36
  }, [1, "z-myz-card-list", {
@@ -26,7 +26,7 @@ const ZMyzList$1 = /*@__PURE__*/ proxyCustomElement(class ZMyzList extends HTMLE
26
26
  }
27
27
  render() {
28
28
  const lastElem = this.list ? this.list.length - 1 : -1;
29
- return (h("ul", { key: '6ec3bbeab4df0bb06bf5dd54f5a8d9e406da4446' }, this.list &&
29
+ return (h("ul", { key: '97237c224248c304a8c70ddb938beb0e416d246d' }, this.list &&
30
30
  this.list.map((bean, i) => (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 {