@zanichelli/albe-web-components 7.3.4 → 7.3.5

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 (570) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/{breakpoints-776c8868.js → breakpoints-88c4fd6c.js} +1 -1
  3. package/dist/cjs/{icons-dea2e345.js → icons-a9849a41.js} +763 -763
  4. package/dist/cjs/{index-677bbad4.js → index-7a9a8430.js} +317 -317
  5. package/dist/cjs/index.cjs.js +5 -5
  6. package/dist/cjs/{utils-3b7e4fdf.js → utils-305151da.js} +94 -94
  7. package/dist/cjs/{utils-49853b30.js → utils-f460d1c0.js} +75 -75
  8. package/dist/cjs/z-alert.cjs.entry.js +8 -8
  9. package/dist/cjs/z-anchor-navigation.cjs.entry.js +42 -42
  10. package/dist/cjs/z-app-header_11.cjs.entry.js +990 -990
  11. package/dist/cjs/z-aria-alert.cjs.entry.js +10 -10
  12. package/dist/cjs/z-avatar.cjs.entry.js +33 -33
  13. package/dist/cjs/z-body.cjs.entry.js +9 -9
  14. package/dist/cjs/z-button-sort.cjs.entry.js +42 -42
  15. package/dist/cjs/z-card.cjs.entry.js +55 -55
  16. package/dist/cjs/z-carousel.cjs.entry.js +135 -135
  17. package/dist/cjs/z-chip.cjs.entry.js +29 -29
  18. package/dist/cjs/z-combobox.cjs.entry.js +190 -190
  19. package/dist/cjs/z-contextual-menu.cjs.entry.js +35 -35
  20. package/dist/cjs/z-cover-hero.cjs.entry.js +46 -46
  21. package/dist/cjs/z-date-picker.cjs.entry.js +164 -164
  22. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +129 -129
  23. package/dist/cjs/z-file-upload.cjs.entry.js +174 -174
  24. package/dist/cjs/z-file.cjs.entry.js +37 -37
  25. package/dist/cjs/z-ghost-loading.cjs.entry.js +9 -9
  26. package/dist/cjs/z-heading.cjs.entry.js +9 -9
  27. package/dist/cjs/z-info-box.cjs.entry.js +14 -14
  28. package/dist/cjs/z-info-reveal.cjs.entry.js +54 -54
  29. package/dist/cjs/z-link.cjs.entry.js +63 -63
  30. package/dist/cjs/z-logo.cjs.entry.js +15 -15
  31. package/dist/cjs/z-menu-section.cjs.entry.js +43 -43
  32. package/dist/cjs/z-menu.cjs.entry.js +108 -108
  33. package/dist/cjs/z-messages-pocket.cjs.entry.js +36 -36
  34. package/dist/cjs/z-myz-card-alert.cjs.entry.js +52 -52
  35. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +25 -25
  36. package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +8 -8
  37. package/dist/cjs/z-myz-card-footer.cjs.entry.js +58 -58
  38. package/dist/cjs/z-myz-card-icon.cjs.entry.js +12 -12
  39. package/dist/cjs/z-myz-card-info.cjs.entry.js +118 -118
  40. package/dist/cjs/z-myz-card-list.cjs.entry.js +27 -27
  41. package/dist/cjs/z-myz-card_4.cjs.entry.js +82 -82
  42. package/dist/cjs/z-myz-list-item.cjs.entry.js +26 -26
  43. package/dist/cjs/z-myz-list.cjs.entry.js +24 -24
  44. package/dist/cjs/z-navigation-tab-link.cjs.entry.js +60 -60
  45. package/dist/cjs/z-navigation-tab.cjs.entry.js +62 -62
  46. package/dist/cjs/z-navigation-tabs.cjs.entry.js +115 -115
  47. package/dist/cjs/z-notification.cjs.entry.js +30 -30
  48. package/dist/cjs/z-otp.cjs.entry.js +30 -30
  49. package/dist/cjs/z-pagination.cjs.entry.js +219 -219
  50. package/dist/cjs/z-panel-elem.cjs.entry.js +19 -19
  51. package/dist/cjs/z-pocket-message.cjs.entry.js +8 -8
  52. package/dist/cjs/z-pocket_3.cjs.entry.js +102 -102
  53. package/dist/cjs/z-popover.cjs.entry.js +317 -317
  54. package/dist/cjs/z-range-picker.cjs.entry.js +331 -331
  55. package/dist/cjs/z-section-title.cjs.entry.js +22 -22
  56. package/dist/cjs/z-select.cjs.entry.js +322 -322
  57. package/dist/cjs/z-skip-to-content.cjs.entry.js +55 -55
  58. package/dist/cjs/z-slideshow.cjs.entry.js +118 -118
  59. package/dist/cjs/z-stepper-item.cjs.entry.js +11 -11
  60. package/dist/cjs/z-stepper.cjs.entry.js +8 -8
  61. package/dist/cjs/z-table-body.cjs.entry.js +13 -13
  62. package/dist/cjs/z-table-cell.cjs.entry.js +25 -25
  63. package/dist/cjs/z-table-empty-box.cjs.entry.js +21 -21
  64. package/dist/cjs/z-table-expanded-row.cjs.entry.js +8 -8
  65. package/dist/cjs/z-table-footer.cjs.entry.js +12 -12
  66. package/dist/cjs/z-table-head.cjs.entry.js +12 -12
  67. package/dist/cjs/z-table-header-row.cjs.entry.js +11 -11
  68. package/dist/cjs/z-table-header.cjs.entry.js +71 -71
  69. package/dist/cjs/z-table-row.cjs.entry.js +32 -32
  70. package/dist/cjs/z-table-sticky-footer.cjs.entry.js +8 -8
  71. package/dist/cjs/z-table.cjs.entry.js +69 -69
  72. package/dist/cjs/z-tag.cjs.entry.js +11 -11
  73. package/dist/cjs/z-toast-notification-list.cjs.entry.js +45 -45
  74. package/dist/cjs/z-toast-notification.cjs.entry.js +187 -187
  75. package/dist/cjs/z-toggle-button.cjs.entry.js +25 -25
  76. package/dist/cjs/z-toggle-switch.cjs.entry.js +40 -40
  77. package/dist/cjs/z-tooltip.cjs.entry.js +26 -26
  78. package/dist/cjs/z-typography.cjs.entry.js +19 -19
  79. package/dist/cjs/z-visually-hidden.cjs.entry.js +8 -8
  80. package/dist/collection/beans/index.js +318 -318
  81. package/dist/collection/components/buttons/z-button/index.js +245 -245
  82. package/dist/collection/components/buttons/z-button/styles.css +149 -149
  83. package/dist/collection/components/buttons/z-button-sort/index.js +220 -220
  84. package/dist/collection/components/buttons/z-button-sort/styles.css +101 -101
  85. package/dist/collection/components/buttons/z-chip/index.js +155 -155
  86. package/dist/collection/components/buttons/z-chip/styles.css +138 -138
  87. package/dist/collection/components/buttons/z-toggle-button/index.js +146 -146
  88. package/dist/collection/components/buttons/z-toggle-button/styles.css +60 -60
  89. package/dist/collection/components/buttons/z-toggle-switch/index.js +144 -144
  90. package/dist/collection/components/buttons/z-toggle-switch/styles.css +104 -104
  91. package/dist/collection/components/date-picker/styles.css +436 -436
  92. package/dist/collection/components/date-picker/utils.js +76 -76
  93. package/dist/collection/components/date-picker/z-date-picker/index.js +295 -295
  94. package/dist/collection/components/date-picker/z-range-picker/index.js +499 -499
  95. package/dist/collection/components/file-upload/z-dragdrop-area/index.js +53 -53
  96. package/dist/collection/components/file-upload/z-dragdrop-area/styles.css +51 -51
  97. package/dist/collection/components/file-upload/z-file/index.js +131 -131
  98. package/dist/collection/components/file-upload/z-file/styles.css +23 -23
  99. package/dist/collection/components/file-upload/z-file-upload/index.js +363 -363
  100. package/dist/collection/components/file-upload/z-file-upload/styles.css +84 -84
  101. package/dist/collection/components/icons/icons.js +764 -764
  102. package/dist/collection/components/icons/z-icon/index.js +114 -114
  103. package/dist/collection/components/icons/z-icon/styles.css +15 -14
  104. package/dist/collection/components/index.js +8 -8
  105. package/dist/collection/components/indicators/z-stepper/index.js +21 -21
  106. package/dist/collection/components/indicators/z-stepper/styles.css +19 -19
  107. package/dist/collection/components/indicators/z-stepper-item/index.js +93 -93
  108. package/dist/collection/components/indicators/z-stepper-item/styles.css +114 -114
  109. package/dist/collection/components/inputs/z-combobox/index.js +570 -570
  110. package/dist/collection/components/inputs/z-combobox/styles.css +197 -197
  111. package/dist/collection/components/inputs/z-input/index.js +764 -764
  112. package/dist/collection/components/inputs/z-input/styles.css +398 -398
  113. package/dist/collection/components/inputs/z-input-message/index.js +89 -89
  114. package/dist/collection/components/inputs/z-input-message/styles.css +48 -48
  115. package/dist/collection/components/inputs/z-searchbar/index.js +599 -599
  116. package/dist/collection/components/inputs/z-searchbar/styles.css +185 -185
  117. package/dist/collection/components/inputs/z-select/index.js +754 -754
  118. package/dist/collection/components/inputs/z-select/styles.css +123 -123
  119. package/dist/collection/components/list/z-list/index.js +91 -91
  120. package/dist/collection/components/list/z-list/styles.css +6 -6
  121. package/dist/collection/components/list/z-list-element/index.js +508 -508
  122. package/dist/collection/components/list/z-list-element/styles.css +121 -121
  123. package/dist/collection/components/list/z-list-group/index.js +175 -175
  124. package/dist/collection/components/list/z-list-group/styles.css +21 -21
  125. package/dist/collection/components/list/z-toast-notification-list/index.js +105 -105
  126. package/dist/collection/components/list/z-toast-notification-list/styles.css +100 -100
  127. package/dist/collection/components/logo/z-logo/index.js +131 -131
  128. package/dist/collection/components/logo/z-logo/styles.css +29 -29
  129. package/dist/collection/components/modal/z-modal/index.js +319 -319
  130. package/dist/collection/components/modal/z-modal/styles.css +198 -198
  131. package/dist/collection/components/navigation/tabs/navigation-tab.css +136 -136
  132. package/dist/collection/components/navigation/tabs/z-navigation-tab/index.js +242 -242
  133. package/dist/collection/components/navigation/tabs/z-navigation-tab-link/index.js +264 -264
  134. package/dist/collection/components/navigation/tabs/z-navigation-tabs/index.js +200 -200
  135. package/dist/collection/components/navigation/tabs/z-navigation-tabs/styles.css +104 -104
  136. package/dist/collection/components/navigation/z-app-header/index.js +428 -428
  137. package/dist/collection/components/navigation/z-app-header/index.stories.js +393 -393
  138. package/dist/collection/components/navigation/z-app-header/styles.css +420 -420
  139. package/dist/collection/components/navigation/z-link/index.js +317 -317
  140. package/dist/collection/components/navigation/z-link/styles.css +167 -167
  141. package/dist/collection/components/navigation/z-menu/index.js +250 -250
  142. package/dist/collection/components/navigation/z-menu/styles.css +213 -213
  143. package/dist/collection/components/navigation/z-menu-section/index.js +125 -125
  144. package/dist/collection/components/navigation/z-menu-section/styles.css +123 -123
  145. package/dist/collection/components/notification/z-info-box/index.js +85 -85
  146. package/dist/collection/components/notification/z-info-box/styles.css +23 -23
  147. package/dist/collection/components/notification/z-notification/index.js +195 -195
  148. package/dist/collection/components/notification/z-notification/styles.css +114 -114
  149. package/dist/collection/components/notification/z-toast-notification/index.js +399 -399
  150. package/dist/collection/components/notification/z-toast-notification/styles.css +254 -254
  151. package/dist/collection/components/notification/z-tooltip/index.js +157 -157
  152. package/dist/collection/components/notification/z-tooltip/styles.css +17 -17
  153. package/dist/collection/components/panel/z-panel-elem/index.js +193 -193
  154. package/dist/collection/components/panel/z-panel-elem/styles.css +39 -39
  155. package/dist/collection/components/z-anchor-navigation/index.js +95 -95
  156. package/dist/collection/components/z-anchor-navigation/styles.css +129 -129
  157. package/dist/collection/components/z-aria-alert/index.js +39 -39
  158. package/dist/collection/components/z-avatar/index.js +142 -142
  159. package/dist/collection/components/z-avatar/styles.css +32 -32
  160. package/dist/collection/components/z-card/index.js +186 -186
  161. package/dist/collection/components/z-card/styles.css +206 -206
  162. package/dist/collection/components/z-carousel/index.js +300 -300
  163. package/dist/collection/components/z-carousel/styles.css +129 -129
  164. package/dist/collection/components/z-contextual-menu/index.js +126 -126
  165. package/dist/collection/components/z-contextual-menu/styles.css +60 -60
  166. package/dist/collection/components/z-cover-hero/index.js +146 -146
  167. package/dist/collection/components/z-cover-hero/styles.css +93 -93
  168. package/dist/collection/components/z-divider/index.js +95 -95
  169. package/dist/collection/components/z-divider/styles.css +37 -37
  170. package/dist/collection/components/z-ghost-loading/index.js +18 -18
  171. package/dist/collection/components/z-ghost-loading/styles.css +34 -34
  172. package/dist/collection/components/z-info-reveal/index.js +147 -147
  173. package/dist/collection/components/z-info-reveal/styles.css +103 -103
  174. package/dist/collection/components/z-offcanvas/index.js +162 -162
  175. package/dist/collection/components/z-offcanvas/styles.css +182 -182
  176. package/dist/collection/components/z-pagination/index.js +435 -435
  177. package/dist/collection/components/z-pagination/styles.css +199 -199
  178. package/dist/collection/components/z-popover/index.js +513 -513
  179. package/dist/collection/components/z-popover/styles.css +147 -147
  180. package/dist/collection/components/z-section-title/index.js +88 -88
  181. package/dist/collection/components/z-section-title/styles.css +44 -44
  182. package/dist/collection/components/z-skip-to-content/index.js +139 -139
  183. package/dist/collection/components/z-skip-to-content/styles.css +80 -80
  184. package/dist/collection/components/z-table/z-table/index.js +352 -352
  185. package/dist/collection/components/z-table/z-table/styles.css +115 -115
  186. package/dist/collection/components/z-table/z-table-body/index.js +23 -23
  187. package/dist/collection/components/z-table/z-table-body/styles.css +9 -9
  188. package/dist/collection/components/z-table/z-table-cell/index.js +86 -86
  189. package/dist/collection/components/z-table/z-table-cell/styles.css +58 -58
  190. package/dist/collection/components/z-table/z-table-empty-box/index.js +72 -72
  191. package/dist/collection/components/z-table/z-table-empty-box/styles.css +38 -38
  192. package/dist/collection/components/z-table/z-table-expanded-row/index.js +39 -39
  193. package/dist/collection/components/z-table/z-table-expanded-row/styles.css +9 -9
  194. package/dist/collection/components/z-table/z-table-footer/index.js +22 -22
  195. package/dist/collection/components/z-table/z-table-footer/styles.css +5 -5
  196. package/dist/collection/components/z-table/z-table-head/index.js +22 -22
  197. package/dist/collection/components/z-table/z-table-head/styles.css +5 -5
  198. package/dist/collection/components/z-table/z-table-header/index.js +238 -238
  199. package/dist/collection/components/z-table/z-table-header/styles.css +71 -71
  200. package/dist/collection/components/z-table/z-table-header-row/index.js +41 -41
  201. package/dist/collection/components/z-table/z-table-header-row/styles.css +13 -13
  202. package/dist/collection/components/z-table/z-table-row/index.js +92 -92
  203. package/dist/collection/components/z-table/z-table-row/styles.css +45 -45
  204. package/dist/collection/components/z-table/z-table-sticky-footer/index.js +21 -21
  205. package/dist/collection/components/z-table/z-table-sticky-footer/styles.css +11 -11
  206. package/dist/collection/components/z-tag/index.js +65 -65
  207. package/dist/collection/components/z-tag/styles.css +46 -46
  208. package/dist/collection/components/z-visually-hidden/index.js +18 -18
  209. package/dist/collection/components/z-visually-hidden/styles.css +12 -12
  210. package/dist/collection/constants/breakpoints.js +3 -3
  211. package/dist/collection/constants/icons.js +6 -6
  212. package/dist/collection/deprecated/typography/z-body/index.js +68 -68
  213. package/dist/collection/deprecated/typography/z-heading/index.js +68 -68
  214. package/dist/collection/deprecated/typography/z-typography/index.js +91 -91
  215. package/dist/collection/deprecated/typography/z-typography/styles.css +65 -65
  216. package/dist/collection/index.js +7 -7
  217. package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +129 -129
  218. package/dist/collection/snowflakes/myz/card/z-myz-card/styles.css +44 -44
  219. package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +151 -151
  220. package/dist/collection/snowflakes/myz/card/z-myz-card-alert/styles.css +62 -62
  221. package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +22 -22
  222. package/dist/collection/snowflakes/myz/card/z-myz-card-body/styles.css +13 -13
  223. package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +93 -93
  224. package/dist/collection/snowflakes/myz/card/z-myz-card-cover/styles.css +11 -11
  225. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +177 -177
  226. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/styles.css +72 -72
  227. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +219 -219
  228. package/dist/collection/snowflakes/myz/card/z-myz-card-footer/styles.css +182 -182
  229. package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +22 -22
  230. package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/styles.css +20 -20
  231. package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +109 -109
  232. package/dist/collection/snowflakes/myz/card/z-myz-card-header/styles.css +59 -59
  233. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +81 -81
  234. package/dist/collection/snowflakes/myz/card/z-myz-card-icon/styles.css +69 -69
  235. package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +199 -199
  236. package/dist/collection/snowflakes/myz/card/z-myz-card-info/styles.css +93 -93
  237. package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +60 -60
  238. package/dist/collection/snowflakes/myz/card/z-myz-card-list/styles.css +41 -41
  239. package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +78 -78
  240. package/dist/collection/snowflakes/myz/list/z-myz-list/styles.css +4 -4
  241. package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +192 -192
  242. package/dist/collection/snowflakes/myz/list/z-myz-list-item/styles.css +66 -66
  243. package/dist/collection/snowflakes/myz/pocket/z-messages-pocket/index.js +120 -120
  244. package/dist/collection/snowflakes/myz/pocket/z-messages-pocket/styles.css +102 -102
  245. package/dist/collection/snowflakes/myz/pocket/z-pocket/index.js +191 -191
  246. package/dist/collection/snowflakes/myz/pocket/z-pocket/styles.css +44 -44
  247. package/dist/collection/snowflakes/myz/pocket/z-pocket-body/index.js +84 -84
  248. package/dist/collection/snowflakes/myz/pocket/z-pocket-body/styles.css +41 -41
  249. package/dist/collection/snowflakes/myz/pocket/z-pocket-header/index.js +93 -93
  250. package/dist/collection/snowflakes/myz/pocket/z-pocket-header/styles.css +27 -27
  251. package/dist/collection/snowflakes/myz/pocket/z-pocket-message/index.js +22 -22
  252. package/dist/collection/snowflakes/myz/pocket/z-pocket-message/styles.css +44 -44
  253. package/dist/collection/snowflakes/myz/z-alert/index.js +47 -47
  254. package/dist/collection/snowflakes/myz/z-alert/styles.css +28 -28
  255. package/dist/collection/snowflakes/myz/z-otp/index.js +120 -120
  256. package/dist/collection/snowflakes/myz/z-otp/styles.css +47 -47
  257. package/dist/collection/snowflakes/myz/z-slideshow/index.js +180 -180
  258. package/dist/collection/snowflakes/myz/z-slideshow/styles.css +127 -127
  259. package/dist/collection/utils/storybook-utils.js +51 -51
  260. package/dist/collection/utils/utils.js +113 -113
  261. package/dist/esm/{breakpoints-14432d05.js → breakpoints-c386984e.js} +1 -1
  262. package/dist/esm/{icons-55b0b113.js → icons-6cd265c6.js} +763 -763
  263. package/dist/esm/{index-03c01696.js → index-e36ec4a4.js} +317 -317
  264. package/dist/esm/index.js +5 -5
  265. package/dist/esm/polyfills/core-js.js +0 -0
  266. package/dist/esm/polyfills/dom.js +0 -0
  267. package/dist/esm/polyfills/es5-html-element.js +0 -0
  268. package/dist/esm/polyfills/index.js +0 -0
  269. package/dist/esm/polyfills/system.js +0 -0
  270. package/dist/esm/{utils-a7846d0f.js → utils-9641b4ed.js} +75 -75
  271. package/dist/esm/{utils-f8eb3944.js → utils-a52a81ba.js} +94 -94
  272. package/dist/esm/z-alert.entry.js +8 -8
  273. package/dist/esm/z-anchor-navigation.entry.js +42 -42
  274. package/dist/esm/z-app-header_11.entry.js +990 -990
  275. package/dist/esm/z-aria-alert.entry.js +10 -10
  276. package/dist/esm/z-avatar.entry.js +33 -33
  277. package/dist/esm/z-body.entry.js +9 -9
  278. package/dist/esm/z-button-sort.entry.js +42 -42
  279. package/dist/esm/z-card.entry.js +55 -55
  280. package/dist/esm/z-carousel.entry.js +135 -135
  281. package/dist/esm/z-chip.entry.js +29 -29
  282. package/dist/esm/z-combobox.entry.js +190 -190
  283. package/dist/esm/z-contextual-menu.entry.js +35 -35
  284. package/dist/esm/z-cover-hero.entry.js +46 -46
  285. package/dist/esm/z-date-picker.entry.js +164 -164
  286. package/dist/esm/z-dragdrop-area_2.entry.js +129 -129
  287. package/dist/esm/z-file-upload.entry.js +174 -174
  288. package/dist/esm/z-file.entry.js +37 -37
  289. package/dist/esm/z-ghost-loading.entry.js +9 -9
  290. package/dist/esm/z-heading.entry.js +9 -9
  291. package/dist/esm/z-info-box.entry.js +14 -14
  292. package/dist/esm/z-info-reveal.entry.js +54 -54
  293. package/dist/esm/z-link.entry.js +63 -63
  294. package/dist/esm/z-logo.entry.js +15 -15
  295. package/dist/esm/z-menu-section.entry.js +43 -43
  296. package/dist/esm/z-menu.entry.js +108 -108
  297. package/dist/esm/z-messages-pocket.entry.js +36 -36
  298. package/dist/esm/z-myz-card-alert.entry.js +52 -52
  299. package/dist/esm/z-myz-card-dictionary.entry.js +25 -25
  300. package/dist/esm/z-myz-card-footer-sections.entry.js +8 -8
  301. package/dist/esm/z-myz-card-footer.entry.js +58 -58
  302. package/dist/esm/z-myz-card-icon.entry.js +12 -12
  303. package/dist/esm/z-myz-card-info.entry.js +118 -118
  304. package/dist/esm/z-myz-card-list.entry.js +27 -27
  305. package/dist/esm/z-myz-card_4.entry.js +82 -82
  306. package/dist/esm/z-myz-list-item.entry.js +26 -26
  307. package/dist/esm/z-myz-list.entry.js +24 -24
  308. package/dist/esm/z-navigation-tab-link.entry.js +60 -60
  309. package/dist/esm/z-navigation-tab.entry.js +62 -62
  310. package/dist/esm/z-navigation-tabs.entry.js +115 -115
  311. package/dist/esm/z-notification.entry.js +30 -30
  312. package/dist/esm/z-otp.entry.js +30 -30
  313. package/dist/esm/z-pagination.entry.js +219 -219
  314. package/dist/esm/z-panel-elem.entry.js +19 -19
  315. package/dist/esm/z-pocket-message.entry.js +8 -8
  316. package/dist/esm/z-pocket_3.entry.js +102 -102
  317. package/dist/esm/z-popover.entry.js +317 -317
  318. package/dist/esm/z-range-picker.entry.js +331 -331
  319. package/dist/esm/z-section-title.entry.js +22 -22
  320. package/dist/esm/z-select.entry.js +322 -322
  321. package/dist/esm/z-skip-to-content.entry.js +55 -55
  322. package/dist/esm/z-slideshow.entry.js +118 -118
  323. package/dist/esm/z-stepper-item.entry.js +11 -11
  324. package/dist/esm/z-stepper.entry.js +8 -8
  325. package/dist/esm/z-table-body.entry.js +13 -13
  326. package/dist/esm/z-table-cell.entry.js +25 -25
  327. package/dist/esm/z-table-empty-box.entry.js +21 -21
  328. package/dist/esm/z-table-expanded-row.entry.js +8 -8
  329. package/dist/esm/z-table-footer.entry.js +12 -12
  330. package/dist/esm/z-table-head.entry.js +12 -12
  331. package/dist/esm/z-table-header-row.entry.js +11 -11
  332. package/dist/esm/z-table-header.entry.js +71 -71
  333. package/dist/esm/z-table-row.entry.js +32 -32
  334. package/dist/esm/z-table-sticky-footer.entry.js +8 -8
  335. package/dist/esm/z-table.entry.js +69 -69
  336. package/dist/esm/z-tag.entry.js +11 -11
  337. package/dist/esm/z-toast-notification-list.entry.js +45 -45
  338. package/dist/esm/z-toast-notification.entry.js +187 -187
  339. package/dist/esm/z-toggle-button.entry.js +25 -25
  340. package/dist/esm/z-toggle-switch.entry.js +40 -40
  341. package/dist/esm/z-tooltip.entry.js +26 -26
  342. package/dist/esm/z-typography.entry.js +19 -19
  343. package/dist/esm/z-visually-hidden.entry.js +8 -8
  344. package/dist/types/beans/index.d.ts +374 -374
  345. package/dist/types/components/buttons/z-button/index.d.ts +29 -29
  346. package/dist/types/components/buttons/z-button-sort/index.d.ts +28 -28
  347. package/dist/types/components/buttons/z-chip/index.d.ts +20 -20
  348. package/dist/types/components/buttons/z-toggle-button/index.d.ts +17 -17
  349. package/dist/types/components/buttons/z-toggle-switch/index.d.ts +17 -17
  350. package/dist/types/components/date-picker/utils.d.ts +4 -4
  351. package/dist/types/components/date-picker/z-date-picker/index.d.ts +29 -29
  352. package/dist/types/components/date-picker/z-range-picker/index.d.ts +42 -42
  353. package/dist/types/components/file-upload/z-dragdrop-area/index.d.ts +9 -9
  354. package/dist/types/components/file-upload/z-file/index.d.ts +22 -22
  355. package/dist/types/components/file-upload/z-file-upload/index.d.ts +52 -52
  356. package/dist/types/components/icons/icons.d.ts +1362 -1362
  357. package/dist/types/components/icons/z-icon/index.d.ts +14 -14
  358. package/dist/types/components/indicators/z-stepper/index.d.ts +6 -6
  359. package/dist/types/components/indicators/z-stepper-item/index.d.ts +19 -19
  360. package/dist/types/components/inputs/z-combobox/index.d.ts +71 -71
  361. package/dist/types/components/inputs/z-input/index.d.ts +86 -86
  362. package/dist/types/components/inputs/z-input-message/index.d.ts +12 -12
  363. package/dist/types/components/inputs/z-searchbar/index.d.ts +73 -73
  364. package/dist/types/components/inputs/z-select/index.d.ts +82 -82
  365. package/dist/types/components/list/z-list/index.d.ts +15 -15
  366. package/dist/types/components/list/z-list-element/index.d.ts +95 -95
  367. package/dist/types/components/list/z-list-group/index.d.ts +28 -28
  368. package/dist/types/components/list/z-toast-notification-list/index.d.ts +14 -14
  369. package/dist/types/components/logo/z-logo/index.d.ts +15 -15
  370. package/dist/types/components/modal/z-modal/index.d.ts +47 -47
  371. package/dist/types/components/navigation/tabs/z-navigation-tab/index.d.ts +52 -52
  372. package/dist/types/components/navigation/tabs/z-navigation-tab-link/index.d.ts +60 -60
  373. package/dist/types/components/navigation/tabs/z-navigation-tabs/index.d.ts +70 -70
  374. package/dist/types/components/navigation/z-app-header/index.d.ts +143 -143
  375. package/dist/types/components/navigation/z-link/index.d.ts +40 -40
  376. package/dist/types/components/navigation/z-menu/index.d.ts +61 -61
  377. package/dist/types/components/navigation/z-menu-section/index.d.ts +31 -31
  378. package/dist/types/components/notification/z-info-box/index.d.ts +14 -14
  379. package/dist/types/components/notification/z-notification/index.d.ts +32 -32
  380. package/dist/types/components/notification/z-toast-notification/index.d.ts +56 -56
  381. package/dist/types/components/notification/z-tooltip/index.d.ts +32 -32
  382. package/dist/types/components/panel/z-panel-elem/index.d.ts +25 -25
  383. package/dist/types/components/z-anchor-navigation/index.d.ts +39 -39
  384. package/dist/types/components/z-aria-alert/index.d.ts +6 -6
  385. package/dist/types/components/z-avatar/index.d.ts +16 -16
  386. package/dist/types/components/z-card/index.d.ts +44 -44
  387. package/dist/types/components/z-carousel/index.d.ts +63 -63
  388. package/dist/types/components/z-contextual-menu/index.d.ts +26 -26
  389. package/dist/types/components/z-cover-hero/index.d.ts +41 -41
  390. package/dist/types/components/z-divider/index.d.ts +10 -10
  391. package/dist/types/components/z-ghost-loading/index.d.ts +3 -3
  392. package/dist/types/components/z-info-reveal/index.d.ts +29 -29
  393. package/dist/types/components/z-offcanvas/index.d.ts +27 -27
  394. package/dist/types/components/z-pagination/index.d.ts +109 -109
  395. package/dist/types/components/z-popover/index.d.ts +69 -69
  396. package/dist/types/components/z-section-title/index.d.ts +25 -25
  397. package/dist/types/components/z-skip-to-content/index.d.ts +21 -21
  398. package/dist/types/components/z-table/z-table/index.d.ts +48 -48
  399. package/dist/types/components/z-table/z-table-body/index.d.ts +5 -5
  400. package/dist/types/components/z-table/z-table-cell/index.d.ts +12 -12
  401. package/dist/types/components/z-table/z-table-empty-box/index.d.ts +12 -12
  402. package/dist/types/components/z-table/z-table-expanded-row/index.d.ts +5 -5
  403. package/dist/types/components/z-table/z-table-footer/index.d.ts +5 -5
  404. package/dist/types/components/z-table/z-table-head/index.d.ts +5 -5
  405. package/dist/types/components/z-table/z-table-header/index.d.ts +29 -29
  406. package/dist/types/components/z-table/z-table-header-row/index.d.ts +6 -6
  407. package/dist/types/components/z-table/z-table-row/index.d.ts +13 -13
  408. package/dist/types/components/z-table/z-table-sticky-footer/index.d.ts +6 -6
  409. package/dist/types/components/z-tag/index.d.ts +13 -13
  410. package/dist/types/components/z-visually-hidden/index.d.ts +3 -3
  411. package/dist/types/constants/breakpoints.d.ts +3 -3
  412. package/dist/types/constants/icons.d.ts +6 -6
  413. package/dist/types/deprecated/typography/z-body/index.d.ts +9 -9
  414. package/dist/types/deprecated/typography/z-heading/index.d.ts +9 -9
  415. package/dist/types/deprecated/typography/z-typography/index.d.ts +11 -11
  416. package/dist/types/index.d.ts +7 -7
  417. package/dist/types/snowflakes/myz/card/z-myz-card/index.d.ts +16 -16
  418. package/dist/types/snowflakes/myz/card/z-myz-card-alert/index.d.ts +19 -19
  419. package/dist/types/snowflakes/myz/card/z-myz-card-body/index.d.ts +7 -7
  420. package/dist/types/snowflakes/myz/card/z-myz-card-cover/index.d.ts +12 -12
  421. package/dist/types/snowflakes/myz/card/z-myz-card-dictionary/index.d.ts +24 -24
  422. package/dist/types/snowflakes/myz/card/z-myz-card-footer/index.d.ts +34 -34
  423. package/dist/types/snowflakes/myz/card/z-myz-card-footer-sections/index.d.ts +7 -7
  424. package/dist/types/snowflakes/myz/card/z-myz-card-header/index.d.ts +19 -19
  425. package/dist/types/snowflakes/myz/card/z-myz-card-icon/index.d.ts +9 -9
  426. package/dist/types/snowflakes/myz/card/z-myz-card-info/index.d.ts +36 -36
  427. package/dist/types/snowflakes/myz/card/z-myz-card-list/index.d.ts +9 -9
  428. package/dist/types/snowflakes/myz/list/z-myz-list/index.d.ts +11 -11
  429. package/dist/types/snowflakes/myz/list/z-myz-list-item/index.d.ts +25 -25
  430. package/dist/types/snowflakes/myz/pocket/z-messages-pocket/index.d.ts +16 -16
  431. package/dist/types/snowflakes/myz/pocket/z-pocket/index.d.ts +25 -25
  432. package/dist/types/snowflakes/myz/pocket/z-pocket-body/index.d.ts +12 -12
  433. package/dist/types/snowflakes/myz/pocket/z-pocket-header/index.d.ts +18 -18
  434. package/dist/types/snowflakes/myz/pocket/z-pocket-message/index.d.ts +7 -7
  435. package/dist/types/snowflakes/myz/z-alert/index.d.ts +9 -9
  436. package/dist/types/snowflakes/myz/z-otp/index.d.ts +17 -17
  437. package/dist/types/snowflakes/myz/z-slideshow/index.d.ts +30 -30
  438. package/dist/types/utils/utils.d.ts +24 -24
  439. package/dist/web-components-library/index.esm.js +1 -1
  440. package/dist/web-components-library/{p-0c3f4eed.entry.js → p-01ba4a7c.entry.js} +1 -1
  441. package/dist/web-components-library/{p-04631bc5.entry.js → p-047439a1.entry.js} +1 -1
  442. package/dist/web-components-library/{p-0164ca54.entry.js → p-06b7dad4.entry.js} +1 -1
  443. package/dist/web-components-library/{p-a8df4340.entry.js → p-0bf3a704.entry.js} +1 -1
  444. package/dist/web-components-library/{p-3d4b8a34.entry.js → p-0c62a60a.entry.js} +1 -1
  445. package/dist/web-components-library/{p-50bc8152.entry.js → p-10adc1fa.entry.js} +1 -1
  446. package/dist/web-components-library/{p-9c3e91fd.entry.js → p-10e036e4.entry.js} +1 -1
  447. package/{www/build/p-72c76071.entry.js → dist/web-components-library/p-161a4e84.entry.js} +1 -1
  448. package/dist/web-components-library/{p-b6b122a3.entry.js → p-1b07b435.entry.js} +1 -1
  449. package/dist/web-components-library/{p-e5410351.entry.js → p-1b0f4e52.entry.js} +1 -1
  450. package/dist/web-components-library/{p-b301e6e1.js → p-1c6b0e09.js} +1 -1
  451. package/dist/web-components-library/{p-560116ec.entry.js → p-1e71778f.entry.js} +1 -1
  452. package/dist/web-components-library/{p-8153e216.entry.js → p-1eaef57d.entry.js} +1 -1
  453. package/dist/web-components-library/{p-baabfd0d.entry.js → p-1ff146fb.entry.js} +1 -1
  454. package/{www/build/p-c655b1c8.entry.js → dist/web-components-library/p-27441384.entry.js} +1 -1
  455. package/{www/build/p-cf34dfa1.entry.js → dist/web-components-library/p-2c8f6f12.entry.js} +1 -1
  456. package/{www/build/p-825b4767.entry.js → dist/web-components-library/p-31cb64b3.entry.js} +1 -1
  457. package/dist/web-components-library/{p-1d19e382.entry.js → p-378e3fd3.entry.js} +1 -1
  458. package/dist/web-components-library/{p-9665df65.entry.js → p-3f0cdaa1.entry.js} +1 -1
  459. package/dist/web-components-library/{p-0afb1436.entry.js → p-4367f978.entry.js} +1 -1
  460. package/dist/web-components-library/p-4a816eb0.entry.js +1 -0
  461. package/dist/web-components-library/{p-50d1f5a4.entry.js → p-4d4eb6ed.entry.js} +1 -1
  462. package/dist/web-components-library/{p-bfd78f08.entry.js → p-5c5a2680.entry.js} +1 -1
  463. package/dist/web-components-library/{p-b10a244b.entry.js → p-5f5f2463.entry.js} +1 -1
  464. package/dist/web-components-library/{p-e09f95c9.entry.js → p-5fa58b99.entry.js} +1 -1
  465. package/dist/web-components-library/{p-968d9b80.entry.js → p-6736e894.entry.js} +1 -1
  466. package/dist/web-components-library/{p-70e71580.entry.js → p-6d377fcb.entry.js} +1 -1
  467. package/dist/web-components-library/{p-0b1de3ce.entry.js → p-6f5cab30.entry.js} +1 -1
  468. package/dist/web-components-library/{p-2415d4d8.entry.js → p-75da9f5d.entry.js} +1 -1
  469. package/dist/web-components-library/{p-da923c76.entry.js → p-81cad61c.entry.js} +1 -1
  470. package/dist/web-components-library/{p-d2fb8d30.entry.js → p-84b23d4b.entry.js} +1 -1
  471. package/dist/web-components-library/{p-75883172.entry.js → p-98d3c4d6.entry.js} +1 -1
  472. package/dist/web-components-library/{p-25678da1.entry.js → p-9d57a84c.entry.js} +1 -1
  473. package/{www/build/p-ad48bdb5.js → dist/web-components-library/p-a481bb97.js} +1 -1
  474. package/dist/web-components-library/{p-ad664ac3.entry.js → p-a7249453.entry.js} +1 -1
  475. package/dist/web-components-library/{p-32eec10f.entry.js → p-c88ff94b.entry.js} +1 -1
  476. package/dist/web-components-library/{p-d1c86e77.entry.js → p-c948b900.entry.js} +1 -1
  477. package/dist/web-components-library/{p-15bb0526.entry.js → p-c9bb584c.entry.js} +1 -1
  478. package/dist/web-components-library/{p-8272a099.entry.js → p-d74090ce.entry.js} +1 -1
  479. package/dist/web-components-library/{p-79919c84.entry.js → p-d986024a.entry.js} +1 -1
  480. package/dist/web-components-library/{p-356b2fc1.entry.js → p-d9c98cfd.entry.js} +1 -1
  481. package/dist/web-components-library/{p-d152fcef.entry.js → p-dae1376f.entry.js} +1 -1
  482. package/{www/build/p-6c9421c6.entry.js → dist/web-components-library/p-ecf4117e.entry.js} +1 -1
  483. package/dist/web-components-library/{p-f0eb6020.entry.js → p-f52100f3.entry.js} +1 -1
  484. package/{www/build/p-c47ec900.entry.js → dist/web-components-library/p-f9f42d17.entry.js} +1 -1
  485. package/dist/web-components-library/{p-e02ecf4c.entry.js → p-fc579135.entry.js} +1 -1
  486. package/dist/web-components-library/{p-802723a9.entry.js → p-ff18ab96.entry.js} +1 -1
  487. package/dist/web-components-library/web-components-library.esm.js +1 -1
  488. package/package.json +106 -106
  489. package/react/components.d.ts +90 -90
  490. package/react/components.js +96 -96
  491. package/react/index.d.ts +1 -1
  492. package/react/index.js +13 -13
  493. package/react/react-component-lib/createComponent.d.ts +10 -10
  494. package/react/react-component-lib/createComponent.js +97 -97
  495. package/react/react-component-lib/createOverlayComponent.d.ts +21 -21
  496. package/react/react-component-lib/createOverlayComponent.js +115 -115
  497. package/react/react-component-lib/index.d.ts +2 -2
  498. package/react/react-component-lib/index.js +7 -7
  499. package/react/react-component-lib/interfaces.d.ts +29 -29
  500. package/react/react-component-lib/interfaces.js +2 -2
  501. package/react/react-component-lib/utils/attachProps.d.ts +12 -12
  502. package/react/react-component-lib/utils/attachProps.js +104 -104
  503. package/react/react-component-lib/utils/case.d.ts +2 -2
  504. package/react/react-component-lib/utils/case.js +11 -11
  505. package/react/react-component-lib/utils/dev.d.ts +2 -2
  506. package/react/react-component-lib/utils/dev.js +17 -17
  507. package/react/react-component-lib/utils/index.d.ts +10 -10
  508. package/react/react-component-lib/utils/index.js +53 -53
  509. package/readme.md +280 -280
  510. package/www/build/index.esm.js +1 -1
  511. package/www/build/{p-0c3f4eed.entry.js → p-01ba4a7c.entry.js} +1 -1
  512. package/www/build/{p-04631bc5.entry.js → p-047439a1.entry.js} +1 -1
  513. package/www/build/{p-0164ca54.entry.js → p-06b7dad4.entry.js} +1 -1
  514. package/www/build/{p-a8df4340.entry.js → p-0bf3a704.entry.js} +1 -1
  515. package/www/build/{p-3d4b8a34.entry.js → p-0c62a60a.entry.js} +1 -1
  516. package/www/build/{p-50bc8152.entry.js → p-10adc1fa.entry.js} +1 -1
  517. package/www/build/{p-9c3e91fd.entry.js → p-10e036e4.entry.js} +1 -1
  518. package/{dist/web-components-library/p-72c76071.entry.js → www/build/p-161a4e84.entry.js} +1 -1
  519. package/www/build/{p-b6b122a3.entry.js → p-1b07b435.entry.js} +1 -1
  520. package/www/build/{p-e5410351.entry.js → p-1b0f4e52.entry.js} +1 -1
  521. package/www/build/{p-b301e6e1.js → p-1c6b0e09.js} +1 -1
  522. package/www/build/{p-560116ec.entry.js → p-1e71778f.entry.js} +1 -1
  523. package/www/build/{p-8153e216.entry.js → p-1eaef57d.entry.js} +1 -1
  524. package/www/build/{p-baabfd0d.entry.js → p-1ff146fb.entry.js} +1 -1
  525. package/{dist/web-components-library/p-c655b1c8.entry.js → www/build/p-27441384.entry.js} +1 -1
  526. package/{dist/web-components-library/p-cf34dfa1.entry.js → www/build/p-2c8f6f12.entry.js} +1 -1
  527. package/{dist/web-components-library/p-825b4767.entry.js → www/build/p-31cb64b3.entry.js} +1 -1
  528. package/www/build/{p-1d19e382.entry.js → p-378e3fd3.entry.js} +1 -1
  529. package/www/build/{p-9665df65.entry.js → p-3f0cdaa1.entry.js} +1 -1
  530. package/www/build/{p-0afb1436.entry.js → p-4367f978.entry.js} +1 -1
  531. package/www/build/p-4a816eb0.entry.js +1 -0
  532. package/www/build/{p-50d1f5a4.entry.js → p-4d4eb6ed.entry.js} +1 -1
  533. package/www/build/{p-bfd78f08.entry.js → p-5c5a2680.entry.js} +1 -1
  534. package/www/build/{p-b10a244b.entry.js → p-5f5f2463.entry.js} +1 -1
  535. package/www/build/{p-e09f95c9.entry.js → p-5fa58b99.entry.js} +1 -1
  536. package/www/build/{p-968d9b80.entry.js → p-6736e894.entry.js} +1 -1
  537. package/www/build/{p-70e71580.entry.js → p-6d377fcb.entry.js} +1 -1
  538. package/www/build/{p-0b1de3ce.entry.js → p-6f5cab30.entry.js} +1 -1
  539. package/www/build/{p-2415d4d8.entry.js → p-75da9f5d.entry.js} +1 -1
  540. package/www/build/{p-da923c76.entry.js → p-81cad61c.entry.js} +1 -1
  541. package/www/build/{p-d2fb8d30.entry.js → p-84b23d4b.entry.js} +1 -1
  542. package/www/build/{p-75883172.entry.js → p-98d3c4d6.entry.js} +1 -1
  543. package/www/build/{p-25678da1.entry.js → p-9d57a84c.entry.js} +1 -1
  544. package/{dist/web-components-library/p-ad48bdb5.js → www/build/p-a481bb97.js} +1 -1
  545. package/www/build/{p-ad664ac3.entry.js → p-a7249453.entry.js} +1 -1
  546. package/www/build/{p-d20434c3.js → p-c4d9ec85.js} +1 -1
  547. package/www/build/{p-32eec10f.entry.js → p-c88ff94b.entry.js} +1 -1
  548. package/www/build/{p-d1c86e77.entry.js → p-c948b900.entry.js} +1 -1
  549. package/www/build/{p-15bb0526.entry.js → p-c9bb584c.entry.js} +1 -1
  550. package/www/build/{p-8272a099.entry.js → p-d74090ce.entry.js} +1 -1
  551. package/www/build/{p-79919c84.entry.js → p-d986024a.entry.js} +1 -1
  552. package/www/build/{p-356b2fc1.entry.js → p-d9c98cfd.entry.js} +1 -1
  553. package/www/build/{p-d152fcef.entry.js → p-dae1376f.entry.js} +1 -1
  554. package/{dist/web-components-library/p-6c9421c6.entry.js → www/build/p-ecf4117e.entry.js} +1 -1
  555. package/www/build/{p-f0eb6020.entry.js → p-f52100f3.entry.js} +1 -1
  556. package/{dist/web-components-library/p-c47ec900.entry.js → www/build/p-f9f42d17.entry.js} +1 -1
  557. package/www/build/{p-e02ecf4c.entry.js → p-fc579135.entry.js} +1 -1
  558. package/www/build/{p-802723a9.entry.js → p-ff18ab96.entry.js} +1 -1
  559. package/www/build/web-components-library.esm.js +1 -1
  560. package/www/index.html +1 -1
  561. package/www/pages/file-upload.html +258 -258
  562. package/www/pages/notification.html +299 -299
  563. package/dist/web-components-library/p-f9d29371.entry.js +0 -1
  564. package/www/build/p-f9d29371.entry.js +0 -1
  565. /package/dist/web-components-library/{p-21c3aea0.js → p-bb85c467.js} +0 -0
  566. /package/dist/web-components-library/{p-e35d3552.js → p-d69e14fb.js} +0 -0
  567. /package/dist/web-components-library/{p-dfed050d.js → p-e1ac5c4e.js} +0 -0
  568. /package/www/build/{p-21c3aea0.js → p-bb85c467.js} +0 -0
  569. /package/www/build/{p-e35d3552.js → p-d69e14fb.js} +0 -0
  570. /package/www/build/{p-dfed050d.js → p-e1ac5c4e.js} +0 -0
