@zanichelli/albe-web-components 19.1.4-RC1 → 19.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (836) 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-f011b2e3.js → index-1ee051ca.js} +2 -2
  5. package/dist/cjs/{index-f011b2e3.js.map → index-1ee051ca.js.map} +1 -1
  6. package/dist/cjs/{index-09238e31.js → index-43dfc8b2.js} +3 -3
  7. package/dist/cjs/{index-09238e31.js.map → index-43dfc8b2.js.map} +1 -1
  8. package/dist/cjs/{index-1c7cd5df.js → index-5eb95b44.js} +2 -2
  9. package/dist/cjs/{index-1c7cd5df.js.map → index-5eb95b44.js.map} +1 -1
  10. package/dist/cjs/{index-805390c8.js → index-844c7a99.js} +5 -5
  11. package/dist/cjs/{index-805390c8.js.map → index-844c7a99.js.map} +1 -1
  12. package/dist/cjs/{index-62712250.js → index-8770e71a.js} +2 -2
  13. package/dist/cjs/{index-62712250.js.map → index-8770e71a.js.map} +1 -1
  14. package/dist/cjs/index-96af6326.js +8 -4
  15. package/dist/cjs/{index-66928615.js → index-d214a119.js} +3 -3
  16. package/dist/cjs/{index-66928615.js.map → index-d214a119.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 +2 -2
  28. package/dist/cjs/z-alert.cjs.entry.js +1 -1
  29. package/dist/cjs/z-anchor-navigation.cjs.entry.js +2 -2
  30. package/dist/cjs/z-app-header-deprecated.cjs.entry.js +2 -2
  31. package/dist/cjs/z-app-header_12.cjs.entry.js +111 -1028
  32. package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
  33. package/dist/cjs/z-aria-alert.cjs.entry.js +2 -2
  34. package/dist/cjs/z-avatar.cjs.entry.js +3 -3
  35. package/dist/cjs/z-book-card-app.cjs.entry.js +2 -2
  36. package/dist/cjs/z-book-card-deprecated.cjs.entry.js +3 -3
  37. package/dist/cjs/z-book-card.cjs.entry.js +1 -1
  38. package/dist/cjs/z-book-cover.cjs.entry.js +1 -1
  39. package/dist/cjs/z-breadcrumb.cjs.entry.js +4 -4
  40. package/dist/cjs/z-button-sort.cjs.entry.js +1 -1
  41. package/dist/cjs/z-card.cjs.entry.js +1 -1
  42. package/dist/cjs/z-carousel.cjs.entry.js +1 -1
  43. package/dist/cjs/z-chip.cjs.entry.js +3 -3
  44. package/dist/cjs/z-color-picker.cjs.entry.js +212 -0
  45. package/dist/cjs/z-color-picker.cjs.entry.js.map +1 -0
  46. package/dist/cjs/z-combobox.cjs.entry.js +3 -3
  47. package/dist/cjs/z-cover-hero.cjs.entry.js +3 -3
  48. package/dist/cjs/z-date-picker.cjs.entry.js +3 -3
  49. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +7 -7
  50. package/dist/cjs/z-file-upload.cjs.entry.js +1 -1
  51. package/dist/cjs/z-file.cjs.entry.js +2 -2
  52. package/dist/cjs/z-ghost-loading.cjs.entry.js +1 -1
  53. package/dist/cjs/z-info-box.cjs.entry.js +1 -1
  54. package/dist/cjs/z-info-reveal.cjs.entry.js +2 -2
  55. package/dist/cjs/z-logo.cjs.entry.js +1 -1
  56. package/dist/cjs/z-menu-deprecated.cjs.entry.js +1 -1
  57. package/dist/cjs/z-menu-section-deprecated.cjs.entry.js +1 -1
  58. package/dist/cjs/z-menu-section.cjs.entry.js +2 -2
  59. package/dist/cjs/z-menu.cjs.entry.js +2 -2
  60. package/dist/cjs/z-menu.cjs.entry.js.map +1 -1
  61. package/dist/cjs/z-myz-card-alert.cjs.entry.js +2 -2
  62. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +2 -2
  63. package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +1 -1
  64. package/dist/cjs/z-myz-card-footer.cjs.entry.js +2 -2
  65. package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
  66. package/dist/cjs/z-myz-card-info.cjs.entry.js +3 -3
  67. package/dist/cjs/z-myz-card-list.cjs.entry.js +1 -1
  68. package/dist/cjs/z-myz-card_4.cjs.entry.js +5 -5
  69. package/dist/cjs/z-myz-list-item.cjs.entry.js +3 -3
  70. package/dist/cjs/z-myz-list.cjs.entry.js +1 -1
  71. package/dist/cjs/z-navigation-tabs.cjs.entry.js +3 -3
  72. package/dist/cjs/z-notification.cjs.entry.js +2 -2
  73. package/dist/cjs/z-notification.cjs.entry.js.map +1 -1
  74. package/dist/cjs/z-otp.cjs.entry.js +3 -3
  75. package/dist/cjs/z-pagination.cjs.entry.js +1 -1
  76. package/dist/cjs/z-panel-elem.cjs.entry.js +2 -2
  77. package/dist/cjs/z-popover.cjs.entry.js +20 -16
  78. package/dist/cjs/z-popover.cjs.entry.js.map +1 -1
  79. package/dist/cjs/z-range-picker.cjs.entry.js +5 -5
  80. package/dist/cjs/z-section-title.cjs.entry.js +2 -2
  81. package/dist/cjs/z-select.cjs.entry.js +3 -3
  82. package/dist/cjs/z-skip-to-content.cjs.entry.js +3 -3
  83. package/dist/cjs/z-slideshow.cjs.entry.js +2 -2
  84. package/dist/cjs/z-stepper-item.cjs.entry.js +1 -1
  85. package/dist/cjs/z-stepper.cjs.entry.js +1 -1
  86. package/dist/cjs/z-table.cjs.entry.js +9 -9
  87. package/dist/cjs/z-tbody.cjs.entry.js +1 -1
  88. package/dist/cjs/z-td.cjs.entry.js +2 -2
  89. package/dist/cjs/z-tfoot.cjs.entry.js +1 -1
  90. package/dist/cjs/z-th.cjs.entry.js +2 -2
  91. package/dist/cjs/z-thead.cjs.entry.js +1 -1
  92. package/dist/cjs/z-toast-notification-list.cjs.entry.js +2 -2
  93. package/dist/cjs/z-toast-notification.cjs.entry.js +2 -2
  94. package/dist/cjs/z-toggle-button.cjs.entry.js +2 -2
  95. package/dist/cjs/z-toggle-switch.cjs.entry.js +5 -5
  96. package/dist/cjs/z-tool.cjs.entry.js +147 -42
  97. package/dist/cjs/z-tool.cjs.entry.js.map +1 -1
  98. package/dist/cjs/z-toolbar.cjs.entry.js +64 -66
  99. package/dist/cjs/z-toolbar.cjs.entry.js.map +1 -1
  100. package/dist/cjs/z-tooltip.cjs.entry.js +3 -2
  101. package/dist/cjs/z-tooltip.cjs.entry.js.map +1 -1
  102. package/dist/cjs/z-tr.cjs.entry.js +5 -5
  103. package/dist/cjs/z-tree-list.cjs.entry.js +2 -2
  104. package/dist/cjs/z-visually-hidden.cjs.entry.js +1 -1
  105. package/dist/collection/beans/index.js +48 -0
  106. package/dist/collection/beans/index.js.map +1 -1
  107. package/dist/collection/collection-manifest.json +1 -0
  108. package/dist/collection/components/book-card/z-book-card-app/index.js +1 -1
  109. package/dist/collection/components/date-picker/z-date-picker/index.js +1 -1
  110. package/dist/collection/components/date-picker/z-range-picker/index.js +3 -3
  111. package/dist/collection/components/deprecated/z-app-header-deprecated/index.js +1 -1
  112. package/dist/collection/components/deprecated/z-book-card-deprecated/index.js +1 -1
  113. package/dist/collection/components/deprecated/z-menu-deprecated/index.js +1 -1
  114. package/dist/collection/components/deprecated/z-menu-section-deprecated/index.js +1 -1
  115. package/dist/collection/components/deprecated/z-section-title/index.js +1 -1
  116. package/dist/collection/components/file-upload/z-dragdrop-area/index.js +2 -2
  117. package/dist/collection/components/file-upload/z-file/index.js +1 -1
  118. package/dist/collection/components/list/z-list/index.js +1 -1
  119. package/dist/collection/components/list/z-list-element/index.js +1 -1
  120. package/dist/collection/components/list/z-list-group/index.js +2 -2
  121. package/dist/collection/components/list/z-tree-list/index.js +1 -1
  122. package/dist/collection/components/table/cells/z-td/index.js +1 -1
  123. package/dist/collection/components/table/cells/z-th/index.js +1 -1
  124. package/dist/collection/components/table/z-table/index.js +1 -1
  125. package/dist/collection/components/table/z-tbody/index.js +1 -1
  126. package/dist/collection/components/table/z-tfoot/index.js +1 -1
  127. package/dist/collection/components/table/z-thead/index.js +1 -1
  128. package/dist/collection/components/table/z-tr/index.js +1 -1
  129. package/dist/collection/components/z-accordion/index.js +1 -1
  130. package/dist/collection/components/z-anchor-navigation/index.js +1 -1
  131. package/dist/collection/components/z-app-header/index.js +1 -1
  132. package/dist/collection/components/z-app-header/index.js.map +1 -1
  133. package/dist/collection/components/z-app-header/index.stories.js +42 -0
  134. package/dist/collection/components/z-app-header/index.stories.js.map +1 -1
  135. package/dist/collection/components/z-app-header/styles.css +8 -0
  136. package/dist/collection/components/z-aria-alert/index.js +1 -1
  137. package/dist/collection/components/z-avatar/index.js +2 -2
  138. package/dist/collection/components/z-book-cover/index.js +1 -1
  139. package/dist/collection/components/z-breadcrumb/index.js +2 -2
  140. package/dist/collection/components/z-button-sort/index.js +1 -1
  141. package/dist/collection/components/z-chip/index.js +2 -2
  142. package/dist/collection/components/z-color-picker/index.js +367 -0
  143. package/dist/collection/components/z-color-picker/index.js.map +1 -0
  144. package/dist/collection/components/z-color-picker/index.stories.js +34 -0
  145. package/dist/collection/components/z-color-picker/index.stories.js.map +1 -0
  146. package/dist/collection/components/z-color-picker/styles.css +74 -0
  147. package/dist/collection/components/z-combobox/index.js +1 -1
  148. package/dist/collection/components/z-cover-hero/index.js +2 -2
  149. package/dist/collection/components/z-divider/index.js +1 -1
  150. package/dist/collection/components/z-ghost-loading/index.js +1 -1
  151. package/dist/collection/components/z-icon/index.js +40 -9
  152. package/dist/collection/components/z-icon/index.js.map +1 -1
  153. package/dist/collection/components/z-icon/index.stories.js +34 -18
  154. package/dist/collection/components/z-icon/index.stories.js.map +1 -1
  155. package/dist/collection/components/z-icon/styles.css +15 -2
  156. package/dist/collection/components/z-info-box/index.js +1 -1
  157. package/dist/collection/components/z-info-reveal/index.js +1 -1
  158. package/dist/collection/components/z-input/index.js +1 -1
  159. package/dist/collection/components/z-input-message/index.js +1 -1
  160. package/dist/collection/components/z-logo/index.js +1 -1
  161. package/dist/collection/components/z-menu/index.js +1 -1
  162. package/dist/collection/components/z-menu/index.js.map +1 -1
  163. package/dist/collection/components/z-menu-section/index.js +1 -1
  164. package/dist/collection/components/z-modal/index.js +4 -4
  165. package/dist/collection/components/z-navigation-tabs/index.js +2 -2
  166. package/dist/collection/components/z-notification/index.js +1 -1
  167. package/dist/collection/components/z-notification/styles.css +2 -2
  168. package/dist/collection/components/z-offcanvas/index.js +89 -10
  169. package/dist/collection/components/z-offcanvas/index.js.map +1 -1
  170. package/dist/collection/components/z-panel-elem/index.js +2 -2
  171. package/dist/collection/components/z-popover/index.js +31 -21
  172. package/dist/collection/components/z-popover/index.js.map +1 -1
  173. package/dist/collection/components/z-popover/styles.css +18 -3
  174. package/dist/collection/components/z-searchbar/index.js +1 -1
  175. package/dist/collection/components/z-select/index.js +1 -1
  176. package/dist/collection/components/z-skip-to-content/index.js +1 -1
  177. package/dist/collection/components/z-stepper/index.js +1 -1
  178. package/dist/collection/components/z-stepper-item/index.js +1 -1
  179. package/dist/collection/components/z-tag/index.js +2 -2
  180. package/dist/collection/components/z-toast-notification/index.js +1 -1
  181. package/dist/collection/components/z-toast-notification-list/index.js +1 -1
  182. package/dist/collection/components/z-toggle-button/index.js +2 -2
  183. package/dist/collection/components/z-toggle-switch/index.js +3 -3
  184. package/dist/collection/components/z-tool/index.js +281 -48
  185. package/dist/collection/components/z-tool/index.js.map +1 -1
  186. package/dist/collection/components/z-tool/index.stories.js +89 -12
  187. package/dist/collection/components/z-tool/index.stories.js.map +1 -1
  188. package/dist/collection/components/z-tool/styles.css +30 -31
  189. package/dist/collection/components/z-toolbar/index.js +72 -91
  190. package/dist/collection/components/z-toolbar/index.js.map +1 -1
  191. package/dist/collection/components/z-toolbar/index.stories.js +190 -309
  192. package/dist/collection/components/z-toolbar/index.stories.js.map +1 -1
  193. package/dist/collection/components/z-toolbar/styles.css +10 -19
  194. package/dist/collection/components/z-tooltip/index.js +19 -1
  195. package/dist/collection/components/z-tooltip/index.js.map +1 -1
  196. package/dist/collection/components/z-visually-hidden/index.js +1 -1
  197. package/dist/collection/constants/iconset.js +152 -142
  198. package/dist/collection/constants/iconset.js.map +1 -1
  199. package/dist/collection/index.js +1 -0
  200. package/dist/collection/index.js.map +1 -1
  201. package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +1 -1
  202. package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +1 -1
  203. package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +1 -1
  204. package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +1 -1
  205. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
  206. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -1
  207. package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +1 -1
  208. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
  209. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +1 -1
  210. package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
  211. package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
  212. package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
  213. package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +1 -1
  214. package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
  215. package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
  216. package/dist/collection/utils/utils.js +33 -4
  217. package/dist/collection/utils/utils.js.map +1 -1
  218. package/dist/components/iconset.js +152 -143
  219. package/dist/components/iconset.js.map +1 -1
  220. package/dist/components/index.d.ts +2 -0
  221. package/dist/components/index.js +3 -1
  222. package/dist/components/index.js.map +1 -1
  223. package/dist/components/index10.js +17 -6
  224. package/dist/components/index10.js.map +1 -1
  225. package/dist/components/index11.js +1 -1
  226. package/dist/components/index12.js +1 -1
  227. package/dist/components/index13.js +1 -1
  228. package/dist/components/index14.js +1 -1
  229. package/dist/components/index15.js +1 -1
  230. package/dist/components/index16.js +2 -2
  231. package/dist/components/index17.js +4 -4
  232. package/dist/components/index18.js +1 -1
  233. package/dist/components/index19.js +1 -1
  234. package/dist/components/index2.js +49 -1
  235. package/dist/components/index2.js.map +1 -1
  236. package/dist/components/index20.js +1 -1
  237. package/dist/components/index21.js +1 -1
  238. package/dist/components/index22.js +1 -1
  239. package/dist/components/index23.js +84 -11
  240. package/dist/components/index23.js.map +1 -1
  241. package/dist/components/index24.js +19 -15
  242. package/dist/components/index24.js.map +1 -1
  243. package/dist/components/index25.js +1 -1
  244. package/dist/components/index26.js +2 -2
  245. package/dist/components/index27.js +55 -0
  246. package/dist/components/index27.js.map +1 -0
  247. package/dist/components/index3.js +1 -1
  248. package/dist/components/index4.js +1 -1
  249. package/dist/components/index6.js +2 -2
  250. package/dist/components/index7.js +1 -1
  251. package/dist/components/index8.js +2 -2
  252. package/dist/components/index9.js +1 -1
  253. package/dist/components/utils.js +33 -4
  254. package/dist/components/utils.js.map +1 -1
  255. package/dist/components/z-accordion.js +1 -1
  256. package/dist/components/z-anchor-navigation.js +1 -1
  257. package/dist/components/z-app-header-deprecated.js +1 -1
  258. package/dist/components/z-app-header.js +2 -2
  259. package/dist/components/z-app-header.js.map +1 -1
  260. package/dist/components/z-aria-alert.js +1 -1
  261. package/dist/components/z-avatar.js +2 -2
  262. package/dist/components/z-book-card-app.js +1 -1
  263. package/dist/components/z-book-card-deprecated.js +1 -1
  264. package/dist/components/z-breadcrumb.js +2 -2
  265. package/dist/components/z-button-sort.js +1 -1
  266. package/dist/components/z-color-picker.d.ts +11 -0
  267. package/dist/components/z-color-picker.js +234 -0
  268. package/dist/components/z-color-picker.js.map +1 -0
  269. package/dist/components/z-combobox.js +1 -1
  270. package/dist/components/z-cover-hero.js +2 -2
  271. package/dist/components/z-date-picker.js +1 -1
  272. package/dist/components/z-file.js +1 -1
  273. package/dist/components/z-info-box.js +1 -1
  274. package/dist/components/z-logo.js +1 -1
  275. package/dist/components/z-menu-deprecated.js +1 -1
  276. package/dist/components/z-menu-section-deprecated.js +1 -1
  277. package/dist/components/z-menu-section.js +1 -1
  278. package/dist/components/z-menu.js +1 -1
  279. package/dist/components/z-menu.js.map +1 -1
  280. package/dist/components/z-myz-card-alert.js +1 -1
  281. package/dist/components/z-myz-card-dictionary.js +1 -1
  282. package/dist/components/z-myz-card-footer-sections.js +1 -1
  283. package/dist/components/z-myz-card-footer.js +1 -1
  284. package/dist/components/z-myz-card-icon.js +1 -1
  285. package/dist/components/z-myz-card-info.js +1 -1
  286. package/dist/components/z-myz-card-list.js +1 -1
  287. package/dist/components/z-myz-list.js +1 -1
  288. package/dist/components/z-navigation-tabs.js +2 -2
  289. package/dist/components/z-notification.js +2 -2
  290. package/dist/components/z-notification.js.map +1 -1
  291. package/dist/components/z-otp.js +2 -2
  292. package/dist/components/z-panel-elem.js +2 -2
  293. package/dist/components/z-range-picker.js +3 -3
  294. package/dist/components/z-section-title.js +1 -1
  295. package/dist/components/z-select.js +1 -1
  296. package/dist/components/z-skip-to-content.js +1 -1
  297. package/dist/components/z-stepper-item.js +1 -1
  298. package/dist/components/z-stepper.js +1 -1
  299. package/dist/components/z-table.js +1 -1
  300. package/dist/components/z-tbody.js +1 -1
  301. package/dist/components/z-td.js +1 -1
  302. package/dist/components/z-tfoot.js +1 -1
  303. package/dist/components/z-th.js +1 -1
  304. package/dist/components/z-thead.js +1 -1
  305. package/dist/components/z-toast-notification-list.js +1 -1
  306. package/dist/components/z-toast-notification.js +1 -1
  307. package/dist/components/z-toggle-button.js +2 -2
  308. package/dist/components/z-toggle-switch.js +3 -3
  309. package/dist/components/z-tool.js +165 -49
  310. package/dist/components/z-tool.js.map +1 -1
  311. package/dist/components/z-toolbar.js +65 -68
  312. package/dist/components/z-toolbar.js.map +1 -1
  313. package/dist/components/z-tooltip.js +1 -50
  314. package/dist/components/z-tooltip.js.map +1 -1
  315. package/dist/components/z-tr.js +1 -1
  316. package/dist/components/z-tree-list.js +1 -1
  317. package/dist/components/z-visually-hidden.js +1 -1
  318. package/dist/esm/iconset-d7823b13.js +1013 -0
  319. package/dist/esm/iconset-d7823b13.js.map +1 -0
  320. package/dist/esm/{index-2a6324f8.js → index-106473a8.js} +50 -2
  321. package/dist/esm/index-106473a8.js.map +1 -0
  322. package/dist/esm/{index-0bcacbd3.js → index-21176e80.js} +2 -2
  323. package/dist/esm/{index-0bcacbd3.js.map → index-21176e80.js.map} +1 -1
  324. package/dist/esm/{index-b64ced16.js → index-39a920c4.js} +3 -3
  325. package/dist/esm/{index-b64ced16.js.map → index-39a920c4.js.map} +1 -1
  326. package/dist/esm/{index-36122d8f.js → index-41934729.js} +2 -2
  327. package/dist/esm/{index-36122d8f.js.map → index-41934729.js.map} +1 -1
  328. package/dist/esm/{index-f20179ad.js → index-4845b32f.js} +3 -3
  329. package/dist/esm/{index-f20179ad.js.map → index-4845b32f.js.map} +1 -1
  330. package/dist/esm/{index-0ea3c7c8.js → index-599cd05a.js} +2 -2
  331. package/dist/esm/{index-0ea3c7c8.js.map → index-599cd05a.js.map} +1 -1
  332. package/dist/esm/index-c8ceadeb.js +8 -4
  333. package/dist/esm/{index-8a9f6d27.js → index-d003e5d7.js} +5 -5
  334. package/dist/esm/{index-8a9f6d27.js.map → index-d003e5d7.js.map} +1 -1
  335. package/dist/esm/index.js +3 -2
  336. package/dist/esm/index.js.map +1 -1
  337. package/dist/esm/loader.js +1 -1
  338. package/dist/esm/{utils-e66d94c3.js → utils-1b64bcd9.js} +35 -6
  339. package/dist/esm/utils-1b64bcd9.js.map +1 -0
  340. package/dist/esm/{utils-227ef1c0.js → utils-93ac0e6c.js} +2 -2
  341. package/dist/esm/{utils-227ef1c0.js.map → utils-93ac0e6c.js.map} +1 -1
  342. package/dist/esm/web-components-library.js +1 -1
  343. package/dist/esm/z-accordion.entry.js +2 -2
  344. package/dist/esm/z-alert.entry.js +1 -1
  345. package/dist/esm/z-anchor-navigation.entry.js +2 -2
  346. package/dist/esm/z-app-header-deprecated.entry.js +2 -2
  347. package/dist/esm/z-app-header_12.entry.js +111 -1028
  348. package/dist/esm/z-app-header_12.entry.js.map +1 -1
  349. package/dist/esm/z-aria-alert.entry.js +2 -2
  350. package/dist/esm/z-avatar.entry.js +3 -3
  351. package/dist/esm/z-book-card-app.entry.js +2 -2
  352. package/dist/esm/z-book-card-deprecated.entry.js +3 -3
  353. package/dist/esm/z-book-card.entry.js +1 -1
  354. package/dist/esm/z-book-cover.entry.js +1 -1
  355. package/dist/esm/z-breadcrumb.entry.js +4 -4
  356. package/dist/esm/z-button-sort.entry.js +1 -1
  357. package/dist/esm/z-card.entry.js +1 -1
  358. package/dist/esm/z-carousel.entry.js +1 -1
  359. package/dist/esm/z-chip.entry.js +3 -3
  360. package/dist/esm/z-color-picker.entry.js +208 -0
  361. package/dist/esm/z-color-picker.entry.js.map +1 -0
  362. package/dist/esm/z-combobox.entry.js +3 -3
  363. package/dist/esm/z-cover-hero.entry.js +3 -3
  364. package/dist/esm/z-date-picker.entry.js +3 -3
  365. package/dist/esm/z-dragdrop-area_2.entry.js +7 -7
  366. package/dist/esm/z-file-upload.entry.js +1 -1
  367. package/dist/esm/z-file.entry.js +2 -2
  368. package/dist/esm/z-ghost-loading.entry.js +1 -1
  369. package/dist/esm/z-info-box.entry.js +1 -1
  370. package/dist/esm/z-info-reveal.entry.js +2 -2
  371. package/dist/esm/z-logo.entry.js +1 -1
  372. package/dist/esm/z-menu-deprecated.entry.js +1 -1
  373. package/dist/esm/z-menu-section-deprecated.entry.js +1 -1
  374. package/dist/esm/z-menu-section.entry.js +2 -2
  375. package/dist/esm/z-menu.entry.js +2 -2
  376. package/dist/esm/z-menu.entry.js.map +1 -1
  377. package/dist/esm/z-myz-card-alert.entry.js +2 -2
  378. package/dist/esm/z-myz-card-dictionary.entry.js +2 -2
  379. package/dist/esm/z-myz-card-footer-sections.entry.js +1 -1
  380. package/dist/esm/z-myz-card-footer.entry.js +2 -2
  381. package/dist/esm/z-myz-card-icon.entry.js +1 -1
  382. package/dist/esm/z-myz-card-info.entry.js +3 -3
  383. package/dist/esm/z-myz-card-list.entry.js +1 -1
  384. package/dist/esm/z-myz-card_4.entry.js +5 -5
  385. package/dist/esm/z-myz-list-item.entry.js +3 -3
  386. package/dist/esm/z-myz-list.entry.js +1 -1
  387. package/dist/esm/z-navigation-tabs.entry.js +3 -3
  388. package/dist/esm/z-notification.entry.js +2 -2
  389. package/dist/esm/z-notification.entry.js.map +1 -1
  390. package/dist/esm/z-otp.entry.js +3 -3
  391. package/dist/esm/z-pagination.entry.js +1 -1
  392. package/dist/esm/z-panel-elem.entry.js +2 -2
  393. package/dist/esm/z-popover.entry.js +20 -16
  394. package/dist/esm/z-popover.entry.js.map +1 -1
  395. package/dist/esm/z-range-picker.entry.js +5 -5
  396. package/dist/esm/z-section-title.entry.js +2 -2
  397. package/dist/esm/z-select.entry.js +3 -3
  398. package/dist/esm/z-skip-to-content.entry.js +3 -3
  399. package/dist/esm/z-slideshow.entry.js +2 -2
  400. package/dist/esm/z-stepper-item.entry.js +1 -1
  401. package/dist/esm/z-stepper.entry.js +1 -1
  402. package/dist/esm/z-table.entry.js +9 -9
  403. package/dist/esm/z-tbody.entry.js +1 -1
  404. package/dist/esm/z-td.entry.js +2 -2
  405. package/dist/esm/z-tfoot.entry.js +1 -1
  406. package/dist/esm/z-th.entry.js +2 -2
  407. package/dist/esm/z-thead.entry.js +1 -1
  408. package/dist/esm/z-toast-notification-list.entry.js +2 -2
  409. package/dist/esm/z-toast-notification.entry.js +2 -2
  410. package/dist/esm/z-toggle-button.entry.js +2 -2
  411. package/dist/esm/z-toggle-switch.entry.js +5 -5
  412. package/dist/esm/z-tool.entry.js +147 -42
  413. package/dist/esm/z-tool.entry.js.map +1 -1
  414. package/dist/esm/z-toolbar.entry.js +64 -66
  415. package/dist/esm/z-toolbar.entry.js.map +1 -1
  416. package/dist/esm/z-tooltip.entry.js +4 -3
  417. package/dist/esm/z-tooltip.entry.js.map +1 -1
  418. package/dist/esm/z-tr.entry.js +5 -5
  419. package/dist/esm/z-tree-list.entry.js +2 -2
  420. package/dist/esm/z-visually-hidden.entry.js +1 -1
  421. package/dist/types/beans/index.d.ts +184 -0
  422. package/dist/types/components/z-app-header/index.stories.d.ts +16 -0
  423. package/dist/types/components/z-color-picker/index.d.ts +64 -0
  424. package/dist/types/components/z-color-picker/index.stories.d.ts +33 -0
  425. package/dist/types/components/z-icon/index.d.ts +19 -5
  426. package/dist/types/components/z-icon/index.stories.d.ts +23 -10
  427. package/dist/types/components/z-offcanvas/index.d.ts +24 -0
  428. package/dist/types/components/z-popover/index.d.ts +9 -4
  429. package/dist/types/components/z-tool/index.d.ts +73 -9
  430. package/dist/types/components/z-tool/index.stories.d.ts +38 -12
  431. package/dist/types/components/z-toolbar/index.d.ts +23 -6
  432. package/dist/types/components/z-toolbar/index.stories.d.ts +23 -20
  433. package/dist/types/components/z-tooltip/index.d.ts +8 -0
  434. package/dist/types/components.d.ts +189 -35
  435. package/dist/types/constants/iconset.d.ts +281 -141
  436. package/dist/types/index.d.ts +1 -0
  437. package/dist/types/utils/utils.d.ts +3 -2
  438. package/dist/web-components-library/index.esm.js +1 -1
  439. package/dist/web-components-library/index.esm.js.map +1 -1
  440. package/{www/build/p-5a24e268.entry.js → dist/web-components-library/p-03a558ef.entry.js} +2 -2
  441. package/dist/web-components-library/p-0989655c.entry.js +2 -0
  442. package/dist/web-components-library/p-0989655c.entry.js.map +1 -0
  443. package/dist/web-components-library/p-0a192ddf.entry.js +2 -0
  444. package/dist/web-components-library/p-0a192ddf.entry.js.map +1 -0
  445. package/dist/web-components-library/{p-d9c9de15.entry.js → p-15951fc6.entry.js} +2 -2
  446. package/dist/web-components-library/p-17e2fed2.entry.js +2 -0
  447. package/dist/web-components-library/{p-b7ec2cc4.entry.js → p-19172b2c.entry.js} +2 -2
  448. package/{www/build/p-94916bdf.entry.js → dist/web-components-library/p-1939116a.entry.js} +2 -2
  449. package/dist/web-components-library/p-1a0c206d.js +2 -0
  450. package/dist/web-components-library/p-1a0c206d.js.map +1 -0
  451. package/dist/web-components-library/{p-b71a3f69.entry.js → p-1e0d85d5.entry.js} +2 -2
  452. package/dist/web-components-library/{p-bdbcf353.entry.js → p-215b1fa5.entry.js} +2 -2
  453. package/dist/web-components-library/{p-99210133.entry.js → p-2501dd29.entry.js} +2 -2
  454. package/dist/web-components-library/p-2a04c00e.entry.js +2 -0
  455. package/dist/web-components-library/{p-816fd6dc.entry.js.map → p-2a04c00e.entry.js.map} +1 -1
  456. package/{www/build/p-1fd1cf02.entry.js → dist/web-components-library/p-2bba665d.entry.js} +2 -2
  457. package/dist/web-components-library/{p-5a1f98a2.entry.js → p-2f45f1ff.entry.js} +2 -2
  458. package/dist/web-components-library/{p-86160fe3.entry.js → p-332e0361.entry.js} +2 -2
  459. package/{www/build/p-4cec3345.entry.js → dist/web-components-library/p-3d02ad75.entry.js} +2 -2
  460. package/dist/web-components-library/{p-240de9aa.entry.js → p-3f66654f.entry.js} +2 -2
  461. package/{www/build/p-8c164e0d.entry.js → dist/web-components-library/p-41891d34.entry.js} +2 -2
  462. package/dist/web-components-library/{p-ceeb3e2a.entry.js → p-4df66afe.entry.js} +2 -2
  463. package/{www/build/p-748fa3ae.js → dist/web-components-library/p-54cd104c.js} +2 -2
  464. package/dist/web-components-library/{p-01f941c2.entry.js → p-57dcff49.entry.js} +2 -2
  465. package/{www/build/p-b96900bb.entry.js → dist/web-components-library/p-59baa7f5.entry.js} +2 -2
  466. package/dist/web-components-library/{p-4551b0df.entry.js → p-5cdd431e.entry.js} +2 -2
  467. package/dist/web-components-library/{p-f19f12b1.js → p-5f1e17cb.js} +2 -2
  468. package/{www/build/p-c778bf87.entry.js → dist/web-components-library/p-5fda8769.entry.js} +3 -3
  469. package/dist/web-components-library/{p-4affbb99.entry.js → p-661bce1c.entry.js} +2 -2
  470. package/dist/web-components-library/{p-ee695830.entry.js → p-66c0f993.entry.js} +2 -2
  471. package/dist/web-components-library/{p-e9e2ceb4.entry.js → p-684142d7.entry.js} +2 -2
  472. package/dist/web-components-library/p-6af67a60.entry.js +2 -0
  473. package/dist/web-components-library/p-6af67a60.entry.js.map +1 -0
  474. package/dist/web-components-library/p-6c3d141b.entry.js +2 -0
  475. package/dist/web-components-library/{p-22ba2a17.entry.js → p-6d11da08.entry.js} +2 -2
  476. package/{www/build/p-b7b972c0.entry.js → dist/web-components-library/p-6d61933f.entry.js} +2 -2
  477. package/dist/web-components-library/{p-44459393.entry.js → p-6ef58a14.entry.js} +2 -2
  478. package/dist/web-components-library/{p-a905df88.entry.js → p-71f62226.entry.js} +2 -2
  479. package/dist/web-components-library/p-76003048.entry.js +2 -0
  480. package/dist/web-components-library/p-76003048.entry.js.map +1 -0
  481. package/dist/web-components-library/{p-0a49dd1c.entry.js → p-7b199026.entry.js} +2 -2
  482. package/dist/web-components-library/p-7d6c4b21.entry.js +2 -0
  483. package/dist/web-components-library/p-7d6c4b21.entry.js.map +1 -0
  484. package/dist/web-components-library/{p-d7f12672.js → p-80285500.js} +2 -2
  485. package/dist/web-components-library/p-80ddecaf.entry.js +2 -0
  486. package/dist/web-components-library/p-839e2478.entry.js +2 -0
  487. package/{www/build/p-2aeffcf9.entry.js → dist/web-components-library/p-84ed6163.entry.js} +2 -2
  488. package/dist/web-components-library/p-86618221.js +2 -0
  489. package/dist/web-components-library/p-86618221.js.map +1 -0
  490. package/dist/web-components-library/{p-757415e9.entry.js → p-88a9865c.entry.js} +2 -2
  491. package/{www/build/p-1844a4f4.entry.js → dist/web-components-library/p-8a53fefb.entry.js} +2 -2
  492. package/dist/web-components-library/{p-d6a7b7f3.entry.js → p-8b562dca.entry.js} +2 -2
  493. package/dist/web-components-library/{p-2f948bac.entry.js → p-90690d4d.entry.js} +2 -2
  494. package/dist/web-components-library/{p-04f80811.entry.js → p-9a63ec80.entry.js} +2 -2
  495. package/dist/web-components-library/p-9af837bb.entry.js +2 -0
  496. package/dist/web-components-library/p-a32ebcc3.entry.js +2 -0
  497. package/dist/web-components-library/p-a7bb5e87.js +2 -0
  498. package/{www/build/p-030257b3.js.map → dist/web-components-library/p-a7bb5e87.js.map} +1 -1
  499. package/dist/web-components-library/p-b06af2fc.js +2 -0
  500. package/{www/build/p-817689d5.entry.js → dist/web-components-library/p-b1f2388a.entry.js} +3 -3
  501. package/dist/web-components-library/{p-342b0eb0.entry.js → p-b421424f.entry.js} +2 -2
  502. package/dist/web-components-library/{p-fb232d07.entry.js → p-b4b264b1.entry.js} +2 -2
  503. package/dist/web-components-library/{p-cc18a2b7.entry.js → p-b8211903.entry.js} +2 -2
  504. package/{www/build/p-b63c8e8b.entry.js → dist/web-components-library/p-b854cc3d.entry.js} +2 -2
  505. package/dist/web-components-library/{p-4a257653.entry.js → p-c03767a4.entry.js} +2 -2
  506. package/dist/web-components-library/{p-2bdac94e.entry.js → p-c0b4f29d.entry.js} +2 -2
  507. package/dist/web-components-library/{p-7a4f6a5b.entry.js → p-c57bb632.entry.js} +2 -2
  508. package/dist/web-components-library/{p-3f5aa623.entry.js → p-c5d52872.entry.js} +2 -2
  509. package/dist/web-components-library/p-c5d52872.entry.js.map +1 -0
  510. package/dist/web-components-library/p-c5e032de.entry.js +2 -0
  511. package/dist/web-components-library/p-c5e032de.entry.js.map +1 -0
  512. package/{www/build/p-34975328.entry.js → dist/web-components-library/p-c645dc11.entry.js} +2 -2
  513. package/dist/web-components-library/p-c93c6135.entry.js +2 -0
  514. package/dist/web-components-library/{p-deb7f8d7.entry.js.map → p-c93c6135.entry.js.map} +1 -1
  515. package/dist/web-components-library/{p-30e42fb1.js → p-cb395500.js} +2 -2
  516. package/dist/web-components-library/{p-5989465b.entry.js → p-cc87d814.entry.js} +2 -2
  517. package/dist/web-components-library/{p-1c7550f9.entry.js → p-d1a04722.entry.js} +2 -2
  518. package/{www/build/p-e3b82454.entry.js → dist/web-components-library/p-d1fe7960.entry.js} +2 -2
  519. package/dist/web-components-library/{p-5159edb1.entry.js → p-d5ebbfdf.entry.js} +2 -2
  520. package/dist/web-components-library/p-d65aeb54.entry.js +2 -0
  521. package/dist/web-components-library/{p-2612e3a2.entry.js → p-daa442e6.entry.js} +2 -2
  522. package/dist/web-components-library/p-db2c3235.entry.js +2 -0
  523. package/dist/web-components-library/p-db2c3235.entry.js.map +1 -0
  524. package/dist/web-components-library/{p-e0b88075.entry.js → p-dba260f2.entry.js} +2 -2
  525. package/dist/web-components-library/{p-943db3a8.entry.js → p-ddae9016.entry.js} +2 -2
  526. package/dist/web-components-library/p-de313d96.entry.js +2 -0
  527. package/dist/web-components-library/{p-375f8542.entry.js → p-e38a5dd2.entry.js} +2 -2
  528. package/dist/web-components-library/p-eb15536d.js +2 -0
  529. package/dist/web-components-library/p-eb15536d.js.map +1 -0
  530. package/{www/build/p-f4bac89b.entry.js → dist/web-components-library/p-eb9161bc.entry.js} +2 -2
  531. package/dist/web-components-library/{p-8687691b.entry.js → p-f0f53bb2.entry.js} +2 -2
  532. package/dist/web-components-library/p-f79010de.js +2 -0
  533. package/{www/build/p-19f5b6a9.entry.js → dist/web-components-library/p-f9e41b2e.entry.js} +2 -2
  534. package/dist/web-components-library/web-components-library.esm.js +1 -1
  535. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  536. package/package.json +3 -4
  537. package/react/components.d.ts +1 -0
  538. package/react/components.js +3 -2
  539. package/react/components.js.map +1 -1
  540. package/www/build/index.esm.js +1 -1
  541. package/www/build/index.esm.js.map +1 -1
  542. package/{dist/web-components-library/p-5a24e268.entry.js → www/build/p-03a558ef.entry.js} +2 -2
  543. package/www/build/p-0989655c.entry.js +2 -0
  544. package/www/build/p-0989655c.entry.js.map +1 -0
  545. package/www/build/p-0a192ddf.entry.js +2 -0
  546. package/www/build/p-0a192ddf.entry.js.map +1 -0
  547. package/www/build/{p-d9c9de15.entry.js → p-15951fc6.entry.js} +2 -2
  548. package/www/build/p-17e2fed2.entry.js +2 -0
  549. package/www/build/{p-b7ec2cc4.entry.js → p-19172b2c.entry.js} +2 -2
  550. package/{dist/web-components-library/p-94916bdf.entry.js → www/build/p-1939116a.entry.js} +2 -2
  551. package/www/build/p-1a0c206d.js +2 -0
  552. package/www/build/p-1a0c206d.js.map +1 -0
  553. package/www/build/{p-b71a3f69.entry.js → p-1e0d85d5.entry.js} +2 -2
  554. package/www/build/{p-bdbcf353.entry.js → p-215b1fa5.entry.js} +2 -2
  555. package/www/build/{p-99210133.entry.js → p-2501dd29.entry.js} +2 -2
  556. package/www/build/p-2a04c00e.entry.js +2 -0
  557. package/www/build/{p-816fd6dc.entry.js.map → p-2a04c00e.entry.js.map} +1 -1
  558. package/{dist/web-components-library/p-1fd1cf02.entry.js → www/build/p-2bba665d.entry.js} +2 -2
  559. package/www/build/{p-5a1f98a2.entry.js → p-2f45f1ff.entry.js} +2 -2
  560. package/www/build/{p-86160fe3.entry.js → p-332e0361.entry.js} +2 -2
  561. package/www/build/p-385363df.js +2 -0
  562. package/{dist/web-components-library/p-4cec3345.entry.js → www/build/p-3d02ad75.entry.js} +2 -2
  563. package/www/build/{p-240de9aa.entry.js → p-3f66654f.entry.js} +2 -2
  564. package/{dist/web-components-library/p-8c164e0d.entry.js → www/build/p-41891d34.entry.js} +2 -2
  565. package/www/build/{p-ceeb3e2a.entry.js → p-4df66afe.entry.js} +2 -2
  566. package/{dist/web-components-library/p-748fa3ae.js → www/build/p-54cd104c.js} +2 -2
  567. package/www/build/{p-01f941c2.entry.js → p-57dcff49.entry.js} +2 -2
  568. package/{dist/web-components-library/p-b96900bb.entry.js → www/build/p-59baa7f5.entry.js} +2 -2
  569. package/www/build/{p-4551b0df.entry.js → p-5cdd431e.entry.js} +2 -2
  570. package/www/build/{p-f19f12b1.js → p-5f1e17cb.js} +2 -2
  571. package/{dist/web-components-library/p-c778bf87.entry.js → www/build/p-5fda8769.entry.js} +3 -3
  572. package/www/build/{p-4affbb99.entry.js → p-661bce1c.entry.js} +2 -2
  573. package/www/build/{p-ee695830.entry.js → p-66c0f993.entry.js} +2 -2
  574. package/www/build/{p-e9e2ceb4.entry.js → p-684142d7.entry.js} +2 -2
  575. package/www/build/p-6af67a60.entry.js +2 -0
  576. package/www/build/p-6af67a60.entry.js.map +1 -0
  577. package/www/build/p-6c3d141b.entry.js +2 -0
  578. package/www/build/{p-22ba2a17.entry.js → p-6d11da08.entry.js} +2 -2
  579. package/{dist/web-components-library/p-b7b972c0.entry.js → www/build/p-6d61933f.entry.js} +2 -2
  580. package/www/build/{p-44459393.entry.js → p-6ef58a14.entry.js} +2 -2
  581. package/www/build/{p-a905df88.entry.js → p-71f62226.entry.js} +2 -2
  582. package/www/build/p-76003048.entry.js +2 -0
  583. package/www/build/p-76003048.entry.js.map +1 -0
  584. package/www/build/{p-0a49dd1c.entry.js → p-7b199026.entry.js} +2 -2
  585. package/www/build/p-7d6c4b21.entry.js +2 -0
  586. package/www/build/p-7d6c4b21.entry.js.map +1 -0
  587. package/www/build/{p-d7f12672.js → p-80285500.js} +2 -2
  588. package/www/build/p-80ddecaf.entry.js +2 -0
  589. package/www/build/p-839e2478.entry.js +2 -0
  590. package/{dist/web-components-library/p-2aeffcf9.entry.js → www/build/p-84ed6163.entry.js} +2 -2
  591. package/www/build/p-86618221.js +2 -0
  592. package/www/build/p-86618221.js.map +1 -0
  593. package/www/build/{p-757415e9.entry.js → p-88a9865c.entry.js} +2 -2
  594. package/{dist/web-components-library/p-1844a4f4.entry.js → www/build/p-8a53fefb.entry.js} +2 -2
  595. package/www/build/{p-d6a7b7f3.entry.js → p-8b562dca.entry.js} +2 -2
  596. package/www/build/{p-2f948bac.entry.js → p-90690d4d.entry.js} +2 -2
  597. package/www/build/{p-04f80811.entry.js → p-9a63ec80.entry.js} +2 -2
  598. package/www/build/p-9af837bb.entry.js +2 -0
  599. package/www/build/p-a32ebcc3.entry.js +2 -0
  600. package/www/build/p-a7bb5e87.js +2 -0
  601. package/{dist/web-components-library/p-030257b3.js.map → www/build/p-a7bb5e87.js.map} +1 -1
  602. package/www/build/p-b06af2fc.js +2 -0
  603. package/{dist/web-components-library/p-817689d5.entry.js → www/build/p-b1f2388a.entry.js} +3 -3
  604. package/www/build/{p-342b0eb0.entry.js → p-b421424f.entry.js} +2 -2
  605. package/www/build/{p-fb232d07.entry.js → p-b4b264b1.entry.js} +2 -2
  606. package/www/build/{p-cc18a2b7.entry.js → p-b8211903.entry.js} +2 -2
  607. package/{dist/web-components-library/p-b63c8e8b.entry.js → www/build/p-b854cc3d.entry.js} +2 -2
  608. package/www/build/{p-4a257653.entry.js → p-c03767a4.entry.js} +2 -2
  609. package/www/build/{p-2bdac94e.entry.js → p-c0b4f29d.entry.js} +2 -2
  610. package/www/build/{p-7a4f6a5b.entry.js → p-c57bb632.entry.js} +2 -2
  611. package/www/build/{p-3f5aa623.entry.js → p-c5d52872.entry.js} +2 -2
  612. package/www/build/p-c5d52872.entry.js.map +1 -0
  613. package/www/build/p-c5e032de.entry.js +2 -0
  614. package/www/build/p-c5e032de.entry.js.map +1 -0
  615. package/{dist/web-components-library/p-34975328.entry.js → www/build/p-c645dc11.entry.js} +2 -2
  616. package/www/build/p-c93c6135.entry.js +2 -0
  617. package/www/build/{p-deb7f8d7.entry.js.map → p-c93c6135.entry.js.map} +1 -1
  618. package/www/build/{p-30e42fb1.js → p-cb395500.js} +2 -2
  619. package/www/build/{p-5989465b.entry.js → p-cc87d814.entry.js} +2 -2
  620. package/www/build/{p-1c7550f9.entry.js → p-d1a04722.entry.js} +2 -2
  621. package/{dist/web-components-library/p-e3b82454.entry.js → www/build/p-d1fe7960.entry.js} +2 -2
  622. package/www/build/{p-5159edb1.entry.js → p-d5ebbfdf.entry.js} +2 -2
  623. package/www/build/p-d65aeb54.entry.js +2 -0
  624. package/www/build/{p-2612e3a2.entry.js → p-daa442e6.entry.js} +2 -2
  625. package/www/build/p-db2c3235.entry.js +2 -0
  626. package/www/build/p-db2c3235.entry.js.map +1 -0
  627. package/www/build/{p-e0b88075.entry.js → p-dba260f2.entry.js} +2 -2
  628. package/www/build/{p-943db3a8.entry.js → p-ddae9016.entry.js} +2 -2
  629. package/www/build/p-de313d96.entry.js +2 -0
  630. package/www/build/{p-375f8542.entry.js → p-e38a5dd2.entry.js} +2 -2
  631. package/www/build/p-eb15536d.js +2 -0
  632. package/www/build/p-eb15536d.js.map +1 -0
  633. package/{dist/web-components-library/p-f4bac89b.entry.js → www/build/p-eb9161bc.entry.js} +2 -2
  634. package/www/build/{p-8687691b.entry.js → p-f0f53bb2.entry.js} +2 -2
  635. package/www/build/p-f79010de.js +2 -0
  636. package/{dist/web-components-library/p-19f5b6a9.entry.js → www/build/p-f9e41b2e.entry.js} +2 -2
  637. package/www/build/web-components-library.esm.js +1 -1
  638. package/www/build/web-components-library.esm.js.map +1 -1
  639. package/www/index.html +1 -1
  640. package/dist/cjs/index-97a4c18d.js.map +0 -1
  641. package/dist/cjs/utils-5148245a.js.map +0 -1
  642. package/dist/esm/index-2a6324f8.js.map +0 -1
  643. package/dist/esm/utils-e66d94c3.js.map +0 -1
  644. package/dist/web-components-library/p-030257b3.js +0 -2
  645. package/dist/web-components-library/p-1170826b.js +0 -2
  646. package/dist/web-components-library/p-17af7fb2.js +0 -2
  647. package/dist/web-components-library/p-17af7fb2.js.map +0 -1
  648. package/dist/web-components-library/p-17e1abca.entry.js +0 -2
  649. package/dist/web-components-library/p-17e1abca.entry.js.map +0 -1
  650. package/dist/web-components-library/p-198b1692.entry.js +0 -2
  651. package/dist/web-components-library/p-22128478.entry.js +0 -2
  652. package/dist/web-components-library/p-22128478.entry.js.map +0 -1
  653. package/dist/web-components-library/p-237fcaa9.entry.js +0 -2
  654. package/dist/web-components-library/p-334cba5d.entry.js +0 -2
  655. package/dist/web-components-library/p-334cba5d.entry.js.map +0 -1
  656. package/dist/web-components-library/p-3f5aa623.entry.js.map +0 -1
  657. package/dist/web-components-library/p-4c9bf42d.js +0 -2
  658. package/dist/web-components-library/p-60e3fa30.entry.js +0 -2
  659. package/dist/web-components-library/p-6cffbabc.entry.js +0 -2
  660. package/dist/web-components-library/p-6cffbabc.entry.js.map +0 -1
  661. package/dist/web-components-library/p-816fd6dc.entry.js +0 -2
  662. package/dist/web-components-library/p-9e3da0b7.entry.js +0 -2
  663. package/dist/web-components-library/p-bc7fd8af.entry.js +0 -2
  664. package/dist/web-components-library/p-bc7fd8af.entry.js.map +0 -1
  665. package/dist/web-components-library/p-d2035d26.entry.js +0 -2
  666. package/dist/web-components-library/p-d75f8bbb.entry.js +0 -2
  667. package/dist/web-components-library/p-d90d2698.entry.js +0 -2
  668. package/dist/web-components-library/p-deb7f8d7.entry.js +0 -2
  669. package/dist/web-components-library/p-e5407cc1.entry.js +0 -2
  670. package/dist/web-components-library/p-e6778114.js +0 -2
  671. package/dist/web-components-library/p-e6778114.js.map +0 -1
  672. package/dist/web-components-library/p-f5dfd04d.entry.js +0 -2
  673. package/dist/web-components-library/p-f5dfd04d.entry.js.map +0 -1
  674. package/www/build/p-030257b3.js +0 -2
  675. package/www/build/p-0aba9c42.js +0 -2
  676. package/www/build/p-1170826b.js +0 -2
  677. package/www/build/p-17af7fb2.js +0 -2
  678. package/www/build/p-17af7fb2.js.map +0 -1
  679. package/www/build/p-17e1abca.entry.js +0 -2
  680. package/www/build/p-17e1abca.entry.js.map +0 -1
  681. package/www/build/p-198b1692.entry.js +0 -2
  682. package/www/build/p-22128478.entry.js +0 -2
  683. package/www/build/p-22128478.entry.js.map +0 -1
  684. package/www/build/p-237fcaa9.entry.js +0 -2
  685. package/www/build/p-334cba5d.entry.js +0 -2
  686. package/www/build/p-334cba5d.entry.js.map +0 -1
  687. package/www/build/p-3f5aa623.entry.js.map +0 -1
  688. package/www/build/p-4c9bf42d.js +0 -2
  689. package/www/build/p-60e3fa30.entry.js +0 -2
  690. package/www/build/p-6cffbabc.entry.js +0 -2
  691. package/www/build/p-6cffbabc.entry.js.map +0 -1
  692. package/www/build/p-816fd6dc.entry.js +0 -2
  693. package/www/build/p-9e3da0b7.entry.js +0 -2
  694. package/www/build/p-bc7fd8af.entry.js +0 -2
  695. package/www/build/p-bc7fd8af.entry.js.map +0 -1
  696. package/www/build/p-d2035d26.entry.js +0 -2
  697. package/www/build/p-d75f8bbb.entry.js +0 -2
  698. package/www/build/p-d90d2698.entry.js +0 -2
  699. package/www/build/p-deb7f8d7.entry.js +0 -2
  700. package/www/build/p-e5407cc1.entry.js +0 -2
  701. package/www/build/p-e6778114.js +0 -2
  702. package/www/build/p-e6778114.js.map +0 -1
  703. package/www/build/p-f5dfd04d.entry.js +0 -2
  704. package/www/build/p-f5dfd04d.entry.js.map +0 -1
  705. /package/dist/web-components-library/{p-5a24e268.entry.js.map → p-03a558ef.entry.js.map} +0 -0
  706. /package/dist/web-components-library/{p-d9c9de15.entry.js.map → p-15951fc6.entry.js.map} +0 -0
  707. /package/dist/web-components-library/{p-237fcaa9.entry.js.map → p-17e2fed2.entry.js.map} +0 -0
  708. /package/dist/web-components-library/{p-b7ec2cc4.entry.js.map → p-19172b2c.entry.js.map} +0 -0
  709. /package/dist/web-components-library/{p-94916bdf.entry.js.map → p-1939116a.entry.js.map} +0 -0
  710. /package/dist/web-components-library/{p-b71a3f69.entry.js.map → p-1e0d85d5.entry.js.map} +0 -0
  711. /package/dist/web-components-library/{p-bdbcf353.entry.js.map → p-215b1fa5.entry.js.map} +0 -0
  712. /package/dist/web-components-library/{p-99210133.entry.js.map → p-2501dd29.entry.js.map} +0 -0
  713. /package/dist/web-components-library/{p-1fd1cf02.entry.js.map → p-2bba665d.entry.js.map} +0 -0
  714. /package/dist/web-components-library/{p-5a1f98a2.entry.js.map → p-2f45f1ff.entry.js.map} +0 -0
  715. /package/dist/web-components-library/{p-86160fe3.entry.js.map → p-332e0361.entry.js.map} +0 -0
  716. /package/dist/web-components-library/{p-4cec3345.entry.js.map → p-3d02ad75.entry.js.map} +0 -0
  717. /package/dist/web-components-library/{p-240de9aa.entry.js.map → p-3f66654f.entry.js.map} +0 -0
  718. /package/dist/web-components-library/{p-8c164e0d.entry.js.map → p-41891d34.entry.js.map} +0 -0
  719. /package/dist/web-components-library/{p-ceeb3e2a.entry.js.map → p-4df66afe.entry.js.map} +0 -0
  720. /package/dist/web-components-library/{p-748fa3ae.js.map → p-54cd104c.js.map} +0 -0
  721. /package/dist/web-components-library/{p-01f941c2.entry.js.map → p-57dcff49.entry.js.map} +0 -0
  722. /package/dist/web-components-library/{p-b96900bb.entry.js.map → p-59baa7f5.entry.js.map} +0 -0
  723. /package/dist/web-components-library/{p-4551b0df.entry.js.map → p-5cdd431e.entry.js.map} +0 -0
  724. /package/dist/web-components-library/{p-f19f12b1.js.map → p-5f1e17cb.js.map} +0 -0
  725. /package/dist/web-components-library/{p-c778bf87.entry.js.map → p-5fda8769.entry.js.map} +0 -0
  726. /package/dist/web-components-library/{p-4affbb99.entry.js.map → p-661bce1c.entry.js.map} +0 -0
  727. /package/dist/web-components-library/{p-ee695830.entry.js.map → p-66c0f993.entry.js.map} +0 -0
  728. /package/dist/web-components-library/{p-e9e2ceb4.entry.js.map → p-684142d7.entry.js.map} +0 -0
  729. /package/dist/web-components-library/{p-9e3da0b7.entry.js.map → p-6c3d141b.entry.js.map} +0 -0
  730. /package/dist/web-components-library/{p-22ba2a17.entry.js.map → p-6d11da08.entry.js.map} +0 -0
  731. /package/dist/web-components-library/{p-b7b972c0.entry.js.map → p-6d61933f.entry.js.map} +0 -0
  732. /package/dist/web-components-library/{p-44459393.entry.js.map → p-6ef58a14.entry.js.map} +0 -0
  733. /package/dist/web-components-library/{p-a905df88.entry.js.map → p-71f62226.entry.js.map} +0 -0
  734. /package/dist/web-components-library/{p-0a49dd1c.entry.js.map → p-7b199026.entry.js.map} +0 -0
  735. /package/dist/web-components-library/{p-d7f12672.js.map → p-80285500.js.map} +0 -0
  736. /package/dist/web-components-library/{p-198b1692.entry.js.map → p-80ddecaf.entry.js.map} +0 -0
  737. /package/dist/web-components-library/{p-d2035d26.entry.js.map → p-839e2478.entry.js.map} +0 -0
  738. /package/dist/web-components-library/{p-2aeffcf9.entry.js.map → p-84ed6163.entry.js.map} +0 -0
  739. /package/dist/web-components-library/{p-757415e9.entry.js.map → p-88a9865c.entry.js.map} +0 -0
  740. /package/dist/web-components-library/{p-1844a4f4.entry.js.map → p-8a53fefb.entry.js.map} +0 -0
  741. /package/dist/web-components-library/{p-d6a7b7f3.entry.js.map → p-8b562dca.entry.js.map} +0 -0
  742. /package/dist/web-components-library/{p-2f948bac.entry.js.map → p-90690d4d.entry.js.map} +0 -0
  743. /package/dist/web-components-library/{p-04f80811.entry.js.map → p-9a63ec80.entry.js.map} +0 -0
  744. /package/dist/web-components-library/{p-d75f8bbb.entry.js.map → p-9af837bb.entry.js.map} +0 -0
  745. /package/dist/web-components-library/{p-d90d2698.entry.js.map → p-a32ebcc3.entry.js.map} +0 -0
  746. /package/dist/web-components-library/{p-4c9bf42d.js.map → p-b06af2fc.js.map} +0 -0
  747. /package/dist/web-components-library/{p-817689d5.entry.js.map → p-b1f2388a.entry.js.map} +0 -0
  748. /package/dist/web-components-library/{p-342b0eb0.entry.js.map → p-b421424f.entry.js.map} +0 -0
  749. /package/dist/web-components-library/{p-fb232d07.entry.js.map → p-b4b264b1.entry.js.map} +0 -0
  750. /package/dist/web-components-library/{p-cc18a2b7.entry.js.map → p-b8211903.entry.js.map} +0 -0
  751. /package/dist/web-components-library/{p-b63c8e8b.entry.js.map → p-b854cc3d.entry.js.map} +0 -0
  752. /package/dist/web-components-library/{p-4a257653.entry.js.map → p-c03767a4.entry.js.map} +0 -0
  753. /package/dist/web-components-library/{p-2bdac94e.entry.js.map → p-c0b4f29d.entry.js.map} +0 -0
  754. /package/dist/web-components-library/{p-7a4f6a5b.entry.js.map → p-c57bb632.entry.js.map} +0 -0
  755. /package/dist/web-components-library/{p-34975328.entry.js.map → p-c645dc11.entry.js.map} +0 -0
  756. /package/dist/web-components-library/{p-30e42fb1.js.map → p-cb395500.js.map} +0 -0
  757. /package/dist/web-components-library/{p-5989465b.entry.js.map → p-cc87d814.entry.js.map} +0 -0
  758. /package/dist/web-components-library/{p-1c7550f9.entry.js.map → p-d1a04722.entry.js.map} +0 -0
  759. /package/dist/web-components-library/{p-e3b82454.entry.js.map → p-d1fe7960.entry.js.map} +0 -0
  760. /package/dist/web-components-library/{p-5159edb1.entry.js.map → p-d5ebbfdf.entry.js.map} +0 -0
  761. /package/dist/web-components-library/{p-e5407cc1.entry.js.map → p-d65aeb54.entry.js.map} +0 -0
  762. /package/dist/web-components-library/{p-2612e3a2.entry.js.map → p-daa442e6.entry.js.map} +0 -0
  763. /package/dist/web-components-library/{p-e0b88075.entry.js.map → p-dba260f2.entry.js.map} +0 -0
  764. /package/dist/web-components-library/{p-943db3a8.entry.js.map → p-ddae9016.entry.js.map} +0 -0
  765. /package/dist/web-components-library/{p-60e3fa30.entry.js.map → p-de313d96.entry.js.map} +0 -0
  766. /package/dist/web-components-library/{p-375f8542.entry.js.map → p-e38a5dd2.entry.js.map} +0 -0
  767. /package/dist/web-components-library/{p-f4bac89b.entry.js.map → p-eb9161bc.entry.js.map} +0 -0
  768. /package/dist/web-components-library/{p-8687691b.entry.js.map → p-f0f53bb2.entry.js.map} +0 -0
  769. /package/dist/web-components-library/{p-1170826b.js.map → p-f79010de.js.map} +0 -0
  770. /package/dist/web-components-library/{p-19f5b6a9.entry.js.map → p-f9e41b2e.entry.js.map} +0 -0
  771. /package/www/build/{p-5a24e268.entry.js.map → p-03a558ef.entry.js.map} +0 -0
  772. /package/www/build/{p-d9c9de15.entry.js.map → p-15951fc6.entry.js.map} +0 -0
  773. /package/www/build/{p-237fcaa9.entry.js.map → p-17e2fed2.entry.js.map} +0 -0
  774. /package/www/build/{p-b7ec2cc4.entry.js.map → p-19172b2c.entry.js.map} +0 -0
  775. /package/www/build/{p-94916bdf.entry.js.map → p-1939116a.entry.js.map} +0 -0
  776. /package/www/build/{p-b71a3f69.entry.js.map → p-1e0d85d5.entry.js.map} +0 -0
  777. /package/www/build/{p-bdbcf353.entry.js.map → p-215b1fa5.entry.js.map} +0 -0
  778. /package/www/build/{p-99210133.entry.js.map → p-2501dd29.entry.js.map} +0 -0
  779. /package/www/build/{p-1fd1cf02.entry.js.map → p-2bba665d.entry.js.map} +0 -0
  780. /package/www/build/{p-5a1f98a2.entry.js.map → p-2f45f1ff.entry.js.map} +0 -0
  781. /package/www/build/{p-86160fe3.entry.js.map → p-332e0361.entry.js.map} +0 -0
  782. /package/www/build/{p-4cec3345.entry.js.map → p-3d02ad75.entry.js.map} +0 -0
  783. /package/www/build/{p-240de9aa.entry.js.map → p-3f66654f.entry.js.map} +0 -0
  784. /package/www/build/{p-8c164e0d.entry.js.map → p-41891d34.entry.js.map} +0 -0
  785. /package/www/build/{p-ceeb3e2a.entry.js.map → p-4df66afe.entry.js.map} +0 -0
  786. /package/www/build/{p-748fa3ae.js.map → p-54cd104c.js.map} +0 -0
  787. /package/www/build/{p-01f941c2.entry.js.map → p-57dcff49.entry.js.map} +0 -0
  788. /package/www/build/{p-b96900bb.entry.js.map → p-59baa7f5.entry.js.map} +0 -0
  789. /package/www/build/{p-4551b0df.entry.js.map → p-5cdd431e.entry.js.map} +0 -0
  790. /package/www/build/{p-f19f12b1.js.map → p-5f1e17cb.js.map} +0 -0
  791. /package/www/build/{p-c778bf87.entry.js.map → p-5fda8769.entry.js.map} +0 -0
  792. /package/www/build/{p-4affbb99.entry.js.map → p-661bce1c.entry.js.map} +0 -0
  793. /package/www/build/{p-ee695830.entry.js.map → p-66c0f993.entry.js.map} +0 -0
  794. /package/www/build/{p-e9e2ceb4.entry.js.map → p-684142d7.entry.js.map} +0 -0
  795. /package/www/build/{p-9e3da0b7.entry.js.map → p-6c3d141b.entry.js.map} +0 -0
  796. /package/www/build/{p-22ba2a17.entry.js.map → p-6d11da08.entry.js.map} +0 -0
  797. /package/www/build/{p-b7b972c0.entry.js.map → p-6d61933f.entry.js.map} +0 -0
  798. /package/www/build/{p-44459393.entry.js.map → p-6ef58a14.entry.js.map} +0 -0
  799. /package/www/build/{p-a905df88.entry.js.map → p-71f62226.entry.js.map} +0 -0
  800. /package/www/build/{p-0a49dd1c.entry.js.map → p-7b199026.entry.js.map} +0 -0
  801. /package/www/build/{p-d7f12672.js.map → p-80285500.js.map} +0 -0
  802. /package/www/build/{p-198b1692.entry.js.map → p-80ddecaf.entry.js.map} +0 -0
  803. /package/www/build/{p-d2035d26.entry.js.map → p-839e2478.entry.js.map} +0 -0
  804. /package/www/build/{p-2aeffcf9.entry.js.map → p-84ed6163.entry.js.map} +0 -0
  805. /package/www/build/{p-757415e9.entry.js.map → p-88a9865c.entry.js.map} +0 -0
  806. /package/www/build/{p-1844a4f4.entry.js.map → p-8a53fefb.entry.js.map} +0 -0
  807. /package/www/build/{p-d6a7b7f3.entry.js.map → p-8b562dca.entry.js.map} +0 -0
  808. /package/www/build/{p-2f948bac.entry.js.map → p-90690d4d.entry.js.map} +0 -0
  809. /package/www/build/{p-04f80811.entry.js.map → p-9a63ec80.entry.js.map} +0 -0
  810. /package/www/build/{p-d75f8bbb.entry.js.map → p-9af837bb.entry.js.map} +0 -0
  811. /package/www/build/{p-d90d2698.entry.js.map → p-a32ebcc3.entry.js.map} +0 -0
  812. /package/www/build/{p-4c9bf42d.js.map → p-b06af2fc.js.map} +0 -0
  813. /package/www/build/{p-817689d5.entry.js.map → p-b1f2388a.entry.js.map} +0 -0
  814. /package/www/build/{p-342b0eb0.entry.js.map → p-b421424f.entry.js.map} +0 -0
  815. /package/www/build/{p-fb232d07.entry.js.map → p-b4b264b1.entry.js.map} +0 -0
  816. /package/www/build/{p-cc18a2b7.entry.js.map → p-b8211903.entry.js.map} +0 -0
  817. /package/www/build/{p-b63c8e8b.entry.js.map → p-b854cc3d.entry.js.map} +0 -0
  818. /package/www/build/{p-4a257653.entry.js.map → p-c03767a4.entry.js.map} +0 -0
  819. /package/www/build/{p-2bdac94e.entry.js.map → p-c0b4f29d.entry.js.map} +0 -0
  820. /package/www/build/{p-7a4f6a5b.entry.js.map → p-c57bb632.entry.js.map} +0 -0
  821. /package/www/build/{p-34975328.entry.js.map → p-c645dc11.entry.js.map} +0 -0
  822. /package/www/build/{p-30e42fb1.js.map → p-cb395500.js.map} +0 -0
  823. /package/www/build/{p-5989465b.entry.js.map → p-cc87d814.entry.js.map} +0 -0
  824. /package/www/build/{p-1c7550f9.entry.js.map → p-d1a04722.entry.js.map} +0 -0
  825. /package/www/build/{p-e3b82454.entry.js.map → p-d1fe7960.entry.js.map} +0 -0
  826. /package/www/build/{p-5159edb1.entry.js.map → p-d5ebbfdf.entry.js.map} +0 -0
  827. /package/www/build/{p-e5407cc1.entry.js.map → p-d65aeb54.entry.js.map} +0 -0
  828. /package/www/build/{p-2612e3a2.entry.js.map → p-daa442e6.entry.js.map} +0 -0
  829. /package/www/build/{p-e0b88075.entry.js.map → p-dba260f2.entry.js.map} +0 -0
  830. /package/www/build/{p-943db3a8.entry.js.map → p-ddae9016.entry.js.map} +0 -0
  831. /package/www/build/{p-60e3fa30.entry.js.map → p-de313d96.entry.js.map} +0 -0
  832. /package/www/build/{p-375f8542.entry.js.map → p-e38a5dd2.entry.js.map} +0 -0
  833. /package/www/build/{p-f4bac89b.entry.js.map → p-eb9161bc.entry.js.map} +0 -0
  834. /package/www/build/{p-8687691b.entry.js.map → p-f0f53bb2.entry.js.map} +0 -0
  835. /package/www/build/{p-1170826b.js.map → p-f79010de.js.map} +0 -0
  836. /package/www/build/{p-19f5b6a9.entry.js.map → p-f9e41b2e.entry.js.map} +0 -0
@@ -1,15 +1,19 @@
1
1
  import { Host, h } from "@stencil/core";
2
- import { PopoverPosition } from "../../beans";
2
+ import { KeyboardCode, PopoverPosition } from "../../beans";
3
+ import { containsElement } from "../../utils/utils";
3
4
  /**
4
- * ZTool component.
5
- * @slot - Optional slot for nested content (e.g., a secondary z-toolbar) that appears when the tool is open/clicked.
5
+ * ZTool component. Can display an icon, an optional tooltip (mainly for hints about the tool's functionality), and can contain a nested `z-toolbar` as a submenu that opens on click.
6
+ * @slot - Optional slot for nested content (e.g., a secondary `z-toolbar`) that appears when the tool is open/clicked.
6
7
  */
7
8
  export class ZTool {
8
9
  constructor() {
9
- this.handleTooltipOpen = () => {
10
- //This.isNested check prevents tooltips from showing on nested tools, e.g. inside submenus
11
- //This control will be removed in future versions when nested tooltips will be supported
12
- if (!this.tooltip || this.isNested) {
10
+ /** Indicates if the tool is nested inside another tool. */
11
+ this.isNested = false;
12
+ /**
13
+ * Opens the tooltip with a delay when the button is hovered or focused, and if the tool's content isn't already visible.
14
+ */
15
+ this.handleTooltipOpen = (ev) => {
16
+ if (!this.tooltip || this.open || !this.buttonRef.contains(ev.target)) {
13
17
  return;
14
18
  }
15
19
  clearTimeout(this.hoverDelay);
@@ -17,23 +21,46 @@ export class ZTool {
17
21
  this.tooltipOpen = true;
18
22
  }, 1000);
19
23
  };
20
- this.handleTooltipClose = () => {
21
- if (!this.tooltip) {
24
+ /**
25
+ * Closes the tooltip immediately on button blur or when the mouse leaves the button or the tooltip, clearing any pending hover delay.
26
+ */
27
+ this.handleTooltipClose = (ev) => {
28
+ var _a;
29
+ if (!this.tooltip || ((_a = ev.relatedTarget) === null || _a === void 0 ? void 0 : _a.closest("z-tooltip")) === this.tooltipRef) {
22
30
  return;
23
31
  }
24
32
  clearTimeout(this.hoverDelay);
25
33
  this.tooltipOpen = false;
26
34
  };
35
+ /**
36
+ * Handles click events on the tool's button element.
37
+ * If the tool has slotted content, toggles the open state and focuses the active/selected item in the nested toolbar or color picker,
38
+ * or the first item if no active/selected item is found.
39
+ */
27
40
  this.handleClick = () => {
28
- if (this.disabled) {
41
+ if (this.disabled || !this.hasSlottedContent) {
29
42
  return;
30
43
  }
31
- if (this.hasSlottedContent) {
32
- this.open = !this.open;
33
- if (this.open) {
34
- this.focusNestedToolbar();
44
+ this.open = !this.open;
45
+ if (this.open) {
46
+ const colorPicker = this.hostElement.querySelector(":scope > z-color-picker");
47
+ if (colorPicker) {
48
+ colorPicker.setFocus();
49
+ return;
35
50
  }
51
+ // Focus the first active tool in the nested toolbar, or the first enabled if no active tool is found.
52
+ const firstActiveOrEnabledNestedTool = (this.hostElement.querySelector(":scope > z-toolbar z-tool[active]:not(:disabled)") || this.hostElement.querySelector(":scope > z-toolbar z-tool:not(:disabled)"));
53
+ firstActiveOrEnabledNestedTool === null || firstActiveOrEnabledNestedTool === void 0 ? void 0 : firstActiveOrEnabledNestedTool.setFocus();
54
+ }
55
+ };
56
+ /**
57
+ * Handles `openChange` events from the tooltip popover to keep the `tooltipOpen` state in sync, but only if the event is coming from this tool's tooltip (and not from nested tools' tooltips).
58
+ */
59
+ this.onTooltipOpenChange = (event) => {
60
+ if (event.target === this.tooltipRef) {
61
+ return;
36
62
  }
63
+ this.tooltipOpen = event.detail.open;
37
64
  };
38
65
  this.icon = undefined;
39
66
  this.tooltip = undefined;
@@ -42,61 +69,133 @@ export class ZTool {
42
69
  this.active = false;
43
70
  this.disabled = false;
44
71
  this.open = false;
72
+ this.indicatorColor = undefined;
45
73
  this.tooltipOpen = false;
46
74
  this.hasSlottedContent = false;
47
- this.isNested = false;
75
+ this.isMobile = false;
76
+ this.hasNestedOpenTools = false;
48
77
  }
49
78
  handleOpenChange() {
50
79
  this.toggleSubmenu.emit(this.open);
51
80
  }
52
- focusNestedToolbar() {
53
- requestAnimationFrame(() => {
54
- var _a;
55
- const nestedToolbar = this.hostElement.querySelector("z-toolbar");
56
- if (nestedToolbar) {
57
- const firstTool = nestedToolbar.querySelector("z-tool");
58
- if (firstTool) {
59
- const button = (_a = firstTool.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("button");
60
- if (button) {
61
- button.focus();
62
- }
81
+ handleTooltipOpenChange() {
82
+ this.toggleTooltip.emit(this.tooltipOpen);
83
+ }
84
+ /**
85
+ * Handle `ESC` and `shift+TAB` to close the submenu and move focus back to the button.
86
+ */
87
+ handleKeyDown(event) {
88
+ if (!this.open || this.hasNestedOpenTools) {
89
+ return;
90
+ }
91
+ switch (event.key) {
92
+ case KeyboardCode.ESC:
93
+ event.stopPropagation();
94
+ this.open = false;
95
+ this.setFocus();
96
+ break;
97
+ case KeyboardCode.TAB:
98
+ if (event.shiftKey && event.target.closest("z-tool:not(:scope)") === this.hostElement) {
99
+ this.open = false;
63
100
  }
64
- }
65
- });
101
+ break;
102
+ }
66
103
  }
67
- checkIfNested() {
68
- let parent = this.hostElement.parentElement;
69
- while (parent) {
70
- if (parent.tagName.toLowerCase() === "z-tool") {
71
- return true;
72
- }
73
- parent = parent.parentElement;
104
+ /**
105
+ * Close the popover on clicks outside the component, only if there are no nested open tools.
106
+ * In that case any outside click should close the nested submenu(s) first.
107
+ */
108
+ onOutsideClick(event) {
109
+ const target = event.composedPath()[0];
110
+ if (!this.open || containsElement(this.hostElement, target) || this.hasNestedOpenTools) {
111
+ return;
112
+ }
113
+ this.open = false;
114
+ }
115
+ onNestedToolToggle(ev) {
116
+ if (ev.target === this.hostElement) {
117
+ return;
118
+ }
119
+ if (ev.detail === true) {
120
+ this.hasNestedOpenTools = true;
121
+ return;
74
122
  }
75
- return false;
123
+ this.hasNestedOpenTools = Array.from(this.hostElement.querySelectorAll("z-tool")).some((tool) => tool.open);
124
+ }
125
+ /**
126
+ * Handles the `colorSelected` event from a nested `z-color-picker` component.
127
+ * Updates the `indicatorColor` and closes the tool's popover.
128
+ */
129
+ handleColorSelected(event) {
130
+ if (!Array.from(this.hostElement.children).includes(event.target)) {
131
+ return;
132
+ }
133
+ this.indicatorColor = event.detail;
134
+ this.open = false;
135
+ this.setFocus();
136
+ }
137
+ /**
138
+ * Close the submenu when focus moves outside the tool.
139
+ */
140
+ handleExternalFocusin(ev) {
141
+ const target = ev.target;
142
+ if (!containsElement(this.hostElement, target)) {
143
+ this.open = false;
144
+ }
145
+ }
146
+ /** Focuses the tool's button element. */
147
+ async setFocus() {
148
+ if (this.disabled) {
149
+ return;
150
+ }
151
+ setTimeout(() => {
152
+ var _a;
153
+ (_a = this.buttonRef) === null || _a === void 0 ? void 0 : _a.focus();
154
+ }, 50);
155
+ }
156
+ /** Sets the tab index of the tool's internal button element. */
157
+ async setTabIndex(value) {
158
+ if (!this.buttonRef) {
159
+ return;
160
+ }
161
+ this.buttonRef.tabIndex = this.disabled ? -1 : value;
162
+ }
163
+ /** Closes the tooltip. */
164
+ async closeTooltip() {
165
+ clearTimeout(this.hoverDelay);
166
+ this.tooltipOpen = false;
76
167
  }
77
168
  componentWillLoad() {
78
169
  this.hasSlottedContent = this.hostElement.children.length > 0;
79
- this.isNested = this.checkIfNested();
170
+ this.isNested = !!this.hostElement.closest("z-tool:not(:scope)");
171
+ this.mainToolbar = this.hostElement.closest("z-toolbar:not(z-toolbar z-toolbar)");
172
+ this.hasNestedOpenTools = !!this.hostElement.querySelector("z-tool[open]");
173
+ this.mql = matchMedia("(max-width: 767px)");
174
+ this.onMobileViewChange = (e) => (this.isMobile = e.matches);
175
+ this.mql.addEventListener("change", this.onMobileViewChange);
176
+ this.isMobile = this.mql.matches;
80
177
  }
81
178
  disconnectedCallback() {
179
+ var _a;
82
180
  clearTimeout(this.hoverDelay);
181
+ (_a = this.mql) === null || _a === void 0 ? void 0 : _a.removeEventListener("change", this.onMobileViewChange);
83
182
  }
84
183
  render() {
85
- return (h(Host, { key: '29475c2061b8031c6d742e0b67bdcaa657acf269', nested: this.isNested }, h("button", { key: '7b2c77c12e7d62a0560a8c71d8660e45927d4024', class: "z-tool", type: "button", "aria-pressed": this.active ? "true" : "false", "aria-expanded": this.hasSlottedContent ? (this.open ? "true" : "false") : undefined, "aria-label": this.htmlAriaLabel || this.tooltip || undefined, disabled: this.disabled, onClick: this.handleClick, onMouseEnter: this.handleTooltipOpen, onMouseLeave: this.handleTooltipClose, onFocus: this.handleTooltipOpen, onBlur: this.handleTooltipClose }, h("z-icon", { key: '4c4b2d93bb5d8869cff58970f6c1a52ae82041e9', ref: (el) => (this.iconRef = el), name: this.icon })), this.tooltip && !this.isNested && (h("z-popover", { key: '87078924f19cbd8ec1efeaa460fad64d3d45701d', class: "z-tool-tooltip", bindTo: this.iconRef, open: this.tooltipOpen, position: this.tooltipPosition, showArrow: true, center: true, closable: false }, h("span", { key: 'a11623609058d4106f18ed8d523e32ee102afaa7', class: "body-4" }, this.tooltip))), this.hasSlottedContent && (h("div", { key: 'c22cf9f4ffe622afc11be4e94722d5232df7dd58', class: {
86
- "z-tool-submenu": true,
87
- "z-tool-submenu-open": this.open,
88
- } }, h("slot", { key: '0e789c315bbcdc50c6ffbb32d225be7f12b9cd59' })))));
184
+ return (h(Host, { key: '81b929ee3738e7533405c8ea47535d7fb52bfb92', class: { "z-tool-tooltip-open": this.tooltipOpen } }, h("button", { key: '1b68af441ac69dbdf805b823b852c093b944e586', class: "z-tool", type: "button", ref: (el) => (this.buttonRef = el), "aria-pressed": this.hasSlottedContent ? undefined : this.active ? "true" : "false", "aria-expanded": this.hasSlottedContent ? (this.open ? "true" : "false") : undefined, "aria-haspopup": this.hasSlottedContent ? "true" : undefined, "aria-label": this.htmlAriaLabel || this.tooltip || undefined, disabled: this.disabled, onClick: this.handleClick, onMouseEnter: this.handleTooltipOpen, onMouseLeave: this.handleTooltipClose, onFocus: this.handleTooltipOpen, onBlur: this.handleTooltipClose }, h("z-icon", { key: '580cf2210393974cb2300ea6e50018149f6ef123', ref: (el) => (this.iconRef = el), name: this.icon, indicatorColor: this.indicatorColor })), this.tooltip && (h("z-tooltip", { key: '9b0e197d25135e1a0016fbbdca48751e8350be7b', class: "z-tool-tooltip", ref: (el) => (this.tooltipRef = el), bindTo: this.iconRef, open: this.tooltipOpen && !this.open, position: this.isNested ? PopoverPosition.BOTTOM : this.tooltipPosition, dark: true, onMouseLeave: this.handleTooltipClose, onBlur: this.handleTooltipClose, onOpenChange: this.onTooltipOpenChange }, h("span", { key: 'd6580708f0b79853cc3644cb6ea61b64cbe73a21', class: "body-4" }, this.tooltip))), this.hasSlottedContent && (h("z-popover", { key: '121b6662678738de67739beb733edfe94a6df3f6', class: "z-tool-submenu", open: this.open, bindTo: this.isMobile && this.mainToolbar ? this.mainToolbar : this.hostElement, center: true,
185
+ /* disable auto-close to prevent unwanted close behaviors on mobile,
186
+ when the bound element is the main toolbar */
187
+ closable: false, position: this.isMobile ? PopoverPosition.TOP : PopoverPosition.BOTTOM }, h("slot", { key: '6bb4815374940bd0ce6dc21bf38a1372454bf830' })))));
89
188
  }
90
189
  static get is() { return "z-tool"; }
91
190
  static get encapsulation() { return "shadow"; }
92
191
  static get originalStyleUrls() {
93
192
  return {
94
- "$": ["styles.css"]
193
+ "$": ["styles.css", "../../tokens/typography.css"]
95
194
  };
96
195
  }
97
196
  static get styleUrls() {
98
197
  return {
99
- "$": ["styles.css"]
198
+ "$": ["styles.css", "../../tokens/typography.css"]
100
199
  };
101
200
  }
102
201
  static get properties() {
@@ -105,9 +204,15 @@ export class ZTool {
105
204
  "type": "string",
106
205
  "mutable": false,
107
206
  "complexType": {
108
- "original": "string",
109
- "resolved": "string",
110
- "references": {}
207
+ "original": "IconName",
208
+ "resolved": "\"text\" | \"email\" | \"checkbox\" | \"search\" | \"map\" | \"bold\" | \"link\" | \"upload\" | \"image-add\" | \"app-switcher\" | \"arrow-counterclockwise-down-left\" | \"arrow-simple-down\" | \"arrow-counterclockwise-up-left\" | \"arrow-square-left\" | \"arrow-square-north-east\" | \"arrow-simple-north-east\" | \"arrow-square-north-west\" | \"arrow-simple-north-west\" | \"arrow-clockwise-up-right\" | \"arrow-square-right\" | \"arrow-left\" | \"arrow-right\" | \"arrow-square-south-east\" | \"arrow-simple-south-east\" | \"arrow-square-south-west\" | \"arrow-simple-south-west\" | \"arrow-simple-up\" | \"artworks\" | \"support\" | \"circle-black\" | \"nib\" | \"sun-with-rays-black\" | \"book-plus\" | \"book-minus\" | \"shopping-cart\" | \"checkbox-checked\" | \"chevron-circle-down\" | \"chevron-circle-left\" | \"chevron-circle-right\" | \"chevron-circle-up\" | \"checkmark-circle\" | \"multiply-circled-filled\" | \"multiply-circled\" | \"plus-circled\" | \"exclamation-circle\" | \"multiply\" | \"cloud-delete\" | \"suit-club\" | \"suit-diamond\" | \"document\" | \"index-down\" | \"caret-down\" | \"caret-up-down\" | \"image-edit\" | \"light-bulb\" | \"login\" | \"logout\" | \"arrow-quad-down\" | \"arrow-quad-left\" | \"arrow-quad-north-east\" | \"arrow-quad-right\" | \"image\" | \"suit-heart\" | \"helm\" | \"home\" | \"info\" | \"index-left\" | \"bulleted-list-square\" | \"square-black\" | \"square-white\" | \"burger-menu\" | \"folder\" | \"lock-open\" | \"projection-room\" | \"question-mark-circle\" | \"index-right\" | \"suit-spade\" | \"strikethrough-text\" | \"index-up\" | \"user-avatar\" | \"circle-white\" | \"diamond-white\" | \"workspace-zanichelli\" | \"image-add-filled\" | \"arrow-counterclockwise-down-left-filled\" | \"arrow-simple-down-filled\" | \"arrow-counterclockwise-up-left-filled\" | \"arrow-square-left-filled\" | \"arrow-simple-north-east-filled\" | \"arrow-square-north-east-filled\" | \"arrow-simple-north-west-filled\" | \"arrow-square-north-west-filled\" | \"arrow-clockwise-up-right-filled\" | \"arrow-square-right-filled\" | \"arrow-left-filled\" | \"arrow-right-filled\" | \"arrow-simple-south-east-filled\" | \"arrow-square-south-east-filled\" | \"arrow-simple-south-west-filled\" | \"arrow-square-south-west-filled\" | \"arrow-simple-up-filled\" | \"artworks-filled\" | \"circle-black-filled\" | \"nib-filled\" | \"sun-with-rays-black-filled\" | \"chevron-circle-down-filled\" | \"chevron-circle-left-filled\" | \"chevron-circle-right-filled\" | \"chevron-circle-up-filled\" | \"cloud-delete-filled\" | \"suit-club-filled\" | \"suit-diamond-filled\" | \"document-filled\" | \"index-down-filled\" | \"image-edit-filled\" | \"light-bulb-filled\" | \"image-filled\" | \"suit-heart-filled\" | \"helm-filled\" | \"home-filled\" | \"info-filled\" | \"index-left-filled\" | \"bulleted-list-square-filled\" | \"square-black-filled\" | \"square-white-filled\" | \"folder-filled\" | \"lock-open-filled\" | \"projection-room-filled\" | \"index-right-filled\" | \"suit-spade-filled\" | \"strikethrough-text-filled\" | \"index-up-filled\" | \"circle-white-filled\" | \"diamond-white-filled\" | \"workspace-zanichelli-filled\" | \"burger-menu-mobile\" | \"burger-menu-mobile-filled\" | \"bg-color\" | \"font-color\" | \"picker-color\" | \"stroke-color\" | \"bg-color-filled\" | \"font-color-filled\" | \"picker-color-filled\" | \"stroke-color-filled\" | \"blockquote\" | \"code\" | \"switch\" | \"view\" | \"math\" | \"download\" | \"target\" | \"chevron-right\" | \"pdf\" | \"reload\" | \"accessibility\" | \"close\" | \"event\" | \"chevron-up\" | \"chevron-down\" | \"copy\" | \"pause\" | \"play\" | \"minus-circled\" | \"book\" | \"contextual-menu\" | \"expand\" | \"chevron-left\" | \"play-filled\" | \"view-filled\" | \"view-off-filled\" | \"radio-button-checked\" | \"radio-button\" | \"informationsource\" | \"multiply-circle-filled\" | \"caret-up\" | \"multiply-circle\" | \"checkmark-circle-filled\" | \"left-magnifying-glass\" | \"teacher\" | \"collezioni\" | \"dictonary\" | \"exercises-online\" | \"interactives-maps\" | \"textual-analysis\" | \"checkmark\" | \"gear\" | \"burger-menu-filled\" | \"add-image\" | \"app-switcher-button\" | \"arrow-clockwise-down-left\" | \"arrow-down\" | \"arrow-left-rounded\" | \"arrow-left-square\" | \"arrow-north-east-square\" | \"arrow-north-east\" | \"arrow-north-west-square\" | \"arrow-north-west\" | \"arrow-right-rounded\" | \"arrow-right-square\" | \"arrow-small-left\" | \"arrow-small-right\" | \"arrow-south-east-square\" | \"arrow-south-east\" | \"arrow-south-west-square\" | \"arrow-south-west\" | \"arrow-up-and-down\" | \"arrow-up\" | \"artwork\" | \"ask-your-manager\" | \"black-circle\" | \"black-nib\" | \"black-sun-with-rays\" | \"book-add\" | \"book-delete\" | \"cart\" | \"checkbox-selected\" | \"checkbox-unchecked\" | \"chevron-down-circle\" | \"chevron-left-circle\" | \"chevron-right-circle\" | \"chevron-up-circle\" | \"circle-check\" | \"circle-chevron-down\" | \"circle-chevron-left\" | \"circle-chevron-up\" | \"circle-cross-fill\" | \"circle-cross-stroke\" | \"circle-cross\" | \"circle-plus\" | \"circle-warning\" | \"cloud-x\" | \"club-black-suit\" | \"cross\" | \"diamond-black-suit\" | \"document-with-text\" | \"down-white-index\" | \"drop-down\" | \"drop-up-down\" | \"edit-picture\" | \"electric-light-bulb\" | \"enter\" | \"exit\" | \"external-link-down\" | \"external-link-left\" | \"external-link-right-up\" | \"external-link-right\" | \"frame-with-picture\" | \"heart-black-suit\" | \"helmsymbol\" | \"house\" | \"left-white-index\" | \"list-bulleted-square\" | \"medium-black-square\" | \"medium-white-square\" | \"menu-burger\" | \"open-file-folder\" | \"open-lock\" | \"projection\" | \"question-mark\" | \"right-white-index\" | \"spade-black-suit\" | \"strike-through-text\" | \"up-white-index\" | \"user\" | \"white-circle\" | \"white-diamond\" | \"workplace-zanichelli\" | \"add-image-filled\" | \"arrow-clockwise-down-left-filled\" | \"arrow-down-filled\" | \"arrow-left-rounded-filled\" | \"arrow-left-square-filled\" | \"arrow-north-east-filled\" | \"arrow-north-east-square-filled\" | \"arrow-north-west-filled\" | \"arrow-north-west-square-filled\" | \"arrow-right-rounded-filled\" | \"arrow-right-square-filled\" | \"arrow-small-left-filled\" | \"arrow-small-right-filled\" | \"arrow-south-east-filled\" | \"arrow-south-east-square-filled\" | \"arrow-south-west-filled\" | \"arrow-south-west-square-filled\" | \"arrow-up-and-down-filled\" | \"arrow-up-filled\" | \"artwork-filled\" | \"black-circle-filled\" | \"black-nib-filled\" | \"black-sun-with-rays-filled\" | \"chevron-down-circle-filled\" | \"chevron-left-circle-filled\" | \"chevron-right-circle-filled\" | \"chevron-up-circle-filled\" | \"cloud-x-filled\" | \"club-black-suit-filled\" | \"diamond-black-suit-filled\" | \"document-with-text-filled\" | \"down-white-index-filled\" | \"edit-picture-filled\" | \"electric-light-bulb-filled\" | \"frame-with-picture-filled\" | \"heart-black-suit-filled\" | \"helmsymbol-filled\" | \"house-filled\" | \"informationsource-filled\" | \"left-white-index-filled\" | \"list-bulleted-square-filled\" | \"medium-black-square-filled\" | \"medium-white-square-filled\" | \"open-file-folder-filled\" | \"open-lock-filled\" | \"projection-filled\" | \"right-white-index-filled\" | \"spade-black-suit-filled\" | \"strike-through-text-filled\" | \"up-white-index-filled\" | \"white-circle-filled\" | \"white-diamond-filled\" | \"workplace-zanichelli-filled\" | \"assign-task-button\" | \"atom-button\" | \"burger-menu-booktab-button\" | \"check-task-button\" | \"checkmark-square-button\" | \"code-button\" | \"cursor-index-button\" | \"document-button\" | \"excel-doc-button\" | \"exercises-interactive-button\" | \"exercises-online-button\" | \"exercises-plus-button\" | \"file-zip-button\" | \"film-frames-button\" | \"geogebra-button\" | \"go-page-button\" | \"headphone-button\" | \"image-button\" | \"interactives-maps-button\" | \"lecture-button\" | \"link-button\" | \"login-button\" | \"multi-marks-button\" | \"pdf-button\" | \"periodic-table-button\" | \"play-button\" | \"pointer-button\" | \"powerpoint-button\" | \"python-code-button\" | \"show-video-button\" | \"textual-analysis-button\" | \"virtual-reality-button\" | \"word-button\" | \"accessibility-filled\" | \"active-note-filled\" | \"add-note-filled\" | \"ai-filled\" | \"ai-tips-filled\" | \"app-switcher-filled\" | \"arrow-clockwise-down-right-filled\" | \"arrow-clockwise-up-left-filled\" | \"arrow-counterclockwise-up-right-filled\" | \"arrow-left-right-filled\" | \"arrow-quad-down-filled\" | \"arrow-quad-left-filled\" | \"arrow-quad-north-east-filled\" | \"arrow-quad-north-west-filled\" | \"arrow-quad-right-filled\" | \"arrow-quad-south-east-filled\" | \"arrow-quad-south-west-filled\" | \"arrow-quad-up-filled\" | \"arrow-simple-left-filled\" | \"arrow-simple-right-filled\" | \"arrow-square-down-filled\" | \"arrow-style-filled\" | \"arrow-style-line-filled\" | \"arrow-up-down-double-filled\" | \"arrow-up-down-filled\" | \"arrow-up-rounded-filled\" | \"arrow-up-square-filled\" | \"arrows-to-dot-filled\" | \"art-filled\" | \"artist-filled\" | \"artist-quote-filled\" | \"artistic-education-filled\" | \"assign-task-filled\" | \"atom-filled\" | \"back-filled\" | \"back-top-filled\" | \"barrage-questions-filled\" | \"biology-filled\" | \"black-diamond-filled\" | \"blockquote-filled\" | \"bold-filled\" | \"book-author-filled\" | \"book-filled\" | \"book-minus-filled\" | \"book-plus-filled\" | \"book-view-filled\" | \"bookmark-filled\" | \"breaking-line-filled\" | \"bulleted-list-filled\" | \"bulls-eye-filled\" | \"burger-menu-booktab-filled\" | \"c-circled-filled\" | \"c-square-filled\" | \"calligraphic-filled\" | \"camera-filled\" | \"caret-down-filled\" | \"caret-up-down-filled\" | \"caret-up-filled\" | \"catalog-card-filled\" | \"chapter-filled\" | \"character-panel-filled\" | \"check-task-filled\" | \"checkbox-checked-filled\" | \"checkbox-filled\" | \"checkmark-filled\" | \"checkmark-square-filled\" | \"chemistry-filled\" | \"chevron-down-filled\" | \"chevron-left-filled\" | \"chevron-right-filled\" | \"chevron-up-filled\" | \"cinese-filled\" | \"civics-filled\" | \"class-assign-filled\" | \"clean-filled\" | \"cloud-download-filled\" | \"code-filled\" | \"collezioni-filled\" | \"color-selected-filled\" | \"communication-filled\" | \"compare-filled\" | \"compress-filled\" | \"contextual-menu-filled\" | \"copy-filled\" | \"copy-to-clipboard-filled\" | \"copyright-filled\" | \"course-filled\" | \"cursor-index-filled\" | \"curved-line-filled\" | \"dagger-filled\" | \"daggerdbl-filled\" | \"deactivate-note-filled\" | \"decrease-indentation-filled\" | \"delete-filled\" | \"dictionary-switch-filled\" | \"dictonary-filled\" | \"disegno-arrow-filled\" | \"disegno-colours-intersection-filled\" | \"disegno-compass-filled\" | \"disegno-curve-filled\" | \"disegno-ellipsis-filled\" | \"disegno-grid-settings-filled\" | \"disegno-half-line-filled\" | \"disegno-hide-tools-filled\" | \"disegno-irregular-polygon-filled\" | \"disegno-levels-filled\" | \"disegno-poly-line-filled\" | \"disegno-polygon-vertices-filled\" | \"disegno-protractor-filled\" | \"disegno-regular-polygon-filled\" | \"disegno-ruler-filled\" | \"disegno-segment-filled\" | \"disegno-straight-line-filled\" | \"download-filled\" | \"draft-filled\" | \"drag-drop-filled\" | \"drag-indicator-filled\" | \"economic-filled\" | \"edit-field-filled\" | \"edit-filled\" | \"electrical-engineering-filled\" | \"email-filled\" | \"english-filled\" | \"erase-tool-filled\" | \"event-cancelled-filled\" | \"event-filled\" | \"excel-doc-filled\" | \"exclamation-circle-filled\" | \"exclamation-square-filled\" | \"exercises-filled\" | \"exercises-interactive-filled\" | \"exercises-online-filled\" | \"exercises-plus-filled\" | \"expand-filled\" | \"extra-filled\" | \"facebook-filled\" | \"favorites-filled\" | \"feed-filled\" | \"file-zip-filled\" | \"fill-blanks-filled\" | \"fill-choice-filled\" | \"film-frames-filled\" | \"find-error-filled\" | \"fit-height-view-filled\" | \"fit-width-view-filled\" | \"font-book-filled\" | \"french-filled\" | \"fun-filled\" | \"gap-filled\" | \"gear-filled\" | \"geogebra-filled\" | \"geographical-map-filled\" | \"geography-filled\" | \"german-filled\" | \"go-page-filled\" | \"golden-pen-filled\" | \"grades-filled\" | \"graphic-filled\" | \"greek-filled\" | \"headphone-filled\" | \"highlights-filled\" | \"history-filled\" | \"history-next-filled\" | \"history-previous-filled\" | \"hourglass-flowing-filled\" | \"hourglass-half-bottom-filled\" | \"human-sciences-filled\" | \"image-jpg-filled\" | \"image-png-filled\" | \"image-tiff-filled\" | \"immersive-reading-filled\" | \"inbox-tray-filled\" | \"increase-indentation-filled\" | \"indeterminated-checkbox-filled\" | \"informatics-filled\" | \"interactive-glossaries-filled\" | \"interactives-maps-filled\" | \"italian-filled\" | \"italic-filled\" | \"laboratory-filled\" | \"land-management-filled\" | \"latin-filled\" | \"law-filled\" | \"lecture-filled\" | \"left-magnifying-glass-filled\" | \"link-filled\" | \"liquid-version-filled\" | \"location-filled\" | \"lock-filled\" | \"login-filled\" | \"logout-filled\" | \"lozenge-filled\" | \"magnfying-glass-filled\" | \"map-filled\" | \"math-filled\" | \"mechanics-filled\" | \"minus-circled-filled\" | \"minus-filled\" | \"minus-square-filled\" | \"monospace-filled\" | \"multi-marks-filled\" | \"multiple-choice-filled\" | \"multiply-filled\" | \"multiply-square-filled\" | \"music-filled\" | \"my-data-filled\" | \"natural-science-filled\" | \"next-text-to-speech-filled\" | \"nobel-filled\" | \"note-filled\" | \"notification-filled\" | \"notification-new-filled\" | \"notification-off-filled\" | \"numbered-list-filled\" | \"nutritional-sciences-filled\" | \"open-answer-filled\" | \"oval-filled\" | \"paragraph-filled\" | \"pause-filled\" | \"pdf-filled\" | \"pen-thickness-filled\" | \"people-filled\" | \"periodic-table-filled\" | \"philosophy-filled\" | \"physics-filled\" | \"plus-circled-filled\" | \"plus-filled\" | \"plus-square-filled\" | \"pointer-filled\" | \"powerpoint-filled\" | \"previous-text-to-speech-filled\" | \"print-filled\" | \"progress-percentage-filled\" | \"python-code-filled\" | \"qrcode-filled\" | \"quad-filled\" | \"question-mark-circle-filled\" | \"question-mark-square-filled\" | \"quick-assign-filled\" | \"quiz-filled\" | \"radio-button-checked-filled\" | \"radio-button-filled\" | \"reading-settings-filled\" | \"recently-viewed-filled\" | \"redo-filled\" | \"reduce-screen-filled\" | \"registro-filter-filled\" | \"reload-filled\" | \"remove-formatting-filled\" | \"russian-filled\" | \"sans-serif-filled\" | \"save-filled\" | \"school-filled\" | \"science-earth-filled\" | \"science-filled\" | \"screenfull-filled\" | \"search-filled\" | \"send-filled\" | \"serif-filled\" | \"share-filled\" | \"shopping-cart-filled\" | \"short-cut-filled\" | \"show-video-filled\" | \"site-resources-filled\" | \"skip-back-by-10-filled\" | \"skip-back-filled\" | \"skip-forward-by-10-filled\" | \"skip-forward-filled\" | \"smartphone-filled\" | \"snap-grid-filled\" | \"snap-grid-off-filled\" | \"spanish-filled\" | \"speaker-off-filled\" | \"speaker-on-filled\" | \"speech-synthesis-filled\" | \"sport-sciences-filled\" | \"star-empty-filled\" | \"star-full-filled\" | \"story-filled\" | \"straight-line-filled\" | \"stroke-size-filled\" | \"stroke-size-large-filled\" | \"stroke-size-medium-filled\" | \"stroke-size-small-filled\" | \"stroke-solid-dash-filled\" | \"stroke-solid-dot-filled\" | \"stroke-solid-filled\" | \"stroke-style-filled\" | \"student-filled\" | \"subscript-filled\" | \"sun-with-rays-filled\" | \"support-filled\" | \"supscript-filled\" | \"switch-filled\" | \"synchronize-filled\" | \"table-insert-filled\" | \"target-filled\" | \"teacher-filled\" | \"technique-filled\" | \"technology-filled\" | \"text-align-center-filled\" | \"text-align-justify-filled\" | \"text-align-left-filled\" | \"text-align-right-filled\" | \"text-filled\" | \"text-large-filled\" | \"text-medium-filled\" | \"text-scale-filled\" | \"text-small-filled\" | \"text-to-speech-filled\" | \"textual-analysis-filled\" | \"theory-help-filled\" | \"thumbnail-filled\" | \"thumbs-down-filled\" | \"thumbs-up-filled\" | \"ticket-filled\" | \"timeline-filled\" | \"timer-clock-filled\" | \"topic-filled\" | \"topography-filled\" | \"tourist-technique-filled\" | \"translation-filled\" | \"true-false-filled\" | \"u-circle-filled\" | \"u-square-filled\" | \"underlined-text-filled\" | \"undo-filled\" | \"upload-filled\" | \"user-avatar-filled\" | \"view-double-page-filled\" | \"view-options-filled\" | \"view-single-page-filled\" | \"virtual-class-filled\" | \"virtual-reality-filled\" | \"word-filled\" | \"working-bag-filled\" | \"youtube-filled\" | \"zoom-in-filled\" | \"zoom-out-filled\" | \"zte-filled\" | \"active-note\" | \"add-note\" | \"ai\" | \"ai-tips\" | \"arrow-clockwise-down-right\" | \"arrow-clockwise-up-left\" | \"arrow-counterclockwise-up-right\" | \"arrow-left-right\" | \"arrow-quad-north-west\" | \"arrow-quad-south-east\" | \"arrow-quad-south-west\" | \"arrow-quad-up\" | \"arrow-simple-left\" | \"arrow-simple-right\" | \"arrow-square-down\" | \"arrow-style\" | \"arrow-style-line\" | \"arrow-up-down\" | \"arrow-up-down-double\" | \"arrow-up-rounded\" | \"arrow-up-square\" | \"arrows-to-dot\" | \"art\" | \"artist\" | \"artist-quote\" | \"artistic-education\" | \"assign-task\" | \"atom\" | \"back\" | \"back-top\" | \"barrage-questions\" | \"biology\" | \"black-diamond\" | \"book-author\" | \"book-view\" | \"bookmark\" | \"breaking-line\" | \"bulleted-list\" | \"bulls-eye\" | \"burger-menu-booktab\" | \"c-circled\" | \"c-square\" | \"calligraphic\" | \"camera\" | \"catalog-card\" | \"chapter\" | \"character-panel\" | \"check-task\" | \"checkmark-square\" | \"chemistry\" | \"cinese\" | \"civics\" | \"class-assign\" | \"clean\" | \"cloud-download\" | \"color-selected\" | \"communication\" | \"compare\" | \"compress\" | \"copy-to-clipboard\" | \"copyright\" | \"course\" | \"cursor-index\" | \"curved-line\" | \"dagger\" | \"daggerdbl\" | \"deactivate-note\" | \"decrease-indentation\" | \"delete\" | \"dictionary-switch\" | \"disegno-arrow\" | \"disegno-colours-intersection\" | \"disegno-compass\" | \"disegno-curve\" | \"disegno-ellipsis\" | \"disegno-grid-settings\" | \"disegno-half-line\" | \"disegno-hide-tools\" | \"disegno-irregular-polygon\" | \"disegno-levels\" | \"disegno-poly-line\" | \"disegno-polygon-vertices\" | \"disegno-protractor\" | \"disegno-regular-polygon\" | \"disegno-ruler\" | \"disegno-segment\" | \"disegno-straight-line\" | \"draft\" | \"drag-drop\" | \"drag-indicator\" | \"economic\" | \"edit\" | \"edit-field\" | \"electrical-engineering\" | \"english\" | \"erase-tool\" | \"event-cancelled\" | \"excel-doc\" | \"exclamation-square\" | \"exercises\" | \"exercises-interactive\" | \"exercises-plus\" | \"extra\" | \"facebook\" | \"favorites\" | \"feed\" | \"file-zip\" | \"fill-blanks\" | \"fill-choice\" | \"film-frames\" | \"find-error\" | \"fit-height-view\" | \"fit-width-view\" | \"font-book\" | \"french\" | \"fun\" | \"gap\" | \"geogebra\" | \"geographical-map\" | \"geography\" | \"german\" | \"go-page\" | \"golden-pen\" | \"grades\" | \"graphic\" | \"greek\" | \"headphone\" | \"highlights\" | \"history\" | \"history-next\" | \"history-previous\" | \"hourglass-flowing\" | \"hourglass-half-bottom\" | \"human-sciences\" | \"image-jpg\" | \"image-png\" | \"image-tiff\" | \"immersive-reading\" | \"inbox-tray\" | \"increase-indentation\" | \"indeterminated-checkbox\" | \"informatics\" | \"interactive-glossaries\" | \"italian\" | \"italic\" | \"laboratory\" | \"land-management\" | \"latin\" | \"law\" | \"lecture\" | \"liquid-version\" | \"location\" | \"lock\" | \"lozenge\" | \"magnfying-glass\" | \"mechanics\" | \"minus\" | \"minus-square\" | \"monospace\" | \"multi-marks\" | \"multiple-choice\" | \"multiply-square\" | \"music\" | \"my-data\" | \"natural-science\" | \"next-text-to-speech\" | \"nobel\" | \"note\" | \"notification\" | \"notification-new\" | \"notification-off\" | \"nutritional-sciences\" | \"numbered-list\" | \"open-answer\" | \"oval\" | \"paragraph\" | \"pen-thickness\" | \"people\" | \"periodic-table\" | \"philosophy\" | \"physics\" | \"plus\" | \"plus-square\" | \"pointer\" | \"powerpoint\" | \"previous-text-to-speech\" | \"print\" | \"progress-percentage\" | \"python-code\" | \"qrcode\" | \"quad\" | \"question-mark-square\" | \"quick-assign\" | \"quiz\" | \"reading-settings\" | \"recently-viewed\" | \"redo\" | \"reduce-screen\" | \"registro-filter\" | \"remove-formatting\" | \"russian\" | \"sans-serif\" | \"save\" | \"school\" | \"science\" | \"science-earth\" | \"screenfull\" | \"send\" | \"serif\" | \"share\" | \"short-cut\" | \"show-video\" | \"site-resources\" | \"skip-back\" | \"skip-back-by-10\" | \"skip-forward\" | \"skip-forward-by-10\" | \"smartphone\" | \"snap-grid\" | \"snap-grid-off\" | \"spanish\" | \"speaker-off\" | \"speaker-on\" | \"speech-synthesis\" | \"sport-sciences\" | \"star-empty\" | \"star-full\" | \"story\" | \"straight-line\" | \"stroke-size\" | \"stroke-size-large\" | \"stroke-size-medium\" | \"stroke-size-small\" | \"stroke-solid\" | \"stroke-solid-dash\" | \"stroke-solid-dot\" | \"stroke-style\" | \"student\" | \"subscript\" | \"sun-with-rays\" | \"supscript\" | \"synchronize\" | \"table-insert\" | \"technique\" | \"technology\" | \"text-align-center\" | \"text-align-justify\" | \"text-align-left\" | \"text-align-right\" | \"text-large\" | \"text-medium\" | \"text-scale\" | \"text-small\" | \"text-to-speech\" | \"theory-help\" | \"thumbnail\" | \"thumbs-down\" | \"thumbs-up\" | \"ticket\" | \"timeline\" | \"timer-clock\" | \"topic\" | \"topography\" | \"tourist-technique\" | \"translation\" | \"true-false\" | \"u-circle\" | \"u-square\" | \"underlined-text\" | \"undo\" | \"view-double-page\" | \"view-off\" | \"view-options\" | \"view-single-page\" | \"virtual-class\" | \"virtual-reality\" | \"word\" | \"working-bag\" | \"youtube\" | \"zoom-in\" | \"zoom-out\" | \"zte\"",
209
+ "references": {
210
+ "IconName": {
211
+ "location": "import",
212
+ "path": "../../constants/iconset",
213
+ "id": "src/constants/iconset.ts::IconName"
214
+ }
215
+ }
111
216
  },
112
217
  "required": false,
113
218
  "optional": false,
@@ -188,7 +293,7 @@ export class ZTool {
188
293
  "optional": false,
189
294
  "docs": {
190
295
  "tags": [],
191
- "text": "Visual selected state."
296
+ "text": "Visual active state."
192
297
  },
193
298
  "attribute": "active",
194
299
  "reflect": true,
@@ -229,6 +334,23 @@ export class ZTool {
229
334
  "attribute": "open",
230
335
  "reflect": true,
231
336
  "defaultValue": "false"
337
+ },
338
+ "indicatorColor": {
339
+ "type": "string",
340
+ "mutable": true,
341
+ "complexType": {
342
+ "original": "string",
343
+ "resolved": "string",
344
+ "references": {}
345
+ },
346
+ "required": false,
347
+ "optional": true,
348
+ "docs": {
349
+ "tags": [],
350
+ "text": "Color to use to fill the icon's color indicator, if it has one.\nCan be any valid value for the `fill` svg attribute.\nThe value of this prop is passed down to the `z-icon` component inside the tool.\n\nIf `z-color-picker` component is used inside the tool's slot, its `colorSelected` event is listened\nto automatically update `indicatorColor` and change the color of the icon indicator accordingly."
351
+ },
352
+ "attribute": "indicator-color",
353
+ "reflect": false
232
354
  }
233
355
  };
234
356
  }
@@ -236,7 +358,8 @@ export class ZTool {
236
358
  return {
237
359
  "tooltipOpen": {},
238
360
  "hasSlottedContent": {},
239
- "isNested": {}
361
+ "isMobile": {},
362
+ "hasNestedOpenTools": {}
240
363
  };
241
364
  }
242
365
  static get events() {
@@ -255,13 +378,123 @@ export class ZTool {
255
378
  "resolved": "any",
256
379
  "references": {}
257
380
  }
381
+ }, {
382
+ "method": "toggleTooltip",
383
+ "name": "toggleTooltip",
384
+ "bubbles": true,
385
+ "cancelable": true,
386
+ "composed": true,
387
+ "docs": {
388
+ "tags": [],
389
+ "text": "Emitted when the tooltip open state changes."
390
+ },
391
+ "complexType": {
392
+ "original": "any",
393
+ "resolved": "any",
394
+ "references": {}
395
+ }
258
396
  }];
259
397
  }
398
+ static get methods() {
399
+ return {
400
+ "setFocus": {
401
+ "complexType": {
402
+ "signature": "() => Promise<void>",
403
+ "parameters": [],
404
+ "references": {
405
+ "Promise": {
406
+ "location": "global",
407
+ "id": "global::Promise"
408
+ }
409
+ },
410
+ "return": "Promise<void>"
411
+ },
412
+ "docs": {
413
+ "text": "Focuses the tool's button element.",
414
+ "tags": []
415
+ }
416
+ },
417
+ "setTabIndex": {
418
+ "complexType": {
419
+ "signature": "(value: number) => Promise<void>",
420
+ "parameters": [{
421
+ "name": "value",
422
+ "type": "number",
423
+ "docs": ""
424
+ }],
425
+ "references": {
426
+ "Promise": {
427
+ "location": "global",
428
+ "id": "global::Promise"
429
+ }
430
+ },
431
+ "return": "Promise<void>"
432
+ },
433
+ "docs": {
434
+ "text": "Sets the tab index of the tool's internal button element.",
435
+ "tags": []
436
+ }
437
+ },
438
+ "closeTooltip": {
439
+ "complexType": {
440
+ "signature": "() => Promise<void>",
441
+ "parameters": [],
442
+ "references": {
443
+ "Promise": {
444
+ "location": "global",
445
+ "id": "global::Promise"
446
+ }
447
+ },
448
+ "return": "Promise<void>"
449
+ },
450
+ "docs": {
451
+ "text": "Closes the tooltip.",
452
+ "tags": []
453
+ }
454
+ }
455
+ };
456
+ }
260
457
  static get elementRef() { return "hostElement"; }
261
458
  static get watchers() {
262
459
  return [{
263
460
  "propName": "open",
264
461
  "methodName": "handleOpenChange"
462
+ }, {
463
+ "propName": "tooltipOpen",
464
+ "methodName": "handleTooltipOpenChange"
465
+ }];
466
+ }
467
+ static get listeners() {
468
+ return [{
469
+ "name": "keydown",
470
+ "method": "handleKeyDown",
471
+ "target": undefined,
472
+ "capture": false,
473
+ "passive": false
474
+ }, {
475
+ "name": "click",
476
+ "method": "onOutsideClick",
477
+ "target": "body",
478
+ "capture": false,
479
+ "passive": false
480
+ }, {
481
+ "name": "toggleSubmenu",
482
+ "method": "onNestedToolToggle",
483
+ "target": undefined,
484
+ "capture": false,
485
+ "passive": false
486
+ }, {
487
+ "name": "colorSelected",
488
+ "method": "handleColorSelected",
489
+ "target": undefined,
490
+ "capture": false,
491
+ "passive": false
492
+ }, {
493
+ "name": "focusin",
494
+ "method": "handleExternalFocusin",
495
+ "target": "body",
496
+ "capture": false,
497
+ "passive": true
265
498
  }];
266
499
  }
267
500
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-tool/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AACnG,OAAO,EAAC,eAAe,EAAC,MAAM,aAAa,CAAC;AAE5C;;;GAGG;AAMH,MAAM,OAAO,KAAK;;QAqDR,sBAAiB,GAAG,GAAS,EAAE;YACrC,0FAA0F;YAC1F,wFAAwF;YACxF,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACnC,OAAO;YACT,CAAC;YACD,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC9B,IAAI,CAAC,UAAU,GAAG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IAAI,CAAC,kBAAkB,EACrC,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAC/B,MAAM,EAAE,IAAI,CAAC,kBAAkB;gBAE/B,+DACE,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,EAChC,IAAI,EAAE,IAAI,CAAC,IAAI,GACP,CACH;YACR,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CACjC,kEACE,KAAK,EAAC,gBAAgB,EACtB,MAAM,EAAE,IAAI,CAAC,OAAO,EACpB,IAAI,EAAE,IAAI,CAAC,WAAW,EACtB,QAAQ,EAAE,IAAI,CAAC,eAAe,EAC9B,SAAS,QACT,MAAM,QACN,QAAQ,EAAE,KAAK;gBAEf,6DAAM,KAAK,EAAC,QAAQ,IAAE,IAAI,CAAC,OAAO,CAAQ,CAChC,CACb;YACA,IAAI,CAAC,iBAAiB,IAAI,CACzB,4DACE,KAAK,EAAE;oBACL,gBAAgB,EAAE,IAAI;oBACtB,qBAAqB,EAAE,IAAI,CAAC,IAAI;iBACjC;gBAED,8DAAa,CACT,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Event, EventEmitter, Host, Prop, State, Watch, h} from \"@stencil/core\";\nimport {PopoverPosition} from \"../../beans\";\n\n/**\n * ZTool component.\n * @slot - Optional slot for nested content (e.g., a secondary z-toolbar) that appears when the tool is open/clicked.\n */\n@Component({\n tag: \"z-tool\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZTool {\n @Element() hostElement: HTMLZToolElement;\n\n /** Tool icon */\n @Prop()\n icon: string;\n\n /** Text displayed inside the tooltip. */\n @Prop()\n tooltip?: string;\n\n /** Preferred tooltip position. Defaults to true. */\n @Prop()\n tooltipPosition: PopoverPosition = PopoverPosition.TOP;\n\n /** Accessible label for the tool trigger. Falls back to tooltip content. */\n @Prop()\n htmlAriaLabel?: string;\n\n /** Visual selected state. */\n @Prop({reflect: true})\n active = false;\n\n /** Disabled state. */\n @Prop({reflect: true})\n disabled = false;\n\n /** Open state. */\n @Prop({reflect: true, mutable: true})\n open = false;\n\n @State()\n tooltipOpen = false;\n\n @State()\n hasSlottedContent = false;\n\n @State()\n isNested = false;\n\n /** Emitted when the open state changes. */\n @Event()\n toggleSubmenu: EventEmitter;\n\n private iconRef?: HTMLElement;\n\n private hoverDelay?: ReturnType<typeof setTimeout>;\n\n @Watch(\"open\")\n handleOpenChange(): void {\n this.toggleSubmenu.emit(this.open);\n }\n\n private handleTooltipOpen = (): void => {\n //This.isNested check prevents tooltips from showing on nested tools, e.g. inside submenus\n //This control will be removed in future versions when nested tooltips will be supported\n if (!this.tooltip || this.isNested) {\n return;\n }\n clearTimeout(this.hoverDelay);\n this.hoverDelay = setTimeout(() => {\n this.tooltipOpen = true;\n }, 1000);\n };\n\n private handleTooltipClose = (): void => {\n if (!this.tooltip) {\n return;\n }\n clearTimeout(this.hoverDelay);\n this.tooltipOpen = false;\n };\n\n private handleClick = (): void => {\n if (this.disabled) {\n return;\n }\n\n if (this.hasSlottedContent) {\n this.open = !this.open;\n if (this.open) {\n this.focusNestedToolbar();\n }\n }\n };\n\n private focusNestedToolbar(): void {\n requestAnimationFrame(() => {\n const nestedToolbar = this.hostElement.querySelector(\"z-toolbar\");\n if (nestedToolbar) {\n const firstTool = nestedToolbar.querySelector(\"z-tool\");\n if (firstTool) {\n const button = firstTool.shadowRoot?.querySelector(\"button\");\n if (button) {\n button.focus();\n }\n }\n }\n });\n }\n\n private checkIfNested(): boolean {\n let parent = this.hostElement.parentElement;\n while (parent) {\n if (parent.tagName.toLowerCase() === \"z-tool\") {\n return true;\n }\n parent = parent.parentElement;\n }\n\n return false;\n }\n\n componentWillLoad(): void {\n this.hasSlottedContent = this.hostElement.children.length > 0;\n this.isNested = this.checkIfNested();\n }\n\n disconnectedCallback(): void {\n clearTimeout(this.hoverDelay);\n }\n\n render(): HTMLZToolElement {\n return (\n <Host nested={this.isNested}>\n <button\n class=\"z-tool\"\n type=\"button\"\n aria-pressed={this.active ? \"true\" : \"false\"}\n aria-expanded={this.hasSlottedContent ? (this.open ? \"true\" : \"false\") : undefined}\n aria-label={this.htmlAriaLabel || this.tooltip || undefined}\n disabled={this.disabled}\n onClick={this.handleClick}\n onMouseEnter={this.handleTooltipOpen}\n onMouseLeave={this.handleTooltipClose}\n onFocus={this.handleTooltipOpen}\n onBlur={this.handleTooltipClose}\n >\n <z-icon\n ref={(el) => (this.iconRef = el)}\n name={this.icon}\n ></z-icon>\n </button>\n {this.tooltip && !this.isNested && (\n <z-popover\n class=\"z-tool-tooltip\"\n bindTo={this.iconRef}\n open={this.tooltipOpen}\n position={this.tooltipPosition}\n showArrow\n center\n closable={false}\n >\n <span class=\"body-4\">{this.tooltip}</span>\n </z-popover>\n )}\n {this.hasSlottedContent && (\n <div\n class={{\n \"z-tool-submenu\": true,\n \"z-tool-submenu-open\": this.open,\n }}\n >\n <slot></slot>\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-tool/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AACnH,OAAO,EAAqB,YAAY,EAAE,eAAe,EAAC,MAAM,aAAa,CAAC;AAG9E,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD;;;GAGG;AAMH,MAAM,OAAO,KA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AAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAC/E,MAAM;gBACN;6DAC6C;gBAC7C,QAAQ,EAAE,KAAK,EACf,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM;gBAEtE,8DAAa,CACH,CACb,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h} from \"@stencil/core\";\nimport {ColorPickerPalette, KeyboardCode, PopoverPosition} from \"../../beans\";\nimport {ZColorPickerCustomEvent, ZToolCustomEvent, ZTooltipCustomEvent} from \"../../components\";\nimport {IconName} from \"../../constants/iconset\";\nimport {containsElement} from \"../../utils/utils\";\n\n/**\n * ZTool component. Can display an icon, an optional tooltip (mainly for hints about the tool's functionality), and can contain a nested `z-toolbar` as a submenu that opens on click.\n * @slot - Optional slot for nested content (e.g., a secondary `z-toolbar`) that appears when the tool is open/clicked.\n */\n@Component({\n tag: \"z-tool\",\n styleUrls: [\"styles.css\", \"../../tokens/typography.css\"],\n shadow: true,\n})\nexport class ZTool {\n @Element() hostElement: HTMLZToolElement;\n\n /** Tool icon */\n @Prop()\n icon: IconName;\n\n /** Text displayed inside the tooltip. */\n @Prop()\n tooltip?: string;\n\n /** Preferred tooltip position. Defaults to true. */\n @Prop()\n tooltipPosition: PopoverPosition = PopoverPosition.TOP;\n\n /** Accessible label for the tool trigger. Falls back to tooltip content. */\n @Prop()\n htmlAriaLabel?: string;\n\n /** Visual active state. */\n @Prop({reflect: true})\n active = false;\n\n /** Disabled state. */\n @Prop({reflect: true})\n disabled = false;\n\n /** Open state. */\n @Prop({reflect: true, mutable: true})\n open = false;\n\n /**\n * Color to use to fill the icon's color indicator, if it has one.\n * Can be any valid value for the `fill` svg attribute.\n * The value of this prop is passed down to the `z-icon` component inside the tool.\n *\n * If `z-color-picker` component is used inside the tool's slot, its `colorSelected` event is listened\n * to automatically update `indicatorColor` and change the color of the icon indicator accordingly.\n */\n @Prop({mutable: true})\n indicatorColor?: string;\n\n @State()\n tooltipOpen = false;\n\n @State()\n hasSlottedContent = false;\n\n @State()\n isMobile = false;\n\n /** Indicates if the tool has nested open tools. Used to decide whether to auto-close the submenu. */\n @State()\n hasNestedOpenTools = false;\n\n /** Emitted when the open state changes. */\n @Event()\n toggleSubmenu: EventEmitter;\n\n /** Emitted when the tooltip open state changes. */\n @Event()\n toggleTooltip: EventEmitter;\n\n private buttonRef?: HTMLButtonElement;\n\n private iconRef?: HTMLElement;\n\n private tooltipRef?: HTMLZTooltipElement;\n\n private hoverDelay?: ReturnType<typeof setTimeout>;\n\n /** Indicates if the tool is nested inside another tool. */\n private isNested = false;\n\n /** Main `z-toolbar` ancestor element, meant to be the top-level toolbar not nested inside another tool. */\n private mainToolbar?: HTMLZToolbarElement;\n\n /** Media query list for detecting mobile view. */\n private mql?: MediaQueryList;\n\n /** Listener for changes in the mobile view media query. */\n private onMobileViewChange?: (e: MediaQueryListEvent) => void;\n\n /**\n * Opens the tooltip with a delay when the button is hovered or focused, and if the tool's content isn't already visible.\n */\n private handleTooltipOpen = (ev: FocusEvent | MouseEvent): void => {\n if (!this.tooltip || this.open || !this.buttonRef.contains(ev.target as Node)) {\n return;\n }\n\n clearTimeout(this.hoverDelay);\n this.hoverDelay = setTimeout(() => {\n this.tooltipOpen = true;\n }, 1000);\n };\n\n /**\n * Closes the tooltip immediately on button blur or when the mouse leaves the button or the tooltip, clearing any pending hover delay.\n */\n private handleTooltipClose = (ev: FocusEvent | MouseEvent): void => {\n if (!this.tooltip || (ev.relatedTarget as HTMLElement)?.closest(\"z-tooltip\") === this.tooltipRef) {\n return;\n }\n\n clearTimeout(this.hoverDelay);\n this.tooltipOpen = false;\n };\n\n /**\n * Handles click events on the tool's button element.\n * If the tool has slotted content, toggles the open state and focuses the active/selected item in the nested toolbar or color picker,\n * or the first item if no active/selected item is found.\n */\n private handleClick = (): void => {\n if (this.disabled || !this.hasSlottedContent) {\n return;\n }\n\n this.open = !this.open;\n if (this.open) {\n const colorPicker = this.hostElement.querySelector(\":scope > z-color-picker\") as HTMLZColorPickerElement | null;\n if (colorPicker) {\n colorPicker.setFocus();\n\n return;\n }\n\n // Focus the first active tool in the nested toolbar, or the first enabled if no active tool is found.\n const firstActiveOrEnabledNestedTool = (this.hostElement.querySelector(\n \":scope > z-toolbar z-tool[active]:not(:disabled)\"\n ) || this.hostElement.querySelector(\":scope > z-toolbar z-tool:not(:disabled)\")) as HTMLZToolElement | null;\n\n firstActiveOrEnabledNestedTool?.setFocus();\n }\n };\n\n /**\n * Handles `openChange` events from the tooltip popover to keep the `tooltipOpen` state in sync, but only if the event is coming from this tool's tooltip (and not from nested tools' tooltips).\n */\n private onTooltipOpenChange = (event: ZTooltipCustomEvent<{open: boolean}>): void => {\n if ((event.target as HTMLElement) === this.tooltipRef) {\n return;\n }\n\n this.tooltipOpen = event.detail.open;\n };\n\n @Watch(\"open\")\n handleOpenChange(): void {\n this.toggleSubmenu.emit(this.open);\n }\n\n @Watch(\"tooltipOpen\")\n handleTooltipOpenChange(): void {\n this.toggleTooltip.emit(this.tooltipOpen);\n }\n\n /**\n * Handle `ESC` and `shift+TAB` to close the submenu and move focus back to the button.\n */\n @Listen(\"keydown\")\n handleKeyDown(event: KeyboardEvent): void {\n if (!this.open || this.hasNestedOpenTools) {\n return;\n }\n\n switch (event.key) {\n case KeyboardCode.ESC:\n event.stopPropagation();\n this.open = false;\n this.setFocus();\n break;\n case KeyboardCode.TAB:\n if (event.shiftKey && (event.target as Element).closest(\"z-tool:not(:scope)\") === this.hostElement) {\n this.open = false;\n }\n break;\n }\n }\n\n /**\n * Close the popover on clicks outside the component, only if there are no nested open tools.\n * In that case any outside click should close the nested submenu(s) first.\n */\n @Listen(\"click\", {target: \"body\"})\n onOutsideClick(event: MouseEvent): void {\n const target = event.composedPath()[0] as HTMLElement;\n if (!this.open || containsElement(this.hostElement, target) || this.hasNestedOpenTools) {\n return;\n }\n\n this.open = false;\n }\n\n @Listen(\"toggleSubmenu\")\n onNestedToolToggle(ev: ZToolCustomEvent<boolean>): void {\n if (ev.target === this.hostElement) {\n return;\n }\n\n if (ev.detail === true) {\n this.hasNestedOpenTools = true;\n\n return;\n }\n\n this.hasNestedOpenTools = Array.from(this.hostElement.querySelectorAll(\"z-tool\")).some((tool) => tool.open);\n }\n\n /**\n * Handles the `colorSelected` event from a nested `z-color-picker` component.\n * Updates the `indicatorColor` and closes the tool's popover.\n */\n @Listen(\"colorSelected\")\n handleColorSelected(event: ZColorPickerCustomEvent<ColorPickerPalette>): void {\n if (!Array.from(this.hostElement.children).includes(event.target as Element)) {\n return;\n }\n\n this.indicatorColor = event.detail;\n this.open = false;\n this.setFocus();\n }\n\n /**\n * Close the submenu when focus moves outside the tool.\n */\n @Listen(\"focusin\", {target: \"body\", passive: true})\n handleExternalFocusin(ev: FocusEvent): void {\n const target = ev.target as Node;\n if (!containsElement(this.hostElement, target)) {\n this.open = false;\n }\n }\n\n /** Focuses the tool's button element. */\n @Method()\n async setFocus(): Promise<void> {\n if (this.disabled) {\n return;\n }\n\n setTimeout(() => {\n this.buttonRef?.focus();\n }, 50);\n }\n\n /** Sets the tab index of the tool's internal button element. */\n @Method()\n async setTabIndex(value: number): Promise<void> {\n if (!this.buttonRef) {\n return;\n }\n\n this.buttonRef.tabIndex = this.disabled ? -1 : value;\n }\n\n /** Closes the tooltip. */\n @Method()\n async closeTooltip(): Promise<void> {\n clearTimeout(this.hoverDelay);\n this.tooltipOpen = false;\n }\n\n componentWillLoad(): void {\n this.hasSlottedContent = this.hostElement.children.length > 0;\n this.isNested = !!this.hostElement.closest(\"z-tool:not(:scope)\");\n this.mainToolbar = this.hostElement.closest(\"z-toolbar:not(z-toolbar z-toolbar)\");\n this.hasNestedOpenTools = !!this.hostElement.querySelector(\"z-tool[open]\");\n\n this.mql = matchMedia(\"(max-width: 767px)\");\n this.onMobileViewChange = (e: MediaQueryListEvent) => (this.isMobile = e.matches);\n this.mql.addEventListener(\"change\", this.onMobileViewChange);\n this.isMobile = this.mql.matches;\n }\n\n disconnectedCallback(): void {\n clearTimeout(this.hoverDelay);\n this.mql?.removeEventListener(\"change\", this.onMobileViewChange);\n }\n\n render(): HTMLZToolElement {\n return (\n <Host class={{\"z-tool-tooltip-open\": this.tooltipOpen}}>\n <button\n class=\"z-tool\"\n type=\"button\"\n ref={(el) => (this.buttonRef = el)}\n aria-pressed={this.hasSlottedContent ? undefined : this.active ? \"true\" : \"false\"}\n aria-expanded={this.hasSlottedContent ? (this.open ? \"true\" : \"false\") : undefined}\n aria-haspopup={this.hasSlottedContent ? \"true\" : undefined}\n aria-label={this.htmlAriaLabel || this.tooltip || undefined}\n disabled={this.disabled}\n onClick={this.handleClick}\n onMouseEnter={this.handleTooltipOpen}\n onMouseLeave={this.handleTooltipClose}\n onFocus={this.handleTooltipOpen}\n onBlur={this.handleTooltipClose}\n >\n <z-icon\n ref={(el) => (this.iconRef = el)}\n name={this.icon}\n indicatorColor={this.indicatorColor}\n ></z-icon>\n </button>\n {this.tooltip && (\n <z-tooltip\n class=\"z-tool-tooltip\"\n ref={(el) => (this.tooltipRef = el)}\n bindTo={this.iconRef}\n open={this.tooltipOpen && !this.open}\n position={this.isNested ? PopoverPosition.BOTTOM : this.tooltipPosition}\n dark\n onMouseLeave={this.handleTooltipClose}\n onBlur={this.handleTooltipClose}\n onOpenChange={this.onTooltipOpenChange}\n >\n <span class=\"body-4\">{this.tooltip}</span>\n </z-tooltip>\n )}\n {this.hasSlottedContent && (\n <z-popover\n class=\"z-tool-submenu\"\n open={this.open}\n bindTo={this.isMobile && this.mainToolbar ? this.mainToolbar : this.hostElement}\n center\n /* disable auto-close to prevent unwanted close behaviors on mobile,\n when the bound element is the main toolbar */\n closable={false}\n position={this.isMobile ? PopoverPosition.TOP : PopoverPosition.BOTTOM}\n >\n <slot></slot>\n </z-popover>\n )}\n </Host>\n );\n }\n}\n"]}