@zanichelli/albe-web-components 20.0.1 → 20.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (417) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/z-accordion.cjs.entry.js +1 -1
  3. package/dist/cjs/z-anchor-navigation.cjs.entry.js +1 -1
  4. package/dist/cjs/z-app-header_12.cjs.entry.js +19 -16
  5. package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
  6. package/dist/cjs/z-aria-alert.cjs.entry.js +1 -1
  7. package/dist/cjs/z-avatar.cjs.entry.js +2 -2
  8. package/dist/cjs/z-book-card-app.cjs.entry.js +1 -1
  9. package/dist/cjs/z-book-card.cjs.entry.js +5 -2
  10. package/dist/cjs/z-book-card.cjs.entry.js.map +1 -1
  11. package/dist/cjs/z-book-cover.cjs.entry.js +1 -1
  12. package/dist/cjs/z-breadcrumb.cjs.entry.js +2 -2
  13. package/dist/cjs/z-button-sort.cjs.entry.js +1 -1
  14. package/dist/cjs/z-chip.cjs.entry.js +2 -2
  15. package/dist/cjs/z-color-picker.cjs.entry.js +1 -1
  16. package/dist/cjs/z-combobox.cjs.entry.js +1 -1
  17. package/dist/cjs/z-cover-hero.cjs.entry.js +2 -2
  18. package/dist/cjs/z-date-picker.cjs.entry.js +1 -1
  19. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +6 -6
  20. package/dist/cjs/z-file.cjs.entry.js +1 -1
  21. package/dist/cjs/z-ghost-loading.cjs.entry.js +1 -1
  22. package/dist/cjs/z-info-box.cjs.entry.js +1 -1
  23. package/dist/cjs/z-info-reveal.cjs.entry.js +1 -1
  24. package/dist/cjs/z-input-range.cjs.entry.js +1 -1
  25. package/dist/cjs/z-logo.cjs.entry.js +1 -1
  26. package/dist/cjs/z-menu-section.cjs.entry.js +1 -1
  27. package/dist/cjs/z-navigation-tabs.cjs.entry.js +2 -2
  28. package/dist/cjs/z-notification.cjs.entry.js +1 -1
  29. package/dist/cjs/z-popover.cjs.entry.js +1 -1
  30. package/dist/cjs/z-range-picker.cjs.entry.js +3 -3
  31. package/dist/cjs/z-select.cjs.entry.js +1 -1
  32. package/dist/cjs/z-skip-to-content.cjs.entry.js +1 -1
  33. package/dist/cjs/z-stepper-item.cjs.entry.js +1 -1
  34. package/dist/cjs/z-stepper.cjs.entry.js +1 -1
  35. package/dist/cjs/z-table.cjs.entry.js +1 -1
  36. package/dist/cjs/z-tbody.cjs.entry.js +1 -1
  37. package/dist/cjs/z-td.cjs.entry.js +1 -1
  38. package/dist/cjs/z-tfoot.cjs.entry.js +1 -1
  39. package/dist/cjs/z-th.cjs.entry.js +1 -1
  40. package/dist/cjs/z-thead.cjs.entry.js +1 -1
  41. package/dist/cjs/z-toast-notification-list.cjs.entry.js +1 -1
  42. package/dist/cjs/z-toast-notification.cjs.entry.js +3 -3
  43. package/dist/cjs/z-toggle-switch.cjs.entry.js +3 -3
  44. package/dist/cjs/z-tool.cjs.entry.js +2 -2
  45. package/dist/cjs/z-toolbar.cjs.entry.js +1 -1
  46. package/dist/cjs/z-tooltip.cjs.entry.js +1 -1
  47. package/dist/cjs/z-tr.cjs.entry.js +1 -1
  48. package/dist/cjs/z-tree-list.cjs.entry.js +1 -1
  49. package/dist/cjs/z-visually-hidden.cjs.entry.js +1 -1
  50. package/dist/collection/components/book-card/z-book-card/index.js +4 -1
  51. package/dist/collection/components/book-card/z-book-card/index.js.map +1 -1
  52. package/dist/collection/components/book-card/z-book-card/styles.css +3 -7
  53. package/dist/collection/components/book-card/z-book-card-app/index.js +1 -1
  54. package/dist/collection/components/date-picker/z-date-picker/index.js +1 -1
  55. package/dist/collection/components/date-picker/z-range-picker/index.js +3 -3
  56. package/dist/collection/components/deprecated/table/cells/z-td/index.js +1 -1
  57. package/dist/collection/components/deprecated/table/cells/z-th/index.js +1 -1
  58. package/dist/collection/components/deprecated/table/z-table/index.js +1 -1
  59. package/dist/collection/components/deprecated/table/z-tbody/index.js +1 -1
  60. package/dist/collection/components/deprecated/table/z-tfoot/index.js +1 -1
  61. package/dist/collection/components/deprecated/table/z-thead/index.js +1 -1
  62. package/dist/collection/components/deprecated/table/z-tr/index.js +1 -1
  63. package/dist/collection/components/file-upload/z-dragdrop-area/index.js +2 -2
  64. package/dist/collection/components/file-upload/z-file/index.js +1 -1
  65. package/dist/collection/components/list/z-list/index.js +1 -1
  66. package/dist/collection/components/list/z-list-element/index.js +1 -1
  67. package/dist/collection/components/list/z-list-group/index.js +2 -2
  68. package/dist/collection/components/list/z-tree-list/index.js +1 -1
  69. package/dist/collection/components/z-accordion/index.js +1 -1
  70. package/dist/collection/components/z-anchor-navigation/index.js +1 -1
  71. package/dist/collection/components/z-app-header/index.js +1 -1
  72. package/dist/collection/components/z-aria-alert/index.js +1 -1
  73. package/dist/collection/components/z-avatar/index.js +2 -2
  74. package/dist/collection/components/z-book-cover/index.js +1 -1
  75. package/dist/collection/components/z-breadcrumb/index.js +2 -2
  76. package/dist/collection/components/z-button-sort/index.js +1 -1
  77. package/dist/collection/components/z-chip/index.js +2 -2
  78. package/dist/collection/components/z-color-picker/index.js +1 -1
  79. package/dist/collection/components/z-combobox/index.js +1 -1
  80. package/dist/collection/components/z-cover-hero/index.js +2 -2
  81. package/dist/collection/components/z-divider/index.js +1 -1
  82. package/dist/collection/components/z-ghost-loading/index.js +1 -1
  83. package/dist/collection/components/z-icon/index.js +1 -1
  84. package/dist/collection/components/z-info-box/index.js +1 -1
  85. package/dist/collection/components/z-info-reveal/index.js +1 -1
  86. package/dist/collection/components/z-input-message/index.js +1 -1
  87. package/dist/collection/components/z-input-range/index.js +1 -1
  88. package/dist/collection/components/z-logo/index.js +1 -1
  89. package/dist/collection/components/z-menu-section/index.js +1 -1
  90. package/dist/collection/components/z-modal/index.js +4 -4
  91. package/dist/collection/components/z-navigation-tabs/index.js +2 -2
  92. package/dist/collection/components/z-notification/index.js +1 -1
  93. package/dist/collection/components/z-offcanvas/index.js +2 -2
  94. package/dist/collection/components/z-popover/index.js +1 -1
  95. package/dist/collection/components/z-searchbar/index.js +7 -4
  96. package/dist/collection/components/z-searchbar/index.js.map +1 -1
  97. package/dist/collection/components/z-select/index.js +1 -1
  98. package/dist/collection/components/z-skip-to-content/index.js +1 -1
  99. package/dist/collection/components/z-stepper/index.js +1 -1
  100. package/dist/collection/components/z-stepper-item/index.js +1 -1
  101. package/dist/collection/components/z-tag/index.js +2 -2
  102. package/dist/collection/components/z-toast-notification/index.js +3 -3
  103. package/dist/collection/components/z-toast-notification-list/index.js +1 -1
  104. package/dist/collection/components/z-toggle-switch/index.js +3 -3
  105. package/dist/collection/components/z-tool/index.js +2 -2
  106. package/dist/collection/components/z-toolbar/index.js +1 -1
  107. package/dist/collection/components/z-tooltip/index.js +1 -1
  108. package/dist/collection/components/z-visually-hidden/index.js +1 -1
  109. package/dist/components/index10.js +1 -1
  110. package/dist/components/index11.js +1 -1
  111. package/dist/components/index12.js +1 -1
  112. package/dist/components/index12.js.map +1 -1
  113. package/dist/components/index13.js +1 -1
  114. package/dist/components/index14.js +1 -1
  115. package/dist/components/index15.js +1 -1
  116. package/dist/components/index16.js +1 -1
  117. package/dist/components/index17.js +1 -1
  118. package/dist/components/index18.js +1 -1
  119. package/dist/components/index19.js +1 -1
  120. package/dist/components/index20.js +1 -1
  121. package/dist/components/index21.js +1 -1
  122. package/dist/components/index3.js +1 -1
  123. package/dist/components/index5.js +1 -1
  124. package/dist/components/index7.js +1 -1
  125. package/dist/components/index8.js +1 -1
  126. package/dist/components/index9.js +1 -1
  127. package/dist/components/z-accordion.js +1 -1
  128. package/dist/components/z-anchor-navigation.js +1 -1
  129. package/dist/components/z-app-header.js +1 -1
  130. package/dist/components/z-aria-alert.js +1 -1
  131. package/dist/components/z-avatar.js +1 -1
  132. package/dist/components/z-book-card-app.js +1 -1
  133. package/dist/components/z-book-card.js +1 -1
  134. package/dist/components/z-book-card.js.map +1 -1
  135. package/dist/components/z-breadcrumb.js +1 -1
  136. package/dist/components/z-button-sort.js +1 -1
  137. package/dist/components/z-color-picker.js +1 -1
  138. package/dist/components/z-combobox.js +1 -1
  139. package/dist/components/z-cover-hero.js +1 -1
  140. package/dist/components/z-date-picker.js +1 -1
  141. package/dist/components/z-file.js +1 -1
  142. package/dist/components/z-info-box.js +1 -1
  143. package/dist/components/z-input-range.js +1 -1
  144. package/dist/components/z-logo.js +1 -1
  145. package/dist/components/z-menu-section.js +1 -1
  146. package/dist/components/z-navigation-tabs.js +1 -1
  147. package/dist/components/z-notification.js +1 -1
  148. package/dist/components/z-range-picker.js +1 -1
  149. package/dist/components/z-select.js +1 -1
  150. package/dist/components/z-skip-to-content.js +1 -1
  151. package/dist/components/z-stepper-item.js +1 -1
  152. package/dist/components/z-stepper.js +1 -1
  153. package/dist/components/z-table.js +1 -1
  154. package/dist/components/z-tbody.js +1 -1
  155. package/dist/components/z-td.js +1 -1
  156. package/dist/components/z-tfoot.js +1 -1
  157. package/dist/components/z-th.js +1 -1
  158. package/dist/components/z-thead.js +1 -1
  159. package/dist/components/z-toast-notification-list.js +1 -1
  160. package/dist/components/z-toast-notification.js +3 -3
  161. package/dist/components/z-toggle-switch.js +1 -1
  162. package/dist/components/z-tool.js +1 -1
  163. package/dist/components/z-toolbar.js +1 -1
  164. package/dist/components/z-tr.js +1 -1
  165. package/dist/components/z-tree-list.js +1 -1
  166. package/dist/components/z-visually-hidden.js +1 -1
  167. package/dist/esm/z-accordion.entry.js +1 -1
  168. package/dist/esm/z-anchor-navigation.entry.js +1 -1
  169. package/dist/esm/z-app-header_12.entry.js +19 -16
  170. package/dist/esm/z-app-header_12.entry.js.map +1 -1
  171. package/dist/esm/z-aria-alert.entry.js +1 -1
  172. package/dist/esm/z-avatar.entry.js +2 -2
  173. package/dist/esm/z-book-card-app.entry.js +1 -1
  174. package/dist/esm/z-book-card.entry.js +5 -2
  175. package/dist/esm/z-book-card.entry.js.map +1 -1
  176. package/dist/esm/z-book-cover.entry.js +1 -1
  177. package/dist/esm/z-breadcrumb.entry.js +2 -2
  178. package/dist/esm/z-button-sort.entry.js +1 -1
  179. package/dist/esm/z-chip.entry.js +2 -2
  180. package/dist/esm/z-color-picker.entry.js +1 -1
  181. package/dist/esm/z-combobox.entry.js +1 -1
  182. package/dist/esm/z-cover-hero.entry.js +2 -2
  183. package/dist/esm/z-date-picker.entry.js +1 -1
  184. package/dist/esm/z-dragdrop-area_2.entry.js +6 -6
  185. package/dist/esm/z-file.entry.js +1 -1
  186. package/dist/esm/z-ghost-loading.entry.js +1 -1
  187. package/dist/esm/z-info-box.entry.js +1 -1
  188. package/dist/esm/z-info-reveal.entry.js +1 -1
  189. package/dist/esm/z-input-range.entry.js +1 -1
  190. package/dist/esm/z-logo.entry.js +1 -1
  191. package/dist/esm/z-menu-section.entry.js +1 -1
  192. package/dist/esm/z-navigation-tabs.entry.js +2 -2
  193. package/dist/esm/z-notification.entry.js +1 -1
  194. package/dist/esm/z-popover.entry.js +1 -1
  195. package/dist/esm/z-range-picker.entry.js +3 -3
  196. package/dist/esm/z-select.entry.js +1 -1
  197. package/dist/esm/z-skip-to-content.entry.js +1 -1
  198. package/dist/esm/z-stepper-item.entry.js +1 -1
  199. package/dist/esm/z-stepper.entry.js +1 -1
  200. package/dist/esm/z-table.entry.js +1 -1
  201. package/dist/esm/z-tbody.entry.js +1 -1
  202. package/dist/esm/z-td.entry.js +1 -1
  203. package/dist/esm/z-tfoot.entry.js +1 -1
  204. package/dist/esm/z-th.entry.js +1 -1
  205. package/dist/esm/z-thead.entry.js +1 -1
  206. package/dist/esm/z-toast-notification-list.entry.js +1 -1
  207. package/dist/esm/z-toast-notification.entry.js +3 -3
  208. package/dist/esm/z-toggle-switch.entry.js +3 -3
  209. package/dist/esm/z-tool.entry.js +2 -2
  210. package/dist/esm/z-toolbar.entry.js +1 -1
  211. package/dist/esm/z-tooltip.entry.js +1 -1
  212. package/dist/esm/z-tr.entry.js +1 -1
  213. package/dist/esm/z-tree-list.entry.js +1 -1
  214. package/dist/esm/z-visually-hidden.entry.js +1 -1
  215. package/dist/web-components-library/{p-32bc925a.entry.js → p-059963b6.entry.js} +2 -2
  216. package/dist/web-components-library/{p-33d993fe.entry.js → p-06a196fb.entry.js} +2 -2
  217. package/{www/build/p-8c3a7bc1.entry.js → dist/web-components-library/p-08384d53.entry.js} +2 -2
  218. package/dist/web-components-library/{p-8e1363c6.entry.js → p-0fb73edd.entry.js} +2 -2
  219. package/dist/web-components-library/{p-3f787c19.entry.js → p-12305e05.entry.js} +2 -2
  220. package/{www/build/p-dfb0e8d8.entry.js → dist/web-components-library/p-1b562386.entry.js} +2 -2
  221. package/dist/web-components-library/{p-1bd296f5.entry.js → p-1fad41b2.entry.js} +2 -2
  222. package/dist/web-components-library/{p-1bd296f5.entry.js.map → p-1fad41b2.entry.js.map} +1 -1
  223. package/dist/web-components-library/{p-a1eb1dfd.entry.js → p-2780f6d9.entry.js} +2 -2
  224. package/dist/web-components-library/{p-7dbd0e3e.entry.js → p-2a74e691.entry.js} +2 -2
  225. package/dist/web-components-library/{p-1efed23b.entry.js → p-2e4db422.entry.js} +2 -2
  226. package/dist/web-components-library/{p-4f6c86ce.entry.js → p-2eaf4b9b.entry.js} +2 -2
  227. package/dist/web-components-library/{p-6ea349f6.entry.js → p-350ea24f.entry.js} +2 -2
  228. package/dist/web-components-library/{p-df5eeb75.entry.js → p-3574a17e.entry.js} +2 -2
  229. package/dist/web-components-library/{p-efe489a5.entry.js → p-41966ee6.entry.js} +2 -2
  230. package/dist/web-components-library/{p-65c404bc.entry.js → p-42cfc136.entry.js} +2 -2
  231. package/{www/build/p-89b30fce.entry.js → dist/web-components-library/p-47d4000c.entry.js} +2 -2
  232. package/dist/web-components-library/p-55693913.entry.js +2 -0
  233. package/dist/web-components-library/p-55693913.entry.js.map +1 -0
  234. package/dist/web-components-library/{p-317cbb00.entry.js → p-55c3310f.entry.js} +2 -2
  235. package/dist/web-components-library/{p-8fb3354e.entry.js → p-5ae84959.entry.js} +2 -2
  236. package/dist/web-components-library/{p-e1ab33fe.entry.js → p-633d18e9.entry.js} +2 -2
  237. package/dist/web-components-library/{p-b4e0cd5c.entry.js → p-668b9254.entry.js} +2 -2
  238. package/{www/build/p-bc9237eb.entry.js → dist/web-components-library/p-6af7c34f.entry.js} +2 -2
  239. package/{www/build/p-d6441232.entry.js → dist/web-components-library/p-781d96de.entry.js} +2 -2
  240. package/dist/web-components-library/{p-1e71577c.entry.js → p-81c949eb.entry.js} +2 -2
  241. package/dist/web-components-library/{p-2cc3ac9f.entry.js → p-87be3ccc.entry.js} +2 -2
  242. package/{www/build/p-a5187022.entry.js → dist/web-components-library/p-886382a7.entry.js} +2 -2
  243. package/{www/build/p-9ac57635.entry.js → dist/web-components-library/p-95af0156.entry.js} +2 -2
  244. package/{www/build/p-127a6dda.entry.js → dist/web-components-library/p-a4f5e7e9.entry.js} +2 -2
  245. package/{www/build/p-53943e9a.entry.js → dist/web-components-library/p-baa35a6e.entry.js} +2 -2
  246. package/dist/web-components-library/{p-1d050092.entry.js → p-bc8eec12.entry.js} +2 -2
  247. package/{www/build/p-7f37e2a2.entry.js → dist/web-components-library/p-bdd9c781.entry.js} +2 -2
  248. package/{www/build/p-6de548e3.entry.js → dist/web-components-library/p-c15267bc.entry.js} +2 -2
  249. package/dist/web-components-library/{p-303fe1d0.entry.js → p-c983da75.entry.js} +2 -2
  250. package/dist/web-components-library/p-ce98069e.entry.js +2 -0
  251. package/{www/build/p-33e973b3.entry.js.map → dist/web-components-library/p-ce98069e.entry.js.map} +1 -1
  252. package/dist/web-components-library/p-d4e212cc.entry.js +2 -0
  253. package/dist/web-components-library/{p-657802ce.entry.js.map → p-d4e212cc.entry.js.map} +1 -1
  254. package/{www/build/p-f841b50f.entry.js → dist/web-components-library/p-d4eb997c.entry.js} +2 -2
  255. package/dist/web-components-library/{p-2bd1326c.entry.js → p-deed5153.entry.js} +2 -2
  256. package/dist/web-components-library/p-e160889a.entry.js +2 -0
  257. package/dist/web-components-library/{p-2e398b4d.entry.js → p-e1d1445c.entry.js} +2 -2
  258. package/{www/build/p-6e49b67e.entry.js → dist/web-components-library/p-e2cdf19c.entry.js} +2 -2
  259. package/dist/web-components-library/p-e972b9c2.entry.js +2 -0
  260. package/{www/build/p-222898cd.entry.js → dist/web-components-library/p-ea96790b.entry.js} +3 -3
  261. package/dist/web-components-library/{p-2bebbd04.entry.js → p-ee5ff565.entry.js} +2 -2
  262. package/dist/web-components-library/{p-59651b67.entry.js → p-eea18ea6.entry.js} +2 -2
  263. package/dist/web-components-library/p-f7e11eab.entry.js +2 -0
  264. package/dist/web-components-library/{p-067411f0.entry.js → p-fdafba48.entry.js} +2 -2
  265. package/dist/web-components-library/web-components-library.esm.js +1 -1
  266. package/package.json +7 -7
  267. package/www/build/{p-32bc925a.entry.js → p-059963b6.entry.js} +2 -2
  268. package/www/build/{p-33d993fe.entry.js → p-06a196fb.entry.js} +2 -2
  269. package/{dist/web-components-library/p-8c3a7bc1.entry.js → www/build/p-08384d53.entry.js} +2 -2
  270. package/www/build/{p-8e1363c6.entry.js → p-0fb73edd.entry.js} +2 -2
  271. package/www/build/{p-3f787c19.entry.js → p-12305e05.entry.js} +2 -2
  272. package/{dist/web-components-library/p-dfb0e8d8.entry.js → www/build/p-1b562386.entry.js} +2 -2
  273. package/www/build/{p-1bd296f5.entry.js → p-1fad41b2.entry.js} +2 -2
  274. package/www/build/{p-1bd296f5.entry.js.map → p-1fad41b2.entry.js.map} +1 -1
  275. package/www/build/{p-a1eb1dfd.entry.js → p-2780f6d9.entry.js} +2 -2
  276. package/www/build/{p-7dbd0e3e.entry.js → p-2a74e691.entry.js} +2 -2
  277. package/www/build/{p-1efed23b.entry.js → p-2e4db422.entry.js} +2 -2
  278. package/www/build/{p-4f6c86ce.entry.js → p-2eaf4b9b.entry.js} +2 -2
  279. package/www/build/{p-6ea349f6.entry.js → p-350ea24f.entry.js} +2 -2
  280. package/www/build/{p-df5eeb75.entry.js → p-3574a17e.entry.js} +2 -2
  281. package/www/build/{p-efe489a5.entry.js → p-41966ee6.entry.js} +2 -2
  282. package/www/build/{p-65c404bc.entry.js → p-42cfc136.entry.js} +2 -2
  283. package/{dist/web-components-library/p-89b30fce.entry.js → www/build/p-47d4000c.entry.js} +2 -2
  284. package/www/build/p-55693913.entry.js +2 -0
  285. package/www/build/p-55693913.entry.js.map +1 -0
  286. package/www/build/{p-317cbb00.entry.js → p-55c3310f.entry.js} +2 -2
  287. package/www/build/{p-8fb3354e.entry.js → p-5ae84959.entry.js} +2 -2
  288. package/www/build/{p-e1ab33fe.entry.js → p-633d18e9.entry.js} +2 -2
  289. package/www/build/{p-b4e0cd5c.entry.js → p-668b9254.entry.js} +2 -2
  290. package/{dist/web-components-library/p-bc9237eb.entry.js → www/build/p-6af7c34f.entry.js} +2 -2
  291. package/{dist/web-components-library/p-d6441232.entry.js → www/build/p-781d96de.entry.js} +2 -2
  292. package/www/build/{p-1e71577c.entry.js → p-81c949eb.entry.js} +2 -2
  293. package/www/build/{p-2cc3ac9f.entry.js → p-87be3ccc.entry.js} +2 -2
  294. package/{dist/web-components-library/p-a5187022.entry.js → www/build/p-886382a7.entry.js} +2 -2
  295. package/{dist/web-components-library/p-9ac57635.entry.js → www/build/p-95af0156.entry.js} +2 -2
  296. package/www/build/{p-955f0d65.js → p-9a93e186.js} +1 -1
  297. package/{dist/web-components-library/p-127a6dda.entry.js → www/build/p-a4f5e7e9.entry.js} +2 -2
  298. package/{dist/web-components-library/p-53943e9a.entry.js → www/build/p-baa35a6e.entry.js} +2 -2
  299. package/www/build/{p-1d050092.entry.js → p-bc8eec12.entry.js} +2 -2
  300. package/{dist/web-components-library/p-7f37e2a2.entry.js → www/build/p-bdd9c781.entry.js} +2 -2
  301. package/{dist/web-components-library/p-6de548e3.entry.js → www/build/p-c15267bc.entry.js} +2 -2
  302. package/www/build/{p-303fe1d0.entry.js → p-c983da75.entry.js} +2 -2
  303. package/www/build/p-ce98069e.entry.js +2 -0
  304. package/{dist/web-components-library/p-33e973b3.entry.js.map → www/build/p-ce98069e.entry.js.map} +1 -1
  305. package/www/build/p-d4e212cc.entry.js +2 -0
  306. package/www/build/{p-657802ce.entry.js.map → p-d4e212cc.entry.js.map} +1 -1
  307. package/{dist/web-components-library/p-f841b50f.entry.js → www/build/p-d4eb997c.entry.js} +2 -2
  308. package/www/build/{p-2bd1326c.entry.js → p-deed5153.entry.js} +2 -2
  309. package/www/build/p-e160889a.entry.js +2 -0
  310. package/www/build/{p-2e398b4d.entry.js → p-e1d1445c.entry.js} +2 -2
  311. package/{dist/web-components-library/p-6e49b67e.entry.js → www/build/p-e2cdf19c.entry.js} +2 -2
  312. package/www/build/p-e972b9c2.entry.js +2 -0
  313. package/{dist/web-components-library/p-222898cd.entry.js → www/build/p-ea96790b.entry.js} +3 -3
  314. package/www/build/{p-2bebbd04.entry.js → p-ee5ff565.entry.js} +2 -2
  315. package/www/build/{p-59651b67.entry.js → p-eea18ea6.entry.js} +2 -2
  316. package/www/build/p-f7e11eab.entry.js +2 -0
  317. package/www/build/{p-067411f0.entry.js → p-fdafba48.entry.js} +2 -2
  318. package/www/build/web-components-library.esm.js +1 -1
  319. package/www/index.html +1 -1
  320. package/dist/web-components-library/p-33e973b3.entry.js +0 -2
  321. package/dist/web-components-library/p-657802ce.entry.js +0 -2
  322. package/dist/web-components-library/p-6b816b15.entry.js +0 -2
  323. package/dist/web-components-library/p-6b816b15.entry.js.map +0 -1
  324. package/dist/web-components-library/p-8b3257b4.entry.js +0 -2
  325. package/dist/web-components-library/p-a8f43afd.entry.js +0 -2
  326. package/dist/web-components-library/p-c217c65c.entry.js +0 -2
  327. package/www/build/p-33e973b3.entry.js +0 -2
  328. package/www/build/p-657802ce.entry.js +0 -2
  329. package/www/build/p-6b816b15.entry.js +0 -2
  330. package/www/build/p-6b816b15.entry.js.map +0 -1
  331. package/www/build/p-8b3257b4.entry.js +0 -2
  332. package/www/build/p-a8f43afd.entry.js +0 -2
  333. package/www/build/p-c217c65c.entry.js +0 -2
  334. /package/dist/web-components-library/{p-32bc925a.entry.js.map → p-059963b6.entry.js.map} +0 -0
  335. /package/dist/web-components-library/{p-33d993fe.entry.js.map → p-06a196fb.entry.js.map} +0 -0
  336. /package/dist/web-components-library/{p-8c3a7bc1.entry.js.map → p-08384d53.entry.js.map} +0 -0
  337. /package/dist/web-components-library/{p-8e1363c6.entry.js.map → p-0fb73edd.entry.js.map} +0 -0
  338. /package/dist/web-components-library/{p-3f787c19.entry.js.map → p-12305e05.entry.js.map} +0 -0
  339. /package/dist/web-components-library/{p-dfb0e8d8.entry.js.map → p-1b562386.entry.js.map} +0 -0
  340. /package/dist/web-components-library/{p-a1eb1dfd.entry.js.map → p-2780f6d9.entry.js.map} +0 -0
  341. /package/dist/web-components-library/{p-7dbd0e3e.entry.js.map → p-2a74e691.entry.js.map} +0 -0
  342. /package/dist/web-components-library/{p-1efed23b.entry.js.map → p-2e4db422.entry.js.map} +0 -0
  343. /package/dist/web-components-library/{p-4f6c86ce.entry.js.map → p-2eaf4b9b.entry.js.map} +0 -0
  344. /package/dist/web-components-library/{p-6ea349f6.entry.js.map → p-350ea24f.entry.js.map} +0 -0
  345. /package/dist/web-components-library/{p-df5eeb75.entry.js.map → p-3574a17e.entry.js.map} +0 -0
  346. /package/dist/web-components-library/{p-efe489a5.entry.js.map → p-41966ee6.entry.js.map} +0 -0
  347. /package/dist/web-components-library/{p-65c404bc.entry.js.map → p-42cfc136.entry.js.map} +0 -0
  348. /package/dist/web-components-library/{p-89b30fce.entry.js.map → p-47d4000c.entry.js.map} +0 -0
  349. /package/dist/web-components-library/{p-317cbb00.entry.js.map → p-55c3310f.entry.js.map} +0 -0
  350. /package/dist/web-components-library/{p-8fb3354e.entry.js.map → p-5ae84959.entry.js.map} +0 -0
  351. /package/dist/web-components-library/{p-e1ab33fe.entry.js.map → p-633d18e9.entry.js.map} +0 -0
  352. /package/dist/web-components-library/{p-b4e0cd5c.entry.js.map → p-668b9254.entry.js.map} +0 -0
  353. /package/dist/web-components-library/{p-bc9237eb.entry.js.map → p-6af7c34f.entry.js.map} +0 -0
  354. /package/dist/web-components-library/{p-d6441232.entry.js.map → p-781d96de.entry.js.map} +0 -0
  355. /package/dist/web-components-library/{p-1e71577c.entry.js.map → p-81c949eb.entry.js.map} +0 -0
  356. /package/dist/web-components-library/{p-2cc3ac9f.entry.js.map → p-87be3ccc.entry.js.map} +0 -0
  357. /package/dist/web-components-library/{p-a5187022.entry.js.map → p-886382a7.entry.js.map} +0 -0
  358. /package/dist/web-components-library/{p-9ac57635.entry.js.map → p-95af0156.entry.js.map} +0 -0
  359. /package/dist/web-components-library/{p-127a6dda.entry.js.map → p-a4f5e7e9.entry.js.map} +0 -0
  360. /package/dist/web-components-library/{p-53943e9a.entry.js.map → p-baa35a6e.entry.js.map} +0 -0
  361. /package/dist/web-components-library/{p-1d050092.entry.js.map → p-bc8eec12.entry.js.map} +0 -0
  362. /package/dist/web-components-library/{p-7f37e2a2.entry.js.map → p-bdd9c781.entry.js.map} +0 -0
  363. /package/dist/web-components-library/{p-6de548e3.entry.js.map → p-c15267bc.entry.js.map} +0 -0
  364. /package/dist/web-components-library/{p-303fe1d0.entry.js.map → p-c983da75.entry.js.map} +0 -0
  365. /package/dist/web-components-library/{p-f841b50f.entry.js.map → p-d4eb997c.entry.js.map} +0 -0
  366. /package/dist/web-components-library/{p-2bd1326c.entry.js.map → p-deed5153.entry.js.map} +0 -0
  367. /package/dist/web-components-library/{p-c217c65c.entry.js.map → p-e160889a.entry.js.map} +0 -0
  368. /package/dist/web-components-library/{p-2e398b4d.entry.js.map → p-e1d1445c.entry.js.map} +0 -0
  369. /package/dist/web-components-library/{p-6e49b67e.entry.js.map → p-e2cdf19c.entry.js.map} +0 -0
  370. /package/dist/web-components-library/{p-a8f43afd.entry.js.map → p-e972b9c2.entry.js.map} +0 -0
  371. /package/dist/web-components-library/{p-222898cd.entry.js.map → p-ea96790b.entry.js.map} +0 -0
  372. /package/dist/web-components-library/{p-2bebbd04.entry.js.map → p-ee5ff565.entry.js.map} +0 -0
  373. /package/dist/web-components-library/{p-59651b67.entry.js.map → p-eea18ea6.entry.js.map} +0 -0
  374. /package/dist/web-components-library/{p-8b3257b4.entry.js.map → p-f7e11eab.entry.js.map} +0 -0
  375. /package/dist/web-components-library/{p-067411f0.entry.js.map → p-fdafba48.entry.js.map} +0 -0
  376. /package/www/build/{p-32bc925a.entry.js.map → p-059963b6.entry.js.map} +0 -0
  377. /package/www/build/{p-33d993fe.entry.js.map → p-06a196fb.entry.js.map} +0 -0
  378. /package/www/build/{p-8c3a7bc1.entry.js.map → p-08384d53.entry.js.map} +0 -0
  379. /package/www/build/{p-8e1363c6.entry.js.map → p-0fb73edd.entry.js.map} +0 -0
  380. /package/www/build/{p-3f787c19.entry.js.map → p-12305e05.entry.js.map} +0 -0
  381. /package/www/build/{p-dfb0e8d8.entry.js.map → p-1b562386.entry.js.map} +0 -0
  382. /package/www/build/{p-a1eb1dfd.entry.js.map → p-2780f6d9.entry.js.map} +0 -0
  383. /package/www/build/{p-7dbd0e3e.entry.js.map → p-2a74e691.entry.js.map} +0 -0
  384. /package/www/build/{p-1efed23b.entry.js.map → p-2e4db422.entry.js.map} +0 -0
  385. /package/www/build/{p-4f6c86ce.entry.js.map → p-2eaf4b9b.entry.js.map} +0 -0
  386. /package/www/build/{p-6ea349f6.entry.js.map → p-350ea24f.entry.js.map} +0 -0
  387. /package/www/build/{p-df5eeb75.entry.js.map → p-3574a17e.entry.js.map} +0 -0
  388. /package/www/build/{p-efe489a5.entry.js.map → p-41966ee6.entry.js.map} +0 -0
  389. /package/www/build/{p-65c404bc.entry.js.map → p-42cfc136.entry.js.map} +0 -0
  390. /package/www/build/{p-89b30fce.entry.js.map → p-47d4000c.entry.js.map} +0 -0
  391. /package/www/build/{p-317cbb00.entry.js.map → p-55c3310f.entry.js.map} +0 -0
  392. /package/www/build/{p-8fb3354e.entry.js.map → p-5ae84959.entry.js.map} +0 -0
  393. /package/www/build/{p-e1ab33fe.entry.js.map → p-633d18e9.entry.js.map} +0 -0
  394. /package/www/build/{p-b4e0cd5c.entry.js.map → p-668b9254.entry.js.map} +0 -0
  395. /package/www/build/{p-bc9237eb.entry.js.map → p-6af7c34f.entry.js.map} +0 -0
  396. /package/www/build/{p-d6441232.entry.js.map → p-781d96de.entry.js.map} +0 -0
  397. /package/www/build/{p-1e71577c.entry.js.map → p-81c949eb.entry.js.map} +0 -0
  398. /package/www/build/{p-2cc3ac9f.entry.js.map → p-87be3ccc.entry.js.map} +0 -0
  399. /package/www/build/{p-a5187022.entry.js.map → p-886382a7.entry.js.map} +0 -0
  400. /package/www/build/{p-9ac57635.entry.js.map → p-95af0156.entry.js.map} +0 -0
  401. /package/www/build/{p-127a6dda.entry.js.map → p-a4f5e7e9.entry.js.map} +0 -0
  402. /package/www/build/{p-53943e9a.entry.js.map → p-baa35a6e.entry.js.map} +0 -0
  403. /package/www/build/{p-1d050092.entry.js.map → p-bc8eec12.entry.js.map} +0 -0
  404. /package/www/build/{p-7f37e2a2.entry.js.map → p-bdd9c781.entry.js.map} +0 -0
  405. /package/www/build/{p-6de548e3.entry.js.map → p-c15267bc.entry.js.map} +0 -0
  406. /package/www/build/{p-303fe1d0.entry.js.map → p-c983da75.entry.js.map} +0 -0
  407. /package/www/build/{p-f841b50f.entry.js.map → p-d4eb997c.entry.js.map} +0 -0
  408. /package/www/build/{p-2bd1326c.entry.js.map → p-deed5153.entry.js.map} +0 -0
  409. /package/www/build/{p-c217c65c.entry.js.map → p-e160889a.entry.js.map} +0 -0
  410. /package/www/build/{p-2e398b4d.entry.js.map → p-e1d1445c.entry.js.map} +0 -0
  411. /package/www/build/{p-6e49b67e.entry.js.map → p-e2cdf19c.entry.js.map} +0 -0
  412. /package/www/build/{p-a8f43afd.entry.js.map → p-e972b9c2.entry.js.map} +0 -0
  413. /package/www/build/{p-222898cd.entry.js.map → p-ea96790b.entry.js.map} +0 -0
  414. /package/www/build/{p-2bebbd04.entry.js.map → p-ee5ff565.entry.js.map} +0 -0
  415. /package/www/build/{p-59651b67.entry.js.map → p-eea18ea6.entry.js.map} +0 -0
  416. /package/www/build/{p-8b3257b4.entry.js.map → p-f7e11eab.entry.js.map} +0 -0
  417. /package/www/build/{p-067411f0.entry.js.map → p-fdafba48.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/z-searchbar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,EACL,CAAC,GACF,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,GAIb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAC,qBAAqB,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAYlE,MAAM,OAAO,UAAU;IAVvB;QAaE,sCAAsC;QAEtC,WAAM,GAAG,aAAa,QAAQ,EAAE,EAAE,CAAC;QAEnC,4BAA4B;QAE5B,kBAAa,GAAa,KAAK,CAAC;QAkBhC,gCAAgC;QAEhC,iBAAY,GAAa,KAAK,CAAC;QAE/B,4DAA4D;QAE5D,yBAAoB,GAAY,CAAC,CAAC;QAMlC,yBAAyB;QAEzB,sBAAiB,GAAY,sBAAsB,CAAC;QAMpD,sCAAsC;QAEtC,qBAAgB,GAAa,KAAK,CAAC;QAEnC,yBAAyB;QAEzB,qBAAgB,GAAa,KAAK,CAAC;QAEnC,iEAAiE;QAEjE,yBAAoB,GAAa,KAAK,CAAC;QAEvC,qCAAqC;QAErC,sBAAiB,GAAY,OAAO,CAAC;QAErC,kDAAkD;QAElD,SAAI,GAAiB,WAAW,CAAC,GAAG,CAAC;QAErC,gCAAgC;QAEhC,YAAO,GAAmB,aAAa,CAAC,OAAO,CAAC;QAGhD,iBAAY,GAAG,IAAI,CAAC,KAAK,CAAC;QAG1B,qBAAgB,GAAuB,IAAI,CAAC,YAAY,CAAC;QAGzD,gBAAW,GAAG,KAAK,CAAC;QAGp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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n h,\n} from \"@stencil/core\";\nimport {\n ButtonVariant,\n ControlSize,\n KeyboardCode,\n SearchbarGroup,\n SearchbarGroupedItem,\n SearchbarItem,\n} from \"../../beans\";\nimport {handleEnterKeydSubmit, randomId} from \"../../utils/utils\";\n\n@Component({\n tag: \"z-searchbar\",\n styleUrls: [\n \"styles.css\",\n \"../css-components/z-label/styles.css\",\n \"../css-components/z-scrollbar/styles.css\",\n \"../../tokens/typography.css\",\n ],\n shadow: true,\n})\nexport class ZSearchbar implements ComponentInterface {\n @Element() host: HTMLZSearchbarElement;\n\n /** The id of the searchbar element */\n @Prop({reflect: true})\n htmlid = `searchbar-${randomId()}`;\n\n /** Prevent submit action */\n @Prop()\n preventSubmit?: boolean = false;\n\n /** The input label */\n @Prop()\n label?: string;\n\n /** The input aria-label */\n @Prop()\n htmlAriaLabel?: string;\n\n /** Input search string */\n @Prop()\n value?: string;\n\n /** Search input placeholder */\n @Prop()\n placeholder?: string;\n\n /** Show autocomplete results */\n @Prop()\n autocomplete?: boolean = false;\n\n /** Minimun number of characters to dispatch typing event */\n @Prop()\n autocompleteMinChars?: number = 3;\n\n /** Number of results shown. Default: all */\n @Prop()\n resultsCount?: number;\n\n /** Search helper text */\n @Prop()\n searchHelperLabel?: string = \"Cerca {searchString}\";\n\n /** Autocomplete results items */\n @Prop()\n resultsItems?: SearchbarItem[] | string;\n\n /** Sort autocomplete results items */\n @Prop()\n sortResultsItems?: boolean = false;\n\n /** Show submit button */\n @Prop()\n showSearchButton?: boolean = false;\n\n /** Hide the label of the submit button, showing only the icon */\n @Prop()\n searchButtonIconOnly?: boolean = false;\n\n /** The label of the submit button */\n @Prop()\n searchButtonLabel?: string = \"CERCA\";\n\n /** Size of the `z-input` and submit `z-button` */\n @Prop()\n size?: ControlSize = ControlSize.BIG;\n\n /** Submit `z-button` variant */\n @Prop()\n variant?: ButtonVariant = ButtonVariant.PRIMARY;\n\n @State()\n searchString = this.value;\n\n @State()\n currResultsCount: number | undefined = this.resultsCount;\n\n @State()\n showResults = false;\n\n @State()\n isMobile = false;\n\n @State()\n selectedItem?: SearchbarItem;\n\n private resultsItemsList: SearchbarItem[] | undefined = null;\n\n private inputRef: HTMLZInputElement;\n\n /** Media query list for detecting mobile view. */\n private mql?: MediaQueryList;\n\n /** Listener for changes in the mobile view media query. */\n private onMobileViewChange?: (e: MediaQueryListEvent) => void;\n\n /** Emitted on search submit, return search string */\n @Event()\n searchSubmit: EventEmitter<string>;\n\n /** Emitted on search typing, return search string */\n @Event()\n searchTyping: EventEmitter<string>;\n\n /** Emitted on search result click, return item */\n @Event()\n searchItemClick: EventEmitter<SearchbarItem>;\n\n private emitSearchItemClick(item: SearchbarItem): void {\n this.searchItemClick.emit(item);\n this.selectedItem = item;\n this.searchString = \"\";\n }\n\n private emitSearchSubmit(): void {\n this.searchSubmit.emit(this.inputRef.value);\n }\n\n @Watch(\"resultsItems\")\n watchItems(): void {\n this.resultsItemsList = this.getResultsItemsList();\n }\n\n @Watch(\"resultsCount\")\n watchResultsCount(): void {\n this.currResultsCount = this.resultsCount;\n }\n\n @Watch(\"value\")\n watchValue(): void {\n this.searchString = this.value;\n }\n\n @Watch(\"searchString\")\n watchSearchString(): void {\n this.searchTyping.emit(this.searchString);\n if (!this.searchString) {\n this.currResultsCount = this.resultsCount;\n }\n }\n\n private getResultsItemsList(): SearchbarItem[] | undefined {\n return typeof this.resultsItems === \"string\" ? JSON.parse(this.resultsItems) : this.resultsItems;\n }\n\n private getGroupedItems(): SearchbarGroupedItem {\n const groupedItems = {};\n this.resultsItemsList.forEach((item: SearchbarItem) => {\n const key = `${item?.category}${item?.subcategory}`;\n groupedItems[key] = groupedItems[key] ?? {\n category: item?.category,\n subcategory: item?.subcategory,\n items: [],\n };\n groupedItems[key][\"items\"].push(item);\n });\n\n if (this.sortResultsItems) {\n return Object.keys(groupedItems)\n .sort()\n .reduce((obj, key) => {\n obj[key] = {\n ...groupedItems[key],\n items: groupedItems[key][\"items\"].sort((a: SearchbarItem, b: SearchbarItem) => {\n const nameA = a.label.toUpperCase();\n const nameB = b.label.toUpperCase();\n if (nameA < nameB) {\n return -1;\n }\n if (nameA > nameB) {\n return 1;\n }\n\n return 0;\n }),\n };\n\n return obj;\n }, {});\n }\n\n return groupedItems;\n }\n\n private onListItemKeyDown(e: KeyboardEvent, item: SearchbarItem): void {\n if (e.key === KeyboardCode.ENTER) {\n e.preventDefault();\n this.emitSearchItemClick(item);\n\n return;\n }\n\n this.handleArrowsNavigation(e);\n }\n\n private onSearchHelperKeyDown(e: KeyboardEvent): void {\n if (e.key === KeyboardCode.ENTER) {\n e.preventDefault();\n this.emitSearchSubmit();\n\n return;\n }\n\n this.handleArrowsNavigation(e);\n }\n\n private handleArrowsNavigation(e: KeyboardEvent): void {\n if (![KeyboardCode.ARROW_DOWN, KeyboardCode.ARROW_UP].includes(e.key as KeyboardCode)) {\n return;\n }\n\n const currentElement = e.target as HTMLElement;\n const items = Array.from(this.host.shadowRoot?.querySelectorAll(\"z-list .list-item\") ?? []);\n const currentIndex = items.indexOf(currentElement);\n\n if (e.key === KeyboardCode.ARROW_DOWN) {\n e.preventDefault();\n const nextIndex = currentIndex + 1;\n if (nextIndex < items.length) {\n (items[nextIndex] as HTMLElement).focus();\n }\n }\n\n if (e.key === KeyboardCode.ARROW_UP) {\n e.preventDefault();\n const prevIndex = currentIndex - 1;\n if (prevIndex < 0) {\n this.host.shadowRoot?.querySelector(\"input\")?.focus();\n this.host.shadowRoot\n ?.querySelector(\"input\")\n ?.setSelectionRange(this.inputRef.value.length, this.inputRef.value.length);\n }\n if (prevIndex >= 0) {\n (items[prevIndex] as HTMLElement).focus();\n }\n }\n }\n\n private handleStopTyping(e: CustomEvent): void {\n e.stopPropagation();\n this.searchString = e.detail.value;\n this.selectedItem = undefined;\n }\n\n private handleSubmit(): void {\n if (this.preventSubmit) {\n return;\n }\n\n this.emitSearchSubmit();\n }\n\n @Listen(\"click\", {target: \"document\"})\n private handleOutsideClick(e: MouseEvent): void {\n const cp = e.composedPath();\n if (cp.includes(this.host)) {\n return;\n }\n\n this.showResults = false;\n }\n\n componentWillLoad(): void {\n this.resultsItemsList = this.getResultsItemsList();\n\n this.mql = matchMedia(\"(max-width: 767px)\");\n this.onMobileViewChange = (e: MediaQueryListEvent) => (this.isMobile = e.matches);\n this.mql.addEventListener(\"change\", this.onMobileViewChange);\n this.isMobile = this.mql.matches;\n }\n\n disconnectedCallback(): void {\n this.mql?.removeEventListener(\"change\", this.onMobileViewChange);\n }\n\n private renderItemLabel(label: string): string {\n if (!this.searchString) {\n return label;\n }\n\n return label.replace(\n new RegExp(this.searchString.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"), \"gmi\"),\n (found) => `<mark>${found}</mark>`\n );\n }\n\n private renderItem(item: SearchbarItem, index: number): HTMLZListElementElement {\n return (\n <z-list-element\n id={`list-item-${this.htmlid}-${index}`}\n role=\"presentation\"\n htmlTabindex={-1}\n onKeyDown={(e: KeyboardEvent) => this.onListItemKeyDown(e, item)}\n onClick={() => this.emitSearchItemClick(item)}\n >\n <div\n class=\"list-item ellipsis\"\n role=\"option\"\n tabindex={0}\n >\n {!!item?.icon && (\n <z-icon\n class=\"item-icon\"\n name={item.icon}\n />\n )}\n\n <div\n class=\"item-label body-3 mobile-body-4\"\n title={item.label}\n innerHTML={this.renderItemLabel(item.label)}\n />\n {!!item?.tag && <z-tag icon={item.tag.icon}>{!this.isMobile ? item.tag.text : \"\"}</z-tag>}\n </div>\n {!!item.children?.length && (\n <z-list\n class=\"sub-list\"\n role=\"group\"\n aria-label={item.label || undefined}\n >\n {item.children.map((child, index) => this.renderItem(child, index))}\n </z-list>\n )}\n </z-list-element>\n );\n }\n\n /**\n * Renders the item grouped by category and subcategory. If `resultsCount` is set, it limits the number of rendered items.\n */\n private renderItemGroups(): HTMLZListGroupElement[] | undefined {\n if (!this.resultsItemsList?.length) {\n return;\n }\n\n const groupedItems = Object.values(this.getGroupedItems()) as SearchbarGroup[];\n const listGroups: HTMLZListGroupElement[] = [];\n const hasResultsLimit = !!this.currResultsCount;\n let renderedCount = 0;\n\n for (const groupItem of groupedItems) {\n const remaining = hasResultsLimit ? this.currResultsCount - renderedCount : groupItem.items.length;\n if (remaining <= 0) {\n break;\n }\n\n const visibleItems = groupItem.items.slice(0, remaining);\n const listGroupsElements: HTMLZListElement[] = visibleItems.map((item: SearchbarItem, subindex: number) =>\n this.renderItem(item, subindex)\n );\n renderedCount += listGroupsElements.length;\n\n if (!listGroupsElements.length) {\n continue;\n }\n\n const ariaLabel = [groupItem.category, groupItem.subcategory].filter(Boolean).join(\" \");\n\n listGroups.push(\n <z-list-group aria-label={ariaLabel || undefined}>\n {groupItem.category && (\n <z-list-element\n class=\"category-heading body-3 mobile-body-4\"\n slot=\"header-title\"\n role=\"presentation\"\n htmlTabindex={-1}\n >\n <div class=\"category\">{groupItem.category}</div>\n {groupItem.subcategory && <div class=\"subcategory\">{groupItem.subcategory}</div>}\n </z-list-element>\n )}\n\n {listGroupsElements}\n </z-list-group>\n );\n }\n\n return listGroups;\n }\n\n render(): HTMLZSearchbarElement {\n return (\n <Host\n onFocus={() => (this.showResults = true)}\n onClick={(e: MouseEvent) => this.handleOutsideClick(e)}\n class={{\"has-submit\": !!this.showSearchButton, \"has-results\": !!this.autocomplete}}\n >\n <div class=\"input-container\">\n <z-input\n ref={(el) => (this.inputRef = el)}\n htmlid={`input-${this.htmlid}`}\n message={false}\n placeholder={this.placeholder}\n onStopTyping={(e: CustomEvent) => this.handleStopTyping(e)}\n onKeyUp={(e: KeyboardEvent) => {\n handleEnterKeydSubmit(e, () => this.handleSubmit());\n this.handleArrowsNavigation(e);\n }}\n onFocus={() => (this.showResults = true)}\n value={this.searchString || this.selectedItem?.label}\n size={this.size}\n label={this.label}\n aria-label={this.htmlAriaLabel || this.placeholder || undefined}\n />\n\n {!!(\n this.showResults &&\n this.autocomplete &&\n this.searchString &&\n this.searchString.length >= this.autocompleteMinChars &&\n this.resultsItemsList\n ) && (\n <div class=\"results z-scrollbar\">\n {this.preventSubmit && !this.resultsItemsList?.length ? (\n <div class=\"item-no-results body-3 mobile-body-4\">\n Non abbiamo trovato risultati per <b>{this.searchString}</b>\n <br />\n <br />\n Cosa puoi fare?\n <ul>\n <li>Verificare di aver scritto bene</li>\n <li>Provare a cercare un'altra parola</li>\n <li>Provare a cercare qualcosa di più generico</li>\n </ul>\n </div>\n ) : (\n <z-list\n role=\"listbox\"\n id={`list-${this.htmlid}`}\n aria-label={this.htmlAriaLabel || this.label || undefined}\n >\n {this.autocomplete && !this.preventSubmit && !!this.searchString && (\n <z-list-element\n role=\"presentation\"\n htmlTabindex={-1}\n id={`list-item-${this.htmlid}-search`}\n onKeyDown={(e: KeyboardEvent) => this.onSearchHelperKeyDown(e)}\n onClick={() => this.emitSearchSubmit()}\n >\n <div\n class=\"list-item item-search\"\n role=\"option\"\n tabindex={0}\n >\n <z-icon\n class=\"search-icon\"\n name=\"left-magnifying-glass\"\n />\n <div\n class=\"item-label body-3 mobile-body-4\"\n innerHTML={this.searchHelperLabel?.replace(\n \"{searchString}\",\n `<mark>${this.searchString}</mark>`\n )}\n />\n </div>\n </z-list-element>\n )}\n\n {this.renderItemGroups()}\n\n {!!(\n this.searchString &&\n this.resultsItemsList?.length &&\n this.currResultsCount &&\n this.currResultsCount < this.resultsItemsList?.length\n ) && (\n <z-list-element\n role=\"presentation\"\n htmlTabindex={-1}\n id={`list-item-${this.htmlid}-show-all`}\n >\n <div\n role=\"option\"\n class=\"item-show-all body-3 mobile-body-4\"\n tabindex={0}\n onClick={() => (this.currResultsCount = undefined)}\n >\n Vedi tutti i risultati\n </div>\n </z-list-element>\n )}\n </z-list>\n )}\n </div>\n )}\n </div>\n\n {this.showSearchButton && (\n <z-button\n icon={this.searchButtonIconOnly ? \"search\" : undefined}\n aria-label={this.searchButtonIconOnly ? this.searchButtonLabel.trim() || \"CERCA\" : undefined}\n disabled={!!this.preventSubmit}\n variant={this.variant}\n size={this.size}\n onClick={() => this.handleSubmit()}\n >\n {this.searchButtonIconOnly ? \"\" : this.searchButtonLabel.trim() || \"CERCA\"}\n </z-button>\n )}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/z-searchbar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,EACL,CAAC,GACF,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,GAIb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAC,qBAAqB,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAYlE,MAAM,OAAO,UAAU;IAVvB;QAaE,sCAAsC;QAEtC,WAAM,GAAG,aAAa,QAAQ,EAAE,EAAE,CAAC;QAEnC,4BAA4B;QAE5B,kBAAa,GAAa,KAAK,CAAC;QAkBhC,gCAAgC;QAEhC,iBAAY,GAAa,KAAK,CAAC;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\nimport {\n ButtonVariant,\n ControlSize,\n KeyboardCode,\n SearchbarGroup,\n SearchbarGroupedItem,\n SearchbarItem,\n} from \"../../beans\";\nimport {handleEnterKeydSubmit, randomId} from \"../../utils/utils\";\n\n@Component({\n tag: \"z-searchbar\",\n styleUrls: [\n \"styles.css\",\n \"../css-components/z-label/styles.css\",\n \"../css-components/z-scrollbar/styles.css\",\n \"../../tokens/typography.css\",\n ],\n shadow: true,\n})\nexport class ZSearchbar implements ComponentInterface {\n @Element() host: HTMLZSearchbarElement;\n\n /** The id of the searchbar element */\n @Prop({reflect: true})\n htmlid = `searchbar-${randomId()}`;\n\n /** Prevent submit action */\n @Prop()\n preventSubmit?: boolean = false;\n\n /** The input label */\n @Prop()\n label?: string;\n\n /** The input aria-label */\n @Prop()\n htmlAriaLabel?: string;\n\n /** Input search string */\n @Prop()\n value?: string;\n\n /** Search input placeholder */\n @Prop()\n placeholder?: string;\n\n /** Show autocomplete results */\n @Prop()\n autocomplete?: boolean = false;\n\n /** Minimun number of characters to dispatch typing event */\n @Prop()\n autocompleteMinChars?: number = 3;\n\n /** Number of results shown. Default: all */\n @Prop()\n resultsCount?: number;\n\n /** Search helper text */\n @Prop()\n searchHelperLabel?: string = \"Cerca {searchString}\";\n\n /** Autocomplete results items */\n @Prop()\n resultsItems?: SearchbarItem[] | string;\n\n /** Sort autocomplete results items */\n @Prop()\n sortResultsItems?: boolean = false;\n\n /** Show submit button */\n @Prop()\n showSearchButton?: boolean = false;\n\n /** Hide the label of the submit button, showing only the icon */\n @Prop()\n searchButtonIconOnly?: boolean = false;\n\n /** The label of the submit button */\n @Prop()\n searchButtonLabel?: string = \"CERCA\";\n\n /** Size of the `z-input` and submit `z-button` */\n @Prop()\n size?: ControlSize = ControlSize.BIG;\n\n /** Submit `z-button` variant */\n @Prop()\n variant?: ButtonVariant = ButtonVariant.PRIMARY;\n\n @State()\n searchString = this.value;\n\n @State()\n currResultsCount: number | undefined = this.resultsCount;\n\n @State()\n showResults = false;\n\n @State()\n isMobile = false;\n\n @State()\n selectedItem?: SearchbarItem;\n\n private resultsItemsList: SearchbarItem[] | undefined = null;\n\n private inputRef: HTMLZInputElement;\n\n /** Media query list for detecting mobile view. */\n private mql?: MediaQueryList;\n\n /** Listener for changes in the mobile view media query. */\n private onMobileViewChange?: (e: MediaQueryListEvent) => void;\n\n /** Emitted on search submit, return search string */\n @Event()\n searchSubmit: EventEmitter<string>;\n\n /** Emitted on search typing, return search string */\n @Event()\n searchTyping: EventEmitter<string>;\n\n /** Emitted on search result click, return item */\n @Event()\n searchItemClick: EventEmitter<SearchbarItem>;\n\n private emitSearchItemClick(item: SearchbarItem): void {\n this.searchItemClick.emit(item);\n this.selectedItem = item;\n this.searchString = \"\";\n }\n\n private emitSearchSubmit(): void {\n this.searchSubmit.emit(this.inputRef.value);\n }\n\n @Watch(\"resultsItems\")\n watchItems(): void {\n this.resultsItemsList = this.getResultsItemsList();\n }\n\n @Watch(\"resultsCount\")\n watchResultsCount(): void {\n this.currResultsCount = this.resultsCount;\n }\n\n @Watch(\"value\")\n watchValue(): void {\n this.searchString = this.value;\n }\n\n @Watch(\"searchString\")\n watchSearchString(): void {\n this.searchTyping.emit(this.searchString);\n if (!this.searchString) {\n this.currResultsCount = this.resultsCount;\n }\n }\n\n private getResultsItemsList(): SearchbarItem[] | undefined {\n return typeof this.resultsItems === \"string\" ? JSON.parse(this.resultsItems) : this.resultsItems;\n }\n\n private getGroupedItems(): SearchbarGroupedItem {\n const groupedItems = {};\n this.resultsItemsList.forEach((item: SearchbarItem) => {\n const key = `${item?.category}${item?.subcategory}`;\n groupedItems[key] = groupedItems[key] ?? {\n category: item?.category,\n subcategory: item?.subcategory,\n items: [],\n };\n groupedItems[key][\"items\"].push(item);\n });\n\n if (this.sortResultsItems) {\n return Object.keys(groupedItems)\n .sort()\n .reduce((obj, key) => {\n obj[key] = {\n ...groupedItems[key],\n items: groupedItems[key][\"items\"].sort((a: SearchbarItem, b: SearchbarItem) => {\n const nameA = a.label.toUpperCase();\n const nameB = b.label.toUpperCase();\n if (nameA < nameB) {\n return -1;\n }\n if (nameA > nameB) {\n return 1;\n }\n\n return 0;\n }),\n };\n\n return obj;\n }, {});\n }\n\n return groupedItems;\n }\n\n private onListItemKeyDown(e: KeyboardEvent, item: SearchbarItem): void {\n if (e.key === KeyboardCode.ENTER) {\n e.preventDefault();\n this.emitSearchItemClick(item);\n\n return;\n }\n\n this.handleArrowsNavigation(e);\n }\n\n private onSearchHelperKeyDown(e: KeyboardEvent): void {\n if (e.key === KeyboardCode.ENTER) {\n e.preventDefault();\n this.emitSearchSubmit();\n\n return;\n }\n\n this.handleArrowsNavigation(e);\n }\n\n private handleArrowsNavigation(e: KeyboardEvent): void {\n if (![KeyboardCode.ARROW_DOWN, KeyboardCode.ARROW_UP].includes(e.key as KeyboardCode)) {\n return;\n }\n\n const currentElement = e.target as HTMLElement;\n const items = Array.from(this.host.shadowRoot?.querySelectorAll(\"z-list .list-item\") ?? []);\n const currentIndex = items.indexOf(currentElement);\n\n if (e.key === KeyboardCode.ARROW_DOWN) {\n e.preventDefault();\n const nextIndex = currentIndex + 1;\n if (nextIndex < items.length) {\n (items[nextIndex] as HTMLElement).focus();\n }\n }\n\n if (e.key === KeyboardCode.ARROW_UP) {\n e.preventDefault();\n const prevIndex = currentIndex - 1;\n if (prevIndex < 0) {\n this.host.shadowRoot?.querySelector(\"input\")?.focus();\n this.host.shadowRoot\n ?.querySelector(\"input\")\n ?.setSelectionRange(this.inputRef.value.length, this.inputRef.value.length);\n }\n if (prevIndex >= 0) {\n (items[prevIndex] as HTMLElement).focus();\n }\n }\n }\n\n private handleStopTyping(e: CustomEvent): void {\n e.stopPropagation();\n this.searchString = e.detail.value;\n this.selectedItem = undefined;\n }\n\n private handleSubmit(): void {\n if (this.preventSubmit) {\n return;\n }\n\n this.emitSearchSubmit();\n }\n\n @Listen(\"click\", {target: \"document\"})\n private handleOutsideClick(e: MouseEvent): void {\n const cp = e.composedPath();\n if (cp.includes(this.host)) {\n return;\n }\n\n this.showResults = false;\n }\n\n componentWillLoad(): void {\n this.resultsItemsList = this.getResultsItemsList();\n\n this.mql = matchMedia(\"(max-width: 767px)\");\n this.onMobileViewChange = (e: MediaQueryListEvent) => (this.isMobile = e.matches);\n this.mql.addEventListener(\"change\", this.onMobileViewChange);\n this.isMobile = this.mql.matches;\n }\n\n disconnectedCallback(): void {\n this.mql?.removeEventListener(\"change\", this.onMobileViewChange);\n }\n\n private renderItemLabel(label: string): string {\n if (!this.searchString) {\n return label;\n }\n\n return label.replace(\n new RegExp(this.searchString.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"), \"gmi\"),\n (found) => `<mark>${found}</mark>`\n );\n }\n\n private renderItem(item: SearchbarItem, index: number): HTMLZListElementElement {\n return (\n <z-list-element\n id={`list-item-${this.htmlid}-${index}`}\n role=\"presentation\"\n htmlTabindex={-1}\n onKeyDown={(e: KeyboardEvent) => this.onListItemKeyDown(e, item)}\n onClick={(e: MouseEvent) => {\n e.stopPropagation();\n this.emitSearchItemClick(item);\n }}\n >\n <div\n class=\"list-item ellipsis\"\n role=\"option\"\n tabindex={0}\n >\n {!!item?.icon && (\n <z-icon\n class=\"item-icon\"\n name={item.icon}\n />\n )}\n\n <div\n class=\"item-label body-3 mobile-body-4\"\n title={item.label}\n innerHTML={this.renderItemLabel(item.label)}\n />\n {!!item?.tag && <z-tag icon={item.tag.icon}>{!this.isMobile ? item.tag.text : \"\"}</z-tag>}\n </div>\n {!!item.children?.length && (\n <z-list\n class=\"sub-list\"\n role=\"group\"\n aria-label={item.label || undefined}\n >\n {item.children.map((child, index) => this.renderItem(child, index))}\n </z-list>\n )}\n </z-list-element>\n );\n }\n\n /**\n * Renders the item grouped by category and subcategory. If `resultsCount` is set, it limits the number of rendered items.\n */\n private renderItemGroups(): HTMLZListGroupElement[] | undefined {\n if (!this.resultsItemsList?.length) {\n return;\n }\n\n const groupedItems = Object.values(this.getGroupedItems()) as SearchbarGroup[];\n const listGroups: HTMLZListGroupElement[] = [];\n const hasResultsLimit = !!this.currResultsCount;\n let renderedCount = 0;\n\n for (const groupItem of groupedItems) {\n const remaining = hasResultsLimit ? this.currResultsCount - renderedCount : groupItem.items.length;\n if (remaining <= 0) {\n break;\n }\n\n const visibleItems = groupItem.items.slice(0, remaining);\n const listGroupsElements: HTMLZListElement[] = visibleItems.map((item: SearchbarItem, subindex: number) =>\n this.renderItem(item, subindex)\n );\n renderedCount += listGroupsElements.length;\n\n if (!listGroupsElements.length) {\n continue;\n }\n\n const ariaLabel = [groupItem.category, groupItem.subcategory].filter(Boolean).join(\" \");\n\n listGroups.push(\n <z-list-group aria-label={ariaLabel || undefined}>\n {groupItem.category && (\n <z-list-element\n class=\"category-heading body-3 mobile-body-4\"\n slot=\"header-title\"\n role=\"presentation\"\n htmlTabindex={-1}\n >\n <div class=\"category\">{groupItem.category}</div>\n {groupItem.subcategory && <div class=\"subcategory\">{groupItem.subcategory}</div>}\n </z-list-element>\n )}\n\n {listGroupsElements}\n </z-list-group>\n );\n }\n\n return listGroups;\n }\n\n render(): HTMLZSearchbarElement {\n return (\n <Host\n onFocus={() => (this.showResults = true)}\n onClick={(e: MouseEvent) => this.handleOutsideClick(e)}\n class={{\"has-submit\": !!this.showSearchButton, \"has-results\": !!this.autocomplete}}\n >\n <div class=\"input-container\">\n <z-input\n ref={(el) => (this.inputRef = el)}\n htmlid={`input-${this.htmlid}`}\n message={false}\n placeholder={this.placeholder}\n onStopTyping={(e: CustomEvent) => this.handleStopTyping(e)}\n onKeyUp={(e: KeyboardEvent) => {\n handleEnterKeydSubmit(e, () => this.handleSubmit());\n this.handleArrowsNavigation(e);\n }}\n onFocus={() => (this.showResults = true)}\n value={this.searchString || this.selectedItem?.label}\n size={this.size}\n label={this.label}\n aria-label={this.htmlAriaLabel || this.placeholder || undefined}\n />\n\n {!!(\n this.showResults &&\n this.autocomplete &&\n this.searchString &&\n this.searchString.length >= this.autocompleteMinChars &&\n this.resultsItemsList\n ) && (\n <div class=\"results z-scrollbar\">\n {this.preventSubmit && !this.resultsItemsList?.length ? (\n <div class=\"item-no-results body-3 mobile-body-4\">\n Non abbiamo trovato risultati per <b>{this.searchString}</b>\n <br />\n <br />\n Cosa puoi fare?\n <ul>\n <li>Verificare di aver scritto bene</li>\n <li>Provare a cercare un'altra parola</li>\n <li>Provare a cercare qualcosa di più generico</li>\n </ul>\n </div>\n ) : (\n <z-list\n role=\"listbox\"\n id={`list-${this.htmlid}`}\n aria-label={this.htmlAriaLabel || this.label || undefined}\n >\n {this.autocomplete && !this.preventSubmit && !!this.searchString && (\n <z-list-element\n role=\"presentation\"\n htmlTabindex={-1}\n id={`list-item-${this.htmlid}-search`}\n onKeyDown={(e: KeyboardEvent) => this.onSearchHelperKeyDown(e)}\n onClick={() => this.emitSearchSubmit()}\n >\n <div\n class=\"list-item item-search\"\n role=\"option\"\n tabindex={0}\n >\n <z-icon\n class=\"search-icon\"\n name=\"left-magnifying-glass\"\n />\n <div\n class=\"item-label body-3 mobile-body-4\"\n innerHTML={this.searchHelperLabel?.replace(\n \"{searchString}\",\n `<mark>${this.searchString}</mark>`\n )}\n />\n </div>\n </z-list-element>\n )}\n\n {this.renderItemGroups()}\n\n {!!(\n this.searchString &&\n this.resultsItemsList?.length &&\n this.currResultsCount &&\n this.currResultsCount < this.resultsItemsList?.length\n ) && (\n <z-list-element\n role=\"presentation\"\n htmlTabindex={-1}\n id={`list-item-${this.htmlid}-show-all`}\n >\n <div\n role=\"option\"\n class=\"item-show-all body-3 mobile-body-4\"\n tabindex={0}\n onClick={() => (this.currResultsCount = undefined)}\n >\n Vedi tutti i risultati\n </div>\n </z-list-element>\n )}\n </z-list>\n )}\n </div>\n )}\n </div>\n\n {this.showSearchButton && (\n <z-button\n icon={this.searchButtonIconOnly ? \"search\" : undefined}\n aria-label={this.searchButtonIconOnly ? this.searchButtonLabel.trim() || \"CERCA\" : undefined}\n disabled={!!this.preventSubmit}\n variant={this.variant}\n size={this.size}\n onClick={() => this.handleSubmit()}\n >\n {this.searchButtonIconOnly ? \"\" : this.searchButtonLabel.trim() || \"CERCA\"}\n </z-button>\n )}\n </Host>\n );\n }\n}\n"]}