@@ -1,1036 +1,1036 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a2ca4b97.js';
2
- import { d as ControlSize, B as ButtonVariant, O as OffCanvasVariant, v as TransitionDirection, b as ButtonType, D as DividerSize, g as DividerOrientation, k as LabelPosition, I as InputType, h as ListSize, m as ListType, j as ExpandableListButtonAlign, l as ListDividerType, E as ExpandableListStyle, f as KeyboardCode } from './index-03c01696.js';
3
- import { I as ICONS } from './icons-55b0b113.js';
4
- import { r as randomId, b as boolean, h as handleEnterKeydSubmit } from './utils-f8eb3944.js';
5
- import './breakpoints-14432d05.js';
2
+ import { d as ControlSize, B as ButtonVariant, O as OffCanvasVariant, v as TransitionDirection, b as ButtonType, D as DividerSize, g as DividerOrientation, k as LabelPosition, I as InputType, h as ListSize, m as ListType, j as ExpandableListButtonAlign, l as ListDividerType, E as ExpandableListStyle, f as KeyboardCode } from './index-e36ec4a4.js';
3
+ import { I as ICONS } from './icons-6cd265c6.js';
4
+ import { r as randomId, b as boolean, h as handleEnterKeydSubmit } from './utils-a52a81ba.js';
5
+ import './breakpoints-c386984e.js';
6
6
 
