@zanichelli/albe-web-components 19.3.0-RC5 → 19.3.0-rc1

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 (430) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/cjs/{iconset-Bcbz2MS1.js → iconset-oiCBBbd2.js} +15 -3
  3. package/dist/cjs/{index-2H1EJ2Tl.js → index-D_S5lGcb.js} +5 -5
  4. package/dist/cjs/index.cjs.js +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/web-components-library.cjs.js +2 -2
  7. package/dist/cjs/z-accordion.cjs.entry.js +1 -1
  8. package/dist/cjs/z-alert.cjs.entry.js +2 -2
  9. package/dist/cjs/z-anchor-navigation.cjs.entry.js +1 -1
  10. package/dist/cjs/z-app-header-deprecated.cjs.entry.js +1 -1
  11. package/dist/cjs/z-app-header_12.cjs.entry.js +137 -204
  12. package/dist/cjs/z-aria-alert.cjs.entry.js +1 -1
  13. package/dist/cjs/z-avatar.cjs.entry.js +1 -1
  14. package/dist/cjs/z-book-card-app.cjs.entry.js +1 -1
  15. package/dist/cjs/z-book-card-deprecated.cjs.entry.js +1 -1
  16. package/dist/cjs/z-book-card.cjs.entry.js +1 -1
  17. package/dist/cjs/z-book-cover.cjs.entry.js +1 -1
  18. package/dist/cjs/z-breadcrumb.cjs.entry.js +6 -6
  19. package/dist/cjs/z-button-sort.cjs.entry.js +1 -1
  20. package/dist/cjs/z-card.cjs.entry.js +1 -1
  21. package/dist/cjs/z-carousel.cjs.entry.js +1 -1
  22. package/dist/cjs/z-chip.cjs.entry.js +1 -1
  23. package/dist/cjs/z-color-picker.cjs.entry.js +1 -1
  24. package/dist/cjs/z-combobox.cjs.entry.js +6 -4
  25. package/dist/cjs/z-cover-hero.cjs.entry.js +1 -1
  26. package/dist/cjs/z-date-picker.cjs.entry.js +1 -1
  27. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +1 -1
  28. package/dist/cjs/z-file-upload.cjs.entry.js +1 -1
  29. package/dist/cjs/z-file.cjs.entry.js +1 -1
  30. package/dist/cjs/z-ghost-loading.cjs.entry.js +1 -1
  31. package/dist/cjs/z-info-box.cjs.entry.js +1 -1
  32. package/dist/cjs/z-info-reveal.cjs.entry.js +1 -1
  33. package/dist/cjs/z-logo.cjs.entry.js +1 -1
  34. package/dist/cjs/z-menu-deprecated.cjs.entry.js +1 -1
  35. package/dist/cjs/z-menu-section-deprecated.cjs.entry.js +1 -1
  36. package/dist/cjs/z-menu-section.cjs.entry.js +1 -1
  37. package/dist/cjs/z-menu.cjs.entry.js +1 -1
  38. package/dist/cjs/z-myz-card-alert.cjs.entry.js +2 -2
  39. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +2 -2
  40. package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +2 -2
  41. package/dist/cjs/z-myz-card-footer.cjs.entry.js +2 -2
  42. package/dist/cjs/z-myz-card-icon.cjs.entry.js +2 -2
  43. package/dist/cjs/z-myz-card-info.cjs.entry.js +2 -2
  44. package/dist/cjs/z-myz-card-list.cjs.entry.js +2 -2
  45. package/dist/cjs/z-myz-card_4.cjs.entry.js +5 -5
  46. package/dist/cjs/z-myz-list-item.cjs.entry.js +2 -2
  47. package/dist/cjs/z-myz-list.cjs.entry.js +2 -2
  48. package/dist/cjs/z-navigation-tabs.cjs.entry.js +1 -1
  49. package/dist/cjs/z-notification.cjs.entry.js +3 -3
  50. package/dist/cjs/z-otp.cjs.entry.js +3 -3
  51. package/dist/cjs/z-pagination.cjs.entry.js +3 -3
  52. package/dist/cjs/z-panel-elem.cjs.entry.js +1 -1
  53. package/dist/cjs/z-popover.cjs.entry.js +1 -1
  54. package/dist/cjs/z-range-picker.cjs.entry.js +1 -1
  55. package/dist/cjs/z-result-card.cjs.entry.js +1 -1
  56. package/dist/cjs/z-section-title.cjs.entry.js +1 -1
  57. package/dist/cjs/z-select.cjs.entry.js +1 -1
  58. package/dist/cjs/z-skip-to-content.cjs.entry.js +2 -2
  59. package/dist/cjs/z-slideshow.cjs.entry.js +1 -1
  60. package/dist/cjs/z-stepper-item.cjs.entry.js +2 -2
  61. package/dist/cjs/z-stepper.cjs.entry.js +2 -2
  62. package/dist/cjs/z-table.cjs.entry.js +1 -1
  63. package/dist/cjs/z-tbody.cjs.entry.js +1 -1
  64. package/dist/cjs/z-td.cjs.entry.js +4 -4
  65. package/dist/cjs/z-tfoot.cjs.entry.js +1 -1
  66. package/dist/cjs/z-th.cjs.entry.js +6 -4
  67. package/dist/cjs/z-thead.cjs.entry.js +1 -1
  68. package/dist/cjs/z-toast-notification-list.cjs.entry.js +2 -2
  69. package/dist/cjs/z-toast-notification.cjs.entry.js +96 -35
  70. package/dist/cjs/z-toggle-button.cjs.entry.js +3 -3
  71. package/dist/cjs/z-toggle-switch.cjs.entry.js +4 -4
  72. package/dist/cjs/z-tool.cjs.entry.js +3 -3
  73. package/dist/cjs/z-toolbar.cjs.entry.js +2 -2
  74. package/dist/cjs/z-tooltip.cjs.entry.js +2 -2
  75. package/dist/cjs/z-tr.cjs.entry.js +1 -1
  76. package/dist/cjs/z-tree-list.cjs.entry.js +1 -1
  77. package/dist/cjs/z-visually-hidden.cjs.entry.js +1 -1
  78. package/dist/collection/components/css-components/z-scrollbar/styles.css +40 -0
  79. package/dist/collection/components/table/cells/{z-td/styles.css → z-table-cells.css} +0 -1
  80. package/dist/collection/components/table/cells/z-td/index.js +3 -3
  81. package/dist/collection/components/table/cells/z-th/index.js +3 -3
  82. package/dist/collection/components/table/cells/z-th/styles.css +0 -72
  83. package/dist/collection/components/z-app-header/index.js +21 -2
  84. package/dist/collection/components/z-app-header/index.stories.js +25 -9
  85. package/dist/collection/components/z-breadcrumb/index.js +5 -5
  86. package/dist/collection/components/z-button/index.js +5 -2
  87. package/dist/collection/components/z-combobox/index.js +3 -3
  88. package/dist/collection/components/z-combobox/styles.css +0 -12
  89. package/dist/collection/components/z-input/index.js +3 -3
  90. package/dist/collection/components/z-input/styles-checkbox-radio.css +130 -0
  91. package/dist/collection/components/z-input/styles-general.css +166 -0
  92. package/dist/collection/components/z-input/styles-text.css +87 -0
  93. package/dist/collection/components/z-input/styles-textarea.css +19 -0
  94. package/dist/collection/components/z-notification/index.js +3 -2
  95. package/dist/collection/components/z-notification/index.stories.js +79 -77
  96. package/dist/collection/components/z-notification/styles.css +8 -6
  97. package/dist/collection/components/z-pagination/index.js +2 -2
  98. package/dist/collection/components/z-searchbar/index.js +133 -193
  99. package/dist/collection/components/z-searchbar/index.stories.js +12 -16
  100. package/dist/collection/components/z-searchbar/styles.css +87 -201
  101. package/dist/collection/components/z-skip-to-content/index.js +1 -1
  102. package/dist/collection/components/z-stepper/index.js +1 -1
  103. package/dist/collection/components/z-stepper-item/index.js +1 -1
  104. package/dist/collection/components/z-toast-notification/index.js +3 -3
  105. package/dist/collection/components/z-toast-notification-list/index.js +1 -1
  106. package/dist/collection/components/z-toggle-button/index.js +2 -2
  107. package/dist/collection/components/z-toggle-switch/index.js +3 -3
  108. package/dist/collection/components/z-tool/index.js +3 -3
  109. package/dist/collection/components/z-toolbar/index.js +1 -1
  110. package/dist/collection/components/z-tooltip/index.js +1 -1
  111. package/dist/collection/constants/iconset.js +15 -3
  112. package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +1 -1
  113. package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +1 -1
  114. package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +1 -1
  115. package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +1 -1
  116. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
  117. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -1
  118. package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +1 -1
  119. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
  120. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +1 -1
  121. package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
  122. package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
  123. package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
  124. package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +1 -1
  125. package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
  126. package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
  127. package/dist/components/iconset.js +1 -1
  128. package/dist/components/index13.js +1 -1
  129. package/dist/components/index22.js +1 -1
  130. package/dist/components/index23.js +1 -1
  131. package/dist/components/index24.js +1 -1
  132. package/dist/components/index25.js +1 -1
  133. package/dist/components/index26.js +1 -1
  134. package/dist/components/index27.js +1 -1
  135. package/dist/components/index4.js +1 -1
  136. package/dist/components/index5.js +1 -1
  137. package/dist/components/index7.js +1 -1
  138. package/dist/components/z-app-header.js +1 -1
  139. package/dist/components/z-breadcrumb.js +1 -1
  140. package/dist/components/z-combobox.js +1 -1
  141. package/dist/components/z-myz-card-alert.js +1 -1
  142. package/dist/components/z-myz-card-dictionary.js +1 -1
  143. package/dist/components/z-myz-card-footer-sections.js +1 -1
  144. package/dist/components/z-myz-card-footer.js +1 -1
  145. package/dist/components/z-myz-card-icon.js +1 -1
  146. package/dist/components/z-myz-card-info.js +1 -1
  147. package/dist/components/z-myz-card-list.js +1 -1
  148. package/dist/components/z-myz-list.js +1 -1
  149. package/dist/components/z-notification.js +1 -1
  150. package/dist/components/z-otp.js +1 -1
  151. package/dist/components/z-pagination.js +1 -1
  152. package/dist/components/z-skip-to-content.js +1 -1
  153. package/dist/components/z-stepper-item.js +1 -1
  154. package/dist/components/z-stepper.js +1 -1
  155. package/dist/components/z-td.js +1 -1
  156. package/dist/components/z-th.js +1 -1
  157. package/dist/components/z-toast-notification-list.js +1 -1
  158. package/dist/components/z-toast-notification.js +1 -1
  159. package/dist/components/z-toggle-button.js +1 -1
  160. package/dist/components/z-toggle-switch.js +1 -1
  161. package/dist/components/z-tool.js +1 -1
  162. package/dist/components/z-toolbar.js +1 -1
  163. package/dist/esm/{iconset-BanpkIXZ.js → iconset-CjHS9zeM.js} +15 -3
  164. package/dist/esm/{index-ByN2sYu6.js → index-DPdXlnVe.js} +5 -5
  165. package/dist/esm/index.js +2 -2
  166. package/dist/esm/loader.js +3 -3
  167. package/dist/esm/{utils-0PByxJyN.js → utils-DYd3kO0P.js} +1 -1
  168. package/dist/esm/web-components-library.js +3 -3
  169. package/dist/esm/z-accordion.entry.js +1 -1
  170. package/dist/esm/z-alert.entry.js +2 -2
  171. package/dist/esm/z-anchor-navigation.entry.js +1 -1
  172. package/dist/esm/z-app-header-deprecated.entry.js +1 -1
  173. package/dist/esm/z-app-header_12.entry.js +139 -206
  174. package/dist/esm/z-aria-alert.entry.js +1 -1
  175. package/dist/esm/z-avatar.entry.js +1 -1
  176. package/dist/esm/z-book-card-app.entry.js +1 -1
  177. package/dist/esm/z-book-card-deprecated.entry.js +2 -2
  178. package/dist/esm/z-book-card.entry.js +1 -1
  179. package/dist/esm/z-book-cover.entry.js +1 -1
  180. package/dist/esm/z-breadcrumb.entry.js +7 -7
  181. package/dist/esm/z-button-sort.entry.js +1 -1
  182. package/dist/esm/z-card.entry.js +1 -1
  183. package/dist/esm/z-carousel.entry.js +1 -1
  184. package/dist/esm/z-chip.entry.js +1 -1
  185. package/dist/esm/z-color-picker.entry.js +2 -2
  186. package/dist/esm/z-combobox.entry.js +7 -5
  187. package/dist/esm/z-cover-hero.entry.js +1 -1
  188. package/dist/esm/z-date-picker.entry.js +1 -1
  189. package/dist/esm/z-dragdrop-area_2.entry.js +1 -1
  190. package/dist/esm/z-file-upload.entry.js +1 -1
  191. package/dist/esm/z-file.entry.js +1 -1
  192. package/dist/esm/z-ghost-loading.entry.js +1 -1
  193. package/dist/esm/z-info-box.entry.js +1 -1
  194. package/dist/esm/z-info-reveal.entry.js +1 -1
  195. package/dist/esm/z-logo.entry.js +1 -1
  196. package/dist/esm/z-menu-deprecated.entry.js +1 -1
  197. package/dist/esm/z-menu-section-deprecated.entry.js +1 -1
  198. package/dist/esm/z-menu-section.entry.js +1 -1
  199. package/dist/esm/z-menu.entry.js +2 -2
  200. package/dist/esm/z-myz-card-alert.entry.js +2 -2
  201. package/dist/esm/z-myz-card-dictionary.entry.js +2 -2
  202. package/dist/esm/z-myz-card-footer-sections.entry.js +2 -2
  203. package/dist/esm/z-myz-card-footer.entry.js +2 -2
  204. package/dist/esm/z-myz-card-icon.entry.js +2 -2
  205. package/dist/esm/z-myz-card-info.entry.js +3 -3
  206. package/dist/esm/z-myz-card-list.entry.js +2 -2
  207. package/dist/esm/z-myz-card_4.entry.js +5 -5
  208. package/dist/esm/z-myz-list-item.entry.js +3 -3
  209. package/dist/esm/z-myz-list.entry.js +2 -2
  210. package/dist/esm/z-navigation-tabs.entry.js +1 -1
  211. package/dist/esm/z-notification.entry.js +3 -3
  212. package/dist/esm/z-otp.entry.js +3 -3
  213. package/dist/esm/z-pagination.entry.js +3 -3
  214. package/dist/esm/z-panel-elem.entry.js +1 -1
  215. package/dist/esm/z-popover.entry.js +2 -2
  216. package/dist/esm/z-range-picker.entry.js +1 -1
  217. package/dist/esm/z-result-card.entry.js +1 -1
  218. package/dist/esm/z-section-title.entry.js +1 -1
  219. package/dist/esm/z-select.entry.js +2 -2
  220. package/dist/esm/z-skip-to-content.entry.js +3 -3
  221. package/dist/esm/z-slideshow.entry.js +2 -2
  222. package/dist/esm/z-stepper-item.entry.js +2 -2
  223. package/dist/esm/z-stepper.entry.js +2 -2
  224. package/dist/esm/z-table.entry.js +2 -2
  225. package/dist/esm/z-tbody.entry.js +1 -1
  226. package/dist/esm/z-td.entry.js +4 -4
  227. package/dist/esm/z-tfoot.entry.js +1 -1
  228. package/dist/esm/z-th.entry.js +6 -4
  229. package/dist/esm/z-thead.entry.js +1 -1
  230. package/dist/esm/z-toast-notification-list.entry.js +2 -2
  231. package/dist/esm/z-toast-notification.entry.js +96 -35
  232. package/dist/esm/z-toggle-button.entry.js +3 -3
  233. package/dist/esm/z-toggle-switch.entry.js +5 -5
  234. package/dist/esm/z-tool.entry.js +4 -4
  235. package/dist/esm/z-toolbar.entry.js +2 -2
  236. package/dist/esm/z-tooltip.entry.js +2 -2
  237. package/dist/esm/z-tr.entry.js +2 -2
  238. package/dist/esm/z-tree-list.entry.js +1 -1
  239. package/dist/esm/z-visually-hidden.entry.js +1 -1
  240. package/dist/types/components/z-app-header/index.d.ts +4 -0
  241. package/dist/types/components/z-app-header/index.stories.d.ts +7 -0
  242. package/dist/types/components/z-notification/index.d.ts +2 -1
  243. package/dist/types/components/z-notification/index.stories.d.ts +27 -22
  244. package/dist/types/components/z-searchbar/index.d.ts +26 -28
  245. package/dist/types/components/z-searchbar/index.stories.d.ts +4 -0
  246. package/dist/types/components.d.ts +42 -18
  247. package/dist/types/constants/iconset.d.ts +30 -6
  248. package/dist/web-components-library/index.esm.js +1 -1
  249. package/dist/web-components-library/p-087956fa.entry.js +1 -0
  250. package/dist/web-components-library/{p-9b181c2c.entry.js → p-10e5e16e.entry.js} +1 -1
  251. package/dist/web-components-library/{p-8f945346.entry.js → p-13e7f751.entry.js} +1 -1
  252. package/dist/web-components-library/{p-366d2553.entry.js → p-14b804f9.entry.js} +1 -1
  253. package/{www/build/p-9d3bde23.entry.js → dist/web-components-library/p-1580db58.entry.js} +1 -1
  254. package/dist/web-components-library/p-15825811.entry.js +1 -0
  255. package/dist/web-components-library/{p-1210c90f.entry.js → p-1993b0ad.entry.js} +1 -1
  256. package/dist/web-components-library/{p-eb722234.entry.js → p-1a95491d.entry.js} +1 -1
  257. package/dist/web-components-library/{p-ebdbd84c.entry.js → p-1d023220.entry.js} +1 -1
  258. package/dist/web-components-library/{p-5fc4048b.entry.js → p-21c85e04.entry.js} +1 -1
  259. package/dist/web-components-library/{p-081b1648.entry.js → p-23b46642.entry.js} +1 -1
  260. package/dist/web-components-library/{p-59d4ac9e.entry.js → p-299f0f85.entry.js} +1 -1
  261. package/dist/web-components-library/p-29dde955.entry.js +1 -0
  262. package/dist/web-components-library/p-2c036e17.entry.js +1 -0
  263. package/dist/web-components-library/{p-c23bfec2.entry.js → p-2d4c01c3.entry.js} +1 -1
  264. package/dist/web-components-library/p-2dabe353.entry.js +1 -0
  265. package/dist/web-components-library/{p-1afd69ba.entry.js → p-2df6d169.entry.js} +1 -1
  266. package/dist/web-components-library/{p-2f99634d.entry.js → p-2ef82e17.entry.js} +1 -1
  267. package/dist/web-components-library/{p-30c86858.entry.js → p-324933f6.entry.js} +1 -1
  268. package/{www/build/p-50b59012.entry.js → dist/web-components-library/p-37e84b71.entry.js} +1 -1
  269. package/dist/web-components-library/{p-1e984688.entry.js → p-3c53e451.entry.js} +1 -1
  270. package/dist/web-components-library/{p-5883dbc1.entry.js → p-3ea03d34.entry.js} +1 -1
  271. package/dist/web-components-library/p-41584e90.entry.js +1 -0
  272. package/{www/build/p-6ece59b5.entry.js → dist/web-components-library/p-50e10a10.entry.js} +1 -1
  273. package/dist/web-components-library/{p-17429bce.entry.js → p-52899754.entry.js} +1 -1
  274. package/dist/web-components-library/p-53670be4.entry.js +1 -0
  275. package/dist/web-components-library/{p-02e588b4.entry.js → p-583b8152.entry.js} +1 -1
  276. package/dist/web-components-library/{p-afab22fc.entry.js → p-5a05dc1e.entry.js} +1 -1
  277. package/dist/web-components-library/{p-a975b91d.entry.js → p-5d20fc3d.entry.js} +1 -1
  278. package/{www/build/p-5c85b7f4.entry.js → dist/web-components-library/p-622466f9.entry.js} +1 -1
  279. package/dist/web-components-library/{p-0727e9aa.entry.js → p-658f022d.entry.js} +1 -1
  280. package/dist/web-components-library/{p-ecea3d09.entry.js → p-6bd35edf.entry.js} +1 -1
  281. package/dist/web-components-library/{p-00f09ae2.entry.js → p-7226f07a.entry.js} +1 -1
  282. package/dist/web-components-library/p-7371a543.entry.js +2 -0
  283. package/dist/web-components-library/{p-b5c180bc.entry.js → p-77bf39a4.entry.js} +1 -1
  284. package/dist/web-components-library/{p-acf23ad8.entry.js → p-788eaac7.entry.js} +1 -1
  285. package/{www/build/p-631f111d.entry.js → dist/web-components-library/p-7bf7539a.entry.js} +1 -1
  286. package/dist/web-components-library/p-81eb43fd.entry.js +1 -0
  287. package/dist/web-components-library/{p-abfdc045.entry.js → p-8261c869.entry.js} +1 -1
  288. package/{www/build/p-5bb77af2.entry.js → dist/web-components-library/p-83da1031.entry.js} +1 -1
  289. package/{www/build/p-d57c5efc.entry.js → dist/web-components-library/p-85cac60d.entry.js} +1 -1
  290. package/dist/web-components-library/{p-2294f1b0.entry.js → p-88a3ba7c.entry.js} +1 -1
  291. package/dist/web-components-library/{p-0ca6e928.entry.js → p-8a8df4f4.entry.js} +1 -1
  292. package/dist/web-components-library/{p-040fbd28.entry.js → p-8b026993.entry.js} +1 -1
  293. package/dist/web-components-library/{p-294f7b4e.entry.js → p-8d7e2e16.entry.js} +1 -1
  294. package/dist/web-components-library/{p-19536f5e.entry.js → p-8de064a4.entry.js} +1 -1
  295. package/dist/web-components-library/{p-aabb5aea.entry.js → p-8f4a04aa.entry.js} +1 -1
  296. package/dist/web-components-library/{p-D4yqZKyM.js → p-CPsEG702.js} +1 -1
  297. package/dist/web-components-library/p-CjHS9zeM.js +1 -0
  298. package/dist/web-components-library/{p-ByN2sYu6.js → p-DPdXlnVe.js} +1 -1
  299. package/dist/web-components-library/{p-58933ba5.entry.js → p-a4f673f8.entry.js} +1 -1
  300. package/dist/web-components-library/{p-a336c241.entry.js → p-aa4fc3d3.entry.js} +1 -1
  301. package/{www/build/p-48d72b52.entry.js → dist/web-components-library/p-aa72d766.entry.js} +1 -1
  302. package/{www/build/p-b38d52e5.entry.js → dist/web-components-library/p-ad2cd7fc.entry.js} +1 -1
  303. package/dist/web-components-library/{p-241eaed0.entry.js → p-b6223d7e.entry.js} +1 -1
  304. package/{www/build/p-41b55222.entry.js → dist/web-components-library/p-b851f20b.entry.js} +1 -1
  305. package/dist/web-components-library/{p-d304ce44.entry.js → p-b9343431.entry.js} +1 -1
  306. package/dist/web-components-library/{p-a3a7c406.entry.js → p-be354b22.entry.js} +1 -1
  307. package/dist/web-components-library/{p-c8f40472.entry.js → p-c42ddd93.entry.js} +1 -1
  308. package/dist/web-components-library/{p-896470e8.entry.js → p-c4e7bd16.entry.js} +1 -1
  309. package/dist/web-components-library/{p-794c613e.entry.js → p-c944a943.entry.js} +1 -1
  310. package/dist/web-components-library/{p-4b0a730e.entry.js → p-cd33f4b1.entry.js} +1 -1
  311. package/dist/web-components-library/{p-ad2ed505.entry.js → p-cdd88182.entry.js} +1 -1
  312. package/dist/web-components-library/{p-8745878e.entry.js → p-d3053434.entry.js} +1 -1
  313. package/dist/web-components-library/{p-fade8c19.entry.js → p-d63665c1.entry.js} +1 -1
  314. package/dist/web-components-library/{p-1b851174.entry.js → p-dabccb20.entry.js} +1 -1
  315. package/dist/web-components-library/p-dc5ab2cc.entry.js +1 -0
  316. package/dist/web-components-library/{p-5797bf38.entry.js → p-dfd43710.entry.js} +1 -1
  317. package/dist/web-components-library/{p-0a819ab4.entry.js → p-e1d0a6e3.entry.js} +1 -1
  318. package/dist/web-components-library/p-e48497f0.entry.js +1 -0
  319. package/dist/web-components-library/{p-a9534450.entry.js → p-ec4940ce.entry.js} +1 -1
  320. package/dist/web-components-library/{p-ed74f357.entry.js → p-eddc2d19.entry.js} +1 -1
  321. package/dist/web-components-library/{p-6d53942a.entry.js → p-ef5018bb.entry.js} +1 -1
  322. package/dist/web-components-library/{p-f5e7fa96.entry.js → p-f7e46ef2.entry.js} +1 -1
  323. package/dist/web-components-library/web-components-library.css +1 -1
  324. package/dist/web-components-library/web-components-library.esm.js +1 -1
  325. package/package.json +3 -3
  326. package/www/build/index.esm.js +1 -1
  327. package/www/build/p-087956fa.entry.js +1 -0
  328. package/www/build/{p-9b181c2c.entry.js → p-10e5e16e.entry.js} +1 -1
  329. package/www/build/{p-8f945346.entry.js → p-13e7f751.entry.js} +1 -1
  330. package/www/build/{p-366d2553.entry.js → p-14b804f9.entry.js} +1 -1
  331. package/{dist/web-components-library/p-9d3bde23.entry.js → www/build/p-1580db58.entry.js} +1 -1
  332. package/www/build/p-15825811.entry.js +1 -0
  333. package/www/build/{p-1210c90f.entry.js → p-1993b0ad.entry.js} +1 -1
  334. package/www/build/{p-eb722234.entry.js → p-1a95491d.entry.js} +1 -1
  335. package/www/build/{p-ebdbd84c.entry.js → p-1d023220.entry.js} +1 -1
  336. package/www/build/{p-5fc4048b.entry.js → p-21c85e04.entry.js} +1 -1
  337. package/www/build/{p-081b1648.entry.js → p-23b46642.entry.js} +1 -1
  338. package/www/build/{p-59d4ac9e.entry.js → p-299f0f85.entry.js} +1 -1
  339. package/www/build/p-29dde955.entry.js +1 -0
  340. package/www/build/p-2c036e17.entry.js +1 -0
  341. package/www/build/{p-c23bfec2.entry.js → p-2d4c01c3.entry.js} +1 -1
  342. package/www/build/p-2dabe353.entry.js +1 -0
  343. package/www/build/{p-1afd69ba.entry.js → p-2df6d169.entry.js} +1 -1
  344. package/www/build/{p-2f99634d.entry.js → p-2ef82e17.entry.js} +1 -1
  345. package/www/build/{p-30c86858.entry.js → p-324933f6.entry.js} +1 -1
  346. package/{dist/web-components-library/p-50b59012.entry.js → www/build/p-37e84b71.entry.js} +1 -1
  347. package/www/build/{p-1e984688.entry.js → p-3c53e451.entry.js} +1 -1
  348. package/www/build/{p-5883dbc1.entry.js → p-3ea03d34.entry.js} +1 -1
  349. package/www/build/p-41584e90.entry.js +1 -0
  350. package/{dist/web-components-library/p-6ece59b5.entry.js → www/build/p-50e10a10.entry.js} +1 -1
  351. package/www/build/{p-17429bce.entry.js → p-52899754.entry.js} +1 -1
  352. package/www/build/p-53670be4.entry.js +1 -0
  353. package/www/build/{p-02e588b4.entry.js → p-583b8152.entry.js} +1 -1
  354. package/www/build/{p-afab22fc.entry.js → p-5a05dc1e.entry.js} +1 -1
  355. package/www/build/{p-a975b91d.entry.js → p-5d20fc3d.entry.js} +1 -1
  356. package/{dist/web-components-library/p-5c85b7f4.entry.js → www/build/p-622466f9.entry.js} +1 -1
  357. package/www/build/{p-0727e9aa.entry.js → p-658f022d.entry.js} +1 -1
  358. package/www/build/{p-ecea3d09.entry.js → p-6bd35edf.entry.js} +1 -1
  359. package/www/build/{p-00f09ae2.entry.js → p-7226f07a.entry.js} +1 -1
  360. package/www/build/p-7371a543.entry.js +2 -0
  361. package/www/build/{p-b5c180bc.entry.js → p-77bf39a4.entry.js} +1 -1
  362. package/www/build/{p-acf23ad8.entry.js → p-788eaac7.entry.js} +1 -1
  363. package/{dist/web-components-library/p-631f111d.entry.js → www/build/p-7bf7539a.entry.js} +1 -1
  364. package/www/build/p-81eb43fd.entry.js +1 -0
  365. package/www/build/{p-abfdc045.entry.js → p-8261c869.entry.js} +1 -1
  366. package/{dist/web-components-library/p-5bb77af2.entry.js → www/build/p-83da1031.entry.js} +1 -1
  367. package/{dist/web-components-library/p-d57c5efc.entry.js → www/build/p-85cac60d.entry.js} +1 -1
  368. package/www/build/{p-2294f1b0.entry.js → p-88a3ba7c.entry.js} +1 -1
  369. package/www/build/{p-0ca6e928.entry.js → p-8a8df4f4.entry.js} +1 -1
  370. package/www/build/{p-040fbd28.entry.js → p-8b026993.entry.js} +1 -1
  371. package/www/build/{p-294f7b4e.entry.js → p-8d7e2e16.entry.js} +1 -1
  372. package/www/build/{p-19536f5e.entry.js → p-8de064a4.entry.js} +1 -1
  373. package/www/build/{p-aabb5aea.entry.js → p-8f4a04aa.entry.js} +1 -1
  374. package/www/build/{p-D4yqZKyM.js → p-CPsEG702.js} +1 -1
  375. package/www/build/p-CjHS9zeM.js +1 -0
  376. package/www/build/{p-ByN2sYu6.js → p-DPdXlnVe.js} +1 -1
  377. package/www/build/{p-58933ba5.entry.js → p-a4f673f8.entry.js} +1 -1
  378. package/www/build/{p-a336c241.entry.js → p-aa4fc3d3.entry.js} +1 -1
  379. package/{dist/web-components-library/p-48d72b52.entry.js → www/build/p-aa72d766.entry.js} +1 -1
  380. package/{dist/web-components-library/p-b38d52e5.entry.js → www/build/p-ad2cd7fc.entry.js} +1 -1
  381. package/www/build/{p-241eaed0.entry.js → p-b6223d7e.entry.js} +1 -1
  382. package/{dist/web-components-library/p-41b55222.entry.js → www/build/p-b851f20b.entry.js} +1 -1
  383. package/www/build/{p-d304ce44.entry.js → p-b9343431.entry.js} +1 -1
  384. package/www/build/{p-a3a7c406.entry.js → p-be354b22.entry.js} +1 -1
  385. package/www/build/{p-c8f40472.entry.js → p-c42ddd93.entry.js} +1 -1
  386. package/www/build/{p-896470e8.entry.js → p-c4e7bd16.entry.js} +1 -1
  387. package/www/build/{p-ea2cbe37.js → p-c5c5a64f.js} +1 -1
  388. package/www/build/{p-813bd63b.css → p-c60c851a.css} +1 -1
  389. package/www/build/{p-794c613e.entry.js → p-c944a943.entry.js} +1 -1
  390. package/www/build/{p-4b0a730e.entry.js → p-cd33f4b1.entry.js} +1 -1
  391. package/www/build/{p-ad2ed505.entry.js → p-cdd88182.entry.js} +1 -1
  392. package/www/build/{p-8745878e.entry.js → p-d3053434.entry.js} +1 -1
  393. package/www/build/{p-fade8c19.entry.js → p-d63665c1.entry.js} +1 -1
  394. package/www/build/{p-1b851174.entry.js → p-dabccb20.entry.js} +1 -1
  395. package/www/build/p-dc5ab2cc.entry.js +1 -0
  396. package/www/build/{p-5797bf38.entry.js → p-dfd43710.entry.js} +1 -1
  397. package/www/build/{p-0a819ab4.entry.js → p-e1d0a6e3.entry.js} +1 -1
  398. package/www/build/p-e48497f0.entry.js +1 -0
  399. package/www/build/{p-a9534450.entry.js → p-ec4940ce.entry.js} +1 -1
  400. package/www/build/{p-ed74f357.entry.js → p-eddc2d19.entry.js} +1 -1
  401. package/www/build/{p-6d53942a.entry.js → p-ef5018bb.entry.js} +1 -1
  402. package/www/build/{p-f5e7fa96.entry.js → p-f7e46ef2.entry.js} +1 -1
  403. package/www/build/web-components-library.css +1 -1
  404. package/www/build/web-components-library.esm.js +1 -1
  405. package/www/index.html +1 -1
  406. package/dist/collection/components/z-input/styles.css +0 -406
  407. package/dist/web-components-library/p-062ba668.entry.js +0 -1
  408. package/dist/web-components-library/p-0eb7baa4.entry.js +0 -1
  409. package/dist/web-components-library/p-1c5bbea1.entry.js +0 -1
  410. package/dist/web-components-library/p-27f93251.entry.js +0 -1
  411. package/dist/web-components-library/p-314302ce.entry.js +0 -1
  412. package/dist/web-components-library/p-3c861d49.entry.js +0 -1
  413. package/dist/web-components-library/p-7a55d688.entry.js +0 -2
  414. package/dist/web-components-library/p-8042aaf7.entry.js +0 -1
  415. package/dist/web-components-library/p-BanpkIXZ.js +0 -1
  416. package/dist/web-components-library/p-a1127213.entry.js +0 -1
  417. package/dist/web-components-library/p-afcabf3b.entry.js +0 -1
  418. package/dist/web-components-library/p-db0a60fc.entry.js +0 -1
  419. package/www/build/p-062ba668.entry.js +0 -1
  420. package/www/build/p-0eb7baa4.entry.js +0 -1
  421. package/www/build/p-1c5bbea1.entry.js +0 -1
  422. package/www/build/p-27f93251.entry.js +0 -1
  423. package/www/build/p-314302ce.entry.js +0 -1
  424. package/www/build/p-3c861d49.entry.js +0 -1
  425. package/www/build/p-7a55d688.entry.js +0 -2
  426. package/www/build/p-8042aaf7.entry.js +0 -1
  427. package/www/build/p-BanpkIXZ.js +0 -1
  428. package/www/build/p-a1127213.entry.js +0 -1
  429. package/www/build/p-afcabf3b.entry.js +0 -1
  430. package/www/build/p-db0a60fc.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as t,c as e,h as i,H as o,d as n}from"./p-ByN2sYu6.js";import{P as s,g as a}from"./p-BKCj6NR2.js";import{a as r}from"./p-D4yqZKyM.js";import"./p-Q-tWjk7P.js";const h=class{constructor(i){t(this,i),this.toggleSubmenu=e(this,"toggleSubmenu",7),this.toggleTooltip=e(this,"toggleTooltip",7),this.tooltipPosition=s.TOP,this.active=!1,this.disabled=!1,this.open=!1,this.tooltipOpen=!1,this.hasSlottedContent=!1,this.isMobile=!1,this.hasNestedOpenTools=!1,this.isNested=!1,this.handleTooltipOpen=t=>{this.tooltip&&!this.open&&this.buttonRef.contains(t.target)&&(clearTimeout(this.hoverDelay),this.hoverDelay=setTimeout((()=>{this.tooltipOpen=!0}),1e3))},this.handleTooltipClose=t=>{var e;this.tooltip&&(null===(e=t.relatedTarget)||void 0===e?void 0:e.closest("z-tooltip"))!==this.tooltipRef&&(clearTimeout(this.hoverDelay),this.tooltipOpen=!1)},this.handleClick=()=>{if(!this.disabled&&this.hasSlottedContent&&(this.open=!this.open,this.open)){const t=this.hostElement.querySelector(":scope > z-color-picker");if(t)return void t.setFocus();const e=this.hostElement.querySelector(":scope > z-toolbar z-tool[active]:not(:disabled)")||this.hostElement.querySelector(":scope > z-toolbar z-tool:not(:disabled)");null==e||e.setFocus()}},this.onTooltipOpenChange=t=>{t.target!==this.tooltipRef&&(this.tooltipOpen=t.detail.open)}}handleOpenChange(){this.toggleSubmenu.emit(this.open)}handleTooltipOpenChange(){this.toggleTooltip.emit(this.tooltipOpen)}handleKeyDown(t){if(this.open&&!this.hasNestedOpenTools)switch(t.key){case a.ESC:t.stopPropagation(),this.open=!1,this.setFocus();break;case a.TAB:t.shiftKey&&t.target.closest("z-tool:not(:scope)")===this.hostElement&&(this.open=!1)}}onOutsideClick(t){const e=t.composedPath()[0];!this.open||r(this.hostElement,e)||this.hasNestedOpenTools||(this.open=!1)}onNestedToolToggle(t){t.target!==this.hostElement&&(this.hasNestedOpenTools=!0===t.detail||Array.from(this.hostElement.querySelectorAll("z-tool")).some((t=>t.open)))}handleColorSelected(t){Array.from(this.hostElement.children).includes(t.target)&&(this.indicatorColor=t.detail,this.open=!1,this.setFocus())}handleExternalFocusin(t){r(this.hostElement,t.target)||(this.open=!1)}async setFocus(){this.disabled||setTimeout((()=>{var t;null===(t=this.buttonRef)||void 0===t||t.focus()}),50)}async setTabIndex(t){this.buttonRef&&(this.buttonRef.tabIndex=this.disabled?-1:t)}async closeTooltip(){clearTimeout(this.hoverDelay),this.tooltipOpen=!1}componentWillLoad(){this.hasSlottedContent=this.hostElement.children.length>0,this.isNested=!!this.hostElement.closest("z-tool:not(:scope)"),this.mainToolbar=this.hostElement.closest("z-toolbar:not(z-toolbar z-toolbar)"),this.hasNestedOpenTools=!!this.hostElement.querySelector("z-tool[open]"),this.mql=matchMedia("(max-width: 767px)"),this.onMobileViewChange=t=>this.isMobile=t.matches,this.mql.addEventListener("change",this.onMobileViewChange),this.isMobile=this.mql.matches}disconnectedCallback(){var t;clearTimeout(this.hoverDelay),null===(t=this.mql)||void 0===t||t.removeEventListener("change",this.onMobileViewChange)}render(){return i(o,{key:"1a87f70e20dca23bc4207f03aa1cd933c5fa668e",class:{"z-tool-tooltip-open":this.tooltipOpen}},i("button",{key:"df7f4ad8a47dee955b9c4c249354fa114410409d",class:"z-tool",type:"button",ref:t=>this.buttonRef=t,"aria-pressed":this.hasSlottedContent?void 0:this.active?"true":"false","aria-expanded":this.hasSlottedContent?this.open?"true":"false":void 0,"aria-haspopup":this.hasSlottedContent?"true":void 0,"aria-label":this.htmlAriaLabel||this.tooltip||void 0,disabled:this.disabled,onClick:this.handleClick,onMouseEnter:this.handleTooltipOpen,onMouseLeave:this.handleTooltipClose,onFocus:this.handleTooltipOpen,onBlur:this.handleTooltipClose},i("z-icon",{key:"43bd668b9d58377caa755e7eeaf68e3381b036f0",ref:t=>this.iconRef=t,name:this.icon,indicatorColor:this.indicatorColor})),this.tooltip&&i("z-tooltip",{key:"a86766b86ee4cf878f5a48f48e135b8cd3092f3a",class:"z-tool-tooltip",ref:t=>this.tooltipRef=t,bindTo:this.iconRef,open:this.tooltipOpen&&!this.open,position:this.isNested?s.BOTTOM:this.tooltipPosition,dark:!0,onMouseLeave:this.handleTooltipClose,onBlur:this.handleTooltipClose,onOpenChange:this.onTooltipOpenChange},i("span",{key:"91ddd32599a6a6a3b4fbf34fb69fdabff0dbbda9",class:"body-4"},this.tooltip)),this.hasSlottedContent&&i("z-popover",{key:"ec7b937f451db4a1b206b386d6f199b5cf71117d",class:"z-tool-submenu",open:this.open,bindTo:this.isMobile&&this.mainToolbar?this.mainToolbar:this.hostElement,center:!0,closable:!1,position:this.isMobile?s.TOP:s.BOTTOM},i("slot",{key:"85e016cb92ce6c7356afa7f93bbdd278ab3ff88e"})))}get hostElement(){return n(this)}static get watchers(){return{open:[{handleOpenChange:0}],tooltipOpen:[{handleTooltipOpenChange:0}]}}};h.style=':host,*{box-sizing:border-box}.z-tool{--z-tool-size:calc(var(--space-unit) * 5.5);--z-tool-icon-size:calc(var(--space-unit) * 2.5);position:relative;display:inline-flex;width:var(--z-tool-size);height:var(--z-tool-size);align-items:center;justify-content:center;padding:0;border:none;margin:0;background-color:var(--color-surface01);border-radius:var(--border-radius);cursor:pointer}:host(:is([active],[open])) .z-tool{box-shadow:inset 0 0 0 2px var(--color-primary01)}:host([open]) .z-tool{background:var(--color-primary03)}@media (hover: hover){:host(:hover),:host(.z-tool-tooltip-open){z-index:1}:host(:not([disabled])) .z-tool:hover{background-color:var(--color-primary03)}}.z-tool:focus:focus-visible{background-color:var(--color-primary03);outline:none}z-icon{--z-icon-width:var(--z-tool-icon-size);--z-icon-height:var(--z-tool-icon-size);display:block;fill:var(--color-default-icon)}:host([disabled]) .z-tool{color:var(--color-disabled01-icon);cursor:not-allowed}:host([disabled]) z-icon{fill:var(--color-disabled01-icon)}.z-tool-tooltip{--z-tooltip-padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 2);--z-tooltip-shadow-filter:drop-shadow(0 4px 8px var(--shadow-color-base));position:relative;z-index:2;font-family:var(--font-family-sans);white-space:nowrap}.z-tool-submenu{z-index:3;border-radius:calc(var(--border-radius) + var(--border-size-small))}.z-tool-submenu ::slotted(z-color-picker){border:var(--border-size-small) solid var(--color-surface03);border-radius:var(--border-radius)}@media (max-width: 767px) and (hover: none){.z-tool-tooltip{display:none !important}}:root{--font-family-sans:"IBM Plex Sans", sans-serif;--font-family-serif:"IBM Plex Serif", serif;--font-lt:300;--font-rg:400;--font-sb:600;--font-bd:700;--font-size-1:0.75rem;--font-size-2:0.875rem;--font-size-3:1rem;--font-size-4:1.125rem;--font-size-5:1.25rem;--font-size-6:1.5rem;--font-size-7:1.75rem;--font-size-8:2rem;--font-size-9:2.25rem;--font-size-10:2.625rem;--font-size-11:3rem;--font-size-12:3.375rem;--font-size-13:3.75rem;--font-size-14:4.25rem;--font-size-15:4.75rem;--font-size-16:5.25rem;--font-size-17:5.75rem;--section-title-1:var(--font-sb) var(--font-size-11) / 1.083 var(--font-family-serif);--section-title-2:var(--font-sb) var(--font-size-10) / 1.142 var(--font-family-serif);--section-title-3:var(--font-sb) var(--font-size-9) / 1.222 var(--font-family-serif);--section-title-4:var(--font-sb) var(--font-size-8) / 1.25 var(--font-family-serif);--section-title-5:var(--font-sb) var(--font-size-7) / 1.2857 var(--font-family-serif);--section-title-6:var(--font-sb) var(--font-size-6) / 1.333 var(--font-family-serif)}.heading-1,.heading-1-sb,.heading-1-lt{font-size:var(--font-size-7);font-weight:var(--font-rg);line-height:1.28}.heading-2,.heading-2-sb,.heading-2-lt{font-size:var(--font-size-6);font-weight:var(--font-rg);line-height:1.333}.heading-3,.heading-3-sb,.heading-3-lt{font-size:var(--font-size-6);font-weight:var(--font-rg);line-height:1.333}.heading-4,.heading-4-sb,.heading-4-lt{font-size:var(--font-size-5);font-weight:var(--font-rg);line-height:1.4}.body-1,.body-1-sb{font-size:var(--font-size-5);font-weight:var(--font-rg);line-height:1.4}.body-2,.body-2-sb{font-size:var(--font-size-4);font-weight:var(--font-rg);line-height:1.5}.body-3,.body-3-sb{font-size:var(--font-size-3);font-weight:var(--font-rg);line-height:1.5}.body-4,.body-4-sb{font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px;line-height:1.4}.body-5,.body-5-sb{font-size:var(--font-size-1);font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.interactive-1,.interactive-1-sb{font-size:var(--font-size-3);font-weight:var(--font-rg);line-height:1.5}.interactive-2,.interactive-2-sb{font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px;line-height:1.4}.interactive-3,.interactive-3-sb{font-size:var(--font-size-1);font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.helper,.helper-sb{font-size:var(--font-size-1);font-style:italic;font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.section-title-1{font:var(--section-title-1)}.section-title-2{font:var(--section-title-2)}.section-title-3{font:var(--section-title-3)}.section-title-4{font:var(--section-title-4)}.section-title-5{font:var(--section-title-5)}.section-title-6{font:var(--section-title-6)}@media (min-width: 1152px){.heading-1,.heading-1-sb,.heading-1-lt{font-size:var(--font-size-8);font-weight:var(--font-rg);line-height:1.25}.heading-2,.heading-2-sb,.heading-2-lt{font-size:var(--font-size-7);font-weight:var(--font-rg);line-height:1.28}}@media (max-width: 767px){.mobile-heading-1,.mobile-heading-1-sb,.mobile-heading-1-lt{font-size:var(--font-size-7);font-weight:var(--font-rg);line-height:1.28}.mobile-heading-2,.mobile-heading-2-sb,.mobile-heading-2-lt{font-size:var(--font-size-6);font-weight:var(--font-rg);line-height:1.333}.mobile-heading-3,.mobile-heading-3-sb,.mobile-heading-3-lt{font-size:var(--font-size-6);font-weight:var(--font-rg);line-height:1.333}.mobile-heading-4,.mobile-heading-4-sb,.mobile-heading-4-lt{font-size:var(--font-size-5);font-weight:var(--font-rg);line-height:1.4}.mobile-body-1,.mobile-body-1-sb{font-size:var(--font-size-5);font-weight:var(--font-rg);line-height:1.4}.mobile-body-2,.mobile-body-2-sb{font-size:var(--font-size-4);font-weight:var(--font-rg);line-height:1.5}.mobile-body-3,.mobile-body-3-sb{font-size:var(--font-size-3);font-weight:var(--font-rg);line-height:1.5}.mobile-body-4,.mobile-body-4-sb{font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px;line-height:1.4}.mobile-body-5,.mobile-body-5-sb{font-size:var(--font-size-1);font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.mobile-interactive-1,.mobile-interactive-1-sb{font-size:var(--font-size-3);font-weight:var(--font-rg);line-height:1.5}.mobile-interactive-2,.mobile-interactive-2-sb{font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px;line-height:1.4}.mobile-interactive-3,.mobile-interactive-3-sb{font-size:var(--font-size-1);font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.mobile-section-title-1{font:var(--section-title-1)}.mobile-section-title-2{font:var(--section-title-2)}.mobile-section-title-3{font:var(--section-title-3)}.mobile-section-title-4{font:var(--section-title-4)}.mobile-section-title-5{font:var(--section-title-5)}.mobile-section-title-6{font:var(--section-title-6)}.mobile-heading-1-lt,.mobile-heading-2-lt,.mobile-heading-3-lt,.mobile-heading-4-lt{font-weight:var(--font-lt)}.mobile-heading-1-sb,.mobile-heading-2-sb,.mobile-heading-3-sb,.mobile-heading-4-sb,.mobile-body-1-sb,.mobile-body-2-sb,.mobile-body-3-sb,.mobile-body-4-sb,.mobile-body-5-sb,.mobile-interactive-1-sb,.mobile-interactive-2-sb,.mobile-interactive-3-sb{font-weight:var(--font-sb)}}@media (min-width: 768px) and (max-width: 1151px){.tablet-heading-1,.tablet-heading-1-sb,.tablet-heading-1-lt{font-size:var(--font-size-7);font-weight:var(--font-rg);line-height:1.28}.tablet-heading-2,.tablet-heading-2-sb,.tablet-heading-2-lt{font-size:var(--font-size-6);font-weight:var(--font-rg);line-height:1.333}.tablet-heading-3,.tablet-heading-3-sb,.tablet-heading-3-lt{font-size:var(--font-size-6);font-weight:var(--font-rg);line-height:1.333}.tablet-heading-4,.tablet-heading-4-sb,.tablet-heading-4-lt{font-size:var(--font-size-5);font-weight:var(--font-rg);line-height:1.4}.tablet-body-1,.tablet-body-1-sb{font-size:var(--font-size-5);font-weight:var(--font-rg);line-height:1.4}.tablet-body-2,.tablet-body-2-sb{font-size:var(--font-size-4);font-weight:var(--font-rg);line-height:1.5}.tablet-body-3,.tablet-body-3-sb{font-size:var(--font-size-3);font-weight:var(--font-rg);line-height:1.5}.tablet-body-4,.tablet-body-4-sb{font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px;line-height:1.4}.tablet-body-5,.tablet-body-5-sb{font-size:var(--font-size-1);font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.tablet-interactive-1,.tablet-interactive-1-sb{font-size:var(--font-size-3);font-weight:var(--font-rg);line-height:1.5}.tablet-interactive-2,.tablet-interactive-2-sb{font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px;line-height:1.4}.tablet-interactive-3,.tablet-interactive-3-sb{font-size:var(--font-size-1);font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.tablet-section-title-1{font:var(--section-title-1)}.tablet-section-title-2{font:var(--section-title-2)}.tablet-section-title-3{font:var(--section-title-3)}.tablet-section-title-4{font:var(--section-title-4)}.tablet-section-title-5{font:var(--section-title-5)}.tablet-section-title-6{font:var(--section-title-6)}.tablet-heading-1-lt,.tablet-heading-2-lt,.tablet-heading-3-lt,.tablet-heading-4-lt{font-weight:var(--font-lt)}.tablet-heading-1-sb,.tablet-heading-2-sb,.tablet-heading-3-sb,.tablet-heading-4-sb,.tablet-body-1-sb,.tablet-body-2-sb,.tablet-body-3-sb,.tablet-body-4-sb,.tablet-body-5-sb,.tablet-interactive-1-sb,.tablet-interactive-2-sb,.tablet-interactive-3-sb{font-weight:var(--font-sb)}}@media (min-width: 1152px) and (max-width: 1365px){.desktop-heading-1,.desktop-heading-1-sb,.desktop-heading-1-lt{font-size:var(--font-size-8);font-weight:var(--font-rg);line-height:1.25}.desktop-heading-2,.desktop-heading-2-sb,.desktop-heading-2-lt{font-size:var(--font-size-7);font-weight:var(--font-rg);line-height:1.28}.desktop-heading-3,.desktop-heading-3-sb,.desktop-heading-3-lt{font-size:var(--font-size-6);font-weight:var(--font-rg);line-height:1.333}.desktop-heading-4,.desktop-heading-4-sb,.desktop-heading-4-lt{font-size:var(--font-size-5);font-weight:var(--font-rg);line-height:1.4}.desktop-body-1,.desktop-body-1-sb{font-size:var(--font-size-5);font-weight:var(--font-rg);line-height:1.4}.desktop-body-2,.desktop-body-2-sb{font-size:var(--font-size-4);font-weight:var(--font-rg);line-height:1.5}.desktop-body-3,.desktop-body-3-sb{font-size:var(--font-size-3);font-weight:var(--font-rg);line-height:1.5}.desktop-body-4,.desktop-body-4-sb{font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px;line-height:1.4}.desktop-body-5,.desktop-body-5-sb{font-size:var(--font-size-1);font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.desktop-interactive-1,.desktop-interactive-1-sb{font-size:var(--font-size-3);font-weight:var(--font-rg);line-height:1.5}.desktop-interactive-2,.desktop-interactive-2-sb{font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px;line-height:1.4}.desktop-interactive-3,.desktop-interactive-3-sb{font-size:var(--font-size-1);font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.desktop-section-title-1{font:var(--section-title-1)}.desktop-section-title-2{font:var(--section-title-2)}.desktop-section-title-3{font:var(--section-title-3)}.desktop-section-title-4{font:var(--section-title-4)}.desktop-section-title-5{font:var(--section-title-5)}.desktop-section-title-6{font:var(--section-title-6)}.desktop-heading-1-lt,.desktop-heading-2-lt,.desktop-heading-3-lt,.desktop-heading-4-lt{font-weight:var(--font-lt)}.desktop-heading-1-sb,.desktop-heading-2-sb,.desktop-heading-3-sb,.desktop-heading-4-sb,.desktop-body-1-sb,.desktop-body-2-sb,.desktop-body-3-sb,.desktop-body-4-sb,.desktop-body-5-sb,.desktop-interactive-1-sb,.desktop-interactive-2-sb,.desktop-interactive-3-sb{font-weight:var(--font-sb)}}@media (min-width: 1366px){.wide-heading-1,.wide-heading-1-sb,.wide-heading-1-lt{font-size:var(--font-size-8);font-weight:var(--font-rg);line-height:1.25}.wide-heading-2,.wide-heading-2-sb,.wide-heading-2-lt{font-size:var(--font-size-7);font-weight:var(--font-rg);line-height:1.28}.wide-heading-3,.wide-heading-3-sb,.wide-heading-3-lt{font-size:var(--font-size-6);font-weight:var(--font-rg);line-height:1.333}.wide-heading-4,.wide-heading-4-sb,.wide-heading-4-lt{font-size:var(--font-size-5);font-weight:var(--font-rg);line-height:1.4}.wide-body-1,.wide-body-1-sb{font-size:var(--font-size-5);font-weight:var(--font-rg);line-height:1.4}.wide-body-2,.wide-body-2-sb{font-size:var(--font-size-4);font-weight:var(--font-rg);line-height:1.5}.wide-body-3,.wide-body-3-sb{font-size:var(--font-size-3);font-weight:var(--font-rg);line-height:1.5}.wide-body-4,.wide-body-4-sb{font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px;line-height:1.4}.wide-body-5,.wide-body-5-sb{font-size:var(--font-size-1);font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.wide-interactive-1,.wide-interactive-1-sb{font-size:var(--font-size-3);font-weight:var(--font-rg);line-height:1.5}.wide-interactive-2,.wide-interactive-2-sb{font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px;line-height:1.4}.wide-interactive-3,.wide-interactive-3-sb{font-size:var(--font-size-1);font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.wide-section-title-1{font:var(--section-title-1)}.wide-section-title-2{font:var(--section-title-2)}.wide-section-title-3{font:var(--section-title-3)}.wide-section-title-4{font:var(--section-title-4)}.wide-section-title-5{font:var(--section-title-5)}.wide-section-title-6{font:var(--section-title-6)}.wide-heading-1-lt,.wide-heading-2-lt,.wide-heading-3-lt,.wide-heading-4-lt{font-weight:var(--font-lt)}.wide-heading-1-sb,.wide-heading-2-sb,.wide-heading-3-sb,.wide-heading-4-sb,.wide-body-1-sb,.wide-body-2-sb,.wide-body-3-sb,.wide-body-4-sb,.wide-body-5-sb,.wide-interactive-1-sb,.wide-interactive-2-sb,.wide-interactive-3-sb{font-weight:var(--font-sb)}}.heading-1-lt,.heading-2-lt,.heading-3-lt,.heading-4-lt{font-weight:var(--font-lt)}.heading-1-sb,.heading-2-sb,.heading-3-sb,.heading-4-sb,.body-1-sb,.body-2-sb,.body-3-sb,.body-4-sb,.body-5-sb,.interactive-1-sb,.interactive-2-sb,.interactive-3-sb,.helper-sb{font-weight:var(--font-sb)}';export{h as z_tool}