@@ -463,7 +463,7 @@ export class ZSelect {
463
463
  return (h("z-input-message", { message: boolean(this.message) === true ? undefined : this.message, status: this.status, class: this.size, disabled: this.disabled }));
464
464
  }
465
465
  render() {
466
- return (h("div", { key: '24afbfb95409c2767d020cb9efcab1e574cd7509', class: "select-wrapper" }, this.renderInput(), this.renderSelectUl(), this.renderMessage()));
466
+ return (h("div", { key: 'f0c3315e1fc53f9bd00376a1918d80d290e3a9a3', class: "select-wrapper" }, this.renderInput(), this.renderSelectUl(), this.renderMessage()));
467
467
  }
468
468
  static get is() { return "z-select"; }
469
469
  static get encapsulation() { return "scoped"; }
@@ -45,7 +45,7 @@ export class ZSkipToContent {
45
45
  this.visible = false;
46
46
  }
47
47
  render() {
48
- return (h(Host, { key: 'c6bea773b7ac555fef8e6144292999a8142f5755', class: {
48
+ return (h(Host, { key: 'caeb1d3601580de8cfee4437d31f8fc1cd97eb4c', class: {
49
49
  [this.variant]: true,
50
50
  "skip-to-content-visible": this.visible,
51
51
  } }, this.links.map((link, i) => {
@@ -4,7 +4,7 @@ import { Host, h } from "@stencil/core";
4
4
  */
5
5
  export class ZStepper {
6
6
  render() {
7
- return (h(Host, { key: 'fb661e3345d1353a2e81bb173334610c9cd7d0ba', role: "navigation" }, h("slot", { key: '03437692d75ea6c0367acb4441d1b797398f20b5' })));
7
+ return (h(Host, { key: 'e2eae6f73c524f4a2c72861732bf03b17f23ca75', role: "navigation" }, h("slot", { key: '567a94fe682d471b145e8519be859dd860bd6669' })));
8
8
  }
9
9
  static get is() { return "z-stepper"; }
10
10
  static get encapsulation() { return "shadow"; }
@@ -8,7 +8,7 @@ export class ZStepperItem {
8
8
  return Object.assign(Object.assign(Object.assign(Object.assign({}, href), role), current), tabindex);
9
9
  }
10
10
  render() {
11
- return (h(Host, { key: 'f24997a23514e8d4d3b1aa590ba26932499bcbfd', role: "listitem" }, h("button", Object.assign({ key: 'be1e80492f1744d845371a0d632fadb89efaa9e1', class: "stepper-item", disabled: this.disabled }, this.getAttributes()), h("div", { key: '219565ffc17ea324add230fe7dd80bc193ff759e', class: "indicator" }, this.checked ? h("z-icon", { name: "checkmark" }) : this.index), h("span", { key: 'bb01f5ebae751935f1840517888808bc2e2fcb7c' }, h("slot", { key: '8af60b19312c21d056894ace6486bff34cb62872' })))));
11
+ return (h(Host, { key: 'dd8a6a8aba1009e581a91944a84850f53e054dbd', role: "listitem" }, h("button", Object.assign({ key: '186641b0594970354812cf014f8565fda837d4eb', class: "stepper-item", disabled: this.disabled }, this.getAttributes()), h("div", { key: 'b27c548e3b9e670031ac095df8858c7fd864ac5e', class: "indicator" }, this.checked ? h("z-icon", { name: "checkmark" }) : this.index), h("span", { key: '7d079d8f9eb730da9883735563dd57dfcc74259a' }, h("slot", { key: 'f8b378d874e958668b83dad6f4688b4590783198' })))));
12
12
  }
13
13
  static get is() { return "z-stepper-item"; }
14
14
  static get encapsulation() { return "shadow"; }
@@ -5,10 +5,10 @@ import { Host, h } from "@stencil/core";
5
5
  */
6
6
  export class ZTag {
7
7
  render() {
8
- return (h(Host, { key: '0f2c63d3955fdb97015df9854ccac4030bc18f1e', class: {
8
+ return (h(Host, { key: '656a936ce4073db7a7895cac9f07e1ba6b9b5c2f', class: {
9
9
  "expandable": this.expandable && !!this.icon,
10
10
  "has-text": !!this.host.textContent.trim(),
11
- } }, this.icon && h("z-icon", { key: '46d5bfd904a8f2421d06b94f2e7c8e6ce81692d5', name: this.icon }), h("div", { key: '9c4fdeb859730e336eb18db8128c1fc7dc527410' }, h("slot", { key: 'aa6adbac4bcec80f1e3fb94d7276dee1386d9483' }))));
11
+ } }, this.icon && h("z-icon", { key: 'df213cce44c020028985d53064c3d0cd1ba645e9', name: this.icon }), h("div", { key: '2fa92332ae99d54527d7ab347e66f4424d241cf3' }, h("slot", { key: 'c52c05d031edbe81a9547c72479dae5c8d924a60' }))));
12
12
  }
13
13
  static get is() { return "z-tag"; }
14
14
  static get encapsulation() { return "scoped"; }
@@ -151,19 +151,19 @@ export class ZToastNotification {
151
151
  }
152
152
  }
153
153
  render() {
154
- return (h(Host, { key: '203e3a531f9a178cb4a87598b7916d9313faefe6', style: { "--percentuale": `${this.percentage}%` }, class: { [this.transition]: !!this.transition, [this.type]: !!this.type }, onAnimationEnd: (e) => {
154
+ return (h(Host, { key: '129c4628c3809f638a02596bff82f4a5700ae566', style: { "--percentuale": `${this.percentage}%` }, class: { [this.transition]: !!this.transition, [this.type]: !!this.type }, onAnimationEnd: (e) => {
155
155
  if (this.autoclose && e.animationName.includes("slidein")) {
156
156
  this.startClosingTimeout(this.autoclose);
157
157
  }
158
158
  if (e.animationName.includes("slideout")) {
159
159
  this.hostElement.parentNode.removeChild(this.hostElement);
160
160
  }
161
- } }, h("div", { key: 'f1aa2db8b0e25347d79f64bd99d3fa5ed0cdebbc', class: "toast-notification-container" }, h("div", { key: 'a9d16a63c9007b3dbe1f245d9063c3510f1518b8', class: "toast-notification-content" }, h("div", { key: '4ab0c13ca3f0bd80d95e0cb3199e3045e60c9a60', class: "toast-notification-text" }, this.heading && h("span", { key: 'b7dab9b4238d7e0f5d0db2184a2c9ca9bc0c8234', class: "title" }, this.heading), h("span", { key: '6afb9e5be183e6b040e6219940b00c48ea702fb1', class: "message" }, h("slot", { key: 'ee7feb8ab40d6e81dec9998a2ae13b4c03cf0327', name: "message" }, this.message && h("span", { key: '4adfbad2e2647b31a165e0a2d5164de7b283a3b7', innerHTML: DOMPurify.sanitize(this.message) })))), h("div", { key: 'ed3b21c702a6e4cadc10dd21b8a685c0b9c7a5cc', class: "button-container", hidden: !this.hasSlottedButton }, h("slot", { key: '0ece97a1a9773fc44347c64d5d413e35403212c9', name: "button", onSlotchange: () => this.checkSlottedButton() }))), this.closebutton && (h("button", { key: 'fd8e0a5fc8a6f59567f9938b53356ca545fd5eb0', class: "close-button", "aria-label": "Chiudi notifica", onClick: () => this.close(SLIDE_OUT_TRANSITION_MAP[this.transition], true), onKeyDown: (e) => {
161
+ } }, h("div", { key: '39360c2661ac44f4e3e8ae25aceccaea8179a03e', class: "toast-notification-container" }, h("div", { key: '6778d83e83590f5981ff9dfb5fbb8fbe92143404', class: "toast-notification-content" }, h("div", { key: '896d9bb0c412381f9ad81c799666dd54503a50b0', class: "toast-notification-text" }, this.heading && h("span", { key: 'a431608d859dede1cc17e840ebf2e01b872a1d48', class: "title" }, this.heading), h("span", { key: '23f29016f7eb04790a6adf136b0e064f5f2d87d9', class: "message" }, h("slot", { key: 'a793b4e4fee43ad139f0eef51ec1ed1a6cd5c31f', name: "message" }, this.message && h("span", { key: 'fc84e8b14208ff6d150dfea28924387f845cb371', innerHTML: DOMPurify.sanitize(this.message) })))), h("div", { key: '475e54939682a3b7bba6032a92bd04b8a21772b3', class: "button-container", hidden: !this.hasSlottedButton }, h("slot", { key: 'e9bd0b4e65504476b59a97dcf82b233b5259bc00', name: "button", onSlotchange: () => this.checkSlottedButton() }))), this.closebutton && (h("button", { key: '14b143ec8e4d8e02b039d01464532ba25bcc2bea', class: "close-button", "aria-label": "Chiudi notifica", onClick: () => this.close(SLIDE_OUT_TRANSITION_MAP[this.transition], true), onKeyDown: (e) => {
162
162
  if (e.code == KeyboardCode.SPACE || e.code == KeyboardCode.ENTER) {
163
163
  e.preventDefault();
164
164
  this.close(SLIDE_OUT_TRANSITION_MAP[this.transition], true);
165
165
  }
166
- } }, h("z-icon", { key: '778c9689d5b1b6286c08c58c50ad93cc8fc35358', name: "multiply-circled" }))))));
166
+ } }, h("z-icon", { key: '4870673eb2e49f6dbd06788a3b279daaa8236ab6', name: "multiply-circled" }))))));
167
167
  }
168
168
  static get is() { return "z-toast-notification"; }
169
169
  static get encapsulation() { return "shadow"; }
@@ -39,7 +39,7 @@ export class ZToastNotificationList {
39
39
  }
40
40
  }
41
41
  render() {
42
- return h("slot", { key: '1b22ad1308d152ae0a89b6e0d711765fc400458b', name: "toasts" });
42
+ return h("slot", { key: '124469b727158c7221ff11aa3b0614bd28591a50', name: "toasts" });
43
43
  }
44
44
  static get is() { return "z-toast-notification-list"; }
45
45
  static get encapsulation() { return "shadow"; }
@@ -26,14 +26,14 @@ export class ZToggleSwitch {
26
26
  this.emitToggleClick();
27
27
  }
28
28
  render() {
29
- return (h(Host, { key: '0370a36488a57e5ac92c296ce0fcc140cc8c56eb' }, h("input", { key: '3364210d02cebfd7d2ad14407a557c52aa82686a', id: this.htmlid, type: "checkbox", checked: this.checked, disabled: this.disabled, onChange: this.handleClick.bind(this) }), h("label", { key: '07519e6cbe8f44d131909d1023b602e74b6cdf80', htmlFor: this.htmlid, class: {
29
+ return (h(Host, { key: 'c682159ebad808a9e448a1a200fcc9ce49e3a2ad' }, h("input", { key: '5a22ee912aeb8a212820d8d3f7b41a6029bfa530', id: this.htmlid, type: "checkbox", checked: this.checked, disabled: this.disabled, onChange: this.handleClick.bind(this) }), h("label", { key: '6c36dd15bc8fa1fcd1443cb01fe442644de8d87d', htmlFor: this.htmlid, class: {
30
30
  [this.labelPosition]: true,
31
31
  disabled: this.disabled,
32
- } }, h("span", { key: '3d460ac03c1788fdf99f116e8792f2b0f95f1857' }, h("slot", { key: '0eb371292202e3eefd737ed79f3acefeda2fab91' })), h("span", { key: '5912b4da7abed8f994dd7224a09872d5c173160a', class: {
32
+ } }, h("span", { key: 'b9cbb73e0de30c219443c2430fb7cb09a03ffa32' }, h("slot", { key: '6b73da88f943d4c304ff3cd22c99145b2393541e' })), h("span", { key: 'd7ecff8d30e2f6a43c3f010c53a6fb5fd00f7a78', class: {
33
33
  container: true,
34
34
  disabled: this.disabled,
35
35
  checked: this.checked,
36
- } }, h("span", { key: '893ebce8124fdbcd00fbaf0976757a15b59a5b6e', class: "circle" }, this.checked && (h("z-icon", { key: 'f6d826da0f8c46f1e64fc0efa2a55fda64685f55', width: 12, height: 12, name: "checkmark" })))))));
36
+ } }, h("span", { key: '5d4c5aba273711d3f06b6622e119bd6e81137e3d', class: "circle" }, this.checked && (h("z-icon", { key: 'c6dfea8a74fc0ef446588ac7c36bf06e3549f814', width: 12, height: 12, name: "checkmark" })))))));
37
37
  }
38
38
  static get is() { return "z-toggle-switch"; }
39
39
  static get encapsulation() { return "scoped"; }
@@ -182,10 +182,10 @@ export class ZTool {
182
182
  (_a = this.mql) === null || _a === void 0 ? void 0 : _a.removeEventListener("change", this.onMobileViewChange);
183
183
  }
184
184
  render() {
185
- return (h(Host, { key: '6d82ae454718b00d21e6193325bc223de3409f7a', class: { "z-tool-tooltip-open": this.tooltipOpen } }, h("button", { key: '79735e5831762281fef55e7033c6660a8b97de74', class: "z-tool", type: "button", ref: (el) => (this.buttonRef = el), "aria-pressed": this.hasSlottedContent ? undefined : this.active ? "true" : "false", "aria-expanded": this.hasSlottedContent ? (this.open ? "true" : "false") : undefined, "aria-haspopup": this.hasSlottedContent ? "true" : undefined, "aria-label": this.htmlAriaLabel || this.tooltip || undefined, disabled: this.disabled, onClick: this.handleClick, onMouseEnter: this.handleTooltipOpen, onMouseLeave: this.handleTooltipClose, onFocus: this.handleTooltipOpen, onBlur: this.handleTooltipClose }, h("z-icon", { key: '79be05619def07fd8a73812a8905f15f719fce83', ref: (el) => (this.iconRef = el), name: this.icon, indicatorColor: this.indicatorColor })), this.tooltip && (h("z-tooltip", { key: '9b5aa9d7f06b1ff6408f485c910a905c4c62d3e4', class: "z-tool-tooltip", ref: (el) => (this.tooltipRef = el), bindTo: this.iconRef, open: this.tooltipOpen && !this.open, position: this.isNested ? PopoverPosition.BOTTOM : this.tooltipPosition, dark: true, onMouseLeave: this.handleTooltipClose, onBlur: this.handleTooltipClose, onOpenChange: this.onTooltipOpenChange }, h("span", { key: '82c6f40fc3a4d4932ea9ef8e05f02c2c8d5eaddf', class: "body-4" }, this.tooltip))), this.hasSlottedContent && (h("z-popover", { key: '33dcbe345ca34c79720ed7a17eda2f5ab0561e90', class: "z-tool-submenu", open: this.open, bindTo: this.isMobile && this.mainToolbar ? this.mainToolbar : this.hostElement, center: true,
185
+ return (h(Host, { key: 'a48fb610a0a937e39e8c18d38bcb816796f5d6b4', class: { "z-tool-tooltip-open": this.tooltipOpen } }, h("button", { key: 'd5dbd5053a068c67ed97ddc5a7f63d093972b5cb', class: "z-tool", type: "button", ref: (el) => (this.buttonRef = el), "aria-pressed": this.hasSlottedContent ? undefined : this.active ? "true" : "false", "aria-expanded": this.hasSlottedContent ? (this.open ? "true" : "false") : undefined, "aria-haspopup": this.hasSlottedContent ? "true" : undefined, "aria-label": this.htmlAriaLabel || this.tooltip || undefined, disabled: this.disabled, onClick: this.handleClick, onMouseEnter: this.handleTooltipOpen, onMouseLeave: this.handleTooltipClose, onFocus: this.handleTooltipOpen, onBlur: this.handleTooltipClose }, h("z-icon", { key: '32fead7901041cc31e29ec21afdd4e23db4d3db8', ref: (el) => (this.iconRef = el), name: this.icon, indicatorColor: this.indicatorColor })), this.tooltip && (h("z-tooltip", { key: '5b50cd97749c97edd199be309bb0b5aadd59116b', class: "z-tool-tooltip", ref: (el) => (this.tooltipRef = el), bindTo: this.iconRef, open: this.tooltipOpen && !this.open, position: this.isNested ? PopoverPosition.BOTTOM : this.tooltipPosition, dark: true, onMouseLeave: this.handleTooltipClose, onBlur: this.handleTooltipClose, onOpenChange: this.onTooltipOpenChange }, h("span", { key: '768a80f59017ef7e459913f9c449673789b81c00', class: "body-4" }, this.tooltip))), this.hasSlottedContent && (h("z-popover", { key: 'f7a3ffa96e971fa793643944391e296ce7ce12b8', class: "z-tool-submenu", open: this.open, bindTo: this.isMobile && this.mainToolbar ? this.mainToolbar : this.hostElement, center: true,
186
186
  /* disable auto-close to prevent unwanted close behaviors on mobile,
187
187
  when the bound element is the main toolbar */
188
- closable: false, position: this.isMobile ? PopoverPosition.TOP : PopoverPosition.BOTTOM }, h("slot", { key: '1a42cca4cd67850cff48043819e144fc2b6ea47e' })))));
188
+ closable: false, position: this.isMobile ? PopoverPosition.TOP : PopoverPosition.BOTTOM }, h("slot", { key: 'e4b9dd50dd26e958241db7df82ccd8a14c6a4c86' })))));
189
189
  }
190
190
  static get is() { return "z-tool"; }
191
191
  static get encapsulation() { return "shadow"; }
@@ -132,7 +132,7 @@ export class ZToolbar {
132
132
  }
133
133
  }
134
134
  render() {
135
- return (h(Host, { key: 'c4ccefdf38a239462ed209be1f5982fc4d805493', role: "toolbar", "aria-label": this.htmlAriaLabel }, h("slot", { key: '97f941c2bb8862f5bcb78bbad6fba1f729d497a5', onSlotchange: () => {
135
+ return (h(Host, { key: 'f4a79655dc3f8e4423b20683c6b3860e5007f0ee', role: "toolbar", "aria-label": this.htmlAriaLabel }, h("slot", { key: 'd044d14607037c8e6c9977faf383c16ee6bddb8a', onSlotchange: () => {
136
136
  this.collectToolItems();
137
137
  this.updateTabIndexes();
138
138
  } })));
@@ -25,7 +25,7 @@ export class ZTooltip {
25
25
  this.open = this.popoverEl.open;
26
26
  }
27
27
  render() {
28
- return (h("z-popover", { key: 'fc20f5c5d66fb5b9dabd41dfb986b28fbedfad9d', ref: (el) => (this.popoverEl = el), bindTo: this.bindTo, open: this.open, position: this.position, closable: this.closable, center: true, showArrow: true, onOpenChange: (event) => this.openChange.emit(event.detail) }, h("slot", { key: '5c5a2e8be7183824b50fa87d18b6f26e4bb2c0f7' })));
28
+ return (h("z-popover", { key: '09052c0c35b449590b0abfcd7e2816253814cc57', ref: (el) => (this.popoverEl = el), bindTo: this.bindTo, open: this.open, position: this.position, closable: this.closable, center: true, showArrow: true, onOpenChange: (event) => this.openChange.emit(event.detail) }, h("slot", { key: '1d4e6d0108724f8bc77bb6faf17b3938aa77d519' })));
29
29
  }
30
30
  static get is() { return "z-tooltip"; }
31
31
  static get encapsulation() { return "shadow"; }
@@ -1,7 +1,7 @@
1
1
  import { h } from "@stencil/core";
2
2
  export class ZVisuallyHidden {
3
3
  render() {
4
- return h("slot", { key: '7223868f33657302203a2a24df8b3250d81c42cc' });
4
+ return h("slot", { key: '3378671bfdbab0bf278c0e8aeb3f8ea9bd555422' });
5
5
  }
6
6
  static get is() { return "z-visually-hidden"; }
7
7
  static get encapsulation() { return "shadow"; }
@@ -1,2 +1,2 @@
1
- import{proxyCustomElement as e,HTMLElement as t,h as i,Host as s,transformTag as r}from"@stencil/core/internal/client";import{i as o,l as d,D as a,m as n}from"./index2.js";import{d as h}from"./index5.js";const l=()=>`:host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.z-list-group-header-container{color:var(--gray700);font-size:var(--font-size-2);font-weight:var(--font-sb) !important;letter-spacing:0.16px;line-height:1.4}:host>.z-list-group-header-container.has-header{padding-top:calc(var(--space-unit) * 1.5);padding-bottom:var(--space-unit)}:host>.z-list-group-header-container.has-header>z-divider{margin-top:var(--space-unit)}:host>.grouped-tree-list-header{padding-top:calc(var(--space-unit) * 1.5);padding-bottom:var(--space-unit)}`;const c=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.size=o.MEDIUM;this.dividerType=d.NONE;this.dividerSize=a.SMALL;this.dividerColor="gray200";this.listType=n.NONE;this.htmlRole="group"}onRoleChange(e){this.htmlRole=e}setChildrenProps(){Array.from(this.host.children).filter((e=>e.tagName.toLowerCase()==="z-list-element")).forEach(((e,t,i)=>{e.size=this.size;e.listType=this.listType;e.listElementPosition=t.toString();if(t<i.length-1){e.dividerType=this.dividerType;e.dividerSize=this.dividerSize;e.dividerColor=this.dividerColor}}))}componentWillLoad(){this.hasHeader=!!this.host.querySelector('[slot="header-title"]')}render(){return i(s,{key:"5c18efadefea41fd7dd73e276f1c70d99966cc27",role:this.htmlRole},i("div",{key:"39780a5f98c4a63c2dfbc5561b7c08dd47f87872",class:{"z-list-group-header-container":true,"has-header":this.hasHeader&&!this.hasTreeItems,"grouped-tree-list-header":this.hasTreeItems}},i("slot",{key:"b9598bd340a6c17f1dc900f061a6aa05dcbcbf19",name:"header-title"}),this.dividerType===d.HEADER&&i("z-divider",{key:"5646b13db4813f862f9b028491ef4ff9f878ac9c",color:this.dividerColor,size:this.dividerSize})),i("slot",{key:"b89f293df5f95fb83bc23e1725cb2d24a7b5c15b"}))}get host(){return this}static get watchers(){return{role:[{onRoleChange:1}],size:[{setChildrenProps:1}],listType:[{setChildrenProps:1}],dividerType:[{setChildrenProps:1}],dividerSize:[{setChildrenProps:1}],dividerColor:[{setChildrenProps:1}]}}static get style(){return l()}},[257,"z-list-group",{size:[513],dividerType:[513,"divider-type"],dividerSize:[513,"divider-size"],dividerColor:[513,"divider-color"],listType:[513,"list-type"],hasTreeItems:[4,"has-tree-items"],htmlRole:[32]},undefined,{role:[{onRoleChange:1}],size:[{setChildrenProps:1}],listType:[{setChildrenProps:1}],dividerType:[{setChildrenProps:1}],dividerSize:[{setChildrenProps:1}],dividerColor:[{setChildrenProps:1}]}]);function p(){if(typeof customElements==="undefined"){return}const e=["z-list-group","z-divider"];e.forEach((e=>{switch(e){case"z-list-group":if(!customElements.get(r(e))){customElements.define(r(e),c)}break;case"z-divider":if(!customElements.get(r(e))){h()}break}}))}export{c as Z,p as d};
1
+ import{proxyCustomElement as e,HTMLElement as t,h as i,Host as s,transformTag as r}from"@stencil/core/internal/client";import{i as o,l as d,D as a,m as n}from"./index2.js";import{d as h}from"./index5.js";const l=()=>`:host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.z-list-group-header-container{color:var(--gray700);font-size:var(--font-size-2);font-weight:var(--font-sb) !important;letter-spacing:0.16px;line-height:1.4}:host>.z-list-group-header-container.has-header{padding-top:calc(var(--space-unit) * 1.5);padding-bottom:var(--space-unit)}:host>.z-list-group-header-container.has-header>z-divider{margin-top:var(--space-unit)}:host>.grouped-tree-list-header{padding-top:calc(var(--space-unit) * 1.5);padding-bottom:var(--space-unit)}`;const c=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.size=o.MEDIUM;this.dividerType=d.NONE;this.dividerSize=a.SMALL;this.dividerColor="gray200";this.listType=n.NONE;this.htmlRole="group"}onRoleChange(e){this.htmlRole=e}setChildrenProps(){Array.from(this.host.children).filter((e=>e.tagName.toLowerCase()==="z-list-element")).forEach(((e,t,i)=>{e.size=this.size;e.listType=this.listType;e.listElementPosition=t.toString();if(t<i.length-1){e.dividerType=this.dividerType;e.dividerSize=this.dividerSize;e.dividerColor=this.dividerColor}}))}componentWillLoad(){this.hasHeader=!!this.host.querySelector('[slot="header-title"]')}render(){return i(s,{key:"6c87868fe2ef8cb8cba06bea94d4eaca25c3f0e7",role:this.htmlRole},i("div",{key:"bf277438554dd56b141040c8af5e2171eeedfdb7",class:{"z-list-group-header-container":true,"has-header":this.hasHeader&&!this.hasTreeItems,"grouped-tree-list-header":this.hasTreeItems}},i("slot",{key:"c3bf82239b5f0418e10bffbc4e1e26e4c3172dab",name:"header-title"}),this.dividerType===d.HEADER&&i("z-divider",{key:"7127f3a0d6f501f305431d57068da428ccf8b90b",color:this.dividerColor,size:this.dividerSize})),i("slot",{key:"7dfc72c7992c5f28fce1a204ebabfa2a012b7708"}))}get host(){return this}static get watchers(){return{role:[{onRoleChange:1}],size:[{setChildrenProps:1}],listType:[{setChildrenProps:1}],dividerType:[{setChildrenProps:1}],dividerSize:[{setChildrenProps:1}],dividerColor:[{setChildrenProps:1}]}}static get style(){return l()}},[257,"z-list-group",{size:[513],dividerType:[513,"divider-type"],dividerSize:[513,"divider-size"],dividerColor:[513,"divider-color"],listType:[513,"list-type"],hasTreeItems:[4,"has-tree-items"],htmlRole:[32]},undefined,{role:[{onRoleChange:1}],size:[{setChildrenProps:1}],listType:[{setChildrenProps:1}],dividerType:[{setChildrenProps:1}],dividerSize:[{setChildrenProps:1}],dividerColor:[{setChildrenProps:1}]}]);function p(){if(typeof customElements==="undefined"){return}const e=["z-list-group","z-divider"];e.forEach((e=>{switch(e){case"z-list-group":if(!customElements.get(r(e))){customElements.define(r(e),c)}break;case"z-divider":if(!customElements.get(r(e))){h()}break}}))}export{c as Z,p as d};
2
2
  //# sourceMappingURL=index10.js.map
@@ -1,2 +1,2 @@
1
- import{proxyCustomElement as a,createEvent as n,h as t,Host as s,transformTag as o}from"@stencil/core/internal/client";import{v as i,u as c,g as e}from"./index2.js";import{R as r,F as f}from"./reactive-controller.js";import{j as h}from"./utils.js";const v=()=>`.sc-z-offcanvas-h{font-family:var(--font-family-sans);font-weight:var(--font-rg)}[variant="pushcontent"].sc-z-offcanvas-h:not([transitiondirection="up"]){overflow:hidden}.canvas-container.sc-z-offcanvas{display:flex;overflow:hidden;min-width:100%;height:100%;background:var(--color-surface01);transform:translateX(0);transition:transform 0.4s ease-out}.sc-z-offcanvas-h>*.sc-z-offcanvas{position:fixed;top:var(--z-offcanvas--top-space, 0);right:0;bottom:0;left:0}[open].sc-z-offcanvas-h>*.sc-z-offcanvas{height:calc(100% - var(--z-offcanvas--top-space, 0px))}[transitiondirection="right"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{transform:translateX(-100%)}[transitiondirection="left"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{transform:translateX(100%)}[open][transitiondirection="right"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas,[open][transitiondirection="left"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{transform:translateX(0)}[transitiondirection="up"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{top:auto;bottom:0;height:var(--z-offcanvas--container-height, 90%);transform:translateY(100%)}[transitiondirection="up"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas,[variant="overlay"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{z-index:1001}[open][transitiondirection="up"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{transform:translateY(0)}[variant="pushcontent"].sc-z-offcanvas-h:not([transitiondirection="up"])>.canvas-container.sc-z-offcanvas{position:relative;height:100%}[variant="pushcontent"].sc-z-offcanvas-h:not([open]){display:none}[skip-animation].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{transition:none}.backdrop.sc-z-offcanvas{z-index:1000;width:100%;height:100%;background-color:var(--gray900);opacity:0;pointer-events:none;transition:opacity 0.4s ease-out}[open].sc-z-offcanvas-h>.backdrop.sc-z-offcanvas{opacity:0.7;pointer-events:unset}.canvas-container.sc-z-offcanvas>.canvas-content.sc-z-offcanvas{overflow:hidden auto;flex:1 auto;padding:0 calc(var(--space-unit) * 2);margin:calc(var(--space-unit) * 2) calc(var(--space-unit) / 2) calc(var(--space-unit) * 2) 0;outline:none}@media (min-width: 768px){[variant="pushcontent"].sc-z-offcanvas-h:not([transitiondirection="up"]){flex:none}.canvas-container.sc-z-offcanvas{width:var(--z-offcanvas--container-width, 375px);min-width:var(--z-offcanvas--container-width, 375px)}[transitiondirection="up"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{width:100%}[transitiondirection="right"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{right:auto;left:0}[transitiondirection="left"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{right:0;left:auto}}`;const d=a(class a extends r{constructor(a){super(false);if(a!==false){this.__registerHost()}this.canvasOpenStatusChanged=n(this,"canvasOpenStatusChanged",7);this.variant=i.PUSHCONTENT;this.open=false;this.transitiondirection=c.LEFT;this.skipLoadAnimation=false;this.showBackdrop=true;this.skipAnimation=false;this.focusTrapController=new f(this,{fallbackFocus:()=>this.canvasContent,isActive:()=>this.open&&this.variant===i.OVERLAY})}handleKeyDown(a){if(!this.open||this.variant!==i.OVERLAY){return}if(a.key===e.ESC){a.preventDefault();this.open=false;return}this.focusTrapController.handleWrapTab(a)}handlePageScroll(){const a=this.variant===i.OVERLAY||this.transitiondirection===c.UP?"overflow-y":"overflow-x";this.host.ownerDocument.body.style[a]=this.open?"hidden":""}onOpenChanged(){this.canvasOpenStatusChanged.emit(this.open);this.handlePageScroll();this.focusTrapController.sync()}componentWillLoad(){if(this.open){this.skipAnimation=true}return super.componentWillLoad()}componentDidRender(){this.skipAnimation=false}componentDidLoad(){if(this.open){this.onOpenChanged()}}disconnectedCallback(){this.handlePageScroll();super.disconnectedCallback()}render(){return t(s,{key:"96384e6ed9437409a5f220d3a725707a47854dd9","skip-animation":this.skipAnimation,"aria-hidden":!this.open?"true":null,"aria-modal":this.open&&this.variant===i.OVERLAY?"true":null,role:this.open&&this.variant===i.OVERLAY?"dialog":null},t("div",{key:"b15d7e247efc10af823e1bbcf26a767e2a6a6f50",class:"canvas-container"},t("div",{key:"7dd36d23274bb9f2ddc7b3d155b773d608072f4d",class:"canvas-content z-scrollbar",ref:a=>this.canvasContent=a,tabIndex:h(this.host).length?undefined:-1},t("slot",{key:"a43bd7fbeffb3ffb411f779383fbc1aa0a72feb5",name:"canvasContent"}))),(this.variant==i.OVERLAY||this.transitiondirection===c.UP)&&this.showBackdrop&&t("div",{key:"02ada3fbefde8cb24bb57db9d7e566d1834f855e",class:"backdrop",onClick:a=>{a.preventDefault();a.stopPropagation();this.open=false}}))}get host(){return this}static get watchers(){return{variant:[{handlePageScroll:1}],open:[{onOpenChanged:0}]}}static get style(){return v()}},[774,"z-offcanvas",{variant:[513],open:[1540],transitiondirection:[513],skipLoadAnimation:[4,"skip-load-animation"],showBackdrop:[4,"show-backdrop"],skipAnimation:[32]},[[4,"keydown","handleKeyDown"]],{variant:[{handlePageScroll:1}],open:[{onOpenChanged:0}]}]);function l(){if(typeof customElements==="undefined"){return}const a=["z-offcanvas"];a.forEach((a=>{switch(a){case"z-offcanvas":if(!customElements.get(o(a))){customElements.define(o(a),d)}break}}))}export{d as Z,l as d};
1
+ import{proxyCustomElement as a,createEvent as n,h as t,Host as s,transformTag as o}from"@stencil/core/internal/client";import{v as i,u as c,g as e}from"./index2.js";import{R as f,F as r}from"./reactive-controller.js";import{j as h}from"./utils.js";const v=()=>`.sc-z-offcanvas-h{font-family:var(--font-family-sans);font-weight:var(--font-rg)}[variant="pushcontent"].sc-z-offcanvas-h:not([transitiondirection="up"]){overflow:hidden}.canvas-container.sc-z-offcanvas{display:flex;overflow:hidden;min-width:100%;height:100%;background:var(--color-surface01);transform:translateX(0);transition:transform 0.4s ease-out}.sc-z-offcanvas-h>*.sc-z-offcanvas{position:fixed;top:var(--z-offcanvas--top-space, 0);right:0;bottom:0;left:0}[open].sc-z-offcanvas-h>*.sc-z-offcanvas{height:calc(100% - var(--z-offcanvas--top-space, 0px))}[transitiondirection="right"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{transform:translateX(-100%)}[transitiondirection="left"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{transform:translateX(100%)}[open][transitiondirection="right"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas,[open][transitiondirection="left"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{transform:translateX(0)}[transitiondirection="up"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{top:auto;bottom:0;height:var(--z-offcanvas--container-height, 90%);transform:translateY(100%)}[transitiondirection="up"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas,[variant="overlay"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{z-index:1001}[open][transitiondirection="up"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{transform:translateY(0)}[variant="pushcontent"].sc-z-offcanvas-h:not([transitiondirection="up"])>.canvas-container.sc-z-offcanvas{position:relative;height:100%}[variant="pushcontent"].sc-z-offcanvas-h:not([open]){display:none}[skip-animation].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{transition:none}.backdrop.sc-z-offcanvas{z-index:1000;width:100%;height:100%;background-color:var(--gray900);opacity:0;pointer-events:none;transition:opacity 0.4s ease-out}[open].sc-z-offcanvas-h>.backdrop.sc-z-offcanvas{opacity:0.7;pointer-events:unset}.canvas-container.sc-z-offcanvas>.canvas-content.sc-z-offcanvas{overflow:hidden auto;flex:1 auto;padding:0 calc(var(--space-unit) * 2);margin:calc(var(--space-unit) * 2) calc(var(--space-unit) / 2) calc(var(--space-unit) * 2) 0;outline:none}@media (min-width: 768px){[variant="pushcontent"].sc-z-offcanvas-h:not([transitiondirection="up"]){flex:none}.canvas-container.sc-z-offcanvas{width:var(--z-offcanvas--container-width, 375px);min-width:var(--z-offcanvas--container-width, 375px)}[transitiondirection="up"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{width:100%}[transitiondirection="right"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{right:auto;left:0}[transitiondirection="left"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{right:0;left:auto}}`;const l=a(class a extends f{constructor(a){super(false);if(a!==false){this.__registerHost()}this.canvasOpenStatusChanged=n(this,"canvasOpenStatusChanged",7);this.variant=i.PUSHCONTENT;this.open=false;this.transitiondirection=c.LEFT;this.skipLoadAnimation=false;this.showBackdrop=true;this.skipAnimation=false;this.focusTrapController=new r(this,{fallbackFocus:()=>this.canvasContent,isActive:()=>this.open&&this.variant===i.OVERLAY})}handleKeyDown(a){if(!this.open||this.variant!==i.OVERLAY){return}if(a.key===e.ESC){a.preventDefault();this.open=false;return}this.focusTrapController.handleWrapTab(a)}handlePageScroll(){const a=this.variant===i.OVERLAY||this.transitiondirection===c.UP?"overflow-y":"overflow-x";this.host.ownerDocument.body.style[a]=this.open?"hidden":""}onOpenChanged(){this.canvasOpenStatusChanged.emit(this.open);this.handlePageScroll();this.focusTrapController.sync()}componentWillLoad(){if(this.open){this.skipAnimation=true}return super.componentWillLoad()}componentDidRender(){this.skipAnimation=false}componentDidLoad(){if(this.open){this.onOpenChanged()}}disconnectedCallback(){this.handlePageScroll();super.disconnectedCallback()}render(){return t(s,{key:"c3e830f6e06a3f5bfcfa491417b3f4a04c694d22","skip-animation":this.skipAnimation,"aria-hidden":!this.open?"true":null,"aria-modal":this.open&&this.variant===i.OVERLAY?"true":null,role:this.open&&this.variant===i.OVERLAY?"dialog":null},t("div",{key:"70347123fbb93082b6e38ff1de4a6364a4f433fb",class:"canvas-container"},t("div",{key:"ef277c0f8e0fc7c69fbd1c654f67f4ec40aed0ec",class:"canvas-content z-scrollbar",ref:a=>this.canvasContent=a,tabIndex:h(this.host).length?undefined:-1},t("slot",{key:"1a2a5ff0fba5b2eae9dc90af4a0a238007008e11",name:"canvasContent"}))),(this.variant==i.OVERLAY||this.transitiondirection===c.UP)&&this.showBackdrop&&t("div",{key:"fbe7fb00cfcc67e3021fbb50ab042a22d0cc5053",class:"backdrop",onClick:a=>{a.preventDefault();a.stopPropagation();this.open=false}}))}get host(){return this}static get watchers(){return{variant:[{handlePageScroll:1}],open:[{onOpenChanged:0}]}}static get style(){return v()}},[774,"z-offcanvas",{variant:[513],open:[1540],transitiondirection:[513],skipLoadAnimation:[4,"skip-load-animation"],showBackdrop:[4,"show-backdrop"],skipAnimation:[32]},[[4,"keydown","handleKeyDown"]],{variant:[{handlePageScroll:1}],open:[{onOpenChanged:0}]}]);function d(){if(typeof customElements==="undefined"){return}const a=["z-offcanvas"];a.forEach((a=>{switch(a){case"z-offcanvas":if(!customElements.get(o(a))){customElements.define(o(a),l)}break}}))}export{l as Z,d};
2
2
  //# sourceMappingURL=index11.js.map
@@ -1,2 +1,2 @@
1
- import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as s,Host as o,transformTag as n}from"@stencil/core/internal/client";import{e as a,B as r,g as l}from"./index2.js";import{r as h,n as d}from"./utils.js";import{d as f}from"./index4.js";import{d as b}from"./index5.js";import{d as c}from"./index3.js";import{d as g}from"./index6.js";import{d as v}from"./index7.js";import{d as m}from"./index8.js";import{d as p}from"./index9.js";import{d as u}from"./index10.js";import{d as z}from"./index13.js";const w=()=>`:host{--z-searchbar-tag-text-color:var(--color-primary03);--z-searchbar-tag-bg:var(--color-hover-primary);--z-searchbar-item-height:2.75rem;z-index:15;display:flex;align-items:flex-end;column-gap:calc(var(--space-unit) * 2);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host,*,::after,::before{box-sizing:border-box}.input-container{position:relative;display:flex;width:100%;flex-direction:column}.input-container z-input{z-index:1}.results{--item-icon-size:1rem;--z-icon-height:var(--item-icon-size);--z-icon-width:var(--item-icon-size);--item-inline-padding:calc(var(--space-unit) * 1.5);--item-col-gap:var(--space-unit);position:absolute;top:calc(100% - 1px);left:0;overflow:auto;width:100%;max-height:var(--z-searchbar-results-height, 540px);border:var(--border-size-small) solid var(--color-form-surface03);border-top:none;background:var(--color-form-background)}.results z-list-element{--background-color-list-element:var(--color-form-background);position:relative;display:block}.results>z-list>z-list-element::part(list-item-container){padding:0 var(--item-inline-padding)}.results z-list-element>.list-item{position:relative;display:flex;align-items:center;padding:calc(var(--space-unit) * 1.25) calc(var(--space-unit) / 4);background-color:transparent;color:var(--color-form-default-text);fill:var(--color-form-default-icon);gap:var(--item-col-gap)}.results z-list-element>.list-item:hover{background-color:var(--gray100);cursor:pointer}.results z-list-element>.list-item:focus-visible{z-index:1;box-shadow:var(--shadow-focus-primary);outline:none}.results>z-list>z-list-element:not(:last-child)>.list-item,.results z-list-group:not(:last-child)>z-list-element:not(.category-heading){border-bottom:1px solid var(--color-form-surface03)}.results z-list-group{padding:0 var(--item-inline-padding)}.results z-list-group>z-list-element::part(list-item-container){padding:0}.results .sub-list{padding-left:calc(var(--item-icon-size) + var(--item-col-gap))}.results .sub-list z-list-element::part(list-item-container){padding:0}.results .sub-list z-list-element>.list-item{position:relative}.results .sub-list>z-list-element:not(:last-child)::before,.results .sub-list>z-list-element>.list-item::before{position:absolute;top:0;left:calc(0px - var(--item-col-gap) - var(--item-icon-size) / 2 + 1px);border-left:1px solid var(--color-form-surface03);content:""}.results .sub-list>z-list-element:not(:last-child)::before{top:-4px;height:calc(100% + 4px)}.results .sub-list z-list-element>.list-item::before{width:14px;height:calc(var(--z-searchbar-item-height) / 2);border-bottom:1px solid var(--color-form-surface03)}.results .category-heading>.category{font-style:italic}.results .category-heading>.subcategory{text-transform:uppercase}.results z-list-element>.list-item .ellipsis{overflow:hidden}.results .ellipsis>.item-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.results .item-label mark{background:var(--color-primary03);color:var(--color-default-text)}.results .list-item>z-tag{--z-tag-bg:var(--z-searchbar-tag-bg);--z-tag-text-color:var(--z-searchbar-tag-text-color);margin-left:auto;white-space:nowrap}.results .item-show-all{width:100%;color:var(--color-primary01);cursor:pointer;text-align:center}.results .item-no-results{display:block;padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 0.5);font-style:italic}.results .item-no-results>ul{padding-left:calc(var(--space-unit) * 2);margin:var(--space-unit)}@media (min-width: 768px){.results{--item-icon-size:1.125rem}}`;const y=()=>`.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}`;const k=()=>`.z-scrollbar::-webkit-scrollbar{width:6px;background:linear-gradient(to right, transparent 0 1px, var(--gray200) 1px 5px, transparent 5px 6px)}.z-scrollbar::-webkit-scrollbar-thumb{background-color:var(--color-primary01)}.z-scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}:host([theme="dark"]) .z-scrollbar,.z-scrollbar--dark{--z-scrollbar-track-gradient:linear-gradient( to right, transparent 0 1px, var(--gray600) 1px 5px, transparent 5px 6px );--z-scrollbar-track-color:var(--gray600);--z-scrollbar-thumb-color:var(--color-primary03);--z-scrollbar-thumb-hover-color:var(--color-hover-primary);--z-scrollbar-corner-color:transparent}@supports not selector(.z-scrollbar::-webkit-scrollbar-track){.z-scrollbar{scrollbar-color:var(--color-primary01) transparent}:host([theme="dark"]) .z-scrollbar,.z-scrollbar--dark{scrollbar-color:var(--z-scrollbar-thumb-color, var(--color-primary03)) var(--z-scrollbar-track-color, var(--gray600))}}`;const x=()=>`: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)}`;const C=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.searchSubmit=i(this,"searchSubmit",7);this.searchTyping=i(this,"searchTyping",7);this.searchItemClick=i(this,"searchItemClick",7);this.htmlid=`searchbar-${h()}`;this.preventSubmit=false;this.autocomplete=false;this.autocompleteMinChars=3;this.searchHelperLabel="Cerca {searchString}";this.sortResultsItems=false;this.showSearchButton=false;this.searchButtonIconOnly=false;this.searchButtonLabel="CERCA";this.size=a.BIG;this.variant=r.PRIMARY;this.searchString=this.value;this.currResultsCount=this.resultsCount;this.showResults=false;this.isMobile=false;this.resultsItemsList=null}emitSearchItemClick(t){this.searchItemClick.emit(t);this.selectedItem=t;this.searchString=""}emitSearchSubmit(){this.searchSubmit.emit(this.inputRef.value)}watchItems(){this.resultsItemsList=this.getResultsItemsList()}watchResultsCount(){this.currResultsCount=this.resultsCount}watchValue(){this.searchString=this.value}watchSearchString(){this.searchTyping.emit(this.searchString);if(!this.searchString){this.currResultsCount=this.resultsCount}}getResultsItemsList(){return typeof this.resultsItems==="string"?JSON.parse(this.resultsItems):this.resultsItems}getGroupedItems(){const t={};this.resultsItemsList.forEach((e=>{var i;const s=`${e===null||e===void 0?void 0:e.category}${e===null||e===void 0?void 0:e.subcategory}`;t[s]=(i=t[s])!==null&&i!==void 0?i:{category:e===null||e===void 0?void 0:e.category,subcategory:e===null||e===void 0?void 0:e.subcategory,items:[]};t[s]["items"].push(e)}));if(this.sortResultsItems){return Object.keys(t).sort().reduce(((e,i)=>{e[i]=Object.assign(Object.assign({},t[i]),{items:t[i]["items"].sort(((t,e)=>{const i=t.label.toUpperCase();const s=e.label.toUpperCase();if(i<s){return-1}if(i>s){return 1}return 0}))});return e}),{})}return t}onListItemKeyDown(t,e){if(t.key===l.ENTER){t.preventDefault();this.emitSearchItemClick(e);return}this.handleArrowsNavigation(t)}onSearchHelperKeyDown(t){if(t.key===l.ENTER){t.preventDefault();this.emitSearchSubmit();return}this.handleArrowsNavigation(t)}handleArrowsNavigation(t){var e,i,s,o,n,a;if(![l.ARROW_DOWN,l.ARROW_UP].includes(t.key)){return}const r=t.target;const h=Array.from((i=(e=this.host.shadowRoot)===null||e===void 0?void 0:e.querySelectorAll("z-list .list-item"))!==null&&i!==void 0?i:[]);const d=h.indexOf(r);if(t.key===l.ARROW_DOWN){t.preventDefault();const e=d+1;if(e<h.length){h[e].focus()}}if(t.key===l.ARROW_UP){t.preventDefault();const e=d-1;if(e<0){(o=(s=this.host.shadowRoot)===null||s===void 0?void 0:s.querySelector("input"))===null||o===void 0?void 0:o.focus();(a=(n=this.host.shadowRoot)===null||n===void 0?void 0:n.querySelector("input"))===null||a===void 0?void 0:a.setSelectionRange(this.inputRef.value.length,this.inputRef.value.length)}if(e>=0){h[e].focus()}}}handleStopTyping(t){t.stopPropagation();this.searchString=t.detail.value;this.selectedItem=undefined}handleSubmit(){if(this.preventSubmit){return}this.emitSearchSubmit()}handleOutsideClick(t){const e=t.composedPath();if(e.includes(this.host)){return}this.showResults=false}componentWillLoad(){this.resultsItemsList=this.getResultsItemsList();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;(t=this.mql)===null||t===void 0?void 0:t.removeEventListener("change",this.onMobileViewChange)}renderItemLabel(t){if(!this.searchString){return t}return t.replace(new RegExp(this.searchString.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gmi"),(t=>`<mark>${t}</mark>`))}renderItem(t,e){var i;return s("z-list-element",{id:`list-item-${this.htmlid}-${e}`,role:"presentation",htmlTabindex:-1,onKeyDown:e=>this.onListItemKeyDown(e,t),onClick:()=>this.emitSearchItemClick(t)},s("div",{class:"list-item ellipsis",role:"option",tabindex:0},!!(t===null||t===void 0?void 0:t.icon)&&s("z-icon",{class:"item-icon",name:t.icon}),s("div",{class:"item-label body-3 mobile-body-4",title:t.label,innerHTML:this.renderItemLabel(t.label)}),!!(t===null||t===void 0?void 0:t.tag)&&s("z-tag",{icon:t.tag.icon},!this.isMobile?t.tag.text:"")),!!((i=t.children)===null||i===void 0?void 0:i.length)&&s("z-list",{class:"sub-list",role:"group","aria-label":t.label||undefined},t.children.map(((t,e)=>this.renderItem(t,e)))))}renderItemGroups(){var t;if(!((t=this.resultsItemsList)===null||t===void 0?void 0:t.length)){return}const e=Object.values(this.getGroupedItems());const i=[];const o=!!this.currResultsCount;let n=0;for(const t of e){const e=o?this.currResultsCount-n:t.items.length;if(e<=0){break}const a=t.items.slice(0,e);const r=a.map(((t,e)=>this.renderItem(t,e)));n+=r.length;if(!r.length){continue}const l=[t.category,t.subcategory].filter(Boolean).join(" ");i.push(s("z-list-group",{"aria-label":l||undefined},t.category&&s("z-list-element",{class:"category-heading body-3 mobile-body-4",slot:"header-title",role:"presentation",htmlTabindex:-1},s("div",{class:"category"},t.category),t.subcategory&&s("div",{class:"subcategory"},t.subcategory)),r))}return i}render(){var t,e,i,n,a;return s(o,{key:"666eb25b14ff2ad53ad24a804429a5d5c7fb9921",onFocus:()=>this.showResults=true,onClick:t=>this.handleOutsideClick(t),class:{"has-submit":!!this.showSearchButton,"has-results":!!this.autocomplete}},s("div",{key:"3bfc445797d517674f8fd359ebe78bd6a6bb67dc",class:"input-container"},s("z-input",{key:"a5332cea9ad170b49d0091290db492bc0109aec9",ref:t=>this.inputRef=t,htmlid:`input-${this.htmlid}`,message:false,placeholder:this.placeholder,onStopTyping:t=>this.handleStopTyping(t),onKeyUp:t=>{d(t,(()=>this.handleSubmit()));this.handleArrowsNavigation(t)},onFocus:()=>this.showResults=true,value:this.searchString||((t=this.selectedItem)===null||t===void 0?void 0:t.label),size:this.size,label:this.label,"aria-label":this.htmlAriaLabel||this.placeholder||undefined}),!!(this.showResults&&this.autocomplete&&this.searchString&&this.searchString.length>=this.autocompleteMinChars&&this.resultsItemsList)&&s("div",{key:"9a36f0021f7a52bc36fc9823a747820e188074ec",class:"results z-scrollbar"},this.preventSubmit&&!((e=this.resultsItemsList)===null||e===void 0?void 0:e.length)?s("div",{class:"item-no-results body-3 mobile-body-4"},"Non abbiamo trovato risultati per ",s("b",null,this.searchString),s("br",null),s("br",null),"Cosa puoi fare?",s("ul",null,s("li",null,"Verificare di aver scritto bene"),s("li",null,"Provare a cercare un'altra parola"),s("li",null,"Provare a cercare qualcosa di più generico"))):s("z-list",{role:"listbox",id:`list-${this.htmlid}`,"aria-label":this.htmlAriaLabel||this.label||undefined},this.autocomplete&&!this.preventSubmit&&!!this.searchString&&s("z-list-element",{role:"presentation",htmlTabindex:-1,id:`list-item-${this.htmlid}-search`,onKeyDown:t=>this.onSearchHelperKeyDown(t),onClick:()=>this.emitSearchSubmit()},s("div",{class:"list-item item-search",role:"option",tabindex:0},s("z-icon",{class:"search-icon",name:"left-magnifying-glass"}),s("div",{class:"item-label body-3 mobile-body-4",innerHTML:(i=this.searchHelperLabel)===null||i===void 0?void 0:i.replace("{searchString}",`<mark>${this.searchString}</mark>`)}))),this.renderItemGroups(),!!(this.searchString&&((n=this.resultsItemsList)===null||n===void 0?void 0:n.length)&&this.currResultsCount&&this.currResultsCount<((a=this.resultsItemsList)===null||a===void 0?void 0:a.length))&&s("z-list-element",{role:"presentation",htmlTabindex:-1,id:`list-item-${this.htmlid}-show-all`},s("div",{role:"option",class:"item-show-all body-3 mobile-body-4",tabindex:0,onClick:()=>this.currResultsCount=undefined},"Vedi tutti i risultati"))))),this.showSearchButton&&s("z-button",{key:"c1633f9f99c0503301562f8f3828f965b075cb51",icon:this.searchButtonIconOnly?"search":undefined,"aria-label":this.searchButtonIconOnly?this.searchButtonLabel.trim()||"CERCA":undefined,disabled:!!this.preventSubmit,variant:this.variant,size:this.size,onClick:()=>this.handleSubmit()},this.searchButtonIconOnly?"":this.searchButtonLabel.trim()||"CERCA"))}get host(){return this}static get watchers(){return{resultsItems:[{watchItems:0}],resultsCount:[{watchResultsCount:0}],value:[{watchValue:0}],searchString:[{watchSearchString:0}]}}static get style(){return w()+(y()+(k()+x()))}},[1,"z-searchbar",{htmlid:[513],preventSubmit:[4,"prevent-submit"],label:[1],htmlAriaLabel:[1,"html-aria-label"],value:[1],placeholder:[1],autocomplete:[4],autocompleteMinChars:[2,"autocomplete-min-chars"],resultsCount:[2,"results-count"],searchHelperLabel:[1,"search-helper-label"],resultsItems:[1,"results-items"],sortResultsItems:[4,"sort-results-items"],showSearchButton:[4,"show-search-button"],searchButtonIconOnly:[4,"search-button-icon-only"],searchButtonLabel:[1,"search-button-label"],size:[1],variant:[1],searchString:[32],currResultsCount:[32],showResults:[32],isMobile:[32],selectedItem:[32]},[[4,"click","handleOutsideClick"]],{resultsItems:[{watchItems:0}],resultsCount:[{watchResultsCount:0}],value:[{watchValue:0}],searchString:[{watchSearchString:0}]}]);function S(){if(typeof customElements==="undefined"){return}const t=["z-searchbar","z-button","z-divider","z-icon","z-input","z-input-message","z-list","z-list-element","z-list-group","z-tag"];t.forEach((t=>{switch(t){case"z-searchbar":if(!customElements.get(n(t))){customElements.define(n(t),C)}break;case"z-button":if(!customElements.get(n(t))){f()}break;case"z-divider":if(!customElements.get(n(t))){b()}break;case"z-icon":if(!customElements.get(n(t))){c()}break;case"z-input":if(!customElements.get(n(t))){g()}break;case"z-input-message":if(!customElements.get(n(t))){v()}break;case"z-list":if(!customElements.get(n(t))){m()}break;case"z-list-element":if(!customElements.get(n(t))){p()}break;case"z-list-group":if(!customElements.get(n(t))){u()}break;case"z-tag":if(!customElements.get(n(t))){z()}break}}))}export{C as Z,S as d};
1
+ import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as s,Host as o,transformTag as n}from"@stencil/core/internal/client";import{e as a,B as r,g as l}from"./index2.js";import{r as h,n as d}from"./utils.js";import{d as f}from"./index4.js";import{d as c}from"./index5.js";import{d as b}from"./index3.js";import{d as g}from"./index6.js";import{d as v}from"./index7.js";import{d as m}from"./index8.js";import{d as p}from"./index9.js";import{d as u}from"./index10.js";import{d as z}from"./index13.js";const w=()=>`:host{--z-searchbar-tag-text-color:var(--color-primary03);--z-searchbar-tag-bg:var(--color-hover-primary);--z-searchbar-item-height:2.75rem;z-index:15;display:flex;align-items:flex-end;column-gap:calc(var(--space-unit) * 2);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host,*,::after,::before{box-sizing:border-box}.input-container{position:relative;display:flex;width:100%;flex-direction:column}.input-container z-input{z-index:1}.results{--item-icon-size:1rem;--z-icon-height:var(--item-icon-size);--z-icon-width:var(--item-icon-size);--item-inline-padding:calc(var(--space-unit) * 1.5);--item-col-gap:var(--space-unit);position:absolute;top:calc(100% - 1px);left:0;overflow:auto;width:100%;max-height:var(--z-searchbar-results-height, 540px);border:var(--border-size-small) solid var(--color-form-surface03);border-top:none;background:var(--color-form-background)}.results z-list-element{--background-color-list-element:var(--color-form-background);position:relative;display:block}.results>z-list>z-list-element::part(list-item-container){padding:0 var(--item-inline-padding)}.results z-list-element>.list-item{position:relative;display:flex;align-items:center;padding:calc(var(--space-unit) * 1.25) calc(var(--space-unit) / 4);background-color:transparent;color:var(--color-form-default-text);fill:var(--color-form-default-icon);gap:var(--item-col-gap)}.results z-list-element>.list-item:hover{background-color:var(--gray100);cursor:pointer}.results z-list-element>.list-item:focus-visible{z-index:1;box-shadow:var(--shadow-focus-primary);outline:none}.results>z-list>z-list-element:not(:last-child)>.list-item,.results z-list-group:not(:last-child)>z-list-element:not(.category-heading){border-bottom:1px solid var(--color-form-surface03)}.results z-list-group{padding:0 var(--item-inline-padding)}.results z-list-group>z-list-element::part(list-item-container){padding:0}.results .sub-list{padding-left:calc(var(--item-icon-size) + var(--item-col-gap))}.results .sub-list z-list-element::part(list-item-container){padding:0}.results .sub-list z-list-element>.list-item{position:relative}.results .sub-list>z-list-element:not(:last-child)::before,.results .sub-list>z-list-element>.list-item::before{position:absolute;top:0;left:calc(0px - var(--item-col-gap) - var(--item-icon-size) / 2 + 1px);border-left:1px solid var(--color-form-surface03);content:""}.results .sub-list>z-list-element:not(:last-child)::before{top:-4px;height:calc(100% + 4px)}.results .sub-list z-list-element>.list-item::before{width:14px;height:calc(var(--z-searchbar-item-height) / 2);border-bottom:1px solid var(--color-form-surface03)}.results .category-heading>.category{font-style:italic}.results .category-heading>.subcategory{text-transform:uppercase}.results z-list-element>.list-item .ellipsis{overflow:hidden}.results .ellipsis>.item-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.results .item-label mark{background:var(--color-primary03);color:var(--color-default-text)}.results .list-item>z-tag{--z-tag-bg:var(--z-searchbar-tag-bg);--z-tag-text-color:var(--z-searchbar-tag-text-color);margin-left:auto;white-space:nowrap}.results .item-show-all{width:100%;color:var(--color-primary01);cursor:pointer;text-align:center}.results .item-no-results{display:block;padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 0.5);font-style:italic}.results .item-no-results>ul{padding-left:calc(var(--space-unit) * 2);margin:var(--space-unit)}@media (min-width: 768px){.results{--item-icon-size:1.125rem}}`;const y=()=>`.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}`;const k=()=>`.z-scrollbar::-webkit-scrollbar{width:6px;background:linear-gradient(to right, transparent 0 1px, var(--gray200) 1px 5px, transparent 5px 6px)}.z-scrollbar::-webkit-scrollbar-thumb{background-color:var(--color-primary01)}.z-scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}:host([theme="dark"]) .z-scrollbar,.z-scrollbar--dark{--z-scrollbar-track-gradient:linear-gradient( to right, transparent 0 1px, var(--gray600) 1px 5px, transparent 5px 6px );--z-scrollbar-track-color:var(--gray600);--z-scrollbar-thumb-color:var(--color-primary03);--z-scrollbar-thumb-hover-color:var(--color-hover-primary);--z-scrollbar-corner-color:transparent}@supports not selector(.z-scrollbar::-webkit-scrollbar-track){.z-scrollbar{scrollbar-color:var(--color-primary01) transparent}:host([theme="dark"]) .z-scrollbar,.z-scrollbar--dark{scrollbar-color:var(--z-scrollbar-thumb-color, var(--color-primary03)) var(--z-scrollbar-track-color, var(--gray600))}}`;const x=()=>`: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)}`;const C=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.searchSubmit=i(this,"searchSubmit",7);this.searchTyping=i(this,"searchTyping",7);this.searchItemClick=i(this,"searchItemClick",7);this.htmlid=`searchbar-${h()}`;this.preventSubmit=false;this.autocomplete=false;this.autocompleteMinChars=3;this.searchHelperLabel="Cerca {searchString}";this.sortResultsItems=false;this.showSearchButton=false;this.searchButtonIconOnly=false;this.searchButtonLabel="CERCA";this.size=a.BIG;this.variant=r.PRIMARY;this.searchString=this.value;this.currResultsCount=this.resultsCount;this.showResults=false;this.isMobile=false;this.resultsItemsList=null}emitSearchItemClick(t){this.searchItemClick.emit(t);this.selectedItem=t;this.searchString=""}emitSearchSubmit(){this.searchSubmit.emit(this.inputRef.value)}watchItems(){this.resultsItemsList=this.getResultsItemsList()}watchResultsCount(){this.currResultsCount=this.resultsCount}watchValue(){this.searchString=this.value}watchSearchString(){this.searchTyping.emit(this.searchString);if(!this.searchString){this.currResultsCount=this.resultsCount}}getResultsItemsList(){return typeof this.resultsItems==="string"?JSON.parse(this.resultsItems):this.resultsItems}getGroupedItems(){const t={};this.resultsItemsList.forEach((e=>{var i;const s=`${e===null||e===void 0?void 0:e.category}${e===null||e===void 0?void 0:e.subcategory}`;t[s]=(i=t[s])!==null&&i!==void 0?i:{category:e===null||e===void 0?void 0:e.category,subcategory:e===null||e===void 0?void 0:e.subcategory,items:[]};t[s]["items"].push(e)}));if(this.sortResultsItems){return Object.keys(t).sort().reduce(((e,i)=>{e[i]=Object.assign(Object.assign({},t[i]),{items:t[i]["items"].sort(((t,e)=>{const i=t.label.toUpperCase();const s=e.label.toUpperCase();if(i<s){return-1}if(i>s){return 1}return 0}))});return e}),{})}return t}onListItemKeyDown(t,e){if(t.key===l.ENTER){t.preventDefault();this.emitSearchItemClick(e);return}this.handleArrowsNavigation(t)}onSearchHelperKeyDown(t){if(t.key===l.ENTER){t.preventDefault();this.emitSearchSubmit();return}this.handleArrowsNavigation(t)}handleArrowsNavigation(t){var e,i,s,o,n,a;if(![l.ARROW_DOWN,l.ARROW_UP].includes(t.key)){return}const r=t.target;const h=Array.from((i=(e=this.host.shadowRoot)===null||e===void 0?void 0:e.querySelectorAll("z-list .list-item"))!==null&&i!==void 0?i:[]);const d=h.indexOf(r);if(t.key===l.ARROW_DOWN){t.preventDefault();const e=d+1;if(e<h.length){h[e].focus()}}if(t.key===l.ARROW_UP){t.preventDefault();const e=d-1;if(e<0){(o=(s=this.host.shadowRoot)===null||s===void 0?void 0:s.querySelector("input"))===null||o===void 0?void 0:o.focus();(a=(n=this.host.shadowRoot)===null||n===void 0?void 0:n.querySelector("input"))===null||a===void 0?void 0:a.setSelectionRange(this.inputRef.value.length,this.inputRef.value.length)}if(e>=0){h[e].focus()}}}handleStopTyping(t){t.stopPropagation();this.searchString=t.detail.value;this.selectedItem=undefined}handleSubmit(){if(this.preventSubmit){return}this.emitSearchSubmit()}handleOutsideClick(t){const e=t.composedPath();if(e.includes(this.host)){return}this.showResults=false}componentWillLoad(){this.resultsItemsList=this.getResultsItemsList();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;(t=this.mql)===null||t===void 0?void 0:t.removeEventListener("change",this.onMobileViewChange)}renderItemLabel(t){if(!this.searchString){return t}return t.replace(new RegExp(this.searchString.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gmi"),(t=>`<mark>${t}</mark>`))}renderItem(t,e){var i;return s("z-list-element",{id:`list-item-${this.htmlid}-${e}`,role:"presentation",htmlTabindex:-1,onKeyDown:e=>this.onListItemKeyDown(e,t),onClick:e=>{e.stopPropagation();this.emitSearchItemClick(t)}},s("div",{class:"list-item ellipsis",role:"option",tabindex:0},!!(t===null||t===void 0?void 0:t.icon)&&s("z-icon",{class:"item-icon",name:t.icon}),s("div",{class:"item-label body-3 mobile-body-4",title:t.label,innerHTML:this.renderItemLabel(t.label)}),!!(t===null||t===void 0?void 0:t.tag)&&s("z-tag",{icon:t.tag.icon},!this.isMobile?t.tag.text:"")),!!((i=t.children)===null||i===void 0?void 0:i.length)&&s("z-list",{class:"sub-list",role:"group","aria-label":t.label||undefined},t.children.map(((t,e)=>this.renderItem(t,e)))))}renderItemGroups(){var t;if(!((t=this.resultsItemsList)===null||t===void 0?void 0:t.length)){return}const e=Object.values(this.getGroupedItems());const i=[];const o=!!this.currResultsCount;let n=0;for(const t of e){const e=o?this.currResultsCount-n:t.items.length;if(e<=0){break}const a=t.items.slice(0,e);const r=a.map(((t,e)=>this.renderItem(t,e)));n+=r.length;if(!r.length){continue}const l=[t.category,t.subcategory].filter(Boolean).join(" ");i.push(s("z-list-group",{"aria-label":l||undefined},t.category&&s("z-list-element",{class:"category-heading body-3 mobile-body-4",slot:"header-title",role:"presentation",htmlTabindex:-1},s("div",{class:"category"},t.category),t.subcategory&&s("div",{class:"subcategory"},t.subcategory)),r))}return i}render(){var t,e,i,n,a;return s(o,{key:"82c926179762db33e8d1c425cac474affd59fea6",onFocus:()=>this.showResults=true,onClick:t=>this.handleOutsideClick(t),class:{"has-submit":!!this.showSearchButton,"has-results":!!this.autocomplete}},s("div",{key:"689d1cda6b0c217e5afe892627f31100858c1a72",class:"input-container"},s("z-input",{key:"d596769c9a346c4548c5b71d10bbe9b2456556ee",ref:t=>this.inputRef=t,htmlid:`input-${this.htmlid}`,message:false,placeholder:this.placeholder,onStopTyping:t=>this.handleStopTyping(t),onKeyUp:t=>{d(t,(()=>this.handleSubmit()));this.handleArrowsNavigation(t)},onFocus:()=>this.showResults=true,value:this.searchString||((t=this.selectedItem)===null||t===void 0?void 0:t.label),size:this.size,label:this.label,"aria-label":this.htmlAriaLabel||this.placeholder||undefined}),!!(this.showResults&&this.autocomplete&&this.searchString&&this.searchString.length>=this.autocompleteMinChars&&this.resultsItemsList)&&s("div",{key:"954f6984c04ba133c1637220ed47e778d7440e22",class:"results z-scrollbar"},this.preventSubmit&&!((e=this.resultsItemsList)===null||e===void 0?void 0:e.length)?s("div",{class:"item-no-results body-3 mobile-body-4"},"Non abbiamo trovato risultati per ",s("b",null,this.searchString),s("br",null),s("br",null),"Cosa puoi fare?",s("ul",null,s("li",null,"Verificare di aver scritto bene"),s("li",null,"Provare a cercare un'altra parola"),s("li",null,"Provare a cercare qualcosa di più generico"))):s("z-list",{role:"listbox",id:`list-${this.htmlid}`,"aria-label":this.htmlAriaLabel||this.label||undefined},this.autocomplete&&!this.preventSubmit&&!!this.searchString&&s("z-list-element",{role:"presentation",htmlTabindex:-1,id:`list-item-${this.htmlid}-search`,onKeyDown:t=>this.onSearchHelperKeyDown(t),onClick:()=>this.emitSearchSubmit()},s("div",{class:"list-item item-search",role:"option",tabindex:0},s("z-icon",{class:"search-icon",name:"left-magnifying-glass"}),s("div",{class:"item-label body-3 mobile-body-4",innerHTML:(i=this.searchHelperLabel)===null||i===void 0?void 0:i.replace("{searchString}",`<mark>${this.searchString}</mark>`)}))),this.renderItemGroups(),!!(this.searchString&&((n=this.resultsItemsList)===null||n===void 0?void 0:n.length)&&this.currResultsCount&&this.currResultsCount<((a=this.resultsItemsList)===null||a===void 0?void 0:a.length))&&s("z-list-element",{role:"presentation",htmlTabindex:-1,id:`list-item-${this.htmlid}-show-all`},s("div",{role:"option",class:"item-show-all body-3 mobile-body-4",tabindex:0,onClick:()=>this.currResultsCount=undefined},"Vedi tutti i risultati"))))),this.showSearchButton&&s("z-button",{key:"898d0c61de5c60e3e78be3b2336c1cbb4adcc3e3",icon:this.searchButtonIconOnly?"search":undefined,"aria-label":this.searchButtonIconOnly?this.searchButtonLabel.trim()||"CERCA":undefined,disabled:!!this.preventSubmit,variant:this.variant,size:this.size,onClick:()=>this.handleSubmit()},this.searchButtonIconOnly?"":this.searchButtonLabel.trim()||"CERCA"))}get host(){return this}static get watchers(){return{resultsItems:[{watchItems:0}],resultsCount:[{watchResultsCount:0}],value:[{watchValue:0}],searchString:[{watchSearchString:0}]}}static get style(){return w()+(y()+(k()+x()))}},[1,"z-searchbar",{htmlid:[513],preventSubmit:[4,"prevent-submit"],label:[1],htmlAriaLabel:[1,"html-aria-label"],value:[1],placeholder:[1],autocomplete:[4],autocompleteMinChars:[2,"autocomplete-min-chars"],resultsCount:[2,"results-count"],searchHelperLabel:[1,"search-helper-label"],resultsItems:[1,"results-items"],sortResultsItems:[4,"sort-results-items"],showSearchButton:[4,"show-search-button"],searchButtonIconOnly:[4,"search-button-icon-only"],searchButtonLabel:[1,"search-button-label"],size:[1],variant:[1],searchString:[32],currResultsCount:[32],showResults:[32],isMobile:[32],selectedItem:[32]},[[4,"click","handleOutsideClick"]],{resultsItems:[{watchItems:0}],resultsCount:[{watchResultsCount:0}],value:[{watchValue:0}],searchString:[{watchSearchString:0}]}]);function S(){if(typeof customElements==="undefined"){return}const t=["z-searchbar","z-button","z-divider","z-icon","z-input","z-input-message","z-list","z-list-element","z-list-group","z-tag"];t.forEach((t=>{switch(t){case"z-searchbar":if(!customElements.get(n(t))){customElements.define(n(t),C)}break;case"z-button":if(!customElements.get(n(t))){f()}break;case"z-divider":if(!customElements.get(n(t))){c()}break;case"z-icon":if(!customElements.get(n(t))){b()}break;case"z-input":if(!customElements.get(n(t))){g()}break;case"z-input-message":if(!customElements.get(n(t))){v()}break;case"z-list":if(!customElements.get(n(t))){m()}break;case"z-list-element":if(!customElements.get(n(t))){p()}break;case"z-list-group":if(!customElements.get(n(t))){u()}break;case"z-tag":if(!customElements.get(n(t))){z()}break}}))}export{C as Z,S as d};
2
2
  //# sourceMappingURL=index12.js.map