7
7
  const stylesCss$a = ":host{--app-header-typography-1-size:24px;--app-header-typography-2-size:28px;--app-header-typography-3-size:32px;--app-header-typography-4-size:36px;--app-header-typography-5-size:42px;--app-header-typography-6-size:48px;--app-header-typography-7-size:54px;--app-header-typography-8-size:60px;--app-header-typography-9-size:68px;--app-header-typography-10-size:76px;--app-header-typography-11-size:84px;--app-header-typography-12-size:92px;--app-header-typography-1-lineheight:1.33;--app-header-typography-2-lineheight:1.29;--app-header-typography-3-lineheight:1.25;--app-header-typography-4-lineheight:1.24;--app-header-typography-5-lineheight:1.24;--app-header-typography-6-lineheight:1.25;--app-header-typography-7-lineheight:1.2;--app-header-typography-8-lineheight:1.26;--app-header-typography-9-lineheight:1.24;--app-header-typography-10-lineheight:1.26;--app-header-typography-11-lineheight:1.2;--app-header-typography-12-lineheight:1.2;--app-header-typography-1-tracking:calc(-0.2 / 1em);--app-header-typography-2-tracking:calc(-0.4 / 1em);--app-header-typography-3-tracking:calc(-0.6 / 1em);--app-header-typography-4-tracking:calc(-0.8 / 1em);--app-header-typography-5-tracking:calc(-1 / 1em);--app-header-typography-6-tracking:calc(-1.2 / 1em);--app-header-typography-7-tracking:calc(-1.4 / 1em);--app-header-typography-8-tracking:calc(-1.6 / 1em);--app-header-typography-9-tracking:calc(-1.8 / 1em);--app-header-typography-10-tracking:calc(-2 / 1em);--app-header-typography-11-tracking:calc(-2.2 / 1em);--app-header-typography-12-tracking:calc(-2.4 / 1em);--app-header-content-max-width:100%;--app-header-height:auto;--app-header-top-offset:48px;--app-header-drawer-trigger-size:calc(var(--space-unit) * 4);--app-header-bg:var(--color-surface01);--app-header-stucked-bg:var(--color-surface01);--app-header-text-color:var(--color-text01);--app-header-title-font-size:var(--app-header-typography-3-size);--app-header-title-lineheight:var(--app-header-typography-3-lineheight);--app-header-title-letter-spacing:var(--app-header-typography-3-tracking);--app-header-stucked-text-color:var(--color-text01);position:relative;display:block;height:var(--app-header-height);color:var(--app-header-text-color)}:host,*{box-sizing:border-box}.heading-panel{position:relative;display:flex;width:100%;max-width:var(--app-header-content-max-width);flex-direction:column;flex-grow:0;flex-shrink:0;align-items:baseline;padding:var(--grid-margin);margin:0 auto;background:var(--app-header-bg);gap:calc(var(--space-unit) * 2) calc(var(--space-unit) * 5)}.hero-container+.heading-panel{background:transparent}:host(:empty) .heading-panel{padding:0}.heading-container{position:relative;z-index:1;display:flex;width:100%;max-width:100%;flex:1 auto;flex-direction:column;justify-content:flex-start}.heading-title{display:flex;max-width:100%;flex-direction:row;align-items:flex-start;column-gap:calc(var(--space-unit) * 2)}::slotted([slot=\"title\"]),.heading-stuck .heading-title>*,::slotted([slot=\"stucked-title\"]){margin:0;font-family:\"IBM Plex Serif\", serif;font-weight:var(--font-bd)}::slotted([slot=\"title\"]){font-size:var(--app-header-title-font-size);letter-spacing:var(--app-header-title-letter-spacing);line-height:var(--app-header-title-lineheight)}.heading-stuck .heading-title>*,::slotted([slot=\"stucked-title\"]){font-size:var(--app-header-typography-3-size);letter-spacing:var(--app-header-typography-3-tracking);line-height:var(--app-header-typography-3-lineheight)}:host(:not([menu-length=\"0\"])) .heading-subtitle{padding-left:calc(var(--app-header-drawer-trigger-size) + (var(--space-unit) * 2))}::slotted([slot=\"subtitle\"]){margin:0;font-family:var(--font-family-sans);font-size:20px;font-style:italic;font-weight:500;line-height:26px}.menu-container{display:flex;width:100%;flex:1 auto;flex-flow:row wrap}.menu-container ::slotted([open]){position:relative;z-index:3}z-searchbar{z-index:0;display:flex;width:auto;min-width:calc(var(--space-unit) * 32);flex:1 auto;align-items:center;margin-left:auto}.heading-stuck{position:fixed;z-index:20;top:var(--app-header-top-offset);left:0;width:100%;max-width:100%;animation:slide-stuck-heading-in 250ms ease-out;background:var(--app-header-stucked-bg);box-shadow:var(--shadow-2);color:var(--app-header-stucked-text-color)}.heading-stuck-content{display:flex;max-width:var(--app-header-content-max-width);align-items:center;padding:var(--space-unit) var(--grid-margin);margin:0 auto;column-gap:calc(var(--space-unit) * 2)}.heading-stuck .heading-title>*,.heading-stuck .heading-title ::slotted([slot=\"stucked-title\"]){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.heading-stuck-content z-button{margin-left:auto}.drawer-trigger{padding:0;border:0;margin:0;appearance:none;background:none;border-radius:0;color:inherit;cursor:pointer}.drawer-trigger z-icon{--z-icon-width:var(--app-header-drawer-trigger-size);--z-icon-height:var(--app-header-drawer-trigger-size);fill:currentcolor}.heading-container :is(.drawer-trigger,z-button.search-page-button){display:flex;height:calc(var(--app-header-title-font-size) * var(--app-header-title-lineheight));align-items:center}.heading-container z-button.search-page-button{margin-left:auto}.drawer-content{display:flex;width:100%;flex:1 auto;flex-direction:column;row-gap:calc(var(--space-unit) * 2.5)}.drawer-content ::slotted(z-menu){width:100%}.drawer-close{--z-icon-width:var(--app-header-drawer-trigger-size);--z-icon-height:var(--app-header-drawer-trigger-size);padding:0;border:0;margin:var(--space-unit) 0 calc(var(--space-unit) * 2.5);appearance:none;background:transparent;border-radius:0;color:inherit;cursor:pointer;fill:currentcolor;font-size:inherit;outline:none}.drawer-close:focus-visible{box-shadow:var(--shadow-focus-primary)}.hero-container{position:absolute;z-index:0;top:0;left:0;width:100%;height:100%}:host([overlay]) .heading-panel .drawer-trigger z-icon,:host([overlay]) .heading-panel .heading-container,:host([overlay]) .heading-panel .menu-container{color:var(--color-white);fill:var(--color-white)}:host([overlay]) .heading-panel .menu-container ::slotted(z-menu){--z-menu-label-color:var(--color-white)}:host([overlay]) .hero-container::after{position:absolute;z-index:0;top:0;left:0;width:100%;height:100%;background:var(--color-black);content:\"\";opacity:0.5}.hero-container img,.hero-container ::slotted(*){position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;object-position:top center;-webkit-user-drag:none}@media (min-width: 768px){:host{--app-header-title-font-size:var(--app-header-typography-6-size);--app-header-title-lineheight:var(--app-header-typography-6-lineheight);--app-header-title-letter-spacing:var(--app-header-typography-6-tracking)}.heading-panel{flex-flow:row wrap;align-items:center;padding-bottom:calc(var(--space-unit) * 2)}.heading-container{margin-right:auto}:host(:is([flow=\"offcanvas\"],[menu-length=\"0\"])) :is(.heading-container,.menu-container){width:auto}:host(:not([flow=\"offcanvas\"])) .heading-subtitle{padding-left:0}.menu-container{flex:initial;align-items:center}:host([menu-length=\"0\"]) .menu-container:not(:empty){height:calc(var(--app-header-title-font-size) * var(--app-header-title-lineheight))}:host(:not([flow=\"offcanvas\"])) .menu-container{gap:var(--space-unit) calc(var(--space-unit) * 5)}:host(:not([flow=\"offcanvas\"])) .heading-container .drawer-trigger{display:none}}@media (min-width: 1152px){:host{--app-header-title-font-size:var(--app-header-typography-7-size);--app-header-title-lineheight:var(--app-header-typography-7-lineheight);--app-header-title-letter-spacing:var(--app-header-typography-7-tracking)}.heading-panel{justify-content:flex-start;padding-bottom:calc(var(--space-unit) * 3)}.heading-container,.menu-container{width:auto}:host([flow=\"stack\"]) .heading-panel{flex-flow:column;align-items:flex-start}:host([flow=\"stack\"]) .menu-container{width:100%}:host(:not([flow=\"offcanvas\"],[menu-length=\"0\"])) .heading-panel{row-gap:calc(var(--space-unit) * 3)}z-searchbar{min-width:calc(var(--space-unit) * 45);flex:initial}}@media (min-width: 1366px){:host{--app-header-title-font-size:var(--app-header-typography-9-size);--app-header-title-lineheight:var(--app-header-typography-9-lineheight);--app-header-title-letter-spacing:var(--app-header-typography-9-tracking)}}@keyframes slide-stuck-heading-in{0%{transform:translate3d(0, -100%, 0)}100%{transform:none}}";
8
8
 