1
+ import{r as t,c as e,h as i,H as o,d as n}from"./p-DPdXlnVe.js";import{P as s,g as a}from"./p-BKCj6NR2.js";import{a as r}from"./p-CPsEG702.js";import"./p-Q-tWjk7P.js";const h=class{constructor(i){t(this,i),this.toggleSubmenu=e(this,"toggleSubmenu",7),this.toggleTooltip=e(this,"toggleTooltip",7),this.tooltipPosition=s.TOP,this.active=!1,this.disabled=!1,this.open=!1,this.tooltipOpen=!1,this.hasSlottedContent=!1,this.isMobile=!1,this.hasNestedOpenTools=!1,this.isNested=!1,this.handleTooltipOpen=t=>{this.tooltip&&!this.open&&this.buttonRef.contains(t.target)&&(clearTimeout(this.hoverDelay),this.hoverDelay=setTimeout((()=>{this.tooltipOpen=!0}),1e3))},this.handleTooltipClose=t=>{var e;this.tooltip&&(null===(e=t.relatedTarget)||void 0===e?void 0:e.closest("z-tooltip"))!==this.tooltipRef&&(clearTimeout(this.hoverDelay),this.tooltipOpen=!1)},this.handleClick=()=>{if(!this.disabled&&this.hasSlottedContent&&(this.open=!this.open,this.open)){const t=this.hostElement.querySelector(":scope > z-color-picker");if(t)return void t.setFocus();const e=this.hostElement.querySelector(":scope > z-toolbar z-tool[active]:not(:disabled)")||this.hostElement.querySelector(":scope > z-toolbar z-tool:not(:disabled)");null==e||e.setFocus()}},this.onTooltipOpenChange=t=>{t.target!==this.tooltipRef&&(this.tooltipOpen=t.detail.open)}}handleOpenChange(){this.toggleSubmenu.emit(this.open)}handleTooltipOpenChange(){this.toggleTooltip.emit(this.tooltipOpen)}handleKeyDown(t){if(this.open&&!this.hasNestedOpenTools)switch(t.key){case a.ESC:t.stopPropagation(),this.open=!1,this.setFocus();break;case a.TAB:t.shiftKey&&t.target.closest("z-tool:not(:scope)")===this.hostElement&&(this.open=!1)}}onOutsideClick(t){const e=t.composedPath()[0];!this.open||r(this.hostElement,e)||this.hasNestedOpenTools||(this.open=!1)}onNestedToolToggle(t){t.target!==this.hostElement&&(this.hasNestedOpenTools=!0===t.detail||Array.from(this.hostElement.querySelectorAll("z-tool")).some((t=>t.open)))}handleColorSelected(t){Array.from(this.hostElement.children).includes(t.target)&&(this.indicatorColor=t.detail,this.open=!1,this.setFocus())}handleExternalFocusin(t){r(this.hostElement,t.target)||(this.open=!1)}async setFocus(){this.disabled||setTimeout((()=>{var t;null===(t=this.buttonRef)||void 0===t||t.focus()}),50)}async setTabIndex(t){this.buttonRef&&(this.buttonRef.tabIndex=this.disabled?-1:t)}async closeTooltip(){clearTimeout(this.hoverDelay),this.tooltipOpen=!1}componentWillLoad(){this.hasSlottedContent=this.hostElement.children.length>0,this.isNested=!!this.hostElement.closest("z-tool:not(:scope)"),this.mainToolbar=this.hostElement.closest("z-toolbar:not(z-toolbar z-toolbar)"),this.hasNestedOpenTools=!!this.hostElement.querySelector("z-tool[open]"),this.mql=matchMedia("(max-width: 767px)"),this.onMobileViewChange=t=>this.isMobile=t.matches,this.mql.addEventListener("change",this.onMobileViewChange),this.isMobile=this.mql.matches}disconnectedCallback(){var t;clearTimeout(this.hoverDelay),null===(t=this.mql)||void 0===t||t.removeEventListener("change",this.onMobileViewChange)}render(){return i(o,{key:"f5da5cd309607dc94dd12a28596b2ea02d28ba4c",class:{"z-tool-tooltip-open":this.tooltipOpen}},i("button",{key:"be63d078b5035ba1f08c480c8c08f365b3115191",class:"z-tool",type:"button",ref:t=>this.buttonRef=t,"aria-pressed":this.hasSlottedContent?void 0:this.active?"true":"false","aria-expanded":this.hasSlottedContent?this.open?"true":"false":void 0,"aria-haspopup":this.hasSlottedContent?"true":void 0,"aria-label":this.htmlAriaLabel||this.tooltip||void 0,disabled:this.disabled,onClick:this.handleClick,onMouseEnter:this.handleTooltipOpen,onMouseLeave:this.handleTooltipClose,onFocus:this.handleTooltipOpen,onBlur:this.handleTooltipClose},i("z-icon",{key:"a08b5432871a1522374633050a835bb18001a6d6",ref:t=>this.iconRef=t,name:this.icon,indicatorColor:this.indicatorColor})),this.tooltip&&i("z-tooltip",{key:"9e0fa11a43662f333404543e315b097aa96ab08c",class:"z-tool-tooltip",ref:t=>this.tooltipRef=t,bindTo:this.iconRef,open:this.tooltipOpen&&!this.open,position:this.isNested?s.BOTTOM:this.tooltipPosition,dark:!0,onMouseLeave:this.handleTooltipClose,onBlur:this.handleTooltipClose,onOpenChange:this.onTooltipOpenChange},i("span",{key:"bfc2be83824830ed05b70f423e9f044015624f49",class:"body-4"},this.tooltip)),this.hasSlottedContent&&i("z-popover",{key:"717697756e5333f066f96c96695cd9741b006e93",class:"z-tool-submenu",open:this.open,bindTo:this.isMobile&&this.mainToolbar?this.mainToolbar:this.hostElement,center:!0,closable:!1,position:this.isMobile?s.TOP:s.BOTTOM},i("slot",{key:"d151d02e38fb7a0941012ec969b6cea647721846"})))}get hostElement(){return n(this)}static get watchers(){return{open:[{handleOpenChange:0}],tooltipOpen:[{handleTooltipOpenChange:0}]}}};h.style=':host,*{box-sizing:border-box}.z-tool{--z-tool-size:calc(var(--space-unit) * 5.5);--z-tool-icon-size:calc(var(--space-unit) * 2.5);position:relative;display:inline-flex;width:var(--z-tool-size);height:var(--z-tool-size);align-items:center;justify-content:center;padding:0;border:none;margin:0;background-color:var(--color-surface01);border-radius:var(--border-radius);cursor:pointer}:host(:is([active],[open])) .z-tool{box-shadow:inset 0 0 0 2px var(--color-primary01)}:host([open]) .z-tool{background:var(--color-primary03)}@media (hover: hover){:host(:hover),:host(.z-tool-tooltip-open){z-index:1}:host(:not([disabled])) .z-tool:hover{background-color:var(--color-primary03)}}.z-tool:focus:focus-visible{background-color:var(--color-primary03);outline:none}z-icon{--z-icon-width:var(--z-tool-icon-size);--z-icon-height:var(--z-tool-icon-size);display:block;fill:var(--color-default-icon)}:host([disabled]) .z-tool{color:var(--color-disabled01-icon);cursor:not-allowed}:host([disabled]) z-icon{fill:var(--color-disabled01-icon)}.z-tool-tooltip{--z-tooltip-padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 2);--z-tooltip-shadow-filter:drop-shadow(0 4px 8px var(--shadow-color-base));position:relative;z-index:2;font-family:var(--font-family-sans);white-space:nowrap}.z-tool-submenu{z-index:3;border-radius:calc(var(--border-radius) + var(--border-size-small))}.z-tool-submenu ::slotted(z-color-picker){border:var(--border-size-small) solid var(--color-surface03);border-radius:var(--border-radius)}@media (max-width: 767px) and (hover: none){.z-tool-tooltip{display:none !important}}:root{--font-family-sans:"IBM Plex Sans", sans-serif;--font-family-serif:"IBM Plex Serif", serif;--font-lt:300;--font-rg:400;--font-sb:600;--font-bd:700;--font-size-1:0.75rem;--font-size-2:0.875rem;--font-size-3:1rem;--font-size-4:1.125rem;--font-size-5:1.25rem;--font-size-6:1.5rem;--font-size-7:1.75rem;--font-size-8:2rem;--font-size-9:2.25rem;--font-size-10:2.625rem;--font-size-11:3rem;--font-size-12:3.375rem;--font-size-13:3.75rem;--font-size-14:4.25rem;--font-size-15:4.75rem;--font-size-16:5.25rem;--font-size-17:5.75rem;--section-title-1:var(--font-sb) var(--font-size-11) / 1.083 var(--font-family-serif);--section-title-2:var(--font-sb) var(--font-size-10) / 1.142 var(--font-family-serif);--section-title-3:var(--font-sb) var(--font-size-9) / 1.222 var(--font-family-serif);--section-title-4:var(--font-sb) var(--font-size-8) / 1.25 var(--font-family-serif);--section-title-5:var(--font-sb) var(--font-size-7) / 1.2857 var(--font-family-serif);--section-title-6:var(--font-sb) var(--font-size-6) / 1.333 var(--font-family-serif)}.heading-1,.heading-1-sb,.heading-1-lt{font-size:var(--font-size-7);font-weight:var(--font-rg);line-height:1.28}.heading-2,.heading-2-sb,.heading-2-lt{font-size:var(--font-size-6);font-weight:var(--font-rg);line-height:1.333}.heading-3,.heading-3-sb,.heading-3-lt{font-size:var(--font-size-6);font-weight:var(--font-rg);line-height:1.333}.heading-4,.heading-4-sb,.heading-4-lt{font-size:var(--font-size-5);font-weight:var(--font-rg);line-height:1.4}.body-1,.body-1-sb{font-size:var(--font-size-5);font-weight:var(--font-rg);line-height:1.4}.body-2,.body-2-sb{font-size:var(--font-size-4);font-weight:var(--font-rg);line-height:1.5}.body-3,.body-3-sb{font-size:var(--font-size-3);font-weight:var(--font-rg);line-height:1.5}.body-4,.body-4-sb{font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px;line-height:1.4}.body-5,.body-5-sb{font-size:var(--font-size-1);font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.interactive-1,.interactive-1-sb{font-size:var(--font-size-3);font-weight:var(--font-rg);line-height:1.5}.interactive-2,.interactive-2-sb{font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px;line-height:1.4}.interactive-3,.interactive-3-sb{font-size:var(--font-size-1);font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.helper,.helper-sb{font-size:var(--font-size-1);font-style:italic;font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.section-title-1{font:var(--section-title-1)}.section-title-2{font:var(--section-title-2)}.section-title-3{font:var(--section-title-3)}.section-title-4{font:var(--section-title-4)}.section-title-5{font:var(--section-title-5)}.section-title-6{font:var(--section-title-6)}@media (min-width: 1152px){.heading-1,.heading-1-sb,.heading-1-lt{font-size:var(--font-size-8);font-weight:var(--font-rg);line-height:1.25}.heading-2,.heading-2-sb,.heading-2-lt{font-size:var(--font-size-7);font-weight:var(--font-rg);line-height:1.28}}@media (max-width: 767px){.mobile-heading-1,.mobile-heading-1-sb,.mobile-heading-1-lt{font-size:var(--font-size-7);font-weight:var(--font-rg);line-height:1.28}.mobile-heading-2,.mobile-heading-2-sb,.mobile-heading-2-lt{font-size:var(--font-size-6);font-weight:var(--font-rg);line-height:1.333}.mobile-heading-3,.mobile-heading-3-sb,.mobile-heading-3-lt{font-size:var(--font-size-6);font-weight:var(--font-rg);line-height:1.333}.mobile-heading-4,.mobile-heading-4-sb,.mobile-heading-4-lt{font-size:var(--font-size-5);font-weight:var(--font-rg);line-height:1.4}.mobile-body-1,.mobile-body-1-sb{font-size:var(--font-size-5);font-weight:var(--font-rg);line-height:1.4}.mobile-body-2,.mobile-body-2-sb{font-size:var(--font-size-4);font-weight:var(--font-rg);line-height:1.5}.mobile-body-3,.mobile-body-3-sb{font-size:var(--font-size-3);font-weight:var(--font-rg);line-height:1.5}.mobile-body-4,.mobile-body-4-sb{font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px;line-height:1.4}.mobile-body-5,.mobile-body-5-sb{font-size:var(--font-size-1);font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.mobile-interactive-1,.mobile-interactive-1-sb{font-size:var(--font-size-3);font-weight:var(--font-rg);line-height:1.5}.mobile-interactive-2,.mobile-interactive-2-sb{font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px;line-height:1.4}.mobile-interactive-3,.mobile-interactive-3-sb{font-size:var(--font-size-1);font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.mobile-section-title-1{font:var(--section-title-1)}.mobile-section-title-2{font:var(--section-title-2)}.mobile-section-title-3{font:var(--section-title-3)}.mobile-section-title-4{font:var(--section-title-4)}.mobile-section-title-5{font:var(--section-title-5)}.mobile-section-title-6{font:var(--section-title-6)}.mobile-heading-1-lt,.mobile-heading-2-lt,.mobile-heading-3-lt,.mobile-heading-4-lt{font-weight:var(--font-lt)}.mobile-heading-1-sb,.mobile-heading-2-sb,.mobile-heading-3-sb,.mobile-heading-4-sb,.mobile-body-1-sb,.mobile-body-2-sb,.mobile-body-3-sb,.mobile-body-4-sb,.mobile-body-5-sb,.mobile-interactive-1-sb,.mobile-interactive-2-sb,.mobile-interactive-3-sb{font-weight:var(--font-sb)}}@media (min-width: 768px) and (max-width: 1151px){.tablet-heading-1,.tablet-heading-1-sb,.tablet-heading-1-lt{font-size:var(--font-size-7);font-weight:var(--font-rg);line-height:1.28}.tablet-heading-2,.tablet-heading-2-sb,.tablet-heading-2-lt{font-size:var(--font-size-6);font-weight:var(--font-rg);line-height:1.333}.tablet-heading-3,.tablet-heading-3-sb,.tablet-heading-3-lt{font-size:var(--font-size-6);font-weight:var(--font-rg);line-height:1.333}.tablet-heading-4,.tablet-heading-4-sb,.tablet-heading-4-lt{font-size:var(--font-size-5);font-weight:var(--font-rg);line-height:1.4}.tablet-body-1,.tablet-body-1-sb{font-size:var(--font-size-5);font-weight:var(--font-rg);line-height:1.4}.tablet-body-2,.tablet-body-2-sb{font-size:var(--font-size-4);font-weight:var(--font-rg);line-height:1.5}.tablet-body-3,.tablet-body-3-sb{font-size:var(--font-size-3);font-weight:var(--font-rg);line-height:1.5}.tablet-body-4,.tablet-body-4-sb{font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px;line-height:1.4}.tablet-body-5,.tablet-body-5-sb{font-size:var(--font-size-1);font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.tablet-interactive-1,.tablet-interactive-1-sb{font-size:var(--font-size-3);font-weight:var(--font-rg);line-height:1.5}.tablet-interactive-2,.tablet-interactive-2-sb{font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px;line-height:1.4}.tablet-interactive-3,.tablet-interactive-3-sb{font-size:var(--font-size-1);font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.tablet-section-title-1{font:var(--section-title-1)}.tablet-section-title-2{font:var(--section-title-2)}.tablet-section-title-3{font:var(--section-title-3)}.tablet-section-title-4{font:var(--section-title-4)}.tablet-section-title-5{font:var(--section-title-5)}.tablet-section-title-6{font:var(--section-title-6)}.tablet-heading-1-lt,.tablet-heading-2-lt,.tablet-heading-3-lt,.tablet-heading-4-lt{font-weight:var(--font-lt)}.tablet-heading-1-sb,.tablet-heading-2-sb,.tablet-heading-3-sb,.tablet-heading-4-sb,.tablet-body-1-sb,.tablet-body-2-sb,.tablet-body-3-sb,.tablet-body-4-sb,.tablet-body-5-sb,.tablet-interactive-1-sb,.tablet-interactive-2-sb,.tablet-interactive-3-sb{font-weight:var(--font-sb)}}@media (min-width: 1152px) and (max-width: 1365px){.desktop-heading-1,.desktop-heading-1-sb,.desktop-heading-1-lt{font-size:var(--font-size-8);font-weight:var(--font-rg);line-height:1.25}.desktop-heading-2,.desktop-heading-2-sb,.desktop-heading-2-lt{font-size:var(--font-size-7);font-weight:var(--font-rg);line-height:1.28}.desktop-heading-3,.desktop-heading-3-sb,.desktop-heading-3-lt{font-size:var(--font-size-6);font-weight:var(--font-rg);line-height:1.333}.desktop-heading-4,.desktop-heading-4-sb,.desktop-heading-4-lt{font-size:var(--font-size-5);font-weight:var(--font-rg);line-height:1.4}.desktop-body-1,.desktop-body-1-sb{font-size:var(--font-size-5);font-weight:var(--font-rg);line-height:1.4}.desktop-body-2,.desktop-body-2-sb{font-size:var(--font-size-4);font-weight:var(--font-rg);line-height:1.5}.desktop-body-3,.desktop-body-3-sb{font-size:var(--font-size-3);font-weight:var(--font-rg);line-height:1.5}.desktop-body-4,.desktop-body-4-sb{font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px;line-height:1.4}.desktop-body-5,.desktop-body-5-sb{font-size:var(--font-size-1);font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.desktop-interactive-1,.desktop-interactive-1-sb{font-size:var(--font-size-3);font-weight:var(--font-rg);line-height:1.5}.desktop-interactive-2,.desktop-interactive-2-sb{font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px;line-height:1.4}.desktop-interactive-3,.desktop-interactive-3-sb{font-size:var(--font-size-1);font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.desktop-section-title-1{font:var(--section-title-1)}.desktop-section-title-2{font:var(--section-title-2)}.desktop-section-title-3{font:var(--section-title-3)}.desktop-section-title-4{font:var(--section-title-4)}.desktop-section-title-5{font:var(--section-title-5)}.desktop-section-title-6{font:var(--section-title-6)}.desktop-heading-1-lt,.desktop-heading-2-lt,.desktop-heading-3-lt,.desktop-heading-4-lt{font-weight:var(--font-lt)}.desktop-heading-1-sb,.desktop-heading-2-sb,.desktop-heading-3-sb,.desktop-heading-4-sb,.desktop-body-1-sb,.desktop-body-2-sb,.desktop-body-3-sb,.desktop-body-4-sb,.desktop-body-5-sb,.desktop-interactive-1-sb,.desktop-interactive-2-sb,.desktop-interactive-3-sb{font-weight:var(--font-sb)}}@media (min-width: 1366px){.wide-heading-1,.wide-heading-1-sb,.wide-heading-1-lt{font-size:var(--font-size-8);font-weight:var(--font-rg);line-height:1.25}.wide-heading-2,.wide-heading-2-sb,.wide-heading-2-lt{font-size:var(--font-size-7);font-weight:var(--font-rg);line-height:1.28}.wide-heading-3,.wide-heading-3-sb,.wide-heading-3-lt{font-size:var(--font-size-6);font-weight:var(--font-rg);line-height:1.333}.wide-heading-4,.wide-heading-4-sb,.wide-heading-4-lt{font-size:var(--font-size-5);font-weight:var(--font-rg);line-height:1.4}.wide-body-1,.wide-body-1-sb{font-size:var(--font-size-5);font-weight:var(--font-rg);line-height:1.4}.wide-body-2,.wide-body-2-sb{font-size:var(--font-size-4);font-weight:var(--font-rg);line-height:1.5}.wide-body-3,.wide-body-3-sb{font-size:var(--font-size-3);font-weight:var(--font-rg);line-height:1.5}.wide-body-4,.wide-body-4-sb{font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px;line-height:1.4}.wide-body-5,.wide-body-5-sb{font-size:var(--font-size-1);font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.wide-interactive-1,.wide-interactive-1-sb{font-size:var(--font-size-3);font-weight:var(--font-rg);line-height:1.5}.wide-interactive-2,.wide-interactive-2-sb{font-size:var(--font-size-2);font-weight:var(--font-rg);letter-spacing:0.16px;line-height:1.4}.wide-interactive-3,.wide-interactive-3-sb{font-size:var(--font-size-1);font-weight:var(--font-rg);letter-spacing:0.32px;line-height:1.333}.wide-section-title-1{font:var(--section-title-1)}.wide-section-title-2{font:var(--section-title-2)}.wide-section-title-3{font:var(--section-title-3)}.wide-section-title-4{font:var(--section-title-4)}.wide-section-title-5{font:var(--section-title-5)}.wide-section-title-6{font:var(--section-title-6)}.wide-heading-1-lt,.wide-heading-2-lt,.wide-heading-3-lt,.wide-heading-4-lt{font-weight:var(--font-lt)}.wide-heading-1-sb,.wide-heading-2-sb,.wide-heading-3-sb,.wide-heading-4-sb,.wide-body-1-sb,.wide-body-2-sb,.wide-body-3-sb,.wide-body-4-sb,.wide-body-5-sb,.wide-interactive-1-sb,.wide-interactive-2-sb,.wide-interactive-3-sb{font-weight:var(--font-sb)}}.heading-1-lt,.heading-2-lt,.heading-3-lt,.heading-4-lt{font-weight:var(--font-lt)}.heading-1-sb,.heading-2-sb,.heading-3-sb,.heading-4-sb,.body-1-sb,.body-2-sb,.body-3-sb,.body-4-sb,.body-5-sb,.interactive-1-sb,.interactive-2-sb,.interactive-3-sb,.helper-sb{font-weight:var(--font-sb)}';export{h as z_tool}
@@ -1 +1 @@
1
- import{r as t,c as o,h as e,H as s,d as n}from"./p-ByN2sYu6.js";import{P as i,S as a,e as r,B as c}from"./p-BKCj6NR2.js";const h=class{constructor(e){t(this,e),this.sort=o(this,"sort",7),this.showMenu=null,this.showSorting=null,this.sticky=!1,this.sorted=!1,this.popoverPosition=i.AUTO,this.isMenuOpen=!1}get ariaSortDirection(){return this.sortDirection?this.sortDirection===a.ASC?"ascending":"descending":null}handleSort(){this.sortDirection?(this.sortDirection=this.sortDirection===a.ASC?a.DESC:a.ASC,this.sorted=!0,this.sort.emit({sortDirection:this.sortDirection})):this.sorted=!1}updateColspan(){this.colspan?this.host.style.gridColumn=`span ${this.colspan}`:this.host.style.removeProperty("grid-column")}componentWillLoad(){this.updateColspan()}render(){return e(s,{key:"326c1c5968ebd22021f5bc88d3c98cd558c31783",role:"columnheader","menu-open":this.isMenuOpen,"aria-sort":this.ariaSortDirection,sortable:this.showSorting},e("div",{key:"935a692b283f76362fe5e3cc7cc2f8e38424f407",class:"cell--content"},e("slot",{key:"cce03a04640d1ee72e2e202f7526203136f4bb50"}),this.showSorting&&e("button",{key:"c161a473f0b4e6d6b1a478ad0530c6d0938fc1a1",class:"z-th--sort-button",type:"button",onClick:this.handleSort.bind(this)},e("z-icon",{key:"4b9b3aab3b0ce9f14c2a181860c834098077dee3",name:this.sortDirection===a.DESC?"arrow-simple-up":"arrow-simple-down",width:14,height:14})),this.showMenu&&e("div",{key:"cd3b0e8a851c8a414229f4976b8a227d99981ce0",class:"cell--menu-container"},e("z-button",{key:"3d37441174ff3ea540c0aec582bc91c7c644c818",variant:c.TERTIARY,icon:"contextual-menu",size:r.X_SMALL,ref:t=>this.menuTrigger=t,onClick:()=>this.popoverEl.open=!this.popoverEl.open}),e("z-popover",{key:"59de83e276e82705588041660e7612080b6636e8",ref:t=>this.popoverEl=t,bindTo:this.menuTrigger,onOpenChange:t=>this.isMenuOpen=t.detail.open,position:this.popoverPosition},e("slot",{key:"c92e8e0a5c617251dc6741ff4d9cbe943f224111",name:"contextual-menu"})))))}get host(){return n(this)}static get watchers(){return{colspan:[{updateColspan:0}]}}};h.style=':host{position:relative;display:flex;max-width:100%;align-items:center;padding:calc(var(--z-table--cells-padding, calc(var(--space-unit) * 2)));background-color:var(--color-surface01);gap:calc(var(--space-unit) * 2) var(--space-unit)}:host,*{box-sizing:border-box}:host([sticky]){position:sticky;z-index:1;top:0;left:0;box-shadow:8px 0 16px -8px var(--shadow-color-base)}:host([menu-open]){z-index:2}.cell--content{display:flex;width:100%;height:100%;align-items:center}:host([show-menu]) .cell--content{column-gap:var(--space-unit)}.cell--menu-container{margin-left:auto}:host(:not([show-menu])) .cell--menu-container{opacity:0;pointer-events:none}:host(:is([show-menu],[menu-open])) .cell--menu-container,:host([show-menu]) .cell--menu-container:focus-within{z-index:1;opacity:1;pointer-events:all}:host .cell-popover{z-index:100}@media (min-width: 768px) and (hover: hover){:host([show-menu="hover"]) .cell--menu-container{opacity:0;pointer-events:none}:host([show-menu="hover"]:hover) .cell--menu-container{z-index:1;opacity:1;pointer-events:all}}:host{z-index:1;padding:0;background-color:var(--color-background);font-weight:var(--font-sb)}.cell--content{padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2))}:host([show-sorting]) .cell--content{column-gap:var(--space-unit)}.z-th--sort-button{position:relative;padding:0;border:none;background-color:transparent;cursor:pointer;outline:none}.z-th--sort-button:focus,.z-th--sort-button:focus-visible{box-shadow:var(--shadow-focus-primary);opacity:1;outline:none;pointer-events:all}@media (min-width: 768px) and (hover: hover){:host([show-sorting="hover"]) .z-th--sort-button{opacity:0;pointer-events:none}:host([show-sorting="hover"]:hover) .z-th--sort-button,:host([show-sorting="hover"]) .z-th--sort-button:focus:focus-visible,:host([show-sorting="always"]) .z-th--sort-button,:host([sorted]) .z-th--sort-button{opacity:1;pointer-events:all}}:host([show-sorting="hover"]:hover) .z-th--sort-button::after,:host([show-sorting="hover"]) .z-th--sort-button:focus:focus-visible::after,:host([show-sorting="always"]) .z-th--sort-button::after,:host([sorted]) .z-th--sort-button::after{position:absolute;top:6px;left:6px;width:calc(100% - 12px);height:calc(100% - 10px);background-color:transparent;content:""}';export{h as z_th}
1
+ import{r as t,c as o,h as e,H as s,d as n}from"./p-DPdXlnVe.js";import{P as i,S as a,e as r,B as c}from"./p-BKCj6NR2.js";const h=class{constructor(e){t(this,e),this.sort=o(this,"sort",7),this.showMenu=null,this.showSorting=null,this.sticky=!1,this.sorted=!1,this.popoverPosition=i.AUTO,this.isMenuOpen=!1}get ariaSortDirection(){return this.sortDirection?this.sortDirection===a.ASC?"ascending":"descending":null}handleSort(){this.sortDirection?(this.sortDirection=this.sortDirection===a.ASC?a.DESC:a.ASC,this.sorted=!0,this.sort.emit({sortDirection:this.sortDirection})):this.sorted=!1}updateColspan(){this.colspan?this.host.style.gridColumn=`span ${this.colspan}`:this.host.style.removeProperty("grid-column")}componentWillLoad(){this.updateColspan()}render(){return e(s,{key:"deec9e49e024f48b68fe8f54ebb141dcc2b19ec1",role:"columnheader","menu-open":this.isMenuOpen,"aria-sort":this.ariaSortDirection,sortable:this.showSorting},e("div",{key:"65fefbfef58a64f3287a2f1b5defd301392bba2b",class:"cell--content"},e("slot",{key:"a88011856bacb3b2e0875ed46b8b1468660e5b31"}),this.showSorting&&e("button",{key:"46f462137de04bb88eda2e14767660fc4629f087",class:"z-th--sort-button",type:"button",onClick:this.handleSort.bind(this)},e("z-icon",{key:"bcfe38f7ff932f2074dad3ab11b5df5867292654",name:this.sortDirection===a.DESC?"arrow-simple-up":"arrow-simple-down",width:14,height:14})),this.showMenu&&e("div",{key:"90ccc4ecc6f49f8d41a45c9979fabebfd8bcad01",class:"cell--menu-container"},e("z-button",{key:"58b57db3a7129b6a811eca6f014a7b2c02050a41",variant:c.TERTIARY,icon:"contextual-menu",size:r.X_SMALL,ref:t=>this.menuTrigger=t,onClick:()=>this.popoverEl.open=!this.popoverEl.open}),e("z-popover",{key:"927004bdbc077e358c00b765d58b64a70f95c83d",ref:t=>this.popoverEl=t,bindTo:this.menuTrigger,onOpenChange:t=>this.isMenuOpen=t.detail.open,position:this.popoverPosition},e("slot",{key:"3b5dbcb8631fa4383366ff718c7e9a080b7ca3be",name:"contextual-menu"})))))}get host(){return n(this)}static get watchers(){return{colspan:[{updateColspan:0}]}}};h.style=':host{position:relative;display:flex;max-width:100%;align-items:center;padding:calc(var(--z-table--cells-padding, calc(var(--space-unit) * 2)));background-color:var(--color-surface01);gap:calc(var(--space-unit) * 2) var(--space-unit)}:host,*{box-sizing:border-box}:host([sticky]){position:sticky;z-index:1;top:0;left:0;box-shadow:8px 0 16px -8px var(--shadow-color-base)}:host([menu-open]){z-index:2}.cell--content{display:flex;width:100%;height:100%;align-items:center}:host([show-menu]) .cell--content{column-gap:var(--space-unit)}.cell--menu-container{margin-left:auto}:host(:not([show-menu])) .cell--menu-container{opacity:0;pointer-events:none}:host(:is([show-menu],[menu-open])) .cell--menu-container,:host([show-menu]) .cell--menu-container:focus-within{z-index:1;opacity:1;pointer-events:all}:host .cell-popover{z-index:100}@media (min-width: 768px) and (hover: hover){:host([show-menu="hover"]) .cell--menu-container{opacity:0;pointer-events:none}:host([show-menu="hover"]:hover) .cell--menu-container{z-index:1;opacity:1;pointer-events:all}}:host{z-index:1;padding:0;background-color:var(--color-background);font-weight:var(--font-sb)}.cell--content{padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2))}:host([show-sorting]) .cell--content{column-gap:var(--space-unit)}.z-th--sort-button{position:relative;padding:0;border:none;background-color:transparent;cursor:pointer;outline:none}.z-th--sort-button:focus,.z-th--sort-button:focus-visible{box-shadow:var(--shadow-focus-primary);opacity:1;outline:none;pointer-events:all}@media (min-width: 768px) and (hover: hover){:host([show-sorting="hover"]) .z-th--sort-button{opacity:0;pointer-events:none}:host([show-sorting="hover"]:hover) .z-th--sort-button,:host([show-sorting="hover"]) .z-th--sort-button:focus:focus-visible,:host([show-sorting="always"]) .z-th--sort-button,:host([sorted]) .z-th--sort-button{opacity:1;pointer-events:all}}:host([show-sorting="hover"]:hover) .z-th--sort-button::after,:host([show-sorting="hover"]) .z-th--sort-button:focus:focus-visible::after,:host([show-sorting="always"]) .z-th--sort-button::after,:host([sorted]) .z-th--sort-button::after{position:absolute;top:6px;left:6px;width:calc(100% - 12px);height:calc(100% - 10px);background-color:transparent;content:""}';export{h as z_th}
@@ -1 +1 @@
1
- import{r as t,c as e,h as o,H as r,d as i}from"./p-ByN2sYu6.js";import{P as s,g as n,p as a}from"./p-BKCj6NR2.js";import{a as h,j as c,k as p,g as f,l as u}from"./p-D4yqZKyM.js";import"./p-Q-tWjk7P.js";const l=class{constructor(o){t(this,o),this.positionChange=e(this,"positionChange",7),this.openChange=e(this,"openChange",7),this.position=s.TOP,this.open=!1,this.showArrow=!1,this.center=!1,this.closable=!0,this.spaceTolerance=3}closePopoverWithKeyboard(t){this.closable&&t.key===n.ESC&&(t.stopPropagation(),this.open=!1)}handleOutsideClick(t){const e=t.target;this.closable&&this.open&&!h(this.host,e)&&(h(this.boundElement,e)&&t.stopPropagation(),this.open=!1)}validatePosition(t){Object.values(s).includes(t)&&t!==s.AUTO||(this.position=t=s.TOP),this.currentPosition=t,this.open&&this.setPosition()}onOpen(){if(cancelAnimationFrame(this.animationFrameRequestId),this.openChange.emit({open:this.open}),!this.open)return Object.assign(this.host.style,{top:"auto",right:"auto",bottom:"auto",left:"auto",maxWidth:"",maxHeight:"",visibility:"hidden"}),void(this.currentPosition=void 0);const t=()=>{this.open&&(this.setPosition(),this.animationFrameRequestId=requestAnimationFrame(t))};setTimeout((()=>{t()}),0)}onBindingChange(){this.findBoundElement()}get offsetModifier(){return this.center?.5:0}findBoundElement(){"string"==typeof this.bindTo?this.boundElement=this.host.ownerDocument.querySelector(this.bindTo):this.bindTo?this.boundElement=this.bindTo:(this.boundElement=c(this.host),"z-tooltip"===this.boundElement.tagName.toLowerCase()&&(this.boundElement=c(this.boundElement)))}hasCenteredHorizontalSpace(t,e,o,r){const i=(o-r)*(1-this.offsetModifier);return this.center?e>=i-this.spaceTolerance&&t>=i-this.spaceTolerance:e>=i-this.spaceTolerance}hasCenteredVerticalSpace(t,e,o,r){const i=(o-r)*(1-this.offsetModifier);return this.center?t>=i-this.spaceTolerance&&e>=i-this.spaceTolerance:e>=i-this.spaceTolerance}hasEnoughSideSpace(t,e,o,r){return t>=e-o*(1-r)-this.spaceTolerance}getOptimalPopoverPosition(t,e){const o=this.host.offsetWidth,r=this.host.offsetHeight,i=this.boundElement.getBoundingClientRect().width,n=this.boundElement.getBoundingClientRect().height,a=this.offsetModifier,h=t=>{switch(t){case s.TOP:return e.top>=r-this.spaceTolerance&&this.hasCenteredHorizontalSpace(e.left,e.right,o,i);case s.TOP_RIGHT:return e.top>=r&&this.hasEnoughSideSpace(e.right,o,i,a);case s.TOP_LEFT:return e.top>=r&&this.hasEnoughSideSpace(e.left,o,i,a);case s.RIGHT:return e.right>=o&&this.hasCenteredVerticalSpace(e.top,e.bottom,r,n);case s.RIGHT_BOTTOM:return e.right>=o&&this.hasEnoughSideSpace(e.bottom,r,n,a);case s.RIGHT_TOP:return e.right>=o&&this.hasEnoughSideSpace(e.top,r,n,a);case s.BOTTOM:return e.bottom>=r&&this.hasCenteredHorizontalSpace(e.left,e.right,o,i);case s.BOTTOM_LEFT:return e.bottom>=r&&this.hasEnoughSideSpace(e.left,o,i,a);case s.BOTTOM_RIGHT:return e.bottom>=r&&this.hasEnoughSideSpace(e.right,o,i,a);case s.LEFT:return e.left>=o&&this.hasCenteredVerticalSpace(e.top,e.bottom,r,n);case s.LEFT_TOP:return e.left>=o&&this.hasEnoughSideSpace(e.top,r,n,a);case s.LEFT_BOTTOM:return e.left>=o&&this.hasEnoughSideSpace(e.bottom,r,n,a);default:return!1}};if(h(t))return t;const c=l.positionOrder,p=c.indexOf(t);if(-1===p)return t;for(let t=1;t<c.length;t++){const e=c[(p+t)%c.length];if(h(e))return e}return this.findBestFallbackPosition(e)}findBestFallbackPosition(t){const e=t.right>=t.left?s.RIGHT:s.LEFT,o=t.bottom>=t.top?s.BOTTOM:s.TOP,r=Math.max(t.right,t.left),i=Math.max(t.bottom,t.top),n=i>=r?o:e;let a=!1;return a=n===o?r>=2*Math.min(t.right,t.left):i>=2*Math.min(t.bottom,t.top),a?`${n}_${n===o?e:o}`:n}findScrollableAncestor(t){let e=c(t);for(;e;){if(e===t.ownerDocument.documentElement)return e;const o=getComputedStyle(e),{overflow:r,overflowX:i,overflowY:s}=o;if("hidden"!==r&&"hidden"!==s&&"hidden"!==i&&(e.scrollHeight>e.clientHeight&&"visible"!==r&&"visible"!==s||e.scrollWidth>e.clientWidth&&"visible"!==r&&"visible"!==i))return e;e=c(e)}return t.ownerDocument.documentElement}calculateAvailableSpace(){const t=this.boundElement.getBoundingClientRect();if(this.lastBoundRect&&this.lastBoundRect.x===t.x&&this.lastBoundRect.y===t.y&&this.lastBoundRect.width===t.width&&this.lastBoundRect.height===t.height&&this.cachedAvailableSpace)return this.cachedAvailableSpace;this.lastBoundRect=t;const e=this.findScrollableAncestor(this.boundElement),o=e.getBoundingClientRect(),r=e!==this.boundElement.ownerDocument.documentElement,i=this.boundElement.ownerDocument.documentElement.clientWidth,s=this.boundElement.ownerDocument.documentElement.clientHeight;return this.cachedAvailableSpace={top:t.top-(r?o.top:0)-8,right:i-t.right-(r?i-o.right:0)-8,bottom:s-t.bottom-(r?s-o.bottom:0)-8,left:t.left-(r?o.left:0)-8},this.cachedAvailableSpace}getBoundElementOffsets(){const t=this.boundElement.getBoundingClientRect();return{top:t.top,right:this.boundElement.ownerDocument.documentElement.clientWidth-t.right,bottom:this.boundElement.ownerDocument.documentElement.clientHeight-t.bottom,left:t.left}}computePositionOffsets(){const t=this.getBoundElementOffsets(),e=p(this.host);if(e===this.host.ownerDocument.documentElement)return t;const o=e.getBoundingClientRect(),r=getComputedStyle(e),i=o.top+parseFloat(r.borderTopWidth),s=o.right-parseFloat(r.borderRightWidth),n=o.bottom-parseFloat(r.borderBottomWidth),a=o.left+parseFloat(r.borderLeftWidth),h=this.boundElement.getBoundingClientRect();return{top:h.top-i+e.scrollTop,right:s-h.right-e.scrollLeft,bottom:n-h.bottom-e.scrollTop,left:h.left-a+e.scrollLeft}}applyPositionStyles(t,e){const o=this.boundElement.offsetWidth,r=this.boundElement.offsetHeight,i=this.offsetModifier,n=this.showArrow&&this.center?8:0,h=this.host.style,c=parseFloat(getComputedStyle(this.host).marginTop.replace("px",""))||0,p=this.computePositionOffsets(),u=p.left+o*i,l=p.right+o*i,d=p.top+r,b=p.bottom+r,g=p.top+r*i,m=p.bottom+r*i;let v,w;switch(t){case s.TOP:case s.TOP_RIGHT:h.bottom=`${b}px`,h.left=u-(t===s.TOP_RIGHT?n:0)+"px",w=e.top-c,t===s.TOP_RIGHT&&(v=e.right+o*i);break;case s.TOP_LEFT:h.right=l-n+"px",h.bottom=`${b}px`,v=e.left+o*i,w=e.top-c;break;case s.BOTTOM:case s.BOTTOM_RIGHT:h.top=`${d}px`,h.left=u-(t===s.BOTTOM_RIGHT?n:0)+"px",w=e.bottom-c,t===s.BOTTOM_RIGHT&&(v=e.right+o*i);break;case s.BOTTOM_LEFT:h.top=`${d}px`,h.right=l-n+"px",v=e.left+o*i,w=e.bottom-c;break;case s.RIGHT:case s.RIGHT_BOTTOM:h.top=g-(t===s.RIGHT_BOTTOM?n:0)+"px",h.left=`${p.left+o}px`,v=e.right-c,w=t===s.RIGHT?e.top+e.bottom+r:e.bottom+r*i;break;case s.RIGHT_TOP:h.bottom=m-n+"px",h.left=`${p.left+o}px`,v=e.right-c,w=e.top+r*i;break;case s.LEFT:case s.LEFT_BOTTOM:h.top=g-(t===s.LEFT_BOTTOM?n:0)+"px",h.right=`${p.right+o}px`,v=e.left-c,t===s.LEFT_BOTTOM&&(w=e.bottom+r*i);break;case s.LEFT_TOP:h.right=`${p.right+o}px`,h.bottom=m-n+"px",v=e.left-c,w=e.top+r*i}f()!==a.MOBILE&&Object.assign(h,{maxWidth:v?`${v}px`:"",maxHeight:w?`${w}px`:""})}setPosition(){if(!this.boundElement)return;if(!u(this.boundElement,this.findScrollableAncestor(this.boundElement)))return void(this.open=!1);Object.assign(this.host.style,{top:"auto",right:"auto",bottom:"auto",left:"auto",maxWidth:"",maxHeight:"",visibility:"hidden"});const t=this.calculateAvailableSpace(),e=this.getOptimalPopoverPosition(this.position,t);this.applyPositionStyles(e,t),this.currentPosition=e,this.positionChange.emit({position:this.currentPosition}),this.host.style.visibility="visible"}componentWillLoad(){this.validatePosition(this.position)}componentDidLoad(){this.findBoundElement(),this.open&&this.onOpen()}disconnectedCallback(){cancelAnimationFrame(this.animationFrameRequestId)}render(){return o(r,{key:"11ab6b060fdc4a10752881c38d3a369f2ae267a6","current-position":this.currentPosition},o("slot",{key:"40ae4b9e51638e5d92d916937ccfac5f85c0d36f"}))}get host(){return i(this)}static get watchers(){return{position:[{validatePosition:0}],open:[{onOpen:0}],bindTo:[{onBindingChange:0}]}}};l.positionOrder=[s.TOP,s.TOP_RIGHT,s.TOP_LEFT,s.RIGHT,s.RIGHT_BOTTOM,s.RIGHT_TOP,s.BOTTOM,s.BOTTOM_LEFT,s.BOTTOM_RIGHT,s.LEFT,s.LEFT_TOP,s.LEFT_BOTTOM],l.style=':host{position:fixed;display:none;max-width:calc(100dvw - var(--grid-margin) * 2);max-height:calc(100dvh - var(--grid-margin) * 2);padding:var(--z-popover-padding, 0);background:var(--z-popover-theme--surface, var(--color-surface01));border-radius:var(--border-radius-small);color:var(--z-popover-theme--text, var(--color-default-text));fill:currentcolor;filter:var(--z-popover-shadow-filter, drop-shadow(0 1px 2px var(--shadow-color-base)));text-align:center;visibility:hidden;}:host([open]:not([open="false"])[current-position]){display:block}:host([center][current-position="top"]),:host([center][current-position="bottom"]){transform:translateX(-50%)}:host([center][current-position="right"]),:host([center][current-position="left"]){transform:translateY(-50%)}:host([current-position^="top"]){margin:0 0 var(--space-unit)}:host([current-position^="bottom"]){margin:var(--space-unit) 0 0}:host([current-position^="left"]){margin:0 var(--space-unit) 0 0}:host([current-position^="right"]){margin:0 0 0 var(--space-unit)}:host([current-position])::before{--arrow-size:6px;--arrow-edge-offset:calc(100% - var(--space-unit) - (var(--arrow-size) / 2));--arrow-center-x-offset:calc(50% - (var(--arrow-size) / 2));--arrow-center-y-offset:calc(100% - (var(--arrow-size) / 2));position:absolute;display:block;width:var(--arrow-size);height:var(--arrow-size);background:var(--z-popover-theme--surface, var(--color-surface01));content:"";transform:rotate(45deg)}:host([show-arrow="false"])::before,:host(:not([show-arrow]))::before{display:none}:host([current-position^="top"])::before{top:var(--arrow-center-y-offset)}:host([current-position^="bottom"])::before{bottom:var(--arrow-center-y-offset)}:host([current-position="top"])::before,:host([current-position="bottom"])::before{right:var(--arrow-edge-offset)}:host([current-position="right"])::before,:host([current-position="left"])::before{bottom:var(--arrow-edge-offset)}:host([current-position="right"])::before{right:var(--arrow-center-y-offset)}:host([current-position="left"])::before{left:var(--arrow-center-y-offset)}:host([current-position="top_right"])::before,:host([current-position="bottom_right"])::before{right:var(--arrow-edge-offset)}:host([current-position="top_left"])::before,:host([current-position="bottom_left"])::before{left:var(--arrow-edge-offset)}:host([current-position="right_top"])::before,:host([current-position="left_top"])::before{top:var(--arrow-edge-offset)}:host([current-position="right_top"])::before,:host([current-position="right_bottom"])::before{right:var(--arrow-center-y-offset)}:host([current-position="left_top"])::before,:host([current-position="left_bottom"])::before{left:var(--arrow-center-y-offset)}:host([current-position="right_bottom"])::before,:host([current-position="left_bottom"])::before{bottom:var(--arrow-edge-offset)}:host([center][current-position="top"])::before,:host([center][current-position="bottom"])::before{right:auto;left:var(--arrow-center-x-offset)}:host([center][current-position="right"])::before,:host([center][current-position="left"])::before{top:var(--arrow-center-x-offset);bottom:auto}';export{l as z_popover}
1
+ import{r as t,c as e,h as o,H as r,d as i}from"./p-DPdXlnVe.js";import{P as s,g as n,p as a}from"./p-BKCj6NR2.js";import{a as h,j as c,k as p,g as f,l as u}from"./p-CPsEG702.js";import"./p-Q-tWjk7P.js";const l=class{constructor(o){t(this,o),this.positionChange=e(this,"positionChange",7),this.openChange=e(this,"openChange",7),this.position=s.TOP,this.open=!1,this.showArrow=!1,this.center=!1,this.closable=!0,this.spaceTolerance=3}closePopoverWithKeyboard(t){this.closable&&t.key===n.ESC&&(t.stopPropagation(),this.open=!1)}handleOutsideClick(t){const e=t.target;this.closable&&this.open&&!h(this.host,e)&&(h(this.boundElement,e)&&t.stopPropagation(),this.open=!1)}validatePosition(t){Object.values(s).includes(t)&&t!==s.AUTO||(this.position=t=s.TOP),this.currentPosition=t,this.open&&this.setPosition()}onOpen(){if(cancelAnimationFrame(this.animationFrameRequestId),this.openChange.emit({open:this.open}),!this.open)return Object.assign(this.host.style,{top:"auto",right:"auto",bottom:"auto",left:"auto",maxWidth:"",maxHeight:"",visibility:"hidden"}),void(this.currentPosition=void 0);const t=()=>{this.open&&(this.setPosition(),this.animationFrameRequestId=requestAnimationFrame(t))};setTimeout((()=>{t()}),0)}onBindingChange(){this.findBoundElement()}get offsetModifier(){return this.center?.5:0}findBoundElement(){"string"==typeof this.bindTo?this.boundElement=this.host.ownerDocument.querySelector(this.bindTo):this.bindTo?this.boundElement=this.bindTo:(this.boundElement=c(this.host),"z-tooltip"===this.boundElement.tagName.toLowerCase()&&(this.boundElement=c(this.boundElement)))}hasCenteredHorizontalSpace(t,e,o,r){const i=(o-r)*(1-this.offsetModifier);return this.center?e>=i-this.spaceTolerance&&t>=i-this.spaceTolerance:e>=i-this.spaceTolerance}hasCenteredVerticalSpace(t,e,o,r){const i=(o-r)*(1-this.offsetModifier);return this.center?t>=i-this.spaceTolerance&&e>=i-this.spaceTolerance:e>=i-this.spaceTolerance}hasEnoughSideSpace(t,e,o,r){return t>=e-o*(1-r)-this.spaceTolerance}getOptimalPopoverPosition(t,e){const o=this.host.offsetWidth,r=this.host.offsetHeight,i=this.boundElement.getBoundingClientRect().width,n=this.boundElement.getBoundingClientRect().height,a=this.offsetModifier,h=t=>{switch(t){case s.TOP:return e.top>=r-this.spaceTolerance&&this.hasCenteredHorizontalSpace(e.left,e.right,o,i);case s.TOP_RIGHT:return e.top>=r&&this.hasEnoughSideSpace(e.right,o,i,a);case s.TOP_LEFT:return e.top>=r&&this.hasEnoughSideSpace(e.left,o,i,a);case s.RIGHT:return e.right>=o&&this.hasCenteredVerticalSpace(e.top,e.bottom,r,n);case s.RIGHT_BOTTOM:return e.right>=o&&this.hasEnoughSideSpace(e.bottom,r,n,a);case s.RIGHT_TOP:return e.right>=o&&this.hasEnoughSideSpace(e.top,r,n,a);case s.BOTTOM:return e.bottom>=r&&this.hasCenteredHorizontalSpace(e.left,e.right,o,i);case s.BOTTOM_LEFT:return e.bottom>=r&&this.hasEnoughSideSpace(e.left,o,i,a);case s.BOTTOM_RIGHT:return e.bottom>=r&&this.hasEnoughSideSpace(e.right,o,i,a);case s.LEFT:return e.left>=o&&this.hasCenteredVerticalSpace(e.top,e.bottom,r,n);case s.LEFT_TOP:return e.left>=o&&this.hasEnoughSideSpace(e.top,r,n,a);case s.LEFT_BOTTOM:return e.left>=o&&this.hasEnoughSideSpace(e.bottom,r,n,a);default:return!1}};if(h(t))return t;const c=l.positionOrder,p=c.indexOf(t);if(-1===p)return t;for(let t=1;t<c.length;t++){const e=c[(p+t)%c.length];if(h(e))return e}return this.findBestFallbackPosition(e)}findBestFallbackPosition(t){const e=t.right>=t.left?s.RIGHT:s.LEFT,o=t.bottom>=t.top?s.BOTTOM:s.TOP,r=Math.max(t.right,t.left),i=Math.max(t.bottom,t.top),n=i>=r?o:e;let a=!1;return a=n===o?r>=2*Math.min(t.right,t.left):i>=2*Math.min(t.bottom,t.top),a?`${n}_${n===o?e:o}`:n}findScrollableAncestor(t){let e=c(t);for(;e;){if(e===t.ownerDocument.documentElement)return e;const o=getComputedStyle(e),{overflow:r,overflowX:i,overflowY:s}=o;if("hidden"!==r&&"hidden"!==s&&"hidden"!==i&&(e.scrollHeight>e.clientHeight&&"visible"!==r&&"visible"!==s||e.scrollWidth>e.clientWidth&&"visible"!==r&&"visible"!==i))return e;e=c(e)}return t.ownerDocument.documentElement}calculateAvailableSpace(){const t=this.boundElement.getBoundingClientRect();if(this.lastBoundRect&&this.lastBoundRect.x===t.x&&this.lastBoundRect.y===t.y&&this.lastBoundRect.width===t.width&&this.lastBoundRect.height===t.height&&this.cachedAvailableSpace)return this.cachedAvailableSpace;this.lastBoundRect=t;const e=this.findScrollableAncestor(this.boundElement),o=e.getBoundingClientRect(),r=e!==this.boundElement.ownerDocument.documentElement,i=this.boundElement.ownerDocument.documentElement.clientWidth,s=this.boundElement.ownerDocument.documentElement.clientHeight;return this.cachedAvailableSpace={top:t.top-(r?o.top:0)-8,right:i-t.right-(r?i-o.right:0)-8,bottom:s-t.bottom-(r?s-o.bottom:0)-8,left:t.left-(r?o.left:0)-8},this.cachedAvailableSpace}getBoundElementOffsets(){const t=this.boundElement.getBoundingClientRect();return{top:t.top,right:this.boundElement.ownerDocument.documentElement.clientWidth-t.right,bottom:this.boundElement.ownerDocument.documentElement.clientHeight-t.bottom,left:t.left}}computePositionOffsets(){const t=this.getBoundElementOffsets(),e=p(this.host);if(e===this.host.ownerDocument.documentElement)return t;const o=e.getBoundingClientRect(),r=getComputedStyle(e),i=o.top+parseFloat(r.borderTopWidth),s=o.right-parseFloat(r.borderRightWidth),n=o.bottom-parseFloat(r.borderBottomWidth),a=o.left+parseFloat(r.borderLeftWidth),h=this.boundElement.getBoundingClientRect();return{top:h.top-i+e.scrollTop,right:s-h.right-e.scrollLeft,bottom:n-h.bottom-e.scrollTop,left:h.left-a+e.scrollLeft}}applyPositionStyles(t,e){const o=this.boundElement.offsetWidth,r=this.boundElement.offsetHeight,i=this.offsetModifier,n=this.showArrow&&this.center?8:0,h=this.host.style,c=parseFloat(getComputedStyle(this.host).marginTop.replace("px",""))||0,p=this.computePositionOffsets(),u=p.left+o*i,l=p.right+o*i,d=p.top+r,b=p.bottom+r,g=p.top+r*i,m=p.bottom+r*i;let v,w;switch(t){case s.TOP:case s.TOP_RIGHT:h.bottom=`${b}px`,h.left=u-(t===s.TOP_RIGHT?n:0)+"px",w=e.top-c,t===s.TOP_RIGHT&&(v=e.right+o*i);break;case s.TOP_LEFT:h.right=l-n+"px",h.bottom=`${b}px`,v=e.left+o*i,w=e.top-c;break;case s.BOTTOM:case s.BOTTOM_RIGHT:h.top=`${d}px`,h.left=u-(t===s.BOTTOM_RIGHT?n:0)+"px",w=e.bottom-c,t===s.BOTTOM_RIGHT&&(v=e.right+o*i);break;case s.BOTTOM_LEFT:h.top=`${d}px`,h.right=l-n+"px",v=e.left+o*i,w=e.bottom-c;break;case s.RIGHT:case s.RIGHT_BOTTOM:h.top=g-(t===s.RIGHT_BOTTOM?n:0)+"px",h.left=`${p.left+o}px`,v=e.right-c,w=t===s.RIGHT?e.top+e.bottom+r:e.bottom+r*i;break;case s.RIGHT_TOP:h.bottom=m-n+"px",h.left=`${p.left+o}px`,v=e.right-c,w=e.top+r*i;break;case s.LEFT:case s.LEFT_BOTTOM:h.top=g-(t===s.LEFT_BOTTOM?n:0)+"px",h.right=`${p.right+o}px`,v=e.left-c,t===s.LEFT_BOTTOM&&(w=e.bottom+r*i);break;case s.LEFT_TOP:h.right=`${p.right+o}px`,h.bottom=m-n+"px",v=e.left-c,w=e.top+r*i}f()!==a.MOBILE&&Object.assign(h,{maxWidth:v?`${v}px`:"",maxHeight:w?`${w}px`:""})}setPosition(){if(!this.boundElement)return;if(!u(this.boundElement,this.findScrollableAncestor(this.boundElement)))return void(this.open=!1);Object.assign(this.host.style,{top:"auto",right:"auto",bottom:"auto",left:"auto",maxWidth:"",maxHeight:"",visibility:"hidden"});const t=this.calculateAvailableSpace(),e=this.getOptimalPopoverPosition(this.position,t);this.applyPositionStyles(e,t),this.currentPosition=e,this.positionChange.emit({position:this.currentPosition}),this.host.style.visibility="visible"}componentWillLoad(){this.validatePosition(this.position)}componentDidLoad(){this.findBoundElement(),this.open&&this.onOpen()}disconnectedCallback(){cancelAnimationFrame(this.animationFrameRequestId)}render(){return o(r,{key:"11ab6b060fdc4a10752881c38d3a369f2ae267a6","current-position":this.currentPosition},o("slot",{key:"40ae4b9e51638e5d92d916937ccfac5f85c0d36f"}))}get host(){return i(this)}static get watchers(){return{position:[{validatePosition:0}],open:[{onOpen:0}],bindTo:[{onBindingChange:0}]}}};l.positionOrder=[s.TOP,s.TOP_RIGHT,s.TOP_LEFT,s.RIGHT,s.RIGHT_BOTTOM,s.RIGHT_TOP,s.BOTTOM,s.BOTTOM_LEFT,s.BOTTOM_RIGHT,s.LEFT,s.LEFT_TOP,s.LEFT_BOTTOM],l.style=':host{position:fixed;display:none;max-width:calc(100dvw - var(--grid-margin) * 2);max-height:calc(100dvh - var(--grid-margin) * 2);padding:var(--z-popover-padding, 0);background:var(--z-popover-theme--surface, var(--color-surface01));border-radius:var(--border-radius-small);color:var(--z-popover-theme--text, var(--color-default-text));fill:currentcolor;filter:var(--z-popover-shadow-filter, drop-shadow(0 1px 2px var(--shadow-color-base)));text-align:center;visibility:hidden;}:host([open]:not([open="false"])[current-position]){display:block}:host([center][current-position="top"]),:host([center][current-position="bottom"]){transform:translateX(-50%)}:host([center][current-position="right"]),:host([center][current-position="left"]){transform:translateY(-50%)}:host([current-position^="top"]){margin:0 0 var(--space-unit)}:host([current-position^="bottom"]){margin:var(--space-unit) 0 0}:host([current-position^="left"]){margin:0 var(--space-unit) 0 0}:host([current-position^="right"]){margin:0 0 0 var(--space-unit)}:host([current-position])::before{--arrow-size:6px;--arrow-edge-offset:calc(100% - var(--space-unit) - (var(--arrow-size) / 2));--arrow-center-x-offset:calc(50% - (var(--arrow-size) / 2));--arrow-center-y-offset:calc(100% - (var(--arrow-size) / 2));position:absolute;display:block;width:var(--arrow-size);height:var(--arrow-size);background:var(--z-popover-theme--surface, var(--color-surface01));content:"";transform:rotate(45deg)}:host([show-arrow="false"])::before,:host(:not([show-arrow]))::before{display:none}:host([current-position^="top"])::before{top:var(--arrow-center-y-offset)}:host([current-position^="bottom"])::before{bottom:var(--arrow-center-y-offset)}:host([current-position="top"])::before,:host([current-position="bottom"])::before{right:var(--arrow-edge-offset)}:host([current-position="right"])::before,:host([current-position="left"])::before{bottom:var(--arrow-edge-offset)}:host([current-position="right"])::before{right:var(--arrow-center-y-offset)}:host([current-position="left"])::before{left:var(--arrow-center-y-offset)}:host([current-position="top_right"])::before,:host([current-position="bottom_right"])::before{right:var(--arrow-edge-offset)}:host([current-position="top_left"])::before,:host([current-position="bottom_left"])::before{left:var(--arrow-edge-offset)}:host([current-position="right_top"])::before,:host([current-position="left_top"])::before{top:var(--arrow-edge-offset)}:host([current-position="right_top"])::before,:host([current-position="right_bottom"])::before{right:var(--arrow-center-y-offset)}:host([current-position="left_top"])::before,:host([current-position="left_bottom"])::before{left:var(--arrow-center-y-offset)}:host([current-position="right_bottom"])::before,:host([current-position="left_bottom"])::before{bottom:var(--arrow-edge-offset)}:host([center][current-position="top"])::before,:host([center][current-position="bottom"])::before{right:auto;left:var(--arrow-center-x-offset)}:host([center][current-position="right"])::before,:host([center][current-position="left"])::before{top:var(--arrow-center-x-offset);bottom:auto}';export{l as z_popover}
@@ -1 +1 @@
1
- import{r as t,c as e,h as i,d as o}from"./p-ByN2sYu6.js";import{e as s,I as a,i as r,g as n,l}from"./p-BKCj6NR2.js";import{r as h,b as c}from"./p-D4yqZKyM.js";import"./p-Q-tWjk7P.js";const d=class{watchItems(){this.itemsList="string"==typeof this.items?JSON.parse(this.items):this.items,this.selectedCounter=this.itemsList.filter((t=>t.checked)).length,this.updateRenderItemsList()}watchSearchValue(){this.filterItems(this.searchValue)}emitComboboxChange(){this.comboboxChange.emit({id:this.inputid,items:this.itemsList})}constructor(i){t(this,i),this.comboboxChange=e(this,"comboboxChange",7),this.inputid=`combo-${h()}`,this.disabled=!1,this.hassearch=!1,this.noresultslabel="Nessun risultato",this.isopen=!1,this.isfixed=!1,this.hascheckall=!1,this.checkalltext="Seleziona tutti",this.uncheckalltext="Deseleziona tutti",this.maxcheckableitems=0,this.size=s.BIG,this.renderItemsList=[],this.focusedItemId="",this.itemsList=[],this.inputType=a.TEXT,this.toggleComboBox=this.toggleComboBox.bind(this),this.closeFilterItems=this.closeFilterItems.bind(this)}componentWillLoad(){this.watchItems()}componentWillRender(){this.selectedCounter=this.itemsList.filter((t=>t.checked)).length}getControlToListSize(){switch(this.size){case s.X_SMALL:return r.SMALL;case s.SMALL:return r.MEDIUM;default:return r.LARGE}}getOptionId(t){return`${this.inputid}-option-${t}`}getCheckAllOptionId(){return`${this.inputid}-check-all`}allOptionsSelected(){return this.selectedCounter===this.itemsList.length}hasReachedMaxSelections(){return!!(this.maxcheckableitems&&this.selectedCounter>=this.maxcheckableitems)}handleHeaderKeyDown(t){if(t.code!==n.ENTER||this.focusedItemId||this.toggleComboBox(),this.isopen&&!this.hassearch)switch(t.code){case n.SPACE:case n.ENTER:this.focusedItemId&&(t.preventDefault(),this.checkOption(this.focusedItemId));break;case n.ESC:this.focusedItemId&&(this.focusedItemId="");break;case n.ARROW_DOWN:case n.ARROW_UP:this.handleArrowsNavigation(t)}}handleInputKeyDown(t){switch(t.code){case n.ENTER:case n.SPACE:if(this.focusedItemId){t.preventDefault(),this.checkOption(this.focusedItemId);break}break;case n.ARROW_DOWN:case n.ARROW_UP:this.handleArrowsNavigation(t);break;case n.ESC:if(this.focusedItemId){this.focusedItemId="";break}this.closeFilterItems();break;case n.TAB:this.focusedItemId=""}}checkOption(t){t===this.getCheckAllOptionId()?(this.itemsList=this.itemsList.map((t=>Object.assign(Object.assign({},t),{checked:!this.allOptionsSelected()}))),this.focusedItemId=this.getCheckAllOptionId()):this.itemsList=this.itemsList.map((e=>(t===this.getOptionId(e.id)&&(e.checked=!e.checked),e))),this.updateRenderItemsList(),this.emitComboboxChange()}handleArrowsNavigation(t){if(![n.ARROW_DOWN,n.ARROW_UP].includes(t.code)||!this.isopen)return;t.preventDefault(),t.stopPropagation();const e=this.focusedItemId?this.element.shadowRoot.querySelector(`#${this.focusedItemId}`):null,i=Array.from(this.element.shadowRoot.querySelectorAll('[role="option"]'));if(!i.length)return;const o=e?i.indexOf(e):null,s=i.length-1;let a=null;t.code===n.ARROW_DOWN?a=null===o?i[0]:i[o+1]||i[s]:t.code===n.ARROW_UP&&(a=null===o?i[s]:i[o-1]||i[0]),this.focusedItemId=a.id,a.scrollIntoView({block:"nearest",container:"nearest"})}updateRenderItemsList(){this.searchValue?this.filterItems(this.searchValue):this.resetRenderItemsList()}resetRenderItemsList(){const t=[];this.itemsList.forEach((e=>{t.push(Object.assign({},e))})),this.renderItemsList=t}filterItems(t){if(!t)return this.closeFilterItems();this.resetRenderItemsList(),this.renderItemsList=this.renderItemsList.filter((e=>{const i=e.name.toUpperCase().indexOf(t.toUpperCase()),o=i+t.length,s=e.name.substring(0,i)+"<strong>"+e.name.substring(i,o)+"</strong>"+e.name.substring(o,e.name.length);return e.name=s,i>=0}))}closeFilterItems(){this.searchValue="",this.resetRenderItemsList()}toggleComboBox(){this.isopen=!this.isopen}getComboboxA11yAttributes(t){const e="combobox",i=this.htmlAriaLabel,o=this.isopen?"true":"false",s=this.isopen?this.focusedItemId:"",a=`${this.inputid}_list`;return t?{role:e,"aria-label":i,"html-aria-expanded":o,"html-aria-activedescendant":s,"html-aria-controls":a}:{role:e,"aria-label":i,"aria-expanded":o,"aria-activedescendant":s,"aria-controls":a}}renderHeader(){const t=this.hassearch?{}:this.getComboboxA11yAttributes(!1);return i("div",Object.assign({class:"header",onClick:()=>this.toggleComboBox(),onKeyDown:t=>this.handleHeaderKeyDown(t),role:"button",tabindex:0,"aria-controls":"open-combo-data","aria-expanded":this.isopen?"true":"false"},t),i("span",{class:"body-3","aria-label":this.label?`${this.label}${this.selectedCounter>0?` - ${this.selectedCounter} selezionati`:""}`:void 0},this.label,i("span",null,this.selectedCounter>0&&` (${this.selectedCounter})`)),i("z-icon",{name:"caret-down",class:this.size}))}renderContent(){return i("div",{id:"open-combo-data",class:"open-combo-data"},this.hassearch&&this.renderSearchInput(),i("div",{role:"listbox","aria-label":this.label,"aria-multiselectable":"true",id:`${this.inputid}_list`,"aria-owns":`${this.hascheckall?`${this.getCheckAllOptionId()} `:""}${this.itemsList.map((t=>this.getOptionId(t.id))).join(" ")}`},this.renderItems()))}renderItems(){return i("div",{class:this.searchValue&&"search",tabIndex:-1,role:"presentation"},this.renderList(this.renderItemsList))}renderItem(t,e,o){const s=this.getOptionId(t.id),a=!t.checked&&this.hasReachedMaxSelections();return i("z-list-element",{htmlTabindex:-1,dividerType:e!==o-1?l.ELEMENT:l.NONE,size:this.getControlToListSize(),role:"presentation",disabled:!!a},i("span",{class:"option-wrap",role:"presentation",onClick:()=>{this.focusedItemId="",this.checkOption(s)}},i("z-icon",{name:t.checked?"checkbox-checked":"checkbox",class:this.focusedItemId===s?"focused":""}),i("span",{id:s,role:a?"presentation":"option","aria-selected":t.checked?"true":"false","aria-label":a?void 0:c(t.name)},i("span",{"aria-hidden":"true",innerHTML:t.name}))))}renderList(t){if(t)return!t.length&&this.searchValue?this.renderNoSearchResults():this.hasgroupitems?this.renderGroups(t):i("ul",{role:"presentation"},this.renderCheckAll(),t.map(((e,i)=>this.renderItem(e,i,t.length))))}renderGroups(t){const e=t.reduce(((e,i,o)=>{var s;const a=i.category||"Altra categoria",r=this.renderItem(i,o,t.length);return e[a]=null!==(s=e[a])&&void 0!==s?s:[],e[a].push(r),e}),{}),o=Object.entries(e).map((([t,e],o)=>i("z-list-group",{size:this.getControlToListSize(),"divider-type":l.ELEMENT,"aria-labelledby":`${this.inputid}_list_group_${o}`},i("span",{class:"body-3-sb z-list-group-title",slot:"header-title",id:`${this.inputid}_list_group_${o}`,"aria-hidden":"true"},t),e.map((t=>t)))));return i("ul",{role:"presentation"},this.renderCheckAll(),o)}renderNoSearchResults(){return i("div",{class:"no-results"},i("span",null,this.noresultslabel))}renderSearchInput(){return i("z-input",Object.assign({htmlid:`${this.inputid}_search`,label:this.searchlabel,placeholder:this.searchplaceholder,htmltitle:this.searchtitle,type:this.inputType,value:this.searchValue,message:!1,size:this.size,"html-aria-autocomplete":"list"},this.getComboboxA11yAttributes(!0),{onKeyDown:t=>this.handleInputKeyDown(t),onInputChange:t=>{this.searchValue=t.detail.value,this.focusedItemId=""}}))}renderCheckAll(){if(!this.hascheckall||this.searchValue)return;const t=this.getCheckAllOptionId(),e=this.allOptionsSelected(),o=this.hasReachedMaxSelections()||this.maxcheckableitems&&this.maxcheckableitems<this.itemsList.length;return i("z-list-element",{class:"check-all-wrapper",role:"presentation",htmlTabindex:-1,dividerType:l.ELEMENT,dividerColor:"gray800",size:this.getControlToListSize(),disabled:!!o},i("span",{class:"option-wrap",role:"presentation",onClick:()=>this.checkOption(t)},i("z-icon",{name:e?"checkbox-checked":"checkbox",class:this.focusedItemId===t?"focused":""}),i("span",{id:t,role:o?"presentation":"option","aria-selected":e?"true":"false"},e?this.uncheckalltext:this.checkalltext)))}render(){return i("div",{key:"f65a92eded2c6cd7d4bb42ddc5f667806a4f5582","data-action":`combo-${this.inputid}`,class:{open:this.isopen,fixed:this.isfixed,disabled:this.disabled},id:this.inputid},this.renderHeader(),!this.disabled&&this.renderContent())}get element(){return o(this)}static get watchers(){return{items:[{watchItems:0}],searchValue:[{watchSearchValue:0}]}}};d.style='.z-label{display:block;padding-bottom:var(--space-unit);color:var(--color-default-text);font-family:var(--font-family-sans);font-size:var(--font-size-1);font-weight:var(--font-sb);text-align:left;text-transform:uppercase}:host{display:block;min-width:290px;color:var(--color-form-default-text);fill:var(--color-form-default-icon);font-family:var(--font-family-sans)}:host>div.fixed{position:relative}:host>div>.header{position:relative;z-index:10;display:flex;min-height:42px;align-items:center;justify-content:space-between;padding:0 calc(var(--space-unit) * 1.5);border:var(--border-size-small) solid var(--color-form-surface04);margin:0;background-color:var(--color-form-background);border-radius:var(--border-radius-small);cursor:pointer}:host([size="small"])>div>.header{min-height:34px;font-size:var(--font-size-2)}:host([size="x-small"])>div>.header{min-height:30px;font-size:var(--font-size-2)}:host>div>.header:hover{outline:var(--border-size-medium) solid var(--color-form-surface04);outline-offset:-2px}:host>div>div.header:focus:focus-visible{z-index:16;box-shadow:var(--shadow-focus-primary);outline:none}:host>div>.header>span.body-3>span{font-weight:var(--font-sb)}:host>div>.header>z-icon{fill:var(--color-form-default-icon);transform:rotate(360deg);transition:all 200ms linear}:host>div>.header>z-icon.small,:host>div>.header>z-icon.x-small{--z-icon-width:16px;--z-icon-height:16px}:host>div.open>.header{border:var(--border-size-small) solid var(--color-form-active-primary);border-radius:var(--border-radius-small) var(--border-radius-small) 0 0}:host>div.disabled{pointer-events:none}:host>div.disabled .header{border-color:var(--color-form-disabled03);fill:var(--color-form-disabled01-icon)}:host>div.disabled .header>span.body-3{color:var(--color-form-disabled03)}:host>div.disabled .header>z-icon:last-child{fill:var(--color-form-disabled01-icon)}:host>div.open>.header>z-icon{fill:var(--color-form-default-icon);transform:rotate(180deg);transition:all 200ms linear}:host>div>div.open-combo-data{display:none}:host>div.open>div.open-combo-data{position:relative;z-index:12;display:block;padding:var(--space-unit) calc(var(--space-unit) * 2);border:var(--border-size-small) solid var(--color-form-surface03);border-top:0;background-color:var(--color-form-background);border-radius:0;box-shadow:var(--shadow-2)}:host .open .open-combo-data z-input .z-label{color:var(--color-form-default-text)}:host>div.open>div.open-combo-data>div>div{overflow:auto;max-height:235px;padding:0;padding-left:var(--space-unit);margin-left:calc(var(--space-unit) * -1);}:host>div.open>div.open-combo-data>z-input{width:100%;margin-bottom:calc(var(--space-unit) * 2)}:host>div.open>div.open-combo-data>div>div>ul{max-height:235px;padding:0 calc(var(--space-unit) * 0.5);margin:0}:host .open-combo-data z-list-element{--background-color-list-element:var(--color-form-background);--background-hover-color-list-element:var(--color-form-surface03);--background-active-color-list-element:var(--color-form-surface03)}:host .open-combo-data z-list-element[disabled]{pointer-events:none}:host .open-combo-data z-list-element .option-wrap{display:flex;flex-direction:row;align-items:center;cursor:pointer;gap:var(--space-unit)}:host .open-combo-data z-list-element[size="medium"] .option-wrap,:host .open-combo-data z-list-element[size="small"] .option-wrap{--z-icon-width:16px;--z-icon-height:16px;font-size:var(--font-size-2);gap:calc(var(--space-unit) / 2)}:host .open-combo-data z-list-element .option-wrap>z-icon{fill:var(--color-primary01)}:host .open-combo-data z-list-element[disabled] .option-wrap>z-icon{fill:var(--color-disabled01)}:host .open-combo-data z-list-element .option-wrap>z-icon.focused{border-radius:var(--border-radius-small);box-shadow:var(--shadow-focus-primary);outline:none}:host .open-combo-data z-list-element .option-wrap>[role="option"]:focus,:host .open-combo-data z-list-element .option-wrap>[role="option"]:focus-visible{outline:none}::-webkit-scrollbar{width:6px;background:linear-gradient(to right, transparent 0 1px, var(--gray200) 1px 5px, transparent 5px 6px)}::-webkit-scrollbar-thumb{background-color:var(--color-primary01)}::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}@supports not selector(::-webkit-scrollbar-track){:host{scrollbar-color:var(--color-primary01) transparent}}:host>div.open>z-input{position:relative;z-index:1;width:238px;margin:0 calc(var(--space-unit) * 2);color:var(--color-form-active-primary)}:host>div.open>div.open-combo-data>div>div.search{overflow:hidden;max-height:none;margin-top:0}:host>div.open>div.open-combo-data>div>div.search>ul{overflow:auto;max-height:180px;padding:var(--space-unit) calc(var(--space-unit) * 2)}:host .open .open-combo-data .search .no-results{display:flex;align-items:center;column-gap:var(--space-unit)}:host>.open>.open-combo-data .search .close-search{display:flex;justify-content:center}:host>div.open>div.open-combo-data>div>div.search .close-search>a{display:inline-block;height:44px;color:var(--color-form-active-primary);cursor:pointer;font-size:14px;font-weight:var(--font-sb);line-height:44px;text-align:center;text-transform:uppercase}:host>div.open>div.open-combo-data>div>div.search .close-search>a:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}:host>div.open>div.open-combo-data>div>div.check-all-wrapper{padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5) calc(var(--space-unit) * 2) calc(var(--space-unit) * 1.5);border-bottom:var(--border-size-small) solid var(--gray800);margin-bottom:var(--space-unit);margin-left:calc(var(--space-unit) * -1);text-align:left}:host([size="small"])>div.open>div.open-combo-data>div>div.check-all-wrapper{padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 0.5)}:host([size="x-small"])>div.open>div.open-combo-data>div>div.check-all-wrapper{padding:var(--space-unit) calc(var(--space-unit) * 0.5)}';export{d as z_combobox}
1
+ import{r as t,c as e,h as i,d as o}from"./p-DPdXlnVe.js";import{e as s,I as a,i as r,g as n,l}from"./p-BKCj6NR2.js";import{r as h,b as c}from"./p-CPsEG702.js";import"./p-Q-tWjk7P.js";const d=class{watchItems(){this.itemsList="string"==typeof this.items?JSON.parse(this.items):this.items,this.selectedCounter=this.itemsList.filter((t=>t.checked)).length,this.updateRenderItemsList()}watchSearchValue(){this.filterItems(this.searchValue)}emitComboboxChange(){this.comboboxChange.emit({id:this.inputid,items:this.itemsList})}constructor(i){t(this,i),this.comboboxChange=e(this,"comboboxChange",7),this.inputid=`combo-${h()}`,this.disabled=!1,this.hassearch=!1,this.noresultslabel="Nessun risultato",this.isopen=!1,this.isfixed=!1,this.hascheckall=!1,this.checkalltext="Seleziona tutti",this.uncheckalltext="Deseleziona tutti",this.maxcheckableitems=0,this.size=s.BIG,this.renderItemsList=[],this.focusedItemId="",this.itemsList=[],this.inputType=a.TEXT,this.toggleComboBox=this.toggleComboBox.bind(this),this.closeFilterItems=this.closeFilterItems.bind(this)}componentWillLoad(){this.watchItems()}componentWillRender(){this.selectedCounter=this.itemsList.filter((t=>t.checked)).length}getControlToListSize(){switch(this.size){case s.X_SMALL:return r.SMALL;case s.SMALL:return r.MEDIUM;default:return r.LARGE}}getOptionId(t){return`${this.inputid}-option-${t}`}getCheckAllOptionId(){return`${this.inputid}-check-all`}allOptionsSelected(){return this.selectedCounter===this.itemsList.length}hasReachedMaxSelections(){return!!(this.maxcheckableitems&&this.selectedCounter>=this.maxcheckableitems)}handleHeaderKeyDown(t){if(t.code!==n.ENTER||this.focusedItemId||this.toggleComboBox(),this.isopen&&!this.hassearch)switch(t.code){case n.SPACE:case n.ENTER:this.focusedItemId&&(t.preventDefault(),this.checkOption(this.focusedItemId));break;case n.ESC:this.focusedItemId&&(this.focusedItemId="");break;case n.ARROW_DOWN:case n.ARROW_UP:this.handleArrowsNavigation(t)}}handleInputKeyDown(t){switch(t.code){case n.ENTER:case n.SPACE:if(this.focusedItemId){t.preventDefault(),this.checkOption(this.focusedItemId);break}break;case n.ARROW_DOWN:case n.ARROW_UP:this.handleArrowsNavigation(t);break;case n.ESC:if(this.focusedItemId){this.focusedItemId="";break}this.closeFilterItems();break;case n.TAB:this.focusedItemId=""}}checkOption(t){t===this.getCheckAllOptionId()?(this.itemsList=this.itemsList.map((t=>Object.assign(Object.assign({},t),{checked:!this.allOptionsSelected()}))),this.focusedItemId=this.getCheckAllOptionId()):this.itemsList=this.itemsList.map((e=>(t===this.getOptionId(e.id)&&(e.checked=!e.checked),e))),this.updateRenderItemsList(),this.emitComboboxChange()}handleArrowsNavigation(t){if(![n.ARROW_DOWN,n.ARROW_UP].includes(t.code)||!this.isopen)return;t.preventDefault(),t.stopPropagation();const e=this.focusedItemId?this.element.shadowRoot.querySelector(`#${this.focusedItemId}`):null,i=Array.from(this.element.shadowRoot.querySelectorAll('[role="option"]'));if(!i.length)return;const o=e?i.indexOf(e):null,s=i.length-1;let a=null;t.code===n.ARROW_DOWN?a=null===o?i[0]:i[o+1]||i[s]:t.code===n.ARROW_UP&&(a=null===o?i[s]:i[o-1]||i[0]),this.focusedItemId=a.id,a.scrollIntoView({block:"nearest",container:"nearest"})}updateRenderItemsList(){this.searchValue?this.filterItems(this.searchValue):this.resetRenderItemsList()}resetRenderItemsList(){const t=[];this.itemsList.forEach((e=>{t.push(Object.assign({},e))})),this.renderItemsList=t}filterItems(t){if(!t)return this.closeFilterItems();this.resetRenderItemsList(),this.renderItemsList=this.renderItemsList.filter((e=>{const i=e.name.toUpperCase().indexOf(t.toUpperCase()),o=i+t.length,s=e.name.substring(0,i)+"<strong>"+e.name.substring(i,o)+"</strong>"+e.name.substring(o,e.name.length);return e.name=s,i>=0}))}closeFilterItems(){this.searchValue="",this.resetRenderItemsList()}toggleComboBox(){this.isopen=!this.isopen}getComboboxA11yAttributes(t){const e="combobox",i=this.htmlAriaLabel,o=this.isopen?"true":"false",s=this.isopen?this.focusedItemId:"",a=`${this.inputid}_list`;return t?{role:e,"aria-label":i,"html-aria-expanded":o,"html-aria-activedescendant":s,"html-aria-controls":a}:{role:e,"aria-label":i,"aria-expanded":o,"aria-activedescendant":s,"aria-controls":a}}renderHeader(){const t=this.hassearch?{}:this.getComboboxA11yAttributes(!1);return i("div",Object.assign({class:"header",onClick:()=>this.toggleComboBox(),onKeyDown:t=>this.handleHeaderKeyDown(t),role:"button",tabindex:0,"aria-controls":"open-combo-data","aria-expanded":this.isopen?"true":"false"},t),i("span",{class:"body-3","aria-label":this.label?`${this.label}${this.selectedCounter>0?` - ${this.selectedCounter} selezionati`:""}`:void 0},this.label,i("span",null,this.selectedCounter>0&&` (${this.selectedCounter})`)),i("z-icon",{name:"caret-down",class:this.size}))}renderContent(){return i("div",{id:"open-combo-data",class:"open-combo-data"},this.hassearch&&this.renderSearchInput(),i("div",{role:"listbox","aria-label":this.label,"aria-multiselectable":"true",id:`${this.inputid}_list`,"aria-owns":`${this.hascheckall?`${this.getCheckAllOptionId()} `:""}${this.itemsList.map((t=>this.getOptionId(t.id))).join(" ")}`},this.renderItems()))}renderItems(){return i("div",{class:this.searchValue&&"search",tabIndex:-1,role:"presentation"},this.renderList(this.renderItemsList))}renderItem(t,e,o){const s=this.getOptionId(t.id),a=!t.checked&&this.hasReachedMaxSelections();return i("z-list-element",{htmlTabindex:-1,dividerType:e!==o-1?l.ELEMENT:l.NONE,size:this.getControlToListSize(),role:"presentation",disabled:!!a},i("span",{class:"option-wrap",role:"presentation",onClick:()=>{this.focusedItemId="",this.checkOption(s)}},i("z-icon",{name:t.checked?"checkbox-checked":"checkbox",class:this.focusedItemId===s?"focused":""}),i("span",{id:s,role:a?"presentation":"option","aria-selected":t.checked?"true":"false","aria-label":a?void 0:c(t.name)},i("span",{"aria-hidden":"true",innerHTML:t.name}))))}renderList(t){if(t)return!t.length&&this.searchValue?this.renderNoSearchResults():this.hasgroupitems?this.renderGroups(t):i("ul",{role:"presentation"},this.renderCheckAll(),t.map(((e,i)=>this.renderItem(e,i,t.length))))}renderGroups(t){const e=t.reduce(((e,i,o)=>{var s;const a=i.category||"Altra categoria",r=this.renderItem(i,o,t.length);return e[a]=null!==(s=e[a])&&void 0!==s?s:[],e[a].push(r),e}),{}),o=Object.entries(e).map((([t,e],o)=>i("z-list-group",{size:this.getControlToListSize(),"divider-type":l.ELEMENT,"aria-labelledby":`${this.inputid}_list_group_${o}`},i("span",{class:"body-3-sb z-list-group-title",slot:"header-title",id:`${this.inputid}_list_group_${o}`,"aria-hidden":"true"},t),e.map((t=>t)))));return i("ul",{role:"presentation"},this.renderCheckAll(),o)}renderNoSearchResults(){return i("div",{class:"no-results"},i("span",null,this.noresultslabel))}renderSearchInput(){return i("z-input",Object.assign({htmlid:`${this.inputid}_search`,label:this.searchlabel,placeholder:this.searchplaceholder,htmltitle:this.searchtitle,type:this.inputType,value:this.searchValue,message:!1,size:this.size,"html-aria-autocomplete":"list"},this.getComboboxA11yAttributes(!0),{onKeyDown:t=>this.handleInputKeyDown(t),onInputChange:t=>{this.searchValue=t.detail.value,this.focusedItemId=""}}))}renderCheckAll(){if(!this.hascheckall||this.searchValue)return;const t=this.getCheckAllOptionId(),e=this.allOptionsSelected(),o=this.hasReachedMaxSelections()||this.maxcheckableitems&&this.maxcheckableitems<this.itemsList.length;return i("z-list-element",{class:"check-all-wrapper",role:"presentation",htmlTabindex:-1,dividerType:l.ELEMENT,dividerColor:"gray800",size:this.getControlToListSize(),disabled:!!o},i("span",{class:"option-wrap",role:"presentation",onClick:()=>this.checkOption(t)},i("z-icon",{name:e?"checkbox-checked":"checkbox",class:this.focusedItemId===t?"focused":""}),i("span",{id:t,role:o?"presentation":"option","aria-selected":e?"true":"false"},e?this.uncheckalltext:this.checkalltext)))}render(){return i("div",{key:"23cd031ec2894308960df94374713e9395521a56","data-action":`combo-${this.inputid}`,class:{open:this.isopen,fixed:this.isfixed,disabled:this.disabled},id:this.inputid},this.renderHeader(),!this.disabled&&this.renderContent())}get element(){return o(this)}static get watchers(){return{items:[{watchItems:0}],searchValue:[{watchSearchValue:0}]}}};d.style='.z-label{display:block;padding-bottom:var(--space-unit);color:var(--color-default-text);font-family:var(--font-family-sans);font-size:var(--font-size-1);font-weight:var(--font-sb);text-align:left;text-transform:uppercase}:host{display:block;min-width:290px;color:var(--color-form-default-text);fill:var(--color-form-default-icon);font-family:var(--font-family-sans)}:host>div.fixed{position:relative}:host>div>.header{position:relative;z-index:10;display:flex;min-height:42px;align-items:center;justify-content:space-between;padding:0 calc(var(--space-unit) * 1.5);border:var(--border-size-small) solid var(--color-form-surface04);margin:0;background-color:var(--color-form-background);border-radius:var(--border-radius-small);cursor:pointer}:host([size="small"])>div>.header{min-height:34px;font-size:var(--font-size-2)}:host([size="x-small"])>div>.header{min-height:30px;font-size:var(--font-size-2)}:host>div>.header:hover{outline:var(--border-size-medium) solid var(--color-form-surface04);outline-offset:-2px}:host>div>div.header:focus:focus-visible{z-index:16;box-shadow:var(--shadow-focus-primary);outline:none}:host>div>.header>span.body-3>span{font-weight:var(--font-sb)}:host>div>.header>z-icon{fill:var(--color-form-default-icon);transform:rotate(360deg);transition:all 200ms linear}:host>div>.header>z-icon.small,:host>div>.header>z-icon.x-small{--z-icon-width:16px;--z-icon-height:16px}:host>div.open>.header{border:var(--border-size-small) solid var(--color-form-active-primary);border-radius:var(--border-radius-small) var(--border-radius-small) 0 0}:host>div.disabled{pointer-events:none}:host>div.disabled .header{border-color:var(--color-form-disabled03);fill:var(--color-form-disabled01-icon)}:host>div.disabled .header>span.body-3{color:var(--color-form-disabled03)}:host>div.disabled .header>z-icon:last-child{fill:var(--color-form-disabled01-icon)}:host>div.open>.header>z-icon{fill:var(--color-form-default-icon);transform:rotate(180deg);transition:all 200ms linear}:host>div>div.open-combo-data{display:none}:host>div.open>div.open-combo-data{position:relative;z-index:12;display:block;padding:var(--space-unit) calc(var(--space-unit) * 2);border:var(--border-size-small) solid var(--color-form-surface03);border-top:0;background-color:var(--color-form-background);border-radius:0;box-shadow:var(--shadow-2)}:host .open .open-combo-data z-input .z-label{color:var(--color-form-default-text)}:host>div.open>div.open-combo-data>div>div{overflow:auto;max-height:235px;padding:0;padding-left:var(--space-unit);margin-left:calc(var(--space-unit) * -1);}:host>div.open>div.open-combo-data>z-input{width:100%;margin-bottom:calc(var(--space-unit) * 2)}:host>div.open>div.open-combo-data>div>div>ul{max-height:235px;padding:0 calc(var(--space-unit) * 0.5);margin:0}:host .open-combo-data z-list-element{--background-color-list-element:var(--color-form-background);--background-hover-color-list-element:var(--color-form-surface03);--background-active-color-list-element:var(--color-form-surface03)}:host .open-combo-data z-list-element[disabled]{pointer-events:none}:host .open-combo-data z-list-element .option-wrap{display:flex;flex-direction:row;align-items:center;cursor:pointer;gap:var(--space-unit)}:host .open-combo-data z-list-element[size="medium"] .option-wrap,:host .open-combo-data z-list-element[size="small"] .option-wrap{--z-icon-width:16px;--z-icon-height:16px;font-size:var(--font-size-2);gap:calc(var(--space-unit) / 2)}:host .open-combo-data z-list-element .option-wrap>z-icon{fill:var(--color-primary01)}:host .open-combo-data z-list-element[disabled] .option-wrap>z-icon{fill:var(--color-disabled01)}:host .open-combo-data z-list-element .option-wrap>z-icon.focused{border-radius:var(--border-radius-small);box-shadow:var(--shadow-focus-primary);outline:none}:host .open-combo-data z-list-element .option-wrap>[role="option"]:focus,:host .open-combo-data z-list-element .option-wrap>[role="option"]:focus-visible{outline:none}::-webkit-scrollbar{width:6px;background:linear-gradient(to right, transparent 0 1px, var(--gray200) 1px 5px, transparent 5px 6px)}::-webkit-scrollbar-thumb{background-color:var(--color-primary01)}::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}@supports not selector(::-webkit-scrollbar-track){:host{scrollbar-color:var(--color-primary01) transparent}}:host>div.open>z-input{position:relative;z-index:1;width:238px;margin:0 calc(var(--space-unit) * 2);color:var(--color-form-active-primary)}:host>div.open>div.open-combo-data>div>div.search{overflow:hidden;max-height:none;margin-top:0}:host>div.open>div.open-combo-data>div>div.search>ul{overflow:auto;max-height:180px;padding:var(--space-unit) calc(var(--space-unit) * 2)}:host .open .open-combo-data .search .no-results{display:flex;align-items:center;column-gap:var(--space-unit)}:host>.open>.open-combo-data .search .close-search{display:flex;justify-content:center}:host>div.open>div.open-combo-data>div>div.search .close-search>a{display:inline-block;height:44px;color:var(--color-form-active-primary);cursor:pointer;font-size:14px;font-weight:var(--font-sb);line-height:44px;text-align:center;text-transform:uppercase}:host>div.open>div.open-combo-data>div>div.search .close-search>a:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}:host>div.open>div.open-combo-data>div>div.check-all-wrapper{padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5) calc(var(--space-unit) * 2) calc(var(--space-unit) * 1.5);border-bottom:var(--border-size-small) solid var(--gray800);margin-bottom:var(--space-unit);margin-left:calc(var(--space-unit) * -1);text-align:left}:host([size="small"])>div.open>div.open-combo-data>div>div.check-all-wrapper{padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 0.5)}:host([size="x-small"])>div.open>div.open-combo-data>div>div.check-all-wrapper{padding:var(--space-unit) calc(var(--space-unit) * 0.5)}';export{d as z_combobox}
@@ -1 +1 @@
1
- import{r,h as a,H as e}from"./p-ByN2sYu6.js";const o=class{constructor(a){r(this,a)}render(){return a(e,{key:"a966fb0e58408172c56e7bb48deb1b5c0e5e0bb8"})}};o.style=':host{display:inline-block;overflow:hidden;width:100%;height:100%;background:var(--color-surface02);border-radius:var(--border-radius);transform:translate3d(0, 0, 0)}:host::after{display:block;width:100%;height:100%;animation:progress 1.6s ease-in-out infinite;background-image:linear-gradient( 90deg, var(--color-surface02) 0%, var(--color-surface03) 95%, var(--color-surface02) 100% );content:"";filter:blur(6px)}@keyframes progress{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}';export{o as z_ghost_loading}
1
+ import{r,h as e,H as a}from"./p-DPdXlnVe.js";const o=class{constructor(e){r(this,e)}render(){return e(a,{key:"a966fb0e58408172c56e7bb48deb1b5c0e5e0bb8"})}};o.style=':host{display:inline-block;overflow:hidden;width:100%;height:100%;background:var(--color-surface02);border-radius:var(--border-radius);transform:translate3d(0, 0, 0)}:host::after{display:block;width:100%;height:100%;animation:progress 1.6s ease-in-out infinite;background-image:linear-gradient( 90deg, var(--color-surface02) 0%, var(--color-surface03) 95%, var(--color-surface02) 100% );content:"";filter:blur(6px)}@keyframes progress{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}';export{o as z_ghost_loading}
@@ -1 +1 @@
1
- import{r as t,c as e,h as s,H as i,d as o}from"./p-ByN2sYu6.js";import{g as a}from"./p-BKCj6NR2.js";const n=class{get focusableItem(){return this.items.find((({tabIndex:t})=>0===t))}toggle(){this.hasItems&&(this.open=!this.open)}setItemsA11yAttrs(){this.hasItems&&this.items.forEach((t=>{t.setAttribute("role","menuitem"),t.tabIndex=-1}))}onItemsChange(){this.items=Array.from(this.host.querySelectorAll('[slot="section"]')),this.hasItems=this.items.length>0,this.setItemsA11yAttrs()}onLabelSlotChange(t){const e=t.target.assignedElements()[0];e.dataset.text=null==e?void 0:e.textContent}onLabelClick(){this.toggle(),this.setFocus()}onLabelKeydown(t){t.key!==a.ENTER&&t.key!==a.SPACE||(t.preventDefault(),t.stopPropagation(),this.toggle(),this.open&&this.focustFirstItem())}moveFocus(t,e){t.tabIndex=0,setTimeout((()=>{t.focus()}),100),e&&(e.tabIndex=-1)}focustFirstItem(){this.moveFocus(this.items[0])}async focusLastItem(){this.moveFocus(this.items[this.items.length-1])}async setFocus(){this.htmlTabindex=0,setTimeout((()=>{this.label.focus()}),100)}onOpenChange(){this.open?this.opened.emit():(this.setItemsA11yAttrs(),this.closed.emit())}onTabindexChange(){this.label&&(this.label.tabIndex=this.htmlTabindex)}onItemsKeydown(t){switch(t.key){case a.ESC:case a.ARROW_LEFT:if(!this.open)break;t.preventDefault(),t.stopPropagation(),this.moveFocus(this.label,this.focusableItem),this.open=!1;break;case a.ARROW_RIGHT:if(this.open)break;t.preventDefault(),t.stopPropagation(),this.open=!0,this.focustFirstItem();break;case a.ARROW_DOWN:{if(!this.open)break;if(document.activeElement===this.host){t.preventDefault(),t.stopPropagation(),this.focustFirstItem();break}const e=this.items.indexOf(this.focusableItem),s=this.items[e+1];s?(t.preventDefault(),t.stopPropagation(),this.moveFocus(s,this.focusableItem)):(this.htmlTabindex=0,this.focusableItem.tabIndex=-1);break}case a.ARROW_UP:{if(!this.open||document.activeElement===this.host)break;const e=this.items.indexOf(this.focusableItem),s=this.items[e-1];t.preventDefault(),t.stopPropagation(),s?this.moveFocus(s,this.focusableItem):(this.focusableItem.tabIndex=-1,this.setFocus());break}}}constructor(s){t(this,s),this.opened=e(this,"opened",7),this.closed=e(this,"closed",7),this.htmlTabindex=-1,this.toggle=this.toggle.bind(this),this.onItemsChange=this.onItemsChange.bind(this),this.onLabelSlotChange=this.onLabelSlotChange.bind(this),this.onLabelClick=this.onLabelClick.bind(this),this.onLabelKeydown=this.onLabelKeydown.bind(this),this.onItemsKeydown=this.onItemsKeydown.bind(this)}connectedCallback(){this.onItemsChange()}render(){return s(i,{key:"4e6388d5919ca9010c78ef35df6b1c0b807d2dd6",open:this.open},s("button",{key:"4093e9a7ce5cb5cf63ca7012bb44c7b49b638e90",ref:t=>this.label=t,class:"label","aria-haspopup":`${!!this.hasItems}`,"aria-expanded":`${!!this.open}`,role:"menuitem",tabindex:this.htmlTabindex,onClick:this.onLabelClick,onKeyDown:this.onLabelKeydown},s("slot",{key:"0c88383d5be4c81aee5a78f89e4706a6b167dccb",onSlotchange:this.onLabelSlotChange}),this.hasItems&&s("z-icon",{key:"d32c9dc28048a6d7441075da41cb2f255e5bdc73",name:this.open?"chevron-up":"chevron-down"})),s("div",{key:"0c24a7122314391262e640b440f87dce632eb2f3",class:"items",role:"menu",hidden:!this.open},s("slot",{key:"fe79aa30aaa7d3a92621c6725e4d0ddca604726e",name:"section",onSlotchange:this.onItemsChange})))}get host(){return o(this)}static get watchers(){return{open:[{onOpenChange:0}],htmlTabindex:[{onTabindexChange:0}]}}};n.style=':host{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:0;font-family:var(--font-family-sans)}:host,::slotted(*),*{box-sizing:border-box}::slotted(a){text-decoration:none}::slotted(*){color:var(--color-default-text);font-family:var(--font-family-sans);font-weight:var(--font-rg)}.label{display:flex;width:100%;align-items:center;padding:var(--space-unit) 0;border:0;border-bottom:var(--border-size-small) solid var(--color-surface03);margin:0;background:transparent;border-radius:0;cursor:pointer;text-align:left}:host(:last-child:not([open])) .label{border-bottom:none}:host(:is([active],[open])) .label,.label:focus:focus-visible,.label:hover{border-color:var(--color-primary01)}.label:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}:host(:is([active],[open])) .label ::slotted(*),.label:focus:focus-visible ::slotted(*),.label:hover ::slotted(*){font-weight:var(--font-bd)}::slotted([data-text]){display:inline-flex;flex-direction:column}::slotted([data-text])::after{overflow:hidden;height:0;content:attr(data-text);content:attr(data-text) / "";font-weight:var(--font-bd);pointer-events:none;user-select:none;visibility:hidden}@media speech{::slotted([data-text])::after{display:none}}.label ::slotted(*){width:100%;margin:0;font-size:var(--font-size-3);line-height:1.5}.label z-icon{margin-left:calc(var(--space-unit) * 4);fill:var(--color-default-icon)}.items{display:flex;width:100%;flex-direction:column;padding:calc(var(--space-unit) / 2);padding-bottom:calc(var(--space-unit) * 1.5)}.items[hidden]{display:none}::slotted([slot="section"]){display:inline-flex;padding:calc(var(--space-unit) / 2);margin:0;font-size:var(--font-size-1);line-height:1.333;outline:none}::slotted([slot="section"]:last-of-type){border:none}::slotted([slot="section"]:focus:focus-visible){box-shadow:var(--shadow-focus-primary);color:var(--color-primary01)}::slotted([slot="section"]:hover),::slotted([slot="section"]:focus:focus-visible),::slotted([slot="section"]:active),::slotted([slot="section"][active]),::slotted([slot="section"][data-active]){color:var(--color-primary01);font-weight:var(--font-bd)}';export{n as z_menu_section}
1
+ import{r as t,c as e,h as s,H as i,d as o}from"./p-DPdXlnVe.js";import{g as a}from"./p-BKCj6NR2.js";const n=class{get focusableItem(){return this.items.find((({tabIndex:t})=>0===t))}toggle(){this.hasItems&&(this.open=!this.open)}setItemsA11yAttrs(){this.hasItems&&this.items.forEach((t=>{t.setAttribute("role","menuitem"),t.tabIndex=-1}))}onItemsChange(){this.items=Array.from(this.host.querySelectorAll('[slot="section"]')),this.hasItems=this.items.length>0,this.setItemsA11yAttrs()}onLabelSlotChange(t){const e=t.target.assignedElements()[0];e.dataset.text=null==e?void 0:e.textContent}onLabelClick(){this.toggle(),this.setFocus()}onLabelKeydown(t){t.key!==a.ENTER&&t.key!==a.SPACE||(t.preventDefault(),t.stopPropagation(),this.toggle(),this.open&&this.focustFirstItem())}moveFocus(t,e){t.tabIndex=0,setTimeout((()=>{t.focus()}),100),e&&(e.tabIndex=-1)}focustFirstItem(){this.moveFocus(this.items[0])}async focusLastItem(){this.moveFocus(this.items[this.items.length-1])}async setFocus(){this.htmlTabindex=0,setTimeout((()=>{this.label.focus()}),100)}onOpenChange(){this.open?this.opened.emit():(this.setItemsA11yAttrs(),this.closed.emit())}onTabindexChange(){this.label&&(this.label.tabIndex=this.htmlTabindex)}onItemsKeydown(t){switch(t.key){case a.ESC:case a.ARROW_LEFT:if(!this.open)break;t.preventDefault(),t.stopPropagation(),this.moveFocus(this.label,this.focusableItem),this.open=!1;break;case a.ARROW_RIGHT:if(this.open)break;t.preventDefault(),t.stopPropagation(),this.open=!0,this.focustFirstItem();break;case a.ARROW_DOWN:{if(!this.open)break;if(document.activeElement===this.host){t.preventDefault(),t.stopPropagation(),this.focustFirstItem();break}const e=this.items.indexOf(this.focusableItem),s=this.items[e+1];s?(t.preventDefault(),t.stopPropagation(),this.moveFocus(s,this.focusableItem)):(this.htmlTabindex=0,this.focusableItem.tabIndex=-1);break}case a.ARROW_UP:{if(!this.open||document.activeElement===this.host)break;const e=this.items.indexOf(this.focusableItem),s=this.items[e-1];t.preventDefault(),t.stopPropagation(),s?this.moveFocus(s,this.focusableItem):(this.focusableItem.tabIndex=-1,this.setFocus());break}}}constructor(s){t(this,s),this.opened=e(this,"opened",7),this.closed=e(this,"closed",7),this.htmlTabindex=-1,this.toggle=this.toggle.bind(this),this.onItemsChange=this.onItemsChange.bind(this),this.onLabelSlotChange=this.onLabelSlotChange.bind(this),this.onLabelClick=this.onLabelClick.bind(this),this.onLabelKeydown=this.onLabelKeydown.bind(this),this.onItemsKeydown=this.onItemsKeydown.bind(this)}connectedCallback(){this.onItemsChange()}render(){return s(i,{key:"4e6388d5919ca9010c78ef35df6b1c0b807d2dd6",open:this.open},s("button",{key:"4093e9a7ce5cb5cf63ca7012bb44c7b49b638e90",ref:t=>this.label=t,class:"label","aria-haspopup":`${!!this.hasItems}`,"aria-expanded":`${!!this.open}`,role:"menuitem",tabindex:this.htmlTabindex,onClick:this.onLabelClick,onKeyDown:this.onLabelKeydown},s("slot",{key:"0c88383d5be4c81aee5a78f89e4706a6b167dccb",onSlotchange:this.onLabelSlotChange}),this.hasItems&&s("z-icon",{key:"d32c9dc28048a6d7441075da41cb2f255e5bdc73",name:this.open?"chevron-up":"chevron-down"})),s("div",{key:"0c24a7122314391262e640b440f87dce632eb2f3",class:"items",role:"menu",hidden:!this.open},s("slot",{key:"fe79aa30aaa7d3a92621c6725e4d0ddca604726e",name:"section",onSlotchange:this.onItemsChange})))}get host(){return o(this)}static get watchers(){return{open:[{onOpenChange:0}],htmlTabindex:[{onTabindexChange:0}]}}};n.style=':host{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:0;font-family:var(--font-family-sans)}:host,::slotted(*),*{box-sizing:border-box}::slotted(a){text-decoration:none}::slotted(*){color:var(--color-default-text);font-family:var(--font-family-sans);font-weight:var(--font-rg)}.label{display:flex;width:100%;align-items:center;padding:var(--space-unit) 0;border:0;border-bottom:var(--border-size-small) solid var(--color-surface03);margin:0;background:transparent;border-radius:0;cursor:pointer;text-align:left}:host(:last-child:not([open])) .label{border-bottom:none}:host(:is([active],[open])) .label,.label:focus:focus-visible,.label:hover{border-color:var(--color-primary01)}.label:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}:host(:is([active],[open])) .label ::slotted(*),.label:focus:focus-visible ::slotted(*),.label:hover ::slotted(*){font-weight:var(--font-bd)}::slotted([data-text]){display:inline-flex;flex-direction:column}::slotted([data-text])::after{overflow:hidden;height:0;content:attr(data-text);content:attr(data-text) / "";font-weight:var(--font-bd);pointer-events:none;user-select:none;visibility:hidden}@media speech{::slotted([data-text])::after{display:none}}.label ::slotted(*){width:100%;margin:0;font-size:var(--font-size-3);line-height:1.5}.label z-icon{margin-left:calc(var(--space-unit) * 4);fill:var(--color-default-icon)}.items{display:flex;width:100%;flex-direction:column;padding:calc(var(--space-unit) / 2);padding-bottom:calc(var(--space-unit) * 1.5)}.items[hidden]{display:none}::slotted([slot="section"]){display:inline-flex;padding:calc(var(--space-unit) / 2);margin:0;font-size:var(--font-size-1);line-height:1.333;outline:none}::slotted([slot="section"]:last-of-type){border:none}::slotted([slot="section"]:focus:focus-visible){box-shadow:var(--shadow-focus-primary);color:var(--color-primary01)}::slotted([slot="section"]:hover),::slotted([slot="section"]:focus:focus-visible),::slotted([slot="section"]:active),::slotted([slot="section"][active]),::slotted([slot="section"][data-active]){color:var(--color-primary01);font-weight:var(--font-bd)}';export{n as z_menu_section}
@@ -1 +1 @@
1
- import{r as i,c as e,h as s,H as a,d as t}from"./p-ByN2sYu6.js";import{v as l}from"./p-BKCj6NR2.js";const o=class{constructor(s){i(this,s),this.fileInput=e(this,"fileInput",7),this.fileError=e(this,"fileError",7),this.type=l.DEFAULT,this.uploadBtnLabel="allega",this.dragAndDropLabel="Rilascia i file in questa area per allegarli.",this.uploadClickableMessage="Carica",this.uploadMessage="o trascina dal tuo computer",this.errorModalTitle="Errore di caricamento",this.uploadedFilesLabel="File appena caricati",this.hasFileSection=!0,this.inputName="z-file-upload",this.showErrors=!0,this._type=this.type,this.files=[],this.invalidFiles=new Map}onFileRemoved(i){this.removeFile(i.detail.fileName)}fileDroppedListener(i){this.input.files=i.detail,this.checkFilesValidity(this.input.files)}async getFiles(){return this.files}async removeFile(i){const e=this.files,s=e.findIndex((e=>e.name===i));s>=0&&(e.splice(s,1),this.files=[...e])}checkFilesValidity(i){i.length&&Array.from(i).forEach((i=>{const e=i.size/1024/1024,s=this.acceptedFormat.split(",").some((e=>i.name.toLowerCase().endsWith(e.trim()))),a=e<=this.fileMaxSize;if(a&&s&&!this.files.find((e=>e.name===i.name)))return this.files=[...this.files,i],this.fileInput.emit(i),void(this.input.value="");const t=[!a&&{cause:"size",message:`Il file ${i.name} supera il limite di ${this.fileMaxSize}MB`},!s&&{cause:"format",message:`Il file ${i.name} ha un formato non supportato`}].filter(Boolean);this.invalidFiles.set(i.name,t),this.invalidFiles=new Map(this.invalidFiles),this.fileError.emit({file:i.name,errors:t})}))}resetErrors(){this.invalidFiles=new Map}onFilesChange(i){this.checkFilesValidity(i.target.files)}componentWillLoad(){const i=window.matchMedia("(max-width: 1151px)");this._type=i.matches?l.DEFAULT:this.type,i.addEventListener("change",(i=>{this._type=i.matches?l.DEFAULT:this.type}))}componentDidUpdate(){this.showErrors&&this.invalidFiles.size&&this.errorModal.open()}renderDescription(i){if(this.description)return s("span",{id:"description",class:i},this.description)}renderAllowedFilesMessage(){let i="",e="";this.acceptedFormat&&(i=` nei formati ${this.acceptedFormat.split(", ").map((i=>i.substring(1).toUpperCase())).join(", ")}`),this.fileMaxSize&&(e=` per un massimo di ${this.fileMaxSize}MB di peso`);const a=i||e?`Puoi allegare file${i}${e}.`:void 0;if(this.allowedFilesMessage||a)return s("span",{class:"allowed-files-message body-3"},this.allowedFilesMessage||a)}renderFileSection(){if(this.hasFileSection)return s("section",{class:{"files-container":!0,hidden:!this.files.length}},s("div",{class:"uploaded-files-label heading-3-sb"},this.uploadedFilesLabel),s("div",{class:"files-wrapper"},s("slot",{name:"files"})))}renderInput(){return s("input",{type:"file",name:this.inputName,multiple:!0,onChange:i=>this.onFilesChange(i),accept:this.acceptedFormat,ref:i=>this.input=i})}renderUploadButton(){return[s("z-button",{onClick:()=>this.input.click(),onKeyPress:i=>{"Space"!=i.code&&"Enter"!=i.code||(i.preventDefault(),this.input.click())},id:"fileSelect",variant:this.buttonVariant,icon:"upload"},this.uploadBtnLabel),this.renderInput()]}renderUploadLink(){return[this.renderInput(),s("span",{class:"body-1 upload-link-text"},s("span",{tabIndex:0,class:"body-1-sb upload-link",onClick:()=>this.input.click(),onKeyPress:i=>{"Space"!=i.code&&"Enter"!=i.code||(i.preventDefault(),this.input.click())}},this.uploadClickableMessage)," ",this.uploadMessage)]}renderDefaultMode(){return[this.renderDescription("body-3-sb"),this.renderAllowedFilesMessage(),this.renderFileSection(),this.renderUploadButton()]}renderDragDropMode(){return[this.renderFileSection(),s("z-dragdrop-area",{"drag-and-drop-label":this.dragAndDropLabel},s("div",{class:"text-container"},this.renderDescription("body-1"),this.renderUploadLink(),this.renderAllowedFilesMessage()))]}renderFileErrors(){return Array.from(this.invalidFiles).map((([i,e])=>{const a=`Il file ${i}`;return s("span",{class:"error-message"},"Il file ",s("span",{class:"body-3-sb"},i),e.map((({message:i})=>i.replace(a,""))).join(" e "),".")}))}render(){return s(a,{key:"9f2aeeeb12f48f34a732137c809c48c23d6a190e"},this.mainTitle&&s("div",{key:"63924f49200a966ed3e7244c685ae9df6eeefbc1",id:"title",class:"heading-3-sb"},this.mainTitle),this._type==l.DEFAULT?this.renderDefaultMode():this.renderDragDropMode(),!!this.invalidFiles.size&&this.showErrors&&s("z-modal",{key:"e3c015962d22df4c1d769d6177417bbf8d6bcc93",modalid:`file-upload-${this.type}-error-modal`,ref:i=>this.errorModal=i,modaltitle:this.errorModalTitle,onModalClose:()=>this.resetErrors(),onModalBackgroundClick:()=>this.resetErrors()},s("div",{key:"0cc1b6a3a952e1e683a70b952af131b74e7021e0",slot:"modalContent"},s("div",{key:"833875c9ffe28ad248a4cacd7249153c7230df0a",class:"modal-wrapper body-3"},this.errorModalMessage?this.errorModalMessage:this.renderFileErrors()))))}get host(){return t(this)}};o.style='.sc-z-file-upload-h{display:flex;flex-direction:column;align-items:flex-start;color:var(--color-default-text);font-family:var(--font-family-sans);font-weight:var(--font-rg)}.sc-z-file-upload-h .modal-wrapper.sc-z-file-upload{display:flex;flex-direction:column;justify-content:center;padding:calc(var(--space-unit) * 2);row-gap:calc(var(--space-unit) * 2)}.sc-z-file-upload-h .modal-wrapper.sc-z-file-upload>.files-wrapper.sc-z-file-upload{display:flex;flex-direction:column;margin:calc(var(--space-unit) * 4);gap:var(--space-unit)}.sc-z-file-upload-h .text-container.sc-z-file-upload{display:flex;flex-direction:column;margin:auto;text-align:center}.sc-z-file-upload-h .text-container.sc-z-file-upload .upload-link.sc-z-file-upload{color:var(--color-text-link-blue);cursor:pointer;text-decoration:underline}.sc-z-file-upload-h .text-container.sc-z-file-upload .upload-link.sc-z-file-upload:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none !important}.sc-z-file-upload-h .text-container.sc-z-file-upload .upload-link-text.sc-z-file-upload{margin-bottom:var(--space-unit)}.sc-z-file-upload-h input[type="file"].sc-z-file-upload{display:none}.sc-z-file-upload-h #title.sc-z-file-upload+#description.sc-z-file-upload{margin-top:var(--space-unit)}.sc-z-file-upload-h>*.sc-z-file-upload+z-button.sc-z-file-upload,.sc-z-file-upload-h>.files-container.sc-z-file-upload+*.sc-z-file-upload,.sc-z-file-upload-h>.files-container.sc-z-file-upload:not(:first-child){margin-top:calc(var(--space-unit) * 3)}.sc-z-file-upload-h>.files-container.hidden.sc-z-file-upload{display:none}.sc-z-file-upload-h>.files-container.sc-z-file-upload>.uploaded-files-label.sc-z-file-upload{margin-bottom:calc(var(--space-unit) * 2)}.sc-z-file-upload-h>.files-container.sc-z-file-upload>.files-wrapper.sc-z-file-upload{display:flex;flex-wrap:wrap;column-gap:calc(var(--space-unit) * 2);row-gap:calc(var(--space-unit) * 2)}@media (min-width: 768px){.sc-z-file-upload-h>.container.sc-z-file-upload>z-button.sc-z-file-upload{align-self:flex-start}.sc-z-file-upload-h .modal-wrapper.sc-z-file-upload{padding:calc(var(--space-unit) * 3)}}@media (min-width: 1152px){.sc-z-file-upload-h .modal-wrapper.sc-z-file-upload{padding:calc(var(--space-unit) * 4)}}';export{o as z_file_upload}
1
+ import{r as i,c as e,h as s,H as a,d as t}from"./p-DPdXlnVe.js";import{v as l}from"./p-BKCj6NR2.js";const o=class{constructor(s){i(this,s),this.fileInput=e(this,"fileInput",7),this.fileError=e(this,"fileError",7),this.type=l.DEFAULT,this.uploadBtnLabel="allega",this.dragAndDropLabel="Rilascia i file in questa area per allegarli.",this.uploadClickableMessage="Carica",this.uploadMessage="o trascina dal tuo computer",this.errorModalTitle="Errore di caricamento",this.uploadedFilesLabel="File appena caricati",this.hasFileSection=!0,this.inputName="z-file-upload",this.showErrors=!0,this._type=this.type,this.files=[],this.invalidFiles=new Map}onFileRemoved(i){this.removeFile(i.detail.fileName)}fileDroppedListener(i){this.input.files=i.detail,this.checkFilesValidity(this.input.files)}async getFiles(){return this.files}async removeFile(i){const e=this.files,s=e.findIndex((e=>e.name===i));s>=0&&(e.splice(s,1),this.files=[...e])}checkFilesValidity(i){i.length&&Array.from(i).forEach((i=>{const e=i.size/1024/1024,s=this.acceptedFormat.split(",").some((e=>i.name.toLowerCase().endsWith(e.trim()))),a=e<=this.fileMaxSize;if(a&&s&&!this.files.find((e=>e.name===i.name)))return this.files=[...this.files,i],this.fileInput.emit(i),void(this.input.value="");const t=[!a&&{cause:"size",message:`Il file ${i.name} supera il limite di ${this.fileMaxSize}MB`},!s&&{cause:"format",message:`Il file ${i.name} ha un formato non supportato`}].filter(Boolean);this.invalidFiles.set(i.name,t),this.invalidFiles=new Map(this.invalidFiles),this.fileError.emit({file:i.name,errors:t})}))}resetErrors(){this.invalidFiles=new Map}onFilesChange(i){this.checkFilesValidity(i.target.files)}componentWillLoad(){const i=window.matchMedia("(max-width: 1151px)");this._type=i.matches?l.DEFAULT:this.type,i.addEventListener("change",(i=>{this._type=i.matches?l.DEFAULT:this.type}))}componentDidUpdate(){this.showErrors&&this.invalidFiles.size&&this.errorModal.open()}renderDescription(i){if(this.description)return s("span",{id:"description",class:i},this.description)}renderAllowedFilesMessage(){let i="",e="";this.acceptedFormat&&(i=` nei formati ${this.acceptedFormat.split(", ").map((i=>i.substring(1).toUpperCase())).join(", ")}`),this.fileMaxSize&&(e=` per un massimo di ${this.fileMaxSize}MB di peso`);const a=i||e?`Puoi allegare file${i}${e}.`:void 0;if(this.allowedFilesMessage||a)return s("span",{class:"allowed-files-message body-3"},this.allowedFilesMessage||a)}renderFileSection(){if(this.hasFileSection)return s("section",{class:{"files-container":!0,hidden:!this.files.length}},s("div",{class:"uploaded-files-label heading-3-sb"},this.uploadedFilesLabel),s("div",{class:"files-wrapper"},s("slot",{name:"files"})))}renderInput(){return s("input",{type:"file",name:this.inputName,multiple:!0,onChange:i=>this.onFilesChange(i),accept:this.acceptedFormat,ref:i=>this.input=i})}renderUploadButton(){return[s("z-button",{onClick:()=>this.input.click(),onKeyPress:i=>{"Space"!=i.code&&"Enter"!=i.code||(i.preventDefault(),this.input.click())},id:"fileSelect",variant:this.buttonVariant,icon:"upload"},this.uploadBtnLabel),this.renderInput()]}renderUploadLink(){return[this.renderInput(),s("span",{class:"body-1 upload-link-text"},s("span",{tabIndex:0,class:"body-1-sb upload-link",onClick:()=>this.input.click(),onKeyPress:i=>{"Space"!=i.code&&"Enter"!=i.code||(i.preventDefault(),this.input.click())}},this.uploadClickableMessage)," ",this.uploadMessage)]}renderDefaultMode(){return[this.renderDescription("body-3-sb"),this.renderAllowedFilesMessage(),this.renderFileSection(),this.renderUploadButton()]}renderDragDropMode(){return[this.renderFileSection(),s("z-dragdrop-area",{"drag-and-drop-label":this.dragAndDropLabel},s("div",{class:"text-container"},this.renderDescription("body-1"),this.renderUploadLink(),this.renderAllowedFilesMessage()))]}renderFileErrors(){return Array.from(this.invalidFiles).map((([i,e])=>{const a=`Il file ${i}`;return s("span",{class:"error-message"},"Il file ",s("span",{class:"body-3-sb"},i),e.map((({message:i})=>i.replace(a,""))).join(" e "),".")}))}render(){return s(a,{key:"9f2aeeeb12f48f34a732137c809c48c23d6a190e"},this.mainTitle&&s("div",{key:"63924f49200a966ed3e7244c685ae9df6eeefbc1",id:"title",class:"heading-3-sb"},this.mainTitle),this._type==l.DEFAULT?this.renderDefaultMode():this.renderDragDropMode(),!!this.invalidFiles.size&&this.showErrors&&s("z-modal",{key:"e3c015962d22df4c1d769d6177417bbf8d6bcc93",modalid:`file-upload-${this.type}-error-modal`,ref:i=>this.errorModal=i,modaltitle:this.errorModalTitle,onModalClose:()=>this.resetErrors(),onModalBackgroundClick:()=>this.resetErrors()},s("div",{key:"0cc1b6a3a952e1e683a70b952af131b74e7021e0",slot:"modalContent"},s("div",{key:"833875c9ffe28ad248a4cacd7249153c7230df0a",class:"modal-wrapper body-3"},this.errorModalMessage?this.errorModalMessage:this.renderFileErrors()))))}get host(){return t(this)}};o.style='.sc-z-file-upload-h{display:flex;flex-direction:column;align-items:flex-start;color:var(--color-default-text);font-family:var(--font-family-sans);font-weight:var(--font-rg)}.sc-z-file-upload-h .modal-wrapper.sc-z-file-upload{display:flex;flex-direction:column;justify-content:center;padding:calc(var(--space-unit) * 2);row-gap:calc(var(--space-unit) * 2)}.sc-z-file-upload-h .modal-wrapper.sc-z-file-upload>.files-wrapper.sc-z-file-upload{display:flex;flex-direction:column;margin:calc(var(--space-unit) * 4);gap:var(--space-unit)}.sc-z-file-upload-h .text-container.sc-z-file-upload{display:flex;flex-direction:column;margin:auto;text-align:center}.sc-z-file-upload-h .text-container.sc-z-file-upload .upload-link.sc-z-file-upload{color:var(--color-text-link-blue);cursor:pointer;text-decoration:underline}.sc-z-file-upload-h .text-container.sc-z-file-upload .upload-link.sc-z-file-upload:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none !important}.sc-z-file-upload-h .text-container.sc-z-file-upload .upload-link-text.sc-z-file-upload{margin-bottom:var(--space-unit)}.sc-z-file-upload-h input[type="file"].sc-z-file-upload{display:none}.sc-z-file-upload-h #title.sc-z-file-upload+#description.sc-z-file-upload{margin-top:var(--space-unit)}.sc-z-file-upload-h>*.sc-z-file-upload+z-button.sc-z-file-upload,.sc-z-file-upload-h>.files-container.sc-z-file-upload+*.sc-z-file-upload,.sc-z-file-upload-h>.files-container.sc-z-file-upload:not(:first-child){margin-top:calc(var(--space-unit) * 3)}.sc-z-file-upload-h>.files-container.hidden.sc-z-file-upload{display:none}.sc-z-file-upload-h>.files-container.sc-z-file-upload>.uploaded-files-label.sc-z-file-upload{margin-bottom:calc(var(--space-unit) * 2)}.sc-z-file-upload-h>.files-container.sc-z-file-upload>.files-wrapper.sc-z-file-upload{display:flex;flex-wrap:wrap;column-gap:calc(var(--space-unit) * 2);row-gap:calc(var(--space-unit) * 2)}@media (min-width: 768px){.sc-z-file-upload-h>.container.sc-z-file-upload>z-button.sc-z-file-upload{align-self:flex-start}.sc-z-file-upload-h .modal-wrapper.sc-z-file-upload{padding:calc(var(--space-unit) * 3)}}@media (min-width: 1152px){.sc-z-file-upload-h .modal-wrapper.sc-z-file-upload{padding:calc(var(--space-unit) * 4)}}';export{o as z_file_upload}
@@ -1 +1 @@
1
- import{p as t,g as r}from"./p-BKCj6NR2.js";import{B as n}from"./p-Q-tWjk7P.js";function e(t){switch(t){case!0:case"true":case 1:case"1":case"on":case"yes":return!0;case!1:case"false":case 0:case"0":case"off":case"no":return!1;default:return t}}function a(){return Math.random().toString(36).replace("0.","")}function s(t,n,...e){t.code!==r.ENTER&&t.code!==r.SPACE||(t.preventDefault(),n(...e))}function c(t,n,...e){t.code===r.ENTER&&(t.preventDefault(),n(...e))}function o(t=null){return t||(t=document.activeElement),t&&t.shadowRoot&&t.shadowRoot.activeElement?o(t=t.shadowRoot.activeElement):t}function i(t,r=[]){return r.push(t),t.parentElement?i(t=t.parentElement,r):t.parentNode&&t.parentNode.host?i(t=t.parentNode.host,r):r}function u(){switch(!0){case window.innerWidth<=n.MOBILE:return t.MOBILE;case window.innerWidth<=n.TABLET:return t.TABLET;case window.innerWidth<=n.DESKTOP:return t.DESKTOP;default:return t.DESKTOP_WIDE}}function f(t){try{return JSON.parse(t)}catch(t){return!1}}function l(t){const r=Math.ceil(2**31-1)*parseFloat(`0.${t}`);let n=Math.ceil(r%1*19);return 0===n&&(n=1),`avatar-C${n.toString().padStart(2,"0")}`}function d(t,r){var n;if(t.contains(r)||(null===(n=t.shadowRoot)||void 0===n?void 0:n.contains(r)))return!0;const e=t=>{if(t===r)return!0;const n=t.shadowRoot;if(!n)return Array.from(t.childNodes).some(e);if(n.contains(r))return!0;const a=Array.from(n.querySelectorAll("slot")).some((t=>t.assignedNodes({flatten:!0}).some((t=>{var n,a;return(null===(a=(n=t).contains)||void 0===a?void 0:a.call(n,r))||e(t)}))));return!!a||Array.from(n.children).some(e)||Array.from(t.childNodes).some(e)};return e(t)}function w(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentElement}function h(t,r){const n=t.getBoundingClientRect(),e=n.bottom>0&&n.top<t.ownerDocument.documentElement.clientHeight&&n.right>0&&n.left<t.ownerDocument.documentElement.clientWidth;if(r===t.ownerDocument.documentElement||r===t.ownerDocument.body)return e;const a=r.getBoundingClientRect();return n.bottom>a.top&&n.top<a.bottom&&n.right>a.left&&n.left<a.right&&e}function p(t){let r=w(t);const n=window.getComputedStyle(t).position;for(;r&&r!==t.ownerDocument.documentElement;){const t=window.getComputedStyle(r);switch(n){case"fixed":{const n=["filter","transform","translate","perspective","scale","rotate","backdrop-filter"];if(n.some((r=>"none"!==t.getPropertyValue(r)))||n.some((r=>t.getPropertyValue("will-change").includes(r))))return r;break}case"absolute":if("static"!==t.position)return r;break;case"relative":case"sticky":case"static":{const t=window.getComputedStyle(r).display;if("block"===t||"flex"===t||"grid"===t||"table"===t||"flow-root"===t||"inline-block"===t||"inline-flex"===t||"inline-grid"===t)return r;break}}r=w(r)}return t.ownerDocument.documentElement}const b=t=>(new DOMParser).parseFromString(t,"text/html").body.textContent||"";export{d as a,b,l as c,e as d,o as e,i as f,u as g,s as h,f as i,w as j,p as k,h as l,c as m,a as r}
1
+ import{g as t,p as r}from"./p-BKCj6NR2.js";import{B as n}from"./p-Q-tWjk7P.js";function e(t){switch(t){case!0:case"true":case 1:case"1":case"on":case"yes":return!0;case!1:case"false":case 0:case"0":case"off":case"no":return!1;default:return t}}function a(){return Math.random().toString(36).replace("0.","")}function s(r,n,...e){r.code!==t.ENTER&&r.code!==t.SPACE||(r.preventDefault(),n(...e))}function c(r,n,...e){r.code===t.ENTER&&(r.preventDefault(),n(...e))}function o(t=null){return t||(t=document.activeElement),t&&t.shadowRoot&&t.shadowRoot.activeElement?o(t=t.shadowRoot.activeElement):t}function i(t,r=[]){return r.push(t),t.parentElement?i(t=t.parentElement,r):t.parentNode&&t.parentNode.host?i(t=t.parentNode.host,r):r}function u(){switch(!0){case window.innerWidth<=n.MOBILE:return r.MOBILE;case window.innerWidth<=n.TABLET:return r.TABLET;case window.innerWidth<=n.DESKTOP:return r.DESKTOP;default:return r.DESKTOP_WIDE}}function f(t){try{return JSON.parse(t)}catch(t){return!1}}function l(t){const r=Math.ceil(2**31-1)*parseFloat(`0.${t}`);let n=Math.ceil(r%1*19);return 0===n&&(n=1),`avatar-C${n.toString().padStart(2,"0")}`}function d(t,r){var n;if(t.contains(r)||(null===(n=t.shadowRoot)||void 0===n?void 0:n.contains(r)))return!0;const e=t=>{if(t===r)return!0;const n=t.shadowRoot;if(!n)return Array.from(t.childNodes).some(e);if(n.contains(r))return!0;const a=Array.from(n.querySelectorAll("slot")).some((t=>t.assignedNodes({flatten:!0}).some((t=>{var n,a;return(null===(a=(n=t).contains)||void 0===a?void 0:a.call(n,r))||e(t)}))));return!!a||Array.from(n.children).some(e)||Array.from(t.childNodes).some(e)};return e(t)}function w(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentElement}function h(t,r){const n=t.getBoundingClientRect(),e=n.bottom>0&&n.top<t.ownerDocument.documentElement.clientHeight&&n.right>0&&n.left<t.ownerDocument.documentElement.clientWidth;if(r===t.ownerDocument.documentElement||r===t.ownerDocument.body)return e;const a=r.getBoundingClientRect();return n.bottom>a.top&&n.top<a.bottom&&n.right>a.left&&n.left<a.right&&e}function p(t){let r=w(t);const n=window.getComputedStyle(t).position;for(;r&&r!==t.ownerDocument.documentElement;){const t=window.getComputedStyle(r);switch(n){case"fixed":{const n=["filter","transform","translate","perspective","scale","rotate","backdrop-filter"];if(n.some((r=>"none"!==t.getPropertyValue(r)))||n.some((r=>t.getPropertyValue("will-change").includes(r))))return r;break}case"absolute":if("static"!==t.position)return r;break;case"relative":case"sticky":case"static":{const t=window.getComputedStyle(r).display;if("block"===t||"flex"===t||"grid"===t||"table"===t||"flow-root"===t||"inline-block"===t||"inline-flex"===t||"inline-grid"===t)return r;break}}r=w(r)}return t.ownerDocument.documentElement}const b=t=>(new DOMParser).parseFromString(t,"text/html").body.textContent||"";export{d as a,b,l as c,e as d,o as e,i as f,u as g,s as h,f as i,w as j,p as k,h as l,c as m,a as r}