9
- const SUPPORT_INTERSECTION_OBSERVER = typeof IntersectionObserver !== "undefined";
10
- const ZAppHeader = class {
11
- constructor(hostRef) {
12
- registerInstance(this, hostRef);
13
- this.sticking = createEvent(this, "sticking", 7);
14
- /**
15
- * Stuck mode for the header.
16
- * You can programmatically set it using an IntersectionObserver.
17
- */
18
- this.stuck = false;
19
- /**
20
- * Should place an overlay over the hero image.
21
- * Useful for legibility purpose.
22
- */
23
- this.overlay = false;
24
- /**
25
- * Control menu bar position in the header.
26
- * - auto: the menu bar is positioned near the title
27
- * - stack: the menu bar is positioned below the title
28
- * - offcanvas: the menu bar is not displayed and a burger icon appears to open the offcanvas menu
29
- */
30
- this.flow = "auto";
31
- /**
32
- * The opening state of the drawer.
33
- */
34
- this.drawerOpen = false;
35
- /**
36
- * Enable the search bar.
37
- */
38
- this.enableSearch = false;
39
- /**
40
- * Placeholder text for the search bar.
41
- */
42
- this.searchPlaceholder = "Cerca";
43
- /**
44
- * The stuck state of the bar.
45
- */
46
- this._stuck = false;
47
- /**
48
- * Current viewport.
49
- * Used to change the aspect of the search button (icon only) on mobile and tablet.
50
- */
51
- this.currentViewport = "mobile";
52
- this.observer = SUPPORT_INTERSECTION_OBSERVER &&
53
- new IntersectionObserver(([entry]) => {
54
- this._stuck = !entry.isIntersecting;
55
- }, {
56
- threshold: 0.5,
57
- });
58
- this.openDrawer = this.openDrawer.bind(this);
59
- this.closeDrawer = this.closeDrawer.bind(this);
60
- this.collectMenuElements = this.collectMenuElements.bind(this);
61
- }
62
- evaluateViewport() {
63
- if (window.innerWidth < 768) {
64
- this.currentViewport = "mobile";
65
- }
66
- else if (window.innerWidth >= 768 && window.innerWidth < 1152) {
67
- this.currentViewport = "tablet";
68
- }
69
- else {
70
- this.currentViewport = "desktop";
71
- }
72
- }
73
- onStuck() {
74
- const scrollParent = this.scrollParent;
75
- if (!scrollParent) {
76
- return;
77
- }
78
- this.sticking.emit(this._stuck);
79
- }
80
- setMenuFloatingMode() {
81
- if (this.menuElements.length === 0) {
82
- return;
83
- }
84
- const elements = this.menuElements;
85
- elements.forEach((element) => {
86
- element.open = false;
87
- element.floating = !this.drawerOpen;
88
- element.verticalContext = this.drawerOpen;
89
- });
90
- }
91
- get title() {
92
- const titleElement = this.hostElement.querySelector('[slot="title"]');
93
- if (titleElement === null) {
94
- return "";
95
- }
96
- return titleElement.textContent.trim();
97
- }
98
- get scrollParent() {
99
- const parent = this.hostElement.offsetParent;
100
- if (parent === document.body || parent === document.documentElement) {
101
- return window;
102
- }
103
- return parent;
104
- }
105
- get canShowMenu() {
106
- return this.menuLength > 0 && this.flow !== "offcanvas" && this.currentViewport !== "mobile" && !this.drawerOpen;
107
- }
108
- get canShowSearchbar() {
109
- if (!this.enableSearch) {
110
- return false;
111
- }
112
- // Always show the searchbar on desktop, even if a searchPageUrl is set
113
- if (this.searchPageUrl) {
114
- return this.currentViewport === "desktop";
115
- }
116
- return true;
117
- }
118
- /**
119
- * Whether the header has a hero image, either as a prop or as a slot.
120
- */
121
- get hasHero() {
122
- return this.hero !== undefined || this.hostElement.querySelector("[slot=hero]") !== null;
123
- }
124
- openDrawer() {
125
- this.drawerOpen = true;
126
- }
127
- closeDrawer() {
128
- this.drawerOpen = false;
129
- }
130
- collectMenuElements() {
131
- const menuElements = (this.menuElements = this.hostElement.querySelectorAll('[slot="menu"]'));
132
- this.menuLength = menuElements.length;
133
- this.setMenuFloatingMode();
134
- }
135
- enableStuckObserver() {
136
- if (this.observer) {
137
- this.observer.observe(this.container);
138
- }
139
- }
140
- disableStuckMode() {
141
- this._stuck = false;
142
- if (this.observer) {
143
- this.observer.unobserve(this.container);
144
- }
145
- }
146
- onStuckMode() {
147
- if (this.stuck) {
148
- this.enableStuckObserver();
149
- }
150
- else {
151
- this.disableStuckMode();
152
- }
153
- }
154
- renderSearchLinkButton() {
155
- if (!this.enableSearch || !this.searchPageUrl || this.currentViewport === "desktop") {
156
- return null;
157
- }
158
- return (h("z-button", { class: "search-page-button", variant: ButtonVariant.SECONDARY, href: this.searchPageUrl, icon: "search", size: ControlSize.X_SMALL }));
159
- }
160
- componentDidLoad() {
161
- this.collectMenuElements();
162
- this.onStuckMode();
163
- this.evaluateViewport();
164
- }
165
- render() {
166
- return (h(Host, { "menu-length": this.menuLength }, this.hasHero && (h("div", { class: "hero-container" }, h("slot", { name: "hero" }, this.hero && (h("img", { alt: "", src: this.hero }))))), h("div", { class: "heading-panel", ref: (el) => (this.container = el) }, h("div", { class: "heading-container" }, h("div", { class: "heading-title" }, this.menuLength > 0 && (h("button", { class: "drawer-trigger", "aria-label": "Apri menu", onClick: this.openDrawer }, h("z-icon", { name: "burger-menu" }))), h("slot", { name: "title" }), this.renderSearchLinkButton()), h("div", { class: "heading-subtitle" }, h("slot", { name: "subtitle" }))), (this.canShowMenu || this.canShowSearchbar) && (h("div", { class: "menu-container" }, this.canShowMenu && (h("slot", { name: "menu", onSlotchange: this.collectMenuElements })), this.canShowSearchbar && (h("z-searchbar", { placeholder: this.searchPlaceholder, showSearchButton: true, searchButtonIconOnly: this.currentViewport !== "desktop", size: ControlSize.X_SMALL, variant: ButtonVariant.SECONDARY, preventSubmit: true, onSearchTyping: (e) => {
167
- e.target.preventSubmit = !e.detail || e.detail.length < 3;
168
- } }))))), h("z-offcanvas", { variant: OffCanvasVariant.OVERLAY, transitiondirection: TransitionDirection.RIGHT, open: this.drawerOpen, onCanvasOpenStatusChanged: (ev) => (this.drawerOpen = ev.detail) }, h("button", { class: "drawer-close", "aria-label": "Chiudi menu", onClick: this.closeDrawer, slot: "canvasContent" }, h("z-icon", { name: "close" })), this.drawerOpen && (h("div", { class: "drawer-content", slot: "canvasContent" }, h("slot", { name: "menu", onSlotchange: this.collectMenuElements })))), this._stuck && (h("div", { class: "heading-stuck" }, h("div", { class: "heading-stuck-content" }, this.menuLength > 0 && (h("button", { class: "drawer-trigger", "aria-label": "Apri menu", onClick: this.openDrawer }, h("z-icon", { name: "burger-menu" }))), h("div", { class: "heading-title" }, h("slot", { name: "stucked-title" }, this.title)), this.renderSearchLinkButton(), this.canShowSearchbar && this.currentViewport === "desktop" && (h("z-searchbar", { placeholder: this.searchPlaceholder, showSearchButton: true, searchButtonIconOnly: false, size: ControlSize.X_SMALL, variant: ButtonVariant.SECONDARY, preventSubmit: true, onSearchTyping: (e) => {
169
- var _a;
170
- e.target.preventSubmit = ((_a = e.detail) === null || _a === void 0 ? void 0 : _a.length) < 3;
171
- } })))))));
172
- }
173
- get hostElement() { return getElement(this); }
174
- static get watchers() { return {
175
- "_stuck": ["onStuck"],
176
- "drawerOpen": ["setMenuFloatingMode"],
177
- "stuck": ["onStuckMode"]
178
- }; }
179
- };
9
+ const SUPPORT_INTERSECTION_OBSERVER = typeof IntersectionObserver !== "undefined";
10
+ const ZAppHeader = class {
11
+ constructor(hostRef) {
12
+ registerInstance(this, hostRef);
13
+ this.sticking = createEvent(this, "sticking", 7);
14
+ /**
15
+ * Stuck mode for the header.
16
+ * You can programmatically set it using an IntersectionObserver.
17
+ */
18
+ this.stuck = false;
19
+ /**
20
+ * Should place an overlay over the hero image.
21
+ * Useful for legibility purpose.
22
+ */
23
+ this.overlay = false;
24
+ /**
25
+ * Control menu bar position in the header.
26
+ * - auto: the menu bar is positioned near the title
27
+ * - stack: the menu bar is positioned below the title
28
+ * - offcanvas: the menu bar is not displayed and a burger icon appears to open the offcanvas menu
29
+ */
30
+ this.flow = "auto";
31
+ /**
32
+ * The opening state of the drawer.
33
+ */
34
+ this.drawerOpen = false;
35
+ /**
36
+ * Enable the search bar.
37
+ */
38
+ this.enableSearch = false;
39
+ /**
40
+ * Placeholder text for the search bar.
41
+ */
42
+ this.searchPlaceholder = "Cerca";
43
+ /**
44
+ * The stuck state of the bar.
45
+ */
46
+ this._stuck = false;
47
+ /**
48
+ * Current viewport.
49
+ * Used to change the aspect of the search button (icon only) on mobile and tablet.
50
+ */
51
+ this.currentViewport = "mobile";
52
+ this.observer = SUPPORT_INTERSECTION_OBSERVER &&
53
+ new IntersectionObserver(([entry]) => {
54
+ this._stuck = !entry.isIntersecting;
55
+ }, {
56
+ threshold: 0.5,
57
+ });
58
+ this.openDrawer = this.openDrawer.bind(this);
59
+ this.closeDrawer = this.closeDrawer.bind(this);
60
+ this.collectMenuElements = this.collectMenuElements.bind(this);
61
+ }
62
+ evaluateViewport() {
63
+ if (window.innerWidth < 768) {
64
+ this.currentViewport = "mobile";
65
+ }
66
+ else if (window.innerWidth >= 768 && window.innerWidth < 1152) {
67
+ this.currentViewport = "tablet";
68
+ }
69
+ else {
70
+ this.currentViewport = "desktop";
71
+ }
72
+ }
73
+ onStuck() {
74
+ const scrollParent = this.scrollParent;
75
+ if (!scrollParent) {
76
+ return;
77
+ }
78
+ this.sticking.emit(this._stuck);
79
+ }
80
+ setMenuFloatingMode() {
81
+ if (this.menuElements.length === 0) {
82
+ return;
83
+ }
84
+ const elements = this.menuElements;
85
+ elements.forEach((element) => {
86
+ element.open = false;
87
+ element.floating = !this.drawerOpen;
88
+ element.verticalContext = this.drawerOpen;
89
+ });
90
+ }
91
+ get title() {
92
+ const titleElement = this.hostElement.querySelector('[slot="title"]');
93
+ if (titleElement === null) {
94
+ return "";
95
+ }
96
+ return titleElement.textContent.trim();
97
+ }
98
+ get scrollParent() {
99
+ const parent = this.hostElement.offsetParent;
100
+ if (parent === document.body || parent === document.documentElement) {
101
+ return window;
102
+ }
103
+ return parent;
104
+ }
105
+ get canShowMenu() {
106
+ return this.menuLength > 0 && this.flow !== "offcanvas" && this.currentViewport !== "mobile" && !this.drawerOpen;
107
+ }
108
+ get canShowSearchbar() {
109
+ if (!this.enableSearch) {
110
+ return false;
111
+ }
112
+ // Always show the searchbar on desktop, even if a searchPageUrl is set
113
+ if (this.searchPageUrl) {
114
+ return this.currentViewport === "desktop";
115
+ }
116
+ return true;
117
+ }
118
+ /**
119
+ * Whether the header has a hero image, either as a prop or as a slot.
120
+ */
121
+ get hasHero() {
122
+ return !!this.hero || this.hostElement.querySelector("[slot=hero]") !== null;
123
+ }
124
+ openDrawer() {
125
+ this.drawerOpen = true;
126
+ }
127
+ closeDrawer() {
128
+ this.drawerOpen = false;
129
+ }
130
+ collectMenuElements() {
131
+ const menuElements = (this.menuElements = this.hostElement.querySelectorAll('[slot="menu"]'));
132
+ this.menuLength = menuElements.length;
133
+ this.setMenuFloatingMode();
134
+ }
135
+ enableStuckObserver() {
136
+ if (this.observer) {
137
+ this.observer.observe(this.container);
138
+ }
139
+ }
140
+ disableStuckMode() {
141
+ this._stuck = false;
142
+ if (this.observer) {
143
+ this.observer.unobserve(this.container);
144
+ }
145
+ }
146
+ onStuckMode() {
147
+ if (this.stuck) {
148
+ this.enableStuckObserver();
149
+ }
150
+ else {
151
+ this.disableStuckMode();
152
+ }
153
+ }
154
+ renderSearchLinkButton() {
155
+ if (!this.enableSearch || !this.searchPageUrl || this.currentViewport === "desktop") {
156
+ return null;
157
+ }
158
+ return (h("z-button", { class: "search-page-button", variant: ButtonVariant.SECONDARY, href: this.searchPageUrl, icon: "search", size: ControlSize.X_SMALL }));
159
+ }
160
+ componentDidLoad() {
161
+ this.collectMenuElements();
162
+ this.onStuckMode();
163
+ this.evaluateViewport();
164
+ }
165
+ render() {
166
+ return (h(Host, { "menu-length": this.menuLength }, this.hasHero && (h("div", { class: "hero-container" }, h("slot", { name: "hero" }, this.hero && (h("img", { alt: "", src: this.hero }))))), h("div", { class: "heading-panel", ref: (el) => (this.container = el) }, h("div", { class: "heading-container" }, h("div", { class: "heading-title" }, this.menuLength > 0 && (h("button", { class: "drawer-trigger", "aria-label": "Apri menu", onClick: this.openDrawer }, h("z-icon", { name: "burger-menu" }))), h("slot", { name: "title" }), this.renderSearchLinkButton()), h("div", { class: "heading-subtitle" }, h("slot", { name: "subtitle" }))), (this.canShowMenu || this.canShowSearchbar) && (h("div", { class: "menu-container" }, this.canShowMenu && (h("slot", { name: "menu", onSlotchange: this.collectMenuElements })), this.canShowSearchbar && (h("z-searchbar", { placeholder: this.searchPlaceholder, showSearchButton: true, searchButtonIconOnly: this.currentViewport !== "desktop", size: ControlSize.X_SMALL, variant: ButtonVariant.SECONDARY, preventSubmit: true, onSearchTyping: (e) => {
167
+ e.target.preventSubmit = !e.detail || e.detail.length < 3;
168
+ } }))))), h("z-offcanvas", { variant: OffCanvasVariant.OVERLAY, transitiondirection: TransitionDirection.RIGHT, open: this.drawerOpen, onCanvasOpenStatusChanged: (ev) => (this.drawerOpen = ev.detail) }, h("button", { class: "drawer-close", "aria-label": "Chiudi menu", onClick: this.closeDrawer, slot: "canvasContent" }, h("z-icon", { name: "close" })), this.drawerOpen && (h("div", { class: "drawer-content", slot: "canvasContent" }, h("slot", { name: "menu", onSlotchange: this.collectMenuElements })))), this._stuck && (h("div", { class: "heading-stuck" }, h("div", { class: "heading-stuck-content" }, this.menuLength > 0 && (h("button", { class: "drawer-trigger", "aria-label": "Apri menu", onClick: this.openDrawer }, h("z-icon", { name: "burger-menu" }))), h("div", { class: "heading-title" }, h("slot", { name: "stucked-title" }, this.title)), this.renderSearchLinkButton(), this.canShowSearchbar && this.currentViewport === "desktop" && (h("z-searchbar", { placeholder: this.searchPlaceholder, showSearchButton: true, searchButtonIconOnly: false, size: ControlSize.X_SMALL, variant: ButtonVariant.SECONDARY, preventSubmit: true, onSearchTyping: (e) => {
169
+ var _a;
170
+ e.target.preventSubmit = ((_a = e.detail) === null || _a === void 0 ? void 0 : _a.length) < 3;
171
+ } })))))));
172
+ }
173
+ get hostElement() { return getElement(this); }
174
+ static get watchers() { return {
175
+ "_stuck": ["onStuck"],
176
+ "drawerOpen": ["setMenuFloatingMode"],
177
+ "stuck": ["onStuckMode"]
178
+ }; }
179
+ };
180
180
  ZAppHeader.style = stylesCss$a;
181
181
 
182
182
  const stylesCss$9 = ".sc-z-button-h{display:inline-block;--z-icon-width:16px;--z-icon-height:16px;--z-icon-right-margin:0}[disabled].sc-z-button-h:not([disabled=\"false\"]){pointer-events:none}.sc-z-button-h .z-button--container.sc-z-button{display:inline-flex;width:100%;box-sizing:border-box;align-items:center;justify-content:center;padding:0;border-width:var(--border-size-medium);border-style:solid;border-radius:var(--border-radius);cursor:pointer;fill:currentcolor;font-family:var(--font-family-sans);font-size:14px;font-weight:var(--font-sb);letter-spacing:0.3px;line-height:1;outline:none;text-decoration:none;text-transform:uppercase;white-space:nowrap}.sc-z-button-h .z-button--container.sc-z-button:focus:focus-visible{box-shadow:var(--shadow-focus-primary)}.sc-z-button-h .z-button--container.z-button--has-text.sc-z-button{min-width:calc(var(--space-unit) * 8);padding:0 calc(var(--space-unit) * 2)}.sc-z-button-h .z-button--container.z-button--has-text.sc-z-button z-icon.sc-z-button{--z-icon-right-margin:var(--space-unit)}[size=\"big\"].sc-z-button-h .z-button--container.sc-z-button{min-width:44px;height:44px}[size=\"small\"].sc-z-button-h .z-button--container.sc-z-button{min-width:36px;height:36px}[size=\"x-small\"].sc-z-button-h .z-button--container.sc-z-button{min-width:32px;height:32px}[variant=\"primary\"].sc-z-button-h .z-button--container.sc-z-button{border-color:var(--color-primary01);background-color:var(--color-primary01);color:var(--color-text-inverse)}@media (hover: hover){[variant=\"primary\"].sc-z-button-h .z-button--container.sc-z-button:hover{border-color:var(--color-hover-primary);background-color:var(--color-hover-primary);color:var(--color-text-inverse)}}[variant=\"primary\"].sc-z-button-h .z-button--container.sc-z-button:active{border-color:var(--color-pressed-primary);background-color:var(--color-pressed-primary);box-shadow:var(--shadow-2);color:var(--color-text-inverse)}[variant=\"primary\"][disabled].sc-z-button-h:not([disabled=\"false\"]) .z-button--container.sc-z-button{border-color:var(--color-disabled01);background-color:var(--color-disabled01);color:var(--color-disabled02)}[variant=\"secondary\"].sc-z-button-h .z-button--container.sc-z-button{border-color:var(--color-primary01);background-color:var(--color-surface01);color:var(--color-primary01)}@media (hover: hover){[variant=\"secondary\"].sc-z-button-h .z-button--container.sc-z-button:hover{border-color:var(--color-hover-primary);background-color:var(--color-surface01);color:var(--color-hover-primary)}}[variant=\"secondary\"].sc-z-button-h .z-button--container.sc-z-button:active{border-color:var(--color-pressed-primary);background-color:var(--color-surface01);box-shadow:var(--shadow-2);color:var(--color-pressed-primary)}[variant=\"secondary\"][disabled].sc-z-button-h:not([disabled=\"false\"]) .z-button--container.sc-z-button{border-color:var(--color-disabled01);background-color:var(--color-surface01);color:var(--color-disabled02)}[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button{border-color:transparent;background-color:transparent;color:var(--color-primary01)}@media (hover: hover){[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button:hover{border-color:var(--color-primary03);background-color:var(--color-primary03);color:var(--color-hover-primary)}}[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button:focus:focus-visible{border-color:var(--color-surface01);background-color:var(--color-surface01);color:var(--color-primary01)}[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button:active{border-color:var(--color-surface01);background-color:var(--color-surface01);box-shadow:var(--shadow-2);color:var(--color-primary01)}[variant=\"tertiary\"][disabled].sc-z-button-h:not([disabled=\"false\"]) .z-button--container.sc-z-button{border-color:transparent;background-color:transparent;color:var(--color-disabled02)}";
183
183
 
184
- const ZButton = class {
185
- constructor(hostRef) {
186
- registerInstance(this, hostRef);
187
- /** defines a string value that labels an interactive element, used for accessibility. */
188
- this.ariaLabel = "";
189
- /** HTML button disabled attribute. */
190
- this.disabled = false;
191
- /** HTML button type attribute. */
192
- this.type = ButtonType.BUTTON;
193
- /** Graphical variant: `primary`, `secondary`, `tertiary`. Defaults to `primary`. */
194
- this.variant = ButtonVariant.PRIMARY;
195
- /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
196
- this.size = ControlSize.BIG;
197
- }
198
- getAttributes() {
199
- return {
200
- id: this.htmlid,
201
- class: {
202
- "z-button--container": true,
203
- "z-button--has-text": !!this.hostElement.textContent.trim(),
204
- },
205
- };
206
- }
207
- render() {
208
- if (this.href) {
209
- return (h("a", Object.assign({}, this.getAttributes(), { "aria-label": this.ariaLabel, href: this.href, target: this.target }), this.icon && (h("z-icon", { name: this.icon, width: 16, height: 16 })), h("slot", null)));
210
- }
211
- return (h("button", Object.assign({}, this.getAttributes(), { "aria-label": this.ariaLabel, name: this.name, type: this.type, disabled: this.disabled }), this.icon && (h("z-icon", { name: this.icon, width: 16, height: 16 })), h("slot", null)));
212
- }
213
- get hostElement() { return getElement(this); }
214
- };
184
+ const ZButton = class {
185
+ constructor(hostRef) {
186
+ registerInstance(this, hostRef);
187
+ /** defines a string value that labels an interactive element, used for accessibility. */
188
+ this.ariaLabel = "";
189
+ /** HTML button disabled attribute. */
190
+ this.disabled = false;
191
+ /** HTML button type attribute. */
192
+ this.type = ButtonType.BUTTON;
193
+ /** Graphical variant: `primary`, `secondary`, `tertiary`. Defaults to `primary`. */
194
+ this.variant = ButtonVariant.PRIMARY;
195
+ /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
196
+ this.size = ControlSize.BIG;
197
+ }
198
+ getAttributes() {
199
+ return {
200
+ id: this.htmlid,
201
+ class: {
202
+ "z-button--container": true,
203
+ "z-button--has-text": !!this.hostElement.textContent.trim(),
204
+ },
205
+ };
206
+ }
207
+ render() {
208
+ if (this.href) {
209
+ return (h("a", Object.assign({}, this.getAttributes(), { "aria-label": this.ariaLabel, href: this.href, target: this.target }), this.icon && (h("z-icon", { name: this.icon, width: 16, height: 16 })), h("slot", null)));
210
+ }
211
+ return (h("button", Object.assign({}, this.getAttributes(), { "aria-label": this.ariaLabel, name: this.name, type: this.type, disabled: this.disabled }), this.icon && (h("z-icon", { name: this.icon, width: 16, height: 16 })), h("slot", null)));
212
+ }
213
+ get hostElement() { return getElement(this); }
214
+ };
215
215
  ZButton.style = stylesCss$9;
216
216
 
217
217
  const stylesCss$8 = ".sc-z-divider-h{display:block;padding:0;margin:0}.divider-horizontal.sc-z-divider-h{width:100%}.divider-vertical.sc-z-divider-h{height:100%}.divider-small.divider-horizontal.sc-z-divider-h{height:var(--border-size-small)}.divider-medium.divider-horizontal.sc-z-divider-h{height:var(--border-size-medium)}.divider-large.divider-horizontal.sc-z-divider-h{height:var(--border-size-large)}.divider-small.divider-vertical.sc-z-divider-h{width:var(--border-size-small)}.divider-medium.divider-vertical.sc-z-divider-h{width:var(--border-size-medium)}.divider-large.divider-vertical.sc-z-divider-h{width:var(--border-size-large)}";
218
218
 
219
- const ZDivider = class {
220
- constructor(hostRef) {
221
- registerInstance(this, hostRef);
222
- /** [optional] Divider size */
223
- this.size = DividerSize.SMALL;
224
- /** [optional] Divider color */
225
- this.color = "gray200";
226
- /** [optional] Divider orintation */
227
- this.orientation = DividerOrientation.HORIZONTAL;
228
- }
229
- render() {
230
- return (h(Host, { class: `divider-${this.size} divider-${this.orientation}`, style: { backgroundColor: `var(--${this.color})` } }));
231
- }
232
- };
219
+ const ZDivider = class {
220
+ constructor(hostRef) {
221
+ registerInstance(this, hostRef);
222
+ /** [optional] Divider size */
223
+ this.size = DividerSize.SMALL;
224
+ /** [optional] Divider color */
225
+ this.color = "gray200";
226
+ /** [optional] Divider orintation */
227
+ this.orientation = DividerOrientation.HORIZONTAL;
228
+ }
229
+ render() {
230
+ return (h(Host, { class: `divider-${this.size} divider-${this.orientation}`, style: { backgroundColor: `var(--${this.color})` } }));
231
+ }
232
+ };
233
233
  ZDivider.style = stylesCss$8;
234
234
 
235
- const stylesCss$7 = ":host{margin-right:var(--z-icon-right-margin, 0);margin-left:var(--z-icon-left-margin, 0);line-height:0;vertical-align:middle}:host svg:not([width]){width:var(--z-icon-width, 18px)}:host svg:not([height]){height:var(--z-icon-height, 18px)}";
235
+ const stylesCss$7 = ":host{display:inline-block;margin-right:var(--z-icon-right-margin, 0);margin-left:var(--z-icon-left-margin, 0);line-height:0;vertical-align:middle}:host svg:not([width]){width:var(--z-icon-width, 18px)}:host svg:not([height]){height:var(--z-icon-height, 18px)}";
236
236
 
237
- const ZIcon = class {
238
- constructor(hostRef) {
239
- registerInstance(this, hostRef);
240
- }
241
- selectPathOrPolygon(iconValue) {
242
- if (iconValue === null || iconValue === void 0 ? void 0 : iconValue.startsWith("M")) {
243
- return h("path", { d: ICONS[this.name] });
244
- }
245
- return h("polygon", { points: ICONS[this.name] });
246
- }
247
- render() {
248
- return (h(Host, { "aria-hidden": "true" }, h("svg", { viewBox: "0 0 1000 1000", width: this.width, height: this.height, id: this.iconid, fill: this.fill ? `var(--${this.fill})` : "" }, this.selectPathOrPolygon(ICONS[this.name]))));
249
- }
250
- };
237
+ const ZIcon = class {
238
+ constructor(hostRef) {
239
+ registerInstance(this, hostRef);
240
+ }
241
+ selectPathOrPolygon(iconValue) {
242
+ if (iconValue === null || iconValue === void 0 ? void 0 : iconValue.startsWith("M")) {
243
+ return h("path", { d: ICONS[this.name] });
244
+ }
245
+ return h("polygon", { points: ICONS[this.name] });
246
+ }
247
+ render() {
248
+ return (h(Host, { "aria-hidden": "true" }, h("svg", { viewBox: "0 0 1000 1000", width: this.width, height: this.height, id: this.iconid, fill: this.fill ? `var(--${this.fill})` : "" }, this.selectPathOrPolygon(ICONS[this.name]))));
249
+ }
250
+ };
251
251
  ZIcon.style = stylesCss$7;
252
252
 
253
253
  const stylesCss$6 = ".sc-z-input-h{display:inline-block;width:inherit}input.sc-z-input::-ms-clear,input.sc-z-input::-ms-reveal{display:none}.sc-z-input-h input.sc-z-input::-ms-clear,.sc-z-input-h input.sc-z-input::-ms-reveal{display:none}input.sc-z-input,textarea.sc-z-input,.textarea-wrapper.sc-z-input{box-sizing:border-box;border:var(--border-size-small) solid var(--color-surface04);background:var(--color-input-field01);border-radius:var(--border-radius-small);color:var(--color-text01);fill:var(--color-icon02);font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:var(--font-rg);outline:none}[size=\"small\"].sc-z-input-h input.sc-z-input,[size=\"small\"].sc-z-input-h textarea.sc-z-input,[size=\"small\"].sc-z-input-h .textarea-wrapper.sc-z-input,[size=\"x-small\"].sc-z-input-h input.sc-z-input,[size=\"x-small\"].sc-z-input-h textarea.sc-z-input,[size=\"x-small\"].sc-z-input-h .textarea-wrapper.sc-z-input{font-size:var(--font-size-2)}.cursor-select.sc-z-input-h input.sc-z-input{cursor:pointer}.sc-z-input-h:not(.active-select) input.sc-z-input:focus:focus-visible,.textarea-wrapper.sc-z-input:focus-within{box-shadow:var(--shadow-focus-primary)}input.sc-z-input:focus:focus-visible,textarea.sc-z-input:focus:focus-visible{color:var(--color-primary02)}.active-select.sc-z-input-h input.sc-z-input{border:var(--border-size-small) solid var(--blue500)}.cursor-select.sc-z-input-h input.sc-z-input:focus:focus-visible{box-shadow:var(--shadow-focus-primary)}.sc-z-input-h input[readonly].sc-z-input:focus:focus-visible{box-shadow:none}.filled.sc-z-input{border-color:var(--color-surface05)}.input-success.sc-z-input{border-color:var(--color-success01);background:var(--color-success-inverse);fill:var(--color-success01)}.input-error.sc-z-input{border-color:var(--color-error01);background:var(--color-error-inverse);fill:var(--color-error01)}.input-warning.sc-z-input{border-color:var(--color-warning01);background:var(--color-warning-inverse);fill:var(--color-warning01)}input.sc-z-input:hover,.textarea-wrapper.sc-z-input:hover{outline:var(--border-size-medium) solid var(--color-surface04);outline-offset:-2px}.sc-z-input-h:not(.active-select) input[readonly].sc-z-input,.readonly.sc-z-input{border-color:var(--color-disabled01);fill:var(--color-disabled01);pointer-events:none}[disabled].sc-z-input-h:not([disabled=\"false\"]) input.sc-z-input,[disabled].sc-z-input-h:not([disabled=\"false\"]) .textarea-wrapper.sc-z-input,[disabled].sc-z-input-h:not([disabled=\"false\"]) z-icon.sc-z-input{border-color:var(--color-disabled01);box-shadow:none;color:var(--color-disabled02);fill:var(--color-disabled01);pointer-events:none}[disabled].sc-z-input-h:not([disabled=\"false\"]) input.sc-z-input:hover{border-width:var(--border-size-small)}input.sc-z-input::placeholder,textarea.sc-z-input::placeholder{color:var(--color-text05)}.sc-z-input::-webkit-textarea-placeholder{color:var(--color-text05)}.sc-z-input:-ms-textarea-placeholder{color:var(--color-text05)}.sc-z-input::placeholder{color:var(--color-text05)}label.input-label.sc-z-input{display:block;padding-bottom:var(--space-unit);color:var(--color-text02);font-family:var(--font-family-sans);font-size:var(--font-size-1);font-weight:var(--font-sb);text-align:left;text-transform:uppercase}[disabled].sc-z-input-h:not([disabled=\"false\"]) label.input-label.sc-z-input{color:var(--color-disabled02)}.text-wrapper.sc-z-input>div.sc-z-input{position:relative;z-index:1;fill:var(--color-icon02)}.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input{width:100%;height:calc(var(--space-unit) * 5.5);box-sizing:border-box;padding:0 calc(var(--space-unit) * 1.5);margin:0}[size=\"small\"].sc-z-input-h .text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input{height:calc(var(--space-unit) * 4.5)}[size=\"x-small\"].sc-z-input-h .text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input{height:calc(var(--space-unit) * 4)}.text-wrapper.sc-z-input>div.sc-z-input>input.has-icon.sc-z-input,.text-wrapper.sc-z-input>div.sc-z-input>input.has-clear-icon.sc-z-input{padding-right:calc(var(--space-unit) * 5.25)}.text-wrapper.sc-z-input>div.sc-z-input>input.has-icon.has-clear-icon.sc-z-input{padding-right:calc(var(--space-unit) * 8)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input{position:absolute;z-index:2;top:50%;right:calc(var(--space-unit) * 1.5);display:flex;pointer-events:none;transform:translateY(-50%)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input{padding:0;border:0;background:none;color:inherit;font:inherit;pointer-events:initial}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input+button.icon-button.sc-z-input{margin-left:calc(var(--space-unit) * 0.5)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.reset-icon.sc-z-input,.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.toggle-password-icon.sc-z-input{cursor:pointer}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input>z-icon.sc-z-input{--z-icon-width:18px;--z-icon-height:18px;display:block}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input>z-icon.small.sc-z-input,.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input>z-icon.x-small.sc-z-input{--z-icon-width:16px;--z-icon-height:16px}.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill,.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill:hover,.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill:focus,.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill:active{background:var(--color-white) !important;background-clip:text !important;-webkit-transition-delay:99999s !important}.textarea-wrapper.sc-z-input{padding:calc(var(--space-unit) * 1.5);scrollbar-color:var(--color-primary01) transparent}textarea.sc-z-input::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}textarea.sc-z-input::-webkit-scrollbar-track{background-color:transparent}textarea.sc-z-input::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}textarea.sc-z-input::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}textarea.sc-z-input{width:100%;min-height:132px;padding:0;border:none;margin:0;resize:none}.radio-wrapper.sc-z-input,.checkbox-wrapper.sc-z-input{position:relative;display:inline-flex;flex-direction:row;align-items:center;color:var(--color-text01);fill:var(--color-primary01);font-family:var(--font-family-sans)}.radio-wrapper.sc-z-input:hover,.checkbox-wrapper.sc-z-input:hover{color:var(--color-hover-primary);fill:currentcolor}.radio-wrapper.sc-z-input>input.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input{position:absolute;z-index:-1;opacity:0;pointer-events:none}.radio-wrapper.sc-z-input .radio-label.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input{display:inline-flex;align-items:center;margin:0;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:1;text-transform:inherit}.radio-wrapper.sc-z-input input.sc-z-input:not(:disabled)+.radio-label.sc-z-input,.checkbox-wrapper.sc-z-input input.sc-z-input:not(:disabled)+.checkbox-label.sc-z-input{cursor:pointer}.radio-wrapper.sc-z-input .radio-label.sc-z-input z-icon.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input z-icon.sc-z-input{cursor:pointer;fill:inherit}[size=\"small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input z-icon.sc-z-input,[size=\"small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input z-icon.sc-z-input{--z-icon-width:16px;--z-icon-height:16px}[size=\"small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input,[size=\"small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input{font-size:var(--font-size-2)}[size=\"x-small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input z-icon.sc-z-input,[size=\"x-small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input z-icon.sc-z-input{--z-icon-width:14px;--z-icon-height:14px}[size=\"x-small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input,[size=\"x-small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input{font-size:var(--font-size-1)}.radio-wrapper.sc-z-input .radio-label.after.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input{flex-direction:row}.radio-wrapper.sc-z-input .radio-label.before.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input{flex-direction:row-reverse}.radio-wrapper.sc-z-input .radio-label.after.sc-z-input>span.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input>span.sc-z-input{margin-left:var(--space-unit)}.radio-wrapper.sc-z-input .radio-label.before.sc-z-input>span.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input>span.sc-z-input{margin-right:var(--space-unit)}[size=\"small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.after.sc-z-input>span.sc-z-input,[size=\"small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input>span.sc-z-input,[size=\"x-small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.after.sc-z-input>span.sc-z-input,[size=\"x-small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input>span.sc-z-input{margin-left:calc(var(--space-unit) * 0.5)}[size=\"small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.before.sc-z-input>span.sc-z-input,[size=\"small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input>span.sc-z-input,[size=\"x-small\"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.before.sc-z-input>span.sc-z-input,[size=\"x-small\"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input>span.sc-z-input{margin-right:calc(var(--space-unit) * 0.5)}.radio-wrapper.sc-z-input>input.sc-z-input:focus:focus-visible+.radio-label.sc-z-input>z-icon.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:focus:focus-visible+.checkbox-label.sc-z-input>z-icon.sc-z-input{border-radius:var(--border-radius-small);box-shadow:var(--shadow-focus-primary)}.radio-wrapper.sc-z-input>input.sc-z-input:disabled+.radio-label.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:disabled+.checkbox-label.sc-z-input{color:var(--color-disabled02)}.radio-wrapper.sc-z-input>input.sc-z-input:disabled+.radio-label.sc-z-input>z-icon.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:disabled+.checkbox-label.sc-z-input>z-icon.sc-z-input{cursor:default;fill:var(--color-disabled01)}";
254
254
 
255
- const ZInput = class {
256
- constructor(hostRef) {
257
- registerInstance(this, hostRef);
258
- this.inputChange = createEvent(this, "inputChange", 7);
259
- this.startTyping = createEvent(this, "startTyping", 7);
260
- this.stopTyping = createEvent(this, "stopTyping", 7);
261
- this.inputCheck = createEvent(this, "inputCheck", 7);
262
- /** the id of the input element */
263
- this.htmlid = `id-${randomId()}`;
264
- /** the input aria-label */
265
- this.ariaLabel = "";
266
- /** the input is disabled */
267
- this.disabled = false;
268
- /** the input is readonly */
269
- this.readonly = false;
270
- /** the input is required (optional): available for text, password, number, email, textarea, checkbox */
271
- this.required = false;
272
- /** checked: available for checkbox, radio */
273
- this.checked = false;
274
- /** input helper message (optional): available for text, password, number, email, textarea - if set to `false` message won't be displayed */
275
- this.message = true;
276
- /** the input label position: available for checkbox, radio */
277
- this.labelPosition = LabelPosition.RIGHT;
278
- /** render clear icon when typing (optional): available for text */
279
- this.hasclearicon = true;
280
- /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
281
- this.size = ControlSize.BIG;
282
- this.isTyping = false;
283
- this.passwordHidden = true;
284
- this.typingtimeout = 300;
285
- }
286
- inputCheckListener(e) {
287
- const data = e.detail;
288
- switch (this.type) {
289
- case InputType.RADIO:
290
- if (data.type === InputType.RADIO && data.name === this.name && data.id !== this.htmlid) {
291
- this.checked = false;
292
- }
293
- break;
294
- }
295
- }
296
- /** get checked status */
297
- async isChecked() {
298
- switch (this.type) {
299
- case InputType.CHECKBOX:
300
- case InputType.RADIO:
301
- return this.checked;
302
- default:
303
- console.warn("`isChecked` method is only available for type `checkbox` and `radio`");
304
- return false;
305
- }
306
- }
307
- emitInputChange(value) {
308
- if (!this.isTyping) {
309
- this.emitStartTyping();
310
- }
311
- let validity;
312
- if (this.type === InputType.TEXTAREA) {
313
- validity = this.getValidity("textarea");
314
- }
315
- else {
316
- validity = this.getValidity("input");
317
- }
318
- this.value = value;
319
- this.inputChange.emit({ value, validity });
320
- clearTimeout(this.timer);
321
- this.timer = setTimeout(() => {
322
- this.emitStopTyping(this.value, validity);
323
- }, this.typingtimeout);
324
- }
325
- emitStartTyping() {
326
- this.isTyping = true;
327
- this.startTyping.emit();
328
- }
329
- emitStopTyping(value, validity) {
330
- this.isTyping = false;
331
- this.stopTyping.emit({
332
- value: value,
333
- validity: validity,
334
- });
335
- }
336
- emitInputCheck(checked) {
337
- this.inputCheck.emit({
338
- id: this.htmlid,
339
- checked: checked,
340
- type: this.type,
341
- name: this.name,
342
- value: this.value,
343
- validity: this.getValidity("input"),
344
- });
345
- }
346
- getValidity(type) {
347
- const input = this.hostElement.querySelector(type);
348
- return input.validity;
349
- }
350
- /* START text/password/email/number */
351
- getTextAttributes() {
352
- return {
353
- id: this.htmlid,
354
- name: this.name,
355
- placeholder: this.placeholder,
356
- value: this.value,
357
- disabled: this.disabled,
358
- readonly: this.readonly,
359
- required: this.required,
360
- title: this.htmltitle,
361
- class: {
362
- [`input-${this.status}`]: !!this.status,
363
- filled: !!this.value,
364
- },
365
- autocomplete: this.autocomplete,
366
- onInput: (e) => this.emitInputChange(e.target.value),
367
- };
368
- }
369
- getNumberAttributes(type) {
370
- if (type != InputType.NUMBER) {
371
- return;
372
- }
373
- return {
374
- min: this.min,
375
- max: this.max,
376
- step: this.step,
377
- };
378
- }
379
- getPatternAttribute(type) {
380
- if (type != InputType.PASSWORD &&
381
- type != InputType.TEXT &&
382
- type != InputType.TEL &&
383
- type != InputType.SEARCH &&
384
- type != InputType.URL &&
385
- type != InputType.EMAIL) {
386
- return;
387
- }
388
- return {
389
- pattern: this.pattern,
390
- };
391
- }
392
- renderInputText(type = InputType.TEXT) {
393
- const ariaLabel = this.ariaLabel ? { "aria-label": this.ariaLabel } : {};
394
- const attr = Object.assign(Object.assign(Object.assign(Object.assign({}, this.getTextAttributes()), this.getNumberAttributes(type)), this.getPatternAttribute(type)), ariaLabel);
395
- if (this.icon || type === InputType.PASSWORD) {
396
- Object.assign(attr.class, { "has-icon": true });
397
- }
398
- if (this.hasclearicon && type != InputType.NUMBER) {
399
- Object.assign(attr.class, { "has-clear-icon": true });
400
- }
401
- return (h("div", { class: "text-wrapper" }, this.renderLabel(), h("div", null, h("input", Object.assign({ type: type === InputType.PASSWORD && !this.passwordHidden ? InputType.TEXT : type }, attr)), this.renderIcons()), this.renderMessage()));
402
- }
403
- renderLabel() {
404
- if (!this.label) {
405
- return;
406
- }
407
- return (h("label", { class: "input-label body-5-sb", id: `${this.htmlid}_label`, htmlFor: this.htmlid }, this.label));
408
- }
409
- renderIcons() {
410
- return (h("span", { class: "icons-wrapper" }, this.renderResetIcon(), this.renderIcon()));
411
- }
412
- renderIcon() {
413
- if (this.type === InputType.PASSWORD) {
414
- return this.renderShowHidePassword();
415
- }
416
- if (!this.icon) {
417
- return;
418
- }
419
- return (h("button", { type: "button", class: "icon-button input-icon", tabIndex: -1 }, h("z-icon", { name: this.icon, class: this.size })));
420
- }
421
- renderResetIcon() {
422
- if (!this.hasclearicon || !this.value || this.disabled || this.readonly || this.type == InputType.NUMBER) {
423
- return;
424
- }
425
- return (h("button", { type: "button", class: "icon-button reset-icon", "aria-label": "cancella il contenuto dell'input", onClick: () => this.emitInputChange("") }, h("z-icon", { name: "multiply", class: this.size })));
426
- }
427
- renderShowHidePassword() {
428
- return (h("button", { type: "button", class: "icon-button toggle-password-icon", disabled: this.disabled, "aria-label": this.passwordHidden ? "mostra password" : "nascondi password", onClick: () => (this.passwordHidden = !this.passwordHidden) }, h("z-icon", { name: this.passwordHidden ? "view-filled" : "view-off-filled", class: this.size })));
429
- }
430
- renderMessage() {
431
- if (boolean(this.message) === false) {
432
- return;
433
- }
434
- return (h("z-input-message", { message: boolean(this.message) === true ? undefined : this.message, status: this.status, class: this.size }));
435
- }
436
- /* END text/password/email/number */
437
- /* START textarea */
438
- renderTextarea() {
439
- const attributes = this.getTextAttributes();
440
- const ariaLabel = this.ariaLabel ? { "aria-label": this.ariaLabel } : {};
441
- return (h("div", { class: "text-wrapper" }, this.renderLabel(), h("div", { class: Object.assign(Object.assign({}, attributes.class), { "textarea-wrapper": true, "readonly": attributes.readonly }) }, h("textarea", Object.assign({}, attributes, ariaLabel))), this.renderMessage()));
442
- }
443
- /* END textarea */
444
- handleCheck(ev) {
445
- this.checked = ev.target.checked;
446
- this.emitInputCheck(this.checked);
447
- }
448
- /* START checkbox */
449
- renderCheckbox() {
450
- return (h("div", { class: "checkbox-wrapper" }, h("input", { id: this.htmlid, type: "checkbox", name: this.name, checked: this.checked, disabled: this.disabled, readonly: this.readonly, required: this.required, onChange: this.handleCheck.bind(this), value: this.value }), h("label", { htmlFor: this.htmlid, class: {
451
- "checkbox-label": true,
452
- "after": this.labelPosition === LabelPosition.RIGHT,
453
- "before": this.labelPosition === LabelPosition.LEFT,
454
- } }, h("z-icon", { name: this.checked ? "checkbox-checked" : "checkbox", "aria-hidden": "true", class: this.size }), this.label && h("span", { innerHTML: this.label }))));
455
- }
456
- /* END checkbox */
457
- /* START radio */
458
- renderRadio() {
459
- return (h("div", { class: "radio-wrapper" }, h("input", { id: this.htmlid, type: "radio", name: this.name, checked: this.checked, disabled: this.disabled, readonly: this.readonly, onChange: this.handleCheck.bind(this), value: this.value }), h("label", { htmlFor: this.htmlid, class: {
460
- "radio-label": true,
461
- "after": this.labelPosition === LabelPosition.RIGHT,
462
- "before": this.labelPosition === LabelPosition.LEFT,
463
- } }, h("z-icon", { name: this.checked ? "radio-button-checked" : "radio-button", "aria-hidden": "true", class: this.size }), this.label && h("span", { innerHTML: this.label }))));
464
- }
465
- /* END radio */
466
- render() {
467
- let input;
468
- switch (this.type) {
469
- case InputType.TEXTAREA:
470
- input = this.renderTextarea();
471
- break;
472
- case InputType.CHECKBOX:
473
- input = this.renderCheckbox();
474
- break;
475
- case InputType.RADIO:
476
- input = this.renderRadio();
477
- break;
478
- default:
479
- input = this.renderInputText(this.type);
480
- }
481
- return h(Host, null, input);
482
- }
483
- get hostElement() { return getElement(this); }
484
- };
255
+ const ZInput = class {
256
+ constructor(hostRef) {
257
+ registerInstance(this, hostRef);
258
+ this.inputChange = createEvent(this, "inputChange", 7);
259
+ this.startTyping = createEvent(this, "startTyping", 7);
260
+ this.stopTyping = createEvent(this, "stopTyping", 7);
261
+ this.inputCheck = createEvent(this, "inputCheck", 7);
262
+ /** the id of the input element */
263
+ this.htmlid = `id-${randomId()}`;
264
+ /** the input aria-label */
265
+ this.ariaLabel = "";
266
+ /** the input is disabled */
267
+ this.disabled = false;
268
+ /** the input is readonly */
269
+ this.readonly = false;
270
+ /** the input is required (optional): available for text, password, number, email, textarea, checkbox */
271
+ this.required = false;
272
+ /** checked: available for checkbox, radio */
273
+ this.checked = false;
274
+ /** input helper message (optional): available for text, password, number, email, textarea - if set to `false` message won't be displayed */
275
+ this.message = true;
276
+ /** the input label position: available for checkbox, radio */
277
+ this.labelPosition = LabelPosition.RIGHT;
278
+ /** render clear icon when typing (optional): available for text */
279
+ this.hasclearicon = true;
280
+ /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
281
+ this.size = ControlSize.BIG;
282
+ this.isTyping = false;
283
+ this.passwordHidden = true;
284
+ this.typingtimeout = 300;
285
+ }
286
+ inputCheckListener(e) {
287
+ const data = e.detail;
288
+ switch (this.type) {
289
+ case InputType.RADIO:
290
+ if (data.type === InputType.RADIO && data.name === this.name && data.id !== this.htmlid) {
291
+ this.checked = false;
292
+ }
293
+ break;
294
+ }
295
+ }
296
+ /** get checked status */
297
+ async isChecked() {
298
+ switch (this.type) {
299
+ case InputType.CHECKBOX:
300
+ case InputType.RADIO:
301
+ return this.checked;
302
+ default:
303
+ console.warn("`isChecked` method is only available for type `checkbox` and `radio`");
304
+ return false;
305
+ }
306
+ }
307
+ emitInputChange(value) {
308
+ if (!this.isTyping) {
309
+ this.emitStartTyping();
310
+ }
311
+ let validity;
312
+ if (this.type === InputType.TEXTAREA) {
313
+ validity = this.getValidity("textarea");
314
+ }
315
+ else {
316
+ validity = this.getValidity("input");
317
+ }
318
+ this.value = value;
319
+ this.inputChange.emit({ value, validity });
320
+ clearTimeout(this.timer);
321
+ this.timer = setTimeout(() => {
322
+ this.emitStopTyping(this.value, validity);
323
+ }, this.typingtimeout);
324
+ }
325
+ emitStartTyping() {
326
+ this.isTyping = true;
327
+ this.startTyping.emit();
328
+ }
329
+ emitStopTyping(value, validity) {
330
+ this.isTyping = false;
331
+ this.stopTyping.emit({
332
+ value: value,
333
+ validity: validity,
334
+ });
335
+ }
336
+ emitInputCheck(checked) {
337
+ this.inputCheck.emit({
338
+ id: this.htmlid,
339
+ checked: checked,
340
+ type: this.type,
341
+ name: this.name,
342
+ value: this.value,
343
+ validity: this.getValidity("input"),
344
+ });
345
+ }
346
+ getValidity(type) {
347
+ const input = this.hostElement.querySelector(type);
348
+ return input.validity;
349
+ }
350
+ /* START text/password/email/number */
351
+ getTextAttributes() {
352
+ return {
353
+ id: this.htmlid,
354
+ name: this.name,
355
+ placeholder: this.placeholder,
356
+ value: this.value,
357
+ disabled: this.disabled,
358
+ readonly: this.readonly,
359
+ required: this.required,
360
+ title: this.htmltitle,
361
+ class: {
362
+ [`input-${this.status}`]: !!this.status,
363
+ filled: !!this.value,
364
+ },
365
+ autocomplete: this.autocomplete,
366
+ onInput: (e) => this.emitInputChange(e.target.value),
367
+ };
368
+ }
369
+ getNumberAttributes(type) {
370
+ if (type != InputType.NUMBER) {
371
+ return;
372
+ }
373
+ return {
374
+ min: this.min,
375
+ max: this.max,
376
+ step: this.step,
377
+ };
378
+ }
379
+ getPatternAttribute(type) {
380
+ if (type != InputType.PASSWORD &&
381
+ type != InputType.TEXT &&
382
+ type != InputType.TEL &&
383
+ type != InputType.SEARCH &&
384
+ type != InputType.URL &&
385
+ type != InputType.EMAIL) {
386
+ return;
387
+ }
388
+ return {
389
+ pattern: this.pattern,
390
+ };
391
+ }
392
+ renderInputText(type = InputType.TEXT) {
393
+ const ariaLabel = this.ariaLabel ? { "aria-label": this.ariaLabel } : {};
394
+ const attr = Object.assign(Object.assign(Object.assign(Object.assign({}, this.getTextAttributes()), this.getNumberAttributes(type)), this.getPatternAttribute(type)), ariaLabel);
395
+ if (this.icon || type === InputType.PASSWORD) {
396
+ Object.assign(attr.class, { "has-icon": true });
397
+ }
398
+ if (this.hasclearicon && type != InputType.NUMBER) {
399
+ Object.assign(attr.class, { "has-clear-icon": true });
400
+ }
401
+ return (h("div", { class: "text-wrapper" }, this.renderLabel(), h("div", null, h("input", Object.assign({ type: type === InputType.PASSWORD && !this.passwordHidden ? InputType.TEXT : type }, attr)), this.renderIcons()), this.renderMessage()));
402
+ }
403
+ renderLabel() {
404
+ if (!this.label) {
405
+ return;
406
+ }
407
+ return (h("label", { class: "input-label body-5-sb", id: `${this.htmlid}_label`, htmlFor: this.htmlid }, this.label));
408
+ }
409
+ renderIcons() {
410
+ return (h("span", { class: "icons-wrapper" }, this.renderResetIcon(), this.renderIcon()));
411
+ }
412
+ renderIcon() {
413
+ if (this.type === InputType.PASSWORD) {
414
+ return this.renderShowHidePassword();
415
+ }
416
+ if (!this.icon) {
417
+ return;
418
+ }
419
+ return (h("button", { type: "button", class: "icon-button input-icon", tabIndex: -1 }, h("z-icon", { name: this.icon, class: this.size })));
420
+ }
421
+ renderResetIcon() {
422
+ if (!this.hasclearicon || !this.value || this.disabled || this.readonly || this.type == InputType.NUMBER) {
423
+ return;
424
+ }
425
+ return (h("button", { type: "button", class: "icon-button reset-icon", "aria-label": "cancella il contenuto dell'input", onClick: () => this.emitInputChange("") }, h("z-icon", { name: "multiply", class: this.size })));
426
+ }
427
+ renderShowHidePassword() {
428
+ return (h("button", { type: "button", class: "icon-button toggle-password-icon", disabled: this.disabled, "aria-label": this.passwordHidden ? "mostra password" : "nascondi password", onClick: () => (this.passwordHidden = !this.passwordHidden) }, h("z-icon", { name: this.passwordHidden ? "view-filled" : "view-off-filled", class: this.size })));
429
+ }
430
+ renderMessage() {
431
+ if (boolean(this.message) === false) {
432
+ return;
433
+ }
434
+ return (h("z-input-message", { message: boolean(this.message) === true ? undefined : this.message, status: this.status, class: this.size }));
435
+ }
436
+ /* END text/password/email/number */
437
+ /* START textarea */
438
+ renderTextarea() {
439
+ const attributes = this.getTextAttributes();
440
+ const ariaLabel = this.ariaLabel ? { "aria-label": this.ariaLabel } : {};
441
+ return (h("div", { class: "text-wrapper" }, this.renderLabel(), h("div", { class: Object.assign(Object.assign({}, attributes.class), { "textarea-wrapper": true, "readonly": attributes.readonly }) }, h("textarea", Object.assign({}, attributes, ariaLabel))), this.renderMessage()));
442
+ }
443
+ /* END textarea */
444
+ handleCheck(ev) {
445
+ this.checked = ev.target.checked;
446
+ this.emitInputCheck(this.checked);
447
+ }
448
+ /* START checkbox */
449
+ renderCheckbox() {
450
+ return (h("div", { class: "checkbox-wrapper" }, h("input", { id: this.htmlid, type: "checkbox", name: this.name, checked: this.checked, disabled: this.disabled, readonly: this.readonly, required: this.required, onChange: this.handleCheck.bind(this), value: this.value }), h("label", { htmlFor: this.htmlid, class: {
451
+ "checkbox-label": true,
452
+ "after": this.labelPosition === LabelPosition.RIGHT,
453
+ "before": this.labelPosition === LabelPosition.LEFT,
454
+ } }, h("z-icon", { name: this.checked ? "checkbox-checked" : "checkbox", "aria-hidden": "true", class: this.size }), this.label && h("span", { innerHTML: this.label }))));
455
+ }
456
+ /* END checkbox */
457
+ /* START radio */
458
+ renderRadio() {
459
+ return (h("div", { class: "radio-wrapper" }, h("input", { id: this.htmlid, type: "radio", name: this.name, checked: this.checked, disabled: this.disabled, readonly: this.readonly, onChange: this.handleCheck.bind(this), value: this.value }), h("label", { htmlFor: this.htmlid, class: {
460
+ "radio-label": true,
461
+ "after": this.labelPosition === LabelPosition.RIGHT,
462
+ "before": this.labelPosition === LabelPosition.LEFT,
463
+ } }, h("z-icon", { name: this.checked ? "radio-button-checked" : "radio-button", "aria-hidden": "true", class: this.size }), this.label && h("span", { innerHTML: this.label }))));
464
+ }
465
+ /* END radio */
466
+ render() {
467
+ let input;
468
+ switch (this.type) {
469
+ case InputType.TEXTAREA:
470
+ input = this.renderTextarea();
471
+ break;
472
+ case InputType.CHECKBOX:
473
+ input = this.renderCheckbox();
474
+ break;
475
+ case InputType.RADIO:
476
+ input = this.renderRadio();
477
+ break;
478
+ default:
479
+ input = this.renderInputText(this.type);
480
+ }
481
+ return h(Host, null, input);
482
+ }
483
+ get hostElement() { return getElement(this); }
484
+ };
485
485
  ZInput.style = stylesCss$6;
486
486
 
487
487
  const stylesCss$5 = ":host{display:flex;min-height:calc(var(--space-unit) * 2.5);align-items:start;margin-top:var(--space-unit);color:var(--color-text05);fill:currentcolor;font-family:var(--font-family-sans);font-size:var(--font-size-2);letter-spacing:0.16px}:host(.small),:host(.x-small){margin-top:calc(var(--space-unit) * 0.5);font-size:var(--font-size-1)}:host([status=\"success\"]){color:var(--color-text-success)}:host([status=\"error\"]){color:var(--color-text-error)}:host([status=\"warning\"]){color:var(--color-warning02)}:host(:focus){outline:none}:host>z-icon{--z-icon-width:calc(var(--space-unit) * 2);--z-icon-height:calc(var(--space-unit) * 2);--z-icon-right-margin:var(--space-unit);margin-top:calc(var(--space-unit) * 0.25)}:host(.small)>z-icon,:host(.x-small)>z-icon{--z-icon-width:14px;--z-icon-height:14px;--z-icon-right-margin:calc(var(--space-unit) * 0.5)}";
488
488
 
489
- const ZInputMessage = class {
490
- constructor(hostRef) {
491
- registerInstance(this, hostRef);
492
- this.statusIcons = {
493
- success: "checkmark-circle",
494
- error: "multiply-circled",
495
- warning: "exclamation-circle",
496
- };
497
- this.statusRole = {};
498
- }
499
- onMessageChange() {
500
- this.statusRole = this.message && this.status ? { role: "alert" } : {};
501
- }
502
- componentWillLoad() {
503
- this.onMessageChange();
504
- }
505
- render() {
506
- return (h(Host, Object.assign({}, this.statusRole, { "aria-label": this.message }), this.statusIcons[this.status] && this.message && h("z-icon", { name: this.statusIcons[this.status] }), h("span", { innerHTML: this.message })));
507
- }
508
- static get watchers() { return {
509
- "message": ["onMessageChange"],
510
- "status": ["onMessageChange"]
511
- }; }
512
- };
489
+ const ZInputMessage = class {
490
+ constructor(hostRef) {
491
+ registerInstance(this, hostRef);
492
+ this.statusIcons = {
493
+ success: "checkmark-circle",
494
+ error: "multiply-circled",
495
+ warning: "exclamation-circle",
496
+ };
497
+ this.statusRole = {};
498
+ }
499
+ onMessageChange() {
500
+ this.statusRole = this.message && this.status ? { role: "alert" } : {};
501
+ }
502
+ componentWillLoad() {
503
+ this.onMessageChange();
504
+ }
505
+ render() {
506
+ return (h(Host, Object.assign({}, this.statusRole, { "aria-label": this.message }), this.statusIcons[this.status] && this.message && h("z-icon", { name: this.statusIcons[this.status] }), h("span", { innerHTML: this.message })));
507
+ }
508
+ static get watchers() { return {
509
+ "message": ["onMessageChange"],
510
+ "status": ["onMessageChange"]
511
+ }; }
512
+ };
513
513
  ZInputMessage.style = stylesCss$5;
514
514
 
515
515
  const stylesCss$4 = ":host{display:flex;flex-direction:column;font-family:var(--font-family-sans);font-weight:var(--font-rg)}";
516
516
 
517
- const ZList = class {
518
- constructor(hostRef) {
519
- registerInstance(this, hostRef);
520
- /**
521
- * [optional] Sets size of inside elements.
522
- */
523
- this.size = ListSize.MEDIUM;
524
- /**
525
- * [optional] type of the list marker for each element
526
- */
527
- this.listType = ListType.NONE;
528
- }
529
- setChildrenSizeType() {
530
- const children = this.host.children;
531
- for (let i = 0; i < children.length; i++) {
532
- children[i].setAttribute("size", this.size);
533
- children[i].setAttribute("list-type", this.listType);
534
- children[i].setAttribute("list-element-position", (i + 1).toString());
535
- }
536
- }
537
- componentDidLoad() {
538
- this.setChildrenSizeType();
539
- }
540
- render() {
541
- return (h(Host, { role: "list" }, h("slot", null)));
542
- }
543
- get host() { return getElement(this); }
544
- };
517
+ const ZList = class {
518
+ constructor(hostRef) {
519
+ registerInstance(this, hostRef);
520
+ /**
521
+ * [optional] Sets size of inside elements.
522
+ */
523
+ this.size = ListSize.MEDIUM;
524
+ /**
525
+ * [optional] type of the list marker for each element
526
+ */
527
+ this.listType = ListType.NONE;
528
+ }
529
+ setChildrenSizeType() {
530
+ const children = this.host.children;
531
+ for (let i = 0; i < children.length; i++) {
532
+ children[i].setAttribute("size", this.size);
533
+ children[i].setAttribute("list-type", this.listType);
534
+ children[i].setAttribute("list-element-position", (i + 1).toString());
535
+ }
536
+ }
537
+ componentDidLoad() {
538
+ this.setChildrenSizeType();
539
+ }
540
+ render() {
541
+ return (h(Host, { role: "list" }, h("slot", null)));
542
+ }
543
+ get host() { return getElement(this); }
544
+ };
545
545
  ZList.style = stylesCss$4;
546
546
 
547
547
  const stylesCss$3 = ":host{outline:none}:host>.container,:host>.container-contextual-menu{--background-color-list-element:var(--bg-white);--background-hover-color-list-element:var(--color-surface02);--background-active-color-list-element:var(--color-surface02);display:flex;box-sizing:border-box;flex-direction:column;justify-content:center;font-family:var(--font-family-sans);font-weight:var(--font-rg);outline:none}:host([size=\"small\"])>.container{min-height:calc(var(--space-unit) * 4);padding:calc(var(--space-unit) / 2) 0}:host([size=\"medium\"])>.container{min-height:calc(var(--space-unit) * 5);padding:var(--space-unit) 0}:host([size=\"large\"])>.container{min-height:calc(var(--space-unit) * 7);padding:calc(var(--space-unit) * 2) 0}:host([size=\"x-large\"])>.container{min-height:calc(var(--space-unit) * 9);padding:calc(var(--space-unit) * 3) 0}:host([expandable])>.container,:host([expandable])>.container-contextual-menu,:host([clickable])>.container,:host([clickable])>.container-contextual-menu{cursor:pointer}:host([expandable]:hover)>.container,:host([expandable]:hover)>.container-contextual-menu,:host([clickable]:hover)>.container,:host([clickable]:hover)>.container-contextual-menu{background-color:var(--background-hover-color-list-element)}:host([expandable]:focus:focus-visible)>.container,:host([expandable]:focus:focus-visible)>.container-contextual-menu,:host([clickable]:focus:focus-visible)>.container,:host([clickable]:focus:focus-visible)>.container-contextual-menu{box-shadow:var(--shadow-focus-primary)}:host([clickable]:not([expandable]))>.container.clicked,:host([clickable]:not([expandable]))>.container-contextual-menu.clicked{box-shadow:var(--shadow-focus-primary)}:host([expandable]:active)>.container,:host([expandable]:active)>.container-contextual-menu,:host([clickable]:active)>.container,:host([clickable]:active)>.container-contextual-menu{background-color:var(--background-active-color-list-element)}:host([align-button=\"left\"][expandable])>.container>.z-list-element-container,:host([align-button=\"left\"][expandable])>.container-contextual-menu>.z-list-element-container{display:flex}:host([align-button=\"right\"][expandable])>.container>.z-list-element-container,:host([align-button=\"right\"][expandable])>.container-contextual-menu>.z-list-element-container{display:flex;flex-direction:row-reverse;justify-content:space-between}:host([align-button=\"left\"][expandable])>.container>.z-list-element-container>z-icon,:host([align-button=\"left\"][expandable])>.container-contextual-menu>.z-list-element-container>z-icon{margin-right:var(--space-unit)}:host([align-button=\"right\"][expandable])>.container>.z-list-element-container>z-icon,:host([align-button=\"right\"][expandable])>.container-contextual-menu>.z-list-element-container>z-icon{margin-left:var(--space-unit)}:host>.container>.z-list-element-inner-container,:host>.container-contextual-menu>.z-list-element-inner-container{display:none}:host>.container>.z-list-element-inner-container.expanded,:host>.container-contextual-menu>.z-list-element-inner-container.expanded{display:block}:host([clickable]:hover)>.container-contextual-menu{background-color:var(--color-surface03)}.container-contextual-menu:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}.z-list-content-container{display:flex;align-items:center}";
548
548
 
549
- const ZListElement = class {
550
- /**
551
- * Constructor.
552
- */
553
- constructor(hostRef) {
554
- registerInstance(this, hostRef);
555
- this.accessibleFocus = createEvent(this, "accessibleFocus", 7);
556
- this.clickItem = createEvent(this, "clickItem", 7);
557
- /**
558
- * [optional] Align expandable button left or right.
559
- */
560
- this.alignButton = ExpandableListButtonAlign.LEFT;
561
- /**
562
- * [optional] Sets element clickable.
563
- */
564
- this.clickable = false;
565
- /**
566
- * [optional] Sets the divider color.
567
- */
568
- this.dividerColor = "color-surface03";
569
- /**
570
- * [optional] Sets the position where to insert the divider.
571
- */
572
- this.dividerType = ListDividerType.NONE;
573
- /**
574
- * [optional] Sets the divider size.
575
- */
576
- this.dividerSize = DividerSize.SMALL;
577
- /**
578
- * [optional] Sets element as expandable.
579
- */
580
- this.expandable = false;
581
- /**
582
- * [optional] Sets expandable style to element.
583
- */
584
- this.expandableStyle = ExpandableListStyle.ACCORDION;
585
- /**
586
- * [optional] Sets size of inside elements.
587
- */
588
- this.size = ListSize.MEDIUM;
589
- /**
590
- * [optional] Sets text color of the element.
591
- */
592
- this.color = "none";
593
- /**
594
- * [optional] Sets disabled style of the element.
595
- */
596
- this.disabled = false;
597
- /**
598
- * [optional] If is used in ZContextualMenu component
599
- */
600
- this.isContextualMenu = false;
601
- /**
602
- * [optional] position of the list element inside the list or the group
603
- */
604
- this.listElementPosition = "0";
605
- /**
606
- * [optional] type of the list marker for each element
607
- */
608
- this.listType = ListType.NONE;
609
- this.showInnerContent = false;
610
- this.openElementConfig = {
611
- accordion: {
612
- open: "minus-circled",
613
- close: "plus-circled",
614
- },
615
- menu: {
616
- open: "chevron-up",
617
- close: "chevron-down",
618
- },
619
- };
620
- this.handleClick = this.handleClick.bind(this);
621
- this.handleKeyDown = this.handleKeyDown.bind(this);
622
- }
623
- accessibleFocusHandler(e) {
624
- if (this.listElementId === e.detail) {
625
- const toFocus = this.host.shadowRoot.getElementById(`z-list-element-id-${e.detail}`);
626
- toFocus.focus();
627
- }
628
- }
629
- /**
630
- * Handler for click on element. If element is expandable, change state.
631
- * @returns void
632
- */
633
- handleClick() {
634
- this.clickItem.emit(this.listElementId);
635
- if (!this.expandable) {
636
- return;
637
- }
638
- this.showInnerContent = !this.showInnerContent;
639
- }
640
- calculateClass() {
641
- if (this.isContextualMenu) {
642
- return "container-contextual-menu";
643
- }
644
- return "container";
645
- }
646
- handleKeyDown(event) {
647
- const expandByKey = event.code === KeyboardCode.ENTER;
648
- switch (event.code) {
649
- case KeyboardCode.ARROW_DOWN:
650
- event.preventDefault();
651
- this.accessibleFocus.emit(this.listElementId + 1);
652
- break;
653
- case KeyboardCode.ARROW_UP:
654
- event.preventDefault();
655
- this.accessibleFocus.emit(this.listElementId - 1);
656
- break;
657
- case KeyboardCode.ENTER:
658
- event.preventDefault();
659
- this.clickItem.emit(this.listElementId);
660
- break;
661
- }
662
- if (!this.expandable || !expandByKey) {
663
- return;
664
- }
665
- this.showInnerContent = !this.showInnerContent;
666
- }
667
- /**
668
- * Renders button to expand element.
669
- * @returns expadable button
670
- */
671
- renderExpandableButton() {
672
- if (!this.expandable) {
673
- return null;
674
- }
675
- return (h("z-icon", { name: this.showInnerContent
676
- ? this.openElementConfig[this.expandableStyle].open
677
- : this.openElementConfig[this.expandableStyle].close }));
678
- }
679
- /**
680
- * Renders expanded content if element is expandable.
681
- * @returns expanded content
682
- */
683
- renderExpandedContent() {
684
- if (!this.expandable) {
685
- return null;
686
- }
687
- return (h("div", { class: {
688
- "z-list-element-inner-container": true,
689
- "expanded": this.showInnerContent,
690
- } }, h("slot", { name: "inner-content" })));
691
- }
692
- /**
693
- * Renders content of the z-list-element
694
- * @returns list content
695
- */
696
- renderContent() {
697
- if (this.listType === ListType.NONE) {
698
- return h("slot", null);
699
- }
700
- if (this.listType === ListType.ORDERED) {
701
- return (h("div", { class: "z-list-content-container" }, h("div", null, this.listElementPosition, ".\u2003"), h("slot", null)));
702
- }
703
- if (this.listType === ListType.UNORDERED) {
704
- return (h("div", { class: "z-list-content-container" }, h("span", null, "\u2022\u2003"), h("slot", null)));
705
- }
706
- }
707
- render() {
708
- return (h(Host, { role: "listitem", "aria-expanded": this.expandable ? this.showInnerContent : null, onClick: this.handleClick, onKeyDown: this.handleKeyDown, clickable: this.clickable && !this.disabled, tabIndex: !this.isContextualMenu ? "0" : null }, h("div", { class: `${this.calculateClass()}`, style: { color: `var(--${this.color})` }, tabindex: this.isContextualMenu ? "0" : "-1", id: `z-list-element-id-${this.listElementId}`, part: "list-item-container" }, h("div", { class: "z-list-element-container" }, this.renderExpandableButton(), this.renderContent()), this.renderExpandedContent()), this.dividerType === ListDividerType.ELEMENT && (h("z-divider", { color: this.dividerColor, size: this.dividerSize }))));
709
- }
710
- get host() { return getElement(this); }
711
- };
549
+ const ZListElement = class {
550
+ /**
551
+ * Constructor.
552
+ */
553
+ constructor(hostRef) {
554
+ registerInstance(this, hostRef);
555
+ this.accessibleFocus = createEvent(this, "accessibleFocus", 7);
556
+ this.clickItem = createEvent(this, "clickItem", 7);
557
+ /**
558
+ * [optional] Align expandable button left or right.
559
+ */
560
+ this.alignButton = ExpandableListButtonAlign.LEFT;
561
+ /**
562
+ * [optional] Sets element clickable.
563
+ */
564
+ this.clickable = false;
565
+ /**
566
+ * [optional] Sets the divider color.
567
+ */
568
+ this.dividerColor = "color-surface03";
569
+ /**
570
+ * [optional] Sets the position where to insert the divider.
571
+ */
572
+ this.dividerType = ListDividerType.NONE;
573
+ /**
574
+ * [optional] Sets the divider size.
575
+ */
576
+ this.dividerSize = DividerSize.SMALL;
577
+ /**
578
+ * [optional] Sets element as expandable.
579
+ */
580
+ this.expandable = false;
581
+ /**
582
+ * [optional] Sets expandable style to element.
583
+ */
584
+ this.expandableStyle = ExpandableListStyle.ACCORDION;
585
+ /**
586
+ * [optional] Sets size of inside elements.
587
+ */
588
+ this.size = ListSize.MEDIUM;
589
+ /**
590
+ * [optional] Sets text color of the element.
591
+ */
592
+ this.color = "none";
593
+ /**
594
+ * [optional] Sets disabled style of the element.
595
+ */
596
+ this.disabled = false;
597
+ /**
598
+ * [optional] If is used in ZContextualMenu component
599
+ */
600
+ this.isContextualMenu = false;
601
+ /**
602
+ * [optional] position of the list element inside the list or the group
603
+ */
604
+ this.listElementPosition = "0";
605
+ /**
606
+ * [optional] type of the list marker for each element
607
+ */
608
+ this.listType = ListType.NONE;
609
+ this.showInnerContent = false;
610
+ this.openElementConfig = {
611
+ accordion: {
612
+ open: "minus-circled",
613
+ close: "plus-circled",
614
+ },
615
+ menu: {
616
+ open: "chevron-up",
617
+ close: "chevron-down",
618
+ },
619
+ };
620
+ this.handleClick = this.handleClick.bind(this);
621
+ this.handleKeyDown = this.handleKeyDown.bind(this);
622
+ }
623
+ accessibleFocusHandler(e) {
624
+ if (this.listElementId === e.detail) {
625
+ const toFocus = this.host.shadowRoot.getElementById(`z-list-element-id-${e.detail}`);
626
+ toFocus.focus();
627
+ }
628
+ }
629
+ /**
630
+ * Handler for click on element. If element is expandable, change state.
631
+ * @returns void
632
+ */
633
+ handleClick() {
634
+ this.clickItem.emit(this.listElementId);
635
+ if (!this.expandable) {
636
+ return;
637
+ }
638
+ this.showInnerContent = !this.showInnerContent;
639
+ }
640
+ calculateClass() {
641
+ if (this.isContextualMenu) {
642
+ return "container-contextual-menu";
643
+ }
644
+ return "container";
645
+ }
646
+ handleKeyDown(event) {
647
+ const expandByKey = event.code === KeyboardCode.ENTER;
648
+ switch (event.code) {
649
+ case KeyboardCode.ARROW_DOWN:
650
+ event.preventDefault();
651
+ this.accessibleFocus.emit(this.listElementId + 1);
652
+ break;
653
+ case KeyboardCode.ARROW_UP:
654
+ event.preventDefault();
655
+ this.accessibleFocus.emit(this.listElementId - 1);
656
+ break;
657
+ case KeyboardCode.ENTER:
658
+ event.preventDefault();
659
+ this.clickItem.emit(this.listElementId);
660
+ break;
661
+ }
662
+ if (!this.expandable || !expandByKey) {
663
+ return;
664
+ }
665
+ this.showInnerContent = !this.showInnerContent;
666
+ }
667
+ /**
668
+ * Renders button to expand element.
669
+ * @returns expadable button
670
+ */
671
+ renderExpandableButton() {
672
+ if (!this.expandable) {
673
+ return null;
674
+ }
675
+ return (h("z-icon", { name: this.showInnerContent
676
+ ? this.openElementConfig[this.expandableStyle].open
677
+ : this.openElementConfig[this.expandableStyle].close }));
678
+ }
679
+ /**
680
+ * Renders expanded content if element is expandable.
681
+ * @returns expanded content
682
+ */
683
+ renderExpandedContent() {
684
+ if (!this.expandable) {
685
+ return null;
686
+ }
687
+ return (h("div", { class: {
688
+ "z-list-element-inner-container": true,
689
+ "expanded": this.showInnerContent,
690
+ } }, h("slot", { name: "inner-content" })));
691
+ }
692
+ /**
693
+ * Renders content of the z-list-element
694
+ * @returns list content
695
+ */
696
+ renderContent() {
697
+ if (this.listType === ListType.NONE) {
698
+ return h("slot", null);
699
+ }
700
+ if (this.listType === ListType.ORDERED) {
701
+ return (h("div", { class: "z-list-content-container" }, h("div", null, this.listElementPosition, ".\u2003"), h("slot", null)));
702
+ }
703
+ if (this.listType === ListType.UNORDERED) {
704
+ return (h("div", { class: "z-list-content-container" }, h("span", null, "\u2022\u2003"), h("slot", null)));
705
+ }
706
+ }
707
+ render() {
708
+ return (h(Host, { role: "listitem", "aria-expanded": this.expandable ? this.showInnerContent : null, onClick: this.handleClick, onKeyDown: this.handleKeyDown, clickable: this.clickable && !this.disabled, tabIndex: !this.isContextualMenu ? "0" : null }, h("div", { class: `${this.calculateClass()}`, style: { color: `var(--${this.color})` }, tabindex: this.isContextualMenu ? "0" : "-1", id: `z-list-element-id-${this.listElementId}`, part: "list-item-container" }, h("div", { class: "z-list-element-container" }, this.renderExpandableButton(), this.renderContent()), this.renderExpandedContent()), this.dividerType === ListDividerType.ELEMENT && (h("z-divider", { color: this.dividerColor, size: this.dividerSize }))));
709
+ }
710
+ get host() { return getElement(this); }
711
+ };
712
712
  ZListElement.style = stylesCss$3;
713
713
 
714
714
  const stylesCss$2 = ":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:var(--space-unit);padding-bottom:var(--space-unit)}:host>.z-list-group-header-container.has-header>z-divider{margin-top:var(--space-unit)}";
715
715
 
716
- const ZListGroup = class {
717
- constructor(hostRef) {
718
- registerInstance(this, hostRef);
719
- /**
720
- * [optional] Sets size of inside elements.
721
- */
722
- this.size = ListSize.MEDIUM;
723
- /**
724
- * [optional] Sets the position where to insert the divider.
725
- */
726
- this.dividerType = ListDividerType.NONE;
727
- /**
728
- * [optional] Sets the divider size.
729
- */
730
- this.dividerSize = DividerSize.SMALL;
731
- /**
732
- * [optional] Sets the divider color.
733
- */
734
- this.dividerColor = "gray200";
735
- /**
736
- * [optional] type of the list marker for each element
737
- */
738
- this.listType = ListType.NONE;
739
- }
740
- componentDidLoad() {
741
- const children = this.host.children;
742
- for (let i = 0; i < children.length; i++) {
743
- if (children.length - 1 > i) {
744
- children[i].setAttribute("divider-type", this.dividerType);
745
- children[i].setAttribute("divider-size", this.dividerSize);
746
- children[i].setAttribute("divider-color", this.dividerColor);
747
- }
748
- children[i].setAttribute("size", this.size);
749
- children[i].setAttribute("list-type", this.listType);
750
- children[i].setAttribute("list-element-position", i.toString());
751
- }
752
- }
753
- componentWillLoad() {
754
- this.hasHeader = !!this.host.querySelector('[slot="header-title"]');
755
- }
756
- render() {
757
- return (h(Host, { role: "group" }, h("div", { class: {
758
- "z-list-group-header-container": true,
759
- "has-header": this.hasHeader,
760
- } }, h("slot", { name: "header-title" }), this.dividerType === ListDividerType.HEADER && (h("z-divider", { color: this.dividerColor, size: this.dividerSize }))), h("slot", null)));
761
- }
762
- get host() { return getElement(this); }
763
- };
716
+ const ZListGroup = class {
717
+ constructor(hostRef) {
718
+ registerInstance(this, hostRef);
719
+ /**
720
+ * [optional] Sets size of inside elements.
721
+ */
722
+ this.size = ListSize.MEDIUM;
723
+ /**
724
+ * [optional] Sets the position where to insert the divider.
725
+ */
726
+ this.dividerType = ListDividerType.NONE;
727
+ /**
728
+ * [optional] Sets the divider size.
729
+ */
730
+ this.dividerSize = DividerSize.SMALL;
731
+ /**
732
+ * [optional] Sets the divider color.
733
+ */
734
+ this.dividerColor = "gray200";
735
+ /**
736
+ * [optional] type of the list marker for each element
737
+ */
738
+ this.listType = ListType.NONE;
739
+ }
740
+ componentDidLoad() {
741
+ const children = this.host.children;
742
+ for (let i = 0; i < children.length; i++) {
743
+ if (children.length - 1 > i) {
744
+ children[i].setAttribute("divider-type", this.dividerType);
745
+ children[i].setAttribute("divider-size", this.dividerSize);
746
+ children[i].setAttribute("divider-color", this.dividerColor);
747
+ }
748
+ children[i].setAttribute("size", this.size);
749
+ children[i].setAttribute("list-type", this.listType);
750
+ children[i].setAttribute("list-element-position", i.toString());
751
+ }
752
+ }
753
+ componentWillLoad() {
754
+ this.hasHeader = !!this.host.querySelector('[slot="header-title"]');
755
+ }
756
+ render() {
757
+ return (h(Host, { role: "group" }, h("div", { class: {
758
+ "z-list-group-header-container": true,
759
+ "has-header": this.hasHeader,
760
+ } }, h("slot", { name: "header-title" }), this.dividerType === ListDividerType.HEADER && (h("z-divider", { color: this.dividerColor, size: this.dividerSize }))), h("slot", null)));
761
+ }
762
+ get host() { return getElement(this); }
763
+ };
764
764
  ZListGroup.style = stylesCss$2;
765
765
 
766
766
  const stylesCss$1 = ".sc-z-offcanvas-h{--z-offcanvas--container-width:375px;--z-offcanvas--top-space:0;min-width:100%;height:100%;font-family:var(--font-family-sans);font-weight:var(--font-rg);visibility:hidden}.canvas-container.sc-z-offcanvas{display:flex;overflow:-moz-scrollbars-none;overflow:hidden;min-width:100%;height:100%;flex-direction:column;background:var(--color-surface01)}[variant=\"pushcontent\"].sc-z-offcanvas-h{display:none}[open].sc-z-offcanvas-h{display:flex;visibility:visible}[variant=\"overlay\"].sc-z-offcanvas-h{position:fixed;z-index:1000;top:var(--z-offcanvas--top-space);right:0;bottom:0;left:0;display:flex;height:calc(100% - var(--z-offcanvas--top-space))}[variant=\"overlay\"][transitiondirection=\"left\"].sc-z-offcanvas-h{justify-content:end}[variant=\"overlay\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{z-index:1010}[variant=\"overlay\"].sc-z-offcanvas-h .canvas-background.sc-z-offcanvas{position:absolute;left:0;width:100%;height:100%;background-color:var(--gray900);opacity:0.7}.canvas-container.sc-z-offcanvas>.canvas-content.sc-z-offcanvas{overflow: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;overflow-x:hidden}[variant=\"overlay\"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas>.canvas-content.sc-z-offcanvas{padding:0 calc(var(--space-unit) * 2) calc(var(--space-unit) * 2) calc(var(--space-unit) * 2);margin:calc(var(--space-unit) * 2) calc(var(--space-unit) / 2) 0 0}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar-track{background-color:transparent}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas{scrollbar-color:var(--color-primary01) transparent}@media only screen and (max-width: 768px){[open][transitiondirection=\"left\"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{animation:enter-right 0.4s ease-out}[open][transitiondirection=\"right\"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{animation:enter-left 0.4s ease-out}}@media only screen and (min-width: 768px){.sc-z-offcanvas-h{min-width:auto}.canvas-container.sc-z-offcanvas{width:auto;min-width:max(var(--z-offcanvas--container-width), 375px);max-width:max(var(--z-offcanvas--container-width), 375px);height:auto;min-height:calc(var(--space-unit) * 40)}.sc-z-offcanvas-h:not([variant=\"overlay\"])[open]:not(.skip-animation){width:auto;animation:grow 0.4s ease-out}}@keyframes grow{from{width:0}to{width:max(var(--z-offcanvas--container-width), 375px)}}@keyframes enter-left{from{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes enter-right{from{transform:translateX(100%)}to{transform:translateX(0)}}[open][variant=\"overlay\"][transitiondirection=\"left\"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{animation:enter-right 0.4s ease-out}[open][transitiondirection=\"right\"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{animation:enter-left 0.4s ease-out}.sc-z-offcanvas-h:not([open])[variant=\"overlay\"][transitiondirection=\"right\"]>.canvas-container.sc-z-offcanvas{transform:translateX(-100%);transition:visibility 0.4s ease-out, transform 0.4s ease-out}.sc-z-offcanvas-h:not([open])[variant=\"overlay\"][transitiondirection=\"left\"]>.canvas-container.sc-z-offcanvas{transform:translateX(100%);transition:visibility 0.4s ease-out, transform 0.4s ease-out}.sc-z-offcanvas-h:not([open])[variant=\"overlay\"] .canvas-background.sc-z-offcanvas{transition:visibility 0.4s ease-out;visibility:hidden}";
767
767
 
768
- const ZOffcanvas = class {
769
- constructor(hostRef) {
770
- registerInstance(this, hostRef);
771
- this.canvasOpenStatusChanged = createEvent(this, "canvasOpenStatusChanged", 7);
772
- /**
773
- * Offcanvas variant.
774
- * Can be one `overlay` or `pushcontent`.
775
- * Default variant: pushcontent
776
- */
777
- this.variant = OffCanvasVariant.PUSHCONTENT;
778
- /** Whether the offcanvas is open. Default: false */
779
- this.open = false;
780
- /** open content transitioning in a specified direction left | right. Default: left */
781
- this.transitiondirection = TransitionDirection.LEFT;
782
- /**
783
- * Whether to skip the initial animation.
784
- * Useful when the initial value of the `open` prop is set to `true`.
785
- */
786
- this.skipLoadAnimation = false;
787
- }
788
- onOpenChanged() {
789
- if (!this.open && this.skipLoadAnimation) {
790
- this.skipLoadAnimation = false;
791
- }
792
- if (this.open) {
793
- this.handlePageOverflow();
794
- }
795
- this.canvasOpenStatusChanged.emit(this.open);
796
- }
797
- handlePageOverflow() {
798
- const overflow = this.variant === OffCanvasVariant.OVERLAY ? "overflow-y" : "overflow-x";
799
- document.body.style[overflow] = this.open ? "hidden" : "";
800
- }
801
- render() {
802
- return (h(Host, { class: { "skip-animation": this.skipLoadAnimation } }, h("div", { role: "presentation", class: "canvas-container", onTransitionEnd: () => this.handlePageOverflow() }, h("div", { role: "presentation", class: "canvas-content" }, h("slot", { name: "canvasContent" }))), this.variant == OffCanvasVariant.OVERLAY && (h("div", { class: "canvas-background", "data-action": "canvasBackground", onClick: () => (this.open = false) }))));
803
- }
804
- static get watchers() { return {
805
- "open": ["onOpenChanged"]
806
- }; }
807
- };
768
+ const ZOffcanvas = class {
769
+ constructor(hostRef) {
770
+ registerInstance(this, hostRef);
771
+ this.canvasOpenStatusChanged = createEvent(this, "canvasOpenStatusChanged", 7);
772
+ /**
773
+ * Offcanvas variant.
774
+ * Can be one `overlay` or `pushcontent`.
775
+ * Default variant: pushcontent
776
+ */
777
+ this.variant = OffCanvasVariant.PUSHCONTENT;
778
+ /** Whether the offcanvas is open. Default: false */
779
+ this.open = false;
780
+ /** open content transitioning in a specified direction left | right. Default: left */
781
+ this.transitiondirection = TransitionDirection.LEFT;
782
+ /**
783
+ * Whether to skip the initial animation.
784
+ * Useful when the initial value of the `open` prop is set to `true`.
785
+ */
786
+ this.skipLoadAnimation = false;
787
+ }
788
+ onOpenChanged() {
789
+ if (!this.open && this.skipLoadAnimation) {
790
+ this.skipLoadAnimation = false;
791
+ }
792
+ if (this.open) {
793
+ this.handlePageOverflow();
794
+ }
795
+ this.canvasOpenStatusChanged.emit(this.open);
796
+ }
797
+ handlePageOverflow() {
798
+ const overflow = this.variant === OffCanvasVariant.OVERLAY ? "overflow-y" : "overflow-x";
799
+ document.body.style[overflow] = this.open ? "hidden" : "";
800
+ }
801
+ render() {
802
+ return (h(Host, { class: { "skip-animation": this.skipLoadAnimation } }, h("div", { role: "presentation", class: "canvas-container", onTransitionEnd: () => this.handlePageOverflow() }, h("div", { role: "presentation", class: "canvas-content" }, h("slot", { name: "canvasContent" }))), this.variant == OffCanvasVariant.OVERLAY && (h("div", { class: "canvas-background", "data-action": "canvasBackground", onClick: () => (this.open = false) }))));
803
+ }
804
+ static get watchers() { return {
805
+ "open": ["onOpenChanged"]
806
+ }; }
807
+ };
808
808
  ZOffcanvas.style = stylesCss$1;
809
809
 
810
810
  const stylesCss = ":host{z-index:10;display:flex;column-gap:calc(var(--space-unit) * 2);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host,*{box-sizing:border-box}.input-container{position:relative;display:flex;width:100%;flex-direction:column}.results-wrapper{position:absolute;top:calc(100% - 1px);left:0;width:100%;padding:calc(var(--space-unit) / 4);border:var(--border-size-small) solid var(--color-surface03);border-top:none;background:var(--color-surface01)}.results{overflow:auto;max-height:var(--z-searchbar-results-height, 540px);padding:calc(var(--space-unit) / 2) calc(var(--space-unit) * 1.5);scrollbar-color:var(--color-primary01) transparent}.results::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.results::-webkit-scrollbar-track{background-color:transparent}.results::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.results .category-heading{display:block;font-size:var(--font-size-2);font-weight:var(--font-rg);line-height:var(--font-size-3)}.results .category-heading>*{display:block}.results .category-heading>.category{color:var(--color-text05);font-style:italic}.results .category-heading>.subcategory{margin-top:var(--space-unit);color:var(--color-text01);text-transform:uppercase}.results z-list-element{display:block}.results .item{--z-icon-height:12px;--z-icon-width:12px;display:flex;flex-flow:row nowrap;align-items:center;justify-content:flex-start;color:var(--color-text01);column-gap:calc(var(--space-unit) * 1.5);fill:var(--color-icon02);font-size:var(--font-size-2);line-height:var(--font-size-3)}.results .item.ellipsis>.item-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.results .item>.item-label mark{background:var(--color-primary03)}.results .item.has-category{padding-left:calc(var(--space-unit) * 3)}.results .item.item-search{--z-icon-height:16px;--z-icon-width:16px}.results .item-show-all{text-align:center}.results .item-no-results{display:block;font-size:var(--font-size-2);font-style:italic;line-height:var(--font-size-5)}.results .item-no-results>ul{padding-left:calc(var(--space-unit) * 2);margin:var(--space-unit)}@media (min-width: 768px){.results .category-heading{font-size:var(--font-size-3);line-height:var(--font-size-6)}.results .item{font-size:var(--font-size-3);line-height:var(--font-size-6)}.results .item.item-search{--z-icon-height:18px;--z-icon-width:18px}.results .item.ellipsis>.item-label{height:24px}}@media (min-width: 1152px){.results .item{cursor:pointer}.results .item-no-results{cursor:default;font-size:var(--font-size-3);line-height:var(--font-size-6)}}:host([size=\"small\"]) .results :is(.item,.category-heading),:host([size=\"x-small\"]) .results :is(.item,.category-heading){font-size:var(--font-size-2)}:host([size=\"small\"]) .results .item:not(.has-category),:host([size=\"x-small\"]) .results .item:not(.has-category){--z-icon-height:16px;--z-icon-width:16px}:host([size=\"small\"])::part(list-item-container){min-height:calc(var(--space-unit) * 4.5);padding:0}:host([size=\"x-small\"])::part(list-item-container){min-height:calc(var(--space-unit) * 4);padding:0}";
811
811
 
812
- const ZSearchbar = class {
813
- constructor(hostRef) {
814
- registerInstance(this, hostRef);
815
- this.searchSubmit = createEvent(this, "searchSubmit", 7);
816
- this.searchTyping = createEvent(this, "searchTyping", 7);
817
- this.searchItemClick = createEvent(this, "searchItemClick", 7);
818
- /** the id of the searchbar element */
819
- this.htmlid = `searchbar-${randomId()}`;
820
- /** Prevent submit action */
821
- this.preventSubmit = false;
822
- /** Show autocomplete results */
823
- this.autocomplete = false;
824
- /** Minimun number of characters to dispatch typing event */
825
- this.autocompleteMinChars = 3;
826
- /** Truncate results to single row */
827
- this.resultsEllipsis = true;
828
- /** Search helper text */
829
- this.searchHelperLabel = "Cerca {searchString}";
830
- /** Sort autocomplete results items */
831
- this.sortResultsItems = false;
832
- /** Show submit button */
833
- this.showSearchButton = false;
834
- /** Set button icon without label*/
835
- this.searchButtonIconOnly = false;
836
- /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
837
- this.size = ControlSize.BIG;
838
- /** Graphical variant: `primary`, `secondary`, `tertiary`. Defaults to `primary`. */
839
- this.variant = ButtonVariant.PRIMARY;
840
- this.searchString = this.value;
841
- this.currResultsCount = 0;
842
- this.showResults = false;
843
- this.resultsItemsList = null;
844
- }
845
- emitSearchSubmit() {
846
- this.searchSubmit.emit(this.inputRef.value);
847
- }
848
- emitSearchTyping(search) {
849
- this.searchTyping.emit(search);
850
- }
851
- emitSearchItemClick(item) {
852
- this.searchItemClick.emit(item);
853
- }
854
- watchItems() {
855
- this.resultsItemsList = this.getResultsItemsList();
856
- }
857
- watchResultsCount() {
858
- this.currResultsCount = this.resultsCount;
859
- }
860
- watchValue() {
861
- this.searchString = this.value;
862
- }
863
- watchSearchString() {
864
- this.emitSearchTyping(this.searchString);
865
- if (!this.searchString) {
866
- this.currResultsCount = this.resultsCount;
867
- }
868
- }
869
- componentWillLoad() {
870
- this.resultsItemsList = this.getResultsItemsList();
871
- this.currResultsCount = this.resultsCount;
872
- }
873
- getResultsItemsList() {
874
- return typeof this.resultsItems === "string" ? JSON.parse(this.resultsItems) : this.resultsItems;
875
- }
876
- getGroupedItems(items) {
877
- const groupedItems = {};
878
- items.forEach((item) => {
879
- var _a;
880
- const key = `${item === null || item === void 0 ? void 0 : item.category}${item === null || item === void 0 ? void 0 : item.subcategory}`;
881
- groupedItems[key] = (_a = groupedItems[key]) !== null && _a !== void 0 ? _a : {
882
- category: item === null || item === void 0 ? void 0 : item.category,
883
- subcategory: item === null || item === void 0 ? void 0 : item.subcategory,
884
- items: [],
885
- };
886
- groupedItems[key]["items"].push(item);
887
- });
888
- if (this.sortResultsItems) {
889
- return Object.keys(groupedItems)
890
- .sort()
891
- .reduce((obj, key) => {
892
- obj[key] = Object.assign(Object.assign({}, groupedItems[key]), { items: groupedItems[key]["items"].sort((a, b) => {
893
- const nameA = a.label.toUpperCase();
894
- const nameB = b.label.toUpperCase();
895
- if (nameA < nameB) {
896
- return -1;
897
- }
898
- if (nameA > nameB) {
899
- return 1;
900
- }
901
- return 0;
902
- }) });
903
- return obj;
904
- }, {});
905
- }
906
- return groupedItems;
907
- }
908
- checkResultsCount(counter) {
909
- if (!this.currResultsCount || counter < this.currResultsCount) {
910
- return true;
911
- }
912
- return false;
913
- }
914
- handleStopTyping(e) {
915
- e.stopPropagation();
916
- this.searchString = e.detail.value;
917
- }
918
- handleSubmit() {
919
- if (this.preventSubmit) {
920
- return;
921
- }
922
- this.emitSearchSubmit();
923
- }
924
- handleOutsideClick(e) {
925
- const cp = e.composedPath();
926
- const searchbar = cp.find((elem) => elem.nodeName === "Z-SEARCHBAR");
927
- if (!searchbar || searchbar.htmlid !== this.htmlid) {
928
- this.showResults = false;
929
- return;
930
- }
931
- if (cp.find((elem) => { var _a; return (elem === null || elem === void 0 ? void 0 : elem.nodeName) === "Z-INPUT" || ((_a = elem === null || elem === void 0 ? void 0 : elem.classList) === null || _a === void 0 ? void 0 : _a.contains("results")); })) {
932
- this.showResults = true;
933
- return;
934
- }
935
- this.showResults = false;
936
- }
937
- renderInput() {
938
- return (h("z-input", { ref: (val) => {
939
- this.inputRef = val;
940
- }, message: false, placeholder: this.placeholder, onStopTyping: (e) => this.handleStopTyping(e), onKeyUp: (e) => handleEnterKeydSubmit(e, () => this.handleSubmit()), value: this.value, size: this.size }));
941
- }
942
- renderButton() {
943
- if (!this.showSearchButton) {
944
- return null;
945
- }
946
- const iconProp = this.searchButtonIconOnly ? { icon: "search" } : null;
947
- const buttonLabel = this.searchButtonIconOnly ? "" : "CERCA";
948
- const defaultProps = Object.assign({ disabled: this.preventSubmit, variant: this.variant, size: this.size, onClick: () => this.handleSubmit() }, iconProp);
949
- return h("z-button", Object.assign({}, defaultProps), buttonLabel);
950
- }
951
- renderResults() {
952
- if (!this.showResults ||
953
- !this.autocomplete ||
954
- !this.searchString ||
955
- this.searchString.length < this.autocompleteMinChars ||
956
- !this.resultsItemsList) {
957
- return null;
958
- }
959
- return (h("div", { class: "results-wrapper" }, h("div", { class: "results" }, this.renderResultsList())));
960
- }
961
- renderResultsList() {
962
- var _a, _b;
963
- if (this.preventSubmit && !((_a = this.resultsItemsList) === null || _a === void 0 ? void 0 : _a.length)) {
964
- return (h("span", { class: "item item-no-results" }, "Non abbiamo trovato risultati per ", h("b", null, this.searchString), h("br", null), h("br", null), "Cosa puoi fare?", h("ul", null, h("li", null, "Verificare di aver scritto bene"), h("li", null, "Provare a cercare un'altra parola"), h("li", null, "Provare a cercare qualcosa di pi\u00F9 generico"))));
965
- }
966
- return (h("z-list", { role: "listbox", id: `list-${this.htmlid}` }, this.renderSearchHelper(!!((_b = this.resultsItemsList) === null || _b === void 0 ? void 0 : _b.length)), this.renderItems(), this.renderShowAllResults()));
967
- }
968
- renderItems() {
969
- var _a;
970
- if (!((_a = this.resultsItemsList) === null || _a === void 0 ? void 0 : _a.length)) {
971
- return [];
972
- }
973
- const groupedItems = this.getGroupedItems(this.resultsItemsList);
974
- const listGroups = [];
975
- let counter = 0;
976
- Object.values(groupedItems).forEach((groupItem, index, array) => {
977
- if (this.checkResultsCount(counter)) {
978
- const listGroupsElements = [];
979
- groupItem.items.forEach((item, subindex, subarray) => {
980
- if (this.checkResultsCount(counter)) {
981
- const isLast = index === array.length - 1 && subindex === subarray.length - 1;
982
- listGroupsElements.push(this.renderItem(item, subindex, !isLast));
983
- }
984
- counter++;
985
- });
986
- if (listGroupsElements.length) {
987
- listGroups.push(h("z-list-group", { "divider-type": ListDividerType.ELEMENT }, this.renderItemCategory(groupItem), listGroupsElements));
988
- }
989
- }
990
- });
991
- return listGroups;
992
- }
993
- renderItem(item, key, divider) {
994
- return (h("z-list-element", { id: `list-item-${this.htmlid}-${key}`, role: "option", tabindex: 0, dividerType: divider ? ListDividerType.ELEMENT : undefined, clickable: true, onClickItem: () => this.emitSearchItemClick(item) }, h("span", { class: { "item": true, "ellipsis": this.resultsEllipsis, "has-category": !!item.category } }, (item === null || item === void 0 ? void 0 : item.icon) && (h("z-icon", { class: "item-icon", name: item.icon })), h("span", { class: "item-label", title: item.label, innerHTML: this.renderItemLabel(item.label) }))));
995
- }
996
- renderItemLabel(label) {
997
- if (!this.searchString) {
998
- return label;
999
- }
1000
- return label.replace(new RegExp(this.searchString.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "gmi"), (found) => `<mark>${found}</mark>`);
1001
- }
1002
- renderItemCategory(groupItem) {
1003
- if (!(groupItem === null || groupItem === void 0 ? void 0 : groupItem.category)) {
1004
- return null;
1005
- }
1006
- return (h("span", { class: "category-heading", slot: "header-title" }, h("span", { class: "category" }, groupItem.category), (groupItem === null || groupItem === void 0 ? void 0 : groupItem.subcategory) && h("span", { class: "subcategory" }, groupItem.subcategory)));
1007
- }
1008
- renderSearchHelper(hasDivider = true) {
1009
- if (!this.autocomplete || this.preventSubmit || !this.searchString) {
1010
- return null;
1011
- }
1012
- return (h("z-list-element", { role: "option", tabindex: 0, dividerType: hasDivider ? ListDividerType.ELEMENT : undefined, clickable: true, id: `list-item-${this.htmlid}-search`, onClickItem: () => this.emitSearchSubmit() }, h("span", { class: "item item-search" }, h("z-icon", { class: "search-icon", name: "left-magnifying-glass" }), h("span", { class: "item-label", innerHTML: this.searchHelperLabel.replace("{searchString}", `<mark>${this.searchString}</mark>`) }))));
1013
- }
1014
- renderShowAllResults() {
1015
- var _a, _b;
1016
- if (!this.currResultsCount ||
1017
- !this.searchString ||
1018
- !((_a = this.resultsItemsList) === null || _a === void 0 ? void 0 : _a.length) ||
1019
- this.currResultsCount >= ((_b = this.resultsItemsList) === null || _b === void 0 ? void 0 : _b.length)) {
1020
- return null;
1021
- }
1022
- return (h("z-list-element", { role: "option", tabindex: 0, clickable: true, id: `list-item-${this.htmlid}-show-all`, onClickItem: () => (this.currResultsCount = 0), color: "color-primary01" }, h("div", { class: "item-show-all" }, "Vedi tutti i risultati")));
1023
- }
1024
- render() {
1025
- return (h(Host, { onFocus: () => (this.showResults = true), onClick: (e) => this.handleOutsideClick(e), class: { "has-submit": this.showSearchButton, "has-results": this.autocomplete } }, h("div", { class: "input-container" }, this.renderInput(), this.renderResults()), this.renderButton()));
1026
- }
1027
- static get watchers() { return {
1028
- "resultsItems": ["watchItems"],
1029
- "resultsCount": ["watchResultsCount"],
1030
- "value": ["watchValue"],
1031
- "searchString": ["watchSearchString"]
1032
- }; }
1033
- };
812
+ const ZSearchbar = class {
813
+ constructor(hostRef) {
814
+ registerInstance(this, hostRef);
815
+ this.searchSubmit = createEvent(this, "searchSubmit", 7);
816
+ this.searchTyping = createEvent(this, "searchTyping", 7);
817
+ this.searchItemClick = createEvent(this, "searchItemClick", 7);
818
+ /** the id of the searchbar element */
819
+ this.htmlid = `searchbar-${randomId()}`;
820
+ /** Prevent submit action */
821
+ this.preventSubmit = false;
822
+ /** Show autocomplete results */
823
+ this.autocomplete = false;
824
+ /** Minimun number of characters to dispatch typing event */
825
+ this.autocompleteMinChars = 3;
826
+ /** Truncate results to single row */
827
+ this.resultsEllipsis = true;
828
+ /** Search helper text */
829
+ this.searchHelperLabel = "Cerca {searchString}";
830
+ /** Sort autocomplete results items */
831
+ this.sortResultsItems = false;
832
+ /** Show submit button */
833
+ this.showSearchButton = false;
834
+ /** Set button icon without label*/
835
+ this.searchButtonIconOnly = false;
836
+ /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
837
+ this.size = ControlSize.BIG;
838
+ /** Graphical variant: `primary`, `secondary`, `tertiary`. Defaults to `primary`. */
839
+ this.variant = ButtonVariant.PRIMARY;
840
+ this.searchString = this.value;
841
+ this.currResultsCount = 0;
842
+ this.showResults = false;
843
+ this.resultsItemsList = null;
844
+ }
845
+ emitSearchSubmit() {
846
+ this.searchSubmit.emit(this.inputRef.value);
847
+ }
848
+ emitSearchTyping(search) {
849
+ this.searchTyping.emit(search);
850
+ }
851
+ emitSearchItemClick(item) {
852
+ this.searchItemClick.emit(item);
853
+ }
854
+ watchItems() {
855
+ this.resultsItemsList = this.getResultsItemsList();
856
+ }
857
+ watchResultsCount() {
858
+ this.currResultsCount = this.resultsCount;
859
+ }
860
+ watchValue() {
861
+ this.searchString = this.value;
862
+ }
863
+ watchSearchString() {
864
+ this.emitSearchTyping(this.searchString);
865
+ if (!this.searchString) {
866
+ this.currResultsCount = this.resultsCount;
867
+ }
868
+ }
869
+ componentWillLoad() {
870
+ this.resultsItemsList = this.getResultsItemsList();
871
+ this.currResultsCount = this.resultsCount;
872
+ }
873
+ getResultsItemsList() {
874
+ return typeof this.resultsItems === "string" ? JSON.parse(this.resultsItems) : this.resultsItems;
875
+ }
876
+ getGroupedItems(items) {
877
+ const groupedItems = {};
878
+ items.forEach((item) => {
879
+ var _a;
880
+ const key = `${item === null || item === void 0 ? void 0 : item.category}${item === null || item === void 0 ? void 0 : item.subcategory}`;
881
+ groupedItems[key] = (_a = groupedItems[key]) !== null && _a !== void 0 ? _a : {
882
+ category: item === null || item === void 0 ? void 0 : item.category,
883
+ subcategory: item === null || item === void 0 ? void 0 : item.subcategory,
884
+ items: [],
885
+ };
886
+ groupedItems[key]["items"].push(item);
887
+ });
888
+ if (this.sortResultsItems) {
889
+ return Object.keys(groupedItems)
890
+ .sort()
891
+ .reduce((obj, key) => {
892
+ obj[key] = Object.assign(Object.assign({}, groupedItems[key]), { items: groupedItems[key]["items"].sort((a, b) => {
893
+ const nameA = a.label.toUpperCase();
894
+ const nameB = b.label.toUpperCase();
895
+ if (nameA < nameB) {
896
+ return -1;
897
+ }
898
+ if (nameA > nameB) {
899
+ return 1;
900
+ }
901
+ return 0;
902
+ }) });
903
+ return obj;
904
+ }, {});
905
+ }
906
+ return groupedItems;
907
+ }
908
+ checkResultsCount(counter) {
909
+ if (!this.currResultsCount || counter < this.currResultsCount) {
910
+ return true;
911
+ }
912
+ return false;
913
+ }
914
+ handleStopTyping(e) {
915
+ e.stopPropagation();
916
+ this.searchString = e.detail.value;
917
+ }
918
+ handleSubmit() {
919
+ if (this.preventSubmit) {
920
+ return;
921
+ }
922
+ this.emitSearchSubmit();
923
+ }
924
+ handleOutsideClick(e) {
925
+ const cp = e.composedPath();
926
+ const searchbar = cp.find((elem) => elem.nodeName === "Z-SEARCHBAR");
927
+ if (!searchbar || searchbar.htmlid !== this.htmlid) {
928
+ this.showResults = false;
929
+ return;
930
+ }
931
+ if (cp.find((elem) => { var _a; return (elem === null || elem === void 0 ? void 0 : elem.nodeName) === "Z-INPUT" || ((_a = elem === null || elem === void 0 ? void 0 : elem.classList) === null || _a === void 0 ? void 0 : _a.contains("results")); })) {
932
+ this.showResults = true;
933
+ return;
934
+ }
935
+ this.showResults = false;
936
+ }
937
+ renderInput() {
938
+ return (h("z-input", { ref: (val) => {
939
+ this.inputRef = val;
940
+ }, message: false, placeholder: this.placeholder, onStopTyping: (e) => this.handleStopTyping(e), onKeyUp: (e) => handleEnterKeydSubmit(e, () => this.handleSubmit()), value: this.value, size: this.size }));
941
+ }
942
+ renderButton() {
943
+ if (!this.showSearchButton) {
944
+ return null;
945
+ }
946
+ const iconProp = this.searchButtonIconOnly ? { icon: "search" } : null;
947
+ const buttonLabel = this.searchButtonIconOnly ? "" : "CERCA";
948
+ const defaultProps = Object.assign({ disabled: this.preventSubmit, variant: this.variant, size: this.size, onClick: () => this.handleSubmit() }, iconProp);
949
+ return h("z-button", Object.assign({}, defaultProps), buttonLabel);
950
+ }
951
+ renderResults() {
952
+ if (!this.showResults ||
953
+ !this.autocomplete ||
954
+ !this.searchString ||
955
+ this.searchString.length < this.autocompleteMinChars ||
956
+ !this.resultsItemsList) {
957
+ return null;
958
+ }
959
+ return (h("div", { class: "results-wrapper" }, h("div", { class: "results" }, this.renderResultsList())));
960
+ }
961
+ renderResultsList() {
962
+ var _a, _b;
963
+ if (this.preventSubmit && !((_a = this.resultsItemsList) === null || _a === void 0 ? void 0 : _a.length)) {
964
+ return (h("span", { class: "item item-no-results" }, "Non abbiamo trovato risultati per ", h("b", null, this.searchString), h("br", null), h("br", null), "Cosa puoi fare?", h("ul", null, h("li", null, "Verificare di aver scritto bene"), h("li", null, "Provare a cercare un'altra parola"), h("li", null, "Provare a cercare qualcosa di pi\u00F9 generico"))));
965
+ }
966
+ return (h("z-list", { role: "listbox", id: `list-${this.htmlid}` }, this.renderSearchHelper(!!((_b = this.resultsItemsList) === null || _b === void 0 ? void 0 : _b.length)), this.renderItems(), this.renderShowAllResults()));
967
+ }
968
+ renderItems() {
969
+ var _a;
970
+ if (!((_a = this.resultsItemsList) === null || _a === void 0 ? void 0 : _a.length)) {
971
+ return [];
972
+ }
973
+ const groupedItems = this.getGroupedItems(this.resultsItemsList);
974
+ const listGroups = [];
975
+ let counter = 0;
976
+ Object.values(groupedItems).forEach((groupItem, index, array) => {
977
+ if (this.checkResultsCount(counter)) {
978
+ const listGroupsElements = [];
979
+ groupItem.items.forEach((item, subindex, subarray) => {
980
+ if (this.checkResultsCount(counter)) {
981
+ const isLast = index === array.length - 1 && subindex === subarray.length - 1;
982
+ listGroupsElements.push(this.renderItem(item, subindex, !isLast));
983
+ }
984
+ counter++;
985
+ });
986
+ if (listGroupsElements.length) {
987
+ listGroups.push(h("z-list-group", { "divider-type": ListDividerType.ELEMENT }, this.renderItemCategory(groupItem), listGroupsElements));
988
+ }
989
+ }
990
+ });
991
+ return listGroups;
992
+ }
993
+ renderItem(item, key, divider) {
994
+ return (h("z-list-element", { id: `list-item-${this.htmlid}-${key}`, role: "option", tabindex: 0, dividerType: divider ? ListDividerType.ELEMENT : undefined, clickable: true, onClickItem: () => this.emitSearchItemClick(item) }, h("span", { class: { "item": true, "ellipsis": this.resultsEllipsis, "has-category": !!item.category } }, (item === null || item === void 0 ? void 0 : item.icon) && (h("z-icon", { class: "item-icon", name: item.icon })), h("span", { class: "item-label", title: item.label, innerHTML: this.renderItemLabel(item.label) }))));
995
+ }
996
+ renderItemLabel(label) {
997
+ if (!this.searchString) {
998
+ return label;
999
+ }
1000
+ return label.replace(new RegExp(this.searchString.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "gmi"), (found) => `<mark>${found}</mark>`);
1001
+ }
1002
+ renderItemCategory(groupItem) {
1003
+ if (!(groupItem === null || groupItem === void 0 ? void 0 : groupItem.category)) {
1004
+ return null;
1005
+ }
1006
+ return (h("span", { class: "category-heading", slot: "header-title" }, h("span", { class: "category" }, groupItem.category), (groupItem === null || groupItem === void 0 ? void 0 : groupItem.subcategory) && h("span", { class: "subcategory" }, groupItem.subcategory)));
1007
+ }
1008
+ renderSearchHelper(hasDivider = true) {
1009
+ if (!this.autocomplete || this.preventSubmit || !this.searchString) {
1010
+ return null;
1011
+ }
1012
+ return (h("z-list-element", { role: "option", tabindex: 0, dividerType: hasDivider ? ListDividerType.ELEMENT : undefined, clickable: true, id: `list-item-${this.htmlid}-search`, onClickItem: () => this.emitSearchSubmit() }, h("span", { class: "item item-search" }, h("z-icon", { class: "search-icon", name: "left-magnifying-glass" }), h("span", { class: "item-label", innerHTML: this.searchHelperLabel.replace("{searchString}", `<mark>${this.searchString}</mark>`) }))));
1013
+ }
1014
+ renderShowAllResults() {
1015
+ var _a, _b;
1016
+ if (!this.currResultsCount ||
1017
+ !this.searchString ||
1018
+ !((_a = this.resultsItemsList) === null || _a === void 0 ? void 0 : _a.length) ||
1019
+ this.currResultsCount >= ((_b = this.resultsItemsList) === null || _b === void 0 ? void 0 : _b.length)) {
1020
+ return null;
1021
+ }
1022
+ return (h("z-list-element", { role: "option", tabindex: 0, clickable: true, id: `list-item-${this.htmlid}-show-all`, onClickItem: () => (this.currResultsCount = 0), color: "color-primary01" }, h("div", { class: "item-show-all" }, "Vedi tutti i risultati")));
1023
+ }
1024
+ render() {
1025
+ return (h(Host, { onFocus: () => (this.showResults = true), onClick: (e) => this.handleOutsideClick(e), class: { "has-submit": this.showSearchButton, "has-results": this.autocomplete } }, h("div", { class: "input-container" }, this.renderInput(), this.renderResults()), this.renderButton()));
1026
+ }
1027
+ static get watchers() { return {
1028
+ "resultsItems": ["watchItems"],
1029
+ "resultsCount": ["watchResultsCount"],
1030
+ "value": ["watchValue"],
1031
+ "searchString": ["watchSearchString"]
1032
+ }; }
1033
+ };
1034
1034
  ZSearchbar.style = stylesCss;
1035
1035
 
1036
1036
  export { ZAppHeader as z_app_header, ZButton as z_button, ZDivider as z_divider, ZIcon as z_icon, ZInput as z_input, ZInputMessage as z_input_message, ZList as z_list, ZListElement as z_list_element, ZListGroup as z_list_group, ZOffcanvas as z_offcanvas, ZSearchbar as z_searchbar };